@timardex/cluemart-shared 1.0.68 → 1.0.70
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/{chunk-4BZVTRCC.mjs → chunk-KPXDWQJZ.mjs} +5 -7
- package/dist/chunk-KPXDWQJZ.mjs.map +1 -0
- package/dist/{chunk-NKXNZPXS.mjs → chunk-R5WLNKNS.mjs} +2 -2
- package/dist/enums/index.cjs +4 -6
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +5 -7
- package/dist/enums/index.d.ts +5 -7
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs +771 -200
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +769 -196
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-BGkMOKi_.d.ts → global-Cpfu9Dud.d.ts} +10 -3
- package/dist/{global-CQkmy_ty.d.mts → global-Dqtku_n8.d.mts} +10 -3
- package/dist/graphql/index.cjs +55 -9
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +56 -10
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +12 -8
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +10 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +2983 -2318
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +373 -331
- package/dist/index.d.ts +373 -331
- package/dist/index.mjs +2980 -2318
- package/dist/index.mjs.map +1 -1
- package/dist/theme/index.cjs +70 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.mts +38 -0
- package/dist/theme/index.d.ts +38 -0
- package/dist/theme/index.mjs +43 -0
- package/dist/theme/index.mjs.map +1 -0
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +4 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +6 -1
- package/dist/chunk-4BZVTRCC.mjs.map +0 -1
- /package/dist/{chunk-NKXNZPXS.mjs.map → chunk-R5WLNKNS.mjs.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -42,19 +42,17 @@ declare enum EnumResourceTypeIcon {
|
|
|
42
42
|
}
|
|
43
43
|
declare enum EnumRegions {
|
|
44
44
|
Auckland = "Auckland",
|
|
45
|
-
|
|
45
|
+
BayOfPlentyGisborne = "Bay of Plenty & Gisborne",
|
|
46
46
|
Canterbury = "Canterbury",
|
|
47
|
-
Gisborne = "Gisborne",
|
|
48
47
|
HawkesBay = "Hawke's Bay",
|
|
49
48
|
ManawatuWanganui = "Manawatu-Wanganui",
|
|
50
|
-
|
|
51
|
-
Nelson = "Nelson",
|
|
49
|
+
MarlboroughNelson = "Marlborough & Nelson",
|
|
52
50
|
Northland = "Northland",
|
|
53
|
-
|
|
54
|
-
Southland = "Southland",
|
|
51
|
+
SouthlandOtago = "Southland & Otago",
|
|
55
52
|
Taranaki = "Taranaki",
|
|
56
53
|
Waikato = "Waikato",
|
|
57
|
-
Wellington = "Wellington"
|
|
54
|
+
Wellington = "Wellington",
|
|
55
|
+
TasmanWestCoast = "Tasman & West Coast"
|
|
58
56
|
}
|
|
59
57
|
declare enum ImageTypeEnum {
|
|
60
58
|
AVATAR = "avatar",
|
|
@@ -83,138 +81,9 @@ declare enum EnumSocialMedia {
|
|
|
83
81
|
YOUTUBE = "youtube"
|
|
84
82
|
}
|
|
85
83
|
|
|
86
|
-
interface AdminUpdateResourceType {
|
|
87
|
-
active: boolean;
|
|
88
|
-
resourceId: string;
|
|
89
|
-
resourceType: EnumResourceType;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
type LoginFormData = {
|
|
93
|
-
email: string;
|
|
94
|
-
isAdminPage?: boolean;
|
|
95
|
-
password: string;
|
|
96
|
-
};
|
|
97
|
-
interface CreateLoginFormData {
|
|
98
|
-
control: Control<LoginFormData, any, LoginFormData>;
|
|
99
|
-
fields: LoginFormData;
|
|
100
|
-
formState: {
|
|
101
|
-
errors: FieldErrors<LoginFormData>;
|
|
102
|
-
};
|
|
103
|
-
handleSubmit: UseFormHandleSubmit<LoginFormData, any>;
|
|
104
|
-
reset: UseFormReset<LoginFormData>;
|
|
105
|
-
setValue: UseFormSetValue<LoginFormData>;
|
|
106
|
-
watch: UseFormWatch<LoginFormData>;
|
|
107
|
-
}
|
|
108
|
-
type RegisterFormData = {
|
|
109
|
-
email: string;
|
|
110
|
-
firstName: string;
|
|
111
|
-
lastName: string;
|
|
112
|
-
password: string;
|
|
113
|
-
preferredRegion: string;
|
|
114
|
-
};
|
|
115
|
-
interface CreateRegisterFormData {
|
|
116
|
-
control: Control<RegisterFormData, any>;
|
|
117
|
-
fields: RegisterFormData;
|
|
118
|
-
formState: {
|
|
119
|
-
errors: FieldErrors<RegisterFormData>;
|
|
120
|
-
};
|
|
121
|
-
handleSubmit: UseFormHandleSubmit<RegisterFormData, any>;
|
|
122
|
-
reset: UseFormReset<RegisterFormData>;
|
|
123
|
-
setValue: UseFormSetValue<RegisterFormData>;
|
|
124
|
-
watch: UseFormWatch<RegisterFormData>;
|
|
125
|
-
}
|
|
126
|
-
type RequestPasswordResetFormData = {
|
|
127
|
-
email: string;
|
|
128
|
-
};
|
|
129
|
-
interface CreateRequestPasswordResetFormData {
|
|
130
|
-
control: Control<RequestPasswordResetFormData, any>;
|
|
131
|
-
fields: RequestPasswordResetFormData;
|
|
132
|
-
formState: {
|
|
133
|
-
errors: FieldErrors<RequestPasswordResetFormData>;
|
|
134
|
-
};
|
|
135
|
-
handleSubmit: UseFormHandleSubmit<RequestPasswordResetFormData, any>;
|
|
136
|
-
reset: UseFormReset<RequestPasswordResetFormData>;
|
|
137
|
-
setValue: UseFormSetValue<RequestPasswordResetFormData>;
|
|
138
|
-
watch: UseFormWatch<RequestPasswordResetFormData>;
|
|
139
|
-
}
|
|
140
|
-
type ResetPasswordFormData = {
|
|
141
|
-
confirmPassword: string;
|
|
142
|
-
email: string;
|
|
143
|
-
password: string;
|
|
144
|
-
};
|
|
145
|
-
interface CreateResetPasswordFormData {
|
|
146
|
-
control: Control<ResetPasswordFormData, any>;
|
|
147
|
-
fields: ResetPasswordFormData;
|
|
148
|
-
formState: {
|
|
149
|
-
errors: FieldErrors<ResetPasswordFormData>;
|
|
150
|
-
};
|
|
151
|
-
handleSubmit: UseFormHandleSubmit<ResetPasswordFormData, any>;
|
|
152
|
-
reset: UseFormReset<ResetPasswordFormData>;
|
|
153
|
-
setValue: UseFormSetValue<ResetPasswordFormData>;
|
|
154
|
-
watch: UseFormWatch<ResetPasswordFormData>;
|
|
155
|
-
}
|
|
156
|
-
type ValidateVerificationTokenFormData = {
|
|
157
|
-
email: string;
|
|
158
|
-
verificationToken: string;
|
|
159
|
-
};
|
|
160
|
-
interface CreateValidateVerificationTokenFormData {
|
|
161
|
-
control: Control<ValidateVerificationTokenFormData, any>;
|
|
162
|
-
fields: ValidateVerificationTokenFormData;
|
|
163
|
-
formState: {
|
|
164
|
-
errors: FieldErrors<ValidateVerificationTokenFormData>;
|
|
165
|
-
};
|
|
166
|
-
handleSubmit: UseFormHandleSubmit<ValidateVerificationTokenFormData, any>;
|
|
167
|
-
reset: UseFormReset<ValidateVerificationTokenFormData>;
|
|
168
|
-
setValue: UseFormSetValue<ValidateVerificationTokenFormData>;
|
|
169
|
-
watch: UseFormWatch<ValidateVerificationTokenFormData>;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
interface ChatInput {
|
|
173
|
-
name: string;
|
|
174
|
-
participants: string[];
|
|
175
|
-
}
|
|
176
|
-
interface ChatMessageInput {
|
|
177
|
-
content: string;
|
|
178
|
-
senderId: string;
|
|
179
|
-
senderName: string;
|
|
180
|
-
}
|
|
181
|
-
interface ChatMessageType {
|
|
182
|
-
_id?: string;
|
|
183
|
-
content: string;
|
|
184
|
-
createdAt?: string;
|
|
185
|
-
senderId: string;
|
|
186
|
-
senderName: string;
|
|
187
|
-
updatedAt?: string;
|
|
188
|
-
}
|
|
189
|
-
interface ChatType {
|
|
190
|
-
_id: string;
|
|
191
|
-
createdAt: string;
|
|
192
|
-
messages: ChatMessageType[];
|
|
193
|
-
name: string;
|
|
194
|
-
participants: string[];
|
|
195
|
-
updatedAt: string;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
type ContactUsFormData = {
|
|
199
|
-
email: string;
|
|
200
|
-
firstName: string;
|
|
201
|
-
lastName: string;
|
|
202
|
-
message: string;
|
|
203
|
-
};
|
|
204
|
-
interface CreateContactUsFormData {
|
|
205
|
-
control: Control<ContactUsFormData, any>;
|
|
206
|
-
fields: ContactUsFormData;
|
|
207
|
-
formState: {
|
|
208
|
-
errors: FieldErrors<ContactUsFormData>;
|
|
209
|
-
};
|
|
210
|
-
handleSubmit: UseFormHandleSubmit<ContactUsFormData, any>;
|
|
211
|
-
reset: UseFormReset<ContactUsFormData>;
|
|
212
|
-
setValue: UseFormSetValue<ContactUsFormData>;
|
|
213
|
-
watch: UseFormWatch<ContactUsFormData>;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
84
|
type RelationDate = {
|
|
217
85
|
lastUpdateBy: string;
|
|
86
|
+
paymentReference?: string;
|
|
218
87
|
stallType: StallType | null;
|
|
219
88
|
startDate: string;
|
|
220
89
|
startTime: string;
|
|
@@ -504,15 +373,21 @@ interface FormDateField {
|
|
|
504
373
|
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
505
374
|
placeholder: string;
|
|
506
375
|
}
|
|
376
|
+
interface SubcategoryItems {
|
|
377
|
+
id: string;
|
|
378
|
+
name: string;
|
|
379
|
+
description?: string | null;
|
|
380
|
+
}
|
|
507
381
|
interface Subcategory {
|
|
508
382
|
id: string;
|
|
509
383
|
name: string;
|
|
510
|
-
items?:
|
|
384
|
+
items?: SubcategoryItems[] | null;
|
|
511
385
|
}
|
|
512
386
|
interface Category {
|
|
387
|
+
description?: string;
|
|
513
388
|
id: string;
|
|
514
389
|
name: string;
|
|
515
|
-
subcategories
|
|
390
|
+
subcategories: Subcategory[];
|
|
516
391
|
}
|
|
517
392
|
type OptionItem = {
|
|
518
393
|
value: string;
|
|
@@ -536,6 +411,144 @@ interface ResourceConnectionsType {
|
|
|
536
411
|
stallholders: SatllholderWithConnectionDatesType[] | null;
|
|
537
412
|
}
|
|
538
413
|
|
|
414
|
+
declare const stallholderBasicInfoFields: FormField[];
|
|
415
|
+
declare const stallholderMultiLocation: FormField;
|
|
416
|
+
declare const stallholderFullAddress: FormField;
|
|
417
|
+
declare const stallholderStartDateFields: FormDateField[];
|
|
418
|
+
declare const stallholderEndDateFields: FormDateField[];
|
|
419
|
+
declare const stallholderLocationDescription: FormField;
|
|
420
|
+
declare const availableCityOptions: OptionItem[];
|
|
421
|
+
|
|
422
|
+
interface AdminUpdateResourceType {
|
|
423
|
+
active: boolean;
|
|
424
|
+
resourceId: string;
|
|
425
|
+
resourceType: EnumResourceType;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
type LoginFormData = {
|
|
429
|
+
email: string;
|
|
430
|
+
isAdminPage?: boolean;
|
|
431
|
+
password: string;
|
|
432
|
+
};
|
|
433
|
+
interface CreateLoginFormData {
|
|
434
|
+
control: Control<LoginFormData, any, LoginFormData>;
|
|
435
|
+
fields: LoginFormData;
|
|
436
|
+
formState: {
|
|
437
|
+
errors: FieldErrors<LoginFormData>;
|
|
438
|
+
};
|
|
439
|
+
handleSubmit: UseFormHandleSubmit<LoginFormData, any>;
|
|
440
|
+
reset: UseFormReset<LoginFormData>;
|
|
441
|
+
setValue: UseFormSetValue<LoginFormData>;
|
|
442
|
+
watch: UseFormWatch<LoginFormData>;
|
|
443
|
+
}
|
|
444
|
+
type RegisterFormData = {
|
|
445
|
+
email: string;
|
|
446
|
+
firstName: string;
|
|
447
|
+
lastName: string;
|
|
448
|
+
password: string;
|
|
449
|
+
preferredRegion: string;
|
|
450
|
+
};
|
|
451
|
+
interface CreateRegisterFormData {
|
|
452
|
+
control: Control<RegisterFormData, any>;
|
|
453
|
+
fields: RegisterFormData;
|
|
454
|
+
formState: {
|
|
455
|
+
errors: FieldErrors<RegisterFormData>;
|
|
456
|
+
};
|
|
457
|
+
handleSubmit: UseFormHandleSubmit<RegisterFormData, any>;
|
|
458
|
+
reset: UseFormReset<RegisterFormData>;
|
|
459
|
+
setValue: UseFormSetValue<RegisterFormData>;
|
|
460
|
+
watch: UseFormWatch<RegisterFormData>;
|
|
461
|
+
}
|
|
462
|
+
type RequestPasswordResetFormData = {
|
|
463
|
+
email: string;
|
|
464
|
+
};
|
|
465
|
+
interface CreateRequestPasswordResetFormData {
|
|
466
|
+
control: Control<RequestPasswordResetFormData, any>;
|
|
467
|
+
fields: RequestPasswordResetFormData;
|
|
468
|
+
formState: {
|
|
469
|
+
errors: FieldErrors<RequestPasswordResetFormData>;
|
|
470
|
+
};
|
|
471
|
+
handleSubmit: UseFormHandleSubmit<RequestPasswordResetFormData, any>;
|
|
472
|
+
reset: UseFormReset<RequestPasswordResetFormData>;
|
|
473
|
+
setValue: UseFormSetValue<RequestPasswordResetFormData>;
|
|
474
|
+
watch: UseFormWatch<RequestPasswordResetFormData>;
|
|
475
|
+
}
|
|
476
|
+
type ResetPasswordFormData = {
|
|
477
|
+
confirmPassword: string;
|
|
478
|
+
email: string;
|
|
479
|
+
password: string;
|
|
480
|
+
};
|
|
481
|
+
interface CreateResetPasswordFormData {
|
|
482
|
+
control: Control<ResetPasswordFormData, any>;
|
|
483
|
+
fields: ResetPasswordFormData;
|
|
484
|
+
formState: {
|
|
485
|
+
errors: FieldErrors<ResetPasswordFormData>;
|
|
486
|
+
};
|
|
487
|
+
handleSubmit: UseFormHandleSubmit<ResetPasswordFormData, any>;
|
|
488
|
+
reset: UseFormReset<ResetPasswordFormData>;
|
|
489
|
+
setValue: UseFormSetValue<ResetPasswordFormData>;
|
|
490
|
+
watch: UseFormWatch<ResetPasswordFormData>;
|
|
491
|
+
}
|
|
492
|
+
type ValidateVerificationTokenFormData = {
|
|
493
|
+
email: string;
|
|
494
|
+
verificationToken: string;
|
|
495
|
+
};
|
|
496
|
+
interface CreateValidateVerificationTokenFormData {
|
|
497
|
+
control: Control<ValidateVerificationTokenFormData, any>;
|
|
498
|
+
fields: ValidateVerificationTokenFormData;
|
|
499
|
+
formState: {
|
|
500
|
+
errors: FieldErrors<ValidateVerificationTokenFormData>;
|
|
501
|
+
};
|
|
502
|
+
handleSubmit: UseFormHandleSubmit<ValidateVerificationTokenFormData, any>;
|
|
503
|
+
reset: UseFormReset<ValidateVerificationTokenFormData>;
|
|
504
|
+
setValue: UseFormSetValue<ValidateVerificationTokenFormData>;
|
|
505
|
+
watch: UseFormWatch<ValidateVerificationTokenFormData>;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
interface ChatInput {
|
|
509
|
+
name: string;
|
|
510
|
+
participants: string[];
|
|
511
|
+
}
|
|
512
|
+
interface ChatMessageInput {
|
|
513
|
+
content: string;
|
|
514
|
+
senderId: string;
|
|
515
|
+
senderName: string;
|
|
516
|
+
}
|
|
517
|
+
interface ChatMessageType {
|
|
518
|
+
_id?: string;
|
|
519
|
+
content: string;
|
|
520
|
+
createdAt?: string;
|
|
521
|
+
senderId: string;
|
|
522
|
+
senderName: string;
|
|
523
|
+
updatedAt?: string;
|
|
524
|
+
}
|
|
525
|
+
interface ChatType {
|
|
526
|
+
_id: string;
|
|
527
|
+
createdAt: string;
|
|
528
|
+
messages: ChatMessageType[];
|
|
529
|
+
name: string;
|
|
530
|
+
participants: string[];
|
|
531
|
+
updatedAt: string;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
type ContactUsFormData = {
|
|
535
|
+
email: string;
|
|
536
|
+
firstName: string;
|
|
537
|
+
lastName: string;
|
|
538
|
+
message: string;
|
|
539
|
+
};
|
|
540
|
+
interface CreateContactUsFormData {
|
|
541
|
+
control: Control<ContactUsFormData, any>;
|
|
542
|
+
fields: ContactUsFormData;
|
|
543
|
+
formState: {
|
|
544
|
+
errors: FieldErrors<ContactUsFormData>;
|
|
545
|
+
};
|
|
546
|
+
handleSubmit: UseFormHandleSubmit<ContactUsFormData, any>;
|
|
547
|
+
reset: UseFormReset<ContactUsFormData>;
|
|
548
|
+
setValue: UseFormSetValue<ContactUsFormData>;
|
|
549
|
+
watch: UseFormWatch<ContactUsFormData>;
|
|
550
|
+
}
|
|
551
|
+
|
|
539
552
|
interface PosterInputType {
|
|
540
553
|
resourceId: string;
|
|
541
554
|
resourceType: EnumResourceType;
|
|
@@ -571,150 +584,62 @@ type TesterType = {
|
|
|
571
584
|
updatedAt: string;
|
|
572
585
|
};
|
|
573
586
|
|
|
574
|
-
declare const
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
declare const
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
*/
|
|
600
|
-
declare const removeTypename: (obj: any) => any;
|
|
601
|
-
/**
|
|
602
|
-
* Truncate text to a specified length and append ellipsis if necessary.
|
|
603
|
-
* @param text
|
|
604
|
-
* @param maxLength
|
|
605
|
-
* @returns
|
|
606
|
-
*/
|
|
607
|
-
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
608
|
-
/**
|
|
609
|
-
* Convert an array of strings to an array of objects with label and value properties.
|
|
610
|
-
* @param items - The array of strings to convert.
|
|
611
|
-
* @returns - The converted array of objects.
|
|
612
|
-
*/
|
|
613
|
-
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
614
|
-
declare const capitalizeFirstLetter: (str: string) => string;
|
|
615
|
-
declare const statusOptions: {
|
|
616
|
-
label: EnumInviteStatus;
|
|
617
|
-
value: EnumInviteStatus;
|
|
618
|
-
}[];
|
|
619
|
-
/**
|
|
620
|
-
* Sort an array of date strings by their proximity to the current date.
|
|
621
|
-
* @param dates - The array of date strings to sort.
|
|
622
|
-
* @returns - The sorted array of date strings.
|
|
623
|
-
*/
|
|
624
|
-
declare function sortDatesChronologically<T extends {
|
|
625
|
-
startDate: string;
|
|
626
|
-
startTime: string;
|
|
627
|
-
}>(dates: T[]): T[];
|
|
628
|
-
declare const availableRegionTypes: EnumRegions[];
|
|
629
|
-
declare const availableRegionOptions: OptionItem[];
|
|
630
|
-
declare const paymentMethodOptions: OptionItem[];
|
|
631
|
-
declare function normalizeUrl(url: string): string;
|
|
632
|
-
|
|
633
|
-
interface PlacePrediction {
|
|
634
|
-
place_id: string;
|
|
635
|
-
description: string;
|
|
636
|
-
}
|
|
637
|
-
interface UseLocation {
|
|
638
|
-
getPredictions: (text: string) => Promise<PlacePrediction[] | undefined>;
|
|
639
|
-
getPlaceDetails: (placeId: string) => Promise<LocationType | undefined>;
|
|
640
|
-
}
|
|
641
|
-
/**
|
|
642
|
-
* Custom hook to manage location search functionality.
|
|
643
|
-
*
|
|
644
|
-
* @returns {UseLocation} - The functions to get predictions and place details.
|
|
645
|
-
*/
|
|
646
|
-
declare const useLocationSearch: (googleApi: string) => UseLocation;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Custom hook to manage the stallholder form state and validation.
|
|
650
|
-
*
|
|
651
|
-
* @param {StallholderFormData} data - The initial form data.
|
|
652
|
-
* @returns {CreateStallholderFormData} - The form methods and state.
|
|
653
|
-
*/
|
|
654
|
-
declare function useStallholderForm(data?: StallholderFormData): CreateStallholderFormData;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Custom hook to manage the stallholder apply form state and validation.
|
|
658
|
-
*
|
|
659
|
-
* @param {StallholderApplyFormFormData} data - The initial form data.
|
|
660
|
-
* @returns {CreateStallholderInfoFormData} - The form methods and state.
|
|
661
|
-
*/
|
|
662
|
-
declare function useStallholderInfoForm(data?: StallholderInfoFormData): CreateStallholderInfoFormData;
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Custom hook to manage the market form state and validation.
|
|
666
|
-
*
|
|
667
|
-
* @param {MarketFormData} data - The initial form data.
|
|
668
|
-
* @returns {CreateMarketFormData} - The form methods and state.
|
|
669
|
-
*/
|
|
670
|
-
declare function useMarketForm(data?: MarketFormData): CreateMarketFormData;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Custom hook to manage the market form state and validation.
|
|
674
|
-
*
|
|
675
|
-
* @param {MarketInfoFormData} data - The initial form data.
|
|
676
|
-
* @returns {CreateMarketInfoFormData} - The form methods and state.
|
|
677
|
-
*/
|
|
678
|
-
declare function useMarketInfoForm(data?: MarketInfoFormData): CreateMarketInfoFormData;
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* Custom hook to manage the user form state and validation.
|
|
682
|
-
*
|
|
683
|
-
* @param {UserFormData} data - The initial form data.
|
|
684
|
-
* @returns {CreateUserFormData} - The form methods and state.
|
|
685
|
-
*/
|
|
686
|
-
declare function useUserForm(data?: UserFormData): CreateUserFormData;
|
|
587
|
+
declare const stallholderElectricity: {
|
|
588
|
+
details: FormField;
|
|
589
|
+
isRequired: FormField;
|
|
590
|
+
};
|
|
591
|
+
declare const stallholderGazebo: {
|
|
592
|
+
details: FormField;
|
|
593
|
+
isRequired: FormField;
|
|
594
|
+
};
|
|
595
|
+
declare const stallholderTable: {
|
|
596
|
+
details: FormField;
|
|
597
|
+
isRequired: FormField;
|
|
598
|
+
};
|
|
599
|
+
declare const stallholderPriceRange: {
|
|
600
|
+
max: FormField;
|
|
601
|
+
min: FormField;
|
|
602
|
+
};
|
|
603
|
+
declare const stallholderStallSize: {
|
|
604
|
+
depth: FormField;
|
|
605
|
+
width: FormField;
|
|
606
|
+
};
|
|
607
|
+
declare const stallholderPackaging: FormField;
|
|
608
|
+
declare const stallholderPaymentMethod: FormField;
|
|
609
|
+
declare const stallholderProducedIn: FormField;
|
|
610
|
+
declare const packagingOptions: OptionItem[];
|
|
611
|
+
declare const producedIngOptions: OptionItem[];
|
|
687
612
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
613
|
+
declare const marketBasicInfoFields: FormField[];
|
|
614
|
+
declare const marketStartDateFields: FormDateField[];
|
|
615
|
+
declare const marketEndDateFields: FormDateField[];
|
|
616
|
+
declare const availableTagTypes: {
|
|
617
|
+
icon: string;
|
|
618
|
+
label: string;
|
|
619
|
+
}[];
|
|
620
|
+
declare const tagOptions: OptionItem[];
|
|
694
621
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
*/
|
|
700
|
-
declare function useRegisterForm(): CreateRegisterFormData;
|
|
622
|
+
declare const marketInfo: FormField[];
|
|
623
|
+
declare const marketInfoPaymentInfo: FormField[];
|
|
624
|
+
declare const requirementsOptions: Requirement[];
|
|
625
|
+
declare const stallTypeOptions: StallType[];
|
|
701
626
|
|
|
702
|
-
declare
|
|
627
|
+
declare const loginFields: FormField[];
|
|
628
|
+
declare const registerFields: FormField[];
|
|
629
|
+
declare const requestPasswordResetFields: FormField[];
|
|
630
|
+
declare const resetPasswordFields: FormField[];
|
|
631
|
+
declare const validateVerificationTokenFields: FormField[];
|
|
703
632
|
|
|
704
|
-
declare
|
|
633
|
+
declare const profileFields: FormField[];
|
|
705
634
|
|
|
706
|
-
declare
|
|
635
|
+
declare const availableCategories: Category[];
|
|
636
|
+
declare const categoryColors: Record<string, string>;
|
|
707
637
|
|
|
708
|
-
declare const
|
|
709
|
-
declare const defaultMarketFormValues: MarketFormData;
|
|
710
|
-
declare const defaultMarketInfoFormValues: MarketInfoFormData;
|
|
711
|
-
declare const defaultStallholderFormValues: StallholderFormData;
|
|
712
|
-
declare const defaultStallholderInfoFormValues: StallholderInfoFormData;
|
|
713
|
-
declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
|
|
638
|
+
declare const socialMediaFields: FormField[];
|
|
714
639
|
|
|
715
|
-
declare
|
|
640
|
+
declare const testersFields: FormField[];
|
|
716
641
|
|
|
717
|
-
declare
|
|
642
|
+
declare const contactUsFields: FormField[];
|
|
718
643
|
|
|
719
644
|
declare const useAdminUpdateResourceType: () => {
|
|
720
645
|
adminUpdateResourceType: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
@@ -1088,70 +1013,91 @@ declare const useGetUserNotifications: () => {
|
|
|
1088
1013
|
userNotifications: boolean;
|
|
1089
1014
|
};
|
|
1090
1015
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1016
|
+
interface PlacePrediction {
|
|
1017
|
+
place_id: string;
|
|
1018
|
+
description: string;
|
|
1019
|
+
}
|
|
1020
|
+
interface UseLocation {
|
|
1021
|
+
getPredictions: (text: string) => Promise<PlacePrediction[] | undefined>;
|
|
1022
|
+
getPlaceDetails: (placeId: string) => Promise<LocationType | undefined>;
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Custom hook to manage location search functionality.
|
|
1026
|
+
*
|
|
1027
|
+
* @returns {UseLocation} - The functions to get predictions and place details.
|
|
1028
|
+
*/
|
|
1029
|
+
declare const useLocationSearch: (googleApi: string) => UseLocation;
|
|
1098
1030
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
};
|
|
1107
|
-
declare const stallholderTable: {
|
|
1108
|
-
details: FormField;
|
|
1109
|
-
isRequired: FormField;
|
|
1110
|
-
};
|
|
1111
|
-
declare const stallholderPriceRange: {
|
|
1112
|
-
max: FormField;
|
|
1113
|
-
min: FormField;
|
|
1114
|
-
};
|
|
1115
|
-
declare const stallholderStallSize: {
|
|
1116
|
-
depth: FormField;
|
|
1117
|
-
width: FormField;
|
|
1118
|
-
};
|
|
1119
|
-
declare const stallholderPackaging: FormField;
|
|
1120
|
-
declare const stallholderPaymentMethod: FormField;
|
|
1121
|
-
declare const stallholderProducedIn: FormField;
|
|
1122
|
-
declare const packagingOptions: OptionItem[];
|
|
1123
|
-
declare const producedIngOptions: OptionItem[];
|
|
1031
|
+
/**
|
|
1032
|
+
* Custom hook to manage the stallholder form state and validation.
|
|
1033
|
+
*
|
|
1034
|
+
* @param {StallholderFormData} data - The initial form data.
|
|
1035
|
+
* @returns {CreateStallholderFormData} - The form methods and state.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function useStallholderForm(data?: StallholderFormData): CreateStallholderFormData;
|
|
1124
1038
|
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
declare const tagOptions: OptionItem[];
|
|
1039
|
+
/**
|
|
1040
|
+
* Custom hook to manage the stallholder apply form state and validation.
|
|
1041
|
+
*
|
|
1042
|
+
* @param {StallholderApplyFormFormData} data - The initial form data.
|
|
1043
|
+
* @returns {CreateStallholderInfoFormData} - The form methods and state.
|
|
1044
|
+
*/
|
|
1045
|
+
declare function useStallholderInfoForm(data?: StallholderInfoFormData): CreateStallholderInfoFormData;
|
|
1133
1046
|
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1047
|
+
/**
|
|
1048
|
+
* Custom hook to manage the market form state and validation.
|
|
1049
|
+
*
|
|
1050
|
+
* @param {MarketFormData} data - The initial form data.
|
|
1051
|
+
* @returns {CreateMarketFormData} - The form methods and state.
|
|
1052
|
+
*/
|
|
1053
|
+
declare function useMarketForm(data?: MarketFormData): CreateMarketFormData;
|
|
1138
1054
|
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1055
|
+
/**
|
|
1056
|
+
* Custom hook to manage the market form state and validation.
|
|
1057
|
+
*
|
|
1058
|
+
* @param {MarketInfoFormData} data - The initial form data.
|
|
1059
|
+
* @returns {CreateMarketInfoFormData} - The form methods and state.
|
|
1060
|
+
*/
|
|
1061
|
+
declare function useMarketInfoForm(data?: MarketInfoFormData): CreateMarketInfoFormData;
|
|
1144
1062
|
|
|
1145
|
-
|
|
1063
|
+
/**
|
|
1064
|
+
* Custom hook to manage the user form state and validation.
|
|
1065
|
+
*
|
|
1066
|
+
* @param {UserFormData} data - The initial form data.
|
|
1067
|
+
* @returns {CreateUserFormData} - The form methods and state.
|
|
1068
|
+
*/
|
|
1069
|
+
declare function useUserForm(data?: UserFormData): CreateUserFormData;
|
|
1146
1070
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1071
|
+
/**
|
|
1072
|
+
* Custom hook to manage the login form state and validation.
|
|
1073
|
+
*
|
|
1074
|
+
* @returns {CreateLoginFormData} - The form methods and state.
|
|
1075
|
+
*/
|
|
1076
|
+
declare function useLoginForm(): CreateLoginFormData;
|
|
1149
1077
|
|
|
1150
|
-
|
|
1078
|
+
/**
|
|
1079
|
+
* Custom hook to manage the register form state and validation.
|
|
1080
|
+
*
|
|
1081
|
+
* @returns {CreateRegisterFormData} - The form methods and state.
|
|
1082
|
+
*/
|
|
1083
|
+
declare function useRegisterForm(): CreateRegisterFormData;
|
|
1151
1084
|
|
|
1152
|
-
declare
|
|
1085
|
+
declare function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData;
|
|
1153
1086
|
|
|
1154
|
-
declare
|
|
1087
|
+
declare function useValidateVerificationTokenForm(): CreateValidateVerificationTokenFormData;
|
|
1088
|
+
|
|
1089
|
+
declare function useResetPasswordForm(): CreateResetPasswordFormData;
|
|
1090
|
+
|
|
1091
|
+
declare const globalDefaultValues: BaseResourceTypeFormData;
|
|
1092
|
+
declare const defaultMarketFormValues: MarketFormData;
|
|
1093
|
+
declare const defaultMarketInfoFormValues: MarketInfoFormData;
|
|
1094
|
+
declare const defaultStallholderFormValues: StallholderFormData;
|
|
1095
|
+
declare const defaultStallholderInfoFormValues: StallholderInfoFormData;
|
|
1096
|
+
declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
|
|
1097
|
+
|
|
1098
|
+
declare function useTestersForm(data?: TestersFormData): CreateTestersFormData;
|
|
1099
|
+
|
|
1100
|
+
declare function useContactUsForm(data?: ContactUsFormData): CreateContactUsFormData;
|
|
1155
1101
|
|
|
1156
1102
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
1157
1103
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -1159,4 +1105,100 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1159
1105
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1160
1106
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1161
1107
|
|
|
1162
|
-
|
|
1108
|
+
declare const darkColors: {
|
|
1109
|
+
background: string;
|
|
1110
|
+
card: string;
|
|
1111
|
+
primary: string;
|
|
1112
|
+
quaternary: string;
|
|
1113
|
+
secondary: string;
|
|
1114
|
+
tertiary: string;
|
|
1115
|
+
textMuted: string;
|
|
1116
|
+
};
|
|
1117
|
+
declare const lightColors: {
|
|
1118
|
+
background: string;
|
|
1119
|
+
card: string;
|
|
1120
|
+
primary: string;
|
|
1121
|
+
quaternary: string;
|
|
1122
|
+
secondary: string;
|
|
1123
|
+
tertiary: string;
|
|
1124
|
+
textMuted: string;
|
|
1125
|
+
};
|
|
1126
|
+
declare const fonts: {
|
|
1127
|
+
bold: {
|
|
1128
|
+
fontFamily: string;
|
|
1129
|
+
fontWeight: "700";
|
|
1130
|
+
};
|
|
1131
|
+
heavy: {
|
|
1132
|
+
fontFamily: string;
|
|
1133
|
+
fontWeight: "900";
|
|
1134
|
+
};
|
|
1135
|
+
medium: {
|
|
1136
|
+
fontFamily: string;
|
|
1137
|
+
fontWeight: "500";
|
|
1138
|
+
};
|
|
1139
|
+
regular: {
|
|
1140
|
+
fontFamily: string;
|
|
1141
|
+
fontWeight: "400";
|
|
1142
|
+
};
|
|
1143
|
+
};
|
|
1144
|
+
|
|
1145
|
+
declare const dateFormat = "DD-MM-YYYY";
|
|
1146
|
+
declare const timeFormat = "HH:mm";
|
|
1147
|
+
type DateFormat = "date" | "time" | "datetime";
|
|
1148
|
+
/**
|
|
1149
|
+
* Format a date string to a more readable format.
|
|
1150
|
+
* @param dateStr - the date string
|
|
1151
|
+
* @param timeStr - optional time string
|
|
1152
|
+
* @param display - 'date' | 'time' | 'datetime'
|
|
1153
|
+
* @returns formatted string based on display option
|
|
1154
|
+
*/
|
|
1155
|
+
declare const formatDate: (dateStr: string, display?: DateFormat, timeStr?: string) => string;
|
|
1156
|
+
declare const getCurrentAndFutureDates: <T extends {
|
|
1157
|
+
startDate: string;
|
|
1158
|
+
startTime: string;
|
|
1159
|
+
}>(dates: T[]) => T[];
|
|
1160
|
+
declare const isFutureDatesBeforeThreshold: (date: {
|
|
1161
|
+
startDate: string;
|
|
1162
|
+
startTime: string;
|
|
1163
|
+
}, minHoursFromNow: number) => boolean;
|
|
1164
|
+
declare const formatTimestamp: (timestamp: string) => string;
|
|
1165
|
+
declare const defaultRegion: Region;
|
|
1166
|
+
/**
|
|
1167
|
+
* Function to remove __typename from an object or array of objects.
|
|
1168
|
+
* @param obj - The object or array to clean.
|
|
1169
|
+
* @returns - The cleaned object or array.
|
|
1170
|
+
*/
|
|
1171
|
+
declare const removeTypename: (obj: any) => any;
|
|
1172
|
+
/**
|
|
1173
|
+
* Truncate text to a specified length and append ellipsis if necessary.
|
|
1174
|
+
* @param text
|
|
1175
|
+
* @param maxLength
|
|
1176
|
+
* @returns
|
|
1177
|
+
*/
|
|
1178
|
+
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
1179
|
+
/**
|
|
1180
|
+
* Convert an array of strings to an array of objects with label and value properties.
|
|
1181
|
+
* @param items - The array of strings to convert.
|
|
1182
|
+
* @returns - The converted array of objects.
|
|
1183
|
+
*/
|
|
1184
|
+
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
1185
|
+
declare const capitalizeFirstLetter: (str: string) => string;
|
|
1186
|
+
declare const statusOptions: {
|
|
1187
|
+
label: EnumInviteStatus;
|
|
1188
|
+
value: EnumInviteStatus;
|
|
1189
|
+
}[];
|
|
1190
|
+
/**
|
|
1191
|
+
* Sort an array of date strings by their proximity to the current date.
|
|
1192
|
+
* @param dates - The array of date strings to sort.
|
|
1193
|
+
* @returns - The sorted array of date strings.
|
|
1194
|
+
*/
|
|
1195
|
+
declare function sortDatesChronologically<T extends {
|
|
1196
|
+
startDate: string;
|
|
1197
|
+
startTime: string;
|
|
1198
|
+
}>(dates: T[]): T[];
|
|
1199
|
+
declare const availableRegionTypes: EnumRegions[];
|
|
1200
|
+
declare const availableRegionOptions: OptionItem[];
|
|
1201
|
+
declare const paymentMethodOptions: OptionItem[];
|
|
1202
|
+
declare function normalizeUrl(url: string): string;
|
|
1203
|
+
|
|
1204
|
+
export { type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateContactUsFormData, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderFormData, type CreateStallholderInfoFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type DateTimeType, type DateTimeWithPriceType, EnumInviteStatus, EnumNotification, EnumOSType, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PaymentInfoType, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallType, type StallholderAttributes, type StallholderFormData, type StallholderInfoFormData, type StallholderInfoType, type StallholderLocation, type StallholderType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, contactUsFields, darkColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderFormValues, defaultStallholderInfoFormValues, fonts, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentInfo, marketStartDateFields, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderInfo, useCreateTester, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useDeleteTester, useDeleteUser, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderInfo, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUserStallholder, useGetUsers, useLocationSearch, useLogin, useLoginForm, useLogout, useMarketForm, useMarketInfoForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderForm, useStallholderInfoForm, useTestersForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderInfo, useUpdateTester, useUpdateUser, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, validateVerificationTokenFields };
|