@openrails/billing-ui 0.274.0 → 0.275.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.
- package/dist/admin/context.d.ts +14 -0
- package/dist/admin/lib/api/endpoints.d.ts +2 -1
- package/dist/admin/lib/api/index.d.ts +1 -0
- package/dist/admin/lib/api/order-endpoints.d.ts +1 -0
- package/dist/admin/lib/api/types.d.ts +2 -12
- package/dist/admin/lib/format.d.ts +5 -1
- package/dist/admin/lib/order-queries.d.ts +3 -0
- package/dist/admin/lib/queries.d.ts +3 -0
- package/dist/admin/messages.d.ts +13 -8
- package/dist/admin/pages/dashboard/lib.d.ts +1 -0
- package/dist/admin/pages/imports/shared.d.ts +1 -0
- package/dist/admin/pages/subscriptions/change-subscription-dialog.d.ts +4 -7
- package/dist/admin/pages/subscriptions/subscription-change-options.d.ts +6 -15
- package/dist/{admin-attempts-Dzipkstg.js → admin-attempts-CP5CWyNR.js} +28 -28
- package/dist/{admin-attempts-Dzipkstg.js.map → admin-attempts-CP5CWyNR.js.map} +1 -1
- package/dist/{admin-auth-BCl_Tv3t.js → admin-auth-DlIOmwPo.js} +2 -2
- package/dist/{admin-auth-BCl_Tv3t.js.map → admin-auth-DlIOmwPo.js.map} +1 -1
- package/dist/{admin-badge-kmYQM9Ge.js → admin-badge-DR_8AhdC.js} +2 -2
- package/dist/{admin-badge-kmYQM9Ge.js.map → admin-badge-DR_8AhdC.js.map} +1 -1
- package/dist/{admin-button-Cq9ZfX4R.js → admin-button-DBzTD6By.js} +2 -2
- package/dist/{admin-button-Cq9ZfX4R.js.map → admin-button-DBzTD6By.js.map} +1 -1
- package/dist/{admin-capabilities-k5fQZhN9.js → admin-capabilities-CZdT1Pxe.js} +2 -2
- package/dist/{admin-capabilities-k5fQZhN9.js.map → admin-capabilities-CZdT1Pxe.js.map} +1 -1
- package/dist/{admin-card-C8k67jJv.js → admin-card-mZl4-s5d.js} +2 -2
- package/dist/{admin-card-C8k67jJv.js.map → admin-card-mZl4-s5d.js.map} +1 -1
- package/dist/{admin-catalog-CON-GwKL.js → admin-catalog-DpTjS0Yo.js} +38 -38
- package/dist/{admin-catalog-CON-GwKL.js.map → admin-catalog-DpTjS0Yo.js.map} +1 -1
- package/dist/{admin-cursor-pager-DqFruoNu.js → admin-cursor-pager-C-KjCIy9.js} +4 -4
- package/dist/{admin-cursor-pager-DqFruoNu.js.map → admin-cursor-pager-C-KjCIy9.js.map} +1 -1
- package/dist/{admin-customers-CWWOrcVR.js → admin-customers-BE3N839X.js} +12 -12
- package/dist/{admin-customers-CWWOrcVR.js.map → admin-customers-BE3N839X.js.map} +1 -1
- package/dist/{admin-dashboard-BiShWFk2.js → admin-dashboard-BxjkV15J.js} +25 -17
- package/dist/admin-dashboard-BxjkV15J.js.map +1 -0
- package/dist/{admin-data-table-CdsjYJh5.js → admin-data-table-D89AwWz_.js} +5 -5
- package/dist/{admin-data-table-CdsjYJh5.js.map → admin-data-table-D89AwWz_.js.map} +1 -1
- package/dist/{admin-detail-BWSC1aCH.js → admin-detail-BKe9xqPd.js} +41 -41
- package/dist/{admin-detail-BWSC1aCH.js.map → admin-detail-BKe9xqPd.js.map} +1 -1
- package/dist/admin-detail-C8lD7U2t.js +699 -0
- package/dist/admin-detail-C8lD7U2t.js.map +1 -0
- package/dist/{admin-detail-CMmhZQ2A.js → admin-detail-D6zD085K.js} +45 -37
- package/dist/admin-detail-D6zD085K.js.map +1 -0
- package/dist/{admin-detail-Cyuf_i9U.js → admin-detail-Ln56otK0.js} +40 -40
- package/dist/{admin-detail-Cyuf_i9U.js.map → admin-detail-Ln56otK0.js.map} +1 -1
- package/dist/{admin-detail-CiONe1Pt.js → admin-detail-P-UnNvXJ.js} +171 -171
- package/dist/admin-detail-P-UnNvXJ.js.map +1 -0
- package/dist/{admin-dialog-Ch7rTOCr.js → admin-dialog-Dn2FRJu4.js} +3 -3
- package/dist/{admin-dialog-Ch7rTOCr.js.map → admin-dialog-Dn2FRJu4.js.map} +1 -1
- package/dist/{admin-dropdown-menu-Bah3f8AZ.js → admin-dropdown-menu-DLUn6Uj3.js} +2 -2
- package/dist/{admin-dropdown-menu-Bah3f8AZ.js.map → admin-dropdown-menu-DLUn6Uj3.js.map} +1 -1
- package/dist/{admin-dunning-B2zgtrOo.js → admin-dunning-COaHzrmN.js} +2 -2
- package/dist/{admin-dunning-B2zgtrOo.js.map → admin-dunning-COaHzrmN.js.map} +1 -1
- package/dist/{admin-fact-card-Bt__Cd_U.js → admin-fact-card-DKvBnUXB.js} +2 -2
- package/dist/{admin-fact-card-Bt__Cd_U.js.map → admin-fact-card-DKvBnUXB.js.map} +1 -1
- package/dist/admin-format-BbiTCqUG.js +171 -0
- package/dist/admin-format-BbiTCqUG.js.map +1 -0
- package/dist/{admin-health-pzTO6_0v.js → admin-health-DmnI4e8K.js} +10 -10
- package/dist/{admin-health-pzTO6_0v.js.map → admin-health-DmnI4e8K.js.map} +1 -1
- package/dist/{admin-imports-tT5et8-V.js → admin-imports-C0aMP6sj.js} +18 -18
- package/dist/{admin-imports-tT5et8-V.js.map → admin-imports-C0aMP6sj.js.map} +1 -1
- package/dist/{admin-input-DvRZy_2a.js → admin-input-JKrQIGfD.js} +2 -2
- package/dist/{admin-input-DvRZy_2a.js.map → admin-input-JKrQIGfD.js.map} +1 -1
- package/dist/{admin-label-QZtWJGH-.js → admin-label-CHWsVIZC.js} +2 -2
- package/dist/{admin-label-QZtWJGH-.js.map → admin-label-CHWsVIZC.js.map} +1 -1
- package/dist/{admin-linked-table-row-6jkCKwMn.js → admin-linked-table-row-BMZYYsuk.js} +3 -3
- package/dist/{admin-linked-table-row-6jkCKwMn.js.map → admin-linked-table-row-BMZYYsuk.js.map} +1 -1
- package/dist/{admin-map-dialog-BV54mvMQ.js → admin-map-dialog-BHUGdCcv.js} +10 -10
- package/dist/{admin-map-dialog-BV54mvMQ.js.map → admin-map-dialog-BHUGdCcv.js.map} +1 -1
- package/dist/{admin-metering-Bv5EcX6M.js → admin-metering-CDqueHUh.js} +15 -15
- package/dist/{admin-metering-Bv5EcX6M.js.map → admin-metering-CDqueHUh.js.map} +1 -1
- package/dist/{admin-missing-record-BXqGFDt3.js → admin-missing-record-BPFs3MmO.js} +2 -2
- package/dist/{admin-missing-record-BXqGFDt3.js.map → admin-missing-record-BPFs3MmO.js.map} +1 -1
- package/dist/{admin-ops-h3RjpcNu.js → admin-ops-CL2kjDwi.js} +18 -15
- package/dist/admin-ops-CL2kjDwi.js.map +1 -0
- package/dist/admin-orders-C1Sf2qhc.js +192 -0
- package/dist/admin-orders-C1Sf2qhc.js.map +1 -0
- package/dist/admin-parked-a0tB5bhG.js +193 -0
- package/dist/admin-parked-a0tB5bhG.js.map +1 -0
- package/dist/admin-payments-DJcjwRA4.js +221 -0
- package/dist/admin-payments-DJcjwRA4.js.map +1 -0
- package/dist/{admin-price-detail-BjWYU5A-.js → admin-price-detail-BOmeWw15.js} +15 -15
- package/dist/{admin-price-detail-BjWYU5A-.js.map → admin-price-detail-BOmeWw15.js.map} +1 -1
- package/dist/{admin-price-format-BVUpDoSC.js → admin-price-format-CqOmHrIn.js} +2 -2
- package/dist/{admin-price-format-BVUpDoSC.js.map → admin-price-format-CqOmHrIn.js.map} +1 -1
- package/dist/{admin-price-wizard-CTbkbmYc.js → admin-price-wizard-B6s5OJeO.js} +9 -9
- package/dist/{admin-price-wizard-CTbkbmYc.js.map → admin-price-wizard-B6s5OJeO.js.map} +1 -1
- package/dist/{admin-proposals-Ci9Q8j7Y.js → admin-proposals-DVrl-ym4.js} +20 -20
- package/dist/{admin-proposals-Ci9Q8j7Y.js.map → admin-proposals-DVrl-ym4.js.map} +1 -1
- package/dist/admin-provider-prices-BVVogH7Q.js +241 -0
- package/dist/admin-provider-prices-BVVogH7Q.js.map +1 -0
- package/dist/{admin-range-picker-nfflPp21.js → admin-range-picker-C6BtSm2B.js} +5 -5
- package/dist/{admin-range-picker-nfflPp21.js.map → admin-range-picker-C6BtSm2B.js.map} +1 -1
- package/dist/{admin-records-CrTCorWH.js → admin-records-DKtcgN11.js} +19 -19
- package/dist/{admin-records-CrTCorWH.js.map → admin-records-DKtcgN11.js.map} +1 -1
- package/dist/{admin-reports-BO6wrvtw.js → admin-reports-CtPoiceH.js} +8 -8
- package/dist/{admin-reports-BO6wrvtw.js.map → admin-reports-CtPoiceH.js.map} +1 -1
- package/dist/{admin-select-DvfJ80Rg.js → admin-select-6Yuh5M1Q.js} +2 -2
- package/dist/{admin-select-DvfJ80Rg.js.map → admin-select-6Yuh5M1Q.js.map} +1 -1
- package/dist/{admin-settings-BOoTzhyf.js → admin-settings-DscHu4ww.js} +560 -550
- package/dist/admin-settings-DscHu4ww.js.map +1 -0
- package/dist/{admin-shared-BbGT_qTo.js → admin-shared-BywM-MMp.js} +13 -9
- package/dist/{admin-shared-BbGT_qTo.js.map → admin-shared-BywM-MMp.js.map} +1 -1
- package/dist/{admin-skeleton-B2a4ScVE.js → admin-skeleton-lndmw89u.js} +2 -2
- package/dist/{admin-skeleton-B2a4ScVE.js.map → admin-skeleton-lndmw89u.js.map} +1 -1
- package/dist/{admin-status-badge-Bp6cssXY.js → admin-status-badge-IL8ofZ_6.js} +3 -3
- package/dist/{admin-status-badge-Bp6cssXY.js.map → admin-status-badge-IL8ofZ_6.js.map} +1 -1
- package/dist/{admin-subscriptions-D9JmoicC.js → admin-subscriptions-Cd5CGrue.js} +83 -87
- package/dist/admin-subscriptions-Cd5CGrue.js.map +1 -0
- package/dist/{admin-switch-DBBxJRZP.js → admin-switch-DpwQSzEm.js} +2 -2
- package/dist/{admin-switch-DBBxJRZP.js.map → admin-switch-DpwQSzEm.js.map} +1 -1
- package/dist/{admin-table-CPDoVfK4.js → admin-table-D-GdGM1m.js} +2 -2
- package/dist/{admin-table-CPDoVfK4.js.map → admin-table-D-GdGM1m.js.map} +1 -1
- package/dist/admin-tabs-B--1flzO.js +158 -0
- package/dist/admin-tabs-B--1flzO.js.map +1 -0
- package/dist/{admin-textarea-d3fu_waS.js → admin-textarea-xsp5V9xM.js} +2 -2
- package/dist/{admin-textarea-d3fu_waS.js.map → admin-textarea-xsp5V9xM.js.map} +1 -1
- package/dist/{admin-typed-confirm-dialog-BVklYjFo.js → admin-typed-confirm-dialog-NiEDwX_0.js} +6 -6
- package/dist/{admin-typed-confirm-dialog-BVklYjFo.js.map → admin-typed-confirm-dialog-NiEDwX_0.js.map} +1 -1
- package/dist/{admin-utils-DTT53IpS.js → admin-utils-wuPUD0uh.js} +152 -137
- package/dist/admin-utils-wuPUD0uh.js.map +1 -0
- package/dist/{admin-widget-viz-Exsqz3Dw.js → admin-widget-viz-kHHVmDEx.js} +215 -187
- package/dist/admin-widget-viz-kHHVmDEx.js.map +1 -0
- package/dist/admin.css +1 -1
- package/dist/admin.js +49 -44
- package/dist/admin.js.map +1 -1
- package/dist/client/generated/routes.d.ts +17 -0
- package/dist/client/generated/wire.d.ts +4 -0
- package/dist/client/types.d.ts +6 -0
- package/dist/{client-BYgnI6_h.js → client-ctrbivyN.js} +3 -2
- package/dist/client-ctrbivyN.js.map +1 -0
- package/dist/client.js +1 -1
- package/dist/{hooks-t2tSrCpa.js → hooks-KpTetx6F.js} +2 -2
- package/dist/{hooks-t2tSrCpa.js.map → hooks-KpTetx6F.js.map} +1 -1
- package/dist/index.js +750 -711
- package/dist/index.js.map +1 -1
- package/dist/lib/card-brands.d.ts +1 -0
- package/dist/locales/de.js +3 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +3 -0
- package/dist/locales/en.js +3 -0
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +3 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +3 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +3 -0
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +3 -0
- package/dist/locales/zh.js.map +1 -1
- package/dist/react.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/admin-customer-search-CJHB80rg.js +0 -117
- package/dist/admin-customer-search-CJHB80rg.js.map +0 -1
- package/dist/admin-dashboard-BiShWFk2.js.map +0 -1
- package/dist/admin-detail-CKRtK43V.js +0 -728
- package/dist/admin-detail-CKRtK43V.js.map +0 -1
- package/dist/admin-detail-CMmhZQ2A.js.map +0 -1
- package/dist/admin-detail-CiONe1Pt.js.map +0 -1
- package/dist/admin-format-DoohJ7Fg.js +0 -136
- package/dist/admin-format-DoohJ7Fg.js.map +0 -1
- package/dist/admin-ops-h3RjpcNu.js.map +0 -1
- package/dist/admin-orders-DYxPiuTl.js +0 -192
- package/dist/admin-orders-DYxPiuTl.js.map +0 -1
- package/dist/admin-parked-ClKA60d5.js +0 -193
- package/dist/admin-parked-ClKA60d5.js.map +0 -1
- package/dist/admin-payments-BlIuy3wL.js +0 -220
- package/dist/admin-payments-BlIuy3wL.js.map +0 -1
- package/dist/admin-provider-prices-B6Ayq-eN.js +0 -246
- package/dist/admin-provider-prices-B6Ayq-eN.js.map +0 -1
- package/dist/admin-settings-BOoTzhyf.js.map +0 -1
- package/dist/admin-subscriptions-D9JmoicC.js.map +0 -1
- package/dist/admin-tabs-DDUv3kiu.js +0 -46
- package/dist/admin-tabs-DDUv3kiu.js.map +0 -1
- package/dist/admin-utils-DTT53IpS.js.map +0 -1
- package/dist/admin-widget-viz-Exsqz3Dw.js.map +0 -1
- package/dist/client-BYgnI6_h.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { E as e, O as t, f as n, l as r, p as i, w as a } from "./admin-utils-
|
|
2
|
-
import { t as o } from "./admin-button-
|
|
3
|
-
import { t as s } from "./admin-input-
|
|
4
|
-
import { a as c, d as l, i as u, n as d, u as f } from "./admin-capabilities-
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { a as
|
|
11
|
-
import { a as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { r as
|
|
15
|
-
import { t as
|
|
16
|
-
import { i as
|
|
17
|
-
import * as
|
|
18
|
-
import { useMutation as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { HugeiconsIcon as
|
|
21
|
-
import { Add01Icon as
|
|
22
|
-
import { useForm as
|
|
1
|
+
import { E as e, O as t, f as n, l as r, p as i, w as a } from "./admin-utils-wuPUD0uh.js";
|
|
2
|
+
import { t as o } from "./admin-button-DBzTD6By.js";
|
|
3
|
+
import { t as s } from "./admin-input-JKrQIGfD.js";
|
|
4
|
+
import { a as c, d as l, i as u, n as d, u as f } from "./admin-capabilities-CZdT1Pxe.js";
|
|
5
|
+
import { h as p, n as m, o as h, r as g, s as _, t as v } from "./admin-format-BbiTCqUG.js";
|
|
6
|
+
import { n as ee } from "./admin-confirm-katGq0Qo.js";
|
|
7
|
+
import { t as y } from "./admin-badge-DR_8AhdC.js";
|
|
8
|
+
import { t as b } from "./admin-form-field-errors-hbUMIriS.js";
|
|
9
|
+
import { a as x, i as S, n as C, r as w, t as T } from "./admin-select-6Yuh5M1Q.js";
|
|
10
|
+
import { a as E, n as D, o as O, r as k, s as A, t as j } from "./admin-table-D-GdGM1m.js";
|
|
11
|
+
import { a as M, i as N, n as P, o as F, r as te, s as ne, t as re } from "./admin-dialog-Dn2FRJu4.js";
|
|
12
|
+
import { t as I } from "./admin-label-CHWsVIZC.js";
|
|
13
|
+
import { t as ie } from "./admin-switch-DpwQSzEm.js";
|
|
14
|
+
import { r as L } from "./admin-dialog-width-CC7QHT1p.js";
|
|
15
|
+
import { t as ae } from "./admin-typed-confirm-dialog-NiEDwX_0.js";
|
|
16
|
+
import { a as oe, i as R, n as z, r as se, t as ce } from "./admin-tabs-B--1flzO.js";
|
|
17
|
+
import * as B from "react";
|
|
18
|
+
import { useMutation as V, useQuery as H, useQueryClient as U } from "@tanstack/react-query";
|
|
19
|
+
import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
|
|
20
|
+
import { HugeiconsIcon as q } from "@hugeicons/react";
|
|
21
|
+
import { Add01Icon as le, Cancel01Icon as ue, Delete02Icon as de } from "@hugeicons/core-free-icons";
|
|
22
|
+
import { useForm as J } from "@tanstack/react-form";
|
|
23
23
|
//#region src/admin/pages/settings/configuration-edit.ts
|
|
24
|
-
function
|
|
25
|
-
let { toast: t, toastApiError: n, toastStaleEdit: r, adminMutations: o } = i(), [s, c] =
|
|
24
|
+
function Y(e) {
|
|
25
|
+
let { toast: t, toastApiError: n, toastStaleEdit: r, adminMutations: o } = i(), [s, c] = B.useState(null), l = U(), u = V(o.updateMerchantConfiguration(l));
|
|
26
26
|
return {
|
|
27
27
|
editing: s !== null,
|
|
28
28
|
open: () => {
|
|
@@ -47,45 +47,45 @@ function q(e) {
|
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
49
|
//#region src/admin/pages/settings/setting-fields.tsx
|
|
50
|
-
function
|
|
51
|
-
let { adminQueries: t } = i(), { data: n } =
|
|
52
|
-
return !n || n.capabilities.features?.merchant_config_edits ? null : /* @__PURE__ */
|
|
50
|
+
function fe() {
|
|
51
|
+
let { adminQueries: t } = i(), { data: n } = H(t.config());
|
|
52
|
+
return !n || n.capabilities.features?.merchant_config_edits ? null : /* @__PURE__ */ G("p", {
|
|
53
53
|
className: "rounded-md border px-3 py-2 text-sm text-muted-foreground",
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ G(e, { id: "Read-only: this merchant's configuration comes from a file. Change it there." })
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return t ? n ? /* @__PURE__ */
|
|
57
|
+
function pe({ edits: t, editing: n, form: r, saving: i, canSave: a = !0, onEdit: s, onCancel: c }) {
|
|
58
|
+
return t ? n ? /* @__PURE__ */ K("div", {
|
|
59
59
|
className: "flex items-center gap-2",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ G(o, {
|
|
61
61
|
type: "button",
|
|
62
62
|
variant: "outline",
|
|
63
63
|
size: "sm",
|
|
64
64
|
disabled: i,
|
|
65
65
|
onClick: c,
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
}), /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ G(e, { id: "Cancel" })
|
|
67
|
+
}), /* @__PURE__ */ G(o, {
|
|
68
68
|
type: "submit",
|
|
69
69
|
size: "sm",
|
|
70
70
|
form: r,
|
|
71
71
|
disabled: !a || i,
|
|
72
72
|
children: i ? "Saving…" : "Save"
|
|
73
73
|
})]
|
|
74
|
-
}) : /* @__PURE__ */
|
|
74
|
+
}) : /* @__PURE__ */ G(o, {
|
|
75
75
|
type: "button",
|
|
76
76
|
variant: "outline",
|
|
77
77
|
size: "sm",
|
|
78
78
|
onClick: s,
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ G(e, { id: "Edit" })
|
|
80
80
|
}) : null;
|
|
81
81
|
}
|
|
82
82
|
function X({ label: e, value: t }) {
|
|
83
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ K("div", {
|
|
84
84
|
className: "grid gap-1.5 md:grid-cols-[11rem_minmax(0,1fr)] md:gap-6",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ G("dt", {
|
|
86
86
|
className: "text-sm text-muted-foreground",
|
|
87
87
|
children: e
|
|
88
|
-
}), /* @__PURE__ */
|
|
88
|
+
}), /* @__PURE__ */ G("dd", {
|
|
89
89
|
className: t ? "min-w-0 text-sm break-words" : "text-sm text-muted-foreground",
|
|
90
90
|
children: t || "Not set"
|
|
91
91
|
})]
|
|
@@ -93,12 +93,12 @@ function X({ label: e, value: t }) {
|
|
|
93
93
|
}
|
|
94
94
|
function Z({ label: e, id: n, children: r }) {
|
|
95
95
|
let { id: i } = t();
|
|
96
|
-
return /* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ K("div", {
|
|
97
97
|
className: "grid gap-2 md:grid-cols-[11rem_minmax(0,1fr)] md:items-center md:gap-6",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ G(I, {
|
|
99
99
|
htmlFor: i(n),
|
|
100
100
|
children: e
|
|
101
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ G("div", {
|
|
102
102
|
className: "min-w-0",
|
|
103
103
|
children: r
|
|
104
104
|
})]
|
|
@@ -106,20 +106,20 @@ function Z({ label: e, id: n, children: r }) {
|
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/admin/pages/settings/notifications.tsx
|
|
109
|
-
function
|
|
110
|
-
let { adminQueries: t } = i(), n =
|
|
111
|
-
return /* @__PURE__ */
|
|
109
|
+
function me() {
|
|
110
|
+
let { adminQueries: t } = i(), n = H(t.merchantConfiguration("Load settings")), r = H(t.webhooks()), a = l(), o = r.data?.data ?? [];
|
|
111
|
+
return /* @__PURE__ */ K("div", {
|
|
112
112
|
className: "flex flex-col gap-10",
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
n.data ? /* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ G(fe, {}),
|
|
115
|
+
n.data ? /* @__PURE__ */ G(he, {
|
|
116
116
|
configuration: n.data,
|
|
117
117
|
edits: a
|
|
118
|
-
}) : /* @__PURE__ */
|
|
118
|
+
}) : /* @__PURE__ */ G("p", {
|
|
119
119
|
className: "text-sm text-muted-foreground",
|
|
120
|
-
children: /* @__PURE__ */
|
|
120
|
+
children: /* @__PURE__ */ G(e, { id: "Loading…" })
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ G(_e, {
|
|
123
123
|
webhooks: o,
|
|
124
124
|
loading: r.isPending,
|
|
125
125
|
edits: a
|
|
@@ -127,27 +127,27 @@ function ue() {
|
|
|
127
127
|
]
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
let { id: i, text: a } = t(), o = n.alert_email ?? "", c =
|
|
130
|
+
function he({ configuration: n, edits: r }) {
|
|
131
|
+
let { id: i, text: a } = t(), o = n.alert_email ?? "", c = Y(n), l = J({
|
|
132
132
|
defaultValues: { email: o },
|
|
133
133
|
onSubmit: ({ value: e }) => c.save({ alert_email: e.email.trim() }, e.email.trim() ? "Alert email saved" : "Alert email cleared", "Save alert email")
|
|
134
134
|
});
|
|
135
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ K("section", {
|
|
136
136
|
className: "grid gap-5",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ K("div", {
|
|
138
138
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ K("div", {
|
|
140
140
|
className: "grid gap-1",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
142
142
|
className: "text-base font-semibold",
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
}), /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ G(e, { id: "Email delivery" })
|
|
144
|
+
}), /* @__PURE__ */ G("p", {
|
|
145
145
|
className: "text-sm text-muted-foreground",
|
|
146
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ G(e, { id: "Send email alerts to this address." })
|
|
147
147
|
})]
|
|
148
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ G(l.Subscribe, {
|
|
149
149
|
selector: (e) => e.isSubmitting,
|
|
150
|
-
children: (e) => /* @__PURE__ */
|
|
150
|
+
children: (e) => /* @__PURE__ */ G(pe, {
|
|
151
151
|
edits: r,
|
|
152
152
|
editing: c.editing,
|
|
153
153
|
form: "alert-email-form",
|
|
@@ -158,17 +158,17 @@ function de({ configuration: n, edits: r }) {
|
|
|
158
158
|
onCancel: c.close
|
|
159
159
|
})
|
|
160
160
|
})]
|
|
161
|
-
}), c.editing ? /* @__PURE__ */
|
|
161
|
+
}), c.editing ? /* @__PURE__ */ G("form", {
|
|
162
162
|
id: i("alert-email-form"),
|
|
163
163
|
onSubmit: (e) => {
|
|
164
164
|
e.preventDefault(), e.stopPropagation(), l.handleSubmit();
|
|
165
165
|
},
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ G(l.Field, {
|
|
167
167
|
name: "email",
|
|
168
|
-
children: (e) => /* @__PURE__ */
|
|
168
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
169
169
|
label: a("Alert email"),
|
|
170
170
|
id: "alert-email",
|
|
171
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ G(s, {
|
|
172
172
|
id: i("alert-email"),
|
|
173
173
|
type: "email",
|
|
174
174
|
placeholder: a("alerts@example.com"),
|
|
@@ -178,13 +178,13 @@ function de({ configuration: n, edits: r }) {
|
|
|
178
178
|
})
|
|
179
179
|
})
|
|
180
180
|
})
|
|
181
|
-
}) : /* @__PURE__ */
|
|
181
|
+
}) : /* @__PURE__ */ G("dl", { children: /* @__PURE__ */ G(X, {
|
|
182
182
|
label: a("Alert email"),
|
|
183
183
|
value: o
|
|
184
184
|
}) })]
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var ge = [
|
|
188
188
|
{
|
|
189
189
|
value: "generic",
|
|
190
190
|
label: "Generic (your own receiver)"
|
|
@@ -198,100 +198,100 @@ var fe = [
|
|
|
198
198
|
label: "Slack"
|
|
199
199
|
}
|
|
200
200
|
];
|
|
201
|
-
function
|
|
202
|
-
return /* @__PURE__ */
|
|
201
|
+
function _e({ webhooks: t, loading: n, edits: r }) {
|
|
202
|
+
return /* @__PURE__ */ K("section", {
|
|
203
203
|
className: "grid gap-5",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ K("div", {
|
|
205
205
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ K("div", {
|
|
207
207
|
className: "grid max-w-2xl gap-1",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
209
209
|
className: "text-base font-semibold",
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
-
}), /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ G(e, { id: "Webhooks" })
|
|
211
|
+
}), /* @__PURE__ */ G("p", {
|
|
212
212
|
className: "text-sm text-pretty text-muted-foreground",
|
|
213
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ G(e, { id: "Send alerts to Discord, Slack, or your own endpoint." })
|
|
214
214
|
})]
|
|
215
|
-
}), r && /* @__PURE__ */
|
|
216
|
-
}), n ? /* @__PURE__ */
|
|
215
|
+
}), r && /* @__PURE__ */ G(ye, {})]
|
|
216
|
+
}), n ? /* @__PURE__ */ G("p", {
|
|
217
217
|
className: "text-sm text-muted-foreground",
|
|
218
|
-
children: /* @__PURE__ */
|
|
219
|
-
}) : t.length === 0 ? /* @__PURE__ */
|
|
218
|
+
children: /* @__PURE__ */ G(e, { id: "Loading…" })
|
|
219
|
+
}) : t.length === 0 ? /* @__PURE__ */ G("p", {
|
|
220
220
|
className: "py-2 text-sm text-muted-foreground",
|
|
221
|
-
children: /* @__PURE__ */
|
|
222
|
-
}) : /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ G(e, { id: "No webhooks configured." })
|
|
222
|
+
}) : /* @__PURE__ */ K(j, {
|
|
223
223
|
className: "min-w-[36rem]",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ G(O, { children: /* @__PURE__ */ K(A, {
|
|
225
225
|
className: "hover:bg-transparent",
|
|
226
226
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ G(E, {
|
|
228
228
|
className: "text-muted-foreground",
|
|
229
|
-
children: /* @__PURE__ */
|
|
229
|
+
children: /* @__PURE__ */ G(e, { id: "Name" })
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ G(E, {
|
|
232
232
|
className: "text-muted-foreground",
|
|
233
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ G(e, { id: "Format" })
|
|
234
234
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ G(E, {
|
|
236
236
|
className: "text-muted-foreground",
|
|
237
237
|
children: "URL"
|
|
238
238
|
}),
|
|
239
|
-
r && /* @__PURE__ */
|
|
239
|
+
r && /* @__PURE__ */ G(E, {
|
|
240
240
|
className: "text-right text-muted-foreground",
|
|
241
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ G(e, { id: "Action" })
|
|
242
242
|
})
|
|
243
243
|
]
|
|
244
|
-
}) }), /* @__PURE__ */
|
|
244
|
+
}) }), /* @__PURE__ */ G(D, { children: t.map((e) => /* @__PURE__ */ G(ve, {
|
|
245
245
|
webhook: e,
|
|
246
246
|
edits: r
|
|
247
247
|
}, e.id)) })]
|
|
248
248
|
})]
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
let { toast: a, toastApiError: s, adminMutations: c } = i(), { text: l } = t(), [u, d] =
|
|
253
|
-
return /* @__PURE__ */
|
|
251
|
+
function ve({ webhook: n, edits: r }) {
|
|
252
|
+
let { toast: a, toastApiError: s, adminMutations: c } = i(), { text: l } = t(), [u, d] = B.useState(!1), f = U(), p = V(c.deleteWebhook(f)), m = n.name ?? n.destination_host;
|
|
253
|
+
return /* @__PURE__ */ K(A, {
|
|
254
254
|
className: n.enabled ? void 0 : "opacity-60",
|
|
255
255
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ G(k, {
|
|
257
257
|
className: "py-3 font-medium",
|
|
258
258
|
children: m
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ G(k, {
|
|
261
261
|
className: "py-3",
|
|
262
|
-
children: /* @__PURE__ */
|
|
262
|
+
children: /* @__PURE__ */ K("span", {
|
|
263
263
|
className: "flex flex-wrap gap-1",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ G(y, {
|
|
265
265
|
variant: "secondary",
|
|
266
266
|
children: n.format
|
|
267
|
-
}), !n.enabled && /* @__PURE__ */
|
|
267
|
+
}), !n.enabled && /* @__PURE__ */ G(y, {
|
|
268
268
|
variant: "outline",
|
|
269
|
-
children: /* @__PURE__ */
|
|
269
|
+
children: /* @__PURE__ */ G(e, { id: "disabled" })
|
|
270
270
|
})]
|
|
271
271
|
})
|
|
272
272
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ G(k, {
|
|
274
274
|
className: "max-w-[22rem] truncate py-3 text-xs text-muted-foreground",
|
|
275
275
|
title: n.destination_host,
|
|
276
276
|
children: n.destination_host
|
|
277
277
|
}),
|
|
278
|
-
r && /* @__PURE__ */
|
|
278
|
+
r && /* @__PURE__ */ G(k, {
|
|
279
279
|
className: "py-3 text-right",
|
|
280
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ K("div", {
|
|
281
281
|
className: "flex justify-end gap-1",
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ G(ye, { webhook: n }),
|
|
284
|
+
/* @__PURE__ */ G(o, {
|
|
285
285
|
variant: "ghost",
|
|
286
286
|
size: "icon",
|
|
287
287
|
"aria-label": l("Delete webhook"),
|
|
288
288
|
onClick: () => d(!0),
|
|
289
|
-
children: /* @__PURE__ */
|
|
290
|
-
icon:
|
|
289
|
+
children: /* @__PURE__ */ G(q, {
|
|
290
|
+
icon: de,
|
|
291
291
|
className: "size-4 text-muted-foreground"
|
|
292
292
|
})
|
|
293
293
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ G(ae, {
|
|
295
295
|
open: u,
|
|
296
296
|
onOpenChange: d,
|
|
297
297
|
title: `Delete "${m}"?`,
|
|
@@ -312,13 +312,13 @@ function me({ webhook: n, edits: r }) {
|
|
|
312
312
|
]
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
let { toast: r, toastApiError: a, adminMutations: c } = i(), { id: l, text: u } = t(), [d, f] =
|
|
315
|
+
function ye({ webhook: n }) {
|
|
316
|
+
let { toast: r, toastApiError: a, adminMutations: c } = i(), { id: l, text: u } = t(), [d, f] = B.useState(!1), p = U(), m = V(c.createWebhook(p)), h = V(c.updateWebhook(p)), g = () => ({
|
|
317
317
|
name: n?.name ?? "",
|
|
318
318
|
url: "",
|
|
319
319
|
format: n?.format ?? "generic",
|
|
320
320
|
enabled: n?.enabled ?? !0
|
|
321
|
-
}), _ =
|
|
321
|
+
}), _ = J({
|
|
322
322
|
defaultValues: g(),
|
|
323
323
|
onSubmit: async ({ value: e }) => {
|
|
324
324
|
let t = e.url.trim();
|
|
@@ -343,41 +343,41 @@ function he({ webhook: n }) {
|
|
|
343
343
|
}), v = (e) => {
|
|
344
344
|
e ? _.reset(g()) : _.reset(), f(e);
|
|
345
345
|
};
|
|
346
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ K(re, {
|
|
347
347
|
open: d,
|
|
348
348
|
onOpenChange: v,
|
|
349
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ G(ne, { render: /* @__PURE__ */ K(o, {
|
|
350
350
|
size: "sm",
|
|
351
351
|
variant: "outline",
|
|
352
352
|
children: [
|
|
353
|
-
!n && /* @__PURE__ */
|
|
354
|
-
icon:
|
|
353
|
+
!n && /* @__PURE__ */ G(q, {
|
|
354
|
+
icon: le,
|
|
355
355
|
className: "size-4"
|
|
356
356
|
}),
|
|
357
357
|
" ",
|
|
358
358
|
n ? "Edit" : "Add webhook"
|
|
359
359
|
]
|
|
360
|
-
}) }), /* @__PURE__ */
|
|
361
|
-
className:
|
|
362
|
-
children: [/* @__PURE__ */
|
|
360
|
+
}) }), /* @__PURE__ */ K(P, {
|
|
361
|
+
className: L,
|
|
362
|
+
children: [/* @__PURE__ */ K(M, { children: [/* @__PURE__ */ G(F, { children: n ? `Edit ${n.name ?? n.destination_host}` : "Add webhook" }), /* @__PURE__ */ G(te, { children: n ? "The current URL is never shown. Paste a new one to replace it, or leave it blank to keep it." : "Paste a webhook address from Discord, Slack, or your own alert receiver." })] }), /* @__PURE__ */ K("form", {
|
|
363
363
|
onSubmit: (e) => {
|
|
364
364
|
e.preventDefault(), e.stopPropagation(), _.handleSubmit();
|
|
365
365
|
},
|
|
366
366
|
className: "grid gap-4",
|
|
367
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ K("div", {
|
|
368
368
|
className: "grid gap-3",
|
|
369
369
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ G(_.Field, {
|
|
371
371
|
name: "name",
|
|
372
372
|
validators: { onChange: ({ value: e }) => n || e.trim() ? void 0 : "Enter a webhook name" },
|
|
373
|
-
children: (t) => /* @__PURE__ */
|
|
373
|
+
children: (t) => /* @__PURE__ */ K("div", {
|
|
374
374
|
className: "grid gap-1.5",
|
|
375
375
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ G(I, {
|
|
377
377
|
htmlFor: l("wh-name"),
|
|
378
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ G(e, { id: "Name" })
|
|
379
379
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ G(s, {
|
|
381
381
|
id: l("wh-name"),
|
|
382
382
|
placeholder: u("e.g. #billing-alerts"),
|
|
383
383
|
value: t.state.value,
|
|
@@ -385,32 +385,32 @@ function he({ webhook: n }) {
|
|
|
385
385
|
onChange: (e) => t.handleChange(e.target.value),
|
|
386
386
|
"aria-invalid": t.state.meta.errors.length > 0
|
|
387
387
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ G(b, { errors: t.state.meta.errors })
|
|
389
389
|
]
|
|
390
390
|
})
|
|
391
391
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ G(_.Field, {
|
|
393
393
|
name: "format",
|
|
394
|
-
children: (t) => /* @__PURE__ */
|
|
394
|
+
children: (t) => /* @__PURE__ */ K("div", {
|
|
395
395
|
className: "grid gap-1.5",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ G(I, {
|
|
397
397
|
htmlFor: l("wh-format"),
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
}), /* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ G(e, { id: "Format" })
|
|
399
|
+
}), /* @__PURE__ */ K(T, {
|
|
400
400
|
value: t.state.value,
|
|
401
401
|
onValueChange: (e) => t.handleChange(e),
|
|
402
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ G(S, {
|
|
403
403
|
id: l("wh-format"),
|
|
404
404
|
className: "w-full",
|
|
405
|
-
children: /* @__PURE__ */
|
|
406
|
-
}), /* @__PURE__ */
|
|
405
|
+
children: /* @__PURE__ */ G(x, {})
|
|
406
|
+
}), /* @__PURE__ */ G(C, { children: ge.map((e) => /* @__PURE__ */ G(w, {
|
|
407
407
|
value: e.value,
|
|
408
408
|
children: e.label
|
|
409
409
|
}, e.value)) })]
|
|
410
410
|
})]
|
|
411
411
|
})
|
|
412
412
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ G(_.Field, {
|
|
414
414
|
name: "url",
|
|
415
415
|
validators: { onChange: ({ value: e }) => {
|
|
416
416
|
if (!e.trim()) return n ? void 0 : "Enter a webhook URL";
|
|
@@ -421,14 +421,14 @@ function he({ webhook: n }) {
|
|
|
421
421
|
return "Enter a valid webhook URL";
|
|
422
422
|
}
|
|
423
423
|
} },
|
|
424
|
-
children: (t) => /* @__PURE__ */
|
|
424
|
+
children: (t) => /* @__PURE__ */ K("div", {
|
|
425
425
|
className: "grid gap-1.5",
|
|
426
426
|
children: [
|
|
427
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ G(I, {
|
|
428
428
|
htmlFor: l("wh-url"),
|
|
429
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ G(e, { id: "Webhook URL" })
|
|
430
430
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ G(s, {
|
|
432
432
|
id: l("wh-url"),
|
|
433
433
|
type: "url",
|
|
434
434
|
autoComplete: "off",
|
|
@@ -439,26 +439,26 @@ function he({ webhook: n }) {
|
|
|
439
439
|
onChange: (e) => t.handleChange(e.target.value),
|
|
440
440
|
"aria-invalid": t.state.meta.errors.length > 0
|
|
441
441
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ G(b, { errors: t.state.meta.errors })
|
|
443
443
|
]
|
|
444
444
|
})
|
|
445
445
|
}),
|
|
446
|
-
n && /* @__PURE__ */
|
|
446
|
+
n && /* @__PURE__ */ G(_.Field, {
|
|
447
447
|
name: "enabled",
|
|
448
|
-
children: (t) => /* @__PURE__ */
|
|
448
|
+
children: (t) => /* @__PURE__ */ K("div", {
|
|
449
449
|
className: "flex items-center gap-2",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
450
|
+
children: [/* @__PURE__ */ G(ie, {
|
|
451
451
|
id: l("wh-enabled"),
|
|
452
452
|
checked: t.state.value,
|
|
453
453
|
onCheckedChange: t.handleChange
|
|
454
|
-
}), /* @__PURE__ */
|
|
454
|
+
}), /* @__PURE__ */ G(I, {
|
|
455
455
|
htmlFor: l("wh-enabled"),
|
|
456
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ G(e, { id: "Enabled" })
|
|
457
457
|
})]
|
|
458
458
|
})
|
|
459
459
|
})
|
|
460
460
|
]
|
|
461
|
-
}), /* @__PURE__ */
|
|
461
|
+
}), /* @__PURE__ */ G(N, { children: /* @__PURE__ */ G(_.Subscribe, {
|
|
462
462
|
selector: (e) => [
|
|
463
463
|
e.values.name,
|
|
464
464
|
e.values.url,
|
|
@@ -466,7 +466,7 @@ function he({ webhook: n }) {
|
|
|
466
466
|
e.canSubmit,
|
|
467
467
|
e.isSubmitting
|
|
468
468
|
],
|
|
469
|
-
children: ([e, t, r, i, a]) => /* @__PURE__ */
|
|
469
|
+
children: ([e, t, r, i, a]) => /* @__PURE__ */ G(o, {
|
|
470
470
|
type: "submit",
|
|
471
471
|
disabled: (n ? !r : !e.trim() || !t.trim()) || !i || a,
|
|
472
472
|
children: a ? "Saving…" : n ? "Save" : "Add webhook"
|
|
@@ -478,11 +478,11 @@ function he({ webhook: n }) {
|
|
|
478
478
|
}
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region src/admin/pages/settings/custody.tsx
|
|
481
|
-
function
|
|
482
|
-
let e = i(), t =
|
|
481
|
+
function be() {
|
|
482
|
+
let e = i(), t = U(), n = l(), r = H(e.adminQueries.merchantConfiguration()), a = H(e.adminQueries.psps()), s = [...e.queryKeys.settings(), "custodians"], c = H({
|
|
483
483
|
queryKey: s,
|
|
484
484
|
queryFn: ({ signal: t }) => e.listCustodians(t)
|
|
485
|
-
}), [u, d] =
|
|
485
|
+
}), [u, d] = B.useState(null), [f] = B.useState(() => e.selectedMerchant()), p = () => t.invalidateQueries({ queryKey: e.queryKeys.settings() }), m = V({
|
|
486
486
|
mutationFn: async ({ psp: t, custody: n }) => {
|
|
487
487
|
if (f !== e.selectedMerchant()) throw Error("Merchant changed; reopen settings");
|
|
488
488
|
let r = a.data?.data.find((e) => e.id === t);
|
|
@@ -494,7 +494,7 @@ function ge() {
|
|
|
494
494
|
},
|
|
495
495
|
onSuccess: p,
|
|
496
496
|
onError: (t) => e.toastApiError(t, "Change card custody")
|
|
497
|
-
}), h =
|
|
497
|
+
}), h = V({
|
|
498
498
|
mutationFn: async (t) => {
|
|
499
499
|
if (!r.data || f !== e.selectedMerchant()) throw Error("Merchant changed; reopen settings");
|
|
500
500
|
return e.updateMerchantConfiguration({
|
|
@@ -508,27 +508,27 @@ function ge() {
|
|
|
508
508
|
});
|
|
509
509
|
if (!r.data || !a.data || !c.data) return null;
|
|
510
510
|
let g = a.data.data.filter((e) => !e.archived && (e.rail === "nmi" || e.rail === "stripe"));
|
|
511
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ K("section", {
|
|
512
512
|
className: "grid gap-5",
|
|
513
513
|
"aria-label": "Card vaults",
|
|
514
514
|
children: [
|
|
515
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G("h2", {
|
|
516
516
|
className: "text-base font-semibold",
|
|
517
517
|
children: "Card vaults"
|
|
518
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ G("p", {
|
|
519
519
|
className: "text-sm text-muted-foreground",
|
|
520
520
|
children: "Choose where new cards are stored and which accounts charge them. Existing cards and subscriptions keep their accepted custody."
|
|
521
521
|
})] }),
|
|
522
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ G("ul", {
|
|
523
523
|
className: "grid gap-2",
|
|
524
|
-
children: c.data.data.map((e) => /* @__PURE__ */
|
|
524
|
+
children: c.data.data.map((e) => /* @__PURE__ */ K("li", {
|
|
525
525
|
className: "flex flex-wrap items-center justify-between gap-3 rounded border p-3",
|
|
526
|
-
children: [/* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ K("div", { children: [
|
|
527
|
+
/* @__PURE__ */ G("strong", { children: e.key }),
|
|
528
528
|
" · Basis Theory · ",
|
|
529
529
|
e.environment,
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ G("br", {}),
|
|
531
|
+
/* @__PURE__ */ K("span", {
|
|
532
532
|
className: "text-sm text-muted-foreground",
|
|
533
533
|
children: [
|
|
534
534
|
e.account_id,
|
|
@@ -537,7 +537,7 @@ function ge() {
|
|
|
537
537
|
e.credentials?.api_key?.configured ? "Credential configured" : "Credential missing"
|
|
538
538
|
]
|
|
539
539
|
})
|
|
540
|
-
] }), n && !e.archived && /* @__PURE__ */
|
|
540
|
+
] }), n && !e.archived && /* @__PURE__ */ G(o, {
|
|
541
541
|
size: "sm",
|
|
542
542
|
variant: "outline",
|
|
543
543
|
onClick: () => d(e),
|
|
@@ -545,23 +545,23 @@ function ge() {
|
|
|
545
545
|
})]
|
|
546
546
|
}, e.key))
|
|
547
547
|
}),
|
|
548
|
-
n && /* @__PURE__ */
|
|
548
|
+
n && /* @__PURE__ */ G(o, {
|
|
549
549
|
className: "justify-self-start",
|
|
550
550
|
variant: "outline",
|
|
551
551
|
onClick: () => d("new"),
|
|
552
552
|
children: "Add Basis Theory vault"
|
|
553
553
|
}),
|
|
554
|
-
u && /* @__PURE__ */
|
|
554
|
+
u && /* @__PURE__ */ G(xe, {
|
|
555
555
|
current: u === "new" ? void 0 : u,
|
|
556
556
|
close: () => d(null),
|
|
557
557
|
saved: p
|
|
558
558
|
}, u === "new" ? "new" : `${u.key}:${u.revision}`),
|
|
559
|
-
g.filter((e) => e.rail === "nmi").map((e) => /* @__PURE__ */
|
|
559
|
+
g.filter((e) => e.rail === "nmi").map((e) => /* @__PURE__ */ K(I, {
|
|
560
560
|
className: "grid gap-2",
|
|
561
561
|
children: [
|
|
562
562
|
e.key,
|
|
563
563
|
": card storage",
|
|
564
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ K("select", {
|
|
565
565
|
className: "rounded border bg-background p-2",
|
|
566
566
|
"aria-label": `${e.key} card storage`,
|
|
567
567
|
disabled: !n || m.isPending,
|
|
@@ -570,39 +570,39 @@ function ge() {
|
|
|
570
570
|
psp: e.id,
|
|
571
571
|
custody: t.target.value
|
|
572
572
|
}),
|
|
573
|
-
children: [/* @__PURE__ */
|
|
573
|
+
children: [/* @__PURE__ */ G("option", {
|
|
574
574
|
value: "",
|
|
575
575
|
children: "NMI customer vault"
|
|
576
|
-
}), c.data.data.filter((t) => !t.archived && t.environment === e.environment).map((e) => /* @__PURE__ */
|
|
576
|
+
}), c.data.data.filter((t) => !t.archived && t.environment === e.environment).map((e) => /* @__PURE__ */ K("option", {
|
|
577
577
|
value: e.key,
|
|
578
578
|
children: [e.key, " · Basis Theory"]
|
|
579
579
|
}, e.key))]
|
|
580
580
|
})
|
|
581
581
|
]
|
|
582
582
|
}, e.id)),
|
|
583
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ K("form", {
|
|
584
584
|
className: "grid gap-3",
|
|
585
585
|
onSubmit: (e) => {
|
|
586
586
|
e.preventDefault(), h.mutate(new FormData(e.currentTarget));
|
|
587
587
|
},
|
|
588
588
|
children: [
|
|
589
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ K(I, {
|
|
590
590
|
className: "grid gap-2",
|
|
591
|
-
children: ["Vault for new cards", /* @__PURE__ */
|
|
591
|
+
children: ["Vault for new cards", /* @__PURE__ */ K("select", {
|
|
592
592
|
name: "card_vault",
|
|
593
593
|
className: "rounded border bg-background p-2",
|
|
594
594
|
defaultValue: r.data.card_vault ?? "",
|
|
595
595
|
disabled: !n,
|
|
596
596
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ G("option", {
|
|
598
598
|
value: "",
|
|
599
599
|
children: "No card vault selected"
|
|
600
600
|
}),
|
|
601
|
-
r.data.platform_vault.available && /* @__PURE__ */
|
|
601
|
+
r.data.platform_vault.available && /* @__PURE__ */ G("option", {
|
|
602
602
|
value: "platform",
|
|
603
603
|
children: "Hosted vault · isolated to this merchant"
|
|
604
604
|
}),
|
|
605
|
-
g.map((e) => /* @__PURE__ */
|
|
605
|
+
g.map((e) => /* @__PURE__ */ K("option", {
|
|
606
606
|
value: e.key,
|
|
607
607
|
children: [
|
|
608
608
|
e.key,
|
|
@@ -614,21 +614,21 @@ function ge() {
|
|
|
614
614
|
]
|
|
615
615
|
})]
|
|
616
616
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ K("fieldset", {
|
|
618
618
|
className: "grid gap-2",
|
|
619
619
|
disabled: !n,
|
|
620
620
|
children: [
|
|
621
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ G("legend", {
|
|
622
622
|
className: "mb-2 font-medium",
|
|
623
623
|
children: "Charge PSPs"
|
|
624
624
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ G("p", {
|
|
626
626
|
className: "text-sm text-muted-foreground",
|
|
627
627
|
children: "Select the accounts allowed for new charges. With none selected, routing considers all eligible accounts."
|
|
628
628
|
}),
|
|
629
|
-
g.map((e) => /* @__PURE__ */
|
|
629
|
+
g.map((e) => /* @__PURE__ */ K(I, {
|
|
630
630
|
className: "flex gap-2",
|
|
631
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ G("input", {
|
|
632
632
|
type: "checkbox",
|
|
633
633
|
name: "charge_psps",
|
|
634
634
|
value: e.key,
|
|
@@ -637,7 +637,7 @@ function ge() {
|
|
|
637
637
|
}, e.id))
|
|
638
638
|
]
|
|
639
639
|
}),
|
|
640
|
-
n && /* @__PURE__ */
|
|
640
|
+
n && /* @__PURE__ */ G(o, {
|
|
641
641
|
className: "justify-self-start",
|
|
642
642
|
disabled: h.isPending,
|
|
643
643
|
type: "submit",
|
|
@@ -648,8 +648,8 @@ function ge() {
|
|
|
648
648
|
]
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
let r = i(), [a] =
|
|
651
|
+
function xe({ current: e, close: t, saved: n }) {
|
|
652
|
+
let r = i(), [a] = B.useState(() => r.selectedMerchant()), c = V({
|
|
653
653
|
mutationFn: async (t) => {
|
|
654
654
|
if (a !== r.selectedMerchant()) throw Error("Merchant changed; reopen this form");
|
|
655
655
|
let n = String(t.get("private_key") ?? "").trim();
|
|
@@ -670,75 +670,75 @@ function _e({ current: e, close: t, saved: n }) {
|
|
|
670
670
|
},
|
|
671
671
|
onError: (e) => r.toastApiError(e, "Configure vault")
|
|
672
672
|
});
|
|
673
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ K("form", {
|
|
674
674
|
className: "grid gap-3 rounded border p-4",
|
|
675
675
|
onSubmit: (e) => {
|
|
676
676
|
e.preventDefault(), c.mutate(new FormData(e.currentTarget));
|
|
677
677
|
},
|
|
678
678
|
children: [
|
|
679
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ G("h3", {
|
|
680
680
|
className: "font-medium",
|
|
681
681
|
children: e ? `Edit ${e.key}` : "Add Basis Theory vault"
|
|
682
682
|
}),
|
|
683
|
-
!e && /* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
683
|
+
!e && /* @__PURE__ */ K(W, { children: [
|
|
684
|
+
/* @__PURE__ */ K(I, {
|
|
685
685
|
className: "grid gap-1",
|
|
686
|
-
children: ["Vault key", /* @__PURE__ */
|
|
686
|
+
children: ["Vault key", /* @__PURE__ */ G(s, {
|
|
687
687
|
name: "key",
|
|
688
688
|
required: !0,
|
|
689
689
|
pattern: "[a-z0-9_-]{1,63}"
|
|
690
690
|
})]
|
|
691
691
|
}),
|
|
692
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ K(I, {
|
|
693
693
|
className: "grid gap-1",
|
|
694
|
-
children: ["Environment", /* @__PURE__ */
|
|
694
|
+
children: ["Environment", /* @__PURE__ */ K("select", {
|
|
695
695
|
name: "environment",
|
|
696
696
|
className: "rounded border bg-background p-2",
|
|
697
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ G("option", {
|
|
698
698
|
value: "test",
|
|
699
699
|
children: "Test"
|
|
700
|
-
}), /* @__PURE__ */
|
|
700
|
+
}), /* @__PURE__ */ G("option", {
|
|
701
701
|
value: "live",
|
|
702
702
|
children: "Live"
|
|
703
703
|
})]
|
|
704
704
|
})]
|
|
705
705
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ K(I, {
|
|
707
707
|
className: "grid gap-1",
|
|
708
|
-
children: ["Basis Theory tenant ID", /* @__PURE__ */
|
|
708
|
+
children: ["Basis Theory tenant ID", /* @__PURE__ */ G(s, {
|
|
709
709
|
name: "account_id",
|
|
710
710
|
required: !0
|
|
711
711
|
})]
|
|
712
712
|
})
|
|
713
713
|
] }),
|
|
714
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ K(I, {
|
|
715
715
|
className: "grid gap-1",
|
|
716
|
-
children: ["Public collection key", /* @__PURE__ */
|
|
716
|
+
children: ["Public collection key", /* @__PURE__ */ G(s, {
|
|
717
717
|
name: "public_key",
|
|
718
718
|
required: !0,
|
|
719
719
|
defaultValue: String(e?.settings?.public_api_key ?? "")
|
|
720
720
|
})]
|
|
721
721
|
}),
|
|
722
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ K(I, {
|
|
723
723
|
className: "grid gap-1",
|
|
724
|
-
children: ["Private API key", /* @__PURE__ */
|
|
724
|
+
children: ["Private API key", /* @__PURE__ */ G(s, {
|
|
725
725
|
type: "password",
|
|
726
726
|
name: "private_key",
|
|
727
727
|
autoComplete: "new-password",
|
|
728
728
|
required: !e
|
|
729
729
|
})]
|
|
730
730
|
}),
|
|
731
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ G("p", {
|
|
732
732
|
className: "text-sm text-muted-foreground",
|
|
733
733
|
children: "Use a key that can read its application, manage the merchant’s card tokens and invoke the proxy. Existing credentials stay unchanged when left blank."
|
|
734
734
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ K("div", {
|
|
736
736
|
className: "flex gap-2",
|
|
737
|
-
children: [/* @__PURE__ */
|
|
737
|
+
children: [/* @__PURE__ */ G(o, {
|
|
738
738
|
type: "submit",
|
|
739
739
|
disabled: c.isPending,
|
|
740
740
|
children: "Validate and save vault"
|
|
741
|
-
}), /* @__PURE__ */
|
|
741
|
+
}), /* @__PURE__ */ G(o, {
|
|
742
742
|
type: "button",
|
|
743
743
|
variant: "outline",
|
|
744
744
|
onClick: t,
|
|
@@ -751,9 +751,9 @@ function _e({ current: e, close: t, saved: n }) {
|
|
|
751
751
|
//#endregion
|
|
752
752
|
//#region src/admin/pages/settings/index.tsx
|
|
753
753
|
var Q = "h-8 flex-none px-0 after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary pointer-coarse:h-10";
|
|
754
|
-
function
|
|
754
|
+
function Se() {
|
|
755
755
|
let [t, i] = r(), a = f(), o = u(), s = n().props.settingsTabs ?? [], c = s.map((e) => e.value), l = d(null, a, o, c), p = d(t.get("tab"), a, o, c);
|
|
756
|
-
return /* @__PURE__ */
|
|
756
|
+
return /* @__PURE__ */ K(ce, {
|
|
757
757
|
value: p,
|
|
758
758
|
onValueChange: (e) => {
|
|
759
759
|
let n = new URLSearchParams(t);
|
|
@@ -761,33 +761,33 @@ function ve() {
|
|
|
761
761
|
},
|
|
762
762
|
className: "flex flex-col gap-4",
|
|
763
763
|
children: [
|
|
764
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ G("div", {
|
|
765
765
|
className: "overflow-x-auto",
|
|
766
|
-
children: /* @__PURE__ */
|
|
766
|
+
children: /* @__PURE__ */ K(se, {
|
|
767
767
|
variant: "line",
|
|
768
768
|
className: "w-max min-w-full justify-start gap-6 rounded-none p-0",
|
|
769
769
|
children: [
|
|
770
|
-
a && /* @__PURE__ */
|
|
770
|
+
a && /* @__PURE__ */ G(R, {
|
|
771
771
|
value: "merchant",
|
|
772
772
|
className: Q,
|
|
773
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ G(e, { id: "Merchant" })
|
|
774
774
|
}),
|
|
775
|
-
a && /* @__PURE__ */
|
|
775
|
+
a && /* @__PURE__ */ G(R, {
|
|
776
776
|
value: "notifications",
|
|
777
777
|
className: Q,
|
|
778
|
-
children: /* @__PURE__ */
|
|
778
|
+
children: /* @__PURE__ */ G(e, { id: "Notifications" })
|
|
779
779
|
}),
|
|
780
|
-
a && /* @__PURE__ */
|
|
780
|
+
a && /* @__PURE__ */ G(R, {
|
|
781
781
|
value: "psps",
|
|
782
782
|
className: Q,
|
|
783
|
-
children: /* @__PURE__ */
|
|
783
|
+
children: /* @__PURE__ */ G(e, { id: "PSPs" })
|
|
784
784
|
}),
|
|
785
|
-
o && /* @__PURE__ */
|
|
785
|
+
o && /* @__PURE__ */ G(R, {
|
|
786
786
|
value: "customer-controls",
|
|
787
787
|
className: Q,
|
|
788
|
-
children: /* @__PURE__ */
|
|
788
|
+
children: /* @__PURE__ */ G(e, { id: "Customer controls" })
|
|
789
789
|
}),
|
|
790
|
-
s.map((e) => /* @__PURE__ */
|
|
790
|
+
s.map((e) => /* @__PURE__ */ G(R, {
|
|
791
791
|
value: e.value,
|
|
792
792
|
className: Q,
|
|
793
793
|
children: e.title
|
|
@@ -795,50 +795,50 @@ function ve() {
|
|
|
795
795
|
]
|
|
796
796
|
})
|
|
797
797
|
}),
|
|
798
|
-
a && /* @__PURE__ */
|
|
798
|
+
a && /* @__PURE__ */ G(z, {
|
|
799
799
|
value: "merchant",
|
|
800
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ G(Ce, {})
|
|
801
801
|
}),
|
|
802
|
-
a && /* @__PURE__ */
|
|
802
|
+
a && /* @__PURE__ */ G(z, {
|
|
803
803
|
value: "notifications",
|
|
804
|
-
children: /* @__PURE__ */
|
|
804
|
+
children: /* @__PURE__ */ G(me, {})
|
|
805
805
|
}),
|
|
806
|
-
a && /* @__PURE__ */
|
|
806
|
+
a && /* @__PURE__ */ G(z, {
|
|
807
807
|
value: "psps",
|
|
808
|
-
children: /* @__PURE__ */
|
|
808
|
+
children: /* @__PURE__ */ G(Ee, {})
|
|
809
809
|
}),
|
|
810
|
-
o && /* @__PURE__ */
|
|
810
|
+
o && /* @__PURE__ */ G(z, {
|
|
811
811
|
value: "customer-controls",
|
|
812
|
-
children: /* @__PURE__ */
|
|
812
|
+
children: /* @__PURE__ */ G(Re, {})
|
|
813
813
|
}),
|
|
814
|
-
s.map((e) => /* @__PURE__ */
|
|
814
|
+
s.map((e) => /* @__PURE__ */ G(z, {
|
|
815
815
|
value: e.value,
|
|
816
816
|
children: e.element
|
|
817
817
|
}, e.value))
|
|
818
818
|
]
|
|
819
819
|
});
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
let { adminQueries: t } = i(), { data: n } =
|
|
823
|
-
return n ? /* @__PURE__ */
|
|
821
|
+
function Ce() {
|
|
822
|
+
let { adminQueries: t } = i(), { data: n } = H(t.merchantConfiguration("Load settings")), r = l();
|
|
823
|
+
return n ? /* @__PURE__ */ K("div", {
|
|
824
824
|
className: "grid gap-10",
|
|
825
825
|
children: [
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ G(fe, {}),
|
|
827
|
+
/* @__PURE__ */ G(we, {
|
|
828
828
|
configuration: n,
|
|
829
829
|
edits: r
|
|
830
830
|
}),
|
|
831
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ G(Te, {
|
|
832
832
|
configuration: n,
|
|
833
833
|
edits: r
|
|
834
834
|
})
|
|
835
835
|
]
|
|
836
|
-
}) : /* @__PURE__ */
|
|
836
|
+
}) : /* @__PURE__ */ G("p", {
|
|
837
837
|
className: "text-sm text-muted-foreground",
|
|
838
|
-
children: /* @__PURE__ */
|
|
838
|
+
children: /* @__PURE__ */ G(e, { id: "Loading…" })
|
|
839
839
|
});
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function we({ configuration: n, edits: r }) {
|
|
842
842
|
let { id: i, text: a } = t(), o = n.profile, c = () => ({
|
|
843
843
|
displayName: n.display_name,
|
|
844
844
|
fromEmail: o?.from_email ?? "",
|
|
@@ -846,7 +846,7 @@ function be({ configuration: n, edits: r }) {
|
|
|
846
846
|
subscribeURL: o?.subscribe_url ?? "",
|
|
847
847
|
billingURL: o?.billing_url ?? "",
|
|
848
848
|
logoURL: o?.logo_url ?? ""
|
|
849
|
-
}), l =
|
|
849
|
+
}), l = Y(n), u = J({
|
|
850
850
|
defaultValues: c(),
|
|
851
851
|
onSubmit: ({ value: e }) => l.save({
|
|
852
852
|
display_name: e.displayName.trim(),
|
|
@@ -859,22 +859,22 @@ function be({ configuration: n, edits: r }) {
|
|
|
859
859
|
}
|
|
860
860
|
}, "Profile saved", "Save profile")
|
|
861
861
|
});
|
|
862
|
-
return /* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ K("section", {
|
|
863
863
|
className: "grid gap-5",
|
|
864
|
-
children: [/* @__PURE__ */
|
|
864
|
+
children: [/* @__PURE__ */ K("div", {
|
|
865
865
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
866
|
-
children: [/* @__PURE__ */
|
|
866
|
+
children: [/* @__PURE__ */ K("div", {
|
|
867
867
|
className: "grid gap-1",
|
|
868
|
-
children: [/* @__PURE__ */
|
|
868
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
869
869
|
className: "text-base font-semibold",
|
|
870
|
-
children: /* @__PURE__ */
|
|
871
|
-
}), /* @__PURE__ */
|
|
870
|
+
children: /* @__PURE__ */ G(e, { id: "Merchant profile" })
|
|
871
|
+
}), /* @__PURE__ */ G("p", {
|
|
872
872
|
className: "text-sm text-pretty text-muted-foreground",
|
|
873
|
-
children: /* @__PURE__ */
|
|
873
|
+
children: /* @__PURE__ */ G(e, { id: "Customer-facing merchant details used on invoices and emails." })
|
|
874
874
|
})]
|
|
875
|
-
}), /* @__PURE__ */
|
|
875
|
+
}), /* @__PURE__ */ G(u.Subscribe, {
|
|
876
876
|
selector: (e) => [e.canSubmit, e.isSubmitting],
|
|
877
|
-
children: ([e, t]) => /* @__PURE__ */
|
|
877
|
+
children: ([e, t]) => /* @__PURE__ */ G(pe, {
|
|
878
878
|
edits: r,
|
|
879
879
|
editing: l.editing,
|
|
880
880
|
form: "merchant-profile-form",
|
|
@@ -886,38 +886,38 @@ function be({ configuration: n, edits: r }) {
|
|
|
886
886
|
onCancel: l.close
|
|
887
887
|
})
|
|
888
888
|
})]
|
|
889
|
-
}), l.editing ? /* @__PURE__ */
|
|
889
|
+
}), l.editing ? /* @__PURE__ */ K("form", {
|
|
890
890
|
id: i("merchant-profile-form"),
|
|
891
891
|
onSubmit: (e) => {
|
|
892
892
|
e.preventDefault(), e.stopPropagation(), u.handleSubmit();
|
|
893
893
|
},
|
|
894
894
|
className: "grid gap-4",
|
|
895
895
|
children: [
|
|
896
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ G(u.Field, {
|
|
897
897
|
name: "displayName",
|
|
898
898
|
validators: { onChange: ({ value: e }) => e.trim() ? void 0 : "Enter the merchant's name" },
|
|
899
|
-
children: (e) => /* @__PURE__ */
|
|
899
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
900
900
|
label: a("Display name"),
|
|
901
901
|
id: "s-name",
|
|
902
|
-
children: /* @__PURE__ */
|
|
902
|
+
children: /* @__PURE__ */ K("div", {
|
|
903
903
|
className: "grid gap-1.5",
|
|
904
|
-
children: [/* @__PURE__ */
|
|
904
|
+
children: [/* @__PURE__ */ G(s, {
|
|
905
905
|
id: i("s-name"),
|
|
906
906
|
value: e.state.value,
|
|
907
907
|
onBlur: e.handleBlur,
|
|
908
908
|
onChange: (t) => e.handleChange(t.target.value),
|
|
909
909
|
autoComplete: "organization",
|
|
910
910
|
"aria-invalid": e.state.meta.errors.length > 0
|
|
911
|
-
}), /* @__PURE__ */
|
|
911
|
+
}), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
|
|
912
912
|
})
|
|
913
913
|
})
|
|
914
914
|
}),
|
|
915
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ G(u.Field, {
|
|
916
916
|
name: "fromEmail",
|
|
917
|
-
children: (e) => /* @__PURE__ */
|
|
917
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
918
918
|
label: a("From email"),
|
|
919
919
|
id: "s-email",
|
|
920
|
-
children: /* @__PURE__ */
|
|
920
|
+
children: /* @__PURE__ */ G(s, {
|
|
921
921
|
id: i("s-email"),
|
|
922
922
|
type: "email",
|
|
923
923
|
value: e.state.value,
|
|
@@ -927,12 +927,12 @@ function be({ configuration: n, edits: r }) {
|
|
|
927
927
|
})
|
|
928
928
|
})
|
|
929
929
|
}),
|
|
930
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ G(u.Field, {
|
|
931
931
|
name: "supportURL",
|
|
932
|
-
children: (e) => /* @__PURE__ */
|
|
932
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
933
933
|
label: a("Support URL"),
|
|
934
934
|
id: "s-support",
|
|
935
|
-
children: /* @__PURE__ */
|
|
935
|
+
children: /* @__PURE__ */ G(s, {
|
|
936
936
|
id: i("s-support"),
|
|
937
937
|
type: "url",
|
|
938
938
|
value: e.state.value,
|
|
@@ -942,12 +942,12 @@ function be({ configuration: n, edits: r }) {
|
|
|
942
942
|
})
|
|
943
943
|
})
|
|
944
944
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ G(u.Field, {
|
|
946
946
|
name: "subscribeURL",
|
|
947
|
-
children: (e) => /* @__PURE__ */
|
|
947
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
948
948
|
label: a("Subscribe URL"),
|
|
949
949
|
id: "s-subscribe",
|
|
950
|
-
children: /* @__PURE__ */
|
|
950
|
+
children: /* @__PURE__ */ G(s, {
|
|
951
951
|
id: i("s-subscribe"),
|
|
952
952
|
type: "url",
|
|
953
953
|
value: e.state.value,
|
|
@@ -957,12 +957,12 @@ function be({ configuration: n, edits: r }) {
|
|
|
957
957
|
})
|
|
958
958
|
})
|
|
959
959
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ G(u.Field, {
|
|
961
961
|
name: "billingURL",
|
|
962
|
-
children: (e) => /* @__PURE__ */
|
|
962
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
963
963
|
label: a("Billing URL"),
|
|
964
964
|
id: "s-billing",
|
|
965
|
-
children: /* @__PURE__ */
|
|
965
|
+
children: /* @__PURE__ */ G(s, {
|
|
966
966
|
id: i("s-billing"),
|
|
967
967
|
type: "url",
|
|
968
968
|
value: e.state.value,
|
|
@@ -972,12 +972,12 @@ function be({ configuration: n, edits: r }) {
|
|
|
972
972
|
})
|
|
973
973
|
})
|
|
974
974
|
}),
|
|
975
|
-
/* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ G(u.Field, {
|
|
976
976
|
name: "logoURL",
|
|
977
|
-
children: (e) => /* @__PURE__ */
|
|
977
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
978
978
|
label: a("Logo URL"),
|
|
979
979
|
id: "s-logo",
|
|
980
|
-
children: /* @__PURE__ */
|
|
980
|
+
children: /* @__PURE__ */ G(s, {
|
|
981
981
|
id: i("s-logo"),
|
|
982
982
|
type: "url",
|
|
983
983
|
value: e.state.value,
|
|
@@ -988,30 +988,30 @@ function be({ configuration: n, edits: r }) {
|
|
|
988
988
|
})
|
|
989
989
|
})
|
|
990
990
|
]
|
|
991
|
-
}) : /* @__PURE__ */
|
|
991
|
+
}) : /* @__PURE__ */ K("dl", {
|
|
992
992
|
className: "grid gap-4",
|
|
993
993
|
children: [
|
|
994
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ G(X, {
|
|
995
995
|
label: a("Display name"),
|
|
996
996
|
value: n.display_name
|
|
997
997
|
}),
|
|
998
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ G(X, {
|
|
999
999
|
label: a("From email"),
|
|
1000
1000
|
value: o?.from_email
|
|
1001
1001
|
}),
|
|
1002
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ G(X, {
|
|
1003
1003
|
label: a("Support URL"),
|
|
1004
1004
|
value: o?.support_url
|
|
1005
1005
|
}),
|
|
1006
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ G(X, {
|
|
1007
1007
|
label: a("Subscribe URL"),
|
|
1008
1008
|
value: o?.subscribe_url
|
|
1009
1009
|
}),
|
|
1010
|
-
/* @__PURE__ */
|
|
1010
|
+
/* @__PURE__ */ G(X, {
|
|
1011
1011
|
label: a("Billing URL"),
|
|
1012
1012
|
value: o?.billing_url
|
|
1013
1013
|
}),
|
|
1014
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ G(X, {
|
|
1015
1015
|
label: a("Logo URL"),
|
|
1016
1016
|
value: o?.logo_url
|
|
1017
1017
|
})
|
|
@@ -1019,27 +1019,27 @@ function be({ configuration: n, edits: r }) {
|
|
|
1019
1019
|
})]
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1023
|
-
let { id: i, text: a } = t(), o = n.reprice_notice_window_days ?? 30, c =
|
|
1022
|
+
function Te({ configuration: n, edits: r }) {
|
|
1023
|
+
let { id: i, text: a } = t(), o = n.reprice_notice_window_days ?? 30, c = Y(n), l = J({
|
|
1024
1024
|
defaultValues: { days: String(o) },
|
|
1025
1025
|
onSubmit: ({ value: e }) => c.save({ reprice_notice_window_days: Number(e.days) }, "Notice window saved", "Save notice window")
|
|
1026
1026
|
});
|
|
1027
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ K("section", {
|
|
1028
1028
|
className: "grid gap-5",
|
|
1029
|
-
children: [/* @__PURE__ */
|
|
1029
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1030
1030
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
1031
|
-
children: [/* @__PURE__ */
|
|
1031
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1032
1032
|
className: "grid max-w-2xl gap-1",
|
|
1033
|
-
children: [/* @__PURE__ */
|
|
1033
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
1034
1034
|
className: "text-base font-semibold",
|
|
1035
|
-
children: /* @__PURE__ */
|
|
1036
|
-
}), /* @__PURE__ */
|
|
1035
|
+
children: /* @__PURE__ */ G(e, { id: "Pricing policies" })
|
|
1036
|
+
}), /* @__PURE__ */ G("p", {
|
|
1037
1037
|
className: "text-sm text-pretty text-muted-foreground",
|
|
1038
|
-
children: /* @__PURE__ */
|
|
1038
|
+
children: /* @__PURE__ */ G(e, { id: "Set how much notice customers receive before a price increase." })
|
|
1039
1039
|
})]
|
|
1040
|
-
}), /* @__PURE__ */
|
|
1040
|
+
}), /* @__PURE__ */ G(l.Subscribe, {
|
|
1041
1041
|
selector: (e) => [e.canSubmit, e.isSubmitting],
|
|
1042
|
-
children: ([e, t]) => /* @__PURE__ */
|
|
1042
|
+
children: ([e, t]) => /* @__PURE__ */ G(pe, {
|
|
1043
1043
|
edits: r,
|
|
1044
1044
|
editing: c.editing,
|
|
1045
1045
|
form: "notice-window-form",
|
|
@@ -1051,23 +1051,23 @@ function xe({ configuration: n, edits: r }) {
|
|
|
1051
1051
|
onCancel: c.close
|
|
1052
1052
|
})
|
|
1053
1053
|
})]
|
|
1054
|
-
}), c.editing ? /* @__PURE__ */
|
|
1054
|
+
}), c.editing ? /* @__PURE__ */ G("form", {
|
|
1055
1055
|
id: i("notice-window-form"),
|
|
1056
1056
|
onSubmit: (e) => {
|
|
1057
1057
|
e.preventDefault(), e.stopPropagation(), l.handleSubmit();
|
|
1058
1058
|
},
|
|
1059
|
-
children: /* @__PURE__ */
|
|
1059
|
+
children: /* @__PURE__ */ G(l.Field, {
|
|
1060
1060
|
name: "days",
|
|
1061
1061
|
validators: { onChange: ({ value: e }) => {
|
|
1062
1062
|
let t = Number(e);
|
|
1063
1063
|
return e.trim() && Number.isInteger(t) && t >= 0 ? void 0 : "Enter a whole number of days";
|
|
1064
1064
|
} },
|
|
1065
|
-
children: (e) => /* @__PURE__ */
|
|
1065
|
+
children: (e) => /* @__PURE__ */ G(Z, {
|
|
1066
1066
|
label: a("Notice period (days)"),
|
|
1067
1067
|
id: "s-notice-window",
|
|
1068
|
-
children: /* @__PURE__ */
|
|
1068
|
+
children: /* @__PURE__ */ K("div", {
|
|
1069
1069
|
className: "grid gap-1.5",
|
|
1070
|
-
children: [/* @__PURE__ */
|
|
1070
|
+
children: [/* @__PURE__ */ G(s, {
|
|
1071
1071
|
id: i("s-notice-window"),
|
|
1072
1072
|
type: "number",
|
|
1073
1073
|
step: "1",
|
|
@@ -1076,87 +1076,87 @@ function xe({ configuration: n, edits: r }) {
|
|
|
1076
1076
|
onBlur: e.handleBlur,
|
|
1077
1077
|
onChange: (t) => e.handleChange(t.target.value),
|
|
1078
1078
|
"aria-invalid": e.state.meta.errors.length > 0
|
|
1079
|
-
}), /* @__PURE__ */
|
|
1079
|
+
}), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
|
|
1080
1080
|
})
|
|
1081
1081
|
})
|
|
1082
1082
|
})
|
|
1083
|
-
}) : /* @__PURE__ */
|
|
1083
|
+
}) : /* @__PURE__ */ G("dl", { children: /* @__PURE__ */ G(X, {
|
|
1084
1084
|
label: a("Notice period"),
|
|
1085
1085
|
value: `${o} ${o === 1 ? "day" : "days"}`
|
|
1086
1086
|
}) })]
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1090
|
-
let { selectedMerchant: t, adminQueries: n } = i(), r =
|
|
1091
|
-
if (r.isPending || a.isPending) return /* @__PURE__ */
|
|
1089
|
+
function Ee() {
|
|
1090
|
+
let { selectedMerchant: t, adminQueries: n } = i(), r = H(n.psps()), a = H(n.rails()), o = l();
|
|
1091
|
+
if (r.isPending || a.isPending) return /* @__PURE__ */ G("p", {
|
|
1092
1092
|
className: "text-sm text-muted-foreground",
|
|
1093
|
-
children: /* @__PURE__ */
|
|
1093
|
+
children: /* @__PURE__ */ G(e, { id: "Loading…" })
|
|
1094
1094
|
});
|
|
1095
1095
|
let s = a.data ?? [];
|
|
1096
|
-
return /* @__PURE__ */
|
|
1096
|
+
return /* @__PURE__ */ K("div", {
|
|
1097
1097
|
className: "grid gap-6",
|
|
1098
1098
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ G(fe, {}),
|
|
1100
|
+
/* @__PURE__ */ K("section", {
|
|
1101
1101
|
className: "grid gap-5",
|
|
1102
|
-
children: [/* @__PURE__ */
|
|
1102
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1103
1103
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
1104
|
-
children: [/* @__PURE__ */
|
|
1104
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1105
1105
|
className: "grid gap-1",
|
|
1106
|
-
children: [/* @__PURE__ */
|
|
1106
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
1107
1107
|
className: "text-base font-semibold",
|
|
1108
|
-
children: /* @__PURE__ */
|
|
1109
|
-
}), /* @__PURE__ */
|
|
1108
|
+
children: /* @__PURE__ */ G(e, { id: "PSPs" })
|
|
1109
|
+
}), /* @__PURE__ */ G("p", {
|
|
1110
1110
|
className: "text-sm text-muted-foreground",
|
|
1111
|
-
children: /* @__PURE__ */
|
|
1111
|
+
children: /* @__PURE__ */ G(e, { id: "The accounts this merchant takes payments through, one or more per rail." })
|
|
1112
1112
|
})]
|
|
1113
|
-
}), o && /* @__PURE__ */
|
|
1114
|
-
}), r.data?.data?.length ? /* @__PURE__ */
|
|
1113
|
+
}), o && /* @__PURE__ */ G(Le, { railDefinitions: s }, t() ?? "")]
|
|
1114
|
+
}), r.data?.data?.length ? /* @__PURE__ */ K(j, {
|
|
1115
1115
|
className: "min-w-[44rem]",
|
|
1116
|
-
children: [/* @__PURE__ */
|
|
1116
|
+
children: [/* @__PURE__ */ G(O, { children: /* @__PURE__ */ K(A, {
|
|
1117
1117
|
className: "hover:bg-transparent",
|
|
1118
1118
|
children: [
|
|
1119
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ G(E, {
|
|
1120
1120
|
className: "text-muted-foreground",
|
|
1121
1121
|
children: "PSP"
|
|
1122
1122
|
}),
|
|
1123
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ G(E, {
|
|
1124
1124
|
className: "text-muted-foreground",
|
|
1125
|
-
children: /* @__PURE__ */
|
|
1125
|
+
children: /* @__PURE__ */ G(e, { id: "Environment" })
|
|
1126
1126
|
}),
|
|
1127
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ G(E, {
|
|
1128
1128
|
className: "text-muted-foreground",
|
|
1129
|
-
children: /* @__PURE__ */
|
|
1129
|
+
children: /* @__PURE__ */ G(e, { id: "Credentials" })
|
|
1130
1130
|
}),
|
|
1131
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ G(E, {
|
|
1132
1132
|
className: "text-muted-foreground",
|
|
1133
|
-
children: /* @__PURE__ */
|
|
1133
|
+
children: /* @__PURE__ */ G(e, { id: "State" })
|
|
1134
1134
|
}),
|
|
1135
|
-
o && /* @__PURE__ */
|
|
1135
|
+
o && /* @__PURE__ */ G(E, {
|
|
1136
1136
|
className: "text-right text-muted-foreground",
|
|
1137
|
-
children: /* @__PURE__ */
|
|
1137
|
+
children: /* @__PURE__ */ G(e, { id: "Action" })
|
|
1138
1138
|
})
|
|
1139
1139
|
]
|
|
1140
|
-
}) }), /* @__PURE__ */
|
|
1140
|
+
}) }), /* @__PURE__ */ G(D, { children: r.data.data.map((e) => /* @__PURE__ */ G(Oe, {
|
|
1141
1141
|
psp: e,
|
|
1142
1142
|
railDefinitions: s,
|
|
1143
1143
|
edits: o
|
|
1144
1144
|
}, e.id)) })]
|
|
1145
|
-
}) : /* @__PURE__ */
|
|
1145
|
+
}) : /* @__PURE__ */ G("p", {
|
|
1146
1146
|
className: "py-2 text-sm text-muted-foreground",
|
|
1147
|
-
children: /* @__PURE__ */
|
|
1147
|
+
children: /* @__PURE__ */ G(e, { id: "No PSPs configured." })
|
|
1148
1148
|
})]
|
|
1149
1149
|
}),
|
|
1150
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ G(be, {})
|
|
1151
1151
|
]
|
|
1152
1152
|
});
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1155
|
-
return e.validated_at ? `Validated ${
|
|
1154
|
+
function De(e) {
|
|
1155
|
+
return e.validated_at ? `Validated ${h(e.validated_at)}` : e.configured ? "Configured" : "Not configured";
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
let { toast: c, toastApiError: l, toastStaleEdit: u, adminMutations: d, selectedMerchant: f } = i(), { text: p } = t(), m =
|
|
1159
|
-
if (!(!e && !await
|
|
1157
|
+
function Oe({ psp: n, railDefinitions: r, edits: s }) {
|
|
1158
|
+
let { toast: c, toastApiError: l, toastStaleEdit: u, adminMutations: d, selectedMerchant: f } = i(), { text: p } = t(), m = U(), h = V(d.updatePSP(m)), [g, _] = B.useState(!1), v = ee(), b = r.find((e) => e.rail === n.rail), x = b?.display_name ?? n.rail, S = n.credentials ?? {}, C = async (e) => {
|
|
1159
|
+
if (!(!e && !await v({
|
|
1160
1160
|
title: `Archive ${n.key}?`,
|
|
1161
1161
|
description: "New purchase stops routing to it. Existing subscriptions, refunds and webhooks keep using it.",
|
|
1162
1162
|
confirmLabel: "Archive PSP"
|
|
@@ -1171,7 +1171,7 @@ function we({ psp: n, railDefinitions: r, edits: s }) {
|
|
|
1171
1171
|
}), c.success("PSP archived");
|
|
1172
1172
|
} catch (t) {
|
|
1173
1173
|
if (t instanceof a && t.code === "psp_last_active") {
|
|
1174
|
-
e ? l(t, "Archive PSP") :
|
|
1174
|
+
e ? l(t, "Archive PSP") : _(!0);
|
|
1175
1175
|
return;
|
|
1176
1176
|
}
|
|
1177
1177
|
if (t instanceof a && t.revisionMismatch) {
|
|
@@ -1181,88 +1181,88 @@ function we({ psp: n, railDefinitions: r, edits: s }) {
|
|
|
1181
1181
|
l(t, "Archive PSP");
|
|
1182
1182
|
}
|
|
1183
1183
|
};
|
|
1184
|
-
return /* @__PURE__ */
|
|
1184
|
+
return /* @__PURE__ */ K(A, {
|
|
1185
1185
|
className: n.archived ? "opacity-60" : void 0,
|
|
1186
1186
|
children: [
|
|
1187
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ G(k, {
|
|
1188
1188
|
className: "py-3",
|
|
1189
|
-
children: /* @__PURE__ */
|
|
1189
|
+
children: /* @__PURE__ */ K("div", {
|
|
1190
1190
|
className: "grid min-w-0 leading-tight",
|
|
1191
|
-
children: [/* @__PURE__ */
|
|
1191
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1192
1192
|
className: "font-medium",
|
|
1193
1193
|
children: n.key
|
|
1194
|
-
}), /* @__PURE__ */
|
|
1194
|
+
}), /* @__PURE__ */ K("span", {
|
|
1195
1195
|
className: "truncate text-xs text-muted-foreground",
|
|
1196
1196
|
children: [
|
|
1197
|
-
|
|
1197
|
+
x,
|
|
1198
1198
|
" · ",
|
|
1199
|
-
|
|
1199
|
+
je(n)
|
|
1200
1200
|
]
|
|
1201
1201
|
})]
|
|
1202
1202
|
})
|
|
1203
1203
|
}),
|
|
1204
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ G(k, {
|
|
1205
1205
|
className: "py-3 capitalize",
|
|
1206
1206
|
children: n.environment
|
|
1207
1207
|
}),
|
|
1208
|
-
/* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ G(k, {
|
|
1209
1209
|
className: "py-3",
|
|
1210
|
-
children: Object.keys(
|
|
1210
|
+
children: Object.keys(S).length > 0 ? /* @__PURE__ */ G("span", {
|
|
1211
1211
|
className: "flex flex-wrap gap-1",
|
|
1212
|
-
children: Object.entries(
|
|
1212
|
+
children: Object.entries(S).map(([e, t]) => /* @__PURE__ */ G(y, {
|
|
1213
1213
|
variant: "secondary",
|
|
1214
1214
|
className: t.configured ? "" : "bg-held-surface text-held",
|
|
1215
|
-
title:
|
|
1215
|
+
title: De(t),
|
|
1216
1216
|
children: e
|
|
1217
1217
|
}, e))
|
|
1218
|
-
}) : /* @__PURE__ */
|
|
1218
|
+
}) : /* @__PURE__ */ G("span", {
|
|
1219
1219
|
className: "text-sm text-muted-foreground",
|
|
1220
|
-
children: /* @__PURE__ */
|
|
1220
|
+
children: /* @__PURE__ */ G(e, { id: "None required" })
|
|
1221
1221
|
})
|
|
1222
1222
|
}),
|
|
1223
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ G(k, {
|
|
1224
1224
|
className: "py-3",
|
|
1225
|
-
children: n.archived && n.open_obligations === 0 ? /* @__PURE__ */
|
|
1225
|
+
children: n.archived && n.open_obligations === 0 ? /* @__PURE__ */ G(y, {
|
|
1226
1226
|
variant: "secondary",
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1228
|
-
}) : n.archived ? /* @__PURE__ */
|
|
1227
|
+
children: /* @__PURE__ */ G(e, { id: "archived" })
|
|
1228
|
+
}) : n.archived ? /* @__PURE__ */ K(y, {
|
|
1229
1229
|
variant: "secondary",
|
|
1230
1230
|
className: "bg-held-surface text-held",
|
|
1231
1231
|
children: [
|
|
1232
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ G(e, { id: "draining (" }),
|
|
1233
1233
|
n.open_obligations,
|
|
1234
1234
|
")"
|
|
1235
1235
|
]
|
|
1236
|
-
}) : /* @__PURE__ */
|
|
1236
|
+
}) : /* @__PURE__ */ G(y, {
|
|
1237
1237
|
variant: "secondary",
|
|
1238
1238
|
className: "bg-settled-surface text-settled",
|
|
1239
|
-
children: /* @__PURE__ */
|
|
1239
|
+
children: /* @__PURE__ */ G(e, { id: "active" })
|
|
1240
1240
|
})
|
|
1241
1241
|
}),
|
|
1242
|
-
s && /* @__PURE__ */
|
|
1242
|
+
s && /* @__PURE__ */ G(k, {
|
|
1243
1243
|
className: "py-3 text-right",
|
|
1244
|
-
children: !n.archived && /* @__PURE__ */
|
|
1244
|
+
children: !n.archived && /* @__PURE__ */ K("div", {
|
|
1245
1245
|
className: "flex justify-end gap-2",
|
|
1246
1246
|
children: [
|
|
1247
|
-
/* @__PURE__ */
|
|
1247
|
+
/* @__PURE__ */ G(ke, {
|
|
1248
1248
|
psp: n,
|
|
1249
|
-
credentialKeys:
|
|
1249
|
+
credentialKeys: b?.credential_keys ?? Object.keys(S)
|
|
1250
1250
|
}, `${f() ?? ""}:${n.id}`),
|
|
1251
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ G(o, {
|
|
1252
1252
|
variant: "outline",
|
|
1253
1253
|
size: "sm",
|
|
1254
1254
|
disabled: h.isPending,
|
|
1255
|
-
onClick: () =>
|
|
1256
|
-
children: /* @__PURE__ */
|
|
1255
|
+
onClick: () => C(!1),
|
|
1256
|
+
children: /* @__PURE__ */ G(e, { id: "Archive" })
|
|
1257
1257
|
}),
|
|
1258
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ G(ae, {
|
|
1259
1259
|
open: g,
|
|
1260
|
-
onOpenChange:
|
|
1261
|
-
title: `Archive the last active ${
|
|
1260
|
+
onOpenChange: _,
|
|
1261
|
+
title: `Archive the last active ${x} PSP?`,
|
|
1262
1262
|
description: p("New purchase on this rail is refused until another PSP is armed. Existing subscriptions, refunds and webhooks keep using this one."),
|
|
1263
1263
|
confirmationWord: "ARCHIVE",
|
|
1264
1264
|
actionLabel: "Archive PSP",
|
|
1265
|
-
onConfirm: () =>
|
|
1265
|
+
onConfirm: () => C(!0)
|
|
1266
1266
|
})
|
|
1267
1267
|
]
|
|
1268
1268
|
})
|
|
@@ -1270,62 +1270,62 @@ function we({ psp: n, railDefinitions: r, edits: s }) {
|
|
|
1270
1270
|
]
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1274
|
-
let { toast: c, toastApiError: l, toastStaleEdit: u, adminMutations: d, selectedMerchant: f } = i(), { id: p } = t(), [
|
|
1273
|
+
function ke({ psp: n, credentialKeys: r }) {
|
|
1274
|
+
let { toast: c, toastApiError: l, toastStaleEdit: u, adminMutations: d, selectedMerchant: f } = i(), { id: p } = t(), [m, g] = B.useState(!1), [_] = B.useState(() => f() ?? ""), v = B.useRef(n.revision), ee = U(), y = V(d.updatePSP(ee)), b = n.credentials ?? {}, x = J({
|
|
1275
1275
|
defaultValues: { credentials: {} },
|
|
1276
1276
|
onSubmit: async ({ value: e }) => {
|
|
1277
1277
|
let t = Object.fromEntries(Object.entries(e.credentials).filter(([, e]) => e.trim()));
|
|
1278
1278
|
try {
|
|
1279
1279
|
if ((f() ?? "") !== _) throw Error("Merchant changed; reopen this form");
|
|
1280
|
-
await
|
|
1280
|
+
await y.mutateAsync({
|
|
1281
1281
|
id: n.id,
|
|
1282
1282
|
psp: {
|
|
1283
1283
|
expected_revision: v.current,
|
|
1284
1284
|
credentials: t
|
|
1285
1285
|
}
|
|
1286
|
-
}), c.success(`${n.key} credentials validated and rotated`),
|
|
1286
|
+
}), c.success(`${n.key} credentials validated and rotated`), S(!1);
|
|
1287
1287
|
} catch (e) {
|
|
1288
1288
|
if (e instanceof a && e.revisionMismatch) {
|
|
1289
|
-
u(`PSP ${n.key}`),
|
|
1289
|
+
u(`PSP ${n.key}`), S(!1);
|
|
1290
1290
|
return;
|
|
1291
1291
|
}
|
|
1292
1292
|
l(e, "Rotate credentials");
|
|
1293
1293
|
} finally {
|
|
1294
|
-
|
|
1294
|
+
y.reset();
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
}),
|
|
1298
|
-
e ||
|
|
1297
|
+
}), S = (e) => {
|
|
1298
|
+
e || x.reset(), e && (v.current = n.revision), g(e);
|
|
1299
1299
|
};
|
|
1300
|
-
return /* @__PURE__ */
|
|
1301
|
-
open:
|
|
1302
|
-
onOpenChange:
|
|
1303
|
-
children: [/* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ K(re, {
|
|
1301
|
+
open: m,
|
|
1302
|
+
onOpenChange: S,
|
|
1303
|
+
children: [/* @__PURE__ */ G(ne, { render: /* @__PURE__ */ G(o, {
|
|
1304
1304
|
variant: "outline",
|
|
1305
1305
|
size: "sm",
|
|
1306
|
-
children: /* @__PURE__ */
|
|
1307
|
-
}) }), /* @__PURE__ */
|
|
1308
|
-
className:
|
|
1309
|
-
children: [/* @__PURE__ */
|
|
1310
|
-
/* @__PURE__ */
|
|
1306
|
+
children: /* @__PURE__ */ G(e, { id: "Rotate" })
|
|
1307
|
+
}) }), /* @__PURE__ */ K(P, {
|
|
1308
|
+
className: L,
|
|
1309
|
+
children: [/* @__PURE__ */ K(M, { children: [/* @__PURE__ */ K(F, { children: [
|
|
1310
|
+
/* @__PURE__ */ G(e, { id: "Rotate " }),
|
|
1311
1311
|
n.key,
|
|
1312
|
-
/* @__PURE__ */
|
|
1313
|
-
|
|
1314
|
-
] }), /* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ G(e, { id: " credentials · " }),
|
|
1313
|
+
je(n)
|
|
1314
|
+
] }), /* @__PURE__ */ G(te, { children: /* @__PURE__ */ G(e, { id: "Current credentials are never shown. A new one is validated against the live provider before it is stored; if that check fails, nothing is written. Leave a field blank to keep the credential it holds now." }) })] }), /* @__PURE__ */ K("form", {
|
|
1315
1315
|
onSubmit: (e) => {
|
|
1316
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1316
|
+
e.preventDefault(), e.stopPropagation(), x.handleSubmit();
|
|
1317
1317
|
},
|
|
1318
1318
|
className: "grid gap-4",
|
|
1319
|
-
children: [/* @__PURE__ */
|
|
1319
|
+
children: [/* @__PURE__ */ G(x.Field, {
|
|
1320
1320
|
name: "credentials",
|
|
1321
|
-
children: (t) => /* @__PURE__ */
|
|
1321
|
+
children: (t) => /* @__PURE__ */ K("div", {
|
|
1322
1322
|
className: "grid gap-3",
|
|
1323
1323
|
children: [r.map((r) => {
|
|
1324
|
-
let i =
|
|
1325
|
-
return /* @__PURE__ */
|
|
1324
|
+
let i = b[r];
|
|
1325
|
+
return /* @__PURE__ */ K($, {
|
|
1326
1326
|
label: r,
|
|
1327
1327
|
id: `rot-${n.id}-${r}`,
|
|
1328
|
-
children: [/* @__PURE__ */
|
|
1328
|
+
children: [/* @__PURE__ */ G(s, {
|
|
1329
1329
|
id: p(`rot-${n.id}-${r}`),
|
|
1330
1330
|
type: "password",
|
|
1331
1331
|
autoComplete: "new-password",
|
|
@@ -1335,19 +1335,19 @@ function Te({ psp: n, credentialKeys: r }) {
|
|
|
1335
1335
|
...t.state.value,
|
|
1336
1336
|
[r]: e.target.value
|
|
1337
1337
|
})
|
|
1338
|
-
}), i?.validated_at && /* @__PURE__ */
|
|
1338
|
+
}), i?.validated_at && /* @__PURE__ */ K("p", {
|
|
1339
1339
|
className: "text-xs text-muted-foreground",
|
|
1340
|
-
children: [/* @__PURE__ */
|
|
1340
|
+
children: [/* @__PURE__ */ G(e, { id: "Last validated " }), h(i.validated_at)]
|
|
1341
1341
|
})]
|
|
1342
1342
|
}, r);
|
|
1343
|
-
}), /* @__PURE__ */
|
|
1343
|
+
}), /* @__PURE__ */ G("p", {
|
|
1344
1344
|
className: "text-xs text-muted-foreground",
|
|
1345
|
-
children: /* @__PURE__ */
|
|
1345
|
+
children: /* @__PURE__ */ G(e, { id: "Once this succeeds, the new credential is used for the next charge and every one after it. Previous webhook signing secrets remain accepted while their required overlap is active." })
|
|
1346
1346
|
})]
|
|
1347
1347
|
})
|
|
1348
|
-
}), /* @__PURE__ */
|
|
1348
|
+
}), /* @__PURE__ */ G(N, { children: /* @__PURE__ */ G(x.Subscribe, {
|
|
1349
1349
|
selector: (e) => [e.values.credentials, e.isSubmitting],
|
|
1350
|
-
children: ([e, t]) => /* @__PURE__ */
|
|
1350
|
+
children: ([e, t]) => /* @__PURE__ */ G(o, {
|
|
1351
1351
|
type: "submit",
|
|
1352
1352
|
disabled: t || !Object.values(e).some((e) => e.trim()),
|
|
1353
1353
|
children: t ? "Validating…" : "Validate & rotate"
|
|
@@ -1357,7 +1357,7 @@ function Te({ psp: n, credentialKeys: r }) {
|
|
|
1357
1357
|
})]
|
|
1358
1358
|
});
|
|
1359
1359
|
}
|
|
1360
|
-
var
|
|
1360
|
+
var Ae = {
|
|
1361
1361
|
gateway_id: {
|
|
1362
1362
|
label: "Gateway ID",
|
|
1363
1363
|
hint: "The Gateway ID shown in your NMI dashboard."
|
|
@@ -1379,36 +1379,36 @@ var Ee = {
|
|
|
1379
1379
|
hint: "The Solana address your payments land in."
|
|
1380
1380
|
}
|
|
1381
1381
|
};
|
|
1382
|
-
function
|
|
1382
|
+
function je(e) {
|
|
1383
1383
|
return e.client_accnum ? `${e.client_accnum}-${e.client_subacc ?? ""}` : e.gateway_id ?? e.account_id ?? e.treasury ?? "";
|
|
1384
1384
|
}
|
|
1385
|
-
var
|
|
1385
|
+
var Me = {
|
|
1386
1386
|
live: "Live: real money",
|
|
1387
1387
|
test: "Test: the provider's own system, no money moves",
|
|
1388
1388
|
sandbox: "Sandbox: the provider's separate sandbox",
|
|
1389
1389
|
mainnet: "Mainnet: real money",
|
|
1390
1390
|
devnet: "Devnet: Solana's development network",
|
|
1391
1391
|
testnet: "Testnet: Solana's test network"
|
|
1392
|
-
},
|
|
1392
|
+
}, Ne = {
|
|
1393
1393
|
nmi: "NMI",
|
|
1394
1394
|
ccbill: "CCBill",
|
|
1395
1395
|
stripe: "Stripe",
|
|
1396
1396
|
solana: "Solana"
|
|
1397
1397
|
};
|
|
1398
|
-
function
|
|
1399
|
-
let n =
|
|
1398
|
+
function Pe(e, t) {
|
|
1399
|
+
let n = Ne[e] ?? e;
|
|
1400
1400
|
return !t || t.toLowerCase() === n.toLowerCase() ? n : `${t} (${n})`;
|
|
1401
1401
|
}
|
|
1402
|
-
var
|
|
1402
|
+
var Fe = {
|
|
1403
1403
|
api: "API",
|
|
1404
1404
|
id: "ID",
|
|
1405
1405
|
url: "URL"
|
|
1406
1406
|
};
|
|
1407
|
-
function
|
|
1408
|
-
return e.split(/[_-]+/).filter(Boolean).map((e, t) =>
|
|
1407
|
+
function Ie(e) {
|
|
1408
|
+
return e.split(/[_-]+/).filter(Boolean).map((e, t) => Fe[e.toLowerCase()] || (t > 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase())).join(" ");
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
let { toast: r, toastApiError: a, adminMutations: c, selectedMerchant: l } = i(), { text: u, id: d } = t(), [f, p] =
|
|
1410
|
+
function Le({ railDefinitions: n }) {
|
|
1411
|
+
let { toast: r, toastApiError: a, adminMutations: c, selectedMerchant: l } = i(), { text: u, id: d } = t(), [f, p] = B.useState(!1), [m] = B.useState(() => l() ?? ""), h = U(), g = V(c.createPSP(h)), _ = J({
|
|
1412
1412
|
defaultValues: {
|
|
1413
1413
|
rail: "",
|
|
1414
1414
|
environment: "",
|
|
@@ -1437,107 +1437,107 @@ function Ne({ railDefinitions: n }) {
|
|
|
1437
1437
|
}), v = (e) => {
|
|
1438
1438
|
e || _.reset(), p(e);
|
|
1439
1439
|
};
|
|
1440
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ K(re, {
|
|
1441
1441
|
open: f,
|
|
1442
1442
|
onOpenChange: v,
|
|
1443
|
-
children: [/* @__PURE__ */
|
|
1443
|
+
children: [/* @__PURE__ */ G(ne, { render: /* @__PURE__ */ G(o, {
|
|
1444
1444
|
size: "sm",
|
|
1445
|
-
children: /* @__PURE__ */
|
|
1446
|
-
}) }), /* @__PURE__ */
|
|
1447
|
-
className:
|
|
1448
|
-
children: [/* @__PURE__ */
|
|
1445
|
+
children: /* @__PURE__ */ G(e, { id: "Add PSP" })
|
|
1446
|
+
}) }), /* @__PURE__ */ K(P, {
|
|
1447
|
+
className: L,
|
|
1448
|
+
children: [/* @__PURE__ */ K(M, { children: [/* @__PURE__ */ G(F, { children: /* @__PURE__ */ G(e, { id: "Add a PSP" }) }), /* @__PURE__ */ G(te, { children: /* @__PURE__ */ G(e, { id: "Connect the account that will take money for you. Credentials go straight into the secret store and are never shown again." }) })] }), /* @__PURE__ */ K("form", {
|
|
1449
1449
|
onSubmit: (e) => {
|
|
1450
1450
|
e.preventDefault(), e.stopPropagation(), _.handleSubmit();
|
|
1451
1451
|
},
|
|
1452
1452
|
className: "grid gap-4",
|
|
1453
|
-
children: [/* @__PURE__ */
|
|
1453
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1454
1454
|
className: "grid gap-3",
|
|
1455
1455
|
children: [
|
|
1456
|
-
/* @__PURE__ */
|
|
1456
|
+
/* @__PURE__ */ G(_.Field, {
|
|
1457
1457
|
name: "rail",
|
|
1458
1458
|
validators: { onChange: ({ value: e }) => e ? void 0 : "Choose a payment rail" },
|
|
1459
|
-
children: (e) => /* @__PURE__ */
|
|
1459
|
+
children: (e) => /* @__PURE__ */ K($, {
|
|
1460
1460
|
label: u("Payment rail"),
|
|
1461
1461
|
id: "pv-rail",
|
|
1462
|
-
children: [/* @__PURE__ */
|
|
1462
|
+
children: [/* @__PURE__ */ K(T, {
|
|
1463
1463
|
items: n.map((e) => ({
|
|
1464
1464
|
value: e.rail,
|
|
1465
|
-
label:
|
|
1465
|
+
label: Pe(e.rail, e.display_name)
|
|
1466
1466
|
})),
|
|
1467
1467
|
value: e.state.value || null,
|
|
1468
1468
|
onValueChange: (t) => {
|
|
1469
1469
|
e.handleChange(t ?? ""), _.setFieldValue("account", {}), _.setFieldValue("credentials", {}), _.setFieldValue("environment", n.find((e) => e.rail === t)?.environments[0] ?? "");
|
|
1470
1470
|
},
|
|
1471
|
-
children: [/* @__PURE__ */
|
|
1471
|
+
children: [/* @__PURE__ */ G(S, {
|
|
1472
1472
|
id: d("pv-rail"),
|
|
1473
1473
|
className: "w-full",
|
|
1474
1474
|
"aria-invalid": e.state.meta.errors.length > 0,
|
|
1475
|
-
children: /* @__PURE__ */
|
|
1476
|
-
}), /* @__PURE__ */
|
|
1475
|
+
children: /* @__PURE__ */ G(x, { placeholder: u("Pick a rail…") })
|
|
1476
|
+
}), /* @__PURE__ */ G(C, { children: n.map((e) => /* @__PURE__ */ G(w, {
|
|
1477
1477
|
value: e.rail,
|
|
1478
|
-
children:
|
|
1478
|
+
children: Pe(e.rail, e.display_name)
|
|
1479
1479
|
}, e.rail)) })]
|
|
1480
|
-
}), /* @__PURE__ */
|
|
1480
|
+
}), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
|
|
1481
1481
|
})
|
|
1482
1482
|
}),
|
|
1483
|
-
/* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ G(_.Subscribe, {
|
|
1484
1484
|
selector: (e) => e.values.rail,
|
|
1485
1485
|
children: (e) => {
|
|
1486
1486
|
let t = n.find((t) => t.rail === e)?.environments ?? [];
|
|
1487
|
-
return /* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ G(_.Field, {
|
|
1488
1488
|
name: "environment",
|
|
1489
1489
|
validators: { onChange: ({ value: e }) => e ? void 0 : "Choose whether it moves real money" },
|
|
1490
|
-
children: (n) => /* @__PURE__ */
|
|
1490
|
+
children: (n) => /* @__PURE__ */ K($, {
|
|
1491
1491
|
label: u("Environment"),
|
|
1492
1492
|
id: "pv-environment",
|
|
1493
1493
|
hint: "Whether this PSP moves real money. It is checked with the provider before the PSP is used.",
|
|
1494
|
-
children: [/* @__PURE__ */
|
|
1494
|
+
children: [/* @__PURE__ */ K(T, {
|
|
1495
1495
|
items: t.map((e) => ({
|
|
1496
1496
|
value: e,
|
|
1497
|
-
label: u(
|
|
1497
|
+
label: u(Me[e] ?? e)
|
|
1498
1498
|
})),
|
|
1499
1499
|
value: n.state.value || null,
|
|
1500
1500
|
onValueChange: (e) => n.handleChange(e ?? ""),
|
|
1501
|
-
children: [/* @__PURE__ */
|
|
1501
|
+
children: [/* @__PURE__ */ G(S, {
|
|
1502
1502
|
id: d("pv-environment"),
|
|
1503
1503
|
className: "w-full",
|
|
1504
1504
|
disabled: !e,
|
|
1505
1505
|
"aria-invalid": n.state.meta.errors.length > 0,
|
|
1506
|
-
children: /* @__PURE__ */
|
|
1507
|
-
}), /* @__PURE__ */
|
|
1506
|
+
children: /* @__PURE__ */ G(x, { placeholder: u("Pick an environment…") })
|
|
1507
|
+
}), /* @__PURE__ */ G(C, { children: t.map((e) => /* @__PURE__ */ G(w, {
|
|
1508
1508
|
value: e,
|
|
1509
|
-
children: u(
|
|
1509
|
+
children: u(Me[e] ?? e)
|
|
1510
1510
|
}, e)) })]
|
|
1511
|
-
}), /* @__PURE__ */
|
|
1511
|
+
}), /* @__PURE__ */ G(b, { errors: n.state.meta.errors })]
|
|
1512
1512
|
})
|
|
1513
1513
|
});
|
|
1514
1514
|
}
|
|
1515
1515
|
}),
|
|
1516
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ G(_.Field, {
|
|
1517
1517
|
name: "key",
|
|
1518
1518
|
validators: { onChange: ({ value: e }) => /^[a-z0-9][a-z0-9_-]{0,62}$/.test(e.trim().toLowerCase()) ? void 0 : "Lowercase letters, digits, - or _" },
|
|
1519
|
-
children: (e) => /* @__PURE__ */
|
|
1519
|
+
children: (e) => /* @__PURE__ */ K($, {
|
|
1520
1520
|
label: u("Key"),
|
|
1521
1521
|
id: "pv-key",
|
|
1522
1522
|
hint: "Your name for this PSP, such as mobius. Prices and purchase name it by this key.",
|
|
1523
|
-
children: [/* @__PURE__ */
|
|
1523
|
+
children: [/* @__PURE__ */ G(s, {
|
|
1524
1524
|
id: d("pv-key"),
|
|
1525
1525
|
value: e.state.value,
|
|
1526
1526
|
onBlur: e.handleBlur,
|
|
1527
1527
|
onChange: (t) => e.handleChange(t.target.value),
|
|
1528
1528
|
"aria-invalid": e.state.meta.errors.length > 0
|
|
1529
|
-
}), /* @__PURE__ */
|
|
1529
|
+
}), /* @__PURE__ */ G(b, { errors: e.state.meta.errors })]
|
|
1530
1530
|
})
|
|
1531
1531
|
}),
|
|
1532
|
-
/* @__PURE__ */
|
|
1532
|
+
/* @__PURE__ */ G(_.Subscribe, {
|
|
1533
1533
|
selector: (e) => e.values.rail,
|
|
1534
|
-
children: (e) => /* @__PURE__ */
|
|
1534
|
+
children: (e) => /* @__PURE__ */ G(_.Field, {
|
|
1535
1535
|
name: "account",
|
|
1536
|
-
children: (t) => /* @__PURE__ */ W
|
|
1537
|
-
label: u(
|
|
1536
|
+
children: (t) => /* @__PURE__ */ G(W, { children: n.find((t) => t.rail === e)?.account_fields.map((e) => /* @__PURE__ */ G($, {
|
|
1537
|
+
label: u(Ae[e]?.label ?? Ie(e)),
|
|
1538
1538
|
id: `pv-account-${e}`,
|
|
1539
|
-
hint:
|
|
1540
|
-
children: /* @__PURE__ */
|
|
1539
|
+
hint: Ae[e]?.hint,
|
|
1540
|
+
children: /* @__PURE__ */ G(s, {
|
|
1541
1541
|
id: d(`pv-account-${e}`),
|
|
1542
1542
|
value: t.state.value[e] ?? "",
|
|
1543
1543
|
onBlur: t.handleBlur,
|
|
@@ -1549,16 +1549,16 @@ function Ne({ railDefinitions: n }) {
|
|
|
1549
1549
|
}, e)) })
|
|
1550
1550
|
})
|
|
1551
1551
|
}),
|
|
1552
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ G(_.Subscribe, {
|
|
1553
1553
|
selector: (e) => e.values.rail,
|
|
1554
1554
|
children: (e) => {
|
|
1555
1555
|
let t = n.find((t) => t.rail === e);
|
|
1556
|
-
return /* @__PURE__ */
|
|
1556
|
+
return /* @__PURE__ */ G(_.Field, {
|
|
1557
1557
|
name: "credentials",
|
|
1558
|
-
children: (e) => /* @__PURE__ */ W
|
|
1559
|
-
label:
|
|
1558
|
+
children: (e) => /* @__PURE__ */ G(W, { children: t?.credential_keys.map((t) => /* @__PURE__ */ G($, {
|
|
1559
|
+
label: Ie(t),
|
|
1560
1560
|
id: `pv-credential-${t}`,
|
|
1561
|
-
children: /* @__PURE__ */
|
|
1561
|
+
children: /* @__PURE__ */ G(s, {
|
|
1562
1562
|
id: d(`pv-credential-${t}`),
|
|
1563
1563
|
type: "password",
|
|
1564
1564
|
autoComplete: "new-password",
|
|
@@ -1573,7 +1573,7 @@ function Ne({ railDefinitions: n }) {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
})
|
|
1575
1575
|
]
|
|
1576
|
-
}), /* @__PURE__ */
|
|
1576
|
+
}), /* @__PURE__ */ G(N, { children: /* @__PURE__ */ G(_.Subscribe, {
|
|
1577
1577
|
selector: (e) => [
|
|
1578
1578
|
e.values.rail,
|
|
1579
1579
|
e.values.environment,
|
|
@@ -1582,12 +1582,12 @@ function Ne({ railDefinitions: n }) {
|
|
|
1582
1582
|
e.canSubmit,
|
|
1583
1583
|
e.isSubmitting
|
|
1584
1584
|
],
|
|
1585
|
-
children: ([t, r, i, a, s, c]) => /* @__PURE__ */
|
|
1585
|
+
children: ([t, r, i, a, s, c]) => /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(o, {
|
|
1586
1586
|
type: "button",
|
|
1587
1587
|
variant: "outline",
|
|
1588
1588
|
onClick: () => v(!1),
|
|
1589
|
-
children: /* @__PURE__ */
|
|
1590
|
-
}), /* @__PURE__ */
|
|
1589
|
+
children: /* @__PURE__ */ G(e, { id: "Cancel" })
|
|
1590
|
+
}), /* @__PURE__ */ G(o, {
|
|
1591
1591
|
type: "submit",
|
|
1592
1592
|
disabled: !t || !r || !i.trim() || !n.find((e) => e.rail === t)?.account_fields.every((e) => (a[e] ?? "").trim()) || !s || c,
|
|
1593
1593
|
children: c ? "Saving…" : "Add PSP"
|
|
@@ -1597,164 +1597,174 @@ function Ne({ railDefinitions: n }) {
|
|
|
1597
1597
|
})]
|
|
1598
1598
|
});
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
let { toast: n, toastApiError: r, adminMutations: a } = i(), { text:
|
|
1600
|
+
function Re() {
|
|
1601
|
+
let { toast: n, toastApiError: r, adminMutations: a, adminQueries: l } = i(), { text: u, id: d } = t(), [f, h] = B.useState(), ee = V(a.lookupCustomerControls()), y = V(a.setCreditLimit()), E = c(), D = J({
|
|
1602
1602
|
defaultValues: { newLimit: "" },
|
|
1603
1603
|
onSubmit: async ({ value: e }) => {
|
|
1604
|
-
if (!
|
|
1605
|
-
let t =
|
|
1604
|
+
if (!f) return;
|
|
1605
|
+
let t = m(f.currency), i = t === void 0 ? null : v(e.newLimit, t);
|
|
1606
1606
|
if (!(i === null || i.startsWith("-"))) try {
|
|
1607
|
-
await
|
|
1608
|
-
customerId:
|
|
1609
|
-
currency:
|
|
1607
|
+
await y.mutateAsync({
|
|
1608
|
+
customerId: f.customerID,
|
|
1609
|
+
currency: f.currency,
|
|
1610
1610
|
amount: i
|
|
1611
|
-
}),
|
|
1611
|
+
}), h((e) => e && {
|
|
1612
1612
|
...e,
|
|
1613
1613
|
creditLimit: i
|
|
1614
|
-
}),
|
|
1614
|
+
}), D.reset(), n.success("Credit limit updated");
|
|
1615
1615
|
} catch (e) {
|
|
1616
1616
|
r(e, "Set credit limit");
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
}),
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1619
|
+
}), [O, k] = B.useState(), { data: A } = H(l.merchantConfiguration()), j = [...new Set([
|
|
1620
|
+
...A?.usage_billing?.currencies ?? [],
|
|
1621
|
+
...O?.balances ?? [],
|
|
1622
|
+
...O?.settings.credit_limits ?? [],
|
|
1623
|
+
...O?.settings.trust_levels ?? []
|
|
1624
|
+
].map((e) => e.currency.toUpperCase()))].sort(), M = j.length ? j : Object.keys(p).sort(), N = J({
|
|
1625
|
+
defaultValues: { currency: "" },
|
|
1624
1626
|
onSubmit: async ({ value: e }) => {
|
|
1625
|
-
let t = e.
|
|
1626
|
-
try {
|
|
1627
|
-
let e = await
|
|
1628
|
-
customerId:
|
|
1629
|
-
currency:
|
|
1627
|
+
let t = e.currency || M[0];
|
|
1628
|
+
if (!(!O || !t)) try {
|
|
1629
|
+
let e = await ee.mutateAsync({
|
|
1630
|
+
customerId: O.id,
|
|
1631
|
+
currency: t
|
|
1630
1632
|
});
|
|
1631
|
-
|
|
1632
|
-
customerID:
|
|
1633
|
+
h({
|
|
1634
|
+
customerID: O.id,
|
|
1633
1635
|
...e
|
|
1634
|
-
}),
|
|
1636
|
+
}), D.reset();
|
|
1635
1637
|
} catch (e) {
|
|
1636
|
-
r(e, "Lookup customer controls"),
|
|
1638
|
+
r(e, "Lookup customer controls"), h(void 0);
|
|
1637
1639
|
}
|
|
1638
1640
|
}
|
|
1639
|
-
})
|
|
1640
|
-
|
|
1641
|
+
}), P = (e) => {
|
|
1642
|
+
k(e), h(void 0), N.reset();
|
|
1643
|
+
};
|
|
1644
|
+
return /* @__PURE__ */ K("div", {
|
|
1641
1645
|
className: "grid gap-10",
|
|
1642
|
-
children: [/* @__PURE__ */
|
|
1646
|
+
children: [/* @__PURE__ */ K("section", {
|
|
1643
1647
|
className: "grid gap-5",
|
|
1644
|
-
children: [/* @__PURE__ */
|
|
1648
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1645
1649
|
className: "grid gap-1",
|
|
1646
|
-
children: [/* @__PURE__ */
|
|
1650
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
1647
1651
|
className: "text-base font-semibold",
|
|
1648
|
-
children: /* @__PURE__ */
|
|
1649
|
-
}), /* @__PURE__ */
|
|
1652
|
+
children: /* @__PURE__ */ G(e, { id: "Customer lookup" })
|
|
1653
|
+
}), /* @__PURE__ */ G("p", {
|
|
1650
1654
|
className: "text-sm text-muted-foreground",
|
|
1651
|
-
children: /* @__PURE__ */
|
|
1655
|
+
children: /* @__PURE__ */ G(e, { id: "Find a customer by name or email, then pick a currency." })
|
|
1652
1656
|
})]
|
|
1653
|
-
}), /* @__PURE__ */
|
|
1654
|
-
onSubmit: (e) => {
|
|
1655
|
-
e.preventDefault(), e.stopPropagation(), x.handleSubmit();
|
|
1656
|
-
},
|
|
1657
|
+
}), /* @__PURE__ */ K("div", {
|
|
1657
1658
|
className: "grid gap-4 md:grid-cols-[minmax(0,1fr)_10rem_auto] md:items-end",
|
|
1658
|
-
children: [
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
children:
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1659
|
+
children: [/* @__PURE__ */ K("div", {
|
|
1660
|
+
className: "grid gap-1.5",
|
|
1661
|
+
children: [/* @__PURE__ */ G(I, { children: /* @__PURE__ */ G(e, { id: "Customer" }) }), O ? /* @__PURE__ */ K("span", {
|
|
1662
|
+
className: "inline-flex h-8 w-fit max-w-full items-center gap-1 rounded-md bg-muted pr-1 pl-2 text-sm font-medium",
|
|
1663
|
+
children: [/* @__PURE__ */ G("span", {
|
|
1664
|
+
className: "truncate",
|
|
1665
|
+
children: g(O)
|
|
1666
|
+
}), /* @__PURE__ */ G(o, {
|
|
1667
|
+
variant: "ghost",
|
|
1668
|
+
size: "icon",
|
|
1669
|
+
className: "size-5",
|
|
1670
|
+
"aria-label": u("Clear customer"),
|
|
1671
|
+
onClick: () => P(void 0),
|
|
1672
|
+
children: /* @__PURE__ */ G(q, {
|
|
1673
|
+
icon: ue,
|
|
1674
|
+
className: "size-3"
|
|
1675
|
+
})
|
|
1676
|
+
})]
|
|
1677
|
+
}) : /* @__PURE__ */ G(oe, { onPick: P })]
|
|
1678
|
+
}), /* @__PURE__ */ K("form", {
|
|
1679
|
+
onSubmit: (e) => {
|
|
1680
|
+
e.preventDefault(), e.stopPropagation(), N.handleSubmit();
|
|
1681
|
+
},
|
|
1682
|
+
className: "contents",
|
|
1683
|
+
children: [/* @__PURE__ */ G(N.Field, {
|
|
1676
1684
|
name: "currency",
|
|
1677
|
-
validators: { onChange: ({ value: e }) => e.trim() ? void 0 : "Enter a currency" },
|
|
1678
1685
|
children: (e) => /* @__PURE__ */ G($, {
|
|
1679
|
-
label:
|
|
1686
|
+
label: u("Currency"),
|
|
1680
1687
|
id: "customer-controls-currency",
|
|
1681
|
-
children:
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1688
|
+
children: /* @__PURE__ */ K(T, {
|
|
1689
|
+
items: M.map((e) => ({
|
|
1690
|
+
value: e,
|
|
1691
|
+
label: e
|
|
1692
|
+
})),
|
|
1693
|
+
value: e.state.value || M[0] || null,
|
|
1694
|
+
onValueChange: (t) => e.handleChange(t ?? ""),
|
|
1695
|
+
children: [/* @__PURE__ */ G(S, {
|
|
1696
|
+
id: d("customer-controls-currency"),
|
|
1697
|
+
className: "w-full",
|
|
1698
|
+
disabled: M.length === 0,
|
|
1699
|
+
children: /* @__PURE__ */ G(x, { placeholder: u(O ? "No currency yet" : "Pick a customer first") })
|
|
1700
|
+
}), /* @__PURE__ */ G(C, { children: M.map((e) => /* @__PURE__ */ G(w, {
|
|
1701
|
+
value: e,
|
|
1702
|
+
children: e
|
|
1703
|
+
}, e)) })]
|
|
1704
|
+
})
|
|
1689
1705
|
})
|
|
1690
|
-
}),
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
e.values.customerID,
|
|
1694
|
-
e.values.currency,
|
|
1695
|
-
e.canSubmit,
|
|
1696
|
-
e.isSubmitting
|
|
1697
|
-
],
|
|
1698
|
-
children: ([e, t, n, r]) => /* @__PURE__ */ W(o, {
|
|
1706
|
+
}), /* @__PURE__ */ G(N.Subscribe, {
|
|
1707
|
+
selector: (e) => e.isSubmitting,
|
|
1708
|
+
children: (e) => /* @__PURE__ */ G(o, {
|
|
1699
1709
|
type: "submit",
|
|
1700
1710
|
variant: "outline",
|
|
1701
|
-
disabled: !
|
|
1702
|
-
children:
|
|
1711
|
+
disabled: !O || !M.length || e,
|
|
1712
|
+
children: e ? "Looking up…" : "Look up"
|
|
1703
1713
|
})
|
|
1704
|
-
})
|
|
1705
|
-
]
|
|
1714
|
+
})]
|
|
1715
|
+
})]
|
|
1706
1716
|
})]
|
|
1707
|
-
}),
|
|
1717
|
+
}), f && /* @__PURE__ */ K("section", {
|
|
1708
1718
|
className: "grid gap-5",
|
|
1709
1719
|
children: [
|
|
1710
|
-
/* @__PURE__ */
|
|
1720
|
+
/* @__PURE__ */ K("div", {
|
|
1711
1721
|
className: "grid gap-1",
|
|
1712
|
-
children: [/* @__PURE__ */
|
|
1722
|
+
children: [/* @__PURE__ */ G("h2", {
|
|
1713
1723
|
className: "text-base font-semibold",
|
|
1714
|
-
children: /* @__PURE__ */
|
|
1715
|
-
}), /* @__PURE__ */
|
|
1724
|
+
children: /* @__PURE__ */ G(e, { id: "Credit and trust" })
|
|
1725
|
+
}), /* @__PURE__ */ K("p", {
|
|
1716
1726
|
className: "text-sm text-muted-foreground",
|
|
1717
1727
|
children: [
|
|
1718
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ G("span", {
|
|
1719
1729
|
className: "font-mono text-xs break-all text-foreground",
|
|
1720
|
-
children:
|
|
1730
|
+
children: f.customerID
|
|
1721
1731
|
}),
|
|
1722
1732
|
" ",
|
|
1723
1733
|
"· ",
|
|
1724
|
-
|
|
1734
|
+
f.currency.toUpperCase()
|
|
1725
1735
|
]
|
|
1726
1736
|
})]
|
|
1727
1737
|
}),
|
|
1728
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ K("dl", {
|
|
1729
1739
|
className: "grid gap-4",
|
|
1730
|
-
children: [/* @__PURE__ */
|
|
1731
|
-
label:
|
|
1732
|
-
value:
|
|
1733
|
-
}), /* @__PURE__ */
|
|
1734
|
-
label:
|
|
1735
|
-
value:
|
|
1740
|
+
children: [/* @__PURE__ */ G(X, {
|
|
1741
|
+
label: u("Trust level"),
|
|
1742
|
+
value: f.trustLevel || "Default"
|
|
1743
|
+
}), /* @__PURE__ */ G(X, {
|
|
1744
|
+
label: u("Credit limit"),
|
|
1745
|
+
value: f.creditLimit === "0" ? "Off" : _(f.creditLimit, f.currency)
|
|
1736
1746
|
})]
|
|
1737
1747
|
}),
|
|
1738
|
-
|
|
1748
|
+
E && /* @__PURE__ */ G("form", {
|
|
1739
1749
|
onSubmit: (e) => {
|
|
1740
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1750
|
+
e.preventDefault(), e.stopPropagation(), D.handleSubmit();
|
|
1741
1751
|
},
|
|
1742
|
-
children: /* @__PURE__ */
|
|
1743
|
-
label: `New limit (${
|
|
1752
|
+
children: /* @__PURE__ */ G(Z, {
|
|
1753
|
+
label: `New limit (${f.currency.toUpperCase()})`,
|
|
1744
1754
|
id: "customer-controls-limit",
|
|
1745
|
-
children: /* @__PURE__ */
|
|
1755
|
+
children: /* @__PURE__ */ G(D.Field, {
|
|
1746
1756
|
name: "newLimit",
|
|
1747
1757
|
validators: { onChange: ({ value: e }) => {
|
|
1748
|
-
let t =
|
|
1758
|
+
let t = m(f.currency), n = t === void 0 ? null : v(e, t);
|
|
1749
1759
|
return e !== "" && n !== null && !n.startsWith("-") ? void 0 : "Enter a valid amount";
|
|
1750
1760
|
} },
|
|
1751
|
-
children: (t) => /* @__PURE__ */
|
|
1761
|
+
children: (t) => /* @__PURE__ */ K("div", {
|
|
1752
1762
|
className: "grid gap-1.5",
|
|
1753
1763
|
children: [
|
|
1754
|
-
/* @__PURE__ */
|
|
1764
|
+
/* @__PURE__ */ K("div", {
|
|
1755
1765
|
className: "flex gap-2",
|
|
1756
|
-
children: [/* @__PURE__ */
|
|
1757
|
-
id:
|
|
1766
|
+
children: [/* @__PURE__ */ G(s, {
|
|
1767
|
+
id: d("customer-controls-limit"),
|
|
1758
1768
|
placeholder: "0.00",
|
|
1759
1769
|
type: "number",
|
|
1760
1770
|
step: "any",
|
|
@@ -1763,23 +1773,23 @@ function Pe() {
|
|
|
1763
1773
|
onBlur: t.handleBlur,
|
|
1764
1774
|
onChange: (e) => t.handleChange(e.target.value),
|
|
1765
1775
|
"aria-invalid": t.state.meta.errors.length > 0
|
|
1766
|
-
}), /* @__PURE__ */
|
|
1776
|
+
}), /* @__PURE__ */ G(D.Subscribe, {
|
|
1767
1777
|
selector: (e) => [
|
|
1768
1778
|
e.values.newLimit,
|
|
1769
1779
|
e.canSubmit,
|
|
1770
1780
|
e.isSubmitting
|
|
1771
1781
|
],
|
|
1772
|
-
children: ([e, t, n]) => /* @__PURE__ */
|
|
1782
|
+
children: ([e, t, n]) => /* @__PURE__ */ G(o, {
|
|
1773
1783
|
type: "submit",
|
|
1774
1784
|
disabled: !e || !t || n,
|
|
1775
1785
|
children: n ? "Updating…" : "Update"
|
|
1776
1786
|
})
|
|
1777
1787
|
})]
|
|
1778
1788
|
}),
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ G(b, { errors: t.state.meta.errors }),
|
|
1790
|
+
/* @__PURE__ */ G("p", {
|
|
1781
1791
|
className: "text-xs text-muted-foreground",
|
|
1782
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ G(e, { id: "Enter 0 to turn credit off." })
|
|
1783
1793
|
})
|
|
1784
1794
|
]
|
|
1785
1795
|
})
|
|
@@ -1792,14 +1802,14 @@ function Pe() {
|
|
|
1792
1802
|
}
|
|
1793
1803
|
function $({ label: e, id: n, hint: r, children: i }) {
|
|
1794
1804
|
let { id: a } = t();
|
|
1795
|
-
return /* @__PURE__ */
|
|
1805
|
+
return /* @__PURE__ */ K("div", {
|
|
1796
1806
|
className: "grid gap-1.5",
|
|
1797
1807
|
children: [
|
|
1798
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ G(I, {
|
|
1799
1809
|
htmlFor: a(n),
|
|
1800
1810
|
children: e
|
|
1801
1811
|
}),
|
|
1802
|
-
r ? /* @__PURE__ */
|
|
1812
|
+
r ? /* @__PURE__ */ G("p", {
|
|
1803
1813
|
className: "text-[13px] text-muted-foreground",
|
|
1804
1814
|
children: r
|
|
1805
1815
|
}) : null,
|
|
@@ -1808,6 +1818,6 @@ function $({ label: e, id: n, hint: r, children: i }) {
|
|
|
1808
1818
|
});
|
|
1809
1819
|
}
|
|
1810
1820
|
//#endregion
|
|
1811
|
-
export {
|
|
1821
|
+
export { Se as SettingsPage };
|
|
1812
1822
|
|
|
1813
|
-
//# sourceMappingURL=admin-settings-
|
|
1823
|
+
//# sourceMappingURL=admin-settings-DscHu4ww.js.map
|