@solidgate/vue-sdk 1.22.0 → 1.23.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,6 +84,7 @@ 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;
@@ -227,6 +229,10 @@ const payButtonIds = {
227
229
  pixButtonParams: {
228
230
  title: "Pix",
229
231
  id: PIX_BUTTON_CONTAINER_ID
232
+ },
233
+ bizumButtonParams: {
234
+ title: "Bizum",
235
+ id: BIZUM_BUTTON_CONTAINER_ID
230
236
  }
231
237
  };
232
238
  function getPayButtonParams(config, key, container) {
@@ -259,7 +265,8 @@ const initPaymentForm = async (props) => {
259
265
  googlePayContainerRef,
260
266
  applePayContainerRef,
261
267
  paypalContainerRef,
262
- pixContainerRef
268
+ pixContainerRef,
269
+ bizumContainerRef
263
270
  } = props;
264
271
  if (!merchantData) {
265
272
  throw new Error("Attribute 'merchantData' is required");
@@ -309,6 +316,14 @@ const initPaymentForm = async (props) => {
309
316
  if (pixButtonParams) {
310
317
  initConfig.pixButtonParams = pixButtonParams;
311
318
  }
319
+ const bizumButtonParams = getPayButtonParams(
320
+ props,
321
+ "bizumButtonParams",
322
+ bizumContainerRef
323
+ );
324
+ if (bizumButtonParams) {
325
+ initConfig.bizumButtonParams = bizumButtonParams;
326
+ }
312
327
  return clientSdk.init(initConfig);
313
328
  };
314
329
  const onSubscribe = (sdkInstanceValue, callbacks) => {
@@ -382,10 +397,12 @@ const _sfc_main$1 = defineComponent({
382
397
  applePayButtonParams: {},
383
398
  paypalButtonParams: {},
384
399
  pixButtonParams: {},
400
+ bizumButtonParams: {},
385
401
  googlePayContainerRef: {},
386
402
  applePayContainerRef: {},
387
403
  paypalContainerRef: {},
388
404
  pixContainerRef: {},
405
+ bizumContainerRef: {},
389
406
  onReadyPaymentInstance: {},
390
407
  onPaymentDetails: { type: Function, default: () => {
391
408
  } },
@@ -427,10 +444,12 @@ const _sfc_main$1 = defineComponent({
427
444
  applePayButtonParams: props.applePayButtonParams,
428
445
  paypalButtonParams: props.paypalButtonParams,
429
446
  pixButtonParams: props.pixButtonParams,
447
+ bizumButtonParams: props.bizumButtonParams,
430
448
  googlePayContainerRef: props.googlePayContainerRef,
431
449
  applePayContainerRef: props.applePayContainerRef,
432
450
  paypalContainerRef: props.paypalContainerRef,
433
- pixContainerRef: props.pixContainerRef
451
+ pixContainerRef: props.pixContainerRef,
452
+ bizumContainerRef: props.bizumContainerRef
434
453
  };
435
454
  const callbacks = {
436
455
  onMounted: (e) => props.onMounted && props.onMounted(e),
@@ -475,7 +494,7 @@ const _sfc_main$1 = defineComponent({
475
494
  };
476
495
  }
477
496
  });
478
- var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-5eddb80c"]]);
497
+ var Payment = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-728c7d1e"]]);
479
498
  const initResignForm = async (config) => {
480
499
  if (!config.resignRequest) {
481
500
  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.23.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.23.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
+ }