@solidgate/vue-sdk 1.22.0 → 1.24.0

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.
@@ -64,10 +64,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
64
64
  enabled?: boolean | undefined;
65
65
  height?: number | undefined;
66
66
  } | undefined, "containerId"> | undefined;
67
+ bizumButtonParams?: Omit<{
68
+ containerId?: string | undefined;
69
+ enabled?: boolean | undefined;
70
+ height?: number | undefined;
71
+ } | undefined, "containerId"> | undefined;
67
72
  googlePayContainerRef?: HTMLDivElement | undefined;
68
73
  applePayContainerRef?: HTMLDivElement | undefined;
69
74
  paypalContainerRef?: HTMLDivElement | undefined;
70
75
  pixContainerRef?: HTMLDivElement | undefined;
76
+ bizumContainerRef?: HTMLDivElement | undefined;
71
77
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
72
78
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
73
79
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -174,10 +180,16 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
174
180
  enabled?: boolean | undefined;
175
181
  height?: number | undefined;
176
182
  } | undefined, "containerId"> | undefined;
183
+ bizumButtonParams?: Omit<{
184
+ containerId?: string | undefined;
185
+ enabled?: boolean | undefined;
186
+ height?: number | undefined;
187
+ } | undefined, "containerId"> | undefined;
177
188
  googlePayContainerRef?: HTMLDivElement | undefined;
178
189
  applePayContainerRef?: HTMLDivElement | undefined;
179
190
  paypalContainerRef?: HTMLDivElement | undefined;
180
191
  pixContainerRef?: HTMLDivElement | undefined;
192
+ bizumContainerRef?: HTMLDivElement | undefined;
181
193
  onReadyPaymentInstance?: ((paymentInstance: ClientSdkInstance) => void) | undefined;
182
194
  onPaymentDetails?: ((e: PaymentDetailsMessage) => void) | undefined;
183
195
  onMounted?: ((e: MountedMessage) => void) | undefined;
@@ -3,4 +3,5 @@ declare const GOOGLE_PAY_BUTTON_CONTAINER_ID: string;
3
3
  declare const APPLE_PAY_BUTTON_CONTAINER_ID: string;
4
4
  declare const PAYPAL_BUTTON_CONTAINER_ID: string;
5
5
  declare const PIX_BUTTON_CONTAINER_ID: string;
6
- export { IFRAME_CONTAINER_ID, GOOGLE_PAY_BUTTON_CONTAINER_ID, APPLE_PAY_BUTTON_CONTAINER_ID, PAYPAL_BUTTON_CONTAINER_ID, PIX_BUTTON_CONTAINER_ID };
6
+ declare const BIZUM_BUTTON_CONTAINER_ID: string;
7
+ export { IFRAME_CONTAINER_ID, GOOGLE_PAY_BUTTON_CONTAINER_ID, APPLE_PAY_BUTTON_CONTAINER_ID, PAYPAL_BUTTON_CONTAINER_ID, PIX_BUTTON_CONTAINER_ID, BIZUM_BUTTON_CONTAINER_ID };
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- .payment-form-container[data-v-5eddb80c] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
1
+ .payment-form-container[data-v-728c7d1e] iframe,.payment-form-container[data-v-77b30339] iframe{border:none}
package/dist/index.es.js CHANGED
@@ -4,6 +4,7 @@ const GOOGLE_PAY_BUTTON_CONTAINER_ID = `google-pay-button-container_#${Math.rand
4
4
  const APPLE_PAY_BUTTON_CONTAINER_ID = `apple-pay-button-container_#${Math.random() * 1e4}`;
5
5
  const PAYPAL_BUTTON_CONTAINER_ID = `paypal-button-container_#${Math.random() * 1e4}`;
6
6
  const PIX_BUTTON_CONTAINER_ID = `pix-button-container_#${Math.random() * 1e4}`;
7
+ const BIZUM_BUTTON_CONTAINER_ID = `bizum-button-container_#${Math.random() * 1e4}`;
7
8
  var MessageType;
8
9
  (function(MessageType2) {
9
10
  MessageType2["Mounted"] = "mounted";
@@ -83,11 +84,13 @@ var PayableEntity;
83
84
  PayableEntity2["Resign"] = "resign";
84
85
  PayableEntity2["Paypal"] = "paypal";
85
86
  PayableEntity2["Pix"] = "pix";
87
+ PayableEntity2["Bizum"] = "bizum";
86
88
  })(PayableEntity || (PayableEntity = {}));
87
89
  var PayableEntity$1 = PayableEntity;
88
90
  var InteractionType;
