@burdenoff/microfe-subscriberbot 2026.801.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/components/viz.js +51 -27
- package/dist/subscriberbot/components/viz.js.map +1 -1
- package/dist/subscriberbot/hooks/index.d.ts +2 -1
- package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/index.js +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +12 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +82 -56
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/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 +155 -97
- 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 +3 -2
- package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/InvoicesPage.js +368 -362
- 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 +3 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +296 -228
- 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 +4 -2
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +577 -402
- 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/dist/subscriberbot/types/index.d.ts +37 -0
- package/dist/subscriberbot/types/index.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
-
import { formatCurrency as r,
|
|
5
|
-
import { StatusBadge as
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { Modal as
|
|
8
|
-
import { ErrorView as
|
|
9
|
-
import { Gauge as
|
|
4
|
+
import { formatCurrency as r, formatDate as i, formatEnumLabel as a, formatIntervalSuffix as o } from "../../utils/formatters.js";
|
|
5
|
+
import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
6
|
+
import { EmptyState as c } from "../../components/EmptyState.js";
|
|
7
|
+
import { Modal as l } from "../../components/Modal.js";
|
|
8
|
+
import { ErrorView as u, LoadingView as d, Section as f } from "../../components/StateViews.js";
|
|
9
|
+
import { Gauge as p, MiniProgress as m, Sparkline as h } from "../../components/viz.js";
|
|
10
10
|
import "../../components/index.js";
|
|
11
|
-
import { useArchiveProvider as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
11
|
+
import { useArchiveProvider as g, useBenchmarkDataPoints as _, useCreatePlan as v, useProvider as y, useUpdateProvider as b } from "../../hooks/useSubscriberBotApi.js";
|
|
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 I = "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,587 +65,731 @@ var I = "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 =
|
|
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:
|
|
215
|
+
value: v,
|
|
194
216
|
onChange: (e) => y(e.target.value),
|
|
195
|
-
className:
|
|
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
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ z("p", {
|
|
441
483
|
className: "text-sm text-text-secondary",
|
|
442
|
-
children:
|
|
443
|
-
"Archive ",
|
|
444
|
-
/* @__PURE__ */ N("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
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
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);
|
|
515
|
+
return {
|
|
516
|
+
points: r,
|
|
517
|
+
latest: t,
|
|
518
|
+
amounts: i,
|
|
519
|
+
min: Math.min(...i),
|
|
520
|
+
max: Math.max(...i),
|
|
521
|
+
first: i[0] ?? t.amount
|
|
522
|
+
};
|
|
523
|
+
}, [n]);
|
|
524
|
+
return /* @__PURE__ */ B(V, {
|
|
525
|
+
treatment: "metric",
|
|
526
|
+
className: "p-5",
|
|
527
|
+
children: [/* @__PURE__ */ B("span", {
|
|
528
|
+
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
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, {
|
|
535
|
+
className: "min-h-[8rem]",
|
|
536
|
+
label: t("providers.detail.priceHistoryLoading", "Loading price history…")
|
|
537
|
+
}) : c ? /* @__PURE__ */ z(u, {
|
|
538
|
+
className: "min-h-[8rem]",
|
|
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", {
|
|
544
|
+
className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
|
|
545
|
+
children: [r(f.latest.amount, f.latest.currency), /* @__PURE__ */ z("span", {
|
|
546
|
+
className: "text-sm font-normal text-text-secondary",
|
|
547
|
+
children: o(f.latest.interval)
|
|
548
|
+
})]
|
|
549
|
+
}),
|
|
550
|
+
/* @__PURE__ */ B("p", {
|
|
551
|
+
className: "text-xs text-text-secondary",
|
|
552
|
+
children: [
|
|
553
|
+
f.latest.planName,
|
|
554
|
+
" · ",
|
|
555
|
+
f.latest.region,
|
|
556
|
+
" ·",
|
|
557
|
+
" ",
|
|
558
|
+
t("providers.detail.observed", "observed"),
|
|
559
|
+
" ",
|
|
560
|
+
i(f.latest.observedAt)
|
|
561
|
+
]
|
|
562
|
+
}),
|
|
563
|
+
/* @__PURE__ */ z(h, {
|
|
564
|
+
className: "mt-3 w-full",
|
|
565
|
+
points: f.amounts,
|
|
566
|
+
positive: f.latest.amount <= f.first
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ B("dl", {
|
|
569
|
+
className: "mt-3 space-y-2 border-t border-border-subtle pt-3 text-xs",
|
|
570
|
+
children: [
|
|
571
|
+
/* @__PURE__ */ B("div", {
|
|
572
|
+
className: "flex items-center justify-between gap-2",
|
|
573
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
574
|
+
className: "text-text-secondary",
|
|
575
|
+
children: t("providers.detail.observedRange", "Observed range")
|
|
576
|
+
}), /* @__PURE__ */ B("dd", {
|
|
577
|
+
className: "font-medium tabular-nums text-text-primary",
|
|
578
|
+
children: [
|
|
579
|
+
r(f.min, f.latest.currency),
|
|
580
|
+
" –",
|
|
581
|
+
" ",
|
|
582
|
+
r(f.max, f.latest.currency)
|
|
583
|
+
]
|
|
584
|
+
})]
|
|
585
|
+
}),
|
|
586
|
+
/* @__PURE__ */ B("div", {
|
|
587
|
+
className: "flex items-center justify-between gap-2",
|
|
588
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
589
|
+
className: "text-text-secondary",
|
|
590
|
+
children: t("providers.detail.observations", "Observations")
|
|
591
|
+
}), /* @__PURE__ */ z("dd", {
|
|
592
|
+
className: "font-medium tabular-nums text-text-primary",
|
|
593
|
+
children: f.points.length
|
|
594
|
+
})]
|
|
595
|
+
}),
|
|
596
|
+
/* @__PURE__ */ B("div", {
|
|
597
|
+
className: "flex items-center justify-between gap-2",
|
|
598
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
599
|
+
className: "text-text-secondary",
|
|
600
|
+
children: t("providers.detail.latestSource", "Latest source")
|
|
601
|
+
}), /* @__PURE__ */ z("dd", {
|
|
602
|
+
className: "font-medium text-text-primary",
|
|
603
|
+
children: f.latest.sourceLabel ?? a(f.latest.sourceKind)
|
|
604
|
+
})]
|
|
605
|
+
})
|
|
606
|
+
]
|
|
607
|
+
})
|
|
608
|
+
] }) : /* @__PURE__ */ z("p", {
|
|
609
|
+
className: "mt-4 text-sm text-text-secondary",
|
|
610
|
+
children: t("providers.detail.priceHistoryEmpty", "No price observations recorded for this provider yet.")
|
|
611
|
+
}) : /* @__PURE__ */ z("p", {
|
|
612
|
+
className: "mt-4 text-sm text-text-secondary",
|
|
613
|
+
children: t("providers.detail.priceHistoryNoSlug", "Add a slug to this provider to match it against the shared price benchmark dataset.")
|
|
614
|
+
})]
|
|
480
615
|
});
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
616
|
+
}
|
|
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…") })
|
|
622
|
+
});
|
|
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."),
|
|
627
|
+
onRetry: () => void v()
|
|
486
628
|
})
|
|
487
629
|
});
|
|
488
|
-
if (!h) return /* @__PURE__ */
|
|
489
|
-
title: "Provider",
|
|
490
|
-
children: /* @__PURE__ */
|
|
630
|
+
if (!h) return /* @__PURE__ */ z(n, {
|
|
631
|
+
title: K("providers.detail.loadingTitle", "Provider"),
|
|
632
|
+
children: /* @__PURE__ */ z(c, {
|
|
491
633
|
illustration: "empty-data",
|
|
492
|
-
title: "Provider not found",
|
|
493
|
-
description: "It may have been removed, or you may not have access to it.",
|
|
494
|
-
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", {
|
|
495
637
|
type: "button",
|
|
496
|
-
onClick: () =>
|
|
638
|
+
onClick: () => l("/providers"),
|
|
497
639
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
498
|
-
children: "Back to providers"
|
|
640
|
+
children: K("providers.detail.backToProviders", "Back to providers")
|
|
499
641
|
})
|
|
500
642
|
})
|
|
501
643
|
});
|
|
502
|
-
let
|
|
503
|
-
return /* @__PURE__ */
|
|
504
|
-
title:
|
|
505
|
-
description:
|
|
506
|
-
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", {
|
|
507
649
|
className: "flex items-center gap-2",
|
|
508
650
|
children: [
|
|
509
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ B("button", {
|
|
510
652
|
type: "button",
|
|
511
|
-
onClick: () =>
|
|
653
|
+
onClick: () => S(!0),
|
|
512
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",
|
|
513
|
-
children: [
|
|
655
|
+
children: [
|
|
656
|
+
/* @__PURE__ */ z(j, { className: "h-4 w-4" }),
|
|
657
|
+
" ",
|
|
658
|
+
K("providers.detail.edit", "Edit")
|
|
659
|
+
]
|
|
514
660
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ B("button", {
|
|
516
662
|
type: "button",
|
|
517
|
-
onClick: () =>
|
|
663
|
+
onClick: () => W(!0),
|
|
518
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",
|
|
519
|
-
children: [
|
|
665
|
+
children: [
|
|
666
|
+
/* @__PURE__ */ z(w, { className: "h-4 w-4" }),
|
|
667
|
+
" ",
|
|
668
|
+
K("providers.detail.archive", "Archive")
|
|
669
|
+
]
|
|
520
670
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ B("button", {
|
|
522
672
|
type: "button",
|
|
523
|
-
onClick: () =>
|
|
673
|
+
onClick: () => l("/providers"),
|
|
524
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",
|
|
525
|
-
children: [
|
|
675
|
+
children: [
|
|
676
|
+
/* @__PURE__ */ z(T, { className: "h-4 w-4" }),
|
|
677
|
+
" ",
|
|
678
|
+
K("providers.detail.back", "Back")
|
|
679
|
+
]
|
|
526
680
|
})
|
|
527
681
|
]
|
|
528
682
|
}),
|
|
529
683
|
children: [
|
|
530
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ B("div", {
|
|
531
685
|
className: "flex flex-wrap items-center gap-3",
|
|
532
686
|
children: [
|
|
533
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ z("span", {
|
|
534
688
|
className: "flex size-11 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-text-primary",
|
|
535
|
-
children: /* @__PURE__ */
|
|
689
|
+
children: /* @__PURE__ */ z(E, { className: "h-5 w-5" })
|
|
536
690
|
}),
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
|
|
691
|
+
/* @__PURE__ */ z(s, { status: q.status }),
|
|
692
|
+
q.industry && /* @__PURE__ */ z("span", {
|
|
539
693
|
className: "text-sm text-text-secondary",
|
|
540
|
-
children:
|
|
694
|
+
children: q.industry
|
|
541
695
|
}),
|
|
542
|
-
|
|
696
|
+
q.region && /* @__PURE__ */ B("span", {
|
|
543
697
|
className: "text-sm text-text-secondary",
|
|
544
|
-
children: ["· ",
|
|
698
|
+
children: ["· ", q.region]
|
|
545
699
|
}),
|
|
546
|
-
|
|
547
|
-
href:
|
|
700
|
+
$ && /* @__PURE__ */ B("a", {
|
|
701
|
+
href: $,
|
|
548
702
|
target: "_blank",
|
|
549
703
|
rel: "noopener noreferrer",
|
|
550
704
|
className: "inline-flex items-center gap-1 text-sm text-text-link hover:underline",
|
|
551
|
-
children: [
|
|
705
|
+
children: [
|
|
706
|
+
/* @__PURE__ */ z(O, { className: "h-3.5 w-3.5" }),
|
|
707
|
+
" ",
|
|
708
|
+
K("providers.detail.website", "Website")
|
|
709
|
+
]
|
|
552
710
|
})
|
|
553
711
|
]
|
|
554
712
|
}),
|
|
555
|
-
|
|
713
|
+
q.description && /* @__PURE__ */ z("p", {
|
|
556
714
|
className: "mt-4 max-w-3xl text-sm leading-relaxed text-text-secondary",
|
|
557
|
-
children:
|
|
715
|
+
children: q.description
|
|
558
716
|
}),
|
|
559
|
-
|
|
717
|
+
q.tags.length > 0 && /* @__PURE__ */ B("div", {
|
|
560
718
|
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
561
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ z(F, { className: "h-3.5 w-3.5 text-text-secondary" }), q.tags.map((e) => /* @__PURE__ */ z("span", {
|
|
562
720
|
className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs text-text-secondary",
|
|
563
721
|
children: e
|
|
564
722
|
}, e))]
|
|
565
723
|
}),
|
|
566
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ B("div", {
|
|
567
725
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
726
|
+
children: [/* @__PURE__ */ z("div", {
|
|
569
727
|
className: "lg:col-span-2",
|
|
570
|
-
children: /* @__PURE__ */
|
|
571
|
-
title: "Plans",
|
|
572
|
-
description: "Pricing this provider publishes",
|
|
573
|
-
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", {
|
|
574
732
|
type: "button",
|
|
575
|
-
onClick: () =>
|
|
733
|
+
onClick: () => H(!0),
|
|
576
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",
|
|
577
|
-
children: [
|
|
735
|
+
children: [
|
|
736
|
+
/* @__PURE__ */ z(M, { className: "h-3.5 w-3.5" }),
|
|
737
|
+
" ",
|
|
738
|
+
K("providers.detail.addPlan", "Add plan")
|
|
739
|
+
]
|
|
578
740
|
}),
|
|
579
|
-
children: !
|
|
741
|
+
children: !q.plans || q.plans.length === 0 ? /* @__PURE__ */ z(c, {
|
|
580
742
|
illustration: "empty-data",
|
|
581
|
-
title: "No published plans",
|
|
582
|
-
description: "When this provider publishes plans, they'll appear here.",
|
|
583
|
-
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", {
|
|
584
746
|
type: "button",
|
|
585
|
-
onClick: () =>
|
|
747
|
+
onClick: () => H(!0),
|
|
586
748
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
587
|
-
children: "Add plan"
|
|
749
|
+
children: K("providers.detail.addPlan", "Add plan")
|
|
588
750
|
})
|
|
589
|
-
}) : /* @__PURE__ */
|
|
751
|
+
}) : /* @__PURE__ */ z("div", {
|
|
590
752
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
591
|
-
children:
|
|
592
|
-
let t = e.id ===
|
|
593
|
-
return /* @__PURE__ */
|
|
753
|
+
children: q.plans.map((e) => {
|
|
754
|
+
let t = e.id === te && q.plans.length > 1;
|
|
755
|
+
return /* @__PURE__ */ B(V, {
|
|
594
756
|
treatment: t ? "insight" : "metric",
|
|
595
757
|
glow: t,
|
|
596
758
|
className: "flex flex-col p-5",
|
|
597
759
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ B("div", {
|
|
599
761
|
className: "flex items-start justify-between gap-2",
|
|
600
|
-
children: [/* @__PURE__ */
|
|
762
|
+
children: [/* @__PURE__ */ z("p", {
|
|
601
763
|
className: "text-sm font-semibold text-text-primary",
|
|
602
764
|
children: e.name
|
|
603
|
-
}), t ? /* @__PURE__ */
|
|
765
|
+
}), t ? /* @__PURE__ */ B("span", {
|
|
604
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",
|
|
605
|
-
children: [
|
|
606
|
-
|
|
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" })]
|
|
607
773
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ B("p", {
|
|
609
775
|
className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
|
|
610
|
-
children: [r(e.amount, e.currency), /* @__PURE__ */
|
|
776
|
+
children: [r(e.amount, e.currency), /* @__PURE__ */ z("span", {
|
|
611
777
|
className: "text-sm font-normal text-text-secondary",
|
|
612
|
-
children:
|
|
778
|
+
children: o(e.interval)
|
|
613
779
|
})]
|
|
614
780
|
}),
|
|
615
|
-
e.description && /* @__PURE__ */
|
|
781
|
+
e.description && /* @__PURE__ */ z("p", {
|
|
616
782
|
className: "mt-2 text-xs leading-relaxed text-text-secondary",
|
|
617
783
|
children: e.description
|
|
618
784
|
}),
|
|
619
|
-
e.features.length > 0 && /* @__PURE__ */
|
|
785
|
+
e.features.length > 0 && /* @__PURE__ */ B("ul", {
|
|
620
786
|
className: "mt-4 space-y-2 border-t border-border-subtle pt-4",
|
|
621
|
-
children: [e.features.slice(0, 6).map((e) => /* @__PURE__ */
|
|
787
|
+
children: [e.features.slice(0, 6).map((e) => /* @__PURE__ */ B("li", {
|
|
622
788
|
className: "flex items-start gap-2 text-xs text-text-secondary",
|
|
623
|
-
children: [/* @__PURE__ */
|
|
624
|
-
}, e)), e.features.length > 6 && /* @__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 })]
|
|
790
|
+
}, e)), e.features.length > 6 && /* @__PURE__ */ z("li", {
|
|
625
791
|
className: "pl-6 text-[11px] text-text-secondary",
|
|
626
|
-
children:
|
|
627
|
-
"+",
|
|
628
|
-
e.features.length - 6,
|
|
629
|
-
" more"
|
|
630
|
-
]
|
|
792
|
+
children: K("providers.detail.moreFeatures", "+{{count}} more", { count: e.features.length - 6 })
|
|
631
793
|
})]
|
|
632
794
|
})
|
|
633
795
|
]
|
|
@@ -635,121 +797,134 @@ function K() {
|
|
|
635
797
|
})
|
|
636
798
|
})
|
|
637
799
|
})
|
|
638
|
-
}), /* @__PURE__ */
|
|
800
|
+
}), /* @__PURE__ */ B("div", {
|
|
639
801
|
className: "space-y-4",
|
|
640
802
|
children: [
|
|
641
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ B(V, {
|
|
642
804
|
treatment: "metric",
|
|
643
805
|
className: "p-5",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
806
|
+
children: [/* @__PURE__ */ B("div", {
|
|
645
807
|
className: "flex items-center justify-between",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
808
|
+
children: [/* @__PURE__ */ B("span", {
|
|
647
809
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
648
|
-
children: [
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
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
|
|
652
818
|
})]
|
|
653
|
-
}),
|
|
819
|
+
}), q.vendorHealthScore == null ? /* @__PURE__ */ z("p", {
|
|
654
820
|
className: "mt-4 text-sm text-text-secondary",
|
|
655
|
-
children: "No health score yet."
|
|
656
|
-
}) : /* @__PURE__ */
|
|
821
|
+
children: K("providers.detail.noHealthScore", "No health score yet.")
|
|
822
|
+
}) : /* @__PURE__ */ z("div", {
|
|
657
823
|
className: "mt-2 flex flex-col items-center",
|
|
658
|
-
children: /* @__PURE__ */
|
|
659
|
-
value:
|
|
824
|
+
children: /* @__PURE__ */ z(p, {
|
|
825
|
+
value: q.vendorHealthScore,
|
|
660
826
|
max: 100,
|
|
661
827
|
size: 168,
|
|
662
|
-
label: "out of 100"
|
|
828
|
+
label: K("providers.detail.outOf100", "out of 100")
|
|
663
829
|
})
|
|
664
830
|
})]
|
|
665
831
|
}),
|
|
666
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ B(V, {
|
|
667
833
|
treatment: "metric",
|
|
668
834
|
className: "p-5",
|
|
669
|
-
children: [/* @__PURE__ */
|
|
835
|
+
children: [/* @__PURE__ */ B("div", {
|
|
670
836
|
className: "flex items-center justify-between",
|
|
671
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ B("span", {
|
|
672
838
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
673
|
-
children: [
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
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
|
|
677
847
|
})]
|
|
678
|
-
}),
|
|
848
|
+
}), q.churnRiskScore == null ? /* @__PURE__ */ z("p", {
|
|
679
849
|
className: "mt-4 text-sm text-text-secondary",
|
|
680
|
-
children: "No churn signal yet."
|
|
681
|
-
}) : /* @__PURE__ */
|
|
850
|
+
children: K("providers.detail.noChurnSignal", "No churn signal yet.")
|
|
851
|
+
}) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
|
|
682
852
|
className: "mt-3 flex items-baseline justify-between",
|
|
683
|
-
children: [/* @__PURE__ */
|
|
853
|
+
children: [/* @__PURE__ */ z("span", {
|
|
684
854
|
className: "text-2xl font-bold tabular-nums text-text-primary",
|
|
685
|
-
children:
|
|
686
|
-
}), /* @__PURE__ */
|
|
855
|
+
children: q.churnRiskScore
|
|
856
|
+
}), /* @__PURE__ */ z("span", {
|
|
687
857
|
className: "text-xs text-text-secondary",
|
|
688
858
|
children: "/ 100"
|
|
689
859
|
})]
|
|
690
|
-
}), /* @__PURE__ */
|
|
691
|
-
value:
|
|
692
|
-
tone:
|
|
860
|
+
}), /* @__PURE__ */ z(m, {
|
|
861
|
+
value: q.churnRiskScore,
|
|
862
|
+
tone: Y(q.churnRiskScore, K).tone,
|
|
693
863
|
className: "mt-2"
|
|
694
864
|
})] })]
|
|
695
865
|
}),
|
|
696
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ z(ee, { slug: q.slug }),
|
|
867
|
+
/* @__PURE__ */ B(V, {
|
|
697
868
|
treatment: "metric",
|
|
698
869
|
className: "p-5",
|
|
699
|
-
children: [/* @__PURE__ */
|
|
870
|
+
children: [/* @__PURE__ */ B("span", {
|
|
700
871
|
className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
701
|
-
children: [
|
|
702
|
-
|
|
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", {
|
|
703
878
|
className: "mt-3 space-y-2.5 text-sm",
|
|
704
879
|
children: [
|
|
705
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ B("div", {
|
|
706
881
|
className: "flex items-center justify-between gap-2",
|
|
707
|
-
children: [/* @__PURE__ */
|
|
882
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
708
883
|
className: "text-text-secondary",
|
|
709
|
-
children: "Category"
|
|
710
|
-
}), /* @__PURE__ */
|
|
884
|
+
children: K("providers.detail.category", "Category")
|
|
885
|
+
}), /* @__PURE__ */ z("dd", {
|
|
711
886
|
className: "font-medium text-text-primary",
|
|
712
|
-
children:
|
|
887
|
+
children: K(G[q.category], a(q.category))
|
|
713
888
|
})]
|
|
714
889
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ B("div", {
|
|
716
891
|
className: "flex items-center justify-between gap-2",
|
|
717
|
-
children: [/* @__PURE__ */
|
|
892
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
718
893
|
className: "text-text-secondary",
|
|
719
|
-
children: "Industry"
|
|
720
|
-
}), /* @__PURE__ */
|
|
894
|
+
children: K("providers.detail.industry", "Industry")
|
|
895
|
+
}), /* @__PURE__ */ z("dd", {
|
|
721
896
|
className: "font-medium text-text-primary",
|
|
722
|
-
children:
|
|
897
|
+
children: q.industry ?? "—"
|
|
723
898
|
})]
|
|
724
899
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ B("div", {
|
|
726
901
|
className: "flex items-center justify-between gap-2",
|
|
727
|
-
children: [/* @__PURE__ */
|
|
902
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
728
903
|
className: "text-text-secondary",
|
|
729
|
-
children: "Region"
|
|
730
|
-
}), /* @__PURE__ */
|
|
904
|
+
children: K("providers.detail.region", "Region")
|
|
905
|
+
}), /* @__PURE__ */ z("dd", {
|
|
731
906
|
className: "font-medium text-text-primary",
|
|
732
|
-
children:
|
|
907
|
+
children: q.region ?? "—"
|
|
733
908
|
})]
|
|
734
909
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ B("div", {
|
|
736
911
|
className: "flex items-center justify-between gap-2",
|
|
737
|
-
children: [/* @__PURE__ */
|
|
912
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
738
913
|
className: "text-text-secondary",
|
|
739
|
-
children: "Language"
|
|
740
|
-
}), /* @__PURE__ */
|
|
914
|
+
children: K("providers.detail.language", "Language")
|
|
915
|
+
}), /* @__PURE__ */ z("dd", {
|
|
741
916
|
className: "font-medium text-text-primary",
|
|
742
|
-
children:
|
|
917
|
+
children: q.language ?? "—"
|
|
743
918
|
})]
|
|
744
919
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ B("div", {
|
|
746
921
|
className: "flex items-center justify-between gap-2",
|
|
747
|
-
children: [/* @__PURE__ */
|
|
922
|
+
children: [/* @__PURE__ */ z("dt", {
|
|
748
923
|
className: "text-text-secondary",
|
|
749
|
-
children: "Published plans"
|
|
750
|
-
}), /* @__PURE__ */
|
|
924
|
+
children: K("providers.detail.publishedPlans", "Published plans")
|
|
925
|
+
}), /* @__PURE__ */ z("dd", {
|
|
751
926
|
className: "font-medium tabular-nums text-text-primary",
|
|
752
|
-
children:
|
|
927
|
+
children: q.plans?.length ?? 0
|
|
753
928
|
})]
|
|
754
929
|
})
|
|
755
930
|
]
|
|
@@ -758,22 +933,22 @@ function K() {
|
|
|
758
933
|
]
|
|
759
934
|
})]
|
|
760
935
|
}),
|
|
761
|
-
|
|
762
|
-
provider:
|
|
763
|
-
onClose: () =>
|
|
936
|
+
b && /* @__PURE__ */ z(X, {
|
|
937
|
+
provider: q,
|
|
938
|
+
onClose: () => S(!1)
|
|
764
939
|
}),
|
|
765
|
-
|
|
766
|
-
providerId:
|
|
767
|
-
onClose: () =>
|
|
940
|
+
A && /* @__PURE__ */ z(Z, {
|
|
941
|
+
providerId: q.id,
|
|
942
|
+
onClose: () => H(!1)
|
|
768
943
|
}),
|
|
769
|
-
|
|
770
|
-
provider:
|
|
771
|
-
onClose: () =>
|
|
944
|
+
U && /* @__PURE__ */ z(Q, {
|
|
945
|
+
provider: q,
|
|
946
|
+
onClose: () => W(!1)
|
|
772
947
|
})
|
|
773
948
|
]
|
|
774
949
|
});
|
|
775
950
|
}
|
|
776
951
|
//#endregion
|
|
777
|
-
export {
|
|
952
|
+
export { $ as ProviderDetailPage };
|
|
778
953
|
|
|
779
954
|
//# sourceMappingURL=ProviderDetailPage.js.map
|