@timardex/cluemart-shared 1.4.60 → 1.4.62

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 (41) hide show
  1. package/dist/{auth-CjykW2Lr.d.ts → auth-n3P2BSCb.d.ts} +1 -1
  2. package/dist/{auth-DNycVvkZ.d.mts → auth-tx3-QbA9.d.mts} +1 -1
  3. package/dist/{chunk-UZZR2DDI.mjs → chunk-ONMJIUN6.mjs} +18 -1
  4. package/dist/chunk-ONMJIUN6.mjs.map +1 -0
  5. package/dist/{chunk-KIWJIODL.mjs → chunk-XV4RAQLF.mjs} +23 -1
  6. package/dist/chunk-XV4RAQLF.mjs.map +1 -0
  7. package/dist/formFields/index.cjs +23 -0
  8. package/dist/formFields/index.cjs.map +1 -1
  9. package/dist/formFields/index.d.mts +3 -2
  10. package/dist/formFields/index.d.ts +3 -2
  11. package/dist/formFields/index.mjs +3 -1
  12. package/dist/{global-BCkL-Bpy.d.mts → global-BCvKcmiT.d.mts} +5 -4
  13. package/dist/{global-CPPLdm4G.d.ts → global-DVDoQmBT.d.ts} +5 -4
  14. package/dist/graphql/index.cjs +18 -0
  15. package/dist/graphql/index.cjs.map +1 -1
  16. package/dist/graphql/index.d.mts +17 -4
  17. package/dist/graphql/index.d.ts +17 -4
  18. package/dist/graphql/index.mjs +3 -1
  19. package/dist/hooks/index.cjs +17 -24
  20. package/dist/hooks/index.cjs.map +1 -1
  21. package/dist/hooks/index.d.mts +3 -3
  22. package/dist/hooks/index.d.ts +3 -3
  23. package/dist/hooks/index.mjs +10 -26
  24. package/dist/hooks/index.mjs.map +1 -1
  25. package/dist/index.cjs +49 -24
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +20 -5
  28. package/dist/index.d.ts +20 -5
  29. package/dist/index.mjs +47 -24
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/{post-B8oSaRx5.d.ts → post-ByxIVi36.d.ts} +1 -1
  32. package/dist/{post-_XBrGUY2.d.mts → post-CvS5wUjm.d.mts} +1 -1
  33. package/dist/{resourceActivities-CndYlMM-.d.mts → resourceActivities-BKd6q2ey.d.mts} +1 -1
  34. package/dist/{resourceActivities-CxDUeNpr.d.ts → resourceActivities-UOB8Bo7j.d.ts} +1 -1
  35. package/dist/types/index.d.mts +5 -5
  36. package/dist/types/index.d.ts +5 -5
  37. package/dist/utils/index.d.mts +1 -1
  38. package/dist/utils/index.d.ts +1 -1
  39. package/package.json +1 -1
  40. package/dist/chunk-KIWJIODL.mjs.map +0 -1
  41. package/dist/chunk-UZZR2DDI.mjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -106,6 +106,7 @@ __export(index_exports, {
106
106
  packagingOptions: () => packagingOptions,
107
107
  partnerBasicInfoFields: () => partnerBasicInfoFields,
108
108
  paymentMethodOptions: () => paymentMethodOptions,
109
+ priceUnits: () => priceUnits,
109
110
  producedIngOptions: () => producedIngOptions,
110
111
  productLabelGroups: () => productLabelGroups,
111
112
  profileFields: () => profileFields,
@@ -146,6 +147,7 @@ __export(index_exports, {
146
147
  useCreatePartner: () => useCreatePartner,
147
148
  useCreatePost: () => useCreatePost,
148
149
  useCreatePoster: () => useCreatePoster,
150
+ useCreatePrivateChat: () => useCreatePrivateChat,
149
151
  useCreatePushToken: () => useCreatePushToken,
150
152
  useCreateRelation: () => useCreateRelation,
151
153
  useCreateResourceActivity: () => useCreateResourceActivity,
@@ -690,6 +692,27 @@ var productLabelGroups = [
690
692
  ]
691
693
  }
692
694
  ];
695
+ var priceUnits = [
696
+ { label: "Piece", value: "PIECE" },
697
+ { label: "Portion", value: "PORTION" },
698
+ { label: "Slice", value: "SLICE" },
699
+ { label: "Cup", value: "CUP" },
700
+ { label: "Bottle", value: "BOTTLE" },
701
+ { label: "Can", value: "CAN" },
702
+ { label: "Jar", value: "JAR" },
703
+ { label: "Box", value: "BOX" },
704
+ { label: "Pack", value: "PACK" },
705
+ { label: "Bag", value: "BAG" },
706
+ { label: "Bunch", value: "BUNCH" },
707
+ { label: "Tray", value: "TRAY" },
708
+ { label: "Punnet", value: "PUNNET" },
709
+ { label: "Gram (g)", value: "GRAM" },
710
+ { label: "Kilogram (kg)", value: "KILOGRAM" },
711
+ { label: "Litre (L)", value: "LITRE" },
712
+ { label: "Millilitre (ml)", value: "MILLILITRE" },
713
+ { label: "Dozen", value: "DOZEN" },
714
+ { label: "Half dozen", value: "HALF_DOZEN" }
715
+ ];
693
716
 
694
717
  // src/utils/index.ts
695
718
  var import_dayjs = __toESM(require("dayjs"));
@@ -3003,6 +3026,7 @@ var VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = import_client4.gql`
3003
3026
  description
3004
3027
  name
3005
3028
  price
3029
+ priceUnit
3006
3030
  productGroups
3007
3031
  }
3008
3032
  `;
@@ -3495,6 +3519,14 @@ var GET_REPORTED_CHAT_USERS = import_client8.gql`
3495
3519
  `;
3496
3520
 
3497
3521
  // src/graphql/mutations/chat.ts
3522
+ var CREATE_PRIVATE_CHAT_MUTATION = import_client9.gql`
3523
+ mutation createPrivateChat($userId: ID!) {
3524
+ createPrivateChat(userId: $userId) {
3525
+ ...ChatFields
3526
+ }
3527
+ }
3528
+ ${CHAT_FIELDS_FRAGMENT}
3529
+ `;
3498
3530
  var SEND_CHAT_MESSAGE_MUTATION = import_client9.gql`
3499
3531
  mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
3500
3532
  sendChatMessage(_id: $_id, input: $input) {
@@ -3550,6 +3582,13 @@ var REPORT_CHAT_USER_MUTATION = import_client9.gql`
3550
3582
  `;
3551
3583
 
3552
3584
  // src/graphql/hooks/chat/hooksMutation.ts
3585
+ var useCreatePrivateChat = () => {
3586
+ const [createPrivateChat, { loading, error }] = (0, import_client10.useMutation)(CREATE_PRIVATE_CHAT_MUTATION, {
3587
+ awaitRefetchQueries: true,
3588
+ refetchQueries: [{ query: USER_CHATS }]
3589
+ });
3590
+ return { createPrivateChat, error, loading };
3591
+ };
3553
3592
  var useSendChatMessage = () => {
3554
3593
  const [sendChatMessage, { loading, error }] = (0, import_client10.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
3555
3594
  awaitRefetchQueries: true,
@@ -6323,35 +6362,19 @@ var eventInfoSchema = yup2.object().shape({
6323
6362
 
6324
6363
  // src/yupSchema/vendor.ts
6325
6364
  var yup3 = __toESM(require("yup"));
6326
- var vendroMenuSchema = yup3.object().shape({
6327
- description: yup3.string().trim().nullable().defined().test(
6328
- "description-required",
6329
- "Product description is required",
6330
- function(value) {
6331
- return value !== null && value !== void 0 && value.trim().length > 0;
6332
- }
6333
- ),
6334
- name: yup3.string().trim().nullable().defined().test("name-required", "Product name is required", function(value) {
6335
- return value !== null && value !== void 0 && value.trim().length > 0;
6336
- }),
6337
- price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).nullable().defined().test("price-required", "Product price is required", function(value) {
6338
- return value !== null && value !== void 0;
6339
- }),
6340
- productGroups: yup3.array().of(yup3.string().defined()).transform(
6341
- (value, originalValue) => originalValue === void 0 ? null : value
6342
- ).nullable().test(
6343
- "productGroups-required",
6344
- "Product groups are required",
6345
- function(value) {
6346
- return value !== null && Array.isArray(value) && value.length > 0;
6347
- }
6348
- ).defined()
6365
+ var vendorMenuSchema = yup3.object({
6366
+ description: yup3.string().nullable().optional(),
6367
+ name: yup3.string().nullable().required("Product name is required"),
6368
+ price: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product price must be greater than 0").required("Product price is required"),
6369
+ priceUnit: yup3.string().required("Product unit is required"),
6370
+ productGroups: yup3.array().of(yup3.string().defined()).min(1, "Product groups are required").required("Product groups are required")
6349
6371
  });
6350
6372
  var vendorSchema = globalResourceSchema.shape({
6351
6373
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
6352
6374
  foodTruck: yup3.boolean().label("Food Truck").required("Please specify if the vendor is a food truck"),
6353
6375
  products: yup3.object().shape({
6354
- productsList: yup3.array().of(vendroMenuSchema).nullable().optional()
6376
+ active: yup3.boolean().nullable().optional(),
6377
+ productsList: yup3.array().of(vendorMenuSchema).nullable().optional()
6355
6378
  }).nullable().optional(),
6356
6379
  vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
6357
6380
  });
@@ -7873,6 +7896,7 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
7873
7896
  packagingOptions,
7874
7897
  partnerBasicInfoFields,
7875
7898
  paymentMethodOptions,
7899
+ priceUnits,
7876
7900
  producedIngOptions,
7877
7901
  productLabelGroups,
7878
7902
  profileFields,
@@ -7913,6 +7937,7 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
7913
7937
  useCreatePartner,
7914
7938
  useCreatePost,
7915
7939
  useCreatePoster,
7940
+ useCreatePrivateChat,
7916
7941
  useCreatePushToken,
7917
7942
  useCreateRelation,
7918
7943
  useCreateResourceActivity,