@cedros/pay-react 1.1.30 → 1.1.31
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/README.md +53 -30
- package/dist/{AISettingsSection-C0zqPbd6.js → AISettingsSection-B12x5sV5.js} +2 -2
- package/dist/{AISettingsSection-BMh3hAb5.mjs → AISettingsSection-DXWDF4Cf.mjs} +4 -4
- package/dist/AutosaveIndicator-CJdkhZis.js +1 -0
- package/dist/{AutosaveIndicator-3ctAnz8Y.mjs → AutosaveIndicator-D966vOrP.mjs} +1 -1
- package/dist/CedrosContext-3Dz7_9Ct.js +3 -0
- package/dist/{CedrosContext-5Gjveoba.mjs → CedrosContext-DQc_k5PG.mjs} +430 -314
- package/dist/ChatLogsSection-CH37u0nX.js +1 -0
- package/dist/{ChatLogsSection-BtJixYAp.mjs → ChatLogsSection-DR7mpuQS.mjs} +2 -2
- package/dist/{ComplianceSection-BMnb1p4w.mjs → ComplianceSection-C61_Hf-X.mjs} +3 -3
- package/dist/ComplianceSection-DS4e2IBp.js +1 -0
- package/dist/CryptoButton-BQceZhbn.js +1 -0
- package/dist/{CryptoButton-Cl2kZbOP.mjs → CryptoButton-BuO_RZLj.mjs} +4 -5
- package/dist/CustomersSection-Bzs9Qon3.js +1 -0
- package/dist/{CustomersSection-dmwoBhcf.mjs → CustomersSection-CWWvusxs.mjs} +2 -2
- package/dist/DisputesSection-ClcYIHga.js +1 -0
- package/dist/{DisputesSection-CHyLne76.mjs → DisputesSection-D8rcS5Vs.mjs} +2 -2
- package/dist/{Dropdown-BRSZlhik.mjs → Dropdown-0y3S40Xf.mjs} +1 -1
- package/dist/Dropdown-BuKiVR_L.js +1 -0
- package/dist/{ErrorBanner-lZJhCmDX.mjs → ErrorBanner-DAjYj6Dx.mjs} +1 -1
- package/dist/ErrorBanner-DxrRVqwe.js +1 -0
- package/dist/FAQSection-0UnN2BZs.js +1 -0
- package/dist/{FAQSection-Di2xE9Sm.mjs → FAQSection-Dck0NM-A.mjs} +3 -3
- package/dist/{ImagesSection-D63PEjR6.mjs → ImagesSection-Bn9GrRRa.mjs} +2 -2
- package/dist/ImagesSection-CSwBHvNl.js +1 -0
- package/dist/{InventorySection-Dp5Yu4TA.mjs → InventorySection-Dytfmtn8.mjs} +2 -2
- package/dist/InventorySection-ymxaMcIg.js +1 -0
- package/dist/{MessagingSection-BLCnCpEv.mjs → MessagingSection-CHFbSxJL.mjs} +3 -3
- package/dist/MessagingSection-Dtfv0DvU.js +1 -0
- package/dist/OrdersSection-BuzTs9XG.js +1 -0
- package/dist/{OrdersSection-Bd56F3cj.mjs → OrdersSection-vYNuVF5X.mjs} +2 -2
- package/dist/{PaymentSettingsSection-B5J56VAk.js → PaymentSettingsSection-BOaW8lLv.js} +1 -1
- package/dist/{PaymentSettingsSection-52iw47Su.mjs → PaymentSettingsSection-BqdGrXen.mjs} +3 -3
- package/dist/{ReturnsSection-DUVeKrCd.mjs → ReturnsSection-CRzhXKtI.mjs} +2 -2
- package/dist/ReturnsSection-i5W_3so1.js +1 -0
- package/dist/{SettingsSection-vK9WIwXE.mjs → SettingsSection-6o3d8DrH.mjs} +1 -1
- package/dist/{SettingsSection-DKkHykaC.js → SettingsSection-CIhO51Zj.js} +1 -1
- package/dist/ShippingSection-BUzPW1AG.js +1 -0
- package/dist/{ShippingSection-CZRrXrlh.mjs → ShippingSection-CbNzGyCP.mjs} +2 -2
- package/dist/SingleCategorySettings-BxVUUy8R.js +3 -0
- package/dist/{SingleCategorySettings-C8xJ47_T.mjs → SingleCategorySettings-Qj_ptB_x.mjs} +4 -4
- package/dist/{StatsBar-D4cOKG2e.mjs → StatsBar-CwCBHBn-.mjs} +1 -1
- package/dist/StatsBar-DDUWoizP.js +1 -0
- package/dist/StorefrontSection-CZZj5he9.js +1 -0
- package/dist/{StorefrontSection-uXSVbEAa.mjs → StorefrontSection-DIYDmj59.mjs} +4 -4
- package/dist/SubscriptionsSection-Bof5MElz.js +1 -0
- package/dist/{SubscriptionsSection-Ci_AZrWA.mjs → SubscriptionsSection-lMVHdV5X.mjs} +3 -3
- package/dist/TaxSection-Be-9v60Z.js +1 -0
- package/dist/{TaxSection-BTukS_cU.mjs → TaxSection-dD7PzQvG.mjs} +2 -2
- package/dist/Token22Section-Di5fHsrU.js +1 -0
- package/dist/{Token22Section-DRsPJuTq.mjs → Token22Section-Dos0CYEk.mjs} +2 -2
- package/dist/{WalletManager-D-eoqUDy.mjs → WalletManager-CGR69MiR.mjs} +1 -1
- package/dist/{WalletManager-DXChB9LA.js → WalletManager-ZJbGQHrn.js} +1 -1
- package/dist/{WebhooksSection-A8Y4ZGcj.mjs → WebhooksSection-5gqXzIhq.mjs} +2 -2
- package/dist/WebhooksSection-CiLDyl7c.js +1 -0
- package/dist/admin.js +1 -1
- package/dist/admin.mjs +1 -1
- package/dist/crypto-only.js +1 -1
- package/dist/crypto-only.mjs +102 -105
- package/dist/{index-9QF_UfSN.mjs → index-CU6M10Rs.mjs} +13 -14
- package/dist/{index-Cq9ya93W.js → index-DVxx_62C.js} +10 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +31 -34
- package/dist/pay-react.css +1 -1
- package/dist/plugin-BIkt3boU.mjs +339 -0
- package/dist/plugin-Dw8_Q8rE.js +1 -0
- package/dist/sections-D1d83mfH.js +1 -0
- package/dist/{sections-more-Ixw6mM6R.mjs → sections-DcUfZQNE.mjs} +263 -270
- package/dist/src/admin/plugin.d.ts.map +1 -1
- package/dist/src/admin/sectionIds.d.ts.map +1 -1
- package/dist/src/admin.d.ts +0 -7
- package/dist/src/admin.d.ts.map +1 -1
- package/dist/src/components/admin/index.d.ts +0 -1
- package/dist/src/components/admin/index.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/stripe-only.js +1 -1
- package/dist/stripe-only.mjs +18 -19
- package/dist/styles-BwaDljnz.js +1 -0
- package/dist/{styles-DGagylUj.mjs → styles-fihm6qVA.mjs} +51 -52
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +6 -8
- package/dist/AutosaveIndicator-DXRPr4P7.js +0 -1
- package/dist/CedrosContext-CCakH2SZ.js +0 -3
- package/dist/CedrosPayAdminDashboard-DaJ9JoGn.mjs +0 -250
- package/dist/CedrosPayAdminDashboard-Uvyh9p7A.js +0 -1
- package/dist/ChatLogsSection-FC3O536G.js +0 -1
- package/dist/ComplianceSection-BioTKm7k.js +0 -1
- package/dist/CryptoButton-DxFCYDlJ.js +0 -1
- package/dist/CustomersSection-z6ARxuex.js +0 -1
- package/dist/DisputesSection-BjHHQAi7.js +0 -1
- package/dist/Dropdown-j8o0OO5L.js +0 -1
- package/dist/ErrorBanner-CAgPnj62.js +0 -1
- package/dist/FAQSection-b34DMzgV.js +0 -1
- package/dist/ImagesSection-DGBA7iKY.js +0 -1
- package/dist/InventorySection-bVCECzX5.js +0 -1
- package/dist/LazyCedrosPayAdminDashboard-BqJDNrDI.mjs +0 -9
- package/dist/LazyCedrosPayAdminDashboard-CpfTtOBc.js +0 -1
- package/dist/MessagingSection-DU0dYNMy.js +0 -1
- package/dist/OrdersSection-FOFEAgs1.js +0 -1
- package/dist/ReturnsSection-BjpIVFfN.js +0 -1
- package/dist/ShippingSection-B5lk7zpS.js +0 -1
- package/dist/SingleCategorySettings-g7D-9lG1.js +0 -3
- package/dist/StatsBar-CWXw2ZT3.js +0 -1
- package/dist/StorefrontSection-BWnMB9k-.js +0 -1
- package/dist/SubscriptionsSection-DQfXkuDv.js +0 -1
- package/dist/TaxSection-cuPQISxZ.js +0 -1
- package/dist/ThemeContext-CFXyYx7A.js +0 -1
- package/dist/ThemeContext-l0bqcOGW.mjs +0 -126
- package/dist/Token22Section-CCfkDm8W.js +0 -1
- package/dist/WebhooksSection-CnEmaGH1.js +0 -1
- package/dist/icons-C3yDMnKE.mjs +0 -235
- package/dist/icons-Cjgd9YVo.js +0 -1
- package/dist/sectionIds-D46-_-h-.js +0 -1
- package/dist/sectionIds-YktNxmRt.mjs +0 -124
- package/dist/sections-511_XBh4.js +0 -1
- package/dist/sections-CRaMa8ZB.mjs +0 -9
- package/dist/sections-more-Cgw2qJlA.js +0 -1
- package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts +0 -40
- package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts.map +0 -1
- package/dist/src/components/admin/LazyCedrosPayAdminDashboard.d.ts +0 -4
- package/dist/src/components/admin/LazyCedrosPayAdminDashboard.d.ts.map +0 -1
- package/dist/src/standalone-admin.d.ts +0 -8
- package/dist/src/standalone-admin.d.ts.map +0 -1
- package/dist/standalone-admin.d.ts +0 -2
- package/dist/standalone-admin.js +0 -1
- package/dist/standalone-admin.mjs +0 -4
- package/dist/styles--fxb3lCl.js +0 -1
package/dist/icons-C3yDMnKE.mjs
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { b as M } from "./index-BFt38o8Q.mjs";
|
|
2
|
-
import { g as c, b as L, f as u } from "./fetchWithTimeout-DmMOwL0Q.mjs";
|
|
3
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
4
|
-
class C {
|
|
5
|
-
serverUrl;
|
|
6
|
-
walletSigner = null;
|
|
7
|
-
jwtToken = null;
|
|
8
|
-
isAdminUser = !1;
|
|
9
|
-
constructor(r) {
|
|
10
|
-
this.serverUrl = r;
|
|
11
|
-
}
|
|
12
|
-
getAuthMethod() {
|
|
13
|
-
return this.walletSigner?.publicKey && this.walletSigner.signMessage ? "wallet" : this.jwtToken && this.isAdminUser ? "cedros-login" : "none";
|
|
14
|
-
}
|
|
15
|
-
isAuthenticated() {
|
|
16
|
-
return this.getAuthMethod() !== "none";
|
|
17
|
-
}
|
|
18
|
-
setWalletSigner(r) {
|
|
19
|
-
this.walletSigner = r, c().debug("[AdminAuthManager] Wallet signer updated:", !!r?.publicKey);
|
|
20
|
-
}
|
|
21
|
-
setCedrosLoginAuth(r, o) {
|
|
22
|
-
this.jwtToken = r, this.isAdminUser = o ?? !1, c().debug("[AdminAuthManager] Cedros-login auth updated:", { hasToken: !!r, isAdmin: this.isAdminUser });
|
|
23
|
-
}
|
|
24
|
-
async createAuthHeaders(r) {
|
|
25
|
-
const o = this.getAuthMethod();
|
|
26
|
-
if (o === "wallet")
|
|
27
|
-
return this.createWalletAuthHeaders(r);
|
|
28
|
-
if (o === "cedros-login")
|
|
29
|
-
return this.createJwtAuthHeaders();
|
|
30
|
-
throw new Error("No admin authentication configured. Connect a wallet or sign in as admin.");
|
|
31
|
-
}
|
|
32
|
-
async createWalletAuthHeaders(r) {
|
|
33
|
-
if (!this.walletSigner?.publicKey || !this.walletSigner.signMessage)
|
|
34
|
-
throw new Error("Wallet not connected or does not support message signing");
|
|
35
|
-
const o = await this.fetchNonce(r), s = new TextEncoder().encode(o.nonce), n = await this.walletSigner.signMessage(s), h = M.encode(this.walletSigner.publicKey.toBytes()), d = L.fromUint8Array(n);
|
|
36
|
-
return {
|
|
37
|
-
"X-Signer": h,
|
|
38
|
-
"X-Message": o.nonce,
|
|
39
|
-
"X-Signature": d
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
createJwtAuthHeaders() {
|
|
43
|
-
if (!this.jwtToken)
|
|
44
|
-
throw new Error("No JWT token available");
|
|
45
|
-
return {
|
|
46
|
-
Authorization: `Bearer ${this.jwtToken}`
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
async fetchNonce(r) {
|
|
50
|
-
const o = `${this.serverUrl}/paywall/v1/nonce`, s = typeof r == "string" ? { purpose: r } : { path: r.path, method: r.method.toUpperCase() };
|
|
51
|
-
c().debug("[AdminAuthManager] Fetching nonce:", s);
|
|
52
|
-
const n = await u(o, {
|
|
53
|
-
method: "POST",
|
|
54
|
-
headers: { "Content-Type": "application/json" },
|
|
55
|
-
body: JSON.stringify(s)
|
|
56
|
-
});
|
|
57
|
-
if (!n.ok) {
|
|
58
|
-
const h = await n.text();
|
|
59
|
-
throw new Error(`Failed to fetch nonce: ${n.status} ${h}`);
|
|
60
|
-
}
|
|
61
|
-
return await n.json();
|
|
62
|
-
}
|
|
63
|
-
async fetchWithAuth(r, o = {}) {
|
|
64
|
-
if (this.getAuthMethod() === "none")
|
|
65
|
-
throw new Error("No admin authentication configured");
|
|
66
|
-
const n = (o.method || "GET").toUpperCase(), h = await this.createAuthHeaders({ path: r, method: n }), d = {
|
|
67
|
-
// Only set Content-Type for methods that typically carry a body
|
|
68
|
-
...n !== "GET" && n !== "HEAD" ? { "Content-Type": "application/json" } : {},
|
|
69
|
-
...o.headers || {},
|
|
70
|
-
...h
|
|
71
|
-
}, a = await u(`${this.serverUrl}${r}`, {
|
|
72
|
-
...o,
|
|
73
|
-
headers: d
|
|
74
|
-
});
|
|
75
|
-
if (!a.ok) {
|
|
76
|
-
let l = `Admin API error ${a.status}`;
|
|
77
|
-
try {
|
|
78
|
-
const i = await a.json();
|
|
79
|
-
i && typeof i.error == "string" ? l = i.error : i && typeof i.message == "string" && (l = i.message);
|
|
80
|
-
} catch {
|
|
81
|
-
}
|
|
82
|
-
throw new Error(l);
|
|
83
|
-
}
|
|
84
|
-
return await a.json();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function k() {
|
|
88
|
-
return /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
89
|
-
/* @__PURE__ */ e("path", { d: "M20 7.5v9l-4 2.25M4 7.5v9l4 2.25" }),
|
|
90
|
-
/* @__PURE__ */ e("path", { d: "m20 7.5-8-4.5-8 4.5" }),
|
|
91
|
-
/* @__PURE__ */ e("path", { d: "m12 12 8-4.5M12 12v9.5M12 12 4 7.5" })
|
|
92
|
-
] });
|
|
93
|
-
}
|
|
94
|
-
function p() {
|
|
95
|
-
return /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" }) });
|
|
96
|
-
}
|
|
97
|
-
function g() {
|
|
98
|
-
return /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
99
|
-
/* @__PURE__ */ e("path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }),
|
|
100
|
-
/* @__PURE__ */ e("path", { d: "M13 5v2M13 17v2M13 11v2" })
|
|
101
|
-
] });
|
|
102
|
-
}
|
|
103
|
-
function w() {
|
|
104
|
-
return /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
105
|
-
/* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
|
|
106
|
-
/* @__PURE__ */ e("path", { d: "M3 3v5h5" }),
|
|
107
|
-
/* @__PURE__ */ e("path", { d: "M12 7v5l4 2" })
|
|
108
|
-
] });
|
|
109
|
-
}
|
|
110
|
-
function v() {
|
|
111
|
-
return /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
112
|
-
/* @__PURE__ */ e("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
|
|
113
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
114
|
-
] });
|
|
115
|
-
}
|
|
116
|
-
function f() {
|
|
117
|
-
return /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
118
|
-
/* @__PURE__ */ e("path", { d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }),
|
|
119
|
-
/* @__PURE__ */ e("path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" })
|
|
120
|
-
] });
|
|
121
|
-
}
|
|
122
|
-
const W = {
|
|
123
|
-
products: () => /* @__PURE__ */ e(k, {}),
|
|
124
|
-
transactions: () => /* @__PURE__ */ e(p, {}),
|
|
125
|
-
coupons: () => /* @__PURE__ */ e(g, {}),
|
|
126
|
-
refunds: () => /* @__PURE__ */ e(w, {}),
|
|
127
|
-
settings: () => /* @__PURE__ */ e(v, {}),
|
|
128
|
-
wallet: () => /* @__PURE__ */ e(f, {})
|
|
129
|
-
}, A = {
|
|
130
|
-
products: /* @__PURE__ */ e(k, {}),
|
|
131
|
-
transactions: /* @__PURE__ */ e(p, {}),
|
|
132
|
-
coupons: /* @__PURE__ */ e(g, {}),
|
|
133
|
-
refunds: /* @__PURE__ */ e(w, {}),
|
|
134
|
-
settings: /* @__PURE__ */ e(v, {}),
|
|
135
|
-
wallet: /* @__PURE__ */ e(f, {}),
|
|
136
|
-
chevronRight: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" }) }),
|
|
137
|
-
loading: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "cedros-admin__spinner", children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }),
|
|
138
|
-
refresh: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
139
|
-
/* @__PURE__ */ e("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
140
|
-
/* @__PURE__ */ e("path", { d: "M21 3v5h-5" }),
|
|
141
|
-
/* @__PURE__ */ e("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
142
|
-
/* @__PURE__ */ e("path", { d: "M8 16H3v5" })
|
|
143
|
-
] }),
|
|
144
|
-
user: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
145
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "5" }),
|
|
146
|
-
/* @__PURE__ */ e("path", { d: "M20 21a8 8 0 0 0-16 0" })
|
|
147
|
-
] }),
|
|
148
|
-
check: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" }) }),
|
|
149
|
-
trash: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }) }),
|
|
150
|
-
plus: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }) }),
|
|
151
|
-
chevronDown: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }) }),
|
|
152
|
-
chevronUp: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m18 15-6-6-6 6" }) }),
|
|
153
|
-
storefront: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
154
|
-
/* @__PURE__ */ e("path", { d: "M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z" }),
|
|
155
|
-
/* @__PURE__ */ e("path", { d: "m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9" }),
|
|
156
|
-
/* @__PURE__ */ e("path", { d: "M12 3v6" })
|
|
157
|
-
] }),
|
|
158
|
-
arrowUp: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
159
|
-
/* @__PURE__ */ e("path", { d: "m5 12 7-7 7 7" }),
|
|
160
|
-
/* @__PURE__ */ e("path", { d: "M12 19V5" })
|
|
161
|
-
] }),
|
|
162
|
-
arrowDown: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
163
|
-
/* @__PURE__ */ e("path", { d: "m5 12 7 7 7-7" }),
|
|
164
|
-
/* @__PURE__ */ e("path", { d: "M12 5v14" })
|
|
165
|
-
] }),
|
|
166
|
-
delete: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
167
|
-
/* @__PURE__ */ e("path", { d: "M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }),
|
|
168
|
-
/* @__PURE__ */ e("path", { d: "M10 11v6M14 11v6" })
|
|
169
|
-
] }),
|
|
170
|
-
close: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12" }) }),
|
|
171
|
-
edit: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
172
|
-
/* @__PURE__ */ e("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
173
|
-
/* @__PURE__ */ e("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
174
|
-
] }),
|
|
175
|
-
faq: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
176
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
177
|
-
/* @__PURE__ */ e("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
178
|
-
/* @__PURE__ */ e("path", { d: "M12 17h.01" })
|
|
179
|
-
] }),
|
|
180
|
-
chat: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z" }) }),
|
|
181
|
-
globe: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
182
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
|
|
183
|
-
/* @__PURE__ */ e("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
|
|
184
|
-
/* @__PURE__ */ e("path", { d: "M2 12h20" })
|
|
185
|
-
] }),
|
|
186
|
-
eye: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
187
|
-
/* @__PURE__ */ e("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
|
|
188
|
-
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
|
|
189
|
-
] }),
|
|
190
|
-
eyeOff: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
191
|
-
/* @__PURE__ */ e("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
|
|
192
|
-
/* @__PURE__ */ e("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
|
|
193
|
-
/* @__PURE__ */ e("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
|
|
194
|
-
/* @__PURE__ */ e("line", { x1: "2", x2: "22", y1: "2", y2: "22" })
|
|
195
|
-
] }),
|
|
196
|
-
creditCard: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
197
|
-
/* @__PURE__ */ e("rect", { width: "20", height: "14", x: "2", y: "5", rx: "2" }),
|
|
198
|
-
/* @__PURE__ */ e("line", { x1: "2", x2: "22", y1: "10", y2: "10" })
|
|
199
|
-
] }),
|
|
200
|
-
mail: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
201
|
-
/* @__PURE__ */ e("rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }),
|
|
202
|
-
/* @__PURE__ */ e("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })
|
|
203
|
-
] }),
|
|
204
|
-
server: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
205
|
-
/* @__PURE__ */ e("rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2" }),
|
|
206
|
-
/* @__PURE__ */ e("rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2" }),
|
|
207
|
-
/* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }),
|
|
208
|
-
/* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "18", y2: "18" })
|
|
209
|
-
] }),
|
|
210
|
-
calendarRepeat: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
211
|
-
/* @__PURE__ */ e("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", ry: "2" }),
|
|
212
|
-
/* @__PURE__ */ e("line", { x1: "16", x2: "16", y1: "2", y2: "6" }),
|
|
213
|
-
/* @__PURE__ */ e("line", { x1: "8", x2: "8", y1: "2", y2: "6" }),
|
|
214
|
-
/* @__PURE__ */ e("line", { x1: "3", x2: "21", y1: "10", y2: "10" }),
|
|
215
|
-
/* @__PURE__ */ e("path", { d: "M11 14h1.5a1.5 1.5 0 0 1 0 3H11v2" }),
|
|
216
|
-
/* @__PURE__ */ e("path", { d: "M16 14v3a1 1 0 0 0 1 1h1" })
|
|
217
|
-
] }),
|
|
218
|
-
shield: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }) }),
|
|
219
|
-
brain: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
220
|
-
/* @__PURE__ */ e("path", { d: "M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z" }),
|
|
221
|
-
/* @__PURE__ */ e("path", { d: "M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z" }),
|
|
222
|
-
/* @__PURE__ */ e("path", { d: "M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4" }),
|
|
223
|
-
/* @__PURE__ */ e("path", { d: "M17.599 6.5a3 3 0 0 0 .399-1.375" }),
|
|
224
|
-
/* @__PURE__ */ e("path", { d: "M6.003 5.125A3 3 0 0 0 6.401 6.5" }),
|
|
225
|
-
/* @__PURE__ */ e("path", { d: "M3.477 10.896a4 4 0 0 1 .585-.396" }),
|
|
226
|
-
/* @__PURE__ */ e("path", { d: "M19.938 10.5a4 4 0 0 1 .585.396" }),
|
|
227
|
-
/* @__PURE__ */ e("path", { d: "M6 18a4 4 0 0 1-1.967-.516" }),
|
|
228
|
-
/* @__PURE__ */ e("path", { d: "M19.967 17.484A4 4 0 0 1 18 18" })
|
|
229
|
-
] })
|
|
230
|
-
};
|
|
231
|
-
export {
|
|
232
|
-
W as A,
|
|
233
|
-
A as I,
|
|
234
|
-
C as a
|
|
235
|
-
};
|
package/dist/icons-Cjgd9YVo.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const p=require("./index-WcOlBYZJ.js"),s=require("./fetchWithTimeout-CG0EKbhf.js"),e=require("react/jsx-runtime");class w{serverUrl;walletSigner=null;jwtToken=null;isAdminUser=!1;constructor(t){this.serverUrl=t}getAuthMethod(){return this.walletSigner?.publicKey&&this.walletSigner.signMessage?"wallet":this.jwtToken&&this.isAdminUser?"cedros-login":"none"}isAuthenticated(){return this.getAuthMethod()!=="none"}setWalletSigner(t){this.walletSigner=t,s.getLogger().debug("[AdminAuthManager] Wallet signer updated:",!!t?.publicKey)}setCedrosLoginAuth(t,r){this.jwtToken=t,this.isAdminUser=r??!1,s.getLogger().debug("[AdminAuthManager] Cedros-login auth updated:",{hasToken:!!t,isAdmin:this.isAdminUser})}async createAuthHeaders(t){const r=this.getAuthMethod();if(r==="wallet")return this.createWalletAuthHeaders(t);if(r==="cedros-login")return this.createJwtAuthHeaders();throw new Error("No admin authentication configured. Connect a wallet or sign in as admin.")}async createWalletAuthHeaders(t){if(!this.walletSigner?.publicKey||!this.walletSigner.signMessage)throw new Error("Wallet not connected or does not support message signing");const r=await this.fetchNonce(t),i=new TextEncoder().encode(r.nonce),o=await this.walletSigner.signMessage(i),h=p.bs58.encode(this.walletSigner.publicKey.toBytes()),d=s.gBase64.fromUint8Array(o);return{"X-Signer":h,"X-Message":r.nonce,"X-Signature":d}}createJwtAuthHeaders(){if(!this.jwtToken)throw new Error("No JWT token available");return{Authorization:`Bearer ${this.jwtToken}`}}async fetchNonce(t){const r=`${this.serverUrl}/paywall/v1/nonce`,i=typeof t=="string"?{purpose:t}:{path:t.path,method:t.method.toUpperCase()};s.getLogger().debug("[AdminAuthManager] Fetching nonce:",i);const o=await s.fetchWithTimeout(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!o.ok){const h=await o.text();throw new Error(`Failed to fetch nonce: ${o.status} ${h}`)}return await o.json()}async fetchWithAuth(t,r={}){if(this.getAuthMethod()==="none")throw new Error("No admin authentication configured");const o=(r.method||"GET").toUpperCase(),h=await this.createAuthHeaders({path:t,method:o}),d={...o!=="GET"&&o!=="HEAD"?{"Content-Type":"application/json"}:{},...r.headers||{},...h},a=await s.fetchWithTimeout(`${this.serverUrl}${t}`,{...r,headers:d});if(!a.ok){let c=`Admin API error ${a.status}`;try{const n=await a.json();n&&typeof n.error=="string"?c=n.error:n&&typeof n.message=="string"&&(c=n.message)}catch{}throw new Error(c)}return await a.json()}}function l(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M20 7.5v9l-4 2.25M4 7.5v9l4 2.25"}),e.jsx("path",{d:"m20 7.5-8-4.5-8 4.5"}),e.jsx("path",{d:"m12 12 8-4.5M12 12v9.5M12 12 4 7.5"})]})}function u(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})})}function x(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"}),e.jsx("path",{d:"M13 5v2M13 17v2M13 11v2"})]})}function j(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),e.jsx("path",{d:"M3 3v5h5"}),e.jsx("path",{d:"M12 7v5l4 2"})]})}function k(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function g(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"}),e.jsx("path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"})]})}const v={products:()=>e.jsx(l,{}),transactions:()=>e.jsx(u,{}),coupons:()=>e.jsx(x,{}),refunds:()=>e.jsx(j,{}),settings:()=>e.jsx(k,{}),wallet:()=>e.jsx(g,{})},M={products:e.jsx(l,{}),transactions:e.jsx(u,{}),coupons:e.jsx(x,{}),refunds:e.jsx(j,{}),settings:e.jsx(k,{}),wallet:e.jsx(g,{}),chevronRight:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m9 18 6-6-6-6"})}),loading:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"cedros-admin__spinner",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),refresh:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),e.jsx("path",{d:"M21 3v5h-5"}),e.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),e.jsx("path",{d:"M8 16H3v5"})]}),user:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"8",r:"5"}),e.jsx("path",{d:"M20 21a8 8 0 0 0-16 0"})]}),check:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),trash:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})}),plus:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 5v14M5 12h14"})}),chevronDown:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m6 9 6 6 6-6"})}),chevronUp:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m18 15-6-6-6 6"})}),storefront:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z"}),e.jsx("path",{d:"m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9"}),e.jsx("path",{d:"M12 3v6"})]}),arrowUp:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"m5 12 7-7 7 7"}),e.jsx("path",{d:"M12 19V5"})]}),arrowDown:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"m5 12 7 7 7-7"}),e.jsx("path",{d:"M12 5v14"})]}),delete:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),e.jsx("path",{d:"M10 11v6M14 11v6"})]}),close:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),edit:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),faq:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),e.jsx("path",{d:"M12 17h.01"})]}),chat:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z"})}),globe:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}),e.jsx("path",{d:"M2 12h20"})]}),eye:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),eyeOff:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),e.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),e.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),e.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]}),creditCard:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"20",height:"14",x:"2",y:"5",rx:"2"}),e.jsx("line",{x1:"2",x2:"22",y1:"10",y2:"10"})]}),mail:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),e.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),server:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}),e.jsx("rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}),e.jsx("line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}),e.jsx("line",{x1:"6",x2:"6.01",y1:"18",y2:"18"})]}),calendarRepeat:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2"}),e.jsx("line",{x1:"16",x2:"16",y1:"2",y2:"6"}),e.jsx("line",{x1:"8",x2:"8",y1:"2",y2:"6"}),e.jsx("line",{x1:"3",x2:"21",y1:"10",y2:"10"}),e.jsx("path",{d:"M11 14h1.5a1.5 1.5 0 0 1 0 3H11v2"}),e.jsx("path",{d:"M16 14v3a1 1 0 0 0 1 1h1"})]}),shield:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"})}),brain:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),e.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}),e.jsx("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),e.jsx("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),e.jsx("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),e.jsx("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),e.jsx("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),e.jsx("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),e.jsx("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]})};exports.AdminAuthManager=w;exports.AdminPluginIcons=v;exports.Icons=M;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const S=require("react/jsx-runtime"),g=require("react"),o=require("./icons-Cjgd9YVo.js"),n={adminProfile:"admin-profile",adminSectionAccess:"admin-section-access",cedrosLogin:"cedros-login",cedrosPay:"cedros-pay",org:"org",dashboardPermissions:"dashboard-permissions"};function b(e={}){return{...e}}function T(e){const i=b(e.services);return!(n.adminProfile in i)&&e.cedrosLogin?.user&&(i[n.adminProfile]={user:e.cedrosLogin.user}),!(n.adminSectionAccess in i)&&e.dashboardPermissions&&(i[n.adminSectionAccess]=e.dashboardPermissions),!(n.cedrosLogin in i)&&e.cedrosLogin&&(i[n.cedrosLogin]=e.cedrosLogin),!(n.cedrosPay in i)&&e.cedrosPay&&(i[n.cedrosPay]=e.cedrosPay),!(n.org in i)&&e.org&&(i[n.org]=e.org),!(n.dashboardPermissions in i)&&e.dashboardPermissions&&(i[n.dashboardPermissions]=e.dashboardPermissions),i}function a(e,i){return I(T(e),i)}function I(e,i){return e[i]}const r=e=>g.lazy(async()=>{const t=(await e()).default;return{default:({pluginContext:s})=>{const c=s.getAccessToken(),u=s.hasPermission("cedros-pay:admin")||s.hasPermission("admin"),f=g.useMemo(()=>{const l=new o.AdminAuthManager(s.serverUrl);return l.setCedrosLoginAuth(c??null,u),l},[u,s.serverUrl,c]),P={serverUrl:s.serverUrl,authManager:f};return S.jsx(t,{...P})}}}),y={id:"cedros-pay",name:"Cedros Pay",version:"1.0.0",sections:[{id:"transactions",label:"Transactions",icon:o.AdminPluginIcons.transactions,group:"Store",order:0},{id:"products",label:"Products",icon:o.AdminPluginIcons.products,group:"Store",order:1},{id:"subscriptions",label:"Subscriptions",icon:o.AdminPluginIcons.products,group:"Store",order:2},{id:"coupons",label:"Coupons",icon:o.AdminPluginIcons.coupons,group:"Store",order:3},{id:"refunds",label:"Refunds",icon:o.AdminPluginIcons.refunds,group:"Store",order:4},{id:"compliance",label:"Compliance",icon:o.AdminPluginIcons.settings,group:"Store",order:5},{id:"storefront",label:"Storefront",icon:o.AdminPluginIcons.products,group:"Configuration",order:10},{id:"ai-settings",label:"Store AI",icon:o.AdminPluginIcons.settings,group:"Configuration",order:11},{id:"faqs",label:"Knowledge Base",icon:o.AdminPluginIcons.settings,group:"Configuration",order:12},{id:"payment-settings",label:"Payment Options",icon:o.AdminPluginIcons.wallet,group:"Configuration",order:13},{id:"messaging",label:"Store Messages",icon:o.AdminPluginIcons.settings,group:"Configuration",order:14},{id:"settings",label:"Store Server",icon:o.AdminPluginIcons.settings,group:"Configuration",order:15}],groups:[{id:"Store",label:"Store",order:1},{id:"Configuration",label:"Configuration",order:2,defaultCollapsed:!0}],components:{products:r(()=>Promise.resolve().then(()=>require("./sections-511_XBh4.js")).then(e=>({default:e.ProductsSection}))),subscriptions:r(()=>Promise.resolve().then(()=>require("./SubscriptionsSection-DQfXkuDv.js")).then(e=>({default:e.SubscriptionsSection}))),transactions:r(()=>Promise.resolve().then(()=>require("./sections-511_XBh4.js")).then(e=>({default:e.TransactionsSection}))),coupons:r(()=>Promise.resolve().then(()=>require("./sections-511_XBh4.js")).then(e=>({default:e.CouponsSection}))),refunds:r(()=>Promise.resolve().then(()=>require("./sections-511_XBh4.js")).then(e=>({default:e.RefundsSection}))),compliance:r(()=>Promise.resolve().then(()=>require("./ComplianceSection-BioTKm7k.js")).then(e=>({default:e.ComplianceSection}))),storefront:r(()=>Promise.resolve().then(()=>require("./StorefrontSection-BWnMB9k-.js")).then(e=>({default:e.StorefrontSection}))),"ai-settings":r(()=>Promise.resolve().then(()=>require("./AISettingsSection-C0zqPbd6.js")).then(e=>({default:e.AISettingsSection}))),faqs:r(()=>Promise.resolve().then(()=>require("./FAQSection-b34DMzgV.js")).then(e=>({default:e.FAQSection}))),"payment-settings":r(()=>Promise.resolve().then(()=>require("./PaymentSettingsSection-B5J56VAk.js")).then(e=>({default:e.PaymentSettingsSection}))),messaging:r(()=>Promise.resolve().then(()=>require("./MessagingSection-DU0dYNMy.js")).then(e=>({default:e.MessagingSection}))),settings:r(()=>Promise.resolve().then(()=>require("./SettingsSection-DKkHykaC.js")).then(e=>({default:e.SettingsSection})))},createPluginContext(e){const i=a(e,n.cedrosPay),d=a(e,n.cedrosLogin),t=a(e,n.org);return{serverUrl:i?.serverUrl||d?.serverUrl||"",userId:d?.user?.id,getAccessToken:()=>d?.getAccessToken?.()||i?.jwtToken||null,hasPermission:s=>this.checkPermission(s,e),orgId:t?.orgId,pluginData:{walletAddress:i?.walletAddress}}},checkPermission(e,i){const d=a(i,n.org);return d?.permissions?d.permissions.includes(e):!1},cssNamespace:"cedros-dashboard"},m=[{id:"transactions",qualifiedId:"cedros-pay:transactions",label:"Transactions",group:"Store",order:0,endpoints:["GET /admin/transactions"]},{id:"products",qualifiedId:"cedros-pay:products",label:"Products",group:"Store",order:1,endpoints:["GET /admin/products","POST /admin/products","PUT /admin/products/{id}","DELETE /admin/products/{id}"]},{id:"subscriptions",qualifiedId:"cedros-pay:subscriptions",label:"Subscriptions",group:"Store",order:2,endpoints:["GET /admin/subscriptions","POST /admin/subscriptions","PUT /admin/subscriptions/{id}"]},{id:"coupons",qualifiedId:"cedros-pay:coupons",label:"Coupons",group:"Store",order:3,endpoints:["GET /admin/coupons","POST /admin/coupons","PUT /admin/coupons/{id}","DELETE /admin/coupons/{id}"]},{id:"refunds",qualifiedId:"cedros-pay:refunds",label:"Refunds",group:"Store",order:4,endpoints:["GET /admin/refunds","POST /admin/refunds/{id}/approve","POST /admin/refunds/{id}/deny"]},{id:"storefront",qualifiedId:"cedros-pay:storefront",label:"Storefront",group:"Configuration",order:10,endpoints:["GET /admin/config/shop","PUT /admin/config/shop"]},{id:"ai-settings",qualifiedId:"cedros-pay:ai-settings",label:"Store AI",group:"Configuration",order:11,endpoints:["GET /admin/config/ai","PUT /admin/config/ai/api-key","PUT /admin/config/ai/assignment","PUT /admin/config/ai/prompt"]},{id:"faqs",qualifiedId:"cedros-pay:faqs",label:"Knowledge Base",group:"Configuration",order:12,endpoints:["GET /admin/faqs","POST /admin/faqs","PUT /admin/faqs/{id}","DELETE /admin/faqs/{id}"]},{id:"payment-settings",qualifiedId:"cedros-pay:payment-settings",label:"Payment Options",group:"Configuration",order:13,endpoints:["GET /admin/config/stripe","PUT /admin/config/stripe","GET /admin/config/x402","PUT /admin/config/x402","GET /admin/config/cedros_login","PUT /admin/config/cedros_login"]},{id:"messaging",qualifiedId:"cedros-pay:messaging",label:"Store Messages",group:"Configuration",order:14,endpoints:["GET /admin/config/messaging","PUT /admin/config/messaging"]},{id:"settings",qualifiedId:"cedros-pay:settings",label:"Store Server",group:"Configuration",order:15,endpoints:["GET /admin/config/server","PUT /admin/config/server"]}],A=m.map(e=>e.qualifiedId),q=[{id:"Store",label:"Store",order:1,defaultCollapsed:!1},{id:"Configuration",label:"Configuration",order:2,defaultCollapsed:!0}];exports.CEDROS_PAY_GROUPS=q;exports.CEDROS_PAY_SECTIONS=m;exports.CEDROS_PAY_SECTION_IDS=A;exports.cedrosPayPlugin=y;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { lazy as S, useMemo as P } from "react";
|
|
3
|
-
import { A as n, a as b } from "./icons-C3yDMnKE.mjs";
|
|
4
|
-
const e = {
|
|
5
|
-
adminProfile: "admin-profile",
|
|
6
|
-
adminSectionAccess: "admin-section-access",
|
|
7
|
-
cedrosLogin: "cedros-login",
|
|
8
|
-
cedrosPay: "cedros-pay",
|
|
9
|
-
org: "org",
|
|
10
|
-
dashboardPermissions: "dashboard-permissions"
|
|
11
|
-
};
|
|
12
|
-
function T(o = {}) {
|
|
13
|
-
return { ...o };
|
|
14
|
-
}
|
|
15
|
-
function y(o) {
|
|
16
|
-
const i = T(o.services);
|
|
17
|
-
return !(e.adminProfile in i) && o.cedrosLogin?.user && (i[e.adminProfile] = {
|
|
18
|
-
user: o.cedrosLogin.user
|
|
19
|
-
}), !(e.adminSectionAccess in i) && o.dashboardPermissions && (i[e.adminSectionAccess] = o.dashboardPermissions), !(e.cedrosLogin in i) && o.cedrosLogin && (i[e.cedrosLogin] = o.cedrosLogin), !(e.cedrosPay in i) && o.cedrosPay && (i[e.cedrosPay] = o.cedrosPay), !(e.org in i) && o.org && (i[e.org] = o.org), !(e.dashboardPermissions in i) && o.dashboardPermissions && (i[e.dashboardPermissions] = o.dashboardPermissions), i;
|
|
20
|
-
}
|
|
21
|
-
function a(o, i) {
|
|
22
|
-
return E(y(o), i);
|
|
23
|
-
}
|
|
24
|
-
function E(o, i) {
|
|
25
|
-
return o[i];
|
|
26
|
-
}
|
|
27
|
-
const r = (o) => S(async () => {
|
|
28
|
-
const t = (await o()).default;
|
|
29
|
-
return { default: ({ pluginContext: s }) => {
|
|
30
|
-
const c = s.getAccessToken(), u = s.hasPermission("cedros-pay:admin") || s.hasPermission("admin"), l = P(() => {
|
|
31
|
-
const p = new b(s.serverUrl);
|
|
32
|
-
return p.setCedrosLoginAuth(c ?? null, u), p;
|
|
33
|
-
}, [u, s.serverUrl, c]), m = {
|
|
34
|
-
serverUrl: s.serverUrl,
|
|
35
|
-
authManager: l
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ f(t, { ...m });
|
|
38
|
-
} };
|
|
39
|
-
}), q = {
|
|
40
|
-
id: "cedros-pay",
|
|
41
|
-
name: "Cedros Pay",
|
|
42
|
-
version: "1.0.0",
|
|
43
|
-
sections: [
|
|
44
|
-
// Store group (main cedros-pay sections)
|
|
45
|
-
{ id: "transactions", label: "Transactions", icon: n.transactions, group: "Store", order: 0 },
|
|
46
|
-
{ id: "products", label: "Products", icon: n.products, group: "Store", order: 1 },
|
|
47
|
-
{ id: "subscriptions", label: "Subscriptions", icon: n.products, group: "Store", order: 2 },
|
|
48
|
-
{ id: "coupons", label: "Coupons", icon: n.coupons, group: "Store", order: 3 },
|
|
49
|
-
{ id: "refunds", label: "Refunds", icon: n.refunds, group: "Store", order: 4 },
|
|
50
|
-
{ id: "compliance", label: "Compliance", icon: n.settings, group: "Store", order: 5 },
|
|
51
|
-
// Configuration group
|
|
52
|
-
{ id: "storefront", label: "Storefront", icon: n.products, group: "Configuration", order: 10 },
|
|
53
|
-
{ id: "ai-settings", label: "Store AI", icon: n.settings, group: "Configuration", order: 11 },
|
|
54
|
-
{ id: "faqs", label: "Knowledge Base", icon: n.settings, group: "Configuration", order: 12 },
|
|
55
|
-
{ id: "payment-settings", label: "Payment Options", icon: n.wallet, group: "Configuration", order: 13 },
|
|
56
|
-
{ id: "messaging", label: "Store Messages", icon: n.settings, group: "Configuration", order: 14 },
|
|
57
|
-
{ id: "settings", label: "Store Server", icon: n.settings, group: "Configuration", order: 15 }
|
|
58
|
-
],
|
|
59
|
-
groups: [
|
|
60
|
-
{ id: "Store", label: "Store", order: 1 },
|
|
61
|
-
{ id: "Configuration", label: "Configuration", order: 2, defaultCollapsed: !0 }
|
|
62
|
-
],
|
|
63
|
-
components: {
|
|
64
|
-
products: r(() => import("./sections-CRaMa8ZB.mjs").then((o) => ({ default: o.ProductsSection }))),
|
|
65
|
-
subscriptions: r(() => import("./SubscriptionsSection-Ci_AZrWA.mjs").then((o) => ({ default: o.SubscriptionsSection }))),
|
|
66
|
-
transactions: r(() => import("./sections-CRaMa8ZB.mjs").then((o) => ({ default: o.TransactionsSection }))),
|
|
67
|
-
coupons: r(() => import("./sections-CRaMa8ZB.mjs").then((o) => ({ default: o.CouponsSection }))),
|
|
68
|
-
refunds: r(() => import("./sections-CRaMa8ZB.mjs").then((o) => ({ default: o.RefundsSection }))),
|
|
69
|
-
compliance: r(() => import("./ComplianceSection-BMnb1p4w.mjs").then((o) => ({ default: o.ComplianceSection }))),
|
|
70
|
-
storefront: r(() => import("./StorefrontSection-uXSVbEAa.mjs").then((o) => ({ default: o.StorefrontSection }))),
|
|
71
|
-
"ai-settings": r(() => import("./AISettingsSection-BMh3hAb5.mjs").then((o) => ({ default: o.AISettingsSection }))),
|
|
72
|
-
faqs: r(() => import("./FAQSection-Di2xE9Sm.mjs").then((o) => ({ default: o.FAQSection }))),
|
|
73
|
-
"payment-settings": r(() => import("./PaymentSettingsSection-52iw47Su.mjs").then((o) => ({ default: o.PaymentSettingsSection }))),
|
|
74
|
-
messaging: r(() => import("./MessagingSection-BLCnCpEv.mjs").then((o) => ({ default: o.MessagingSection }))),
|
|
75
|
-
settings: r(() => import("./SettingsSection-vK9WIwXE.mjs").then((o) => ({ default: o.SettingsSection })))
|
|
76
|
-
},
|
|
77
|
-
createPluginContext(o) {
|
|
78
|
-
const i = a(
|
|
79
|
-
o,
|
|
80
|
-
e.cedrosPay
|
|
81
|
-
), d = a(
|
|
82
|
-
o,
|
|
83
|
-
e.cedrosLogin
|
|
84
|
-
), t = a(o, e.org);
|
|
85
|
-
return {
|
|
86
|
-
serverUrl: i?.serverUrl || d?.serverUrl || "",
|
|
87
|
-
userId: d?.user?.id,
|
|
88
|
-
getAccessToken: () => d?.getAccessToken?.() || i?.jwtToken || null,
|
|
89
|
-
hasPermission: (s) => this.checkPermission(s, o),
|
|
90
|
-
orgId: t?.orgId,
|
|
91
|
-
pluginData: {
|
|
92
|
-
walletAddress: i?.walletAddress
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
checkPermission(o, i) {
|
|
97
|
-
const d = a(i, e.org);
|
|
98
|
-
return d?.permissions ? d.permissions.includes(o) : !1;
|
|
99
|
-
},
|
|
100
|
-
cssNamespace: "cedros-dashboard"
|
|
101
|
-
}, I = [
|
|
102
|
-
// ── Store group ──
|
|
103
|
-
{ id: "transactions", qualifiedId: "cedros-pay:transactions", label: "Transactions", group: "Store", order: 0, endpoints: ["GET /admin/transactions"] },
|
|
104
|
-
{ id: "products", qualifiedId: "cedros-pay:products", label: "Products", group: "Store", order: 1, endpoints: ["GET /admin/products", "POST /admin/products", "PUT /admin/products/{id}", "DELETE /admin/products/{id}"] },
|
|
105
|
-
{ id: "subscriptions", qualifiedId: "cedros-pay:subscriptions", label: "Subscriptions", group: "Store", order: 2, endpoints: ["GET /admin/subscriptions", "POST /admin/subscriptions", "PUT /admin/subscriptions/{id}"] },
|
|
106
|
-
{ id: "coupons", qualifiedId: "cedros-pay:coupons", label: "Coupons", group: "Store", order: 3, endpoints: ["GET /admin/coupons", "POST /admin/coupons", "PUT /admin/coupons/{id}", "DELETE /admin/coupons/{id}"] },
|
|
107
|
-
{ id: "refunds", qualifiedId: "cedros-pay:refunds", label: "Refunds", group: "Store", order: 4, endpoints: ["GET /admin/refunds", "POST /admin/refunds/{id}/approve", "POST /admin/refunds/{id}/deny"] },
|
|
108
|
-
// ── Configuration group ──
|
|
109
|
-
{ id: "storefront", qualifiedId: "cedros-pay:storefront", label: "Storefront", group: "Configuration", order: 10, endpoints: ["GET /admin/config/shop", "PUT /admin/config/shop"] },
|
|
110
|
-
{ id: "ai-settings", qualifiedId: "cedros-pay:ai-settings", label: "Store AI", group: "Configuration", order: 11, endpoints: ["GET /admin/config/ai", "PUT /admin/config/ai/api-key", "PUT /admin/config/ai/assignment", "PUT /admin/config/ai/prompt"] },
|
|
111
|
-
{ id: "faqs", qualifiedId: "cedros-pay:faqs", label: "Knowledge Base", group: "Configuration", order: 12, endpoints: ["GET /admin/faqs", "POST /admin/faqs", "PUT /admin/faqs/{id}", "DELETE /admin/faqs/{id}"] },
|
|
112
|
-
{ id: "payment-settings", qualifiedId: "cedros-pay:payment-settings", label: "Payment Options", group: "Configuration", order: 13, endpoints: ["GET /admin/config/stripe", "PUT /admin/config/stripe", "GET /admin/config/x402", "PUT /admin/config/x402", "GET /admin/config/cedros_login", "PUT /admin/config/cedros_login"] },
|
|
113
|
-
{ id: "messaging", qualifiedId: "cedros-pay:messaging", label: "Store Messages", group: "Configuration", order: 14, endpoints: ["GET /admin/config/messaging", "PUT /admin/config/messaging"] },
|
|
114
|
-
{ id: "settings", qualifiedId: "cedros-pay:settings", label: "Store Server", group: "Configuration", order: 15, endpoints: ["GET /admin/config/server", "PUT /admin/config/server"] }
|
|
115
|
-
], v = I.map((o) => o.qualifiedId), h = [
|
|
116
|
-
{ id: "Store", label: "Store", order: 1, defaultCollapsed: !1 },
|
|
117
|
-
{ id: "Configuration", label: "Configuration", order: 2, defaultCollapsed: !0 }
|
|
118
|
-
];
|
|
119
|
-
export {
|
|
120
|
-
h as C,
|
|
121
|
-
I as a,
|
|
122
|
-
v as b,
|
|
123
|
-
q as c
|
|
124
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./sections-more-Cgw2qJlA.js");exports.CouponsSection=t.CouponsSection;exports.ProductsSection=t.ProductsSection;exports.RefundsSection=t.RefundsSection;exports.SettingsSection=t.SettingsSection;exports.TransactionsSection=t.TransactionsSection;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { R as t, C as s, T as n, P as e } from "./sections-more-Ixw6mM6R.mjs";
|
|
2
|
-
import { S as c } from "./sections-more-Ixw6mM6R.mjs";
|
|
3
|
-
export {
|
|
4
|
-
s as CouponsSection,
|
|
5
|
-
e as ProductsSection,
|
|
6
|
-
t as RefundsSection,
|
|
7
|
-
c as SettingsSection,
|
|
8
|
-
n as TransactionsSection
|
|
9
|
-
};
|