@timardex/cluemart-shared 1.0.16 → 1.0.17
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-B8kYikwQ.d.mts → global-B6OE9jjE.d.mts} +20 -9
- package/dist/{global-B7gB8cvC.d.ts → global-Diphaotm.d.ts} +20 -9
- package/dist/graphql/index.cjs +94 -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 +91 -16
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +159 -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 +157 -82
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +302 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +48 -11
- package/dist/index.d.ts +48 -11
- package/dist/index.mjs +297 -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,43 @@ 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
|
+
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")),
|
|
334
|
+
dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
|
|
335
|
+
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")),
|
|
336
|
+
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
337
|
+
paymentTarget: yup2.object().when("paymentMethod", (paymentMethod, schema) => {
|
|
338
|
+
const isBankTransfer = paymentMethod.includes(
|
|
339
|
+
"bank_transfer" /* BANK_TRANSFER */
|
|
340
|
+
);
|
|
341
|
+
if (!isBankTransfer) {
|
|
342
|
+
return schema.shape({
|
|
343
|
+
accountHolderName: yup2.string().notRequired(),
|
|
344
|
+
accountNumber: yup2.string().notRequired(),
|
|
345
|
+
link: yup2.string().trim().required("Link is required for PayPal/Stripe")
|
|
346
|
+
});
|
|
347
|
+
} else if (isBankTransfer) {
|
|
348
|
+
return schema.shape({
|
|
349
|
+
accountHolderName: yup2.string().trim().required("Account holder name is required for bank transfer"),
|
|
350
|
+
accountNumber: yup2.string().trim().required("Account number is required for bank transfer").matches(
|
|
351
|
+
nzBankAccountRegex,
|
|
352
|
+
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
353
|
+
),
|
|
354
|
+
link: yup2.string().notRequired()
|
|
355
|
+
});
|
|
356
|
+
} else {
|
|
357
|
+
return schema.shape({
|
|
358
|
+
accountHolderName: yup2.string().notRequired(),
|
|
359
|
+
accountNumber: yup2.string().notRequired(),
|
|
360
|
+
link: yup2.string().notRequired()
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}),
|
|
364
|
+
rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
|
|
365
|
+
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"))
|
|
366
|
+
});
|
|
366
367
|
|
|
367
368
|
// src/yupSchema/stallholder.ts
|
|
368
369
|
var yup3 = __toESM(require("yup"));
|
|
@@ -493,14 +494,12 @@ var defaultMarketFormValues = {
|
|
|
493
494
|
{
|
|
494
495
|
endDate: "04-05-2025",
|
|
495
496
|
endTime: "15:00",
|
|
496
|
-
marketPrice: 0,
|
|
497
497
|
startDate: "04-05-2025",
|
|
498
498
|
startTime: "09:00"
|
|
499
499
|
},
|
|
500
500
|
{
|
|
501
501
|
endDate: "05-05-2025",
|
|
502
502
|
endTime: "15:00",
|
|
503
|
-
marketPrice: 0,
|
|
504
503
|
startDate: "05-05-2025",
|
|
505
504
|
startTime: "09:00"
|
|
506
505
|
}
|
|
@@ -518,19 +517,35 @@ var defaultMarketFormValues = {
|
|
|
518
517
|
// Default type for GeoJSON
|
|
519
518
|
},
|
|
520
519
|
provider: "Provider name",
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
520
|
+
tags: null
|
|
521
|
+
};
|
|
522
|
+
var defaultMarketInfoFormValues = {
|
|
523
|
+
applicationDeadlineHours: 0,
|
|
524
|
+
dateTime: [
|
|
525
|
+
{
|
|
526
|
+
endDate: "04-05-2025",
|
|
527
|
+
endTime: "15:00",
|
|
528
|
+
marketPrice: 0,
|
|
529
|
+
startDate: "04-05-2025",
|
|
530
|
+
startTime: "09:00"
|
|
529
531
|
},
|
|
530
|
-
|
|
531
|
-
|
|
532
|
+
{
|
|
533
|
+
endDate: "05-05-2025",
|
|
534
|
+
endTime: "15:00",
|
|
535
|
+
marketPrice: 0,
|
|
536
|
+
startDate: "05-05-2025",
|
|
537
|
+
startTime: "09:00"
|
|
538
|
+
}
|
|
539
|
+
],
|
|
540
|
+
paymentDueHours: 0,
|
|
541
|
+
paymentMethod: "",
|
|
542
|
+
paymentTarget: {
|
|
543
|
+
accountHolderName: "",
|
|
544
|
+
accountNumber: "",
|
|
545
|
+
link: ""
|
|
532
546
|
},
|
|
533
|
-
|
|
547
|
+
rejectionPolicy: "multi_date_allowed" /* MULTI_DATE_ALLOWED */,
|
|
548
|
+
stallCapacity: 0
|
|
534
549
|
};
|
|
535
550
|
var defaultStallholderFormValues = {
|
|
536
551
|
...globalDefaultValues,
|
|
@@ -716,7 +731,7 @@ function useStallholderApplyForm(data) {
|
|
|
716
731
|
};
|
|
717
732
|
}
|
|
718
733
|
|
|
719
|
-
// src/hooks/useMarketForm.ts
|
|
734
|
+
// src/hooks/market/useMarketForm.ts
|
|
720
735
|
var import_yup3 = require("@hookform/resolvers/yup");
|
|
721
736
|
var React3 = __toESM(require("react"));
|
|
722
737
|
var import_react_hook_form3 = require("react-hook-form");
|
|
@@ -751,7 +766,6 @@ function useMarketForm(data) {
|
|
|
751
766
|
promoCode: data.promoCode,
|
|
752
767
|
provider: data.provider,
|
|
753
768
|
region: data.region,
|
|
754
|
-
stallApplicationInfo: data.stallApplicationInfo,
|
|
755
769
|
tags: data.tags
|
|
756
770
|
});
|
|
757
771
|
} else {
|
|
@@ -773,7 +787,6 @@ function useMarketForm(data) {
|
|
|
773
787
|
name,
|
|
774
788
|
provider,
|
|
775
789
|
region,
|
|
776
|
-
stallApplicationInfo,
|
|
777
790
|
tags
|
|
778
791
|
} = getValues();
|
|
779
792
|
return {
|
|
@@ -793,7 +806,6 @@ function useMarketForm(data) {
|
|
|
793
806
|
name,
|
|
794
807
|
provider,
|
|
795
808
|
region,
|
|
796
|
-
stallApplicationInfo,
|
|
797
809
|
tags
|
|
798
810
|
},
|
|
799
811
|
formState: { errors },
|
|
@@ -804,10 +816,73 @@ function useMarketForm(data) {
|
|
|
804
816
|
};
|
|
805
817
|
}
|
|
806
818
|
|
|
807
|
-
// src/hooks/
|
|
819
|
+
// src/hooks/market/useMarketInfoForm.ts
|
|
808
820
|
var import_yup4 = require("@hookform/resolvers/yup");
|
|
809
821
|
var React4 = __toESM(require("react"));
|
|
810
822
|
var import_react_hook_form4 = require("react-hook-form");
|
|
823
|
+
function useMarketInfoForm(data) {
|
|
824
|
+
const {
|
|
825
|
+
control,
|
|
826
|
+
formState: { errors },
|
|
827
|
+
getValues,
|
|
828
|
+
handleSubmit,
|
|
829
|
+
reset,
|
|
830
|
+
setValue,
|
|
831
|
+
watch
|
|
832
|
+
} = (0, import_react_hook_form4.useForm)({
|
|
833
|
+
defaultValues: defaultMarketInfoFormValues,
|
|
834
|
+
resolver: (0, import_yup4.yupResolver)(marketInfoSchema)
|
|
835
|
+
});
|
|
836
|
+
React4.useEffect(() => {
|
|
837
|
+
if (data) {
|
|
838
|
+
reset({
|
|
839
|
+
_id: data._id,
|
|
840
|
+
applicationDeadlineHours: data.applicationDeadlineHours,
|
|
841
|
+
dateTime: data.dateTime,
|
|
842
|
+
paymentDueHours: data.paymentDueHours,
|
|
843
|
+
paymentMethod: data.paymentMethod,
|
|
844
|
+
paymentTarget: data.paymentTarget,
|
|
845
|
+
rejectionPolicy: data.rejectionPolicy,
|
|
846
|
+
stallCapacity: data.stallCapacity
|
|
847
|
+
});
|
|
848
|
+
} else {
|
|
849
|
+
reset(defaultMarketInfoFormValues);
|
|
850
|
+
}
|
|
851
|
+
}, [data]);
|
|
852
|
+
const {
|
|
853
|
+
_id,
|
|
854
|
+
applicationDeadlineHours,
|
|
855
|
+
dateTime,
|
|
856
|
+
paymentDueHours,
|
|
857
|
+
paymentMethod,
|
|
858
|
+
paymentTarget,
|
|
859
|
+
rejectionPolicy,
|
|
860
|
+
stallCapacity
|
|
861
|
+
} = getValues();
|
|
862
|
+
return {
|
|
863
|
+
control,
|
|
864
|
+
fields: {
|
|
865
|
+
_id,
|
|
866
|
+
applicationDeadlineHours,
|
|
867
|
+
dateTime,
|
|
868
|
+
paymentDueHours,
|
|
869
|
+
paymentMethod,
|
|
870
|
+
paymentTarget,
|
|
871
|
+
rejectionPolicy,
|
|
872
|
+
stallCapacity
|
|
873
|
+
},
|
|
874
|
+
formState: { errors },
|
|
875
|
+
handleSubmit,
|
|
876
|
+
reset,
|
|
877
|
+
setValue,
|
|
878
|
+
watch
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
// src/hooks/useUserForm.ts
|
|
883
|
+
var import_yup5 = require("@hookform/resolvers/yup");
|
|
884
|
+
var React5 = __toESM(require("react"));
|
|
885
|
+
var import_react_hook_form5 = require("react-hook-form");
|
|
811
886
|
var defaultValues = {
|
|
812
887
|
active: false,
|
|
813
888
|
avatar: null,
|
|
@@ -829,11 +904,11 @@ function useUserForm(data) {
|
|
|
829
904
|
reset,
|
|
830
905
|
setValue,
|
|
831
906
|
watch
|
|
832
|
-
} = (0,
|
|
907
|
+
} = (0, import_react_hook_form5.useForm)({
|
|
833
908
|
defaultValues,
|
|
834
|
-
resolver: (0,
|
|
909
|
+
resolver: (0, import_yup5.yupResolver)(userSchema)
|
|
835
910
|
});
|
|
836
|
-
|
|
911
|
+
React5.useEffect(() => {
|
|
837
912
|
if (data) {
|
|
838
913
|
reset({
|
|
839
914
|
_id: data._id,
|
|
@@ -889,8 +964,8 @@ function useUserForm(data) {
|
|
|
889
964
|
}
|
|
890
965
|
|
|
891
966
|
// src/hooks/auth/useLoginForm.ts
|
|
892
|
-
var
|
|
893
|
-
var
|
|
967
|
+
var import_yup6 = require("@hookform/resolvers/yup");
|
|
968
|
+
var import_react_hook_form6 = require("react-hook-form");
|
|
894
969
|
var defaultValues2 = {
|
|
895
970
|
email: "",
|
|
896
971
|
password: ""
|
|
@@ -904,9 +979,9 @@ function useLoginForm() {
|
|
|
904
979
|
reset,
|
|
905
980
|
setValue,
|
|
906
981
|
watch
|
|
907
|
-
} = (0,
|
|
982
|
+
} = (0, import_react_hook_form6.useForm)({
|
|
908
983
|
defaultValues: defaultValues2,
|
|
909
|
-
resolver: (0,
|
|
984
|
+
resolver: (0, import_yup6.yupResolver)(loginSchema)
|
|
910
985
|
});
|
|
911
986
|
const { email, password } = getValues();
|
|
912
987
|
return {
|
|
@@ -924,8 +999,8 @@ function useLoginForm() {
|
|
|
924
999
|
}
|
|
925
1000
|
|
|
926
1001
|
// src/hooks/auth/useRegisterForm.ts
|
|
927
|
-
var
|
|
928
|
-
var
|
|
1002
|
+
var import_yup7 = require("@hookform/resolvers/yup");
|
|
1003
|
+
var import_react_hook_form7 = require("react-hook-form");
|
|
929
1004
|
var defaultValues3 = {
|
|
930
1005
|
email: "",
|
|
931
1006
|
firstName: "",
|
|
@@ -943,9 +1018,9 @@ function useRegisterForm() {
|
|
|
943
1018
|
reset,
|
|
944
1019
|
setValue,
|
|
945
1020
|
watch
|
|
946
|
-
} = (0,
|
|
1021
|
+
} = (0, import_react_hook_form7.useForm)({
|
|
947
1022
|
defaultValues: defaultValues3,
|
|
948
|
-
resolver: (0,
|
|
1023
|
+
resolver: (0, import_yup7.yupResolver)(registerSchema)
|
|
949
1024
|
});
|
|
950
1025
|
const { email, firstName, lastName, password, preferredRegion, role } = getValues();
|
|
951
1026
|
return {
|
|
@@ -967,8 +1042,8 @@ function useRegisterForm() {
|
|
|
967
1042
|
}
|
|
968
1043
|
|
|
969
1044
|
// src/hooks/auth/useRequestPasswordResetForm.ts
|
|
970
|
-
var
|
|
971
|
-
var
|
|
1045
|
+
var import_yup8 = require("@hookform/resolvers/yup");
|
|
1046
|
+
var import_react_hook_form8 = require("react-hook-form");
|
|
972
1047
|
var defaultValues4 = {
|
|
973
1048
|
email: ""
|
|
974
1049
|
};
|
|
@@ -981,9 +1056,9 @@ function useRequestPasswordResetForm() {
|
|
|
981
1056
|
reset,
|
|
982
1057
|
setValue,
|
|
983
1058
|
watch
|
|
984
|
-
} = (0,
|
|
1059
|
+
} = (0, import_react_hook_form8.useForm)({
|
|
985
1060
|
defaultValues: defaultValues4,
|
|
986
|
-
resolver: (0,
|
|
1061
|
+
resolver: (0, import_yup8.yupResolver)(requestPasswordResetSchema)
|
|
987
1062
|
});
|
|
988
1063
|
const { email } = getValues();
|
|
989
1064
|
return {
|
|
@@ -1000,8 +1075,8 @@ function useRequestPasswordResetForm() {
|
|
|
1000
1075
|
}
|
|
1001
1076
|
|
|
1002
1077
|
// src/hooks/auth/useValidateTokenForm.ts
|
|
1003
|
-
var
|
|
1004
|
-
var
|
|
1078
|
+
var import_yup9 = require("@hookform/resolvers/yup");
|
|
1079
|
+
var import_react_hook_form9 = require("react-hook-form");
|
|
1005
1080
|
var defaultValues5 = {
|
|
1006
1081
|
email: "",
|
|
1007
1082
|
token: ""
|
|
@@ -1015,9 +1090,9 @@ function useValidateTokenForm() {
|
|
|
1015
1090
|
reset,
|
|
1016
1091
|
setValue,
|
|
1017
1092
|
watch
|
|
1018
|
-
} = (0,
|
|
1093
|
+
} = (0, import_react_hook_form9.useForm)({
|
|
1019
1094
|
defaultValues: defaultValues5,
|
|
1020
|
-
resolver: (0,
|
|
1095
|
+
resolver: (0, import_yup9.yupResolver)(validateTokenSchema)
|
|
1021
1096
|
});
|
|
1022
1097
|
const { email, token } = getValues();
|
|
1023
1098
|
return {
|
|
@@ -1035,8 +1110,8 @@ function useValidateTokenForm() {
|
|
|
1035
1110
|
}
|
|
1036
1111
|
|
|
1037
1112
|
// src/hooks/auth/useResetPasswordForm.ts
|
|
1038
|
-
var
|
|
1039
|
-
var
|
|
1113
|
+
var import_yup10 = require("@hookform/resolvers/yup");
|
|
1114
|
+
var import_react_hook_form10 = require("react-hook-form");
|
|
1040
1115
|
var defaultValues6 = {
|
|
1041
1116
|
confirmPassword: "",
|
|
1042
1117
|
email: "",
|
|
@@ -1051,9 +1126,9 @@ function useResetPasswordForm() {
|
|
|
1051
1126
|
reset,
|
|
1052
1127
|
setValue,
|
|
1053
1128
|
watch
|
|
1054
|
-
} = (0,
|
|
1129
|
+
} = (0, import_react_hook_form10.useForm)({
|
|
1055
1130
|
defaultValues: defaultValues6,
|
|
1056
|
-
resolver: (0,
|
|
1131
|
+
resolver: (0, import_yup10.yupResolver)(resetPasswordSchema)
|
|
1057
1132
|
});
|
|
1058
1133
|
const { confirmPassword, email, password } = getValues();
|
|
1059
1134
|
return {
|
|
@@ -1073,12 +1148,14 @@ function useResetPasswordForm() {
|
|
|
1073
1148
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1074
1149
|
0 && (module.exports = {
|
|
1075
1150
|
defaultMarketFormValues,
|
|
1151
|
+
defaultMarketInfoFormValues,
|
|
1076
1152
|
defaultStallholderApplyFormValues,
|
|
1077
1153
|
defaultStallholderFormValues,
|
|
1078
1154
|
globalDefaultValues,
|
|
1079
1155
|
useLocationSearch,
|
|
1080
1156
|
useLoginForm,
|
|
1081
1157
|
useMarketForm,
|
|
1158
|
+
useMarketInfoForm,
|
|
1082
1159
|
useRegisterForm,
|
|
1083
1160
|
useRequestPasswordResetForm,
|
|
1084
1161
|
useResetPasswordForm,
|