@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/hooks/index.cjs
CHANGED
|
@@ -39,6 +39,7 @@ __export(hooks_exports, {
|
|
|
39
39
|
globalDefaultValues: () => globalDefaultValues,
|
|
40
40
|
mapBaseResourceTypeToFormData: () => mapBaseResourceTypeToFormData,
|
|
41
41
|
useAdForm: () => useAdForm,
|
|
42
|
+
useAppSettingsForm: () => useAppSettingsForm,
|
|
42
43
|
useContactUsForm: () => useContactUsForm,
|
|
43
44
|
useEventForm: () => useEventForm,
|
|
44
45
|
useEventInfoForm: () => useEventInfoForm,
|
|
@@ -928,6 +929,15 @@ var postSchema = yup9.object().shape({
|
|
|
928
929
|
title: yup9.string().required()
|
|
929
930
|
});
|
|
930
931
|
|
|
932
|
+
// src/yupSchema/appSettings.ts
|
|
933
|
+
var yup10 = __toESM(require("yup"));
|
|
934
|
+
var appSettingsSchema = yup10.object({
|
|
935
|
+
appVersion: yup10.string().trim().label("App Version").matches(
|
|
936
|
+
/^\d+\.\d+\.\d+$/,
|
|
937
|
+
"App Version must be in the format X.Y.Z (e.g. 1.12.50)"
|
|
938
|
+
).required("App Version is required")
|
|
939
|
+
});
|
|
940
|
+
|
|
931
941
|
// src/hooks/utils.ts
|
|
932
942
|
var defaultLocation = {
|
|
933
943
|
city: "",
|
|
@@ -1732,12 +1742,12 @@ var import_react2 = __toESM(require("react"));
|
|
|
1732
1742
|
var import_react_hook_form12 = require("react-hook-form");
|
|
1733
1743
|
|
|
1734
1744
|
// src/yupSchema/contactUs.ts
|
|
1735
|
-
var
|
|
1736
|
-
var contactUsSchema =
|
|
1745
|
+
var yup11 = __toESM(require("yup"));
|
|
1746
|
+
var contactUsSchema = yup11.object().shape({
|
|
1737
1747
|
email: emailRequiredSchema,
|
|
1738
|
-
firstName:
|
|
1739
|
-
lastName:
|
|
1740
|
-
message:
|
|
1748
|
+
firstName: yup11.string().label("First Name").required("First name is required"),
|
|
1749
|
+
lastName: yup11.string().label("Last Name").required("Last name is required"),
|
|
1750
|
+
message: yup11.string().label("Message").required("Message is required")
|
|
1741
1751
|
});
|
|
1742
1752
|
|
|
1743
1753
|
// src/hooks/useContactUsForm.ts
|
|
@@ -2042,6 +2052,49 @@ function usePostForm(data) {
|
|
|
2042
2052
|
watch
|
|
2043
2053
|
};
|
|
2044
2054
|
}
|
|
2055
|
+
|
|
2056
|
+
// src/hooks/useAppSettingsForm.ts
|
|
2057
|
+
var import_yup16 = require("@hookform/resolvers/yup");
|
|
2058
|
+
var import_react5 = __toESM(require("react"));
|
|
2059
|
+
var import_react_hook_form16 = require("react-hook-form");
|
|
2060
|
+
var defaultValues11 = {
|
|
2061
|
+
appVersion: ""
|
|
2062
|
+
};
|
|
2063
|
+
function useAppSettingsForm(data) {
|
|
2064
|
+
const {
|
|
2065
|
+
control,
|
|
2066
|
+
formState,
|
|
2067
|
+
getValues,
|
|
2068
|
+
handleSubmit,
|
|
2069
|
+
reset,
|
|
2070
|
+
setValue,
|
|
2071
|
+
watch
|
|
2072
|
+
} = (0, import_react_hook_form16.useForm)({
|
|
2073
|
+
defaultValues: defaultValues11,
|
|
2074
|
+
resolver: (0, import_yup16.yupResolver)(appSettingsSchema)
|
|
2075
|
+
});
|
|
2076
|
+
import_react5.default.useEffect(() => {
|
|
2077
|
+
if (data) {
|
|
2078
|
+
reset({
|
|
2079
|
+
appVersion: data.appVersion
|
|
2080
|
+
});
|
|
2081
|
+
} else {
|
|
2082
|
+
reset(defaultValues11);
|
|
2083
|
+
}
|
|
2084
|
+
}, [data]);
|
|
2085
|
+
const { appVersion } = getValues();
|
|
2086
|
+
return {
|
|
2087
|
+
control,
|
|
2088
|
+
fields: {
|
|
2089
|
+
appVersion
|
|
2090
|
+
},
|
|
2091
|
+
formState,
|
|
2092
|
+
handleSubmit,
|
|
2093
|
+
reset,
|
|
2094
|
+
setValue,
|
|
2095
|
+
watch
|
|
2096
|
+
};
|
|
2097
|
+
}
|
|
2045
2098
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2046
2099
|
0 && (module.exports = {
|
|
2047
2100
|
defaultEventFormValues,
|
|
@@ -2053,6 +2106,7 @@ function usePostForm(data) {
|
|
|
2053
2106
|
globalDefaultValues,
|
|
2054
2107
|
mapBaseResourceTypeToFormData,
|
|
2055
2108
|
useAdForm,
|
|
2109
|
+
useAppSettingsForm,
|
|
2056
2110
|
useContactUsForm,
|
|
2057
2111
|
useEventForm,
|
|
2058
2112
|
useEventInfoForm,
|