@paykka/card-checkout-ui 0.13.1 → 0.13.5

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.
Files changed (158) hide show
  1. package/dist/card-checkout-ui.js +21 -21
  2. package/dist/card-checkout-ui.umd.cjs +21 -21
  3. package/dist/es/_commonjsHelpers.js +82 -1
  4. package/dist/es/api/modules/get-browser-params.js +4 -1
  5. package/dist/es/api/modules/opay-wallet/index.js +16 -0
  6. package/dist/es/api/modules/paga-wallet/index.js +16 -0
  7. package/dist/es/api/modules/pic-pay/index.js +16 -0
  8. package/dist/es/api/modules/pix/index.js +16 -0
  9. package/dist/es/api/modules/vietqr/index.js +4 -0
  10. package/dist/es/components/AliPay/index.js +29 -35
  11. package/dist/es/components/Boost/index.js +34 -40
  12. package/dist/es/components/Card/index.js +35 -39
  13. package/dist/es/components/DropIn/index.js +42 -2
  14. package/dist/es/components/EncryptedCard/index.js +5 -1
  15. package/dist/es/components/GooglePay/index.js +1 -0
  16. package/dist/es/components/GrabPay/index.js +34 -40
  17. package/dist/es/components/GuideCard/index.js +6 -1
  18. package/dist/es/components/LinePay/index.js +34 -40
  19. package/dist/es/components/MayBankQRPay/index.js +35 -41
  20. package/dist/es/components/NinePay/index.js +34 -40
  21. package/dist/es/components/SecuredFieldsProvider/index.js +23 -7
  22. package/dist/es/components/SecuredIframe/index.js +36 -59
  23. package/dist/es/components/Sepa/index.js +17 -21
  24. package/dist/es/components/ShopeePay/index.js +34 -40
  25. package/dist/es/components/TNGWallet/index.js +34 -40
  26. package/dist/es/components/ThreeDS/index.js +32 -7
  27. package/dist/es/components/WechatPay/index.js +19 -24
  28. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +6 -6
  29. package/dist/es/components/index.js +5 -0
  30. package/dist/es/components/internal/Form/FormItem.js +1 -1
  31. package/dist/es/components/internal/Form/util.js +1 -1
  32. package/dist/es/components/internal/Select/SelectMenu.js +2 -2
  33. package/dist/es/components/internal/icons/IconError.js +7 -4
  34. package/dist/es/components/internal/icons/IconOpayWallet.js +71 -0
  35. package/dist/es/components/internal/icons/IconPagaWallet.js +141 -0
  36. package/dist/es/components/internal/icons/IconPaymaya.js +42 -86
  37. package/dist/es/components/internal/icons/IconPicPay.js +49 -0
  38. package/dist/es/components/internal/icons/IconPix.js +75 -0
  39. package/dist/es/components/internal/icons/IconVietqr.js +45 -0
  40. package/dist/es/components/internal/icons/IconVietqrComplete.js +49 -0
  41. package/dist/es/components/wallets/GCash/GCash.js +20 -25
  42. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +346 -0
  43. package/dist/es/components/wallets/OpayWallet/index.js +1 -0
  44. package/dist/es/components/wallets/OpayWallet/opay-wallet.js +1 -0
  45. package/dist/es/components/wallets/OpayWallet/type.js +1 -0
  46. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +346 -0
  47. package/dist/es/components/wallets/PagaWallet/index.js +1 -0
  48. package/dist/es/components/wallets/PagaWallet/paga-wallet.js +1 -0
  49. package/dist/es/components/wallets/PagaWallet/type.js +1 -0
  50. package/dist/es/components/wallets/Paymaya/Paymaya.js +34 -40
  51. package/dist/es/components/wallets/PicPay/PicPay.js +346 -0
  52. package/dist/es/components/wallets/PicPay/index.js +1 -0
  53. package/dist/es/components/wallets/PicPay/pic-pay.js +1 -0
  54. package/dist/es/components/wallets/PicPay/type.js +1 -0
  55. package/dist/es/components/wallets/Pix/Pix.js +346 -0
  56. package/dist/es/components/wallets/Pix/index.js +1 -0
  57. package/dist/es/components/wallets/Pix/pix2.js +1 -0
  58. package/dist/es/components/wallets/Pix/type.js +1 -0
  59. package/dist/es/components/wallets/Vietqr/Vietqr.js +380 -0
  60. package/dist/es/components/wallets/Vietqr/index.js +1 -0
  61. package/dist/es/components/wallets/Vietqr/type.js +1 -0
  62. package/dist/es/components/wallets/Vietqr/vietqr2.js +1 -0
  63. package/dist/es/components/wallets/Zalopay/Zalopay.js +17 -21
  64. package/dist/es/components/wallets/index.js +8 -0
  65. package/dist/es/constant.js +32 -2
  66. package/dist/es/core/checkout.js +24 -1
  67. package/dist/es/core/create.js +1 -1
  68. package/dist/es/core/session.js +2 -23
  69. package/dist/es/core/theme.js +65 -0
  70. package/dist/es/core.js +34 -34
  71. package/dist/es/i18n/locales/de-DE.js +8 -2
  72. package/dist/es/i18n/locales/en-GB.js +8 -2
  73. package/dist/es/i18n/locales/es-ES.js +8 -2
  74. package/dist/es/i18n/locales/fr-FR.js +8 -2
  75. package/dist/es/i18n/locales/ja-JP.js +8 -2
  76. package/dist/es/i18n/locales/ko-KR.js +8 -2
  77. package/dist/es/i18n/locales/nl-NL.js +8 -2
  78. package/dist/es/i18n/locales/pt-PT.js +8 -2
  79. package/dist/es/i18n/locales/ru-RU.js +8 -2
  80. package/dist/es/i18n/locales/zh-CN.js +10 -4
  81. package/dist/es/i18n/locales/zh-HK.js +10 -4
  82. package/dist/es/i18n/locales/zh-TW.js +10 -4
  83. package/dist/es/index.js +17 -5
  84. package/dist/es/style.css +1 -1
  85. package/dist/es/utils/format.js +0 -5
  86. package/dist/es/utils/object.js +31 -1
  87. package/dist/es/utils/string.js +10 -0
  88. package/dist/es/utils/system-info/is-ua-webview.js +14 -12
  89. package/dist/es/utils/theme.js +7 -0
  90. package/dist/style.css +1 -1
  91. package/dist/types/api/modules/get-browser-params.d.ts +1 -0
  92. package/dist/types/api/modules/index.d.ts +5 -0
  93. package/dist/types/api/modules/opay-wallet/index.d.ts +4 -0
  94. package/dist/types/api/modules/paga-wallet/index.d.ts +4 -0
  95. package/dist/types/api/modules/pic-pay/index.d.ts +4 -0
  96. package/dist/types/api/modules/pix/index.d.ts +4 -0
  97. package/dist/types/api/modules/vietqr/index.d.ts +4 -0
  98. package/dist/types/components/DropIn/type.d.ts +3 -2
  99. package/dist/types/components/SecuredFieldsProvider/type.d.ts +5 -0
  100. package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +3 -1
  101. package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +2 -0
  102. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -0
  103. package/dist/types/components/index.d.ts +1 -3
  104. package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
  105. package/dist/types/components/internal/Select/SelectMenu.d.ts +1 -1
  106. package/dist/types/components/internal/icons/IconOpayWallet.d.ts +2 -0
  107. package/dist/types/components/internal/icons/IconPagaWallet.d.ts +2 -0
  108. package/dist/types/components/internal/icons/IconPicPay.d.ts +2 -0
  109. package/dist/types/components/internal/icons/IconPix.d.ts +2 -0
  110. package/dist/types/components/internal/icons/IconVietqr.d.ts +2 -0
  111. package/dist/types/components/internal/icons/IconVietqrComplete.d.ts +2 -0
  112. package/dist/types/components/internal/icons/index.d.ts +6 -0
  113. package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +10 -0
  114. package/dist/types/components/wallets/OpayWallet/index.d.ts +2 -0
  115. package/dist/types/components/wallets/OpayWallet/type.d.ts +40 -0
  116. package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +10 -0
  117. package/dist/types/components/wallets/PagaWallet/index.d.ts +2 -0
  118. package/dist/types/components/wallets/PagaWallet/type.d.ts +40 -0
  119. package/dist/types/components/wallets/PicPay/PicPay.d.ts +10 -0
  120. package/dist/types/components/wallets/PicPay/index.d.ts +2 -0
  121. package/dist/types/components/wallets/PicPay/type.d.ts +40 -0
  122. package/dist/types/components/wallets/Pix/Pix.d.ts +10 -0
  123. package/dist/types/components/wallets/Pix/index.d.ts +2 -0
  124. package/dist/types/components/wallets/Pix/type.d.ts +40 -0
  125. package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +10 -0
  126. package/dist/types/components/wallets/Vietqr/index.d.ts +2 -0
  127. package/dist/types/components/wallets/Vietqr/type.d.ts +39 -0
  128. package/dist/types/components/wallets/index.d.ts +8 -0
  129. package/dist/types/components/wallets/type.d.ts +9 -0
  130. package/dist/types/constant.d.ts +11 -1
  131. package/dist/types/core/checkout.d.ts +4 -0
  132. package/dist/types/core/index.d.ts +1 -0
  133. package/dist/types/core/session.d.ts +1 -11
  134. package/dist/types/core/theme.d.ts +7 -0
  135. package/dist/types/i18n/locales/de-DE.d.ts +6 -0
  136. package/dist/types/i18n/locales/en-GB.d.ts +6 -0
  137. package/dist/types/i18n/locales/es-ES.d.ts +6 -0
  138. package/dist/types/i18n/locales/fr-FR.d.ts +6 -0
  139. package/dist/types/i18n/locales/ja-JP.d.ts +6 -0
  140. package/dist/types/i18n/locales/ko-KR.d.ts +6 -0
  141. package/dist/types/i18n/locales/nl-NL.d.ts +6 -0
  142. package/dist/types/i18n/locales/pt-PT.d.ts +6 -0
  143. package/dist/types/i18n/locales/ru-RU.d.ts +6 -0
  144. package/dist/types/i18n/locales/zh-CN.d.ts +6 -0
  145. package/dist/types/i18n/locales/zh-HK.d.ts +6 -0
  146. package/dist/types/i18n/locales/zh-TW.d.ts +6 -0
  147. package/dist/types/types/message.d.ts +29 -25
  148. package/dist/types/utils/index.d.ts +3 -2
  149. package/dist/types/utils/object.d.ts +7 -0
  150. package/dist/types/utils/string.d.ts +1 -0
  151. package/dist/types/utils/style.d.ts +1 -1
  152. package/dist/types/utils/system-info/is-ua-webview.d.ts +1 -1
  153. package/dist/types/utils/theme.d.ts +4 -0
  154. package/package.json +67 -67
  155. package/dist/es/utils/deep-freeze.js +0 -13
  156. package/dist/es/utils/obj.js +0 -22
  157. package/dist/types/utils/deep-freeze.d.ts +0 -1
  158. package/dist/types/utils/obj.d.ts +0 -6
