@burdenoff/microfe-integrations 2026.624.3 → 2026.625.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/integrations/components/AddConnectionDialog.js +2 -2
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +27 -26
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +67 -66
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +268 -283
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +241 -245
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +118 -119
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +68 -70
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +67 -67
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +71 -71
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +46 -46
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +214 -215
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +152 -154
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,31 +6,32 @@ import { useState as a } from "react";
|
|
|
6
6
|
import { ArrowLeft as o, Check as s, CheckCircle2 as c, Clock as l, Copy as u, Globe as d, Loader2 as f, Save as p, Settings as m, Shield as h } from "lucide-react";
|
|
7
7
|
import { useI18n as g, usePermissions as _ } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
8
8
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
+
import { Button as b, EmphasisPanel as x, GlassCard as S } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/integrations/pages/IntegrationsSettings.tsx
|
|
10
|
-
function
|
|
11
|
-
let { basePath:
|
|
12
|
-
let r =
|
|
11
|
+
function C() {
|
|
12
|
+
let { basePath: C = "/", navigate: w, apiGatewayUrl: T } = e(), { t: E } = g(), D = (e, t, n) => {
|
|
13
|
+
let r = E(e, n);
|
|
13
14
|
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), t) : t : r;
|
|
14
|
-
}, { hasPermission:
|
|
15
|
-
return
|
|
15
|
+
}, { hasPermission: O, isLoading: k } = _(), A = O(n.INTEGRATION_WRITE), [j, M] = a(30), [N, P] = a(60), [F, I] = a(!0), [L, R] = a(!1), [z, B] = a(!1), [V, H] = a(!1), U = T ? `${T}/integrations/oauth/callback` : `${typeof window < "u" ? window.location.origin : ""}/integrations/oauth/callback`;
|
|
16
|
+
return k ? /* @__PURE__ */ v("div", {
|
|
16
17
|
className: "flex items-center justify-center py-20",
|
|
17
18
|
children: /* @__PURE__ */ v(f, {
|
|
18
19
|
size: 48,
|
|
19
20
|
className: "animate-spin text-primary"
|
|
20
21
|
})
|
|
21
|
-
}) :
|
|
22
|
+
}) : A ? /* @__PURE__ */ y("div", {
|
|
22
23
|
className: "space-y-6 p-6 max-w-4xl mx-auto",
|
|
23
24
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
className: "
|
|
26
|
-
children:
|
|
27
|
-
className: "
|
|
25
|
+
/* @__PURE__ */ v("div", {
|
|
26
|
+
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
27
|
+
children: /* @__PURE__ */ y("div", {
|
|
28
|
+
className: "flex items-center gap-4",
|
|
28
29
|
children: [
|
|
29
|
-
/* @__PURE__ */ v(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"aria-label":
|
|
30
|
+
/* @__PURE__ */ v(b, {
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
size: "icon",
|
|
33
|
+
onClick: () => w?.(C),
|
|
34
|
+
"aria-label": D("integrations.settings.actions.backAriaLabel", "Back"),
|
|
34
35
|
children: /* @__PURE__ */ v(o, { size: 20 })
|
|
35
36
|
}),
|
|
36
37
|
/* @__PURE__ */ v("div", {
|
|
@@ -42,50 +43,51 @@ function b() {
|
|
|
42
43
|
}),
|
|
43
44
|
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
|
|
44
45
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
45
|
-
children:
|
|
46
|
+
children: D("integrations.settings.title", "Integrations Settings")
|
|
46
47
|
}), /* @__PURE__ */ v("p", {
|
|
47
48
|
className: "text-sm text-text-secondary mt-0.5",
|
|
48
|
-
children:
|
|
49
|
+
children: D("integrations.settings.subtitle", "Configure integration module behavior")
|
|
49
50
|
})] })
|
|
50
51
|
]
|
|
51
|
-
})
|
|
52
|
+
})
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */ y(
|
|
54
|
-
className: "
|
|
54
|
+
/* @__PURE__ */ y(x, {
|
|
55
|
+
className: "space-y-4",
|
|
55
56
|
children: [/* @__PURE__ */ y("h2", {
|
|
56
57
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
57
58
|
children: [/* @__PURE__ */ v(d, {
|
|
58
59
|
size: 18,
|
|
59
60
|
className: "text-primary"
|
|
60
|
-
}),
|
|
61
|
+
}), D("integrations.settings.oauth.title", "OAuth Configuration")]
|
|
61
62
|
}), /* @__PURE__ */ y("div", {
|
|
62
63
|
className: "space-y-2",
|
|
63
64
|
children: [
|
|
64
65
|
/* @__PURE__ */ v("label", {
|
|
65
66
|
className: "block text-sm font-medium text-text-primary",
|
|
66
|
-
children:
|
|
67
|
+
children: D("integrations.settings.oauth.redirectUriLabel", "Default OAuth Redirect URI")
|
|
67
68
|
}),
|
|
68
69
|
/* @__PURE__ */ v("p", {
|
|
69
70
|
className: "text-xs text-text-secondary mb-2",
|
|
70
|
-
children:
|
|
71
|
+
children: D("integrations.settings.oauth.redirectUriDescription", "Use this URL as the redirect/callback URI when configuring OAuth applications with providers.")
|
|
71
72
|
}),
|
|
72
73
|
/* @__PURE__ */ y("div", {
|
|
73
74
|
className: "flex items-center gap-2",
|
|
74
75
|
children: [/* @__PURE__ */ v("div", {
|
|
75
|
-
className: "flex-1 px-4 py-2.5 border border-border-
|
|
76
|
-
children:
|
|
77
|
-
}), /* @__PURE__ */ v(
|
|
78
|
-
|
|
76
|
+
className: "flex-1 px-4 py-2.5 border border-border-seam rounded-lg bg-bg-sunken/30 font-mono text-sm text-text-primary break-all",
|
|
77
|
+
children: U
|
|
78
|
+
}), /* @__PURE__ */ v(b, {
|
|
79
|
+
variant: "outline",
|
|
80
|
+
size: "icon",
|
|
79
81
|
onClick: async () => {
|
|
80
|
-
if (i("light"), !await r(
|
|
82
|
+
if (i("light"), !await r(U)) {
|
|
81
83
|
let e = document.createElement("input");
|
|
82
|
-
e.value =
|
|
84
|
+
e.value = U, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
83
85
|
}
|
|
84
|
-
|
|
86
|
+
H(!0), setTimeout(() => H(!1), 2e3);
|
|
85
87
|
},
|
|
86
|
-
className: "
|
|
87
|
-
"aria-label":
|
|
88
|
-
children:
|
|
88
|
+
className: "flex-shrink-0",
|
|
89
|
+
"aria-label": D("integrations.settings.oauth.copyAriaLabel", "Copy redirect URI"),
|
|
90
|
+
children: V ? /* @__PURE__ */ v(s, {
|
|
89
91
|
size: 16,
|
|
90
92
|
className: "text-status-success-text"
|
|
91
93
|
}) : /* @__PURE__ */ v(u, { size: 16 })
|
|
@@ -94,67 +96,67 @@ function b() {
|
|
|
94
96
|
]
|
|
95
97
|
})]
|
|
96
98
|
}),
|
|
97
|
-
/* @__PURE__ */ y(
|
|
98
|
-
className: "
|
|
99
|
+
/* @__PURE__ */ y(S, {
|
|
100
|
+
className: "border-border-seam p-5 space-y-4",
|
|
99
101
|
children: [/* @__PURE__ */ y("h2", {
|
|
100
102
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
101
103
|
children: [/* @__PURE__ */ v(l, {
|
|
102
104
|
size: 18,
|
|
103
105
|
className: "text-primary"
|
|
104
|
-
}),
|
|
106
|
+
}), D("integrations.settings.connection.title", "Connection Settings")]
|
|
105
107
|
}), /* @__PURE__ */ y("div", {
|
|
106
108
|
className: "space-y-4",
|
|
107
109
|
children: [/* @__PURE__ */ y("div", { children: [
|
|
108
110
|
/* @__PURE__ */ v("label", {
|
|
109
111
|
htmlFor: "conn-timeout",
|
|
110
112
|
className: "block text-sm font-semibold mb-2",
|
|
111
|
-
children:
|
|
113
|
+
children: D("integrations.settings.connection.timeoutLabel", "Connection Timeout (seconds)")
|
|
112
114
|
}),
|
|
113
115
|
/* @__PURE__ */ v("p", {
|
|
114
116
|
className: "text-xs text-text-secondary mb-2",
|
|
115
|
-
children:
|
|
117
|
+
children: D("integrations.settings.connection.timeoutDescription", "Maximum time to wait when testing or using a connection.")
|
|
116
118
|
}),
|
|
117
119
|
/* @__PURE__ */ v("input", {
|
|
118
120
|
type: "number",
|
|
119
121
|
id: "conn-timeout",
|
|
120
|
-
value:
|
|
121
|
-
onChange: (e) =>
|
|
122
|
+
value: j,
|
|
123
|
+
onChange: (e) => M(Number(e.target.value)),
|
|
122
124
|
min: 5,
|
|
123
125
|
max: 120,
|
|
124
|
-
"aria-label":
|
|
126
|
+
"aria-label": D("integrations.settings.connection.timeoutLabel", "Connection Timeout (seconds)"),
|
|
125
127
|
className: "w-full max-w-[200px] px-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"
|
|
126
128
|
})
|
|
127
129
|
] }), /* @__PURE__ */ y("div", { children: [
|
|
128
130
|
/* @__PURE__ */ v("label", {
|
|
129
131
|
htmlFor: "health-interval",
|
|
130
132
|
className: "block text-sm font-semibold mb-2",
|
|
131
|
-
children:
|
|
133
|
+
children: D("integrations.settings.connection.healthCheckLabel", "Health Check Interval (minutes)")
|
|
132
134
|
}),
|
|
133
135
|
/* @__PURE__ */ v("p", {
|
|
134
136
|
className: "text-xs text-text-secondary mb-2",
|
|
135
|
-
children:
|
|
137
|
+
children: D("integrations.settings.connection.healthCheckDescription", "How often to automatically check connection health.")
|
|
136
138
|
}),
|
|
137
139
|
/* @__PURE__ */ v("input", {
|
|
138
140
|
type: "number",
|
|
139
141
|
id: "health-interval",
|
|
140
|
-
value:
|
|
141
|
-
onChange: (e) =>
|
|
142
|
+
value: N,
|
|
143
|
+
onChange: (e) => P(Number(e.target.value)),
|
|
142
144
|
min: 5,
|
|
143
145
|
max: 1440,
|
|
144
|
-
"aria-label":
|
|
146
|
+
"aria-label": D("integrations.settings.connection.healthCheckLabel", "Health Check Interval (minutes)"),
|
|
145
147
|
className: "w-full max-w-[200px] px-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"
|
|
146
148
|
})
|
|
147
149
|
] })]
|
|
148
150
|
})]
|
|
149
151
|
}),
|
|
150
|
-
/* @__PURE__ */ y(
|
|
151
|
-
className: "
|
|
152
|
+
/* @__PURE__ */ y(S, {
|
|
153
|
+
className: "border-border-seam p-5 space-y-4",
|
|
152
154
|
children: [/* @__PURE__ */ y("h2", {
|
|
153
155
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
154
156
|
children: [/* @__PURE__ */ v(h, {
|
|
155
157
|
size: 18,
|
|
156
158
|
className: "text-primary"
|
|
157
|
-
}),
|
|
159
|
+
}), D("integrations.settings.security.title", "Security")]
|
|
158
160
|
}), /* @__PURE__ */ v("div", {
|
|
159
161
|
className: "space-y-4",
|
|
160
162
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -162,36 +164,35 @@ function b() {
|
|
|
162
164
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
163
165
|
htmlFor: "auto-refresh",
|
|
164
166
|
className: "text-sm font-semibold text-text-primary",
|
|
165
|
-
children:
|
|
167
|
+
children: D("integrations.settings.security.autoRefreshLabel", "Auto-refresh OAuth Tokens")
|
|
166
168
|
}), /* @__PURE__ */ v("p", {
|
|
167
169
|
className: "text-xs text-text-secondary mt-0.5",
|
|
168
|
-
children:
|
|
170
|
+
children: D("integrations.settings.security.autoRefreshDescription", "Automatically refresh tokens before they expire.")
|
|
169
171
|
})] }), /* @__PURE__ */ v("button", {
|
|
170
172
|
type: "button",
|
|
171
173
|
id: "auto-refresh",
|
|
172
174
|
role: "switch",
|
|
173
|
-
"aria-checked":
|
|
174
|
-
"aria-label":
|
|
175
|
-
onClick: () =>
|
|
176
|
-
className: t("relative w-11 h-6 rounded-full transition-colors flex-shrink-0",
|
|
177
|
-
children: /* @__PURE__ */ v("span", { className: t("absolute top-0.5 left-0.5 size-5 bg-white rounded-full shadow transition-transform",
|
|
175
|
+
"aria-checked": F,
|
|
176
|
+
"aria-label": D("integrations.settings.security.autoRefreshLabel", "Auto-refresh OAuth Tokens"),
|
|
177
|
+
onClick: () => I(!F),
|
|
178
|
+
className: t("relative w-11 h-6 rounded-full transition-colors flex-shrink-0", F ? "bg-action-primary-bg" : "bg-bg-sunken"),
|
|
179
|
+
children: /* @__PURE__ */ v("span", { className: t("absolute top-0.5 left-0.5 size-5 bg-white rounded-full shadow transition-transform", F && "translate-x-5") })
|
|
178
180
|
})]
|
|
179
181
|
})
|
|
180
182
|
})]
|
|
181
183
|
}),
|
|
182
184
|
/* @__PURE__ */ v("div", {
|
|
183
185
|
className: "flex items-center gap-3",
|
|
184
|
-
children: /* @__PURE__ */ y(
|
|
185
|
-
|
|
186
|
+
children: /* @__PURE__ */ y(b, {
|
|
187
|
+
size: "lg",
|
|
186
188
|
onClick: async () => {
|
|
187
|
-
|
|
189
|
+
R(!0), await new Promise((e) => setTimeout(e, 1e3)), R(!1), B(!0), setTimeout(() => B(!1), 3e3);
|
|
188
190
|
},
|
|
189
|
-
disabled:
|
|
190
|
-
|
|
191
|
-
children: [P ? /* @__PURE__ */ v(f, {
|
|
191
|
+
disabled: L,
|
|
192
|
+
children: [L ? /* @__PURE__ */ v(f, {
|
|
192
193
|
size: 16,
|
|
193
194
|
className: "animate-spin"
|
|
194
|
-
}) : v(
|
|
195
|
+
}) : v(z ? c : p, { size: 16 }), L ? D("integrations.settings.actions.saving", "Saving...") : z ? D("integrations.settings.actions.saved", "Saved!") : D("integrations.settings.actions.save", "Save Settings")]
|
|
195
196
|
})
|
|
196
197
|
})
|
|
197
198
|
]
|
|
@@ -204,26 +205,25 @@ function b() {
|
|
|
204
205
|
}),
|
|
205
206
|
/* @__PURE__ */ v("h2", {
|
|
206
207
|
className: "text-xl font-bold text-text-primary mb-2",
|
|
207
|
-
children:
|
|
208
|
+
children: D("integrations.settings.accessDenied.title", "Access Denied")
|
|
208
209
|
}),
|
|
209
210
|
/* @__PURE__ */ v("p", {
|
|
210
211
|
className: "text-sm text-text-secondary mb-6 max-w-sm",
|
|
211
|
-
children:
|
|
212
|
+
children: D("integrations.settings.accessDenied.description", "You don't have permission to manage integration settings.")
|
|
212
213
|
}),
|
|
213
|
-
/* @__PURE__ */ y(
|
|
214
|
-
|
|
215
|
-
onClick: () =>
|
|
216
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
214
|
+
/* @__PURE__ */ y(b, {
|
|
215
|
+
variant: "outline",
|
|
216
|
+
onClick: () => w?.(C),
|
|
217
217
|
children: [
|
|
218
218
|
/* @__PURE__ */ v(o, { size: 16 }),
|
|
219
219
|
" ",
|
|
220
|
-
|
|
220
|
+
D("integrations.settings.accessDenied.back", "Back to Overview")
|
|
221
221
|
]
|
|
222
222
|
})
|
|
223
223
|
]
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
//#endregion
|
|
227
|
-
export {
|
|
227
|
+
export { C as IntegrationsSettings };
|
|
228
228
|
|
|
229
229
|
//# sourceMappingURL=IntegrationsSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsSettings.js","names":[],"sources":["../../../src/integrations/pages/IntegrationsSettings.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Settings,\n ArrowLeft,\n Globe,\n Clock,\n Shield,\n Save,\n Loader2,\n CheckCircle2,\n Copy,\n Check,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { nativeCopyText, nativeImpact } from '../../utils/nativeBridge';\n\n/**\n * Integrations Settings — module configuration page.\n */\nexport function IntegrationsSettings() {\n const { basePath = '/', navigate, apiGatewayUrl } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canWrite = hasPermission(INTEGRATION_PERMISSIONS.INTEGRATION_WRITE);\n\n const [connectionTimeout, setConnectionTimeout] = useState(30);\n const [healthCheckInterval, setHealthCheckInterval] = useState(60);\n const [autoRefreshTokens, setAutoRefreshTokens] = useState(true);\n const [saving, setSaving] = useState(false);\n const [saved, setSaved] = useState(false);\n const [copiedRedirectUri, setCopiedRedirectUri] = useState(false);\n\n // Compute the default OAuth redirect URI based on the gateway URL\n const oauthRedirectUri = apiGatewayUrl\n ? `${apiGatewayUrl}/integrations/oauth/callback`\n : `${typeof window !== 'undefined' ? window.location.origin : ''}/integrations/oauth/callback`;\n\n const handleSave = async () => {\n setSaving(true);\n // Simulated save — in production this would call a GraphQL mutation\n await new Promise((resolve) => setTimeout(resolve, 1000));\n setSaving(false);\n setSaved(true);\n setTimeout(() => setSaved(false), 3000);\n };\n\n const handleCopyRedirectUri = async () => {\n void nativeImpact('light');\n const ok = await nativeCopyText(oauthRedirectUri);\n if (!ok) {\n // Last-resort fallback for very old browsers without clipboard or execCommand support\n const input = document.createElement('input');\n input.value = oauthRedirectUri;\n document.body.appendChild(input);\n input.select();\n document.execCommand('copy');\n document.body.removeChild(input);\n }\n setCopiedRedirectUri(true);\n setTimeout(() => setCopiedRedirectUri(false), 2000);\n };\n\n if (permissionsLoading) {\n return (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n </div>\n );\n }\n\n if (!canWrite) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20 text-center p-6\">\n <Shield size={48} className=\"text-text-secondary mb-4\" />\n <h2 className=\"text-xl font-bold text-text-primary mb-2\">\n {tx('integrations.settings.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary mb-6 max-w-sm\">\n {tx(\n 'integrations.settings.accessDenied.description',\n \"You don't have permission to manage integration settings.\"\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={16} />{' '}\n {tx('integrations.settings.accessDenied.back', 'Back to Overview')}\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl mx-auto\">\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border-subtle/50 p-6 shadow-sm\">\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all\"\n aria-label={tx('integrations.settings.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10\">\n <Settings size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tx('integrations.settings.title', 'Integrations Settings')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx('integrations.settings.subtitle', 'Configure integration module behavior')}\n </p>\n </div>\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* OAuth Redirect URI */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Globe size={18} className=\"text-primary\" />\n {tx('integrations.settings.oauth.title', 'OAuth Configuration')}\n </h2>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n {tx('integrations.settings.oauth.redirectUriLabel', 'Default OAuth Redirect URI')}\n </label>\n <p className=\"text-xs text-text-secondary mb-2\">\n {tx(\n 'integrations.settings.oauth.redirectUriDescription',\n 'Use this URL as the redirect/callback URI when configuring OAuth applications with providers.'\n )}\n </p>\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-sunken/30 font-mono text-sm text-text-primary break-all\">\n {oauthRedirectUri}\n </div>\n <button\n type=\"button\"\n onClick={handleCopyRedirectUri}\n className=\"p-2.5 rounded-lg border border-border-subtle hover:bg-accent transition-colors flex-shrink-0\"\n aria-label={tx('integrations.settings.oauth.copyAriaLabel', 'Copy redirect URI')}\n >\n {copiedRedirectUri ? (\n <Check size={16} className=\"text-status-success-text\" />\n ) : (\n <Copy size={16} />\n )}\n </button>\n </div>\n </div>\n </div>\n\n {/* Connection Settings */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Clock size={18} className=\"text-primary\" />\n {tx('integrations.settings.connection.title', 'Connection Settings')}\n </h2>\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"conn-timeout\" className=\"block text-sm font-semibold mb-2\">\n {tx('integrations.settings.connection.timeoutLabel', 'Connection Timeout (seconds)')}\n </label>\n <p className=\"text-xs text-text-secondary mb-2\">\n {tx(\n 'integrations.settings.connection.timeoutDescription',\n 'Maximum time to wait when testing or using a connection.'\n )}\n </p>\n <input\n type=\"number\"\n id=\"conn-timeout\"\n value={connectionTimeout}\n onChange={(e) => setConnectionTimeout(Number(e.target.value))}\n min={5}\n max={120}\n aria-label={tx(\n 'integrations.settings.connection.timeoutLabel',\n 'Connection Timeout (seconds)'\n )}\n className=\"w-full max-w-[200px] px-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\"\n />\n </div>\n <div>\n <label htmlFor=\"health-interval\" className=\"block text-sm font-semibold mb-2\">\n {tx(\n 'integrations.settings.connection.healthCheckLabel',\n 'Health Check Interval (minutes)'\n )}\n </label>\n <p className=\"text-xs text-text-secondary mb-2\">\n {tx(\n 'integrations.settings.connection.healthCheckDescription',\n 'How often to automatically check connection health.'\n )}\n </p>\n <input\n type=\"number\"\n id=\"health-interval\"\n value={healthCheckInterval}\n onChange={(e) => setHealthCheckInterval(Number(e.target.value))}\n min={5}\n max={1440}\n aria-label={tx(\n 'integrations.settings.connection.healthCheckLabel',\n 'Health Check Interval (minutes)'\n )}\n className=\"w-full max-w-[200px] px-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\"\n />\n </div>\n </div>\n </div>\n\n {/* Security Settings */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Shield size={18} className=\"text-primary\" />\n {tx('integrations.settings.security.title', 'Security')}\n </h2>\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <label htmlFor=\"auto-refresh\" className=\"text-sm font-semibold text-text-primary\">\n {tx('integrations.settings.security.autoRefreshLabel', 'Auto-refresh OAuth Tokens')}\n </label>\n <p className=\"text-xs text-text-secondary mt-0.5\">\n {tx(\n 'integrations.settings.security.autoRefreshDescription',\n 'Automatically refresh tokens before they expire.'\n )}\n </p>\n </div>\n <button\n type=\"button\"\n id=\"auto-refresh\"\n role=\"switch\"\n aria-checked={autoRefreshTokens}\n aria-label={tx(\n 'integrations.settings.security.autoRefreshLabel',\n 'Auto-refresh OAuth Tokens'\n )}\n onClick={() => setAutoRefreshTokens(!autoRefreshTokens)}\n className={cn(\n 'relative w-11 h-6 rounded-full transition-colors flex-shrink-0',\n autoRefreshTokens ? 'bg-action-primary-bg' : 'bg-bg-sunken'\n )}\n >\n <span\n className={cn(\n 'absolute top-0.5 left-0.5 size-5 bg-white rounded-full shadow transition-transform',\n autoRefreshTokens && 'translate-x-5'\n )}\n />\n </button>\n </div>\n </div>\n </div>\n\n {/* Save Button */}\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={handleSave}\n disabled={saving}\n className=\"inline-flex items-center gap-2 px-6 py-3 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-all disabled:opacity-50\"\n >\n {saving ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : saved ? (\n <CheckCircle2 size={16} />\n ) : (\n <Save size={16} />\n )}\n {saving\n ? tx('integrations.settings.actions.saving', 'Saving...')\n : saved\n ? tx('integrations.settings.actions.saved', 'Saved!')\n : tx('integrations.settings.actions.save', 'Save Settings')}\n </button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAsBA,SAAgB,IAAuB;CACrC,IAAM,EAAE,cAAW,KAAK,aAA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AC3D;;GACL"}
|
|
1
|
+
{"version":3,"file":"IntegrationsSettings.js","names":[],"sources":["../../../src/integrations/pages/IntegrationsSettings.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Settings,\n ArrowLeft,\n Globe,\n Clock,\n Shield,\n Save,\n Loader2,\n CheckCircle2,\n Copy,\n Check,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Button, GlassCard, EmphasisPanel } from '@burdenoff/fe-libs/ui';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { nativeCopyText, nativeImpact } from '../../utils/nativeBridge';\n\n/**\n * Integrations Settings — module configuration page.\n */\nexport function IntegrationsSettings() {\n const { basePath = '/', navigate, apiGatewayUrl } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canWrite = hasPermission(INTEGRATION_PERMISSIONS.INTEGRATION_WRITE);\n\n const [connectionTimeout, setConnectionTimeout] = useState(30);\n const [healthCheckInterval, setHealthCheckInterval] = useState(60);\n const [autoRefreshTokens, setAutoRefreshTokens] = useState(true);\n const [saving, setSaving] = useState(false);\n const [saved, setSaved] = useState(false);\n const [copiedRedirectUri, setCopiedRedirectUri] = useState(false);\n\n // Compute the default OAuth redirect URI based on the gateway URL\n const oauthRedirectUri = apiGatewayUrl\n ? `${apiGatewayUrl}/integrations/oauth/callback`\n : `${typeof window !== 'undefined' ? window.location.origin : ''}/integrations/oauth/callback`;\n\n const handleSave = async () => {\n setSaving(true);\n // Simulated save — in production this would call a GraphQL mutation\n await new Promise((resolve) => setTimeout(resolve, 1000));\n setSaving(false);\n setSaved(true);\n setTimeout(() => setSaved(false), 3000);\n };\n\n const handleCopyRedirectUri = async () => {\n void nativeImpact('light');\n const ok = await nativeCopyText(oauthRedirectUri);\n if (!ok) {\n // Last-resort fallback for very old browsers without clipboard or execCommand support\n const input = document.createElement('input');\n input.value = oauthRedirectUri;\n document.body.appendChild(input);\n input.select();\n document.execCommand('copy');\n document.body.removeChild(input);\n }\n setCopiedRedirectUri(true);\n setTimeout(() => setCopiedRedirectUri(false), 2000);\n };\n\n if (permissionsLoading) {\n return (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n </div>\n );\n }\n\n if (!canWrite) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20 text-center p-6\">\n <Shield size={48} className=\"text-text-secondary mb-4\" />\n <h2 className=\"text-xl font-bold text-text-primary mb-2\">\n {tx('integrations.settings.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary mb-6 max-w-sm\">\n {tx(\n 'integrations.settings.accessDenied.description',\n \"You don't have permission to manage integration settings.\"\n )}\n </p>\n <Button variant=\"outline\" onClick={() => navigate?.(basePath)}>\n <ArrowLeft size={16} />{' '}\n {tx('integrations.settings.accessDenied.back', 'Back to Overview')}\n </Button>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl mx-auto\">\n {/* Header */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(basePath)}\n aria-label={tx('integrations.settings.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10\">\n <Settings size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tx('integrations.settings.title', 'Integrations Settings')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx('integrations.settings.subtitle', 'Configure integration module behavior')}\n </p>\n </div>\n </div>\n </div>\n\n {/* OAuth Redirect URI */}\n <EmphasisPanel className=\"space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Globe size={18} className=\"text-primary\" />\n {tx('integrations.settings.oauth.title', 'OAuth Configuration')}\n </h2>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n {tx('integrations.settings.oauth.redirectUriLabel', 'Default OAuth Redirect URI')}\n </label>\n <p className=\"text-xs text-text-secondary mb-2\">\n {tx(\n 'integrations.settings.oauth.redirectUriDescription',\n 'Use this URL as the redirect/callback URI when configuring OAuth applications with providers.'\n )}\n </p>\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 px-4 py-2.5 border border-border-seam rounded-lg bg-bg-sunken/30 font-mono text-sm text-text-primary break-all\">\n {oauthRedirectUri}\n </div>\n <Button\n variant=\"outline\"\n size=\"icon\"\n onClick={handleCopyRedirectUri}\n className=\"flex-shrink-0\"\n aria-label={tx('integrations.settings.oauth.copyAriaLabel', 'Copy redirect URI')}\n >\n {copiedRedirectUri ? (\n <Check size={16} className=\"text-status-success-text\" />\n ) : (\n <Copy size={16} />\n )}\n </Button>\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Connection Settings */}\n <GlassCard className=\"border-border-seam p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Clock size={18} className=\"text-primary\" />\n {tx('integrations.settings.connection.title', 'Connection Settings')}\n </h2>\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"conn-timeout\" className=\"block text-sm font-semibold mb-2\">\n {tx('integrations.settings.connection.timeoutLabel', 'Connection Timeout (seconds)')}\n </label>\n <p className=\"text-xs text-text-secondary mb-2\">\n {tx(\n 'integrations.settings.connection.timeoutDescription',\n 'Maximum time to wait when testing or using a connection.'\n )}\n </p>\n <input\n type=\"number\"\n id=\"conn-timeout\"\n value={connectionTimeout}\n onChange={(e) => setConnectionTimeout(Number(e.target.value))}\n min={5}\n max={120}\n aria-label={tx(\n 'integrations.settings.connection.timeoutLabel',\n 'Connection Timeout (seconds)'\n )}\n className=\"w-full max-w-[200px] px-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\"\n />\n </div>\n <div>\n <label htmlFor=\"health-interval\" className=\"block text-sm font-semibold mb-2\">\n {tx(\n 'integrations.settings.connection.healthCheckLabel',\n 'Health Check Interval (minutes)'\n )}\n </label>\n <p className=\"text-xs text-text-secondary mb-2\">\n {tx(\n 'integrations.settings.connection.healthCheckDescription',\n 'How often to automatically check connection health.'\n )}\n </p>\n <input\n type=\"number\"\n id=\"health-interval\"\n value={healthCheckInterval}\n onChange={(e) => setHealthCheckInterval(Number(e.target.value))}\n min={5}\n max={1440}\n aria-label={tx(\n 'integrations.settings.connection.healthCheckLabel',\n 'Health Check Interval (minutes)'\n )}\n className=\"w-full max-w-[200px] px-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\"\n />\n </div>\n </div>\n </GlassCard>\n\n {/* Security Settings */}\n <GlassCard className=\"border-border-seam p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Shield size={18} className=\"text-primary\" />\n {tx('integrations.settings.security.title', 'Security')}\n </h2>\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <label htmlFor=\"auto-refresh\" className=\"text-sm font-semibold text-text-primary\">\n {tx('integrations.settings.security.autoRefreshLabel', 'Auto-refresh OAuth Tokens')}\n </label>\n <p className=\"text-xs text-text-secondary mt-0.5\">\n {tx(\n 'integrations.settings.security.autoRefreshDescription',\n 'Automatically refresh tokens before they expire.'\n )}\n </p>\n </div>\n <button\n type=\"button\"\n id=\"auto-refresh\"\n role=\"switch\"\n aria-checked={autoRefreshTokens}\n aria-label={tx(\n 'integrations.settings.security.autoRefreshLabel',\n 'Auto-refresh OAuth Tokens'\n )}\n onClick={() => setAutoRefreshTokens(!autoRefreshTokens)}\n className={cn(\n 'relative w-11 h-6 rounded-full transition-colors flex-shrink-0',\n autoRefreshTokens ? 'bg-action-primary-bg' : 'bg-bg-sunken'\n )}\n >\n <span\n className={cn(\n 'absolute top-0.5 left-0.5 size-5 bg-white rounded-full shadow transition-transform',\n autoRefreshTokens && 'translate-x-5'\n )}\n />\n </button>\n </div>\n </div>\n </GlassCard>\n\n {/* Save Button */}\n <div className=\"flex items-center gap-3\">\n <Button size=\"lg\" onClick={handleSave} disabled={saving}>\n {saving ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : saved ? (\n <CheckCircle2 size={16} />\n ) : (\n <Save size={16} />\n )}\n {saving\n ? tx('integrations.settings.actions.saving', 'Saving...')\n : saved\n ? tx('integrations.settings.actions.saved', 'Saved!')\n : tx('integrations.settings.actions.save', 'Save Settings')}\n </Button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAuBA,SAAgB,IAAuB;CACrC,IAAM,EAAE,cAAW,KAAK,aAAU,qBAAkB,GAAiB,EAC/D,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MAA6C;EACtF,IAAM,IAAa,EAAE,GAAK,EAAO;AAIjC,SAHI,MAAe,IACd,IAEE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAO,CAAC,GAAU,OACjB,EACG,QAAQ,KAAK,EAAS,KAAK,OAAO,EAAW,CAAC,CAC9C,QAAQ,IAAI,EAAS,IAAI,OAAO,EAAW,CAAC,EACjD,EACD,GARmB,IADW;IAW3B,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,IAAW,EAAc,EAAwB,kBAAkB,EAEnE,CAAC,GAAmB,KAAwB,EAAS,GAAG,EACxD,CAAC,GAAqB,KAA0B,EAAS,GAAG,EAC5D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IAAK,CAAC,EACzD,EAAU,GAAM,EAChB,EAAS,GAAK,EACd,iBAAiB,EAAS,GAAM,EAAE,IAAK;;KA4NI,UAAU;eAAjD,CACG,IACC,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,GAE9C,EADE,IACD,IAEA,GAFD,EAAc,MAAM,IAAM,CAER,EAEnB,IACG,EAAG,wCAAwC,YAAY,GACvD,IACE,EAAG,uCAAuC,SAAS,GACnD,EAAG,sCAAsC,gBAAgB,CACxD;;IACL,CAAA;GACF;MA9MJ,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAQ,MAAM;IAAI,WAAU;IAA6B,CAAA;GACzD,kBAAC,MAAD;IAAI,WAAU;cACX,EAAG,4CAA4C,gBAAgB;IAC7D,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,kDACA,4DACD;IACC,CAAA;GACJ,kBAAC,GAAD;IAAQ,SAAQ;IAAU,eAAe,IAAW,EAAS;cAA7D;KACE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;KAAC;KACvB,EAAG,2CAA2C,mBAAmB;KAC3D;;GACL"}
|
|
@@ -3,20 +3,21 @@ import { cn as t } from "../utils/cn.js";
|
|
|
3
3
|
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
4
|
import { useIntegrationsStore as r } from "../store/integrationsStore.js";
|
|
5
5
|
import { joinPath as i } from "../utils/navigation.js";
|
|
6
|
-
import { AUTH_TYPE_OPTIONS as
|
|
7
|
-
import { useProviders as
|
|
8
|
-
import { AddConnectionDialog as
|
|
9
|
-
import { ProviderCard as
|
|
10
|
-
import { useMemo as
|
|
11
|
-
import { AlertCircle as
|
|
6
|
+
import { AUTH_TYPE_OPTIONS as a, PLUGIN_STATUS_OPTIONS as o, PROVIDER_CATEGORIES as s } from "../utils/constants.js";
|
|
7
|
+
import { useProviders as c } from "../hooks/useProviders.js";
|
|
8
|
+
import { AddConnectionDialog as l } from "../components/AddConnectionDialog.js";
|
|
9
|
+
import { ProviderCard as ee } from "../components/ProviderCard.js";
|
|
10
|
+
import { useMemo as te, useState as u } from "react";
|
|
11
|
+
import { AlertCircle as d, ArrowLeft as f, Filter as p, Grid3x3 as m, List as h, RefreshCw as ne, Search as g, Store as _, X as v } from "lucide-react";
|
|
12
12
|
import { useI18n as re, usePermissions as y } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
13
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
14
|
+
import { Button as C } from "@burdenoff/fe-libs/ui";
|
|
14
15
|
//#region src/integrations/pages/ProviderCatalog.tsx
|
|
15
|
-
function
|
|
16
|
-
let { basePath:
|
|
17
|
-
let r =
|
|
16
|
+
function w({ showCreateProviderButton: w = !1 }) {
|
|
17
|
+
let { basePath: T = "/", navigate: E, onProviderSelect: ie } = e(), { t: ae } = re(), D = (e, t, n) => {
|
|
18
|
+
let r = ae(e, n);
|
|
18
19
|
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), t) : t : r;
|
|
19
|
-
}, { viewMode: O, setViewMode: k, providerFilter: A, updateProviderFilter: j, addConnectionDialogOpen: M, addConnectionProviderId: N, openAddConnectionDialog: P, closeAddConnectionDialog: F } = r(), { providers: I, loading: L, error: R, refetch: z } =
|
|
20
|
+
}, { viewMode: O, setViewMode: k, providerFilter: A, updateProviderFilter: j, addConnectionDialogOpen: M, addConnectionProviderId: N, openAddConnectionDialog: P, closeAddConnectionDialog: F } = r(), { providers: I, loading: L, error: R, refetch: z } = c(), { hasPermission: B, isLoading: V } = y(), H = !V && B(n.CONNECTION_CREATE), U = !V && B(n.PROVIDER_CREATE), [W, G] = u(!1), [K, q] = u("all"), J = te(() => {
|
|
20
21
|
let e = I ?? [];
|
|
21
22
|
if (A.search) {
|
|
22
23
|
let t = A.search.toLowerCase();
|
|
@@ -33,9 +34,9 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
33
34
|
category: "all",
|
|
34
35
|
pluginStatus: "all"
|
|
35
36
|
}), q("all");
|
|
36
|
-
}, ae = (e) => {
|
|
37
|
-
E?.(e), T?.(i(w, `providers/${e.id}`));
|
|
38
37
|
}, oe = (e) => {
|
|
38
|
+
ie?.(e), E?.(i(T, `providers/${e.id}`));
|
|
39
|
+
}, se = (e) => {
|
|
39
40
|
P(e.id);
|
|
40
41
|
}, Z = (e) => {
|
|
41
42
|
switch (e) {
|
|
@@ -81,21 +82,21 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
81
82
|
return /* @__PURE__ */ S("div", {
|
|
82
83
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
className: "
|
|
85
|
+
/* @__PURE__ */ x("div", {
|
|
86
|
+
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
86
87
|
"data-tour": "integrations-providers-header",
|
|
87
|
-
children:
|
|
88
|
-
className: "
|
|
88
|
+
children: /* @__PURE__ */ S("div", {
|
|
89
|
+
className: "flex items-center gap-4",
|
|
89
90
|
children: [
|
|
90
|
-
/* @__PURE__ */ x(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
/* @__PURE__ */ x(C, {
|
|
92
|
+
variant: "ghost",
|
|
93
|
+
size: "icon",
|
|
94
|
+
onClick: () => E?.(T),
|
|
94
95
|
"aria-label": D("integrations.providerCatalog.actions.backAriaLabel", "Back to overview"),
|
|
95
|
-
children: /* @__PURE__ */ x(
|
|
96
|
+
children: /* @__PURE__ */ x(f, { size: 20 })
|
|
96
97
|
}),
|
|
97
98
|
/* @__PURE__ */ x("div", {
|
|
98
|
-
className: "p-2.5 rounded-lg bg-action-primary-bg/10
|
|
99
|
+
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
99
100
|
children: /* @__PURE__ */ x(_, {
|
|
100
101
|
size: 24,
|
|
101
102
|
className: "text-primary"
|
|
@@ -108,14 +109,13 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
108
109
|
className: "text-sm text-text-secondary mt-0.5",
|
|
109
110
|
children: D("integrations.providerCatalog.subtitle", "Browse, install, and manage integration providers")
|
|
110
111
|
})] }),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
onClick: () =>
|
|
114
|
-
className: "ml-auto inline-flex items-center gap-2 px-4 py-2.5 rounded-lg bg-action-primary-bg text-action-primary-text text-sm font-medium hover:bg-action-primary-bg/90 transition-colors",
|
|
112
|
+
w && U && /* @__PURE__ */ S(C, {
|
|
113
|
+
className: "ml-auto",
|
|
114
|
+
onClick: () => E?.(i(T, "providers/new")),
|
|
115
115
|
children: [/* @__PURE__ */ x(_, { size: 16 }), D("integrations.providerCatalog.actions.addProvider", "Add Provider")]
|
|
116
116
|
})
|
|
117
117
|
]
|
|
118
|
-
})
|
|
118
|
+
})
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ S("div", {
|
|
121
121
|
className: "space-y-4",
|
|
@@ -142,7 +142,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
142
142
|
onClick: () => G(!W),
|
|
143
143
|
className: t("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", W || Y ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */ x(
|
|
145
|
+
/* @__PURE__ */ x(p, { size: 16 }),
|
|
146
146
|
W ? D("integrations.providerCatalog.filters.hide", "Hide") : D("integrations.providerCatalog.filters.show", "Filter"),
|
|
147
147
|
Y && /* @__PURE__ */ x("span", {
|
|
148
148
|
className: "ml-1 px-1.5 py-0.5 text-xs rounded-full bg-primary-foreground/20",
|
|
@@ -161,23 +161,23 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
161
161
|
onClick: () => k("grid"),
|
|
162
162
|
className: t("p-2.5 transition-colors", O === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
163
163
|
"aria-label": D("integrations.providerCatalog.view.gridAriaLabel", "Grid view"),
|
|
164
|
-
children: /* @__PURE__ */ x(
|
|
164
|
+
children: /* @__PURE__ */ x(m, { size: 16 })
|
|
165
165
|
}), /* @__PURE__ */ x("button", {
|
|
166
166
|
type: "button",
|
|
167
167
|
onClick: () => k("list"),
|
|
168
168
|
className: t("p-2.5 transition-colors", O === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
169
169
|
"aria-label": D("integrations.providerCatalog.view.listAriaLabel", "List view"),
|
|
170
|
-
children: /* @__PURE__ */ x(
|
|
170
|
+
children: /* @__PURE__ */ x(h, { size: 16 })
|
|
171
171
|
})]
|
|
172
172
|
})
|
|
173
173
|
]
|
|
174
174
|
}), W && /* @__PURE__ */ S("div", {
|
|
175
|
-
className: "rounded-xl border border-border-
|
|
175
|
+
className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200",
|
|
176
176
|
children: [/* @__PURE__ */ S("div", {
|
|
177
177
|
className: "flex items-center justify-between mb-4",
|
|
178
178
|
children: [/* @__PURE__ */ S("h3", {
|
|
179
179
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
180
|
-
children: [/* @__PURE__ */ x(
|
|
180
|
+
children: [/* @__PURE__ */ x(p, {
|
|
181
181
|
size: 16,
|
|
182
182
|
className: "text-primary"
|
|
183
183
|
}), D("integrations.providerCatalog.filters.panelTitle", "Filters")]
|
|
@@ -202,7 +202,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
202
202
|
children: [/* @__PURE__ */ x("option", {
|
|
203
203
|
value: "all",
|
|
204
204
|
children: Z("all")
|
|
205
|
-
}),
|
|
205
|
+
}), s.map((e) => /* @__PURE__ */ x("option", {
|
|
206
206
|
value: e.value,
|
|
207
207
|
children: Z(e.value)
|
|
208
208
|
}, e.value))]
|
|
@@ -220,7 +220,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
220
220
|
children: [/* @__PURE__ */ x("option", {
|
|
221
221
|
value: "all",
|
|
222
222
|
children: Q("all")
|
|
223
|
-
}),
|
|
223
|
+
}), a.map((e) => /* @__PURE__ */ x("option", {
|
|
224
224
|
value: e.value,
|
|
225
225
|
children: Q(e.value)
|
|
226
226
|
}, e.value))]
|
|
@@ -238,7 +238,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
238
238
|
children: [/* @__PURE__ */ x("option", {
|
|
239
239
|
value: "all",
|
|
240
240
|
children: $("all")
|
|
241
|
-
}),
|
|
241
|
+
}), o.map((e) => /* @__PURE__ */ x("option", {
|
|
242
242
|
value: e.value,
|
|
243
243
|
children: $(e.value)
|
|
244
244
|
}, e.value))]
|
|
@@ -250,7 +250,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
250
250
|
}),
|
|
251
251
|
R && /* @__PURE__ */ S("div", {
|
|
252
252
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4",
|
|
253
|
-
children: [/* @__PURE__ */ x(
|
|
253
|
+
children: [/* @__PURE__ */ x(d, {
|
|
254
254
|
size: 24,
|
|
255
255
|
className: "text-status-error-text flex-shrink-0"
|
|
256
256
|
}), /* @__PURE__ */ S("div", {
|
|
@@ -268,7 +268,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
268
268
|
type: "button",
|
|
269
269
|
onClick: () => z(),
|
|
270
270
|
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",
|
|
271
|
-
children: [/* @__PURE__ */ x(
|
|
271
|
+
children: [/* @__PURE__ */ x(ne, { size: 14 }), D("integrations.providerCatalog.error.retry", "Try Again")]
|
|
272
272
|
})
|
|
273
273
|
]
|
|
274
274
|
})]
|
|
@@ -283,7 +283,7 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
283
283
|
,
|
|
284
284
|
,
|
|
285
285
|
]].map((e, t) => /* @__PURE__ */ S("div", {
|
|
286
|
-
className: "rounded-xl border border-border-
|
|
286
|
+
className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-pulse",
|
|
287
287
|
children: [/* @__PURE__ */ S("div", {
|
|
288
288
|
className: "flex items-start gap-3",
|
|
289
289
|
children: [/* @__PURE__ */ x("div", { className: "size-12 bg-bg-sunken rounded-xl" }), /* @__PURE__ */ S("div", {
|
|
@@ -300,11 +300,11 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
300
300
|
className: t(O === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
301
301
|
children: J.map((e, t) => /* @__PURE__ */ x("div", {
|
|
302
302
|
style: { animationDelay: `${t * 30}ms` },
|
|
303
|
-
children: /* @__PURE__ */ x(
|
|
303
|
+
children: /* @__PURE__ */ x(ee, {
|
|
304
304
|
provider: e,
|
|
305
305
|
displayMode: O,
|
|
306
|
-
onClick:
|
|
307
|
-
onConnect: H ?
|
|
306
|
+
onClick: oe,
|
|
307
|
+
onConnect: H ? se : void 0
|
|
308
308
|
})
|
|
309
309
|
}, e.id))
|
|
310
310
|
}) : /* @__PURE__ */ S("div", {
|
|
@@ -325,15 +325,15 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
325
325
|
className: "text-sm text-text-secondary max-w-sm",
|
|
326
326
|
children: Y ? D("integrations.providerCatalog.empty.filteredDescription", "Try adjusting your search or filters.") : D("integrations.providerCatalog.empty.description", "Integration providers will appear here once configured.")
|
|
327
327
|
}),
|
|
328
|
-
Y && /* @__PURE__ */ S(
|
|
329
|
-
|
|
328
|
+
Y && /* @__PURE__ */ S(C, {
|
|
329
|
+
variant: "outline",
|
|
330
|
+
className: "mt-4",
|
|
330
331
|
onClick: X,
|
|
331
|
-
className: "mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
332
332
|
children: [/* @__PURE__ */ x(v, { size: 14 }), D("integrations.providerCatalog.empty.clearFilters", "Clear Filters")]
|
|
333
333
|
})
|
|
334
334
|
]
|
|
335
335
|
}) }),
|
|
336
|
-
/* @__PURE__ */ x(
|
|
336
|
+
/* @__PURE__ */ x(l, {
|
|
337
337
|
open: M,
|
|
338
338
|
onClose: F,
|
|
339
339
|
preselectedProviderId: N
|
|
@@ -342,6 +342,6 @@ function C({ showCreateProviderButton: C = !1 }) {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
|
-
export {
|
|
345
|
+
export { w as ProviderCatalog };
|
|
346
346
|
|
|
347
347
|
//# sourceMappingURL=ProviderCatalog.js.map
|