@timardex/cluemart-shared 1.3.50 → 1.3.51
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/{auth-Cp-vzzpW.d.mts → auth-B3W1oART.d.mts} +1 -1
- package/dist/{auth-BD8pG4QE.d.ts → auth-D6tQzAij.d.ts} +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-BKEcBQxZ.d.ts → global-0iC3dHcr.d.ts} +1 -1
- package/dist/{global-DjZooB3t.d.mts → global-Cnrow6Qc.d.mts} +1 -1
- package/dist/graphql/index.cjs +23 -15
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +8 -7
- package/dist/graphql/index.d.ts +8 -7
- package/dist/graphql/index.mjs +23 -15
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +59 -5
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +11 -4
- package/dist/hooks/index.d.ts +11 -4
- package/dist/hooks/index.mjs +58 -5
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +82 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.mjs +81 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{post-CLTR6oRS.d.mts → post-0cLfaIEy.d.mts} +1 -1
- package/dist/{post-D83V8snF.d.ts → post-BYkFJijx.d.ts} +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -131,6 +131,7 @@ __export(index_exports, {
|
|
|
131
131
|
useAdminResendTesterVerificationEmail: () => useAdminResendTesterVerificationEmail,
|
|
132
132
|
useAdminUpdateResourceType: () => useAdminUpdateResourceType,
|
|
133
133
|
useAdminUpdateTester: () => useAdminUpdateTester,
|
|
134
|
+
useAppSettingsForm: () => useAppSettingsForm,
|
|
134
135
|
useAppVersionCheck: () => useAppVersionCheck,
|
|
135
136
|
useCancelSubscription: () => useCancelSubscription,
|
|
136
137
|
useContactUs: () => useContactUs,
|
|
@@ -4888,15 +4889,6 @@ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
|
|
|
4888
4889
|
}
|
|
4889
4890
|
${USER_FIELDS_FRAGMENT}
|
|
4890
4891
|
`;
|
|
4891
|
-
var APP_VERSION_CHECK_MUTATION = import_client41.gql`
|
|
4892
|
-
mutation appVersionCheck($appVersion: String!) {
|
|
4893
|
-
appVersionCheck(appVersion: $appVersion) {
|
|
4894
|
-
isUpToDate
|
|
4895
|
-
latestVersion
|
|
4896
|
-
message
|
|
4897
|
-
}
|
|
4898
|
-
}
|
|
4899
|
-
`;
|
|
4900
4892
|
|
|
4901
4893
|
// src/graphql/hooks/user/hooksMutation.ts
|
|
4902
4894
|
var useCreateUser = () => {
|
|
@@ -4998,12 +4990,6 @@ var useRemoveUserPresentResource = () => {
|
|
|
4998
4990
|
);
|
|
4999
4991
|
return { error, loading, removeUserPresentResource };
|
|
5000
4992
|
};
|
|
5001
|
-
var useAppVersionCheck = () => {
|
|
5002
|
-
const [appVersionCheck, { loading, error }] = (0, import_client42.useMutation)(
|
|
5003
|
-
APP_VERSION_CHECK_MUTATION
|
|
5004
|
-
);
|
|
5005
|
-
return { appVersionCheck, error, loading };
|
|
5006
|
-
};
|
|
5007
4993
|
|
|
5008
4994
|
// src/graphql/hooks/user/hooksQuery.ts
|
|
5009
4995
|
var import_client43 = require("@apollo/client");
|
|
@@ -5686,6 +5672,29 @@ var useGetPostsByType = (postType) => {
|
|
|
5686
5672
|
return { error, loading, postsByType: data?.postsByType || [], refetch };
|
|
5687
5673
|
};
|
|
5688
5674
|
|
|
5675
|
+
// src/graphql/hooks/appSettings/hooksMutation.ts
|
|
5676
|
+
var import_client64 = require("@apollo/client");
|
|
5677
|
+
|
|
5678
|
+
// src/graphql/mutations/appSettings.ts
|
|
5679
|
+
var import_client63 = require("@apollo/client");
|
|
5680
|
+
var APP_VERSION_CHECK_MUTATION = import_client63.gql`
|
|
5681
|
+
mutation appVersionCheck($appVersion: String!) {
|
|
5682
|
+
appVersionCheck(appVersion: $appVersion) {
|
|
5683
|
+
isUpToDate
|
|
5684
|
+
latestVersion
|
|
5685
|
+
message
|
|
5686
|
+
}
|
|
5687
|
+
}
|
|
5688
|
+
`;
|
|
5689
|
+
|
|
5690
|
+
// src/graphql/hooks/appSettings/hooksMutation.ts
|
|
5691
|
+
var useAppVersionCheck = () => {
|
|
5692
|
+
const [appVersionCheck, { loading, error }] = (0, import_client64.useMutation)(
|
|
5693
|
+
APP_VERSION_CHECK_MUTATION
|
|
5694
|
+
);
|
|
5695
|
+
return { appVersionCheck, error, loading };
|
|
5696
|
+
};
|
|
5697
|
+
|
|
5689
5698
|
// src/hooks/useLocationSearch.ts
|
|
5690
5699
|
var handleApiError = (error, message) => {
|
|
5691
5700
|
console.error(message, error);
|
|
@@ -6396,6 +6405,15 @@ var postSchema = yup9.object().shape({
|
|
|
6396
6405
|
title: yup9.string().required()
|
|
6397
6406
|
});
|
|
6398
6407
|
|
|
6408
|
+
// src/yupSchema/appSettings.ts
|
|
6409
|
+
var yup10 = __toESM(require("yup"));
|
|
6410
|
+
var appSettingsSchema = yup10.object({
|
|
6411
|
+
appVersion: yup10.string().trim().label("App Version").matches(
|
|
6412
|
+
/^\d+\.\d+\.\d+$/,
|
|
6413
|
+
"App Version must be in the format X.Y.Z (e.g. 1.12.50)"
|
|
6414
|
+
).required("App Version is required")
|
|
6415
|
+
});
|
|
6416
|
+
|
|
6399
6417
|
// src/hooks/utils.ts
|
|
6400
6418
|
var defaultLocation = {
|
|
6401
6419
|
city: "",
|
|
@@ -7200,12 +7218,12 @@ var import_react2 = __toESM(require("react"));
|
|
|
7200
7218
|
var import_react_hook_form12 = require("react-hook-form");
|
|
7201
7219
|
|
|
7202
7220
|
// src/yupSchema/contactUs.ts
|
|
7203
|
-
var
|
|
7204
|
-
var contactUsSchema =
|
|
7221
|
+
var yup11 = __toESM(require("yup"));
|
|
7222
|
+
var contactUsSchema = yup11.object().shape({
|
|
7205
7223
|
email: emailRequiredSchema,
|
|
7206
|
-
firstName:
|
|
7207
|
-
lastName:
|
|
7208
|
-
message:
|
|
7224
|
+
firstName: yup11.string().label("First Name").required("First name is required"),
|
|
7225
|
+
lastName: yup11.string().label("Last Name").required("Last name is required"),
|
|
7226
|
+
message: yup11.string().label("Message").required("Message is required")
|
|
7209
7227
|
});
|
|
7210
7228
|
|
|
7211
7229
|
// src/hooks/useContactUsForm.ts
|
|
@@ -7511,6 +7529,49 @@ function usePostForm(data) {
|
|
|
7511
7529
|
};
|
|
7512
7530
|
}
|
|
7513
7531
|
|
|
7532
|
+
// src/hooks/useAppSettingsForm.ts
|
|
7533
|
+
var import_yup16 = require("@hookform/resolvers/yup");
|
|
7534
|
+
var import_react5 = __toESM(require("react"));
|
|
7535
|
+
var import_react_hook_form16 = require("react-hook-form");
|
|
7536
|
+
var defaultValues11 = {
|
|
7537
|
+
appVersion: ""
|
|
7538
|
+
};
|
|
7539
|
+
function useAppSettingsForm(data) {
|
|
7540
|
+
const {
|
|
7541
|
+
control,
|
|
7542
|
+
formState,
|
|
7543
|
+
getValues,
|
|
7544
|
+
handleSubmit,
|
|
7545
|
+
reset,
|
|
7546
|
+
setValue,
|
|
7547
|
+
watch
|
|
7548
|
+
} = (0, import_react_hook_form16.useForm)({
|
|
7549
|
+
defaultValues: defaultValues11,
|
|
7550
|
+
resolver: (0, import_yup16.yupResolver)(appSettingsSchema)
|
|
7551
|
+
});
|
|
7552
|
+
import_react5.default.useEffect(() => {
|
|
7553
|
+
if (data) {
|
|
7554
|
+
reset({
|
|
7555
|
+
appVersion: data.appVersion
|
|
7556
|
+
});
|
|
7557
|
+
} else {
|
|
7558
|
+
reset(defaultValues11);
|
|
7559
|
+
}
|
|
7560
|
+
}, [data]);
|
|
7561
|
+
const { appVersion } = getValues();
|
|
7562
|
+
return {
|
|
7563
|
+
control,
|
|
7564
|
+
fields: {
|
|
7565
|
+
appVersion
|
|
7566
|
+
},
|
|
7567
|
+
formState,
|
|
7568
|
+
handleSubmit,
|
|
7569
|
+
reset,
|
|
7570
|
+
setValue,
|
|
7571
|
+
watch
|
|
7572
|
+
};
|
|
7573
|
+
}
|
|
7574
|
+
|
|
7514
7575
|
// src/storage/index.ts
|
|
7515
7576
|
var SAVED_PASSWORD_KEY = "savedPassword";
|
|
7516
7577
|
var SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -7668,6 +7729,7 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
7668
7729
|
useAdminResendTesterVerificationEmail,
|
|
7669
7730
|
useAdminUpdateResourceType,
|
|
7670
7731
|
useAdminUpdateTester,
|
|
7732
|
+
useAppSettingsForm,
|
|
7671
7733
|
useAppVersionCheck,
|
|
7672
7734
|
useCancelSubscription,
|
|
7673
7735
|
useContactUs,
|