@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":"AAmBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAiD5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkehD,CAAC"}
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 s, ToolsetCredentialsLevel as c, WithLogin as l, getApiErrorDetails as u } from "@epam/ai-dial-chat-hooks";
3
- import { CopyButton as d, ENTITY_DESCRIPTION_MAX_LENGTH as f, ENTITY_NAME_MAX_LENGTH as p, TAG_INPUT_TAG_CLASS_NAME as m, TextRefinementField as h, buildCssVars as g, mergeClasses as _, useCodeCopy as v, useTextRefinement as y } from "@epam/ai-dial-chat-shared";
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 O, IconLogin as ee, IconLogout as te } from "@tabler/icons-react";
6
- import { CaptionText as k, ConfirmationPopup as ne, ConfirmationPopupVariant as re, DIAL_ICON_SIZE as ie, DIAL_KIT_ICON_STROKE as A, Input as j, LiveRegion as ae, LiveRegionElement as M, NeutralButton as oe, PasswordInput as N, Radio as P, RadioGroup as F, SegmentedControl as I, Select as L, TagInput as se } from "@epam/ai-dial-ui-kit";
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
- }({}), ce = e, le = {
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
- [s.OAuth]: E,
55
- [s.ApiKey]: D,
56
- [s.None]: O
57
- }, ue = () => ({
58
- authenticationType: s.None,
59
- withLogin: l.WithoutLogin,
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: ce,
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: ue()
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()), de = /^[A-Za-z][A-Za-z0-9+.-]*:[^\s#]+$/, fe = 2048, pe = (e) => {
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 > fe || !de.test(t)) return !1;
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 === s.ApiKey ? e.keyHeader?.trim() ? e.withLogin === l.WithoutLogin || !!(e.keyHeader?.trim() && e.apiKey?.trim()) : !1 : e.authenticationType === s.OAuth && e.withLogin === l.WithConfig ? !!e.clientId?.trim() && (t || !!e.clientSecret?.trim()) && G(e.authorizationEndpoint ?? "") && G(e.tokenEndpoint ?? "") && pe(e.resource) : !0, me = (e, t = !1) => Object.keys(o(e, { validateVersionPattern: !0 })).length === 0 && G(e.endpoint) && J(e.auth, t), Y = /* @__PURE__ */ new Set([
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
- ]), he = (e) => ({
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
- }), ge = (e) => {
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
- }({}), _e = { openAccessDescription: "_openAccessDescription_1ltst_1" }, Z = "toolset-client-secret-keep-caption", ve = (e) => `******${e}`, ye = (e) => e === s.None ? l.WithoutLogin : l.WithLogin, Q = (e, t) => e === s.None ? t?.typeNone ?? "Open access" : e === s.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", be = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: o, onOAuthLogin: d, onNotifySuccess: f, onNotifyError: p, onAuthChange: h, onEnsureSaved: g, labels: v, titleClassName: y = "dial-h3-text", openAccessDescriptionClassName: b = "dial-small-text" }) => {
125
- let [x, S] = T(!1), [C, w] = T(!1), E = e.isLoggedIn || n || x, D = i && e.clientSecretHint && !e.clientSecret ? e.clientSecretHint : void 0, O = G(a) && J(e, i) && !E, ae = (t) => {
126
- E || t === e.authenticationType || h({
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: ye(t)
128
+ withLogin: xe(t)
129
129
  });
130
130
  }, M = (e) => {
131
- h({ withLogin: e });
132
- }, F = (e) => {
133
- switch (e.auth != null && h(e.auth), e.status) {
131
+ m({ withLogin: e });
132
+ }, oe = (e) => {
133
+ switch (e.auth != null && m(e.auth), e.status) {
134
134
  case X.Success:
135
- h({ isLoggedIn: !0 }), f(v?.loginSuccessMessage ?? "Successfully logged in.");
135
+ m({ isLoggedIn: !0 }), f(g?.loginSuccessMessage ?? "Successfully logged in.");
136
136
  return;
137
137
  case X.PopupBlocked:
138
- p(v?.errorPopupBlocked ?? "The login popup was blocked by your browser. Please allow popups for this site and try again.");
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(v?.errorOAuthConfigMissing ?? "The OAuth provider did not return a valid client configuration. Please check the endpoint or contact your administrator.");
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(v?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", e.traceId);
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
- }, L = async () => {
149
- if (!O) return;
150
- if (e.authenticationType === s.OAuth) {
151
- S(!0);
148
+ }, F = async () => {
149
+ if (!D) return;
150
+ if (e.authenticationType === c.OAuth) {
151
+ x(!0);
152
152
  try {
153
- F(await d({
153
+ oe(await s({
154
154
  auth: e,
155
- ensureSaved: g
155
+ ensureSaved: h
156
156
  }));
157
157
  } finally {
158
- S(!1);
158
+ x(!1);
159
159
  }
160
160
  return;
161
161
  }
162
- let t = await g();
162
+ let t = await h();
163
163
  if (t) {
164
- S(!0);
164
+ x(!0);
165
165
  try {
166
166
  let n = {
167
167
  url: t,
168
- credentialsLevel: c.User,
168
+ credentialsLevel: l.User,
169
169
  authenticationType: e.authenticationType,
170
170
  apiKey: e.apiKey?.trim()
171
171
  };
172
- await o.login(t, n), h({ isLoggedIn: !0 }), f(v?.loginSuccessMessage ?? "Successfully logged in.");
172
+ await o.login(t, n), m({ isLoggedIn: !0 }), f(g?.loginSuccessMessage ?? "Successfully logged in.");
173
173
  } catch (e) {
174
- let { traceId: t } = await u(e);
175
- p(v?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
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
- S(!1);
177
+ x(!1);
178
178
  }
179
179
  }
180
- }, B = async () => {
181
- S(!0);
180
+ }, ce = async () => {
181
+ x(!0);
182
182
  try {
183
183
  let t = {
184
184
  url: r,
185
- credentialsLevel: c.User,
185
+ credentialsLevel: l.User,
186
186
  authenticationType: e.authenticationType
187
187
  };
188
- await o.logout(r, t), h({ isLoggedIn: !1 }), w(!1), f(v?.logoutSuccessMessage ?? "Successfully logged out.");
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 u(e);
191
- p(v?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
190
+ let { traceId: t } = await d(e);
191
+ p(g?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
192
192
  } finally {
193
- S(!1);
193
+ x(!1);
194
194
  }
195
- }, V = () => e.isLoggedIn ? /* @__PURE__ */ R("div", {
195
+ }, B = () => e.isLoggedIn ? /* @__PURE__ */ R("div", {
196
196
  className: "flex",
197
- children: /* @__PURE__ */ R(oe, {
198
- label: v?.logOutLabel ?? "Log out",
199
- iconBefore: /* @__PURE__ */ R(te, {
200
- size: ie.MD,
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: () => w(!0),
204
- disabled: n || x
203
+ onClick: () => C(!0),
204
+ disabled: n || b
205
205
  })
206
206
  }) : /* @__PURE__ */ R("div", {
207
207
  className: "flex",
208
- children: /* @__PURE__ */ R(oe, {
209
- label: v?.logInLabel ?? "Log in",
210
- iconBefore: /* @__PURE__ */ R(ee, {
211
- size: ie.MD,
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: L,
215
- disabled: !O
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: y,
223
- children: v?.sectionTitle ?? "Authentication"
222
+ className: v,
223
+ children: g?.sectionTitle ?? "Authentication"
224
224
  }),
225
225
  /* @__PURE__ */ R(I, {
226
- "aria-label": v?.sectionTitle ?? "Authentication",
226
+ "aria-label": g?.sectionTitle ?? "Authentication",
227
227
  value: e.authenticationType,
228
- onChange: (e) => ae(e),
228
+ onChange: (e) => te(e),
229
229
  segmentClassName: "px-2",
230
230
  items: [
231
- s.None,
232
- s.OAuth,
233
- s.ApiKey
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: ie.SM,
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, v)
247
+ children: Q(t, g)
248
248
  })]
249
249
  }),
250
- disabled: E && e.authenticationType !== t
250
+ disabled: w && e.authenticationType !== t
251
251
  };
252
252
  })
253
253
  }),
254
- e.authenticationType === s.None && /* @__PURE__ */ R("p", {
255
- className: _("pt-2", b, _e.openAccessDescription),
256
- children: v?.openAccessDescription ?? "Open endpoint, no credentials"
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 === s.OAuth && /* @__PURE__ */ z("div", {
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: l.WithLogin,
267
- labelProps: { label: v?.withLoginOAuthLabel ?? "Standard login" },
268
- isSelected: e.withLogin === l.WithLogin,
269
- disabled: E,
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: l.WithConfig,
275
- labelProps: { label: v?.withConfigOAuthLabel ?? "Custom login" },
276
- isSelected: e.withLogin === l.WithConfig,
277
- disabled: E,
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 === l.WithConfig && /* @__PURE__ */ z("div", {
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) => h({ clientId: e ?? "" }),
287
+ onChange: (e) => m({ clientId: e ?? "" }),
288
288
  labelProps: {
289
- label: v?.clientIdLabel ?? "Client ID",
289
+ label: g?.clientIdLabel ?? "Client ID",
290
290
  required: !0
291
291
  },
292
- placeholder: v?.clientIdPlaceholder ?? "Enter client ID",
292
+ placeholder: g?.clientIdPlaceholder ?? "Enter client ID",
293
293
  error: t.clientId || void 0,
294
294
  invalid: !!t.clientId,
295
- disabled: E
295
+ disabled: w
296
296
  }),
297
297
  /* @__PURE__ */ z("div", {
298
298
  className: "flex flex-col gap-1",
299
- children: [/* @__PURE__ */ R(N, {
299
+ children: [/* @__PURE__ */ R(se, {
300
300
  id: "toolset-client-secret",
301
301
  value: e.clientSecret ?? "",
302
- onChange: (e) => h({ clientSecret: e ?? "" }),
302
+ onChange: (e) => m({ clientSecret: e ?? "" }),
303
303
  labelProps: {
304
- label: v?.clientSecretLabel ?? "Client secret",
304
+ label: g?.clientSecretLabel ?? "Client secret",
305
305
  required: !i
306
306
  },
307
- placeholder: D == null ? v?.clientSecretPlaceholder ?? "Enter client secret" : (v?.clientSecretHintPlaceholder ?? ve)(D),
308
- "aria-describedby": D == null ? void 0 : Z,
309
- showPasswordLabel: v?.showClientSecretLabel ?? "Show client secret",
310
- hidePasswordLabel: v?.hideClientSecretLabel ?? "Hide client secret",
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: E
314
- }), D != null && /* @__PURE__ */ R(k, {
313
+ disabled: w
314
+ }), E != null && /* @__PURE__ */ R(re, {
315
315
  id: Z,
316
- text: v?.clientSecretKeepCaption ?? "Leave empty to keep the saved secret."
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) => h({ authorizationEndpoint: e ?? "" }),
322
+ onChange: (e) => m({ authorizationEndpoint: e ?? "" }),
323
323
  labelProps: {
324
- label: v?.authorizationEndpointLabel ?? "Authorization endpoint",
324
+ label: g?.authorizationEndpointLabel ?? "Authorization endpoint",
325
325
  required: !0
326
326
  },
327
- placeholder: v?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
327
+ placeholder: g?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
328
328
  error: t.authorizationEndpoint || void 0,
329
329
  invalid: !!t.authorizationEndpoint,
330
- disabled: E
330
+ disabled: w
331
331
  }),
332
332
  /* @__PURE__ */ R(j, {
333
333
  id: "toolset-token-endpoint",
334
334
  value: e.tokenEndpoint ?? "",
335
- onChange: (e) => h({ tokenEndpoint: e ?? "" }),
335
+ onChange: (e) => m({ tokenEndpoint: e ?? "" }),
336
336
  labelProps: {
337
- label: v?.tokenEndpointLabel ?? "Token endpoint",
337
+ label: g?.tokenEndpointLabel ?? "Token endpoint",
338
338
  required: !0
339
339
  },
340
- placeholder: v?.tokenEndpointPlaceholder ?? "Enter token endpoint",
340
+ placeholder: g?.tokenEndpointPlaceholder ?? "Enter token endpoint",
341
341
  error: t.tokenEndpoint || void 0,
342
342
  invalid: !!t.tokenEndpoint,
343
- disabled: E
343
+ disabled: w
344
344
  }),
345
- /* @__PURE__ */ R(se, {
345
+ /* @__PURE__ */ R(L, {
346
346
  id: "toolset-scopes",
347
- labelProps: { label: v?.scopesLabel ?? "Scopes" },
348
- placeholder: v?.scopesPlaceholder ?? "Enter scopes",
347
+ labelProps: { label: g?.scopesLabel ?? "Scopes" },
348
+ placeholder: g?.scopesPlaceholder ?? "Enter scopes",
349
349
  value: e.scopes ?? [],
350
- onChange: (e) => h({ scopes: e }),
351
- disabled: E,
352
- tagClassName: m
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) => h({ resource: e ?? "" }),
358
- labelProps: { label: v?.resourceLabel ?? "Resource" },
359
- placeholder: v?.resourcePlaceholder ?? "Enter resource URI",
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: E
362
+ disabled: w
363
363
  })
364
364
  ]
365
365
  }),
366
- V()
366
+ B()
367
367
  ]
368
368
  }),
369
- e.authenticationType === s.ApiKey && /* @__PURE__ */ z("div", {
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: l.WithLogin,
378
- labelProps: { label: v?.withLoginLabel ?? "With login" },
379
- isSelected: e.withLogin === l.WithLogin,
380
- disabled: E,
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: l.WithoutLogin,
386
- labelProps: { label: v?.withoutLoginLabel ?? "Without login" },
387
- isSelected: e.withLogin === l.WithoutLogin,
388
- disabled: E,
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) => h({ keyHeader: e ?? "" }),
397
+ onChange: (e) => m({ keyHeader: e ?? "" }),
398
398
  labelProps: {
399
- label: v?.keyHeaderLabel ?? "API Key parameter name",
399
+ label: g?.keyHeaderLabel ?? "API Key parameter name",
400
400
  required: !0
401
401
  },
402
- placeholder: v?.keyHeaderPlaceholder ?? "Enter API key parameter name",
402
+ placeholder: g?.keyHeaderPlaceholder ?? "Enter API key parameter name",
403
403
  error: t.keyHeader || void 0,
404
404
  invalid: !!t.keyHeader,
405
- disabled: E
406
- }), e.withLogin === l.WithLogin && /* @__PURE__ */ R(N, {
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) => h({ apiKey: e ?? "" }),
409
+ onChange: (e) => m({ apiKey: e ?? "" }),
410
410
  labelProps: {
411
- label: v?.apiKeyLabel ?? "API key",
411
+ label: g?.apiKeyLabel ?? "API key",
412
412
  required: !0
413
413
  },
414
- placeholder: v?.apiKeyPlaceholder ?? "Enter API key",
415
- showPasswordLabel: v?.showApiKeyLabel ?? "Show API key",
416
- hidePasswordLabel: v?.hideApiKeyLabel ?? "Hide API key",
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: E
419
+ disabled: w
420
420
  })]
421
421
  }),
422
- e.withLogin !== l.WithoutLogin && V()
422
+ e.withLogin !== u.WithoutLogin && B()
423
423
  ]
424
424
  }),
425
- C && /* @__PURE__ */ R(ne, {
426
- open: C,
427
- header: v?.logoutConfirmTitle ?? "Log out?",
428
- description: v?.logoutConfirmDescription ?? "Are you sure you want to log out? You will need to re-enter your credentials to use this toolset again.",
429
- confirmLabel: v?.logOutLabel ?? "Log out",
430
- cancelLabel: v?.cancelLabel ?? "Cancel",
431
- variant: re.Danger,
432
- isLoading: x,
433
- disableConfirmButton: x,
434
- onConfirm: B,
435
- onCancel: () => w(!1),
436
- onClose: () => w(!1)
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
- }, xe = {
440
+ }, Ce = {
441
441
  title: "_title_17wsg_1",
442
442
  description: "_description_17wsg_5"
443
- }, Se = b(({ url: e, className: t, labels: n, titleClassName: r = "dial-body-semi-text", descriptionClassName: i = "dial-small-text" }) => {
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, xe.title),
451
+ className: _("text-start", r, Ce.title),
452
452
  children: n?.title ?? "Connect toolset"
453
453
  }), /* @__PURE__ */ R("p", {
454
- className: _("text-start", i, xe.description),
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(d, {
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(ae, {
464
+ /* @__PURE__ */ R(M, {
465
465
  visuallyHidden: !0,
466
- as: M.Span,
466
+ as: oe.Span,
467
467
  children: a ? s : ""
468
468
  })
469
469
  ]
470
470
  });
471
- }), Ce = { connectDivider: "_connectDivider_obfkd_1" }, we = ({ 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: h, colors: v, typography: y }) => {
472
- let [b, x] = T(null), w = !!a && !!r, E = C(() => [{
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
- x(null);
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 || x(e.length > 0 ? e : null);
488
+ t || b(e.length > 0 ? e : null);
489
489
  } catch {
490
- t || x(null);
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": v?.connectTitle,
505
- "--te-connect-description": v?.connectDescription,
506
- "--te-connect-divider": v?.connectDivider,
507
- "--te-open-access-description": v?.openAccessDescription
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: h?.endpointLabel ?? "Endpoint",
515
+ label: m?.endpointLabel ?? "Endpoint",
516
516
  required: !0
517
517
  },
518
- placeholder: h?.endpointPlaceholder ?? "https://...",
519
- caption: h?.endpointCaption ?? "The HTTPS address where the server accepts MCP requests. Choose the transport under Protocol below.",
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: h?.protocolLabel ?? "Protocol",
525
+ label: m?.protocolLabel ?? "Protocol",
526
526
  required: !0
527
527
  },
528
528
  id: "toolset-protocol",
529
- items: E,
529
+ items: w,
530
530
  value: e.protocol,
531
531
  onChange: (e) => {
532
532
  d({ protocol: e });
533
533
  }
534
534
  }),
535
- b ? /* @__PURE__ */ R(L, {
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: h?.allowedToolsLabel ?? "Allowed tools" },
541
- placeholder: h?.allowedToolsSelectPlaceholder ?? "Select allowed tools",
542
- options: b.map((e) => ({
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(se, {
548
+ }) : /* @__PURE__ */ R(L, {
549
549
  id: "toolset-allowed-tools",
550
- labelProps: { label: h?.allowedToolsLabel ?? "Allowed tools" },
551
- placeholder: h?.allowedToolsPlaceholder ?? "Add tools, comma separated",
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: m
554
+ tagClassName: ee
555
555
  }),
556
- /* @__PURE__ */ R(be, {
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: h?.auth,
570
- titleClassName: y?.authTitleClassName,
571
- openAccessDescriptionClassName: y?.openAccessDescriptionClassName
569
+ labels: m?.auth,
570
+ titleClassName: v?.authTitleClassName,
571
+ openAccessDescriptionClassName: v?.openAccessDescriptionClassName
572
572
  }),
573
- w && /* @__PURE__ */ R(Se, {
573
+ x && /* @__PURE__ */ R(we, {
574
574
  url: a ?? "",
575
- labels: h?.connect,
576
- titleClassName: y?.connectTitleClassName,
577
- descriptionClassName: y?.connectDescriptionClassName,
578
- className: _("border-t pt-4", Ce.connectDivider)
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
- }, Te = [
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
- ], Ee = ["endpoint", ...Te], $ = new Set(Ee), De = { validateVersionPattern: !0 }, Oe = (e) => {
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
- }, ke = ({ initialForm: e, toolsetId: o, onPersist: c, onPostSaveLogin: d, onToolsetsChanged: m, onSaveSuccess: g, onSaveComplete: _, onBack: v, onDirtyChange: b, buildMcpUrl: E, listToolNames: D, authActions: O, onOAuthLogin: ee, onNotifySuccess: te, onNotifyError: k, avatarPicker: ne, availableLocaleOptions: re, formatLocaleLabel: ie, onRefineDescription: A, labels: j, colors: ae, typography: M, isVersionReadOnly: oe = !1 }) => {
595
- let N = !!o, [P, F] = T(""), I = o || P, [L, se] = T({
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
- }), [z, V] = T(e);
599
- L.initialForm !== e && (se({
598
+ }), [L, z] = T(e);
599
+ I.initialForm !== e && (ce({
600
600
  initialForm: e,
601
- key: L.key + 1
602
- }), V(e));
603
- let ce = C(() => he(e), [e]), { values: H, setValues: ue, markTouched: U, visibleErrorCodes: W, attemptSubmit: de } = a({
604
- initialValues: ce,
605
- validationOptions: De,
606
- reseedKey: L.key
607
- }), [fe, K] = T(e), q = C(() => ({
608
- ...fe,
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
- }), [fe, H]), J = C(() => JSON.stringify(q) !== JSON.stringify(z), [q, z]);
610
+ }), [pe, H]), J = C(() => JSON.stringify(q) !== JSON.stringify(L), [q, L]);
611
611
  S(() => {
612
- b?.(J);
613
- }, [J, b]);
614
- let [Y, X] = T(!1), [_e, Z] = T({}), [ve, ye] = T({}), Q = w(null);
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({}), ye({}), F("");
616
+ K(e), Q.current = e, Z({}), xe({}), P("");
617
617
  }, [e]);
618
- let be = x((e) => {
619
- let { metadata: t, setup: n } = ge(e);
620
- Object.keys(t).length > 0 && (ue(t), "name" in t && U(r.Name), "version" in t && U(r.Version)), Object.keys(n).length !== 0 && (K((e) => ({
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
- })), ye((e) => ({
623
+ })), xe((e) => ({
624
624
  ...e,
625
- ...Oe(n)
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
- }, [ue, U]), xe = x((e) => {
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
- })), ye((t) => ({
638
+ })), xe((t) => ({
639
639
  ...t,
640
- ...Oe(e)
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 Te) delete n[e];
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 && m();
647
- }, [m]), Se = x(async () => {
648
- if (I && Q.current != null && JSON.stringify(Q.current) === JSON.stringify(q)) return I;
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 c(q, I);
652
- return e ? (I || F(e), Q.current = q, V(q), b?.(!1), await m(), e) : null;
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
- I,
661
- c,
662
- m,
663
- b
664
- ]), Ce = x(async () => await Se() ?? !1, [Se]), $ = x((e) => {
665
- let t = j?.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 === s.ApiKey && (e.auth.keyHeader?.trim() || (n.keyHeader = t?.keyHeaderRequired ?? "Key name is required"), e.auth.withLogin === l.WithLogin && !e.auth.apiKey?.trim() && (n.apiKey = t?.apiKeyRequired ?? "API key is required")), e.auth.authenticationType === s.OAuth && e.auth.withLogin === l.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", pe(e.auth.resource) || (n.resource = t?.resourceInvalid ?? "Enter an absolute URI without a fragment"))), n;
667
- }, [j, N]), ke = x(async () => {
668
- let e = de(), t = $(q);
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 c(q, I);
673
+ let e = await s(q, F);
674
674
  if (!e) return;
675
- V(q), await m(), g(q);
675
+ z(q), await f(), ee(q);
676
676
  try {
677
- await d(e, q.auth), _();
677
+ await l(e, q.auth), g();
678
678
  } catch (e) {
679
- let { traceId: t } = await u(e);
680
- k(j?.settings?.auth?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
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
- de,
687
+ fe,
688
688
  q,
689
689
  $,
690
- I,
691
- c,
692
- m,
690
+ F,
691
+ s,
692
+ f,
693
+ ee,
693
694
  g,
694
- _,
695
- d,
696
- k,
697
- j
698
- ]), Ae = y({
695
+ l,
696
+ O,
697
+ A
698
+ ]), je = y({
699
699
  value: H.description,
700
- onChange: (e) => be({ description: e }),
701
- onRefine: A,
700
+ onChange: (e) => Se({ description: e }),
701
+ onRefine: k,
702
702
  disabled: Y,
703
- resetKey: L.key
704
- }), je = A ? (e, t) => /* @__PURE__ */ R(h, {
703
+ resetKey: I.key
704
+ }), Me = k ? (e, t) => /* @__PURE__ */ R(h, {
705
705
  isEnabled: !0,
706
706
  fieldId: t,
707
- label: j?.general?.form?.description.label ?? "Description",
708
- labels: j?.refinement,
709
- refinement: Ae,
710
- disabled: Ae.isPending || Y,
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, Me = C(() => ({
713
- form: j?.general?.form ?? le,
714
- avatarPicker: j?.general?.avatarPicker
715
- }), [j?.general?.form, j?.general?.avatarPicker]), Ne = C(() => !me(q, N), [q, N]), Pe = C(() => {
716
- let e = j?.validation, n = $(q), r = { ..._e };
717
- for (let e of Ee) {
718
- if (!ve[e]) continue;
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 ${p} 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 ${f} characters or fewer.`), W.version === t.InvalidFormat && (r.version = e?.versionInvalid ?? "Version may only contain letters, digits, dots, underscores, and dashes"), r;
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
- ve,
725
- _e,
724
+ be,
725
+ ye,
726
726
  q,
727
- j,
727
+ A,
728
728
  W,
729
729
  $
730
- ]), Fe = E && I ? E(I) : void 0;
730
+ ]), Ie = b && F ? b(F) : void 0;
731
731
  return /* @__PURE__ */ R(n, {
732
- title: N ? j?.layout?.editTitle ?? "Edit toolset" : j?.layout?.createTitle ?? "Create toolset",
733
- onBack: v,
734
- onCancel: v,
735
- onSubmit: ke,
736
- submitLabel: N ? j?.layout?.saveLabel ?? "Save" : j?.layout?.createLabel ?? "Create",
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: Ne || Ae.isPending,
738
+ isSubmitDisabled: Pe || je.isPending,
739
739
  metadataSectionClassName: B.metadataSection,
740
740
  setupSectionClassName: B.setupSection,
741
741
  labels: {
742
- backAriaLabel: j?.layout?.backAriaLabel ?? "Back to catalog",
743
- savingStatusLabel: j?.layout?.savingStatusLabel ?? "Saving",
744
- metadataTitle: j?.layout?.metadataSectionTitle ?? "Metadata",
745
- setupTitle: j?.layout?.setupSectionTitle ?? "Setup",
746
- cancelLabel: j?.layout?.cancelLabel ?? "Cancel"
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: Pe,
751
- onChange: be,
752
- avatarPicker: ne,
753
- availableLocaleOptions: re,
754
- formatLocaleLabel: ie,
755
- renderDescription: je,
756
- labels: Me,
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: j?.versionReadOnlyTooltip
758
+ versionReadOnlyTooltip: A?.versionReadOnlyTooltip
759
759
  }),
760
- setup: /* @__PURE__ */ R(we, {
760
+ setup: /* @__PURE__ */ R(Ee, {
761
761
  form: q,
762
- errors: Pe,
762
+ errors: Fe,
763
763
  isSaving: Y,
764
- toolsetId: I,
764
+ toolsetId: F,
765
765
  isEditMode: N,
766
- connectUrl: Fe,
767
- listToolNames: D,
768
- authActions: O,
769
- onOAuthLogin: ee,
770
- onNotifySuccess: te,
771
- onNotifyError: k,
772
- onChange: be,
773
- onAuthChange: xe,
774
- onEnsureSaved: Ce,
775
- labels: j?.settings,
776
- colors: ae?.settings,
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, ce as DEFAULT_TOOLSET_VERSION, B as TOOLSET_EDITOR_CLASS, ke as ToolsetEditor, X as ToolsetOAuthLoginStatus, V as ToolsetTransportType, U as getDefaultToolsetForm, J as isToolsetAuthValid, me as isToolsetFormValid, G as isValidEndpointUrl, q as normalizeReturnedEndpointUrl };
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 dashes'`. */
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,gIAAgI;IAChI,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2GAA2G;IAC3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KAAK,IAAI,CAAC;IAC7D,4HAA4H;IAC5H,YAAY,EAAE,wBAAwB,CAAC;IACvC,wDAAwD;IACxD,sBAAsB,EAAE,kCAAkC,EAAE,CAAC;IAC7D,6GAA6G;IAC7G,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;IAC7C,wEAAwE;IACxE,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,iIAAiI;IACjI,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yDAAyD;IACzD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,kCAAkC;IAClC,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC"}
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,k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CAAC;IAC5C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzD,gFAAgF;IAChF,WAAW,EAAE,kBAAkB,CAAC;IAChC,mEAAmE;IACnE,YAAY,EAAE,wBAAwB,CAAC;IACvC,2DAA2D;IAC3D,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,gFAAgF;IAChF,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,4HAA4H;IAC5H,YAAY,EAAE,wBAAwB,CAAC;IACvC,wDAAwD;IACxD,sBAAsB,EAAE,kCAAkC,EAAE,CAAC;IAC7D,6GAA6G;IAC7G,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;IAC7C,wEAAwE;IACxE,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,iIAAiI;IACjI,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yDAAyD;IACzD,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,kCAAkC;IAClC,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC"}
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.3.6",
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.3.6"
25
+ "@epam/ai-dial-builder-form": "1.4.0-dev.101"
26
26
  },
27
27
  "peerDependencies": {
28
- "@epam/ai-dial-chat-hooks": "1.3.6",
29
- "@epam/ai-dial-chat-shared": "1.3.6",
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
  },
@@ -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. */
@@ -1 +1 @@
1
- {"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/utils/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,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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