@dmsi/wedgekit-react 0.0.146 → 0.0.147

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SelectPaymentMethod
3
- } from "./chunk-GXSXCEAA.js";
3
+ } from "./chunk-ODWBREZN.js";
4
4
  import {
5
5
  Modal
6
6
  } from "./chunk-5GOJRLQO.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ WorldpayIframe
3
+ } from "./chunk-WFGKIR5A.js";
1
4
  import {
2
5
  Radio
3
6
  } from "./chunk-BATIOCXB.js";
@@ -118,13 +121,7 @@ function SelectPaymentMethod(props) {
118
121
  flex: 1
119
122
  },
120
123
  minHeight: 245,
121
- children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ jsx(
122
- "iframe",
123
- {
124
- src: cardPaymentUrl,
125
- style: { width: "100%", height: "100%", flex: 1 }
126
- }
127
- ) : /* @__PURE__ */ jsx(Spinner, {})
124
+ children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ jsx(WorldpayIframe, { url: cardPaymentUrl }) : /* @__PURE__ */ jsx(Spinner, {})
128
125
  }
129
126
  )
130
127
  }
@@ -0,0 +1,9 @@
1
+ // src/components/WorldpayIframe.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ function WorldpayIframe({ url }) {
4
+ return /* @__PURE__ */ jsx("iframe", { src: url, style: { width: "100%", height: "100%", flex: 1 } });
5
+ }
6
+
7
+ export {
8
+ WorldpayIframe
9
+ };
@@ -2061,8 +2061,14 @@ var Spinner = ({ size = "small", testid }) => {
2061
2061
  };
2062
2062
  Spinner.displayName = "Spinner";
2063
2063
 
2064
- // src/components/SelectPaymentMethod.tsx
2064
+ // src/components/WorldpayIframe.tsx
2065
2065
  var import_jsx_runtime20 = require("react/jsx-runtime");
