@timardex/cluemart-shared 1.3.13 → 1.3.15

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/index.d.mts CHANGED
@@ -949,6 +949,7 @@ type PostContentFormData = {
949
949
  contentType: EnumPostContentType;
950
950
  };
951
951
  interface PostFormData {
952
+ active: boolean;
952
953
  content: PostContentFormData[];
953
954
  postType: EnumPostType;
954
955
  tags?: string[] | null;
package/dist/index.d.ts CHANGED
@@ -949,6 +949,7 @@ type PostContentFormData = {
949
949
  contentType: EnumPostContentType;
950
950
  };
951
951
  interface PostFormData {
952
+ active: boolean;
952
953
  content: PostContentFormData[];
953
954
  postType: EnumPostType;
954
955
  tags?: string[] | null;
package/dist/index.mjs CHANGED
@@ -5082,6 +5082,7 @@ var POST_CONTENT_FIELDS_FRAGMENT = gql31`
5082
5082
  var POST_FIELDS_FRAGMENT = gql31`
5083
5083
  fragment PostFields on PostType {
5084
5084
  _id
5085
+ active
5085
5086
  content {
5086
5087
  ...PostContentFields
5087
5088
  }
@@ -5920,9 +5921,10 @@ var postContentSchema = yup9.object().shape({
5920
5921
  contentType: yup9.mixed().oneOf(Object.values(EnumPostContentType)).required()
5921
5922
  });
5922
5923
  var postSchema = yup9.object().shape({
5924
+ active: yup9.boolean().required(),
5923
5925
  content: yup9.array().of(postContentSchema).required(),
5924
5926
  postType: yup9.mixed().oneOf(Object.values(EnumPostType)).required(),
5925
- tags: yup9.array().of(yup9.string()).nullable().optional(),
5927
+ tags: yup9.array().of(yup9.string().required()).nullable().optional(),
5926
5928
  title: yup9.string().required()
5927
5929
  });
5928
5930
 
@@ -6981,6 +6983,7 @@ import { yupResolver as yupResolver15 } from "@hookform/resolvers/yup";
6981
6983
  import React10 from "react";
6982
6984
  import { useForm as useForm15 } from "react-hook-form";
6983
6985
  var defaultValues10 = {
6986
+ active: true,
6984
6987
  content: [],
6985
6988
  postType: "daily_meets" /* DAILY_MEETS */,
6986
6989
  tags: [],
@@ -7002,6 +7005,7 @@ function usePostform(data) {
7002
7005
  React10.useEffect(() => {
7003
7006
  if (data) {
7004
7007
  reset({
7008
+ active: data.active,
7005
7009
  content: data.content,
7006
7010
  postType: data.postType,
7007
7011
  tags: data.tags,
@@ -7011,10 +7015,11 @@ function usePostform(data) {
7011
7015
  reset(defaultValues10);
7012
7016
  }
7013
7017
  }, [data]);
7014
- const { content, postType, tags, title } = getValues();
7018
+ const { active, content, postType, tags, title } = getValues();
7015
7019
  return {
7016
7020
  control,
7017
7021
  fields: {
7022
+ active,
7018
7023
  content,
7019
7024
  postType,
7020
7025
  tags,