@timardex/cluemart-shared 1.7.31 → 1.7.33
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-FrGeJoW6.d.ts → ad-DHN0IudM.d.ts} +2 -2
- package/dist/{ad-BsAes_WS.d.mts → ad-QDSgLYQe.d.mts} +2 -2
- package/dist/{affiliate-2h_y0IL4.d.ts → affiliate-CI_khNgq.d.ts} +2 -2
- package/dist/{affiliate-KR-MNBCC.d.mts → affiliate-kR3czfpb.d.mts} +2 -2
- package/dist/auth/index.d.mts +3 -3
- package/dist/auth/index.d.ts +3 -3
- package/dist/{chunk-BGTWSB5L.mjs → chunk-DJQMVUPX.mjs} +11 -3
- package/dist/{chunk-BGTWSB5L.mjs.map → chunk-DJQMVUPX.mjs.map} +1 -1
- package/dist/{chunk-3UYXNSNB.mjs → chunk-IH3BEKPK.mjs} +2 -2
- package/dist/{chunk-UV5GH6NI.mjs → chunk-OH7ZORGB.mjs} +1 -1
- package/dist/{chunk-UV5GH6NI.mjs.map → chunk-OH7ZORGB.mjs.map} +1 -1
- package/dist/{contactUs-CQqOcQk_.d.ts → contactUs-Dpf4Wtf0.d.ts} +1 -1
- package/dist/{contactUs-DOI78kmJ.d.mts → contactUs-KdCU5i-u.d.mts} +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/graphql/index.cjs +10 -2
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +5 -5
- package/dist/graphql/index.d.ts +5 -5
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +42 -4
- 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 +35 -5
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/{resourceActivities-CoCW9VLu.d.mts → resourceActivities-CLvYtSbH.d.mts} +1 -1
- package/dist/{resourceActivities-DMEtduFL.d.ts → resourceActivities-E1zbLLJN.d.ts} +1 -1
- package/dist/sharing/index.d.mts +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.mjs +1 -1
- package/dist/{user-Bynr8XGA.d.ts → user-BgSYnv1D.d.ts} +1 -1
- package/dist/{user-0qKK4juO.d.mts → user-DcXGRyeL.d.mts} +1 -1
- package/dist/utils/index.d.mts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/{chunk-3UYXNSNB.mjs.map → chunk-IH3BEKPK.mjs.map} +0 -0
- package/dist/{global-C7xIDkiQ.d.mts → global-cOd88aj7.d.mts} +2 -2
- package/dist/{global-D-034Xws.d.ts → global-iWgXdLj8.d.ts} +2 -2
package/dist/graphql/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
2
|
import { DocumentNode } from 'graphql';
|
|
3
|
-
import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-
|
|
4
|
-
import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-
|
|
5
|
-
import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-
|
|
3
|
+
import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-CLvYtSbH.mjs';
|
|
4
|
+
import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-cOd88aj7.mjs';
|
|
5
|
+
import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-QDSgLYQe.mjs';
|
|
6
6
|
import { EnumEventDateStatus, EnumResourceType } from '../enums/index.mjs';
|
|
7
|
-
import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-
|
|
8
|
-
import { A as AffiliateType } from '../affiliate-
|
|
7
|
+
import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-DcXGRyeL.mjs';
|
|
8
|
+
import { A as AffiliateType } from '../affiliate-kR3czfpb.mjs';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import '../images/index.mjs';
|
|
11
11
|
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _apollo_client from '@apollo/client';
|
|
2
2
|
import { DocumentNode } from 'graphql';
|
|
3
|
-
import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-
|
|
4
|
-
import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-
|
|
5
|
-
import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-
|
|
3
|
+
import { A as AdminUpdateResourceType, C as ChatType, R as ReportChatUser, N as NotificationType, a as NotificationCount, b as ResourceActivityType } from '../resourceActivities-E1zbLLJN.js';
|
|
4
|
+
import { M as MutationResponse, E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, P as PosterUsageType, e as RelationType, f as ResourceConnectionsType, V as VendorClaimTokenValidation, g as UnregisteredVendorType, h as VendorType, i as VendorInfoType, j as MyPendingVendorClaim, k as UserLicenceType, l as PostType, m as EnumPostType, G as GameDocType, n as GameLeaderboard, o as CouponType } from '../global-iWgXdLj8.js';
|
|
5
|
+
import { A as AuthMutationResponse, R as RefreshTokenMutationResponse, P as PartnerType, a as AdType, E as EnumAdStatus, b as AppSettingsType, S as SchoolType, c as SchoolReturnType } from '../ad-DHN0IudM.js';
|
|
6
6
|
import { EnumEventDateStatus, EnumResourceType } from '../enums/index.js';
|
|
7
|
-
import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-
|
|
8
|
-
import { A as AffiliateType } from '../affiliate-
|
|
7
|
+
import { S as SafeUserType, R as RedeemRewardMutationResponse, b as ResourceByUser, c as SubscriptionPlansResponse, d as SubscriptionStatusData } from '../user-BgSYnv1D.js';
|
|
8
|
+
import { A as AffiliateType } from '../affiliate-CI_khNgq.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import '../images/index.js';
|
|
11
11
|
|
package/dist/graphql/index.mjs
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -1957,7 +1957,18 @@ var vendorMenuSchema = yup3.object({
|
|
|
1957
1957
|
description: yup3.string().trim().nullable().optional(),
|
|
1958
1958
|
name: yup3.string().trim().nullable().min(3, "Product name must be at least 3 characters").required("Product name is required"),
|
|
1959
1959
|
price: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product price must be greater than 0").required("Product price is required"),
|
|
1960
|
-
priceMax: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product max price must be greater than 0").nullable().optional()
|
|
1960
|
+
priceMax: yup3.number().transform((v, o) => o === "" ? null : v).min(1, "Product max price must be greater than 0").nullable().optional().test(
|
|
1961
|
+
"is-greater",
|
|
1962
|
+
"Max price must be greater than Product price",
|
|
1963
|
+
function(priceMaxValue) {
|
|
1964
|
+
const { price } = this.parent;
|
|
1965
|
+
if (!priceMaxValue || !price) return true;
|
|
1966
|
+
const maxNum = Number(priceMaxValue);
|
|
1967
|
+
const priceNum = Number(price);
|
|
1968
|
+
if (Number.isNaN(maxNum) || Number.isNaN(priceNum)) return true;
|
|
1969
|
+
return maxNum > priceNum;
|
|
1970
|
+
}
|
|
1971
|
+
),
|
|
1961
1972
|
priceUnit: yup3.string().required("Product unit is required")
|
|
1962
1973
|
});
|
|
1963
1974
|
var vendorSchema = globalResourceSchema.shape({
|
|
@@ -5667,8 +5678,16 @@ var CREATE_COUPON_MUTATION = import_client79.gql`
|
|
|
5667
5678
|
${COUPON}
|
|
5668
5679
|
`;
|
|
5669
5680
|
var UPDATE_COUPON_MUTATION = import_client79.gql`
|
|
5670
|
-
mutation updateCoupon(
|
|
5671
|
-
|
|
5681
|
+
mutation updateCoupon(
|
|
5682
|
+
$couponDocumentId: ID!
|
|
5683
|
+
$couponId: ID!
|
|
5684
|
+
$input: CouponInputType!
|
|
5685
|
+
) {
|
|
5686
|
+
updateCoupon(
|
|
5687
|
+
couponDocumentId: $couponDocumentId
|
|
5688
|
+
couponId: $couponId
|
|
5689
|
+
input: $input
|
|
5690
|
+
) {
|
|
5672
5691
|
data {
|
|
5673
5692
|
...CouponFields
|
|
5674
5693
|
}
|
|
@@ -5964,6 +5983,11 @@ var couponSchema = yup10.object().shape({
|
|
|
5964
5983
|
}
|
|
5965
5984
|
)
|
|
5966
5985
|
}),
|
|
5986
|
+
resourceId: yup10.string().label("Resource ID").trim().required("Resource ID is required"),
|
|
5987
|
+
resourceType: yup10.mixed().oneOf(
|
|
5988
|
+
Object.values(EnumResourceType),
|
|
5989
|
+
"Resource type must be a valid EnumResourceType"
|
|
5990
|
+
).required("Resource type is required"),
|
|
5967
5991
|
startDate: yup10.date().label("Start Date").typeError("Start date is required").required("Start date is required").test("is-future-date", "Start date must be in the future", (value) => {
|
|
5968
5992
|
if (!value) return false;
|
|
5969
5993
|
return new Date(value) > /* @__PURE__ */ new Date();
|
|
@@ -7357,6 +7381,8 @@ var defaultValues11 = {
|
|
|
7357
7381
|
},
|
|
7358
7382
|
couponRewards: [],
|
|
7359
7383
|
endDate: /* @__PURE__ */ new Date(),
|
|
7384
|
+
resourceId: "",
|
|
7385
|
+
resourceType: "",
|
|
7360
7386
|
startDate: /* @__PURE__ */ new Date()
|
|
7361
7387
|
};
|
|
7362
7388
|
function useCouponForm(data) {
|
|
@@ -7379,13 +7405,23 @@ function useCouponForm(data) {
|
|
|
7379
7405
|
couponOption: data.couponOption,
|
|
7380
7406
|
couponRewards: data.couponRewards,
|
|
7381
7407
|
endDate: data.endDate,
|
|
7408
|
+
resourceId: data.resourceId,
|
|
7409
|
+
resourceType: data.resourceType,
|
|
7382
7410
|
startDate: data.startDate
|
|
7383
7411
|
});
|
|
7384
7412
|
} else {
|
|
7385
7413
|
reset(defaultValues11);
|
|
7386
7414
|
}
|
|
7387
7415
|
}, [data]);
|
|
7388
|
-
const {
|
|
7416
|
+
const {
|
|
7417
|
+
couponDescription,
|
|
7418
|
+
couponOption,
|
|
7419
|
+
couponRewards,
|
|
7420
|
+
endDate,
|
|
7421
|
+
resourceId,
|
|
7422
|
+
resourceType,
|
|
7423
|
+
startDate
|
|
7424
|
+
} = getValues();
|
|
7389
7425
|
return {
|
|
7390
7426
|
control,
|
|
7391
7427
|
fields: {
|
|
@@ -7393,6 +7429,8 @@ function useCouponForm(data) {
|
|
|
7393
7429
|
couponOption,
|
|
7394
7430
|
couponRewards,
|
|
7395
7431
|
endDate,
|
|
7432
|
+
resourceId,
|
|
7433
|
+
resourceType,
|
|
7396
7434
|
startDate
|
|
7397
7435
|
},
|
|
7398
7436
|
formState,
|