sti-antd-package 0.1.7 → 0.1.8
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/esm/components/Checkbox/Component.js +2 -2
- package/dist/esm/components/Checkbox/Group/Component.js +2 -2
- package/dist/esm/components/DatePicker/Component.js +2 -2
- package/dist/esm/components/DateRangePicker/Component.js +2 -2
- package/dist/esm/components/Form/Item/Component.js +2 -2
- package/dist/esm/components/Input/Component.js +2 -2
- package/dist/esm/components/Input/OTP/Component.js +2 -2
- package/dist/esm/components/NumberFormat/Component.js +2 -2
- package/dist/esm/components/Radio/Component.js +2 -2
- package/dist/esm/components/Select/Component.js +2 -2
- package/dist/esm/components/Switch/Component.js +2 -2
- package/dist/esm/components/TextArea/Component.js +2 -2
- package/dist/esm/components/Upload/Dragger/Component.js +2 -2
- package/dist/esm/types/components/Checkbox/Group/Component.d.ts +1 -1
- package/dist/esm/types/components/Form/Item/types.d.ts +2 -0
- package/dist/esm/types/components/Radio/Component.d.ts +1 -1
- package/dist/lib/components/Checkbox/Component.js +2 -2
- package/dist/lib/components/Checkbox/Group/Component.js +2 -2
- package/dist/lib/components/DatePicker/Component.js +2 -2
- package/dist/lib/components/DateRangePicker/Component.js +2 -2
- package/dist/lib/components/Form/Item/Component.js +2 -2
- package/dist/lib/components/Input/Component.js +2 -2
- package/dist/lib/components/Input/OTP/Component.js +2 -2
- package/dist/lib/components/NumberFormat/Component.js +2 -2
- package/dist/lib/components/Radio/Component.js +2 -2
- package/dist/lib/components/Select/Component.js +2 -2
- package/dist/lib/components/Switch/Component.js +2 -2
- package/dist/lib/components/TextArea/Component.js +2 -2
- package/dist/lib/components/Upload/Dragger/Component.js +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import style from './style.module.css.js';
|
|
|
4
4
|
import { Checkbox, Skeleton } from 'antd';
|
|
5
5
|
import React__default, { useState, useImperativeHandle } from 'react';
|
|
6
6
|
|
|
7
|
-
const CheckboxComponent = ({ noItem, loading, disabled, readOnly, checked, defaultChecked, removeError, onChange, formColLayout, name, label, formClassNames, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, children, ref, }) => {
|
|
7
|
+
const CheckboxComponent = ({ noItem, loading, disabled, readOnly, checked, defaultChecked, removeError, onChange, formColLayout, name, label, formClassNames, formStyle, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, children, ref, }) => {
|
|
8
8
|
const [checkedValue, setCheckedValue] = useState(defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : false);
|
|
9
9
|
const handleChange = (event) => {
|
|
10
10
|
var _a;
|
|
@@ -17,7 +17,7 @@ const CheckboxComponent = ({ noItem, loading, disabled, readOnly, checked, defau
|
|
|
17
17
|
setChecked: setCheckedValue,
|
|
18
18
|
}));
|
|
19
19
|
const checkbox = !loading ? (jsxRuntimeExports.jsx(Checkbox, { disabled: disabled || readOnly, className: readOnly ? style['readonly'] : undefined, checked: checked !== null && checked !== void 0 ? checked : checkedValue, defaultChecked: checkedValue, onChange: handleChange, children: children })) : jsxRuntimeExports.jsx(Skeleton.Input, { active: true });
|
|
20
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: checkbox })))
|
|
20
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: checkbox })))
|
|
21
21
|
: checkbox }));
|
|
22
22
|
};
|
|
23
23
|
var CheckboxComponent$1 = React__default.memo(CheckboxComponent);
|
|
@@ -4,7 +4,7 @@ import style from '../style.module.css.js';
|
|
|
4
4
|
import { Checkbox, Row, Col, Skeleton } from 'antd';
|
|
5
5
|
import React__default, { useState, useImperativeHandle } from 'react';
|
|
6
6
|
|
|
7
|
-
const CheckboxComponent = ({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
7
|
+
const CheckboxComponent = ({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, formStyle, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
8
8
|
const [valueCheckboxGroup, setValueCheckboxGroup] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : []);
|
|
9
9
|
const handleChange = (checkedValue) => {
|
|
10
10
|
setValueCheckboxGroup(checkedValue);
|
|
@@ -30,7 +30,7 @@ const CheckboxComponent = ({ noItem, loading, disabled, options, value, defaultV
|
|
|
30
30
|
checkboxProps.className = className.length ? className.join(' ') : undefined;
|
|
31
31
|
return (jsxRuntimeExports.jsx(Col, { span: 8, children: jsxRuntimeExports.jsx(Checkbox, Object.assign({}, checkboxProps, { children: isObject ? option.label : option })) }, `cb${index}`));
|
|
32
32
|
}) })) })) : jsxRuntimeExports.jsx(Skeleton.Input, { active: true });
|
|
33
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: checkbox })))
|
|
33
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: checkbox })))
|
|
34
34
|
: checkbox }));
|
|
35
35
|
};
|
|
36
36
|
var Component = React__default.memo(CheckboxComponent);
|
|
@@ -6,7 +6,7 @@ import FormItemComponent from '../Form/Item/Component.js';
|
|
|
6
6
|
import { DatePicker, Skeleton } from 'antd';
|
|
7
7
|
import React__default, { useState, useImperativeHandle, useMemo } from 'react';
|
|
8
8
|
|
|
9
|
-
const DatePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
9
|
+
const DatePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, formStyle, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
10
10
|
const [valueDate, setValueDate] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : null);
|
|
11
11
|
const handleChange = (date, dateString) => {
|
|
12
12
|
setValueDate(date);
|
|
@@ -24,7 +24,7 @@ const DatePickerComponent = ({ noItem, size, variant, status, placeholder, prefi
|
|
|
24
24
|
return className;
|
|
25
25
|
}, [readOnly]);
|
|
26
26
|
const datePicker = !loading ? (jsxRuntimeExports.jsx(DatePicker, { className: classDate === null || classDate === void 0 ? void 0 : classDate.join(' '), classNames: className, size: size !== null && size !== void 0 ? size : 'middle', variant: variant, status: status, placeholder: placeholder, prefix: prefix, prefixCls: prefixCls === null || prefixCls === void 0 ? void 0 : prefixCls.join(' '), suffixIcon: suffixIcon, picker: picker, format: datePickerFormat[format !== null && format !== void 0 ? format : 'default'], allowClear: !required, inputReadOnly: readOnly, readOnly: readOnly, disabled: disabled !== null && disabled !== void 0 ? disabled : readOnly, disabledDate: disabledDate, disabledTime: disabledTime, value: value !== null && value !== void 0 ? value : valueDate, onChange: handleChange, style: style })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
27
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "date", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: datePicker })))
|
|
27
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "date", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: datePicker })))
|
|
28
28
|
: datePicker }));
|
|
29
29
|
};
|
|
30
30
|
var DatePickerComponent$1 = React__default.memo(DatePickerComponent);
|
|
@@ -7,7 +7,7 @@ import { DatePicker, Skeleton } from 'antd';
|
|
|
7
7
|
import React__default, { useState, useImperativeHandle, useMemo } from 'react';
|
|
8
8
|
|
|
9
9
|
const { RangePicker } = DatePicker;
|
|
10
|
-
const DateRangePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
10
|
+
const DateRangePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, formStyle, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
11
11
|
var _a;
|
|
12
12
|
const [valueDateRange, setValueDateRange] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : null);
|
|
13
13
|
const handleChange = (date, dateStrings) => {
|
|
@@ -26,7 +26,7 @@ const DateRangePickerComponent = ({ noItem, size, variant, status, placeholder,
|
|
|
26
26
|
return className;
|
|
27
27
|
}, [readOnly]);
|
|
28
28
|
const datePicker = !loading ? (jsxRuntimeExports.jsx(RangePicker, { className: classDateRange.join(' '), classNames: className, size: size !== null && size !== void 0 ? size : 'middle', variant: variant, status: status, placeholder: placeholder, prefix: prefix, prefixCls: prefixCls === null || prefixCls === void 0 ? void 0 : prefixCls.join(' '), suffixIcon: suffixIcon, picker: picker, format: datePickerFormat[format !== null && format !== void 0 ? format : 'default'], allowEmpty: !required, allowClear: !required, inputReadOnly: readOnly, readOnly: readOnly, disabled: disabled !== null && disabled !== void 0 ? disabled : readOnly, disabledDate: disabledDate, disabledTime: disabledTime, value: (_a = value !== null && value !== void 0 ? value : valueDateRange) !== null && _a !== void 0 ? _a : null, onChange: handleChange, style: style })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
29
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "array", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: datePicker })))
|
|
29
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "array", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: datePicker })))
|
|
30
30
|
: datePicker }));
|
|
31
31
|
};
|
|
32
32
|
var DateRangePickerComponent$1 = React__default.memo(DateRangePickerComponent);
|
|
@@ -3,7 +3,7 @@ import { Form } from 'antd';
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
|
|
5
5
|
const { Item } = Form;
|
|
6
|
-
const FormItemComponent = ({ noItem, formColLayout, name, label, classNames, trigger, normalize, required, rules, ruleType, ruleMessage, ruleTransform, ruleMin, ruleMax, valuePropName, getValueFromEvent, validateStatus, help, shouldUpdate, children, }) => {
|
|
6
|
+
const FormItemComponent = ({ noItem, formColLayout, name, label, classNames, trigger, normalize, required, rules, ruleType, ruleMessage, ruleTransform, ruleMin, ruleMax, valuePropName, getValueFromEvent, validateStatus, help, shouldUpdate, style, children, }) => {
|
|
7
7
|
const rule = {
|
|
8
8
|
required: required,
|
|
9
9
|
type: ruleType,
|
|
@@ -13,7 +13,7 @@ const FormItemComponent = ({ noItem, formColLayout, name, label, classNames, tri
|
|
|
13
13
|
max: ruleMax,
|
|
14
14
|
min: ruleMin,
|
|
15
15
|
};
|
|
16
|
-
return !noItem ? (jsxRuntimeExports.jsx(Item, Object.assign({}, formColLayout, { name: name, label: label, className: classNames === null || classNames === void 0 ? void 0 : classNames.join(' '), trigger: trigger, normalize: normalize, required: required, rules: rules !== null && rules !== void 0 ? rules : [rule], valuePropName: valuePropName, getValueFromEvent: getValueFromEvent, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: children }))) : children;
|
|
16
|
+
return !noItem ? (jsxRuntimeExports.jsx(Item, Object.assign({}, formColLayout, { name: name, label: label, className: classNames === null || classNames === void 0 ? void 0 : classNames.join(' '), trigger: trigger, normalize: normalize, required: required, rules: rules !== null && rules !== void 0 ? rules : [rule], valuePropName: valuePropName, getValueFromEvent: getValueFromEvent, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: style, children: children }))) : children;
|
|
17
17
|
};
|
|
18
18
|
var FormItemComponent$1 = React__default.memo(FormItemComponent);
|
|
19
19
|
|
|
@@ -5,7 +5,7 @@ import styleInput from './style.module.css.js';
|
|
|
5
5
|
import { Input, Space, Skeleton } from 'antd';
|
|
6
6
|
import React__default, { useState, useImperativeHandle } from 'react';
|
|
7
7
|
|
|
8
|
-
const InputComponent = React__default.memo(({ noItem, password, autoFocus, allowClear, size, formClassNames, classNames, variant, status, autoCompleteOff, loading, disabled, readOnly, maxLength, addonBefore, addonAfter, prefix, suffix, placeholder, value, removeError, onChange, onKeyDown, onPressEnter, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, defaultValue, formColLayout, name, label, uppercase, number, required, rules, ruleType, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
8
|
+
const InputComponent = React__default.memo(({ noItem, password, autoFocus, allowClear, size, formClassNames, formStyle, classNames, variant, status, autoCompleteOff, loading, disabled, readOnly, maxLength, addonBefore, addonAfter, prefix, suffix, placeholder, value, removeError, onChange, onKeyDown, onPressEnter, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, defaultValue, formColLayout, name, label, uppercase, number, required, rules, ruleType, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
9
9
|
const [valueInput, setValueInput] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
10
10
|
const handleChange = (event) => {
|
|
11
11
|
setValueInput(event.target.value);
|
|
@@ -28,7 +28,7 @@ const InputComponent = React__default.memo(({ noItem, password, autoFocus, allow
|
|
|
28
28
|
return value.replace(/\D/g, '');
|
|
29
29
|
return value;
|
|
30
30
|
};
|
|
31
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, normalize: normalize, required: required, ruleType: ruleType, ruleMessage: ruleMessage, ruleMax: ruleMax, ruleMin: ruleMin, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: inputComponent })))
|
|
31
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, normalize: normalize, required: required, ruleType: ruleType, ruleMessage: ruleMessage, ruleMax: ruleMax, ruleMin: ruleMin, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: inputComponent })))
|
|
32
32
|
: inputComponent }));
|
|
33
33
|
});
|
|
34
34
|
var InputComponent$1 = Object.assign(InputComponent, { OTP });
|
|
@@ -25,7 +25,7 @@ import '../../Tag/style.module.css.js';
|
|
|
25
25
|
import '../../TextArea/Component.js';
|
|
26
26
|
import '../../Upload/Dragger/Component.js';
|
|
27
27
|
|
|
28
|
-
const OTP = ({ noItem, loading, disabled, size, formClassNames, classNames, variant, mask, separator, length, value, defaultValue, removeError, onChange, onKeyDown, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
28
|
+
const OTP = ({ noItem, loading, disabled, size, formClassNames, formStyle, classNames, variant, mask, separator, length, value, defaultValue, removeError, onChange, onKeyDown, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
29
29
|
const [valueInput, setValueInput] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
30
30
|
const handleChange = (value) => {
|
|
31
31
|
setValueInput(value);
|
|
@@ -33,7 +33,7 @@ const OTP = ({ noItem, loading, disabled, size, formClassNames, classNames, vari
|
|
|
33
33
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
34
34
|
};
|
|
35
35
|
const otp = !loading ? (jsxRuntimeExports.jsx(Input.OTP, { disabled: disabled, size: size, className: classNames === null || classNames === void 0 ? void 0 : classNames.join(' '), variant: variant, mask: mask, separator: separator, length: length, value: value !== null && value !== void 0 ? value : valueInput, onChange: handleChange, onKeyDown: onKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: onClick, onFocus: onFocus, onBlur: onBlur })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
36
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: otp })))
|
|
36
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, style: formStyle, children: otp })))
|
|
37
37
|
: otp }));
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -6,7 +6,7 @@ import FormItemComponent from '../Form/Item/Component.js';
|
|
|
6
6
|
import styleNumberFormat from './style.module.css.js';
|
|
7
7
|
import { NumericFormat } from 'react-number-format';
|
|
8
8
|
|
|
9
|
-
const NumberFormat = ({ noItem, text, size, align, formClassNames, classNames, variant, trailing: trailingProps, prefix, suffix, placeholder, loading, disabled, readOnly, allowNegative, value, defaultValue, onValueChange, removeError, onChange, style, onBlur, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onClick, formColLayout, name, label, required, rules, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
9
|
+
const NumberFormat = ({ noItem, text, size, align, formClassNames, formStyle, classNames, variant, trailing: trailingProps, prefix, suffix, placeholder, loading, disabled, readOnly, allowNegative, value, defaultValue, onValueChange, removeError, onChange, style, onBlur, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onClick, formColLayout, name, label, required, rules, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
10
10
|
const { trailing } = useConfig();
|
|
11
11
|
const { status } = !noItem ? Form.Item.useStatus() : {};
|
|
12
12
|
const [valueNumberFormat, setValueNumberFormat] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
@@ -33,7 +33,7 @@ const NumberFormatComponent = props => {
|
|
|
33
33
|
const numberFormat = !props.loading ? jsxRuntimeExports.jsx(NumberFormat, Object.assign({}, props)) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
34
34
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !props.noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, props.formColLayout, { name: props.name, label: props.label, classNames: props.formClassNames, required: props.required, ruleType: "number",
|
|
35
35
|
// ruleTransform={value => Number(value)}
|
|
36
|
-
ruleMessage: props.ruleMessage, ruleMax: props.ruleMax, ruleMin: props.ruleMin, rules: props.rules, trigger: "onValueChange", normalize: (values) => values.floatValue, validateStatus: props.validateStatus, help: props.help, shouldUpdate: props.shouldUpdate, children: numberFormat })))
|
|
36
|
+
ruleMessage: props.ruleMessage, ruleMax: props.ruleMax, ruleMin: props.ruleMin, rules: props.rules, trigger: "onValueChange", normalize: (values) => values.floatValue, validateStatus: props.validateStatus, help: props.help, shouldUpdate: props.shouldUpdate, style: props.formStyle, children: numberFormat })))
|
|
37
37
|
: numberFormat }));
|
|
38
38
|
};
|
|
39
39
|
var NumberFormatComponent$1 = React__default.memo(NumberFormatComponent);
|
|
@@ -4,7 +4,7 @@ import style from './style.module.css.js';
|
|
|
4
4
|
import { Radio, Row, Col, Skeleton } from 'antd';
|
|
5
5
|
import React__default from 'react';
|
|
6
6
|
|
|
7
|
-
const RadioComponent = ({ noItem, loading, disabled, buttonStyle, formClassNames, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
7
|
+
const RadioComponent = ({ noItem, loading, disabled, buttonStyle, formClassNames, formStyle, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
8
8
|
const radio = !loading ? (jsxRuntimeExports.jsx(Radio.Group, { block: true, buttonStyle: buttonStyle, disabled: disabled,
|
|
9
9
|
// options={options}
|
|
10
10
|
optionType: optionType, onChange: event => {
|
|
@@ -23,7 +23,7 @@ const RadioComponent = ({ noItem, loading, disabled, buttonStyle, formClassNames
|
|
|
23
23
|
checkboxProps.className = className.length ? className.join(' ') : undefined;
|
|
24
24
|
return (jsxRuntimeExports.jsx(Col, { span: 8, children: jsxRuntimeExports.jsx(Radio, Object.assign({}, checkboxProps, { children: isObject ? option.label : option })) }, `radio${index}`));
|
|
25
25
|
}) })) })) : jsxRuntimeExports.jsx(Skeleton, { active: true });
|
|
26
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: radio })))
|
|
26
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, style: formStyle, children: radio })))
|
|
27
27
|
: radio }));
|
|
28
28
|
};
|
|
29
29
|
var Component = React__default.memo(RadioComponent);
|
|
@@ -6,7 +6,7 @@ import React__default, { useState, useMemo } from 'react';
|
|
|
6
6
|
import RefIcon from '../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js';
|
|
7
7
|
|
|
8
8
|
const { Link } = Typography;
|
|
9
|
-
const SelectComponent = ({ noItem, showSearch, mode, variant, status, size, suffixIcon, formClassNames, classNames, loading, readOnly, disabled, open, placeholder, value, defaultValue, removeError, onChange, onKeyDown, onFocus, notFoundContent, tokenSeparators, options, style, addItem, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
9
|
+
const SelectComponent = ({ noItem, showSearch, mode, variant, status, size, suffixIcon, formClassNames, formStyle, classNames, loading, readOnly, disabled, open, placeholder, value, defaultValue, removeError, onChange, onKeyDown, onFocus, notFoundContent, tokenSeparators, options, style, addItem, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
10
10
|
const [addItemValue, setAddItemValue] = useState('');
|
|
11
11
|
const classNameSelect = useMemo(() => {
|
|
12
12
|
const className = [styleSelect['select']];
|
|
@@ -29,7 +29,7 @@ const SelectComponent = ({ noItem, showSearch, mode, variant, status, size, suff
|
|
|
29
29
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
30
30
|
onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
|
|
31
31
|
}, onKeyDown: onKeyDown, onFocus: onFocus, notFoundContent: notFoundContent, tokenSeparators: tokenSeparators, options: options === null || options === void 0 ? void 0 : options.filter(option => option.value !== undefined), optionLabelProp: "label", optionRender: optionRender, popupRender: popupRender, style: style })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
32
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: select })))
|
|
32
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, style: formStyle, children: select })))
|
|
33
33
|
: select }));
|
|
34
34
|
};
|
|
35
35
|
var SelectComponent$1 = React__default.memo(SelectComponent);
|
|
@@ -5,7 +5,7 @@ import React__default, { useState } from 'react';
|
|
|
5
5
|
import RefIcon from '../../node_modules/@ant-design/icons/es/icons/CloseOutlined.js';
|
|
6
6
|
import RefIcon$1 from '../../node_modules/@ant-design/icons/es/icons/CheckOutlined.js';
|
|
7
7
|
|
|
8
|
-
const SwitchComponent = ({ noItem, icon, checkedChildren, unCheckedChildren, loading, disabled, formClassNames, value, checked, defaultChecked, removeError, onChange, formColLayout, name, label, required, rules, ruleMessage, validateStatus, help, shouldUpdate, }) => {
|
|
8
|
+
const SwitchComponent = ({ noItem, icon, checkedChildren, unCheckedChildren, loading, disabled, formClassNames, formStyle, value, checked, defaultChecked, removeError, onChange, formColLayout, name, label, required, rules, ruleMessage, validateStatus, help, shouldUpdate, }) => {
|
|
9
9
|
var _a;
|
|
10
10
|
const [checkedSwitch, setCheckedSwitch] = useState((_a = value !== null && value !== void 0 ? value : defaultChecked) !== null && _a !== void 0 ? _a : false);
|
|
11
11
|
const handleChange = (value, event) => {
|
|
@@ -21,7 +21,7 @@ const SwitchComponent = ({ noItem, icon, checkedChildren, unCheckedChildren, loa
|
|
|
21
21
|
unCheckedChildren,
|
|
22
22
|
};
|
|
23
23
|
const switchComponent = !loading ? (jsxRuntimeExports.jsx(Switch, Object.assign({}, checkChildren, { onChange: handleChange, disabled: disabled, checked: checked !== null && checked !== void 0 ? checked : checkedSwitch, defaultChecked: checked !== null && checked !== void 0 ? checked : checkedSwitch }))) : jsxRuntimeExports.jsx(Skeleton.Input, { active: true });
|
|
24
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "boolean", ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: switchComponent })))
|
|
24
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "boolean", ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: switchComponent })))
|
|
25
25
|
: switchComponent }));
|
|
26
26
|
};
|
|
27
27
|
var SwitchComponent$1 = React__default.memo(SwitchComponent);
|
|
@@ -5,7 +5,7 @@ import { Skeleton } from 'antd';
|
|
|
5
5
|
import TextArea from '../../node_modules/antd/es/input/TextArea.js';
|
|
6
6
|
import React__default, { useState, useImperativeHandle } from 'react';
|
|
7
7
|
|
|
8
|
-
const TextAreaComponent = ({ noItem, noResize, size, formClassNames, className, rows, variant, status, loading, disabled, readOnly, placeholder, value, defaultValue, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
8
|
+
const TextAreaComponent = ({ noItem, noResize, size, formClassNames, formStyle, className, rows, variant, status, loading, disabled, readOnly, placeholder, value, defaultValue, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
9
9
|
const classTextArea = [];
|
|
10
10
|
className && classTextArea.push(...className);
|
|
11
11
|
noResize && classTextArea.push(styleTextArea['resize-none']);
|
|
@@ -20,7 +20,7 @@ const TextAreaComponent = ({ noItem, noResize, size, formClassNames, className,
|
|
|
20
20
|
setValue: () => setValueTextArea,
|
|
21
21
|
}));
|
|
22
22
|
const textArea = !loading ? (jsxRuntimeExports.jsx(TextArea, { size: size, className: className === null || className === void 0 ? void 0 : className.join(' '), rows: rows, variant: variant, status: status, disabled: disabled, readOnly: readOnly, onChange: handleChange, placeholder: placeholder, value: value !== null && value !== void 0 ? value : valueTextArea })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
23
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: textArea })))
|
|
23
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: textArea })))
|
|
24
24
|
: textArea }));
|
|
25
25
|
};
|
|
26
26
|
var Component = React__default.memo(TextAreaComponent);
|
|
@@ -20,7 +20,7 @@ const normFile = event => {
|
|
|
20
20
|
return event;
|
|
21
21
|
return event && event['fileList'];
|
|
22
22
|
};
|
|
23
|
-
const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onRemove, onDrop, onPreview, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
23
|
+
const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, formStyle, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onRemove, onDrop, onPreview, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
24
24
|
const handleChange = (info) => {
|
|
25
25
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
26
26
|
onChange === null || onChange === void 0 ? void 0 : onChange(info);
|
|
@@ -31,7 +31,7 @@ const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled,
|
|
|
31
31
|
classNames && classDragger.push(...classNames);
|
|
32
32
|
readOnly && classDragger.push(style['readonly']);
|
|
33
33
|
const dragger = !loading ? (jsxRuntimeExports.jsxs(Dragger, { multiple: multiple, disabled: disabled || readOnly, listType: listType, rootClassName: rootClassDragger.join(' '), className: classDragger.join(' '), accept: accept === null || accept === void 0 ? void 0 : accept.map(accept => acceptFormat(accept)).join(', '), action: action, withCredentials: withCredentials, beforeUpload: beforeUpload, customRequest: customRequest, onChange: handleChange, onRemove: onRemove, onDrop: onDrop, onPreview: onPreview, defaultFileList: defaultFileList, children: [jsxRuntimeExports.jsx("p", { className: "ant-upload-drag-icon", children: jsxRuntimeExports.jsx(RefIcon, {}) }), jsxRuntimeExports.jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), jsxRuntimeExports.jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
34
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: validateStatus, help: help, children: dragger })))
|
|
34
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: validateStatus, help: help, style: formStyle, children: dragger })))
|
|
35
35
|
: dragger }));
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CheckboxGroupComponentProps } from "./types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }: CheckboxGroupComponentProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, formStyle, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }: CheckboxGroupComponentProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
4
4
|
export default _default;
|
|
@@ -13,6 +13,7 @@ interface FormItemDefault {
|
|
|
13
13
|
name?: NamePath;
|
|
14
14
|
label?: React.ReactNode;
|
|
15
15
|
formClassNames?: string[];
|
|
16
|
+
formStyle?: React.CSSProperties;
|
|
16
17
|
required?: boolean;
|
|
17
18
|
}
|
|
18
19
|
interface FormItemRulesAndMessage {
|
|
@@ -58,6 +59,7 @@ export interface FormItemComponentProps {
|
|
|
58
59
|
validateStatus?: ValidateStatus;
|
|
59
60
|
help?: React.ReactNode;
|
|
60
61
|
shouldUpdate?: FormItemProps['shouldUpdate'];
|
|
62
|
+
style?: React.CSSProperties;
|
|
61
63
|
children?: React.ReactNode;
|
|
62
64
|
}
|
|
63
65
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RadioComponentProps } from "./types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, buttonStyle, formClassNames, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }: RadioComponentProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, buttonStyle, formClassNames, formStyle, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }: RadioComponentProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
4
4
|
export default _default;
|
|
@@ -6,7 +6,7 @@ var style_module = require('./style.module.css.js');
|
|
|
6
6
|
var antd = require('antd');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
|
|
9
|
-
const CheckboxComponent = ({ noItem, loading, disabled, readOnly, checked, defaultChecked, removeError, onChange, formColLayout, name, label, formClassNames, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, children, ref, }) => {
|
|
9
|
+
const CheckboxComponent = ({ noItem, loading, disabled, readOnly, checked, defaultChecked, removeError, onChange, formColLayout, name, label, formClassNames, formStyle, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, children, ref, }) => {
|
|
10
10
|
const [checkedValue, setCheckedValue] = React.useState(defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : false);
|
|
11
11
|
const handleChange = (event) => {
|
|
12
12
|
var _a;
|
|
@@ -19,7 +19,7 @@ const CheckboxComponent = ({ noItem, loading, disabled, readOnly, checked, defau
|
|
|
19
19
|
setChecked: setCheckedValue,
|
|
20
20
|
}));
|
|
21
21
|
const checkbox = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(antd.Checkbox, { disabled: disabled || readOnly, className: readOnly ? style_module['readonly'] : undefined, checked: checked !== null && checked !== void 0 ? checked : checkedValue, defaultChecked: checkedValue, onChange: handleChange, children: children })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { active: true });
|
|
22
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: checkbox })))
|
|
22
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: checkbox })))
|
|
23
23
|
: checkbox }));
|
|
24
24
|
};
|
|
25
25
|
var CheckboxComponent$1 = React.memo(CheckboxComponent);
|
|
@@ -6,7 +6,7 @@ var style_module = require('../style.module.css.js');
|
|
|
6
6
|
var antd = require('antd');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
|
|
9
|
-
const CheckboxComponent = ({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
9
|
+
const CheckboxComponent = ({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, formStyle, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
10
10
|
const [valueCheckboxGroup, setValueCheckboxGroup] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : []);
|
|
11
11
|
const handleChange = (checkedValue) => {
|
|
12
12
|
setValueCheckboxGroup(checkedValue);
|
|
@@ -32,7 +32,7 @@ const CheckboxComponent = ({ noItem, loading, disabled, options, value, defaultV
|
|
|
32
32
|
checkboxProps.className = className.length ? className.join(' ') : undefined;
|
|
33
33
|
return (jsxRuntime.jsxRuntimeExports.jsx(antd.Col, { span: 8, children: jsxRuntime.jsxRuntimeExports.jsx(antd.Checkbox, Object.assign({}, checkboxProps, { children: isObject ? option.label : option })) }, `cb${index}`));
|
|
34
34
|
}) })) })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { active: true });
|
|
35
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: checkbox })))
|
|
35
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: checkbox })))
|
|
36
36
|
: checkbox }));
|
|
37
37
|
};
|
|
38
38
|
var Component = React.memo(CheckboxComponent);
|
|
@@ -8,7 +8,7 @@ var Component = require('../Form/Item/Component.js');
|
|
|
8
8
|
var antd = require('antd');
|
|
9
9
|
var React = require('react');
|
|
10
10
|
|
|
11
|
-
const DatePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
11
|
+
const DatePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, formStyle, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
12
12
|
const [valueDate, setValueDate] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : null);
|
|
13
13
|
const handleChange = (date, dateString) => {
|
|
14
14
|
setValueDate(date);
|
|
@@ -26,7 +26,7 @@ const DatePickerComponent = ({ noItem, size, variant, status, placeholder, prefi
|
|
|
26
26
|
return className;
|
|
27
27
|
}, [readOnly]);
|
|
28
28
|
const datePicker = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(antd.DatePicker, { className: classDate === null || classDate === void 0 ? void 0 : classDate.join(' '), classNames: className, size: size !== null && size !== void 0 ? size : 'middle', variant: variant, status: status, placeholder: placeholder, prefix: prefix, prefixCls: prefixCls === null || prefixCls === void 0 ? void 0 : prefixCls.join(' '), suffixIcon: suffixIcon, picker: picker, format: datePickerFormat[format !== null && format !== void 0 ? format : 'default'], allowClear: !required, inputReadOnly: readOnly, readOnly: readOnly, disabled: disabled !== null && disabled !== void 0 ? disabled : readOnly, disabledDate: disabledDate, disabledTime: disabledTime, value: value !== null && value !== void 0 ? value : valueDate, onChange: handleChange, style: style })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
29
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "date", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: datePicker })))
|
|
29
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "date", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: datePicker })))
|
|
30
30
|
: datePicker }));
|
|
31
31
|
};
|
|
32
32
|
var DatePickerComponent$1 = React.memo(DatePickerComponent);
|
|
@@ -9,7 +9,7 @@ var antd = require('antd');
|
|
|
9
9
|
var React = require('react');
|
|
10
10
|
|
|
11
11
|
const { RangePicker } = antd.DatePicker;
|
|
12
|
-
const DateRangePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
12
|
+
const DateRangePickerComponent = ({ noItem, size, variant, status, placeholder, prefix, prefixCls, suffixIcon, picker, format, disabledDate, disabledTime, loading, readOnly, disabled, value, defaultValue, removeError, onChange, style, formColLayout, name, label, formClassNames, formStyle, classNames = [], className, required, rules, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
13
13
|
var _a;
|
|
14
14
|
const [valueDateRange, setValueDateRange] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : null);
|
|
15
15
|
const handleChange = (date, dateStrings) => {
|
|
@@ -28,7 +28,7 @@ const DateRangePickerComponent = ({ noItem, size, variant, status, placeholder,
|
|
|
28
28
|
return className;
|
|
29
29
|
}, [readOnly]);
|
|
30
30
|
const datePicker = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(RangePicker, { className: classDateRange.join(' '), classNames: className, size: size !== null && size !== void 0 ? size : 'middle', variant: variant, status: status, placeholder: placeholder, prefix: prefix, prefixCls: prefixCls === null || prefixCls === void 0 ? void 0 : prefixCls.join(' '), suffixIcon: suffixIcon, picker: picker, format: datePickerFormat[format !== null && format !== void 0 ? format : 'default'], allowEmpty: !required, allowClear: !required, inputReadOnly: readOnly, readOnly: readOnly, disabled: disabled !== null && disabled !== void 0 ? disabled : readOnly, disabledDate: disabledDate, disabledTime: disabledTime, value: (_a = value !== null && value !== void 0 ? value : valueDateRange) !== null && _a !== void 0 ? _a : null, onChange: handleChange, style: style })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
31
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "array", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: datePicker })))
|
|
31
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "array", ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: datePicker })))
|
|
32
32
|
: datePicker }));
|
|
33
33
|
};
|
|
34
34
|
var DateRangePickerComponent$1 = React.memo(DateRangePickerComponent);
|
|
@@ -5,7 +5,7 @@ var antd = require('antd');
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
7
|
const { Item } = antd.Form;
|
|
8
|
-
const FormItemComponent = ({ noItem, formColLayout, name, label, classNames, trigger, normalize, required, rules, ruleType, ruleMessage, ruleTransform, ruleMin, ruleMax, valuePropName, getValueFromEvent, validateStatus, help, shouldUpdate, children, }) => {
|
|
8
|
+
const FormItemComponent = ({ noItem, formColLayout, name, label, classNames, trigger, normalize, required, rules, ruleType, ruleMessage, ruleTransform, ruleMin, ruleMax, valuePropName, getValueFromEvent, validateStatus, help, shouldUpdate, style, children, }) => {
|
|
9
9
|
const rule = {
|
|
10
10
|
required: required,
|
|
11
11
|
type: ruleType,
|
|
@@ -15,7 +15,7 @@ const FormItemComponent = ({ noItem, formColLayout, name, label, classNames, tri
|
|
|
15
15
|
max: ruleMax,
|
|
16
16
|
min: ruleMin,
|
|
17
17
|
};
|
|
18
|
-
return !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Item, Object.assign({}, formColLayout, { name: name, label: label, className: classNames === null || classNames === void 0 ? void 0 : classNames.join(' '), trigger: trigger, normalize: normalize, required: required, rules: rules !== null && rules !== void 0 ? rules : [rule], valuePropName: valuePropName, getValueFromEvent: getValueFromEvent, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: children }))) : children;
|
|
18
|
+
return !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Item, Object.assign({}, formColLayout, { name: name, label: label, className: classNames === null || classNames === void 0 ? void 0 : classNames.join(' '), trigger: trigger, normalize: normalize, required: required, rules: rules !== null && rules !== void 0 ? rules : [rule], valuePropName: valuePropName, getValueFromEvent: getValueFromEvent, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: style, children: children }))) : children;
|
|
19
19
|
};
|
|
20
20
|
var FormItemComponent$1 = React.memo(FormItemComponent);
|
|
21
21
|
|
|
@@ -7,7 +7,7 @@ var style_module = require('./style.module.css.js');
|
|
|
7
7
|
var antd = require('antd');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
|
|
10
|
-
const InputComponent = React.memo(({ noItem, password, autoFocus, allowClear, size, formClassNames, classNames, variant, status, autoCompleteOff, loading, disabled, readOnly, maxLength, addonBefore, addonAfter, prefix, suffix, placeholder, value, removeError, onChange, onKeyDown, onPressEnter, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, defaultValue, formColLayout, name, label, uppercase, number, required, rules, ruleType, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
10
|
+
const InputComponent = React.memo(({ noItem, password, autoFocus, allowClear, size, formClassNames, formStyle, classNames, variant, status, autoCompleteOff, loading, disabled, readOnly, maxLength, addonBefore, addonAfter, prefix, suffix, placeholder, value, removeError, onChange, onKeyDown, onPressEnter, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, defaultValue, formColLayout, name, label, uppercase, number, required, rules, ruleType, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
11
11
|
const [valueInput, setValueInput] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
12
12
|
const handleChange = (event) => {
|
|
13
13
|
setValueInput(event.target.value);
|
|
@@ -30,7 +30,7 @@ const InputComponent = React.memo(({ noItem, password, autoFocus, allowClear, si
|
|
|
30
30
|
return value.replace(/\D/g, '');
|
|
31
31
|
return value;
|
|
32
32
|
};
|
|
33
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, normalize: normalize, required: required, ruleType: ruleType, ruleMessage: ruleMessage, ruleMax: ruleMax, ruleMin: ruleMin, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: inputComponent })))
|
|
33
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, normalize: normalize, required: required, ruleType: ruleType, ruleMessage: ruleMessage, ruleMax: ruleMax, ruleMin: ruleMin, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: inputComponent })))
|
|
34
34
|
: inputComponent }));
|
|
35
35
|
});
|
|
36
36
|
var InputComponent$1 = Object.assign(InputComponent, { OTP: Component$1 });
|
|
@@ -27,7 +27,7 @@ require('../../Tag/style.module.css.js');
|
|
|
27
27
|
require('../../TextArea/Component.js');
|
|
28
28
|
require('../../Upload/Dragger/Component.js');
|
|
29
29
|
|
|
30
|
-
const OTP = ({ noItem, loading, disabled, size, formClassNames, classNames, variant, mask, separator, length, value, defaultValue, removeError, onChange, onKeyDown, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
30
|
+
const OTP = ({ noItem, loading, disabled, size, formClassNames, formStyle, classNames, variant, mask, separator, length, value, defaultValue, removeError, onChange, onKeyDown, onMouseEnter, onMouseLeave, onClick, onFocus, onBlur, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
31
31
|
const [valueInput, setValueInput] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
32
32
|
const handleChange = (value) => {
|
|
33
33
|
setValueInput(value);
|
|
@@ -35,7 +35,7 @@ const OTP = ({ noItem, loading, disabled, size, formClassNames, classNames, vari
|
|
|
35
35
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
36
36
|
};
|
|
37
37
|
const otp = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(antd.Input.OTP, { disabled: disabled, size: size, className: classNames === null || classNames === void 0 ? void 0 : classNames.join(' '), variant: variant, mask: mask, separator: separator, length: length, value: value !== null && value !== void 0 ? value : valueInput, onChange: handleChange, onKeyDown: onKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onClick: onClick, onFocus: onFocus, onBlur: onBlur })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
38
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: otp })))
|
|
38
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, style: formStyle, children: otp })))
|
|
39
39
|
: otp }));
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -8,7 +8,7 @@ var Component = require('../Form/Item/Component.js');
|
|
|
8
8
|
var style_module = require('./style.module.css.js');
|
|
9
9
|
var reactNumberFormat = require('react-number-format');
|
|
10
10
|
|
|
11
|
-
const NumberFormat = ({ noItem, text, size, align, formClassNames, classNames, variant, trailing: trailingProps, prefix, suffix, placeholder, loading, disabled, readOnly, allowNegative, value, defaultValue, onValueChange, removeError, onChange, style, onBlur, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onClick, formColLayout, name, label, required, rules, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
11
|
+
const NumberFormat = ({ noItem, text, size, align, formClassNames, formStyle, classNames, variant, trailing: trailingProps, prefix, suffix, placeholder, loading, disabled, readOnly, allowNegative, value, defaultValue, onValueChange, removeError, onChange, style, onBlur, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onClick, formColLayout, name, label, required, rules, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
12
12
|
const { trailing } = Context.useConfig();
|
|
13
13
|
const { status } = !noItem ? antd.Form.Item.useStatus() : {};
|
|
14
14
|
const [valueNumberFormat, setValueNumberFormat] = React.useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : '');
|
|
@@ -35,7 +35,7 @@ const NumberFormatComponent = props => {
|
|
|
35
35
|
const numberFormat = !props.loading ? jsxRuntime.jsxRuntimeExports.jsx(NumberFormat, Object.assign({}, props)) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
36
36
|
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !props.noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, props.formColLayout, { name: props.name, label: props.label, classNames: props.formClassNames, required: props.required, ruleType: "number",
|
|
37
37
|
// ruleTransform={value => Number(value)}
|
|
38
|
-
ruleMessage: props.ruleMessage, ruleMax: props.ruleMax, ruleMin: props.ruleMin, rules: props.rules, trigger: "onValueChange", normalize: (values) => values.floatValue, validateStatus: props.validateStatus, help: props.help, shouldUpdate: props.shouldUpdate, children: numberFormat })))
|
|
38
|
+
ruleMessage: props.ruleMessage, ruleMax: props.ruleMax, ruleMin: props.ruleMin, rules: props.rules, trigger: "onValueChange", normalize: (values) => values.floatValue, validateStatus: props.validateStatus, help: props.help, shouldUpdate: props.shouldUpdate, style: props.formStyle, children: numberFormat })))
|
|
39
39
|
: numberFormat }));
|
|
40
40
|
};
|
|
41
41
|
var NumberFormatComponent$1 = React.memo(NumberFormatComponent);
|
|
@@ -6,7 +6,7 @@ var style_module = require('./style.module.css.js');
|
|
|
6
6
|
var antd = require('antd');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
|
|
9
|
-
const RadioComponent = ({ noItem, loading, disabled, buttonStyle, formClassNames, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
9
|
+
const RadioComponent = ({ noItem, loading, disabled, buttonStyle, formClassNames, formStyle, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
10
10
|
const radio = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(antd.Radio.Group, { block: true, buttonStyle: buttonStyle, disabled: disabled,
|
|
11
11
|
// options={options}
|
|
12
12
|
optionType: optionType, onChange: event => {
|
|
@@ -25,7 +25,7 @@ const RadioComponent = ({ noItem, loading, disabled, buttonStyle, formClassNames
|
|
|
25
25
|
checkboxProps.className = className.length ? className.join(' ') : undefined;
|
|
26
26
|
return (jsxRuntime.jsxRuntimeExports.jsx(antd.Col, { span: 8, children: jsxRuntime.jsxRuntimeExports.jsx(antd.Radio, Object.assign({}, checkboxProps, { children: isObject ? option.label : option })) }, `radio${index}`));
|
|
27
27
|
}) })) })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton, { active: true });
|
|
28
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: radio })))
|
|
28
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, style: formStyle, children: radio })))
|
|
29
29
|
: radio }));
|
|
30
30
|
};
|
|
31
31
|
var Component = React.memo(RadioComponent);
|
|
@@ -8,7 +8,7 @@ var React = require('react');
|
|
|
8
8
|
var PlusOutlined = require('../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js');
|
|
9
9
|
|
|
10
10
|
const { Link } = antd.Typography;
|
|
11
|
-
const SelectComponent = ({ noItem, showSearch, mode, variant, status, size, suffixIcon, formClassNames, classNames, loading, readOnly, disabled, open, placeholder, value, defaultValue, removeError, onChange, onKeyDown, onFocus, notFoundContent, tokenSeparators, options, style, addItem, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
11
|
+
const SelectComponent = ({ noItem, showSearch, mode, variant, status, size, suffixIcon, formClassNames, formStyle, classNames, loading, readOnly, disabled, open, placeholder, value, defaultValue, removeError, onChange, onKeyDown, onFocus, notFoundContent, tokenSeparators, options, style, addItem, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
12
12
|
const [addItemValue, setAddItemValue] = React.useState('');
|
|
13
13
|
const classNameSelect = React.useMemo(() => {
|
|
14
14
|
const className = [style_module['select']];
|
|
@@ -31,7 +31,7 @@ const SelectComponent = ({ noItem, showSearch, mode, variant, status, size, suff
|
|
|
31
31
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
32
32
|
onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
|
|
33
33
|
}, onKeyDown: onKeyDown, onFocus: onFocus, notFoundContent: notFoundContent, tokenSeparators: tokenSeparators, options: options === null || options === void 0 ? void 0 : options.filter(option => option.value !== undefined), optionLabelProp: "label", optionRender: optionRender, popupRender: popupRender, style: style })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
34
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: select })))
|
|
34
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, style: formStyle, children: select })))
|
|
35
35
|
: select }));
|
|
36
36
|
};
|
|
37
37
|
var SelectComponent$1 = React.memo(SelectComponent);
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var CloseOutlined = require('../../node_modules/@ant-design/icons/es/icons/CloseOutlined.js');
|
|
8
8
|
var CheckOutlined = require('../../node_modules/@ant-design/icons/es/icons/CheckOutlined.js');
|
|
9
9
|
|
|
10
|
-
const SwitchComponent = ({ noItem, icon, checkedChildren, unCheckedChildren, loading, disabled, formClassNames, value, checked, defaultChecked, removeError, onChange, formColLayout, name, label, required, rules, ruleMessage, validateStatus, help, shouldUpdate, }) => {
|
|
10
|
+
const SwitchComponent = ({ noItem, icon, checkedChildren, unCheckedChildren, loading, disabled, formClassNames, formStyle, value, checked, defaultChecked, removeError, onChange, formColLayout, name, label, required, rules, ruleMessage, validateStatus, help, shouldUpdate, }) => {
|
|
11
11
|
var _a;
|
|
12
12
|
const [checkedSwitch, setCheckedSwitch] = React.useState((_a = value !== null && value !== void 0 ? value : defaultChecked) !== null && _a !== void 0 ? _a : false);
|
|
13
13
|
const handleChange = (value, event) => {
|
|
@@ -23,7 +23,7 @@ const SwitchComponent = ({ noItem, icon, checkedChildren, unCheckedChildren, loa
|
|
|
23
23
|
unCheckedChildren,
|
|
24
24
|
};
|
|
25
25
|
const switchComponent = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(antd.Switch, Object.assign({}, checkChildren, { onChange: handleChange, disabled: disabled, checked: checked !== null && checked !== void 0 ? checked : checkedSwitch, defaultChecked: checked !== null && checked !== void 0 ? checked : checkedSwitch }))) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { active: true });
|
|
26
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "boolean", ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: switchComponent })))
|
|
26
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: "boolean", ruleMessage: ruleMessage, rules: rules, valuePropName: "checked", validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: switchComponent })))
|
|
27
27
|
: switchComponent }));
|
|
28
28
|
};
|
|
29
29
|
var SwitchComponent$1 = React.memo(SwitchComponent);
|
|
@@ -7,7 +7,7 @@ var antd = require('antd');
|
|
|
7
7
|
var TextArea = require('../../node_modules/antd/es/input/TextArea.js');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
|
|
10
|
-
const TextAreaComponent = ({ noItem, noResize, size, formClassNames, className, rows, variant, status, loading, disabled, readOnly, placeholder, value, defaultValue, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
10
|
+
const TextAreaComponent = ({ noItem, noResize, size, formClassNames, formStyle, className, rows, variant, status, loading, disabled, readOnly, placeholder, value, defaultValue, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }) => {
|
|
11
11
|
const classTextArea = [];
|
|
12
12
|
className && classTextArea.push(...className);
|
|
13
13
|
noResize && classTextArea.push(style_module['resize-none']);
|
|
@@ -22,7 +22,7 @@ const TextAreaComponent = ({ noItem, noResize, size, formClassNames, className,
|
|
|
22
22
|
setValue: () => setValueTextArea,
|
|
23
23
|
}));
|
|
24
24
|
const textArea = !loading ? (jsxRuntime.jsxRuntimeExports.jsx(TextArea, { size: size, className: className === null || className === void 0 ? void 0 : className.join(' '), rows: rows, variant: variant, status: status, disabled: disabled, readOnly: readOnly, onChange: handleChange, placeholder: placeholder, value: value !== null && value !== void 0 ? value : valueTextArea })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
25
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, children: textArea })))
|
|
25
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, shouldUpdate: shouldUpdate, style: formStyle, children: textArea })))
|
|
26
26
|
: textArea }));
|
|
27
27
|
};
|
|
28
28
|
var Component = React.memo(TextAreaComponent);
|
|
@@ -22,7 +22,7 @@ const normFile = event => {
|
|
|
22
22
|
return event;
|
|
23
23
|
return event && event['fileList'];
|
|
24
24
|
};
|
|
25
|
-
const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onRemove, onDrop, onPreview, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
25
|
+
const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, formStyle, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onRemove, onDrop, onPreview, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
|
|
26
26
|
const handleChange = (info) => {
|
|
27
27
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
28
28
|
onChange === null || onChange === void 0 ? void 0 : onChange(info);
|
|
@@ -33,7 +33,7 @@ const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled,
|
|
|
33
33
|
classNames && classDragger.push(...classNames);
|
|
34
34
|
readOnly && classDragger.push(style_module['readonly']);
|
|
35
35
|
const dragger = !loading ? (jsxRuntime.jsxRuntimeExports.jsxs(Dragger, { multiple: multiple, disabled: disabled || readOnly, listType: listType, rootClassName: rootClassDragger.join(' '), className: classDragger.join(' '), accept: accept === null || accept === void 0 ? void 0 : accept.map(accept => acceptFormat(accept)).join(', '), action: action, withCredentials: withCredentials, beforeUpload: beforeUpload, customRequest: customRequest, onChange: handleChange, onRemove: onRemove, onDrop: onDrop, onPreview: onPreview, defaultFileList: defaultFileList, children: [jsxRuntime.jsxRuntimeExports.jsx("p", { className: "ant-upload-drag-icon", children: jsxRuntime.jsxRuntimeExports.jsx(InboxOutlined, {}) }), jsxRuntime.jsxRuntimeExports.jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), jsxRuntime.jsxRuntimeExports.jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) : jsxRuntime.jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
36
|
-
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: validateStatus, help: help, children: dragger })))
|
|
36
|
+
return (jsxRuntime.jsxRuntimeExports.jsx(jsxRuntime.jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntime.jsxRuntimeExports.jsx(Component, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: validateStatus, help: help, style: formStyle, children: dragger })))
|
|
37
37
|
: dragger }));
|
|
38
38
|
};
|
|
39
39
|
|