@timardex/cluemart-shared 1.5.836 → 1.5.838
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/{affiliate-C0wLdUpL.d.mts → affiliate-C_2ZuhuU.d.mts} +1 -2
- package/dist/{affiliate-DSZKkCju.d.ts → affiliate-DrhbUvqf.d.ts} +1 -2
- package/dist/{chunk-OBZTGPBJ.mjs → chunk-2V7QKRQE.mjs} +1 -1
- package/dist/{chunk-OBZTGPBJ.mjs.map → chunk-2V7QKRQE.mjs.map} +1 -1
- package/dist/{chunk-L4DYYGRX.mjs → chunk-EAO3C6JU.mjs} +1 -2
- package/dist/{chunk-L4DYYGRX.mjs.map → chunk-EAO3C6JU.mjs.map} +1 -1
- package/dist/{chunk-QBU7N4P2.mjs → chunk-THXLJFLL.mjs} +2 -2
- package/dist/formFields/index.mjs +2 -2
- package/dist/graphql/index.cjs +0 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +1 -32
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +4 -34
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +0 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +0 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-QBU7N4P2.mjs.map → chunk-THXLJFLL.mjs.map} +0 -0
package/dist/graphql/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { A as AuthPayloadType, R as RefreshTokenPayloadType, P as PartnerType, a
|
|
|
5
5
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-BDIjVrI4.mjs';
|
|
6
6
|
import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-BHwZPjT8.mjs';
|
|
7
7
|
import { S as SafeUserType, R as RedeemRewardResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-Bhkd3l06.mjs';
|
|
8
|
-
import { A as AffiliateType } from '../affiliate-
|
|
8
|
+
import { A as AffiliateType } from '../affiliate-C_2ZuhuU.mjs';
|
|
9
9
|
import '../images/index.mjs';
|
|
10
10
|
import 'react-hook-form';
|
|
11
11
|
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { A as AuthPayloadType, R as RefreshTokenPayloadType, P as PartnerType, a
|
|
|
5
5
|
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-JNcJxpTh.js';
|
|
6
6
|
import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global--iSLy2cE.js';
|
|
7
7
|
import { S as SafeUserType, R as RedeemRewardResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-C_kCo0Fm.js';
|
|
8
|
-
import { A as AffiliateType } from '../affiliate-
|
|
8
|
+
import { A as AffiliateType } from '../affiliate-DrhbUvqf.js';
|
|
9
9
|
import '../images/index.js';
|
|
10
10
|
import 'react-hook-form';
|
|
11
11
|
|
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -5130,7 +5130,6 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
|
|
|
5130
5130
|
location {
|
|
5131
5131
|
...LocationFields
|
|
5132
5132
|
}
|
|
5133
|
-
region
|
|
5134
5133
|
socialMedia {
|
|
5135
5134
|
...SocialMediaFields
|
|
5136
5135
|
}
|
|
@@ -5594,7 +5593,6 @@ var defaultVendorInfoFormValues = {
|
|
|
5594
5593
|
vendorId: ""
|
|
5595
5594
|
};
|
|
5596
5595
|
var defaultAffiliateFormValues = {
|
|
5597
|
-
_id: "",
|
|
5598
5596
|
bankAccountDetails: {
|
|
5599
5597
|
accountHolderName: "",
|
|
5600
5598
|
accountNumber: ""
|
|
@@ -5602,19 +5600,14 @@ var defaultAffiliateFormValues = {
|
|
|
5602
5600
|
contactDetails: {
|
|
5603
5601
|
mobilePhone: ""
|
|
5604
5602
|
},
|
|
5605
|
-
email: "",
|
|
5606
|
-
firstName: "",
|
|
5607
5603
|
irdNumber: "",
|
|
5608
|
-
lastName: "",
|
|
5609
5604
|
location: defaultLocation,
|
|
5610
5605
|
participantType: "",
|
|
5611
|
-
region: "",
|
|
5612
5606
|
socialMedia: null,
|
|
5613
5607
|
termsAgreement: null
|
|
5614
5608
|
};
|
|
5615
|
-
function mapAffiliateToFormData(affiliate
|
|
5609
|
+
function mapAffiliateToFormData(affiliate) {
|
|
5616
5610
|
return {
|
|
5617
|
-
_id: affiliate._id,
|
|
5618
5611
|
bankAccountDetails: affiliate.affiliateDetails?.bankAccountDetails ?? {
|
|
5619
5612
|
accountHolderName: "",
|
|
5620
5613
|
accountNumber: ""
|
|
@@ -5622,13 +5615,9 @@ function mapAffiliateToFormData(affiliate, userDefaults) {
|
|
|
5622
5615
|
contactDetails: affiliate.affiliateDetails?.contactDetails ?? {
|
|
5623
5616
|
mobilePhone: ""
|
|
5624
5617
|
},
|
|
5625
|
-
email: affiliate.affiliateDetails?.email || userDefaults?.email || "",
|
|
5626
|
-
firstName: affiliate.affiliateDetails?.firstName || userDefaults?.firstName || "",
|
|
5627
5618
|
irdNumber: affiliate.affiliateDetails?.irdNumber ?? "",
|
|
5628
|
-
lastName: affiliate.affiliateDetails?.lastName || userDefaults?.lastName || "",
|
|
5629
5619
|
location: affiliate.affiliateDetails?.location ?? defaultLocation,
|
|
5630
5620
|
participantType: affiliate.affiliateDetails?.participantType ?? "",
|
|
5631
|
-
region: (affiliate.affiliateDetails?.region ?? userDefaults?.preferredRegion) || "",
|
|
5632
5621
|
socialMedia: affiliate.affiliateDetails?.socialMedia ?? null,
|
|
5633
5622
|
termsAgreement: affiliate.affiliateDetails?.termsAgreement ?? null
|
|
5634
5623
|
};
|
|
@@ -6788,15 +6777,12 @@ var bankAccountDetailsSchema = yup12.object({
|
|
|
6788
6777
|
).trim()
|
|
6789
6778
|
});
|
|
6790
6779
|
var affiliateSchema = yup12.object().shape({
|
|
6791
|
-
_id: yup12.string().required(),
|
|
6792
6780
|
bankAccountDetails: bankAccountDetailsSchema.required(
|
|
6793
6781
|
"Bank account details are required"
|
|
6794
6782
|
),
|
|
6795
6783
|
contactDetails: affiliateContactDetailsSchema.required(
|
|
6796
6784
|
"Contact details are required"
|
|
6797
6785
|
),
|
|
6798
|
-
email: yup12.string().trim().required("Email is required"),
|
|
6799
|
-
firstName: yup12.string().trim().required("First name is required"),
|
|
6800
6786
|
irdNumber: yup12.string().trim().required("IRD number is required").matches(
|
|
6801
6787
|
nzIrdNumberRegex,
|
|
6802
6788
|
"IRD number must be in format: XXX-XXX-XX or XXX-XXX-XXX"
|
|
@@ -6805,13 +6791,11 @@ var affiliateSchema = yup12.object().shape({
|
|
|
6805
6791
|
"Enter a valid IRD number",
|
|
6806
6792
|
(value) => !!value && isValidIrdNumber(value)
|
|
6807
6793
|
),
|
|
6808
|
-
lastName: yup12.string().trim().required("Last name is required"),
|
|
6809
6794
|
location: locationSchema.required("Location is required"),
|
|
6810
6795
|
participantType: yup12.mixed().oneOf(
|
|
6811
6796
|
Object.values(EnumAffiliateParticipantType),
|
|
6812
6797
|
"Please select a valid participant type"
|
|
6813
6798
|
).required("Participant type is required"),
|
|
6814
|
-
region: yup12.string().trim().required("Region is required"),
|
|
6815
6799
|
socialMedia: yup12.array().of(socialMediaSchema).nullable().default(null)
|
|
6816
6800
|
});
|
|
6817
6801
|
|
|
@@ -6832,16 +6816,11 @@ function useAffiliateForm(data) {
|
|
|
6832
6816
|
(0, import_react6.useEffect)(() => {
|
|
6833
6817
|
if (data) {
|
|
6834
6818
|
reset({
|
|
6835
|
-
_id: data._id,
|
|
6836
6819
|
bankAccountDetails: data.bankAccountDetails,
|
|
6837
6820
|
contactDetails: data.contactDetails,
|
|
6838
|
-
email: data.email,
|
|
6839
|
-
firstName: data.firstName,
|
|
6840
6821
|
irdNumber: data.irdNumber,
|
|
6841
|
-
lastName: data.lastName,
|
|
6842
6822
|
location: data.location,
|
|
6843
6823
|
participantType: data.participantType,
|
|
6844
|
-
region: data.region,
|
|
6845
6824
|
socialMedia: data.socialMedia,
|
|
6846
6825
|
termsAgreement: data.termsAgreement
|
|
6847
6826
|
});
|
|
@@ -6850,32 +6829,22 @@ function useAffiliateForm(data) {
|
|
|
6850
6829
|
}
|
|
6851
6830
|
}, [data]);
|
|
6852
6831
|
const {
|
|
6853
|
-
_id,
|
|
6854
6832
|
bankAccountDetails,
|
|
6855
6833
|
contactDetails,
|
|
6856
|
-
email,
|
|
6857
|
-
firstName,
|
|
6858
6834
|
irdNumber,
|
|
6859
|
-
lastName,
|
|
6860
6835
|
location,
|
|
6861
6836
|
participantType,
|
|
6862
|
-
region,
|
|
6863
6837
|
socialMedia: socialMedia2,
|
|
6864
6838
|
termsAgreement
|
|
6865
6839
|
} = getValues();
|
|
6866
6840
|
return {
|
|
6867
6841
|
control,
|
|
6868
6842
|
fields: {
|
|
6869
|
-
_id,
|
|
6870
6843
|
bankAccountDetails,
|
|
6871
6844
|
contactDetails,
|
|
6872
|
-
email,
|
|
6873
|
-
firstName,
|
|
6874
6845
|
irdNumber,
|
|
6875
|
-
lastName,
|
|
6876
6846
|
location,
|
|
6877
6847
|
participantType,
|
|
6878
|
-
region,
|
|
6879
6848
|
socialMedia: socialMedia2,
|
|
6880
6849
|
termsAgreement
|
|
6881
6850
|
},
|