89
91
  (function(InteractionType2) {
90
92
  InteractionType2["Click"] = "click";
93
+ InteractionType2["PageClose"] = "pageClose";
91
94
  InteractionType2["Focus"] = "focus";
92
95
  InteractionType2["Blur"] = "blur";
93
96
  InteractionType2["Change"] = "change";
@@ -227,6 +230,10 @@ const payButtonIds = {
227
230
  pixButtonParams: {
228
231
  title: "Pix",
229
232
  id: PIX_BUTTON_CONTAINER_ID
233
+ },
234
+ bizumButtonParams: {
235
+ title: "Bizum",
236
+ id: BIZUM_BUTTON_CONTAINER_ID
230
237
  }
231
238
  };
232
239
  function getPayButtonParams(config, key, container) {
@@ -259,7 +266,8 @@ const initPaymentForm = async (props) => {
259
266
  googlePayContainerRef,
260
267
  applePayContainerRef,
261
268
  paypalContainerRef,
262
- pixContainerRef
269
+ pixContainerRef,
270
+ bizumContainerRef
263
271
  } = props;
264
272
  if (!merchantData) {
265
273
  throw new Error("Attribute 'merchantData' is required");
@@ -309,6 +317,14 @@ const initPaymentForm = async (props) => {
309
317
  if (pixButtonParams) {
310
318
  initConfig.pixButtonParams = pixButtonParams;
311
319
  }
320
+ const bizumButtonParams = getPayButtonParams(
321
+ props,
322
+ "bizumButtonParams",
323
+ bizumContainerRef
324
+ );
325
+ if (bizumButtonParams) {
326
+ initConfig.bizumButtonParams = bizumButtonParams;
327
+ }
312
328
  return clientSdk.init(initConfig);
313
329
  };
314
330
  const onSubscribe = (sdkInstanceValue, callbacks) => {
@@ -382,10 +398,12 @@ const _sfc_main$1 = defineComponent({
382
398
  applePayButtonParams: {},
383
399
  paypalButtonParams: {},
384
400
  pixButtonParams: {},
401
+ bizumButtonParams: {},
385
402
  googlePayContainerRef: {},
386
403
  applePayContainerRef: {},
387
404
  paypalContainerRef: {},
388
405
  pixContainerRef: {},
406
+ bizumContainerRef: {},
389
407
  onReadyPaymentInstance: {},
390
408
  onPaymentDetails: { type: Function, default: () => {
391
409
  } },
@@ -427,10 +445,12 @@ const _sfc_main$1 = defineComponent({
427
445
  applePayButtonParams: props.applePayButtonParams,
428
446
  paypalButtonParams: props.paypalButtonParams,
429
447
  pixButtonParams: props.pixButtonParams,
448
+ bizumButtonParams: props.bizumButtonParams,
430
449
  googlePayContainerRef: props.googlePayContainerRef,
431
450
  applePayContainerRef: props.applePayContainerRef,
432
451
  paypalContainerRef: props.paypalContainerRef,
433
- pixContainerRef: props.pixContainerRef
452
+ pixContainerRef: props.pixContainerRef,
453
+ bizumContainerRef: props.bizumContainerRef
434
454
  };
435
455
  const callbacks = {
436
456
  onMounted: (e) => props.onMounted && props.onMounted(e),
@@ -475,7 +495,7 @@ const _sfc_main$1 = defineComponent({
475
495
  };
476
496
  }
477
497
  });
478
- var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5eddb80c"]]);
498
+ var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-728c7d1e"]]);
479
499
  const initResignForm = async (config) => {
480
500
  if (!config.resignRequest) {
481
501
  throw new Error("Attribute 'resignRequest' is required");
@@ -9,10 +9,12 @@ interface PaymentProps extends Partial<ClientSdkEventsProvider> {
9
9
  applePayButtonParams?: Omit<InitConfig['applePayButtonParams'], 'containerId'>;
10
10
  paypalButtonParams?: Omit<InitConfig['paypalButtonParams'], 'containerId'>;
11
11
  pixButtonParams?: Omit<InitConfig['pixButtonParams'], 'containerId'>;
12
+ bizumButtonParams?: Omit<InitConfig['bizumButtonParams'], 'containerId'>;
12
13
  googlePayContainerRef?: HTMLDivElement;
13
14
  applePayContainerRef?: HTMLDivElement;
14
15
  paypalContainerRef?: HTMLDivElement;
15
16
  pixContainerRef?: HTMLDivElement;
17
+ bizumContainerRef?: HTMLDivElement;
16
18
  onReadyPaymentInstance?: (paymentInstance: ClientSdkInstance) => void;
17
19
  }
18
20
  export default PaymentProps;
@@ -1,3 +1,3 @@
1
1
  import { InitConfig } from '@solidgate/client-sdk-loader';
2
- declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
2
+ declare function getPayButtonParams<T extends 'googlePayButtonParams' | 'applePayButtonParams' | 'paypalButtonParams' | 'pixButtonParams' | 'bizumButtonParams'>(config: InitConfig, key: T, container: HTMLElement | undefined): NonNullable<InitConfig[T]> | undefined;
3
3
  export default getPayButtonParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidgate/vue-sdk",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "repository": "https://github.com/solidgate-tech/vue-sdk",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,7 @@
28
28
  "vue": "^3.2.25"
29
29
  },
30
30
  "dependencies": {
31
- "@solidgate/client-sdk-loader": "^1.22.0"
31
+ "@solidgate/client-sdk-loader": "^1.24.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@babel/types": "^7.24.5",
@@ -51,4 +51,4 @@
51
51
  "vue": "^3.2.25",
52
52
  "vue-tsc": "^1.5.1"
53
53
  }
54
- }
54
+ }