@timardex/cluemart-shared 1.3.87 → 1.3.89

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 { H as CreateFormData, T as TermsAgreement } from './global-CnAaM_PF.js';
1
+ import { H as CreateFormData, T as TermsAgreement } from './global-CATVSBHP.js';
2
2
  import { EnumOSPlatform } from './enums/index.js';
3
3
 
4
4
  type ContactUsFormData = {
@@ -9,6 +9,11 @@ type ContactUsFormData = {
9
9
  };
10
10
  type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
11
11
 
12
+ declare enum EnumVerificationType {
13
+ REGISTER = "register",
14
+ RESET_PASSWORD = "resetPassword",
15
+ TESTER_VALIDATION = "testerValidation"
16
+ }
12
17
  type LoginFormData = {
13
18
  email: string;
14
19
  isAdminPage?: boolean;
@@ -39,7 +44,8 @@ type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
39
44
  type ValidateVerificationTokenFormData = {
40
45
  email: string;
41
46
  verificationToken: string;
47
+ verificationType?: EnumVerificationType;
42
48
  };
43
49
  type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
44
50
 
45
- export type { CreateLoginFormData as C, LoginFormData as L, RegisterFormData as R, ValidateVerificationTokenFormData as V, CreateRegisterFormData as a, CreateRequestPasswordResetFormData as b, CreateValidateVerificationTokenFormData as c, CreateResetPasswordFormData as d, ContactUsFormData as e, CreateContactUsFormData as f, RequestPasswordResetFormData as g, ResetPasswordFormData as h };
51
+ export { type CreateLoginFormData as C, EnumVerificationType as E, type LoginFormData as L, type RegisterFormData as R, type ValidateVerificationTokenFormData as V, type CreateRegisterFormData as a, type CreateRequestPasswordResetFormData as b, type CreateValidateVerificationTokenFormData as c, type CreateResetPasswordFormData as d, type ContactUsFormData as e, type CreateContactUsFormData as f, type RequestPasswordResetFormData as g, type ResetPasswordFormData as h };
@@ -1,4 +1,4 @@
1
- import { H as CreateFormData, T as TermsAgreement } from './global-Dv9q0tt9.mjs';
1
+ import { H as CreateFormData, T as TermsAgreement } from './global-vtWGHz0A.mjs';
2
2
  import { EnumOSPlatform } from './enums/index.mjs';
3
3
 
4
4
  type ContactUsFormData = {
@@ -9,6 +9,11 @@ type ContactUsFormData = {
9
9
  };
10
10
  type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
11
11
 
12
+ declare enum EnumVerificationType {
13
+ REGISTER = "register",
14
+ RESET_PASSWORD = "resetPassword",
15
+ TESTER_VALIDATION = "testerValidation"
16
+ }
12
17
  type LoginFormData = {
13
18
  email: string;
14
19
  isAdminPage?: boolean;
@@ -39,7 +44,8 @@ type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
39
44
  type ValidateVerificationTokenFormData = {
40
45
  email: string;
41
46
  verificationToken: string;
47
+ verificationType?: EnumVerificationType;
42
48
  };
43
49
  type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
44
50
 
45
- export type { CreateLoginFormData as C, LoginFormData as L, RegisterFormData as R, ValidateVerificationTokenFormData as V, CreateRegisterFormData as a, CreateRequestPasswordResetFormData as b, CreateValidateVerificationTokenFormData as c, CreateResetPasswordFormData as d, ContactUsFormData as e, CreateContactUsFormData as f, RequestPasswordResetFormData as g, ResetPasswordFormData as h };
51
+ export { type CreateLoginFormData as C, EnumVerificationType as E, type LoginFormData as L, type RegisterFormData as R, type ValidateVerificationTokenFormData as V, type CreateRegisterFormData as a, type CreateRequestPasswordResetFormData as b, type CreateValidateVerificationTokenFormData as c, type CreateResetPasswordFormData as d, type ContactUsFormData as e, type CreateContactUsFormData as f, type RequestPasswordResetFormData as g, type ResetPasswordFormData as h };
@@ -1,4 +1,4 @@
1
- import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-Dv9q0tt9.mjs';
1
+ import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-vtWGHz0A.mjs';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-CnAaM_PF.js';
1
+ import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-CATVSBHP.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -124,10 +124,10 @@ type VendorLocation = Pick<MapMultiLocation, "resourceId" | "resourceName" | "re
124
124
  location: Nullable<LocationType> | null;
125
125
  };
126
126
  type VendorMenuType = {
127
- description?: string | null;
128
- name?: string | null;
129
- price?: number | null;
130
- productGroups?: string[] | null;
127
+ description: string | null;
128
+ name: string | null;
129
+ price: number | null;
130
+ productGroups: string[] | null;
131
131
  };
132
132
  interface VendorFormData extends BaseResourceTypeFormData {
133
133
  availability?: {
@@ -139,7 +139,7 @@ interface VendorFormData extends BaseResourceTypeFormData {
139
139
  foodTruck: boolean;
140
140
  locations?: VendorLocation[] | null;
141
141
  multiLocation: boolean;
142
- products: VendorMenuType[] | null;
142
+ products?: VendorMenuType[] | null;
143
143
  vendorType: EnumVendorType;
144
144
  }
145
145
  type CreateVendorFormData = CreateFormData<VendorFormData>;
@@ -124,10 +124,10 @@ type VendorLocation = Pick<MapMultiLocation, "resourceId" | "resourceName" | "re
124
124
  location: Nullable<LocationType> | null;
125
125
  };
126
126
  type VendorMenuType = {
127
- description?: string | null;
128
- name?: string | null;
129
- price?: number | null;
130
- productGroups?: string[] | null;
127
+ description: string | null;
128
+ name: string | null;
129
+ price: number | null;
130
+ productGroups: string[] | null;
131
131
  };
132
132
  interface VendorFormData extends BaseResourceTypeFormData {
133
133
  availability?: {
@@ -139,7 +139,7 @@ interface VendorFormData extends BaseResourceTypeFormData {
139
139
  foodTruck: boolean;
140
140
  locations?: VendorLocation[] | null;
141
141
  multiLocation: boolean;
142
- products: VendorMenuType[] | null;
142
+ products?: VendorMenuType[] | null;
143
143
  vendorType: EnumVendorType;
144
144
  }
145
145
  type CreateVendorFormData = CreateFormData<VendorFormData>;
@@ -1,8 +1,8 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.mjs';
3
3
  import { C as ChatType, N as NotificationType, a as NotificationCount, R as ResourceActivityType } from '../resourceActivities-CJRTZROh.mjs';
4
- import { E as EventListItemType, b as EventType, c as EventInfoType, d as RelationType, e as ResourceConnectionsType, V as VendorType, f as VendorInfoType, U as UnregisteredVendorType, g as UserLicenceType } from '../global-Dv9q0tt9.mjs';
5
- import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, a as SubscriptionPlansResponse, P as PartnerType, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-B7e2qDFb.mjs';
4
+ import { E as EventListItemType, b as EventType, c as EventInfoType, d as RelationType, e as ResourceConnectionsType, V as VendorType, f as VendorInfoType, U as UnregisteredVendorType, g as UserLicenceType } from '../global-vtWGHz0A.mjs';
5
+ import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, a as SubscriptionPlansResponse, P as PartnerType, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-KKjsD8r6.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
3
  import { C as ChatType, N as NotificationType, a as NotificationCount, R as ResourceActivityType } from '../resourceActivities-CVwxvGeC.js';
4
- import { E as EventListItemType, b as EventType, c as EventInfoType, d as RelationType, e as ResourceConnectionsType, V as VendorType, f as VendorInfoType, U as UnregisteredVendorType, g as UserLicenceType } from '../global-CnAaM_PF.js';
5
- import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, a as SubscriptionPlansResponse, P as PartnerType, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-ZCrdgakX.js';
4
+ import { E as EventListItemType, b as EventType, c as EventInfoType, d as RelationType, e as ResourceConnectionsType, V as VendorType, f as VendorInfoType, U as UnregisteredVendorType, g as UserLicenceType } from '../global-CATVSBHP.js';
5
+ import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, a as SubscriptionPlansResponse, P as PartnerType, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-DxTq9285.js';
6
6
  import 'react-hook-form';
7
7
 
8
8
  declare const useAdminUpdateResourceType: () => {
@@ -616,15 +616,32 @@ var eventInfoSchema = yup2.object().shape({
616
616
  // src/yupSchema/vendor.ts
617
617
  var yup3 = __toESM(require("yup"));
618
618
  var vendroMenuSchema = yup3.object().shape({
619
- description: yup3.string().trim().optional().nullable(),
620
- price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).optional().nullable(),
621
- title: yup3.string().trim().optional().nullable()
619
+ description: yup3.string().trim().nullable().defined().test(
620
+ "description-required",
621
+ "Product description is required",
622
+ function(value) {
623
+ return value !== null && value !== void 0 && value.trim().length > 0;
624
+ }
625
+ ),
626
+ name: yup3.string().trim().nullable().defined().test("name-required", "Product name is required", function(value) {
627
+ return value !== null && value !== void 0 && value.trim().length > 0;
628
+ }),
629
+ price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).nullable().defined().test("price-required", "Product price is required", function(value) {
630
+ return value !== null && value !== void 0;
631
+ }),
632
+ productGroups: yup3.array().of(yup3.string().defined()).nullable().defined().test(
633
+ "productGroups-required",
634
+ "Product groups are required",
635
+ function(value) {
636
+ return value !== null && value !== void 0 && Array.isArray(value) && value.length > 0;
637
+ }
638
+ )
622
639
  });
623
640
  var vendorSchema = globalResourceSchema.shape({
624
641
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
625
642
  foodTruck: yup3.boolean().label("Food Truck").required("Please specify if the vendor is a food truck"),
626
643
  multiLocation: yup3.boolean().required("Multi location is required"),
627
- products: yup3.array().of(vendroMenuSchema).nullable().default(null),
644
+ products: yup3.array().of(vendroMenuSchema).nullable().optional(),
628
645
  vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
629
646
  });
630
647
  var unregisteredVendorSchema = yup3.object().shape({