@timardex/cluemart-shared 1.3.88 → 1.3.90
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/{auth-amggb31t.d.ts → auth-C3okKWie.d.ts} +1 -1
- package/dist/{auth-CCPmK2Z6.d.mts → auth-ytWSH2a_.d.mts} +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-CnAaM_PF.d.ts → global-CATVSBHP.d.ts} +5 -5
- package/dist/{global-Dv9q0tt9.d.mts → global-vtWGHz0A.d.mts} +5 -5
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/hooks/index.cjs +23 -4
- 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 +23 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +23 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +23 -4
- package/dist/index.mjs.map +1 -1
- package/dist/{post-ZCrdgakX.d.ts → post-DxTq9285.d.ts} +1 -1
- package/dist/{post-B7e2qDFb.d.mts → post-KKjsD8r6.d.mts} +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6242,15 +6242,34 @@ var eventInfoSchema = yup2.object().shape({
|
|
|
6242
6242
|
// src/yupSchema/vendor.ts
|
|
6243
6243
|
var yup3 = __toESM(require("yup"));
|
|
6244
6244
|
var vendroMenuSchema = yup3.object().shape({
|
|
6245
|
-
description: yup3.string().trim().
|
|
6246
|
-
|
|
6247
|
-
|
|
6245
|
+
description: yup3.string().trim().nullable().defined().test(
|
|
6246
|
+
"description-required",
|
|
6247
|
+
"Product description is required",
|
|
6248
|
+
function(value) {
|
|
6249
|
+
return value !== null && value !== void 0 && value.trim().length > 0;
|
|
6250
|
+
}
|
|
6251
|
+
),
|
|
6252
|
+
name: yup3.string().trim().nullable().defined().test("name-required", "Product name is required", function(value) {
|
|
6253
|
+
return value !== null && value !== void 0 && value.trim().length > 0;
|
|
6254
|
+
}),
|
|
6255
|
+
price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).nullable().defined().test("price-required", "Product price is required", function(value) {
|
|
6256
|
+
return value !== null && value !== void 0;
|
|
6257
|
+
}),
|
|
6258
|
+
productGroups: yup3.array().of(yup3.string().defined()).transform(
|
|
6259
|
+
(value, originalValue) => originalValue === void 0 ? null : value
|
|
6260
|
+
).nullable().test(
|
|
6261
|
+
"productGroups-required",
|
|
6262
|
+
"Product groups are required",
|
|
6263
|
+
function(value) {
|
|
6264
|
+
return value !== null && Array.isArray(value) && value.length > 0;
|
|
6265
|
+
}
|
|
6266
|
+
).defined()
|
|
6248
6267
|
});
|
|
6249
6268
|
var vendorSchema = globalResourceSchema.shape({
|
|
6250
6269
|
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
6251
6270
|
foodTruck: yup3.boolean().label("Food Truck").required("Please specify if the vendor is a food truck"),
|
|
6252
6271
|
multiLocation: yup3.boolean().required("Multi location is required"),
|
|
6253
|
-
products: yup3.array().of(vendroMenuSchema).nullable().
|
|
6272
|
+
products: yup3.array().of(vendroMenuSchema).nullable().optional(),
|
|
6254
6273
|
vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
|
|
6255
6274
|
});
|
|
6256
6275
|
var unregisteredVendorSchema = yup3.object().shape({
|