@timardex/cluemart-shared 1.2.89 → 1.2.91
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-ClzcYPuT.d.mts → ad-B89WhTMq.d.mts} +4 -4
- package/dist/{ad-CIaDLRVX.d.ts → ad-Dc3Cdtpm.d.ts} +4 -4
- package/dist/{chunk-66MS2SVX.mjs → chunk-VK2BLRBY.mjs} +1 -1
- package/dist/chunk-VK2BLRBY.mjs.map +1 -0
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/hooks/index.cjs +32 -81
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +28 -77
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +32 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +32 -81
- 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/package.json +1 -1
- package/dist/chunk-66MS2SVX.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -345,11 +345,11 @@ var EnumPartnerType = /* @__PURE__ */ ((EnumPartnerType2) => {
|
|
|
345
345
|
EnumPartnerType2["SUPPORTING_PARTNER"] = "Supporting_Partner";
|
|
346
346
|
return EnumPartnerType2;
|
|
347
347
|
})(EnumPartnerType || {});
|
|
348
|
-
var EnumOSPlatform = /* @__PURE__ */ ((
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return
|
|
348
|
+
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
|
349
|
+
EnumOSPlatform2["ANDROID"] = "android";
|
|
350
|
+
EnumOSPlatform2["IOS"] = "ios";
|
|
351
|
+
EnumOSPlatform2["WEB"] = "web";
|
|
352
|
+
return EnumOSPlatform2;
|
|
353
353
|
})(EnumOSPlatform || {});
|
|
354
354
|
var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource2) => {
|
|
355
355
|
EnumRelationResource2["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
|
|
@@ -5724,7 +5724,7 @@ var OrganizerMarketFrequency = /* @__PURE__ */ ((OrganizerMarketFrequency2) => {
|
|
|
5724
5724
|
|
|
5725
5725
|
// src/yupSchema/tester.ts
|
|
5726
5726
|
var testerVendorSchema = yup6.object().shape({
|
|
5727
|
-
categories: categorySchema,
|
|
5727
|
+
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
5728
5728
|
marketsAttended: yup6.array().of(
|
|
5729
5729
|
yup6.object().shape({
|
|
5730
5730
|
city: yup6.string().trim().required("City is required"),
|
|
@@ -5734,29 +5734,29 @@ var testerVendorSchema = yup6.object().shape({
|
|
|
5734
5734
|
productsOrServices: yup6.string().trim().required("Products or services description is required"),
|
|
5735
5735
|
questionary: yup6.object().shape({
|
|
5736
5736
|
appearInVideoIntroduction: yup6.boolean().optional(),
|
|
5737
|
-
applyToAtLeastOneMarket: yup6.boolean().required("
|
|
5738
|
-
completeFeedbackQuestionnaire: yup6.boolean().required("
|
|
5737
|
+
applyToAtLeastOneMarket: yup6.boolean().required("Required field"),
|
|
5738
|
+
completeFeedbackQuestionnaire: yup6.boolean().required("Required field"),
|
|
5739
5739
|
excitementAboutApp: yup6.string().trim().optional(),
|
|
5740
5740
|
sendPhotoForSocialMedia: yup6.boolean().optional(),
|
|
5741
5741
|
socialMediaFeatureReason: yup6.string().trim().optional(),
|
|
5742
5742
|
testingPeriodConcerns: yup6.string().trim().optional(),
|
|
5743
|
-
tryVisitorFeatures: yup6.boolean().required("
|
|
5744
|
-
uploadStallProfileFirstWeek: yup6.boolean().required("
|
|
5743
|
+
tryVisitorFeatures: yup6.boolean().required("Required field"),
|
|
5744
|
+
uploadStallProfileFirstWeek: yup6.boolean().required("Required field"),
|
|
5745
5745
|
usefulnessExpectations: yup6.string().trim().optional()
|
|
5746
5746
|
}),
|
|
5747
5747
|
sellingFrequency: yup6.mixed().oneOf(
|
|
5748
5748
|
Object.values(VendorSellingFrequency),
|
|
5749
5749
|
"Please select a valid selling frequency"
|
|
5750
|
-
).required("
|
|
5750
|
+
).required("Required field"),
|
|
5751
5751
|
yearlySellingApprox: yup6.number().label("Yearly Selling Approx").min(0, "Yearly selling approximate must be at least 0").integer("Yearly selling approximate must be a whole number").required("Yearly selling approximate is required").test("no-leading-zeros", "", noLeadingZeros("Yearly selling approximate"))
|
|
5752
5752
|
});
|
|
5753
5753
|
var testerEventSchema = yup6.object().shape({
|
|
5754
|
-
allowMarketingAppearance: yup6.boolean().
|
|
5755
|
-
completeFinalQuestionnaire: yup6.boolean().required("
|
|
5756
|
-
dailyCoordinationNeeds: yup6.string().trim().
|
|
5757
|
-
interestedInCharityInitiative: yup6.boolean().
|
|
5758
|
-
inviteAtLeastFiveStallholders: yup6.boolean().required("
|
|
5759
|
-
manageApplicationsAndCommunication: yup6.boolean().required("
|
|
5754
|
+
allowMarketingAppearance: yup6.boolean().optional(),
|
|
5755
|
+
completeFinalQuestionnaire: yup6.boolean().required("Required field"),
|
|
5756
|
+
dailyCoordinationNeeds: yup6.string().trim().optional(),
|
|
5757
|
+
interestedInCharityInitiative: yup6.boolean().optional(),
|
|
5758
|
+
inviteAtLeastFiveStallholders: yup6.boolean().required("Required field"),
|
|
5759
|
+
manageApplicationsAndCommunication: yup6.boolean().required("Required field"),
|
|
5760
5760
|
markets: yup6.array().of(
|
|
5761
5761
|
yup6.object().shape({
|
|
5762
5762
|
averageStallCount: yup6.number().label("Average Stall Count").min(1, "Average stall count must be at least 1").integer("Average stall count must be a whole number").required("Average stall count is required").test("no-leading-zeros", "", noLeadingZeros("Average stall count")),
|
|
@@ -5772,8 +5772,8 @@ var testerEventSchema = yup6.object().shape({
|
|
|
5772
5772
|
Object.values(OrganizedMarketCount),
|
|
5773
5773
|
"Please select a valid market count"
|
|
5774
5774
|
).required("Organized market count is required"),
|
|
5775
|
-
organizerExpectations: yup6.string().trim().
|
|
5776
|
-
registerMarketsFirstWeek: yup6.boolean().required("
|
|
5775
|
+
organizerExpectations: yup6.string().trim().optional(),
|
|
5776
|
+
registerMarketsFirstWeek: yup6.boolean().required("Required field")
|
|
5777
5777
|
});
|
|
5778
5778
|
var testerSchema = yup6.object().shape({
|
|
5779
5779
|
businessName: yup6.string().required("Business name is required"),
|
|
@@ -5781,7 +5781,7 @@ var testerSchema = yup6.object().shape({
|
|
|
5781
5781
|
event: yup6.object().when("resourceType", {
|
|
5782
5782
|
is: (resourceType) => resourceType === "event" /* EVENT */,
|
|
5783
5783
|
otherwise: (schema) => schema.nullable().optional(),
|
|
5784
|
-
then: () => testerEventSchema
|
|
5784
|
+
then: (schema) => schema.required("Event information is required").shape(testerEventSchema.fields)
|
|
5785
5785
|
}),
|
|
5786
5786
|
firstName: yup6.string().required("First name is required"),
|
|
5787
5787
|
lastName: yup6.string().required("Last name is required"),
|
|
@@ -5801,7 +5801,7 @@ var testerSchema = yup6.object().shape({
|
|
|
5801
5801
|
vendor: yup6.object().when("resourceType", {
|
|
5802
5802
|
is: (resourceType) => resourceType === "vendor" /* VENDOR */,
|
|
5803
5803
|
otherwise: (schema) => schema.nullable().optional(),
|
|
5804
|
-
then: () => testerVendorSchema
|
|
5804
|
+
then: (schema) => schema.required("Vendor information is required").shape(testerVendorSchema.fields)
|
|
5805
5805
|
})
|
|
5806
5806
|
});
|
|
5807
5807
|
|
|
@@ -6598,7 +6598,7 @@ var import_react_hook_form11 = require("react-hook-form");
|
|
|
6598
6598
|
var defaultValues7 = {
|
|
6599
6599
|
businessName: "",
|
|
6600
6600
|
email: "",
|
|
6601
|
-
event:
|
|
6601
|
+
event: {},
|
|
6602
6602
|
firstName: "",
|
|
6603
6603
|
lastName: "",
|
|
6604
6604
|
mobilePhone: "",
|
|
@@ -6606,7 +6606,7 @@ var defaultValues7 = {
|
|
|
6606
6606
|
privacyConsent: false,
|
|
6607
6607
|
region: "",
|
|
6608
6608
|
resourceType: "",
|
|
6609
|
-
vendor:
|
|
6609
|
+
vendor: {}
|
|
6610
6610
|
};
|
|
6611
6611
|
function useTesterForm(data) {
|
|
6612
6612
|
const {
|
|
@@ -6616,13 +6616,10 @@ function useTesterForm(data) {
|
|
|
6616
6616
|
handleSubmit,
|
|
6617
6617
|
reset,
|
|
6618
6618
|
setValue,
|
|
6619
|
-
trigger,
|
|
6620
6619
|
watch
|
|
6621
6620
|
} = (0, import_react_hook_form11.useForm)({
|
|
6622
6621
|
defaultValues: defaultValues7,
|
|
6623
|
-
|
|
6624
|
-
resolver: (0, import_yup11.yupResolver)(testerSchema),
|
|
6625
|
-
reValidateMode: "onChange"
|
|
6622
|
+
resolver: (0, import_yup11.yupResolver)(testerSchema)
|
|
6626
6623
|
});
|
|
6627
6624
|
import_react.default.useEffect(() => {
|
|
6628
6625
|
if (data) {
|
|
@@ -6642,80 +6639,34 @@ function useTesterForm(data) {
|
|
|
6642
6639
|
} else {
|
|
6643
6640
|
reset(defaultValues7);
|
|
6644
6641
|
}
|
|
6645
|
-
}, [data
|
|
6646
|
-
const resourceType = watch("resourceType");
|
|
6647
|
-
const vendor = watch("vendor");
|
|
6648
|
-
const event = watch("event");
|
|
6649
|
-
import_react.default.useEffect(() => {
|
|
6650
|
-
if (resourceType === "vendor" /* VENDOR */ && vendor === null) {
|
|
6651
|
-
const emptyVendor = {
|
|
6652
|
-
categories: [],
|
|
6653
|
-
marketsAttended: [],
|
|
6654
|
-
productsOrServices: "",
|
|
6655
|
-
questionary: {
|
|
6656
|
-
applyToAtLeastOneMarket: false,
|
|
6657
|
-
completeFeedbackQuestionnaire: false,
|
|
6658
|
-
tryVisitorFeatures: false,
|
|
6659
|
-
uploadStallProfileFirstWeek: false
|
|
6660
|
-
}
|
|
6661
|
-
};
|
|
6662
|
-
setValue("vendor", emptyVendor, { shouldValidate: true });
|
|
6663
|
-
} else if (resourceType === "event" /* EVENT */ && vendor !== null) {
|
|
6664
|
-
setValue("vendor", null, { shouldValidate: true });
|
|
6665
|
-
}
|
|
6666
|
-
}, [resourceType, vendor, setValue]);
|
|
6667
|
-
import_react.default.useEffect(() => {
|
|
6668
|
-
if (resourceType === "event" /* EVENT */ && event === null) {
|
|
6669
|
-
const emptyEvent = {
|
|
6670
|
-
allowMarketingAppearance: false,
|
|
6671
|
-
completeFinalQuestionnaire: false,
|
|
6672
|
-
dailyCoordinationNeeds: "",
|
|
6673
|
-
interestedInCharityInitiative: false,
|
|
6674
|
-
inviteAtLeastFiveStallholders: false,
|
|
6675
|
-
manageApplicationsAndCommunication: false,
|
|
6676
|
-
markets: [],
|
|
6677
|
-
organizerExpectations: "",
|
|
6678
|
-
registerMarketsFirstWeek: false
|
|
6679
|
-
};
|
|
6680
|
-
setValue("event", emptyEvent, { shouldValidate: true });
|
|
6681
|
-
} else if (resourceType === "vendor" /* VENDOR */ && event !== null) {
|
|
6682
|
-
setValue("event", null, { shouldValidate: true });
|
|
6683
|
-
}
|
|
6684
|
-
}, [resourceType, event, setValue]);
|
|
6685
|
-
import_react.default.useEffect(() => {
|
|
6686
|
-
if (resourceType === "vendor" /* VENDOR */ && vendor !== null) {
|
|
6687
|
-
trigger("vendor");
|
|
6688
|
-
}
|
|
6689
|
-
}, [resourceType, vendor, trigger]);
|
|
6690
|
-
import_react.default.useEffect(() => {
|
|
6691
|
-
if (resourceType === "event" /* EVENT */ && event !== null) {
|
|
6692
|
-
trigger("event");
|
|
6693
|
-
}
|
|
6694
|
-
}, [resourceType, event, trigger]);
|
|
6642
|
+
}, [data]);
|
|
6695
6643
|
const {
|
|
6696
6644
|
businessName,
|
|
6697
6645
|
email,
|
|
6646
|
+
event,
|
|
6698
6647
|
firstName,
|
|
6699
6648
|
lastName,
|
|
6700
6649
|
mobilePhone,
|
|
6701
6650
|
osType,
|
|
6702
6651
|
privacyConsent,
|
|
6703
|
-
region
|
|
6652
|
+
region,
|
|
6653
|
+
resourceType,
|
|
6654
|
+
vendor
|
|
6704
6655
|
} = getValues();
|
|
6705
6656
|
return {
|
|
6706
6657
|
control,
|
|
6707
6658
|
fields: {
|
|
6708
6659
|
businessName,
|
|
6709
6660
|
email,
|
|
6710
|
-
event
|
|
6661
|
+
event,
|
|
6711
6662
|
firstName,
|
|
6712
6663
|
lastName,
|
|
6713
6664
|
mobilePhone,
|
|
6714
6665
|
osType,
|
|
6715
6666
|
privacyConsent,
|
|
6716
6667
|
region,
|
|
6717
|
-
resourceType
|
|
6718
|
-
vendor
|
|
6668
|
+
resourceType,
|
|
6669
|
+
vendor
|
|
6719
6670
|
},
|
|
6720
6671
|
formState: { errors },
|
|
6721
6672
|
handleSubmit,
|