@timardex/cluemart-shared 1.7.31 → 1.7.33

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 (52) hide show
  1. package/dist/{ad-FrGeJoW6.d.ts → ad-DHN0IudM.d.ts} +2 -2
  2. package/dist/{ad-BsAes_WS.d.mts → ad-QDSgLYQe.d.mts} +2 -2
  3. package/dist/{affiliate-2h_y0IL4.d.ts → affiliate-CI_khNgq.d.ts} +2 -2
  4. package/dist/{affiliate-KR-MNBCC.d.mts → affiliate-kR3czfpb.d.mts} +2 -2
  5. package/dist/auth/index.d.mts +3 -3
  6. package/dist/auth/index.d.ts +3 -3
  7. package/dist/{chunk-BGTWSB5L.mjs → chunk-DJQMVUPX.mjs} +11 -3
  8. package/dist/{chunk-BGTWSB5L.mjs.map → chunk-DJQMVUPX.mjs.map} +1 -1
  9. package/dist/{chunk-3UYXNSNB.mjs → chunk-IH3BEKPK.mjs} +2 -2
  10. package/dist/{chunk-UV5GH6NI.mjs → chunk-OH7ZORGB.mjs} +1 -1
  11. package/dist/{chunk-UV5GH6NI.mjs.map → chunk-OH7ZORGB.mjs.map} +1 -1
  12. package/dist/{contactUs-CQqOcQk_.d.ts → contactUs-Dpf4Wtf0.d.ts} +1 -1
  13. package/dist/{contactUs-DOI78kmJ.d.mts → contactUs-KdCU5i-u.d.mts} +1 -1
  14. package/dist/formFields/index.d.mts +1 -1
  15. package/dist/formFields/index.d.ts +1 -1
  16. package/dist/formFields/index.mjs +2 -2
  17. package/dist/graphql/index.cjs +10 -2
  18. package/dist/graphql/index.cjs.map +1 -1
  19. package/dist/graphql/index.d.mts +5 -5
  20. package/dist/graphql/index.d.ts +5 -5
  21. package/dist/graphql/index.mjs +1 -1
  22. package/dist/hooks/index.cjs +42 -4
  23. package/dist/hooks/index.cjs.map +1 -1
  24. package/dist/hooks/index.d.mts +5 -5
  25. package/dist/hooks/index.d.ts +5 -5
  26. package/dist/hooks/index.mjs +35 -5
  27. package/dist/hooks/index.mjs.map +1 -1
  28. package/dist/index.cjs +10 -2
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.mts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.mjs +10 -2
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/map/index.d.mts +1 -1
  35. package/dist/map/index.d.ts +1 -1
  36. package/dist/{resourceActivities-CoCW9VLu.d.mts → resourceActivities-CLvYtSbH.d.mts} +1 -1
  37. package/dist/{resourceActivities-DMEtduFL.d.ts → resourceActivities-E1zbLLJN.d.ts} +1 -1
  38. package/dist/sharing/index.d.mts +1 -1
  39. package/dist/sharing/index.d.ts +1 -1
  40. package/dist/types/index.cjs.map +1 -1
  41. package/dist/types/index.d.mts +7 -7
  42. package/dist/types/index.d.ts +7 -7
  43. package/dist/types/index.mjs +1 -1
  44. package/dist/{user-Bynr8XGA.d.ts → user-BgSYnv1D.d.ts} +1 -1
  45. package/dist/{user-0qKK4juO.d.mts → user-DcXGRyeL.d.mts} +1 -1
  46. package/dist/utils/index.d.mts +3 -3
  47. package/dist/utils/index.d.ts +3 -3
  48. package/dist/utils/index.mjs +2 -2
  49. package/package.json +1 -1
  50. package/dist/{chunk-3UYXNSNB.mjs.map → chunk-IH3BEKPK.mjs.map} +0 -0
  51. package/dist/{global-C7xIDkiQ.d.mts → global-cOd88aj7.d.mts} +2 -2
  52. package/dist/{global-D-034Xws.d.ts → global-iWgXdLj8.d.ts} +2 -2
@@ -1,11 +1,11 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode } from 'graphql';
3
- import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-CoCW9VLu.mjs';
4
- import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-C7xIDkiQ.mjs';
5
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-BsAes_WS.mjs';
3
+ import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-CLvYtSbH.mjs';
4
+ import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-cOd88aj7.mjs';
5
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-QDSgLYQe.mjs';
6
6
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.mjs';
7
- import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-0qKK4juO.mjs';
8
- import { A as AffiliateType } from '../affiliate-KR-MNBCC.mjs';
7
+ import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-DcXGRyeL.mjs';
8
+ import { A as AffiliateType } from '../affiliate-kR3czfpb.mjs';
9
9
  import 'react-hook-form';
10
10
  import '../images/index.mjs';
11
11
 
@@ -1,11 +1,11 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { DocumentNode } from 'graphql';
3
- import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-DMEtduFL.js';
4
- import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-D-034Xws.js';
5
- import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-FrGeJoW6.js';
3
+ import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-E1zbLLJN.js';
4
+ import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-iWgXdLj8.js';
5
+ import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-DHN0IudM.js';
6
6
  import { EnumEventDateStatus, EnumResourceType } from '../enums/index.js';
