@timardex/cluemart-shared 1.4.64 → 1.4.65
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-tx3-QbA9.d.mts → auth-DP4rp8kt.d.mts} +1 -1
- package/dist/{auth-n3P2BSCb.d.ts → auth-x87uDA8A.d.ts} +1 -1
- package/dist/{chunk-END7A5PN.mjs → chunk-D4QRASAQ.mjs} +1 -1
- package/dist/chunk-D4QRASAQ.mjs.map +1 -0
- package/dist/{chunk-IN5G5WAE.mjs → chunk-DY47LWPZ.mjs} +2 -2
- package/dist/{chunk-ONMJIUN6.mjs → chunk-NBMLTBYC.mjs} +10 -14
- package/dist/{chunk-ONMJIUN6.mjs.map → chunk-NBMLTBYC.mjs.map} +1 -1
- package/dist/{chunk-5V6JNIPQ.mjs → chunk-WKBWAH6Y.mjs} +3 -3
- package/dist/{chunk-5V6JNIPQ.mjs.map → chunk-WKBWAH6Y.mjs.map} +1 -1
- package/dist/formFields/index.cjs +2 -2
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/{global-DVDoQmBT.d.ts → global-Cdcu76UE.d.ts} +1 -1
- package/dist/{global-BCvKcmiT.d.mts → global-GMlnFp7I.d.mts} +1 -1
- package/dist/graphql/index.cjs +9 -13
- 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 +1 -1
- package/dist/hooks/index.cjs +54 -102
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +33 -77
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +54 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -13
- package/dist/index.d.ts +12 -13
- package/dist/index.mjs +54 -102
- package/dist/index.mjs.map +1 -1
- package/dist/{post-CvS5wUjm.d.mts → post-CP-lCMe6.d.mts} +13 -14
- package/dist/{post-ByxIVi36.d.ts → post-LlElRzUr.d.ts} +13 -14
- package/dist/{resourceActivities-UOB8Bo7j.d.ts → resourceActivities-Qpi5PTJD.d.ts} +1 -1
- package/dist/{resourceActivities-BKd6q2ey.d.mts → resourceActivities-sdIDFwub.d.mts} +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-END7A5PN.mjs.map +0 -1
- /package/dist/{chunk-IN5G5WAE.mjs.map → chunk-DY47LWPZ.mjs.map} +0 -0
package/dist/graphql/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
2
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
3
|
-
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-
|
|
4
|
-
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
3
|
+
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-sdIDFwub.mjs';
|
|
4
|
+
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-GMlnFp7I.mjs';
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-CP-lCMe6.mjs';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
2
|
import { EnumResourceType } from '../enums/index.js';
|
|
3
|
-
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-
|
|
4
|
-
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-
|
|
5
|
-
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-
|
|
3
|
+
import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-Qpi5PTJD.js';
|
|
4
|
+
import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-Cdcu76UE.js';
|
|
5
|
+
import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType } from '../post-LlElRzUr.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
8
8
|
declare const useAdminUpdateResourceType: () => {
|
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -317,8 +317,8 @@ var licenseNiceNames = {
|
|
|
317
317
|
["pro_vendor" /* PRO_VENDOR */]: "Pro Stallholder",
|
|
318
318
|
["standard_event" /* STANDARD_EVENT */]: "Standard Event",
|
|
319
319
|
["standard_vendor" /* STANDARD_VENDOR */]: "Standard Stallholder",
|
|
320
|
-
["pro_plus_event" /* PRO_PLUS_EVENT */]: "Pro+ Event",
|
|
321
|
-
["pro_plus_vendor" /* PRO_PLUS_VENDOR */]: "Pro+ Stallholder",
|
|
320
|
+
["pro_plus_event" /* PRO_PLUS_EVENT */]: "Pro+Ads Event",
|
|
321
|
+
["pro_plus_vendor" /* PRO_PLUS_VENDOR */]: "Pro+Ads Stallholder",
|
|
322
322
|
["standard_partner" /* STANDARD_PARTNER */]: "Partner"
|
|
323
323
|
};
|
|
324
324
|
var cluemartSocialMedia = [
|
|
@@ -797,12 +797,12 @@ var validateVerificationTokenSchema = yup5.object().shape({
|
|
|
797
797
|
var yup6 = __toESM(require("yup"));
|
|
798
798
|
|
|
799
799
|
// src/types/ad.ts
|
|
800
|
-
var EnumAdShowOn = /* @__PURE__ */ ((
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
return
|
|
800
|
+
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn3) => {
|
|
801
|
+
EnumAdShowOn3["EVENTS_PAGE"] = "Events_page";
|
|
802
|
+
EnumAdShowOn3["FRONT_PAGE"] = "Front_page";
|
|
803
|
+
EnumAdShowOn3["PARTNERS_PAGE"] = "Partners_page";
|
|
804
|
+
EnumAdShowOn3["VENDORS_PAGE"] = "Vendors_page";
|
|
805
|
+
return EnumAdShowOn3;
|
|
806
806
|
})(EnumAdShowOn || {});
|
|
807
807
|
var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
|
|
808
808
|
EnumAdStatus2["ACTIVE"] = "Active";
|
|
@@ -810,23 +810,20 @@ var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
|
|
|
810
810
|
EnumAdStatus2["EXPIRED"] = "Expired";
|
|
811
811
|
return EnumAdStatus2;
|
|
812
812
|
})(EnumAdStatus || {});
|
|
813
|
-
var EnumAdType = /* @__PURE__ */ ((
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
return
|
|
813
|
+
var EnumAdType = /* @__PURE__ */ ((EnumAdType3) => {
|
|
814
|
+
EnumAdType3["SPONSORED"] = "Sponsored";
|
|
815
|
+
EnumAdType3["FREE"] = "Free";
|
|
816
|
+
return EnumAdType3;
|
|
817
817
|
})(EnumAdType || {});
|
|
818
|
-
var EnumAdStyle = /* @__PURE__ */ ((
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
return
|
|
818
|
+
var EnumAdStyle = /* @__PURE__ */ ((EnumAdStyle3) => {
|
|
819
|
+
EnumAdStyle3["BLOOM"] = "Bloom";
|
|
820
|
+
EnumAdStyle3["RISE"] = "Rise";
|
|
821
|
+
return EnumAdStyle3;
|
|
822
822
|
})(EnumAdStyle || {});
|
|
823
823
|
|
|
824
824
|
// src/yupSchema/ad.ts
|
|
825
825
|
var adSchema = yup6.object().shape({
|
|
826
826
|
active: yup6.boolean().required("Active status is required"),
|
|
827
|
-
adStyle: yup6.mixed().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
|
|
828
|
-
adType: yup6.mixed().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
|
|
829
|
-
clui: yup6.string().nullable().notRequired(),
|
|
830
827
|
end: yup6.date().required("End date is required").test("is-future-date", "End date must be in the future", (value) => {
|
|
831
828
|
if (!value) return false;
|
|
832
829
|
const endDate = new Date(value);
|
|
@@ -844,18 +841,16 @@ var adSchema = yup6.object().shape({
|
|
|
844
841
|
}
|
|
845
842
|
)
|
|
846
843
|
}),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
).required("Display location is required"),
|
|
858
|
-
socialMedia: yup6.array().of(socialMediaSchema).nullable().optional(),
|
|
844
|
+
resource: yup6.object().shape({
|
|
845
|
+
adDescription: yup6.string().trim().required("Ad description is required").max(100, "Ad description must be at most 100 characters"),
|
|
846
|
+
adImage: yup6.string().required("Ad image is required"),
|
|
847
|
+
adStyle: yup6.mixed().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
|
|
848
|
+
adTitle: yup6.string().trim().required("Ad title is required").max(50, "Ad title must be at most 50 characters"),
|
|
849
|
+
adType: yup6.mixed().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
|
|
850
|
+
resourceId: yup6.string().required("Resource ID is required"),
|
|
851
|
+
resourceType: yup6.mixed().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource Type is required")
|
|
852
|
+
}).required("Resource information is required"),
|
|
853
|
+
showOn: yup6.array().of(yup6.mixed().oneOf(Object.values(EnumAdShowOn)).required()).min(1, "At least one display location is required").required("Display location is required"),
|
|
859
854
|
status: yup6.mixed().oneOf(Object.values(EnumAdStatus)).required("Ad status is required"),
|
|
860
855
|
start: yup6.date().when("status", {
|
|
861
856
|
is: (status) => status !== "Active" /* ACTIVE */,
|
|
@@ -865,7 +860,7 @@ var adSchema = yup6.object().shape({
|
|
|
865
860
|
}),
|
|
866
861
|
otherwise: () => yup6.date().nullable().notRequired()
|
|
867
862
|
}),
|
|
868
|
-
targetRegion: yup6.string().
|
|
863
|
+
targetRegion: yup6.array().of(yup6.string().required()).min(1, "At least one target region is required").required("Target region is required")
|
|
869
864
|
});
|
|
870
865
|
|
|
871
866
|
// src/yupSchema/partner.ts
|
|
@@ -3778,29 +3773,25 @@ var AD_FIELDS_FRAGMENT = import_client40.gql`
|
|
|
3778
3773
|
fragment AdFields on AdType {
|
|
3779
3774
|
_id
|
|
3780
3775
|
active
|
|
3781
|
-
adStyle
|
|
3782
|
-
adType
|
|
3783
3776
|
clicks
|
|
3784
3777
|
createdAt
|
|
3785
3778
|
end
|
|
3786
3779
|
impressions
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
socialMedia {
|
|
3796
|
-
...SocialMediaFields
|
|
3780
|
+
resource {
|
|
3781
|
+
adDescription
|
|
3782
|
+
adImage
|
|
3783
|
+
adStyle
|
|
3784
|
+
adTitle
|
|
3785
|
+
adType
|
|
3786
|
+
resourceId
|
|
3787
|
+
resourceType
|
|
3797
3788
|
}
|
|
3789
|
+
showOn
|
|
3798
3790
|
start
|
|
3799
3791
|
status
|
|
3800
3792
|
targetRegion
|
|
3801
3793
|
updatedAt
|
|
3802
3794
|
}
|
|
3803
|
-
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
3804
3795
|
`;
|
|
3805
3796
|
var GET_ADS = import_client40.gql`
|
|
3806
3797
|
query getAds {
|
|
@@ -5038,27 +5029,25 @@ var import_react2 = __toESM(require("react"));
|
|
|
5038
5029
|
var import_react_hook_form12 = require("react-hook-form");
|
|
5039
5030
|
var defaultValues8 = {
|
|
5040
5031
|
active: true,
|
|
5041
|
-
adStyle: "Bloom" /* BLOOM */,
|
|
5042
|
-
// default to bloom
|
|
5043
|
-
adType: "Sponsored" /* SPONSORED */,
|
|
5044
|
-
// default to sponsored
|
|
5045
|
-
clui: null,
|
|
5046
5032
|
end: /* @__PURE__ */ new Date(),
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5033
|
+
resource: {
|
|
5034
|
+
adDescription: "",
|
|
5035
|
+
adImage: "",
|
|
5036
|
+
adStyle: "",
|
|
5037
|
+
// default to bloom
|
|
5038
|
+
adTitle: "",
|
|
5039
|
+
adType: "",
|
|
5040
|
+
// default to sponsored
|
|
5041
|
+
resourceId: "",
|
|
5042
|
+
resourceType: ""
|
|
5043
|
+
// default to event
|
|
5044
|
+
},
|
|
5045
|
+
showOn: [""],
|
|
5056
5046
|
// default to front page
|
|
5057
|
-
socialMedia: [],
|
|
5058
5047
|
start: /* @__PURE__ */ new Date(),
|
|
5059
5048
|
status: "Paused" /* PAUSED */,
|
|
5060
5049
|
// default to paused
|
|
5061
|
-
targetRegion:
|
|
5050
|
+
targetRegion: []
|
|
5062
5051
|
};
|
|
5063
5052
|
function useAdForm(data) {
|
|
5064
5053
|
const {
|
|
@@ -5077,18 +5066,9 @@ function useAdForm(data) {
|
|
|
5077
5066
|
if (data) {
|
|
5078
5067
|
reset({
|
|
5079
5068
|
active: data.active,
|
|
5080
|
-
adStyle: data.adStyle,
|
|
5081
|
-
adType: data.adType,
|
|
5082
|
-
clui: data.clui,
|
|
5083
5069
|
end: data.end,
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
resourceId: data.resourceId,
|
|
5087
|
-
resourceLogo: data.resourceLogo,
|
|
5088
|
-
resourceName: data.resourceName,
|
|
5089
|
-
resourceRegion: data.resourceRegion,
|
|
5090
|
-
resourceType: data.resourceType,
|
|
5091
|
-
socialMedia: data.socialMedia,
|
|
5070
|
+
resource: data.resource,
|
|
5071
|
+
showOn: data.showOn,
|
|
5092
5072
|
start: data.start,
|
|
5093
5073
|
status: data.status,
|
|
5094
5074
|
targetRegion: data.targetRegion
|
|
@@ -5097,42 +5077,14 @@ function useAdForm(data) {
|
|
|
5097
5077
|
reset(defaultValues8);
|
|
5098
5078
|
}
|
|
5099
5079
|
}, [data]);
|
|
5100
|
-
const {
|
|
5101
|
-
active,
|
|
5102
|
-
adStyle,
|
|
5103
|
-
adType,
|
|
5104
|
-
clui,
|
|
5105
|
-
end,
|
|
5106
|
-
resourceCover,
|
|
5107
|
-
resourceDescription,
|
|
5108
|
-
resourceId,
|
|
5109
|
-
resourceLogo,
|
|
5110
|
-
resourceName,
|
|
5111
|
-
resourceRegion,
|
|
5112
|
-
resourceType,
|
|
5113
|
-
showOn,
|
|
5114
|
-
socialMedia: socialMedia2,
|
|
5115
|
-
start,
|
|
5116
|
-
status,
|
|
5117
|
-
targetRegion
|
|
5118
|
-
} = getValues();
|
|
5080
|
+
const { active, end, resource, showOn, start, status, targetRegion } = getValues();
|
|
5119
5081
|
return {
|
|
5120
5082
|
control,
|
|
5121
5083
|
fields: {
|
|
5122
5084
|
active,
|
|
5123
|
-
adStyle,
|
|
5124
|
-
adType,
|
|
5125
|
-
clui,
|
|
5126
5085
|
end,
|
|
5127
|
-
|
|
5128
|
-
resourceDescription,
|
|
5129
|
-
resourceId,
|
|
5130
|
-
resourceLogo,
|
|
5131
|
-
resourceName,
|
|
5132
|
-
resourceRegion,
|
|
5133
|
-
resourceType,
|
|
5086
|
+
resource,
|
|
5134
5087
|
showOn,
|
|
5135
|
-
socialMedia: socialMedia2,
|
|
5136
5088
|
start,
|
|
5137
5089
|
status,
|
|
5138
5090
|
targetRegion
|