@timardex/cluemart-shared 1.7.51 → 1.7.53
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/{ad-CPz_YjR3.d.mts → ad-C4p6YSGQ.d.mts} +2 -2
- package/dist/{ad-DlEidDDn.d.ts → ad-mUnDAPSR.d.ts} +2 -2
- package/dist/{affiliate-gsHokKnO.d.mts → affiliate-BtwUxF_w.d.mts} +2 -2
- package/dist/{affiliate-D5O5FfUC.d.ts → affiliate-CVSQtlRk.d.ts} +2 -2
- package/dist/auth/index.d.mts +3 -3
- package/dist/auth/index.d.ts +3 -3
- package/dist/{chunk-7YUHKL5A.mjs → chunk-BHEP7DY7.mjs} +2 -2
- package/dist/{chunk-RIE2OS4I.mjs → chunk-GW52WYYK.mjs} +2 -1
- package/dist/{chunk-RIE2OS4I.mjs.map → chunk-GW52WYYK.mjs.map} +1 -1
- package/dist/{chunk-NCSJIE42.mjs → chunk-MGSDQSWS.mjs} +9 -8
- package/dist/{chunk-NCSJIE42.mjs.map → chunk-MGSDQSWS.mjs.map} +1 -1
- package/dist/{contactUs-BJQeu7Be.d.mts → contactUs-CfJflYDQ.d.mts} +1 -1
- package/dist/{contactUs-C39e1EfO.d.ts → contactUs-UWXzii_N.d.ts} +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/{global-CtjIrs69.d.ts → global-SpvNInzo.d.ts} +18 -10
- package/dist/{global-CxumKna-.d.mts → global-eKtRdO3m.d.mts} +18 -10
- package/dist/graphql/index.cjs +8 -7
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +5 -5
- package/dist/graphql/index.d.ts +5 -5
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +33 -25
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -5
- package/dist/hooks/index.d.ts +5 -5
- package/dist/hooks/index.mjs +28 -21
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +18 -10
- package/dist/index.d.ts +18 -10
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/{resourceActivities-B0B-uWFO.d.mts → resourceActivities-Bh_nj9xh.d.mts} +1 -1
- package/dist/{resourceActivities-BR8aGYJp.d.ts → resourceActivities-BxscFtkL.d.ts} +1 -1
- package/dist/sharing/index.d.mts +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.mjs +1 -1
- package/dist/{user-Cux67Xnr.d.mts → user-BvBpIU4z.d.mts} +1 -1
- package/dist/{user-CDKT3M1F.d.ts → user-CmGQOai2.d.ts} +1 -1
- package/dist/utils/index.d.mts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-7YUHKL5A.mjs.map → chunk-BHEP7DY7.mjs.map} +0 -0
package/dist/graphql/index.d.mts
CHANGED
|
@@ -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-
|
|
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, p as CouponTypeList } from '../global-
|
|
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-
|
|
3
|
+
import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-Bh_nj9xh.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, p as CouponTypeList } from '../global-eKtRdO3m.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-C4p6YSGQ.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-
|
|
8
|
-
import { A as AffiliateType } from '../affiliate-
|
|
7
|
+
import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-BvBpIU4z.mjs';
|
|
8
|
+
import { A as AffiliateType } from '../affiliate-BtwUxF_w.mjs';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import '../images/index.mjs';
|
|
11
11
|
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -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-
|
|
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, p as CouponTypeList } from '../global-
|
|
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-
|
|
3
|
+
import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-BxscFtkL.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, p as CouponTypeList } from '../global-SpvNInzo.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-mUnDAPSR.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-
|
|
8
|
-
import { A as AffiliateType } from '../affiliate-
|
|
7
|
+
import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-CmGQOai2.js';
|
|
8
|
+
import { A as AffiliateType } from '../affiliate-CVSQtlRk.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import '../images/index.js';
|
|
11
11
|
|
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -5603,17 +5603,18 @@ var COUPON_OPTION_FIELDS_FRAGMENT = import_client78.gql`
|
|
|
5603
5603
|
visits
|
|
5604
5604
|
}
|
|
5605
5605
|
`;
|
|
5606
|
-
var
|
|
5607
|
-
fragment
|
|
5606
|
+
var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = import_client78.gql`
|
|
5607
|
+
fragment CouponVendorProductFields on CouponVendorProductType {
|
|
5608
|
+
couponId
|
|
5608
5609
|
vendorId
|
|
5609
5610
|
productId
|
|
5610
|
-
|
|
5611
|
-
unit
|
|
5611
|
+
vendorCouponId
|
|
5612
5612
|
}
|
|
5613
5613
|
`;
|
|
5614
5614
|
var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = import_client78.gql`
|
|
5615
5615
|
fragment CouponDataProductsFields on CouponDataProductsType {
|
|
5616
5616
|
active
|
|
5617
|
+
couponId
|
|
5617
5618
|
productsList {
|
|
5618
5619
|
...VendorProductListFields
|
|
5619
5620
|
}
|
|
@@ -5637,8 +5638,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = import_client78.gql`
|
|
|
5637
5638
|
couponOption {
|
|
5638
5639
|
...CouponOptionFields
|
|
5639
5640
|
}
|
|
5640
|
-
|
|
5641
|
-
...
|
|
5641
|
+
couponVendorProducts {
|
|
5642
|
+
...CouponVendorProductFields
|
|
5642
5643
|
}
|
|
5643
5644
|
createdAt
|
|
5644
5645
|
endDate
|
|
@@ -5656,7 +5657,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = import_client78.gql`
|
|
|
5656
5657
|
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
5657
5658
|
${COUPON_OPTION_FIELDS_FRAGMENT}
|
|
5658
5659
|
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
5659
|
-
${
|
|
5660
|
+
${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
|
|
5660
5661
|
${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
|
|
5661
5662
|
`;
|
|
5662
5663
|
var COUPON = import_client78.gql`
|
|
@@ -6000,25 +6001,35 @@ var couponPurchaseOptionSchema = yup10.object().shape({
|
|
|
6000
6001
|
}),
|
|
6001
6002
|
type: yup10.mixed().oneOf(["PURCHASE" /* PURCHASE */], "Type must be PURCHASE").required("Type is required"),
|
|
6002
6003
|
unit: yup10.string().label("Unit").trim().required("Unit is required")
|
|
6003
|
-
});
|
|
6004
|
+
}).nullable().defined("Coupon option is required");
|
|
6004
6005
|
var couponMarketVisitOptionSchema = yup10.object().shape({
|
|
6005
6006
|
type: yup10.mixed().oneOf(
|
|
6006
6007
|
["MARKET_VISIT" /* MARKET_VISIT */],
|
|
6007
6008
|
"Type must be MARKET_VISIT"
|
|
6008
6009
|
).required("Type is required"),
|
|
6009
6010
|
visits: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Visits").typeError("Visits must be a number").integer("Visits must be a whole number").min(1, "Visits must be at least 1").required("Visits is required")
|
|
6010
|
-
});
|
|
6011
|
+
}).nullable().defined("Coupon option is required");
|
|
6012
|
+
var couponMarketPassportOptionSchema = yup10.object().shape({
|
|
6013
|
+
type: yup10.mixed().oneOf(
|
|
6014
|
+
["MARKET_PASSPORT" /* MARKET_PASSPORT */],
|
|
6015
|
+
"Type must be MARKET_PASSPORT"
|
|
6016
|
+
).required("Type is required"),
|
|
6017
|
+
visits: yup10.number().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Visits").typeError("Visits must be a number").integer("Visits must be a whole number").min(1, "Visits must be at least 1").required("Visits is required")
|
|
6018
|
+
}).nullable().defined("Coupon option is required");
|
|
6011
6019
|
var couponOptionSchema = yup10.lazy((value) => {
|
|
6012
6020
|
const type = value?.type;
|
|
6013
6021
|
if (type === "MARKET_VISIT" /* MARKET_VISIT */) {
|
|
6014
6022
|
return couponMarketVisitOptionSchema;
|
|
6015
6023
|
}
|
|
6024
|
+
if (type === "MARKET_PASSPORT" /* MARKET_PASSPORT */) {
|
|
6025
|
+
return couponMarketPassportOptionSchema;
|
|
6026
|
+
}
|
|
6016
6027
|
return couponPurchaseOptionSchema;
|
|
6017
6028
|
});
|
|
6018
|
-
var
|
|
6029
|
+
var couponVendorProductSchema = yup10.object().shape({
|
|
6030
|
+
couponId: yup10.string().label("Coupon").trim().required("Coupon is required"),
|
|
6019
6031
|
productId: yup10.string().label("Product").trim().required("Product is required"),
|
|
6020
|
-
|
|
6021
|
-
unit: yup10.string().label("Unit").trim().required("Unit is required"),
|
|
6032
|
+
vendorCouponId: yup10.string().label("Vendor Coupon").trim().optional(),
|
|
6022
6033
|
vendorId: yup10.string().label("Vendor").trim().required("Vendor is required")
|
|
6023
6034
|
});
|
|
6024
6035
|
var createCouponSchema = ({
|
|
@@ -6038,7 +6049,7 @@ var createCouponSchema = ({
|
|
|
6038
6049
|
return yup10.object().shape({
|
|
6039
6050
|
couponDescription: yup10.string().label("Description").trim().required("Description is required"),
|
|
6040
6051
|
couponOption: couponOptionSchema,
|
|
6041
|
-
|
|
6052
|
+
couponVendorProducts: yup10.array().of(couponVendorProductSchema).optional(),
|
|
6042
6053
|
endDate: yup10.date().label("End Date").typeError("End date is required").required("End date is required").test("is-future-date", "End date must be in the future", (value) => {
|
|
6043
6054
|
if (!value) return false;
|
|
6044
6055
|
return new Date(value) > /* @__PURE__ */ new Date();
|
|
@@ -7444,21 +7455,18 @@ function useAffiliateForm(data) {
|
|
|
7444
7455
|
|
|
7445
7456
|
// src/hooks/useCouponForm.tsx
|
|
7446
7457
|
var import_yup19 = require("@hookform/resolvers/yup");
|
|
7458
|
+
var import_dayjs4 = __toESM(require("dayjs"));
|
|
7447
7459
|
var React12 = __toESM(require("react"));
|
|
7448
7460
|
var import_react_hook_form19 = require("react-hook-form");
|
|
7461
|
+
var defaultDate = (0, import_dayjs4.default)().add(1, "day").toDate();
|
|
7449
7462
|
var defaultValues11 = {
|
|
7450
7463
|
couponDescription: "",
|
|
7451
|
-
couponOption:
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
type: "PURCHASE" /* PURCHASE */,
|
|
7455
|
-
unit: ""
|
|
7456
|
-
},
|
|
7457
|
-
couponRewards: [],
|
|
7458
|
-
endDate: /* @__PURE__ */ new Date(),
|
|
7464
|
+
couponOption: null,
|
|
7465
|
+
couponVendorProducts: [],
|
|
7466
|
+
endDate: defaultDate,
|
|
7459
7467
|
resourceId: "",
|
|
7460
7468
|
resourceType: "",
|
|
7461
|
-
startDate:
|
|
7469
|
+
startDate: defaultDate
|
|
7462
7470
|
};
|
|
7463
7471
|
function useCouponForm(data) {
|
|
7464
7472
|
const {
|
|
@@ -7478,7 +7486,7 @@ function useCouponForm(data) {
|
|
|
7478
7486
|
reset({
|
|
7479
7487
|
couponDescription: data.couponDescription,
|
|
7480
7488
|
couponOption: data.couponOption,
|
|
7481
|
-
|
|
7489
|
+
couponVendorProducts: data.couponVendorProducts,
|
|
7482
7490
|
endDate: data.endDate,
|
|
7483
7491
|
resourceId: data.resourceId,
|
|
7484
7492
|
resourceType: data.resourceType,
|
|
@@ -7491,7 +7499,7 @@ function useCouponForm(data) {
|
|
|
7491
7499
|
const {
|
|
7492
7500
|
couponDescription,
|
|
7493
7501
|
couponOption,
|
|
7494
|
-
|
|
7502
|
+
couponVendorProducts,
|
|
7495
7503
|
endDate,
|
|
7496
7504
|
resourceId,
|
|
7497
7505
|
resourceType,
|
|
@@ -7502,7 +7510,7 @@ function useCouponForm(data) {
|
|
|
7502
7510
|
fields: {
|
|
7503
7511
|
couponDescription,
|
|
7504
7512
|
couponOption,
|
|
7505
|
-
|
|
7513
|
+
couponVendorProducts,
|
|
7506
7514
|
endDate,
|
|
7507
7515
|
resourceId,
|
|
7508
7516
|
resourceType,
|