@timardex/cluemart-shared 1.3.97 → 1.3.99

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.
@@ -1008,7 +1008,8 @@ var appSettingsSchema = yup10.object({
1008
1008
  appVersion: yup10.string().trim().label("App Version").matches(
1009
1009
  /^\d+\.\d+\.\d+$/,
1010
1010
  "App Version must be in the format X.Y.Z (e.g. 1.12.50)"
1011
- ).required("App Version is required")
1011
+ ).required("App Version is required"),
1012
+ isOfflineMode: yup10.boolean().label("Is Offline Mode").required("Is Offline Mode is required")
1012
1013
  });
1013
1014
 
1014
1015
  // src/hooks/utils.ts
@@ -2139,7 +2140,8 @@ var import_yup16 = require("@hookform/resolvers/yup");
2139
2140
  var import_react5 = __toESM(require("react"));
2140
2141
  var import_react_hook_form16 = require("react-hook-form");
2141
2142
  var defaultValues11 = {
2142
- appVersion: ""
2143
+ appVersion: "",
2144
+ isOfflineMode: false
2143
2145
  };
2144
2146
  function useAppSettingsForm(data) {
2145
2147
  const {
@@ -2157,17 +2159,19 @@ function useAppSettingsForm(data) {
2157
2159
  import_react5.default.useEffect(() => {
2158
2160
  if (data) {
2159
2161
  reset({
2160
- appVersion: data.appVersion
2162
+ appVersion: data.appVersion,
2163
+ isOfflineMode: data.isOfflineMode
2161
2164
  });
2162
2165
  } else {
2163
2166
  reset(defaultValues11);
2164
2167
  }
2165
2168
  }, [data]);
2166
- const { appVersion } = getValues();
2169
+ const { appVersion, isOfflineMode } = getValues();
2167
2170
  return {
2168
2171
  control,
2169
2172
  fields: {
2170
- appVersion
2173
+ appVersion,
2174
+ isOfflineMode
2171
2175
  },
2172
2176
  formState,
2173
2177
  handleSubmit,