@paydock/client-sdk 1.104.3-beta → 1.104.7-beta
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/README.md +729 -405
- package/bundles/index.cjs +29624 -8753
- package/bundles/index.cjs.d.ts +484 -381
- package/bundles/index.cjs.map +1 -1
- package/bundles/index.mjs +29624 -8753
- package/bundles/index.mjs.d.ts +484 -381
- package/bundles/index.mjs.map +1 -1
- package/bundles/types/api/api-base.d.ts +14 -6
- package/bundles/types/api/api-base.d.ts.map +1 -1
- package/bundles/types/api/api-service-internal.d.ts +2 -1
- package/bundles/types/api/api-service-internal.d.ts.map +1 -1
- package/bundles/types/api/api.d.ts +1 -1
- package/bundles/types/api/api.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts +1 -1
- package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
- package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -1
- package/bundles/types/checkout-button/runner/popup.runner.d.ts +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -1
- package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -1
- package/bundles/types/components/container.d.ts +1 -0
- package/bundles/types/components/container.d.ts.map +1 -1
- package/bundles/types/components/http-core.d.ts.map +1 -1
- package/bundles/types/components/iframe-event.d.ts +17 -11
- package/bundles/types/components/iframe-event.d.ts.map +1 -1
- package/bundles/types/components/link.d.ts +3 -2
- package/bundles/types/components/link.d.ts.map +1 -1
- package/bundles/types/components/param.d.ts +6 -8
- package/bundles/types/components/param.d.ts.map +1 -1
- package/bundles/types/components/wallet-background.d.ts +2 -1
- package/bundles/types/components/wallet-background.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts +1 -1
- package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
- package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
- package/bundles/types/constants/validators.d.ts +45 -0
- package/bundles/types/constants/validators.d.ts.map +1 -0
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts +17 -13
- package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts +1 -1
- package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/index.d.ts +102 -1
- package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/interfaces.d.ts +109 -32
- package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +31 -0
- package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +5 -8
- package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
- package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
- package/bundles/types/shared/http/http-request.d.ts +14 -0
- package/bundles/types/shared/http/http-request.d.ts.map +1 -0
- package/bundles/types/shared/http/index.d.ts +2 -0
- package/bundles/types/shared/http/index.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
- package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
- package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
- package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
- package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts +1 -1
- package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts +2 -0
- package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts +8 -1
- package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts +7 -4
- package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +4 -0
- package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
- package/bundles/types/wallet-buttons/index.d.ts +126 -0
- package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/interfaces.d.ts +3 -0
- package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts +63 -121
- package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +1 -1
- package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
- package/bundles/types/wallet-buttons/wallet-service.d.ts +7 -0
- package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -1
- package/bundles/types/widget/configuration.d.ts +1 -1
- package/bundles/types/widget/configuration.d.ts.map +1 -1
- package/bundles/types/widget/html-multi-widget.d.ts +147 -76
- package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
- package/bundles/types/widget/html-widget.d.ts +1 -1
- package/bundles/types/widget/html-widget.d.ts.map +1 -1
- package/bundles/types/widget/multi-widget.d.ts.map +1 -1
- package/bundles/widget.umd.js +29624 -8753
- package/bundles/widget.umd.js.d.ts +484 -381
- package/bundles/widget.umd.js.map +1 -1
- package/bundles/widget.umd.js.min.d.ts +484 -381
- package/bundles/widget.umd.min.js +62 -1
- package/bundles/widget.umd.min.js.map +1 -1
- package/docs/api-ps-widget.md +12 -12
- package/docs/api-widget.md +211 -156
- package/docs/license.md +1 -1
- package/docs/secure-remote-commerce-examples.md +75 -101
- package/docs/secure-remote-commerce.md +185 -114
- package/docs/wallet-buttons-examples.md +48 -19
- package/docs/wallet-buttons.md +197 -2
- package/examples/multi-html-widget/simple.html +2 -1
- package/package.json +18 -15
- package/slate.md +123 -120
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -8
- package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts +0 -2
- package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -9
- package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { MultiWidget } from "./multi-widget";
|
|
2
1
|
import { Container } from "../components/container";
|
|
3
2
|
import { IFrame } from "../components/iframe";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { type IEventData, IFrameEvent } from "../components/iframe-event";
|
|
4
|
+
import { type IFormValidation, type IFormValues, type ValidatorFieldsMapKey } from '../components/param';
|
|
5
|
+
import { type ITriggerData, Trigger } from "../components/trigger";
|
|
6
|
+
import { MultiWidget } from "./multi-widget";
|
|
7
7
|
export interface IEventMetaData extends IEventData {
|
|
8
8
|
configuration_token: string;
|
|
9
9
|
type: string;
|
|
10
|
-
gateway_type?: string;
|
|
11
|
-
card_number_last4?: string;
|
|
12
|
-
card_scheme?: string;
|
|
13
|
-
card_number_length?: number;
|
|
14
10
|
account_name?: string;
|
|
15
11
|
account_number?: string;
|
|
12
|
+
card_number_last4?: string;
|
|
13
|
+
card_number_length?: number;
|
|
14
|
+
card_scheme?: string;
|
|
15
|
+
gateway_type?: string;
|
|
16
16
|
}
|
|
17
17
|
export interface IEventAfterLoadData extends IEventData {
|
|
18
18
|
}
|
|
@@ -21,30 +21,34 @@ export interface IEventFinishData extends IEventData {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Interface of data from validation event.
|
|
24
|
+
*
|
|
24
25
|
* @interface IFormValidation
|
|
25
26
|
*
|
|
26
|
-
* @param {string} event
|
|
27
|
-
* @param {string}
|
|
28
|
-
* @param {string}
|
|
29
|
-
* @param {string} [ref_id] Custom value
|
|
30
|
-
* @param {boolean} [form_valid]
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
33
|
-
* @param {
|
|
34
|
-
*
|
|
27
|
+
* @param {string} event The name of the event.
|
|
28
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
29
|
+
* @param {string} purpose A system variable that states the purpose of the event.
|
|
30
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
31
|
+
* @param {boolean} [form_valid] Indicates wether or not the form is valid.
|
|
32
|
+
* @param {Array<string>} [invalid_fields] Names of form fields with invalid data.
|
|
33
|
+
* @param {Array<string>} [invalid_showed_fields] Names of invalid form fields which are already displaying the error.
|
|
34
|
+
* @param {Partial<Record<CardValidatorValue | GenericValidatorValue, Array<string>>>} [validators] Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names.
|
|
35
|
+
* See list of available [Generic Vallidators]{@link GENERIC_VALIDATORS} and [Card Validators]{@link CARD_VALIDATORS},
|
|
36
|
+
*/
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
38
|
+
* Contains basic information associated with the event and additional meta data
|
|
39
|
+
* specific to the event. E.g., card info, gateway info, etc.
|
|
40
|
+
*
|
|
37
41
|
* @interface IEventMetaData
|
|
38
42
|
*
|
|
39
|
-
* @param {string} event
|
|
40
|
-
* @param {string} purpose
|
|
41
|
-
* @param {string} message_source
|
|
42
|
-
* @param {string} [ref_id] Custom value
|
|
43
|
+
* @param {string} event The name of the event.
|
|
44
|
+
* @param {string} purpose A system variable that states the purpose of the event.
|
|
45
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
46
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
43
47
|
* @param {string} configuration_token Token received from our API with widget data
|
|
44
48
|
* @param {string} type Payment type 'card', 'bank_account'
|
|
45
49
|
* @param {string} gateway_type Gateway type
|
|
46
50
|
* @param {string} [card_number_last4] Last 4 digit of your card
|
|
47
|
-
* @param {string} [card_scheme] Card scheme
|
|
51
|
+
* @param {string} [card_scheme] Card scheme, e.g., (Visa, Mastercard and American Express (AmEx))
|
|
48
52
|
* @param {number} [card_number_length] Card number length
|
|
49
53
|
* @param {string} [account_name] Bank account account name
|
|
50
54
|
* @param {string} [account_number] Bank account account number
|
|
@@ -53,19 +57,19 @@ export interface IEventFinishData extends IEventData {
|
|
|
53
57
|
* Interface of data from event.
|
|
54
58
|
* @interface IEventAfterLoadData
|
|
55
59
|
*
|
|
56
|
-
* @param {string} event
|
|
57
|
-
* @param {string} purpose
|
|
58
|
-
* @param {string} message_source
|
|
59
|
-
* @param {string} [ref_id] Custom value
|
|
60
|
+
* @param {string} event The name of the event.
|
|
61
|
+
* @param {string} purpose A system variable that states the purpose of the event.
|
|
62
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
63
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
60
64
|
* */
|
|
61
65
|
/**
|
|
62
66
|
* Interface of data from event.
|
|
63
67
|
* @interface IEventFinishData
|
|
64
68
|
*
|
|
65
|
-
* @param {string} event
|
|
66
|
-
* @param {string} purpose
|
|
67
|
-
* @param {string} message_source
|
|
68
|
-
* @param {string} [ref_id] Custom value
|
|
69
|
+
* @param {string} event The name of the event.
|
|
70
|
+
* @param {string} purpose A system variable that states the purpose of the event.
|
|
71
|
+
* @param {string} message_source A system variable that identifies the event source.
|
|
72
|
+
* @param {string} [ref_id] Custom unique value that identifies result of processed operation.
|
|
69
73
|
* @param {string} payment_source One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens)
|
|
70
74
|
* */
|
|
71
75
|
/**
|
|
@@ -124,129 +128,194 @@ declare class HtmlMultiWidget extends MultiWidget {
|
|
|
124
128
|
protected triggerElement: Trigger;
|
|
125
129
|
protected event: IFrameEvent;
|
|
126
130
|
protected validationData: IFormValidation;
|
|
127
|
-
constructor(selector: string, publicKey: string, conf: any);
|
|
131
|
+
/** @constructs */ constructor(selector: string, publicKey: string, conf: any);
|
|
128
132
|
/**
|
|
129
|
-
*
|
|
133
|
+
* Loads the widget.
|
|
130
134
|
*
|
|
135
|
+
* Calling this method results in an iframe element being inserted and rendered in the DOM.
|
|
131
136
|
*/
|
|
132
137
|
load(): void;
|
|
138
|
+
/**
|
|
139
|
+
* Registers a form validation callback for validation events.
|
|
140
|
+
*/
|
|
133
141
|
protected afterLoad(): void;
|
|
134
142
|
/**
|
|
135
|
-
*
|
|
143
|
+
* Listen to events of widget
|
|
136
144
|
*
|
|
137
|
-
* @
|
|
138
|
-
*
|
|
145
|
+
* @example
|
|
146
|
+
*
|
|
147
|
+
* ```javascript
|
|
148
|
+
* widget.on('form_submit', function (data) {
|
|
149
|
+
* console.log(data);
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
*
|
|
155
|
+
* ```javascript
|
|
156
|
+
* widget.on('form_submit').then(function (data) {
|
|
157
|
+
* console.log(data);
|
|
158
|
+
* });
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* @typedef {(data: IEventData | IEventMetaData | IEventFinishData | IFormValidation) => void} EventListenerCallback
|
|
162
|
+
*
|
|
163
|
+
* @param {string} eventName - The name of the event that should be listened. Available event names [EVENT]{@link EVENT}.
|
|
164
|
+
* @param {EventListenerCallback} [cb] - A function to be invoked whenever the event occurs.
|
|
165
|
+
*
|
|
166
|
+
* @return {Promise<IEventData | IEventMetaData | IEventFinishData | IFormValidation> | void}
|
|
139
167
|
*/
|
|
140
168
|
on(eventName: string): Promise<IEventData | IEventMetaData | IEventFinishData | IFormValidation>;
|
|
141
169
|
on(eventName: string, cb: (data: IEventData | IEventMetaData | IEventFinishData | IFormValidation) => void): any;
|
|
142
170
|
/**
|
|
143
|
-
*
|
|
171
|
+
* Registers callback that will be invoked for every trigger.
|
|
144
172
|
*
|
|
145
|
-
* @param {
|
|
146
|
-
* @param {ITriggerData} data
|
|
173
|
+
* @param {'submit_form' | 'tab'} triggers - The Widget element identifier that caused the trigger.
|
|
174
|
+
* @param {ITriggerData} data - Data that will be sent to the widget when the trigger occurs.
|
|
147
175
|
*/
|
|
148
176
|
trigger(triggerName: string, data?: ITriggerData): void;
|
|
149
177
|
/**
|
|
150
|
-
*
|
|
178
|
+
* Gets a reference to the form current validation state.
|
|
179
|
+
*
|
|
180
|
+
* !Warning: do not directly modify the values of the returned object.
|
|
181
|
+
*
|
|
151
182
|
* @return {IFormValidation} Form validation object
|
|
152
183
|
*/
|
|
153
184
|
getValidationState(): IFormValidation;
|
|
154
185
|
/**
|
|
155
|
-
*
|
|
156
|
-
*
|
|
186
|
+
* Checks if a given form is valid.
|
|
187
|
+
*
|
|
188
|
+
* A form is valid if all form fields are valid.
|
|
189
|
+
*
|
|
190
|
+
* @return {boolean} Indicates wether or not form is valid.
|
|
157
191
|
*/
|
|
158
192
|
isValidForm(): boolean;
|
|
159
193
|
/**
|
|
160
194
|
* Using this method you can check if a specific form field is invalid
|
|
195
|
+
*
|
|
161
196
|
* @param {string} field - Field name
|
|
162
197
|
* @return {boolean} Field is invalid
|
|
163
198
|
*/
|
|
164
199
|
isInvalidField(field?: string): boolean;
|
|
165
200
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
* @
|
|
201
|
+
* Checks if a given form field is displaying an error.
|
|
202
|
+
*
|
|
203
|
+
* @param {string} field - The form field name
|
|
204
|
+
*
|
|
205
|
+
* @return {boolean} Indicates wether or not the Error message is being displayed on the associated field.
|
|
169
206
|
*/
|
|
170
207
|
isFieldErrorShowed(field?: string): boolean;
|
|
171
208
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* @param {string}
|
|
175
|
-
* @
|
|
209
|
+
* Checks if a given form field is valid or invalid by name.
|
|
210
|
+
*
|
|
211
|
+
* @param {string} field - The form field name
|
|
212
|
+
* @param validator - The name of the validator.
|
|
213
|
+
*
|
|
214
|
+
* @return {boolean} Indicates wether or not the field is invalid based on validator intepretation.
|
|
176
215
|
*/
|
|
177
|
-
isInvalidFieldByValidator(field: string, validator:
|
|
216
|
+
isInvalidFieldByValidator(field: string, validator: ValidatorFieldsMapKey): boolean;
|
|
178
217
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
218
|
+
* Hides the widget.
|
|
219
|
+
*
|
|
220
|
+
* E.g., use this method to hide the widget after it loads.
|
|
221
|
+
*
|
|
222
|
+
* @param {boolean} [saveSize=false] Wether the original iframe element size should be saved before being hidden.
|
|
181
223
|
*/
|
|
182
224
|
hide(saveSize: boolean): void;
|
|
183
225
|
/**
|
|
184
|
-
*
|
|
226
|
+
* Shows the widget.
|
|
185
227
|
*
|
|
228
|
+
* E.g., use this method to show the widget after it was explicitly hidden.
|
|
186
229
|
*/
|
|
187
230
|
show(): void;
|
|
188
231
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
232
|
+
* Reloads the widget.
|
|
191
233
|
*/
|
|
192
234
|
reload(): void;
|
|
193
235
|
/**
|
|
194
|
-
*
|
|
236
|
+
* Hides the specified Widget elements by their identifier.
|
|
195
237
|
*
|
|
196
238
|
* @example
|
|
239
|
+
*
|
|
240
|
+
* ```javascript
|
|
197
241
|
* widget.hideElements(['submit_button', 'email']);
|
|
242
|
+
* ```
|
|
198
243
|
*
|
|
199
|
-
* @param {string[]} elements -
|
|
244
|
+
* @param {string[]} elements - List of element which can be hidden [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
|
|
200
245
|
*/
|
|
201
246
|
hideElements(elements: string[]): void;
|
|
202
247
|
/**
|
|
203
|
-
*
|
|
248
|
+
* Shows the specified Widget elements by their identifier.
|
|
204
249
|
*
|
|
205
|
-
*
|
|
206
|
-
* widget.showElements(['submit_button', 'email']);
|
|
250
|
+
* @example
|
|
207
251
|
*
|
|
208
|
-
*
|
|
252
|
+
* ```javascript
|
|
253
|
+
* widget.showElements(['submit_button', 'email']);
|
|
254
|
+
* ```
|
|
209
255
|
*
|
|
256
|
+
* @param {string[]} elements - List of elements which can be showed [ELEMENT]{@link ELEMENT} || [FORM_FIELD]{@link FORM_FIELD}
|
|
210
257
|
*/
|
|
211
258
|
showElements(elements: string[]): void;
|
|
212
259
|
/**
|
|
213
|
-
*
|
|
260
|
+
* Updates the form field values inside the widget.
|
|
214
261
|
*
|
|
215
262
|
* @example
|
|
263
|
+
*
|
|
264
|
+
* ```javascript
|
|
216
265
|
* widget.updateFormValues({
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
266
|
+
* email: 'predefined@email.com',
|
|
267
|
+
* card_name: 'Houston'
|
|
268
|
+
* });
|
|
269
|
+
*```
|
|
220
270
|
*
|
|
221
271
|
* @param {IFormValues} fieldValues - Fields with values
|
|
222
272
|
*/
|
|
223
273
|
updateFormValues(fieldValues: IFormValues): void;
|
|
274
|
+
/**
|
|
275
|
+
* Updates a single form field values inside the widget by the form field name.
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
*
|
|
279
|
+
* ```javascript
|
|
280
|
+
* widget.updateFormValue("card_name", "John Doe");
|
|
281
|
+
*```
|
|
282
|
+
*
|
|
283
|
+
* @param {string} key - The form field name
|
|
284
|
+
* @param {string} value - The form field value
|
|
285
|
+
*/
|
|
224
286
|
updateFormValue(key: string, value: string): void;
|
|
225
287
|
/**
|
|
226
|
-
*
|
|
288
|
+
* Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
|
|
227
289
|
*
|
|
228
|
-
* @param {string} selector -
|
|
229
|
-
* @param {string} dataType - data type of IEventData object.
|
|
290
|
+
* @param {string} selector - A CSS selector. E.g., ".my-class", "#my-id", or others
|
|
291
|
+
* @param {string} dataType - The data type of IEventData object.
|
|
230
292
|
*/
|
|
231
293
|
onFinishInsert(selector: string, dataType: string): void;
|
|
232
294
|
/**
|
|
233
|
-
*
|
|
295
|
+
* Intercepts a form submission and delegates processing to the widget.
|
|
296
|
+
*
|
|
297
|
+
* An simplified example of the process:
|
|
298
|
+
* - User clicks submit button in your form
|
|
299
|
+
* - This implicitly triggers a submission to the widget
|
|
300
|
+
* - The widget submits your form
|
|
234
301
|
*
|
|
235
|
-
*
|
|
236
|
-
* @note submit button in widget will be hidden.
|
|
302
|
+
* @note The widget's submit button will be hidden.
|
|
237
303
|
*
|
|
238
304
|
* @param {string} selector - css selector of your form
|
|
239
305
|
*
|
|
240
306
|
* @example
|
|
307
|
+
*
|
|
308
|
+
* ```html
|
|
309
|
+
* <body>
|
|
241
310
|
* <form id="myForm">
|
|
242
311
|
* <input name="amount">
|
|
243
312
|
* <button type="submit">Submit</button>
|
|
244
313
|
* </form>
|
|
245
|
-
*
|
|
246
|
-
* -->
|
|
247
|
-
* <script>
|
|
314
|
+
* <script>
|
|
248
315
|
* widget.interceptSubmitForm('#myForm');
|
|
249
|
-
*
|
|
316
|
+
* </script>
|
|
317
|
+
* </body>
|
|
318
|
+
* ```
|
|
250
319
|
*/
|
|
251
320
|
interceptSubmitForm(selector: string): void;
|
|
252
321
|
/**
|
|
@@ -257,8 +326,10 @@ declare class HtmlMultiWidget extends MultiWidget {
|
|
|
257
326
|
* Use this method for resize iFrame according content height
|
|
258
327
|
*
|
|
259
328
|
* @example
|
|
260
|
-
* widget.useAutoResize();
|
|
261
329
|
*
|
|
330
|
+
* ```javascript
|
|
331
|
+
* widget.useAutoResize();
|
|
332
|
+
*```
|
|
262
333
|
*/
|
|
263
334
|
useAutoResize(): void;
|
|
264
335
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-multi-widget.d.ts","sourceRoot":"","sources":["../../src/widget/html-multi-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"html-multi-widget.d.ts","sourceRoot":"","sources":["../../src/widget/html-multi-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAQ,KAAK,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAsB,KAAK,eAAe,EAAE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5B;;;;;;;;OAQG;IACI,aAAa;CAUvB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -20,7 +20,7 @@ import { IBamboraMeta, IFormElement, IPayPalMeta } from "../components/param";
|
|
|
20
20
|
* @param {string} [purpose=payment_source] - Purpose of widget form. Available parameters: ‘payment_source’, ‘card_payment_source_with_cvv’, ‘card_payment_source_without_cvv’
|
|
21
21
|
*/
|
|
22
22
|
declare class HtmlWidget extends HtmlMultiWidget {
|
|
23
|
-
constructor(selector: string, publicKey: string, gatewayID?: string, paymentType?: string, purpose?: string);
|
|
23
|
+
/** @constructs */ constructor(selector: string, publicKey: string, gatewayID?: string, paymentType?: string, purpose?: string);
|
|
24
24
|
/**
|
|
25
25
|
* Destination, where customer will receive all successful responses.
|
|
26
26
|
* Response will contain “data” object with “payment_source” or other parameters, in depending on 'purpose'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-widget.d.ts","sourceRoot":"","sources":["../../src/widget/html-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAG5E;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAM,UAAW,SAAQ,eAAe;
|
|
1
|
+
{"version":3,"file":"html-widget.d.ts","sourceRoot":"","sources":["../../src/widget/html-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAG5E;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAM,UAAW,SAAQ,eAAe;IAEpC,kBAAkB,aACN,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAkB,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,OAA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