react-form-manage 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -24
- package/dist/index.cjs +6 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.esm.js +7 -21
- package/dist/index.esm.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default Form;
|
|
2
|
+
import FormItem from "./components/Form/FormItem";
|
|
3
|
+
import FormList from "./components/Form/FormList";
|
|
4
|
+
import Input from "./components/Input";
|
|
5
|
+
import InputWrapper from "./components/Form/InputWrapper";
|
|
6
|
+
import useFormItemControl from "./hooks/useFormItemControl";
|
|
7
|
+
import useFormListControl from "./hooks/useFormListControl";
|
|
8
|
+
import { useForm } from "./providers/Form";
|
|
9
|
+
import { useWatch } from "./providers/Form";
|
|
10
|
+
import { useSubmitDataWatch } from "./providers/Form";
|
|
11
|
+
import { useFormStateWatch } from "./providers/Form";
|
|
12
|
+
import Form from "./providers/Form";
|
|
13
|
+
export { FormItem, FormList, Input, InputWrapper, useFormItemControl, useFormListControl, useForm, useWatch, useSubmitDataWatch, useFormStateWatch };
|
package/dist/index.esm.js
CHANGED
|
@@ -6,7 +6,6 @@ import { useShallow } from 'zustand/react/shallow';
|
|
|
6
6
|
import { produce } from 'immer';
|
|
7
7
|
import { v4 } from 'uuid';
|
|
8
8
|
import { create } from 'zustand';
|
|
9
|
-
import { Input as Input$1 } from 'antd';
|
|
10
9
|
|
|
11
10
|
function _extends() {
|
|
12
11
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -459,7 +458,7 @@ var FormCleanUp = function FormCleanUp() {
|
|
|
459
458
|
return h(Fragment, null);
|
|
460
459
|
};
|
|
461
460
|
|
|
462
|
-
var _excluded$
|
|
461
|
+
var _excluded$3 = ["children", "formName", "initialValues", "onFinish", "onReject", "onFinally", "FormElement"];
|
|
463
462
|
function _catch(body, recover) {
|
|
464
463
|
try {
|
|
465
464
|
var result = body();
|
|
@@ -480,7 +479,7 @@ function Form(_ref) {
|
|
|
480
479
|
onReject = _ref.onReject,
|
|
481
480
|
onFinally = _ref.onFinally,
|
|
482
481
|
FormElement = _ref.FormElement,
|
|
483
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
482
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
484
483
|
var _useFormStore = useFormStore(useShallow(function (state) {
|
|
485
484
|
var _state$formStates;
|
|
486
485
|
return {
|
|
@@ -1879,7 +1878,7 @@ function useFormListControl(_ref) {
|
|
|
1879
1878
|
};
|
|
1880
1879
|
}
|
|
1881
1880
|
|
|
1882
|
-
var _excluded$
|
|
1881
|
+
var _excluded$2 = ["listFields"];
|
|
1883
1882
|
var FormList = function FormList(_ref) {
|
|
1884
1883
|
var name = _ref.name,
|
|
1885
1884
|
initialValues = _ref.initialValues,
|
|
@@ -1893,15 +1892,15 @@ var FormList = function FormList(_ref) {
|
|
|
1893
1892
|
formName: formName
|
|
1894
1893
|
}),
|
|
1895
1894
|
listFields = _useTestRrenderListCo.listFields,
|
|
1896
|
-
actions = _objectWithoutPropertiesLoose(_useTestRrenderListCo, _excluded$
|
|
1895
|
+
actions = _objectWithoutPropertiesLoose(_useTestRrenderListCo, _excluded$2);
|
|
1897
1896
|
return children(listFields, _extends({}, actions));
|
|
1898
1897
|
};
|
|
1899
1898
|
|
|
1900
|
-
var _excluded$
|
|
1899
|
+
var _excluded$1 = ["onChange", "ref"];
|
|
1901
1900
|
var Input = function Input(_ref) {
|
|
1902
1901
|
var _onChange = _ref.onChange,
|
|
1903
1902
|
ref = _ref.ref,
|
|
1904
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1903
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1905
1904
|
return h("input", _extends({
|
|
1906
1905
|
ref: ref,
|
|
1907
1906
|
onChange: function onChange(e) {
|
|
@@ -1910,19 +1909,6 @@ var Input = function Input(_ref) {
|
|
|
1910
1909
|
}, props));
|
|
1911
1910
|
};
|
|
1912
1911
|
|
|
1913
|
-
var _excluded$1 = ["onChange", "isValidating"];
|
|
1914
|
-
var AntInput = function AntInput(_ref) {
|
|
1915
|
-
var _onChange = _ref.onChange,
|
|
1916
|
-
isValidating = _ref.isValidating,
|
|
1917
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1918
|
-
return h(Input$1, _extends({}, props, {
|
|
1919
|
-
onChange: function onChange(e) {
|
|
1920
|
-
_onChange && _onChange(e.target.value);
|
|
1921
|
-
},
|
|
1922
|
-
disabled: isValidating
|
|
1923
|
-
}));
|
|
1924
|
-
};
|
|
1925
|
-
|
|
1926
1912
|
var _excluded = ["children", "errors"];
|
|
1927
1913
|
var InputWrapper = function InputWrapper(_ref) {
|
|
1928
1914
|
var children = _ref.children,
|
|
@@ -1936,5 +1922,5 @@ var InputWrapper = function InputWrapper(_ref) {
|
|
|
1936
1922
|
})));
|
|
1937
1923
|
};
|
|
1938
1924
|
|
|
1939
|
-
export {
|
|
1925
|
+
export { FormItem, FormList, Input, InputWrapper, Form as default, useForm, useFormItemControl, useFormListControl, useFormStateWatch, useSubmitDataWatch, useWatch };
|
|
1940
1926
|
//# sourceMappingURL=index.esm.js.map
|