@burdenoff/microfe-subscriberbot 2026.1023.1 → 2026.1029.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.js +5 -5
- package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
- package/dist/subscriberbot/components/PostureOptions.d.ts +10 -0
- package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -0
- package/dist/subscriberbot/components/PostureOptions.js +20 -0
- package/dist/subscriberbot/components/PostureOptions.js.map +1 -0
- package/dist/subscriberbot/components/index.d.ts +2 -0
- package/dist/subscriberbot/components/index.d.ts.map +1 -1
- package/dist/subscriberbot/components/index.js +1 -0
- 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 +2 -1
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts +15 -0
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts.map +1 -0
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +13 -0
- package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +9 -0
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +16 -16
- package/dist/subscriberbot/pages/DashboardPage.js +23 -23
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +62 -62
- package/dist/subscriberbot/pages/InsightsPage.js +14 -14
- package/dist/subscriberbot/pages/InvoicesPage.js +66 -66
- package/dist/subscriberbot/pages/WorkflowsPage.js +20 -20
- package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +184 -182
- 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 +77 -79
- 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 +134 -133
- package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +64 -64
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +3 -3
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +18 -18
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +122 -89
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +6 -6
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +7 -7
- package/dist/subscriberbot/types/index.d.ts +1 -0
- package/dist/subscriberbot/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import { formatCurrency as r, formatDate as i, formatEnumLabel as a, formatInter
|
|
|
5
5
|
import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
6
6
|
import { EmptyState as c } from "../../components/EmptyState.js";
|
|
7
7
|
import { Modal as l } from "../../components/Modal.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { useTr as u } from "../../hooks/useTr.js";
|
|
9
|
+
import { ErrorView as d, LoadingView as f, Section as p } from "../../components/StateViews.js";
|
|
10
|
+
import { Gauge as m, MiniProgress as h, Sparkline as g } from "../../components/viz.js";
|
|
10
11
|
import "../../components/index.js";
|
|
11
|
-
import { useArchiveProvider as
|
|
12
|
-
import { useTr as x } from "../../hooks/useTr.js";
|
|
12
|
+
import { useArchiveProvider as _, useBenchmarkDataPoints as v, useCreatePlan as y, useProvider as b, useUpdateProvider as x } from "../../hooks/useSubscriberBotApi.js";
|
|
13
13
|
import { useMemo as S, useState as C } from "react";
|
|
14
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
15
|
import { useParams as L } from "react-router";
|
|
@@ -93,7 +93,7 @@ function Y(e, t) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
function X({ provider: e, onClose: t }) {
|
|
96
|
-
let n =
|
|
96
|
+
let n = u(), r = x(), [i, o] = C(e.name), [s, c] = C(e.category), [d, f] = C(e.status), [p, m] = C(e.description ?? ""), [h, g] = C(e.industry ?? ""), [_, v] = C(e.region ?? ""), [y, b] = 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
97
|
return /* @__PURE__ */ z(l, {
|
|
98
98
|
title: n("providers.detail.editModal.title", "Edit provider"),
|
|
99
99
|
onClose: t,
|
|
@@ -107,12 +107,12 @@ function X({ provider: e, onClose: t }) {
|
|
|
107
107
|
let o = k.split(",").map((e) => e.trim()).filter(Boolean), c = {
|
|
108
108
|
name: i.trim(),
|
|
109
109
|
category: s,
|
|
110
|
-
status:
|
|
111
|
-
description:
|
|
110
|
+
status: d,
|
|
111
|
+
description: p.trim(),
|
|
112
112
|
tags: o,
|
|
113
|
-
...
|
|
114
|
-
...
|
|
115
|
-
...
|
|
113
|
+
...h.trim() ? { industry: h.trim() } : {},
|
|
114
|
+
..._.trim() ? { region: _.trim() } : {},
|
|
115
|
+
...y.trim() ? { language: y.trim() } : {},
|
|
116
116
|
...S.trim() ? { websiteUrl: S.trim() } : {},
|
|
117
117
|
...T.trim() ? { churnRiskScore: Number(T) } : {},
|
|
118
118
|
...D.trim() ? { vendorHealthScore: Number(D) } : {}
|
|
@@ -171,8 +171,8 @@ function X({ provider: e, onClose: t }) {
|
|
|
171
171
|
children: n("providers.detail.editModal.statusLabel", "Status")
|
|
172
172
|
}), /* @__PURE__ */ z("select", {
|
|
173
173
|
id: "prov-edit-status",
|
|
174
|
-
value:
|
|
175
|
-
onChange: (e) =>
|
|
174
|
+
value: d,
|
|
175
|
+
onChange: (e) => f(e.target.value),
|
|
176
176
|
className: H,
|
|
177
177
|
children: K.map((e) => /* @__PURE__ */ z("option", {
|
|
178
178
|
value: e,
|
|
@@ -190,8 +190,8 @@ function X({ provider: e, onClose: t }) {
|
|
|
190
190
|
}), /* @__PURE__ */ z("input", {
|
|
191
191
|
id: "prov-edit-industry",
|
|
192
192
|
type: "text",
|
|
193
|
-
value:
|
|
194
|
-
onChange: (e) =>
|
|
193
|
+
value: h,
|
|
194
|
+
onChange: (e) => g(e.target.value),
|
|
195
195
|
className: H
|
|
196
196
|
})] }),
|
|
197
197
|
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
@@ -201,8 +201,8 @@ function X({ provider: e, onClose: t }) {
|
|
|
201
201
|
}), /* @__PURE__ */ z("input", {
|
|
202
202
|
id: "prov-edit-region",
|
|
203
203
|
type: "text",
|
|
204
|
-
value:
|
|
205
|
-
onChange: (e) =>
|
|
204
|
+
value: _,
|
|
205
|
+
onChange: (e) => v(e.target.value),
|
|
206
206
|
className: H
|
|
207
207
|
})] }),
|
|
208
208
|
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
|
|
@@ -212,8 +212,8 @@ function X({ provider: e, onClose: t }) {
|
|
|
212
212
|
}), /* @__PURE__ */ z("input", {
|
|
213
213
|
id: "prov-edit-language",
|
|
214
214
|
type: "text",
|
|
215
|
-
value:
|
|
216
|
-
onChange: (e) =>
|
|
215
|
+
value: y,
|
|
216
|
+
onChange: (e) => b(e.target.value),
|
|
217
217
|
className: H
|
|
218
218
|
})] })
|
|
219
219
|
]
|
|
@@ -236,8 +236,8 @@ function X({ provider: e, onClose: t }) {
|
|
|
236
236
|
children: n("providers.detail.editModal.descriptionLabel", "Description")
|
|
237
237
|
}), /* @__PURE__ */ z("textarea", {
|
|
238
238
|
id: "prov-edit-desc",
|
|
239
|
-
value:
|
|
240
|
-
onChange: (e) =>
|
|
239
|
+
value: p,
|
|
240
|
+
onChange: (e) => m(e.target.value),
|
|
241
241
|
rows: 3,
|
|
242
242
|
className: H
|
|
243
243
|
})] }),
|
|
@@ -310,7 +310,7 @@ function X({ provider: e, onClose: t }) {
|
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
function Z({ providerId: e, onClose: t }) {
|
|
313
|
-
let n =
|
|
313
|
+
let n = u(), r = y(), [i, o] = C(""), [s, c] = C(""), [d, f] = C("USD"), [p, m] = C("MONTHLY"), [h, g] = C(""), [_, v] = C(""), [b, x] = C(!0), [S, w] = C(null);
|
|
314
314
|
return /* @__PURE__ */ z(l, {
|
|
315
315
|
title: n("providers.detail.addPlanModal.title", "Add plan"),
|
|
316
316
|
onClose: t,
|
|
@@ -321,14 +321,14 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
321
321
|
w(n("providers.detail.addPlanModal.nameRequired", "A plan name is required."));
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
let o =
|
|
324
|
+
let o = _.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
325
325
|
r.mutate({
|
|
326
326
|
providerId: e,
|
|
327
327
|
name: i.trim(),
|
|
328
|
-
interval:
|
|
329
|
-
currency:
|
|
328
|
+
interval: p,
|
|
329
|
+
currency: d.trim() || "USD",
|
|
330
330
|
...s.trim() ? { amount: Number(s) } : {},
|
|
331
|
-
...
|
|
331
|
+
...h.trim() ? { description: h.trim() } : {},
|
|
332
332
|
...o.length ? { features: o } : {}
|
|
333
333
|
}, {
|
|
334
334
|
onSuccess: () => t(),
|
|
@@ -385,8 +385,8 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
385
385
|
}), /* @__PURE__ */ z("input", {
|
|
386
386
|
id: "plan-currency",
|
|
387
387
|
type: "text",
|
|
388
|
-
value:
|
|
389
|
-
onChange: (e) =>
|
|
388
|
+
value: d,
|
|
389
|
+
onChange: (e) => f(e.target.value.toUpperCase()),
|
|
390
390
|
maxLength: 3,
|
|
391
391
|
className: H
|
|
392
392
|
})] }),
|
|
@@ -396,8 +396,8 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
396
396
|
children: n("providers.detail.addPlanModal.intervalLabel", "Interval")
|
|
397
397
|
}), /* @__PURE__ */ z("select", {
|
|
398
398
|
id: "plan-interval",
|
|
399
|
-
value:
|
|
400
|
-
onChange: (e) =>
|
|
399
|
+
value: p,
|
|
400
|
+
onChange: (e) => m(e.target.value),
|
|
401
401
|
className: H,
|
|
402
402
|
children: q.map((e) => /* @__PURE__ */ z("option", {
|
|
403
403
|
value: e,
|
|
@@ -412,8 +412,8 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
412
412
|
children: n("providers.detail.addPlanModal.descriptionLabel", "Description")
|
|
413
413
|
}), /* @__PURE__ */ z("textarea", {
|
|
414
414
|
id: "plan-desc",
|
|
415
|
-
value:
|
|
416
|
-
onChange: (e) =>
|
|
415
|
+
value: h,
|
|
416
|
+
onChange: (e) => g(e.target.value),
|
|
417
417
|
rows: 2,
|
|
418
418
|
className: H
|
|
419
419
|
})] }),
|
|
@@ -434,8 +434,8 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
434
434
|
]
|
|
435
435
|
}), /* @__PURE__ */ z("textarea", {
|
|
436
436
|
id: "plan-features",
|
|
437
|
-
value:
|
|
438
|
-
onChange: (e) =>
|
|
437
|
+
value: _,
|
|
438
|
+
onChange: (e) => v(e.target.value),
|
|
439
439
|
rows: 3,
|
|
440
440
|
placeholder: n("providers.detail.addPlanModal.featuresPlaceholder", "Unlimited projects\nPriority support\nSSO"),
|
|
441
441
|
className: H
|
|
@@ -444,8 +444,8 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
444
444
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
445
445
|
children: [/* @__PURE__ */ z("input", {
|
|
446
446
|
type: "checkbox",
|
|
447
|
-
checked:
|
|
448
|
-
onChange: (e) =>
|
|
447
|
+
checked: b,
|
|
448
|
+
onChange: (e) => x(e.target.checked),
|
|
449
449
|
className: "size-4 rounded border-border-subtle"
|
|
450
450
|
}), n("providers.detail.addPlanModal.active", "Active")]
|
|
451
451
|
}),
|
|
@@ -468,7 +468,7 @@ function Z({ providerId: e, onClose: t }) {
|
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
function Q({ provider: t, onClose: n }) {
|
|
471
|
-
let r =
|
|
471
|
+
let r = u(), { navigateTo: i } = e(), a = _(), [o, s] = C(null);
|
|
472
472
|
return /* @__PURE__ */ z(l, {
|
|
473
473
|
title: r("providers.detail.archiveModal.title", "Archive provider"),
|
|
474
474
|
onClose: n,
|
|
@@ -508,7 +508,7 @@ function Q({ provider: t, onClose: n }) {
|
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
510
|
function ee({ slug: e }) {
|
|
511
|
-
let t =
|
|
511
|
+
let t = u(), { data: n, isLoading: s, isError: c, refetch: l } = v(e), p = S(() => {
|
|
512
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
513
|
if (!t) return null;
|
|
514
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);
|
|
@@ -531,39 +531,39 @@ function ee({ slug: e }) {
|
|
|
531
531
|
" ",
|
|
532
532
|
t("providers.detail.priceHistory", "Price history")
|
|
533
533
|
]
|
|
534
|
-
}), e ? s ? /* @__PURE__ */ z(
|
|
534
|
+
}), e ? s ? /* @__PURE__ */ z(f, {
|
|
535
535
|
className: "min-h-[8rem]",
|
|
536
536
|
label: t("providers.detail.priceHistoryLoading", "Loading price history…")
|
|
537
|
-
}) : c ? /* @__PURE__ */ z(
|
|
537
|
+
}) : c ? /* @__PURE__ */ z(d, {
|
|
538
538
|
className: "min-h-[8rem]",
|
|
539
539
|
title: t("providers.detail.priceHistoryErrorTitle", "Price history unavailable"),
|
|
540
540
|
message: t("providers.detail.priceHistoryError", "Could not load observed prices for this provider."),
|
|
541
541
|
onRetry: () => void l()
|
|
542
|
-
}) :
|
|
542
|
+
}) : p ? /* @__PURE__ */ B(R, { children: [
|
|
543
543
|
/* @__PURE__ */ B("p", {
|
|
544
544
|
className: "mt-3 text-2xl font-bold tabular-nums text-text-primary",
|
|
545
|
-
children: [r(
|
|
545
|
+
children: [r(p.latest.amount, p.latest.currency), /* @__PURE__ */ z("span", {
|
|
546
546
|
className: "text-sm font-normal text-text-secondary",
|
|
547
|
-
children: o(
|
|
547
|
+
children: o(p.latest.interval)
|
|
548
548
|
})]
|
|
549
549
|
}),
|
|
550
550
|
/* @__PURE__ */ B("p", {
|
|
551
551
|
className: "text-xs text-text-secondary",
|
|
552
552
|
children: [
|
|
553
|
-
|
|
553
|
+
p.latest.planName,
|
|
554
554
|
" · ",
|
|
555
|
-
|
|
555
|
+
p.latest.region,
|
|
556
556
|
" ·",
|
|
557
557
|
" ",
|
|
558
558
|
t("providers.detail.observed", "observed"),
|
|
559
559
|
" ",
|
|
560
|
-
i(
|
|
560
|
+
i(p.latest.observedAt)
|
|
561
561
|
]
|
|
562
562
|
}),
|
|
563
|
-
/* @__PURE__ */ z(
|
|
563
|
+
/* @__PURE__ */ z(g, {
|
|
564
564
|
className: "mt-3 w-full",
|
|
565
|
-
points:
|
|
566
|
-
positive:
|
|
565
|
+
points: p.amounts,
|
|
566
|
+
positive: p.latest.amount <= p.first
|
|
567
567
|
}),
|
|
568
568
|
/* @__PURE__ */ B("dl", {
|
|
569
569
|
className: "mt-3 space-y-2 border-t border-border-subtle pt-3 text-xs",
|
|
@@ -576,10 +576,10 @@ function ee({ slug: e }) {
|
|
|
576
576
|
}), /* @__PURE__ */ B("dd", {
|
|
577
577
|
className: "font-medium tabular-nums text-text-primary",
|
|
578
578
|
children: [
|
|
579
|
-
r(
|
|
579
|
+
r(p.min, p.latest.currency),
|
|
580
580
|
" –",
|
|
581
581
|
" ",
|
|
582
|
-
r(
|
|
582
|
+
r(p.max, p.latest.currency)
|
|
583
583
|
]
|
|
584
584
|
})]
|
|
585
585
|
}),
|
|
@@ -590,7 +590,7 @@ function ee({ slug: e }) {
|
|
|
590
590
|
children: t("providers.detail.observations", "Observations")
|
|
591
591
|
}), /* @__PURE__ */ z("dd", {
|
|
592
592
|
className: "font-medium tabular-nums text-text-primary",
|
|
593
|
-
children:
|
|
593
|
+
children: p.points.length
|
|
594
594
|
})]
|
|
595
595
|
}),
|
|
596
596
|
/* @__PURE__ */ B("div", {
|
|
@@ -600,7 +600,7 @@ function ee({ slug: e }) {
|
|
|
600
600
|
children: t("providers.detail.latestSource", "Latest source")
|
|
601
601
|
}), /* @__PURE__ */ z("dd", {
|
|
602
602
|
className: "font-medium text-text-primary",
|
|
603
|
-
children:
|
|
603
|
+
children: p.latest.sourceLabel ?? a(p.latest.sourceKind)
|
|
604
604
|
})]
|
|
605
605
|
})
|
|
606
606
|
]
|
|
@@ -615,19 +615,19 @@ function ee({ slug: e }) {
|
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
617
|
function $() {
|
|
618
|
-
let { id: i } = L(), { navigateTo: l } = e(), { data:
|
|
619
|
-
if (
|
|
618
|
+
let { id: i } = L(), { navigateTo: l } = e(), { data: g, isLoading: _, isError: v, refetch: y } = b(i), [x, S] = C(!1), [A, H] = C(!1), [U, W] = C(!1), K = u();
|
|
619
|
+
if (_) return /* @__PURE__ */ z(n, {
|
|
620
620
|
title: K("providers.detail.loadingTitle", "Provider"),
|
|
621
|
-
children: /* @__PURE__ */ z(
|
|
621
|
+
children: /* @__PURE__ */ z(f, { label: K("providers.detail.loading", "Loading provider…") })
|
|
622
622
|
});
|
|
623
|
-
if (
|
|
623
|
+
if (v) return /* @__PURE__ */ z(n, {
|
|
624
624
|
title: K("providers.detail.loadingTitle", "Provider"),
|
|
625
|
-
children: /* @__PURE__ */ z(
|
|
625
|
+
children: /* @__PURE__ */ z(d, {
|
|
626
626
|
message: K("providers.detail.error", "Could not load this provider."),
|
|
627
|
-
onRetry: () => void
|
|
627
|
+
onRetry: () => void y()
|
|
628
628
|
})
|
|
629
629
|
});
|
|
630
|
-
if (!
|
|
630
|
+
if (!g) return /* @__PURE__ */ z(n, {
|
|
631
631
|
title: K("providers.detail.loadingTitle", "Provider"),
|
|
632
632
|
children: /* @__PURE__ */ z(c, {
|
|
633
633
|
illustration: "empty-data",
|
|
@@ -641,7 +641,7 @@ function $() {
|
|
|
641
641
|
})
|
|
642
642
|
})
|
|
643
643
|
});
|
|
644
|
-
let q =
|
|
644
|
+
let q = g, $ = 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
645
|
return /* @__PURE__ */ B(n, {
|
|
646
646
|
title: q.name,
|
|
647
647
|
description: K(G[q.category], a(q.category)),
|
|
@@ -725,7 +725,7 @@ function $() {
|
|
|
725
725
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
726
726
|
children: [/* @__PURE__ */ z("div", {
|
|
727
727
|
className: "lg:col-span-2",
|
|
728
|
-
children: /* @__PURE__ */ z(
|
|
728
|
+
children: /* @__PURE__ */ z(p, {
|
|
729
729
|
title: K("providers.detail.plans", "Plans"),
|
|
730
730
|
description: K("providers.detail.plansDescription", "Pricing this provider publishes"),
|
|
731
731
|
action: /* @__PURE__ */ B("button", {
|
|
@@ -821,7 +821,7 @@ function $() {
|
|
|
821
821
|
children: K("providers.detail.noHealthScore", "No health score yet.")
|
|
822
822
|
}) : /* @__PURE__ */ z("div", {
|
|
823
823
|
className: "mt-2 flex flex-col items-center",
|
|
824
|
-
children: /* @__PURE__ */ z(
|
|
824
|
+
children: /* @__PURE__ */ z(m, {
|
|
825
825
|
value: q.vendorHealthScore,
|
|
826
826
|
max: 100,
|
|
827
827
|
size: 168,
|
|
@@ -857,7 +857,7 @@ function $() {
|
|
|
857
857
|
className: "text-xs text-text-secondary",
|
|
858
858
|
children: "/ 100"
|
|
859
859
|
})]
|
|
860
|
-
}), /* @__PURE__ */ z(
|
|
860
|
+
}), /* @__PURE__ */ z(h, {
|
|
861
861
|
value: q.churnRiskScore,
|
|
862
862
|
tone: Y(q.churnRiskScore, K).tone,
|
|
863
863
|
className: "mt-2"
|
|
@@ -933,7 +933,7 @@ function $() {
|
|
|
933
933
|
]
|
|
934
934
|
})]
|
|
935
935
|
}),
|
|
936
|
-
|
|
936
|
+
x && /* @__PURE__ */ z(X, {
|
|
937
937
|
provider: q,
|
|
938
938
|
onClose: () => S(!1)
|
|
939
939
|
}),
|
|
@@ -2,8 +2,8 @@ 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
4
|
import { formatEnumLabel as r } from "../../utils/formatters.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useTr as i } from "../../hooks/useTr.js";
|
|
6
|
+
import { useCreateProvider as a } from "../../hooks/useSubscriberBotApi.js";
|
|
7
7
|
import { useState as o } from "react";
|
|
8
8
|
import { ArrowLeft as s, Building2 as c, Sparkles as l } from "lucide-react";
|
|
9
9
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -45,7 +45,7 @@ var m = [
|
|
|
45
45
|
OTHER: "providers.categories.other"
|
|
46
46
|
}, g = "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)]", _ = "mb-1 block text-xs font-medium text-text-secondary";
|
|
47
47
|
function v() {
|
|
48
|
-
let v =
|
|
48
|
+
let v = i(), { navigateTo: y } = e(), b = a(), [x, S] = o(""), [C, w] = o("SAAS"), [T, E] = o(""), [D, O] = o(""), [k, A] = o(""), [j, M] = o(""), [N, P] = o(""), [F, I] = o(null), L = N.split(",").map((e) => e.trim()).filter(Boolean);
|
|
49
49
|
return /* @__PURE__ */ d(n, {
|
|
50
50
|
title: v("providers.new.title", "Add provider"),
|
|
51
51
|
description: v("providers.new.description", "Register a new provider in the registry"),
|
|
@@ -4,11 +4,11 @@ import { PageLayout as n } from "../../components/PageLayout.js";
|
|
|
4
4
|
import { formatEnumLabel as r } from "../../utils/formatters.js";
|
|
5
5
|
import { StatusBadge as i } from "../../components/StatusBadge.js";
|
|
6
6
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useTr as o } from "../../hooks/useTr.js";
|
|
8
|
+
import { ErrorView as s, LoadingView as c } from "../../components/StateViews.js";
|
|
9
|
+
import { MiniProgress as l } from "../../components/viz.js";
|
|
9
10
|
import "../../components/index.js";
|
|
10
|
-
import { useProviders as
|
|
11
|
-
import { useTr as u } from "../../hooks/useTr.js";
|
|
11
|
+
import { useProviders as u } from "../../hooks/useSubscriberBotApi.js";
|
|
12
12
|
import { useState as d } from "react";
|
|
13
13
|
import { Activity as f, BadgeCheck as p, Building2 as m, ChevronRight as h, Plus as g, Search as _, ShieldCheck as v, Store as y } from "lucide-react";
|
|
14
14
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
@@ -53,7 +53,7 @@ function A(e, t) {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
function j({ provider: e, onOpen: n }) {
|
|
56
|
-
let a =
|
|
56
|
+
let a = o(), s = e.vendorHealthScore, c = e.churnRiskScore, u = c == null ? null : A(c, a);
|
|
57
57
|
return /* @__PURE__ */ S(w, {
|
|
58
58
|
treatment: "glass",
|
|
59
59
|
role: "button",
|
|
@@ -100,11 +100,11 @@ function j({ provider: e, onOpen: n }) {
|
|
|
100
100
|
]
|
|
101
101
|
}), /* @__PURE__ */ x("span", {
|
|
102
102
|
className: "font-semibold tabular-nums text-text-primary",
|
|
103
|
-
children:
|
|
103
|
+
children: s == null ? "—" : `${s}/100`
|
|
104
104
|
})]
|
|
105
|
-
}), /* @__PURE__ */ x(
|
|
106
|
-
value:
|
|
107
|
-
tone:
|
|
105
|
+
}), /* @__PURE__ */ x(l, {
|
|
106
|
+
value: s ?? 0,
|
|
107
|
+
tone: s == null ? "accent" : k(s),
|
|
108
108
|
className: "mt-1.5"
|
|
109
109
|
})]
|
|
110
110
|
}),
|
|
@@ -112,9 +112,9 @@ function j({ provider: e, onOpen: n }) {
|
|
|
112
112
|
className: "mt-3 flex flex-wrap items-center justify-between gap-2",
|
|
113
113
|
children: [/* @__PURE__ */ S("div", {
|
|
114
114
|
className: "flex flex-wrap items-center gap-2",
|
|
115
|
-
children: [
|
|
116
|
-
className: t("inline-flex rounded-full px-2 py-0.5 text-[11px] font-medium",
|
|
117
|
-
children:
|
|
115
|
+
children: [u && /* @__PURE__ */ x("span", {
|
|
116
|
+
className: t("inline-flex rounded-full px-2 py-0.5 text-[11px] font-medium", u.cls),
|
|
117
|
+
children: u.label
|
|
118
118
|
}), e.region && /* @__PURE__ */ x("span", {
|
|
119
119
|
className: "text-[11px] text-text-secondary",
|
|
120
120
|
children: e.region
|
|
@@ -132,7 +132,7 @@ function j({ provider: e, onOpen: n }) {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function M() {
|
|
135
|
-
let i =
|
|
135
|
+
let i = o(), { navigateTo: l } = e(), [h, v] = d(0), [k, A] = d(""), [M, N] = d(""), [P, F] = d(""), [I, L] = d(""), R = [{
|
|
136
136
|
value: "",
|
|
137
137
|
label: i("providers.categories.all", "All")
|
|
138
138
|
}, ...Object.entries(D).map(([e, t]) => ({
|
|
@@ -144,7 +144,7 @@ function M() {
|
|
|
144
144
|
}, ...Object.entries(O).map(([e, t]) => ({
|
|
145
145
|
value: e,
|
|
146
146
|
label: i(t, r(e))
|
|
147
|
-
}))], { data: B, isLoading: V, isError: H, refetch: U, isFetching: W } =
|
|
147
|
+
}))], { data: B, isLoading: V, isError: H, refetch: U, isFetching: W } = u({
|
|
148
148
|
search: k || void 0,
|
|
149
149
|
category: P || void 0,
|
|
150
150
|
status: I || void 0,
|
|
@@ -176,7 +176,7 @@ function M() {
|
|
|
176
176
|
description: i("providers.description", "Browse the global provider registry — the public face of the Subscription Knowledge Graph"),
|
|
177
177
|
actions: /* @__PURE__ */ S("button", {
|
|
178
178
|
type: "button",
|
|
179
|
-
onClick: () =>
|
|
179
|
+
onClick: () => l("/providers/new"),
|
|
180
180
|
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
181
181
|
children: [
|
|
182
182
|
/* @__PURE__ */ x(g, { className: "h-4 w-4" }),
|
|
@@ -258,7 +258,7 @@ function M() {
|
|
|
258
258
|
})]
|
|
259
259
|
}, e.label))
|
|
260
260
|
}),
|
|
261
|
-
V ? /* @__PURE__ */ x(
|
|
261
|
+
V ? /* @__PURE__ */ x(c, { label: i("providers.loading", "Loading providers…") }) : H ? /* @__PURE__ */ x(s, {
|
|
262
262
|
message: i("providers.error", "Could not load the provider registry."),
|
|
263
263
|
onRetry: () => void U()
|
|
264
264
|
}) : G.length === 0 ? /* @__PURE__ */ x("div", {
|
|
@@ -270,7 +270,7 @@ function M() {
|
|
|
270
270
|
description: k ? i("providers.emptyDescriptionSearch", "No providers match \"{{search}}\".", { search: k }) : i("providers.emptyDescription", "No providers in the registry with these filters yet."),
|
|
271
271
|
action: /* @__PURE__ */ x("button", {
|
|
272
272
|
type: "button",
|
|
273
|
-
onClick: () =>
|
|
273
|
+
onClick: () => l("/providers/new"),
|
|
274
274
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
275
275
|
children: i("providers.addProvider", "Add provider")
|
|
276
276
|
})
|
|
@@ -279,7 +279,7 @@ function M() {
|
|
|
279
279
|
className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
280
280
|
children: G.map((e) => /* @__PURE__ */ x(j, {
|
|
281
281
|
provider: e,
|
|
282
|
-
onOpen: () =>
|
|
282
|
+
onOpen: () => l(`/providers/${e.id}`)
|
|
283
283
|
}, e.id))
|
|
284
284
|
}), /* @__PURE__ */ S("div", {
|
|
285
285
|
className: "mt-6 flex items-center justify-between",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"RelationshipDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/subscriberbot/pages/relationships/RelationshipDetailPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAy1BH,wBAAgB,sBAAsB,gCAqhBrC"}
|