@@ -3,7 +3,7 @@ import { useBEM } from "../../hooks/useBEM.js";
3
3
  import { CoreContext } from "../../core/context.js";
4
4
  import "../../utils/card-brand/brands.js";
5
5
  import "../../utils/system-info/get-browser-info.js";
6
- import { cssVarPrefix, normalizedClass, formatAmount } from "../../utils/format.js";
6
+ import { normalizedClass, formatAmount } from "../../utils/format.js";
7
7
  import { redirectToPayment } from "../../utils/redirect.js";
8
8
  import { formatPaymentResult } from "../../utils/payment.js";
9
9
  import { isTimeoutError } from "../../api/http.js";
@@ -25,7 +25,6 @@ import { GuideCard } from "../GuideCard/index.js";
25
25
  const { bem } = useBEM("shopee-pay");
26
26
  const fieldClassNames = bem("field");
27
27
  const ShopeePay = w((props, ref) => {
28
- var _a, _b, _c, _d, _e, _f;
29
28
  const {
30
29
  session,
31
30
  showEmail = false,
@@ -46,21 +45,21 @@ const ShopeePay = w((props, ref) => {
46
45
  startReFetchPayInfo({ timeout });
47
46
  },
48
47
  updateAddress: () => {
49
- var _a2;
48
+ var _a;
50
49
  if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
51
50
  return;
52
51
  const newForm = Object.assign(form, { address: addressCore.getAddressState() });
53
52
  setForm(newForm);
54
- (_a2 = addressFieldRef.current) == null ? void 0 : _a2.update(addressCore.getAddressState());
53
+ (_a = addressFieldRef.current) == null ? void 0 : _a.update(addressCore.getAddressState());
55
54
  validateForm();
56
55
  },
57
56
  updateEmail: () => {
58
- var _a2;
57
+ var _a;
59
58
  if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
60
59
  return;
61
60
  const newForm = Object.assign(form, { email: emailState.email });
62
61
  setForm(newForm);
63
- (_a2 = emailFieldRef.current) == null ? void 0 : _a2.update(emailState.email);
62
+ (_a = emailFieldRef.current) == null ? void 0 : _a.update(emailState.email);
64
63
  validateForm();
65
64
  },
66
65
  payment: () => {
@@ -103,11 +102,11 @@ const ShopeePay = w((props, ref) => {
103
102
  setFieldStatus({ ...field });
104
103
  };
105
104
  const processOnSuccess = (res) => {
106
- var _a2, _b2;
105
+ var _a, _b;
107
106
  setSubmitButtonStatus("success");
108
- (_b2 = props.onSuccess) == null ? void 0 : _b2.call(props, formatPaymentResult({
107
+ (_b = props.onSuccess) == null ? void 0 : _b.call(props, formatPaymentResult({
109
108
  ...res,
110
- returnUrl: (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.returnUrl
109
+ returnUrl: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.returnUrl
111
110
  }));
112
111
  };
113
112
  y(() => {
@@ -129,16 +128,16 @@ const ShopeePay = w((props, ref) => {
129
128
  }
130
129
  }, [sessionReady]);
131
130
  const processOnError = (error) => {
132
- var _a2;
133
- (_a2 = props.onError) == null ? void 0 : _a2.call(props, error);
131
+ var _a;
132
+ (_a = props.onError) == null ? void 0 : _a.call(props, error);
134
133
  core.resetEnablePaymentMethod();
135
134
  };
136
135
  const onTimeout = q(
137
136
  (message) => {
138
- var _a2;
137
+ var _a;
139
138
  setErrorMsg(message || i18n.get("common.payTimeout"));
140
139
  setSubmitButtonStatus("unSubmit");
141
- (_a2 = props.onTimeout) == null ? void 0 : _a2.call(props);
140
+ (_a = props.onTimeout) == null ? void 0 : _a.call(props);
142
141
  core.resetEnablePaymentMethod();
143
142
  },
144
143
  [i18n, props.onTimeout]
@@ -168,12 +167,12 @@ const ShopeePay = w((props, ref) => {
168
167
  };
169
168
  };
170
169
  const pay = async (search = false, timeout) => {
171
- var _a2, _b2, _c2, _d2, _e2, _f2, _g;
170
+ var _a, _b, _c, _d, _e, _f, _g;
172
171
  try {
173
172
  const requestOptions = { locale: i18n.locale, timeout };
174
173
  let res = null;
175
174
  if (search) {
176
- const extraParams = (_b2 = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b2.call(_a2, "query", PaymentMethod.SHOPEE_PAY);
175
+ const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", PaymentMethod.SHOPEE_PAY);
177
176
  res = await getShopeePayInfo(
178
177
  {
179
178
  sessionId: session.sessionId,
@@ -184,10 +183,10 @@ const ShopeePay = w((props, ref) => {
184
183
  requestOptions
185
184
  );
186
185
  } else {
187
- const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", PaymentMethod.SHOPEE_PAY);
186
+ const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.SHOPEE_PAY);
188
187
  res = await shopeePay(await getPaymentParams(), extraParams, requestOptions);
189
188
  }
190
- !search && ((_e2 = props.onSubmitResponse) == null ? void 0 : _e2.call(props, res));
189
+ !search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
191
190
  const { status, orderStatus, errorMessage, errorCode, payInfo, sessionId } = res;
192
191
  sessionId && (session.sessionId = sessionId);
193
192
  if (status === "PROCESSING") {
@@ -214,7 +213,7 @@ const ShopeePay = w((props, ref) => {
214
213
  return { end: false };
215
214
  } else if (orderStatus === "CANCELED") {
216
215
  setSubmitButtonStatus("unSubmit");
217
- (_f2 = props.onTimeout) == null ? void 0 : _f2.call(props);
216
+ (_f = props.onTimeout) == null ? void 0 : _f.call(props);
218
217
  core.resetEnablePaymentMethod();
219
218
  return { end: true };
220
219
  }
@@ -246,8 +245,8 @@ const ShopeePay = w((props, ref) => {
246
245
  }
247
246
  };
248
247
  const validateForm = () => {
249
- var _a2;
250
- (_a2 = formRef.current) == null ? void 0 : _a2.validate(void 0, false).then(() => {
248
+ var _a;
249
+ (_a = formRef.current) == null ? void 0 : _a.validate(void 0, false).then(() => {
251
250
  setValidated(true);
252
251
  }).catch(() => {
253
252
  setValidated(false);
@@ -257,12 +256,12 @@ const ShopeePay = w((props, ref) => {
257
256
  validateForm();
258
257
  }, [form]);
259
258
  const onSubmit = async () => {
260
- var _a2;
259
+ var _a;
261
260
  setErrorMsg("");
262
- (_a2 = formRef.current) == null ? void 0 : _a2.validate(async (errors) => {
263
- var _a3;
261
+ (_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
262
+ var _a2;
264
263
  (fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
265
- (_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors);
264
+ (_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
266
265
  if (errors) {
267
266
  setSubmitButtonStatus("unSubmit");
268
267
  return;
@@ -277,8 +276,8 @@ const ShopeePay = w((props, ref) => {
277
276
  dom && validateForm();
278
277
  };
279
278
  const Button = () => {
280
- var _a2;
281
- const transAmount = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.transAmount;
279
+ var _a;
280
+ const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
282
281
  const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
283
282
  const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
284
283
  return /* @__PURE__ */ u(
@@ -304,24 +303,17 @@ const ShopeePay = w((props, ref) => {
304
303
  }
305
304
  ) }) });
306
305
  };
307
- const formStyle = {
308
- [cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
309
- [cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
310
- [cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
311
- [cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
312
- [cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
313
- };
314
306
  const ErrorMessage = () => {
315
- return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg, style: { marginTop: "12px" } }) });
307
+ return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
316
308
  };
317
309
  const Address = () => {
318
- var _a2, _b2;
310
+ var _a, _b;
319
311
  return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
320
312
  AddressField,
321
313
  {
322
314
  ref: addressFieldRef,
323
315
  value: form.address,
324
- country: ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.country) || ((_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.bill.country),
316
+ country: ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
325
317
  onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
326
318
  }
327
319
  ) }) });
@@ -334,13 +326,15 @@ const ShopeePay = w((props, ref) => {
334
326
  session,
335
327
  core
336
328
  },
337
- children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(b, { children: [
329
+ children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
338
330
  showGuideCard && /* @__PURE__ */ u(GuideCard, { type: PaymentCategory.SHOPEE_PAY }),
339
- /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
331
+ /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
340
332
  Email(),
341
333
  Address(),
342
- ErrorMessage(),
343
- !hidePaymentButton && Button()
334
+ /* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
335
+ ErrorMessage(),
336
+ !hidePaymentButton && Button()
337
+ ] })
344
338
  ] }) })
345
339
  ] })
346
340
  }
@@ -3,7 +3,7 @@ import { useBEM } from "../../hooks/useBEM.js";
3
3
  import { CoreContext } from "../../core/context.js";
4
4
  import "../../utils/card-brand/brands.js";
5
5
  import "../../utils/system-info/get-browser-info.js";
6
- import { cssVarPrefix, normalizedClass, formatAmount } from "../../utils/format.js";
6
+ import { normalizedClass, formatAmount } from "../../utils/format.js";
7
7
  import { redirectToPayment } from "../../utils/redirect.js";
8
8
  import { formatPaymentResult } from "../../utils/payment.js";
9
9
  import { isTimeoutError } from "../../api/http.js";
@@ -25,7 +25,6 @@ import { GuideCard } from "../GuideCard/index.js";
25
25
  const { bem } = useBEM("tng-wallet");
26
26
  const fieldClassNames = bem("field");
27
27
  const TNGWallet = w((props, ref) => {
28
- var _a, _b, _c, _d, _e, _f;
29
28
  const {
30
29
  session,
31
30
  showEmail = false,
@@ -46,21 +45,21 @@ const TNGWallet = w((props, ref) => {
46
45
  startReFetchPayInfo({ timeout });
47
46
  },
48
47
  updateAddress: () => {
49
- var _a2;
48
+ var _a;
50
49
  if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
51
50
  return;
52
51
  const newForm = Object.assign(form, { address: addressCore.getAddressState() });
53
52
  setForm(newForm);
54
- (_a2 = addressFieldRef.current) == null ? void 0 : _a2.update(addressCore.getAddressState());
53
+ (_a = addressFieldRef.current) == null ? void 0 : _a.update(addressCore.getAddressState());
55
54
  validateForm();
56
55
  },
57
56
  updateEmail: () => {
58
- var _a2;
57
+ var _a;
59
58
  if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
60
59
  return;
61
60
  const newForm = Object.assign(form, { email: emailState.email });
62
61
  setForm(newForm);
63
- (_a2 = emailFieldRef.current) == null ? void 0 : _a2.update(emailState.email);
62
+ (_a = emailFieldRef.current) == null ? void 0 : _a.update(emailState.email);
64
63
  validateForm();
65
64
  },
66
65
  payment: () => {
@@ -103,11 +102,11 @@ const TNGWallet = w((props, ref) => {
103
102
  setFieldStatus({ ...field });
104
103
  };
105
104
  const processOnSuccess = (res) => {
106
- var _a2, _b2;
105
+ var _a, _b;
107
106
  setSubmitButtonStatus("success");
108
- (_b2 = props.onSuccess) == null ? void 0 : _b2.call(props, formatPaymentResult({
107
+ (_b = props.onSuccess) == null ? void 0 : _b.call(props, formatPaymentResult({
109
108
  ...res,
110
- returnUrl: (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.returnUrl
109
+ returnUrl: (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.returnUrl
111
110
  }));
112
111
  };
113
112
  y(() => {
@@ -129,16 +128,16 @@ const TNGWallet = w((props, ref) => {
129
128
  }
130
129
  }, [sessionReady]);
131
130
  const processOnError = (error) => {
132
- var _a2;
133
- (_a2 = props.onError) == null ? void 0 : _a2.call(props, error);
131
+ var _a;
132
+ (_a = props.onError) == null ? void 0 : _a.call(props, error);
134
133
  core.resetEnablePaymentMethod();
135
134
  };
136
135
  const onTimeout = q(
137
136
  (message) => {
138
- var _a2;
137
+ var _a;
139
138
  setErrorMsg(message || i18n.get("common.payTimeout"));
140
139
  setSubmitButtonStatus("unSubmit");
141
- (_a2 = props.onTimeout) == null ? void 0 : _a2.call(props);
140
+ (_a = props.onTimeout) == null ? void 0 : _a.call(props);
142
141
  core.resetEnablePaymentMethod();
143
142
  },
144
143
  [i18n, props.onTimeout]
@@ -168,12 +167,12 @@ const TNGWallet = w((props, ref) => {
168
167
  };
169
168
  };
170
169
  const pay = async (search = false, timeout) => {
171
- var _a2, _b2, _c2, _d2, _e2, _f2, _g;
170
+ var _a, _b, _c, _d, _e, _f, _g;
172
171
  try {
173
172
  const requestOptions = { locale: i18n.locale, timeout };
174
173
  let res = null;
175
174
  if (search) {
176
- const extraParams = (_b2 = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b2.call(_a2, "query", PaymentMethod.TNG_WALLET);
175
+ const extraParams = (_b = (_a = core.config)._getExtraParams) == null ? void 0 : _b.call(_a, "query", PaymentMethod.TNG_WALLET);
177
176
  res = await getTNGWalletPayInfo(
178
177
  {
179
178
  sessionId: session.sessionId,
@@ -184,10 +183,10 @@ const TNGWallet = w((props, ref) => {
184
183
  requestOptions
185
184
  );
186
185
  } else {
187
- const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", PaymentMethod.TNG_WALLET);
186
+ const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.TNG_WALLET);
188
187
  res = await tngWalletPay(await getPaymentParams(), extraParams, requestOptions);
189
188
  }
190
- !search && ((_e2 = props.onSubmitResponse) == null ? void 0 : _e2.call(props, res));
189
+ !search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
191
190
  const { status, orderStatus, errorMessage, errorCode, payInfo, sessionId } = res;
192
191
  sessionId && (session.sessionId = sessionId);
193
192
  if (status === "PROCESSING") {
@@ -214,7 +213,7 @@ const TNGWallet = w((props, ref) => {
214
213
  return { end: false };
215
214
  } else if (orderStatus === "CANCELED") {
216
215
  setSubmitButtonStatus("unSubmit");
217
- (_f2 = props.onTimeout) == null ? void 0 : _f2.call(props);
216
+ (_f = props.onTimeout) == null ? void 0 : _f.call(props);
218
217
  core.resetEnablePaymentMethod();
219
218
  return { end: true };
220
219
  }
@@ -246,8 +245,8 @@ const TNGWallet = w((props, ref) => {
246
245
  }
247
246
  };
248
247
  const validateForm = () => {
249
- var _a2;
250
- (_a2 = formRef.current) == null ? void 0 : _a2.validate(void 0, false).then(() => {
248
+ var _a;
249
+ (_a = formRef.current) == null ? void 0 : _a.validate(void 0, false).then(() => {
251
250
  setValidated(true);
252
251
  }).catch(() => {
253
252
  setValidated(false);
@@ -257,12 +256,12 @@ const TNGWallet = w((props, ref) => {
257
256
  validateForm();
258
257
  }, [form]);
259
258
  const onSubmit = async () => {
260
- var _a2;
259
+ var _a;
261
260
  setErrorMsg("");
262
- (_a2 = formRef.current) == null ? void 0 : _a2.validate(async (errors) => {
263
- var _a3;
261
+ (_a = formRef.current) == null ? void 0 : _a.validate(async (errors) => {
262
+ var _a2;
264
263
  (fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
265
- (_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors);
264
+ (_a2 = props.onSubmit) == null ? void 0 : _a2.call(props, errors);
266
265
  if (errors) {
267
266
  setSubmitButtonStatus("unSubmit");
268
267
  return;
@@ -277,8 +276,8 @@ const TNGWallet = w((props, ref) => {
277
276
  dom && validateForm();
278
277
  };
279
278
  const Button = () => {
280
- var _a2;
281
- const transAmount = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.transAmount;
279
+ var _a;
280
+ const transAmount = (_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.transAmount;
282
281
  const amountText = (transAmount == null ? void 0 : transAmount.amount) ? formatAmount(transAmount).jointSymbol() : "";
283
282
  const text = i18n.get("common.pay") + (amountText ? ` ${amountText}` : "");
284
283
  return /* @__PURE__ */ u(
@@ -304,24 +303,17 @@ const TNGWallet = w((props, ref) => {
304
303
  }
305
304
  ) }) });
306
305
  };
307
- const formStyle = {
308
- [cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
309
- [cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
310
- [cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
311
- [cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
312
- [cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
313
- };
314
306
  const ErrorMessage = () => {
315
- return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg, style: { marginTop: "12px" } }) });
307
+ return /* @__PURE__ */ u(b, { children: !!errorMsg && /* @__PURE__ */ u(Info, { content: errorMsg }) });
316
308
  };
317
309
  const Address = () => {
318
- var _a2, _b2;
310
+ var _a, _b;
319
311
  return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
320
312
  AddressField,
321
313
  {
322
314
  ref: addressFieldRef,
323
315
  value: form.address,
324
- country: ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.country) || ((_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.bill.country),
316
+ country: ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
325
317
  onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
326
318
  }
327
319
  ) }) });
@@ -334,13 +326,15 @@ const TNGWallet = w((props, ref) => {
334
326
  session,
335
327
  core
336
328
  },
337
- children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(b, { children: [
329
+ children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: [
338
330
  showGuideCard && /* @__PURE__ */ u(GuideCard, { type: PaymentCategory.TNG_WALLET }),
339
- /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
331
+ /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
340
332
  Email(),
341
333
  Address(),
342
- ErrorMessage(),
343
- !hidePaymentButton && Button()
334
+ /* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
335
+ ErrorMessage(),
336
+ !hidePaymentButton && Button()
337
+ ] })
344
338
  ] }) })
345
339
  ] })
346
340
  }
@@ -13,13 +13,24 @@ import { safeParse } from "../../utils/index.js";
13
13
  import { useBreakpoints } from "../../hooks/useBreakpoints.js";
14
14
  import { Icon3DSInfo } from "../internal/icons/Icon3DSInfo.js";
15
15
  import { Button } from "../internal/Button/Button.js";
16
+ import { THREE_DS_IFRAME_NAME } from "../SecuredFieldsProvider/index.js";
16
17
  const { bem } = useBEM("three-ds-auth");
17
18
  const ThreeDSAuth = (props) => {
18
- const { show = false, onClose, url, incomplete = true, width, height = "72vh", theme } = props;
19
+ const {
20
+ show = false,
21
+ onClose,
22
+ url,
23
+ incomplete = true,
24
+ width,
25
+ height = "72vh",
26
+ theme,
27
+ checkoutId
28
+ } = props;
19
29
  const breakpoints = useBreakpoints();
20
30
  const [continueThreeDs, setContinueThreeDs] = h(false);
21
31
  const messageHandler = A();
22
32
  const iframeRef = A(null);
33
+ const [iframeName] = h(`${THREE_DS_IFRAME_NAME}-${checkoutId}-${Date.now()}`);
23
34
  const { i18n } = useI18n();
24
35
  const handleLastThreeDs = () => {
25
36
  setContinueThreeDs(true);
@@ -44,6 +55,10 @@ const ThreeDSAuth = (props) => {
44
55
  return;
45
56
  }
46
57
  const feedbackData = safeParse(data);
58
+ console.log(feedbackData, checkoutId);
59
+ if (feedbackData.checkoutId !== checkoutId) {
60
+ return;
61
+ }
47
62
  switch (feedbackData.action) {
48
63
  case MessageAction.CHECK_THREE_DS: {
49
64
  onChange(false);
@@ -64,13 +79,23 @@ const ThreeDSAuth = (props) => {
64
79
  width: modalWidth,
65
80
  height,
66
81
  style: {
67
- maxWidth: "100vw",
68
- maxHeight: "100vh",
69
- minHeight: "500px",
70
- minWidth: "350px"
82
+ maxWidth: "calc(100vw - 10px)",
83
+ maxHeight: "calc(100vh - 100px)",
84
+ minWidth: "300px"
71
85
  },
72
- children: /* @__PURE__ */ u("div", { className: bem("content"), children: !incomplete || continueThreeDs ? /* @__PURE__ */ u("iframe", { ref: iframeRef, width: "100%", height: "100%", frameBorder: 0, src: url }) : /* @__PURE__ */ u("div", { className: bem("last-three-ds"), children: [
73
- /* @__PURE__ */ u(Icon3DSInfo, { size: 60 }),
86
+ children: /* @__PURE__ */ u("div", { className: bem("content"), children: !incomplete || continueThreeDs ? /* @__PURE__ */ u(
87
+ "iframe",
88
+ {
89
+ ref: iframeRef,
90
+ name: iframeName,
91
+ class: bem("three-ds-iframe"),
92
+ width: "100%",
93
+ height: "100%",
94
+ frameBorder: 0,
95
+ src: url
96
+ }
97
+ ) : /* @__PURE__ */ u("div", { className: bem("last-three-ds"), children: [
98
+ /* @__PURE__ */ u(Icon3DSInfo, { className: bem("last-three-ds-icon"), size: 60 }),
74
99
  /* @__PURE__ */ u("div", { className: bem("last-three-ds-title"), children: [
75
100
  /* @__PURE__ */ u("div", { children: i18n.get("threeDS.paymentIncomplete") }),
76
101
  /* @__PURE__ */ u("div", { children: i18n.get("threeDS.completeFirst") })
@@ -2,7 +2,7 @@ import { w, A, F, h, y, q, u, b } from "../../core.js";
2
2
  import { isTimeoutError } from "../../api/http.js";
3
3
  import "../../utils/card-brand/brands.js";
4
4
  import "../../utils/system-info/get-browser-info.js";
5
- import { cssVarPrefix, normalizedClass, formatAmount } from "../../utils/format.js";
5
+ import { normalizedClass, formatAmount } from "../../utils/format.js";
6
6
  import { formatPaymentResult } from "../../utils/payment.js";
7
7
  import { getBrowserParams } from "../../api/modules/get-browser-params.js";
8
8
  import { COMMON_CLASS_NAME, PaymentType, PaymentMethod, SessionMode } from "../../constant.js";
@@ -24,7 +24,7 @@ import { SubmitButton } from "../SubmitButton/index.js";
24
24
  const { bem } = useBEM("wechat-pay");
25
25
  const fieldClassNames = bem("field");
26
26
  const WechatPay = w((props, ref) => {
27
- var _a, _b, _c, _d, _e, _f, _g;
27
+ var _a;
28
28
  const { session, core, showEmail = false, showAddress = false } = props;
29
29
  const addressCore = core.getAddressCore();
30
30
  const emailState = createEmailCore();
@@ -103,9 +103,9 @@ const WechatPay = w((props, ref) => {
103
103
  validateForm();
104
104
  }, [form]);
105
105
  const processOnSuccess = (res) => {
106
- var _a2, _b2;
106
+ var _a2, _b;
107
107
  setSubmitButtonStatus("success");
108
- (_b2 = props.onSuccess) == null ? void 0 : _b2.call(
108
+ (_b = props.onSuccess) == null ? void 0 : _b.call(
109
109
  props,
110
110
  formatPaymentResult({
111
111
  ...res,
@@ -168,12 +168,12 @@ const WechatPay = w((props, ref) => {
168
168
  };
169
169
  };
170
170
  async function pay(search = false, timeout) {
171
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i, _j;
171
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
172
172
  try {
173
173
  const requestOptions = { locale: i18n.locale, timeout };
174
174
  let res = null;
175
175
  if (search) {
176
- const extraParams = (_b2 = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b2.call(_a2, "query", PaymentMethod.WECHAT_PAY);
176
+ const extraParams = (_b = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b.call(_a2, "query", PaymentMethod.WECHAT_PAY);
177
177
  res = await getWechatPayInfo(
178
178
  {
179
179
  sessionId: session.sessionId,
@@ -184,12 +184,12 @@ const WechatPay = w((props, ref) => {
184
184
  requestOptions
185
185
  );
186
186
  } else {
187
- const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", PaymentMethod.WECHAT_PAY);
187
+ const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.WECHAT_PAY);
188
188
  res = await wechatPay(await getPaymentParams(), extraParams, requestOptions);
189
189
  }
190
190
  const { status, orderStatus, errorMessage, payInfo, errorCode, sessionId } = res;
191
191
  sessionId && (session.sessionId = sessionId);
192
- !search && ((_e2 = props.onSubmitResponse) == null ? void 0 : _e2.call(props, res));
192
+ !search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
193
193
  if (status === "PROCESSING") {
194
194
  if (!orderStatus) {
195
195
  setSubmitButtonStatus("unSubmit");
@@ -200,11 +200,11 @@ const WechatPay = w((props, ref) => {
200
200
  } else if (orderStatus === "FAILURE") {
201
201
  errorMessage && setErrorMsg(errorMessage);
202
202
  setSubmitButtonStatus("unSubmit");
203
- (_f2 = props.onError) == null ? void 0 : _f2.call(props, new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
203
+ (_f = props.onError) == null ? void 0 : _f.call(props, new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
204
204
  return { end: true };
205
205
  } else if (orderStatus === "PROCESSING") {
206
206
  if (!search) {
207
- await ((_g2 = props.onCallWxPayBox) == null ? void 0 : _g2.call(props, payInfo));
207
+ await ((_g = props.onCallWxPayBox) == null ? void 0 : _g.call(props, payInfo));
208
208
  startReFetchPayInfo();
209
209
  }
210
210
  return { end: false };
@@ -279,13 +279,6 @@ const WechatPay = w((props, ref) => {
279
279
  formRef.current = dom;
280
280
  dom && validateForm();
281
281
  };
282
- const formStyle = {
283
- [cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
284
- [cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
285
- [cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
286
- [cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
287
- [cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
288
- };
289
282
  const Email = () => {
290
283
  return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.email.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
291
284
  EmailField,
@@ -297,13 +290,13 @@ const WechatPay = w((props, ref) => {
297
290
  ) }) });
298
291
  };
299
292
  const Address = () => {
300
- var _a2, _b2;
293
+ var _a2, _b;
301
294
  return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
302
295
  AddressField,
303
296
  {
304
297
  ref: addressFieldRef,
305
298
  value: form.address,
306
- country: ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.country) || ((_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.bill.country),
299
+ country: ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
307
300
  onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
308
301
  }
309
302
  ) }) });
@@ -316,13 +309,15 @@ const WechatPay = w((props, ref) => {
316
309
  session,
317
310
  core
318
311
  },
319
- children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
312
+ children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
320
313
  Email(),
321
314
  Address(),
322
- ((_g = session == null ? void 0 : session.checkout) == null ? void 0 : _g.paymentType) === PaymentType.RECURRING && RecurringTip(),
323
- !!errorMsg && /* @__PURE__ */ u(Info, { className: bem("error"), content: errorMsg }),
324
- Button()
325
- ] }) })
315
+ ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.paymentType) === PaymentType.RECURRING && RecurringTip(),
316
+ /* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
317
+ !!errorMsg && /* @__PURE__ */ u(Info, { className: bem("error"), content: errorMsg }),
318
+ Button()
319
+ ] })
320
+ ] }) }) })
326
321
  }
327
322
  );
328
323
  });
@@ -16,6 +16,7 @@ const QRCodeModal = (props) => {
16
16
  title,
17
17
  bgColor = "#FFFFFF",
18
18
  textColor = "#1F1F1F",
19
+ borderColor = "#000000",
19
20
  expiredTime,
20
21
  amount,
21
22
  icon,
@@ -26,12 +27,11 @@ const QRCodeModal = (props) => {
26
27
  const breakpoints = useBreakpoints();
27
28
  const useRoundBorder = !bgColor || ["transparent", "white", "#FFFFFF"].includes(bgColor);
28
29
  const RoundBorder = () => {
29
- return /* @__PURE__ */ u("div", { className: bem("round-border"), children: [
30
- /* @__PURE__ */ u("div", { className: bem("round-border-item") }),
31
- /* @__PURE__ */ u("div", { className: bem("round-border-item") }),
32
- /* @__PURE__ */ u("div", { className: bem("round-border-item") }),
33
- /* @__PURE__ */ u("div", { className: bem("round-border-item") })
34
- ] });
30
+ return /* @__PURE__ */ u("div", {
31
+ className: bem("round-border"),
32
+ // 表示4个边角
33
+ children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ u("div", { className: bem("round-border-item"), style: { borderColor } }, index))
34
+ });
35
35
  };
36
36
  return /* @__PURE__ */ u(
37
37
  Modal,
@@ -39,3 +39,8 @@ import "./ShopeePay/index.js";
39
39
  import "./wallets/GCash/GCash.js";
40
40
  import "./wallets/Paymaya/Paymaya.js";
41
41
  import "./wallets/Zalopay/Zalopay.js";
42
+ import "./wallets/Vietqr/Vietqr.js";
43
+ import "./wallets/Pix/Pix.js";
44
+ import "./wallets/PicPay/PicPay.js";
45
+ import "./wallets/PagaWallet/PagaWallet.js";
46
+ import "./wallets/OpayWallet/OpayWallet.js";
@@ -5,7 +5,7 @@ import { isNil } from "../../../utils/is.js";
5
5
  import "../../../utils/card-brand/brands.js";
6
6
  import "../../../utils/system-info/get-browser-info.js";
7
7
  import { normalizedClass } from "../../../utils/format.js";
8
- import { set } from "../../../utils/obj.js";
8
+ import { set } from "../../../utils/object.js";
9
9
  import { FormItemContext, FormContext } from "./context.js";
10
10
  import { formItemBEM, formItemLabelClassName, formItemErrorMessageClassName } from "./type.js";
11
11
  import { getActiveRules } from "./util.js";
@@ -1,5 +1,5 @@
1
1
  import { getIf } from "../../../utils/index.js";
2
- import { set } from "../../../utils/obj.js";
2
+ import { set } from "../../../utils/object.js";
3
3
  import { isArray } from "../../../utils/is.js";
4
4
  function isIncludeTrigger(ruleItem, trigger) {
5
5
  if (!trigger)