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