@billgangcom/theme-lib 1.106.1 → 1.106.2

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.
@@ -8162,36 +8162,26 @@ const du = "data:image/svg+xml,%3csvg%20width='204'%20height='241'%20viewBox='0%
8162
8162
  /* @__PURE__ */ e.jsx("p", { id: "md", children: n && !(n != null && n.isFixed) && (n == null ? void 0 : n.discount) === 100 ? `-${t.format(r)}` : `-${t.format(I)}` })
8163
8163
  ] }),
8164
8164
  i != null && i !== 0 && d && (d.fixedAmount !== 0 || d.percentage !== 0) && /* @__PURE__ */ e.jsxs("div", { className: Pe.priceRow, children: [
8165
- /* @__PURE__ */ e.jsxs(
8165
+ /* @__PURE__ */ e.jsx(
8166
8166
  "p",
8167
8167
  {
8168
8168
  className: Pe.label,
8169
- id: "md-bold",
8170
- children: [
8171
- d.isDiscount ? "Gateway Discount: " : "Gateway Fee: ",
8172
- d.percentage !== 0 && d.fixedAmount === 0 && `(${d.percentage}%)`,
8173
- d.fixedAmount !== 0 && d.percentage === 0 && `(${t.format(d.fixedAmount)})`,
8174
- d.percentage !== 0 && d.fixedAmount !== 0 && `(${d.percentage}% + ${t.format(d.fixedAmount)})`
8175
- ]
8169
+ id: "md",
8170
+ children: d.isDiscount ? "Gateway Discount" : "Gateway Fee"
8176
8171
  }
8177
8172
  ),
8178
- /* @__PURE__ */ e.jsx("p", { id: "md-bold", children: t.format(i) })
8173
+ /* @__PURE__ */ e.jsx("p", { id: "md", children: t.format(i) })
8179
8174
  ] }),
8180
8175
  u != null && u !== 0 && m && (m.fixedAmount !== 0 || m.percentage !== 0) && /* @__PURE__ */ e.jsxs("div", { className: Pe.priceRow, children: [
8181
- /* @__PURE__ */ e.jsxs(
8176
+ /* @__PURE__ */ e.jsx(
8182
8177
  "p",
8183
8178
  {
8184
8179
  className: Pe.label,
8185
- id: "md-bold",
8186
- children: [
8187
- m.isDiscount ? "Service Discount: " : "Service Fee: ",
8188
- m.percentage !== 0 && m.fixedAmount === 0 && `(${m.percentage}%)`,
8189
- m.fixedAmount !== 0 && m.percentage === 0 && `(${t.format(m.fixedAmount)})`,
8190
- m.percentage !== 0 && m.fixedAmount !== 0 && `(${m.percentage}% + ${t.format(m.fixedAmount)})`
8191
- ]
8180
+ id: "md",
8181
+ children: m.isDiscount ? "Service Discount" : "Service Fee"
8192
8182
  }
8193
8183
  ),
8194
- /* @__PURE__ */ e.jsx("p", { id: "md-bold", children: t.format(u) })
8184
+ /* @__PURE__ */ e.jsx("p", { id: "md", children: t.format(u) })
8195
8185
  ] }),
8196
8186
  /* @__PURE__ */ e.jsxs("div", { className: Pe.totalRow, children: [
8197
8187
  /* @__PURE__ */ e.jsx(
@@ -8515,17 +8505,15 @@ const du = "data:image/svg+xml,%3csvg%20width='204'%20height='241'%20viewBox='0%
8515
8505
  return v.overrodePrice.currency;
8516
8506
  }
8517
8507
  return (p == null ? void 0 : p.price.currency) || "USD";
8518
- }, [m, t.gateway]);
8519
- console.log("checkoutProducts", m);
8520
- const C = new Intl.NumberFormat("en-US", {
8508
+ }, [m, t.gateway]), C = new Intl.NumberFormat("en-US", {
8521
8509
  style: "currency",
8522
8510
  currency: h
8523
8511
  }), x = f.useMemo(() => r && !r.isFixed && r.discount === 100 || r && r.isFixed && r.discount === a.total ? a.total : a.totalWithDiscount ? a.total - a.totalWithDiscount : 0, [a, r]), l = i ? (i == null ? void 0 : i.fixedAmount) + Math.round(
8524
8512
  (a.totalWithDiscount !== void 0 ? a.totalWithDiscount : a.total - x) * ((i == null ? void 0 : i.percentage) / 100)
8525
8513
  ) : null, _ = f.useMemo(() => {
8526
8514
  if (!u) return null;
8527
- const p = a.totalWithDiscount !== void 0 ? a.totalWithDiscount : a.total - x, v = i && l !== null && l !== void 0 ? i.isDiscount ? p - l : p + l : p;
8528
- return u.fixedAmount + Math.round(v * (u.percentage / 100));
8515
+ const p = a.totalWithDiscount !== void 0 ? a.totalWithDiscount : a.total - x, g = (i && l !== null && l !== void 0 ? i.isDiscount ? p - l : p + l : p) * (u.percentage / 100);
8516
+ return u.fixedAmount + g;
8529
8517
  }, [u, a, x, i, l]);
8530
8518
  return /* @__PURE__ */ e.jsx("div", { className: gt.checkoutItemsContainer, children: /* @__PURE__ */ e.jsxs("div", { className: gt.innerContainer, children: [
8531
8519
  /* @__PURE__ */ e.jsx(Jt, {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@billgangcom/theme-lib",
3
- "version": "1.106.1",
3
+ "version": "1.106.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"