@timardex/cluemart-shared 1.3.14 → 1.3.16
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/{chunk-2ZPH2KHC.mjs → chunk-CT7KP3TQ.mjs} +1 -1
- package/dist/{chunk-2ZPH2KHC.mjs.map → chunk-CT7KP3TQ.mjs.map} +1 -1
- package/dist/graphql/index.cjs +3 -1
- 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 +3 -1
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +14 -6
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +14 -6
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +17 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.mjs +16 -6
- package/dist/index.mjs.map +1 -1
- package/dist/{post-C2utkFw4.d.ts → post-C8_5QIAe.d.ts} +4 -2
- package/dist/{post-MoaerbbL.d.mts → post-CvXVzjcO.d.mts} +4 -2
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +1 -1
package/dist/hooks/index.cjs
CHANGED
|
@@ -44,7 +44,7 @@ __export(hooks_exports, {
|
|
|
44
44
|
useLocationSearch: () => useLocationSearch,
|
|
45
45
|
useLoginForm: () => useLoginForm,
|
|
46
46
|
usePartnerForm: () => usePartnerForm,
|
|
47
|
-
|
|
47
|
+
usePostForm: () => usePostForm,
|
|
48
48
|
useRegisterForm: () => useRegisterForm,
|
|
49
49
|
useRequestPasswordResetForm: () => useRequestPasswordResetForm,
|
|
50
50
|
useResetPasswordForm: () => useResetPasswordForm,
|
|
@@ -908,7 +908,11 @@ var videoContentSchema = yup9.object({
|
|
|
908
908
|
});
|
|
909
909
|
var listContentSchema = yup9.object({
|
|
910
910
|
list: yup9.object({
|
|
911
|
-
items: yup9.array().of(
|
|
911
|
+
items: yup9.array().of(
|
|
912
|
+
yup9.object({
|
|
913
|
+
text: yup9.string().required("List item text is required")
|
|
914
|
+
})
|
|
915
|
+
).min(1, "List must contain at least one item").required(),
|
|
912
916
|
title: yup9.string().optional()
|
|
913
917
|
}).required()
|
|
914
918
|
});
|
|
@@ -943,9 +947,10 @@ var postContentSchema = yup9.object().shape({
|
|
|
943
947
|
contentType: yup9.mixed().oneOf(Object.values(EnumPostContentType)).required()
|
|
944
948
|
});
|
|
945
949
|
var postSchema = yup9.object().shape({
|
|
950
|
+
active: yup9.boolean().required(),
|
|
946
951
|
content: yup9.array().of(postContentSchema).required(),
|
|
947
952
|
postType: yup9.mixed().oneOf(Object.values(EnumPostType)).required(),
|
|
948
|
-
tags: yup9.array().of(yup9.string()).nullable().optional(),
|
|
953
|
+
tags: yup9.array().of(yup9.string().required()).nullable().optional(),
|
|
949
954
|
title: yup9.string().required()
|
|
950
955
|
});
|
|
951
956
|
|
|
@@ -2004,12 +2009,13 @@ var import_yup15 = require("@hookform/resolvers/yup");
|
|
|
2004
2009
|
var import_react4 = __toESM(require("react"));
|
|
2005
2010
|
var import_react_hook_form15 = require("react-hook-form");
|
|
2006
2011
|
var defaultValues10 = {
|
|
2012
|
+
active: true,
|
|
2007
2013
|
content: [],
|
|
2008
2014
|
postType: "daily_meets" /* DAILY_MEETS */,
|
|
2009
2015
|
tags: [],
|
|
2010
2016
|
title: ""
|
|
2011
2017
|
};
|
|
2012
|
-
function
|
|
2018
|
+
function usePostForm(data) {
|
|
2013
2019
|
const {
|
|
2014
2020
|
control,
|
|
2015
2021
|
formState: { errors },
|
|
@@ -2025,6 +2031,7 @@ function usePostform(data) {
|
|
|
2025
2031
|
import_react4.default.useEffect(() => {
|
|
2026
2032
|
if (data) {
|
|
2027
2033
|
reset({
|
|
2034
|
+
active: data.active,
|
|
2028
2035
|
content: data.content,
|
|
2029
2036
|
postType: data.postType,
|
|
2030
2037
|
tags: data.tags,
|
|
@@ -2034,10 +2041,11 @@ function usePostform(data) {
|
|
|
2034
2041
|
reset(defaultValues10);
|
|
2035
2042
|
}
|
|
2036
2043
|
}, [data]);
|
|
2037
|
-
const { content, postType, tags, title } = getValues();
|
|
2044
|
+
const { active, content, postType, tags, title } = getValues();
|
|
2038
2045
|
return {
|
|
2039
2046
|
control,
|
|
2040
2047
|
fields: {
|
|
2048
|
+
active,
|
|
2041
2049
|
content,
|
|
2042
2050
|
postType,
|
|
2043
2051
|
tags,
|
|
@@ -2066,7 +2074,7 @@ function usePostform(data) {
|
|
|
2066
2074
|
useLocationSearch,
|
|
2067
2075
|
useLoginForm,
|
|
2068
2076
|
usePartnerForm,
|
|
2069
|
-
|
|
2077
|
+
usePostForm,
|
|
2070
2078
|
useRegisterForm,
|
|
2071
2079
|
useRequestPasswordResetForm,
|
|
2072
2080
|
useResetPasswordForm,
|