@overmap-ai/core 1.0.35-fix-token-refresh-loop.3 → 1.0.35-fix-token-refresh-loop.4

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.
@@ -10251,6 +10251,7 @@ var __publicField = (obj, key, value) => {
10251
10251
  );
10252
10252
  const validate = React.useCallback(
10253
10253
  (form) => {
10254
+ console.debug("VALIDATING FORM:", form);
10254
10255
  const error2 = validateForm(schema, form);
10255
10256
  if (error2) {
10256
10257
  onError(error2);
@@ -10271,13 +10272,21 @@ var __publicField = (obj, key, value) => {
10271
10272
  validateOnBlur: false,
10272
10273
  validateOnChange: false
10273
10274
  });
10275
+ const handleBlur = React.useCallback(() => {
10276
+ if (onDirtyChange) {
10277
+ const diff = getDiff(formik$1.values);
10278
+ if (hasKeys(diff)) {
10279
+ onDirtyChange(true);
10280
+ }
10281
+ }
10282
+ }, [formik$1.values, getDiff, onDirtyChange]);
10274
10283
  const { errors, resetForm } = formik$1;
10275
10284
  React.useEffect(() => {
10276
10285
  if (hasKeys(errors)) {
10277
10286
  resetForm({ values: initialValues2, errors: {} });
10278
10287
  }
10279
10288
  }, [errors, initialValues2, resetForm]);
10280
- return /* @__PURE__ */ jsxRuntime.jsx(formik.FormikProvider, { value: formik$1, children: /* @__PURE__ */ jsxRuntime.jsx("form", { ...rest, ref, onSubmit: formik$1.handleSubmit, children }) });
10289
+ return /* @__PURE__ */ jsxRuntime.jsx(formik.FormikProvider, { value: formik$1, children: /* @__PURE__ */ jsxRuntime.jsx("form", { ...rest, ref, onSubmit: formik$1.handleSubmit, onBlur: handleBlur, children }) });
10281
10290
  })
10282
10291
  );
10283
10292
  const typeBadge$1 = "_typeBadge_an5ff_1";