@flatbiz/antd 5.0.21 → 5.0.22
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/dist/box-grid/index.d.ts +8 -0
- package/dist/box-grid/index.js +19 -8
- package/dist/box-grid/index.js.map +1 -1
- package/dist/date-range-picker-wrapper-form-item/index.d.ts +18 -5
- package/dist/date-range-picker-wrapper-form-item/index.js +3 -3
- package/dist/{date-range-picker-wrapper-form-item-BPc8iK10.js → date-range-picker-wrapper-form-item-CVdR6o1K.js} +3 -3
- package/dist/{date-range-picker-wrapper-form-item-BPc8iK10.js.map → date-range-picker-wrapper-form-item-CVdR6o1K.js.map} +1 -1
- package/dist/{drag-DOhz_ox7.js → drag-CdynEXy3.js} +2 -2
- package/dist/{drag-DOhz_ox7.js.map → drag-CdynEXy3.js.map} +1 -1
- package/dist/{drag-D_u-98wL.js → drag-Cf-uGR4g.js} +2 -2
- package/dist/{drag-D_u-98wL.js.map → drag-Cf-uGR4g.js.map} +1 -1
- package/dist/drag-editable-card/index.d.ts +25 -4
- package/dist/drag-editable-card/index.js +5 -5
- package/dist/drag-editable-table/index.js +3 -3
- package/dist/drag-editable-table-pro/index.d.ts +17 -4
- package/dist/drag-editable-table-pro/index.js +3 -3
- package/dist/easy-form/index.d.ts +12 -1
- package/dist/easy-form/index.js +1 -1
- package/dist/easy-table/index.d.ts +8 -0
- package/dist/easy-table/index.js +1 -1
- package/dist/editable-card/index.d.ts +25 -4
- package/dist/editable-card/index.js +4 -4
- package/dist/{editable-card-Deo3SUjG.js → editable-card-C5TJSyK1.js} +4 -4
- package/dist/{editable-card-Deo3SUjG.js.map → editable-card-C5TJSyK1.js.map} +1 -1
- package/dist/{editable-card-CT6GEcp6.js → editable-card-DUMTbVEH.js} +2 -2
- package/dist/{editable-card-CT6GEcp6.js.map → editable-card-DUMTbVEH.js.map} +1 -1
- package/dist/editable-table/index.js +2 -2
- package/dist/{editable-table-tiF4vQG9.js → editable-table-DTDlVNKW.js} +2 -2
- package/dist/{editable-table-tiF4vQG9.js.map → editable-table-DTDlVNKW.js.map} +1 -1
- package/dist/editable-table-pro/index.d.ts +17 -4
- package/dist/editable-table-pro/index.js +2 -2
- package/dist/{editable-table-pro-jkHndPRi.js → editable-table-pro-Cf7q_mZy.js} +2 -2
- package/dist/{editable-table-pro-jkHndPRi.js.map → editable-table-pro-Cf7q_mZy.js.map} +1 -1
- package/dist/{form-w7uoh7-7.js → form-CNTtsktC.js} +12 -42
- package/dist/form-CNTtsktC.js.map +1 -0
- package/dist/form-item-hidden/index.d.ts +3 -0
- package/dist/form-item-hidden/index.js +1 -1
- package/dist/{form-item-hidden-B9afZdSe.js → form-item-hidden-BtQvJEx7.js} +3 -1
- package/dist/form-item-hidden-BtQvJEx7.js.map +1 -0
- package/dist/form-item-span/index.d.ts +2 -0
- package/dist/form-item-span/index.js +2 -2
- package/dist/form-item-text/index.d.ts +17 -4
- package/dist/form-item-text/index.js +3 -3
- package/dist/{form-item-text-0Z3jfmVa.js → form-item-text-BYdgh9j8.js} +3 -3
- package/dist/{form-item-text-0Z3jfmVa.js.map → form-item-text-BYdgh9j8.js.map} +1 -1
- package/dist/form-item-wrapper/index.d.ts +20 -7
- package/dist/form-item-wrapper/index.js +1 -1
- package/dist/{form-item-wrapper-DHRbunEm.js → form-item-wrapper-CcXZVf_r.js} +44 -10
- package/dist/form-item-wrapper-CcXZVf_r.js.map +1 -0
- package/dist/index.d.ts +43 -45
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/dist/{number-range-DoBW86wx.js → number-range-DFh_eoMX.js} +2 -2
- package/dist/{number-range-DoBW86wx.js.map → number-range-DFh_eoMX.js.map} +1 -1
- package/dist/number-range-form-item/index.d.ts +18 -5
- package/dist/number-range-form-item/index.js +2 -2
- package/dist/pre-defined-class-name/index.css +1 -1
- package/dist/{span-_AZUf9Zw.js → span-D99Im_jS.js} +3 -5
- package/dist/span-D99Im_jS.js.map +1 -0
- package/dist/styles/index.css +1 -1
- package/dist/time-range-picker-wrapper-form-item/index.d.ts +18 -5
- package/dist/time-range-picker-wrapper-form-item/index.js +3 -3
- package/dist/{time-range-picker-wrapper-form-item-CZSB-Rzh.js → time-range-picker-wrapper-form-item-56NaMNMS.js} +3 -3
- package/dist/{time-range-picker-wrapper-form-item-CZSB-Rzh.js.map → time-range-picker-wrapper-form-item-56NaMNMS.js.map} +1 -1
- package/package.json +1 -6
- package/CHANGELOG.md +0 -1
- package/dist/dependencies-C23wp0ou.js +0 -61
- package/dist/dependencies-C23wp0ou.js.map +0 -1
- package/dist/form-item-hidden-B9afZdSe.js.map +0 -1
- package/dist/form-item-wrapper-DHRbunEm.js.map +0 -1
- package/dist/form-item-wrapper-dependencies/index.css +0 -0
- package/dist/form-item-wrapper-dependencies/index.d.ts +0 -85
- package/dist/form-item-wrapper-dependencies/index.js +0 -19
- package/dist/form-item-wrapper-dependencies/index.js.map +0 -1
- package/dist/form-w7uoh7-7.js.map +0 -1
- package/dist/span-_AZUf9Zw.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAny } from '@flatbiz/utils';
|
|
1
|
+
import { TAny, TPlainObject } from '@flatbiz/utils';
|
|
2
2
|
import { FormItemProps } from 'antd';
|
|
3
3
|
import { ReactElement, ReactNode } from 'react';
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ export type TFormItemLayoutPreClassNameProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
className?: string;
|
|
22
22
|
};
|
|
23
|
-
export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNameProps & {
|
|
23
|
+
export type FormItemWrapperProps = Omit<FormItemProps, "hidden"> & TFormItemLayoutPreClassNameProps & {
|
|
24
24
|
wrapper?: (children: ReactNode) => ReactElement;
|
|
25
25
|
/** 设置wrapper后,before、after失效 */
|
|
26
26
|
before?: ReactNode;
|
|
@@ -33,12 +33,25 @@ export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNamePr
|
|
|
33
33
|
* 如果设置 normalize 属性,outputNormalize将失效
|
|
34
34
|
*/
|
|
35
35
|
outputNormalize?: (value?: TAny) => TAny;
|
|
36
|
-
/**
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 隐藏 Form.Item,同时清除 Form.Item 值
|
|
38
|
+
* ```
|
|
39
|
+
* 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
isClear?: boolean | ((formValues: TPlainObject) => boolean);
|
|
43
|
+
/**
|
|
44
|
+
* 隐藏 Form.Item,不会清除 Form.Item 值
|
|
45
|
+
* ```
|
|
46
|
+
* 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
hidden?: boolean | ((formValues: TPlainObject) => boolean);
|
|
38
50
|
/**
|
|
39
51
|
* 栅格占位格数,最大值:24
|
|
40
52
|
* ```
|
|
41
|
-
* 1.
|
|
53
|
+
* 1. 当前FormItemWrapper处在 EasyForm 直接子节点中有效,即FormItemWrapper在EasyForm栅格中的占位格数;
|
|
54
|
+
* 2. 父节点使用属性值,当前节点不使用属性值
|
|
42
55
|
* ```
|
|
43
56
|
*/
|
|
44
57
|
span?: number;
|
|
@@ -49,8 +62,8 @@ export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNamePr
|
|
|
49
62
|
* 1. 为 children 增加 before、after
|
|
50
63
|
* 2. 对输入、输出数据进行序列化处理
|
|
51
64
|
* 3. 内置布局样式使用 preDefinedClassName.formItem
|
|
52
|
-
* 4. 设置隐藏域(不清除字段值) 使用hidden
|
|
53
|
-
* 5. 设置隐藏域(清除字段值)使用isClear
|
|
65
|
+
* 4. 设置隐藏域(不清除字段值) 使用hidden,存在依赖逻辑,可与dependencies属性配合使用
|
|
66
|
+
* 5. 设置隐藏域(清除字段值)使用isClear,存在依赖逻辑,可与dependencies属性配合使用
|
|
54
67
|
* ```
|
|
55
68
|
*/
|
|
56
69
|
export declare const FormItemWrapper: {
|
|
@@ -4,7 +4,7 @@ import './../pre-defined-class-name/index.css';
|
|
|
4
4
|
import './index.css';
|
|
5
5
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
6
6
|
|
|
7
|
-
export { F as FormItemWrapper } from '../form-item-wrapper-
|
|
7
|
+
export { F as FormItemWrapper } from '../form-item-wrapper-CcXZVf_r.js';
|
|
8
8
|
import '../_rollupPluginBabelHelpers-BYm17lo8.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'antd';
|
|
@@ -9,7 +9,7 @@ import { preDefinedClassName } from './pre-defined-class-name/index.js';
|
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
var _excluded = ["wrapper", "children", "inputNormalize", "isClear"],
|
|
12
|
-
_excluded2 = ["wrapper", "isClear", "labelWidth", "labelItemVertical", "labelAlign", "children", "before", "after", "inputNormalize", "outputNormalize", "className"];
|
|
12
|
+
_excluded2 = ["wrapper", "isClear", "labelWidth", "labelItemVertical", "labelAlign", "children", "before", "after", "inputNormalize", "outputNormalize", "className", "dependencies", "hidden"];
|
|
13
13
|
var FormItemWrapperChildren = function FormItemWrapperChildren(props) {
|
|
14
14
|
var wrapper = props.wrapper,
|
|
15
15
|
children = props.children,
|
|
@@ -64,8 +64,8 @@ var FormItemWrapperChildren = function FormItemWrapperChildren(props) {
|
|
|
64
64
|
* 1. 为 children 增加 before、after
|
|
65
65
|
* 2. 对输入、输出数据进行序列化处理
|
|
66
66
|
* 3. 内置布局样式使用 preDefinedClassName.formItem
|
|
67
|
-
* 4. 设置隐藏域(不清除字段值) 使用hidden
|
|
68
|
-
* 5. 设置隐藏域(清除字段值)使用isClear
|
|
67
|
+
* 4. 设置隐藏域(不清除字段值) 使用hidden,存在依赖逻辑,可与dependencies属性配合使用
|
|
68
|
+
* 5. 设置隐藏域(清除字段值)使用isClear,存在依赖逻辑,可与dependencies属性配合使用
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
71
|
var FormItemWrapper = function FormItemWrapper(props) {
|
|
@@ -74,13 +74,16 @@ var FormItemWrapper = function FormItemWrapper(props) {
|
|
|
74
74
|
labelWidth = props.labelWidth,
|
|
75
75
|
labelItemVertical = props.labelItemVertical,
|
|
76
76
|
labelAlign = props.labelAlign,
|
|
77
|
-
|
|
77
|
+
_children2 = props.children,
|
|
78
78
|
before = props.before,
|
|
79
79
|
after = props.after,
|
|
80
80
|
inputNormalize = props.inputNormalize,
|
|
81
81
|
outputNormalize = props.outputNormalize,
|
|
82
82
|
className = props.className,
|
|
83
|
+
dependencies = props.dependencies,
|
|
84
|
+
hidden = props.hidden,
|
|
83
85
|
rest = _objectWithoutProperties(props, _excluded2);
|
|
86
|
+
var form = Form.useFormInstance();
|
|
84
87
|
var innerClassName = useMemo(function () {
|
|
85
88
|
return preDefinedClassName.getFormItemLayoutClassName({
|
|
86
89
|
labelWidth: labelWidth,
|
|
@@ -89,22 +92,53 @@ var FormItemWrapper = function FormItemWrapper(props) {
|
|
|
89
92
|
className: className
|
|
90
93
|
});
|
|
91
94
|
}, [labelWidth, labelItemVertical, labelAlign, className]);
|
|
95
|
+
if (dependencies && (dependencies === null || dependencies === void 0 ? void 0 : dependencies.length) > 0) {
|
|
96
|
+
return /*#__PURE__*/jsx(Form.Item, {
|
|
97
|
+
dependencies: dependencies,
|
|
98
|
+
noStyle: true,
|
|
99
|
+
children: function children(innerForm) {
|
|
100
|
+
var innerHidden = typeof hidden === 'function' ? hidden === null || hidden === void 0 ? void 0 : hidden(innerForm.getFieldsValue()) : hidden;
|
|
101
|
+
var innerIsClear = typeof isClear === 'function' ? isClear === null || isClear === void 0 ? void 0 : isClear(innerForm.getFieldsValue()) : isClear;
|
|
102
|
+
var rules = rest.rules;
|
|
103
|
+
if (innerIsClear || innerHidden) {
|
|
104
|
+
rules = [];
|
|
105
|
+
}
|
|
106
|
+
return /*#__PURE__*/jsx(Form.Item, _objectSpread2(_objectSpread2({
|
|
107
|
+
normalize: outputNormalize
|
|
108
|
+
}, rest), {}, {
|
|
109
|
+
className: innerClassName,
|
|
110
|
+
hidden: innerIsClear || innerHidden,
|
|
111
|
+
rules: rules,
|
|
112
|
+
children: /*#__PURE__*/isValidElement(_children2) ? /*#__PURE__*/jsx(FormItemWrapperChildren, {
|
|
113
|
+
wrapper: wrapper,
|
|
114
|
+
before: before,
|
|
115
|
+
after: after,
|
|
116
|
+
inputNormalize: inputNormalize,
|
|
117
|
+
isClear: innerIsClear,
|
|
118
|
+
children: _children2
|
|
119
|
+
}) : _children2
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
var innerHidden = typeof hidden === 'function' ? hidden(form.getFieldsValue()) : hidden;
|
|
125
|
+
var innerIsClear = typeof isClear === 'function' ? isClear(form.getFieldsValue()) : isClear;
|
|
92
126
|
return /*#__PURE__*/jsx(Form.Item, _objectSpread2(_objectSpread2({
|
|
93
127
|
normalize: outputNormalize
|
|
94
128
|
}, rest), {}, {
|
|
95
129
|
className: innerClassName,
|
|
96
|
-
hidden:
|
|
97
|
-
children: /*#__PURE__*/isValidElement(
|
|
130
|
+
hidden: innerHidden || innerIsClear,
|
|
131
|
+
children: /*#__PURE__*/isValidElement(_children2) ? /*#__PURE__*/jsx(FormItemWrapperChildren, {
|
|
98
132
|
wrapper: wrapper,
|
|
99
133
|
before: before,
|
|
100
134
|
after: after,
|
|
101
135
|
inputNormalize: inputNormalize,
|
|
102
|
-
isClear:
|
|
103
|
-
children:
|
|
104
|
-
}) :
|
|
136
|
+
isClear: innerIsClear,
|
|
137
|
+
children: _children2
|
|
138
|
+
}) : _children2
|
|
105
139
|
}));
|
|
106
140
|
};
|
|
107
141
|
FormItemWrapper['domTypeName'] = 'FormItemWrapper';
|
|
108
142
|
|
|
109
143
|
export { FormItemWrapper as F };
|
|
110
|
-
//# sourceMappingURL=form-item-wrapper-
|
|
144
|
+
//# sourceMappingURL=form-item-wrapper-CcXZVf_r.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-item-wrapper-CcXZVf_r.js","sources":["@flatbiz/antd/src/form-item-wrapper/form-item-wrapper.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { cloneElement, isValidElement, useMemo } from 'react';\nimport type { FormItemProps } from 'antd';\nimport { Form } from 'antd';\nimport type { TAny, TPlainObject } from '@flatbiz/utils';\nimport { composeProps, isUndefinedOrNull } from '@flatbiz/utils';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport type { TFormItemLayoutPreClassNameProps } from '../pre-defined-class-name/form/index.jsx';\nimport { preDefinedClassName } from '../pre-defined-class-name/index.js';\nexport type FormItemWrapperProps = Omit<FormItemProps, 'hidden'> &\n TFormItemLayoutPreClassNameProps & {\n wrapper?: (children: ReactNode) => ReactElement;\n /** 设置wrapper后,before、after失效 */\n before?: ReactNode;\n /** 设置wrapper后,before、after失效 */\n after?: ReactNode;\n /** value 序列化处理 */\n inputNormalize?: (value?: TAny) => TAny;\n /**\n * onChange 参数序列化处理\n * 如果设置 normalize 属性,outputNormalize将失效\n */\n outputNormalize?: (value?: TAny) => TAny;\n /**\n * 隐藏 Form.Item,同时清除 Form.Item 值\n * ```\n * 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏\n * ```\n */\n isClear?: boolean | ((formValues: TPlainObject) => boolean);\n /**\n * 隐藏 Form.Item,不会清除 Form.Item 值\n * ```\n * 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏\n * ```\n */\n hidden?: boolean | ((formValues: TPlainObject) => boolean);\n /**\n * 栅格占位格数,最大值:24\n * ```\n * 1. 当前FormItemWrapper处在 EasyForm 直接子节点中有效,即FormItemWrapper在EasyForm栅格中的占位格数;\n * 2. 父节点使用属性值,当前节点不使用属性值\n * ```\n */\n span?: number;\n };\n\ntype FormItemWrapperChildrenProps = Pick<\n FormItemWrapperProps,\n 'wrapper' | 'after' | 'before' | 'inputNormalize' | 'isClear'\n> & {\n children: ReactElement;\n value?: any;\n onChange?: (value?: any) => any;\n};\n\nconst FormItemWrapperChildren = (props: FormItemWrapperChildrenProps) => {\n const { wrapper, children, inputNormalize, isClear, ...rest } = props;\n // composeProps 合并执行 Form.Item 传的 onChange 以及组件本身的方法\n const hasValue = Object.prototype.hasOwnProperty.call(rest, 'value');\n if (hasValue && inputNormalize) {\n rest['value'] = inputNormalize(rest['value']);\n }\n const _children = cloneElement(\n children,\n composeProps(children.props, rest, true)\n );\n\n fbaHooks.useEffectCustom(() => {\n if (isClear && !isUndefinedOrNull(props.value)) {\n props.onChange?.(undefined);\n }\n }, [isClear, props.value]);\n\n if (wrapper) {\n return wrapper(_children);\n }\n if (props.before || props.after) {\n return (\n <div style={{ display: 'flex', alignItems: 'center' }}>\n {props.before ? (\n <span style={{ marginRight: 10 }}>{props.before}</span>\n ) : null}\n <div style={{ flex: 1 }}>{_children}</div>\n {props.after ? (\n <span style={{ marginLeft: 10 }}>{props.after}</span>\n ) : null}\n </div>\n );\n }\n return _children;\n};\n\n/**\n * 对 Form.Item 包装处理\n * ```\n * 1. 为 children 增加 before、after\n * 2. 对输入、输出数据进行序列化处理\n * 3. 内置布局样式使用 preDefinedClassName.formItem\n * 4. 设置隐藏域(不清除字段值) 使用hidden,存在依赖逻辑,可与dependencies属性配合使用\n * 5. 设置隐藏域(清除字段值)使用isClear,存在依赖逻辑,可与dependencies属性配合使用\n * ```\n */\nexport const FormItemWrapper = (props: FormItemWrapperProps) => {\n const {\n wrapper,\n isClear,\n labelWidth,\n labelItemVertical,\n labelAlign,\n children,\n before,\n after,\n inputNormalize,\n outputNormalize,\n className,\n dependencies,\n hidden,\n ...rest\n } = props;\n const form = Form.useFormInstance();\n const innerClassName = useMemo(() => {\n return preDefinedClassName.getFormItemLayoutClassName({\n labelWidth,\n labelItemVertical,\n labelAlign,\n className,\n });\n }, [labelWidth, labelItemVertical, labelAlign, className]);\n\n if (dependencies && dependencies?.length > 0) {\n return (\n <Form.Item dependencies={dependencies} noStyle>\n {(innerForm) => {\n const innerHidden =\n typeof hidden === 'function'\n ? hidden?.(innerForm.getFieldsValue())\n : hidden;\n const innerIsClear =\n typeof isClear === 'function'\n ? isClear?.(innerForm.getFieldsValue())\n : isClear;\n let rules = rest.rules;\n if (innerIsClear || innerHidden) {\n rules = [];\n }\n return (\n <Form.Item\n normalize={outputNormalize}\n {...rest}\n className={innerClassName}\n hidden={innerIsClear || innerHidden}\n rules={rules}\n >\n {isValidElement(children) ? (\n <FormItemWrapperChildren\n wrapper={wrapper}\n before={before}\n after={after}\n inputNormalize={inputNormalize}\n isClear={innerIsClear}\n >\n {children}\n </FormItemWrapperChildren>\n ) : (\n children\n )}\n </Form.Item>\n );\n }}\n </Form.Item>\n );\n }\n\n const innerHidden =\n typeof hidden === 'function' ? hidden(form.getFieldsValue()) : hidden;\n const innerIsClear =\n typeof isClear === 'function' ? isClear(form.getFieldsValue()) : isClear;\n\n return (\n <Form.Item\n normalize={outputNormalize}\n {...rest}\n className={innerClassName}\n hidden={innerHidden || innerIsClear}\n >\n {isValidElement(children) ? (\n <FormItemWrapperChildren\n wrapper={wrapper}\n before={before}\n after={after}\n inputNormalize={inputNormalize}\n isClear={innerIsClear}\n >\n {children}\n </FormItemWrapperChildren>\n ) : (\n children\n )}\n </Form.Item>\n );\n};\n\nFormItemWrapper['domTypeName'] = 'FormItemWrapper';\n"],"names":["FormItemWrapperChildren","props","wrapper","children","inputNormalize","isClear","rest","_objectWithoutProperties","_excluded","hasValue","Object","prototype","hasOwnProperty","call","_children","cloneElement","composeProps","fbaHooks","useEffectCustom","isUndefinedOrNull","value","_props$onChange","onChange","undefined","before","after","_jsxs","style","display","alignItems","_jsx","marginRight","flex","marginLeft","FormItemWrapper","labelWidth","labelItemVertical","labelAlign","outputNormalize","className","dependencies","hidden","_excluded2","form","Form","useFormInstance","innerClassName","useMemo","preDefinedClassName","getFormItemLayoutClassName","length","Item","noSty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S,EAAEO,cAAe;IAC1BL,MAAM,EAAEa,WAAW,IAAIE,YAAa;IAAArD,QAAA,eAEnCyD,cAAc,CAACzD,UAAQ,CAAC,gBACvB2B,GAAA,CAAC9B,uBAAuB,EAAA;AACtBE,MAAAA,OAAO,EAAEA,OAAQ;AACjBsB,MAAAA,MAAM,EAAEA,MAAO;AACfC,MAAAA,KAAK,EAAEA,KAAM;AACbrB,MAAAA,cAAc,EAAEA,cAAe;AAC/BC,MAAAA,OAAO,EAAEmD,YAAa;AAAArD,MAAAA,QAAA,EAErBA;AAAQ,KACc,CAAC,GAE1BA;AACD,GAAA,CACQ,CAAC;AAEhB;AAEA+B,eAAe,CAAC,aAAa,CAAC,GAAG,iBAAiB;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -374,6 +374,14 @@ export type BoxColProps = {
|
|
|
374
374
|
xl?: number;
|
|
375
375
|
/** 屏幕 ≥ 1600px */
|
|
376
376
|
xxl?: number;
|
|
377
|
+
/**
|
|
378
|
+
* 是否移除 外部包装div
|
|
379
|
+
* ```
|
|
380
|
+
* 1. 如果children 为数组,则此配置不生效
|
|
381
|
+
* 2. 如果移除,会在children中添加style和className(所以children组件必须要有style、className属性)
|
|
382
|
+
* ```
|
|
383
|
+
*/
|
|
384
|
+
removeWrapper?: boolean;
|
|
377
385
|
};
|
|
378
386
|
export declare const BoxGrid: {
|
|
379
387
|
/**
|
|
@@ -996,7 +1004,7 @@ export type TFormItemLayoutPreClassNameProps = {
|
|
|
996
1004
|
*/
|
|
997
1005
|
className?: string;
|
|
998
1006
|
};
|
|
999
|
-
export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNameProps & {
|
|
1007
|
+
export type FormItemWrapperProps = Omit<FormItemProps, "hidden"> & TFormItemLayoutPreClassNameProps & {
|
|
1000
1008
|
wrapper?: (children: ReactNode) => ReactElement;
|
|
1001
1009
|
/** 设置wrapper后,before、after失效 */
|
|
1002
1010
|
before?: ReactNode;
|
|
@@ -1009,12 +1017,25 @@ export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNamePr
|
|
|
1009
1017
|
* 如果设置 normalize 属性,outputNormalize将失效
|
|
1010
1018
|
*/
|
|
1011
1019
|
outputNormalize?: (value?: TAny) => TAny;
|
|
1012
|
-
/**
|
|
1013
|
-
|
|
1020
|
+
/**
|
|
1021
|
+
* 隐藏 Form.Item,同时清除 Form.Item 值
|
|
1022
|
+
* ```
|
|
1023
|
+
* 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏
|
|
1024
|
+
* ```
|
|
1025
|
+
*/
|
|
1026
|
+
isClear?: boolean | ((formValues: TPlainObject) => boolean);
|
|
1027
|
+
/**
|
|
1028
|
+
* 隐藏 Form.Item,不会清除 Form.Item 值
|
|
1029
|
+
* ```
|
|
1030
|
+
* 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏
|
|
1031
|
+
* ```
|
|
1032
|
+
*/
|
|
1033
|
+
hidden?: boolean | ((formValues: TPlainObject) => boolean);
|
|
1014
1034
|
/**
|
|
1015
1035
|
* 栅格占位格数,最大值:24
|
|
1016
1036
|
* ```
|
|
1017
|
-
* 1.
|
|
1037
|
+
* 1. 当前FormItemWrapper处在 EasyForm 直接子节点中有效,即FormItemWrapper在EasyForm栅格中的占位格数;
|
|
1038
|
+
* 2. 父节点使用属性值,当前节点不使用属性值
|
|
1018
1039
|
* ```
|
|
1019
1040
|
*/
|
|
1020
1041
|
span?: number;
|
|
@@ -1025,8 +1046,8 @@ export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNamePr
|
|
|
1025
1046
|
* 1. 为 children 增加 before、after
|
|
1026
1047
|
* 2. 对输入、输出数据进行序列化处理
|
|
1027
1048
|
* 3. 内置布局样式使用 preDefinedClassName.formItem
|
|
1028
|
-
* 4. 设置隐藏域(不清除字段值) 使用hidden
|
|
1029
|
-
* 5. 设置隐藏域(清除字段值)使用isClear
|
|
1049
|
+
* 4. 设置隐藏域(不清除字段值) 使用hidden,存在依赖逻辑,可与dependencies属性配合使用
|
|
1050
|
+
* 5. 设置隐藏域(清除字段值)使用isClear,存在依赖逻辑,可与dependencies属性配合使用
|
|
1030
1051
|
* ```
|
|
1031
1052
|
*/
|
|
1032
1053
|
export declare const FormItemWrapper: {
|
|
@@ -1408,6 +1429,14 @@ export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
|
1408
1429
|
* true: 当前EasyForm组件不使用Antd Form包裹,可在Form、EasyForm、FormWrapper内部使用
|
|
1409
1430
|
*/
|
|
1410
1431
|
nonuseFormWrapper?: boolean;
|
|
1432
|
+
/**
|
|
1433
|
+
* 栅格占位格数,最大值:24
|
|
1434
|
+
* ```
|
|
1435
|
+
* 1. 当前EasyForm处在 EasyForm 直接子节点中有效,即当前EasyForm在EasyForm栅格中的占位格数;
|
|
1436
|
+
* 2. 父节点使用属性值,当前节点不使用属性值
|
|
1437
|
+
* ```
|
|
1438
|
+
*/
|
|
1439
|
+
span?: number;
|
|
1411
1440
|
};
|
|
1412
1441
|
/**
|
|
1413
1442
|
* 简单Form布局,可自定义网格布局
|
|
@@ -1457,7 +1486,10 @@ export type EasyFormProps = Omit<FormWrapperProps, "children"> & {
|
|
|
1457
1486
|
* </EasyForm>
|
|
1458
1487
|
* ```
|
|
1459
1488
|
*/
|
|
1460
|
-
export declare const EasyForm:
|
|
1489
|
+
export declare const EasyForm: {
|
|
1490
|
+
(props: EasyFormProps): import("react").JSX.Element;
|
|
1491
|
+
domTypeName: string;
|
|
1492
|
+
};
|
|
1461
1493
|
export type EditableCardDataIndex = string | string[];
|
|
1462
1494
|
export interface EditableCardOperation {
|
|
1463
1495
|
index: number;
|
|
@@ -3582,6 +3614,8 @@ export declare const FormItemGroup: {
|
|
|
3582
3614
|
};
|
|
3583
3615
|
export type FormItemHiddenProps = {
|
|
3584
3616
|
name: FormItemProps["name"];
|
|
3617
|
+
className?: string;
|
|
3618
|
+
style?: CSSProperties;
|
|
3585
3619
|
};
|
|
3586
3620
|
export declare const FormItemHidden: {
|
|
3587
3621
|
(props: FormItemHiddenProps): import("react").JSX.Element;
|
|
@@ -3590,6 +3624,8 @@ export declare const FormItemHidden: {
|
|
|
3590
3624
|
export type FormItemSpanProps = {
|
|
3591
3625
|
span?: number;
|
|
3592
3626
|
children?: ReactNode;
|
|
3627
|
+
className?: string;
|
|
3628
|
+
style?: CSSProperties;
|
|
3593
3629
|
};
|
|
3594
3630
|
/**
|
|
3595
3631
|
* 包裹EasyForm children item元素, 设置自定义栅格占位格数(使用在EasyForm一级子节点下生效)
|
|
@@ -3693,44 +3729,6 @@ export declare const FormItemText: {
|
|
|
3693
3729
|
(props: FormItemTextProps): import("react").JSX.Element;
|
|
3694
3730
|
domTypeName: string;
|
|
3695
3731
|
};
|
|
3696
|
-
export type FormItemWrapperDependenciesProps = Omit<FormItemWrapperProps, "hidden" | "isClear"> & {
|
|
3697
|
-
hidden?: (values: TPlainObject, form: FormInstance) => boolean;
|
|
3698
|
-
isClear?: (values: TPlainObject, form: FormInstance) => boolean;
|
|
3699
|
-
};
|
|
3700
|
-
/**
|
|
3701
|
-
* 与 FormItemWrapper 使用相同,多一个 dependencies 包装能力;多用于表单项的显示隐藏逻辑中
|
|
3702
|
-
* ```
|
|
3703
|
-
* 1. 需要设置dependencies属性,实现显示隐藏能力
|
|
3704
|
-
* 2. dependencies表示依赖于谁
|
|
3705
|
-
* 3. 结果有两种情况
|
|
3706
|
-
* 3.1. 只想隐藏字段,不想清除字段值;使用hidden
|
|
3707
|
-
* 3.2. 隐藏字段,同时清除字段值;使用 isClear
|
|
3708
|
-
*
|
|
3709
|
-
* 使用示例(当 用户类型 选择【选项2】时,备注隐藏)
|
|
3710
|
-
* <FormItemWrapper name={'xx1'} label="用户类型">
|
|
3711
|
-
* <RadioGroupWrapper
|
|
3712
|
-
* options={[
|
|
3713
|
-
* { label: '选项1', value: '1' },
|
|
3714
|
-
* { label: '选项2', value: '2' },
|
|
3715
|
-
* ]}
|
|
3716
|
-
* />
|
|
3717
|
-
* </FormItemWrapper>
|
|
3718
|
-
* <FormItemWrapperDependencies
|
|
3719
|
-
* dependencies={['xx1']}
|
|
3720
|
-
* hidden={(values) => {
|
|
3721
|
-
* return values.xx1 === '2';
|
|
3722
|
-
* }}
|
|
3723
|
-
* name={'xx2'}
|
|
3724
|
-
* label="备注"
|
|
3725
|
-
* >
|
|
3726
|
-
* <Input.TextArea placeholder="请输入" />
|
|
3727
|
-
* </FormItemWrapperDependencies>
|
|
3728
|
-
* ```
|
|
3729
|
-
*/
|
|
3730
|
-
export declare const FormItemWrapperDependencies: {
|
|
3731
|
-
(props: FormItemWrapperDependenciesProps): import("react").JSX.Element;
|
|
3732
|
-
domTypeName: string;
|
|
3733
|
-
};
|
|
3734
3732
|
export type FormListWrapperContentProps = {
|
|
3735
3733
|
/** Form.List item fieldData */
|
|
3736
3734
|
formListFieldData: FormListFieldData;
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,6 @@ import './form-item-group/index.css';
|
|
|
62
62
|
import './form-item-hidden/index.css';
|
|
63
63
|
import './form-item-span/index.css';
|
|
64
64
|
import './form-item-text/index.css';
|
|
65
|
-
import './form-item-wrapper-dependencies/index.css';
|
|
66
65
|
import './form-item-wrapper/index.css';
|
|
67
66
|
import './form-list-wrapper/index.css';
|
|
68
67
|
import './form-wrapper/index.css';
|
|
@@ -157,7 +156,7 @@ export { C as CssNodeHover } from './css-node-hover-CsHQgf77.js';
|
|
|
157
156
|
export { D as DataRender } from './data-render-U7RkK7OY.js';
|
|
158
157
|
export { D as DatePickerWrapper } from './date-picker-wrapper-Cs-HoJ6K.js';
|
|
159
158
|
export { D as DateRangePickerWrapper } from './date-range-picker-wrapper-COuR09V1.js';
|
|
160
|
-
export { D as DateRangePickerWrapperFormItem } from './date-range-picker-wrapper-form-item-
|
|
159
|
+
export { D as DateRangePickerWrapperFormItem } from './date-range-picker-wrapper-form-item-CVdR6o1K.js';
|
|
161
160
|
export { D as DeleteNode } from './delete-node-D46iKrXs.js';
|
|
162
161
|
export { d as dialogAlert } from './dialog-alert-qO-Ea-MY.js';
|
|
163
162
|
export { d as dialogConfirm } from './dialog-confirm-BqB8wyB6.js';
|
|
@@ -168,20 +167,20 @@ export { d as dialogModal } from './dialog-modal-xt2uoEa-.js';
|
|
|
168
167
|
export { d as dialogPreviewImage } from './preview-image-DP4umDzQ.js';
|
|
169
168
|
export { D as DragCollapse } from './drag-collapse-wL7wIgVO.js';
|
|
170
169
|
export { D as DragCollapseFormList } from './drag-collapse-DU_JhQTz.js';
|
|
171
|
-
export { D as DragEditableCard } from './editable-card-
|
|
172
|
-
export { D as DragEditableTable } from './drag-
|
|
173
|
-
export { D as DragEditableTablePro } from './drag-
|
|
170
|
+
export { D as DragEditableCard } from './editable-card-DUMTbVEH.js';
|
|
171
|
+
export { D as DragEditableTable } from './drag-Cf-uGR4g.js';
|
|
172
|
+
export { D as DragEditableTablePro } from './drag-CdynEXy3.js';
|
|
174
173
|
export { D as DragFormList } from './drag-form-list-BGqbBKJM.js';
|
|
175
174
|
export { D as DragTable } from './drag-table-By85hEGF.js';
|
|
176
175
|
export { D as DropdownMenuWrapper } from './dropdown-menu-wrapper-CSzVvlcO.js';
|
|
177
176
|
export { d as dynamicNode } from './dynamic-node-B_An5owN.js';
|
|
178
|
-
export { E as EasyForm } from './form-
|
|
177
|
+
export { E as EasyForm } from './form-CNTtsktC.js';
|
|
179
178
|
export { EasyTable } from './easy-table/index.js';
|
|
180
|
-
export { E as EditableCard } from './editable-card-
|
|
179
|
+
export { E as EditableCard } from './editable-card-C5TJSyK1.js';
|
|
181
180
|
export { E as EditableField } from './editable-field-XVZ1Rqdm.js';
|
|
182
181
|
export { E as EditableFieldProvider } from './editable-field-provider-DqKcZQYP.js';
|
|
183
|
-
export { E as EditableTable } from './editable-table-
|
|
184
|
-
export { E as EditableTablePro } from './editable-table-pro-
|
|
182
|
+
export { E as EditableTable } from './editable-table-DTDlVNKW.js';
|
|
183
|
+
export { E as EditableTablePro } from './editable-table-pro-Cf7q_mZy.js';
|
|
185
184
|
export { E as ErrorBoundaryWrapper } from './error-boundary-DtShAEtQ.js';
|
|
186
185
|
export { FbaApp } from './fba-app/index.js';
|
|
187
186
|
export { fbaHooks } from './fba-hooks/index.js';
|
|
@@ -192,11 +191,10 @@ export { F as FileSelect } from './file-select-C56tgs1o.js';
|
|
|
192
191
|
export { F as FlexLayout } from './flex-layout-BaDncU_Z.js';
|
|
193
192
|
export { FormGrid } from './form-grid/index.js';
|
|
194
193
|
export { FormItemGroup } from './form-item-group/index.js';
|
|
195
|
-
export { F as FormItemHidden } from './form-item-hidden-
|
|
196
|
-
export { F as FormItemSpan } from './span-
|
|
197
|
-
export { F as FormItemText } from './form-item-text-
|
|
198
|
-
export { F as FormItemWrapper } from './form-item-wrapper-
|
|
199
|
-
export { F as FormItemWrapperDependencies } from './dependencies-C23wp0ou.js';
|
|
194
|
+
export { F as FormItemHidden } from './form-item-hidden-BtQvJEx7.js';
|
|
195
|
+
export { F as FormItemSpan } from './span-D99Im_jS.js';
|
|
196
|
+
export { F as FormItemText } from './form-item-text-BYdgh9j8.js';
|
|
197
|
+
export { F as FormItemWrapper } from './form-item-wrapper-CcXZVf_r.js';
|
|
200
198
|
export { F as FormListWrapper } from './form-list-wrapper-DdhJ2Pv3.js';
|
|
201
199
|
export { F as FormWrapper } from './form-wrapper-DSnBmyFu.js';
|
|
202
200
|
export { G as Gap } from './gap-C1UNo7Wz.js';
|
|
@@ -210,7 +208,7 @@ export { LocalLoading } from './local-loading/index.js';
|
|
|
210
208
|
export { M as MentionEditor } from './mention-editor-GK6I91p1.js';
|
|
211
209
|
export { M as MentionsWrapper } from './mentions-CZv5lHej.js';
|
|
212
210
|
export { M as ModalAction } from './modal-action-eYHh8gcR.js';
|
|
213
|
-
export { N as NumberRangeFormItem } from './number-range-
|
|
211
|
+
export { N as NumberRangeFormItem } from './number-range-DFh_eoMX.js';
|
|
214
212
|
export { P as PageFixedFooter } from './page-fixed-footer-BHBJsfnh.js';
|
|
215
213
|
export { P as Page404 } from './page404-CVcO-6Fc.js';
|
|
216
214
|
export { P as PaginationWrapper } from './pagination-BNbiyV-n.js';
|
|
@@ -252,7 +250,7 @@ export { T as TextOverflow } from './text-overflow-Bk9MC6Cg.js';
|
|
|
252
250
|
export { T as TextSymbolWrapper } from './symbol-CX0y_DJ4.js';
|
|
253
251
|
export { T as TimePickerWrapper } from './time-picker-wrapper-Dx69Z9kc.js';
|
|
254
252
|
export { T as TimeRangePickerWrapper } from './time-range-picker-wrapper-BpQQjbcu.js';
|
|
255
|
-
export { T as TimeRangePickerWrapperFormItem } from './time-range-picker-wrapper-form-item-
|
|
253
|
+
export { T as TimeRangePickerWrapperFormItem } from './time-range-picker-wrapper-form-item-56NaMNMS.js';
|
|
256
254
|
export { T as TipsTitle } from './tips-title-DWwc8kJv.js';
|
|
257
255
|
export { T as TipsWrapper } from './tips-wrapper-Bf9nfZq3.js';
|
|
258
256
|
export { TreeModal } from './tree-modal/index.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import { useMemo } from 'react';
|
|
|
5
5
|
import { InputNumber } from 'antd';
|
|
6
6
|
import { isNotEmptyArray, isEmptyArray, isUndefinedOrNull } from '@flatbiz/utils';
|
|
7
7
|
import { F as FlexLayout } from './flex-layout-BaDncU_Z.js';
|
|
8
|
-
import { F as FormItemWrapper } from './form-item-wrapper-
|
|
8
|
+
import { F as FormItemWrapper } from './form-item-wrapper-CcXZVf_r.js';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
var _excluded = ["minFormItemName", "maxFormItemName", "required", "requiredRuleMessage", "rangeRuleMessage", "minInputNumberProps", "maxInputNumberProps", "isInputEqual"];
|
|
@@ -130,4 +130,4 @@ var NumberRangeFormItem = function NumberRangeFormItem(props) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
export { NumberRangeFormItem as N };
|
|
133
|
-
//# sourceMappingURL=number-range-
|
|
133
|
+
//# sourceMappingURL=number-range-DFh_eoMX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-range-
|
|
1
|
+
{"version":3,"file":"number-range-DFh_eoMX.js","sources":["@flatbiz/antd/src/number-range-form-item/number-range.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { type GetProps, InputNumber } from 'antd';\nimport {\n isEmptyArray,\n isNotEmptyArray,\n isUndefinedOrNull,\n} from '@flatbiz/utils';\nimport { FlexLayout } from '../flex-layout/flex-layout.jsx';\nimport {\n FormItemWrapper,\n type FormItemWrapperProps,\n} from '../form-item-wrapper/index.js';\nimport type { FormItemNamePath } from '../types/index.js';\n\ntype InputNumberProps = GetProps<typeof InputNumber>;\n\nexport type NumberRangeFormItemProps = Omit<\n FormItemWrapperProps,\n 'name' | 'rules'\n> & {\n minFormItemName: FormItemNamePath;\n maxFormItemName: FormItemNamePath;\n /** 是否必填 */\n required?: boolean;\n /** 必填验证异常文案 */\n requiredRuleMessage?: string | [string, string];\n /** 范围验证异常文案 */\n rangeRuleMessage?: string | [string, string];\n minInputNumberProps?: Omit<InputNumberProps, 'value'>;\n maxInputNumberProps?: Omit<InputNumberProps, 'value'>;\n /** 最小值与最大值输入是否可以相同 */\n isInputEqual?: boolean;\n};\n/**\n * 数字输入范围组件\n */\nexport const NumberRangeFormItem = (props: NumberRangeFormItemProps) => {\n const {\n minFormItemName,\n maxFormItemName,\n required,\n requiredRuleMessage,\n rangeRuleMessage,\n minInputNumberProps,\n maxInputNumberProps,\n isInputEqual,\n ...otherProps\n } = props;\n\n const rangeRuleMessageList = useMemo(() => {\n if (!rangeRuleMessage)\n return ['最小值输入不能超过最大值', '最大值输入不能低于最小值'];\n if (isNotEmptyArray(rangeRuleMessage)) {\n return [rangeRuleMessage[0], rangeRuleMessage[1] || rangeRuleMessage[0]];\n }\n return [rangeRuleMessage, rangeRuleMessage] as string[];\n }, [rangeRuleMessage]);\n\n const requiredRuleMessageList = useMemo(() => {\n if (!requiredRuleMessage || isEmptyArray(requiredRuleMessage)) return [];\n if (isNotEmptyArray(requiredRuleMessage)) {\n return [\n requiredRuleMessage[0],\n requiredRuleMessage[1] || requiredRuleMessage[0],\n ];\n }\n return [requiredRuleMessage, requiredRuleMessage] as string[];\n }, [requiredRuleMessage]);\n\n const minRules = [\n { required: required, message: requiredRuleMessageList[0] || '' },\n ({ getFieldValue }) => ({\n validator(_, value) {\n if (isUndefinedOrNull(value)) {\n return Promise.resolve();\n }\n const maxValue = getFieldValue(maxFormItemName);\n if (isUndefinedOrNull(maxValue)) {\n return Promise.resolve();\n }\n if (isInputEqual) {\n if (value <= maxValue) {\n return Promise.resolve();\n }\n } else {\n if (value < maxValue) {\n return Promise.resolve();\n }\n }\n return Promise.reject(new Error(rangeRuleMessageList[0]));\n },\n }),\n ];\n\n const maxRules = [\n { required: required, message: requiredRuleMessageList[1] || '' },\n ({ getFieldValue }) => ({\n validator(_, value) {\n if (isUndefinedOrNull(value)) {\n return Promise.resolve();\n }\n const minValue = getFieldValue(minFormItemName);\n if (isUndefinedOrNull(minValue)) {\n return Promise.resolve();\n }\n\n if (isInputEqual) {\n if (value >= minValue) {\n return Promise.resolve();\n }\n } else {\n if (value > minValue) {\n return Promise.resolve();\n }\n }\n return Promise.reject(new Error(rangeRuleMessageList[1]));\n },\n }),\n ];\n\n return (\n <FormItemWrapper {...otherProps} required={required}>\n <FlexLayout fullIndex={[0, 1]} direction=\"horizontal\" gap={10}>\n <FormItemWrapper\n name={minFormItemName}\n dependencies={[maxFormItemName]}\n rules={minRules}\n style={{ margin: 0 }}\n >\n <InputNumber\n placeholder=\"请输入\"\n {...minInputNumberProps}\n style={{ width: '100%', ...minInputNumberProps?.style }}\n />\n </FormItemWrapper>\n <FormItemWrapper\n name={maxFormItemName}\n dependencies={[minFormItemName]}\n rules={maxRules}\n style={{ margin: 0 }}\n >\n <InputNumber\n placeholder=\"请输入\"\n {...maxInputNumberProps}\n style={{ width: '100%', ...maxInputNumberProps?.style }}\n />\n </FormItemWrapper>\n </FlexLayout>\n </FormItemWrapper>\n );\n};\n"],"names":["NumberRangeFormItem","props","minFormItemName","maxFormItemName","required","requiredRuleMessage","rangeRuleMessage","minInputNumberProps","maxInputNumberProps","isInputEqual","otherProps","_objectWithoutProperties","_excluded","rangeRuleMessageList","useMemo","isNotEmptyArray","requiredRuleMessageList","isEmptyArray","minRules","message","_ref","getFieldValue","validator","_","value","isUndefinedOrNull","Promise","resolve","maxValue","reject","Error","maxRules","_ref2","minValue","_jsx","FormItemWrapper","_objectSpread","children","_jsxs","FlexLayout","fullIndex","direction","gap","name","dependencies","rules","style","margin","InputNumber","placeholder","width"],"mappings":";;;;;;;;;;;AAiCA;AACA;AACA;IACaA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,KAA+B,EAAK;AACtE,EAAA,IACEC,eAAe,GASbD,KAAK,CATPC,eAAe;IACfC,eAAe,GAQbF,KAAK,CARPE,eAAe;IACfC,QAAQ,GAONH,KAAK,CAPPG,QAAQ;IACRC,mBAAmB,GAMjBJ,KAAK,CANPI,mBAAmB;IACnBC,gBAAgB,GAKdL,KAAK,CALPK,gBAAgB;IAChBC,mBAAmB,GAIjBN,KAAK,CAJPM,mBAAmB;IACnBC,mBAAmB,GAGjBP,KAAK,CAHPO,mBAAmB;IACnBC,YAAY,GAEVR,KAAK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EAAExC,eAAgB;QACtByC,YAAY,EAAE,CAAC1C,eAAe,CAAE;AAChC2C,QAAAA,KAAK,EAAEd,QAAS;AAChBe,QAAAA,KAAK,EAAE;AAAEC,UAAAA,MAAM,EAAE;SAAI;AAAAV,QAAAA,QAAA,eAErBH,GAAA,CAACc,WAAW,EAAAZ,cAAA,CAAAA,cAAA,CAAA;AACVa,UAAAA,WAAW,EAAC;AAAK,SAAA,EACbzC,mBAAmB,CAAA,EAAA,EAAA,EAAA;AACvBsC,UAAAA,KAAK,EAAAV,cAAA,CAAA;AAAIc,YAAAA,KAAK,EAAE;AAAM,WAAA,EAAK1C,mBAAmB,KAAnBA,IAAAA,IAAAA,mBAAmB,KAAnBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,mBAAmB,CAAEsC,KAAK;SACtD,CAAA;AAAC,OACa,CAAC;KACR;AAAC,GAAA,CACE,CAAC;AAEtB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TAny } from '@flatbiz/utils';
|
|
1
|
+
import { TAny, TPlainObject } from '@flatbiz/utils';
|
|
2
2
|
import { FormItemProps, GetProps, InputNumber } from 'antd';
|
|
3
3
|
import { ReactElement, ReactNode } from 'react';
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ export type TFormItemLayoutPreClassNameProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
className?: string;
|
|
22
22
|
};
|
|
23
|
-
export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNameProps & {
|
|
23
|
+
export type FormItemWrapperProps = Omit<FormItemProps, "hidden"> & TFormItemLayoutPreClassNameProps & {
|
|
24
24
|
wrapper?: (children: ReactNode) => ReactElement;
|
|
25
25
|
/** 设置wrapper后,before、after失效 */
|
|
26
26
|
before?: ReactNode;
|
|
@@ -33,12 +33,25 @@ export type FormItemWrapperProps = FormItemProps & TFormItemLayoutPreClassNamePr
|
|
|
33
33
|
* 如果设置 normalize 属性,outputNormalize将失效
|
|
34
34
|
*/
|
|
35
35
|
outputNormalize?: (value?: TAny) => TAny;
|
|
36
|
-
/**
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 隐藏 Form.Item,同时清除 Form.Item 值
|
|
38
|
+
* ```
|
|
39
|
+
* 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
isClear?: boolean | ((formValues: TPlainObject) => boolean);
|
|
43
|
+
/**
|
|
44
|
+
* 隐藏 Form.Item,不会清除 Form.Item 值
|
|
45
|
+
* ```
|
|
46
|
+
* 1.与 dependencies 属性配合使用,可实现当前FormItemWrapper的显示隐藏
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
hidden?: boolean | ((formValues: TPlainObject) => boolean);
|
|
38
50
|
/**
|
|
39
51
|
* 栅格占位格数,最大值:24
|
|
40
52
|
* ```
|
|
41
|
-
* 1.
|
|
53
|
+
* 1. 当前FormItemWrapper处在 EasyForm 直接子节点中有效,即FormItemWrapper在EasyForm栅格中的占位格数;
|
|
54
|
+
* 2. 父节点使用属性值,当前节点不使用属性值
|
|
42
55
|
* ```
|
|
43
56
|
*/
|
|
44
57
|
span?: number;
|
|
@@ -5,7 +5,7 @@ import './../pre-defined-class-name/index.css';
|
|
|
5
5
|
import './index.css';
|
|
6
6
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
7
7
|
|
|
8
|
-
export { N as NumberRangeFormItem } from '../number-range-
|
|
8
|
+
export { N as NumberRangeFormItem } from '../number-range-DFh_eoMX.js';
|
|
9
9
|
import '../_rollupPluginBabelHelpers-BYm17lo8.js';
|
|
10
10
|
import 'react';
|
|
11
11
|
import 'antd';
|
|
@@ -13,7 +13,7 @@ import '@flatbiz/utils';
|
|
|
13
13
|
import '../flex-layout-BaDncU_Z.js';
|
|
14
14
|
import '@dimjs/utils/class-names/class-names';
|
|
15
15
|
import 'react/jsx-runtime';
|
|
16
|
-
import '../form-item-wrapper-
|
|
16
|
+
import '../form-item-wrapper-CcXZVf_r.js';
|
|
17
17
|
import '../fba-hooks/index.js';
|
|
18
18
|
import '@wove/react/hooks';
|
|
19
19
|
import '../use-responsive-point-Bp3D3lZT.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-label-70.ant-form-item .ant-form-item-label{width:70px}.form-item-label-80.ant-form-item .ant-form-item-label{width:80px}.form-item-label-90.ant-form-item .ant-form-item-label{width:90px}.form-item-label-100.ant-form-item .ant-form-item-label{width:100px}.form-item-label-110.ant-form-item .ant-form-item-label{width:110px}.form-item-label-120.ant-form-item .ant-form-item-label{width:120px}.form-item-label-130.ant-form-item .ant-form-item-label{width:130px}.form-item-label-140.ant-form-item .ant-form-item-label{width:140px}.form-item-label-150.ant-form-item .ant-form-item-label{width:150px}.form-item-label-160.ant-form-item .ant-form-item-label{width:160px}.form-item-label-170.ant-form-item .ant-form-item-label{width:170px}.form-item-label-180.ant-form-item .ant-form-item-label{width:180px}.form-item-label-190.ant-form-item .ant-form-item-label{width:190px}.form-item-label-200.ant-form-item .ant-form-item-label{width:200px}.form-item-label-auto.ant-form-item .ant-form-item-row{flex-direction:row!important}.form-item-label-auto.ant-form-item .ant-form-item-label{width:auto!important}.form-item-label-auto.ant-form-item .ant-form-item-control{flex:1}.form-item-label-align-left.ant-form-item .ant-form-item-label{text-align:left}.form-item-label-align-right.ant-form-item .ant-form-item-label{text-align:right}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row{flex-direction:column}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-label{text-align:left;width:100%}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-control{flex:initial}.form-label-70 .ant-form-item-label{width:70px}.form-label-80 .ant-form-item-label{width:80px}.form-label-90 .ant-form-item-label{width:90px}.form-label-100 .ant-form-item-label{width:100px}.form-label-110 .ant-form-item-label{width:110px}.form-label-120 .ant-form-item-label{width:120px}.form-label-130 .ant-form-item-label{width:130px}.form-label-140 .ant-form-item-label{width:140px}.form-label-150 .ant-form-item-label{width:150px}.form-label-160 .ant-form-item-label{width:160px}.form-label-170 .ant-form-item-label{width:170px}.form-label-180 .ant-form-item-label{width:180px}.form-label-190 .ant-form-item-label{width:190px}.form-label-200 .ant-form-item-label{width:200px}.form-label-auto .ant-form-item-label{width:auto}.form-label-align-left .ant-form-item-label{text-align:left}.form-label-align-right .ant-form-item-label{text-align:right}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-row{flex-direction:column}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-label{text-align:left;width:100%}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-control{flex:initial}.form-formitem-gap-24
|
|
1
|
+
.form-item-label-70.ant-form-item .ant-form-item-label{width:70px}.form-item-label-80.ant-form-item .ant-form-item-label{width:80px}.form-item-label-90.ant-form-item .ant-form-item-label{width:90px}.form-item-label-100.ant-form-item .ant-form-item-label{width:100px}.form-item-label-110.ant-form-item .ant-form-item-label{width:110px}.form-item-label-120.ant-form-item .ant-form-item-label{width:120px}.form-item-label-130.ant-form-item .ant-form-item-label{width:130px}.form-item-label-140.ant-form-item .ant-form-item-label{width:140px}.form-item-label-150.ant-form-item .ant-form-item-label{width:150px}.form-item-label-160.ant-form-item .ant-form-item-label{width:160px}.form-item-label-170.ant-form-item .ant-form-item-label{width:170px}.form-item-label-180.ant-form-item .ant-form-item-label{width:180px}.form-item-label-190.ant-form-item .ant-form-item-label{width:190px}.form-item-label-200.ant-form-item .ant-form-item-label{width:200px}.form-item-label-auto.ant-form-item .ant-form-item-row{flex-direction:row!important}.form-item-label-auto.ant-form-item .ant-form-item-label{width:auto!important}.form-item-label-auto.ant-form-item .ant-form-item-control{flex:1}.form-item-label-align-left.ant-form-item .ant-form-item-label{text-align:left}.form-item-label-align-right.ant-form-item .ant-form-item-label{text-align:right}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row{flex-direction:column}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-label{text-align:left;width:100%}.ant-form-item.form-item-label-value-vertical>.ant-form-item-row>.ant-form-item-control{flex:initial}.form-label-70 .ant-form-item-label{width:70px}.form-label-80 .ant-form-item-label{width:80px}.form-label-90 .ant-form-item-label{width:90px}.form-label-100 .ant-form-item-label{width:100px}.form-label-110 .ant-form-item-label{width:110px}.form-label-120 .ant-form-item-label{width:120px}.form-label-130 .ant-form-item-label{width:130px}.form-label-140 .ant-form-item-label{width:140px}.form-label-150 .ant-form-item-label{width:150px}.form-label-160 .ant-form-item-label{width:160px}.form-label-170 .ant-form-item-label{width:170px}.form-label-180 .ant-form-item-label{width:180px}.form-label-190 .ant-form-item-label{width:190px}.form-label-200 .ant-form-item-label{width:200px}.form-label-auto .ant-form-item-label{width:auto}.form-label-align-left .ant-form-item-label{text-align:left}.form-label-align-right .ant-form-item-label{text-align:right}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-row{flex-direction:column}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-label{text-align:left;width:100%}.form-label-value-vertical .ant-form-item:not(.form-item-label-auto) .ant-form-item-control{flex:initial}.form-formitem-gap-24 .ant-form-item{margin-bottom:24px}.form-formitem-gap-15 .ant-form-item{margin-bottom:15px}.form-formitem-gap-8 .ant-form-item{margin-bottom:8px}.form-formitem-gap-5 .ant-form-item{margin-bottom:5px}.form-formitem-gap-0 .ant-form-item{margin-bottom:0}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
2
2
|
|
|
3
|
+
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers-BYm17lo8.js';
|
|
3
4
|
import { BoxGrid } from './box-grid/index.js';
|
|
4
5
|
import { jsx } from 'react/jsx-runtime';
|
|
5
6
|
|
|
@@ -29,12 +30,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
29
30
|
* ```
|
|
30
31
|
*/
|
|
31
32
|
var FormItemSpan = function FormItemSpan(props) {
|
|
32
|
-
return /*#__PURE__*/jsx(BoxGrid.Col, {
|
|
33
|
-
span: props.span,
|
|
34
|
-
children: props.children
|
|
35
|
-
});
|
|
33
|
+
return /*#__PURE__*/jsx(BoxGrid.Col, _objectSpread2({}, props));
|
|
36
34
|
};
|
|
37
35
|
FormItemSpan['domTypeName'] = 'FormItemSpan';
|
|
38
36
|
|
|
39
37
|
export { FormItemSpan as F };
|
|
40
|
-
//# sourceMappingURL=span-
|
|
38
|
+
//# sourceMappingURL=span-D99Im_jS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span-D99Im_jS.js","sources":["@flatbiz/antd/src/form-item-span/span.tsx"],"sourcesContent":["import { BoxGrid } from '../box-grid/index.js';\nexport type FormItemSpanProps = {\n span?: number;\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n};\n\n/**\n * 包裹EasyForm children item元素, 设置自定义栅格占位格数(使用在EasyForm一级子节点下生效)\n * ```\n * EasyForm中自定义栅格占位格数方式\n * 1. 设置 FormItemWrapper、FormItemText 的 span 属性(支持移动端小屏幕span强制转为24逻辑)\n * 2. 使用 <BoxGrid.Col span={24} ></BoxGrid.Col> 包裹,设置 span 属性(不支持移动端小屏幕span强制转为24逻辑)\n * 3. 使用 <FormItemSpan span={24} ></FormItemSpan> 包裹,设置 span 属性(支持移动端小屏幕span强制转为24逻辑)\n * <EasyForm>\n * <FormItemSpan span={24}>\n * <CardLayout title={'基本信息'}>\n * <EasyForm nonuseFormWrapper>\n * <FormItemWrapper></FormItemWrapper>\n * </EasyForm>\n * </CardLayout>\n * </FormItemSpan>\n * <FormItemSpan span={24}>\n * <CardLayout title={'紧急联系人信息'}>\n * <EasyForm nonuseFormWrapper>\n * <FormItemWrapper></FormItemWrapper>\n * </EasyForm>\n * </CardLayout>\n * </FormItemSpan>\n * </EasyForm>\n * ```\n */\nexport const FormItemSpan = (props: FormItemSpanProps) => {\n return <BoxGrid.Col {...props} />;\n};\n\nFormItemSpan['domTypeName'] = 'FormItemSpan';\n"],"names":["FormItemSpan","props","_jsx","BoxGrid","Col","_objectSpread"],"mappings":";;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,KAAwB,EAAK;EACxD,oBAAOC,GAAA,CAACC,OAAO,CAACC,GAAG,EAAAC,cAAA,CAAA,EAAA,EAAKJ,KAAK,CAAG,CAAC;AACnC;AAEAD,YAAY,CAAC,aAAa,CAAC,GAAG,cAAc;;;;"}
|
package/dist/styles/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.num-ff{font-family:var(--v-font-family-number)}p,ul{margin:0;padding:0}.hide{display:none}.clear-fix:after{clear:both;content:" ";display:block;font-size:0;height:0;visibility:hidden}.ant-btn-variant-dashed:disabled,.ant-btn-variant-link:disabled,.ant-btn-variant-solid:disabled,.ant-checkbox-disabled+span,.ant-input-number-outlined.ant-input-number-disabled,.ant-input[disabled],.ant-picker-disabled input[disabled],.ant-radio-wrapper-disabled,.ant-select-disabled .ant-select-selector,.ant-select-multiple.ant-select-disabled .ant-select-selection-item,.ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector{color:rgba(0,0,0,.6)!important}.ant-radio-disabled .ant-radio-inner:after{background-color:rgba(0,0,0,.5)!important}.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:rgba(0,0,0,.6)!important}
|
|
1
|
+
.num-ff{font-family:var(--v-font-family-number)}p,ul{margin:0;padding:0}.hide{display:none}.clear-fix:after{clear:both;content:" ";display:block;font-size:0;height:0;visibility:hidden}.ant-btn-dashed:disabled,.ant-btn-variant-dashed:disabled,.ant-btn-variant-link:disabled,.ant-btn-variant-solid:disabled,.ant-checkbox-disabled+span,.ant-input-number-outlined.ant-input-number-disabled,.ant-input[disabled],.ant-picker-disabled input[disabled],.ant-radio-wrapper-disabled,.ant-select-disabled .ant-select-selector,.ant-select-multiple.ant-select-disabled .ant-select-selection-item,.ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector{color:rgba(0,0,0,.6)!important}.ant-radio-disabled .ant-radio-inner:after{background-color:rgba(0,0,0,.5)!important}.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:rgba(0,0,0,.6)!important}
|