@timardex/cluemart-shared 1.4.61 → 1.4.62
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-9vFYJSW2.d.ts → auth-n3P2BSCb.d.ts} +1 -1
- package/dist/{auth-GnL6pUzz.d.mts → auth-tx3-QbA9.d.mts} +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-D_UhEob6.d.mts → global-BCvKcmiT.d.mts} +4 -4
- package/dist/{global-VjBJNe7n.d.ts → global-DVDoQmBT.d.ts} +4 -4
- package/dist/graphql/index.d.mts +3 -3
- package/dist/graphql/index.d.ts +3 -3
- package/dist/hooks/index.cjs +8 -21
- 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 +8 -21
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +8 -21
- 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 +8 -21
- package/dist/index.mjs.map +1 -1
- package/dist/{post-DjGTbKYj.d.ts → post-ByxIVi36.d.ts} +1 -1
- package/dist/{post-mzVNdX-7.d.mts → post-CvS5wUjm.d.mts} +1 -1
- package/dist/{resourceActivities-ByN_-57i.d.mts → resourceActivities-BKd6q2ey.d.mts} +1 -1
- package/dist/{resourceActivities-DP_nnVG5.d.ts → resourceActivities-UOB8Bo7j.d.ts} +1 -1
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.d.ts +5 -5
- 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
|
@@ -6362,32 +6362,19 @@ var eventInfoSchema = yup2.object().shape({
|
|
|
6362
6362
|
|
|
6363
6363
|
// src/yupSchema/vendor.ts
|
|
6364
6364
|
var yup3 = __toESM(require("yup"));
|
|
6365
|
-
var
|
|
6366
|
-
description: yup3.string().
|
|
6367
|
-
name: yup3.string().
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
return value !== null && value !== void 0;
|
|
6372
|
-
}),
|
|
6373
|
-
priceUnit: yup3.string().trim().nullable().defined().test("unit-required", "Product unit is required", function(value) {
|
|
6374
|
-
return value !== null && value !== void 0 && value.trim().length > 0;
|
|
6375
|
-
}),
|
|
6376
|
-
productGroups: yup3.array().of(yup3.string().defined()).transform(
|
|
6377
|
-
(value, originalValue) => originalValue === void 0 ? null : value
|
|
6378
|
-
).nullable().test(
|
|
6379
|
-
"productGroups-required",
|
|
6380
|
-
"Product groups are required",
|
|
6381
|
-
function(value) {
|
|
6382
|
-
return value !== null && Array.isArray(value) && value.length > 0;
|
|
6383
|
-
}
|
|
6384
|
-
).defined()
|
|
6365
|
+
var vendorMenuSchema = yup3.object({
|
|
6366
|
+
description: yup3.string().nullable().optional(),
|
|
6367
|
+
name: yup3.string().nullable().required("Product name is required"),
|
|
6368
|
+
price: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product price must be greater than 0").required("Product price is required"),
|
|
6369
|
+
priceUnit: yup3.string().required("Product unit is required"),
|
|
6370
|
+
productGroups: yup3.array().of(yup3.string().defined()).min(1, "Product groups are required").required("Product groups are required")
|
|
6385
6371
|
});
|
|
6386
6372
|
var vendorSchema = globalResourceSchema.shape({
|
|
6387
6373
|
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
6388
6374
|
foodTruck: yup3.boolean().label("Food Truck").required("Please specify if the vendor is a food truck"),
|
|
6389
6375
|
products: yup3.object().shape({
|
|
6390
|
-
|
|
6376
|
+
active: yup3.boolean().nullable().optional(),
|
|
6377
|
+
productsList: yup3.array().of(vendorMenuSchema).nullable().optional()
|
|
6391
6378
|
}).nullable().optional(),
|
|
6392
6379
|
vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
|
|
6393
6380
|
});
|