@timardex/cluemart-shared 1.2.65 → 1.2.68
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/ad--4RgHfBN.d.ts +83 -0
- package/dist/ad-ByXz9Km3.d.mts +83 -0
- package/dist/{auth-BwtjPUgO.d.ts → auth-ChIm_Rn9.d.ts} +1 -1
- package/dist/{auth-DaiySFU6.d.mts → auth-gyDaskvq.d.mts} +1 -1
- package/dist/{chunk-N625BZKR.mjs → chunk-ILRVLTWY.mjs} +1 -1
- package/dist/{chunk-N625BZKR.mjs.map → chunk-ILRVLTWY.mjs.map} +1 -1
- package/dist/formFields/index.cjs +2 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +3 -2
- package/dist/formFields/index.d.ts +3 -2
- package/dist/formFields/index.mjs +1 -0
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/{global-CKf55A-q.d.mts → global-Q8FB4ZfD.d.mts} +97 -7
- package/dist/{global-BY8seqWN.d.ts → global-X7Gs8dR2.d.ts} +97 -7
- package/dist/graphql/index.cjs +8 -7
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +3 -3
- package/dist/graphql/index.d.ts +3 -3
- package/dist/graphql/index.mjs +8 -7
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +15 -10
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -5
- package/dist/hooks/index.d.ts +5 -5
- package/dist/hooks/index.mjs +15 -10
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +25 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +108 -100
- package/dist/index.d.ts +108 -100
- package/dist/index.mjs +23 -16
- package/dist/index.mjs.map +1 -1
- package/dist/{resourceActivities-DO97TmNs.d.mts → resourceActivities-DB-fx51l.d.mts} +3 -3
- package/dist/{resourceActivities-BkGGnxjl.d.ts → resourceActivities-Ezt7CDPH.d.ts} +3 -3
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ad-CogBHjto.d.ts +0 -166
- package/dist/ad-VhDIYwfz.d.mts +0 -166
package/dist/hooks/index.cjs
CHANGED
|
@@ -47,7 +47,7 @@ __export(hooks_exports, {
|
|
|
47
47
|
useRegisterForm: () => useRegisterForm,
|
|
48
48
|
useRequestPasswordResetForm: () => useRequestPasswordResetForm,
|
|
49
49
|
useResetPasswordForm: () => useResetPasswordForm,
|
|
50
|
-
|
|
50
|
+
useTesterForm: () => useTesterForm,
|
|
51
51
|
useUserForm: () => useUserForm,
|
|
52
52
|
useValidateVerificationTokenForm: () => useValidateVerificationTokenForm,
|
|
53
53
|
useVendorForm: () => useVendorForm,
|
|
@@ -459,9 +459,9 @@ var globalResourceSchema = yup.object().shape({
|
|
|
459
459
|
associates: yup.array().of(
|
|
460
460
|
yup.object().shape({
|
|
461
461
|
email: emailRequiredSchema,
|
|
462
|
-
resourceId: yup.string().required(),
|
|
463
|
-
resourceType: yup.mixed().oneOf(Object.values(EnumResourceType)).required(),
|
|
464
|
-
|
|
462
|
+
resourceId: yup.string().label("Resource ID").required("Resource ID is required"),
|
|
463
|
+
resourceType: yup.mixed().oneOf(Object.values(EnumResourceType)).label("Resource Type").required("Resource Type is required"),
|
|
464
|
+
licenceType: yup.mixed().oneOf(Object.values(EnumUserLicence)).label("Licence Type").required("Licence Type is required")
|
|
465
465
|
})
|
|
466
466
|
).nullable().optional()
|
|
467
467
|
});
|
|
@@ -655,9 +655,10 @@ var validateVerificationTokenSchema = yup5.object().shape({
|
|
|
655
655
|
verificationToken: yup5.string().required("Verification code is required").matches(/^\d{6}$/, "Verification code must be exactly 6 digits")
|
|
656
656
|
});
|
|
657
657
|
|
|
658
|
-
// src/yupSchema/
|
|
658
|
+
// src/yupSchema/tester.ts
|
|
659
659
|
var yup6 = __toESM(require("yup"));
|
|
660
|
-
var
|
|
660
|
+
var testerSchema = yup6.object().shape({
|
|
661
|
+
approved: yup6.boolean().required("Approval status is required"),
|
|
661
662
|
categories: yup6.array().nullable().when("resourceType", {
|
|
662
663
|
is: "vendor" /* VENDOR */,
|
|
663
664
|
then: () => categorySchema.min(1, "Category list must contain at least one item").required("Categories required"),
|
|
@@ -1455,11 +1456,12 @@ function useResetPasswordForm() {
|
|
|
1455
1456
|
};
|
|
1456
1457
|
}
|
|
1457
1458
|
|
|
1458
|
-
// src/hooks/
|
|
1459
|
+
// src/hooks/useTesterForm.ts
|
|
1459
1460
|
var import_yup11 = require("@hookform/resolvers/yup");
|
|
1460
1461
|
var import_react = __toESM(require("react"));
|
|
1461
1462
|
var import_react_hook_form11 = require("react-hook-form");
|
|
1462
1463
|
var defaultValues7 = {
|
|
1464
|
+
approved: false,
|
|
1463
1465
|
categories: null,
|
|
1464
1466
|
companyName: "",
|
|
1465
1467
|
email: "",
|
|
@@ -1469,7 +1471,7 @@ var defaultValues7 = {
|
|
|
1469
1471
|
region: "",
|
|
1470
1472
|
resourceType: ""
|
|
1471
1473
|
};
|
|
1472
|
-
function
|
|
1474
|
+
function useTesterForm(data) {
|
|
1473
1475
|
const {
|
|
1474
1476
|
control,
|
|
1475
1477
|
formState: { errors },
|
|
@@ -1480,11 +1482,12 @@ function useTestersForm(data) {
|
|
|
1480
1482
|
watch
|
|
1481
1483
|
} = (0, import_react_hook_form11.useForm)({
|
|
1482
1484
|
defaultValues: defaultValues7,
|
|
1483
|
-
resolver: (0, import_yup11.yupResolver)(
|
|
1485
|
+
resolver: (0, import_yup11.yupResolver)(testerSchema)
|
|
1484
1486
|
});
|
|
1485
1487
|
import_react.default.useEffect(() => {
|
|
1486
1488
|
if (data) {
|
|
1487
1489
|
reset({
|
|
1490
|
+
approved: data.approved,
|
|
1488
1491
|
categories: data.categories,
|
|
1489
1492
|
companyName: data.companyName,
|
|
1490
1493
|
email: data.email,
|
|
@@ -1499,6 +1502,7 @@ function useTestersForm(data) {
|
|
|
1499
1502
|
}
|
|
1500
1503
|
}, [data]);
|
|
1501
1504
|
const {
|
|
1505
|
+
approved,
|
|
1502
1506
|
categories,
|
|
1503
1507
|
companyName,
|
|
1504
1508
|
email,
|
|
@@ -1511,6 +1515,7 @@ function useTestersForm(data) {
|
|
|
1511
1515
|
return {
|
|
1512
1516
|
control,
|
|
1513
1517
|
fields: {
|
|
1518
|
+
approved,
|
|
1514
1519
|
categories,
|
|
1515
1520
|
companyName,
|
|
1516
1521
|
email,
|
|
@@ -1803,7 +1808,7 @@ function usePartnerForm(data) {
|
|
|
1803
1808
|
useRegisterForm,
|
|
1804
1809
|
useRequestPasswordResetForm,
|
|
1805
1810
|
useResetPasswordForm,
|
|
1806
|
-
|
|
1811
|
+
useTesterForm,
|
|
1807
1812
|
useUserForm,
|
|
1808
1813
|
useValidateVerificationTokenForm,
|
|
1809
1814
|
useVendorForm,
|