@timardex/cluemart-shared 1.3.14 → 1.3.15
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/{chunk-2ZPH2KHC.mjs → chunk-3JRVDUAS.mjs} +1 -1
- package/dist/{chunk-2ZPH2KHC.mjs.map → chunk-3JRVDUAS.mjs.map} +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/hooks/index.cjs +6 -2
- 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 +7 -3
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/{post-MoaerbbL.d.mts → post-D9qmUck8.d.mts} +1 -1
- package/dist/{post-C2utkFw4.d.ts → post-DEOKZuaM.d.ts} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/tester.ts","../src/types/ad.ts","../src/types/post.ts"],"sourcesContent":["import { EnumOSPlatform, EnumResourceType } from \"src/enums\";\n\nimport { Category, CreateFormData } from \"./global\";\n\nexport enum OrganizedMarketCount {\n ONE = \"One\",\n TWO_TO_THREE = \"Two_to_Three\",\n FOUR_TO_FIVE = \"Four_to_Five\",\n MORE_THAN_FIVE = \"More_than_Five\",\n}\n\nexport enum VendorSellingFrequency {\n TWICE_A_WEEK = \"Two_to_Three_times_a_week\",\n ONCE_A_WEEK = \"Once_a_week\",\n ONE_TO_TWO_TIMES_A_MONTH = \"One_to_Two_times_a_month\",\n LESS_OFTEN = \"Less_often\",\n}\n\nexport enum OrganizerMarketFrequency {\n WEEKLY = \"Weekly\",\n FORTNIGHTLY = \"Fortnightly\",\n MONTHLY = \"Monthly\",\n SEASONAL = \"Seasonal\",\n}\n\nexport type TesterVendor = {\n categories: Category[];\n marketsAttended: { name: string; city: string }[];\n productsOrServices: string;\n sellingFrequency: VendorSellingFrequency;\n yearlySellingApprox: number;\n questionary: {\n appearInVideoIntroduction?: boolean; // Q15 (Yes / No)\n applyToAtLeastOneMarket: boolean; // Q11\n completeFeedbackQuestionnaire: boolean; // Q13\n excitementAboutApp?: string; // Q17\n sendPhotoForSocialMedia?: boolean; // Q14 (Yes / No)\n socialMediaFeatureReason?: string; // Q16 (optional free text)\n testingPeriodConcerns?: string; // Q19 (optional)\n tryVisitorFeatures: boolean; // Q12\n uploadStallProfileFirstWeek: boolean; // Q10\n usefulnessExpectations?: string; // Q18\n };\n};\n\nexport type TesterEvent = {\n /** Organizer background */\n organizedMarketCount: OrganizedMarketCount;\n markets: {\n name: string;\n cityOrVenue: string;\n frequency: OrganizerMarketFrequency;\n averageStallCount: number;\n }[];\n questionary: {\n allowMarketingAppearance?: boolean;\n completeFinalQuestionnaire: boolean;\n dailyCoordinationNeeds?: string;\n interestedInCharityInitiative?: boolean;\n inviteAtLeastFiveStallholders: boolean;\n manageApplicationsAndCommunication: boolean;\n organizerExpectations?: string;\n registerMarketsFirstWeek: boolean;\n spaceForClueMart?: boolean;\n };\n};\n\nexport interface TesterFormData {\n businessName: string;\n consents: {\n privacyConsent: boolean;\n betaTestConsent: boolean;\n };\n email: string;\n event?: TesterEvent | null;\n firstName: string;\n lastName: string;\n mobilePhone: string;\n osType: EnumOSPlatform;\n region: string;\n resourceType: EnumResourceType;\n vendor?: TesterVendor | null;\n}\n\nexport type CreateTesterFormData = CreateFormData<TesterFormData>;\n\nexport interface TesterType extends TesterFormData {\n _id: string;\n active: boolean;\n approved: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport interface AdFormData {\n active: boolean;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clui?: string | null;\n end: Date; // ISO date string\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n showOn: EnumAdShowOn;\n socialMedia?: SocialMediaType[] | null;\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion?: string | null;\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n","import { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_POLL = \"daily_poll\",\n}\n\nexport enum EnumPostContentType {\n COVER = \"cover\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostContentCover = {\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: string[];\n };\n};\n\nexport type PostContentData =\n | PostContentCover\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData: PostContentData;\n contentOrder: number;\n contentType: EnumPostContentType;\n};\n\nexport interface PostFormData {\n content: PostContentFormData[];\n postType: EnumPostType;\n tags?: string[] | null;\n title: string;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n _id: string;\n contentData: Omit<PostContentData, \"imagesUpload\" | \"coverUpload\">;\n};\n\nexport type PostType = Omit<PostFormData, \"content\"> & {\n _id: string;\n
|
|
1
|
+
{"version":3,"sources":["../src/types/tester.ts","../src/types/ad.ts","../src/types/post.ts"],"sourcesContent":["import { EnumOSPlatform, EnumResourceType } from \"src/enums\";\n\nimport { Category, CreateFormData } from \"./global\";\n\nexport enum OrganizedMarketCount {\n ONE = \"One\",\n TWO_TO_THREE = \"Two_to_Three\",\n FOUR_TO_FIVE = \"Four_to_Five\",\n MORE_THAN_FIVE = \"More_than_Five\",\n}\n\nexport enum VendorSellingFrequency {\n TWICE_A_WEEK = \"Two_to_Three_times_a_week\",\n ONCE_A_WEEK = \"Once_a_week\",\n ONE_TO_TWO_TIMES_A_MONTH = \"One_to_Two_times_a_month\",\n LESS_OFTEN = \"Less_often\",\n}\n\nexport enum OrganizerMarketFrequency {\n WEEKLY = \"Weekly\",\n FORTNIGHTLY = \"Fortnightly\",\n MONTHLY = \"Monthly\",\n SEASONAL = \"Seasonal\",\n}\n\nexport type TesterVendor = {\n categories: Category[];\n marketsAttended: { name: string; city: string }[];\n productsOrServices: string;\n sellingFrequency: VendorSellingFrequency;\n yearlySellingApprox: number;\n questionary: {\n appearInVideoIntroduction?: boolean; // Q15 (Yes / No)\n applyToAtLeastOneMarket: boolean; // Q11\n completeFeedbackQuestionnaire: boolean; // Q13\n excitementAboutApp?: string; // Q17\n sendPhotoForSocialMedia?: boolean; // Q14 (Yes / No)\n socialMediaFeatureReason?: string; // Q16 (optional free text)\n testingPeriodConcerns?: string; // Q19 (optional)\n tryVisitorFeatures: boolean; // Q12\n uploadStallProfileFirstWeek: boolean; // Q10\n usefulnessExpectations?: string; // Q18\n };\n};\n\nexport type TesterEvent = {\n /** Organizer background */\n organizedMarketCount: OrganizedMarketCount;\n markets: {\n name: string;\n cityOrVenue: string;\n frequency: OrganizerMarketFrequency;\n averageStallCount: number;\n }[];\n questionary: {\n allowMarketingAppearance?: boolean;\n completeFinalQuestionnaire: boolean;\n dailyCoordinationNeeds?: string;\n interestedInCharityInitiative?: boolean;\n inviteAtLeastFiveStallholders: boolean;\n manageApplicationsAndCommunication: boolean;\n organizerExpectations?: string;\n registerMarketsFirstWeek: boolean;\n spaceForClueMart?: boolean;\n };\n};\n\nexport interface TesterFormData {\n businessName: string;\n consents: {\n privacyConsent: boolean;\n betaTestConsent: boolean;\n };\n email: string;\n event?: TesterEvent | null;\n firstName: string;\n lastName: string;\n mobilePhone: string;\n osType: EnumOSPlatform;\n region: string;\n resourceType: EnumResourceType;\n vendor?: TesterVendor | null;\n}\n\nexport type CreateTesterFormData = CreateFormData<TesterFormData>;\n\nexport interface TesterType extends TesterFormData {\n _id: string;\n active: boolean;\n approved: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport interface AdFormData {\n active: boolean;\n adStyle: EnumAdStyle;\n adType: EnumAdType;\n clui?: string | null;\n end: Date; // ISO date string\n resourceCover: string;\n resourceDescription: string;\n resourceId: string;\n resourceLogo?: string | null;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n showOn: EnumAdShowOn;\n socialMedia?: SocialMediaType[] | null;\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion?: string | null;\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n","import { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_POLL = \"daily_poll\",\n}\n\nexport enum EnumPostContentType {\n COVER = \"cover\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostContentCover = {\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: string[];\n };\n};\n\nexport type PostContentData =\n | PostContentCover\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData: PostContentData;\n contentOrder: number;\n contentType: EnumPostContentType;\n};\n\nexport interface PostFormData {\n active: boolean;\n content: PostContentFormData[];\n postType: EnumPostType;\n tags?: string[] | null;\n title: string;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n _id: string;\n contentData: Omit<PostContentData, \"imagesUpload\" | \"coverUpload\">;\n};\n\nexport type PostType = Omit<PostFormData, \"content\"> & {\n _id: string;\n content: PostContentType;\n createdAt: Date;\n deletedAt: Date | null;\n updatedAt: Date | null;\n};\n"],"mappings":";AAIO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,SAAM;AACN,EAAAA,sBAAA,kBAAe;AACf,EAAAA,sBAAA,kBAAe;AACf,EAAAA,sBAAA,oBAAiB;AAJP,SAAAA;AAAA,GAAA;AAOL,IAAK,yBAAL,kBAAKC,4BAAL;AACL,EAAAA,wBAAA,kBAAe;AACf,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,8BAA2B;AAC3B,EAAAA,wBAAA,gBAAa;AAJH,SAAAA;AAAA,GAAA;AAOL,IAAK,2BAAL,kBAAKC,8BAAL;AACL,EAAAA,0BAAA,YAAS;AACT,EAAAA,0BAAA,iBAAc;AACd,EAAAA,0BAAA,aAAU;AACV,EAAAA,0BAAA,cAAW;AAJD,SAAAA;AAAA,GAAA;;;ACdL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAOL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;;;ACpBL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,gBAAa;AAHH,SAAAA;AAAA,GAAA;AAML,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,WAAQ;AALE,SAAAA;AAAA,GAAA;","names":["OrganizedMarketCount","VendorSellingFrequency","OrganizerMarketFrequency","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumPostType","EnumPostContentType"]}
|
package/dist/graphql/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
3
3
|
import { C as ChatType, N as NotificationType, a as NotificationCount, R as ResourceActivityType } from '../resourceActivities-CJRTZROh.mjs';
|
|
4
4
|
import { E as EventType, b as EventInfoType, c as RelationType, d as ResourceConnectionsType, V as VendorType, e as VendorInfoType, U as UserLicenceType } from '../global-O7RsWypG.mjs';
|
|
5
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, P as PartnerType, a as PostType, b as EnumPostType } from '../post-
|
|
5
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, P as PartnerType, a as PostType, b as EnumPostType } from '../post-D9qmUck8.mjs';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _apollo_client from '@apollo/client';
|
|
|
2
2
|
import { EnumResourceType } from '../enums/index.js';
|
|
3
3
|
import { C as ChatType, N as NotificationType, a as NotificationCount, R as ResourceActivityType } from '../resourceActivities-CVwxvGeC.js';
|
|
4
4
|
import { E as EventType, b as EventInfoType, c as RelationType, d as ResourceConnectionsType, V as VendorType, e as VendorInfoType, U as UserLicenceType } from '../global-DSwmP6sp.js';
|
|
5
|
-
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, P as PartnerType, a as PostType, b as EnumPostType } from '../post-
|
|
5
|
+
import { T as TesterType, U as UserType, A as AdType, E as EnumAdStatus, S as SubscriptionStatusData, P as PartnerType, a as PostType, b as EnumPostType } from '../post-DEOKZuaM.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -943,9 +943,10 @@ var postContentSchema = yup9.object().shape({
|
|
|
943
943
|
contentType: yup9.mixed().oneOf(Object.values(EnumPostContentType)).required()
|
|
944
944
|
});
|
|
945
945
|
var postSchema = yup9.object().shape({
|
|
946
|
+
active: yup9.boolean().required(),
|
|
946
947
|
content: yup9.array().of(postContentSchema).required(),
|
|
947
948
|
postType: yup9.mixed().oneOf(Object.values(EnumPostType)).required(),
|
|
948
|
-
tags: yup9.array().of(yup9.string()).nullable().optional(),
|
|
949
|
+
tags: yup9.array().of(yup9.string().required()).nullable().optional(),
|
|
949
950
|
title: yup9.string().required()
|
|
950
951
|
});
|
|
951
952
|
|
|
@@ -2004,6 +2005,7 @@ var import_yup15 = require("@hookform/resolvers/yup");
|
|
|
2004
2005
|
var import_react4 = __toESM(require("react"));
|
|
2005
2006
|
var import_react_hook_form15 = require("react-hook-form");
|
|
2006
2007
|
var defaultValues10 = {
|
|
2008
|
+
active: true,
|
|
2007
2009
|
content: [],
|
|
2008
2010
|
postType: "daily_meets" /* DAILY_MEETS */,
|
|
2009
2011
|
tags: [],
|
|
@@ -2025,6 +2027,7 @@ function usePostform(data) {
|
|
|
2025
2027
|
import_react4.default.useEffect(() => {
|
|
2026
2028
|
if (data) {
|
|
2027
2029
|
reset({
|
|
2030
|
+
active: data.active,
|
|
2028
2031
|
content: data.content,
|
|
2029
2032
|
postType: data.postType,
|
|
2030
2033
|
tags: data.tags,
|
|
@@ -2034,10 +2037,11 @@ function usePostform(data) {
|
|
|
2034
2037
|
reset(defaultValues10);
|
|
2035
2038
|
}
|
|
2036
2039
|
}, [data]);
|
|
2037
|
-
const { content, postType, tags, title } = getValues();
|
|
2040
|
+
const { active, content, postType, tags, title } = getValues();
|
|
2038
2041
|
return {
|
|
2039
2042
|
control,
|
|
2040
2043
|
fields: {
|
|
2044
|
+
active,
|
|
2041
2045
|
content,
|
|
2042
2046
|
postType,
|
|
2043
2047
|
tags,
|