@timardex/cluemart-shared 1.2.66 → 1.2.69
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-BChCn4Ka.d.ts → ad-BijiW7Nn.d.ts} +9 -8
- package/dist/{ad-DC4CQ8Gp.d.mts → ad-DITy2OMe.d.mts} +9 -8
- package/dist/{auth-BBzFtZee.d.mts → auth-DCIrfDwB.d.mts} +1 -1
- package/dist/{auth-DqNTAngW.d.ts → auth-iE9sd_mq.d.ts} +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-JXYCto5-.d.ts → global-08vcDEuE.d.ts} +21 -14
- package/dist/{global-WNM-jttW.d.mts → global-DhZY519g.d.mts} +21 -14
- 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 +31 -13
- 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 +17 -8
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +40 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +33 -24
- package/dist/index.d.ts +33 -24
- package/dist/index.mjs +38 -28
- 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/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,
|
|
@@ -168,11 +168,11 @@ var EnumFoodFlavor = /* @__PURE__ */ ((EnumFoodFlavor3) => {
|
|
|
168
168
|
EnumFoodFlavor3["SWEET"] = "Sweet";
|
|
169
169
|
return EnumFoodFlavor3;
|
|
170
170
|
})(EnumFoodFlavor || {});
|
|
171
|
-
var EnumResourceType = /* @__PURE__ */ ((
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return
|
|
171
|
+
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
172
|
+
EnumResourceType2["EVENT"] = "event";
|
|
173
|
+
EnumResourceType2["VENDOR"] = "vendor";
|
|
174
|
+
EnumResourceType2["PARTNER"] = "partner";
|
|
175
|
+
return EnumResourceType2;
|
|
176
176
|
})(EnumResourceType || {});
|
|
177
177
|
var EnumEventType = /* @__PURE__ */ ((EnumEventType2) => {
|
|
178
178
|
EnumEventType2["MARKET"] = "Market";
|
|
@@ -213,6 +213,16 @@ var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
|
|
|
213
213
|
EnumRegions2["Wellington"] = "Wellington";
|
|
214
214
|
return EnumRegions2;
|
|
215
215
|
})(EnumRegions || {});
|
|
216
|
+
var EnumUserLicence = /* @__PURE__ */ ((EnumUserLicence2) => {
|
|
217
|
+
EnumUserLicence2["PRO_EVENT"] = "pro_event";
|
|
218
|
+
EnumUserLicence2["PRO_PLUS_EVENT"] = "pro_plus_event";
|
|
219
|
+
EnumUserLicence2["PRO_PLUS_VENDOR"] = "pro_plus_vendor";
|
|
220
|
+
EnumUserLicence2["PRO_VENDOR"] = "pro_vendor";
|
|
221
|
+
EnumUserLicence2["STANDARD_EVENT"] = "standard_event";
|
|
222
|
+
EnumUserLicence2["STANDARD_VENDOR"] = "standard_vendor";
|
|
223
|
+
EnumUserLicence2["STANDARD_PARTNER"] = "standard_partner";
|
|
224
|
+
return EnumUserLicence2;
|
|
225
|
+
})(EnumUserLicence || {});
|
|
216
226
|
var EnumUserRole = /* @__PURE__ */ ((EnumUserRole2) => {
|
|
217
227
|
EnumUserRole2["ADMIN"] = "admin";
|
|
218
228
|
EnumUserRole2["CUSTOMER"] = "customer";
|
|
@@ -448,7 +458,10 @@ var globalResourceSchema = yup.object().shape({
|
|
|
448
458
|
socialMedia: yup.array().of(socialMediaSchema).nullable().optional(),
|
|
449
459
|
associates: yup.array().of(
|
|
450
460
|
yup.object().shape({
|
|
451
|
-
email: emailRequiredSchema
|
|
461
|
+
email: emailRequiredSchema,
|
|
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")
|
|
452
465
|
})
|
|
453
466
|
).nullable().optional()
|
|
454
467
|
});
|
|
@@ -642,9 +655,10 @@ var validateVerificationTokenSchema = yup5.object().shape({
|
|
|
642
655
|
verificationToken: yup5.string().required("Verification code is required").matches(/^\d{6}$/, "Verification code must be exactly 6 digits")
|
|
643
656
|
});
|
|
644
657
|
|
|
645
|
-
// src/yupSchema/
|
|
658
|
+
// src/yupSchema/tester.ts
|
|
646
659
|
var yup6 = __toESM(require("yup"));
|
|
647
|
-
var
|
|
660
|
+
var testerSchema = yup6.object().shape({
|
|
661
|
+
approved: yup6.boolean().required("Approval status is required"),
|
|
648
662
|
categories: yup6.array().nullable().when("resourceType", {
|
|
649
663
|
is: "vendor" /* VENDOR */,
|
|
650
664
|
then: () => categorySchema.min(1, "Category list must contain at least one item").required("Categories required"),
|
|
@@ -1442,11 +1456,12 @@ function useResetPasswordForm() {
|
|
|
1442
1456
|
};
|
|
1443
1457
|
}
|
|
1444
1458
|
|
|
1445
|
-
// src/hooks/
|
|
1459
|
+
// src/hooks/useTesterForm.ts
|
|
1446
1460
|
var import_yup11 = require("@hookform/resolvers/yup");
|
|
1447
1461
|
var import_react = __toESM(require("react"));
|
|
1448
1462
|
var import_react_hook_form11 = require("react-hook-form");
|
|
1449
1463
|
var defaultValues7 = {
|
|
1464
|
+
approved: false,
|
|
1450
1465
|
categories: null,
|
|
1451
1466
|
companyName: "",
|
|
1452
1467
|
email: "",
|
|
@@ -1456,7 +1471,7 @@ var defaultValues7 = {
|
|
|
1456
1471
|
region: "",
|
|
1457
1472
|
resourceType: ""
|
|
1458
1473
|
};
|
|
1459
|
-
function
|
|
1474
|
+
function useTesterForm(data) {
|
|
1460
1475
|
const {
|
|
1461
1476
|
control,
|
|
1462
1477
|
formState: { errors },
|
|
@@ -1467,11 +1482,12 @@ function useTestersForm(data) {
|
|
|
1467
1482
|
watch
|
|
1468
1483
|
} = (0, import_react_hook_form11.useForm)({
|
|
1469
1484
|
defaultValues: defaultValues7,
|
|
1470
|
-
resolver: (0, import_yup11.yupResolver)(
|
|
1485
|
+
resolver: (0, import_yup11.yupResolver)(testerSchema)
|
|
1471
1486
|
});
|
|
1472
1487
|
import_react.default.useEffect(() => {
|
|
1473
1488
|
if (data) {
|
|
1474
1489
|
reset({
|
|
1490
|
+
approved: data.approved,
|
|
1475
1491
|
categories: data.categories,
|
|
1476
1492
|
companyName: data.companyName,
|
|
1477
1493
|
email: data.email,
|
|
@@ -1486,6 +1502,7 @@ function useTestersForm(data) {
|
|
|
1486
1502
|
}
|
|
1487
1503
|
}, [data]);
|
|
1488
1504
|
const {
|
|
1505
|
+
approved,
|
|
1489
1506
|
categories,
|
|
1490
1507
|
companyName,
|
|
1491
1508
|
email,
|
|
@@ -1498,6 +1515,7 @@ function useTestersForm(data) {
|
|
|
1498
1515
|
return {
|
|
1499
1516
|
control,
|
|
1500
1517
|
fields: {
|
|
1518
|
+
approved,
|
|
1501
1519
|
categories,
|
|
1502
1520
|
companyName,
|
|
1503
1521
|
email,
|
|
@@ -1790,7 +1808,7 @@ function usePartnerForm(data) {
|
|
|
1790
1808
|
useRegisterForm,
|
|
1791
1809
|
useRequestPasswordResetForm,
|
|
1792
1810
|
useResetPasswordForm,
|
|
1793
|
-
|
|
1811
|
+
useTesterForm,
|
|
1794
1812
|
useUserForm,
|
|
1795
1813
|
useValidateVerificationTokenForm,
|
|
1796
1814
|
useVendorForm,
|