@timardex/cluemart-shared 1.3.36 → 1.3.38

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.
Files changed (35) hide show
  1. package/dist/{auth-DkJ0i7X5.d.ts → auth-CTIC98LE.d.ts} +1 -1
  2. package/dist/{auth-BGOx1McZ.d.mts → auth-duNF_25U.d.mts} +1 -1
  3. package/dist/{chunk-R3MMYKM2.mjs → chunk-BUTKJE3A.mjs} +1 -1
  4. package/dist/{chunk-R3MMYKM2.mjs.map → chunk-BUTKJE3A.mjs.map} +1 -1
  5. package/dist/formFields/index.d.mts +1 -1
  6. package/dist/formFields/index.d.ts +1 -1
  7. package/dist/{global-CfCbqhR0.d.mts → global-OV8Kw7GZ.d.mts} +14 -1
  8. package/dist/{global-ZjNLEVhq.d.ts → global-jmCVxHjD.d.ts} +14 -1
  9. package/dist/graphql/index.cjs +31 -3
  10. package/dist/graphql/index.cjs.map +1 -1
  11. package/dist/graphql/index.d.mts +2 -2
  12. package/dist/graphql/index.d.ts +2 -2
  13. package/dist/graphql/index.mjs +31 -3
  14. package/dist/graphql/index.mjs.map +1 -1
  15. package/dist/hooks/index.cjs +5 -44
  16. package/dist/hooks/index.cjs.map +1 -1
  17. package/dist/hooks/index.d.mts +3 -3
  18. package/dist/hooks/index.d.ts +3 -3
  19. package/dist/hooks/index.mjs +6 -45
  20. package/dist/hooks/index.mjs.map +1 -1
  21. package/dist/index.cjs +36 -47
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.mts +15 -1
  24. package/dist/index.d.ts +15 -1
  25. package/dist/index.mjs +36 -47
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/{post-BV_BR8EZ.d.ts → post-B1pzBnlo.d.ts} +2 -1
  28. package/dist/{post-BOZMTfME.d.mts → post-DI7LRKGd.d.mts} +2 -1
  29. package/dist/types/index.cjs.map +1 -1
  30. package/dist/types/index.d.mts +3 -3
  31. package/dist/types/index.d.ts +3 -3
  32. package/dist/types/index.mjs +1 -1
  33. package/dist/utils/index.d.mts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/package.json +1 -1
@@ -891,49 +891,6 @@ var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
891
891
  })(EnumPostContentType || {});
892
892
 
893
893
  // src/yupSchema/post.ts
894
- var textareaContentSchema = yup9.object({
895
- textarea: yup9.object({
896
- data: yup9.string().required("Textarea content is required"),
897
- title: yup9.string().optional()
898
- }).required()
899
- });
900
- var videoContentSchema = yup9.object({
901
- video: yup9.object({
902
- source: yup9.string().required("Video source is required"),
903
- title: yup9.string().optional()
904
- }).required()
905
- });
906
- var listContentSchema = yup9.object({
907
- list: yup9.object({
908
- items: yup9.array().of(
909
- yup9.object({
910
- text: yup9.string().required("List item text is required")
911
- })
912
- ).min(1, "List must contain at least one item").required(),
913
- title: yup9.string().optional()
914
- }).required()
915
- });
916
- var contentDataSchema = yup9.mixed().required("Content data is required").test(
917
- "contentData-by-type",
918
- "Invalid content data for content type",
919
- function(value) {
920
- const { contentType } = this.parent;
921
- const schema = (() => {
922
- switch (contentType) {
923
- case "textarea" /* TEXTAREA */:
924
- return textareaContentSchema;
925
- case "video" /* VIDEO */:
926
- return videoContentSchema;
927
- case "list" /* LIST */:
928
- return listContentSchema;
929
- default:
930
- return null;
931
- }
932
- })();
933
- if (!schema) return false;
934
- return schema.isValidSync(value);
935
- }
936
- );
937
894
  var postContentSchema = yup9.object().shape({
938
895
  contentData: yup9.mixed().optional().nullable(),
939
896
  contentOrder: yup9.number().nullable(),
@@ -941,6 +898,7 @@ var postContentSchema = yup9.object().shape({
941
898
  });
942
899
  var postSchema = yup9.object().shape({
943
900
  active: yup9.boolean().required(),
901
+ caption: yup9.string().required(),
944
902
  content: yup9.array().of(postContentSchema).required(),
945
903
  postType: yup9.mixed().oneOf(Object.values(EnumPostType)).required(),
946
904
  tags: yup9.array().of(yup9.string().required()).nullable().optional(),
@@ -2003,6 +1961,7 @@ var import_react4 = __toESM(require("react"));
2003
1961
  var import_react_hook_form15 = require("react-hook-form");
2004
1962
  var defaultValues10 = {
2005
1963
  active: true,
1964
+ caption: "",
2006
1965
  content: [],
2007
1966
  postType: "daily_meets" /* DAILY_MEETS */,
2008
1967
  tags: [],
@@ -2025,6 +1984,7 @@ function usePostForm(data) {
2025
1984
  if (data) {
2026
1985
  reset({
2027
1986
  active: data.active,
1987
+ caption: data.caption,
2028
1988
  content: data.content,
2029
1989
  postType: data.postType,
2030
1990
  tags: data.tags,
@@ -2034,11 +1994,12 @@ function usePostForm(data) {
2034
1994
  reset(defaultValues10);
2035
1995
  }
2036
1996
  }, [data]);
2037
- const { active, content, postType, tags, title } = getValues();
1997
+ const { active, caption, content, postType, tags, title } = getValues();
2038
1998
  return {
2039
1999
  control,
2040
2000
  fields: {
2041
2001
  active,
2002
+ caption,
2042
2003
  content,
2043
2004
  postType,
2044
2005
  tags,