revdev-components 0.98.0 → 0.100.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.
@@ -0,0 +1,2 @@
1
+ export declare function useFormValues<TValues extends object>(): [Partial<TValues>, (value: Partial<TValues>, all: TValues) => void];
2
+ export declare function useFormValid(): [boolean, (newValid: boolean) => void];
@@ -1,5 +1,6 @@
1
1
  export * from "./debounce";
2
2
  export * from "./form-rules";
3
+ export * from "./form-values";
3
4
  export * from "./mount";
4
5
  export * from "./router";
5
6
  export * from "./api";
package/build/index.js CHANGED
@@ -4849,6 +4849,21 @@ function useAppFormRules() {
4849
4849
  }, []);
4850
4850
  }
4851
4851
 
4852
+ function useFormValues() {
4853
+ var _a = React.useState({}), values = _a[0], setValues = _a[1];
4854
+ var handleChange = React.useCallback(function (_value, allValues) {
4855
+ setValues(allValues);
4856
+ }, []);
4857
+ return [values, handleChange];
4858
+ }
4859
+ function useFormValid() {
4860
+ var _a = React.useState(false), valid = _a[0], setValid = _a[1];
4861
+ var handleValid = React.useCallback(function (newValid) {
4862
+ setValid(newValid);
4863
+ }, []);
4864
+ return [valid, handleValid];
4865
+ }
4866
+
4852
4867
  function useDidMount() {
4853
4868
  var _a = React.useState(false), mount = _a[0], setMount = _a[1];
4854
4869
  React.useEffect(function () {
@@ -5449,6 +5464,8 @@ exports.TextAreaField = TextAreaField;
5449
5464
  exports.useAppFormRules = useAppFormRules;
5450
5465
  exports.useDebounceEffect = useDebounceEffect;
5451
5466
  exports.useDidMount = useDidMount;
5467
+ exports.useFormValid = useFormValid;
5468
+ exports.useFormValues = useFormValues;
5452
5469
  exports.useLineProps = useLineProps;
5453
5470
  exports.usePrevious = usePrevious;
5454
5471
  exports.useRouterQuery = useRouterQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.98.0",
3
+ "version": "0.100.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {