@anker-in/campaign-ui 0.2.10-beta.25 → 0.2.10-beta.27
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/cjs/components/credits/context/hooks/useSubscribed.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscribed.js.map +3 -3
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.d.ts +7 -3
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js +1 -1
- package/dist/cjs/components/credits/context/hooks/useSubscriptions.js.map +3 -3
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js +1 -1
- package/dist/cjs/components/credits/creditsWaysToGetCredits/useActions.js.map +2 -2
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/components/credits/context/hooks/useSubscribed.js +1 -1
- package/dist/esm/components/credits/context/hooks/useSubscribed.js.map +3 -3
- package/dist/esm/components/credits/context/hooks/useSubscriptions.d.ts +7 -3
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js +1 -1
- package/dist/esm/components/credits/context/hooks/useSubscriptions.js.map +3 -3
- package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.js +1 -1
- package/dist/esm/components/credits/creditsWaysToGetCredits/useActions.js.map +2 -2
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +493 -2
- package/dist/index.js +4291 -1249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4158 -1137
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -5
- package/src/components/credits/context/hooks/useSubscribed.ts +5 -5
- package/src/components/credits/context/hooks/useSubscriptions.ts +12 -37
- package/src/components/credits/creditsWaysToGetCredits/useActions.ts +0 -1
- package/src/index.ts +0 -3
- package/dist/components/chat/action.d.ts +0 -25
- package/dist/components/chat/button.d.ts +0 -3
- package/dist/components/chat/chatContext.d.ts +0 -101
- package/dist/components/chat/index.d.ts +0 -71
- package/dist/components/chat/markdown.d.ts +0 -5
- package/dist/components/chat/messages.d.ts +0 -3
- package/dist/components/chat/props.d.ts +0 -43
- package/dist/components/chat/response.d.ts +0 -4
- package/dist/components/chat/suggestions.d.ts +0 -3
- package/dist/components/chat/utils.d.ts +0 -3
- package/dist/components/credits/context/const.d.ts +0 -81
- package/dist/components/credits/context/hooks/useActivities.d.ts +0 -12
- package/dist/components/credits/context/hooks/useAddressValidate.d.ts +0 -34
- package/dist/components/credits/context/hooks/useAlpcFetch.d.ts +0 -23
- package/dist/components/credits/context/hooks/useClickOutside.d.ts +0 -3
- package/dist/components/credits/context/hooks/useCopy.d.ts +0 -5
- package/dist/components/credits/context/hooks/useCountries.d.ts +0 -8
- package/dist/components/credits/context/hooks/useFirstPurchaseFinished.d.ts +0 -1
- package/dist/components/credits/context/hooks/useMyRewards.d.ts +0 -14
- package/dist/components/credits/context/hooks/useReceiptUploaded.d.ts +0 -2
- package/dist/components/credits/context/hooks/useRedeemAndBuy.d.ts +0 -9
- package/dist/components/credits/context/hooks/useRedeemCoupon.d.ts +0 -17
- package/dist/components/credits/context/hooks/useRedeemProduct.d.ts +0 -16
- package/dist/components/credits/context/hooks/useRedeemableList.d.ts +0 -7
- package/dist/components/credits/context/hooks/useSendEmailValidation.d.ts +0 -1
- package/dist/components/credits/context/hooks/useSubscribed.d.ts +0 -1
- package/dist/components/credits/context/hooks/useSubscriptions.d.ts +0 -5
- package/dist/components/credits/context/hooks/useUploadReceipt.d.ts +0 -14
- package/dist/components/credits/context/provider.d.ts +0 -49
- package/dist/components/credits/context/response.d.ts +0 -63
- package/dist/components/credits/context/utils.d.ts +0 -25
- package/dist/components/credits/creditsBanner/index.d.ts +0 -23
- package/dist/components/credits/creditsBenefits/benefitItem.d.ts +0 -19
- package/dist/components/credits/creditsBenefits/iconInfo.d.ts +0 -2
- package/dist/components/credits/creditsBenefits/index.d.ts +0 -12
- package/dist/components/credits/creditsCash/RedeemableItem.d.ts +0 -15
- package/dist/components/credits/creditsCash/index.d.ts +0 -13
- package/dist/components/credits/creditsCash/type.d.ts +0 -47
- package/dist/components/credits/creditsFaq/faqItem/FaqItem.d.ts +0 -13
- package/dist/components/credits/creditsFaq/index.d.ts +0 -16
- package/dist/components/credits/creditsInfoCard/index.d.ts +0 -20
- package/dist/components/credits/creditsRedeemList/AddressForm/CountrySelect.d.ts +0 -14
- package/dist/components/credits/creditsRedeemList/AddressForm/FormItem.d.ts +0 -6
- package/dist/components/credits/creditsRedeemList/AddressForm/Input.d.ts +0 -13
- package/dist/components/credits/creditsRedeemList/AddressForm/StateSelect.d.ts +0 -15
- package/dist/components/credits/creditsRedeemList/AddressForm/index.d.ts +0 -2
- package/dist/components/credits/creditsRedeemList/AddressForm/type.d.ts +0 -26
- package/dist/components/credits/creditsRedeemList/RedeemCouponModal.d.ts +0 -9
- package/dist/components/credits/creditsRedeemList/RedeemProductModal/Address.d.ts +0 -20
- package/dist/components/credits/creditsRedeemList/RedeemProductModal/Error.d.ts +0 -8
- package/dist/components/credits/creditsRedeemList/RedeemProductModal/Init.d.ts +0 -11
- package/dist/components/credits/creditsRedeemList/RedeemProductModal/ProductInfo.d.ts +0 -8
- package/dist/components/credits/creditsRedeemList/RedeemProductModal/Success.d.ts +0 -13
- package/dist/components/credits/creditsRedeemList/RedeemProductModal/index.d.ts +0 -11
- package/dist/components/credits/creditsRedeemList/RedeemableItem.d.ts +0 -9
- package/dist/components/credits/creditsRedeemList/index.d.ts +0 -13
- package/dist/components/credits/creditsRedeemList/type.d.ts +0 -77
- package/dist/components/credits/creditsWaysToGetCredits/index.d.ts +0 -2
- package/dist/components/credits/creditsWaysToGetCredits/type.d.ts +0 -60
- package/dist/components/credits/creditsWaysToGetCredits/useActions.d.ts +0 -96
- package/dist/components/credits/index.d.ts +0 -10
- package/dist/components/credits/modal/MyRewardsModal.d.ts +0 -32
- package/dist/components/credits/modal/activitiesModal.d.ts +0 -32
- package/dist/components/credits/modal/creditsUploadReceiptModal.d.ts +0 -24
- package/dist/components/credits/modal/loadingDots.d.ts +0 -6
- package/dist/components/credits/modal/modalContainer.d.ts +0 -15
- package/dist/components/credits/modal/rulesModal.d.ts +0 -7
- package/dist/components/credits/modal/tip.d.ts +0 -5
- package/dist/components/credits/type.d.ts +0 -55
- package/dist/components/index.d.ts +0 -3
- package/dist/debug-env.d.ts +0 -7
- package/dist/helpers/fetchResponse.d.ts +0 -14
- package/dist/helpers/fetcher.d.ts +0 -2
- package/dist/helpers/index.d.ts +0 -2
- package/dist/helpers/track.d.ts +0 -19
- package/dist/helpers/utils.d.ts +0 -3
- package/dist/stories/chat.stories.d.ts +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useSendEmailValidation(): import("swr/mutation").SWRMutationResponse<any, any, "send-email-validation", never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useSubscribed: () => boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const uploadReceipt: (_: any, { arg: { orderName } }: {
|
|
2
|
-
arg: {
|
|
3
|
-
orderName: string;
|
|
4
|
-
};
|
|
5
|
-
}) => Promise<{
|
|
6
|
-
ok: boolean;
|
|
7
|
-
code: number;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const useUploadReceipt: () => import("swr/mutation").SWRMutationResponse<{
|
|
10
|
-
ok: boolean;
|
|
11
|
-
code: number;
|
|
12
|
-
}, any, "/api/multipass/mktsrv/v1/credit/upload_third_party_order", {
|
|
13
|
-
orderName: string;
|
|
14
|
-
}>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DTC_TASK_TYPE } from './const';
|
|
3
|
-
import type { CreditInfoResponse } from './response';
|
|
4
|
-
export declare const CreditsContext: React.Context<{
|
|
5
|
-
profile: any;
|
|
6
|
-
isLoadingProfile: boolean;
|
|
7
|
-
removeProfile: () => void;
|
|
8
|
-
taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
|
|
9
|
-
openSignInPopup: () => void;
|
|
10
|
-
openSignUpPopup: () => void;
|
|
11
|
-
creditInfo?: CreditInfoResponse;
|
|
12
|
-
customer?: any;
|
|
13
|
-
customerLoading: boolean;
|
|
14
|
-
fetchCreditInfo: (user_id: string) => void;
|
|
15
|
-
gtm: {
|
|
16
|
-
pageGroup: string;
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
export declare function CreditsProvider({ children, profile, removeProfile, isLoadingProfile, openSignInPopup, openSignUpPopup, taskIdToTypeMapping, creditInfo, customer, customerLoading, fetchCreditInfo, gtm, }: {
|
|
20
|
-
children: React.ReactNode;
|
|
21
|
-
profile: any;
|
|
22
|
-
removeProfile: () => void;
|
|
23
|
-
isLoadingProfile: boolean;
|
|
24
|
-
openSignInPopup: () => void;
|
|
25
|
-
openSignUpPopup: () => void;
|
|
26
|
-
taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
|
|
27
|
-
creditInfo?: CreditInfoResponse;
|
|
28
|
-
customer: any;
|
|
29
|
-
fetchCreditInfo: (user_id: string) => void;
|
|
30
|
-
customerLoading: boolean;
|
|
31
|
-
gtm: {
|
|
32
|
-
pageGroup: string;
|
|
33
|
-
};
|
|
34
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export declare function useCreditsContext(): {
|
|
36
|
-
profile: any;
|
|
37
|
-
isLoadingProfile: boolean;
|
|
38
|
-
removeProfile: () => void;
|
|
39
|
-
taskIdToTypeMapping: Record<string, DTC_TASK_TYPE>;
|
|
40
|
-
openSignInPopup: () => void;
|
|
41
|
-
openSignUpPopup: () => void;
|
|
42
|
-
creditInfo?: CreditInfoResponse;
|
|
43
|
-
customer?: any;
|
|
44
|
-
customerLoading: boolean;
|
|
45
|
-
fetchCreditInfo: (user_id: string) => void;
|
|
46
|
-
gtm: {
|
|
47
|
-
pageGroup: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ApprovalStatus, AlpcConsumeType, CreditType, TaskSubType, TaskType } from './const';
|
|
2
|
-
interface BaseResponse {
|
|
3
|
-
brand: string;
|
|
4
|
-
}
|
|
5
|
-
export interface Task extends BaseResponse {
|
|
6
|
-
goods_sku?: string;
|
|
7
|
-
task_type: TaskType;
|
|
8
|
-
task_sub_type: TaskSubType;
|
|
9
|
-
task_rule_id: number;
|
|
10
|
-
task_name: string;
|
|
11
|
-
task_note: string;
|
|
12
|
-
app_name: string;
|
|
13
|
-
}
|
|
14
|
-
export interface CreditLogResponse extends Task {
|
|
15
|
-
credit: number;
|
|
16
|
-
task_name: string;
|
|
17
|
-
create_time: number;
|
|
18
|
-
credit_type: CreditType;
|
|
19
|
-
pending_time: number;
|
|
20
|
-
status: number;
|
|
21
|
-
expired_time?: number;
|
|
22
|
-
}
|
|
23
|
-
export interface ConsumeCreditRuleResponse extends BaseResponse {
|
|
24
|
-
id: number;
|
|
25
|
-
name: string;
|
|
26
|
-
note: string;
|
|
27
|
-
consume_credits: number;
|
|
28
|
-
consume_type: AlpcConsumeType;
|
|
29
|
-
coupon_rule: string;
|
|
30
|
-
remaining_inventory: number;
|
|
31
|
-
is_limited: number;
|
|
32
|
-
sku_handle: string;
|
|
33
|
-
goods_sku: string;
|
|
34
|
-
goods_url: string;
|
|
35
|
-
extra?: string;
|
|
36
|
-
}
|
|
37
|
-
export interface RedeemLogResponse extends BaseResponse {
|
|
38
|
-
goods_title: string;
|
|
39
|
-
coupon_code: string;
|
|
40
|
-
order_number: string;
|
|
41
|
-
create_time: number;
|
|
42
|
-
consume_credits: number;
|
|
43
|
-
fulfillment_status: string;
|
|
44
|
-
approval_status: ApprovalStatus;
|
|
45
|
-
rule_id: number;
|
|
46
|
-
code_status: number;
|
|
47
|
-
}
|
|
48
|
-
export interface CreditTaskResponse extends Task {
|
|
49
|
-
status: number;
|
|
50
|
-
is_enable: number;
|
|
51
|
-
id: number;
|
|
52
|
-
weight: number;
|
|
53
|
-
reward_type: number;
|
|
54
|
-
}
|
|
55
|
-
export interface CreditInfoResponse extends BaseResponse {
|
|
56
|
-
total_credit: number;
|
|
57
|
-
available_credit: number;
|
|
58
|
-
pending_credit: number;
|
|
59
|
-
expired_credit: number;
|
|
60
|
-
cancel_credit: number;
|
|
61
|
-
consumed_credit: number;
|
|
62
|
-
}
|
|
63
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare function getAlpcPath(locale?: string): "/api/multipass/alpc-eu" | "/api/multipass/alpc";
|
|
2
|
-
export declare function numberFormat(num?: number): string | number;
|
|
3
|
-
export declare const emailValidate: (email: any) => boolean;
|
|
4
|
-
export declare const languageTerritory: (locale: string) => string;
|
|
5
|
-
export declare function formatPrice({ amount, currencyCode, locale, maximumFractionDigits, minimumFractionDigits, removeTrailingZeros, }: {
|
|
6
|
-
amount: number;
|
|
7
|
-
currencyCode: string;
|
|
8
|
-
locale: string;
|
|
9
|
-
maximumFractionDigits?: number;
|
|
10
|
-
minimumFractionDigits?: number;
|
|
11
|
-
removeTrailingZeros?: boolean;
|
|
12
|
-
}): string;
|
|
13
|
-
export declare function formatVariantPrice({ amount, baseAmount, currencyCode, locale, maximumFractionDigits, minimumFractionDigits, removeTrailingZeros, }: {
|
|
14
|
-
baseAmount: number;
|
|
15
|
-
amount: number;
|
|
16
|
-
currencyCode: string;
|
|
17
|
-
locale: string;
|
|
18
|
-
maximumFractionDigits?: number;
|
|
19
|
-
minimumFractionDigits?: number;
|
|
20
|
-
removeTrailingZeros?: boolean;
|
|
21
|
-
}): {
|
|
22
|
-
price: string;
|
|
23
|
-
basePrice: string | undefined;
|
|
24
|
-
discount: string | null;
|
|
25
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type Img = {
|
|
2
|
-
url: string;
|
|
3
|
-
alt: string;
|
|
4
|
-
};
|
|
5
|
-
type BannerProps = {
|
|
6
|
-
copy: {
|
|
7
|
-
pcImg: Img;
|
|
8
|
-
laptopImg: Img;
|
|
9
|
-
mobileImg: Img;
|
|
10
|
-
joinNow: string;
|
|
11
|
-
loginIn: string;
|
|
12
|
-
login: {
|
|
13
|
-
title: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
unLogin: {
|
|
17
|
-
title: string;
|
|
18
|
-
description: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare function CreditsBanner({ copy }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface BenefitItemCopy {
|
|
2
|
-
icon: {
|
|
3
|
-
alt: string;
|
|
4
|
-
url: string;
|
|
5
|
-
};
|
|
6
|
-
text: string;
|
|
7
|
-
note?: string;
|
|
8
|
-
tag?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const BenefitItem: ({ item, handleClick, isNoteActive, index, }: {
|
|
11
|
-
item: BenefitItemCopy;
|
|
12
|
-
handleClick: ({ item, index }: {
|
|
13
|
-
item: BenefitItemCopy;
|
|
14
|
-
index: number;
|
|
15
|
-
}) => void;
|
|
16
|
-
isNoteActive: boolean;
|
|
17
|
-
index: number;
|
|
18
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export default BenefitItem;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import 'swiper/css';
|
|
2
|
-
import 'swiper/css/grid';
|
|
3
|
-
import 'swiper/css/pagination';
|
|
4
|
-
import { type BenefitItemCopy } from './benefitItem';
|
|
5
|
-
interface CreditsBenefitsProps {
|
|
6
|
-
copy: {
|
|
7
|
-
title: string;
|
|
8
|
-
benefits: BenefitItemCopy[];
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export declare const CreditsBenefits: ({ copy }: CreditsBenefitsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CreditsCashCopy, RedeemItem } from './type';
|
|
2
|
-
declare function RedeemableItem({ copy, itemData, setRules, className, authCodeActivate, }: {
|
|
3
|
-
copy: CreditsCashCopy;
|
|
4
|
-
itemData: RedeemItem;
|
|
5
|
-
className?: string;
|
|
6
|
-
setRules: (rules: string[]) => void;
|
|
7
|
-
currencyCode: string;
|
|
8
|
-
authCodeActivate: {
|
|
9
|
-
openAuthCodePopup: Function;
|
|
10
|
-
isSuccess: boolean;
|
|
11
|
-
setOnSuccess: (arg: Function) => void;
|
|
12
|
-
isSendingActivateEmail: boolean;
|
|
13
|
-
};
|
|
14
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export default RedeemableItem;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CreditsCashCopy } from './type';
|
|
2
|
-
export declare const CreditsCash: ({ copy, className, hideTitle, cardClassName, authCodeActivate, }: {
|
|
3
|
-
copy: CreditsCashCopy;
|
|
4
|
-
className?: string;
|
|
5
|
-
hideTitle?: boolean;
|
|
6
|
-
cardClassName?: string;
|
|
7
|
-
authCodeActivate: {
|
|
8
|
-
openAuthCodePopup: Function;
|
|
9
|
-
isSuccess: boolean;
|
|
10
|
-
setOnSuccess: (arg: Function) => void;
|
|
11
|
-
isSendingActivateEmail: boolean;
|
|
12
|
-
};
|
|
13
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ProductVariant, Product } from '@anker-in/lib';
|
|
2
|
-
import { AlpcConsumeType } from '../context/const';
|
|
3
|
-
type RedeemableItemConfig = {
|
|
4
|
-
title: string;
|
|
5
|
-
desc: string;
|
|
6
|
-
price: string;
|
|
7
|
-
credit: string;
|
|
8
|
-
rules: string;
|
|
9
|
-
image: {
|
|
10
|
-
url: string;
|
|
11
|
-
};
|
|
12
|
-
mobileImage: {
|
|
13
|
-
url: string;
|
|
14
|
-
};
|
|
15
|
-
redeemId: number;
|
|
16
|
-
};
|
|
17
|
-
export type CreditsCashCopy = {
|
|
18
|
-
title: string;
|
|
19
|
-
list: (RedeemableItemConfig & {
|
|
20
|
-
products: {
|
|
21
|
-
handle: string;
|
|
22
|
-
sku: string;
|
|
23
|
-
}[];
|
|
24
|
-
})[];
|
|
25
|
-
soldOut: string;
|
|
26
|
-
ruleLabel: string;
|
|
27
|
-
unlockRewards: string;
|
|
28
|
-
btnRedeem: string;
|
|
29
|
-
off: string;
|
|
30
|
-
insufficientCredits: string;
|
|
31
|
-
};
|
|
32
|
-
export type RedeemItem = {
|
|
33
|
-
product: Product;
|
|
34
|
-
productVariant: ProductVariant;
|
|
35
|
-
alpcData: {
|
|
36
|
-
id: number;
|
|
37
|
-
consumeCredits: number;
|
|
38
|
-
remainingInventory: number;
|
|
39
|
-
isLimited: boolean;
|
|
40
|
-
consumeType: AlpcConsumeType.Product;
|
|
41
|
-
showCredit: boolean;
|
|
42
|
-
title: string;
|
|
43
|
-
desc: string;
|
|
44
|
-
};
|
|
45
|
-
config: RedeemableItemConfig;
|
|
46
|
-
};
|
|
47
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
type FaqItemProps = {
|
|
3
|
-
index: number;
|
|
4
|
-
question?: string;
|
|
5
|
-
answer?: string | number;
|
|
6
|
-
showDots: boolean;
|
|
7
|
-
itemRightIconRender?: ({ expanded }: {
|
|
8
|
-
expanded: boolean;
|
|
9
|
-
}) => ReactNode;
|
|
10
|
-
defaultExpended?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const FaqItem: ({ index, question, answer, showDots, itemRightIconRender, defaultExpended, }: FaqItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type FaqCopy = {
|
|
2
|
-
title: string;
|
|
3
|
-
subTitle: string;
|
|
4
|
-
learnMore: {
|
|
5
|
-
link: string;
|
|
6
|
-
label: string;
|
|
7
|
-
};
|
|
8
|
-
items: {
|
|
9
|
-
category_name: string;
|
|
10
|
-
question: string;
|
|
11
|
-
answer: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
export declare const CreditsFaq: ({ copy }: {
|
|
15
|
-
copy: FaqCopy;
|
|
16
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type MyRewardsMetafields } from '../modal/MyRewardsModal';
|
|
2
|
-
import { type MyActivitiesMetafields } from '../modal/activitiesModal';
|
|
3
|
-
type ButtonConfig = {
|
|
4
|
-
text: string;
|
|
5
|
-
type: 'activities' | 'rewards';
|
|
6
|
-
};
|
|
7
|
-
export interface InfoCardProps {
|
|
8
|
-
data: {
|
|
9
|
-
balanceLabel: string;
|
|
10
|
-
comingSoonLabel: string;
|
|
11
|
-
comingSoonTips: string;
|
|
12
|
-
buttons: ButtonConfig[];
|
|
13
|
-
pointUnit: string;
|
|
14
|
-
infoIcon: string;
|
|
15
|
-
myActivities: MyActivitiesMetafields;
|
|
16
|
-
myRewards: MyRewardsMetafields;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare function CreditsInfoCard({ data }: InfoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface Country {
|
|
2
|
-
id: string;
|
|
3
|
-
code: string;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
interface CountrySelectProps {
|
|
7
|
-
countries: Country[];
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
value?: string;
|
|
11
|
-
onChange: (code: string) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function CountrySelect({ countries, loading, className, value, onChange }: CountrySelectProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface InputProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
value: string;
|
|
5
|
-
error?: string | boolean;
|
|
6
|
-
placeholder: string;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
-
onBlur?: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare function Input({ className, error, value, placeholder, disabled, onChange, onBlur }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
interface StateSelectProps {
|
|
2
|
-
states: {
|
|
3
|
-
code: string;
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
}[];
|
|
7
|
-
className?: string;
|
|
8
|
-
countryId?: string;
|
|
9
|
-
defaultCode?: string;
|
|
10
|
-
stateName?: string;
|
|
11
|
-
stateCode?: string;
|
|
12
|
-
onChange: (code: string, name: string) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare function StateSelect({ states, stateName, stateCode, className, onChange }: StateSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CreditsRedeemListCopy } from '../type';
|
|
2
|
-
type ShippingCountry = {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
code: string;
|
|
6
|
-
provinces: {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
code: string;
|
|
10
|
-
}[];
|
|
11
|
-
};
|
|
12
|
-
export interface AddressFormProps {
|
|
13
|
-
form: CreditsRedeemListCopy['redeemModal']['product']['addressForm'];
|
|
14
|
-
onChange: (address: any) => void;
|
|
15
|
-
validate: (args: {
|
|
16
|
-
force?: boolean;
|
|
17
|
-
ignoreKeys?: string[];
|
|
18
|
-
}) => boolean;
|
|
19
|
-
errors: {
|
|
20
|
-
key: string;
|
|
21
|
-
message: string;
|
|
22
|
-
}[];
|
|
23
|
-
countries: ShippingCountry[];
|
|
24
|
-
countriesLoading: boolean;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ModalContainerProps } from '../modal/modalContainer';
|
|
2
|
-
import type { RedeemableItem as RedeemableItemType } from '../type';
|
|
3
|
-
import { CreditsRedeemListCopy } from './type';
|
|
4
|
-
declare function RedeemCouponModal({ item, copy, onError, ...props }: ModalContainerProps & {
|
|
5
|
-
item: RedeemableItemType;
|
|
6
|
-
copy: CreditsRedeemListCopy;
|
|
7
|
-
onError: (code: number) => void;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default RedeemCouponModal;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { RedeemableItem as RedeemableItemType } from '../../type';
|
|
2
|
-
import { CreditsRedeemListCopy } from '../type';
|
|
3
|
-
type AddressProps = {
|
|
4
|
-
copy: CreditsRedeemListCopy;
|
|
5
|
-
shippingAddress: string;
|
|
6
|
-
setAddress: (address: Record<string, any>) => void;
|
|
7
|
-
validateAddress: (address: Record<string, any>) => boolean;
|
|
8
|
-
validateErrors: {
|
|
9
|
-
key: string;
|
|
10
|
-
message: string;
|
|
11
|
-
}[];
|
|
12
|
-
item: RedeemableItemType;
|
|
13
|
-
loading: boolean;
|
|
14
|
-
address: Record<string, any> | undefined;
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
handlePayment: () => void;
|
|
17
|
-
shippingProduct: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const Address: ({ copy, shippingAddress, setAddress, validateAddress, validateErrors, shippingProduct, loading, address, disabled, handlePayment, item, }: AddressProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RedeemableItem as RedeemableItemType } from '../../type';
|
|
2
|
-
import { CreditsRedeemListCopy } from '../type';
|
|
3
|
-
type InitProps = {
|
|
4
|
-
copy: CreditsRedeemListCopy;
|
|
5
|
-
item: RedeemableItemType;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
setStatus: (status: 'address' | 'init' | 'success' | 'error') => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const Init: ({ copy, item, loading, disabled, setStatus }: InitProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RedeemableItem as RedeemableItemType } from '../../type';
|
|
2
|
-
import { CreditsRedeemListCopy } from '../type';
|
|
3
|
-
type ProductInfoProps = {
|
|
4
|
-
item: RedeemableItemType;
|
|
5
|
-
copy: CreditsRedeemListCopy;
|
|
6
|
-
};
|
|
7
|
-
export declare const ProductInfo: ({ item, copy }: ProductInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { RedeemableItem as RedeemableItemType } from '../../type';
|
|
2
|
-
import { CreditsRedeemListCopy } from '../type';
|
|
3
|
-
type SuccessProps = {
|
|
4
|
-
copy: CreditsRedeemListCopy;
|
|
5
|
-
shippingProduct: string;
|
|
6
|
-
loading: boolean;
|
|
7
|
-
address: Record<string, any> | undefined;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
item: RedeemableItemType;
|
|
11
|
-
};
|
|
12
|
-
export declare const Success: ({ copy, shippingProduct, loading, address, disabled, onClose, item }: SuccessProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AlpcErrorCode } from '../../context/const';
|
|
2
|
-
import type { ModalContainerProps } from '../../modal/modalContainer';
|
|
3
|
-
import type { RedeemableItem as RedeemableItemType } from '../../type';
|
|
4
|
-
import { CreditsRedeemListCopy } from '../type';
|
|
5
|
-
type RedeemProductModalProps = ModalContainerProps & {
|
|
6
|
-
item: RedeemableItemType;
|
|
7
|
-
copy: CreditsRedeemListCopy;
|
|
8
|
-
onError: (code: AlpcErrorCode) => void;
|
|
9
|
-
};
|
|
10
|
-
declare function RedeemProductModal({ item, copy, onError, ...props }: RedeemProductModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default RedeemProductModal;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RedeemableItem as RedeemableItemType } from '../type';
|
|
2
|
-
import type { CreditsRedeemListCopy } from './type';
|
|
3
|
-
export declare function RedeemableItem({ copy, className, item, onRulesOpen, onRedeem, }: {
|
|
4
|
-
copy: CreditsRedeemListCopy;
|
|
5
|
-
className?: string;
|
|
6
|
-
item: RedeemableItemType;
|
|
7
|
-
onRulesOpen: (rules: string[]) => void;
|
|
8
|
-
onRedeem: (item: RedeemableItemType) => void;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CreditsRedeemListCopy } from './type';
|
|
2
|
-
export declare function CreditsRedeemList({ copy, className, tabClassName, hideTitle, cardClassName, activate, }: {
|
|
3
|
-
copy: CreditsRedeemListCopy;
|
|
4
|
-
className?: string;
|
|
5
|
-
tabClassName?: string;
|
|
6
|
-
hideTitle?: boolean;
|
|
7
|
-
cardClassName?: string;
|
|
8
|
-
activate: {
|
|
9
|
-
openAuthCodePopup: () => void;
|
|
10
|
-
isSuccess: boolean;
|
|
11
|
-
setOnSuccess: (callback: Function) => void;
|
|
12
|
-
};
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { CreditsPageCommon } from '../type';
|
|
2
|
-
export type CreditsRedeemListCopy = {
|
|
3
|
-
title: string;
|
|
4
|
-
giftCardLabel: string;
|
|
5
|
-
unlockRewards: string;
|
|
6
|
-
btnRedeem: string;
|
|
7
|
-
list: {
|
|
8
|
-
label: string;
|
|
9
|
-
list: {
|
|
10
|
-
id: string;
|
|
11
|
-
type: string;
|
|
12
|
-
value: string;
|
|
13
|
-
rules: string[];
|
|
14
|
-
}[];
|
|
15
|
-
}[];
|
|
16
|
-
validatorInfo: {
|
|
17
|
-
addressInfo: {
|
|
18
|
-
name: string;
|
|
19
|
-
country: string;
|
|
20
|
-
province: string;
|
|
21
|
-
city: string;
|
|
22
|
-
address: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
redeemModal: {
|
|
26
|
-
confirmTitle: string;
|
|
27
|
-
confirmButton: string;
|
|
28
|
-
commonError: string;
|
|
29
|
-
redeemLimitError: string;
|
|
30
|
-
inventoryNotEnough: string;
|
|
31
|
-
creditsNotEnough: string;
|
|
32
|
-
crossSiteError: string;
|
|
33
|
-
errorImageUrl: string;
|
|
34
|
-
coupon: {
|
|
35
|
-
successDesc: string;
|
|
36
|
-
successTitle: string;
|
|
37
|
-
successButton: string;
|
|
38
|
-
successButtonUrl: string;
|
|
39
|
-
};
|
|
40
|
-
product: {
|
|
41
|
-
required: string;
|
|
42
|
-
invalidEmail: string;
|
|
43
|
-
shippingAddress: string;
|
|
44
|
-
shippingProduct: string;
|
|
45
|
-
addressForm: {
|
|
46
|
-
key: string;
|
|
47
|
-
type: string;
|
|
48
|
-
label: string;
|
|
49
|
-
isSelect: boolean;
|
|
50
|
-
required: boolean;
|
|
51
|
-
placeholder: string;
|
|
52
|
-
}[][];
|
|
53
|
-
form: {
|
|
54
|
-
key: string;
|
|
55
|
-
type: string;
|
|
56
|
-
isSelect: boolean;
|
|
57
|
-
required: boolean;
|
|
58
|
-
placeholder: string;
|
|
59
|
-
}[][];
|
|
60
|
-
successDesc: string[];
|
|
61
|
-
rules: string[];
|
|
62
|
-
steps: {
|
|
63
|
-
imageUrl: string;
|
|
64
|
-
title: string;
|
|
65
|
-
}[];
|
|
66
|
-
quantityLabel: string;
|
|
67
|
-
totalPriceLabel: string;
|
|
68
|
-
variantLabel: string;
|
|
69
|
-
shippingFeeLabel: string;
|
|
70
|
-
paymentButton: string;
|
|
71
|
-
stepTitle: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
copied: string;
|
|
75
|
-
off: string;
|
|
76
|
-
copy: string;
|
|
77
|
-
} & CreditsPageCommon;
|