@burdenoff/microfe-subscriberbot 2026.1105.2 → 2026.1107.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/stories/pages/ProviderDetailPage.stories.d.ts +1 -0
- package/dist/stories/pages/ProviderDetailPage.stories.d.ts.map +1 -1
- package/dist/stories/support/fixtures.d.ts +3 -1
- package/dist/stories/support/fixtures.d.ts.map +1 -1
- package/dist/stories/support/handlers.d.ts.map +1 -1
- package/dist/subscriberbot/components/index.d.ts +2 -2
- package/dist/subscriberbot/components/index.d.ts.map +1 -1
- package/dist/subscriberbot/components/viz.d.ts +26 -0
- package/dist/subscriberbot/components/viz.d.ts.map +1 -1
- package/dist/subscriberbot/components/viz.js +99 -1
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +3 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +114 -70
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +306 -301
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts +23 -0
- package/dist/subscriberbot/pages/providers/ProviderInsights.d.ts.map +1 -0
- package/dist/subscriberbot/pages/providers/ProviderInsights.js +293 -0
- package/dist/subscriberbot/pages/providers/ProviderInsights.js.map +1 -0
- package/dist/subscriberbot/types/index.d.ts +75 -0
- package/dist/subscriberbot/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -11,13 +11,14 @@ import { Gauge as d, MiniProgress as f, Sparkline as p } from "../../components/
|
|
|
11
11
|
import "../../components/index.js";
|
|
12
12
|
import { useArchiveProvider as m, useBenchmarkDataPoints as h, useCreatePlan as g, useProvider as _, useUpdateProvider as v } from "../../hooks/useSubscriberBotApi.js";
|
|
13
13
|
import { useFormError as y } from "../../hooks/useFormError.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
14
|
+
import { ProviderAlternatives as b, ProviderPaidPriceHistory as x } from "./ProviderInsights.js";
|
|
15
|
+
import { useMemo as S, useState as C } from "react";
|
|
16
|
+
import { Archive as w, ArrowLeft as T, Building2 as E, Check as D, Globe as O, Layers as k, LineChart as A, Pencil as j, Plus as M, ShieldCheck as N, Sparkles as P, Tag as F, TrendingDown as I } from "lucide-react";
|
|
17
|
+
import { useParams as L } from "react-router";
|
|
18
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
19
|
+
import { GlassCard as V } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
//#region src/subscriberbot/pages/providers/ProviderDetailPage.tsx
|
|
20
|
-
var
|
|
21
|
+
var H = "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)]", U = "mb-1 block text-xs font-medium text-text-secondary", W = [
|
|
21
22
|
"SAAS",
|
|
22
23
|
"AI_SERVICE",
|
|
23
24
|
"STREAMING",
|
|
@@ -34,7 +35,7 @@ var B = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
34
35
|
"LICENSE",
|
|
35
36
|
"CONTRACT",
|
|
36
37
|
"OTHER"
|
|
37
|
-
],
|
|
38
|
+
], G = {
|
|
38
39
|
SAAS: "providers.categories.saas",
|
|
39
40
|
AI_SERVICE: "providers.categories.aiService",
|
|
40
41
|
STREAMING: "providers.categories.streaming",
|
|
@@ -51,12 +52,12 @@ var B = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
51
52
|
LICENSE: "providers.categories.license",
|
|
52
53
|
CONTRACT: "providers.categories.contract",
|
|
53
54
|
OTHER: "providers.categories.other"
|
|
54
|
-
},
|
|
55
|
+
}, K = [
|
|
55
56
|
"UNVERIFIED",
|
|
56
57
|
"VERIFIED",
|
|
57
58
|
"CLAIMED",
|
|
58
59
|
"DEPRECATED"
|
|
59
|
-
],
|
|
60
|
+
], q = [
|
|
60
61
|
"MONTHLY",
|
|
61
62
|
"YEARLY",
|
|
62
63
|
"QUARTERLY",
|
|
@@ -66,7 +67,7 @@ var B = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 t
|
|
|
66
67
|
"LIFETIME",
|
|
67
68
|
"FREE"
|
|
68
69
|
];
|
|
69
|
-
function
|
|
70
|
+
function J(e, t) {
|
|
70
71
|
return e >= 70 ? {
|
|
71
72
|
label: t("providers.detail.healthy", "Healthy"),
|
|
72
73
|
cls: "bg-status-success-bg-subtle text-status-success-text"
|
|
@@ -78,7 +79,7 @@ function K(e, t) {
|
|
|
78
79
|
cls: "bg-status-error-bg-subtle text-status-error-text"
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function Y(e, t) {
|
|
82
83
|
return e >= 67 ? {
|
|
83
84
|
label: t("providers.detail.churnHigh", "High"),
|
|
84
85
|
chip: "bg-status-error-bg-subtle text-status-error-text",
|
|
@@ -93,13 +94,13 @@ function q(e, t) {
|
|
|
93
94
|
tone: "positive"
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
let { formatEnumLabel: i } = n(), a = t(), o = v(), [c, l] =
|
|
98
|
-
return /* @__PURE__ */
|
|
97
|
+
function ee({ provider: e, onClose: r }) {
|
|
98
|
+
let { formatEnumLabel: i } = n(), a = t(), o = v(), [c, l] = C(e.name), [u, d] = C(e.category), [f, p] = C(e.status), [m, h] = C(e.description ?? ""), [g, _] = C(e.industry ?? ""), [b, x] = C(e.region ?? ""), [S, w] = C(e.language ?? ""), [T, E] = C(e.websiteUrl ?? ""), [D, O] = C(e.churnRiskScore == null ? "" : String(e.churnRiskScore)), [k, A] = C(e.vendorHealthScore == null ? "" : String(e.vendorHealthScore)), [j, M] = C(e.tags.join(", ")), [N, P, F, I] = y();
|
|
99
|
+
return /* @__PURE__ */ z(s, {
|
|
99
100
|
title: a("providers.detail.editModal.title", "Edit provider"),
|
|
100
101
|
onClose: r,
|
|
101
102
|
maxWidthClassName: "max-w-2xl",
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ B("form", {
|
|
103
104
|
onSubmit: (t) => {
|
|
104
105
|
if (t.preventDefault(), P(null), !c.trim()) {
|
|
105
106
|
P(a("providers.new.nameRequired", "A provider name is required."), "prov-edit-name");
|
|
@@ -113,7 +114,7 @@ function J({ provider: e, onClose: r }) {
|
|
|
113
114
|
tags: n,
|
|
114
115
|
...g.trim() ? { industry: g.trim() } : {},
|
|
115
116
|
...b.trim() ? { region: b.trim() } : {},
|
|
116
|
-
...
|
|
117
|
+
...S.trim() ? { language: S.trim() } : {},
|
|
117
118
|
...T.trim() ? { websiteUrl: T.trim() } : {},
|
|
118
119
|
...D.trim() ? { churnRiskScore: Number(D) } : {},
|
|
119
120
|
...k.trim() ? { vendorHealthScore: Number(k) } : {}
|
|
@@ -128,138 +129,138 @@ function J({ provider: e, onClose: r }) {
|
|
|
128
129
|
},
|
|
129
130
|
className: "space-y-4",
|
|
130
131
|
children: [
|
|
131
|
-
N && /* @__PURE__ */
|
|
132
|
+
N && /* @__PURE__ */ z("div", {
|
|
132
133
|
id: I,
|
|
133
134
|
tabIndex: -1,
|
|
134
135
|
role: "alert",
|
|
135
136
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
136
137
|
children: N
|
|
137
138
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
|
|
139
140
|
htmlFor: "prov-edit-name",
|
|
140
|
-
className:
|
|
141
|
+
className: U,
|
|
141
142
|
children: [
|
|
142
143
|
a("providers.detail.editModal.nameLabel", "Name"),
|
|
143
144
|
" ",
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ z("span", {
|
|
145
146
|
className: "text-status-error-text",
|
|
146
147
|
children: "*"
|
|
147
148
|
})
|
|
148
149
|
]
|
|
149
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ z("input", {
|
|
150
151
|
...F("prov-edit-name"),
|
|
151
152
|
id: "prov-edit-name",
|
|
152
153
|
type: "text",
|
|
153
154
|
value: c,
|
|
154
155
|
onChange: (e) => l(e.target.value),
|
|
155
|
-
className:
|
|
156
|
+
className: H,
|
|
156
157
|
required: !0
|
|
157
158
|
})] }),
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ B("div", {
|
|
159
160
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
161
162
|
htmlFor: "prov-edit-category",
|
|
162
|
-
className:
|
|
163
|
+
className: U,
|
|
163
164
|
children: a("providers.detail.editModal.categoryLabel", "Category")
|
|
164
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ z("select", {
|
|
165
166
|
...F("prov-edit-category"),
|
|
166
167
|
id: "prov-edit-category",
|
|
167
168
|
value: u,
|
|
168
169
|
onChange: (e) => d(e.target.value),
|
|
169
|
-
className:
|
|
170
|
-
children:
|
|
170
|
+
className: H,
|
|
171
|
+
children: W.map((e) => /* @__PURE__ */ z("option", {
|
|
171
172
|
value: e,
|
|
172
|
-
children: a(
|
|
173
|
+
children: a(G[e], i(e))
|
|
173
174
|
}, e))
|
|
174
|
-
})] }), /* @__PURE__ */
|
|
175
|
+
})] }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
175
176
|
htmlFor: "prov-edit-status",
|
|
176
|
-
className:
|
|
177
|
+
className: U,
|
|
177
178
|
children: a("providers.detail.editModal.statusLabel", "Status")
|
|
178
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ z("select", {
|
|
179
180
|
...F("prov-edit-status"),
|
|
180
181
|
id: "prov-edit-status",
|
|
181
182
|
value: f,
|
|
182
183
|
onChange: (e) => p(e.target.value),
|
|
183
|
-
className:
|
|
184
|
-
children:
|
|
184
|
+
className: H,
|
|
185
|
+
children: K.map((e) => /* @__PURE__ */ z("option", {
|
|
185
186
|
value: e,
|
|
186
187
|
children: i(e)
|
|
187
188
|
}, e))
|
|
188
189
|
})] })]
|
|
189
190
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ B("div", {
|
|
191
192
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
192
193
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
194
195
|
htmlFor: "prov-edit-industry",
|
|
195
|
-
className:
|
|
196
|
+
className: U,
|
|
196
197
|
children: a("providers.detail.editModal.industryLabel", "Industry")
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ z("input", {
|
|
198
199
|
...F("prov-edit-industry"),
|
|
199
200
|
id: "prov-edit-industry",
|
|
200
201
|
type: "text",
|
|
201
202
|
value: g,
|
|
202
203
|
onChange: (e) => _(e.target.value),
|
|
203
|
-
className:
|
|
204
|
+
className: H
|
|
204
205
|
})] }),
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
206
207
|
htmlFor: "prov-edit-region",
|
|
207
|
-
className:
|
|
208
|
+
className: U,
|
|
208
209
|
children: a("providers.detail.editModal.regionLabel", "Region")
|
|
209
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ z("input", {
|
|
210
211
|
...F("prov-edit-region"),
|
|
211
212
|
id: "prov-edit-region",
|
|
212
213
|
type: "text",
|
|
213
214
|
value: b,
|
|
214
|
-
onChange: (e) =>
|
|
215
|
-
className:
|
|
215
|
+
onChange: (e) => x(e.target.value),
|
|
216
|
+
className: H
|
|
216
217
|
})] }),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
218
219
|
htmlFor: "prov-edit-language",
|
|
219
|
-
className:
|
|
220
|
+
className: U,
|
|
220
221
|
children: a("providers.detail.editModal.languageLabel", "Language")
|
|
221
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ z("input", {
|
|
222
223
|
...F("prov-edit-language"),
|
|
223
224
|
id: "prov-edit-language",
|
|
224
225
|
type: "text",
|
|
225
|
-
value:
|
|
226
|
+
value: S,
|
|
226
227
|
onChange: (e) => w(e.target.value),
|
|
227
|
-
className:
|
|
228
|
+
className: H
|
|
228
229
|
})] })
|
|
229
230
|
]
|
|
230
231
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
232
233
|
htmlFor: "prov-edit-website",
|
|
233
|
-
className:
|
|
234
|
+
className: U,
|
|
234
235
|
children: a("providers.detail.editModal.websiteLabel", "Website")
|
|
235
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ z("input", {
|
|
236
237
|
...F("prov-edit-website"),
|
|
237
238
|
id: "prov-edit-website",
|
|
238
239
|
type: "url",
|
|
239
240
|
value: T,
|
|
240
241
|
onChange: (e) => E(e.target.value),
|
|
241
242
|
placeholder: a("providers.detail.editModal.websitePlaceholder", "https://…"),
|
|
242
|
-
className:
|
|
243
|
+
className: H
|
|
243
244
|
})] }),
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
245
246
|
htmlFor: "prov-edit-desc",
|
|
246
|
-
className:
|
|
247
|
+
className: U,
|
|
247
248
|
children: a("providers.detail.editModal.descriptionLabel", "Description")
|
|
248
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ z("textarea", {
|
|
249
250
|
...F("prov-edit-desc"),
|
|
250
251
|
id: "prov-edit-desc",
|
|
251
252
|
value: m,
|
|
252
253
|
onChange: (e) => h(e.target.value),
|
|
253
254
|
rows: 3,
|
|
254
|
-
className:
|
|
255
|
+
className: H
|
|
255
256
|
})] }),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ B("div", {
|
|
257
258
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
259
|
+
children: [/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
259
260
|
htmlFor: "prov-edit-churn",
|
|
260
|
-
className:
|
|
261
|
+
className: U,
|
|
261
262
|
children: a("providers.detail.editModal.churnRiskLabel", "Churn risk (0–100)")
|
|
262
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ z("input", {
|
|
263
264
|
...F("prov-edit-churn"),
|
|
264
265
|
id: "prov-edit-churn",
|
|
265
266
|
type: "number",
|
|
@@ -267,12 +268,12 @@ function J({ provider: e, onClose: r }) {
|
|
|
267
268
|
max: "100",
|
|
268
269
|
value: D,
|
|
269
270
|
onChange: (e) => O(e.target.value),
|
|
270
|
-
className:
|
|
271
|
-
})] }), /* @__PURE__ */
|
|
271
|
+
className: H
|
|
272
|
+
})] }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
272
273
|
htmlFor: "prov-edit-health",
|
|
273
|
-
className:
|
|
274
|
+
className: U,
|
|
274
275
|
children: a("providers.detail.editModal.vendorHealthLabel", "Vendor health (0–100)")
|
|
275
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ z("input", {
|
|
276
277
|
...F("prov-edit-health"),
|
|
277
278
|
id: "prov-edit-health",
|
|
278
279
|
type: "number",
|
|
@@ -280,16 +281,16 @@ function J({ provider: e, onClose: r }) {
|
|
|
280
281
|
max: "100",
|
|
281
282
|
value: k,
|
|
282
283
|
onChange: (e) => A(e.target.value),
|
|
283
|
-
className:
|
|
284
|
+
className: H
|
|
284
285
|
})] })]
|
|
285
286
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
|
|
287
288
|
htmlFor: "prov-edit-tags",
|
|
288
|
-
className:
|
|
289
|
+
className: U,
|
|
289
290
|
children: [
|
|
290
291
|
a("providers.detail.editModal.tagsLabel", "Tags"),
|
|
291
292
|
" ",
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ B("span", {
|
|
293
294
|
className: "text-text-secondary",
|
|
294
295
|
children: [
|
|
295
296
|
"(",
|
|
@@ -298,22 +299,22 @@ function J({ provider: e, onClose: r }) {
|
|
|
298
299
|
]
|
|
299
300
|
})
|
|
300
301
|
]
|
|
301
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ z("input", {
|
|
302
303
|
...F("prov-edit-tags"),
|
|
303
304
|
id: "prov-edit-tags",
|
|
304
305
|
type: "text",
|
|
305
306
|
value: j,
|
|
306
307
|
onChange: (e) => M(e.target.value),
|
|
307
|
-
className:
|
|
308
|
+
className: H
|
|
308
309
|
})] }),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ B("div", {
|
|
310
311
|
className: "flex justify-end gap-3",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ z("button", {
|
|
312
313
|
type: "button",
|
|
313
314
|
onClick: r,
|
|
314
315
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
315
316
|
children: a("providers.detail.editModal.cancel", "Cancel")
|
|
316
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ z("button", {
|
|
317
318
|
type: "submit",
|
|
318
319
|
disabled: o.isPending,
|
|
319
320
|
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",
|
|
@@ -324,13 +325,13 @@ function J({ provider: e, onClose: r }) {
|
|
|
324
325
|
})
|
|
325
326
|
});
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
-
let { formatEnumLabel: i } = n(), a = t(), o = g(), [c, l] =
|
|
329
|
-
return /* @__PURE__ */
|
|
328
|
+
function te({ providerId: e, onClose: r }) {
|
|
329
|
+
let { formatEnumLabel: i } = n(), a = t(), o = g(), [c, l] = C(""), [u, d] = C(""), [f, p] = C("USD"), [m, h] = C("MONTHLY"), [_, v] = C(""), [b, x] = C(""), [S, w] = C(!0), [T, E, D, O] = y();
|
|
330
|
+
return /* @__PURE__ */ z(s, {
|
|
330
331
|
title: a("providers.detail.addPlanModal.title", "Add plan"),
|
|
331
332
|
onClose: r,
|
|
332
333
|
maxWidthClassName: "max-w-xl",
|
|
333
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ B("form", {
|
|
334
335
|
onSubmit: (t) => {
|
|
335
336
|
if (t.preventDefault(), E(null), !c.trim()) {
|
|
336
337
|
E(a("providers.detail.addPlanModal.nameRequired", "A plan name is required."), "plan-name");
|
|
@@ -352,42 +353,42 @@ function Y({ providerId: e, onClose: r }) {
|
|
|
352
353
|
},
|
|
353
354
|
className: "space-y-4",
|
|
354
355
|
children: [
|
|
355
|
-
T && /* @__PURE__ */
|
|
356
|
+
T && /* @__PURE__ */ z("div", {
|
|
356
357
|
id: O,
|
|
357
358
|
tabIndex: -1,
|
|
358
359
|
role: "alert",
|
|
359
360
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
360
361
|
children: T
|
|
361
362
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
|
|
363
364
|
htmlFor: "plan-name",
|
|
364
|
-
className:
|
|
365
|
+
className: U,
|
|
365
366
|
children: [
|
|
366
367
|
a("providers.detail.addPlanModal.nameLabel", "Name"),
|
|
367
368
|
" ",
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ z("span", {
|
|
369
370
|
className: "text-status-error-text",
|
|
370
371
|
children: "*"
|
|
371
372
|
})
|
|
372
373
|
]
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ z("input", {
|
|
374
375
|
...D("plan-name"),
|
|
375
376
|
id: "plan-name",
|
|
376
377
|
type: "text",
|
|
377
378
|
value: c,
|
|
378
379
|
onChange: (e) => l(e.target.value),
|
|
379
380
|
placeholder: a("providers.detail.addPlanModal.namePlaceholder", "e.g. Pro, Team, Enterprise"),
|
|
380
|
-
className:
|
|
381
|
+
className: H,
|
|
381
382
|
required: !0
|
|
382
383
|
})] }),
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ B("div", {
|
|
384
385
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
385
386
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
387
388
|
htmlFor: "plan-amount",
|
|
388
|
-
className:
|
|
389
|
+
className: U,
|
|
389
390
|
children: a("providers.detail.addPlanModal.amountLabel", "Amount")
|
|
390
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ z("input", {
|
|
391
392
|
...D("plan-amount"),
|
|
392
393
|
id: "plan-amount",
|
|
393
394
|
type: "number",
|
|
@@ -396,57 +397,57 @@ function Y({ providerId: e, onClose: r }) {
|
|
|
396
397
|
value: u,
|
|
397
398
|
onChange: (e) => d(e.target.value),
|
|
398
399
|
placeholder: a("providers.detail.addPlanModal.amountPlaceholder", "0.00"),
|
|
399
|
-
className:
|
|
400
|
+
className: H
|
|
400
401
|
})] }),
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
402
403
|
htmlFor: "plan-currency",
|
|
403
|
-
className:
|
|
404
|
+
className: U,
|
|
404
405
|
children: a("providers.detail.addPlanModal.currencyLabel", "Currency")
|
|
405
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ z("input", {
|
|
406
407
|
...D("plan-currency"),
|
|
407
408
|
id: "plan-currency",
|
|
408
409
|
type: "text",
|
|
409
410
|
value: f,
|
|
410
411
|
onChange: (e) => p(e.target.value.toUpperCase()),
|
|
411
412
|
maxLength: 3,
|
|
412
|
-
className:
|
|
413
|
+
className: H
|
|
413
414
|
})] }),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
415
416
|
htmlFor: "plan-interval",
|
|
416
|
-
className:
|
|
417
|
+
className: U,
|
|
417
418
|
children: a("providers.detail.addPlanModal.intervalLabel", "Interval")
|
|
418
|
-
}), /* @__PURE__ */
|
|
419
|
+
}), /* @__PURE__ */ z("select", {
|
|
419
420
|
...D("plan-interval"),
|
|
420
421
|
id: "plan-interval",
|
|
421
422
|
value: m,
|
|
422
423
|
onChange: (e) => h(e.target.value),
|
|
423
|
-
className:
|
|
424
|
-
children:
|
|
424
|
+
className: H,
|
|
425
|
+
children: q.map((e) => /* @__PURE__ */ z("option", {
|
|
425
426
|
value: e,
|
|
426
427
|
children: i(e)
|
|
427
428
|
}, e))
|
|
428
429
|
})] })
|
|
429
430
|
]
|
|
430
431
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
432
433
|
htmlFor: "plan-desc",
|
|
433
|
-
className:
|
|
434
|
+
className: U,
|
|
434
435
|
children: a("providers.detail.addPlanModal.descriptionLabel", "Description")
|
|
435
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ z("textarea", {
|
|
436
437
|
...D("plan-desc"),
|
|
437
438
|
id: "plan-desc",
|
|
438
439
|
value: _,
|
|
439
440
|
onChange: (e) => v(e.target.value),
|
|
440
441
|
rows: 2,
|
|
441
|
-
className:
|
|
442
|
+
className: H
|
|
442
443
|
})] }),
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
|
|
444
445
|
htmlFor: "plan-features",
|
|
445
|
-
className:
|
|
446
|
+
className: U,
|
|
446
447
|
children: [
|
|
447
448
|
a("providers.detail.addPlanModal.featuresLabel", "Features"),
|
|
448
449
|
" ",
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ B("span", {
|
|
450
451
|
className: "text-text-secondary",
|
|
451
452
|
children: [
|
|
452
453
|
"(",
|
|
@@ -455,32 +456,32 @@ function Y({ providerId: e, onClose: r }) {
|
|
|
455
456
|
]
|
|
456
457
|
})
|
|
457
458
|
]
|
|
458
|
-
}), /* @__PURE__ */
|
|
459
|
+
}), /* @__PURE__ */ z("textarea", {
|
|
459
460
|
...D("plan-features"),
|
|
460
461
|
id: "plan-features",
|
|
461
462
|
value: b,
|
|
462
|
-
onChange: (e) =>
|
|
463
|
+
onChange: (e) => x(e.target.value),
|
|
463
464
|
rows: 3,
|
|
464
465
|
placeholder: a("providers.detail.addPlanModal.featuresPlaceholder", "Unlimited projects\nPriority support\nSSO"),
|
|
465
|
-
className:
|
|
466
|
+
className: H
|
|
466
467
|
})] }),
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ B("label", {
|
|
468
469
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
469
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ z("input", {
|
|
470
471
|
type: "checkbox",
|
|
471
|
-
checked:
|
|
472
|
+
checked: S,
|
|
472
473
|
onChange: (e) => w(e.target.checked),
|
|
473
474
|
className: "size-4 rounded border-border-subtle"
|
|
474
475
|
}), a("providers.detail.addPlanModal.active", "Active")]
|
|
475
476
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ B("div", {
|
|
477
478
|
className: "flex justify-end gap-3",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ z("button", {
|
|
479
480
|
type: "button",
|
|
480
481
|
onClick: r,
|
|
481
482
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
482
483
|
children: a("providers.detail.addPlanModal.cancel", "Cancel")
|
|
483
|
-
}), /* @__PURE__ */
|
|
484
|
+
}), /* @__PURE__ */ z("button", {
|
|
484
485
|
type: "submit",
|
|
485
486
|
disabled: o.isPending,
|
|
486
487
|
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",
|
|
@@ -491,31 +492,31 @@ function Y({ providerId: e, onClose: r }) {
|
|
|
491
492
|
})
|
|
492
493
|
});
|
|
493
494
|
}
|
|
494
|
-
function
|
|
495
|
-
let i = t(), { navigateTo: a } = e(), o = m(), [c, l] =
|
|
496
|
-
return /* @__PURE__ */
|
|
495
|
+
function ne({ provider: n, onClose: r }) {
|
|
496
|
+
let i = t(), { navigateTo: a } = e(), o = m(), [c, l] = C(null);
|
|
497
|
+
return /* @__PURE__ */ z(s, {
|
|
497
498
|
title: i("providers.detail.archiveModal.title", "Archive provider"),
|
|
498
499
|
onClose: r,
|
|
499
|
-
children: /* @__PURE__ */
|
|
500
|
+
children: /* @__PURE__ */ B("div", {
|
|
500
501
|
className: "space-y-4",
|
|
501
502
|
children: [
|
|
502
|
-
c && /* @__PURE__ */
|
|
503
|
+
c && /* @__PURE__ */ z("div", {
|
|
503
504
|
role: "alert",
|
|
504
505
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
|
|
505
506
|
children: c
|
|
506
507
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ z("p", {
|
|
508
509
|
className: "text-sm text-text-secondary",
|
|
509
510
|
children: i("providers.detail.archiveModal.description", "Archive {{name}}? It will be removed from the active registry. This can be reversed by an administrator.", { name: n.name })
|
|
510
511
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ B("div", {
|
|
512
513
|
className: "flex justify-end gap-3",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ z("button", {
|
|
514
515
|
type: "button",
|
|
515
516
|
onClick: r,
|
|
516
517
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
517
518
|
children: i("providers.detail.archiveModal.cancel", "Cancel")
|
|
518
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ z("button", {
|
|
519
520
|
type: "button",
|
|
520
521
|
onClick: () => {
|
|
521
522
|
l(null), o.mutate(n.id, {
|
|
@@ -532,8 +533,8 @@ function ee({ provider: n, onClose: r }) {
|
|
|
532
533
|
})
|
|
533
534
|
});
|
|
534
535
|
}
|
|
535
|
-
function
|
|
536
|
-
let { formatCurrency: r, formatDate: i, formatEnumLabel: a, formatIntervalSuffix: o } = n(), s = t(), { data: u, isLoading: d, isError: f, refetch: m } = h(e), g =
|
|
536
|
+
function re({ slug: e }) {
|
|
537
|
+
let { formatCurrency: r, formatDate: i, formatEnumLabel: a, formatIntervalSuffix: o } = n(), s = t(), { data: u, isLoading: d, isError: f, refetch: m } = h(e), g = S(() => {
|
|
537
538
|
let e = [...u ?? []].filter((e) => Number.isFinite(e.amount)).sort((e, t) => new Date(e.observedAt).getTime() - new Date(t.observedAt).getTime()), t = e[e.length - 1];
|
|
538
539
|
if (!t) return null;
|
|
539
540
|
let n = e.filter((e) => e.planName === t.planName && e.region === t.region && e.currency === t.currency && e.interval === t.interval), r = n.map((e) => e.amount);
|
|
@@ -546,33 +547,33 @@ function te({ slug: e }) {
|
|
|
546
547
|
first: r[0] ?? t.amount
|
|
547
548
|
};
|
|
548
549
|
}, [u]);
|
|
549
|
-
return /* @__PURE__ */
|
|
550
|
+
return /* @__PURE__ */ B(V, {
|
|
550
551
|
treatment: "metric",
|
|
551
552
|
className: "p-5",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
553
|
+
children: [/* @__PURE__ */ B("span", {
|
|
553
554
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
554
555
|
children: [
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ z(A, { className: "h-4 w-4 text-text-secondary" }),
|
|
556
557
|
" ",
|
|
557
|
-
s("providers.detail.
|
|
558
|
+
s("providers.detail.marketBenchmark", "Market benchmark")
|
|
558
559
|
]
|
|
559
|
-
}), e ? d ? /* @__PURE__ */
|
|
560
|
+
}), e ? d ? /* @__PURE__ */ z(l, {
|
|
560
561
|
className: "min-h-[8rem]",
|
|
561
562
|
label: s("providers.detail.priceHistoryLoading", "Loading price history…")
|
|
562
|
-
}) : f ? /* @__PURE__ */
|
|
563
|
+
}) : f ? /* @__PURE__ */ z(c, {
|
|
563
564
|
className: "min-h-[8rem]",
|
|
564
565
|
title: s("providers.detail.priceHistoryErrorTitle", "Price history unavailable"),
|
|
565
566
|
message: s("providers.detail.priceHistoryError", "Could not load observed prices for this provider."),
|
|
566
567
|
onRetry: () => void m()
|
|
567
|
-
}) : g ? /* @__PURE__ */ R
|
|
568
|
-
/* @__PURE__ */
|
|
568
|
+
}) : g ? /* @__PURE__ */ B(R, { children: [
|
|
569
|
+
/* @__PURE__ */ B("p", {
|
|
569
570
|
className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
|
|
570
|
-
children: [r(g.latest.amount, g.latest.currency), /* @__PURE__ */
|
|
571
|
+
children: [r(g.latest.amount, g.latest.currency), /* @__PURE__ */ z("span", {
|
|
571
572
|
className: "text-sm font-normal text-text-secondary",
|
|
572
573
|
children: o(g.latest.interval)
|
|
573
574
|
})]
|
|
574
575
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ B("p", {
|
|
576
577
|
className: "text-xs text-text-secondary",
|
|
577
578
|
children: [
|
|
578
579
|
g.latest.planName,
|
|
@@ -585,20 +586,20 @@ function te({ slug: e }) {
|
|
|
585
586
|
i(g.latest.observedAt)
|
|
586
587
|
]
|
|
587
588
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ z(p, {
|
|
589
590
|
className: "mt-3 w-full",
|
|
590
591
|
points: g.amounts,
|
|
591
592
|
positive: g.latest.amount <= g.first
|
|
592
593
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ B("dl", {
|
|
594
595
|
className: "mt-3 space-y-2 border-t border-border-subtle pt-3 text-xs",
|
|
595
596
|
children: [
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ B("div", {
|
|
597
598
|
className: "flex items-center justify-between gap-2",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
599
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
599
600
|
className: "text-text-secondary",
|
|
600
601
|
children: s("providers.detail.observedRange", "Observed range")
|
|
601
|
-
}), /* @__PURE__ */
|
|
602
|
+
}), /* @__PURE__ */ B("dd", {
|
|
602
603
|
className: "font-medium tabular-nums text-text-primary",
|
|
603
604
|
children: [
|
|
604
605
|
r(g.min, g.latest.currency),
|
|
@@ -608,57 +609,57 @@ function te({ slug: e }) {
|
|
|
608
609
|
]
|
|
609
610
|
})]
|
|
610
611
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ B("div", {
|
|
612
613
|
className: "flex items-center justify-between gap-2",
|
|
613
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
614
615
|
className: "text-text-secondary",
|
|
615
616
|
children: s("providers.detail.observations", "Observations")
|
|
616
|
-
}), /* @__PURE__ */
|
|
617
|
+
}), /* @__PURE__ */ z("dd", {
|
|
617
618
|
className: "font-medium tabular-nums text-text-primary",
|
|
618
619
|
children: g.points.length
|
|
619
620
|
})]
|
|
620
621
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ B("div", {
|
|
622
623
|
className: "flex items-center justify-between gap-2",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
624
625
|
className: "text-text-secondary",
|
|
625
626
|
children: s("providers.detail.latestSource", "Latest source")
|
|
626
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ z("dd", {
|
|
627
628
|
className: "font-medium text-text-primary",
|
|
628
629
|
children: g.latest.sourceLabel ?? a(g.latest.sourceKind)
|
|
629
630
|
})]
|
|
630
631
|
})
|
|
631
632
|
]
|
|
632
633
|
})
|
|
633
|
-
] }) : /* @__PURE__ */
|
|
634
|
+
] }) : /* @__PURE__ */ z("p", {
|
|
634
635
|
className: "mt-4 text-sm text-text-secondary",
|
|
635
636
|
children: s("providers.detail.priceHistoryEmpty", "No price observations recorded for this provider yet.")
|
|
636
|
-
}) : /* @__PURE__ */
|
|
637
|
+
}) : /* @__PURE__ */ z("p", {
|
|
637
638
|
className: "mt-4 text-sm text-text-secondary",
|
|
638
639
|
children: s("providers.detail.priceHistoryNoSlug", "Add a slug to this provider to match it against the shared price benchmark dataset.")
|
|
639
640
|
})]
|
|
640
641
|
});
|
|
641
642
|
}
|
|
642
643
|
function X() {
|
|
643
|
-
let { formatCurrency: s, formatEnumLabel: p, formatIntervalSuffix: m } = n(), { id: h } =
|
|
644
|
-
if (y) return /* @__PURE__ */
|
|
644
|
+
let { formatCurrency: s, formatEnumLabel: p, formatIntervalSuffix: m } = n(), { id: h } = L(), { navigateTo: g } = e(), { data: v, isLoading: y, isError: S, refetch: A } = _(h), [H, U] = C(!1), [W, K] = C(!1), [q, X] = C(!1), Z = t();
|
|
645
|
+
if (y) return /* @__PURE__ */ z(i, {
|
|
645
646
|
title: Z("providers.detail.loadingTitle", "Provider"),
|
|
646
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ z(l, { label: Z("providers.detail.loading", "Loading provider…") })
|
|
647
648
|
});
|
|
648
|
-
if (
|
|
649
|
+
if (S) return /* @__PURE__ */ z(i, {
|
|
649
650
|
title: Z("providers.detail.loadingTitle", "Provider"),
|
|
650
|
-
children: /* @__PURE__ */
|
|
651
|
+
children: /* @__PURE__ */ z(c, {
|
|
651
652
|
message: Z("providers.detail.error", "Could not load this provider."),
|
|
652
|
-
onRetry: () => void
|
|
653
|
+
onRetry: () => void A()
|
|
653
654
|
})
|
|
654
655
|
});
|
|
655
|
-
if (!v) return /* @__PURE__ */
|
|
656
|
+
if (!v) return /* @__PURE__ */ z(i, {
|
|
656
657
|
title: Z("providers.detail.loadingTitle", "Provider"),
|
|
657
|
-
children: /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ z(o, {
|
|
658
659
|
illustration: "empty-data",
|
|
659
660
|
title: Z("providers.detail.notFoundTitle", "Provider not found"),
|
|
660
661
|
description: Z("providers.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
|
|
661
|
-
action: /* @__PURE__ */
|
|
662
|
+
action: /* @__PURE__ */ z("button", {
|
|
662
663
|
type: "button",
|
|
663
664
|
onClick: () => g("/providers"),
|
|
664
665
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
@@ -666,39 +667,39 @@ function X() {
|
|
|
666
667
|
})
|
|
667
668
|
})
|
|
668
669
|
});
|
|
669
|
-
let Q = v, $ = Q.websiteUrl && /^https?:\/\//i.test(Q.websiteUrl) ? Q.websiteUrl : null,
|
|
670
|
-
return /* @__PURE__ */
|
|
670
|
+
let Q = v, $ = Q.websiteUrl && /^https?:\/\//i.test(Q.websiteUrl) ? Q.websiteUrl : null, ie = Q.plans && Q.plans.length > 1 ? Q.plans.filter((e) => e.isActive && e.amount > 0).reduce((e, t) => e === null || t.amount < e.amount ? t : e, null)?.id ?? null : null;
|
|
671
|
+
return /* @__PURE__ */ B(i, {
|
|
671
672
|
title: Q.name,
|
|
672
|
-
description: Z(
|
|
673
|
-
actions: /* @__PURE__ */
|
|
673
|
+
description: Z(G[Q.category], p(Q.category)),
|
|
674
|
+
actions: /* @__PURE__ */ B("div", {
|
|
674
675
|
className: "flex items-center gap-2",
|
|
675
676
|
children: [
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ B("button", {
|
|
677
678
|
type: "button",
|
|
678
|
-
onClick: () =>
|
|
679
|
+
onClick: () => U(!0),
|
|
679
680
|
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",
|
|
680
681
|
children: [
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ z(j, { className: "h-4 w-4" }),
|
|
682
683
|
" ",
|
|
683
684
|
Z("providers.detail.edit", "Edit")
|
|
684
685
|
]
|
|
685
686
|
}),
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ B("button", {
|
|
687
688
|
type: "button",
|
|
688
689
|
onClick: () => X(!0),
|
|
689
690
|
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",
|
|
690
691
|
children: [
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ z(w, { className: "h-4 w-4" }),
|
|
692
693
|
" ",
|
|
693
694
|
Z("providers.detail.archive", "Archive")
|
|
694
695
|
]
|
|
695
696
|
}),
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ B("button", {
|
|
697
698
|
type: "button",
|
|
698
699
|
onClick: () => g("/providers"),
|
|
699
700
|
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",
|
|
700
701
|
children: [
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ z(T, { className: "rtl:rotate-180 h-4 w-4" }),
|
|
702
703
|
" ",
|
|
703
704
|
Z("providers.detail.back", "Back")
|
|
704
705
|
]
|
|
@@ -706,147 +707,151 @@ function X() {
|
|
|
706
707
|
]
|
|
707
708
|
}),
|
|
708
709
|
children: [
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ B("div", {
|
|
710
711
|
className: "flex flex-wrap items-center gap-3",
|
|
711
712
|
children: [
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ z("span", {
|
|
713
714
|
className: "flex size-11 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
|
|
714
|
-
children: /* @__PURE__ */
|
|
715
|
+
children: /* @__PURE__ */ z(E, { className: "h-5 w-5" })
|
|
715
716
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
Q.industry && /* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ z(a, { status: Q.status }),
|
|
718
|
+
Q.industry && /* @__PURE__ */ z("span", {
|
|
718
719
|
className: "text-sm text-text-secondary",
|
|
719
720
|
children: Q.industry
|
|
720
721
|
}),
|
|
721
|
-
Q.region && /* @__PURE__ */
|
|
722
|
+
Q.region && /* @__PURE__ */ B("span", {
|
|
722
723
|
className: "text-sm text-text-secondary",
|
|
723
724
|
children: ["· ", Q.region]
|
|
724
725
|
}),
|
|
725
|
-
$ && /* @__PURE__ */
|
|
726
|
+
$ && /* @__PURE__ */ B("a", {
|
|
726
727
|
href: $,
|
|
727
728
|
target: "_blank",
|
|
728
729
|
rel: "noopener noreferrer",
|
|
729
730
|
className: "inline-flex items-center gap-1 text-sm text-text-link hover:underline",
|
|
730
731
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ z(O, { className: "h-3.5 w-3.5" }),
|
|
732
733
|
" ",
|
|
733
734
|
Z("providers.detail.website", "Website")
|
|
734
735
|
]
|
|
735
736
|
})
|
|
736
737
|
]
|
|
737
738
|
}),
|
|
738
|
-
Q.description && /* @__PURE__ */
|
|
739
|
+
Q.description && /* @__PURE__ */ z("p", {
|
|
739
740
|
className: "mt-4 max-w-3xl text-sm leading-relaxed text-text-secondary",
|
|
740
741
|
children: Q.description
|
|
741
742
|
}),
|
|
742
|
-
Q.tags.length > 0 && /* @__PURE__ */
|
|
743
|
+
Q.tags.length > 0 && /* @__PURE__ */ B("div", {
|
|
743
744
|
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
744
|
-
children: [/* @__PURE__ */
|
|
745
|
+
children: [/* @__PURE__ */ z(F, { className: "h-3.5 w-3.5 text-text-secondary" }), Q.tags.map((e) => /* @__PURE__ */ z("span", {
|
|
745
746
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
746
747
|
children: e
|
|
747
748
|
}, e))]
|
|
748
749
|
}),
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ B("div", {
|
|
750
751
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
752
|
+
children: [/* @__PURE__ */ B("div", {
|
|
752
753
|
className: "lg:col-span-2",
|
|
753
|
-
children:
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
onClick: () => W(!0),
|
|
759
|
-
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",
|
|
760
|
-
children: [
|
|
761
|
-
/* @__PURE__ */ L(A, { className: "h-3.5 w-3.5" }),
|
|
762
|
-
" ",
|
|
763
|
-
Z("providers.detail.addPlan", "Add plan")
|
|
764
|
-
]
|
|
765
|
-
}),
|
|
766
|
-
children: !Q.plans || Q.plans.length === 0 ? /* @__PURE__ */ L(o, {
|
|
767
|
-
illustration: "empty-data",
|
|
768
|
-
title: Z("providers.detail.noPlansTitle", "No published plans"),
|
|
769
|
-
description: Z("providers.detail.noPlansDescription", "When this provider publishes plans, they'll appear here."),
|
|
770
|
-
action: /* @__PURE__ */ L("button", {
|
|
754
|
+
children: [
|
|
755
|
+
/* @__PURE__ */ z(u, {
|
|
756
|
+
title: Z("providers.detail.plans", "Plans"),
|
|
757
|
+
description: Z("providers.detail.plansDescription", "Pricing this provider publishes"),
|
|
758
|
+
action: /* @__PURE__ */ B("button", {
|
|
771
759
|
type: "button",
|
|
772
|
-
onClick: () =>
|
|
773
|
-
className: "rounded-lg
|
|
774
|
-
children:
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
760
|
+
onClick: () => K(!0),
|
|
761
|
+
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",
|
|
762
|
+
children: [
|
|
763
|
+
/* @__PURE__ */ z(M, { className: "h-3.5 w-3.5" }),
|
|
764
|
+
" ",
|
|
765
|
+
Z("providers.detail.addPlan", "Add plan")
|
|
766
|
+
]
|
|
767
|
+
}),
|
|
768
|
+
children: !Q.plans || Q.plans.length === 0 ? /* @__PURE__ */ z(o, {
|
|
769
|
+
illustration: "empty-data",
|
|
770
|
+
title: Z("providers.detail.noPlansTitle", "No published plans"),
|
|
771
|
+
description: Z("providers.detail.noPlansDescription", "When this provider publishes plans, they'll appear here."),
|
|
772
|
+
action: /* @__PURE__ */ z("button", {
|
|
773
|
+
type: "button",
|
|
774
|
+
onClick: () => K(!0),
|
|
775
|
+
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
776
|
+
children: Z("providers.detail.addPlan", "Add plan")
|
|
777
|
+
})
|
|
778
|
+
}) : /* @__PURE__ */ z("div", {
|
|
779
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
780
|
+
children: Q.plans.map((e) => {
|
|
781
|
+
let t = e.id === ie && Q.plans.length > 1;
|
|
782
|
+
return /* @__PURE__ */ B(V, {
|
|
783
|
+
treatment: t ? "insight" : "metric",
|
|
784
|
+
glow: t,
|
|
785
|
+
className: "flex flex-col p-5",
|
|
786
|
+
children: [
|
|
787
|
+
/* @__PURE__ */ B("div", {
|
|
788
|
+
className: "flex items-start justify-between gap-2",
|
|
789
|
+
children: [/* @__PURE__ */ z("p", {
|
|
790
|
+
className: "text-sm font-semibold text-text-primary",
|
|
791
|
+
children: e.name
|
|
792
|
+
}), t ? /* @__PURE__ */ B("span", {
|
|
793
|
+
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",
|
|
794
|
+
children: [
|
|
795
|
+
/* @__PURE__ */ z(P, { className: "h-3 w-3" }),
|
|
796
|
+
" ",
|
|
797
|
+
Z("providers.detail.bestValue", "Best value")
|
|
798
|
+
]
|
|
799
|
+
}) : /* @__PURE__ */ z(a, { status: e.isActive ? "ACTIVE" : "DISABLED" })]
|
|
800
|
+
}),
|
|
801
|
+
/* @__PURE__ */ B("p", {
|
|
802
|
+
className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
|
|
803
|
+
children: [s(e.amount, e.currency), /* @__PURE__ */ z("span", {
|
|
804
|
+
className: "text-sm font-normal text-text-secondary",
|
|
805
|
+
children: m(e.interval)
|
|
806
|
+
})]
|
|
807
|
+
}),
|
|
808
|
+
e.description && /* @__PURE__ */ z("p", {
|
|
809
|
+
className: "mt-2 text-xs leading-relaxed text-text-secondary",
|
|
810
|
+
children: e.description
|
|
811
|
+
}),
|
|
812
|
+
e.features.length > 0 && /* @__PURE__ */ B("ul", {
|
|
813
|
+
className: "mt-4 space-y-2 border-t border-border-subtle pt-4",
|
|
814
|
+
children: [e.features.slice(0, 6).map((e) => /* @__PURE__ */ B("li", {
|
|
815
|
+
className: "flex items-start gap-2 text-xs text-text-secondary",
|
|
816
|
+
children: [/* @__PURE__ */ z(D, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-status-success-text" }), /* @__PURE__ */ z("span", { children: e })]
|
|
817
|
+
}, e)), e.features.length > 6 && /* @__PURE__ */ z("li", {
|
|
818
|
+
className: "ps-6 text-[11px] text-text-secondary",
|
|
819
|
+
children: Z("providers.detail.moreFeatures", "+{{count}} more", { count: e.features.length - 6 })
|
|
820
|
+
})]
|
|
821
|
+
})
|
|
822
|
+
]
|
|
823
|
+
}, e.id);
|
|
824
|
+
})
|
|
822
825
|
})
|
|
823
|
-
})
|
|
824
|
-
|
|
825
|
-
|
|
826
|
+
}),
|
|
827
|
+
/* @__PURE__ */ z(x, { providerId: Q.id }),
|
|
828
|
+
/* @__PURE__ */ z(b, { providerId: Q.id })
|
|
829
|
+
]
|
|
830
|
+
}), /* @__PURE__ */ B("div", {
|
|
826
831
|
className: "space-y-4",
|
|
827
832
|
children: [
|
|
828
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ B(V, {
|
|
829
834
|
treatment: "metric",
|
|
830
835
|
className: "p-5",
|
|
831
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ B("div", {
|
|
832
837
|
className: "flex items-center justify-between",
|
|
833
|
-
children: [/* @__PURE__ */
|
|
838
|
+
children: [/* @__PURE__ */ B("span", {
|
|
834
839
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
835
840
|
children: [
|
|
836
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ z(N, { className: "h-4 w-4 text-text-secondary" }),
|
|
837
842
|
" ",
|
|
838
843
|
Z("providers.detail.vendorHealth", "Vendor health")
|
|
839
844
|
]
|
|
840
|
-
}), Q.vendorHealthScore != null && /* @__PURE__ */
|
|
841
|
-
className: r("rounded-full px-2 py-0.5 text-[11px] font-medium",
|
|
842
|
-
children:
|
|
845
|
+
}), Q.vendorHealthScore != null && /* @__PURE__ */ z("span", {
|
|
846
|
+
className: r("rounded-full px-2 py-0.5 text-[11px] font-medium", J(Q.vendorHealthScore, Z).cls),
|
|
847
|
+
children: J(Q.vendorHealthScore, Z).label
|
|
843
848
|
})]
|
|
844
|
-
}), Q.vendorHealthScore == null ? /* @__PURE__ */
|
|
849
|
+
}), Q.vendorHealthScore == null ? /* @__PURE__ */ z("p", {
|
|
845
850
|
className: "mt-4 text-sm text-text-secondary",
|
|
846
851
|
children: Z("providers.detail.noHealthScore", "No health score yet.")
|
|
847
|
-
}) : /* @__PURE__ */
|
|
852
|
+
}) : /* @__PURE__ */ z("div", {
|
|
848
853
|
className: "mt-2 flex flex-col items-center",
|
|
849
|
-
children: /* @__PURE__ */
|
|
854
|
+
children: /* @__PURE__ */ z(d, {
|
|
850
855
|
value: Q.vendorHealthScore,
|
|
851
856
|
max: 100,
|
|
852
857
|
size: 168,
|
|
@@ -854,101 +859,101 @@ function X() {
|
|
|
854
859
|
})
|
|
855
860
|
})]
|
|
856
861
|
}),
|
|
857
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ B(V, {
|
|
858
863
|
treatment: "metric",
|
|
859
864
|
className: "p-5",
|
|
860
|
-
children: [/* @__PURE__ */
|
|
865
|
+
children: [/* @__PURE__ */ B("div", {
|
|
861
866
|
className: "flex items-center justify-between",
|
|
862
|
-
children: [/* @__PURE__ */
|
|
867
|
+
children: [/* @__PURE__ */ B("span", {
|
|
863
868
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
864
869
|
children: [
|
|
865
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ z(I, { className: "h-4 w-4 text-text-secondary" }),
|
|
866
871
|
" ",
|
|
867
872
|
Z("providers.detail.churnRisk", "Churn risk")
|
|
868
873
|
]
|
|
869
|
-
}), Q.churnRiskScore != null && /* @__PURE__ */
|
|
870
|
-
className: r("rounded-full px-2 py-0.5 text-[11px] font-medium",
|
|
871
|
-
children:
|
|
874
|
+
}), Q.churnRiskScore != null && /* @__PURE__ */ z("span", {
|
|
875
|
+
className: r("rounded-full px-2 py-0.5 text-[11px] font-medium", Y(Q.churnRiskScore, Z).chip),
|
|
876
|
+
children: Y(Q.churnRiskScore, Z).label
|
|
872
877
|
})]
|
|
873
|
-
}), Q.churnRiskScore == null ? /* @__PURE__ */
|
|
878
|
+
}), Q.churnRiskScore == null ? /* @__PURE__ */ z("p", {
|
|
874
879
|
className: "mt-4 text-sm text-text-secondary",
|
|
875
880
|
children: Z("providers.detail.noChurnSignal", "No churn signal yet.")
|
|
876
|
-
}) : /* @__PURE__ */ R
|
|
881
|
+
}) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
|
|
877
882
|
className: "mt-3 flex items-baseline justify-between",
|
|
878
|
-
children: [/* @__PURE__ */
|
|
883
|
+
children: [/* @__PURE__ */ z("span", {
|
|
879
884
|
className: "text-2xl font-bold tabular-nums text-text-primary",
|
|
880
885
|
children: Q.churnRiskScore
|
|
881
|
-
}), /* @__PURE__ */
|
|
886
|
+
}), /* @__PURE__ */ z("span", {
|
|
882
887
|
className: "text-xs text-text-secondary",
|
|
883
888
|
children: "/ 100"
|
|
884
889
|
})]
|
|
885
|
-
}), /* @__PURE__ */
|
|
890
|
+
}), /* @__PURE__ */ z(f, {
|
|
886
891
|
label: Z("common.healthScore", "Health score"),
|
|
887
892
|
value: Q.churnRiskScore,
|
|
888
|
-
tone:
|
|
893
|
+
tone: Y(Q.churnRiskScore, Z).tone,
|
|
889
894
|
className: "mt-2"
|
|
890
895
|
})] })]
|
|
891
896
|
}),
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ z(re, { slug: Q.slug }),
|
|
898
|
+
/* @__PURE__ */ B(V, {
|
|
894
899
|
treatment: "metric",
|
|
895
900
|
className: "p-5",
|
|
896
|
-
children: [/* @__PURE__ */
|
|
901
|
+
children: [/* @__PURE__ */ B("span", {
|
|
897
902
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
898
903
|
children: [
|
|
899
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ z(k, { className: "h-4 w-4 text-text-secondary" }),
|
|
900
905
|
" ",
|
|
901
906
|
Z("providers.detail.atAGlance", "At a glance")
|
|
902
907
|
]
|
|
903
|
-
}), /* @__PURE__ */
|
|
908
|
+
}), /* @__PURE__ */ B("dl", {
|
|
904
909
|
className: "mt-3 space-y-2.5 text-sm",
|
|
905
910
|
children: [
|
|
906
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ B("div", {
|
|
907
912
|
className: "flex items-center justify-between gap-2",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
913
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
909
914
|
className: "text-text-secondary",
|
|
910
915
|
children: Z("providers.detail.category", "Category")
|
|
911
|
-
}), /* @__PURE__ */
|
|
916
|
+
}), /* @__PURE__ */ z("dd", {
|
|
912
917
|
className: "font-medium text-text-primary",
|
|
913
|
-
children: Z(
|
|
918
|
+
children: Z(G[Q.category], p(Q.category))
|
|
914
919
|
})]
|
|
915
920
|
}),
|
|
916
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ B("div", {
|
|
917
922
|
className: "flex items-center justify-between gap-2",
|
|
918
|
-
children: [/* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
919
924
|
className: "text-text-secondary",
|
|
920
925
|
children: Z("providers.detail.industry", "Industry")
|
|
921
|
-
}), /* @__PURE__ */
|
|
926
|
+
}), /* @__PURE__ */ z("dd", {
|
|
922
927
|
className: "font-medium text-text-primary",
|
|
923
928
|
children: Q.industry ?? "—"
|
|
924
929
|
})]
|
|
925
930
|
}),
|
|
926
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ B("div", {
|
|
927
932
|
className: "flex items-center justify-between gap-2",
|
|
928
|
-
children: [/* @__PURE__ */
|
|
933
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
929
934
|
className: "text-text-secondary",
|
|
930
935
|
children: Z("providers.detail.region", "Region")
|
|
931
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ z("dd", {
|
|
932
937
|
className: "font-medium text-text-primary",
|
|
933
938
|
children: Q.region ?? "—"
|
|
934
939
|
})]
|
|
935
940
|
}),
|
|
936
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ B("div", {
|
|
937
942
|
className: "flex items-center justify-between gap-2",
|
|
938
|
-
children: [/* @__PURE__ */
|
|
943
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
939
944
|
className: "text-text-secondary",
|
|
940
945
|
children: Z("providers.detail.language", "Language")
|
|
941
|
-
}), /* @__PURE__ */
|
|
946
|
+
}), /* @__PURE__ */ z("dd", {
|
|
942
947
|
className: "font-medium text-text-primary",
|
|
943
948
|
children: Q.language ?? "—"
|
|
944
949
|
})]
|
|
945
950
|
}),
|
|
946
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ B("div", {
|
|
947
952
|
className: "flex items-center justify-between gap-2",
|
|
948
|
-
children: [/* @__PURE__ */
|
|
953
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
949
954
|
className: "text-text-secondary",
|
|
950
955
|
children: Z("providers.detail.publishedPlans", "Published plans")
|
|
951
|
-
}), /* @__PURE__ */
|
|
956
|
+
}), /* @__PURE__ */ z("dd", {
|
|
952
957
|
className: "font-medium tabular-nums text-text-primary",
|
|
953
958
|
children: Q.plans?.length ?? 0
|
|
954
959
|
})]
|
|
@@ -959,15 +964,15 @@ function X() {
|
|
|
959
964
|
]
|
|
960
965
|
})]
|
|
961
966
|
}),
|
|
962
|
-
|
|
967
|
+
H && /* @__PURE__ */ z(ee, {
|
|
963
968
|
provider: Q,
|
|
964
|
-
onClose: () =>
|
|
969
|
+
onClose: () => U(!1)
|
|
965
970
|
}),
|
|
966
|
-
|
|
971
|
+
W && /* @__PURE__ */ z(te, {
|
|
967
972
|
providerId: Q.id,
|
|
968
|
-
onClose: () =>
|
|
973
|
+
onClose: () => K(!1)
|
|
969
974
|
}),
|
|
970
|
-
|
|
975
|
+
q && /* @__PURE__ */ z(ne, {
|
|
971
976
|
provider: Q,
|
|
972
977
|
onClose: () => X(!1)
|
|
973
978
|
})
|