@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.d.mts
CHANGED
|
@@ -786,11 +786,11 @@ type TesterEvent = {
|
|
|
786
786
|
manageApplicationsAndCommunication: boolean;
|
|
787
787
|
completeFinalQuestionnaire: boolean;
|
|
788
788
|
/** Promotion Support */
|
|
789
|
-
allowMarketingAppearance
|
|
789
|
+
allowMarketingAppearance?: boolean;
|
|
790
790
|
/** Open Questions */
|
|
791
|
-
organizerExpectations
|
|
792
|
-
dailyCoordinationNeeds
|
|
793
|
-
interestedInCharityInitiative
|
|
791
|
+
organizerExpectations?: string;
|
|
792
|
+
dailyCoordinationNeeds?: string;
|
|
793
|
+
interestedInCharityInitiative?: boolean;
|
|
794
794
|
};
|
|
795
795
|
interface TesterFormData {
|
|
796
796
|
businessName: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -786,11 +786,11 @@ type TesterEvent = {
|
|
|
786
786
|
manageApplicationsAndCommunication: boolean;
|
|
787
787
|
completeFinalQuestionnaire: boolean;
|
|
788
788
|
/** Promotion Support */
|
|
789
|
-
allowMarketingAppearance
|
|
789
|
+
allowMarketingAppearance?: boolean;
|
|
790
790
|
/** Open Questions */
|
|
791
|
-
organizerExpectations
|
|
792
|
-
dailyCoordinationNeeds
|
|
793
|
-
interestedInCharityInitiative
|
|
791
|
+
organizerExpectations?: string;
|
|
792
|
+
dailyCoordinationNeeds?: string;
|
|
793
|
+
interestedInCharityInitiative?: boolean;
|
|
794
794
|
};
|
|
795
795
|
interface TesterFormData {
|
|
796
796
|
businessName: string;
|
package/dist/index.mjs
CHANGED
|
@@ -94,11 +94,11 @@ var EnumPartnerType = /* @__PURE__ */ ((EnumPartnerType2) => {
|
|
|
94
94
|
EnumPartnerType2["SUPPORTING_PARTNER"] = "Supporting_Partner";
|
|
95
95
|
return EnumPartnerType2;
|
|
96
96
|
})(EnumPartnerType || {});
|
|
97
|
-
var EnumOSPlatform = /* @__PURE__ */ ((
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return
|
|
97
|
+
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
|
98
|
+
EnumOSPlatform2["ANDROID"] = "android";
|
|
99
|
+
EnumOSPlatform2["IOS"] = "ios";
|
|
100
|
+
EnumOSPlatform2["WEB"] = "web";
|
|
101
|
+
return EnumOSPlatform2;
|
|
102
102
|
})(EnumOSPlatform || {});
|
|
103
103
|
var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource2) => {
|
|
104
104
|
EnumRelationResource2["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
|
|
@@ -5473,7 +5473,7 @@ var OrganizerMarketFrequency = /* @__PURE__ */ ((OrganizerMarketFrequency2) => {
|
|
|
5473
5473
|
|
|
5474
5474
|
// src/yupSchema/tester.ts
|
|
5475
5475
|
var testerVendorSchema = yup6.object().shape({
|
|
5476
|
-
categories: categorySchema,
|
|
5476
|
+
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
5477
5477
|
marketsAttended: yup6.array().of(
|
|
5478
5478
|
yup6.object().shape({
|
|
5479
5479
|
city: yup6.string().trim().required("City is required"),
|
|
@@ -5483,29 +5483,29 @@ var testerVendorSchema = yup6.object().shape({
|
|
|
5483
5483
|
productsOrServices: yup6.string().trim().required("Products or services description is required"),
|
|
5484
5484
|
questionary: yup6.object().shape({
|
|
5485
5485
|
appearInVideoIntroduction: yup6.boolean().optional(),
|
|
5486
|
-
applyToAtLeastOneMarket: yup6.boolean().required("
|
|
5487
|
-
completeFeedbackQuestionnaire: yup6.boolean().required("
|
|
5486
|
+
applyToAtLeastOneMarket: yup6.boolean().required("Required field"),
|
|
5487
|
+
completeFeedbackQuestionnaire: yup6.boolean().required("Required field"),
|
|
5488
5488
|
excitementAboutApp: yup6.string().trim().optional(),
|
|
5489
5489
|
sendPhotoForSocialMedia: yup6.boolean().optional(),
|
|
5490
5490
|
socialMediaFeatureReason: yup6.string().trim().optional(),
|
|
5491
5491
|
testingPeriodConcerns: yup6.string().trim().optional(),
|
|
5492
|
-
tryVisitorFeatures: yup6.boolean().required("
|
|
5493
|
-
uploadStallProfileFirstWeek: yup6.boolean().required("
|
|
5492
|
+
tryVisitorFeatures: yup6.boolean().required("Required field"),
|
|
5493
|
+
uploadStallProfileFirstWeek: yup6.boolean().required("Required field"),
|
|
5494
5494
|
usefulnessExpectations: yup6.string().trim().optional()
|
|
5495
5495
|
}),
|
|
5496
5496
|
sellingFrequency: yup6.mixed().oneOf(
|
|
5497
5497
|
Object.values(VendorSellingFrequency),
|
|
5498
5498
|
"Please select a valid selling frequency"
|
|
5499
|
-
).required("
|
|
5499
|
+
).required("Required field"),
|
|
5500
5500
|
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"))
|
|
5501
5501
|
});
|
|
5502
5502
|
var testerEventSchema = yup6.object().shape({
|
|
5503
|
-
allowMarketingAppearance: yup6.boolean().
|
|
5504
|
-
completeFinalQuestionnaire: yup6.boolean().required("
|
|
5505
|
-
dailyCoordinationNeeds: yup6.string().trim().
|
|
5506
|
-
interestedInCharityInitiative: yup6.boolean().
|
|
5507
|
-
inviteAtLeastFiveStallholders: yup6.boolean().required("
|
|
5508
|
-
manageApplicationsAndCommunication: yup6.boolean().required("
|
|
5503
|
+
allowMarketingAppearance: yup6.boolean().optional(),
|
|
5504
|
+
completeFinalQuestionnaire: yup6.boolean().required("Required field"),
|
|
5505
|
+
dailyCoordinationNeeds: yup6.string().trim().optional(),
|
|
5506
|
+
interestedInCharityInitiative: yup6.boolean().optional(),
|
|
5507
|
+
inviteAtLeastFiveStallholders: yup6.boolean().required("Required field"),
|
|
5508
|
+
manageApplicationsAndCommunication: yup6.boolean().required("Required field"),
|
|
5509
5509
|
markets: yup6.array().of(
|
|
5510
5510
|
yup6.object().shape({
|
|
5511
5511
|
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")),
|
|
@@ -5521,8 +5521,8 @@ var testerEventSchema = yup6.object().shape({
|
|
|
5521
5521
|
Object.values(OrganizedMarketCount),
|
|
5522
5522
|
"Please select a valid market count"
|
|
5523
5523
|
).required("Organized market count is required"),
|
|
5524
|
-
organizerExpectations: yup6.string().trim().
|
|
5525
|
-
registerMarketsFirstWeek: yup6.boolean().required("
|
|
5524
|
+
organizerExpectations: yup6.string().trim().optional(),
|
|
5525
|
+
registerMarketsFirstWeek: yup6.boolean().required("Required field")
|
|
5526
5526
|
});
|
|
5527
5527
|
var testerSchema = yup6.object().shape({
|
|
5528
5528
|
businessName: yup6.string().required("Business name is required"),
|
|
@@ -5530,7 +5530,7 @@ var testerSchema = yup6.object().shape({
|
|
|
5530
5530
|
event: yup6.object().when("resourceType", {
|
|
5531
5531
|
is: (resourceType) => resourceType === "event" /* EVENT */,
|
|
5532
5532
|
otherwise: (schema) => schema.nullable().optional(),
|
|
5533
|
-
then: () => testerEventSchema
|
|
5533
|
+
then: (schema) => schema.required("Event information is required").shape(testerEventSchema.fields)
|
|
5534
5534
|
}),
|
|
5535
5535
|
firstName: yup6.string().required("First name is required"),
|
|
5536
5536
|
lastName: yup6.string().required("Last name is required"),
|
|
@@ -5550,7 +5550,7 @@ var testerSchema = yup6.object().shape({
|
|
|
5550
5550
|
vendor: yup6.object().when("resourceType", {
|
|
5551
5551
|
is: (resourceType) => resourceType === "vendor" /* VENDOR */,
|
|
5552
5552
|
otherwise: (schema) => schema.nullable().optional(),
|
|
5553
|
-
then: () => testerVendorSchema
|
|
5553
|
+
then: (schema) => schema.required("Vendor information is required").shape(testerVendorSchema.fields)
|
|
5554
5554
|
})
|
|
5555
5555
|
});
|
|
5556
5556
|
|
|
@@ -6347,7 +6347,7 @@ import { useForm as useForm11 } from "react-hook-form";
|
|
|
6347
6347
|
var defaultValues7 = {
|
|
6348
6348
|
businessName: "",
|
|
6349
6349
|
email: "",
|
|
6350
|
-
event:
|
|
6350
|
+
event: {},
|
|
6351
6351
|
firstName: "",
|
|
6352
6352
|
lastName: "",
|
|
6353
6353
|
mobilePhone: "",
|
|
@@ -6355,7 +6355,7 @@ var defaultValues7 = {
|
|
|
6355
6355
|
privacyConsent: false,
|
|
6356
6356
|
region: "",
|
|
6357
6357
|
resourceType: "",
|
|
6358
|
-
vendor:
|
|
6358
|
+
vendor: {}
|
|
6359
6359
|
};
|
|
6360
6360
|
function useTesterForm(data) {
|
|
6361
6361
|
const {
|
|
@@ -6365,13 +6365,10 @@ function useTesterForm(data) {
|
|
|
6365
6365
|
handleSubmit,
|
|
6366
6366
|
reset,
|
|
6367
6367
|
setValue,
|
|
6368
|
-
trigger,
|
|
6369
6368
|
watch
|
|
6370
6369
|
} = useForm11({
|
|
6371
6370
|
defaultValues: defaultValues7,
|
|
6372
|
-
|
|
6373
|
-
resolver: yupResolver11(testerSchema),
|
|
6374
|
-
reValidateMode: "onChange"
|
|
6371
|
+
resolver: yupResolver11(testerSchema)
|
|
6375
6372
|
});
|
|
6376
6373
|
React6.useEffect(() => {
|
|
6377
6374
|
if (data) {
|
|
@@ -6391,80 +6388,34 @@ function useTesterForm(data) {
|
|
|
6391
6388
|
} else {
|
|
6392
6389
|
reset(defaultValues7);
|
|
6393
6390
|
}
|
|
6394
|
-
}, [data
|
|
6395
|
-
const resourceType = watch("resourceType");
|
|
6396
|
-
const vendor = watch("vendor");
|
|
6397
|
-
const event = watch("event");
|
|
6398
|
-
React6.useEffect(() => {
|
|
6399
|
-
if (resourceType === "vendor" /* VENDOR */ && vendor === null) {
|
|
6400
|
-
const emptyVendor = {
|
|
6401
|
-
categories: [],
|
|
6402
|
-
marketsAttended: [],
|
|
6403
|
-
productsOrServices: "",
|
|
6404
|
-
questionary: {
|
|
6405
|
-
applyToAtLeastOneMarket: false,
|
|
6406
|
-
completeFeedbackQuestionnaire: false,
|
|
6407
|
-
tryVisitorFeatures: false,
|
|
6408
|
-
uploadStallProfileFirstWeek: false
|
|
6409
|
-
}
|
|
6410
|
-
};
|
|
6411
|
-
setValue("vendor", emptyVendor, { shouldValidate: true });
|
|
6412
|
-
} else if (resourceType === "event" /* EVENT */ && vendor !== null) {
|
|
6413
|
-
setValue("vendor", null, { shouldValidate: true });
|
|
6414
|
-
}
|
|
6415
|
-
}, [resourceType, vendor, setValue]);
|
|
6416
|
-
React6.useEffect(() => {
|
|
6417
|
-
if (resourceType === "event" /* EVENT */ && event === null) {
|
|
6418
|
-
const emptyEvent = {
|
|
6419
|
-
allowMarketingAppearance: false,
|
|
6420
|
-
completeFinalQuestionnaire: false,
|
|
6421
|
-
dailyCoordinationNeeds: "",
|
|
6422
|
-
interestedInCharityInitiative: false,
|
|
6423
|
-
inviteAtLeastFiveStallholders: false,
|
|
6424
|
-
manageApplicationsAndCommunication: false,
|
|
6425
|
-
markets: [],
|
|
6426
|
-
organizerExpectations: "",
|
|
6427
|
-
registerMarketsFirstWeek: false
|
|
6428
|
-
};
|
|
6429
|
-
setValue("event", emptyEvent, { shouldValidate: true });
|
|
6430
|
-
} else if (resourceType === "vendor" /* VENDOR */ && event !== null) {
|
|
6431
|
-
setValue("event", null, { shouldValidate: true });
|
|
6432
|
-
}
|
|
6433
|
-
}, [resourceType, event, setValue]);
|
|
6434
|
-
React6.useEffect(() => {
|
|
6435
|
-
if (resourceType === "vendor" /* VENDOR */ && vendor !== null) {
|
|
6436
|
-
trigger("vendor");
|
|
6437
|
-
}
|
|
6438
|
-
}, [resourceType, vendor, trigger]);
|
|
6439
|
-
React6.useEffect(() => {
|
|
6440
|
-
if (resourceType === "event" /* EVENT */ && event !== null) {
|
|
6441
|
-
trigger("event");
|
|
6442
|
-
}
|
|
6443
|
-
}, [resourceType, event, trigger]);
|
|
6391
|
+
}, [data]);
|
|
6444
6392
|
const {
|
|
6445
6393
|
businessName,
|
|
6446
6394
|
email,
|
|
6395
|
+
event,
|
|
6447
6396
|
firstName,
|
|
6448
6397
|
lastName,
|
|
6449
6398
|
mobilePhone,
|
|
6450
6399
|
osType,
|
|
6451
6400
|
privacyConsent,
|
|
6452
|
-
region
|
|
6401
|
+
region,
|
|
6402
|
+
resourceType,
|
|
6403
|
+
vendor
|
|
6453
6404
|
} = getValues();
|
|
6454
6405
|
return {
|
|
6455
6406
|
control,
|
|
6456
6407
|
fields: {
|
|
6457
6408
|
businessName,
|
|
6458
6409
|
email,
|
|
6459
|
-
event
|
|
6410
|
+
event,
|
|
6460
6411
|
firstName,
|
|
6461
6412
|
lastName,
|
|
6462
6413
|
mobilePhone,
|
|
6463
6414
|
osType,
|
|
6464
6415
|
privacyConsent,
|
|
6465
6416
|
region,
|
|
6466
|
-
resourceType
|
|
6467
|
-
vendor
|
|
6417
|
+
resourceType,
|
|
6418
|
+
vendor
|
|
6468
6419
|
},
|
|
6469
6420
|
formState: { errors },
|
|
6470
6421
|
handleSubmit,
|