@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.
@@ -1,4 +1,4 @@
1
- import { u as CreateFormData, Y as TermsAgreement } from './global-VjBJNe7n.js';
1
+ import { u as CreateFormData, Y as TermsAgreement } from './global-DVDoQmBT.js';
2
2
  import { EnumOSPlatform } from './enums/index.js';
3
3
 
4
4
  type ContactUsFormData = {
@@ -1,4 +1,4 @@
1
- import { u as CreateFormData, Y as TermsAgreement } from './global-D_UhEob6.mjs';
1
+ import { u as CreateFormData, Y as TermsAgreement } from './global-BCvKcmiT.mjs';
2
2
  import { EnumOSPlatform } from './enums/index.mjs';
3
3
 
4
4
  type ContactUsFormData = {
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-D_UhEob6.mjs';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-BCvKcmiT.mjs';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-VjBJNe7n.js';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-DVDoQmBT.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -129,10 +129,10 @@ type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
129
129
  };
130
130
  type VendorProductList = {
131
131
  description?: string | null;
132
- name: string | null;
133
- price: number | null;
134
- priceUnit: string | null;
135
- productGroups: string[] | null;
132
+ name: string;
133
+ price: number;
134
+ priceUnit: string;
135
+ productGroups: string[];
136
136
  };
137
137
  interface VendorFormData extends BaseResourceTypeFormData {
138
138
  availability?: {
@@ -129,10 +129,10 @@ type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
129
129
  };
130
130
  type VendorProductList = {
131
131
  description?: string | null;
132
- name: string | null;
133
- price: number | null;
134
- priceUnit: string | null;
135
- productGroups: string[] | null;
132
+ name: string;
133
+ price: number;
134
+ priceUnit: string;
135
+ productGroups: string[];
136
136
  };
137
137
  interface VendorFormData extends BaseResourceTypeFormData {
138
138
  availability?: {
@@ -1,8 +1,8 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.mjs';
3
- import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-ByN_-57i.mjs';
4
- import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-D_UhEob6.mjs';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-mzVNdX-7.mjs';
3
+ import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-BKd6q2ey.mjs';
4
+ import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-BCvKcmiT.mjs';
5
+ import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-CvS5wUjm.mjs';
6
6
  import 'react-hook-form';
7
7
 
8
8
  declare const useAdminUpdateResourceType: () => {
@@ -1,8 +1,8 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.js';
3
- import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-DP_nnVG5.js';
4
- import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-VjBJNe7n.js';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-DjGTbKYj.js';
3
+ import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-UOB8Bo7j.js';
4
+ import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-DVDoQmBT.js';
5
+ import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-ByxIVi36.js';
6
6
  import 'react-hook-form';
7
7
 
8
8
  declare const useAdminUpdateResourceType: () => {
@@ -630,32 +630,19 @@ var eventInfoSchema = yup2.object().shape({
630
630
 
631
631
  // src/yupSchema/vendor.ts
632
632
  var yup3 = __toESM(require("yup"));
633
- var vendroMenuSchema = yup3.object().shape({
634
- description: yup3.string().trim().nullable(),
635
- name: yup3.string().trim().nullable().defined().test("name-required", "Product name is required", function(value) {
636
- return value !== null && value !== void 0 && value.trim().length > 0;
637
- }),
638
- price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).nullable().defined().test("price-required", "Product price is required", function(value) {
639
- return value !== null && value !== void 0;
640
- }),
641
- priceUnit: yup3.string().trim().nullable().defined().test("unit-required", "Product unit is required", function(value) {
642
- return value !== null && value !== void 0 && value.trim().length > 0;
643
- }),
644
- productGroups: yup3.array().of(yup3.string().defined()).transform(
645
- (value, originalValue) => originalValue === void 0 ? null : value
646
- ).nullable().test(
647
- "productGroups-required",
648
- "Product groups are required",
649
- function(value) {
650
- return value !== null && Array.isArray(value) && value.length > 0;
651
- }
652
- ).defined()
633
+ var vendorMenuSchema = yup3.object({
634
+ description: yup3.string().nullable().optional(),
635
+ name: yup3.string().nullable().required("Product name is required"),
636
+ price: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product price must be greater than 0").required("Product price is required"),
637
+ priceUnit: yup3.string().required("Product unit is required"),
638
+ productGroups: yup3.array().of(yup3.string().defined()).min(1, "Product groups are required").required("Product groups are required")
653
639
  });
654
640
  var vendorSchema = globalResourceSchema.shape({
655
641
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
656
642
  foodTruck: yup3.boolean().label("Food Truck").required("Please specify if the vendor is a food truck"),
657
643
  products: yup3.object().shape({
658
- productsList: yup3.array().of(vendroMenuSchema).nullable().optional()
644
+ active: yup3.boolean().nullable().optional(),
645
+ productsList: yup3.array().of(vendorMenuSchema).nullable().optional()
659
646
  }).nullable().optional(),
660
647
  vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
661
648
  });