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