@timardex/cluemart-shared 1.4.64 → 1.4.66
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-IN5G5WAE.mjs → chunk-DY47LWPZ.mjs} +2 -2
- package/dist/{chunk-END7A5PN.mjs → chunk-N62G35WH.mjs} +1 -1
- package/dist/chunk-N62G35WH.mjs.map +1 -0
- package/dist/{chunk-ONMJIUN6.mjs → chunk-USGCDP2Q.mjs} +12 -14
- package/dist/{chunk-ONMJIUN6.mjs.map → chunk-USGCDP2Q.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 +11 -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 +60 -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 +37 -77
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +60 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.mjs +60 -102
- package/dist/index.mjs.map +1 -1
- package/dist/{post-ByxIVi36.d.ts → post-CKBw7-Mb.d.ts} +13 -12
- package/dist/{post-CvS5wUjm.d.mts → post-D6bduN9H.d.mts} +13 -12
- 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-D6bduN9H.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-CKBw7-Mb.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,18 @@ var adSchema = yup6.object().shape({
|
|
|
844
841
|
}
|
|
845
842
|
)
|
|
846
843
|
}),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
"Please select
|
|
857
|
-
).required("
|
|
858
|
-
|
|
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
|
+
resourceName: yup6.string().required("Resource name is required"),
|
|
852
|
+
resourceRegion: yup6.string().required("Resource region is required"),
|
|
853
|
+
resourceType: yup6.mixed().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource Type is required")
|
|
854
|
+
}).required("Resource information is required"),
|
|
855
|
+
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
856
|
status: yup6.mixed().oneOf(Object.values(EnumAdStatus)).required("Ad status is required"),
|
|
860
857
|
start: yup6.date().when("status", {
|
|
861
858
|
is: (status) => status !== "Active" /* ACTIVE */,
|
|
@@ -865,7 +862,7 @@ var adSchema = yup6.object().shape({
|
|
|
865
862
|
}),
|
|
866
863
|
otherwise: () => yup6.date().nullable().notRequired()
|
|
867
864
|
}),
|
|
868
|
-
targetRegion: yup6.string().
|
|
865
|
+
targetRegion: yup6.array().of(yup6.string().required()).min(1, "At least one target region is required").required("Target region is required")
|
|
869
866
|
});
|
|
870
867
|
|
|
871
868
|
// src/yupSchema/partner.ts
|
|
@@ -3778,29 +3775,27 @@ var AD_FIELDS_FRAGMENT = import_client40.gql`
|
|
|
3778
3775
|
fragment AdFields on AdType {
|
|
3779
3776
|
_id
|
|
3780
3777
|
active
|
|
3781
|
-
adStyle
|
|
3782
|
-
adType
|
|
3783
3778
|
clicks
|
|
3784
3779
|
createdAt
|
|
3785
3780
|
end
|
|
3786
3781
|
impressions
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3782
|
+
resource {
|
|
3783
|
+
adDescription
|
|
3784
|
+
adImage
|
|
3785
|
+
adStyle
|
|
3786
|
+
adTitle
|
|
3787
|
+
adType
|
|
3788
|
+
resourceId
|
|
3789
|
+
resourceName
|
|
3790
|
+
resourceRegion
|
|
3791
|
+
resourceType
|
|
3797
3792
|
}
|
|
3793
|
+
showOn
|
|
3798
3794
|
start
|
|
3799
3795
|
status
|
|
3800
3796
|
targetRegion
|
|
3801
3797
|
updatedAt
|
|
3802
3798
|
}
|
|
3803
|
-
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
3804
3799
|
`;
|
|
3805
3800
|
var GET_ADS = import_client40.gql`
|
|
3806
3801
|
query getAds {
|
|
@@ -5038,27 +5033,27 @@ var import_react2 = __toESM(require("react"));
|
|
|
5038
5033
|
var import_react_hook_form12 = require("react-hook-form");
|
|
5039
5034
|
var defaultValues8 = {
|
|
5040
5035
|
active: true,
|
|
5041
|
-
adStyle: "Bloom" /* BLOOM */,
|
|
5042
|
-
// default to bloom
|
|
5043
|
-
adType: "Sponsored" /* SPONSORED */,
|
|
5044
|
-
// default to sponsored
|
|
5045
|
-
clui: null,
|
|
5046
5036
|
end: /* @__PURE__ */ new Date(),
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5037
|
+
resource: {
|
|
5038
|
+
adDescription: "",
|
|
5039
|
+
adImage: "",
|
|
5040
|
+
adStyle: "",
|
|
5041
|
+
// default to bloom
|
|
5042
|
+
adTitle: "",
|
|
5043
|
+
adType: "",
|
|
5044
|
+
// default to sponsored
|
|
5045
|
+
resourceId: "",
|
|
5046
|
+
resourceName: "",
|
|
5047
|
+
resourceRegion: "",
|
|
5048
|
+
resourceType: ""
|
|
5049
|
+
// default to event
|
|
5050
|
+
},
|
|
5051
|
+
showOn: [""],
|
|
5056
5052
|
// default to front page
|
|
5057
|
-
socialMedia: [],
|
|
5058
5053
|
start: /* @__PURE__ */ new Date(),
|
|
5059
5054
|
status: "Paused" /* PAUSED */,
|
|
5060
5055
|
// default to paused
|
|
5061
|
-
targetRegion:
|
|
5056
|
+
targetRegion: []
|
|
5062
5057
|
};
|
|
5063
5058
|
function useAdForm(data) {
|
|
5064
5059
|
const {
|
|
@@ -5077,18 +5072,9 @@ function useAdForm(data) {
|
|
|
5077
5072
|
if (data) {
|
|
5078
5073
|
reset({
|
|
5079
5074
|
active: data.active,
|
|
5080
|
-
adStyle: data.adStyle,
|
|
5081
|
-
adType: data.adType,
|
|
5082
|
-
clui: data.clui,
|
|
5083
5075
|
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,
|
|
5076
|
+
resource: data.resource,
|
|
5077
|
+
showOn: data.showOn,
|
|
5092
5078
|
start: data.start,
|
|
5093
5079
|
status: data.status,
|
|
5094
5080
|
targetRegion: data.targetRegion
|
|
@@ -5097,42 +5083,14 @@ function useAdForm(data) {
|
|
|
5097
5083
|
reset(defaultValues8);
|
|
5098
5084
|
}
|
|
5099
5085
|
}, [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();
|
|
5086
|
+
const { active, end, resource, showOn, start, status, targetRegion } = getValues();
|
|
5119
5087
|
return {
|
|
5120
5088
|
control,
|
|
5121
5089
|
fields: {
|
|
5122
5090
|
active,
|
|
5123
|
-
adStyle,
|
|
5124
|
-
adType,
|
|
5125
|
-
clui,
|
|
5126
5091
|
end,
|
|
5127
|
-
|
|
5128
|
-
resourceDescription,
|
|
5129
|
-
resourceId,
|
|
5130
|
-
resourceLogo,
|
|
5131
|
-
resourceName,
|
|
5132
|
-
resourceRegion,
|
|
5133
|
-
resourceType,
|
|
5092
|
+
resource,
|
|
5134
5093
|
showOn,
|
|
5135
|
-
socialMedia: socialMedia2,
|
|
5136
5094
|
start,
|
|
5137
5095
|
status,
|
|
5138
5096
|
targetRegion
|