@burdenoff/microfe-integrations 2026.1113.1 → 2026.1113.3

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.
Files changed (50) hide show
  1. package/dist/generated/wspace-operations.d.ts +4 -0
  2. package/dist/generated/wspace-operations.js +1 -0
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/integrations/IntegrationsUserRoutes.d.ts +7 -0
  5. package/dist/integrations/IntegrationsUserRoutes.js +57 -47
  6. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  7. package/dist/integrations/components/AddConnectionDialog.d.ts +8 -2
  8. package/dist/integrations/components/AddConnectionDialog.js +17 -15
  9. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  10. package/dist/integrations/components/ConnectedAppsMoreMenu.d.ts +12 -0
  11. package/dist/integrations/components/ConnectedAppsMoreMenu.js +60 -0
  12. package/dist/integrations/components/ConnectedAppsMoreMenu.js.map +1 -0
  13. package/dist/integrations/components/ConnectionCard.d.ts +7 -1
  14. package/dist/integrations/components/ConnectionCard.js +27 -19
  15. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  16. package/dist/integrations/components/PopularAppTiles.d.ts +7 -0
  17. package/dist/integrations/components/PopularAppTiles.js +33 -0
  18. package/dist/integrations/components/PopularAppTiles.js.map +1 -0
  19. package/dist/integrations/components/ProviderCard.d.ts +6 -0
  20. package/dist/integrations/components/ProviderCard.js +67 -61
  21. package/dist/integrations/components/ProviderCard.js.map +1 -1
  22. package/dist/integrations/components/RecentActivity.d.ts +7 -0
  23. package/dist/integrations/components/RecentActivity.js +74 -0
  24. package/dist/integrations/components/RecentActivity.js.map +1 -0
  25. package/dist/integrations/hooks/useLogs.d.ts +2 -0
  26. package/dist/integrations/hooks/useLogs.js +2 -1
  27. package/dist/integrations/hooks/useLogs.js.map +1 -1
  28. package/dist/integrations/hooks/useVaultName.d.ts +1 -0
  29. package/dist/integrations/hooks/useVaultName.js +27 -0
  30. package/dist/integrations/hooks/useVaultName.js.map +1 -0
  31. package/dist/integrations/pages/ConnectionDetail.js +555 -283
  32. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  33. package/dist/integrations/pages/ConnectionLogs.d.ts +3 -0
  34. package/dist/integrations/pages/ConnectionLogs.js +178 -142
  35. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  36. package/dist/integrations/pages/ConnectionsList.js +376 -243
  37. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  38. package/dist/integrations/pages/ProviderCatalog.js +199 -179
  39. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  40. package/dist/integrations/pages/ProviderDetail.js +284 -265
  41. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  42. package/dist/integrations/providers/IntegrationsProvider.js +22 -21
  43. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  44. package/dist/integrations/types/index.d.ts +12 -0
  45. package/dist/integrations/utils/connectedApps.d.ts +26 -0
  46. package/dist/integrations/utils/connectedApps.js +46 -0
  47. package/dist/integrations/utils/connectedApps.js.map +1 -0
  48. package/dist/integrations/utils/mappers.js +1 -0
  49. package/dist/integrations/utils/mappers.js.map +1 -1
  50. package/package.json +2 -2
