@epam/ai-dial-toolset-editor 1.3.6 → 1.4.0-dev.101
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AA8C5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAsehD,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DEFAULT_DEPLOYMENT_VERSION as e, DeploymentCreationFieldErrorCode as t, EntityEditor as n, MetadataField as r, MetadataForm as i, useMetadataForm as a, validateDeploymentCreationFields as o } from "@epam/ai-dial-builder-form";
|
|
2
|
-
import { ToolsetAuthTypes as
|
|
3
|
-
import { CopyButton as
|
|
1
|
+
import { DEFAULT_DEPLOYMENT_VERSION as e, DeploymentCreationFieldErrorCode as t, EntityEditor as n, MetadataField as r, MetadataForm as i, useMetadataForm as a, validateDeploymentCreationFields as o, withStoredVersionRule as s } from "@epam/ai-dial-builder-form";
|
|
2
|
+
import { ToolsetAuthTypes as c, ToolsetCredentialsLevel as l, WithLogin as u, getApiErrorDetails as d } from "@epam/ai-dial-chat-hooks";
|
|
3
|
+
import { CopyButton as f, ENTITY_DESCRIPTION_MAX_LENGTH as p, ENTITY_NAME_MAX_LENGTH as m, TAG_INPUT_TAG_CLASS_NAME as ee, TextRefinementField as h, buildCssVars as g, mergeClasses as _, useCodeCopy as v, useTextRefinement as y } from "@epam/ai-dial-chat-shared";
|
|
4
4
|
import { memo as b, useCallback as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
5
|
-
import { IconBrandOauth as E, IconKey as D, IconLockOff as
|
|
6
|
-
import { CaptionText as
|
|
5
|
+
import { IconBrandOauth as E, IconKey as D, IconLockOff as te, IconLogin as ne, IconLogout as O } from "@tabler/icons-react";
|
|
6
|
+
import { CaptionText as re, ConfirmationPopup as ie, ConfirmationPopupVariant as ae, DIAL_ICON_SIZE as k, DIAL_KIT_ICON_STROKE as A, Input as j, LiveRegion as M, LiveRegionElement as oe, NeutralButton as N, PasswordInput as se, Radio as P, RadioGroup as F, SegmentedControl as I, Select as ce, TagInput as L } from "@epam/ai-dial-ui-kit";
|
|
7
7
|
import { jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
8
8
|
//#region src/constants/public-class-names.ts
|
|
9
9
|
var B = {
|
|
@@ -11,7 +11,7 @@ var B = {
|
|
|
11
11
|
setupSection: "dial-toolset-editor-setup-section"
|
|
12
12
|
}, V = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.Http = "HTTP", e.Sse = "SSE", e;
|
|
14
|
-
}({}),
|
|
14
|
+
}({}), le = e, ue = {
|
|
15
15
|
name: {
|
|
16
16
|
label: "Name",
|
|
17
17
|
placeholder: "Enter name"
|
|
@@ -51,16 +51,16 @@ var B = {
|
|
|
51
51
|
},
|
|
52
52
|
ariaLabel: "General"
|
|
53
53
|
}, H = {
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
},
|
|
58
|
-
authenticationType:
|
|
59
|
-
withLogin:
|
|
54
|
+
[c.OAuth]: E,
|
|
55
|
+
[c.ApiKey]: D,
|
|
56
|
+
[c.None]: te
|
|
57
|
+
}, de = () => ({
|
|
58
|
+
authenticationType: c.None,
|
|
59
|
+
withLogin: u.WithoutLogin,
|
|
60
60
|
isLoggedIn: !1
|
|
61
61
|
}), U = () => ({
|
|
62
62
|
name: "",
|
|
63
|
-
version:
|
|
63
|
+
version: le,
|
|
64
64
|
iconUrl: "",
|
|
65
65
|
description: "",
|
|
66
66
|
topics: [],
|
|
@@ -68,7 +68,7 @@ var B = {
|
|
|
68
68
|
endpoint: "",
|
|
69
69
|
protocol: V.Http,
|
|
70
70
|
allowedTools: [],
|
|
71
|
-
auth:
|
|
71
|
+
auth: de()
|
|
72
72
|
}), W = (e) => {
|
|
73
73
|
if (!/^https?:\/\//.test(e) || e.endsWith(".") || e.endsWith("//")) return !1;
|
|
74
74
|
try {
|
|
@@ -76,10 +76,10 @@ var B = {
|
|
|
76
76
|
} catch {
|
|
77
77
|
return !1;
|
|
78
78
|
}
|
|
79
|
-
}, G = (e) => W(e.trim()),
|
|
79
|
+
}, G = (e) => W(e.trim()), fe = /^[A-Za-z][A-Za-z0-9+.-]*:[^\s#]+$/, pe = 2048, me = (e) => {
|
|
80
80
|
let t = e?.trim() ?? "";
|
|
81
81
|
if (!t) return !0;
|
|
82
|
-
if (t.length >
|
|
82
|
+
if (t.length > pe || !fe.test(t)) return !1;
|
|
83
83
|
try {
|
|
84
84
|
return !!new URL(t);
|
|
85
85
|
} catch {
|
|
@@ -98,21 +98,21 @@ var B = {
|
|
|
98
98
|
if (W(t)) return t;
|
|
99
99
|
}
|
|
100
100
|
return t;
|
|
101
|
-
}, J = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType ===
|
|
101
|
+
}, J = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType === c.ApiKey ? e.keyHeader?.trim() ? e.withLogin === u.WithoutLogin || !!(e.keyHeader?.trim() && e.apiKey?.trim()) : !1 : e.authenticationType === c.OAuth && e.withLogin === u.WithConfig ? !!e.clientId?.trim() && (t || !!e.clientSecret?.trim()) && G(e.authorizationEndpoint ?? "") && G(e.tokenEndpoint ?? "") && me(e.resource) : !0, he = (e) => s({ validateVersionPattern: !0 }, e), ge = (e, t = !1) => Object.keys(o(e, he(t))).length === 0 && G(e.endpoint) && J(e.auth, t), Y = /* @__PURE__ */ new Set([
|
|
102
102
|
"name",
|
|
103
103
|
"description",
|
|
104
104
|
"iconUrl",
|
|
105
105
|
"version",
|
|
106
106
|
"topics",
|
|
107
107
|
"otherLocales"
|
|
108
|
-
]),
|
|
108
|
+
]), _e = (e) => ({
|
|
109
109
|
name: e.name,
|
|
110
110
|
description: e.description,
|
|
111
111
|
iconUrl: e.iconUrl,
|
|
112
112
|
version: e.version,
|
|
113
113
|
topics: e.topics,
|
|
114
114
|
otherLocales: e.otherLocales
|
|
115
|
-
}),
|
|
115
|
+
}), ve = (e) => {
|
|
116
116
|
let t = {}, n = {};
|
|
117
117
|
for (let [r, i] of Object.entries(e)) (Y.has(r) ? t : n)[r] = i;
|
|
118
118
|
return {
|
|
@@ -121,116 +121,116 @@ var B = {
|
|
|
121
121
|
};
|
|
122
122
|
}, X = /* @__PURE__ */ function(e) {
|
|
123
123
|
return e.Success = "success", e.Cancelled = "cancelled", e.PopupBlocked = "popup-blocked", e.InvalidConfig = "invalid-config", e.Failed = "failed", e;
|
|
124
|
-
}({}),
|
|
125
|
-
let [
|
|
126
|
-
|
|
124
|
+
}({}), ye = { openAccessDescription: "_openAccessDescription_1ltst_1" }, Z = "toolset-client-secret-keep-caption", be = (e) => `******${e}`, xe = (e) => e === c.None ? u.WithoutLogin : u.WithLogin, Q = (e, t) => e === c.None ? t?.typeNone ?? "Open access" : e === c.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", Se = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: o, onOAuthLogin: s, onNotifySuccess: f, onNotifyError: p, onAuthChange: m, onEnsureSaved: h, labels: g, titleClassName: v = "dial-h3-text", openAccessDescriptionClassName: y = "dial-small-text" }) => {
|
|
125
|
+
let [b, x] = T(!1), [S, C] = T(!1), w = e.isLoggedIn || n || b, E = i && e.clientSecretHint && !e.clientSecret ? e.clientSecretHint : void 0, D = G(a) && J(e, i) && !w, te = (t) => {
|
|
126
|
+
w || t === e.authenticationType || m({
|
|
127
127
|
authenticationType: t,
|
|
128
|
-
withLogin:
|
|
128
|
+
withLogin: xe(t)
|
|
129
129
|
});
|
|
130
130
|
}, M = (e) => {
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
switch (e.auth != null &&
|
|
131
|
+
m({ withLogin: e });
|
|
132
|
+
}, oe = (e) => {
|
|
133
|
+
switch (e.auth != null && m(e.auth), e.status) {
|
|
134
134
|
case X.Success:
|
|
135
|
-
|
|
135
|
+
m({ isLoggedIn: !0 }), f(g?.loginSuccessMessage ?? "Successfully logged in.");
|
|
136
136
|
return;
|
|
137
137
|
case X.PopupBlocked:
|
|
138
|
-
p(
|
|
138
|
+
p(g?.errorPopupBlocked ?? "The login popup was blocked by your browser. Please allow popups for this site and try again.");
|
|
139
139
|
return;
|
|
140
140
|
case X.InvalidConfig:
|
|
141
|
-
p(
|
|
141
|
+
p(g?.errorOAuthConfigMissing ?? "The OAuth provider did not return a valid client configuration. Please check the endpoint or contact your administrator.");
|
|
142
142
|
return;
|
|
143
143
|
case X.Failed:
|
|
144
|
-
p(
|
|
144
|
+
p(g?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", e.traceId);
|
|
145
145
|
return;
|
|
146
146
|
case X.Cancelled: return;
|
|
147
147
|
}
|
|
148
|
-
},
|
|
149
|
-
if (!
|
|
150
|
-
if (e.authenticationType ===
|
|
151
|
-
|
|
148
|
+
}, F = async () => {
|
|
149
|
+
if (!D) return;
|
|
150
|
+
if (e.authenticationType === c.OAuth) {
|
|
151
|
+
x(!0);
|
|
152
152
|
try {
|
|
153
|
-
|
|
153
|
+
oe(await s({
|
|
154
154
|
auth: e,
|
|
155
|
-
ensureSaved:
|
|
155
|
+
ensureSaved: h
|
|
156
156
|
}));
|
|
157
157
|
} finally {
|
|
158
|
-
|
|
158
|
+
x(!1);
|
|
159
159
|
}
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
let t = await
|
|
162
|
+
let t = await h();
|
|
163
163
|
if (t) {
|
|
164
|
-
|
|
164
|
+
x(!0);
|
|
165
165
|
try {
|
|
166
166
|
let n = {
|
|
167
167
|
url: t,
|
|
168
|
-
credentialsLevel:
|
|
168
|
+
credentialsLevel: l.User,
|
|
169
169
|
authenticationType: e.authenticationType,
|
|
170
170
|
apiKey: e.apiKey?.trim()
|
|
171
171
|
};
|
|
172
|
-
await o.login(t, n),
|
|
172
|
+
await o.login(t, n), m({ isLoggedIn: !0 }), f(g?.loginSuccessMessage ?? "Successfully logged in.");
|
|
173
173
|
} catch (e) {
|
|
174
|
-
let { traceId: t } = await
|
|
175
|
-
p(
|
|
174
|
+
let { traceId: t } = await d(e);
|
|
175
|
+
p(g?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
|
|
176
176
|
} finally {
|
|
177
|
-
|
|
177
|
+
x(!1);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
},
|
|
181
|
-
|
|
180
|
+
}, ce = async () => {
|
|
181
|
+
x(!0);
|
|
182
182
|
try {
|
|
183
183
|
let t = {
|
|
184
184
|
url: r,
|
|
185
|
-
credentialsLevel:
|
|
185
|
+
credentialsLevel: l.User,
|
|
186
186
|
authenticationType: e.authenticationType
|
|
187
187
|
};
|
|
188
|
-
await o.logout(r, t),
|
|
188
|
+
await o.logout(r, t), m({ isLoggedIn: !1 }), C(!1), f(g?.logoutSuccessMessage ?? "Successfully logged out.");
|
|
189
189
|
} catch (e) {
|
|
190
|
-
let { traceId: t } = await
|
|
191
|
-
p(
|
|
190
|
+
let { traceId: t } = await d(e);
|
|
191
|
+
p(g?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
|
|
192
192
|
} finally {
|
|
193
|
-
|
|
193
|
+
x(!1);
|
|
194
194
|
}
|
|
195
|
-
},
|
|
195
|
+
}, B = () => e.isLoggedIn ? /* @__PURE__ */ R("div", {
|
|
196
196
|
className: "flex",
|
|
197
|
-
children: /* @__PURE__ */ R(
|
|
198
|
-
label:
|
|
199
|
-
iconBefore: /* @__PURE__ */ R(
|
|
200
|
-
size:
|
|
197
|
+
children: /* @__PURE__ */ R(N, {
|
|
198
|
+
label: g?.logOutLabel ?? "Log out",
|
|
199
|
+
iconBefore: /* @__PURE__ */ R(O, {
|
|
200
|
+
size: k.MD,
|
|
201
201
|
stroke: A
|
|
202
202
|
}),
|
|
203
|
-
onClick: () =>
|
|
204
|
-
disabled: n ||
|
|
203
|
+
onClick: () => C(!0),
|
|
204
|
+
disabled: n || b
|
|
205
205
|
})
|
|
206
206
|
}) : /* @__PURE__ */ R("div", {
|
|
207
207
|
className: "flex",
|
|
208
|
-
children: /* @__PURE__ */ R(
|
|
209
|
-
label:
|
|
210
|
-
iconBefore: /* @__PURE__ */ R(
|
|
211
|
-
size:
|
|
208
|
+
children: /* @__PURE__ */ R(N, {
|
|
209
|
+
label: g?.logInLabel ?? "Log in",
|
|
210
|
+
iconBefore: /* @__PURE__ */ R(ne, {
|
|
211
|
+
size: k.MD,
|
|
212
212
|
stroke: A
|
|
213
213
|
}),
|
|
214
|
-
onClick:
|
|
215
|
-
disabled: !
|
|
214
|
+
onClick: F,
|
|
215
|
+
disabled: !D
|
|
216
216
|
})
|
|
217
217
|
});
|
|
218
218
|
return /* @__PURE__ */ z("section", {
|
|
219
219
|
className: "flex flex-col gap-2",
|
|
220
220
|
children: [
|
|
221
221
|
/* @__PURE__ */ R("h3", {
|
|
222
|
-
className:
|
|
223
|
-
children:
|
|
222
|
+
className: v,
|
|
223
|
+
children: g?.sectionTitle ?? "Authentication"
|
|
224
224
|
}),
|
|
225
225
|
/* @__PURE__ */ R(I, {
|
|
226
|
-
"aria-label":
|
|
226
|
+
"aria-label": g?.sectionTitle ?? "Authentication",
|
|
227
227
|
value: e.authenticationType,
|
|
228
|
-
onChange: (e) =>
|
|
228
|
+
onChange: (e) => te(e),
|
|
229
229
|
segmentClassName: "px-2",
|
|
230
230
|
items: [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
c.None,
|
|
232
|
+
c.OAuth,
|
|
233
|
+
c.ApiKey
|
|
234
234
|
].map((t) => {
|
|
235
235
|
let n = H[t];
|
|
236
236
|
return {
|
|
@@ -239,23 +239,23 @@ var B = {
|
|
|
239
239
|
className: "flex items-center gap-2",
|
|
240
240
|
children: [/* @__PURE__ */ R(n, {
|
|
241
241
|
className: "shrink-0",
|
|
242
|
-
size:
|
|
242
|
+
size: k.SM,
|
|
243
243
|
stroke: A,
|
|
244
244
|
"aria-hidden": !0
|
|
245
245
|
}), /* @__PURE__ */ R("span", {
|
|
246
246
|
className: "sr-only desktop:not-sr-only",
|
|
247
|
-
children: Q(t,
|
|
247
|
+
children: Q(t, g)
|
|
248
248
|
})]
|
|
249
249
|
}),
|
|
250
|
-
disabled:
|
|
250
|
+
disabled: w && e.authenticationType !== t
|
|
251
251
|
};
|
|
252
252
|
})
|
|
253
253
|
}),
|
|
254
|
-
e.authenticationType ===
|
|
255
|
-
className: _("pt-2",
|
|
256
|
-
children:
|
|
254
|
+
e.authenticationType === c.None && /* @__PURE__ */ R("p", {
|
|
255
|
+
className: _("pt-2", y, ye.openAccessDescription),
|
|
256
|
+
children: g?.openAccessDescription ?? "Open endpoint, no credentials"
|
|
257
257
|
}),
|
|
258
|
-
e.authenticationType ===
|
|
258
|
+
e.authenticationType === c.OAuth && /* @__PURE__ */ z("div", {
|
|
259
259
|
className: "flex flex-col gap-3 pt-2",
|
|
260
260
|
children: [
|
|
261
261
|
/* @__PURE__ */ z("div", {
|
|
@@ -263,110 +263,110 @@ var B = {
|
|
|
263
263
|
children: [/* @__PURE__ */ R(P, {
|
|
264
264
|
name: "oauth-login-mode",
|
|
265
265
|
id: "oauth-with-login",
|
|
266
|
-
value:
|
|
267
|
-
labelProps: { label:
|
|
268
|
-
isSelected: e.withLogin ===
|
|
269
|
-
disabled:
|
|
266
|
+
value: u.WithLogin,
|
|
267
|
+
labelProps: { label: g?.withLoginOAuthLabel ?? "Standard login" },
|
|
268
|
+
isSelected: e.withLogin === u.WithLogin,
|
|
269
|
+
disabled: w,
|
|
270
270
|
onChange: M
|
|
271
271
|
}), /* @__PURE__ */ R(P, {
|
|
272
272
|
name: "oauth-login-mode",
|
|
273
273
|
id: "oauth-with-config",
|
|
274
|
-
value:
|
|
275
|
-
labelProps: { label:
|
|
276
|
-
isSelected: e.withLogin ===
|
|
277
|
-
disabled:
|
|
274
|
+
value: u.WithConfig,
|
|
275
|
+
labelProps: { label: g?.withConfigOAuthLabel ?? "Custom login" },
|
|
276
|
+
isSelected: e.withLogin === u.WithConfig,
|
|
277
|
+
disabled: w,
|
|
278
278
|
onChange: M
|
|
279
279
|
})]
|
|
280
280
|
}),
|
|
281
|
-
e.withLogin ===
|
|
281
|
+
e.withLogin === u.WithConfig && /* @__PURE__ */ z("div", {
|
|
282
282
|
className: "flex flex-col gap-3",
|
|
283
283
|
children: [
|
|
284
284
|
/* @__PURE__ */ R(j, {
|
|
285
285
|
id: "toolset-client-id",
|
|
286
286
|
value: e.clientId ?? "",
|
|
287
|
-
onChange: (e) =>
|
|
287
|
+
onChange: (e) => m({ clientId: e ?? "" }),
|
|
288
288
|
labelProps: {
|
|
289
|
-
label:
|
|
289
|
+
label: g?.clientIdLabel ?? "Client ID",
|
|
290
290
|
required: !0
|
|
291
291
|
},
|
|
292
|
-
placeholder:
|
|
292
|
+
placeholder: g?.clientIdPlaceholder ?? "Enter client ID",
|
|
293
293
|
error: t.clientId || void 0,
|
|
294
294
|
invalid: !!t.clientId,
|
|
295
|
-
disabled:
|
|
295
|
+
disabled: w
|
|
296
296
|
}),
|
|
297
297
|
/* @__PURE__ */ z("div", {
|
|
298
298
|
className: "flex flex-col gap-1",
|
|
299
|
-
children: [/* @__PURE__ */ R(
|
|
299
|
+
children: [/* @__PURE__ */ R(se, {
|
|
300
300
|
id: "toolset-client-secret",
|
|
301
301
|
value: e.clientSecret ?? "",
|
|
302
|
-
onChange: (e) =>
|
|
302
|
+
onChange: (e) => m({ clientSecret: e ?? "" }),
|
|
303
303
|
labelProps: {
|
|
304
|
-
label:
|
|
304
|
+
label: g?.clientSecretLabel ?? "Client secret",
|
|
305
305
|
required: !i
|
|
306
306
|
},
|
|
307
|
-
placeholder:
|
|
308
|
-
"aria-describedby":
|
|
309
|
-
showPasswordLabel:
|
|
310
|
-
hidePasswordLabel:
|
|
307
|
+
placeholder: E == null ? g?.clientSecretPlaceholder ?? "Enter client secret" : (g?.clientSecretHintPlaceholder ?? be)(E),
|
|
308
|
+
"aria-describedby": E == null ? void 0 : Z,
|
|
309
|
+
showPasswordLabel: g?.showClientSecretLabel ?? "Show client secret",
|
|
310
|
+
hidePasswordLabel: g?.hideClientSecretLabel ?? "Hide client secret",
|
|
311
311
|
error: t.clientSecret || void 0,
|
|
312
312
|
invalid: !!t.clientSecret,
|
|
313
|
-
disabled:
|
|
314
|
-
}),
|
|
313
|
+
disabled: w
|
|
314
|
+
}), E != null && /* @__PURE__ */ R(re, {
|
|
315
315
|
id: Z,
|
|
316
|
-
text:
|
|
316
|
+
text: g?.clientSecretKeepCaption ?? "Leave empty to keep the saved secret."
|
|
317
317
|
})]
|
|
318
318
|
}),
|
|
319
319
|
/* @__PURE__ */ R(j, {
|
|
320
320
|
id: "toolset-authorization-endpoint",
|
|
321
321
|
value: e.authorizationEndpoint ?? "",
|
|
322
|
-
onChange: (e) =>
|
|
322
|
+
onChange: (e) => m({ authorizationEndpoint: e ?? "" }),
|
|
323
323
|
labelProps: {
|
|
324
|
-
label:
|
|
324
|
+
label: g?.authorizationEndpointLabel ?? "Authorization endpoint",
|
|
325
325
|
required: !0
|
|
326
326
|
},
|
|
327
|
-
placeholder:
|
|
327
|
+
placeholder: g?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
|
|
328
328
|
error: t.authorizationEndpoint || void 0,
|
|
329
329
|
invalid: !!t.authorizationEndpoint,
|
|
330
|
-
disabled:
|
|
330
|
+
disabled: w
|
|
331
331
|
}),
|
|
332
332
|
/* @__PURE__ */ R(j, {
|
|
333
333
|
id: "toolset-token-endpoint",
|
|
334
334
|
value: e.tokenEndpoint ?? "",
|
|
335
|
-
onChange: (e) =>
|
|
335
|
+
onChange: (e) => m({ tokenEndpoint: e ?? "" }),
|
|
336
336
|
labelProps: {
|
|
337
|
-
label:
|
|
337
|
+
label: g?.tokenEndpointLabel ?? "Token endpoint",
|
|
338
338
|
required: !0
|
|
339
339
|
},
|
|
340
|
-
placeholder:
|
|
340
|
+
placeholder: g?.tokenEndpointPlaceholder ?? "Enter token endpoint",
|
|
341
341
|
error: t.tokenEndpoint || void 0,
|
|
342
342
|
invalid: !!t.tokenEndpoint,
|
|
343
|
-
disabled:
|
|
343
|
+
disabled: w
|
|
344
344
|
}),
|
|
345
|
-
/* @__PURE__ */ R(
|
|
345
|
+
/* @__PURE__ */ R(L, {
|
|
346
346
|
id: "toolset-scopes",
|
|
347
|
-
labelProps: { label:
|
|
348
|
-
placeholder:
|
|
347
|
+
labelProps: { label: g?.scopesLabel ?? "Scopes" },
|
|
348
|
+
placeholder: g?.scopesPlaceholder ?? "Enter scopes",
|
|
349
349
|
value: e.scopes ?? [],
|
|
350
|
-
onChange: (e) =>
|
|
351
|
-
disabled:
|
|
352
|
-
tagClassName:
|
|
350
|
+
onChange: (e) => m({ scopes: e }),
|
|
351
|
+
disabled: w,
|
|
352
|
+
tagClassName: ee
|
|
353
353
|
}),
|
|
354
354
|
/* @__PURE__ */ R(j, {
|
|
355
355
|
id: "toolset-resource",
|
|
356
356
|
value: e.resource ?? "",
|
|
357
|
-
onChange: (e) =>
|
|
358
|
-
labelProps: { label:
|
|
359
|
-
placeholder:
|
|
357
|
+
onChange: (e) => m({ resource: e ?? "" }),
|
|
358
|
+
labelProps: { label: g?.resourceLabel ?? "Resource" },
|
|
359
|
+
placeholder: g?.resourcePlaceholder ?? "Enter resource URI",
|
|
360
360
|
error: t.resource || void 0,
|
|
361
361
|
invalid: !!t.resource,
|
|
362
|
-
disabled:
|
|
362
|
+
disabled: w
|
|
363
363
|
})
|
|
364
364
|
]
|
|
365
365
|
}),
|
|
366
|
-
|
|
366
|
+
B()
|
|
367
367
|
]
|
|
368
368
|
}),
|
|
369
|
-
e.authenticationType ===
|
|
369
|
+
e.authenticationType === c.ApiKey && /* @__PURE__ */ z("div", {
|
|
370
370
|
className: "flex flex-col gap-3 pt-2",
|
|
371
371
|
children: [
|
|
372
372
|
/* @__PURE__ */ z("div", {
|
|
@@ -374,18 +374,18 @@ var B = {
|
|
|
374
374
|
children: [/* @__PURE__ */ R(P, {
|
|
375
375
|
name: "apikey-login-mode",
|
|
376
376
|
id: "apikey-with-login",
|
|
377
|
-
value:
|
|
378
|
-
labelProps: { label:
|
|
379
|
-
isSelected: e.withLogin ===
|
|
380
|
-
disabled:
|
|
377
|
+
value: u.WithLogin,
|
|
378
|
+
labelProps: { label: g?.withLoginLabel ?? "With login" },
|
|
379
|
+
isSelected: e.withLogin === u.WithLogin,
|
|
380
|
+
disabled: w,
|
|
381
381
|
onChange: M
|
|
382
382
|
}), /* @__PURE__ */ R(P, {
|
|
383
383
|
name: "apikey-login-mode",
|
|
384
384
|
id: "apikey-without-login",
|
|
385
|
-
value:
|
|
386
|
-
labelProps: { label:
|
|
387
|
-
isSelected: e.withLogin ===
|
|
388
|
-
disabled:
|
|
385
|
+
value: u.WithoutLogin,
|
|
386
|
+
labelProps: { label: g?.withoutLoginLabel ?? "Without login" },
|
|
387
|
+
isSelected: e.withLogin === u.WithoutLogin,
|
|
388
|
+
disabled: w,
|
|
389
389
|
onChange: M
|
|
390
390
|
})]
|
|
391
391
|
}),
|
|
@@ -394,53 +394,53 @@ var B = {
|
|
|
394
394
|
children: [/* @__PURE__ */ R(j, {
|
|
395
395
|
id: "toolset-key-header",
|
|
396
396
|
value: e.keyHeader ?? "",
|
|
397
|
-
onChange: (e) =>
|
|
397
|
+
onChange: (e) => m({ keyHeader: e ?? "" }),
|
|
398
398
|
labelProps: {
|
|
399
|
-
label:
|
|
399
|
+
label: g?.keyHeaderLabel ?? "API Key parameter name",
|
|
400
400
|
required: !0
|
|
401
401
|
},
|
|
402
|
-
placeholder:
|
|
402
|
+
placeholder: g?.keyHeaderPlaceholder ?? "Enter API key parameter name",
|
|
403
403
|
error: t.keyHeader || void 0,
|
|
404
404
|
invalid: !!t.keyHeader,
|
|
405
|
-
disabled:
|
|
406
|
-
}), e.withLogin ===
|
|
405
|
+
disabled: w
|
|
406
|
+
}), e.withLogin === u.WithLogin && /* @__PURE__ */ R(se, {
|
|
407
407
|
id: "toolset-api-key",
|
|
408
408
|
value: e.apiKey ?? "",
|
|
409
|
-
onChange: (e) =>
|
|
409
|
+
onChange: (e) => m({ apiKey: e ?? "" }),
|
|
410
410
|
labelProps: {
|
|
411
|
-
label:
|
|
411
|
+
label: g?.apiKeyLabel ?? "API key",
|
|
412
412
|
required: !0
|
|
413
413
|
},
|
|
414
|
-
placeholder:
|
|
415
|
-
showPasswordLabel:
|
|
416
|
-
hidePasswordLabel:
|
|
414
|
+
placeholder: g?.apiKeyPlaceholder ?? "Enter API key",
|
|
415
|
+
showPasswordLabel: g?.showApiKeyLabel ?? "Show API key",
|
|
416
|
+
hidePasswordLabel: g?.hideApiKeyLabel ?? "Hide API key",
|
|
417
417
|
error: t.apiKey || void 0,
|
|
418
418
|
invalid: !!t.apiKey,
|
|
419
|
-
disabled:
|
|
419
|
+
disabled: w
|
|
420
420
|
})]
|
|
421
421
|
}),
|
|
422
|
-
e.withLogin !==
|
|
422
|
+
e.withLogin !== u.WithoutLogin && B()
|
|
423
423
|
]
|
|
424
424
|
}),
|
|
425
|
-
|
|
426
|
-
open:
|
|
427
|
-
header:
|
|
428
|
-
description:
|
|
429
|
-
confirmLabel:
|
|
430
|
-
cancelLabel:
|
|
431
|
-
variant:
|
|
432
|
-
isLoading:
|
|
433
|
-
disableConfirmButton:
|
|
434
|
-
onConfirm:
|
|
435
|
-
onCancel: () =>
|
|
436
|
-
onClose: () =>
|
|
425
|
+
S && /* @__PURE__ */ R(ie, {
|
|
426
|
+
open: S,
|
|
427
|
+
header: g?.logoutConfirmTitle ?? "Log out?",
|
|
428
|
+
description: g?.logoutConfirmDescription ?? "Are you sure you want to log out? You will need to re-enter your credentials to use this toolset again.",
|
|
429
|
+
confirmLabel: g?.logOutLabel ?? "Log out",
|
|
430
|
+
cancelLabel: g?.cancelLabel ?? "Cancel",
|
|
431
|
+
variant: ae.Danger,
|
|
432
|
+
isLoading: b,
|
|
433
|
+
disableConfirmButton: b,
|
|
434
|
+
onConfirm: ce,
|
|
435
|
+
onCancel: () => C(!1),
|
|
436
|
+
onClose: () => C(!1)
|
|
437
437
|
})
|
|
438
438
|
]
|
|
439
439
|
});
|
|
440
|
-
},
|
|
440
|
+
}, Ce = {
|
|
441
441
|
title: "_title_17wsg_1",
|
|
442
442
|
description: "_description_17wsg_5"
|
|
443
|
-
},
|
|
443
|
+
}, we = b(({ url: e, className: t, labels: n, titleClassName: r = "dial-body-semi-text", descriptionClassName: i = "dial-small-text" }) => {
|
|
444
444
|
let { isCopied: a, copy: o } = v(e), s = n?.copiedLabel ?? "Copied!";
|
|
445
445
|
return /* @__PURE__ */ z("div", {
|
|
446
446
|
className: _("flex flex-col gap-3", t),
|
|
@@ -448,28 +448,28 @@ var B = {
|
|
|
448
448
|
/* @__PURE__ */ z("div", {
|
|
449
449
|
className: "flex flex-col gap-1",
|
|
450
450
|
children: [/* @__PURE__ */ R("p", {
|
|
451
|
-
className: _("text-start", r,
|
|
451
|
+
className: _("text-start", r, Ce.title),
|
|
452
452
|
children: n?.title ?? "Connect toolset"
|
|
453
453
|
}), /* @__PURE__ */ R("p", {
|
|
454
|
-
className: _("text-start", i,
|
|
454
|
+
className: _("text-start", i, Ce.description),
|
|
455
455
|
children: n?.description ?? "Copy endpoint URL to easily integrate toolset into your workflows"
|
|
456
456
|
})]
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */ R("div", { children: /* @__PURE__ */ R(
|
|
458
|
+
/* @__PURE__ */ R("div", { children: /* @__PURE__ */ R(f, {
|
|
459
459
|
copiedLabel: s,
|
|
460
460
|
copyLabel: n?.copyLabel ?? "Copy URL",
|
|
461
461
|
isCopied: a,
|
|
462
462
|
onClick: o
|
|
463
463
|
}) }),
|
|
464
|
-
/* @__PURE__ */ R(
|
|
464
|
+
/* @__PURE__ */ R(M, {
|
|
465
465
|
visuallyHidden: !0,
|
|
466
|
-
as:
|
|
466
|
+
as: oe.Span,
|
|
467
467
|
children: a ? s : ""
|
|
468
468
|
})
|
|
469
469
|
]
|
|
470
470
|
});
|
|
471
|
-
}),
|
|
472
|
-
let [
|
|
471
|
+
}), Te = { connectDivider: "_connectDivider_obfkd_1" }, Ee = ({ form: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, connectUrl: a, listToolNames: o, authActions: s, onOAuthLogin: c, onNotifySuccess: l, onNotifyError: u, onChange: d, onAuthChange: f, onEnsureSaved: p, labels: m, colors: h, typography: v }) => {
|
|
472
|
+
let [y, b] = T(null), x = !!a && !!r, w = C(() => [{
|
|
473
473
|
value: V.Http,
|
|
474
474
|
label: "HTTP"
|
|
475
475
|
}, {
|
|
@@ -478,16 +478,16 @@ var B = {
|
|
|
478
478
|
}], []);
|
|
479
479
|
return S(() => {
|
|
480
480
|
if (!r || !o || !J(e.auth, i)) {
|
|
481
|
-
|
|
481
|
+
b(null);
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
let t = !1;
|
|
485
485
|
return (async () => {
|
|
486
486
|
try {
|
|
487
487
|
let e = await o(r);
|
|
488
|
-
t ||
|
|
488
|
+
t || b(e.length > 0 ? e : null);
|
|
489
489
|
} catch {
|
|
490
|
-
t ||
|
|
490
|
+
t || b(null);
|
|
491
491
|
}
|
|
492
492
|
})(), () => {
|
|
493
493
|
t = !0;
|
|
@@ -501,10 +501,10 @@ var B = {
|
|
|
501
501
|
]), /* @__PURE__ */ z("div", {
|
|
502
502
|
className: "flex max-w-[1060px] flex-col gap-4",
|
|
503
503
|
style: g({
|
|
504
|
-
"--te-connect-title":
|
|
505
|
-
"--te-connect-description":
|
|
506
|
-
"--te-connect-divider":
|
|
507
|
-
"--te-open-access-description":
|
|
504
|
+
"--te-connect-title": h?.connectTitle,
|
|
505
|
+
"--te-connect-description": h?.connectDescription,
|
|
506
|
+
"--te-connect-divider": h?.connectDivider,
|
|
507
|
+
"--te-open-access-description": h?.openAccessDescription
|
|
508
508
|
}),
|
|
509
509
|
children: [
|
|
510
510
|
/* @__PURE__ */ R(j, {
|
|
@@ -512,48 +512,48 @@ var B = {
|
|
|
512
512
|
value: e.endpoint,
|
|
513
513
|
onChange: (e) => d({ endpoint: e ?? "" }),
|
|
514
514
|
labelProps: {
|
|
515
|
-
label:
|
|
515
|
+
label: m?.endpointLabel ?? "Endpoint",
|
|
516
516
|
required: !0
|
|
517
517
|
},
|
|
518
|
-
placeholder:
|
|
519
|
-
caption:
|
|
518
|
+
placeholder: m?.endpointPlaceholder ?? "https://...",
|
|
519
|
+
caption: m?.endpointCaption ?? "The HTTPS address where the server accepts MCP requests. Choose the transport under Protocol below.",
|
|
520
520
|
error: t.endpoint || void 0,
|
|
521
521
|
invalid: !!t.endpoint
|
|
522
522
|
}),
|
|
523
523
|
/* @__PURE__ */ R(F, {
|
|
524
524
|
labelProps: {
|
|
525
|
-
label:
|
|
525
|
+
label: m?.protocolLabel ?? "Protocol",
|
|
526
526
|
required: !0
|
|
527
527
|
},
|
|
528
528
|
id: "toolset-protocol",
|
|
529
|
-
items:
|
|
529
|
+
items: w,
|
|
530
530
|
value: e.protocol,
|
|
531
531
|
onChange: (e) => {
|
|
532
532
|
d({ protocol: e });
|
|
533
533
|
}
|
|
534
534
|
}),
|
|
535
|
-
|
|
535
|
+
y ? /* @__PURE__ */ R(ce, {
|
|
536
536
|
id: "toolset-allowed-tools",
|
|
537
537
|
multiple: !0,
|
|
538
538
|
searchable: !0,
|
|
539
539
|
selectAll: !0,
|
|
540
|
-
labelProps: { label:
|
|
541
|
-
placeholder:
|
|
542
|
-
options:
|
|
540
|
+
labelProps: { label: m?.allowedToolsLabel ?? "Allowed tools" },
|
|
541
|
+
placeholder: m?.allowedToolsSelectPlaceholder ?? "Select allowed tools",
|
|
542
|
+
options: y.map((e) => ({
|
|
543
543
|
value: e,
|
|
544
544
|
label: e
|
|
545
545
|
})),
|
|
546
546
|
value: e.allowedTools,
|
|
547
547
|
onChange: (e) => d({ allowedTools: e })
|
|
548
|
-
}) : /* @__PURE__ */ R(
|
|
548
|
+
}) : /* @__PURE__ */ R(L, {
|
|
549
549
|
id: "toolset-allowed-tools",
|
|
550
|
-
labelProps: { label:
|
|
551
|
-
placeholder:
|
|
550
|
+
labelProps: { label: m?.allowedToolsLabel ?? "Allowed tools" },
|
|
551
|
+
placeholder: m?.allowedToolsPlaceholder ?? "Add tools, comma separated",
|
|
552
552
|
value: e.allowedTools,
|
|
553
553
|
onChange: (e) => d({ allowedTools: e }),
|
|
554
|
-
tagClassName:
|
|
554
|
+
tagClassName: ee
|
|
555
555
|
}),
|
|
556
|
-
/* @__PURE__ */ R(
|
|
556
|
+
/* @__PURE__ */ R(Se, {
|
|
557
557
|
auth: e.auth,
|
|
558
558
|
errors: t,
|
|
559
559
|
isSaving: n,
|
|
@@ -566,20 +566,20 @@ var B = {
|
|
|
566
566
|
onNotifyError: u,
|
|
567
567
|
onAuthChange: f,
|
|
568
568
|
onEnsureSaved: p,
|
|
569
|
-
labels:
|
|
570
|
-
titleClassName:
|
|
571
|
-
openAccessDescriptionClassName:
|
|
569
|
+
labels: m?.auth,
|
|
570
|
+
titleClassName: v?.authTitleClassName,
|
|
571
|
+
openAccessDescriptionClassName: v?.openAccessDescriptionClassName
|
|
572
572
|
}),
|
|
573
|
-
|
|
573
|
+
x && /* @__PURE__ */ R(we, {
|
|
574
574
|
url: a ?? "",
|
|
575
|
-
labels:
|
|
576
|
-
titleClassName:
|
|
577
|
-
descriptionClassName:
|
|
578
|
-
className: _("border-t pt-4",
|
|
575
|
+
labels: m?.connect,
|
|
576
|
+
titleClassName: v?.connectTitleClassName,
|
|
577
|
+
descriptionClassName: v?.connectDescriptionClassName,
|
|
578
|
+
className: _("border-t pt-4", Te.connectDivider)
|
|
579
579
|
})
|
|
580
580
|
]
|
|
581
581
|
});
|
|
582
|
-
},
|
|
582
|
+
}, De = [
|
|
583
583
|
"keyHeader",
|
|
584
584
|
"apiKey",
|
|
585
585
|
"clientId",
|
|
@@ -587,69 +587,69 @@ var B = {
|
|
|
587
587
|
"authorizationEndpoint",
|
|
588
588
|
"tokenEndpoint",
|
|
589
589
|
"resource"
|
|
590
|
-
],
|
|
590
|
+
], Oe = ["endpoint", ...De], $ = new Set(Oe), ke = (e) => {
|
|
591
591
|
let t = {};
|
|
592
592
|
for (let n of Object.keys(e)) $.has(n) && (t[n] = !0);
|
|
593
593
|
return t;
|
|
594
|
-
},
|
|
595
|
-
let N = !!o, [
|
|
594
|
+
}, Ae = ({ initialForm: e, toolsetId: o, onPersist: s, onPostSaveLogin: l, onToolsetsChanged: f, onSaveSuccess: ee, onSaveComplete: g, onBack: _, onDirtyChange: v, buildMcpUrl: b, listToolNames: E, authActions: D, onOAuthLogin: te, onNotifySuccess: ne, onNotifyError: O, avatarPicker: re, availableLocaleOptions: ie, formatLocaleLabel: ae, onRefineDescription: k, labels: A, colors: j, typography: M, isVersionReadOnly: oe = !1 }) => {
|
|
595
|
+
let N = !!o, [se, P] = T(""), F = o || se, [I, ce] = T({
|
|
596
596
|
initialForm: e,
|
|
597
597
|
key: 0
|
|
598
|
-
}), [
|
|
599
|
-
|
|
598
|
+
}), [L, z] = T(e);
|
|
599
|
+
I.initialForm !== e && (ce({
|
|
600
600
|
initialForm: e,
|
|
601
|
-
key:
|
|
602
|
-
}),
|
|
603
|
-
let
|
|
604
|
-
initialValues:
|
|
605
|
-
validationOptions:
|
|
606
|
-
reseedKey:
|
|
607
|
-
}), [
|
|
608
|
-
...
|
|
601
|
+
key: I.key + 1
|
|
602
|
+
}), z(e));
|
|
603
|
+
let V = C(() => _e(e), [e]), le = C(() => he(N), [N]), { values: H, setValues: de, markTouched: U, visibleErrorCodes: W, attemptSubmit: fe } = a({
|
|
604
|
+
initialValues: V,
|
|
605
|
+
validationOptions: le,
|
|
606
|
+
reseedKey: I.key
|
|
607
|
+
}), [pe, K] = T(e), q = C(() => ({
|
|
608
|
+
...pe,
|
|
609
609
|
...H
|
|
610
|
-
}), [
|
|
610
|
+
}), [pe, H]), J = C(() => JSON.stringify(q) !== JSON.stringify(L), [q, L]);
|
|
611
611
|
S(() => {
|
|
612
|
-
|
|
613
|
-
}, [J,
|
|
614
|
-
let [Y, X] = T(!1), [
|
|
612
|
+
v?.(J);
|
|
613
|
+
}, [J, v]);
|
|
614
|
+
let [Y, X] = T(!1), [ye, Z] = T({}), [be, xe] = T({}), Q = w(null);
|
|
615
615
|
S(() => {
|
|
616
|
-
K(e), Q.current = e, Z({}),
|
|
616
|
+
K(e), Q.current = e, Z({}), xe({}), P("");
|
|
617
617
|
}, [e]);
|
|
618
|
-
let
|
|
619
|
-
let { metadata: t, setup: n } =
|
|
620
|
-
Object.keys(t).length > 0 && (
|
|
618
|
+
let Se = x((e) => {
|
|
619
|
+
let { metadata: t, setup: n } = ve(e);
|
|
620
|
+
Object.keys(t).length > 0 && (de(t), "name" in t && U(r.Name), "version" in t && U(r.Version)), Object.keys(n).length !== 0 && (K((e) => ({
|
|
621
621
|
...e,
|
|
622
622
|
...n
|
|
623
|
-
})),
|
|
623
|
+
})), xe((e) => ({
|
|
624
624
|
...e,
|
|
625
|
-
...
|
|
625
|
+
...ke(n)
|
|
626
626
|
})), Z((e) => {
|
|
627
627
|
let t = { ...e };
|
|
628
628
|
for (let e of Object.keys(n)) delete t[e];
|
|
629
629
|
return t;
|
|
630
630
|
}));
|
|
631
|
-
}, [
|
|
631
|
+
}, [de, U]), Ce = x((e) => {
|
|
632
632
|
K((t) => ({
|
|
633
633
|
...t,
|
|
634
634
|
auth: {
|
|
635
635
|
...t.auth,
|
|
636
636
|
...e
|
|
637
637
|
}
|
|
638
|
-
})),
|
|
638
|
+
})), xe((t) => ({
|
|
639
639
|
...t,
|
|
640
|
-
...
|
|
640
|
+
...ke(e)
|
|
641
641
|
})), Z((t) => {
|
|
642
642
|
let n = { ...t };
|
|
643
|
-
if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of
|
|
643
|
+
if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of De) delete n[e];
|
|
644
644
|
else for (let t of Object.keys(e)) delete n[t];
|
|
645
645
|
return n;
|
|
646
|
-
}), "isLoggedIn" in e &&
|
|
647
|
-
}, [
|
|
648
|
-
if (
|
|
646
|
+
}), "isLoggedIn" in e && f();
|
|
647
|
+
}, [f]), we = x(async () => {
|
|
648
|
+
if (F && Q.current != null && JSON.stringify(Q.current) === JSON.stringify(q)) return F;
|
|
649
649
|
X(!0);
|
|
650
650
|
try {
|
|
651
|
-
let e = await
|
|
652
|
-
return e ? (
|
|
651
|
+
let e = await s(q, F);
|
|
652
|
+
return e ? (F || P(e), Q.current = q, z(q), v?.(!1), await f(), e) : null;
|
|
653
653
|
} catch {
|
|
654
654
|
return null;
|
|
655
655
|
} finally {
|
|
@@ -657,126 +657,126 @@ var B = {
|
|
|
657
657
|
}
|
|
658
658
|
}, [
|
|
659
659
|
q,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
]),
|
|
665
|
-
let t =
|
|
666
|
-
return e.endpoint.trim() ? G(e.endpoint) || (n.endpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL") : n.endpoint = t?.endpointRequired ?? "Endpoint is required", e.auth.isLoggedIn || (e.auth.authenticationType ===
|
|
667
|
-
}, [
|
|
668
|
-
let e =
|
|
660
|
+
F,
|
|
661
|
+
s,
|
|
662
|
+
f,
|
|
663
|
+
v
|
|
664
|
+
]), Te = x(async () => await we() ?? !1, [we]), $ = x((e) => {
|
|
665
|
+
let t = A?.validation, n = {};
|
|
666
|
+
return e.endpoint.trim() ? G(e.endpoint) || (n.endpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL") : n.endpoint = t?.endpointRequired ?? "Endpoint is required", e.auth.isLoggedIn || (e.auth.authenticationType === c.ApiKey && (e.auth.keyHeader?.trim() || (n.keyHeader = t?.keyHeaderRequired ?? "Key name is required"), e.auth.withLogin === u.WithLogin && !e.auth.apiKey?.trim() && (n.apiKey = t?.apiKeyRequired ?? "API key is required")), e.auth.authenticationType === c.OAuth && e.auth.withLogin === u.WithConfig && (e.auth.clientId?.trim() || (n.clientId = t?.clientIdRequired ?? "Client ID is required"), !N && !e.auth.clientSecret?.trim() && (n.clientSecret = t?.clientSecretRequired ?? "Client secret is required"), e.auth.authorizationEndpoint?.trim() ? G(e.auth.authorizationEndpoint) || (n.authorizationEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL") : n.authorizationEndpoint = t?.authorizationEndpointRequired ?? "Authorization endpoint is required", e.auth.tokenEndpoint?.trim() ? G(e.auth.tokenEndpoint) || (n.tokenEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL") : n.tokenEndpoint = t?.tokenEndpointRequired ?? "Token endpoint is required", me(e.auth.resource) || (n.resource = t?.resourceInvalid ?? "Enter an absolute URI without a fragment"))), n;
|
|
667
|
+
}, [A, N]), Ae = x(async () => {
|
|
668
|
+
let e = fe(), t = $(q);
|
|
669
669
|
if (!e || Object.keys(t).length > 0) Z(t);
|
|
670
670
|
else {
|
|
671
671
|
Z({}), X(!0);
|
|
672
672
|
try {
|
|
673
|
-
let e = await
|
|
673
|
+
let e = await s(q, F);
|
|
674
674
|
if (!e) return;
|
|
675
|
-
|
|
675
|
+
z(q), await f(), ee(q);
|
|
676
676
|
try {
|
|
677
|
-
await
|
|
677
|
+
await l(e, q.auth), g();
|
|
678
678
|
} catch (e) {
|
|
679
|
-
let { traceId: t } = await
|
|
680
|
-
|
|
679
|
+
let { traceId: t } = await d(e);
|
|
680
|
+
O(A?.settings?.auth?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
|
|
681
681
|
}
|
|
682
682
|
} catch {} finally {
|
|
683
683
|
X(!1);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
}, [
|
|
687
|
-
|
|
687
|
+
fe,
|
|
688
688
|
q,
|
|
689
689
|
$,
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
F,
|
|
691
|
+
s,
|
|
692
|
+
f,
|
|
693
|
+
ee,
|
|
693
694
|
g,
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
]), Ae = y({
|
|
695
|
+
l,
|
|
696
|
+
O,
|
|
697
|
+
A
|
|
698
|
+
]), je = y({
|
|
699
699
|
value: H.description,
|
|
700
|
-
onChange: (e) =>
|
|
701
|
-
onRefine:
|
|
700
|
+
onChange: (e) => Se({ description: e }),
|
|
701
|
+
onRefine: k,
|
|
702
702
|
disabled: Y,
|
|
703
|
-
resetKey:
|
|
704
|
-
}),
|
|
703
|
+
resetKey: I.key
|
|
704
|
+
}), Me = k ? (e, t) => /* @__PURE__ */ R(h, {
|
|
705
705
|
isEnabled: !0,
|
|
706
706
|
fieldId: t,
|
|
707
|
-
label:
|
|
708
|
-
labels:
|
|
709
|
-
refinement:
|
|
710
|
-
disabled:
|
|
707
|
+
label: A?.general?.form?.description.label ?? "Description",
|
|
708
|
+
labels: A?.refinement,
|
|
709
|
+
refinement: je,
|
|
710
|
+
disabled: je.isPending || Y,
|
|
711
711
|
children: e
|
|
712
|
-
}) : void 0,
|
|
713
|
-
form:
|
|
714
|
-
avatarPicker:
|
|
715
|
-
}), [
|
|
716
|
-
let e =
|
|
717
|
-
for (let e of
|
|
718
|
-
if (!
|
|
712
|
+
}) : void 0, Ne = C(() => ({
|
|
713
|
+
form: A?.general?.form ?? ue,
|
|
714
|
+
avatarPicker: A?.general?.avatarPicker
|
|
715
|
+
}), [A?.general?.form, A?.general?.avatarPicker]), Pe = C(() => !ge(q, N), [q, N]), Fe = C(() => {
|
|
716
|
+
let e = A?.validation, n = $(q), r = { ...ye };
|
|
717
|
+
for (let e of Oe) {
|
|
718
|
+
if (!be[e]) continue;
|
|
719
719
|
let t = n[e];
|
|
720
720
|
t ? r[e] = t : delete r[e];
|
|
721
721
|
}
|
|
722
|
-
return W.name === t.Required ? r.name = e?.nameRequired ?? "Name is required" : W.name === t.TooLong ? r.name = e?.nameTooLong ?? `Use ${
|
|
722
|
+
return W.name === t.Required ? r.name = e?.nameRequired ?? "Name is required" : W.name === t.TooLong ? r.name = e?.nameTooLong ?? `Use ${m} characters or fewer.` : W.name === t.ControlCharacters && (r.name = e?.nameControlCharacters ?? "Remove line breaks, tabs and other control characters."), W.description === t.TooLong && (r.description = e?.descriptionTooLong ?? `Use ${p} characters or fewer.`), W.version === t.InvalidFormat && (r.version = e?.versionInvalid ?? "Version may only contain letters, digits, dots, underscores, plus signs and hyphens, up to 64 characters; it cannot end with a dot, contain two underscores in a row, or start with an underscore"), r;
|
|
723
723
|
}, [
|
|
724
|
-
|
|
725
|
-
|
|
724
|
+
be,
|
|
725
|
+
ye,
|
|
726
726
|
q,
|
|
727
|
-
|
|
727
|
+
A,
|
|
728
728
|
W,
|
|
729
729
|
$
|
|
730
|
-
]),
|
|
730
|
+
]), Ie = b && F ? b(F) : void 0;
|
|
731
731
|
return /* @__PURE__ */ R(n, {
|
|
732
|
-
title: N ?
|
|
733
|
-
onBack:
|
|
734
|
-
onCancel:
|
|
735
|
-
onSubmit:
|
|
736
|
-
submitLabel: N ?
|
|
732
|
+
title: N ? A?.layout?.editTitle ?? "Edit toolset" : A?.layout?.createTitle ?? "Create toolset",
|
|
733
|
+
onBack: _,
|
|
734
|
+
onCancel: _,
|
|
735
|
+
onSubmit: Ae,
|
|
736
|
+
submitLabel: N ? A?.layout?.saveLabel ?? "Save" : A?.layout?.createLabel ?? "Create",
|
|
737
737
|
isSubmitting: Y,
|
|
738
|
-
isSubmitDisabled:
|
|
738
|
+
isSubmitDisabled: Pe || je.isPending,
|
|
739
739
|
metadataSectionClassName: B.metadataSection,
|
|
740
740
|
setupSectionClassName: B.setupSection,
|
|
741
741
|
labels: {
|
|
742
|
-
backAriaLabel:
|
|
743
|
-
savingStatusLabel:
|
|
744
|
-
metadataTitle:
|
|
745
|
-
setupTitle:
|
|
746
|
-
cancelLabel:
|
|
742
|
+
backAriaLabel: A?.layout?.backAriaLabel ?? "Back to catalog",
|
|
743
|
+
savingStatusLabel: A?.layout?.savingStatusLabel ?? "Saving",
|
|
744
|
+
metadataTitle: A?.layout?.metadataSectionTitle ?? "Metadata",
|
|
745
|
+
setupTitle: A?.layout?.setupSectionTitle ?? "Setup",
|
|
746
|
+
cancelLabel: A?.layout?.cancelLabel ?? "Cancel"
|
|
747
747
|
},
|
|
748
748
|
metadata: /* @__PURE__ */ R(i, {
|
|
749
749
|
values: q,
|
|
750
|
-
errors:
|
|
751
|
-
onChange:
|
|
752
|
-
avatarPicker:
|
|
753
|
-
availableLocaleOptions:
|
|
754
|
-
formatLocaleLabel:
|
|
755
|
-
renderDescription:
|
|
756
|
-
labels:
|
|
750
|
+
errors: Fe,
|
|
751
|
+
onChange: Se,
|
|
752
|
+
avatarPicker: re,
|
|
753
|
+
availableLocaleOptions: ie,
|
|
754
|
+
formatLocaleLabel: ae,
|
|
755
|
+
renderDescription: Me,
|
|
756
|
+
labels: Ne,
|
|
757
757
|
isVersionReadOnly: oe,
|
|
758
|
-
versionReadOnlyTooltip:
|
|
758
|
+
versionReadOnlyTooltip: A?.versionReadOnlyTooltip
|
|
759
759
|
}),
|
|
760
|
-
setup: /* @__PURE__ */ R(
|
|
760
|
+
setup: /* @__PURE__ */ R(Ee, {
|
|
761
761
|
form: q,
|
|
762
|
-
errors:
|
|
762
|
+
errors: Fe,
|
|
763
763
|
isSaving: Y,
|
|
764
|
-
toolsetId:
|
|
764
|
+
toolsetId: F,
|
|
765
765
|
isEditMode: N,
|
|
766
|
-
connectUrl:
|
|
767
|
-
listToolNames:
|
|
768
|
-
authActions:
|
|
769
|
-
onOAuthLogin:
|
|
770
|
-
onNotifySuccess:
|
|
771
|
-
onNotifyError:
|
|
772
|
-
onChange:
|
|
773
|
-
onAuthChange:
|
|
774
|
-
onEnsureSaved:
|
|
775
|
-
labels:
|
|
776
|
-
colors:
|
|
766
|
+
connectUrl: Ie,
|
|
767
|
+
listToolNames: E,
|
|
768
|
+
authActions: D,
|
|
769
|
+
onOAuthLogin: te,
|
|
770
|
+
onNotifySuccess: ne,
|
|
771
|
+
onNotifyError: O,
|
|
772
|
+
onChange: Se,
|
|
773
|
+
onAuthChange: Ce,
|
|
774
|
+
onEnsureSaved: Te,
|
|
775
|
+
labels: A?.settings,
|
|
776
|
+
colors: j?.settings,
|
|
777
777
|
typography: M?.settings
|
|
778
778
|
})
|
|
779
779
|
});
|
|
780
780
|
};
|
|
781
781
|
//#endregion
|
|
782
|
-
export { H as AUTH_TYPE_ICONS,
|
|
782
|
+
export { H as AUTH_TYPE_ICONS, le as DEFAULT_TOOLSET_VERSION, B as TOOLSET_EDITOR_CLASS, Ae as ToolsetEditor, X as ToolsetOAuthLoginStatus, V as ToolsetTransportType, U as getDefaultToolsetForm, J as isToolsetAuthValid, ge as isToolsetFormValid, G as isValidEndpointUrl, q as normalizeReturnedEndpointUrl };
|
|
@@ -14,7 +14,7 @@ export interface ToolsetEditorValidationLabels {
|
|
|
14
14
|
nameControlCharacters?: string;
|
|
15
15
|
/** Message for a description over the shared length limit. Defaults to `'Use 2000 characters or fewer.'`. */
|
|
16
16
|
descriptionTooLong?: string;
|
|
17
|
-
/** Message for a malformed version. Defaults to `'Version may only contain letters, digits, dots, underscores, and
|
|
17
|
+
/** Message for a malformed version. Defaults to `'Version may only contain letters, digits, dots, underscores, plus signs and hyphens, up to 64 characters; it cannot end with a dot, contain two underscores in a row, or start with an underscore'`. */
|
|
18
18
|
versionInvalid?: string;
|
|
19
19
|
/** Message for a missing endpoint. Defaults to `'Endpoint is required'`. */
|
|
20
20
|
endpointRequired?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolset-editor-props.d.ts","sourceRoot":"","sources":["../../src/models/toolset-editor-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EAClC,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,yFAAyF;AACzF,MAAM,WAAW,6BAA6B;IAC5C,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gIAAgI;IAChI,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6GAA6G;IAC7G,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"toolset-editor-props.d.ts","sourceRoot":"","sources":["../../src/models/toolset-editor-props.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-toolset-editor",
|
|
3
3
|
"description": "Host-agnostic form for authoring and editing a DIAL MCP toolset",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0-dev.101",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@tabler/icons-react": "^3.50.0",
|
|
25
|
-
"@epam/ai-dial-builder-form": "1.
|
|
25
|
+
"@epam/ai-dial-builder-form": "1.4.0-dev.101"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@epam/ai-dial-chat-hooks": "1.
|
|
29
|
-
"@epam/ai-dial-chat-shared": "1.
|
|
28
|
+
"@epam/ai-dial-chat-hooks": "1.4.0-dev.101",
|
|
29
|
+
"@epam/ai-dial-chat-shared": "1.4.0-dev.101",
|
|
30
30
|
"@epam/ai-dial-ui-kit": "^0.16.0",
|
|
31
31
|
"react": "^19.2.8"
|
|
32
32
|
},
|
package/utils/toolsets.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeploymentCreationFormValues } from '../../../builder-form/src/index.ts';
|
|
1
|
+
import { DeploymentCreationFormValidationOptions, DeploymentCreationFormValues } from '../../../builder-form/src/index.ts';
|
|
2
2
|
import { ToolsetAuthFormData, ToolsetFormData } from '../models/toolset-form';
|
|
3
3
|
/** Returns the form state a brand-new toolset editor opens with: an empty name and the default version. */
|
|
4
4
|
export declare const getDefaultToolsetForm: () => ToolsetFormData;
|
|
@@ -21,6 +21,8 @@ export declare const normalizeReturnedEndpointUrl: (value?: string) => string;
|
|
|
21
21
|
* saveable without forcing the user to retype a secret they can't see.
|
|
22
22
|
*/
|
|
23
23
|
export declare const isToolsetAuthValid: (auth: ToolsetAuthFormData, isEditMode?: boolean) => boolean;
|
|
24
|
+
/** Returns the metadata validation options of the editor for the given mode. */
|
|
25
|
+
export declare const getToolsetMetadataValidationOptions: (isEditMode: boolean) => DeploymentCreationFormValidationOptions;
|
|
24
26
|
/** Returns whether the editor form can be saved without surfacing validation errors. */
|
|
25
27
|
export declare const isToolsetFormValid: (form: ToolsetFormData, isEditMode?: boolean) => boolean;
|
|
26
28
|
/** Returns the Metadata-section slice of a toolset form. */
|
package/utils/toolsets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uCAAuC,EAC5C,KAAK,4BAA4B,EAClC,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAQhC,2GAA2G;AAC3G,eAAO,MAAM,qBAAqB,QAAO,eAWvC,CAAC;AAmBH,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,OACR,CAAC;AAW5C,gHAAgH;AAChH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,OAcrD,CAAC;AAKF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,MAAM,KAAG,MAkB7D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,mBAAmB,EACzB,oBAAkB,KACjB,OAoBF,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,mCAAmC,GAC9C,YAAY,OAAO,KAClB,uCACkE,CAAC;AAEtE,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,eAAe,EACrB,oBAAkB,KACjB,OAQwC,CAAC;AAW5C,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,GAC9B,MAAM,eAAe,KACpB,4BAOD,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,GAChC,OAAO,OAAO,CAAC,eAAe,CAAC,KAC9B;IACD,QAAQ,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAChD,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAWjC,CAAC"}
|