@timardex/cluemart-shared 1.3.11 → 1.3.13
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/graphql/index.cjs +17 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +10 -2
- package/dist/graphql/index.d.ts +10 -2
- package/dist/graphql/index.mjs +16 -0
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +25 -17
- 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 +25 -17
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +42 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +41 -17
- package/dist/index.mjs.map +1 -1
- package/dist/{post-Df5kAhEE.d.ts → post-CL2oI3Yl.d.ts} +1 -1
- package/dist/{post-tVcpbEDX.d.mts → post-CifJA7KI.d.mts} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as LocationType, f as VendorFormData, g as CreateVendorFormData, h as VendorInfoFormData, i as CreateVendorInfoFormData, j as EventFormData, k as CreateEventFormData, l as EventInfoFormData, m as CreateEventInfoFormData, B as BaseResourceTypeFormData } from '../global-O7RsWypG.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { c as UserFormData, C as CreateUserFormData, d as PartnerFormData, e as TesterFormData, f as CreateTesterFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData } from '../post-CifJA7KI.mjs';
|
|
3
3
|
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-DpfaLmTU.mjs';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
import '../enums/index.mjs';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as LocationType, f as VendorFormData, g as CreateVendorFormData, h as VendorInfoFormData, i as CreateVendorInfoFormData, j as EventFormData, k as CreateEventFormData, l as EventInfoFormData, m as CreateEventInfoFormData, B as BaseResourceTypeFormData } from '../global-DSwmP6sp.js';
|
|
2
|
-
import {
|
|
2
|
+
import { c as UserFormData, C as CreateUserFormData, d as PartnerFormData, e as TesterFormData, f as CreateTesterFormData, g as AdFormData, h as CreateAdFormData, i as CreatePartnerFormData, j as PostFormData, k as CreatePostFormData } from '../post-CL2oI3Yl.js';
|
|
3
3
|
import { C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, c as CreateValidateVerificationTokenFormData, d as CreateResetPasswordFormData, e as ContactUsFormData, f as CreateContactUsFormData } from '../auth-xXqB6t_8.js';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
import '../enums/index.js';
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -662,25 +662,33 @@ var listContentSchema = yup9.object({
|
|
|
662
662
|
title: yup9.string().optional()
|
|
663
663
|
}).required()
|
|
664
664
|
});
|
|
665
|
-
var contentDataSchema = yup9.
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
665
|
+
var contentDataSchema = yup9.mixed().required("Content data is required").test(
|
|
666
|
+
"contentData-by-type",
|
|
667
|
+
"Invalid content data for content type",
|
|
668
|
+
function(value) {
|
|
669
|
+
const { contentType } = this.parent;
|
|
670
|
+
const schema = (() => {
|
|
671
|
+
switch (contentType) {
|
|
672
|
+
case "cover" /* COVER */:
|
|
673
|
+
return coverContentSchema;
|
|
674
|
+
case "textarea" /* TEXTAREA */:
|
|
675
|
+
return textareaContentSchema;
|
|
676
|
+
case "image" /* IMAGE */:
|
|
677
|
+
return imagesContentSchema;
|
|
678
|
+
case "video" /* VIDEO */:
|
|
679
|
+
return videoContentSchema;
|
|
680
|
+
case "list" /* LIST */:
|
|
681
|
+
return listContentSchema;
|
|
682
|
+
default:
|
|
683
|
+
return null;
|
|
684
|
+
}
|
|
685
|
+
})();
|
|
686
|
+
if (!schema) return false;
|
|
687
|
+
return schema.isValidSync(value);
|
|
680
688
|
}
|
|
681
|
-
|
|
689
|
+
);
|
|
682
690
|
var postContentSchema = yup9.object().shape({
|
|
683
|
-
contentData: contentDataSchema
|
|
691
|
+
contentData: contentDataSchema,
|
|
684
692
|
contentOrder: yup9.number().min(0).required(),
|
|
685
693
|
contentType: yup9.mixed().oneOf(Object.values(EnumPostContentType)).required()
|
|
686
694
|
});
|