@@ -1,262 +1,367 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { useTr as t } from "../hooks/useTr.js";
3
- import { useIntegrations as n } from "../providers/IntegrationsProvider.js";
4
- import { INTEGRATION_PERMISSIONS as ee } from "../constants/permissions.js";
5
- import { useIntegrationsStore as te } from "../store/integrationsStore.js";
6
- import { useConnections as r } from "../hooks/useConnections.js";
7
- import { joinPath as i } from "../utils/navigation.js";
8
- import { ConnectionCard as a } from "../components/ConnectionCard.js";
9
- import { AddConnectionDialog as ne } from "../components/AddConnectionDialog.js";
10
- import { CONNECTION_STATUS_OPTIONS as o, PROVIDER_CATEGORIES as s } from "../utils/constants.js";
11
- import { ConnectionAccessFilter as c } from "../../generated/wspace-types.js";
12
- import { useId as l, useMemo as u, useState as d } from "react";
13
- import { AlertCircle as f, ArrowLeft as p, Filter as m, Grid3x3 as re, Link2 as h, List as ie, Plus as g, RefreshCw as ae, Search as oe, X as _ } from "lucide-react";
14
- import { usePermissions as v } from "@burdenoff/fe-libs/shared/providers/shell";
15
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
16
- import { Button as x, EmphasisPanel as S, IllustratedEmptyState as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
3
+ import { useIntegrations as ee } from "../providers/IntegrationsProvider.js";
4
+ import { INTEGRATION_PERMISSIONS as te } from "../constants/permissions.js";
5
+ import { useIntegrationsStore as n } from "../store/integrationsStore.js";
6
+ import { useConnections as ne } from "../hooks/useConnections.js";
7
+ import { joinPath as re } from "../utils/navigation.js";
8
+ import { ConnectionCard as ie } from "../components/ConnectionCard.js";
9
+ import { AddConnectionDialog as r } from "../components/AddConnectionDialog.js";
10
+ import { ConnectedAppsMoreMenu as ae } from "../components/ConnectedAppsMoreMenu.js";
11
+ import { PopularAppTiles as oe } from "../components/PopularAppTiles.js";
12
+ import { STATUS_GROUPS as se, STATUS_GROUP_LABELS as ce, canReconnect as le, isStaleUnfinished as i, needsAttention as a, statusGroup as ue } from "../utils/connectedApps.js";
13
+ import { CONNECTION_STATUS_OPTIONS as de, PROVIDER_CATEGORIES as fe } from "../utils/constants.js";
14
+ import { ConnectionAccessFilter as o } from "../../generated/wspace-types.js";
15
+ import { useId as pe, useMemo as me, useState as s } from "react";
16
+ import { AlertCircle as he, AlertTriangle as c, ArrowLeft as ge, Filter as l, Grid3x3 as u, Link2 as d, List as f, Plus as p, RefreshCw as m, Search as _e, SlidersHorizontal as ve, X as h } from "lucide-react";
17
+ import { usePermissions as ye } from "@burdenoff/fe-libs/shared/providers/shell";
18
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
19
+ import { Button as v, EmphasisPanel as be, IllustratedEmptyState as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
17
20
  // src/integrations/pages/ConnectionsList.tsx
18
- var se = {
19
- mine: c.OwnedByMe,
20
- shared: c.SharedWithMe
21
+ var Ce = {
22
+ mine: o.OwnedByMe,
23
+ shared: o.SharedWithMe
21
24
  };
22
- function T() {
23
- let { basePath: c = "/", navigate: T, onConnectionSelect: ce, connectionsDocsUrl: E } = n(), D = t(), { viewMode: O, setViewMode: k, connectionFilter: A, updateConnectionFilter: j, addConnectionDialogOpen: M, openAddConnectionDialog: N, closeAddConnectionDialog: P } = te(), [F, I] = d("all"), { connections: L, loading: R, answered: z, error: B, refetch: V } = r(F === "all" ? void 0 : { access: se[F] }), H = !R && !B && !z, { hasPermission: U, isLoading: W } = v(), G = !W && U(ee.CONNECTION_CREATE), [K, le] = d(!1), q = l(), J = `${q}-status`, Y = `${q}-category`, X = `${q}-access`, ue = F !== "all" || (L ?? []).some((e) => e.myAccess !== void 0), Z = u(() => {
24
- let e = L ?? [];
25
- if (A.search) {
26
- let t = A.search.toLowerCase();
25
+ function y() {
26
+ let { basePath: o = "/", navigate: y, onConnectionSelect: we, connectionsDocsUrl: Te, navigationV2: b = !1 } = ee(), x = t(), { viewMode: S, setViewMode: C, connectionFilter: w, updateConnectionFilter: T, addConnectionDialogOpen: Ee, addConnectionProviderId: E, openAddConnectionDialog: D, closeAddConnectionDialog: De } = n(), [O, k] = s("all"), [A, Oe] = s(!1), [j, M] = s(null), [N] = s(() => Date.now()), [P, F] = s("all"), { connections: I, loading: L, answered: ke, error: R, refetch: z } = ne(P === "all" ? void 0 : { access: Ce[P] }), B = !L && !R && !ke, { hasPermission: Ae, isLoading: je } = ye(), V = !je && Ae(te.CONNECTION_CREATE), [H, U] = s(!1), W = pe(), G = `${W}-status`, K = `${W}-category`, q = `${W}-access`, Me = P !== "all" || (I ?? []).some((e) => e.myAccess !== void 0), J = me(() => {
27
+ let e = I ?? [];
28
+ if (w.search) {
29
+ let t = w.search.toLowerCase();
27
30
  e = e.filter((e) => e.name.toLowerCase().includes(t) || e.provider.name.toLowerCase().includes(t) || (e.externalAccountEmail?.toLowerCase().includes(t) ?? !1));
28
31
  }
29
- return A.status !== "all" && (e = e.filter((e) => e.status === A.status)), A.providerId && (e = e.filter((e) => e.provider.id === A.providerId)), A.category !== "all" && (e = e.filter((e) => e.provider.category === A.category)), e.sort((e, t) => new Date(t.updatedAt).getTime() - new Date(e.updatedAt).getTime());
30
- }, [L, A]), Q = A.search || A.status !== "all" || A.providerId || A.category !== "all" || F !== "all", $ = () => {
31
- j({
32
+ return b ? (O !== "all" && (e = e.filter((e) => ue(e.status) === O)), !A && O !== "unfinished" && (e = e.filter((e) => !i(e, N)))) : w.status !== "all" && (e = e.filter((e) => e.status === w.status)), w.providerId && (e = e.filter((e) => e.provider.id === w.providerId)), w.category !== "all" && (e = e.filter((e) => e.provider.category === w.category)), e.sort((e, t) => (b ? Number(a(t.status)) - Number(a(e.status)) : 0) || new Date(t.updatedAt).getTime() - new Date(e.updatedAt).getTime());
33
+ }, [
34
+ I,
35
+ w,
36
+ b,
37
+ O,
38
+ A,
39
+ N
40
+ ]), Y = b ? (I ?? []).filter((e) => a(e.status)).length : 0, X = b ? (I ?? []).filter((e) => i(e, N)).length : 0, Z = !b || (I ?? []).length > 6 || !!w.search, Q = w.search || (b ? O !== "all" : w.status !== "all") || w.providerId || w.category !== "all" || P !== "all", $ = () => {
41
+ T({
32
42
  search: "",
33
43
  status: "all",
34
44
  providerId: null,
35
45
  category: "all"
36
- }), I("all");
37
- }, de = (e) => {
38
- ce?.(e), T?.(i(c, `connections/${e.id}`));
46
+ }), F("all"), k("all");
47
+ }, Ne = (e) => b && V && le(e.status) ? /* @__PURE__ */ _(v, {
48
+ size: "sm",
49
+ variant: "outline",
50
+ "data-testid": "connection-reconnect",
51
+ onClick: (t) => {
52
+ t.stopPropagation(), M({
53
+ connectionId: e.id,
54
+ name: e.name,
55
+ providerId: e.provider.id,
56
+ authMethodKey: e.authMethodKey ?? null
57
+ });
58
+ },
59
+ onKeyDown: (e) => e.stopPropagation(),
60
+ children: [/* @__PURE__ */ g(m, {
61
+ size: 14,
62
+ "aria-hidden": "true"
63
+ }), x("integrations.connectedApps.reconnect", "Reconnect")]
64
+ }) : void 0, Pe = (e) => {
65
+ we?.(e), y?.(re(o, `connections/${e.id}`));
39
66
  };
40
- return /* @__PURE__ */ b("div", {
67
+ return /* @__PURE__ */ _("div", {
41
68
  className: "space-y-6 p-6 max-w-7xl mx-auto",
42
69
  children: [
43
- /* @__PURE__ */ y("div", {
70
+ /* @__PURE__ */ g("div", {
44
71
  className: "rounded-xl border border-border-seam bg-accent-wash p-6",
45
72
  "data-tour": "integrations-connections-header",
46
- children: /* @__PURE__ */ b("div", {
73
+ children: /* @__PURE__ */ _("div", {
47
74
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
48
- children: [/* @__PURE__ */ b("div", {
75
+ children: [/* @__PURE__ */ _("div", {
49
76
  className: "flex min-w-0 items-center gap-4",
50
77
  children: [
51
- /* @__PURE__ */ y(x, {
78
+ !b && /* @__PURE__ */ g(v, {
52
79
  variant: "ghost",
53
80
  size: "icon",
54
81
  className: "shrink-0",
55
- onClick: () => T?.(c),
56
- "aria-label": D("integrations.connections.actions.backAriaLabel", "Back to overview"),
57
- children: /* @__PURE__ */ y(p, { size: 20 })
82
+ onClick: () => y?.(o),
83
+ "aria-label": x("integrations.connections.actions.backAriaLabel", "Back to overview"),
84
+ children: /* @__PURE__ */ g(ge, { size: 20 })
58
85
  }),
59
- /* @__PURE__ */ y("div", {
86
+ /* @__PURE__ */ g("div", {
60
87
  className: "shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10",
61
- children: /* @__PURE__ */ y(h, {
88
+ children: /* @__PURE__ */ g(d, {
62
89
  size: 24,
63
90
  className: "text-primary"
64
91
  })
65
92
  }),
66
- /* @__PURE__ */ b("div", {
93
+ /* @__PURE__ */ _("div", {
67
94
  className: "min-w-0",
68
- children: [/* @__PURE__ */ y("h1", {
95
+ children: [/* @__PURE__ */ g("h1", {
69
96
  className: "text-2xl sm:text-3xl font-bold text-text-primary",
70
- children: D("integrations.connections.title", "Connections")
71
- }), /* @__PURE__ */ y("p", {
97
+ children: x("integrations.connections.title", "Connections")
98
+ }), /* @__PURE__ */ g("p", {
72
99
  className: "text-sm text-text-secondary mt-0.5",
73
- children: D("integrations.connections.subtitle", "Manage your integration connections")
100
+ children: x("integrations.connections.subtitle", "Manage your integration connections")
74
101
  })]
75
102
  })
76
103
  ]
77
- }), G && /* @__PURE__ */ b(x, {
104
+ }), b ? /* @__PURE__ */ _("div", {
105
+ className: "flex shrink-0 flex-wrap items-center gap-2",
106
+ children: [V && /* @__PURE__ */ _(v, {
107
+ onClick: () => D(),
108
+ children: [/* @__PURE__ */ g(p, { size: 16 }), x("integrations.connections.actions.addConnection", "Add Connection")]
109
+ }), /* @__PURE__ */ g(ae, { extras: [{
110
+ id: "filters",
111
+ label: H ? x("integrations.connectedApps.hideFilters", "Hide filter and view") : x("integrations.connectedApps.showFilters", "Filter and view"),
112
+ icon: /* @__PURE__ */ g(ve, {
113
+ size: 16,
114
+ "aria-hidden": "true"
115
+ }),
116
+ onSelect: () => U(!H)
117
+ }] })]
118
+ }) : V && /* @__PURE__ */ _(v, {
78
119
  className: "shrink-0",
79
- onClick: () => N(),
80
- children: [/* @__PURE__ */ y(g, { size: 16 }), D("integrations.connections.actions.addConnection", "Add Connection")]
120
+ onClick: () => D(),
121
+ children: [/* @__PURE__ */ g(p, { size: 16 }), x("integrations.connections.actions.addConnection", "Add Connection")]
81
122
  })]
82
123
  })
83
124
  }),
84
- /* @__PURE__ */ y(w, {
85
- icon: /* @__PURE__ */ y(h, { size: 16 }),
86
- learnMoreHref: E,
87
- learnMoreLabel: D("integrations.connections.learnMore", "Learn more"),
88
- children: D("integrations.connections.purpose", "A connection is one authenticated link between your workspace and an external service (for example, \"Marketing Slack\" or \"Finance Google Drive\"). Use this page to see every connection at a glance, check its health, search by provider or account, and open one to test, refresh, or revoke its access.")
125
+ b && Y > 0 && /* @__PURE__ */ _("div", {
126
+ role: "status",
127
+ "data-testid": "connections-needs-attention",
128
+ className: "flex flex-col gap-3 rounded-xl border border-border-default bg-status-warning-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between",
129
+ children: [/* @__PURE__ */ _("div", {
130
+ className: "flex items-start gap-3",
131
+ children: [/* @__PURE__ */ g(c, {
132
+ size: 20,
133
+ className: "mt-0.5 shrink-0 text-status-warning-text",
134
+ "aria-hidden": "true"
135
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
136
+ className: "font-semibold text-status-warning-text",
137
+ children: x("integrations.connectedApps.needsAttention", "Needs attention ({{count}})", { count: Y })
138
+ }), /* @__PURE__ */ g("p", {
139
+ className: "text-sm text-text-secondary",
140
+ children: x("integrations.connectedApps.needsAttentionHint", "These apps stopped working. Reconnect them so your workflows keep running.")
141
+ })] })]
142
+ }), O !== "attention" && /* @__PURE__ */ g(v, {
143
+ size: "sm",
144
+ variant: "outline",
145
+ onClick: () => k("attention"),
146
+ children: x("integrations.connectedApps.showAttention", "Show them")
147
+ })]
148
+ }),
149
+ /* @__PURE__ */ g(Se, {
150
+ icon: /* @__PURE__ */ g(d, { size: 16 }),
151
+ learnMoreHref: Te,
152
+ learnMoreLabel: x("integrations.connections.learnMore", "Learn more"),
153
+ children: x("integrations.connections.purpose", "A connection is one authenticated link between your workspace and an external service (for example, \"Marketing Slack\" or \"Finance Google Drive\"). Use this page to see every connection at a glance, check its health, search by provider or account, and open one to test, refresh, or revoke its access.")
89
154
  }),
90
- /* @__PURE__ */ b("div", {
155
+ /* @__PURE__ */ _("div", {
91
156
  className: "space-y-4",
92
- children: [/* @__PURE__ */ b("div", {
93
- className: "flex flex-col sm:flex-row gap-3",
157
+ children: [/* @__PURE__ */ _("div", {
158
+ className: e("flex flex-col sm:flex-row gap-3", !Z && b && "hidden"),
94
159
  children: [
95
- /* @__PURE__ */ b("div", {
96
- className: "flex-1 relative group",
160
+ /* @__PURE__ */ _("div", {
161
+ className: e("flex-1 relative group", !Z && "hidden"),
97
162
  "data-tour": "integrations-connections-search",
98
- children: [/* @__PURE__ */ y(oe, {
163
+ children: [/* @__PURE__ */ g(_e, {
99
164
  size: 18,
100
165
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
101
- }), /* @__PURE__ */ y("input", {
166
+ }), /* @__PURE__ */ g("input", {
102
167
  type: "text",
103
- placeholder: D("integrations.connections.search.placeholder", "Search connections..."),
104
- value: A.search,
105
- onChange: (e) => j({ search: e.target.value }),
168
+ placeholder: x("integrations.connections.search.placeholder", "Search connections..."),
169
+ value: w.search,
170
+ onChange: (e) => T({ search: e.target.value }),
106
171
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",
107
- "aria-label": D("integrations.connections.search.ariaLabel", "Search connections")
172
+ "aria-label": x("integrations.connections.search.ariaLabel", "Search connections")
108
173
  })]
109
174
  }),
110
- /* @__PURE__ */ b("button", {
175
+ !b && /* @__PURE__ */ _("button", {
111
176
  type: "button",
112
- onClick: () => le(!K),
113
- className: e("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", K || Q ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
114
- children: [/* @__PURE__ */ y(m, { size: 16 }), K ? D("integrations.connections.filters.hide", "Hide") : D("integrations.connections.filters.show", "Filter")]
177
+ onClick: () => U(!H),
178
+ className: e("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", H || Q ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
179
+ children: [/* @__PURE__ */ g(l, { size: 16 }), H ? x("integrations.connections.filters.hide", "Hide") : x("integrations.connections.filters.show", "Filter")]
115
180
  }),
116
- /* @__PURE__ */ b("div", {
117
- className: "flex items-center border border-border-subtle rounded-lg overflow-hidden",
181
+ /* @__PURE__ */ _("div", {
182
+ className: e("flex items-center border border-border-subtle rounded-lg overflow-hidden", b && "hidden"),
118
183
  "data-tour": "integrations-connections-view-toggle",
119
- children: [/* @__PURE__ */ y("button", {
184
+ children: [/* @__PURE__ */ g("button", {
120
185
  type: "button",
121
- onClick: () => k("grid"),
122
- className: e("p-2.5 transition-colors", O === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
123
- "aria-label": D("integrations.connections.view.gridAriaLabel", "Grid view"),
124
- children: /* @__PURE__ */ y(re, { size: 16 })
125
- }), /* @__PURE__ */ y("button", {
186
+ onClick: () => C("grid"),
187
+ className: e("p-2.5 transition-colors", S === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
188
+ "aria-label": x("integrations.connections.view.gridAriaLabel", "Grid view"),
189
+ children: /* @__PURE__ */ g(u, { size: 16 })
190
+ }), /* @__PURE__ */ g("button", {
126
191
  type: "button",
127
- onClick: () => k("list"),
128
- className: e("p-2.5 transition-colors", O === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
129
- "aria-label": D("integrations.connections.view.listAriaLabel", "List view"),
130
- children: /* @__PURE__ */ y(ie, { size: 16 })
192
+ onClick: () => C("list"),
193
+ className: e("p-2.5 transition-colors", S === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
194
+ "aria-label": x("integrations.connections.view.listAriaLabel", "List view"),
195
+ children: /* @__PURE__ */ g(f, { size: 16 })
131
196
  })]
132
197
  })
133
198
  ]
134
- }), K && /* @__PURE__ */ b("div", {
199
+ }), H && /* @__PURE__ */ _("div", {
135
200
  className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200",
136
- children: [/* @__PURE__ */ b("div", {
137
- className: "flex items-center justify-between mb-4",
138
- children: [/* @__PURE__ */ b("h3", {
139
- className: "font-semibold text-text-primary flex items-center gap-2",
140
- children: [/* @__PURE__ */ y(m, {
141
- size: 16,
142
- className: "text-primary"
143
- }), D("integrations.connections.filters.panelTitle", "Filters")]
144
- }), Q && /* @__PURE__ */ b("button", {
145
- type: "button",
146
- onClick: $,
147
- className: "text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1",
201
+ children: [
202
+ /* @__PURE__ */ _("div", {
203
+ className: "flex items-center justify-between mb-4",
204
+ children: [/* @__PURE__ */ _("h3", {
205
+ className: "font-semibold text-text-primary flex items-center gap-2",
206
+ children: [/* @__PURE__ */ g(l, {
207
+ size: 16,
208
+ className: "text-primary"
209
+ }), x("integrations.connections.filters.panelTitle", "Filters")]
210
+ }), Q && /* @__PURE__ */ _("button", {
211
+ type: "button",
212
+ onClick: $,
213
+ className: "text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1",
214
+ children: [
215
+ /* @__PURE__ */ g(h, { size: 14 }),
216
+ " ",
217
+ x("integrations.connections.filters.clearAll", "Clear All")
218
+ ]
219
+ })]
220
+ }),
221
+ /* @__PURE__ */ _("div", {
222
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
148
223
  children: [
149
- /* @__PURE__ */ y(_, { size: 14 }),
150
- " ",
151
- D("integrations.connections.filters.clearAll", "Clear All")
152
- ]
153
- })]
154
- }), /* @__PURE__ */ b("div", {
155
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
156
- children: [
157
- /* @__PURE__ */ b("div", {
158
- className: "space-y-2",
159
- children: [/* @__PURE__ */ y("label", {
160
- htmlFor: J,
161
- className: "block text-sm font-medium text-text-primary",
162
- children: D("integrations.connections.filters.statusLabel", "Status")
163
- }), /* @__PURE__ */ b("select", {
164
- id: J,
165
- value: A.status,
166
- onChange: (e) => j({ status: e.target.value }),
167
- className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
168
- children: [/* @__PURE__ */ y("option", {
169
- value: "all",
170
- children: D("integrations.connections.filters.statusAll", "All Statuses")
171
- }), o.map((e) => /* @__PURE__ */ y("option", {
172
- value: e.value,
173
- children: D(`integrations.status.${e.value}`, e.label)
174
- }, e.value))]
175
- })]
176
- }),
177
- /* @__PURE__ */ b("div", {
178
- className: "space-y-2",
179
- children: [/* @__PURE__ */ y("label", {
180
- htmlFor: Y,
181
- className: "block text-sm font-medium text-text-primary",
182
- children: D("integrations.connections.filters.categoryLabel", "Category")
183
- }), /* @__PURE__ */ b("select", {
184
- id: Y,
185
- value: A.category,
186
- onChange: (e) => j({ category: e.target.value }),
187
- className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
188
- children: [/* @__PURE__ */ y("option", {
189
- value: "all",
190
- children: D("integrations.connections.filters.categoryAll", "All Categories")
191
- }), s.map((e) => /* @__PURE__ */ y("option", {
192
- value: e.value,
193
- children: D(`integrations.category.${e.value}`, e.label)
194
- }, e.value))]
195
- })]
196
- }),
197
- ue && /* @__PURE__ */ b("div", {
198
- className: "space-y-2",
199
- children: [/* @__PURE__ */ y("label", {
200
- htmlFor: X,
201
- className: "block text-sm font-medium text-text-primary",
202
- children: D("integrations.connections.filters.accessLabel", "Access")
203
- }), /* @__PURE__ */ b("select", {
204
- id: X,
205
- value: F,
206
- onChange: (e) => I(e.target.value),
207
- className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
208
- "data-testid": "connections-access-filter",
209
- children: [
210
- /* @__PURE__ */ y("option", {
224
+ /* @__PURE__ */ _("div", {
225
+ className: "space-y-2",
226
+ children: [/* @__PURE__ */ g("label", {
227
+ htmlFor: G,
228
+ className: "block text-sm font-medium text-text-primary",
229
+ children: x("integrations.connections.filters.statusLabel", "Status")
230
+ }), b ? /* @__PURE__ */ _("select", {
231
+ id: G,
232
+ value: O,
233
+ onChange: (e) => k(e.target.value),
234
+ "data-testid": "connections-status-group-filter",
235
+ className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
236
+ children: [/* @__PURE__ */ g("option", {
237
+ value: "all",
238
+ children: x("integrations.connections.filters.statusAll", "All Statuses")
239
+ }), se.map((e) => /* @__PURE__ */ g("option", {
240
+ value: e,
241
+ children: x(`integrations.connectedApps.statusGroup.${e}`, ce[e])
242
+ }, e))]
243
+ }) : /* @__PURE__ */ _("select", {
244
+ id: G,
245
+ value: w.status,
246
+ onChange: (e) => T({ status: e.target.value }),
247
+ className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
248
+ children: [/* @__PURE__ */ g("option", {
211
249
  value: "all",
212
- children: D("integrations.connections.filters.accessAll", "All I can see")
213
- }),
214
- /* @__PURE__ */ y("option", {
215
- value: "mine",
216
- children: D("integrations.connections.filters.accessMine", "Owned by me")
217
- }),
218
- /* @__PURE__ */ y("option", {
219
- value: "shared",
220
- children: D("integrations.connections.filters.accessShared", "Shared with me")
221
- })
222
- ]
250
+ children: x("integrations.connections.filters.statusAll", "All Statuses")
251
+ }), de.map((e) => /* @__PURE__ */ g("option", {
252
+ value: e.value,
253
+ children: x(`integrations.status.${e.value}`, e.label)
254
+ }, e.value))]
255
+ })]
256
+ }),
257
+ /* @__PURE__ */ _("div", {
258
+ className: "space-y-2",
259
+ children: [/* @__PURE__ */ g("label", {
260
+ htmlFor: K,
261
+ className: "block text-sm font-medium text-text-primary",
262
+ children: x("integrations.connections.filters.categoryLabel", "Category")
263
+ }), /* @__PURE__ */ _("select", {
264
+ id: K,
265
+ value: w.category,
266
+ onChange: (e) => T({ category: e.target.value }),
267
+ className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
268
+ children: [/* @__PURE__ */ g("option", {
269
+ value: "all",
270
+ children: x("integrations.connections.filters.categoryAll", "All Categories")
271
+ }), fe.map((e) => /* @__PURE__ */ g("option", {
272
+ value: e.value,
273
+ children: x(`integrations.category.${e.value}`, e.label)
274
+ }, e.value))]
275
+ })]
276
+ }),
277
+ Me && /* @__PURE__ */ _("div", {
278
+ className: "space-y-2",
279
+ children: [/* @__PURE__ */ g("label", {
280
+ htmlFor: q,
281
+ className: "block text-sm font-medium text-text-primary",
282
+ children: x("integrations.connections.filters.accessLabel", "Access")
283
+ }), /* @__PURE__ */ _("select", {
284
+ id: q,
285
+ value: P,
286
+ onChange: (e) => F(e.target.value),
287
+ className: "w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
288
+ "data-testid": "connections-access-filter",
289
+ children: [
290
+ /* @__PURE__ */ g("option", {
291
+ value: "all",
292
+ children: x("integrations.connections.filters.accessAll", "All I can see")
293
+ }),
294
+ /* @__PURE__ */ g("option", {
295
+ value: "mine",
296
+ children: x("integrations.connections.filters.accessMine", "Owned by me")
297
+ }),
298
+ /* @__PURE__ */ g("option", {
299
+ value: "shared",
300
+ children: x("integrations.connections.filters.accessShared", "Shared with me")
301
+ })
302
+ ]
303
+ })]
304
+ })
305
+ ]
306
+ }),
307
+ b && /* @__PURE__ */ _("div", {
308
+ className: "mt-4 flex items-center gap-3",
309
+ children: [/* @__PURE__ */ g("span", {
310
+ className: "text-sm font-medium text-text-primary",
311
+ children: x("integrations.connectedApps.view", "View")
312
+ }), /* @__PURE__ */ _("div", {
313
+ className: "flex items-center border border-border-subtle rounded-lg overflow-hidden",
314
+ children: [/* @__PURE__ */ g("button", {
315
+ type: "button",
316
+ onClick: () => C("grid"),
317
+ "aria-pressed": S === "grid",
318
+ className: e("p-2.5 transition-colors", S === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
319
+ "aria-label": x("integrations.connections.view.gridAriaLabel", "Grid view"),
320
+ children: /* @__PURE__ */ g(u, { size: 16 })
321
+ }), /* @__PURE__ */ g("button", {
322
+ type: "button",
323
+ onClick: () => C("list"),
324
+ "aria-pressed": S === "list",
325
+ className: e("p-2.5 transition-colors", S === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
326
+ "aria-label": x("integrations.connections.view.listAriaLabel", "List view"),
327
+ children: /* @__PURE__ */ g(f, { size: 16 })
223
328
  })]
224
- })
225
- ]
226
- })]
329
+ })]
330
+ })
331
+ ]
227
332
  })]
228
333
  }),
229
- B && /* @__PURE__ */ b("div", {
334
+ R && /* @__PURE__ */ _("div", {
230
335
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4",
231
- children: [/* @__PURE__ */ y(f, {
336
+ children: [/* @__PURE__ */ g(he, {
232
337
  size: 24,
233
338
  className: "text-status-error-text flex-shrink-0"
234
- }), /* @__PURE__ */ b("div", {
339
+ }), /* @__PURE__ */ _("div", {
235
340
  className: "flex-1",
236
341
  children: [
237
- /* @__PURE__ */ y("h3", {
342
+ /* @__PURE__ */ g("h3", {
238
343
  className: "font-semibold text-status-error-text mb-1",
239
- children: D("integrations.connections.error.title", "Error loading connections")
344
+ children: x("integrations.connections.error.title", "Error loading connections")
240
345
  }),
241
- /* @__PURE__ */ y("p", {
346
+ /* @__PURE__ */ g("p", {
242
347
  className: "text-sm text-status-error-text mb-3",
243
- children: B.message
348
+ children: R.message
244
349
  }),
245
- /* @__PURE__ */ b("button", {
350
+ /* @__PURE__ */ _("button", {
246
351
  type: "button",
247
- onClick: () => V(),
352
+ onClick: () => z(),
248
353
  className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
249
354
  children: [
250
- /* @__PURE__ */ y(ae, { size: 14 }),
355
+ /* @__PURE__ */ g(m, { size: 14 }),
251
356
  " ",
252
- D("integrations.common.retry", "Try Again")
357
+ x("integrations.common.retry", "Try Again")
253
358
  ]
254
359
  })
255
360
  ]
256
361
  })]
257
362
  }),
258
- (R || H) && /* @__PURE__ */ y("div", {
259
- className: e(O === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
363
+ (L || B) && /* @__PURE__ */ g("div", {
364
+ className: e(S === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
260
365
  children: [...[
261
366
  ,
262
367
  ,
@@ -264,86 +369,114 @@ function T() {
264
369
  ,
265
370
  ,
266
371
  ,
267
- ]].map((e, t) => /* @__PURE__ */ y("div", {
372
+ ]].map((e, t) => /* @__PURE__ */ g("div", {
268
373
  className: "rounded-xl border border-border-seam bg-bg-surface p-5",
269
- children: /* @__PURE__ */ b("div", {
374
+ children: /* @__PURE__ */ _("div", {
270
375
  className: "flex items-start gap-3",
271
- children: [/* @__PURE__ */ y("div", { className: "size-11 bg-bg-sunken rounded-xl animate-vc-shimmer" }), /* @__PURE__ */ b("div", {
376
+ children: [/* @__PURE__ */ g("div", { className: "size-11 bg-bg-sunken rounded-xl animate-vc-shimmer" }), /* @__PURE__ */ _("div", {
272
377
  className: "flex-1 space-y-2",
273
- children: [/* @__PURE__ */ y("div", { className: "h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer" }), /* @__PURE__ */ y("div", { className: "h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer" })]
378
+ children: [/* @__PURE__ */ g("div", { className: "h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer" }), /* @__PURE__ */ g("div", { className: "h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer" })]
274
379
  })]
275
380
  })
276
381
  }, t))
277
382
  }),
278
- !R && !B && !H && /* @__PURE__ */ b(S, {
383
+ !L && !R && !B && /* @__PURE__ */ _(be, {
279
384
  className: "overflow-hidden p-0",
280
- children: [/* @__PURE__ */ b("div", {
281
- className: "flex items-center justify-between gap-2 p-5 border-b border-border-seam",
282
- children: [/* @__PURE__ */ b("div", {
283
- className: "flex items-center gap-2",
284
- children: [/* @__PURE__ */ y(h, {
285
- size: 18,
286
- className: "text-primary"
287
- }), /* @__PURE__ */ b("h2", {
288
- className: "font-semibold text-text-primary",
289
- children: [D("integrations.connections.results.title", "Your Connections"), Z.length > 0 && /* @__PURE__ */ b("span", {
290
- className: "ml-2 text-sm font-normal text-text-secondary tabular-nums",
385
+ children: [
386
+ /* @__PURE__ */ _("div", {
387
+ className: "flex items-center justify-between gap-2 p-5 border-b border-border-seam",
388
+ children: [
389
+ /* @__PURE__ */ _("div", {
390
+ className: "flex items-center gap-2",
391
+ children: [/* @__PURE__ */ g(d, {
392
+ size: 18,
393
+ className: "text-primary"
394
+ }), /* @__PURE__ */ _("h2", {
395
+ className: "font-semibold text-text-primary",
396
+ children: [x("integrations.connections.results.title", "Your Connections"), J.length > 0 && /* @__PURE__ */ _("span", {
397
+ className: "ml-2 text-sm font-normal text-text-secondary tabular-nums",
398
+ children: [
399
+ "(",
400
+ J.length,
401
+ ")"
402
+ ]
403
+ })]
404
+ })]
405
+ }),
406
+ b && X > 0 && O !== "unfinished" && /* @__PURE__ */ g(v, {
407
+ size: "sm",
408
+ variant: "ghost",
409
+ "data-testid": "connections-show-unfinished",
410
+ "aria-pressed": A,
411
+ onClick: () => Oe(!A),
412
+ children: A ? x("integrations.connectedApps.hideUnfinished", "Hide unfinished") : x("integrations.connectedApps.showUnfinished", "Show unfinished ({{count}})", { count: X })
413
+ }),
414
+ V && J.length > 0 && !b && /* @__PURE__ */ _(v, {
415
+ size: "sm",
416
+ variant: "outline",
417
+ onClick: () => D(),
291
418
  children: [
292
- "(",
293
- Z.length,
294
- ")"
419
+ /* @__PURE__ */ g(p, { size: 14 }),
420
+ " ",
421
+ x("integrations.connections.actions.add", "Add")
295
422
  ]
296
- })]
297
- })]
298
- }), G && Z.length > 0 && /* @__PURE__ */ b(x, {
299
- size: "sm",
300
- variant: "outline",
301
- onClick: () => N(),
302
- children: [
303
- /* @__PURE__ */ y(g, { size: 14 }),
304
- " ",
305
- D("integrations.connections.actions.add", "Add")
306
- ]
307
- })]
308
- }), Z.length > 0 ? /* @__PURE__ */ y("div", {
309
- className: e("p-5", O === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
310
- children: Z.map((e) => /* @__PURE__ */ y(a, {
311
- connection: e,
312
- displayMode: O,
313
- onClick: de
314
- }, e.id))
315
- }) : /* @__PURE__ */ y(C, {
316
- illustration: Q ? "empty-search" : "empty-data",
317
- title: Q ? D("integrations.connections.empty.filteredTitle", "No matching connections") : D("integrations.connections.empty.title", "No connections yet"),
318
- description: Q ? D("integrations.connections.empty.filteredDescription", "Try adjusting your search or filters.") : G ? D("integrations.connections.empty.description", "Add a connection to start integrating with external services.") : D("integrations.connections.empty.readOnlyDescription", "No connections are configured yet. Contact your workspace admin to add one."),
319
- action: Q ? /* @__PURE__ */ b(x, {
320
- variant: "outline",
321
- onClick: $,
322
- children: [
323
- /* @__PURE__ */ y(_, { size: 14 }),
324
- " ",
325
- D("integrations.connections.empty.clearFilters", "Clear Filters")
326
- ]
327
- }) : G ? /* @__PURE__ */ b(x, {
328
- onClick: () => N(),
329
- children: [
330
- /* @__PURE__ */ y(g, { size: 14 }),
331
- " ",
332
- D("integrations.connections.actions.addConnection", "Add Connection")
423
+ })
333
424
  ]
334
- }) : void 0
335
- })]
425
+ }),
426
+ J.length > 0 ? /* @__PURE__ */ g("div", {
427
+ className: e("p-5", S === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
428
+ children: J.map((e) => /* @__PURE__ */ g(ie, {
429
+ connection: e,
430
+ displayMode: S,
431
+ onClick: Pe,
432
+ action: Ne(e)
433
+ }, e.id))
434
+ }) : /* @__PURE__ */ g(xe, {
435
+ illustration: Q ? "empty-search" : "empty-data",
436
+ title: Q ? x("integrations.connections.empty.filteredTitle", "No matching connections") : x("integrations.connections.empty.title", "No connections yet"),
437
+ description: Q ? x("integrations.connections.empty.filteredDescription", "Try adjusting your search or filters.") : V ? x("integrations.connections.empty.description", "Add a connection to start integrating with external services.") : x("integrations.connections.empty.readOnlyDescription", "No connections are configured yet. Contact your workspace admin to add one."),
438
+ action: Q ? /* @__PURE__ */ _(v, {
439
+ variant: "outline",
440
+ onClick: $,
441
+ children: [
442
+ /* @__PURE__ */ g(h, { size: 14 }),
443
+ " ",
444
+ x("integrations.connections.empty.clearFilters", "Clear Filters")
445
+ ]
446
+ }) : V ? /* @__PURE__ */ _(v, {
447
+ onClick: () => D(),
448
+ children: [
449
+ /* @__PURE__ */ g(p, { size: 14 }),
450
+ " ",
451
+ x("integrations.connections.actions.addConnection", "Add Connection")
452
+ ]
453
+ }) : void 0
454
+ }),
455
+ b && V && !Q && (I ?? []).length === 0 && /* @__PURE__ */ g("div", {
456
+ className: "border-t border-border-seam p-5",
457
+ children: /* @__PURE__ */ g(oe, { onPick: (e) => D(e.id) })
458
+ })
459
+ ]
460
+ }),
461
+ /* @__PURE__ */ g(r, {
462
+ open: Ee,
463
+ onClose: De,
464
+ preselectedProviderId: b ? E : void 0,
465
+ onConnectionCreated: () => {
466
+ z();
467
+ }
336
468
  }),
337
- /* @__PURE__ */ y(ne, {
338
- open: M,
339
- onClose: P,
469
+ b && /* @__PURE__ */ g(r, {
470
+ open: j !== null,
471
+ onClose: () => M(null),
472
+ reconnect: j,
340
473
  onConnectionCreated: () => {
341
- V();
474
+ z();
342
475
  }
343
476
  })
344
477
  ]
345
478
  });
346
479
  }
347
- export { T as ConnectionsList };
480
+ export { y as ConnectionsList };
348
481
 
349
482
  //# sourceMappingURL=ConnectionsList.js.map