@timardex/cluemart-shared 1.0.69 → 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-DWRxyom2.d.ts → global-Cpfu9Dud.d.ts} +9 -3
- package/dist/{global-D0CpFjdk.d.mts → global-Dqtku_n8.d.mts} +9 -3
- package/dist/graphql/index.cjs +6 -1
- 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 +7 -2
- 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 +2934 -2310
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +372 -331
- package/dist/index.d.ts +372 -331
- package/dist/index.mjs +2931 -2310
- 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,136 +81,6 @@ 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;
|
|
218
86
|
paymentReference?: string;
|
|
@@ -505,15 +373,21 @@ interface FormDateField {
|
|
|
505
373
|
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
506
374
|
placeholder: string;
|
|
507
375
|
}
|
|
376
|
+
interface SubcategoryItems {
|
|
377
|
+
id: string;
|
|
378
|
+
name: string;
|
|
379
|
+
description?: string | null;
|
|
380
|
+
}
|
|
508
381
|
interface Subcategory {
|
|
509
382
|
id: string;
|
|
510
383
|
name: string;
|
|
511
|
-
items?:
|
|
384
|
+
items?: SubcategoryItems[] | null;
|
|
512
385
|
}
|
|
513
386
|
interface Category {
|
|
387
|
+
description?: string;
|
|
514
388
|
id: string;
|
|
515
389
|
name: string;
|
|
516
|
-
subcategories
|
|
390
|
+
subcategories: Subcategory[];
|
|
517
391
|
}
|
|
518
392
|
type OptionItem = {
|
|
519
393
|
value: string;
|
|
@@ -537,6 +411,144 @@ interface ResourceConnectionsType {
|
|
|
537
411
|
stallholders: SatllholderWithConnectionDatesType[] | null;
|
|
538
412
|
}
|
|
539
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
|
+
|
|
540
552
|
interface PosterInputType {
|
|
541
553
|
resourceId: string;
|
|
542
554
|
resourceType: EnumResourceType;
|
|
@@ -572,150 +584,62 @@ type TesterType = {
|
|
|
572
584
|
updatedAt: string;
|
|
573
585
|
};
|
|
574
586
|
|
|
575
|
-
declare const
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
declare const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
*/
|
|
601
|
-
declare const removeTypename: (obj: any) => any;
|
|
602
|
-
/**
|
|
603
|
-
* Truncate text to a specified length and append ellipsis if necessary.
|
|
604
|
-
* @param text
|
|
605
|
-
* @param maxLength
|
|
606
|
-
* @returns
|
|
607
|
-
*/
|
|
608
|
-
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
609
|
-
/**
|
|
610
|
-
* Convert an array of strings to an array of objects with label and value properties.
|
|
611
|
-
* @param items - The array of strings to convert.
|
|
612
|
-
* @returns - The converted array of objects.
|
|
613
|
-
*/
|
|
614
|
-
declare const mapArrayToOptions: (items: string[]) => OptionItem[];
|
|
615
|
-
declare const capitalizeFirstLetter: (str: string) => string;
|
|
616
|
-
declare const statusOptions: {
|
|
617
|
-
label: EnumInviteStatus;
|
|
618
|
-
value: EnumInviteStatus;
|
|
619
|
-
}[];
|
|
620
|
-
/**
|
|
621
|
-
* Sort an array of date strings by their proximity to the current date.
|
|
622
|
-
* @param dates - The array of date strings to sort.
|
|
623
|
-
* @returns - The sorted array of date strings.
|
|
624
|
-
*/
|
|
625
|
-
declare function sortDatesChronologically<T extends {
|
|
626
|
-
startDate: string;
|
|
627
|
-
startTime: string;
|
|
628
|
-
}>(dates: T[]): T[];
|
|
629
|
-
declare const availableRegionTypes: EnumRegions[];
|
|
630
|
-
declare const availableRegionOptions: OptionItem[];
|
|
631
|
-
declare const paymentMethodOptions: OptionItem[];
|
|
632
|
-
declare function normalizeUrl(url: string): string;
|
|
633
|
-
|
|
634
|
-
interface PlacePrediction {
|
|
635
|
-
place_id: string;
|
|
636
|
-
description: string;
|
|
637
|
-
}
|
|
638
|
-
interface UseLocation {
|
|
639
|
-
getPredictions: (text: string) => Promise<PlacePrediction[] | undefined>;
|
|
640
|
-
getPlaceDetails: (placeId: string) => Promise<LocationType | undefined>;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Custom hook to manage location search functionality.
|
|
644
|
-
*
|
|
645
|
-
* @returns {UseLocation} - The functions to get predictions and place details.
|
|
646
|
-
*/
|
|
647
|
-
declare const useLocationSearch: (googleApi: string) => UseLocation;
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Custom hook to manage the stallholder form state and validation.
|
|
651
|
-
*
|
|
652
|
-
* @param {StallholderFormData} data - The initial form data.
|
|
653
|
-
* @returns {CreateStallholderFormData} - The form methods and state.
|
|
654
|
-
*/
|
|
655
|
-
declare function useStallholderForm(data?: StallholderFormData): CreateStallholderFormData;
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Custom hook to manage the stallholder apply form state and validation.
|
|
659
|
-
*
|
|
660
|
-
* @param {StallholderApplyFormFormData} data - The initial form data.
|
|
661
|
-
* @returns {CreateStallholderInfoFormData} - The form methods and state.
|
|
662
|
-
*/
|
|
663
|
-
declare function useStallholderInfoForm(data?: StallholderInfoFormData): CreateStallholderInfoFormData;
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* Custom hook to manage the market form state and validation.
|
|
667
|
-
*
|
|
668
|
-
* @param {MarketFormData} data - The initial form data.
|
|
669
|
-
* @returns {CreateMarketFormData} - The form methods and state.
|
|
670
|
-
*/
|
|
671
|
-
declare function useMarketForm(data?: MarketFormData): CreateMarketFormData;
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Custom hook to manage the market form state and validation.
|
|
675
|
-
*
|
|
676
|
-
* @param {MarketInfoFormData} data - The initial form data.
|
|
677
|
-
* @returns {CreateMarketInfoFormData} - The form methods and state.
|
|
678
|
-
*/
|
|
679
|
-
declare function useMarketInfoForm(data?: MarketInfoFormData): CreateMarketInfoFormData;
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* Custom hook to manage the user form state and validation.
|
|
683
|
-
*
|
|
684
|
-
* @param {UserFormData} data - The initial form data.
|
|
685
|
-
* @returns {CreateUserFormData} - The form methods and state.
|
|
686
|
-
*/
|
|
687
|
-
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[];
|
|
688
612
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
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[];
|
|
695
621
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
*/
|
|
701
|
-
declare function useRegisterForm(): CreateRegisterFormData;
|
|
622
|
+
declare const marketInfo: FormField[];
|
|
623
|
+
declare const marketInfoPaymentInfo: FormField[];
|
|
624
|
+
declare const requirementsOptions: Requirement[];
|
|
625
|
+
declare const stallTypeOptions: StallType[];
|
|
702
626
|
|
|
703
|
-
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[];
|
|
704
632
|
|
|
705
|
-
declare
|
|
633
|
+
declare const profileFields: FormField[];
|
|
706
634
|
|
|
707
|
-
declare
|
|
635
|
+
declare const availableCategories: Category[];
|
|
636
|
+
declare const categoryColors: Record<string, string>;
|
|
708
637
|
|
|
709
|
-
declare const
|
|
710
|
-
declare const defaultMarketFormValues: MarketFormData;
|
|
711
|
-
declare const defaultMarketInfoFormValues: MarketInfoFormData;
|
|
712
|
-
declare const defaultStallholderFormValues: StallholderFormData;
|
|
713
|
-
declare const defaultStallholderInfoFormValues: StallholderInfoFormData;
|
|
714
|
-
declare function mapBaseResourceTypeToFormData(data: MarketFormData | StallholderFormData): BaseResourceTypeFormData;
|
|
638
|
+
declare const socialMediaFields: FormField[];
|
|
715
639
|
|
|
716
|
-
declare
|
|
640
|
+
declare const testersFields: FormField[];
|
|
717
641
|
|
|
718
|
-
declare
|
|
642
|
+
declare const contactUsFields: FormField[];
|
|
719
643
|
|
|
720
644
|
declare const useAdminUpdateResourceType: () => {
|
|
721
645
|
adminUpdateResourceType: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
|
|
@@ -1089,70 +1013,91 @@ declare const useGetUserNotifications: () => {
|
|
|
1089
1013
|
userNotifications: boolean;
|
|
1090
1014
|
};
|
|
1091
1015
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
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;
|
|
1099
1030
|
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
};
|
|
1108
|
-
declare const stallholderTable: {
|
|
1109
|
-
details: FormField;
|
|
1110
|
-
isRequired: FormField;
|
|
1111
|
-
};
|
|
1112
|
-
declare const stallholderPriceRange: {
|
|
1113
|
-
max: FormField;
|
|
1114
|
-
min: FormField;
|
|
1115
|
-
};
|
|
1116
|
-
declare const stallholderStallSize: {
|
|
1117
|
-
depth: FormField;
|
|
1118
|
-
width: FormField;
|
|
1119
|
-
};
|
|
1120
|
-
declare const stallholderPackaging: FormField;
|
|
1121
|
-
declare const stallholderPaymentMethod: FormField;
|
|
1122
|
-
declare const stallholderProducedIn: FormField;
|
|
1123
|
-
declare const packagingOptions: OptionItem[];
|
|
1124
|
-
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;
|
|
1125
1038
|
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
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;
|
|
1134
1046
|
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
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;
|
|
1139
1054
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
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;
|
|
1145
1062
|
|
|
1146
|
-
|
|
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;
|
|
1147
1070
|
|
|
1148
|
-
|
|
1149
|
-
|
|
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;
|
|
1150
1077
|
|
|
1151
|
-
|
|
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;
|
|
1152
1084
|
|
|
1153
|
-
declare
|
|
1085
|
+
declare function useRequestPasswordResetForm(): CreateRequestPasswordResetFormData;
|
|
1154
1086
|
|
|
1155
|
-
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;
|
|
1156
1101
|
|
|
1157
1102
|
declare const SAVED_PASSWORD_KEY = "savedPassword";
|
|
1158
1103
|
declare const SAVED_EMAIL_KEY = "savedEmail";
|
|
@@ -1160,4 +1105,100 @@ declare const SAVED_TOKEN_KEY = "savedToken";
|
|
|
1160
1105
|
declare const SAVED_REFRESH_TOKEN_KEY = "savedRefreshToken";
|
|
1161
1106
|
declare const USER_STORAGE_KEY = "authUser";
|
|
1162
1107
|
|
|
1163
|
-
|
|
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 };
|