@timardex/cluemart-shared 1.4.16 → 1.4.18
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/hooks/index.cjs +20 -17
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +9 -6
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +20 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +20 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/hooks/index.cjs
CHANGED
|
@@ -204,23 +204,23 @@ var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
|
204
204
|
EnumResourceType2["PARTNER"] = "partner";
|
|
205
205
|
return EnumResourceType2;
|
|
206
206
|
})(EnumResourceType || {});
|
|
207
|
-
var EnumEventType = /* @__PURE__ */ ((
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
return
|
|
207
|
+
var EnumEventType = /* @__PURE__ */ ((EnumEventType3) => {
|
|
208
|
+
EnumEventType3["MARKET"] = "Market";
|
|
209
|
+
EnumEventType3["EXPO"] = "Expo";
|
|
210
|
+
EnumEventType3["FAIR"] = "Fair";
|
|
211
|
+
EnumEventType3["FESTIVAL"] = "Festival";
|
|
212
|
+
return EnumEventType3;
|
|
213
213
|
})(EnumEventType || {});
|
|
214
214
|
var EnumVendorType = /* @__PURE__ */ ((EnumVendorType2) => {
|
|
215
215
|
EnumVendorType2["STALLHOLDER"] = "Stallholder";
|
|
216
216
|
EnumVendorType2["SHOP"] = "Shop";
|
|
217
217
|
return EnumVendorType2;
|
|
218
218
|
})(EnumVendorType || {});
|
|
219
|
-
var EnumPartnerType = /* @__PURE__ */ ((
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return
|
|
219
|
+
var EnumPartnerType = /* @__PURE__ */ ((EnumPartnerType3) => {
|
|
220
|
+
EnumPartnerType3["CHARITY_PARTNER"] = "Charity_Partner";
|
|
221
|
+
EnumPartnerType3["MEDIA_PARTNER"] = "Media_Partner";
|
|
222
|
+
EnumPartnerType3["SUPPORTING_PARTNER"] = "Supporting_Partner";
|
|
223
|
+
return EnumPartnerType3;
|
|
224
224
|
})(EnumPartnerType || {});
|
|
225
225
|
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform2) => {
|
|
226
226
|
EnumOSPlatform2["ANDROID"] = "android";
|
|
@@ -575,14 +575,17 @@ var eventSchema = globalResourceSchema.shape({
|
|
|
575
575
|
return true;
|
|
576
576
|
}
|
|
577
577
|
),
|
|
578
|
-
eventType: yup2.mixed().oneOf(Object.values(EnumEventType)).required("Please select an Event type"),
|
|
578
|
+
eventType: yup2.mixed().oneOf(Object.values(EnumEventType), "Please select a valid Event type").required("Please select an Event type"),
|
|
579
579
|
location: locationSchema,
|
|
580
580
|
nzbn: yup2.string().required("NZBN is required").matches(nzbnRegex, "NZBN must be 13 digits and start with 94"),
|
|
581
581
|
rainOrShine: yup2.boolean().label("Rain or Shine").required("Please specify if the event is rain or shine"),
|
|
582
582
|
tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
|
|
583
583
|
});
|
|
584
584
|
var paymentInfoSchema = yup2.object({
|
|
585
|
-
paymentMethod: yup2.mixed().oneOf(
|
|
585
|
+
paymentMethod: yup2.mixed().oneOf(
|
|
586
|
+
Object.values(EnumPaymentMethod),
|
|
587
|
+
"Please select a valid Payment method"
|
|
588
|
+
).required("Please select a Payment method"),
|
|
586
589
|
accountHolderName: yup2.string().when("paymentMethod", {
|
|
587
590
|
is: "bank_transfer" /* BANK_TRANSFER */,
|
|
588
591
|
then: (schema) => schema.required("Account holder name is required for bank transfer").trim(),
|
|
@@ -615,7 +618,7 @@ var eventInfoSchema = yup2.object().shape({
|
|
|
615
618
|
return value < applicationDeadlineHours;
|
|
616
619
|
}
|
|
617
620
|
),
|
|
618
|
-
paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment
|
|
621
|
+
paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required")
|
|
619
622
|
});
|
|
620
623
|
|
|
621
624
|
// src/yupSchema/vendor.ts
|
|
@@ -970,7 +973,7 @@ var yup8 = __toESM(require("yup"));
|
|
|
970
973
|
var partnerSchema = globalResourceSchema.shape({
|
|
971
974
|
location: locationSchema,
|
|
972
975
|
nzbn: yup8.string().required("NZBN is required").matches(nzbnRegex, "NZBN must be 13 digits and start with 94"),
|
|
973
|
-
partnerType: yup8.mixed().oneOf(Object.values(EnumPartnerType)).required("Please select a Partner type")
|
|
976
|
+
partnerType: yup8.mixed().oneOf(Object.values(EnumPartnerType), "Please select a valid Partner type").required("Please select a Partner type")
|
|
974
977
|
});
|
|
975
978
|
|
|
976
979
|
// src/yupSchema/post.ts
|
|
@@ -1061,13 +1064,13 @@ var defaultPartnerFormValues = {
|
|
|
1061
1064
|
...globalDefaultValues,
|
|
1062
1065
|
location: defaultLocation,
|
|
1063
1066
|
nzbn: "",
|
|
1064
|
-
partnerType: "
|
|
1067
|
+
partnerType: ""
|
|
1065
1068
|
};
|
|
1066
1069
|
var defaultEventFormValues = {
|
|
1067
1070
|
...globalDefaultValues,
|
|
1068
1071
|
claimed: true,
|
|
1069
1072
|
dateTime: [],
|
|
1070
|
-
eventType: "
|
|
1073
|
+
eventType: "",
|
|
1071
1074
|
googlePlaceId: null,
|
|
1072
1075
|
location: defaultLocation,
|
|
1073
1076
|
nzbn: "",
|