@timardex/cluemart-shared 1.0.16 → 1.0.18
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/{auth-CdcH8nqw.d.mts → auth-CAeHx-BM.d.mts} +1 -1
- package/dist/{auth-TM_XttY3.d.ts → auth-gmfsaSPo.d.ts} +1 -1
- package/dist/{chat-NGx5Emrr.d.mts → chat-BUVCf9Tu.d.mts} +1 -1
- package/dist/{chat-NGx5Emrr.d.ts → chat-BUVCf9Tu.d.ts} +1 -1
- package/dist/formFields/index.cjs +49 -47
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +5 -4
- package/dist/formFields/index.d.ts +5 -4
- package/dist/formFields/index.mjs +49 -47
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-B7gB8cvC.d.ts → global-Cj-4jtsW.d.ts} +38 -9
- package/dist/{global-B8kYikwQ.d.mts → global-zKCLfUmA.d.mts} +38 -9
- package/dist/graphql/index.cjs +96 -16
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +19 -3
- package/dist/graphql/index.d.ts +19 -3
- package/dist/graphql/index.mjs +93 -16
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +164 -82
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +12 -3
- package/dist/hooks/index.d.ts +12 -3
- package/dist/hooks/index.mjs +162 -82
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +309 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +66 -11
- package/dist/index.d.ts +66 -11
- package/dist/index.mjs +304 -145
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/hooks/index.cjs
CHANGED
|
@@ -31,12 +31,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var hooks_exports = {};
|
|
32
32
|
__export(hooks_exports, {
|
|
33
33
|
defaultMarketFormValues: () => defaultMarketFormValues,
|
|
34
|
+
defaultMarketInfoFormValues: () => defaultMarketInfoFormValues,
|
|
34
35
|
defaultStallholderApplyFormValues: () => defaultStallholderApplyFormValues,
|
|
35
36
|
defaultStallholderFormValues: () => defaultStallholderFormValues,
|
|
36
37
|
globalDefaultValues: () => globalDefaultValues,
|
|
37
38
|
useLocationSearch: () => useLocationSearch,
|
|
38
39
|
useLoginForm: () => useLoginForm,
|
|
39
40
|
useMarketForm: () => useMarketForm,
|
|
41
|
+
useMarketInfoForm: () => useMarketInfoForm,
|
|
40
42
|
useRegisterForm: () => useRegisterForm,
|
|
41
43
|
useRequestPasswordResetForm: () => useRequestPasswordResetForm,
|
|
42
44
|
useResetPasswordForm: () => useResetPasswordForm,
|
|
@@ -280,13 +282,15 @@ var startTimeCannotBeInPastTest = yup.string().test(
|
|
|
280
282
|
var dateTimeSchema = yup.object().shape({
|
|
281
283
|
endDate: yup.string().concat(endDateNotInPastTest).concat(endDateAfterStartDateTest).required("End date is required"),
|
|
282
284
|
endTime: yup.string().concat(endTimeMustBeAfterStartTimeTest).required("End time is required"),
|
|
285
|
+
startDate: yup.string().concat(startDateNotInPastTest).required("Start date is required"),
|
|
286
|
+
startTime: yup.string().concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
287
|
+
});
|
|
288
|
+
var dateTimeWithPriceSchema = dateTimeSchema.shape({
|
|
283
289
|
marketPrice: yup.number().typeError("Market price must be a number").min(0.1, "Market price must be at least 0.1").required("Market price is required").test(
|
|
284
290
|
"no-leading-zeros",
|
|
285
291
|
"",
|
|
286
292
|
noLeadingZeros("Market price", { allowDecimal: true })
|
|
287
|
-
)
|
|
288
|
-
startDate: yup.string().concat(startDateNotInPastTest).required("Start date is required"),
|
|
289
|
-
startTime: yup.string().concat(startTimeCannotBeInPastTest).required("Start time is required")
|
|
293
|
+
)
|
|
290
294
|
});
|
|
291
295
|
var locationSchema = yup.object().shape({
|
|
292
296
|
city: yup.string().required("City is required"),
|
|
@@ -323,46 +327,44 @@ var marketSchema = globalResourceSchema.shape({
|
|
|
323
327
|
dateTime: yup2.array().of(dateTimeSchema).required("DateTime is required"),
|
|
324
328
|
location: locationSchema,
|
|
325
329
|
provider: yup2.string().trim().min(3).required("Provider is required"),
|
|
326
|
-
stallApplicationInfo: yup2.object().shape({
|
|
327
|
-
applicationDeadlineHours: yup2.number().typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test(
|
|
328
|
-
"no-leading-zeros",
|
|
329
|
-
"",
|
|
330
|
-
noLeadingZeros("Application deadline hours")
|
|
331
|
-
),
|
|
332
|
-
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")),
|
|
333
|
-
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
334
|
-
paymentTarget: yup2.object().when("paymentMethod", (paymentMethod, schema) => {
|
|
335
|
-
const isBankTransfer = paymentMethod.includes(
|
|
336
|
-
"bank_transfer" /* BANK_TRANSFER */
|
|
337
|
-
);
|
|
338
|
-
if (!isBankTransfer) {
|
|
339
|
-
return schema.shape({
|
|
340
|
-
accountHolderName: yup2.string().notRequired(),
|
|
341
|
-
accountNumber: yup2.string().notRequired(),
|
|
342
|
-
link: yup2.string().trim().required("Link is required for PayPal/Stripe")
|
|
343
|
-
});
|
|
344
|
-
} else if (isBankTransfer) {
|
|
345
|
-
return schema.shape({
|
|
346
|
-
accountHolderName: yup2.string().trim().required("Account holder name is required for bank transfer"),
|
|
347
|
-
accountNumber: yup2.string().trim().required("Account number is required for bank transfer").matches(
|
|
348
|
-
nzBankAccountRegex,
|
|
349
|
-
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
350
|
-
),
|
|
351
|
-
link: yup2.string().notRequired()
|
|
352
|
-
});
|
|
353
|
-
} else {
|
|
354
|
-
return schema.shape({
|
|
355
|
-
accountHolderName: yup2.string().notRequired(),
|
|
356
|
-
accountNumber: yup2.string().notRequired(),
|
|
357
|
-
link: yup2.string().notRequired()
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
}),
|
|
361
|
-
rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
|
|
362
|
-
stallCapacity: yup2.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
|
|
363
|
-
}),
|
|
364
330
|
tags: yup2.array().of(yup2.string().defined()).nullable()
|
|
365
331
|
});
|
|
332
|
+
var marketInfoSchema = yup2.object().shape({
|
|
333
|
+
active: yup2.boolean().required("Active is required"),
|
|
334
|
+
applicationDeadlineHours: yup2.number().typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
|
|
335
|
+
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
336
|
+
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")),
|
|
337
|
+
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
338
|
+
paymentTarget: yup2.object().when("paymentMethod", (paymentMethod, schema) => {
|
|
339
|
+
const isBankTransfer = paymentMethod.includes(
|
|
340
|
+
"bank_transfer" /* BANK_TRANSFER */
|
|
341
|
+
);
|
|
342
|
+
if (!isBankTransfer) {
|
|
343
|
+
return schema.shape({
|
|
344
|
+
accountHolderName: yup2.string().notRequired(),
|
|
345
|
+
accountNumber: yup2.string().notRequired(),
|
|
346
|
+
link: yup2.string().trim().required("Link is required for PayPal/Stripe")
|
|
347
|
+
});
|
|
348
|
+
} else if (isBankTransfer) {
|
|
349
|
+
return schema.shape({
|
|
350
|
+
accountHolderName: yup2.string().trim().required("Account holder name is required for bank transfer"),
|
|
351
|
+
accountNumber: yup2.string().trim().required("Account number is required for bank transfer").matches(
|
|
352
|
+
nzBankAccountRegex,
|
|
353
|
+
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
354
|
+
),
|
|
355
|
+
link: yup2.string().notRequired()
|
|
356
|
+
});
|
|
357
|
+
} else {
|
|
358
|
+
return schema.shape({
|
|
359
|
+
accountHolderName: yup2.string().notRequired(),
|
|
360
|
+
accountNumber: yup2.string().notRequired(),
|
|
361
|
+
link: yup2.string().notRequired()
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
}),
|
|
365
|
+
rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
|
|
366
|
+
stallCapacity: yup2.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
|
|
367
|
+
});
|
|
366
368
|
|
|
367
369
|
// src/yupSchema/stallholder.ts
|
|
368
370
|
var yup3 = __toESM(require("yup"));
|
|
@@ -493,14 +495,12 @@ var defaultMarketFormValues = {
|
|
|
493
495
|
{
|
|
494
496
|
endDate: "04-05-2025",
|
|
495
497
|
endTime: "15:00",
|
|
496
|
-
marketPrice: 0,
|
|
497
498
|
startDate: "04-05-2025",
|
|
498
499
|
startTime: "09:00"
|
|
499
500
|
},
|
|
500
501
|
{
|
|
501
502
|
endDate: "05-05-2025",
|
|
502
503
|
endTime: "15:00",
|
|
503
|
-
marketPrice: 0,
|
|
504
504
|
startDate: "05-05-2025",
|
|
505
505
|
startTime: "09:00"
|
|
506
506
|
}
|
|
@@ -518,19 +518,36 @@ var defaultMarketFormValues = {
|
|
|
518
518
|
// Default type for GeoJSON
|
|
519
519
|
},
|
|
520
520
|
provider: "Provider name",
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
521
|
+
tags: null
|
|
522
|
+
};
|
|
523
|
+
var defaultMarketInfoFormValues = {
|
|
524
|
+
active: false,
|
|
525
|
+
applicationDeadlineHours: 0,
|
|
526
|
+
dateTime: [
|
|
527
|
+
{
|
|
528
|
+
endDate: "04-05-2025",
|
|
529
|
+
endTime: "15:00",
|
|
530
|
+
marketPrice: 0,
|
|
531
|
+
startDate: "04-05-2025",
|
|
532
|
+
startTime: "09:00"
|
|
529
533
|
},
|
|
530
|
-
|
|
531
|
-
|
|
534
|
+
{
|
|
535
|
+
endDate: "05-05-2025",
|
|
536
|
+
endTime: "15:00",
|
|
537
|
+
marketPrice: 0,
|
|
538
|
+
startDate: "05-05-2025",
|
|
539
|
+
startTime: "09:00"
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
paymentDueHours: 0,
|
|
543
|
+
paymentMethod: "",
|
|
544
|
+
paymentTarget: {
|
|
545
|
+
accountHolderName: "",
|
|
546
|
+
accountNumber: "",
|
|
547
|
+
link: ""
|
|
532
548
|
},
|
|
533
|
-
|
|
549
|
+
rejectionPolicy: "multi_date_allowed" /* MULTI_DATE_ALLOWED */,
|
|
550
|
+
stallCapacity: 0
|
|
534
551
|
};
|
|
535
552
|
var defaultStallholderFormValues = {
|
|
536
553
|
...globalDefaultValues,
|
|
@@ -716,7 +733,7 @@ function useStallholderApplyForm(data) {
|
|
|
716
733
|
};
|
|
717
734
|
}
|
|
718
735
|
|
|
719
|
-
// src/hooks/useMarketForm.ts
|
|
736
|
+
// src/hooks/market/useMarketForm.ts
|
|
720
737
|
var import_yup3 = require("@hookform/resolvers/yup");
|
|
721
738
|
var React3 = __toESM(require("react"));
|
|
722
739
|
var import_react_hook_form3 = require("react-hook-form");
|
|
@@ -751,7 +768,6 @@ function useMarketForm(data) {
|
|
|
751
768
|
promoCode: data.promoCode,
|
|
752
769
|
provider: data.provider,
|
|
753
770
|
region: data.region,
|
|
754
|
-
stallApplicationInfo: data.stallApplicationInfo,
|
|
755
771
|
tags: data.tags
|
|
756
772
|
});
|
|
757
773
|
} else {
|
|
@@ -773,7 +789,6 @@ function useMarketForm(data) {
|
|
|
773
789
|
name,
|
|
774
790
|
provider,
|
|
775
791
|
region,
|
|
776
|
-
stallApplicationInfo,
|
|
777
792
|
tags
|
|
778
793
|
} = getValues();
|
|
779
794
|
return {
|
|
@@ -793,7 +808,6 @@ function useMarketForm(data) {
|
|
|
793
808
|
name,
|
|
794
809
|
provider,
|
|
795
810
|
region,
|
|
796
|
-
stallApplicationInfo,
|
|
797
811
|
tags
|
|
798
812
|
},
|
|
799
813
|
formState: { errors },
|
|
@@ -804,10 +818,76 @@ function useMarketForm(data) {
|
|
|
804
818
|
};
|
|
805
819
|
}
|
|
806
820
|
|
|
807
|
-
// src/hooks/
|
|
821
|
+
// src/hooks/market/useMarketInfoForm.ts
|
|
808
822
|
var import_yup4 = require("@hookform/resolvers/yup");
|
|
809
823
|
var React4 = __toESM(require("react"));
|
|
810
824
|
var import_react_hook_form4 = require("react-hook-form");
|
|
825
|
+
function useMarketInfoForm(data) {
|
|
826
|
+
const {
|
|
827
|
+
control,
|
|
828
|
+
formState: { errors },
|
|
829
|
+
getValues,
|
|
830
|
+
handleSubmit,
|
|
831
|
+
reset,
|
|
832
|
+
setValue,
|
|
833
|
+
watch
|
|
834
|
+
} = (0, import_react_hook_form4.useForm)({
|
|
835
|
+
defaultValues: defaultMarketInfoFormValues,
|
|
836
|
+
resolver: (0, import_yup4.yupResolver)(marketInfoSchema)
|
|
837
|
+
});
|
|
838
|
+
React4.useEffect(() => {
|
|
839
|
+
if (data) {
|
|
840
|
+
reset({
|
|
841
|
+
_id: data._id,
|
|
842
|
+
active: data.active,
|
|
843
|
+
applicationDeadlineHours: data.applicationDeadlineHours,
|
|
844
|
+
dateTime: data.dateTime,
|
|
845
|
+
paymentDueHours: data.paymentDueHours,
|
|
846
|
+
paymentMethod: data.paymentMethod,
|
|
847
|
+
paymentTarget: data.paymentTarget,
|
|
848
|
+
rejectionPolicy: data.rejectionPolicy,
|
|
849
|
+
stallCapacity: data.stallCapacity
|
|
850
|
+
});
|
|
851
|
+
} else {
|
|
852
|
+
reset(defaultMarketInfoFormValues);
|
|
853
|
+
}
|
|
854
|
+
}, [data]);
|
|
855
|
+
const {
|
|
856
|
+
_id,
|
|
857
|
+
active,
|
|
858
|
+
applicationDeadlineHours,
|
|
859
|
+
dateTime,
|
|
860
|
+
paymentDueHours,
|
|
861
|
+
paymentMethod,
|
|
862
|
+
paymentTarget,
|
|
863
|
+
rejectionPolicy,
|
|
864
|
+
stallCapacity
|
|
865
|
+
} = getValues();
|
|
866
|
+
return {
|
|
867
|
+
control,
|
|
868
|
+
fields: {
|
|
869
|
+
_id,
|
|
870
|
+
active,
|
|
871
|
+
applicationDeadlineHours,
|
|
872
|
+
dateTime,
|
|
873
|
+
paymentDueHours,
|
|
874
|
+
paymentMethod,
|
|
875
|
+
paymentTarget,
|
|
876
|
+
rejectionPolicy,
|
|
877
|
+
stallCapacity
|
|
878
|
+
},
|
|
879
|
+
formState: { errors },
|
|
880
|
+
handleSubmit,
|
|
881
|
+
reset,
|
|
882
|
+
setValue,
|
|
883
|
+
watch
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
// src/hooks/useUserForm.ts
|
|
888
|
+
var import_yup5 = require("@hookform/resolvers/yup");
|
|
889
|
+
var React5 = __toESM(require("react"));
|
|
890
|
+
var import_react_hook_form5 = require("react-hook-form");
|
|
811
891
|
var defaultValues = {
|
|
812
892
|
active: false,
|
|
813
893
|
avatar: null,
|
|
@@ -829,11 +909,11 @@ function useUserForm(data) {
|
|
|
829
909
|
reset,
|
|
830
910
|
setValue,
|
|
831
911
|
watch
|
|
832
|
-
} = (0,
|
|
912
|
+
} = (0, import_react_hook_form5.useForm)({
|
|
833
913
|
defaultValues,
|
|
834
|
-
resolver: (0,
|
|
914
|
+
resolver: (0, import_yup5.yupResolver)(userSchema)
|
|
835
915
|
});
|
|
836
|
-
|
|
916
|
+
React5.useEffect(() => {
|
|
837
917
|
if (data) {
|
|
838
918
|
reset({
|
|
839
919
|
_id: data._id,
|
|
@@ -889,8 +969,8 @@ function useUserForm(data) {
|
|
|
889
969
|
}
|
|
890
970
|
|
|
891
971
|
// src/hooks/auth/useLoginForm.ts
|
|
892
|
-
var
|
|
893
|
-
var
|
|
972
|
+
var import_yup6 = require("@hookform/resolvers/yup");
|
|
973
|
+
var import_react_hook_form6 = require("react-hook-form");
|
|
894
974
|
var defaultValues2 = {
|
|
895
975
|
email: "",
|
|
896
976
|
password: ""
|
|
@@ -904,9 +984,9 @@ function useLoginForm() {
|
|
|
904
984
|
reset,
|
|
905
985
|
setValue,
|
|
906
986
|
watch
|
|
907
|
-
} = (0,
|
|
987
|
+
} = (0, import_react_hook_form6.useForm)({
|
|
908
988
|
defaultValues: defaultValues2,
|
|
909
|
-
resolver: (0,
|
|
989
|
+
resolver: (0, import_yup6.yupResolver)(loginSchema)
|
|
910
990
|
});
|
|
911
991
|
const { email, password } = getValues();
|
|
912
992
|
return {
|
|
@@ -924,8 +1004,8 @@ function useLoginForm() {
|
|
|
924
1004
|
}
|
|
925
1005
|
|
|
926
1006
|
// src/hooks/auth/useRegisterForm.ts
|
|
927
|
-
var
|
|
928
|
-
var
|
|
1007
|
+
var import_yup7 = require("@hookform/resolvers/yup");
|
|
1008
|
+
var import_react_hook_form7 = require("react-hook-form");
|
|
929
1009
|
var defaultValues3 = {
|
|
930
1010
|
email: "",
|
|
931
1011
|
firstName: "",
|
|
@@ -943,9 +1023,9 @@ function useRegisterForm() {
|
|
|
943
1023
|
reset,
|
|
944
1024
|
setValue,
|
|
945
1025
|
watch
|
|
946
|
-
} = (0,
|
|
1026
|
+
} = (0, import_react_hook_form7.useForm)({
|
|
947
1027
|
defaultValues: defaultValues3,
|
|
948
|
-
resolver: (0,
|
|
1028
|
+
resolver: (0, import_yup7.yupResolver)(registerSchema)
|
|
949
1029
|
});
|
|
950
1030
|
const { email, firstName, lastName, password, preferredRegion, role } = getValues();
|
|
951
1031
|
return {
|
|
@@ -967,8 +1047,8 @@ function useRegisterForm() {
|
|
|
967
1047
|
}
|
|
968
1048
|
|
|
969
1049
|
// src/hooks/auth/useRequestPasswordResetForm.ts
|
|
970
|
-
var
|
|
971
|
-
var
|
|
1050
|
+
var import_yup8 = require("@hookform/resolvers/yup");
|
|
1051
|
+
var import_react_hook_form8 = require("react-hook-form");
|
|
972
1052
|
var defaultValues4 = {
|
|
973
1053
|
email: ""
|
|
974
1054
|
};
|
|
@@ -981,9 +1061,9 @@ function useRequestPasswordResetForm() {
|
|
|
981
1061
|
reset,
|
|
982
1062
|
setValue,
|
|
983
1063
|
watch
|
|
984
|
-
} = (0,
|
|
1064
|
+
} = (0, import_react_hook_form8.useForm)({
|
|
985
1065
|
defaultValues: defaultValues4,
|
|
986
|
-
resolver: (0,
|
|
1066
|
+
resolver: (0, import_yup8.yupResolver)(requestPasswordResetSchema)
|
|
987
1067
|
});
|
|
988
1068
|
const { email } = getValues();
|
|
989
1069
|
return {
|
|
@@ -1000,8 +1080,8 @@ function useRequestPasswordResetForm() {
|
|
|
1000
1080
|
}
|
|
1001
1081
|
|
|
1002
1082
|
// src/hooks/auth/useValidateTokenForm.ts
|
|
1003
|
-
var
|
|
1004
|
-
var
|
|
1083
|
+
var import_yup9 = require("@hookform/resolvers/yup");
|
|
1084
|
+
var import_react_hook_form9 = require("react-hook-form");
|
|
1005
1085
|
var defaultValues5 = {
|
|
1006
1086
|
email: "",
|
|
1007
1087
|
token: ""
|
|
@@ -1015,9 +1095,9 @@ function useValidateTokenForm() {
|
|
|
1015
1095
|
reset,
|
|
1016
1096
|
setValue,
|
|
1017
1097
|
watch
|
|
1018
|
-
} = (0,
|
|
1098
|
+
} = (0, import_react_hook_form9.useForm)({
|
|
1019
1099
|
defaultValues: defaultValues5,
|
|
1020
|
-
resolver: (0,
|
|
1100
|
+
resolver: (0, import_yup9.yupResolver)(validateTokenSchema)
|
|
1021
1101
|
});
|
|
1022
1102
|
const { email, token } = getValues();
|
|
1023
1103
|
return {
|
|
@@ -1035,8 +1115,8 @@ function useValidateTokenForm() {
|
|
|
1035
1115
|
}
|
|
1036
1116
|
|
|
1037
1117
|
// src/hooks/auth/useResetPasswordForm.ts
|
|
1038
|
-
var
|
|
1039
|
-
var
|
|
1118
|
+
var import_yup10 = require("@hookform/resolvers/yup");
|
|
1119
|
+
var import_react_hook_form10 = require("react-hook-form");
|
|
1040
1120
|
var defaultValues6 = {
|
|
1041
1121
|
confirmPassword: "",
|
|
1042
1122
|
email: "",
|
|
@@ -1051,9 +1131,9 @@ function useResetPasswordForm() {
|
|
|
1051
1131
|
reset,
|
|
1052
1132
|
setValue,
|
|
1053
1133
|
watch
|
|
1054
|
-
} = (0,
|
|
1134
|
+
} = (0, import_react_hook_form10.useForm)({
|
|
1055
1135
|
defaultValues: defaultValues6,
|
|
1056
|
-
resolver: (0,
|
|
1136
|
+
resolver: (0, import_yup10.yupResolver)(resetPasswordSchema)
|
|
1057
1137
|
});
|
|
1058
1138
|
const { confirmPassword, email, password } = getValues();
|
|
1059
1139
|
return {
|
|
@@ -1073,12 +1153,14 @@ function useResetPasswordForm() {
|
|
|
1073
1153
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1074
1154
|
0 && (module.exports = {
|
|
1075
1155
|
defaultMarketFormValues,
|
|
1156
|
+
defaultMarketInfoFormValues,
|
|
1076
1157
|
defaultStallholderApplyFormValues,
|
|
1077
1158
|
defaultStallholderFormValues,
|
|
1078
1159
|
globalDefaultValues,
|
|
1079
1160
|
useLocationSearch,
|
|
1080
1161
|
useLoginForm,
|
|
1081
1162
|
useMarketForm,
|
|
1163
|
+
useMarketInfoForm,
|
|
1082
1164
|
useRegisterForm,
|
|
1083
1165
|
useRequestPasswordResetForm,
|
|
1084
1166
|
useResetPasswordForm,
|