@burdenoff/microfe-integrations 2026.1013.2 → 2026.1030.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/generated/wspace-operations.d.ts +18 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +6 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +122 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +8 -0
- package/dist/generated/wspace-types.js.map +1 -0
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +11 -9
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.d.ts.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +71 -48
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ConnectionSharing.d.ts +18 -0
- package/dist/integrations/components/ConnectionSharing.d.ts.map +1 -0
- package/dist/integrations/components/ConnectionSharing.js +33 -0
- package/dist/integrations/components/ConnectionSharing.js.map +1 -0
- package/dist/integrations/constants/permissions.d.ts +1 -0
- package/dist/integrations/constants/permissions.d.ts.map +1 -1
- package/dist/integrations/constants/permissions.js +1 -0
- package/dist/integrations/constants/permissions.js.map +1 -1
- package/dist/integrations/hooks/useConnections.d.ts +3 -0
- package/dist/integrations/hooks/useConnections.d.ts.map +1 -1
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +283 -261
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +196 -158
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.d.ts.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js +20 -18
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/types/index.d.ts +26 -0
- package/dist/integrations/types/index.d.ts.map +1 -1
- package/dist/integrations/utils/mappers.d.ts +3 -1
- package/dist/integrations/utils/mappers.d.ts.map +1 -1
- package/dist/integrations/utils/mappers.js +16 -3
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,224 +1,262 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
-
import { INTEGRATION_PERMISSIONS as
|
|
4
|
-
import { AddConnectionDialog as
|
|
5
|
-
import { joinPath as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { useIntegrationsStore as
|
|
8
|
-
import { CONNECTION_STATUS_OPTIONS as
|
|
9
|
-
import { useConnections as
|
|
10
|
-
import { ConnectionCard as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
3
|
+
import { INTEGRATION_PERMISSIONS as ee } from "../constants/permissions.js";
|
|
4
|
+
import { AddConnectionDialog as n } from "../components/AddConnectionDialog.js";
|
|
5
|
+
import { joinPath as te } from "../utils/navigation.js";
|
|
6
|
+
import { cn as r } from "../utils/cn.js";
|
|
7
|
+
import { useIntegrationsStore as i } from "../store/integrationsStore.js";
|
|
8
|
+
import { CONNECTION_STATUS_OPTIONS as a, PROVIDER_CATEGORIES as o } from "../utils/constants.js";
|
|
9
|
+
import { useConnections as ne } from "../hooks/useConnections.js";
|
|
10
|
+
import { ConnectionCard as re } from "../components/ConnectionCard.js";
|
|
11
|
+
import { ConnectionAccessFilter as s } from "../../generated/wspace-types.js";
|
|
12
|
+
import { useId as c, useMemo as l, useState as u } from "react";
|
|
13
|
+
import { AlertCircle as d, ArrowLeft as f, Filter as p, Grid3x3 as m, Link2 as h, List as ie, Plus as g, RefreshCw as _, Search as ae, X as v } from "lucide-react";
|
|
14
|
+
import { usePermissions as oe } 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";
|
|
16
17
|
//#region src/integrations/pages/ConnectionsList.tsx
|
|
18
|
+
var T = {
|
|
19
|
+
mine: s.OwnedByMe,
|
|
20
|
+
shared: s.SharedWithMe
|
|
21
|
+
};
|
|
17
22
|
function E() {
|
|
18
|
-
let { basePath:
|
|
23
|
+
let { basePath: s = "/", navigate: E, onConnectionSelect: se, connectionsDocsUrl: ce } = e(), D = t(), { viewMode: O, setViewMode: k, connectionFilter: A, updateConnectionFilter: j, addConnectionDialogOpen: M, openAddConnectionDialog: N, closeAddConnectionDialog: P } = i(), [F, I] = u("all"), { connections: L, loading: R, answered: z, error: B, refetch: V } = ne(F === "all" ? void 0 : { access: T[F] }), H = !R && !B && !z, { hasPermission: U, isLoading: W } = oe(), G = !W && U(ee.CONNECTION_CREATE), [K, le] = u(!1), q = c(), J = `${q}-status`, Y = `${q}-category`, X = `${q}-access`, ue = F !== "all" || (L ?? []).some((e) => e.myAccess !== void 0), Z = l(() => {
|
|
19
24
|
let e = L ?? [];
|
|
20
|
-
if (
|
|
21
|
-
let t =
|
|
25
|
+
if (A.search) {
|
|
26
|
+
let t = A.search.toLowerCase();
|
|
22
27
|
e = e.filter((e) => e.name.toLowerCase().includes(t) || e.provider.name.toLowerCase().includes(t) || (e.externalAccountEmail?.toLowerCase().includes(t) ?? !1));
|
|
23
28
|
}
|
|
24
|
-
return
|
|
25
|
-
}, [L,
|
|
26
|
-
|
|
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({
|
|
27
32
|
search: "",
|
|
28
33
|
status: "all",
|
|
29
34
|
providerId: null,
|
|
30
35
|
category: "all"
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
|
|
36
|
+
}), I("all");
|
|
37
|
+
}, de = (e) => {
|
|
38
|
+
se?.(e), E?.(te(s, `connections/${e.id}`));
|
|
34
39
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ b("div", {
|
|
36
41
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
37
42
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ y("div", {
|
|
39
44
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
40
45
|
"data-tour": "integrations-connections-header",
|
|
41
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ b("div", {
|
|
42
47
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ b("div", {
|
|
44
49
|
className: "flex min-w-0 items-center gap-4",
|
|
45
50
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ y(x, {
|
|
47
52
|
variant: "ghost",
|
|
48
53
|
size: "icon",
|
|
49
54
|
className: "shrink-0",
|
|
50
|
-
onClick: () =>
|
|
51
|
-
"aria-label":
|
|
52
|
-
children: /* @__PURE__ */
|
|
55
|
+
onClick: () => E?.(s),
|
|
56
|
+
"aria-label": D("integrations.connections.actions.backAriaLabel", "Back to overview"),
|
|
57
|
+
children: /* @__PURE__ */ y(f, { size: 20 })
|
|
53
58
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ y("div", {
|
|
55
60
|
className: "shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
56
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ y(h, {
|
|
57
62
|
size: 24,
|
|
58
63
|
className: "text-primary"
|
|
59
64
|
})
|
|
60
65
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ b("div", {
|
|
62
67
|
className: "min-w-0",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ y("h1", {
|
|
64
69
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
65
|
-
children:
|
|
66
|
-
}), /* @__PURE__ */
|
|
70
|
+
children: D("integrations.connections.title", "Connections")
|
|
71
|
+
}), /* @__PURE__ */ y("p", {
|
|
67
72
|
className: "text-sm text-text-secondary mt-0.5",
|
|
68
|
-
children:
|
|
73
|
+
children: D("integrations.connections.subtitle", "Manage your integration connections")
|
|
69
74
|
})]
|
|
70
75
|
})
|
|
71
76
|
]
|
|
72
|
-
}), G && /* @__PURE__ */
|
|
77
|
+
}), G && /* @__PURE__ */ b(x, {
|
|
73
78
|
className: "shrink-0",
|
|
74
|
-
onClick: () =>
|
|
75
|
-
children: [/* @__PURE__ */
|
|
79
|
+
onClick: () => N(),
|
|
80
|
+
children: [/* @__PURE__ */ y(g, { size: 16 }), D("integrations.connections.actions.addConnection", "Add Connection")]
|
|
76
81
|
})]
|
|
77
82
|
})
|
|
78
83
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
icon: /* @__PURE__ */
|
|
81
|
-
|
|
84
|
+
/* @__PURE__ */ y(w, {
|
|
85
|
+
icon: /* @__PURE__ */ y(h, { size: 16 }),
|
|
86
|
+
learnMoreHref: ce,
|
|
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.")
|
|
82
89
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ b("div", {
|
|
84
91
|
className: "space-y-4",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ b("div", {
|
|
86
93
|
className: "flex flex-col sm:flex-row gap-3",
|
|
87
94
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ b("div", {
|
|
89
96
|
className: "flex-1 relative group",
|
|
90
97
|
"data-tour": "integrations-connections-search",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ y(ae, {
|
|
92
99
|
size: 18,
|
|
93
100
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
94
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ y("input", {
|
|
95
102
|
type: "text",
|
|
96
|
-
placeholder:
|
|
97
|
-
value:
|
|
98
|
-
onChange: (e) =>
|
|
103
|
+
placeholder: D("integrations.connections.search.placeholder", "Search connections..."),
|
|
104
|
+
value: A.search,
|
|
105
|
+
onChange: (e) => j({ search: e.target.value }),
|
|
99
106
|
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",
|
|
100
|
-
"aria-label":
|
|
107
|
+
"aria-label": D("integrations.connections.search.ariaLabel", "Search connections")
|
|
101
108
|
})]
|
|
102
109
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ b("button", {
|
|
104
111
|
type: "button",
|
|
105
|
-
onClick: () =>
|
|
106
|
-
className:
|
|
107
|
-
children: [/* @__PURE__ */
|
|
112
|
+
onClick: () => le(!K),
|
|
113
|
+
className: r("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(p, { size: 16 }), K ? D("integrations.connections.filters.hide", "Hide") : D("integrations.connections.filters.show", "Filter")]
|
|
108
115
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ b("div", {
|
|
110
117
|
className: "flex items-center border border-border-subtle rounded-lg overflow-hidden",
|
|
111
118
|
"data-tour": "integrations-connections-view-toggle",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ y("button", {
|
|
113
120
|
type: "button",
|
|
114
|
-
onClick: () =>
|
|
115
|
-
className:
|
|
116
|
-
"aria-label":
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
}), /* @__PURE__ */
|
|
121
|
+
onClick: () => k("grid"),
|
|
122
|
+
className: r("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(m, { size: 16 })
|
|
125
|
+
}), /* @__PURE__ */ y("button", {
|
|
119
126
|
type: "button",
|
|
120
|
-
onClick: () =>
|
|
121
|
-
className:
|
|
122
|
-
"aria-label":
|
|
123
|
-
children: /* @__PURE__ */
|
|
127
|
+
onClick: () => k("list"),
|
|
128
|
+
className: r("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 })
|
|
124
131
|
})]
|
|
125
132
|
})
|
|
126
133
|
]
|
|
127
|
-
}), K && /* @__PURE__ */
|
|
134
|
+
}), K && /* @__PURE__ */ b("div", {
|
|
128
135
|
className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ b("div", {
|
|
130
137
|
className: "flex items-center justify-between mb-4",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
132
139
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ y(p, {
|
|
134
141
|
size: 16,
|
|
135
142
|
className: "text-primary"
|
|
136
|
-
}),
|
|
137
|
-
}), Q && /* @__PURE__ */
|
|
143
|
+
}), D("integrations.connections.filters.panelTitle", "Filters")]
|
|
144
|
+
}), Q && /* @__PURE__ */ b("button", {
|
|
138
145
|
type: "button",
|
|
139
146
|
onClick: $,
|
|
140
147
|
className: "text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1",
|
|
141
148
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ y(v, { size: 14 }),
|
|
143
150
|
" ",
|
|
144
|
-
|
|
151
|
+
D("integrations.connections.filters.clearAll", "Clear All")
|
|
145
152
|
]
|
|
146
153
|
})]
|
|
147
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ b("div", {
|
|
148
155
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
149
|
-
children: [
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
children:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
+
}), a.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
|
+
}), o.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", {
|
|
211
|
+
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
|
+
]
|
|
223
|
+
})]
|
|
224
|
+
})
|
|
225
|
+
]
|
|
188
226
|
})]
|
|
189
227
|
})]
|
|
190
228
|
}),
|
|
191
|
-
B && /* @__PURE__ */
|
|
229
|
+
B && /* @__PURE__ */ b("div", {
|
|
192
230
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ y(d, {
|
|
194
232
|
size: 24,
|
|
195
233
|
className: "text-status-error-text flex-shrink-0"
|
|
196
|
-
}), /* @__PURE__ */
|
|
234
|
+
}), /* @__PURE__ */ b("div", {
|
|
197
235
|
className: "flex-1",
|
|
198
236
|
children: [
|
|
199
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ y("h3", {
|
|
200
238
|
className: "font-semibold text-status-error-text mb-1",
|
|
201
|
-
children:
|
|
239
|
+
children: D("integrations.connections.error.title", "Error loading connections")
|
|
202
240
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ y("p", {
|
|
204
242
|
className: "text-sm text-status-error-text mb-3",
|
|
205
243
|
children: B.message
|
|
206
244
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ b("button", {
|
|
208
246
|
type: "button",
|
|
209
247
|
onClick: () => V(),
|
|
210
248
|
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",
|
|
211
249
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ y(_, { size: 14 }),
|
|
213
251
|
" ",
|
|
214
|
-
|
|
252
|
+
D("integrations.common.retry", "Try Again")
|
|
215
253
|
]
|
|
216
254
|
})
|
|
217
255
|
]
|
|
218
256
|
})]
|
|
219
257
|
}),
|
|
220
|
-
(R || H) && /* @__PURE__ */
|
|
221
|
-
className:
|
|
258
|
+
(R || H) && /* @__PURE__ */ y("div", {
|
|
259
|
+
className: r(O === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
222
260
|
children: [...[
|
|
223
261
|
,
|
|
224
262
|
,
|
|
@@ -226,29 +264,29 @@ function E() {
|
|
|
226
264
|
,
|
|
227
265
|
,
|
|
228
266
|
,
|
|
229
|
-
]].map((e, t) => /* @__PURE__ */
|
|
267
|
+
]].map((e, t) => /* @__PURE__ */ y("div", {
|
|
230
268
|
className: "rounded-xl border border-border-seam bg-bg-surface p-5",
|
|
231
|
-
children: /* @__PURE__ */
|
|
269
|
+
children: /* @__PURE__ */ b("div", {
|
|
232
270
|
className: "flex items-start gap-3",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ y("div", { className: "size-11 bg-bg-sunken rounded-xl animate-vc-shimmer" }), /* @__PURE__ */ b("div", {
|
|
234
272
|
className: "flex-1 space-y-2",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
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" })]
|
|
236
274
|
})]
|
|
237
275
|
})
|
|
238
276
|
}, t))
|
|
239
277
|
}),
|
|
240
|
-
!R && !B && !H && /* @__PURE__ */
|
|
278
|
+
!R && !B && !H && /* @__PURE__ */ b(S, {
|
|
241
279
|
className: "overflow-hidden p-0",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ b("div", {
|
|
243
281
|
className: "flex items-center justify-between gap-2 p-5 border-b border-border-seam",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ b("div", {
|
|
245
283
|
className: "flex items-center gap-2",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ y(h, {
|
|
247
285
|
size: 18,
|
|
248
286
|
className: "text-primary"
|
|
249
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ b("h2", {
|
|
250
288
|
className: "font-semibold text-text-primary",
|
|
251
|
-
children: [
|
|
289
|
+
children: [D("integrations.connections.results.title", "Your Connections"), Z.length > 0 && /* @__PURE__ */ b("span", {
|
|
252
290
|
className: "ml-2 text-sm font-normal text-text-secondary tabular-nums",
|
|
253
291
|
children: [
|
|
254
292
|
"(",
|
|
@@ -257,48 +295,48 @@ function E() {
|
|
|
257
295
|
]
|
|
258
296
|
})]
|
|
259
297
|
})]
|
|
260
|
-
}), G && Z.length > 0 && /* @__PURE__ */
|
|
298
|
+
}), G && Z.length > 0 && /* @__PURE__ */ b(x, {
|
|
261
299
|
size: "sm",
|
|
262
300
|
variant: "outline",
|
|
263
|
-
onClick: () =>
|
|
301
|
+
onClick: () => N(),
|
|
264
302
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ y(g, { size: 14 }),
|
|
266
304
|
" ",
|
|
267
|
-
|
|
305
|
+
D("integrations.connections.actions.add", "Add")
|
|
268
306
|
]
|
|
269
307
|
})]
|
|
270
|
-
}), Z.length > 0 ? /* @__PURE__ */
|
|
271
|
-
className:
|
|
272
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
308
|
+
}), Z.length > 0 ? /* @__PURE__ */ y("div", {
|
|
309
|
+
className: r("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(re, {
|
|
273
311
|
connection: e,
|
|
274
|
-
displayMode:
|
|
275
|
-
onClick:
|
|
312
|
+
displayMode: O,
|
|
313
|
+
onClick: de
|
|
276
314
|
}, e.id))
|
|
277
|
-
}) : /* @__PURE__ */ C
|
|
315
|
+
}) : /* @__PURE__ */ y(C, {
|
|
278
316
|
illustration: Q ? "empty-search" : "empty-data",
|
|
279
|
-
title: Q ?
|
|
280
|
-
description: Q ?
|
|
281
|
-
action: Q ? /* @__PURE__ */
|
|
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, {
|
|
282
320
|
variant: "outline",
|
|
283
321
|
onClick: $,
|
|
284
322
|
children: [
|
|
285
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ y(v, { size: 14 }),
|
|
286
324
|
" ",
|
|
287
|
-
|
|
325
|
+
D("integrations.connections.empty.clearFilters", "Clear Filters")
|
|
288
326
|
]
|
|
289
|
-
}) : G ? /* @__PURE__ */
|
|
290
|
-
onClick: () =>
|
|
327
|
+
}) : G ? /* @__PURE__ */ b(x, {
|
|
328
|
+
onClick: () => N(),
|
|
291
329
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ y(g, { size: 14 }),
|
|
293
331
|
" ",
|
|
294
|
-
|
|
332
|
+
D("integrations.connections.actions.addConnection", "Add Connection")
|
|
295
333
|
]
|
|
296
334
|
}) : void 0
|
|
297
335
|
})]
|
|
298
336
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
open:
|
|
301
|
-
onClose:
|
|
337
|
+
/* @__PURE__ */ y(n, {
|
|
338
|
+
open: M,
|
|
339
|
+
onClose: P,
|
|
302
340
|
onConnectionCreated: () => {
|
|
303
341
|
V();
|
|
304
342
|
}
|