revdev-components 0.141.0 → 0.148.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.
@@ -8,7 +8,7 @@ interface ButtonContentProps extends Omit<AntdButtonProps, "icon" | "rightIcon">
8
8
  isPrimary?: boolean;
9
9
  }
10
10
  export interface ButtonProps extends ButtonContentProps {
11
- tooltip?: string;
11
+ tooltip?: React.ReactNode;
12
12
  tooltipPlacement?: TooltipPlacement;
13
13
  hoverOpenDelay?: number;
14
14
  }
@@ -11,10 +11,11 @@ export interface AppFormProps<T = any> {
11
11
  onFinish?: (values: T) => void;
12
12
  onValuesChange?: onValuesChangeType<T>;
13
13
  onFieldsChange?: (changedFields: FieldData[], allFields: FieldData[]) => void;
14
+ onChange?: (values: T) => void;
14
15
  form?: FormInstance;
15
16
  onValid?: (valid: boolean) => void;
16
17
  initialValues?: Partial<T>;
17
18
  debug?: boolean;
18
19
  }
19
- export declare function AppForm<T extends object = any>({ form: propForm, children, className, onFinish, onValuesChange, onFieldsChange, onValid, initialValues, debug, }: AppFormProps<T>): React.ReactElement<AppFormProps<T>>;
20
+ export declare function AppForm<T extends object = any>({ form: propForm, children, className, onFinish, onValuesChange, onFieldsChange, onChange, onValid, initialValues, debug, }: AppFormProps<T>): React.ReactElement<AppFormProps<T>>;
20
21
  export {};
package/build/index.js CHANGED
@@ -4831,7 +4831,7 @@ function useDidMount() {
4831
4831
  return mount;
4832
4832
  }
4833
4833
  function usePrevious(value) {
4834
- var ref = React.useRef();
4834
+ var ref = React.useRef(null);
4835
4835
  React.useEffect(function () {
4836
4836
  ref.current = value;
4837
4837
  }, [value]);
@@ -4857,7 +4857,7 @@ function useForm(form) {
4857
4857
  return form ? form : newForm;
4858
4858
  }
4859
4859
  function AppForm(_a) {
4860
- var propForm = _a.form, children = _a.children, className = _a.className, onFinish = _a.onFinish, onValuesChange = _a.onValuesChange, onFieldsChange = _a.onFieldsChange, onValid = _a.onValid, initialValues = _a.initialValues, debug = _a.debug;
4860
+ var propForm = _a.form, children = _a.children, className = _a.className, onFinish = _a.onFinish, onValuesChange = _a.onValuesChange, onFieldsChange = _a.onFieldsChange, onChange = _a.onChange, onValid = _a.onValid, initialValues = _a.initialValues, debug = _a.debug;
4861
4861
  var form = useForm(propForm);
4862
4862
  var _b = React.useState(false), valid = _b[0], setValid = _b[1];
4863
4863
  var _c = useFormValues(), values = _c[0], setValues = _c[1];
@@ -4894,7 +4894,8 @@ function AppForm(_a) {
4894
4894
  var handleValuesChange = React.useCallback(function (changedValues, values) {
4895
4895
  setValues(changedValues, values);
4896
4896
  onValuesChange === null || onValuesChange === void 0 ? void 0 : onValuesChange(changedValues, values);
4897
- }, [setValues, onValuesChange]);
4897
+ onChange === null || onChange === void 0 ? void 0 : onChange(values);
4898
+ }, [setValues, onValuesChange, onChange]);
4898
4899
  return (React.createElement(antd.Form, { form: form, onFinish: onFinish, className: classNames(s$r.root, className), layout: "vertical", onValuesChange: handleValuesChange, onFieldsChange: onFieldsChange, initialValues: initialValues }, typeof children === "function" ? children({ valid: valid }) : children));
4899
4900
  }
4900
4901
 
package/eslint.config.js CHANGED
@@ -11,6 +11,6 @@ module.exports = defineConfig([
11
11
  },
12
12
  },
13
13
  {
14
- ignores: [".cache", "node_modules", "**/*.svg"],
14
+ ignores: [".cache", "node_modules", "**/*.svg", ".next"],
15
15
  },
16
16
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdev-components",
3
- "version": "0.141.0",
3
+ "version": "0.148.0",
4
4
  "main": "build/index.js",
5
5
  "module": "build/index.esm.js",
6
6
  "scripts": {