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