@tap-payments/apple-pay-button 0.0.55-development → 0.0.57-development
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/build/@types/ApplePayButtonProps.d.ts +129 -0
- package/build/@types/ApplePayButtonProps.js +1 -0
- package/build/@types/charge.d.ts +57 -0
- package/build/@types/charge.js +1 -0
- package/build/@types/checkoutProfile.d.ts +194 -0
- package/build/@types/checkoutProfile.js +1 -0
- package/build/@types/enums.d.ts +71 -0
- package/build/@types/enums.js +83 -0
- package/build/@types/index.d.ts +6 -233
- package/build/@types/index.js +6 -1
- package/build/@types/tapLocalisation.d.ts +193 -0
- package/build/@types/tapLocalisation.js +1 -0
- package/build/@types/tapTheme.d.ts +842 -0
- package/build/@types/tapTheme.js +1 -0
- package/build/api/app.service.d.ts +1 -1
- package/build/api/app.service.js +2 -1
- package/build/api/httpClient.d.ts +1 -1
- package/build/assets/lottie/Dark_Mode_Loader.json +255 -0
- package/build/assets/lottie/Light_Mode_Loader.json +255 -0
- package/build/components/ActionButton/ActionButton.d.ts +24 -0
- package/build/components/ActionButton/ActionButton.js +61 -0
- package/build/components/ActionButton/index.d.ts +2 -0
- package/build/components/ActionButton/index.js +2 -0
- package/build/components/InitialLoader/InitialLoader.d.ts +9 -0
- package/build/components/InitialLoader/InitialLoader.js +29 -0
- package/build/components/InitialLoader/index.d.ts +2 -0
- package/build/components/InitialLoader/index.js +2 -0
- package/build/components/Loader/Loader.d.ts +24 -0
- package/build/components/Loader/Loader.js +48 -0
- package/build/components/Loader/index.d.ts +2 -0
- package/build/components/Loader/index.js +2 -0
- package/build/components/PayButton/PayButton.d.ts +15 -0
- package/build/components/PayButton/PayButton.js +40 -0
- package/build/components/PayButton/index.d.ts +2 -0
- package/build/components/PayButton/index.js +2 -0
- package/build/components/PayButton/style.d.ts +11 -0
- package/build/components/PayButton/style.js +41 -0
- package/build/constants/index.d.ts +2 -66
- package/build/constants/index.js +2 -66
- package/build/features/ApplePayButton/ApplePayButton.js +7 -19
- package/build/features/ApplePayButton/style.d.ts +2 -0
- package/build/features/ApplePayButton/style.js +12 -0
- package/build/hooks/useApplePay.d.ts +87 -7
- package/build/hooks/useApplePay.js +93 -12
- package/build/hooks/useMerchantApplePay.d.ts +1 -2
- package/build/hooks/useMerchantApplePay.js +1 -1
- package/build/hooks/useScript.d.ts +3 -1
- package/build/hooks/useScript.js +3 -2
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/utils/config.d.ts +1 -1
- package/build/utils/config.js +10 -10
- package/build/utils/defaultValues.d.ts +10 -7
- package/build/utils/defaultValues.js +1 -1
- package/build/utils/index.d.ts +3 -0
- package/build/utils/index.js +3 -0
- package/build/utils/theme.d.ts +12 -0
- package/build/utils/theme.js +61 -0
- package/package.json +16 -10
package/build/@types/index.d.ts
CHANGED
|
@@ -1,233 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
billingContact?: {
|
|
8
|
-
phoneNumber?: string;
|
|
9
|
-
emailAddress?: string;
|
|
10
|
-
givenName: string;
|
|
11
|
-
familyName: string;
|
|
12
|
-
};
|
|
13
|
-
total: {
|
|
14
|
-
label: string;
|
|
15
|
-
amount: number;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export interface ApplePayDataToLunchSDKFromMerchantSide {
|
|
19
|
-
headers: Record<string, any>;
|
|
20
|
-
BASE_URL: string;
|
|
21
|
-
merchant: Record<string, string>;
|
|
22
|
-
applePayRequestData: ApplePayRequestData;
|
|
23
|
-
debug?: boolean;
|
|
24
|
-
applePaySDKVersion?: number;
|
|
25
|
-
}
|
|
26
|
-
export interface Interface {
|
|
27
|
-
locale?: typeof Locale[keyof typeof Locale];
|
|
28
|
-
theme?: typeof ThemeMode[keyof typeof ThemeMode];
|
|
29
|
-
edges?: typeof Edges[keyof typeof Edges];
|
|
30
|
-
type?: typeof ButtonType[keyof typeof ButtonType];
|
|
31
|
-
}
|
|
32
|
-
export interface Customer {
|
|
33
|
-
id?: string;
|
|
34
|
-
name?: {
|
|
35
|
-
lang: typeof Locale[keyof typeof Locale];
|
|
36
|
-
first: string;
|
|
37
|
-
last: string;
|
|
38
|
-
middle?: string;
|
|
39
|
-
}[];
|
|
40
|
-
contact?: {
|
|
41
|
-
email?: string;
|
|
42
|
-
phone?: {
|
|
43
|
-
countryCode: string;
|
|
44
|
-
number: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export interface Acceptance {
|
|
49
|
-
supportedSchemes?: Array<typeof SupportedNetworks[keyof typeof SupportedNetworks]>;
|
|
50
|
-
supportedFundSource?: string[];
|
|
51
|
-
supportedPaymentAuthentications?: string[];
|
|
52
|
-
}
|
|
53
|
-
export interface ApplePayButtonProps {
|
|
54
|
-
operator: {
|
|
55
|
-
publicKey: string;
|
|
56
|
-
hashstring?: string;
|
|
57
|
-
};
|
|
58
|
-
merchant: {
|
|
59
|
-
id: string;
|
|
60
|
-
};
|
|
61
|
-
scope: typeof Scope[keyof typeof Scope];
|
|
62
|
-
environment: typeof Environment[keyof typeof Environment];
|
|
63
|
-
interface?: Interface;
|
|
64
|
-
customer?: Customer;
|
|
65
|
-
acceptance?: Acceptance;
|
|
66
|
-
transaction?: {
|
|
67
|
-
authentication?: boolean;
|
|
68
|
-
authorize?: {
|
|
69
|
-
auto: {
|
|
70
|
-
type: string;
|
|
71
|
-
time: number;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
metadata?: Record<string, string>;
|
|
75
|
-
reference?: string;
|
|
76
|
-
paymentAgreement?: {
|
|
77
|
-
id: string;
|
|
78
|
-
contract?: {
|
|
79
|
-
id: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
destinations?: Record<string, any>;
|
|
83
|
-
};
|
|
84
|
-
invoice?: {
|
|
85
|
-
id: string;
|
|
86
|
-
};
|
|
87
|
-
order: {
|
|
88
|
-
amount: number;
|
|
89
|
-
currency: string;
|
|
90
|
-
id?: string;
|
|
91
|
-
description?: string;
|
|
92
|
-
metadata?: Record<string, string>;
|
|
93
|
-
reference?: string;
|
|
94
|
-
};
|
|
95
|
-
post?: {
|
|
96
|
-
url: string;
|
|
97
|
-
};
|
|
98
|
-
redirect?: {
|
|
99
|
-
url: string;
|
|
100
|
-
};
|
|
101
|
-
onOrderCreated?: (orderId: string) => void;
|
|
102
|
-
onCancel?: () => void;
|
|
103
|
-
onError?: (error: any) => void;
|
|
104
|
-
onSuccess?: (data: Record<string, any>) => void;
|
|
105
|
-
onClick?: (data?: ApplePayDataToLunchSDKFromMerchantSide) => void;
|
|
106
|
-
onReady?: () => void;
|
|
107
|
-
metaData?: MetaData;
|
|
108
|
-
debug?: boolean;
|
|
109
|
-
integration?: 'sdk' | 'iframe';
|
|
110
|
-
headers?: {
|
|
111
|
-
mdn: string;
|
|
112
|
-
application: string;
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
export interface MerchantResponse {
|
|
116
|
-
id: string;
|
|
117
|
-
name: string;
|
|
118
|
-
country_code: string;
|
|
119
|
-
session_token: string;
|
|
120
|
-
[other: string]: string;
|
|
121
|
-
}
|
|
122
|
-
export interface PaymentMethod {
|
|
123
|
-
id: string;
|
|
124
|
-
image: string;
|
|
125
|
-
name: string;
|
|
126
|
-
payment_type: string;
|
|
127
|
-
supported_card_brands: Array<typeof SupportedNetworks[keyof typeof SupportedNetworks]>;
|
|
128
|
-
supported_currencies: string[];
|
|
129
|
-
}
|
|
130
|
-
export interface PaymentOptionsResponse {
|
|
131
|
-
id: string;
|
|
132
|
-
country: string;
|
|
133
|
-
currency: string;
|
|
134
|
-
payment_methods: PaymentMethod[];
|
|
135
|
-
[other: string]: any;
|
|
136
|
-
}
|
|
137
|
-
export interface MetaData {
|
|
138
|
-
merchant: MerchantResponse;
|
|
139
|
-
payment_options: PaymentOptionsResponse;
|
|
140
|
-
headers: Record<string, string>;
|
|
141
|
-
}
|
|
142
|
-
export interface CheckoutProfileRequest {
|
|
143
|
-
supported_payment_methods: string[];
|
|
144
|
-
supported_currencies: string[];
|
|
145
|
-
transaction_mode: string;
|
|
146
|
-
currency: string;
|
|
147
|
-
merchant_id: string;
|
|
148
|
-
total_amount: number;
|
|
149
|
-
order: {
|
|
150
|
-
id?: string;
|
|
151
|
-
amount: number;
|
|
152
|
-
currency: string;
|
|
153
|
-
description?: string;
|
|
154
|
-
metadata?: Record<string, string>;
|
|
155
|
-
customer?: {
|
|
156
|
-
id?: string;
|
|
157
|
-
email?: string;
|
|
158
|
-
first_name?: string;
|
|
159
|
-
last_name?: string;
|
|
160
|
-
phone?: {
|
|
161
|
-
country_code: string;
|
|
162
|
-
number: string;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
items: {
|
|
166
|
-
quantity: number;
|
|
167
|
-
amount: number;
|
|
168
|
-
currency: string;
|
|
169
|
-
name: string;
|
|
170
|
-
description: string;
|
|
171
|
-
}[];
|
|
172
|
-
merchant: {
|
|
173
|
-
id: string;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
export interface ChargeRequestBody {
|
|
178
|
-
source: {
|
|
179
|
-
id: string;
|
|
180
|
-
};
|
|
181
|
-
ipaddress?: string;
|
|
182
|
-
amount: number;
|
|
183
|
-
currency: string;
|
|
184
|
-
selected_amount?: string;
|
|
185
|
-
selected_currency?: string;
|
|
186
|
-
product: string;
|
|
187
|
-
threeDSecure?: boolean;
|
|
188
|
-
save_card: boolean;
|
|
189
|
-
fee: number;
|
|
190
|
-
customer: {
|
|
191
|
-
id?: string;
|
|
192
|
-
first_name?: string;
|
|
193
|
-
middle_name?: string;
|
|
194
|
-
last_name?: string;
|
|
195
|
-
email?: string;
|
|
196
|
-
phone?: {
|
|
197
|
-
country_code: string;
|
|
198
|
-
number: string;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
hashstring?: string;
|
|
202
|
-
metadata?: Record<string, string>;
|
|
203
|
-
post?: {
|
|
204
|
-
url: string;
|
|
205
|
-
};
|
|
206
|
-
redirect?: {
|
|
207
|
-
url: string;
|
|
208
|
-
};
|
|
209
|
-
merchant?: {
|
|
210
|
-
id: string;
|
|
211
|
-
};
|
|
212
|
-
order?: {
|
|
213
|
-
id: string;
|
|
214
|
-
};
|
|
215
|
-
payment_agreement?: {
|
|
216
|
-
id: string;
|
|
217
|
-
contract?: {
|
|
218
|
-
id: string;
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
destinations?: Record<string, any>;
|
|
222
|
-
reference?: {
|
|
223
|
-
order?: string;
|
|
224
|
-
transaction?: string;
|
|
225
|
-
};
|
|
226
|
-
description?: string;
|
|
227
|
-
}
|
|
228
|
-
export interface AuthorizeRequestBody extends ChargeRequestBody {
|
|
229
|
-
auto?: {
|
|
230
|
-
type: string;
|
|
231
|
-
time: number;
|
|
232
|
-
};
|
|
233
|
-
}
|
|
1
|
+
export * from './charge';
|
|
2
|
+
export * from './checkoutProfile';
|
|
3
|
+
export * from './ApplePayButtonProps';
|
|
4
|
+
export * from './enums';
|
|
5
|
+
export * from './tapLocalisation';
|
|
6
|
+
export * from './tapTheme';
|
package/build/@types/index.js
CHANGED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
export declare type TapLocalizationResponse = Record<string, TapLocalization>;
|
|
2
|
+
export interface TapLocalization {
|
|
3
|
+
ActionButton: ActionButton;
|
|
4
|
+
Common: Common;
|
|
5
|
+
CurrencyChangeWidget: CurrencyChangeWidget;
|
|
6
|
+
DeleteCard: DeleteCard;
|
|
7
|
+
ExtraFees: DeleteCard;
|
|
8
|
+
GoPay: GoPay;
|
|
9
|
+
Hints: Hints;
|
|
10
|
+
HorizontalHeaders: HorizontalHeaders;
|
|
11
|
+
ItemList: ItemList;
|
|
12
|
+
NFC: NFC;
|
|
13
|
+
TapAsyncSection: TapAsyncSection;
|
|
14
|
+
TapCardInputKit: TapCardInputKit;
|
|
15
|
+
TapLoyaltySection: TapLoyaltySection;
|
|
16
|
+
TapMerchantSection: TapMerchantSection;
|
|
17
|
+
TapOtpView: TapOtpView;
|
|
18
|
+
TapSwitchView: TapSwitchView;
|
|
19
|
+
}
|
|
20
|
+
interface TapSwitchView {
|
|
21
|
+
goPay: GoPay2;
|
|
22
|
+
mainCards: MainCards;
|
|
23
|
+
mainTelecom: MainCards;
|
|
24
|
+
merchant: GoPay2;
|
|
25
|
+
}
|
|
26
|
+
interface MainCards {
|
|
27
|
+
notes: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
titleEmpty: string;
|
|
30
|
+
titleValid: string;
|
|
31
|
+
}
|
|
32
|
+
interface GoPay2 {
|
|
33
|
+
notes: string;
|
|
34
|
+
subtitle: string;
|
|
35
|
+
title: string;
|
|
36
|
+
}
|
|
37
|
+
interface TapOtpView {
|
|
38
|
+
Message: Message;
|
|
39
|
+
}
|
|
40
|
+
interface Message {
|
|
41
|
+
Expired: string;
|
|
42
|
+
Invalid: string;
|
|
43
|
+
Ready: string;
|
|
44
|
+
}
|
|
45
|
+
interface TapMerchantSection {
|
|
46
|
+
paymentFor: string;
|
|
47
|
+
}
|
|
48
|
+
interface TapLoyaltySection {
|
|
49
|
+
amountView: AmountView;
|
|
50
|
+
footerView: FooterView;
|
|
51
|
+
headerView: HeaderView;
|
|
52
|
+
hintView: HintView;
|
|
53
|
+
}
|
|
54
|
+
interface HintView {
|
|
55
|
+
minimumWarning: string;
|
|
56
|
+
}
|
|
57
|
+
interface HeaderView {
|
|
58
|
+
balance: string;
|
|
59
|
+
lessThanMinimum: string;
|
|
60
|
+
redeem: string;
|
|
61
|
+
tc: string;
|
|
62
|
+
}
|
|
63
|
+
interface FooterView {
|
|
64
|
+
amount: string;
|
|
65
|
+
points: string;
|
|
66
|
+
}
|
|
67
|
+
interface AmountView {
|
|
68
|
+
title: string;
|
|
69
|
+
}
|
|
70
|
+
interface TapCardInputKit {
|
|
71
|
+
additionalLinePlaceHolder: string;
|
|
72
|
+
cardCVVPlaceHolder: string;
|
|
73
|
+
cardExpiryPlaceHolder: string;
|
|
74
|
+
cardNamePlaceHolder: string;
|
|
75
|
+
cardNumberPlaceHolder: string;
|
|
76
|
+
cardSaveForTapInfoMessage: string;
|
|
77
|
+
cardSaveForTapInfoTitle: string;
|
|
78
|
+
cardSaveForTapLabel: string;
|
|
79
|
+
cardSaveLabel: string;
|
|
80
|
+
cardSectionTitle: string;
|
|
81
|
+
cardSectionTitleOr: string;
|
|
82
|
+
cityPlaceHolder: string;
|
|
83
|
+
emailPlaceHolder: string;
|
|
84
|
+
flatPlaceHolder: string;
|
|
85
|
+
savedCardSectionTitle: string;
|
|
86
|
+
weSupport: string;
|
|
87
|
+
}
|
|
88
|
+
interface TapAsyncSection {
|
|
89
|
+
paymentCodeTitleLabel: string;
|
|
90
|
+
paymentExpiryTitleLabel: string;
|
|
91
|
+
paymentProgressLabel: string;
|
|
92
|
+
paymentRecieptEmail: string;
|
|
93
|
+
paymentRecieptLabel: string;
|
|
94
|
+
paymentRecieptSms: string;
|
|
95
|
+
paymentReferenceTitleLabel: string;
|
|
96
|
+
paymentVisitBranchesLabel: string;
|
|
97
|
+
}
|
|
98
|
+
interface NFC {
|
|
99
|
+
disabledNFC: string;
|
|
100
|
+
enableNFC: string;
|
|
101
|
+
nfcDescription: string;
|
|
102
|
+
nfcUnsupported: string;
|
|
103
|
+
scan: string;
|
|
104
|
+
scanSuccess: string;
|
|
105
|
+
}
|
|
106
|
+
interface ItemList {
|
|
107
|
+
Discount: string;
|
|
108
|
+
hideDesc: string;
|
|
109
|
+
showDesc: string;
|
|
110
|
+
}
|
|
111
|
+
interface HorizontalHeaders {
|
|
112
|
+
GatewayHeader: GatewayHeader;
|
|
113
|
+
SaveCardHeader: SaveCardHeader;
|
|
114
|
+
}
|
|
115
|
+
interface SaveCardHeader {
|
|
116
|
+
contactCountryPickerHeader: string;
|
|
117
|
+
contactDetailsSectionTitle: string;
|
|
118
|
+
shippingSectionTitle: string;
|
|
119
|
+
}
|
|
120
|
+
interface GatewayHeader {
|
|
121
|
+
leftTitle: string;
|
|
122
|
+
rightTitle: string;
|
|
123
|
+
webViewTitle: string;
|
|
124
|
+
}
|
|
125
|
+
interface Hints {
|
|
126
|
+
Default: Default;
|
|
127
|
+
Error: Error;
|
|
128
|
+
GoPayLogin: GoPayLogin;
|
|
129
|
+
Scanned: Scanned;
|
|
130
|
+
Warning: Warning;
|
|
131
|
+
}
|
|
132
|
+
interface Warning {
|
|
133
|
+
missingCVV: string;
|
|
134
|
+
missingExpiryCVV: string;
|
|
135
|
+
missingName: string;
|
|
136
|
+
}
|
|
137
|
+
interface Scanned {
|
|
138
|
+
successFullScan: string;
|
|
139
|
+
}
|
|
140
|
+
interface GoPayLogin {
|
|
141
|
+
otp: string;
|
|
142
|
+
password: string;
|
|
143
|
+
}
|
|
144
|
+
interface Error {
|
|
145
|
+
wrongCardNumber: string;
|
|
146
|
+
}
|
|
147
|
+
interface Default {
|
|
148
|
+
scan: string;
|
|
149
|
+
}
|
|
150
|
+
interface GoPay {
|
|
151
|
+
HintLabel: string;
|
|
152
|
+
}
|
|
153
|
+
interface DeleteCard {
|
|
154
|
+
cancel: string;
|
|
155
|
+
confirm: string;
|
|
156
|
+
message: string;
|
|
157
|
+
title: string;
|
|
158
|
+
}
|
|
159
|
+
interface CurrencyChangeWidget {
|
|
160
|
+
confirmButton: string;
|
|
161
|
+
enabledHeader: string;
|
|
162
|
+
header: string;
|
|
163
|
+
}
|
|
164
|
+
interface Common {
|
|
165
|
+
availableInOtherCurrencies: string;
|
|
166
|
+
back: string;
|
|
167
|
+
cancel: string;
|
|
168
|
+
change: string;
|
|
169
|
+
close: string;
|
|
170
|
+
confirm: string;
|
|
171
|
+
currencyAlert: string;
|
|
172
|
+
done: string;
|
|
173
|
+
edit: string;
|
|
174
|
+
email: string;
|
|
175
|
+
item: string;
|
|
176
|
+
items: string;
|
|
177
|
+
next: string;
|
|
178
|
+
password: string;
|
|
179
|
+
phone: string;
|
|
180
|
+
previous: string;
|
|
181
|
+
recent: string;
|
|
182
|
+
}
|
|
183
|
+
interface ActionButton {
|
|
184
|
+
cancel: string;
|
|
185
|
+
close: string;
|
|
186
|
+
confirm: string;
|
|
187
|
+
next: string;
|
|
188
|
+
now: string;
|
|
189
|
+
pay: string;
|
|
190
|
+
resend: string;
|
|
191
|
+
signin: string;
|
|
192
|
+
}
|
|
193
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|