@getopenpay/openpay-js 0.5.9 → 0.5.11
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/{Resource-DdfT9Qgs.js → Resource-CmF5dReO.js} +2 -2
- package/dist/{SimpleSpanProcessor-CawKbjQf.js → SimpleSpanProcessor-BlC7aMwS.js} +6 -6
- package/dist/{detect-resources-L_FS0vCv.js → detect-resources-CBHP7pG-.js} +6 -6
- package/dist/{diag-api-BQgG0RgX.js → diag-api-Cz-UtaIj.js} +1 -1
- package/dist/{index-CK7R3I_S.js → index-BFSwJdRN.js} +4 -4
- package/dist/{index-C7QQCPZm.js → index-BI9Xklch.js} +5 -5
- package/dist/{index-vclJPHqd.js → index-Boe_4WiD.js} +1 -1
- package/dist/{index-BHpe6-5x.js → index-BqLe60DN.js} +4 -4
- package/dist/{index-BxkqQAR8.js → index-C-WuK9bQ.js} +1 -1
- package/dist/index-CsYu7T8Y.js +7074 -0
- package/dist/{index-DPnc8HRA.js → index-gtGqMlZy.js} +1 -1
- package/dist/{index-CqWJjO-F.js → index-otf1fn1r.js} +5 -5
- package/dist/{index-m6o0K8op.js → index-p9mUX5yE.js} +1 -1
- package/dist/{index-CunYG5q8.js → index-yNlNQGj0.js} +4 -4
- package/dist/index.d.ts +85 -25
- package/dist/index.es.js +5 -4
- package/dist/index.umd.js +5 -5
- package/dist/{metrics-api-cAjroTqE.js → metrics-api-CBTuIHlh.js} +1 -1
- package/dist/{sdk-info-rz-T2MNr.js → sdk-info-CqjfNdA7.js} +1 -1
- package/dist/{url-B-V82H68.js → url-Bg17qvHA.js} +1 -1
- package/dist/{utils-Bcm865JD.js → utils-DBqZC8JN.js} +1 -1
- package/dist/{utils-Dq30RtPb.js → utils-DUkJ-8r_.js} +3 -3
- package/package.json +1 -1
- package/dist/index-D_vBvWer.js +0 -7037
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as diag } from "./diag-api-
|
|
1
|
+
import { d as diag } from "./diag-api-Cz-UtaIj.js";
|
|
2
2
|
import { E as ExportResultCode, h as hexToBinary } from "./ExportResult-B-YLKMaU.js";
|
|
3
3
|
import { c as commonjsGlobal } from "./_commonjsHelpers-f76XedMs.js";
|
|
4
4
|
var OTLPExporterBase = (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as z } from "./diag-api-
|
|
2
|
-
import { b as G, c as I, d as W, e as X, p as _, i as V, f as K, g as Q, j as C, k as $, m as J } from "./url-
|
|
3
|
-
import { s as Y, i as Z, I as q } from "./utils-
|
|
1
|
+
import { d as z } from "./diag-api-Cz-UtaIj.js";
|
|
2
|
+
import { b as G, c as I, d as W, e as X, p as _, i as V, f as K, g as Q, j as C, k as $, m as J } from "./url-Bg17qvHA.js";
|
|
3
|
+
import { s as Y, i as Z, I as q } from "./utils-DUkJ-8r_.js";
|
|
4
4
|
import { _ as T } from "./utils-CX5YT7yI.js";
|
|
5
|
-
import { P as O, b as P, p as N, s as ee, c as te } from "./utils-
|
|
6
|
-
import { t as x, c as p, S as re } from "./index-
|
|
5
|
+
import { P as O, b as P, p as N, s as ee, c as te } from "./utils-DBqZC8JN.js";
|
|
6
|
+
import { t as x, c as p, S as re } from "./index-CsYu7T8Y.js";
|
|
7
7
|
var y;
|
|
8
8
|
(function(a) {
|
|
9
9
|
a.COMPONENT = "component", a.HTTP_ERROR_NAME = "http.error_name", a.HTTP_STATUS_TEXT = "http.status_text";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as l } from "./Resource-
|
|
2
|
-
import { d as ee } from "./Resource-
|
|
3
|
-
import { d as v } from "./diag-api-
|
|
4
|
-
import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-
|
|
1
|
+
import { R as l } from "./Resource-CmF5dReO.js";
|
|
2
|
+
import { d as ee } from "./Resource-CmF5dReO.js";
|
|
3
|
+
import { d as v } from "./diag-api-Cz-UtaIj.js";
|
|
4
|
+
import { e as A, f as m, g as b, h as w, S as D } from "./sdk-info-CqjfNdA7.js";
|
|
5
5
|
var T = (
|
|
6
6
|
/** @class */
|
|
7
7
|
function() {
|
package/dist/index.d.ts
CHANGED
|
@@ -92,6 +92,34 @@ declare type ApplePayPaymentRequest =
|
|
|
92
92
|
| ((current: ApplePayJS.ApplePayPaymentRequest) => Partial<ApplePayJS.ApplePayPaymentRequest>)
|
|
93
93
|
| Partial<ApplePayJS.ApplePayPaymentRequest>;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Styles
|
|
97
|
+
*/
|
|
98
|
+
declare const BaseElementsStyle = z.object({
|
|
99
|
+
backgroundColor: OptionalString,
|
|
100
|
+
color: OptionalString,
|
|
101
|
+
fontFamily: OptionalString,
|
|
102
|
+
fontSize: OptionalString,
|
|
103
|
+
fontWeight: OptionalString,
|
|
104
|
+
margin: OptionalString,
|
|
105
|
+
padding: OptionalString,
|
|
106
|
+
letterSpacing: OptionalString,
|
|
107
|
+
lineHeight: OptionalString,
|
|
108
|
+
hideIcon: OptionalString,
|
|
109
|
+
placeholderStyle: z
|
|
110
|
+
.object({
|
|
111
|
+
color: OptionalString,
|
|
112
|
+
fontSize: OptionalString,
|
|
113
|
+
fontWeight: OptionalString,
|
|
114
|
+
fontFamily: OptionalString,
|
|
115
|
+
letterSpacing: OptionalString,
|
|
116
|
+
lineHeight: OptionalString,
|
|
117
|
+
})
|
|
118
|
+
.optional(),
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
declare type BaseElementsStyle = z.infer<typeof BaseElementsStyle>;
|
|
122
|
+
|
|
95
123
|
declare enum Blockchain {
|
|
96
124
|
EVM = 'EVM',
|
|
97
125
|
SOL = 'Solana',
|
|
@@ -99,6 +127,41 @@ declare enum Blockchain {
|
|
|
99
127
|
|
|
100
128
|
declare type BlockchainNetwork = keyof typeof Blockchain;
|
|
101
129
|
|
|
130
|
+
declare const CardCvcElementStyle = BaseElementsStyle.extend({
|
|
131
|
+
disableAutoFill: OptionalString,
|
|
132
|
+
placeholder: z.string().optional(),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
declare const CardElementStyle = BaseElementsStyle.extend({
|
|
136
|
+
disableAutoFill: OptionalString,
|
|
137
|
+
placeholder: z
|
|
138
|
+
.object({
|
|
139
|
+
cardNumber: OptionalString,
|
|
140
|
+
expiry: OptionalString,
|
|
141
|
+
cvc: OptionalString,
|
|
142
|
+
})
|
|
143
|
+
.optional(),
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
declare const CardExpiryElementStyle = BaseElementsStyle.extend({
|
|
147
|
+
disableAutoFill: OptionalString,
|
|
148
|
+
placeholder: z.string().optional(),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
declare const CardNumberElementStyle = BaseElementsStyle.extend({
|
|
152
|
+
disableAutoFill: OptionalString,
|
|
153
|
+
placeholder: z.string().optional(),
|
|
154
|
+
/**
|
|
155
|
+
* The card icon at the start of the card number input field
|
|
156
|
+
* It won't affect after the icon changed to card brand after the user input the card number
|
|
157
|
+
*/
|
|
158
|
+
icon: z
|
|
159
|
+
.object({
|
|
160
|
+
color: z.string().optional(),
|
|
161
|
+
})
|
|
162
|
+
.optional(),
|
|
163
|
+
});
|
|
164
|
+
|
|
102
165
|
declare type CCSubmitParams = {
|
|
103
166
|
paymentRouteId?: string;
|
|
104
167
|
};
|
|
@@ -203,8 +266,8 @@ declare type DefaultFieldValues = Partial<Record<FieldNameEnum, string>> & {
|
|
|
203
266
|
require_full_shipping_address?: boolean;
|
|
204
267
|
};
|
|
205
268
|
|
|
206
|
-
declare type ElementProps<
|
|
207
|
-
styles?: ElementsStyle<
|
|
269
|
+
declare type ElementProps<T extends ElementType> = {
|
|
270
|
+
styles?: ElementsStyle<T>;
|
|
208
271
|
};
|
|
209
272
|
|
|
210
273
|
declare type ElementsFormProps = {
|
|
@@ -221,28 +284,17 @@ declare type ElementsFormProps = {
|
|
|
221
284
|
preventNavigationDuringSubmission?: boolean;
|
|
222
285
|
};
|
|
223
286
|
|
|
224
|
-
declare
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
fontWeight: OptionalString,
|
|
232
|
-
fontFamily: OptionalString,
|
|
233
|
-
letterSpacing: OptionalString,
|
|
234
|
-
lineHeight: OptionalString,
|
|
235
|
-
})
|
|
236
|
-
.optional(),
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
declare type ElementsStyle<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof ElementsStyle<T>>>;
|
|
240
|
-
|
|
241
|
-
declare const ElementType = z.nativeEnum(ElementTypeEnum);
|
|
287
|
+
declare type ElementsStyle<T extends ElementType = ElementType> = {
|
|
288
|
+
card: z.infer<typeof CardElementStyle>;
|
|
289
|
+
'card-number': z.infer<typeof CardNumberElementStyle>;
|
|
290
|
+
'card-expiry': z.infer<typeof CardExpiryElementStyle>;
|
|
291
|
+
'card-cvc': z.infer<typeof CardCvcElementStyle>;
|
|
292
|
+
'cde-bridge': z.infer<typeof BaseElementsStyle>;
|
|
293
|
+
}[T];
|
|
242
294
|
|
|
243
|
-
declare type ElementType = z.infer<typeof
|
|
295
|
+
export declare type ElementType = z.infer<typeof _ElementTypeEnumZod>;
|
|
244
296
|
|
|
245
|
-
declare enum ElementTypeEnum {
|
|
297
|
+
export declare enum ElementTypeEnum {
|
|
246
298
|
CARD = 'card',
|
|
247
299
|
CARD_NUMBER = 'card-number',
|
|
248
300
|
CARD_EXPIRY = 'card-expiry',
|
|
@@ -250,7 +302,7 @@ declare enum ElementTypeEnum {
|
|
|
250
302
|
CDE_BRIDGE = 'cde-bridge',
|
|
251
303
|
}
|
|
252
304
|
|
|
253
|
-
declare
|
|
305
|
+
declare const _ElementTypeEnumZod = z.enum(['card', 'card-number', 'card-expiry', 'card-cvc', 'cde-bridge']);
|
|
254
306
|
|
|
255
307
|
declare enum Environment {
|
|
256
308
|
Local = 'local',
|
|
@@ -883,8 +935,8 @@ export declare class OpenPayForm {
|
|
|
883
935
|
setFormHeight: (height: string) => void;
|
|
884
936
|
onCdeLoaded: (payload: LoadedEventPayload) => void;
|
|
885
937
|
onCdeLoadError: (errMsg: string) => void;
|
|
886
|
-
createElement: (
|
|
887
|
-
registerIframe: (type:
|
|
938
|
+
createElement: <T extends ElementType>(elementType: T, options?: ElementProps<T>) => RegisteredElement;
|
|
939
|
+
registerIframe: (type: ElementType, frame: HTMLIFrameElement) => RegisteredElement;
|
|
888
940
|
private buildQueryString;
|
|
889
941
|
private connectToElement;
|
|
890
942
|
private getFormDiv;
|
|
@@ -902,7 +954,13 @@ export declare class OpenPayForm {
|
|
|
902
954
|
processors: PaymentProcessor[];
|
|
903
955
|
isAvailable: boolean;
|
|
904
956
|
}[]>;
|
|
957
|
+
/**
|
|
958
|
+
* @deprecated
|
|
959
|
+
* We're normalizing the submit method to be the same in both React and Vanilla versions.
|
|
960
|
+
* Please use `submitWith` instead.
|
|
961
|
+
*/
|
|
905
962
|
generalSubmit: GeneralSubmit;
|
|
963
|
+
submitWith: GeneralSubmit;
|
|
906
964
|
/**
|
|
907
965
|
* Alias for submitCard
|
|
908
966
|
*/
|
|
@@ -1056,6 +1114,7 @@ declare type PaypalFlowCustomParams = {
|
|
|
1056
1114
|
};
|
|
1057
1115
|
|
|
1058
1116
|
declare type ProcessorSpecificSubmitSettings<T extends SubmitMethod = SubmitMethod> = {
|
|
1117
|
+
[SubmitMethods.card]: CCSubmitParams;
|
|
1059
1118
|
[SubmitMethods.pockytPaypal]: { useRedirectFlow?: boolean };
|
|
1060
1119
|
[SubmitMethods.applePay]: ApplePayFlowCustomParams;
|
|
1061
1120
|
[SubmitMethods.googlePay]: GooglePayFlowCustomParams;
|
|
@@ -1099,6 +1158,7 @@ declare const SubmitMethod = z.nativeEnum(SubmitMethods);
|
|
|
1099
1158
|
declare type SubmitMethod = z.infer<typeof SubmitMethod>;
|
|
1100
1159
|
|
|
1101
1160
|
export declare enum SubmitMethods {
|
|
1161
|
+
card = 'card',
|
|
1102
1162
|
pockytPaypal = 'pockyt-paypal',
|
|
1103
1163
|
applePay = 'apple-pay',
|
|
1104
1164
|
googlePay = 'google-pay',
|
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { F as
|
|
1
|
+
import { E as p, F as r, O as i, l as s } from "./index-CsYu7T8Y.js";
|
|
2
2
|
import "penpal";
|
|
3
3
|
import "uuid";
|
|
4
4
|
import "zod";
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as ElementTypeEnum,
|
|
7
|
+
r as FieldName,
|
|
7
8
|
i as OpenPayForm,
|
|
8
|
-
|
|
9
|
+
s as SubmitMethods
|
|
9
10
|
};
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXguZXMuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImV4cG9ydCB7IEUgYXMgRWxlbWVudFR5cGVFbnVtLCBGIGFzIEZpZWxkTmFtZSwgTyBhcyBPcGVuUGF5Rm9ybSwgbCBhcyBTdWJtaXRNZXRob2RzIH0gZnJvbSAnLi9pbmRleC0hfnswMDZ9fi5qcyc7XG5pbXBvcnQgJ3BlbnBhbCc7XG5pbXBvcnQgJ3V1aWQnO1xuaW1wb3J0ICd6b2QnOyJdLAogICJtYXBwaW5ncyI6ICJBQUFBLFNBQWMsS0FBTEEsR0FBMkIsS0FBTEMsR0FBcUIsS0FBTEMsR0FBdUIsS0FBTEMsU0FBMEI7QUFDM0YsT0FBTztBQUNQLE9BQU87QUFDUCxPQUFPOyIsCiAgIm5hbWVzIjogWyJFIiwgIkYiLCAiTyIsICJsIl0KfQo=
|