revdev-components 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/fields/index.d.ts +1 -0
- package/build/index.js +21 -10
- package/build/styles.css +6 -0
- package/package.json +1 -1
package/build/fields/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -1521,13 +1521,13 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
1521
1521
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1522
1522
|
};
|
|
1523
1523
|
|
|
1524
|
-
var s$
|
|
1524
|
+
var s$j = {"root":"index-module_root__-LDR1"};
|
|
1525
1525
|
|
|
1526
1526
|
// https://www.svgrepo.com/
|
|
1527
1527
|
function useBasicIcon(_a, icons) {
|
|
1528
1528
|
var className = _a.className, name = _a.name, props = __rest(_a, ["className", "name"]);
|
|
1529
1529
|
var svgAttrs = React.useMemo(function () {
|
|
1530
|
-
return __assign({ className: classNames(s$
|
|
1530
|
+
return __assign({ className: classNames(s$j.root, className), fill: "currentColor" }, props);
|
|
1531
1531
|
}, [className, props]);
|
|
1532
1532
|
var Icon = icons[name];
|
|
1533
1533
|
return Icon ? React.createElement(Icon, __assign({}, svgAttrs)) : undefined;
|
|
@@ -4614,7 +4614,7 @@ var SocialIcon = function (props) {
|
|
|
4614
4614
|
return useBasicIcon(props, icons);
|
|
4615
4615
|
};
|
|
4616
4616
|
|
|
4617
|
-
var s$
|
|
4617
|
+
var s$i = {"root":"index-module_root__gtTIa","action":"index-module_action__pOSde"};
|
|
4618
4618
|
|
|
4619
4619
|
function useForm(form) {
|
|
4620
4620
|
var newForm = antd.Form.useForm()[0];
|
|
@@ -4634,10 +4634,10 @@ function AppForm(_a) {
|
|
|
4634
4634
|
React.useEffect(function () {
|
|
4635
4635
|
onValid === null || onValid === void 0 ? void 0 : onValid(valid);
|
|
4636
4636
|
}, [onValid, valid]);
|
|
4637
|
-
return (React.createElement(antd.Form, { form: form, onFinish: onFinish, className: classNames(s$
|
|
4637
|
+
return (React.createElement(antd.Form, { form: form, onFinish: onFinish, className: classNames(s$i.root, className), layout: "vertical", onValuesChange: onValuesChange, onFieldsChange: onFieldsChange, initialValues: initialValues }, typeof children === "function" ? children({ valid: valid }) : children));
|
|
4638
4638
|
}
|
|
4639
4639
|
|
|
4640
|
-
var s$
|
|
4640
|
+
var s$h = {"root":"index-module_root__2S1Jp"};
|
|
4641
4641
|
|
|
4642
4642
|
function useLineProps(_a) {
|
|
4643
4643
|
var lineClassName = _a.lineClassName, name = _a.name, label = _a.label, rules = _a.rules, valuePropName = _a.valuePropName, noStyle = _a.noStyle, hasFeedback = _a.hasFeedback, dependencies = _a.dependencies, rest = __rest(_a, ["lineClassName", "name", "label", "rules", "valuePropName", "noStyle", "hasFeedback", "dependencies"]);
|
|
@@ -4651,7 +4651,7 @@ var FormLine = function (_a) {
|
|
|
4651
4651
|
}
|
|
4652
4652
|
return [];
|
|
4653
4653
|
}, [validateRules]);
|
|
4654
|
-
return React.createElement(antd.Form.Item, __assign({ className: classNames(s$
|
|
4654
|
+
return React.createElement(antd.Form.Item, __assign({ className: classNames(s$h.root, className), rules: rules }, props));
|
|
4655
4655
|
};
|
|
4656
4656
|
|
|
4657
4657
|
var DatePickerField = function (props) {
|
|
@@ -4672,12 +4672,12 @@ var InputField = function (props) {
|
|
|
4672
4672
|
React.createElement(antd.Input, __assign({}, controlProps))));
|
|
4673
4673
|
};
|
|
4674
4674
|
|
|
4675
|
-
var s$
|
|
4675
|
+
var s$g = {"input":"index-module_input__LxXnu"};
|
|
4676
4676
|
|
|
4677
4677
|
var InputNumberField = function (props) {
|
|
4678
4678
|
var _a = useLineProps(props), lineProps = _a[0], _b = _a[1], className = _b.className, controlProps = __rest(_b, ["className"]);
|
|
4679
4679
|
return (React.createElement(FormLine, __assign({}, lineProps),
|
|
4680
|
-
React.createElement(antd.InputNumber, __assign({ className: classNames(s$
|
|
4680
|
+
React.createElement(antd.InputNumber, __assign({ className: classNames(s$g.input, className) }, controlProps))));
|
|
4681
4681
|
};
|
|
4682
4682
|
|
|
4683
4683
|
var RadioButtonField = function (props) {
|
|
@@ -4686,13 +4686,13 @@ var RadioButtonField = function (props) {
|
|
|
4686
4686
|
React.createElement(antd.Radio.Group, __assign({ buttonStyle: buttonStyle, optionType: optionType }, controlProps))));
|
|
4687
4687
|
};
|
|
4688
4688
|
|
|
4689
|
-
var s$
|
|
4689
|
+
var s$f = {"popup":"index-module_popup__5L587"};
|
|
4690
4690
|
|
|
4691
4691
|
var RangePicker = antd.DatePicker.RangePicker;
|
|
4692
4692
|
var RangePickerField = function (props) {
|
|
4693
4693
|
var _a = useLineProps(props), lineProps = _a[0], _b = _a[1], oneMonth = _b.oneMonth, controlProps = __rest(_b, ["oneMonth"]);
|
|
4694
4694
|
return (React.createElement(FormLine, __assign({}, lineProps),
|
|
4695
|
-
React.createElement(RangePicker, __assign({}, controlProps, { popupClassName: oneMonth ? s$
|
|
4695
|
+
React.createElement(RangePicker, __assign({}, controlProps, { popupClassName: oneMonth ? s$f.popup : undefined }))));
|
|
4696
4696
|
};
|
|
4697
4697
|
|
|
4698
4698
|
var SelectField = function (props) {
|
|
@@ -4714,6 +4714,16 @@ var CheckboxField = function (props) {
|
|
|
4714
4714
|
React.createElement(antd.Checkbox, __assign({}, controlProps))));
|
|
4715
4715
|
};
|
|
4716
4716
|
|
|
4717
|
+
var s$e = {"root":"index-module_root__3Y1jZ"};
|
|
4718
|
+
|
|
4719
|
+
var SwitchField = function (props) {
|
|
4720
|
+
var _a = useLineProps(props), lineProps = _a[0], _b = _a[1], children = _b.children, controlProps = __rest(_b, ["children"]);
|
|
4721
|
+
return (React.createElement(FormLine, __assign({}, lineProps, { valuePropName: "checked" }),
|
|
4722
|
+
React.createElement("div", { className: s$e.root },
|
|
4723
|
+
React.createElement(antd.Switch, __assign({}, controlProps)),
|
|
4724
|
+
children && React.createElement("div", { className: s$e.content }, children))));
|
|
4725
|
+
};
|
|
4726
|
+
|
|
4717
4727
|
// export function useDebounceCallback<T extends (...args: any[]) => any>(delay: number, callback: T, deps: DependencyList = []): DebouncedFunc<T> {
|
|
4718
4728
|
// return useCallback(debounce(callback, delay), deps);
|
|
4719
4729
|
// }
|
|
@@ -5090,6 +5100,7 @@ exports.RegularIconNameList = RegularIconNameList;
|
|
|
5090
5100
|
exports.SelectField = SelectField;
|
|
5091
5101
|
exports.SocialIcon = SocialIcon;
|
|
5092
5102
|
exports.SocialIconNameList = SocialIconNameList;
|
|
5103
|
+
exports.SwitchField = SwitchField;
|
|
5093
5104
|
exports.TextAreaField = TextAreaField;
|
|
5094
5105
|
exports.useApiLazyQuery = useApiLazyQuery;
|
|
5095
5106
|
exports.useApiLazyQueryRequest = useApiLazyQueryRequest;
|
package/build/styles.css
CHANGED
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
.index-module_popup__5L587.ant-picker-panel:nth-child(1) button {
|
|
42
42
|
visibility: visible !important;
|
|
43
43
|
}
|
|
44
|
+
.index-module_root__3Y1jZ {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: row;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 0.7em;
|
|
49
|
+
}
|
|
44
50
|
.index-module_root__f8fnA {
|
|
45
51
|
display: flex;
|
|
46
52
|
gap: 1em;
|