2066
+ function WorldpayIframe({ url }) {
2067
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("iframe", { src: url, style: { width: "100%", height: "100%", flex: 1 } });
2068
+ }
2069
+
2070
+ // src/components/SelectPaymentMethod.tsx
2071
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2066
2072
  function SelectPaymentMethod(props) {
2067
2073
  const {
2068
2074
  amountToPay,
@@ -2092,8 +2098,8 @@ function SelectPaymentMethod(props) {
2092
2098
  function handleToggle(method) {
2093
2099
  onSelectMethod(method);
2094
2100
  }
2095
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Stack, { sizing: "layout-group", width: "full", minWidth: 400, children: [
2096
- !!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2101
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Stack, { sizing: "layout-group", width: "full", minWidth: 400, children: [
2102
+ !!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2097
2103
  CreditsSelector,
2098
2104
  {
2099
2105
  testid: testid ? `${testid}-credit-selector` : void 0,
@@ -2103,7 +2109,7 @@ function SelectPaymentMethod(props) {
2103
2109
  })
2104
2110
  }
2105
2111
  ),
2106
- (allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2112
+ (allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2107
2113
  ACHSelector,
2108
2114
  {
2109
2115
  testid: testid ? `${testid}-ach-selector` : void 0,
@@ -2118,12 +2124,12 @@ function SelectPaymentMethod(props) {
2118
2124
  disabled: payAllWithCredits || !amountToPay
2119
2125
  }
2120
2126
  ),
2121
- (allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2127
+ (allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2122
2128
  Accordion,
2123
2129
  {
2124
2130
  testid: testid ? `${testid}-cc-payment` : void 0,
2125
2131
  isOpen: !payAllWithCredits && selectedMethod === "CCPayment",
2126
- title: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2132
+ title: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2127
2133
  Radio,
2128
2134
  {
2129
2135
  testid: testid ? `${testid}-cc-payment-radio` : void 0,
@@ -2138,7 +2144,7 @@ function SelectPaymentMethod(props) {
2138
2144
  handleToggle(selectedMethod === "CCPayment" ? null : "CCPayment");
2139
2145
  },
2140
2146
  disabled: payAllWithCredits || !amountToPay,
2141
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2147
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2142
2148
  Stack,
2143
2149
  {
2144
2150
  sizing: "layout-group",
@@ -2149,18 +2155,12 @@ function SelectPaymentMethod(props) {
2149
2155
  flex: 1
2150
2156
  },
2151
2157
  minHeight: 245,
2152
- children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2153
- "iframe",
2154
- {
2155
- src: cardPaymentUrl,
2156
- style: { width: "100%", height: "100%", flex: 1 }
2157
- }
2158
- ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Spinner, {})
2158
+ children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(WorldpayIframe, { url: cardPaymentUrl }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Spinner, {})
2159
2159
  }
2160
2160
  )
2161
2161
  }
2162
2162
  ),
2163
- selectedMethod === "ACHPayment" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2163
+ selectedMethod === "ACHPayment" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2164
2164
  Button,
2165
2165
  {
2166
2166
  block: true,
@@ -2170,7 +2170,7 @@ function SelectPaymentMethod(props) {
2170
2170
  children: isPayLoading ? "Processing..." : "Submit Payment"
2171
2171
  }
2172
2172
  ),
2173
- payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
2173
+ payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
2174
2174
  ] });
2175
2175
  }
2176
2176
  function ACHSelector(props) {
@@ -2189,13 +2189,13 @@ function ACHSelector(props) {
2189
2189
  setSelectedBankGuid(bankGuid);
2190
2190
  handleToggle("ACHPayment");
2191
2191
  }
2192
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2192
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2193
2193
  Card,
2194
2194
  {
2195
2195
  testid: testid ? `${testid}-bank-${bank.CustBankGUID}` : void 0,
2196
2196
  onClick: (e) => handleBankSelect(e, bank.CustBankGUID),
2197
2197
  selected: !disabled && selectedMethod === "ACHPayment" && selectedBankGuid === bank.CustBankGUID,
2198
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2198
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2199
2199
  Radio,
2200
2200
  {
2201
2201
  label: `Pay by ${bank.AccountDisplayString}`,
@@ -2218,7 +2218,7 @@ function CreditsSelector(props) {
2218
2218
  );
2219
2219
  }
2220
2220
  };
2221
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2221
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2222
2222
  Accordion,
2223
2223
  {
2224
2224
  isOpen,
@@ -2226,15 +2226,15 @@ function CreditsSelector(props) {
2226
2226
  onClick: () => setIsOpen((prev) => !prev),
2227
2227
  testid,
2228
2228
  children: [
2229
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(HorizontalDivider, {}),
2230
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2229
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HorizontalDivider, {}),
2230
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2231
2231
  Stack,
2232
2232
  {
2233
2233
  sizing: "layout-group",
2234
2234
  width: "full",
2235
2235
  overflowY: "auto",
2236
2236
  maxHeight: 300,
2237
- children: allCredits.map((credits) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2237
+ children: allCredits.map((credits) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2238
2238
  Stack,
2239
2239
  {
2240
2240
  horizontal: true,
@@ -2242,7 +2242,7 @@ function CreditsSelector(props) {
2242
2242
  items: "center",
2243
2243
  sizing: "layout-group",
2244
2244
  children: [
2245
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2245
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2246
2246
  Stack,
2247
2247
  {
2248
2248
  sizing: "layout-group",
@@ -2250,7 +2250,7 @@ function CreditsSelector(props) {
2250
2250
  paddingY: true,
2251
2251
  flexGrow: 1,
2252
2252
  testid: testid ? `${testid}-credit-${credits.InvoiceNumber}` : void 0,
2253
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2253
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2254
2254
  Checkbox,
2255
2255
  {
2256
2256
  testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-checkbox` : void 0,
@@ -2261,7 +2261,7 @@ function CreditsSelector(props) {
2261
2261
  )
2262
2262
  }
2263
2263
  ),
2264
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
2264
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
2265
2265
  "$",
2266
2266
  formatCurrencyDisplay(
2267
2267
  `${Math.abs(credits.InvoiceBalanceDue)}`
@@ -2279,7 +2279,7 @@ function CreditsSelector(props) {
2279
2279
  }
2280
2280
 
2281
2281
  // src/components/PaymentOnAccountModal.tsx
2282
- var import_jsx_runtime21 = require("react/jsx-runtime");
2282
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2283
2283
  function PaymentOnAccountModal(props) {
2284
2284
  const {
2285
2285
  isOpen,
@@ -2317,17 +2317,17 @@ function PaymentOnAccountModal(props) {
2317
2317
  }
2318
2318
  return 0;
2319
2319
  }, [creditCardSettings, amount, selectedMethod]);
2320
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Modal, { testid, open: isOpen, onClose, title: "Payment on Account", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Stack, { sizing: "layout-group", width: "full", children: [
2321
- selectedMethod === "CCPayment" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Stack, { horizontal: true, justify: "between", items: "center", children: [
2322
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Paragraph, { children: "Surcharge" }),
2323
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Paragraph, { testid: testid ? `${testid}-surcharge` : void 0, children: [
2320
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Modal, { testid, open: isOpen, onClose, title: "Payment on Account", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack, { sizing: "layout-group", width: "full", children: [
2321
+ selectedMethod === "CCPayment" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack, { horizontal: true, justify: "between", items: "center", children: [
2322
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Paragraph, { children: "Surcharge" }),
2323
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Paragraph, { testid: testid ? `${testid}-surcharge` : void 0, children: [
2324
2324
  "$",
2325
2325
  formatCurrencyDisplay(creditCardSurcharge.toFixed(2))
2326
2326
  ] })
2327
2327
  ] }),
2328
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Card, { className: "py-desktop-component-padding", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Stack, { sizing: "component", justify: "between", items: "center", horizontal: true, children: [
2329
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Paragraph, { className: "w-full", children: "Amount to Pay" }),
2330
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2328
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Card, { className: "py-desktop-component-padding", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Stack, { sizing: "component", justify: "between", items: "center", horizontal: true, children: [
2329
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Paragraph, { className: "w-full", children: "Amount to Pay" }),
2330
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2331
2331
  Input,
2332
2332
  {
2333
2333
  testid: testid ? `${testid}-amount-to-pay` : void 0,
@@ -2340,7 +2340,7 @@ function PaymentOnAccountModal(props) {
2340
2340
  }
2341
2341
  ) })
2342
2342
  ] }) }),
2343
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2343
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2344
2344
  SelectPaymentMethod,
2345
2345
  __spreadProps(__spreadValues({}, paymentProps), {
2346
2346
  testid: testid ? `${testid}-select-payment-method` : void 0,
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  PaymentOnAccountModal,
3
3
  calculateSurcharge
4
- } from "../chunk-J4E6Q5TM.js";
5
- import "../chunk-GXSXCEAA.js";
4
+ } from "../chunk-AMM762XG.js";
5
+ import "../chunk-ODWBREZN.js";
6
+ import "../chunk-WFGKIR5A.js";
6
7
  import "../chunk-BATIOCXB.js";
7
8
  import "../chunk-5GOJRLQO.js";
8
9
  import "../chunk-4RJKB7LC.js";
@@ -1104,8 +1104,14 @@ var Spinner = ({ size = "small", testid }) => {
1104
1104
  };
1105
1105
  Spinner.displayName = "Spinner";
1106
1106
 
1107
- // src/components/SelectPaymentMethod.tsx
1107
+ // src/components/WorldpayIframe.tsx
1108
1108
  var import_jsx_runtime12 = require("react/jsx-runtime");
1109
+ function WorldpayIframe({ url }) {
1110
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("iframe", { src: url, style: { width: "100%", height: "100%", flex: 1 } });
1111
+ }
1112
+
1113
+ // src/components/SelectPaymentMethod.tsx
1114
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1109
1115
  function SelectPaymentMethod(props) {
1110
1116
  const {
1111
1117
  amountToPay,
@@ -1135,8 +1141,8 @@ function SelectPaymentMethod(props) {
1135
1141
  function handleToggle(method) {
1136
1142
  onSelectMethod(method);
1137
1143
  }
1138
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { sizing: "layout-group", width: "full", minWidth: 400, children: [
1139
- !!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1144
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Stack, { sizing: "layout-group", width: "full", minWidth: 400, children: [
1145
+ !!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1140
1146
  CreditsSelector,
1141
1147
  {
1142
1148
  testid: testid ? `${testid}-credit-selector` : void 0,
@@ -1146,7 +1152,7 @@ function SelectPaymentMethod(props) {
1146
1152
  })
1147
1153
  }
1148
1154
  ),
1149
- (allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1155
+ (allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1150
1156
  ACHSelector,
1151
1157
  {
1152
1158
  testid: testid ? `${testid}-ach-selector` : void 0,
@@ -1161,12 +1167,12 @@ function SelectPaymentMethod(props) {
1161
1167
  disabled: payAllWithCredits || !amountToPay
1162
1168
  }
1163
1169
  ),
1164
- (allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1170
+ (allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1165
1171
  Accordion,
1166
1172
  {
1167
1173
  testid: testid ? `${testid}-cc-payment` : void 0,
1168
1174
  isOpen: !payAllWithCredits && selectedMethod === "CCPayment",
1169
- title: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1175
+ title: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1170
1176
  Radio,
1171
1177
  {
1172
1178
  testid: testid ? `${testid}-cc-payment-radio` : void 0,
@@ -1181,7 +1187,7 @@ function SelectPaymentMethod(props) {
1181
1187
  handleToggle(selectedMethod === "CCPayment" ? null : "CCPayment");
1182
1188
  },
1183
1189
  disabled: payAllWithCredits || !amountToPay,
1184
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1190
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1185
1191
  Stack,
1186
1192
  {
1187
1193
  sizing: "layout-group",
@@ -1192,18 +1198,12 @@ function SelectPaymentMethod(props) {
1192
1198
  flex: 1
1193
1199
  },
1194
1200
  minHeight: 245,
1195
- children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1196
- "iframe",
1197
- {
1198
- src: cardPaymentUrl,
1199
- style: { width: "100%", height: "100%", flex: 1 }
1200
- }
1201
- ) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Spinner, {})
1201
+ children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WorldpayIframe, { url: cardPaymentUrl }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Spinner, {})
1202
1202
  }
1203
1203
  )
1204
1204
  }
1205
1205
  ),
1206
- selectedMethod === "ACHPayment" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1206
+ selectedMethod === "ACHPayment" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1207
1207
  Button,
1208
1208
  {
1209
1209
  block: true,
@@ -1213,7 +1213,7 @@ function SelectPaymentMethod(props) {
1213
1213
  children: isPayLoading ? "Processing..." : "Submit Payment"
1214
1214
  }
1215
1215
  ),
1216
- payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
1216
+ payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
1217
1217
  ] });
1218
1218
  }
1219
1219
  function ACHSelector(props) {
@@ -1232,13 +1232,13 @@ function ACHSelector(props) {
1232
1232
  setSelectedBankGuid(bankGuid);
1233
1233
  handleToggle("ACHPayment");
1234
1234
  }
1235
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1235
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1236
1236
  Card,
1237
1237
  {
1238
1238
  testid: testid ? `${testid}-bank-${bank.CustBankGUID}` : void 0,
1239
1239
  onClick: (e) => handleBankSelect(e, bank.CustBankGUID),
1240
1240
  selected: !disabled && selectedMethod === "ACHPayment" && selectedBankGuid === bank.CustBankGUID,
1241
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1241
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1242
1242
  Radio,
1243
1243
  {
1244
1244
  label: `Pay by ${bank.AccountDisplayString}`,
@@ -1261,7 +1261,7 @@ function CreditsSelector(props) {
1261
1261
  );
1262
1262
  }
1263
1263
  };
1264
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1264
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1265
1265
  Accordion,
1266
1266
  {
1267
1267
  isOpen,
@@ -1269,15 +1269,15 @@ function CreditsSelector(props) {
1269
1269
  onClick: () => setIsOpen((prev) => !prev),
1270
1270
  testid,
1271
1271
  children: [
1272
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HorizontalDivider, {}),
1273
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1272
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(HorizontalDivider, {}),
1273
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1274
1274
  Stack,
1275
1275
  {
1276
1276
  sizing: "layout-group",
1277
1277
  width: "full",
1278
1278
  overflowY: "auto",
1279
1279
  maxHeight: 300,
1280
- children: allCredits.map((credits) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1280
+ children: allCredits.map((credits) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1281
1281
  Stack,
1282
1282
  {
1283
1283
  horizontal: true,
@@ -1285,7 +1285,7 @@ function CreditsSelector(props) {
1285
1285
  items: "center",
1286
1286
  sizing: "layout-group",
1287
1287
  children: [
1288
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1288
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1289
1289
  Stack,
1290
1290
  {
1291
1291
  sizing: "layout-group",
@@ -1293,7 +1293,7 @@ function CreditsSelector(props) {
1293
1293
  paddingY: true,
1294
1294
  flexGrow: 1,
1295
1295
  testid: testid ? `${testid}-credit-${credits.InvoiceNumber}` : void 0,
1296
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1296
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1297
1297
  Checkbox,
1298
1298
  {
1299
1299
  testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-checkbox` : void 0,
@@ -1304,7 +1304,7 @@ function CreditsSelector(props) {
1304
1304
  )
1305
1305
  }
1306
1306
  ),
1307
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
1307
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
1308
1308
  "$",
1309
1309
  formatCurrencyDisplay(
1310
1310
  `${Math.abs(credits.InvoiceBalanceDue)}`
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  SelectPaymentMethod
4
- } from "../chunk-GXSXCEAA.js";
4
+ } from "../chunk-ODWBREZN.js";
5
+ import "../chunk-WFGKIR5A.js";
5
6
  import "../chunk-BATIOCXB.js";
6
7
  import "../chunk-GG5JOFS6.js";
7
8
  import "../chunk-EPQLWHCL.js";
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/WorldpayIframe.tsx
22
+ var WorldpayIframe_exports = {};
23
+ __export(WorldpayIframe_exports, {
24
+ WorldpayIframe: () => WorldpayIframe
25
+ });
26
+ module.exports = __toCommonJS(WorldpayIframe_exports);
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ function WorldpayIframe({ url }) {
29
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("iframe", { src: url, style: { width: "100%", height: "100%", flex: 1 } });
30
+ }
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ WorldpayIframe
34
+ });
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import {
3
+ WorldpayIframe
4
+ } from "../chunk-WFGKIR5A.js";
5
+ import "../chunk-ORMEWXMH.js";
6
+ export {
7
+ WorldpayIframe
8
+ };
@@ -4657,8 +4657,14 @@ var Spinner = ({ size = "small", testid }) => {
4657
4657
  };
4658
4658
  Spinner.displayName = "Spinner";
4659
4659
 
4660
- // src/components/SelectPaymentMethod.tsx
4660
+ // src/components/WorldpayIframe.tsx
4661
4661
  var import_jsx_runtime34 = require("react/jsx-runtime");
4662
+ function WorldpayIframe({ url }) {
4663
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("iframe", { src: url, style: { width: "100%", height: "100%", flex: 1 } });
4664
+ }
4665
+
4666
+ // src/components/SelectPaymentMethod.tsx
4667
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4662
4668
  function SelectPaymentMethod(props) {
4663
4669
  const {
4664
4670
  amountToPay,
@@ -4688,8 +4694,8 @@ function SelectPaymentMethod(props) {
4688
4694
  function handleToggle(method) {
4689
4695
  onSelectMethod(method);
4690
4696
  }
4691
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Stack, { sizing: "layout-group", width: "full", minWidth: 400, children: [
4692
- !!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4697
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { sizing: "layout-group", width: "full", minWidth: 400, children: [
4698
+ !!(allCredits == null ? void 0 : allCredits.length) && withCredits && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4693
4699
  CreditsSelector,
4694
4700
  {
4695
4701
  testid: testid ? `${testid}-credit-selector` : void 0,
@@ -4699,7 +4705,7 @@ function SelectPaymentMethod(props) {
4699
4705
  })
4700
4706
  }
4701
4707
  ),
4702
- (allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4708
+ (allowedMethods == null ? void 0 : allowedMethods.includes("ACHPayment")) && !!(customerBanks == null ? void 0 : customerBanks.length) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4703
4709
  ACHSelector,
4704
4710
  {
4705
4711
  testid: testid ? `${testid}-ach-selector` : void 0,
@@ -4714,12 +4720,12 @@ function SelectPaymentMethod(props) {
4714
4720
  disabled: payAllWithCredits || !amountToPay
4715
4721
  }
4716
4722
  ),
4717
- (allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4723
+ (allowedMethods == null ? void 0 : allowedMethods.includes("CCPayment")) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4718
4724
  Accordion,
4719
4725
  {
4720
4726
  testid: testid ? `${testid}-cc-payment` : void 0,
4721
4727
  isOpen: !payAllWithCredits && selectedMethod === "CCPayment",
4722
- title: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4728
+ title: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4723
4729
  Radio,
4724
4730
  {
4725
4731
  testid: testid ? `${testid}-cc-payment-radio` : void 0,
@@ -4734,7 +4740,7 @@ function SelectPaymentMethod(props) {
4734
4740
  handleToggle(selectedMethod === "CCPayment" ? null : "CCPayment");
4735
4741
  },
4736
4742
  disabled: payAllWithCredits || !amountToPay,
4737
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4743
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4738
4744
  Stack,
4739
4745
  {
4740
4746
  sizing: "layout-group",
@@ -4745,18 +4751,12 @@ function SelectPaymentMethod(props) {
4745
4751
  flex: 1
4746
4752
  },
4747
4753
  minHeight: 245,
4748
- children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4749
- "iframe",
4750
- {
4751
- src: cardPaymentUrl,
4752
- style: { width: "100%", height: "100%", flex: 1 }
4753
- }
4754
- ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Spinner, {})
4754
+ children: !isLoadingCCiframe && cardPaymentUrl ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(WorldpayIframe, { url: cardPaymentUrl }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Spinner, {})
4755
4755
  }
4756
4756
  )
4757
4757
  }
4758
4758
  ),
4759
- selectedMethod === "ACHPayment" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4759
+ selectedMethod === "ACHPayment" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4760
4760
  Button,
4761
4761
  {
4762
4762
  block: true,
@@ -4766,7 +4766,7 @@ function SelectPaymentMethod(props) {
4766
4766
  children: isPayLoading ? "Processing..." : "Submit Payment"
4767
4767
  }
4768
4768
  ),
4769
- payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
4769
+ payAllWithCredits && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { testid: testid ? `${testid}-submit-payment-button` : void 0, block: true, onClick: onPay, disabled: isPayLoading, children: isPayLoading ? "Processing..." : "Submit Payment" })
4770
4770
  ] });
4771
4771
  }
4772
4772
  function ACHSelector(props) {
@@ -4785,13 +4785,13 @@ function ACHSelector(props) {
4785
4785
  setSelectedBankGuid(bankGuid);
4786
4786
  handleToggle("ACHPayment");
4787
4787
  }
4788
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4788
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: customerBanks.map((bank) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4789
4789
  Card,
4790
4790
  {
4791
4791
  testid: testid ? `${testid}-bank-${bank.CustBankGUID}` : void 0,
4792
4792
  onClick: (e) => handleBankSelect(e, bank.CustBankGUID),
4793
4793
  selected: !disabled && selectedMethod === "ACHPayment" && selectedBankGuid === bank.CustBankGUID,
4794
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4794
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4795
4795
  Radio,
4796
4796
  {
4797
4797
  label: `Pay by ${bank.AccountDisplayString}`,
@@ -4814,7 +4814,7 @@ function CreditsSelector(props) {
4814
4814
  );
4815
4815
  }
4816
4816
  };
4817
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4817
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4818
4818
  Accordion,
4819
4819
  {
4820
4820
  isOpen,
@@ -4822,15 +4822,15 @@ function CreditsSelector(props) {
4822
4822
  onClick: () => setIsOpen((prev) => !prev),
4823
4823
  testid,
4824
4824
  children: [
4825
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(HorizontalDivider, {}),
4826
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4825
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(HorizontalDivider, {}),
4826
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Stack, { sizing: "layout-group", width: "full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4827
4827
  Stack,
4828
4828
  {
4829
4829
  sizing: "layout-group",
4830
4830
  width: "full",
4831
4831
  overflowY: "auto",
4832
4832
  maxHeight: 300,
4833
- children: allCredits.map((credits) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4833
+ children: allCredits.map((credits) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4834
4834
  Stack,
4835
4835
  {
4836
4836
  horizontal: true,
@@ -4838,7 +4838,7 @@ function CreditsSelector(props) {
4838
4838
  items: "center",
4839
4839
  sizing: "layout-group",
4840
4840
  children: [
4841
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4841
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4842
4842
  Stack,
4843
4843
  {
4844
4844
  sizing: "layout-group",
@@ -4846,7 +4846,7 @@ function CreditsSelector(props) {
4846
4846
  paddingY: true,
4847
4847
  flexGrow: 1,
4848
4848
  testid: testid ? `${testid}-credit-${credits.InvoiceNumber}` : void 0,
4849
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4849
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4850
4850
  Checkbox,
4851
4851
  {
4852
4852
  testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-checkbox` : void 0,
@@ -4857,7 +4857,7 @@ function CreditsSelector(props) {
4857
4857
  )
4858
4858
  }
4859
4859
  ),
4860
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
4860
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Subheader, { testid: testid ? `${testid}-credit-${credits.InvoiceNumber}-InvoiceBalanceDue` : void 0, className: " pr-desktop-component-padding", children: [
4861
4861
  "$",
4862
4862
  formatCurrencyDisplay(
4863
4863
  `${Math.abs(credits.InvoiceBalanceDue)}`
@@ -4875,7 +4875,7 @@ function CreditsSelector(props) {
4875
4875
  }
4876
4876
 
4877
4877
  // src/components/PaymentOnAccountModal.tsx
4878
- var import_jsx_runtime35 = require("react/jsx-runtime");
4878
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4879
4879
  function PaymentOnAccountModal(props) {
4880
4880
  const {
4881
4881
  isOpen,
@@ -4913,17 +4913,17 @@ function PaymentOnAccountModal(props) {
4913
4913
  }
4914
4914
  return 0;
4915
4915
  }, [creditCardSettings, amount, selectedMethod]);
4916
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Modal, { testid, open: isOpen, onClose, title: "Payment on Account", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { sizing: "layout-group", width: "full", children: [
4917
- selectedMethod === "CCPayment" && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { horizontal: true, justify: "between", items: "center", children: [
4918
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Paragraph, { children: "Surcharge" }),
4919
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Paragraph, { testid: testid ? `${testid}-surcharge` : void 0, children: [
4916
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Modal, { testid, open: isOpen, onClose, title: "Payment on Account", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Stack, { sizing: "layout-group", width: "full", children: [
4917
+ selectedMethod === "CCPayment" && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Stack, { horizontal: true, justify: "between", items: "center", children: [
4918
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Paragraph, { children: "Surcharge" }),
4919
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Paragraph, { testid: testid ? `${testid}-surcharge` : void 0, children: [
4920
4920
  "$",
4921
4921
  formatCurrencyDisplay(creditCardSurcharge.toFixed(2))
4922
4922
  ] })
4923
4923
  ] }),
4924
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Card, { className: "py-desktop-component-padding", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Stack, { sizing: "component", justify: "between", items: "center", horizontal: true, children: [
4925
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Paragraph, { className: "w-full", children: "Amount to Pay" }),
4926
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4924
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Card, { className: "py-desktop-component-padding", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Stack, { sizing: "component", justify: "between", items: "center", horizontal: true, children: [
4925
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Paragraph, { className: "w-full", children: "Amount to Pay" }),
4926
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4927
4927
  Input,
4928
4928
  {
4929
4929
  testid: testid ? `${testid}-amount-to-pay` : void 0,
@@ -4936,7 +4936,7 @@ function PaymentOnAccountModal(props) {
4936
4936
  }
4937
4937
  ) })
4938
4938
  ] }) }),
4939
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4939
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4940
4940
  SelectPaymentMethod,
4941
4941
  __spreadProps(__spreadValues({}, paymentProps), {
4942
4942
  testid: testid ? `${testid}-select-payment-method` : void 0,
@@ -6,8 +6,9 @@ import {
6
6
  } from "../chunk-56Y5DDG3.js";
7
7
  import {
8
8
  PaymentOnAccountModal
9
- } from "../chunk-J4E6Q5TM.js";
10
- import "../chunk-GXSXCEAA.js";
9
+ } from "../chunk-AMM762XG.js";
10
+ import "../chunk-ODWBREZN.js";
11
+ import "../chunk-WFGKIR5A.js";
11
12
  import "../chunk-BATIOCXB.js";
12
13
  import "../chunk-5GOJRLQO.js";
13
14
  import "../chunk-4RJKB7LC.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmsi/wedgekit-react",
3
3
  "private": false,
4
- "version": "0.0.146",
4
+ "version": "0.0.147",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
@@ -11,6 +11,7 @@ import { Subheader } from "./Subheader";
11
11
  import { formatCurrencyDisplay } from "../utils/formatting";
12
12
  import { HorizontalDivider } from "./HorizontalDivider";
13
13
  import { Spinner } from "./Spinner";
14
+ import { WorldpayIframe } from "./WorldpayIframe";
14
15
 
15
16
  export type PaymentMethodType = "ACHPayment" | "CCPayment" | "CreditsOnly";
16
17
  export type CustomerBank = {
@@ -128,10 +129,7 @@ export function SelectPaymentMethod(props: SelectPaymentMethodProps) {
128
129
  minHeight={245}
129
130
  >
130
131
  {!isLoadingCCiframe && cardPaymentUrl ? (
131
- <iframe
132
- src={cardPaymentUrl}
133
- style={{ width: "100%", height: "100%", flex: 1 }}
134
- />
132
+ <WorldpayIframe url={cardPaymentUrl} />
135
133
  ) : (
136
134
  <Spinner />
137
135
  )}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+
3
+ export function WorldpayIframe({ url }: { url: string }) {
4
+ return (
5
+ <iframe src={url} style={{ width: "100%", height: "100%", flex: 1 }} />
6
+ );
7
+ }