@odus/checkout 1.2.0 → 1.2.1

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.
@@ -888,6 +888,8 @@ class ge {
888
888
  vgsHelperText = null;
889
889
  wrapperElement;
890
890
  _vgsFieldsReady = !1;
891
+ _fieldHeight = "38.5px";
892
+ _borderRadius = 0;
891
893
  constructor(e) {
892
894
  const {
893
895
  value: t,
@@ -910,7 +912,9 @@ class ge {
910
912
  );
911
913
  }
912
914
  buildVgsLayout(e, t) {
913
- const s = e.styles.borderRadius, a = document.createElement("div");
915
+ const s = e.styles.borderRadius;
916
+ this._borderRadius = s;
917
+ const a = document.createElement("div");
914
918
  a.style.marginBottom = "4px";
915
919
  const i = document.createElement("label");
916
920
  i.className = "input-label", i.textContent = t("cardholderNameLabel"), i.style.fontFamily = `"${e.styles.fontFamily}", sans-serif`, i.style.fontSize = `${e.styles.fontSize}px`, a.appendChild(i), this.wrapperElement.appendChild(a), this.vgsWrapper = document.createElement("div"), this.vgsWrapper.className = "vgs-wrap", this.vgsWrapper.style.position = "relative", this.vgsWrapper.style.borderRadius = `${s}px`, this.vgsWrapper.style.height = "38.5px", this.vgsWrapper.style.width = "100%", this.vgsWrapper.style.overflow = "hidden";
@@ -950,11 +954,19 @@ class ge {
950
954
  const a = t[R.CARDHOLDER];
951
955
  a ? (this.vgsHelperText.setText(a), this.vgsHelperText.toggleVisibility(!0)) : this.vgsHelperText.toggleVisibility(!1);
952
956
  }
957
+ setFieldHeight(e) {
958
+ this._fieldHeight = e, this.vgsWrapper && (this.vgsWrapper.style.height = e);
959
+ }
960
+ setBorderRadius(e) {
961
+ this._borderRadius = e, this.vgsWrapper && (this.vgsWrapper.style.borderRadius = `${e}px`);
962
+ }
953
963
  hideFakePlaceholder() {
954
964
  if (!this.vgsWrapper) return;
955
965
  this._vgsFieldsReady = !0, this.vgsWrapper.style.overflow = "visible", this.vgsWrapper.style.transition = "box-shadow 0.1s ease-in", this.vgsWrapper.style.boxShadow = "0 0 0 1px #e0e0e0, 0 2px 4px 0 rgba(0,0,0,0.07), 0 1px 1.5px 0 rgba(0,0,0,0.05)";
956
966
  const e = this.vgsWrapper.querySelector(".vgs-field-skeleton");
957
- e && e.remove(), this.vgsContainer?.querySelectorAll("iframe").forEach((t) => t.style.height = "38.5px");
967
+ e && e.remove(), this.vgsContainer?.querySelectorAll("iframe").forEach((t) => {
968
+ t.style.height = this._fieldHeight, t.style.borderRadius = `${this._borderRadius}px`;
969
+ });
958
970
  }
959
971
  getValue() {
960
972
  return this.isVgsMode ? "" : this.input?.getValue() ?? "";
@@ -1525,6 +1537,12 @@ class Ce {
1525
1537
  e,
1526
1538
  a
1527
1539
  );
1540
+ if (this.cardholderSection && i.cardholderName) {
1541
+ const n = i.cardholderName;
1542
+ typeof n.height == "string" && this.cardholderSection.setFieldHeight(n.height);
1543
+ const r = n["border-radius"];
1544
+ typeof r == "string" && this.cardholderSection.setBorderRadius(parseFloat(r));
1545
+ }
1528
1546
  this.vgsService.mountCardFields(
1529
1547
  {
1530
1548
  cardNumber: t.cardNumber ? `#${t.cardNumber}` : void 0,
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",
package/dist/shared.js CHANGED
@@ -370,7 +370,7 @@ const ap = (r) => {
370
370
  url: e,
371
371
  app: {
372
372
  name: "odus-checkout",
373
- version: "1.2.0",
373
+ version: "1.2.1",
374
374
  environment: r.environment === "test" ? "sandbox" : "production"
375
375
  },
376
376
  isolate: !0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "displayName": "Odus Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",