7
- import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-Bynr8XGA.js';
8
- import { A as AffiliateType } from '../affiliate-2h_y0IL4.js';
7
+ import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-BgSYnv1D.js';
8
+ import { A as AffiliateType } from '../affiliate-CI_khNgq.js';
9
9
  import 'react-hook-form';
10
10
  import '../images/index.js';
11
11
 
@@ -145,7 +145,7 @@ import {
145
145
  useUpdateUser,
146
146
  useUpdateVendor,
147
147
  useUpdateVendorInfo
148
- } from "../chunk-BGTWSB5L.mjs";
148
+ } from "../chunk-DJQMVUPX.mjs";
149
149
  import {
150
150
  GET_EVENT,
151
151
  GET_EVENT_INFO,
@@ -1957,7 +1957,18 @@ var vendorMenuSchema = yup3.object({
1957
1957
  description: yup3.string().trim().nullable().optional(),
1958
1958
  name: yup3.string().trim().nullable().min(3, "Product name must be at least 3 characters").required("Product name is required"),
1959
1959
  price: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product price must be greater than 0").required("Product price is required"),
1960
- priceMax: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product max price must be greater than 0").nullable().optional(),
1960
+ priceMax: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product max price must be greater than 0").nullable().optional().test(
1961
+ "is-greater",
1962
+ "Max price must be greater than Product price",
1963
+ function(priceMaxValue) {
1964
+ const { price } = this.parent;
1965
+ if (!priceMaxValue || !price) return true;
1966
+ const maxNum = Number(priceMaxValue);
1967
+ const priceNum = Number(price);
1968
+ if (Number.isNaN(maxNum) || Number.isNaN(priceNum)) return true;
1969
+ return maxNum > priceNum;
1970
+ }
1971
+ ),
1961
1972
  priceUnit: yup3.string().required("Product unit is required")
1962
1973
  });
1963
1974
  var vendorSchema = globalResourceSchema.shape({
@@ -5667,8 +5678,16 @@ var CREATE_COUPON_MUTATION = import_client79.gql`
5667
5678
  ${COUPON}
5668
5679
  `;
5669
5680
  var UPDATE_COUPON_MUTATION = import_client79.gql`
5670
- mutation updateCoupon($_id: ID!, $input: CouponInputType!) {
5671
- updateCoupon(_id: $_id, input: $input) {
5681
+ mutation updateCoupon(
5682
+ $couponDocumentId: ID!
5683
+ $couponId: ID!
5684
+ $input: CouponInputType!
5685
+ ) {
5686
+ updateCoupon(
5687
+ couponDocumentId: $couponDocumentId
5688
+ couponId: $couponId
5689
+ input: $input
5690
+ ) {
5672
5691
  data {
5673
5692
  ...CouponFields
5674
5693
  }
@@ -5964,6 +5983,11 @@ var couponSchema = yup10.object().shape({
5964
5983
  }
5965
5984
  )
5966
5985
  }),
5986
+ resourceId: yup10.string().label("Resource ID").trim().required("Resource ID is required"),
5987
+ resourceType: yup10.mixed().oneOf(
5988
+ Object.values(EnumResourceType),
5989
+ "Resource type must be a valid EnumResourceType"
5990
+ ).required("Resource type is required"),
5967
5991
  startDate: yup10.date().label("Start Date").typeError("Start date is required").required("Start date is required").test("is-future-date", "Start date must be in the future", (value) => {
5968
5992
  if (!value) return false;
5969
5993
  return new Date(value) > /* @__PURE__ */ new Date();
@@ -7357,6 +7381,8 @@ var defaultValues11 = {
7357
7381
  },
7358
7382
  couponRewards: [],
7359
7383
  endDate: /* @__PURE__ */ new Date(),
7384
+ resourceId: "",
7385
+ resourceType: "",
7360
7386
  startDate: /* @__PURE__ */ new Date()
7361
7387
  };
7362
7388
  function useCouponForm(data) {
@@ -7379,13 +7405,23 @@ function useCouponForm(data) {
7379
7405
  couponOption: data.couponOption,
7380
7406
  couponRewards: data.couponRewards,
7381
7407
  endDate: data.endDate,
7408
+ resourceId: data.resourceId,
7409
+ resourceType: data.resourceType,
7382
7410
  startDate: data.startDate
7383
7411
  });
7384
7412
  } else {
7385
7413
  reset(defaultValues11);
7386
7414
  }
7387
7415
  }, [data]);
7388
- const { couponDescription, couponOption, couponRewards, endDate, startDate } = getValues();
7416
+ const {
7417
+ couponDescription,
7418
+ couponOption,
7419
+ couponRewards,
7420
+ endDate,
7421
+ resourceId,
7422
+ resourceType,
7423
+ startDate
7424
+ } = getValues();
7389
7425
  return {
7390
7426
  control,
7391
7427
  fields: {
@@ -7393,6 +7429,8 @@ function useCouponForm(data) {
7393
7429
  couponOption,
7394
7430
  couponRewards,
7395
7431
  endDate,
7432
+ resourceId,
7433
+ resourceType,
7396
7434
  startDate
7397
7435
  },
7398
7436
  formState,