@burdenoff/microfe-subscriberbot 2026.706.2 → 2026.706.3
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/subscriberbot/SubscriberBotRoutes.js +14 -6
- package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
- package/dist/subscriberbot/components/index.js +7 -0
- package/dist/subscriberbot/components/viz.js +196 -0
- package/dist/subscriberbot/components/viz.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +38 -30
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +182 -0
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -0
- package/dist/subscriberbot/pages/DashboardPage.js +272 -199
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +517 -234
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +220 -0
- package/dist/subscriberbot/pages/InsightsPage.js.map +1 -0
- package/dist/subscriberbot/pages/InvoicesPage.js +325 -237
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/WorkflowsPage.js +301 -112
- package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +311 -165
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +183 -93
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +426 -293
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +217 -153
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +215 -112
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +542 -428
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +242 -192
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +174 -133
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
2
|
+
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
+
import { formatCurrency as r, formatEnumLabel as i, formatIntervalSuffix as a } from "../../utils/formatters.js";
|
|
5
|
+
import { StatusBadge as o } from "../../components/StatusBadge.js";
|
|
6
|
+
import { EmptyState as s } from "../../components/EmptyState.js";
|
|
7
|
+
import { Modal as c } from "../../components/Modal.js";
|
|
8
|
+
import { ErrorView as l, LoadingView as u, Section as d } from "../../components/StateViews.js";
|
|
9
|
+
import { Gauge as f, MiniProgress as p } from "../../components/viz.js";
|
|
10
|
+
import "../../components/index.js";
|
|
11
|
+
import { useArchiveProvider as m, useCreatePlan as h, useProvider as g, useUpdateProvider as _ } from "../../hooks/useSubscriberBotApi.js";
|
|
12
|
+
import { useState as v } from "react";
|
|
13
|
+
import { Archive as y, ArrowLeft as b, Building2 as x, Check as S, Globe as C, Layers as w, Pencil as T, Plus as E, ShieldCheck as D, Sparkles as O, Tag as k, TrendingDown as A } from "lucide-react";
|
|
14
|
+
import { useParams as j } from "react-router-dom";
|
|
15
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
16
|
+
import { GlassCard as F } from "@burdenoff/fe-libs/ui";
|
|
14
17
|
//#region src/subscriberbot/pages/providers/ProviderDetailPage.tsx
|
|
15
|
-
var
|
|
18
|
+
var I = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", L = "mb-1 block text-xs font-medium text-text-secondary", R = [
|
|
16
19
|
"SAAS",
|
|
17
20
|
"AI_SERVICE",
|
|
18
21
|
"STREAMING",
|
|
@@ -29,12 +32,12 @@ var k = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
29
32
|
"LICENSE",
|
|
30
33
|
"CONTRACT",
|
|
31
34
|
"OTHER"
|
|
32
|
-
],
|
|
35
|
+
], z = [
|
|
33
36
|
"UNVERIFIED",
|
|
34
37
|
"VERIFIED",
|
|
35
38
|
"CLAIMED",
|
|
36
39
|
"DEPRECATED"
|
|
37
|
-
],
|
|
40
|
+
], B = [
|
|
38
41
|
"MONTHLY",
|
|
39
42
|
"YEARLY",
|
|
40
43
|
"QUARTERLY",
|
|
@@ -44,27 +47,54 @@ var k = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
44
47
|
"LIFETIME",
|
|
45
48
|
"FREE"
|
|
46
49
|
];
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
function V(e) {
|
|
51
|
+
return e >= 70 ? {
|
|
52
|
+
label: "Healthy",
|
|
53
|
+
cls: "bg-status-success-bg-subtle text-status-success-text"
|
|
54
|
+
} : e >= 45 ? {
|
|
55
|
+
label: "Fair",
|
|
56
|
+
cls: "bg-status-warning-bg-subtle text-status-warning-text"
|
|
57
|
+
} : {
|
|
58
|
+
label: "At risk",
|
|
59
|
+
cls: "bg-status-error-bg-subtle text-status-error-text"
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function H(e) {
|
|
63
|
+
return e >= 67 ? {
|
|
64
|
+
label: "High",
|
|
65
|
+
chip: "bg-status-error-bg-subtle text-status-error-text",
|
|
66
|
+
tone: "negative"
|
|
67
|
+
} : e >= 34 ? {
|
|
68
|
+
label: "Moderate",
|
|
69
|
+
chip: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
70
|
+
tone: "warning"
|
|
71
|
+
} : {
|
|
72
|
+
label: "Low",
|
|
73
|
+
chip: "bg-status-success-bg-subtle text-status-success-text",
|
|
74
|
+
tone: "positive"
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function U({ provider: e, onClose: t }) {
|
|
78
|
+
let n = _(), [r, i] = v(e.name), [a, o] = v(e.category), [s, l] = v(e.status), [u, d] = v(e.description ?? ""), [f, p] = v(e.industry ?? ""), [m, h] = v(e.region ?? ""), [g, y] = v(e.language ?? ""), [b, x] = v(e.websiteUrl ?? ""), [S, C] = v(e.churnRiskScore == null ? "" : String(e.churnRiskScore)), [w, T] = v(e.vendorHealthScore == null ? "" : String(e.vendorHealthScore)), [E, D] = v(e.tags.join(", ")), [O, k] = v(null);
|
|
79
|
+
return /* @__PURE__ */ N(c, {
|
|
50
80
|
title: "Edit provider",
|
|
51
81
|
onClose: t,
|
|
52
82
|
maxWidthClassName: "max-w-2xl",
|
|
53
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ P("form", {
|
|
54
84
|
onSubmit: (i) => {
|
|
55
|
-
if (i.preventDefault(),
|
|
56
|
-
|
|
85
|
+
if (i.preventDefault(), k(null), !r.trim()) {
|
|
86
|
+
k("A provider name is required.");
|
|
57
87
|
return;
|
|
58
88
|
}
|
|
59
|
-
let o =
|
|
89
|
+
let o = E.split(",").map((e) => e.trim()).filter(Boolean), c = {
|
|
60
90
|
name: r.trim(),
|
|
61
91
|
category: a,
|
|
62
92
|
status: s,
|
|
63
|
-
description:
|
|
93
|
+
description: u.trim(),
|
|
64
94
|
tags: o,
|
|
65
|
-
...
|
|
66
|
-
...
|
|
67
|
-
...
|
|
95
|
+
...f.trim() ? { industry: f.trim() } : {},
|
|
96
|
+
...m.trim() ? { region: m.trim() } : {},
|
|
97
|
+
...g.trim() ? { language: g.trim() } : {},
|
|
68
98
|
...b.trim() ? { websiteUrl: b.trim() } : {},
|
|
69
99
|
...S.trim() ? { churnRiskScore: Number(S) } : {},
|
|
70
100
|
...w.trim() ? { vendorHealthScore: Number(w) } : {}
|
|
@@ -74,171 +104,171 @@ function P({ provider: e, onClose: t }) {
|
|
|
74
104
|
input: c
|
|
75
105
|
}, {
|
|
76
106
|
onSuccess: () => t(),
|
|
77
|
-
onError: (e) =>
|
|
107
|
+
onError: (e) => k(e instanceof Error ? e.message : "Could not update provider.")
|
|
78
108
|
});
|
|
79
109
|
},
|
|
80
110
|
className: "space-y-4",
|
|
81
111
|
children: [
|
|
82
|
-
|
|
112
|
+
O && /* @__PURE__ */ N("div", {
|
|
83
113
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
84
|
-
children:
|
|
114
|
+
children: O
|
|
85
115
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
|
|
87
117
|
htmlFor: "prov-edit-name",
|
|
88
|
-
className:
|
|
89
|
-
children: ["Name ", /* @__PURE__ */
|
|
118
|
+
className: L,
|
|
119
|
+
children: ["Name ", /* @__PURE__ */ N("span", {
|
|
90
120
|
className: "text-status-error-text",
|
|
91
121
|
children: "*"
|
|
92
122
|
})]
|
|
93
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ N("input", {
|
|
94
124
|
id: "prov-edit-name",
|
|
95
125
|
type: "text",
|
|
96
126
|
value: r,
|
|
97
127
|
onChange: (e) => i(e.target.value),
|
|
98
|
-
className:
|
|
128
|
+
className: I,
|
|
99
129
|
required: !0
|
|
100
130
|
})] }),
|
|
101
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ P("div", {
|
|
102
132
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
104
134
|
htmlFor: "prov-edit-category",
|
|
105
|
-
className:
|
|
135
|
+
className: L,
|
|
106
136
|
children: "Category"
|
|
107
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ N("select", {
|
|
108
138
|
id: "prov-edit-category",
|
|
109
139
|
value: a,
|
|
110
140
|
onChange: (e) => o(e.target.value),
|
|
111
|
-
className:
|
|
112
|
-
children:
|
|
141
|
+
className: I,
|
|
142
|
+
children: R.map((e) => /* @__PURE__ */ N("option", {
|
|
113
143
|
value: e,
|
|
114
144
|
children: e.replace(/_/g, " ")
|
|
115
145
|
}, e))
|
|
116
|
-
})] }), /* @__PURE__ */
|
|
146
|
+
})] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
117
147
|
htmlFor: "prov-edit-status",
|
|
118
|
-
className:
|
|
148
|
+
className: L,
|
|
119
149
|
children: "Status"
|
|
120
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ N("select", {
|
|
121
151
|
id: "prov-edit-status",
|
|
122
152
|
value: s,
|
|
123
|
-
onChange: (e) =>
|
|
124
|
-
className:
|
|
125
|
-
children:
|
|
153
|
+
onChange: (e) => l(e.target.value),
|
|
154
|
+
className: I,
|
|
155
|
+
children: z.map((e) => /* @__PURE__ */ N("option", {
|
|
126
156
|
value: e,
|
|
127
157
|
children: e.replace(/_/g, " ")
|
|
128
158
|
}, e))
|
|
129
159
|
})] })]
|
|
130
160
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ P("div", {
|
|
132
162
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
133
163
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
135
165
|
htmlFor: "prov-edit-industry",
|
|
136
|
-
className:
|
|
166
|
+
className: L,
|
|
137
167
|
children: "Industry"
|
|
138
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ N("input", {
|
|
139
169
|
id: "prov-edit-industry",
|
|
140
170
|
type: "text",
|
|
141
|
-
value:
|
|
142
|
-
onChange: (e) =>
|
|
143
|
-
className:
|
|
171
|
+
value: f,
|
|
172
|
+
onChange: (e) => p(e.target.value),
|
|
173
|
+
className: I
|
|
144
174
|
})] }),
|
|
145
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
146
176
|
htmlFor: "prov-edit-region",
|
|
147
|
-
className:
|
|
177
|
+
className: L,
|
|
148
178
|
children: "Region"
|
|
149
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ N("input", {
|
|
150
180
|
id: "prov-edit-region",
|
|
151
181
|
type: "text",
|
|
152
|
-
value:
|
|
153
|
-
onChange: (e) =>
|
|
154
|
-
className:
|
|
182
|
+
value: m,
|
|
183
|
+
onChange: (e) => h(e.target.value),
|
|
184
|
+
className: I
|
|
155
185
|
})] }),
|
|
156
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
157
187
|
htmlFor: "prov-edit-language",
|
|
158
|
-
className:
|
|
188
|
+
className: L,
|
|
159
189
|
children: "Language"
|
|
160
|
-
}), /* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ N("input", {
|
|
161
191
|
id: "prov-edit-language",
|
|
162
192
|
type: "text",
|
|
163
|
-
value:
|
|
193
|
+
value: g,
|
|
164
194
|
onChange: (e) => y(e.target.value),
|
|
165
|
-
className:
|
|
195
|
+
className: I
|
|
166
196
|
})] })
|
|
167
197
|
]
|
|
168
198
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
170
200
|
htmlFor: "prov-edit-website",
|
|
171
|
-
className:
|
|
201
|
+
className: L,
|
|
172
202
|
children: "Website"
|
|
173
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ N("input", {
|
|
174
204
|
id: "prov-edit-website",
|
|
175
205
|
type: "url",
|
|
176
206
|
value: b,
|
|
177
207
|
onChange: (e) => x(e.target.value),
|
|
178
208
|
placeholder: "https://…",
|
|
179
|
-
className:
|
|
209
|
+
className: I
|
|
180
210
|
})] }),
|
|
181
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
182
212
|
htmlFor: "prov-edit-desc",
|
|
183
|
-
className:
|
|
213
|
+
className: L,
|
|
184
214
|
children: "Description"
|
|
185
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ N("textarea", {
|
|
186
216
|
id: "prov-edit-desc",
|
|
187
|
-
value:
|
|
188
|
-
onChange: (e) =>
|
|
217
|
+
value: u,
|
|
218
|
+
onChange: (e) => d(e.target.value),
|
|
189
219
|
rows: 3,
|
|
190
|
-
className:
|
|
220
|
+
className: I
|
|
191
221
|
})] }),
|
|
192
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ P("div", {
|
|
193
223
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
195
225
|
htmlFor: "prov-edit-churn",
|
|
196
|
-
className:
|
|
226
|
+
className: L,
|
|
197
227
|
children: "Churn risk (0–100)"
|
|
198
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ N("input", {
|
|
199
229
|
id: "prov-edit-churn",
|
|
200
230
|
type: "number",
|
|
201
231
|
min: "0",
|
|
202
232
|
max: "100",
|
|
203
233
|
value: S,
|
|
204
234
|
onChange: (e) => C(e.target.value),
|
|
205
|
-
className:
|
|
206
|
-
})] }), /* @__PURE__ */
|
|
235
|
+
className: I
|
|
236
|
+
})] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
207
237
|
htmlFor: "prov-edit-health",
|
|
208
|
-
className:
|
|
238
|
+
className: L,
|
|
209
239
|
children: "Vendor health (0–100)"
|
|
210
|
-
}), /* @__PURE__ */
|
|
240
|
+
}), /* @__PURE__ */ N("input", {
|
|
211
241
|
id: "prov-edit-health",
|
|
212
242
|
type: "number",
|
|
213
243
|
min: "0",
|
|
214
244
|
max: "100",
|
|
215
245
|
value: w,
|
|
216
246
|
onChange: (e) => T(e.target.value),
|
|
217
|
-
className:
|
|
247
|
+
className: I
|
|
218
248
|
})] })]
|
|
219
249
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
|
|
221
251
|
htmlFor: "prov-edit-tags",
|
|
222
|
-
className:
|
|
223
|
-
children: ["Tags ", /* @__PURE__ */
|
|
252
|
+
className: L,
|
|
253
|
+
children: ["Tags ", /* @__PURE__ */ N("span", {
|
|
224
254
|
className: "text-text-secondary",
|
|
225
255
|
children: "(comma-separated)"
|
|
226
256
|
})]
|
|
227
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ N("input", {
|
|
228
258
|
id: "prov-edit-tags",
|
|
229
259
|
type: "text",
|
|
230
|
-
value:
|
|
231
|
-
onChange: (e) =>
|
|
232
|
-
className:
|
|
260
|
+
value: E,
|
|
261
|
+
onChange: (e) => D(e.target.value),
|
|
262
|
+
className: I
|
|
233
263
|
})] }),
|
|
234
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ P("div", {
|
|
235
265
|
className: "flex justify-end gap-3",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ N("button", {
|
|
237
267
|
type: "button",
|
|
238
268
|
onClick: t,
|
|
239
269
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
240
270
|
children: "Cancel"
|
|
241
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ N("button", {
|
|
242
272
|
type: "submit",
|
|
243
273
|
disabled: n.isPending,
|
|
244
274
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
@@ -249,23 +279,23 @@ function P({ provider: e, onClose: t }) {
|
|
|
249
279
|
})
|
|
250
280
|
});
|
|
251
281
|
}
|
|
252
|
-
function
|
|
253
|
-
let n =
|
|
254
|
-
return /* @__PURE__ */
|
|
282
|
+
function W({ providerId: e, onClose: t }) {
|
|
283
|
+
let n = h(), [r, i] = v(""), [a, o] = v(""), [s, l] = v("USD"), [u, d] = v("MONTHLY"), [f, p] = v(""), [m, g] = v(""), [_, y] = v(!0), [b, x] = v(null);
|
|
284
|
+
return /* @__PURE__ */ N(c, {
|
|
255
285
|
title: "Add plan",
|
|
256
286
|
onClose: t,
|
|
257
287
|
maxWidthClassName: "max-w-xl",
|
|
258
|
-
children: /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ P("form", {
|
|
259
289
|
onSubmit: (i) => {
|
|
260
290
|
if (i.preventDefault(), x(null), !r.trim()) {
|
|
261
291
|
x("A plan name is required.");
|
|
262
292
|
return;
|
|
263
293
|
}
|
|
264
|
-
let o =
|
|
294
|
+
let o = m.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
265
295
|
n.mutate({
|
|
266
296
|
providerId: e,
|
|
267
297
|
name: r.trim(),
|
|
268
|
-
interval:
|
|
298
|
+
interval: u,
|
|
269
299
|
currency: s.trim() || "USD",
|
|
270
300
|
...a.trim() ? { amount: Number(a) } : {},
|
|
271
301
|
...f.trim() ? { description: f.trim() } : {},
|
|
@@ -277,34 +307,34 @@ function F({ providerId: e, onClose: t }) {
|
|
|
277
307
|
},
|
|
278
308
|
className: "space-y-4",
|
|
279
309
|
children: [
|
|
280
|
-
b && /* @__PURE__ */
|
|
310
|
+
b && /* @__PURE__ */ N("div", {
|
|
281
311
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
282
312
|
children: b
|
|
283
313
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
|
|
285
315
|
htmlFor: "plan-name",
|
|
286
|
-
className:
|
|
287
|
-
children: ["Name ", /* @__PURE__ */
|
|
316
|
+
className: L,
|
|
317
|
+
children: ["Name ", /* @__PURE__ */ N("span", {
|
|
288
318
|
className: "text-status-error-text",
|
|
289
319
|
children: "*"
|
|
290
320
|
})]
|
|
291
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ N("input", {
|
|
292
322
|
id: "plan-name",
|
|
293
323
|
type: "text",
|
|
294
324
|
value: r,
|
|
295
325
|
onChange: (e) => i(e.target.value),
|
|
296
326
|
placeholder: "e.g. Pro, Team, Enterprise",
|
|
297
|
-
className:
|
|
327
|
+
className: I,
|
|
298
328
|
required: !0
|
|
299
329
|
})] }),
|
|
300
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ P("div", {
|
|
301
331
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
302
332
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
304
334
|
htmlFor: "plan-amount",
|
|
305
|
-
className:
|
|
335
|
+
className: L,
|
|
306
336
|
children: "Amount"
|
|
307
|
-
}), /* @__PURE__ */
|
|
337
|
+
}), /* @__PURE__ */ N("input", {
|
|
308
338
|
id: "plan-amount",
|
|
309
339
|
type: "number",
|
|
310
340
|
min: "0",
|
|
@@ -312,79 +342,79 @@ function F({ providerId: e, onClose: t }) {
|
|
|
312
342
|
value: a,
|
|
313
343
|
onChange: (e) => o(e.target.value),
|
|
314
344
|
placeholder: "0.00",
|
|
315
|
-
className:
|
|
345
|
+
className: I
|
|
316
346
|
})] }),
|
|
317
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
318
348
|
htmlFor: "plan-currency",
|
|
319
|
-
className:
|
|
349
|
+
className: L,
|
|
320
350
|
children: "Currency"
|
|
321
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ N("input", {
|
|
322
352
|
id: "plan-currency",
|
|
323
353
|
type: "text",
|
|
324
354
|
value: s,
|
|
325
|
-
onChange: (e) =>
|
|
355
|
+
onChange: (e) => l(e.target.value.toUpperCase()),
|
|
326
356
|
maxLength: 3,
|
|
327
|
-
className:
|
|
357
|
+
className: I
|
|
328
358
|
})] }),
|
|
329
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
330
360
|
htmlFor: "plan-interval",
|
|
331
|
-
className:
|
|
361
|
+
className: L,
|
|
332
362
|
children: "Interval"
|
|
333
|
-
}), /* @__PURE__ */
|
|
363
|
+
}), /* @__PURE__ */ N("select", {
|
|
334
364
|
id: "plan-interval",
|
|
335
|
-
value:
|
|
336
|
-
onChange: (e) =>
|
|
337
|
-
className:
|
|
338
|
-
children:
|
|
365
|
+
value: u,
|
|
366
|
+
onChange: (e) => d(e.target.value),
|
|
367
|
+
className: I,
|
|
368
|
+
children: B.map((e) => /* @__PURE__ */ N("option", {
|
|
339
369
|
value: e,
|
|
340
370
|
children: e.replace(/_/g, " ")
|
|
341
371
|
}, e))
|
|
342
372
|
})] })
|
|
343
373
|
]
|
|
344
374
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
|
|
346
376
|
htmlFor: "plan-desc",
|
|
347
|
-
className:
|
|
377
|
+
className: L,
|
|
348
378
|
children: "Description"
|
|
349
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ N("textarea", {
|
|
350
380
|
id: "plan-desc",
|
|
351
381
|
value: f,
|
|
352
382
|
onChange: (e) => p(e.target.value),
|
|
353
383
|
rows: 2,
|
|
354
|
-
className:
|
|
384
|
+
className: I
|
|
355
385
|
})] }),
|
|
356
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
|
|
357
387
|
htmlFor: "plan-features",
|
|
358
|
-
className:
|
|
359
|
-
children: ["Features ", /* @__PURE__ */
|
|
388
|
+
className: L,
|
|
389
|
+
children: ["Features ", /* @__PURE__ */ N("span", {
|
|
360
390
|
className: "text-text-secondary",
|
|
361
391
|
children: "(one per line)"
|
|
362
392
|
})]
|
|
363
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ N("textarea", {
|
|
364
394
|
id: "plan-features",
|
|
365
|
-
value:
|
|
366
|
-
onChange: (e) =>
|
|
395
|
+
value: m,
|
|
396
|
+
onChange: (e) => g(e.target.value),
|
|
367
397
|
rows: 3,
|
|
368
398
|
placeholder: "Unlimited projects\nPriority support\nSSO",
|
|
369
|
-
className:
|
|
399
|
+
className: I
|
|
370
400
|
})] }),
|
|
371
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ P("label", {
|
|
372
402
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ N("input", {
|
|
374
404
|
type: "checkbox",
|
|
375
|
-
checked:
|
|
405
|
+
checked: _,
|
|
376
406
|
onChange: (e) => y(e.target.checked),
|
|
377
407
|
className: "size-4 rounded border-border-subtle"
|
|
378
408
|
}), "Active"]
|
|
379
409
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ P("div", {
|
|
381
411
|
className: "flex justify-end gap-3",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ N("button", {
|
|
383
413
|
type: "button",
|
|
384
414
|
onClick: t,
|
|
385
415
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
386
416
|
children: "Cancel"
|
|
387
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ N("button", {
|
|
388
418
|
type: "submit",
|
|
389
419
|
disabled: n.isPending,
|
|
390
420
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
|
|
@@ -395,37 +425,37 @@ function F({ providerId: e, onClose: t }) {
|
|
|
395
425
|
})
|
|
396
426
|
});
|
|
397
427
|
}
|
|
398
|
-
function
|
|
399
|
-
let { navigateTo: r } = e(), i =
|
|
400
|
-
return /* @__PURE__ */
|
|
428
|
+
function G({ provider: t, onClose: n }) {
|
|
429
|
+
let { navigateTo: r } = e(), i = m(), [a, o] = v(null);
|
|
430
|
+
return /* @__PURE__ */ N(c, {
|
|
401
431
|
title: "Archive provider",
|
|
402
432
|
onClose: n,
|
|
403
|
-
children: /* @__PURE__ */
|
|
433
|
+
children: /* @__PURE__ */ P("div", {
|
|
404
434
|
className: "space-y-4",
|
|
405
435
|
children: [
|
|
406
|
-
a && /* @__PURE__ */
|
|
436
|
+
a && /* @__PURE__ */ N("div", {
|
|
407
437
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
408
438
|
children: a
|
|
409
439
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ P("p", {
|
|
411
441
|
className: "text-sm text-text-secondary",
|
|
412
442
|
children: [
|
|
413
443
|
"Archive ",
|
|
414
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ N("span", {
|
|
415
445
|
className: "font-medium text-text-primary",
|
|
416
446
|
children: t.name
|
|
417
447
|
}),
|
|
418
448
|
"? It will be removed from the active registry. This can be reversed by an administrator."
|
|
419
449
|
]
|
|
420
450
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ P("div", {
|
|
422
452
|
className: "flex justify-end gap-3",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ N("button", {
|
|
424
454
|
type: "button",
|
|
425
455
|
onClick: n,
|
|
426
456
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
427
457
|
children: "Cancel"
|
|
428
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ N("button", {
|
|
429
459
|
type: "button",
|
|
430
460
|
onClick: () => {
|
|
431
461
|
o(null), i.mutate(t.id, {
|
|
@@ -442,205 +472,308 @@ function I({ provider: t, onClose: n }) {
|
|
|
442
472
|
})
|
|
443
473
|
});
|
|
444
474
|
}
|
|
445
|
-
function
|
|
446
|
-
let { id:
|
|
447
|
-
if (
|
|
475
|
+
function K() {
|
|
476
|
+
let { id: c } = j(), { navigateTo: m } = e(), { data: h, isLoading: _, isError: I, refetch: L } = g(c), [R, z] = v(!1), [B, K] = v(!1), [q, J] = v(!1);
|
|
477
|
+
if (_) return /* @__PURE__ */ N(n, {
|
|
448
478
|
title: "Provider",
|
|
449
|
-
children: /* @__PURE__ */
|
|
479
|
+
children: /* @__PURE__ */ N(u, { label: "Loading provider…" })
|
|
450
480
|
});
|
|
451
|
-
if (
|
|
481
|
+
if (I) return /* @__PURE__ */ N(n, {
|
|
452
482
|
title: "Provider",
|
|
453
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ N(l, {
|
|
454
484
|
message: "Could not load this provider.",
|
|
455
|
-
onRetry: () => void
|
|
485
|
+
onRetry: () => void L()
|
|
456
486
|
})
|
|
457
487
|
});
|
|
458
|
-
if (!
|
|
488
|
+
if (!h) return /* @__PURE__ */ N(n, {
|
|
459
489
|
title: "Provider",
|
|
460
|
-
children: /* @__PURE__ */
|
|
490
|
+
children: /* @__PURE__ */ N(s, {
|
|
461
491
|
illustration: "empty-data",
|
|
462
492
|
title: "Provider not found",
|
|
463
493
|
description: "It may have been removed, or you may not have access to it.",
|
|
464
|
-
action: /* @__PURE__ */
|
|
494
|
+
action: /* @__PURE__ */ N("button", {
|
|
465
495
|
type: "button",
|
|
466
|
-
onClick: () =>
|
|
496
|
+
onClick: () => m("/providers"),
|
|
467
497
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
468
498
|
children: "Back to providers"
|
|
469
499
|
})
|
|
470
500
|
})
|
|
471
501
|
});
|
|
472
|
-
let
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
title:
|
|
475
|
-
description:
|
|
476
|
-
actions: /* @__PURE__ */
|
|
502
|
+
let Y = h, X = Y.websiteUrl && /^https?:\/\//i.test(Y.websiteUrl) ? Y.websiteUrl : null, Z = Y.plans && Y.plans.length > 1 ? Y.plans.filter((e) => e.isActive && e.amount > 0).reduce((e, t) => e === null || t.amount < e.amount ? t : e, null)?.id ?? null : null;
|
|
503
|
+
return /* @__PURE__ */ P(n, {
|
|
504
|
+
title: Y.name,
|
|
505
|
+
description: i(Y.category),
|
|
506
|
+
actions: /* @__PURE__ */ P("div", {
|
|
477
507
|
className: "flex items-center gap-2",
|
|
478
508
|
children: [
|
|
479
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ P("button", {
|
|
480
510
|
type: "button",
|
|
481
|
-
onClick: () =>
|
|
511
|
+
onClick: () => z(!0),
|
|
482
512
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
483
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ N(T, { className: "h-4 w-4" }), " Edit"]
|
|
484
514
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ P("button", {
|
|
486
516
|
type: "button",
|
|
487
|
-
onClick: () =>
|
|
517
|
+
onClick: () => J(!0),
|
|
488
518
|
className: "inline-flex items-center gap-2 rounded-lg border border-status-error-text/30 px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ N(y, { className: "h-4 w-4" }), " Archive"]
|
|
490
520
|
}),
|
|
491
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ P("button", {
|
|
492
522
|
type: "button",
|
|
493
|
-
onClick: () =>
|
|
523
|
+
onClick: () => m("/providers"),
|
|
494
524
|
className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ N(b, { className: "h-4 w-4" }), " Back"]
|
|
496
526
|
})
|
|
497
527
|
]
|
|
498
528
|
}),
|
|
499
529
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
530
|
+
/* @__PURE__ */ P("div", {
|
|
501
531
|
className: "flex flex-wrap items-center gap-3",
|
|
502
532
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
className: "flex size-
|
|
505
|
-
children: /* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ N("span", {
|
|
534
|
+
className: "flex size-11 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
|
|
535
|
+
children: /* @__PURE__ */ N(x, { className: "h-5 w-5" })
|
|
536
|
+
}),
|
|
537
|
+
/* @__PURE__ */ N(o, { status: Y.status }),
|
|
538
|
+
Y.industry && /* @__PURE__ */ N("span", {
|
|
539
|
+
className: "text-sm text-text-secondary",
|
|
540
|
+
children: Y.industry
|
|
506
541
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
B.region && /* @__PURE__ */ E("span", {
|
|
542
|
+
Y.region && /* @__PURE__ */ P("span", {
|
|
509
543
|
className: "text-sm text-text-secondary",
|
|
510
|
-
children:
|
|
544
|
+
children: ["· ", Y.region]
|
|
511
545
|
}),
|
|
512
|
-
|
|
513
|
-
href:
|
|
546
|
+
X && /* @__PURE__ */ P("a", {
|
|
547
|
+
href: X,
|
|
514
548
|
target: "_blank",
|
|
515
549
|
rel: "noopener noreferrer",
|
|
516
550
|
className: "inline-flex items-center gap-1 text-sm text-text-link hover:underline",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ N(C, { className: "h-3.5 w-3.5" }), " Website"]
|
|
518
552
|
})
|
|
519
553
|
]
|
|
520
554
|
}),
|
|
521
|
-
|
|
522
|
-
className: "mt-4 max-w-3xl text-sm text-text-secondary",
|
|
523
|
-
children:
|
|
524
|
-
}),
|
|
525
|
-
/* @__PURE__ */ D("div", {
|
|
526
|
-
className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
527
|
-
children: [
|
|
528
|
-
/* @__PURE__ */ D(O, {
|
|
529
|
-
treatment: "metric",
|
|
530
|
-
className: "p-4",
|
|
531
|
-
children: [/* @__PURE__ */ D("div", {
|
|
532
|
-
className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
|
|
533
|
-
children: [/* @__PURE__ */ E(S, { className: "h-3.5 w-3.5" }), " Vendor health"]
|
|
534
|
-
}), /* @__PURE__ */ E("p", {
|
|
535
|
-
className: "mt-1.5 text-lg font-semibold tabular-nums text-text-primary",
|
|
536
|
-
children: B.vendorHealthScore == null ? "—" : `${B.vendorHealthScore}/100`
|
|
537
|
-
})]
|
|
538
|
-
}),
|
|
539
|
-
/* @__PURE__ */ D(O, {
|
|
540
|
-
treatment: "metric",
|
|
541
|
-
className: "p-4",
|
|
542
|
-
children: [/* @__PURE__ */ D("div", {
|
|
543
|
-
className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
|
|
544
|
-
children: [/* @__PURE__ */ E(w, { className: "h-3.5 w-3.5" }), " Churn risk"]
|
|
545
|
-
}), /* @__PURE__ */ E("p", {
|
|
546
|
-
className: "mt-1.5 text-lg font-semibold tabular-nums text-text-primary",
|
|
547
|
-
children: B.churnRiskScore == null ? "—" : `${B.churnRiskScore}/100`
|
|
548
|
-
})]
|
|
549
|
-
}),
|
|
550
|
-
/* @__PURE__ */ D(O, {
|
|
551
|
-
treatment: "metric",
|
|
552
|
-
className: "p-4",
|
|
553
|
-
children: [/* @__PURE__ */ E("div", {
|
|
554
|
-
className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
|
|
555
|
-
children: "Industry"
|
|
556
|
-
}), /* @__PURE__ */ E("p", {
|
|
557
|
-
className: "mt-1.5 text-sm text-text-primary",
|
|
558
|
-
children: B.industry ?? "—"
|
|
559
|
-
})]
|
|
560
|
-
}),
|
|
561
|
-
/* @__PURE__ */ D(O, {
|
|
562
|
-
treatment: "metric",
|
|
563
|
-
className: "p-4",
|
|
564
|
-
children: [/* @__PURE__ */ E("div", {
|
|
565
|
-
className: "flex items-center gap-2 text-xs font-medium text-text-secondary",
|
|
566
|
-
children: "Language"
|
|
567
|
-
}), /* @__PURE__ */ E("p", {
|
|
568
|
-
className: "mt-1.5 text-sm text-text-primary",
|
|
569
|
-
children: B.language ?? "—"
|
|
570
|
-
})]
|
|
571
|
-
})
|
|
572
|
-
]
|
|
555
|
+
Y.description && /* @__PURE__ */ N("p", {
|
|
556
|
+
className: "mt-4 max-w-3xl text-sm leading-relaxed text-text-secondary",
|
|
557
|
+
children: Y.description
|
|
573
558
|
}),
|
|
574
|
-
|
|
575
|
-
className: "mt-
|
|
576
|
-
children: [/* @__PURE__ */
|
|
559
|
+
Y.tags.length > 0 && /* @__PURE__ */ P("div", {
|
|
560
|
+
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
561
|
+
children: [/* @__PURE__ */ N(k, { className: "h-3.5 w-3.5 text-text-secondary" }), Y.tags.map((e) => /* @__PURE__ */ N("span", {
|
|
577
562
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
578
563
|
children: e
|
|
579
564
|
}, e))]
|
|
580
565
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
566
|
+
/* @__PURE__ */ P("div", {
|
|
567
|
+
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
568
|
+
children: [/* @__PURE__ */ N("div", {
|
|
569
|
+
className: "lg:col-span-2",
|
|
570
|
+
children: /* @__PURE__ */ N(d, {
|
|
571
|
+
title: "Plans",
|
|
572
|
+
description: "Pricing this provider publishes",
|
|
573
|
+
action: /* @__PURE__ */ P("button", {
|
|
574
|
+
type: "button",
|
|
575
|
+
onClick: () => K(!0),
|
|
576
|
+
className: "inline-flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
577
|
+
children: [/* @__PURE__ */ N(E, { className: "h-3.5 w-3.5" }), " Add plan"]
|
|
578
|
+
}),
|
|
579
|
+
children: !Y.plans || Y.plans.length === 0 ? /* @__PURE__ */ N(s, {
|
|
580
|
+
illustration: "empty-data",
|
|
581
|
+
title: "No published plans",
|
|
582
|
+
description: "When this provider publishes plans, they'll appear here.",
|
|
583
|
+
action: /* @__PURE__ */ N("button", {
|
|
584
|
+
type: "button",
|
|
585
|
+
onClick: () => K(!0),
|
|
586
|
+
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
587
|
+
children: "Add plan"
|
|
588
|
+
})
|
|
589
|
+
}) : /* @__PURE__ */ N("div", {
|
|
590
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
591
|
+
children: Y.plans.map((e) => {
|
|
592
|
+
let t = e.id === Z && Y.plans.length > 1;
|
|
593
|
+
return /* @__PURE__ */ P(F, {
|
|
594
|
+
treatment: t ? "insight" : "metric",
|
|
595
|
+
glow: t,
|
|
596
|
+
className: "flex flex-col p-5",
|
|
597
|
+
children: [
|
|
598
|
+
/* @__PURE__ */ P("div", {
|
|
599
|
+
className: "flex items-start justify-between gap-2",
|
|
600
|
+
children: [/* @__PURE__ */ N("p", {
|
|
601
|
+
className: "text-sm font-semibold text-text-primary",
|
|
602
|
+
children: e.name
|
|
603
|
+
}), t ? /* @__PURE__ */ P("span", {
|
|
604
|
+
className: "inline-flex items-center gap-1 rounded-full bg-status-success-bg-subtle px-2 py-0.5 text-[11px] font-medium text-status-success-text",
|
|
605
|
+
children: [/* @__PURE__ */ N(O, { className: "h-3 w-3" }), " Best value"]
|
|
606
|
+
}) : /* @__PURE__ */ N(o, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
|
|
607
|
+
}),
|
|
608
|
+
/* @__PURE__ */ P("p", {
|
|
609
|
+
className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
|
|
610
|
+
children: [r(e.amount, e.currency), /* @__PURE__ */ N("span", {
|
|
611
|
+
className: "text-sm font-normal text-text-secondary",
|
|
612
|
+
children: a(e.interval)
|
|
613
|
+
})]
|
|
614
|
+
}),
|
|
615
|
+
e.description && /* @__PURE__ */ N("p", {
|
|
616
|
+
className: "mt-2 text-xs leading-relaxed text-text-secondary",
|
|
617
|
+
children: e.description
|
|
618
|
+
}),
|
|
619
|
+
e.features.length > 0 && /* @__PURE__ */ P("ul", {
|
|
620
|
+
className: "mt-4 space-y-2 border-t border-border-subtle pt-4",
|
|
621
|
+
children: [e.features.slice(0, 6).map((e) => /* @__PURE__ */ P("li", {
|
|
622
|
+
className: "flex items-start gap-2 text-xs text-text-secondary",
|
|
623
|
+
children: [/* @__PURE__ */ N(S, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-success-text" }), /* @__PURE__ */ N("span", { children: e })]
|
|
624
|
+
}, e)), e.features.length > 6 && /* @__PURE__ */ P("li", {
|
|
625
|
+
className: "pl-6 text-[11px] text-text-secondary",
|
|
626
|
+
children: [
|
|
627
|
+
"+",
|
|
628
|
+
e.features.length - 6,
|
|
629
|
+
" more"
|
|
630
|
+
]
|
|
631
|
+
})]
|
|
632
|
+
})
|
|
633
|
+
]
|
|
634
|
+
}, e.id);
|
|
635
|
+
})
|
|
636
|
+
})
|
|
637
|
+
})
|
|
638
|
+
}), /* @__PURE__ */ P("div", {
|
|
639
|
+
className: "space-y-4",
|
|
640
|
+
children: [
|
|
641
|
+
/* @__PURE__ */ P(F, {
|
|
642
|
+
treatment: "metric",
|
|
643
|
+
className: "p-5",
|
|
644
|
+
children: [/* @__PURE__ */ P("div", {
|
|
645
|
+
className: "flex items-center justify-between",
|
|
646
|
+
children: [/* @__PURE__ */ P("span", {
|
|
647
|
+
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
648
|
+
children: [/* @__PURE__ */ N(D, { className: "h-4 w-4 text-text-secondary" }), " Vendor health"]
|
|
649
|
+
}), Y.vendorHealthScore != null && /* @__PURE__ */ N("span", {
|
|
650
|
+
className: t("rounded-full px-2 py-0.5 text-[11px] font-medium", V(Y.vendorHealthScore).cls),
|
|
651
|
+
children: V(Y.vendorHealthScore).label
|
|
652
|
+
})]
|
|
653
|
+
}), Y.vendorHealthScore == null ? /* @__PURE__ */ N("p", {
|
|
654
|
+
className: "mt-4 text-sm text-text-secondary",
|
|
655
|
+
children: "No health score yet."
|
|
656
|
+
}) : /* @__PURE__ */ N("div", {
|
|
657
|
+
className: "mt-2 flex flex-col items-center",
|
|
658
|
+
children: /* @__PURE__ */ N(f, {
|
|
659
|
+
value: Y.vendorHealthScore,
|
|
660
|
+
max: 100,
|
|
661
|
+
size: 168,
|
|
662
|
+
label: "out of 100"
|
|
663
|
+
})
|
|
664
|
+
})]
|
|
665
|
+
}),
|
|
666
|
+
/* @__PURE__ */ P(F, {
|
|
667
|
+
treatment: "metric",
|
|
668
|
+
className: "p-5",
|
|
669
|
+
children: [/* @__PURE__ */ P("div", {
|
|
670
|
+
className: "flex items-center justify-between",
|
|
671
|
+
children: [/* @__PURE__ */ P("span", {
|
|
672
|
+
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
673
|
+
children: [/* @__PURE__ */ N(A, { className: "h-4 w-4 text-text-secondary" }), " Churn risk"]
|
|
674
|
+
}), Y.churnRiskScore != null && /* @__PURE__ */ N("span", {
|
|
675
|
+
className: t("rounded-full px-2 py-0.5 text-[11px] font-medium", H(Y.churnRiskScore).chip),
|
|
676
|
+
children: H(Y.churnRiskScore).label
|
|
611
677
|
})]
|
|
612
|
-
}),
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
678
|
+
}), Y.churnRiskScore == null ? /* @__PURE__ */ N("p", {
|
|
679
|
+
className: "mt-4 text-sm text-text-secondary",
|
|
680
|
+
children: "No churn signal yet."
|
|
681
|
+
}) : /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", {
|
|
682
|
+
className: "mt-3 flex items-baseline justify-between",
|
|
683
|
+
children: [/* @__PURE__ */ N("span", {
|
|
684
|
+
className: "text-2xl font-bold tabular-nums text-text-primary",
|
|
685
|
+
children: Y.churnRiskScore
|
|
686
|
+
}), /* @__PURE__ */ N("span", {
|
|
620
687
|
className: "text-xs text-text-secondary",
|
|
621
|
-
children:
|
|
622
|
-
}
|
|
623
|
-
})
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
688
|
+
children: "/ 100"
|
|
689
|
+
})]
|
|
690
|
+
}), /* @__PURE__ */ N(p, {
|
|
691
|
+
value: Y.churnRiskScore,
|
|
692
|
+
tone: H(Y.churnRiskScore).tone,
|
|
693
|
+
className: "mt-2"
|
|
694
|
+
})] })]
|
|
695
|
+
}),
|
|
696
|
+
/* @__PURE__ */ P(F, {
|
|
697
|
+
treatment: "metric",
|
|
698
|
+
className: "p-5",
|
|
699
|
+
children: [/* @__PURE__ */ P("span", {
|
|
700
|
+
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
701
|
+
children: [/* @__PURE__ */ N(w, { className: "h-4 w-4 text-text-secondary" }), " At a glance"]
|
|
702
|
+
}), /* @__PURE__ */ P("dl", {
|
|
703
|
+
className: "mt-3 space-y-2.5 text-sm",
|
|
704
|
+
children: [
|
|
705
|
+
/* @__PURE__ */ P("div", {
|
|
706
|
+
className: "flex items-center justify-between gap-2",
|
|
707
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
708
|
+
className: "text-text-secondary",
|
|
709
|
+
children: "Category"
|
|
710
|
+
}), /* @__PURE__ */ N("dd", {
|
|
711
|
+
className: "font-medium text-text-primary",
|
|
712
|
+
children: i(Y.category)
|
|
713
|
+
})]
|
|
714
|
+
}),
|
|
715
|
+
/* @__PURE__ */ P("div", {
|
|
716
|
+
className: "flex items-center justify-between gap-2",
|
|
717
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
718
|
+
className: "text-text-secondary",
|
|
719
|
+
children: "Industry"
|
|
720
|
+
}), /* @__PURE__ */ N("dd", {
|
|
721
|
+
className: "font-medium text-text-primary",
|
|
722
|
+
children: Y.industry ?? "—"
|
|
723
|
+
})]
|
|
724
|
+
}),
|
|
725
|
+
/* @__PURE__ */ P("div", {
|
|
726
|
+
className: "flex items-center justify-between gap-2",
|
|
727
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
728
|
+
className: "text-text-secondary",
|
|
729
|
+
children: "Region"
|
|
730
|
+
}), /* @__PURE__ */ N("dd", {
|
|
731
|
+
className: "font-medium text-text-primary",
|
|
732
|
+
children: Y.region ?? "—"
|
|
733
|
+
})]
|
|
734
|
+
}),
|
|
735
|
+
/* @__PURE__ */ P("div", {
|
|
736
|
+
className: "flex items-center justify-between gap-2",
|
|
737
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
738
|
+
className: "text-text-secondary",
|
|
739
|
+
children: "Language"
|
|
740
|
+
}), /* @__PURE__ */ N("dd", {
|
|
741
|
+
className: "font-medium text-text-primary",
|
|
742
|
+
children: Y.language ?? "—"
|
|
743
|
+
})]
|
|
744
|
+
}),
|
|
745
|
+
/* @__PURE__ */ P("div", {
|
|
746
|
+
className: "flex items-center justify-between gap-2",
|
|
747
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
748
|
+
className: "text-text-secondary",
|
|
749
|
+
children: "Published plans"
|
|
750
|
+
}), /* @__PURE__ */ N("dd", {
|
|
751
|
+
className: "font-medium tabular-nums text-text-primary",
|
|
752
|
+
children: Y.plans?.length ?? 0
|
|
753
|
+
})]
|
|
754
|
+
})
|
|
755
|
+
]
|
|
756
|
+
})]
|
|
757
|
+
})
|
|
758
|
+
]
|
|
759
|
+
})]
|
|
627
760
|
}),
|
|
628
|
-
|
|
629
|
-
provider:
|
|
630
|
-
onClose: () =>
|
|
761
|
+
R && /* @__PURE__ */ N(U, {
|
|
762
|
+
provider: Y,
|
|
763
|
+
onClose: () => z(!1)
|
|
631
764
|
}),
|
|
632
|
-
|
|
633
|
-
providerId:
|
|
634
|
-
onClose: () =>
|
|
765
|
+
B && /* @__PURE__ */ N(W, {
|
|
766
|
+
providerId: Y.id,
|
|
767
|
+
onClose: () => K(!1)
|
|
635
768
|
}),
|
|
636
|
-
|
|
637
|
-
provider:
|
|
638
|
-
onClose: () =>
|
|
769
|
+
q && /* @__PURE__ */ N(G, {
|
|
770
|
+
provider: Y,
|
|
771
|
+
onClose: () => J(!1)
|
|
639
772
|
})
|
|
640
773
|
]
|
|
641
774
|
});
|
|
642
775
|
}
|
|
643
776
|
//#endregion
|
|
644
|
-
export {
|
|
777
|
+
export { K as ProviderDetailPage };
|
|
645
778
|
|
|
646
779
|
//# sourceMappingURL=ProviderDetailPage.js.map
|