@burdenoff/microfe-subscriberbot 2026.1117.1 → 2026.1123.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/components/InfiniteScrollSentinel.d.ts +24 -0
- package/dist/subscriberbot/components/InfiniteScrollSentinel.js +44 -0
- package/dist/subscriberbot/components/InfiniteScrollSentinel.js.map +1 -0
- package/dist/subscriberbot/components/index.d.ts +4 -0
- package/dist/subscriberbot/components/index.js +5 -2
- package/dist/subscriberbot/components/tags/EntityTagPicker.d.ts +25 -0
- package/dist/subscriberbot/components/tags/EntityTagPicker.js +205 -0
- package/dist/subscriberbot/components/tags/EntityTagPicker.js.map +1 -0
- package/dist/subscriberbot/components/tags/index.d.ts +2 -0
- package/dist/subscriberbot/components/tags/index.js +1 -0
- package/dist/subscriberbot/hooks/index.d.ts +2 -2
- package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts +53 -1
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js +664 -373
- package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
- package/dist/subscriberbot/pages/AssetVaultPage.js +192 -147
- package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
- package/dist/subscriberbot/pages/DashboardPage.js +9 -9
- package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
- package/dist/subscriberbot/pages/InboxPage.js +264 -281
- package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
- package/dist/subscriberbot/pages/InsightsPage.js +8 -8
- package/dist/subscriberbot/pages/InvoicesPage.js +62 -78
- package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
- package/dist/subscriberbot/pages/agents/AgentDetailPage.js +1 -1
- package/dist/subscriberbot/pages/agents/AgentsListPage.js +5 -5
- package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +81 -81
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +326 -314
- package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProviderInsights.js +17 -17
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js +153 -140
- package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js +135 -146
- package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +482 -437
- package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +59 -46
- package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +104 -111
- package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
- package/dist/subscriberbot/types/index.d.ts +40 -1
- package/package.json +1 -1
|
@@ -9,8 +9,8 @@ import { Modal as o } from "../../components/Modal.js";
|
|
|
9
9
|
import { useSubscriberBot as s } from "../../context/SubscriberBotContext.js";
|
|
10
10
|
import { useAgent as c, useCreatePolicy as l, useDecisions as u, useRunAgent as d, useSetAgentStatus as f } from "../../hooks/useSubscriberBotApi.js";
|
|
11
11
|
import { ErrorView as p, LoadingView as m, Section as h } from "../../components/StateViews.js";
|
|
12
|
-
import { Timeline as g } from "../../components/viz.js";
|
|
13
12
|
import "../../components/decisions/index.js";
|
|
13
|
+
import { Timeline as g } from "../../components/viz.js";
|
|
14
14
|
import { useTr as _ } from "../../hooks/useTr.js";
|
|
15
15
|
import { RUNNABLE_AGENT_KINDS as v } from "../../components/decisions/decisionModel.js";
|
|
16
16
|
import { useAutonomousAgentMode as y } from "../../hooks/useAutonomousAgentMode.js";
|
|
@@ -7,8 +7,8 @@ import { StatusBadge as i } from "../../components/StatusBadge.js";
|
|
|
7
7
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
8
8
|
import { useAgents as o, useSetAgentStatus as s } from "../../hooks/useSubscriberBotApi.js";
|
|
9
9
|
import { ErrorView as c, LoadingView as l } from "../../components/StateViews.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useTr as u } from "../../hooks/useTr.js";
|
|
11
|
+
import { Donut as d, Legend as f } from "../../components/viz.js";
|
|
12
12
|
import { PostureOptions as p } from "../../components/PostureOptions.js";
|
|
13
13
|
import { useState as m } from "react";
|
|
14
14
|
import { ArrowLeftRight as h, Bot as g, Building2 as _, Clock as v, ConciergeBell as y, DollarSign as b, Handshake as x, Mail as S, Plus as C, RefreshCw as w, Search as T, ShieldCheck as E, Sparkles as D, Zap as O } from "lucide-react";
|
|
@@ -45,7 +45,7 @@ var P = {
|
|
|
45
45
|
DISABLED: "var(--color-text-secondary)"
|
|
46
46
|
}, R = 864e5;
|
|
47
47
|
function z() {
|
|
48
|
-
let { formatEnumLabel: h, formatRelativeTime: _ } = e(), y =
|
|
48
|
+
let { formatEnumLabel: h, formatRelativeTime: _ } = e(), y = u(), { navigateTo: b } = t(), [x, S] = m(""), [w, T] = m(""), E = [{
|
|
49
49
|
value: "",
|
|
50
50
|
label: y("agents.filters.allKinds", "All kinds")
|
|
51
51
|
}, ...Object.entries(P).map(([e, t]) => ({
|
|
@@ -141,13 +141,13 @@ function z() {
|
|
|
141
141
|
}),
|
|
142
142
|
/* @__PURE__ */ j("div", {
|
|
143
143
|
className: "mt-4 flex items-center gap-5",
|
|
144
|
-
children: [/* @__PURE__ */ A(
|
|
144
|
+
children: [/* @__PURE__ */ A(d, {
|
|
145
145
|
data: J,
|
|
146
146
|
size: 132,
|
|
147
147
|
thickness: 16,
|
|
148
148
|
centerLabel: String(W.length),
|
|
149
149
|
centerSub: W.length === 1 ? y("agents.fleet.agentSingular", "agent") : y("agents.fleet.agentPlural", "agents")
|
|
150
|
-
}), /* @__PURE__ */ A(
|
|
150
|
+
}), /* @__PURE__ */ A(f, {
|
|
151
151
|
className: "flex-1",
|
|
152
152
|
data: J
|
|
153
153
|
})]
|
|
@@ -7,8 +7,8 @@ import { MetricsCard as i } from "../../components/MetricsCard.js";
|
|
|
7
7
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
8
8
|
import { Modal as o } from "../../components/Modal.js";
|
|
9
9
|
import { ErrorView as s, LoadingView as c, Section as l } from "../../components/StateViews.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useEnterpriseSpendDashboard as u, useSetSpendBudget as d, useSpendBudgets as f } from "../../hooks/useSubscriberBotApi.js";
|
|
11
|
+
import { BarList as p, MiniProgress as m, Sparkline as h } from "../../components/viz.js";
|
|
12
12
|
import { useTr as g } from "../../hooks/useTr.js";
|
|
13
13
|
import { cn as _ } from "../../utils/cn.js";
|
|
14
14
|
import { useMemo as v, useState as y } from "react";
|
|
@@ -69,7 +69,7 @@ function V(e, t) {
|
|
|
69
69
|
}
|
|
70
70
|
var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
71
71
|
className: "space-y-1.5",
|
|
72
|
-
children: [/* @__PURE__ */ j(
|
|
72
|
+
children: [/* @__PURE__ */ j(m, {
|
|
73
73
|
label: n("enterprise.budget.utilization", "Budget utilization"),
|
|
74
74
|
value: Math.min(e.utilizationPct, 100),
|
|
75
75
|
tone: e.overBudget ? "negative" : e.utilizationPct >= 85 ? "warning" : "positive"
|
|
@@ -99,14 +99,14 @@ var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
|
99
99
|
})]
|
|
100
100
|
}), n]
|
|
101
101
|
}), W = ({ currency: n, departments: r, onClose: i }) => {
|
|
102
|
-
let { formatCurrency: a } = t(), s = g(), l =
|
|
102
|
+
let { formatCurrency: a } = t(), s = g(), l = f(), u = d(), [p, m] = y(""), [h, _] = y(""), [v, b, x, S] = e(), C = (l.data ?? []).filter((e) => e.currency === n), w = (e, t) => {
|
|
103
103
|
b(null), u.mutate({
|
|
104
104
|
department: e,
|
|
105
105
|
currency: n,
|
|
106
106
|
monthlyAmount: t
|
|
107
107
|
}, {
|
|
108
108
|
onSuccess: () => {
|
|
109
|
-
_(""),
|
|
109
|
+
_(""), m("");
|
|
110
110
|
},
|
|
111
111
|
onError: (e) => b(e instanceof Error ? e.message : s("enterprise.budgets.error", "Could not save the budget."))
|
|
112
112
|
});
|
|
@@ -119,8 +119,8 @@ var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
|
119
119
|
children: [/* @__PURE__ */ M("form", {
|
|
120
120
|
onSubmit: (e) => {
|
|
121
121
|
e.preventDefault();
|
|
122
|
-
let t = Number(
|
|
123
|
-
!
|
|
122
|
+
let t = Number(h);
|
|
123
|
+
!h.trim() || !Number.isFinite(t) || t <= 0 ? b(s("enterprise.budgets.amountRequired", "Enter a monthly amount above zero."), "budget-amount") : w(p.trim() || null, t);
|
|
124
124
|
},
|
|
125
125
|
className: "space-y-4",
|
|
126
126
|
children: [v && /* @__PURE__ */ j("div", {
|
|
@@ -141,9 +141,9 @@ var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
|
141
141
|
/* @__PURE__ */ j("input", {
|
|
142
142
|
id: "budget-department",
|
|
143
143
|
list: "budget-department-options",
|
|
144
|
-
value:
|
|
144
|
+
value: p,
|
|
145
145
|
maxLength: 120,
|
|
146
|
-
onChange: (e) =>
|
|
146
|
+
onChange: (e) => m(e.target.value),
|
|
147
147
|
placeholder: s("enterprise.budgets.companyWide", "Company-wide"),
|
|
148
148
|
className: R
|
|
149
149
|
}),
|
|
@@ -163,7 +163,7 @@ var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
|
163
163
|
min: "0",
|
|
164
164
|
step: "0.01",
|
|
165
165
|
inputMode: "decimal",
|
|
166
|
-
value:
|
|
166
|
+
value: h,
|
|
167
167
|
onChange: (e) => _(e.target.value),
|
|
168
168
|
className: R
|
|
169
169
|
})] }),
|
|
@@ -207,25 +207,25 @@ var H = ({ status: e, fmt: t, tr: n }) => /* @__PURE__ */ M("div", {
|
|
|
207
207
|
});
|
|
208
208
|
};
|
|
209
209
|
function G() {
|
|
210
|
-
let { formatCurrency: e, formatDate: o } = t(),
|
|
210
|
+
let { formatCurrency: e, formatDate: o } = t(), d = g(), { navigateTo: f } = n(), [R, z] = y(null), [G, K] = y(!1), q = u(R), J = q.data, Y = v(() => {
|
|
211
211
|
let t = J?.currency ?? "USD";
|
|
212
212
|
return (n) => e(n, t);
|
|
213
|
-
}, [J?.currency, e]), X = (e) =>
|
|
214
|
-
if (q.isLoading) return /* @__PURE__ */ j(c, { label:
|
|
213
|
+
}, [J?.currency, e]), X = (e) => f(`/relationships/${e}`);
|
|
214
|
+
if (q.isLoading) return /* @__PURE__ */ j(c, { label: d("enterprise.loading", "Aggregating company-wide spend…") });
|
|
215
215
|
if (q.isError || !J) return /* @__PURE__ */ j(s, {
|
|
216
|
-
message:
|
|
216
|
+
message: d("enterprise.error", "Could not load the enterprise spend dashboard."),
|
|
217
217
|
onRetry: () => void q.refetch()
|
|
218
218
|
});
|
|
219
219
|
let Z = J.renewalPipeline[0], Q = J.monthlySpendChangePct, $ = [J.currency, ...J.otherCurrencies.map((e) => e.currency)], te = J.departments.map((e) => e.department).filter((e) => !!e), ne = J.activeRelationshipCount === 0 && J.shadowItCount === 0 && J.riskFlagCount === 0 && J.departments.length === 0;
|
|
220
220
|
return /* @__PURE__ */ M(r, {
|
|
221
|
-
title:
|
|
222
|
-
description:
|
|
221
|
+
title: d("enterprise.title", "SaaS spend management"),
|
|
222
|
+
description: d("enterprise.description", "Company-wide recurring spend by department, with duplicate tools, shadow IT, renewals and risks."),
|
|
223
223
|
actions: /* @__PURE__ */ M("div", {
|
|
224
224
|
className: "flex items-center gap-2",
|
|
225
225
|
children: [$.length > 1 && /* @__PURE__ */ M("label", {
|
|
226
226
|
className: "flex items-center gap-2 text-xs text-text-secondary",
|
|
227
|
-
children: [
|
|
228
|
-
"aria-label":
|
|
227
|
+
children: [d("enterprise.currency", "Currency"), /* @__PURE__ */ j("select", {
|
|
228
|
+
"aria-label": d("enterprise.currency", "Currency"),
|
|
229
229
|
value: J.currency,
|
|
230
230
|
onChange: (e) => z(e.target.value),
|
|
231
231
|
className: "rounded-lg border border-border-subtle bg-bg-surface px-2 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
@@ -244,28 +244,28 @@ function G() {
|
|
|
244
244
|
"aria-hidden": !0
|
|
245
245
|
}),
|
|
246
246
|
" ",
|
|
247
|
-
|
|
247
|
+
d("enterprise.manageBudgets", "Budgets")
|
|
248
248
|
]
|
|
249
249
|
})]
|
|
250
250
|
}),
|
|
251
251
|
children: [
|
|
252
252
|
/* @__PURE__ */ j(ee, {
|
|
253
253
|
className: "mb-6",
|
|
254
|
-
children:
|
|
254
|
+
children: d("enterprise.purpose", "For finance, IT and procurement. Spend is the monthly run-rate of every subscription billing right now, computed live from your portfolio in one currency at a time. Allocate subscriptions to a department on the subscription itself.")
|
|
255
255
|
}),
|
|
256
256
|
J.truncated && /* @__PURE__ */ j("p", {
|
|
257
257
|
className: "mb-4 rounded-lg bg-status-warning-bg-subtle px-4 py-2 text-sm text-status-warning-text",
|
|
258
|
-
children:
|
|
258
|
+
children: d("enterprise.truncated", "This workspace has more subscriptions than one dashboard aggregates; figures cover the most recent ones.")
|
|
259
259
|
}),
|
|
260
260
|
ne ? /* @__PURE__ */ j(a, {
|
|
261
261
|
icon: /* @__PURE__ */ j(x, { className: "h-8 w-8" }),
|
|
262
|
-
title:
|
|
263
|
-
description:
|
|
262
|
+
title: d("enterprise.emptyTitle", "No company spend to analyse yet"),
|
|
263
|
+
description: d("enterprise.emptyDescription", "Add your SaaS subscriptions and allocate them to departments to see spend, duplicates, shadow IT and renewals here."),
|
|
264
264
|
action: /* @__PURE__ */ j("button", {
|
|
265
265
|
type: "button",
|
|
266
|
-
onClick: () =>
|
|
266
|
+
onClick: () => f("/relationships/new"),
|
|
267
267
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
268
|
-
children:
|
|
268
|
+
children: d("enterprise.emptyAction", "Add a subscription")
|
|
269
269
|
})
|
|
270
270
|
}) : /* @__PURE__ */ M("div", {
|
|
271
271
|
className: "space-y-6",
|
|
@@ -278,19 +278,19 @@ function G() {
|
|
|
278
278
|
featured: !0,
|
|
279
279
|
icon: /* @__PURE__ */ j(A, { className: "h-5 w-5" }),
|
|
280
280
|
value: Y(J.annualSpend),
|
|
281
|
-
label:
|
|
281
|
+
label: d("enterprise.kpis.annualSpend", "Total SaaS spend / year ({{monthly}} / month)", { monthly: Y(J.monthlySpend) }),
|
|
282
282
|
trend: Q == null ? void 0 : Q > 0 ? "up" : Q < 0 ? "down" : "neutral",
|
|
283
283
|
trendValue: Q == null ? void 0 : `${Q > 0 ? "+" : ""}${Q}%`
|
|
284
284
|
}),
|
|
285
285
|
/* @__PURE__ */ j(i, {
|
|
286
286
|
icon: /* @__PURE__ */ j(T, { className: "h-5 w-5" }),
|
|
287
287
|
value: J.activeRelationshipCount,
|
|
288
|
-
label:
|
|
288
|
+
label: d("enterprise.kpis.activeLicenses", "Active licences")
|
|
289
289
|
}),
|
|
290
290
|
/* @__PURE__ */ j(i, {
|
|
291
291
|
icon: /* @__PURE__ */ j(k, { className: "h-5 w-5" }),
|
|
292
292
|
value: J.seatUtilizationPct == null ? "—" : `${J.seatUtilizationPct}%`,
|
|
293
|
-
label: J.seatUtilizationPct == null ?
|
|
293
|
+
label: J.seatUtilizationPct == null ? d("enterprise.kpis.seatsUntracked", "Seats utilised (no seat data yet)") : d("enterprise.kpis.seats", "Seats utilised ({{used}} of {{assigned}})", {
|
|
294
294
|
used: J.seatsUsed,
|
|
295
295
|
assigned: J.seatsAssigned
|
|
296
296
|
})
|
|
@@ -298,7 +298,7 @@ function G() {
|
|
|
298
298
|
/* @__PURE__ */ j(i, {
|
|
299
299
|
icon: /* @__PURE__ */ j(S, { className: "h-5 w-5" }),
|
|
300
300
|
value: Z ? Z.relationshipCount : 0,
|
|
301
|
-
label:
|
|
301
|
+
label: d("enterprise.kpis.renewals", "Renewals this quarter ({{amount}})", { amount: Y(Z?.amount ?? 0) })
|
|
302
302
|
})
|
|
303
303
|
]
|
|
304
304
|
}),
|
|
@@ -306,69 +306,69 @@ function G() {
|
|
|
306
306
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
307
307
|
children: [
|
|
308
308
|
/* @__PURE__ */ M(U, {
|
|
309
|
-
title:
|
|
309
|
+
title: d("enterprise.trend.title", "Monthly run-rate, last 150 days"),
|
|
310
310
|
icon: /* @__PURE__ */ j(A, { className: "h-4 w-4" }),
|
|
311
|
-
children: [/* @__PURE__ */ j(
|
|
311
|
+
children: [/* @__PURE__ */ j(h, {
|
|
312
312
|
points: J.trend.map((e) => e.monthlySpend),
|
|
313
313
|
positive: (Q ?? 0) <= 0,
|
|
314
314
|
className: "w-full"
|
|
315
315
|
}), /* @__PURE__ */ j("p", {
|
|
316
316
|
className: "mt-2 text-xs text-text-secondary",
|
|
317
|
-
children:
|
|
317
|
+
children: d("enterprise.trend.vs", "{{now}} now vs {{before}} 30 days ago", {
|
|
318
318
|
now: Y(J.monthlySpend),
|
|
319
319
|
before: Y(J.previousMonthlySpend)
|
|
320
320
|
})
|
|
321
321
|
})]
|
|
322
322
|
}),
|
|
323
323
|
/* @__PURE__ */ j(U, {
|
|
324
|
-
title:
|
|
324
|
+
title: d("enterprise.budget.title", "Company budget"),
|
|
325
325
|
icon: /* @__PURE__ */ j(O, { className: "h-4 w-4" }),
|
|
326
326
|
testId: "enterprise-budget",
|
|
327
327
|
children: J.budget ? /* @__PURE__ */ j(H, {
|
|
328
328
|
status: J.budget,
|
|
329
329
|
fmt: Y,
|
|
330
|
-
tr:
|
|
330
|
+
tr: d
|
|
331
331
|
}) : /* @__PURE__ */ M("div", {
|
|
332
332
|
className: "space-y-3",
|
|
333
333
|
children: [/* @__PURE__ */ j("p", {
|
|
334
334
|
className: "text-sm text-text-secondary",
|
|
335
|
-
children:
|
|
335
|
+
children: d("enterprise.budget.none", "No company-wide budget set for {{currency}}.", { currency: J.currency })
|
|
336
336
|
}), /* @__PURE__ */ j("button", {
|
|
337
337
|
type: "button",
|
|
338
338
|
onClick: () => K(!0),
|
|
339
339
|
className: "text-sm font-medium text-text-primary underline",
|
|
340
|
-
children:
|
|
340
|
+
children: d("enterprise.budget.set", "Set a budget")
|
|
341
341
|
})]
|
|
342
342
|
})
|
|
343
343
|
}),
|
|
344
344
|
/* @__PURE__ */ M(U, {
|
|
345
|
-
title:
|
|
345
|
+
title: d("enterprise.savings.title", "Consolidation opportunity"),
|
|
346
346
|
icon: /* @__PURE__ */ j(E, { className: "h-4 w-4" }),
|
|
347
347
|
children: [/* @__PURE__ */ M("p", {
|
|
348
348
|
className: "text-2xl font-bold tabular-nums text-text-primary",
|
|
349
349
|
children: [Y(J.duplicatePotentialMonthlySavings), /* @__PURE__ */ j("span", {
|
|
350
350
|
className: "text-sm font-normal text-text-secondary",
|
|
351
|
-
children:
|
|
351
|
+
children: d("enterprise.perMonth", "/mo")
|
|
352
352
|
})]
|
|
353
353
|
}), /* @__PURE__ */ j("p", {
|
|
354
354
|
className: "mt-1 text-xs text-text-secondary",
|
|
355
|
-
children:
|
|
355
|
+
children: d("enterprise.savings.detail", "Upper bound if each duplicated tool is consolidated into one subscription; shadow IT costs {{shadow}} / month.", { shadow: Y(J.shadowItMonthlySpend) })
|
|
356
356
|
})]
|
|
357
357
|
})
|
|
358
358
|
]
|
|
359
359
|
}),
|
|
360
360
|
/* @__PURE__ */ j(l, {
|
|
361
|
-
title:
|
|
362
|
-
description:
|
|
361
|
+
title: d("enterprise.departments.title", "Spend by department"),
|
|
362
|
+
description: d("enterprise.departments.description", "Monthly run-rate per department, with each department budget."),
|
|
363
363
|
children: /* @__PURE__ */ j(N, {
|
|
364
364
|
treatment: "plain",
|
|
365
365
|
className: "p-6",
|
|
366
366
|
"data-testid": "enterprise-departments",
|
|
367
367
|
children: J.departments.length ? /* @__PURE__ */ M("div", {
|
|
368
368
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
369
|
-
children: [/* @__PURE__ */ j(
|
|
369
|
+
children: [/* @__PURE__ */ j(p, {
|
|
370
370
|
data: J.departments.map((e) => ({
|
|
371
|
-
label: V(
|
|
371
|
+
label: V(d, e.department),
|
|
372
372
|
value: e.monthlySpend
|
|
373
373
|
})),
|
|
374
374
|
valueFormat: Y
|
|
@@ -380,10 +380,10 @@ function G() {
|
|
|
380
380
|
className: "flex items-center justify-between gap-3 text-sm",
|
|
381
381
|
children: [/* @__PURE__ */ j("span", {
|
|
382
382
|
className: "truncate font-medium text-text-primary",
|
|
383
|
-
children: V(
|
|
383
|
+
children: V(d, e.department)
|
|
384
384
|
}), /* @__PURE__ */ j("span", {
|
|
385
385
|
className: "shrink-0 tabular-nums text-text-secondary",
|
|
386
|
-
children:
|
|
386
|
+
children: d("enterprise.departments.row", "{{count}} subs · {{share}}%", {
|
|
387
387
|
count: e.relationshipCount,
|
|
388
388
|
share: e.sharePct
|
|
389
389
|
})
|
|
@@ -393,21 +393,21 @@ function G() {
|
|
|
393
393
|
children: /* @__PURE__ */ j(H, {
|
|
394
394
|
status: e.budget,
|
|
395
395
|
fmt: Y,
|
|
396
|
-
tr:
|
|
396
|
+
tr: d
|
|
397
397
|
})
|
|
398
398
|
})]
|
|
399
399
|
}, e.department ?? "__unassigned"))
|
|
400
400
|
})]
|
|
401
401
|
}) : /* @__PURE__ */ j("p", {
|
|
402
402
|
className: "text-sm text-text-secondary",
|
|
403
|
-
children:
|
|
403
|
+
children: d("enterprise.departments.none", "No spend is billing right now.")
|
|
404
404
|
})
|
|
405
405
|
})
|
|
406
406
|
}),
|
|
407
407
|
/* @__PURE__ */ M("div", {
|
|
408
408
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
409
409
|
children: [/* @__PURE__ */ j(U, {
|
|
410
|
-
title:
|
|
410
|
+
title: d("enterprise.duplicates.title", "Duplicate tools ({{count}})", { count: J.duplicateTools.length }),
|
|
411
411
|
icon: /* @__PURE__ */ j(C, { className: "h-4 w-4" }),
|
|
412
412
|
testId: "enterprise-duplicates",
|
|
413
413
|
children: J.duplicateTools.length ? /* @__PURE__ */ j("ul", {
|
|
@@ -422,21 +422,21 @@ function G() {
|
|
|
422
422
|
children: [e.providerId ? /* @__PURE__ */ j("button", {
|
|
423
423
|
type: "button",
|
|
424
424
|
className: B,
|
|
425
|
-
onClick: () =>
|
|
425
|
+
onClick: () => f(`/providers/${e.providerId}`),
|
|
426
426
|
children: e.name
|
|
427
427
|
}) : /* @__PURE__ */ j("p", {
|
|
428
428
|
className: "truncate text-sm font-medium text-text-primary",
|
|
429
429
|
children: e.name
|
|
430
430
|
}), /* @__PURE__ */ j("p", {
|
|
431
431
|
className: "text-xs text-text-secondary",
|
|
432
|
-
children:
|
|
432
|
+
children: d("enterprise.duplicates.summary", "{{count}} subscriptions · {{teams}}", {
|
|
433
433
|
count: e.relationshipCount,
|
|
434
|
-
teams: e.departments.length ? e.departments.join(", ") :
|
|
434
|
+
teams: e.departments.length ? e.departments.join(", ") : d("enterprise.departments.unassigned", "Unassigned")
|
|
435
435
|
})
|
|
436
436
|
})]
|
|
437
437
|
}), /* @__PURE__ */ j("span", {
|
|
438
438
|
className: "shrink-0 text-end text-xs text-status-warning-text",
|
|
439
|
-
children:
|
|
439
|
+
children: d("enterprise.duplicates.save", "Save up to {{amount}}/mo", { amount: Y(e.potentialMonthlySavings) })
|
|
440
440
|
})]
|
|
441
441
|
}),
|
|
442
442
|
/* @__PURE__ */ j("ul", {
|
|
@@ -446,7 +446,7 @@ function G() {
|
|
|
446
446
|
onClick: () => X(e.relationshipId),
|
|
447
447
|
className: _("rounded-md px-2 py-1 text-xs hover:bg-bg-sunken", e.keep ? "border border-status-success-text/40 bg-status-success-bg-subtle text-status-success-text" : "bg-bg-surface text-text-primary"),
|
|
448
448
|
children: [
|
|
449
|
-
e.keep ? `${
|
|
449
|
+
e.keep ? `${d("enterprise.duplicates.keep", "Keep")}: ` : "",
|
|
450
450
|
e.label,
|
|
451
451
|
" · ",
|
|
452
452
|
Y(e.monthlySpend)
|
|
@@ -456,7 +456,7 @@ function G() {
|
|
|
456
456
|
/* @__PURE__ */ M("p", {
|
|
457
457
|
className: "mt-2 text-xs text-text-secondary",
|
|
458
458
|
children: [
|
|
459
|
-
|
|
459
|
+
d(F[e.type].key, F[e.type].fallback),
|
|
460
460
|
" ·",
|
|
461
461
|
" ",
|
|
462
462
|
e.rationale
|
|
@@ -466,10 +466,10 @@ function G() {
|
|
|
466
466
|
}, e.key))
|
|
467
467
|
}) : /* @__PURE__ */ j("p", {
|
|
468
468
|
className: "text-sm text-text-secondary",
|
|
469
|
-
children:
|
|
469
|
+
children: d("enterprise.duplicates.none", "No duplicate or overlapping tools found.")
|
|
470
470
|
})
|
|
471
471
|
}), /* @__PURE__ */ j(U, {
|
|
472
|
-
title:
|
|
472
|
+
title: d("enterprise.shadow.title", "Shadow IT ({{count}})", { count: J.shadowItCount }),
|
|
473
473
|
icon: /* @__PURE__ */ j(w, { className: "h-4 w-4" }),
|
|
474
474
|
testId: "enterprise-shadow-it",
|
|
475
475
|
children: J.shadowIt.length ? /* @__PURE__ */ j("ul", {
|
|
@@ -486,11 +486,11 @@ function G() {
|
|
|
486
486
|
}), /* @__PURE__ */ M("p", {
|
|
487
487
|
className: "text-xs text-text-secondary",
|
|
488
488
|
children: [
|
|
489
|
-
|
|
489
|
+
d(P[e.reason].key, P[e.reason].fallback),
|
|
490
490
|
" · ",
|
|
491
|
-
V(
|
|
491
|
+
V(d, e.department),
|
|
492
492
|
" · ",
|
|
493
|
-
|
|
493
|
+
d("enterprise.shadow.found", "found {{date}}", { date: o(e.detectedAt) })
|
|
494
494
|
]
|
|
495
495
|
})]
|
|
496
496
|
}), /* @__PURE__ */ j("span", {
|
|
@@ -500,13 +500,13 @@ function G() {
|
|
|
500
500
|
}, e.relationshipId))
|
|
501
501
|
}) : /* @__PURE__ */ j("p", {
|
|
502
502
|
className: "text-sm text-text-secondary",
|
|
503
|
-
children:
|
|
503
|
+
children: d("enterprise.shadow.none", "Every discovered tool is linked to an approved provider.")
|
|
504
504
|
})
|
|
505
505
|
})]
|
|
506
506
|
}),
|
|
507
507
|
/* @__PURE__ */ j(l, {
|
|
508
|
-
title:
|
|
509
|
-
description:
|
|
508
|
+
title: d("enterprise.renewals.title", "Renewal pipeline"),
|
|
509
|
+
description: d("enterprise.renewals.description", "Renewal charges due by quarter, for planning renegotiations."),
|
|
510
510
|
children: /* @__PURE__ */ j("div", {
|
|
511
511
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
512
512
|
"data-testid": "enterprise-renewals",
|
|
@@ -524,7 +524,7 @@ function G() {
|
|
|
524
524
|
}),
|
|
525
525
|
/* @__PURE__ */ j("p", {
|
|
526
526
|
className: "text-xs text-text-secondary",
|
|
527
|
-
children:
|
|
527
|
+
children: d("enterprise.renewals.counts", "{{renewals}} renewals · {{subs}} subscriptions", {
|
|
528
528
|
renewals: e.renewalCount,
|
|
529
529
|
subs: e.relationshipCount
|
|
530
530
|
})
|
|
@@ -553,7 +553,7 @@ function G() {
|
|
|
553
553
|
})
|
|
554
554
|
}),
|
|
555
555
|
/* @__PURE__ */ j(l, {
|
|
556
|
-
title:
|
|
556
|
+
title: d("enterprise.risks.title", "Compliance and risk flags ({{count}})", { count: J.riskFlagCount }),
|
|
557
557
|
children: /* @__PURE__ */ j(N, {
|
|
558
558
|
treatment: "plain",
|
|
559
559
|
className: "p-2",
|
|
@@ -566,7 +566,7 @@ function G() {
|
|
|
566
566
|
className: "flex min-w-0 items-start gap-3",
|
|
567
567
|
children: [/* @__PURE__ */ j("span", {
|
|
568
568
|
className: _("shrink-0 rounded-md px-2 py-0.5 text-xs font-medium", L[e.severity]),
|
|
569
|
-
children:
|
|
569
|
+
children: d(I[e.kind].key, I[e.kind].fallback)
|
|
570
570
|
}), /* @__PURE__ */ M("div", {
|
|
571
571
|
className: "min-w-0",
|
|
572
572
|
children: [/* @__PURE__ */ j("button", {
|
|
@@ -582,10 +582,10 @@ function G() {
|
|
|
582
582
|
}), /* @__PURE__ */ M("span", {
|
|
583
583
|
className: "shrink-0 text-xs text-text-secondary",
|
|
584
584
|
children: [
|
|
585
|
-
V(
|
|
585
|
+
V(d, e.department),
|
|
586
586
|
" · ",
|
|
587
587
|
Y(e.monthlySpend),
|
|
588
|
-
|
|
588
|
+
d("enterprise.perMonth", "/mo")
|
|
589
589
|
]
|
|
590
590
|
})]
|
|
591
591
|
}, `${e.kind}-${e.relationshipId}`))
|
|
@@ -594,16 +594,16 @@ function G() {
|
|
|
594
594
|
children: [/* @__PURE__ */ j(D, {
|
|
595
595
|
className: "h-4 w-4",
|
|
596
596
|
"aria-hidden": !0
|
|
597
|
-
}),
|
|
597
|
+
}), d("enterprise.risks.none", "No compliance or risk issues found.")]
|
|
598
598
|
})
|
|
599
599
|
})
|
|
600
600
|
}),
|
|
601
601
|
/* @__PURE__ */ j(l, {
|
|
602
|
-
title:
|
|
602
|
+
title: d("enterprise.licenses.title", "Licences"),
|
|
603
603
|
children: /* @__PURE__ */ M(N, {
|
|
604
604
|
treatment: "plain",
|
|
605
605
|
role: "region",
|
|
606
|
-
"aria-label":
|
|
606
|
+
"aria-label": d("enterprise.licenses.title", "Licences"),
|
|
607
607
|
tabIndex: 0,
|
|
608
608
|
className: "overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--color-focus-ring)]",
|
|
609
609
|
"data-testid": "enterprise-licenses",
|
|
@@ -614,27 +614,27 @@ function G() {
|
|
|
614
614
|
children: [
|
|
615
615
|
/* @__PURE__ */ j("th", {
|
|
616
616
|
className: "px-4 py-3 font-medium",
|
|
617
|
-
children:
|
|
617
|
+
children: d("enterprise.licenses.app", "App")
|
|
618
618
|
}),
|
|
619
619
|
/* @__PURE__ */ j("th", {
|
|
620
620
|
className: "px-4 py-3 font-medium",
|
|
621
|
-
children:
|
|
621
|
+
children: d("enterprise.licenses.department", "Department")
|
|
622
622
|
}),
|
|
623
623
|
/* @__PURE__ */ j("th", {
|
|
624
624
|
className: "px-4 py-3 font-medium",
|
|
625
|
-
children:
|
|
625
|
+
children: d("enterprise.licenses.seats", "Seats used / assigned")
|
|
626
626
|
}),
|
|
627
627
|
/* @__PURE__ */ j("th", {
|
|
628
628
|
className: "px-4 py-3 font-medium",
|
|
629
|
-
children:
|
|
629
|
+
children: d("enterprise.licenses.utilization", "Utilisation")
|
|
630
630
|
}),
|
|
631
631
|
/* @__PURE__ */ j("th", {
|
|
632
632
|
className: "px-4 py-3 text-end font-medium",
|
|
633
|
-
children:
|
|
633
|
+
children: d("enterprise.licenses.annualCost", "Annual cost")
|
|
634
634
|
}),
|
|
635
635
|
/* @__PURE__ */ j("th", {
|
|
636
636
|
className: "px-4 py-3 font-medium",
|
|
637
|
-
children:
|
|
637
|
+
children: d("enterprise.licenses.renews", "Renews")
|
|
638
638
|
})
|
|
639
639
|
]
|
|
640
640
|
}) }), /* @__PURE__ */ j("tbody", {
|
|
@@ -654,7 +654,7 @@ function G() {
|
|
|
654
654
|
}),
|
|
655
655
|
/* @__PURE__ */ j("td", {
|
|
656
656
|
className: "px-4 py-3 text-text-secondary",
|
|
657
|
-
children: V(
|
|
657
|
+
children: V(d, e.department)
|
|
658
658
|
}),
|
|
659
659
|
/* @__PURE__ */ j("td", {
|
|
660
660
|
className: "px-4 py-3 tabular-nums text-text-primary",
|
|
@@ -665,8 +665,8 @@ function G() {
|
|
|
665
665
|
children: e.utilizationPct == null ? /* @__PURE__ */ j("span", {
|
|
666
666
|
className: "text-text-secondary",
|
|
667
667
|
children: "—"
|
|
668
|
-
}) : /* @__PURE__ */ j(
|
|
669
|
-
label:
|
|
668
|
+
}) : /* @__PURE__ */ j(m, {
|
|
669
|
+
label: d("enterprise.seats.utilization", "Seat utilization"),
|
|
670
670
|
value: e.utilizationPct,
|
|
671
671
|
tone: e.utilizationPct >= 70 ? "positive" : "warning"
|
|
672
672
|
})
|
|
@@ -683,7 +683,7 @@ function G() {
|
|
|
683
683
|
})]
|
|
684
684
|
}), J.licenses.length === 0 && /* @__PURE__ */ j("p", {
|
|
685
685
|
className: "p-4 text-sm text-text-secondary",
|
|
686
|
-
children:
|
|
686
|
+
children: d("enterprise.licenses.none", "No subscription is billing right now.")
|
|
687
687
|
})]
|
|
688
688
|
})
|
|
689
689
|
}),
|
|
@@ -692,7 +692,7 @@ function G() {
|
|
|
692
692
|
children: [/* @__PURE__ */ j(b, {
|
|
693
693
|
className: "mt-0.5 h-3.5 w-3.5 shrink-0",
|
|
694
694
|
"aria-hidden": !0
|
|
695
|
-
}),
|
|
695
|
+
}), d("enterprise.otherCurrencies", "Not included above (amounts are never converted): {{list}}. Switch currency to see them.", { list: J.otherCurrencies.map((t) => `${e(t.monthlySpend, t.currency)}/mo`).join(", ") })]
|
|
696
696
|
})
|
|
697
697
|
]
|
|
698
698
|
}),
|