@timardex/cluemart-shared 1.3.97 → 1.3.98
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/dist/graphql/index.cjs +1 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +1 -0
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +9 -5
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +9 -5
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{post-Ch5Wqwm-.d.ts → post-BmHp3BkB.d.ts} +1 -0
- package/dist/{post-BugPtZBE.d.mts → post-DQtHcwIe.d.mts} +1 -0
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1067,6 +1067,7 @@ type PostType = Omit<PostFormData, "content"> & {
|
|
|
1067
1067
|
|
|
1068
1068
|
interface AppSettingsFormData {
|
|
1069
1069
|
appVersion: string;
|
|
1070
|
+
isOfflineMode: boolean;
|
|
1070
1071
|
}
|
|
1071
1072
|
type CreateAppSettingsFormData = CreateFormData<AppSettingsFormData>;
|
|
1072
1073
|
type AppSettingsType = AppSettingsFormData & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1067,6 +1067,7 @@ type PostType = Omit<PostFormData, "content"> & {
|
|
|
1067
1067
|
|
|
1068
1068
|
interface AppSettingsFormData {
|
|
1069
1069
|
appVersion: string;
|
|
1070
|
+
isOfflineMode: boolean;
|
|
1070
1071
|
}
|
|
1071
1072
|
type CreateAppSettingsFormData = CreateFormData<AppSettingsFormData>;
|
|
1072
1073
|
type AppSettingsType = AppSettingsFormData & {
|
package/dist/index.mjs
CHANGED
|
@@ -5559,6 +5559,7 @@ var APP_SETTINGS_FIELDS_FRAGMENT = gql34`
|
|
|
5559
5559
|
_id
|
|
5560
5560
|
appVersion
|
|
5561
5561
|
createdAt
|
|
5562
|
+
isOfflineMode
|
|
5562
5563
|
key
|
|
5563
5564
|
updatedAt
|
|
5564
5565
|
}
|
|
@@ -6368,7 +6369,8 @@ var appSettingsSchema = yup10.object({
|
|
|
6368
6369
|
appVersion: yup10.string().trim().label("App Version").matches(
|
|
6369
6370
|
/^\d+\.\d+\.\d+$/,
|
|
6370
6371
|
"App Version must be in the format X.Y.Z (e.g. 1.12.50)"
|
|
6371
|
-
).required("App Version is required")
|
|
6372
|
+
).required("App Version is required"),
|
|
6373
|
+
isOfflineMode: yup10.boolean().label("Is Offline Mode").required("Is Offline Mode is required")
|
|
6372
6374
|
});
|
|
6373
6375
|
|
|
6374
6376
|
// src/hooks/utils.ts
|
|
@@ -7499,7 +7501,8 @@ import { yupResolver as yupResolver16 } from "@hookform/resolvers/yup";
|
|
|
7499
7501
|
import React11 from "react";
|
|
7500
7502
|
import { useForm as useForm16 } from "react-hook-form";
|
|
7501
7503
|
var defaultValues11 = {
|
|
7502
|
-
appVersion: ""
|
|
7504
|
+
appVersion: "",
|
|
7505
|
+
isOfflineMode: false
|
|
7503
7506
|
};
|
|
7504
7507
|
function useAppSettingsForm(data) {
|
|
7505
7508
|
const {
|
|
@@ -7517,17 +7520,19 @@ function useAppSettingsForm(data) {
|
|
|
7517
7520
|
React11.useEffect(() => {
|
|
7518
7521
|
if (data) {
|
|
7519
7522
|
reset({
|
|
7520
|
-
appVersion: data.appVersion
|
|
7523
|
+
appVersion: data.appVersion,
|
|
7524
|
+
isOfflineMode: data.isOfflineMode
|
|
7521
7525
|
});
|
|
7522
7526
|
} else {
|
|
7523
7527
|
reset(defaultValues11);
|
|
7524
7528
|
}
|
|
7525
7529
|
}, [data]);
|
|
7526
|
-
const { appVersion } = getValues();
|
|
7530
|
+
const { appVersion, isOfflineMode } = getValues();
|
|
7527
7531
|
return {
|
|
7528
7532
|
control,
|
|
7529
7533
|
fields: {
|
|
7530
|
-
appVersion
|
|
7534
|
+
appVersion,
|
|
7535
|
+
isOfflineMode
|
|
7531
7536
|
},
|
|
7532
7537
|
formState,
|
|
7533
7538
|
handleSubmit,
|