@timardex/cluemart-shared 1.1.46 → 1.1.47

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,5 +1,5 @@
1
1
  import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
2
- import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-BjomA4mq.mjs';
2
+ import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-CCUhQFgH.mjs';
3
3
 
4
4
  interface TestersFormData {
5
5
  categories: Category[] | null;
@@ -1,5 +1,5 @@
1
1
  import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
2
- import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-D_LR6aTg.js';
2
+ import { C as Category, w as CreateFormData, o as ResourceImageType, p as SocialMediaType } from './global-C54rKsX4.js';
3
3
 
4
4
  interface TestersFormData {
5
5
  categories: Category[] | null;
@@ -1,4 +1,4 @@
1
- import { w as CreateFormData } from './global-BjomA4mq.mjs';
1
+ import { w as CreateFormData } from './global-CCUhQFgH.mjs';
2
2
  import { EnumOSPlatform } from './enums/index.mjs';
3
3
 
4
4
  type ContactUsFormData = {
@@ -1,4 +1,4 @@
1
- import { w as CreateFormData } from './global-D_LR6aTg.js';
1
+ import { w as CreateFormData } from './global-C54rKsX4.js';
2
2
  import { EnumOSPlatform } from './enums/index.js';
3
3
 
4
4
  type ContactUsFormData = {
@@ -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-BjomA4mq.mjs';
1
+ import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-CCUhQFgH.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-D_LR6aTg.js';
1
+ import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-C54rKsX4.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -54,10 +54,7 @@ interface MarketInfoFormData {
54
54
  packInTime: number;
55
55
  paymentDueHours: number;
56
56
  paymentInfo: PaymentInfoType[];
57
- phoneNumber: {
58
- mobilePhone?: string | null;
59
- landlinePhone?: string | null;
60
- };
57
+ phoneNumber?: PhoneNumberType | null;
61
58
  requirements?: Requirement[];
62
59
  }
63
60
  interface MarketFormData extends BaseResourceTypeFormData {
@@ -112,10 +109,7 @@ type StallholderInfoFormData = {
112
109
  gazebo: StallholderAttributes;
113
110
  packaging: string[];
114
111
  paymentMethod: EnumPaymentMethod;
115
- phoneNumber: {
116
- mobilePhone?: string | null;
117
- landlinePhone?: string | null;
118
- };
112
+ phoneNumber?: PhoneNumberType | null;
119
113
  priceRange: {
120
114
  max: number;
121
115
  min: number;
@@ -269,5 +263,9 @@ interface CreateFormData<T extends FieldValues> {
269
263
  setValue: UseFormSetValue<T>;
270
264
  watch: UseFormWatch<T>;
271
265
  }
266
+ type PhoneNumberType = {
267
+ landlinePhone?: string | null;
268
+ mobilePhone?: string | null;
269
+ };
272
270
 
273
- export type { StallholderLocation as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, StallholderAttributes as E, FormField as F, GeocodeLocation as G, SatllholderWithConnectionDatesType as H, ImageObjectType as I, LocationType as L, MarketType as M, Nullable as N, OptionItem as O, PaymentInfoType as P, Requirement as R, StallType as S, FormDateField as a, MarketInfoType as b, RelationType as c, ResourceConnectionsType as d, StallholderType as e, StallholderInfoType as f, StallholderFormData as g, CreateStallholderFormData as h, StallholderInfoFormData as i, CreateStallholderInfoFormData as j, MarketFormData as k, CreateMarketFormData as l, MarketInfoFormData as m, CreateMarketInfoFormData as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, BaseResourceType as r, Region as s, MapMultiLocation as t, SubcategoryItems as u, Subcategory as v, CreateFormData as w, DateTimeWithPriceType as x, MarketWithConnectionDatesType as y, RelationDate as z };
271
+ export type { RelationDate as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, StallholderLocation as E, FormField as F, GeocodeLocation as G, StallholderAttributes as H, ImageObjectType as I, SatllholderWithConnectionDatesType as J, LocationType as L, MarketType as M, Nullable as N, OptionItem as O, PhoneNumberType as P, Requirement as R, StallType as S, FormDateField as a, MarketInfoType as b, RelationType as c, ResourceConnectionsType as d, StallholderType as e, StallholderInfoType as f, StallholderFormData as g, CreateStallholderFormData as h, StallholderInfoFormData as i, CreateStallholderInfoFormData as j, MarketFormData as k, CreateMarketFormData as l, MarketInfoFormData as m, CreateMarketInfoFormData as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, BaseResourceType as r, Region as s, MapMultiLocation as t, SubcategoryItems as u, Subcategory as v, CreateFormData as w, DateTimeWithPriceType as x, PaymentInfoType as y, MarketWithConnectionDatesType as z };
@@ -54,10 +54,7 @@ interface MarketInfoFormData {
54
54
  packInTime: number;
55
55
  paymentDueHours: number;
56
56
  paymentInfo: PaymentInfoType[];
57
- phoneNumber: {
58
- mobilePhone?: string | null;
59
- landlinePhone?: string | null;
60
- };
57
+ phoneNumber?: PhoneNumberType | null;
61
58
  requirements?: Requirement[];
62
59
  }
63
60
  interface MarketFormData extends BaseResourceTypeFormData {
@@ -112,10 +109,7 @@ type StallholderInfoFormData = {
112
109
  gazebo: StallholderAttributes;
113
110
  packaging: string[];
114
111
  paymentMethod: EnumPaymentMethod;
115
- phoneNumber: {
116
- mobilePhone?: string | null;
117
- landlinePhone?: string | null;
118
- };
112
+ phoneNumber?: PhoneNumberType | null;
119
113
  priceRange: {
120
114
  max: number;
121
115
  min: number;
@@ -269,5 +263,9 @@ interface CreateFormData<T extends FieldValues> {
269
263
  setValue: UseFormSetValue<T>;
270
264
  watch: UseFormWatch<T>;
271
265
  }
266
+ type PhoneNumberType = {
267
+ landlinePhone?: string | null;
268
+ mobilePhone?: string | null;
269
+ };
272
270
 
273
- export type { StallholderLocation as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, StallholderAttributes as E, FormField as F, GeocodeLocation as G, SatllholderWithConnectionDatesType as H, ImageObjectType as I, LocationType as L, MarketType as M, Nullable as N, OptionItem as O, PaymentInfoType as P, Requirement as R, StallType as S, FormDateField as a, MarketInfoType as b, RelationType as c, ResourceConnectionsType as d, StallholderType as e, StallholderInfoType as f, StallholderFormData as g, CreateStallholderFormData as h, StallholderInfoFormData as i, CreateStallholderInfoFormData as j, MarketFormData as k, CreateMarketFormData as l, MarketInfoFormData as m, CreateMarketInfoFormData as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, BaseResourceType as r, Region as s, MapMultiLocation as t, SubcategoryItems as u, Subcategory as v, CreateFormData as w, DateTimeWithPriceType as x, MarketWithConnectionDatesType as y, RelationDate as z };
271
+ export type { RelationDate as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, StallholderLocation as E, FormField as F, GeocodeLocation as G, StallholderAttributes as H, ImageObjectType as I, SatllholderWithConnectionDatesType as J, LocationType as L, MarketType as M, Nullable as N, OptionItem as O, PhoneNumberType as P, Requirement as R, StallType as S, FormDateField as a, MarketInfoType as b, RelationType as c, ResourceConnectionsType as d, StallholderType as e, StallholderInfoType as f, StallholderFormData as g, CreateStallholderFormData as h, StallholderInfoFormData as i, CreateStallholderInfoFormData as j, MarketFormData as k, CreateMarketFormData as l, MarketInfoFormData as m, CreateMarketInfoFormData as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, BaseResourceType as r, Region as s, MapMultiLocation as t, SubcategoryItems as u, Subcategory as v, CreateFormData as w, DateTimeWithPriceType as x, PaymentInfoType as y, MarketWithConnectionDatesType as z };
@@ -1,8 +1,8 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
- import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-C8M4dRL1.mjs';
3
- import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-BjomA4mq.mjs';
2
+ import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-B7Of1JBL.mjs';
3
+ import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-CCUhQFgH.mjs';
4
4
  import { EnumResourceType } from '../enums/index.mjs';
5
- import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-C6n6ilvr.mjs';
5
+ import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-B38R7kN8.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
- import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-BVakO_81.js';
3
- import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-D_LR6aTg.js';
2
+ import { C as ChatType, N as NotificationType, a as NotificationCount } from '../notification-DjHxLq5N.js';
3
+ import { M as MarketType, b as MarketInfoType, c as RelationType, d as ResourceConnectionsType, e as StallholderType, f as StallholderInfoType } from '../global-C54rKsX4.js';
4
4
  import { EnumResourceType } from '../enums/index.js';
5
- import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-u9tGdnYq.js';
5
+ import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus } from '../ad-BSJ5Rcy-.js';
6
6
  import 'react-hook-form';
7
7
 
8
8
  declare const useAdminUpdateResourceType: () => {
@@ -453,7 +453,7 @@ var marketInfoSchema = yup2.object().shape({
453
453
  packInTime: yup2.number().typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
454
454
  paymentDueHours: yup2.number().typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
455
455
  paymentInfo: yup2.array().of(paymentInfoSchema).min(1, "At least one payment info is required").required("Payment info is required"),
456
- phoneNumber: phoneSchema
456
+ phoneNumber: phoneSchema.nullable().optional().label("Phone Number")
457
457
  });
458
458
 
459
459
  // src/yupSchema/stallholder.ts
@@ -480,7 +480,7 @@ var stallholderInfoSchema = yup3.object().shape({
480
480
  }),
481
481
  packaging: yup3.array().of(yup3.string().defined()).min(1, "Packaging list must contain at least one item").required("Packaging is required"),
482
482
  paymentMethod: yup3.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
483
- phoneNumber: phoneSchema,
483
+ phoneNumber: phoneSchema.nullable().optional().label("Phone Number"),
484
484
  priceRange: yup3.object().shape({
485
485
  max: yup3.number().min(1).required("Max price is required").test(
486
486
  "is-greater",
@@ -719,10 +719,6 @@ var defaultMarketInfoFormValues = {
719
719
  // e.g., 2 hours before market opens
720
720
  paymentDueHours: 24,
721
721
  paymentInfo: [],
722
- phoneNumber: {
723
- landlinePhone: "",
724
- mobilePhone: ""
725
- },
726
722
  requirements: []
727
723
  };
728
724
  var defaultStallholderFormValues = {
@@ -740,10 +736,6 @@ var defaultStallholderInfoFormValues = {
740
736
  gazebo: { details: null, isRequired: false },
741
737
  packaging: [],
742
738
  paymentMethod: "",
743
- phoneNumber: {
744
- landlinePhone: "",
745
- mobilePhone: ""
746
- },
747
739
  priceRange: { max: 0, min: 0 },
748
740
  producedIn: [],
749
741
  stallholderId: "",