@epam/ai-dial-toolset-editor 1.2.5 → 1.3.0-dev.102

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":"AAiBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AA4C5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA6bhD,CAAC"}
1
+ {"version":3,"file":"ToolsetEditor.d.ts","sourceRoot":"","sources":["../../../src/components/ToolsetEditor/ToolsetEditor.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AA4C5E,uKAAuK;AACvK,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkdhD,CAAC"}
@@ -7,9 +7,7 @@ export declare enum ToolsetTransportType {
7
7
  /** Server-sent events MCP transport. */
8
8
  Sse = "SSE"
9
9
  }
10
- /** Default display name seeded into a new toolset form. */
11
- export declare const DEFAULT_TOOLSET_NAME = "New toolset";
12
- /** Default display version seeded into a new toolset form. */
10
+ /** Default display version seeded into a new toolset form; the shared deployment default. */
13
11
  export declare const DEFAULT_TOOLSET_VERSION = "1.0.0";
14
12
  /** Metadata checks for a toolset: the version must be SemVer 2.0.0, as DIAL Admin requires. */
15
13
  export declare const TOOLSET_METADATA_VALIDATION_OPTIONS: DeploymentCreationFormValidationOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/constants/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uCAAuC,EAC7C,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,oBAAoB;IAC9B,qCAAqC;IACrC,IAAI,SAAS;IACb,wCAAwC;IACxC,GAAG,QAAQ;CACZ;AAED,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAElD,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAE/C,+FAA+F;AAC/F,eAAO,MAAM,mCAAmC,EAAE,uCACE,CAAC;AAErD,kGAAkG;AAClG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAIhE,CAAC"}
1
+ {"version":3,"file":"toolsets.d.ts","sourceRoot":"","sources":["../../src/constants/toolsets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uCAAuC,EAC7C,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,oBAAoB;IAC9B,qCAAqC;IACrC,IAAI,SAAS;IACb,wCAAwC;IACxC,GAAG,QAAQ;CACZ;AAED,6FAA6F;AAC7F,eAAO,MAAM,uBAAuB,UAA6B,CAAC;AAElE,+FAA+F;AAC/F,eAAO,MAAM,mCAAmC,EAAE,uCACE,CAAC;AAErD,kGAAkG;AAClG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAIhE,CAAC"}
package/index.css CHANGED
@@ -1 +1,2 @@
1
- .sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.visible{visibility:visible}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.max-w-\[1060px\]{max-width:1060px}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.border-t{border-top-width:1px}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.px-2{padding-left:.5rem;padding-right:.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-start{text-align:start}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}@media (min-width:1280px){.desktop\:not-sr-only{height:auto;margin:0;overflow:visible;padding:0;position:static;width:auto;clip:auto;white-space:normal}}
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.block{display:block}.flex{display:flex}.inline{display:inline}.max-w-\[1060px\]{max-width:1060px}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-tertiary{border-color:var(--stroke-tertiary,#e0e6f0)}.px-2{padding-inline:.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-start{text-align:start}.text-primary{color:var(--text-primary,#161b2d)}.text-secondary{color:var(--text-secondary,#57647a)}@media (min-width:1280px){.desktop\:not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
package/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export type { AuthSectionLabels } from './models/auth-section-props';
7
7
  export { ToolsetOAuthLoginStatus } from './models/toolset-oauth-login';
8
8
  export type { ToolsetOAuthLoginHandler, ToolsetOAuthLoginRequest, ToolsetOAuthLoginResult, } from './models/toolset-oauth-login';
9
9
  export type { DeploymentGeneralFormData, ToolsetAuthActions, ToolsetAuthFormData, ToolsetFormData, ToolsetFormErrors, ToolsetLoginRequest, ToolsetLogoutRequest, } from './models/toolset-form';
10
- export { AUTH_TYPE_ICONS, DEFAULT_TOOLSET_NAME, DEFAULT_TOOLSET_VERSION, ToolsetTransportType, } from './constants/toolsets';
11
- export { getDefaultToolsetForm, getStorageSafeUniqueToolsetName, isToolsetAuthValid, isToolsetFormValid, isValidEndpointUrl, normalizeReturnedEndpointUrl, } from './utils/toolsets';
10
+ export { AUTH_TYPE_ICONS, DEFAULT_TOOLSET_VERSION, ToolsetTransportType, } from './constants/toolsets';
11
+ export { getDefaultToolsetForm, isToolsetAuthValid, isToolsetFormValid, isValidEndpointUrl, normalizeReturnedEndpointUrl, } from './utils/toolsets';
12
12
  export { TOOLSET_EDITOR_CLASS } from './constants/public-class-names';
13
13
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC"}
package/index.js CHANGED
@@ -1,33 +1,27 @@
1
- import { DeploymentCreationFieldErrorCode as e, EntityEditor as t, MetadataField as n, MetadataForm as r, SEMVER_VERSION_PATTERN 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, dialFileToAttachment 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 h, TextRefinementField as g, mergeClasses as _, useCodeCopy as v, useTextRefinement as y } from "@epam/ai-dial-chat-shared";
4
- import { memo as b, useCallback as x, useEffect as S, useMemo as C, useRef as ee, useState as w } from "react";
5
- import { IconBrandOauth as T, IconKey as te, IconLockOff as ne, IconLogin as E, IconLogout as re } from "@tabler/icons-react";
1
+ import { DEFAULT_DEPLOYMENT_VERSION as e, DeploymentCreationFieldErrorCode as t, EntityEditor as n, MetadataField as r, MetadataForm as i, SEMVER_VERSION_PATTERN as a, useMetadataForm as o, validateDeploymentCreationFields as s } from "@epam/ai-dial-builder-form";
2
+ import { ToolsetAuthTypes as c, ToolsetCredentialsLevel as l, WithLogin as u, dialFileToAttachment as d, getApiErrorDetails as f } from "@epam/ai-dial-chat-hooks";
3
+ import { CopyButton as p, ENTITY_DESCRIPTION_MAX_LENGTH as m, ENTITY_NAME_MAX_LENGTH as h, TAG_INPUT_TAG_CLASS_NAME as g, TextRefinementField as _, mergeClasses as v, useCodeCopy as y, useTextRefinement as ee } from "@epam/ai-dial-chat-shared";
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 te, IconKey as ne, IconLockOff as re, IconLogin as E, IconLogout as ie } from "@tabler/icons-react";
6
6
  import { jsx as D, jsxs as O } from "react/jsx-runtime";
7
- import { ConfirmationPopup as ie, ConfirmationPopupVariant as ae, DIAL_ICON_SIZE as k, DIAL_KIT_ICON_STROKE as A, Input as j, NeutralButton as M, PasswordInput as N, Radio as P, RadioGroup as F, SegmentedControl as I, Select as L, TagInput as oe } from "@epam/ai-dial-ui-kit";
7
+ import { ConfirmationPopup as ae, ConfirmationPopupVariant as oe, DIAL_ICON_SIZE as k, DIAL_KIT_ICON_STROKE as A, Input as j, NeutralButton as M, PasswordInput as N, Radio as P, RadioGroup as F, SegmentedControl as I, Select as L, TagInput as se } from "@epam/ai-dial-ui-kit";
8
8
  //#region src/constants/public-class-names.ts
9
- var se = {
9
+ var ce = {
10
10
  metadataSection: "dial-toolset-editor-metadata-section",
11
11
  setupSection: "dial-toolset-editor-setup-section"
12
12
  }, R = /* @__PURE__ */ function(e) {
13
13
  return e.Http = "HTTP", e.Sse = "SSE", e;
14
- }({}), z = "New toolset", B = "1.0.0", ce = { validateVersionPattern: i }, V = {
15
- [s.OAuth]: T,
16
- [s.ApiKey]: te,
17
- [s.None]: ne
18
- }, H = ({ defaultName: e = z, existingNames: t }) => {
19
- let n = new Set(t);
20
- if (!n.has(e)) return e;
21
- let r = 1;
22
- for (; n.has(`${e} ${r}`);) r += 1;
23
- return `${e} ${r}`;
24
- }, le = () => ({
25
- authenticationType: s.None,
26
- withLogin: l.WithoutLogin,
14
+ }({}), z = e, le = { validateVersionPattern: a }, B = {
15
+ [c.OAuth]: te,
16
+ [c.ApiKey]: ne,
17
+ [c.None]: re
18
+ }, ue = () => ({
19
+ authenticationType: c.None,
20
+ withLogin: u.WithoutLogin,
27
21
  isLoggedIn: !1
28
- }), U = (e = []) => ({
29
- name: H({ existingNames: e }),
30
- version: B,
22
+ }), V = () => ({
23
+ name: "",
24
+ version: z,
31
25
  iconUrl: "",
32
26
  description: "",
33
27
  topics: [],
@@ -35,49 +29,49 @@ var se = {
35
29
  endpoint: "",
36
30
  protocol: R.Http,
37
31
  allowedTools: [],
38
- auth: le()
39
- }), W = (e) => {
32
+ auth: ue()
33
+ }), H = (e) => {
40
34
  if (!/^https?:\/\//.test(e) || e.endsWith(".") || e.endsWith("//")) return !1;
41
35
  try {
42
36
  return !!new URL(e);
43
37
  } catch {
44
38
  return !1;
45
39
  }
46
- }, G = (e) => W(e.trim()), K = (e) => e.replace(/^(https?):\/([^/])/, "$1://$2"), q = (e) => {
40
+ }, U = (e) => H(e.trim()), de = (e) => e.replace(/^(https?):\/([^/])/, "$1://$2"), W = (e) => {
47
41
  let t = e?.trim() ?? "";
48
- if (!t || W(t)) return t;
42
+ if (!t || H(t)) return t;
49
43
  let n = [t];
50
44
  try {
51
45
  let e = decodeURIComponent(t);
52
46
  e !== t && n.push(e);
53
47
  } catch {}
54
48
  for (let e of n) {
55
- let t = K(e);
56
- if (W(t)) return t;
49
+ let t = de(e);
50
+ if (H(t)) return t;
57
51
  }
58
52
  return t;
59
- }, J = (e) => !e?.trim() || G(e), Y = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType === s.ApiKey ? e.keyHeader?.trim() ? e.withLogin === l.WithoutLogin ? !0 : !!(e.keyHeader?.trim() && e.apiKey?.trim()) : !1 : e.authenticationType === s.OAuth && e.withLogin === l.WithConfig ? !!e.clientId?.trim() && (t || !!e.clientSecret?.trim()) && J(e.authorizationEndpoint) && J(e.tokenEndpoint) : !0, ue = (e, t = !1) => Object.keys(o(e, ce)).length === 0 && G(e.endpoint) && Y(e.auth, t), de = new Set([
53
+ }, G = (e) => !e?.trim() || U(e), K = (e, t = !1) => e.isLoggedIn ? !0 : e.authenticationType === c.ApiKey ? e.keyHeader?.trim() ? e.withLogin === u.WithoutLogin ? !0 : !!(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) : !0, fe = (e, t = !1) => Object.keys(s(e, le)).length === 0 && U(e.endpoint) && K(e.auth, t), pe = new Set([
60
54
  "name",
61
55
  "description",
62
56
  "iconUrl",
63
57
  "version",
64
58
  "topics",
65
59
  "otherLocales"
66
- ]), fe = (e) => ({
60
+ ]), me = (e) => ({
67
61
  name: e.name,
68
62
  description: e.description,
69
63
  iconUrl: e.iconUrl,
70
64
  version: e.version,
71
65
  topics: e.topics,
72
66
  otherLocales: e.otherLocales
73
- }), pe = (e) => {
67
+ }), he = (e) => {
74
68
  let t = {}, n = {};
75
- for (let [r, i] of Object.entries(e)) (de.has(r) ? t : n)[r] = i;
69
+ for (let [r, i] of Object.entries(e)) (pe.has(r) ? t : n)[r] = i;
76
70
  return {
77
71
  metadata: t,
78
72
  setup: n
79
73
  };
80
- }, X = {
74
+ }, q = {
81
75
  name: {
82
76
  label: "Name",
83
77
  placeholder: "Enter name"
@@ -116,27 +110,27 @@ var se = {
116
110
  saveLabel: "Save"
117
111
  },
118
112
  ariaLabel: "General"
119
- }, me = ({ form: e, errors: t, bucket: n, FileManagerModal: i, resolveIconUrl: a, allowedMimeTypes: o, maxFileSizeBytes: s, availableLocaleOptions: c, onChange: l, onNameBlur: d, onVersionBlur: f, renderDescription: p, labels: m }) => {
113
+ }, ge = ({ form: e, errors: t, bucket: n, FileManagerModal: r, resolveIconUrl: a, allowedMimeTypes: o, maxFileSizeBytes: s, availableLocaleOptions: c, onChange: l, onNameBlur: u, onVersionBlur: f, renderDescription: p, labels: m }) => {
120
114
  let h = x((e) => {
121
115
  let [t] = e.files;
122
- return (t ? u(t, n, { resolvePreviewUrl: a }) : null)?.url;
116
+ return (t ? d(t, n, { resolvePreviewUrl: a }) : null)?.url;
123
117
  }, [n, a]);
124
- return /* @__PURE__ */ D(r, {
118
+ return /* @__PURE__ */ D(i, {
125
119
  values: e,
126
120
  errors: t,
127
121
  onChange: l,
128
- onNameBlur: d,
122
+ onNameBlur: u,
129
123
  onVersionBlur: f,
130
124
  avatarPicker: C(() => ({
131
125
  bucket: n,
132
- FileManagerModal: i,
126
+ FileManagerModal: r,
133
127
  resolveIconUrl: a,
134
128
  resolveAttachedIconUrl: h,
135
129
  allowedMimeTypes: o,
136
130
  maxFileSizeBytes: s
137
131
  }), [
138
132
  n,
139
- i,
133
+ r,
140
134
  a,
141
135
  h,
142
136
  o,
@@ -145,92 +139,92 @@ var se = {
145
139
  availableLocaleOptions: c,
146
140
  renderDescription: p,
147
141
  labels: C(() => ({
148
- form: m?.form ?? X,
142
+ form: m?.form ?? q,
149
143
  avatarPicker: m?.avatarPicker
150
144
  }), [m?.form, m?.avatarPicker])
151
145
  });
152
- }, Z = /* @__PURE__ */ function(e) {
146
+ }, J = /* @__PURE__ */ function(e) {
153
147
  return e.Success = "success", e.Cancelled = "cancelled", e.PopupBlocked = "popup-blocked", e.InvalidConfig = "invalid-config", e.Failed = "failed", e;
154
- }({}), Q = (e) => e === s.None ? l.WithoutLogin : l.WithLogin, he = (e, t) => e === s.None ? t?.typeNone ?? "Open access" : e === s.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", ge = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: o, onOAuthLogin: u, onNotifySuccess: f, onNotifyError: p, onAuthChange: m, onEnsureSaved: g, labels: _ }) => {
155
- let [v, y] = w(!1), [b, x] = w(!1), S = e.isLoggedIn || n || v, C = G(a) && Y(e, i) && !S, ee = (t) => {
156
- S || t === e.authenticationType || m({
148
+ }({}), _e = (e) => e === c.None ? u.WithoutLogin : u.WithLogin, Y = (e, t) => e === c.None ? t?.typeNone ?? "Open access" : e === c.OAuth ? t?.typeOAuth ?? "OAuth" : t?.typeApiKey ?? "API Key", ve = ({ auth: e, errors: t, isSaving: n, toolsetId: r, isEditMode: i, endpoint: a, authActions: o, onOAuthLogin: s, onNotifySuccess: d, onNotifyError: p, onAuthChange: m, onEnsureSaved: h, labels: _ }) => {
149
+ let [v, y] = T(!1), [ee, b] = T(!1), x = e.isLoggedIn || n || v, S = U(a) && K(e, i) && !x, C = (t) => {
150
+ x || t === e.authenticationType || m({
157
151
  authenticationType: t,
158
- withLogin: Q(t)
152
+ withLogin: _e(t)
159
153
  });
160
- }, T = (e) => {
154
+ }, w = (e) => {
161
155
  m({ withLogin: e });
162
156
  }, te = (e) => {
163
157
  switch (e.auth != null && m(e.auth), e.status) {
164
- case Z.Success:
165
- m({ isLoggedIn: !0 }), f(_?.loginSuccessMessage ?? "Successfully logged in.");
158
+ case J.Success:
159
+ m({ isLoggedIn: !0 }), d(_?.loginSuccessMessage ?? "Successfully logged in.");
166
160
  return;
167
- case Z.PopupBlocked:
161
+ case J.PopupBlocked:
168
162
  p(_?.errorPopupBlocked ?? "The login popup was blocked by your browser. Please allow popups for this site and try again.");
169
163
  return;
170
- case Z.InvalidConfig:
164
+ case J.InvalidConfig:
171
165
  p(_?.errorOAuthConfigMissing ?? "The OAuth provider did not return a valid client configuration. Please check the endpoint or contact your administrator.");
172
166
  return;
173
- case Z.Failed:
167
+ case J.Failed:
174
168
  p(_?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", e.traceId);
175
169
  return;
176
- case Z.Cancelled: return;
170
+ case J.Cancelled: return;
177
171
  }
178
172
  }, ne = async () => {
179
- if (!C) return;
180
- if (e.authenticationType === s.OAuth) {
173
+ if (!S) return;
174
+ if (e.authenticationType === c.OAuth) {
181
175
  y(!0);
182
176
  try {
183
- te(await u({
177
+ te(await s({
184
178
  auth: e,
185
- ensureSaved: g
179
+ ensureSaved: h
186
180
  }));
187
181
  } finally {
188
182
  y(!1);
189
183
  }
190
184
  return;
191
185
  }
192
- let t = await g();
186
+ let t = await h();
193
187
  if (t) {
194
188
  y(!0);
195
189
  try {
196
190
  let n = {
197
191
  url: t,
198
- credentialsLevel: c.User,
192
+ credentialsLevel: l.User,
199
193
  authenticationType: e.authenticationType,
200
194
  apiKey: e.apiKey?.trim()
201
195
  };
202
- await o.login(t, n), m({ isLoggedIn: !0 }), f(_?.loginSuccessMessage ?? "Successfully logged in.");
196
+ await o.login(t, n), m({ isLoggedIn: !0 }), d(_?.loginSuccessMessage ?? "Successfully logged in.");
203
197
  } catch (e) {
204
- let { traceId: t } = await d(e);
198
+ let { traceId: t } = await f(e);
205
199
  p(_?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
206
200
  } finally {
207
201
  y(!1);
208
202
  }
209
203
  }
210
- }, F = async () => {
204
+ }, re = async () => {
211
205
  y(!0);
212
206
  try {
213
207
  let t = {
214
208
  url: r,
215
- credentialsLevel: c.User,
209
+ credentialsLevel: l.User,
216
210
  authenticationType: e.authenticationType
217
211
  };
218
- await o.logout(r, t), m({ isLoggedIn: !1 }), x(!1), f(_?.logoutSuccessMessage ?? "Successfully logged out.");
212
+ await o.logout(r, t), m({ isLoggedIn: !1 }), b(!1), d(_?.logoutSuccessMessage ?? "Successfully logged out.");
219
213
  } catch (e) {
220
- let { traceId: t } = await d(e);
214
+ let { traceId: t } = await f(e);
221
215
  p(_?.errorLogoutFailed ?? "Failed to log out. Please try again.", t);
222
216
  } finally {
223
217
  y(!1);
224
218
  }
225
- }, L = () => e.isLoggedIn ? /* @__PURE__ */ D("div", {
219
+ }, F = () => e.isLoggedIn ? /* @__PURE__ */ D("div", {
226
220
  className: "flex",
227
221
  children: /* @__PURE__ */ D(M, {
228
222
  label: _?.logOutLabel ?? "Log out",
229
- iconBefore: /* @__PURE__ */ D(re, {
223
+ iconBefore: /* @__PURE__ */ D(ie, {
230
224
  size: k.MD,
231
225
  stroke: A
232
226
  }),
233
- onClick: () => x(!0),
227
+ onClick: () => b(!0),
234
228
  disabled: n || v
235
229
  })
236
230
  }) : /* @__PURE__ */ D("div", {
@@ -242,7 +236,7 @@ var se = {
242
236
  stroke: A
243
237
  }),
244
238
  onClick: ne,
245
- disabled: !C
239
+ disabled: !S
246
240
  })
247
241
  });
248
242
  return /* @__PURE__ */ O("section", {
@@ -255,14 +249,14 @@ var se = {
255
249
  /* @__PURE__ */ D(I, {
256
250
  "aria-label": _?.sectionTitle ?? "Authentication",
257
251
  value: e.authenticationType,
258
- onChange: (e) => ee(e),
252
+ onChange: (e) => C(e),
259
253
  segmentClassName: "px-2",
260
254
  items: [
261
- s.None,
262
- s.OAuth,
263
- s.ApiKey
255
+ c.None,
256
+ c.OAuth,
257
+ c.ApiKey
264
258
  ].map((t) => {
265
- let n = V[t];
259
+ let n = B[t];
266
260
  return {
267
261
  value: t,
268
262
  label: /* @__PURE__ */ O("div", {
@@ -274,18 +268,18 @@ var se = {
274
268
  "aria-hidden": !0
275
269
  }), /* @__PURE__ */ D("span", {
276
270
  className: "sr-only desktop:not-sr-only",
277
- children: he(t, _)
271
+ children: Y(t, _)
278
272
  })]
279
273
  }),
280
- disabled: S && e.authenticationType !== t
274
+ disabled: x && e.authenticationType !== t
281
275
  };
282
276
  })
283
277
  }),
284
- e.authenticationType === s.None && /* @__PURE__ */ D("p", {
278
+ e.authenticationType === c.None && /* @__PURE__ */ D("p", {
285
279
  className: "dial-small-text pt-2 text-secondary",
286
280
  children: _?.openAccessDescription ?? "Open endpoint, no credentials"
287
281
  }),
288
- e.authenticationType === s.OAuth && /* @__PURE__ */ O("div", {
282
+ e.authenticationType === c.OAuth && /* @__PURE__ */ O("div", {
289
283
  className: "flex flex-col gap-3 pt-2",
290
284
  children: [
291
285
  /* @__PURE__ */ O("div", {
@@ -293,22 +287,22 @@ var se = {
293
287
  children: [/* @__PURE__ */ D(P, {
294
288
  name: "oauth-login-mode",
295
289
  id: "oauth-with-login",
296
- value: l.WithLogin,
290
+ value: u.WithLogin,
297
291
  labelProps: { label: _?.withLoginOAuthLabel ?? "Standard login" },
298
- isSelected: e.withLogin === l.WithLogin,
299
- disabled: S,
300
- onChange: T
292
+ isSelected: e.withLogin === u.WithLogin,
293
+ disabled: x,
294
+ onChange: w
301
295
  }), /* @__PURE__ */ D(P, {
302
296
  name: "oauth-login-mode",
303
297
  id: "oauth-with-config",
304
- value: l.WithConfig,
298
+ value: u.WithConfig,
305
299
  labelProps: { label: _?.withConfigOAuthLabel ?? "Custom login" },
306
- isSelected: e.withLogin === l.WithConfig,
307
- disabled: S,
308
- onChange: T
300
+ isSelected: e.withLogin === u.WithConfig,
301
+ disabled: x,
302
+ onChange: w
309
303
  })]
310
304
  }),
311
- e.withLogin === l.WithConfig && /* @__PURE__ */ O("div", {
305
+ e.withLogin === u.WithConfig && /* @__PURE__ */ O("div", {
312
306
  className: "flex flex-col gap-3",
313
307
  children: [
314
308
  /* @__PURE__ */ D(j, {
@@ -322,7 +316,7 @@ var se = {
322
316
  placeholder: _?.clientIdPlaceholder ?? "Enter client ID",
323
317
  error: t.clientId || void 0,
324
318
  invalid: !!t.clientId,
325
- disabled: S
319
+ disabled: x
326
320
  }),
327
321
  /* @__PURE__ */ D(N, {
328
322
  id: "toolset-client-secret",
@@ -337,7 +331,7 @@ var se = {
337
331
  hidePasswordLabel: _?.hideClientSecretLabel ?? "Hide client secret",
338
332
  error: t.clientSecret || void 0,
339
333
  invalid: !!t.clientSecret,
340
- disabled: S
334
+ disabled: x
341
335
  }),
342
336
  /* @__PURE__ */ D(j, {
343
337
  id: "toolset-authorization-endpoint",
@@ -347,7 +341,7 @@ var se = {
347
341
  placeholder: _?.authorizationEndpointPlaceholder ?? "Enter authorization endpoint",
348
342
  error: t.authorizationEndpoint || void 0,
349
343
  invalid: !!t.authorizationEndpoint,
350
- disabled: S
344
+ disabled: x
351
345
  }),
352
346
  /* @__PURE__ */ D(j, {
353
347
  id: "toolset-token-endpoint",
@@ -357,23 +351,23 @@ var se = {
357
351
  placeholder: _?.tokenEndpointPlaceholder ?? "Enter token endpoint",
358
352
  error: t.tokenEndpoint || void 0,
359
353
  invalid: !!t.tokenEndpoint,
360
- disabled: S
354
+ disabled: x
361
355
  }),
362
- /* @__PURE__ */ D(oe, {
356
+ /* @__PURE__ */ D(se, {
363
357
  id: "toolset-scopes",
364
358
  labelProps: { label: _?.scopesLabel ?? "Scopes" },
365
359
  placeholder: _?.scopesPlaceholder ?? "Enter scopes",
366
360
  value: e.scopes ?? [],
367
361
  onChange: (e) => m({ scopes: e }),
368
- disabled: S,
369
- tagClassName: h
362
+ disabled: x,
363
+ tagClassName: g
370
364
  })
371
365
  ]
372
366
  }),
373
- L()
367
+ F()
374
368
  ]
375
369
  }),
376
- e.authenticationType === s.ApiKey && /* @__PURE__ */ O("div", {
370
+ e.authenticationType === c.ApiKey && /* @__PURE__ */ O("div", {
377
371
  className: "flex flex-col gap-3 pt-2",
378
372
  children: [
379
373
  /* @__PURE__ */ O("div", {
@@ -381,19 +375,19 @@ var se = {
381
375
  children: [/* @__PURE__ */ D(P, {
382
376
  name: "apikey-login-mode",
383
377
  id: "apikey-with-login",
384
- value: l.WithLogin,
378
+ value: u.WithLogin,
385
379
  labelProps: { label: _?.withLoginLabel ?? "With login" },
386
- isSelected: e.withLogin === l.WithLogin,
387
- disabled: S,
388
- onChange: T
380
+ isSelected: e.withLogin === u.WithLogin,
381
+ disabled: x,
382
+ onChange: w
389
383
  }), /* @__PURE__ */ D(P, {
390
384
  name: "apikey-login-mode",
391
385
  id: "apikey-without-login",
392
- value: l.WithoutLogin,
386
+ value: u.WithoutLogin,
393
387
  labelProps: { label: _?.withoutLoginLabel ?? "Without login" },
394
- isSelected: e.withLogin === l.WithoutLogin,
395
- disabled: S,
396
- onChange: T
388
+ isSelected: e.withLogin === u.WithoutLogin,
389
+ disabled: x,
390
+ onChange: w
397
391
  })]
398
392
  }),
399
393
  /* @__PURE__ */ O("div", {
@@ -409,8 +403,8 @@ var se = {
409
403
  placeholder: _?.keyHeaderPlaceholder ?? "Enter API key parameter name",
410
404
  error: t.keyHeader || void 0,
411
405
  invalid: !!t.keyHeader,
412
- disabled: S
413
- }), e.withLogin === l.WithLogin && /* @__PURE__ */ D(N, {
406
+ disabled: x
407
+ }), e.withLogin === u.WithLogin && /* @__PURE__ */ D(N, {
414
408
  id: "toolset-api-key",
415
409
  value: e.apiKey ?? "",
416
410
  onChange: (e) => m({ apiKey: e ?? "" }),
@@ -423,31 +417,31 @@ var se = {
423
417
  hidePasswordLabel: _?.hideApiKeyLabel ?? "Hide API key",
424
418
  error: t.apiKey || void 0,
425
419
  invalid: !!t.apiKey,
426
- disabled: S
420
+ disabled: x
427
421
  })]
428
422
  }),
429
- e.withLogin !== l.WithoutLogin && L()
423
+ e.withLogin !== u.WithoutLogin && F()
430
424
  ]
431
425
  }),
432
- b && /* @__PURE__ */ D(ie, {
433
- open: b,
426
+ ee && /* @__PURE__ */ D(ae, {
427
+ open: ee,
434
428
  header: _?.logoutConfirmTitle ?? "Log out?",
435
429
  description: _?.logoutConfirmDescription ?? "Are you sure you want to log out? You will need to re-enter your credentials to use this toolset again.",
436
430
  confirmLabel: _?.logOutLabel ?? "Log out",
437
431
  cancelLabel: _?.cancelLabel ?? "Cancel",
438
- variant: ae.Danger,
432
+ variant: oe.Danger,
439
433
  isLoading: v,
440
434
  disableConfirmButton: v,
441
- onConfirm: F,
442
- onCancel: () => x(!1),
443
- onClose: () => x(!1)
435
+ onConfirm: re,
436
+ onCancel: () => b(!1),
437
+ onClose: () => b(!1)
444
438
  })
445
439
  ]
446
440
  });
447
- }, _e = b(({ url: e, className: t, labels: n }) => {
448
- let { isCopied: r, copy: i } = v(e), a = n?.copiedLabel ?? "Copied!";
441
+ }, X = b(({ url: e, className: t, labels: n }) => {
442
+ let { isCopied: r, copy: i } = y(e), a = n?.copiedLabel ?? "Copied!";
449
443
  return /* @__PURE__ */ O("div", {
450
- className: _("flex flex-col gap-3", t),
444
+ className: v("flex flex-col gap-3", t),
451
445
  children: [
452
446
  /* @__PURE__ */ O("div", {
453
447
  className: "flex flex-col gap-1",
@@ -459,7 +453,7 @@ var se = {
459
453
  children: n?.description ?? "Copy endpoint URL to easily integrate toolset into your workflows"
460
454
  })]
461
455
  }),
462
- /* @__PURE__ */ D("div", { children: /* @__PURE__ */ D(f, {
456
+ /* @__PURE__ */ D("div", { children: /* @__PURE__ */ D(p, {
463
457
  copiedLabel: a,
464
458
  copyLabel: n?.copyLabel ?? "Copy URL",
465
459
  isCopied: r,
@@ -473,8 +467,8 @@ var se = {
473
467
  })
474
468
  ]
475
469
  });
476
- }), ve = ({ 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 }) => {
477
- let [g, _] = w(null), v = !!a && !!r, y = C(() => [{
470
+ }), ye = ({ 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 }) => {
471
+ let [h, _] = T(null), v = !!a && !!r, y = C(() => [{
478
472
  value: R.Http,
479
473
  label: "HTTP"
480
474
  }, {
@@ -482,7 +476,7 @@ var se = {
482
476
  label: "SSE"
483
477
  }], []);
484
478
  return S(() => {
485
- if (!r || !o || !Y(e.auth, i)) {
479
+ if (!r || !o || !K(e.auth, i)) {
486
480
  _(null);
487
481
  return;
488
482
  }
@@ -531,28 +525,28 @@ var se = {
531
525
  d({ protocol: e });
532
526
  }
533
527
  }),
534
- g ? /* @__PURE__ */ D(L, {
528
+ h ? /* @__PURE__ */ D(L, {
535
529
  id: "toolset-allowed-tools",
536
530
  multiple: !0,
537
531
  searchable: !0,
538
532
  selectAll: !0,
539
533
  labelProps: { label: m?.allowedToolsLabel ?? "Allowed tools" },
540
534
  placeholder: m?.allowedToolsSelectPlaceholder ?? "Select allowed tools",
541
- options: g.map((e) => ({
535
+ options: h.map((e) => ({
542
536
  value: e,
543
537
  label: e
544
538
  })),
545
539
  value: e.allowedTools,
546
540
  onChange: (e) => d({ allowedTools: e })
547
- }) : /* @__PURE__ */ D(oe, {
541
+ }) : /* @__PURE__ */ D(se, {
548
542
  id: "toolset-allowed-tools",
549
543
  labelProps: { label: m?.allowedToolsLabel ?? "Allowed tools" },
550
544
  placeholder: m?.allowedToolsPlaceholder ?? "Add tools, comma separated",
551
545
  value: e.allowedTools,
552
546
  onChange: (e) => d({ allowedTools: e }),
553
- tagClassName: h
547
+ tagClassName: g
554
548
  }),
555
- /* @__PURE__ */ D(ge, {
549
+ /* @__PURE__ */ D(ve, {
556
550
  auth: e.auth,
557
551
  errors: t,
558
552
  isSaving: n,
@@ -567,59 +561,63 @@ var se = {
567
561
  onEnsureSaved: p,
568
562
  labels: m?.auth
569
563
  }),
570
- v && /* @__PURE__ */ D(_e, {
564
+ v && /* @__PURE__ */ D(X, {
571
565
  url: a ?? "",
572
566
  labels: m?.connect,
573
567
  className: "border-t border-tertiary pt-4"
574
568
  })
575
569
  ]
576
570
  });
577
- }, ye = [
571
+ }, be = [
578
572
  "keyHeader",
579
573
  "apiKey",
580
574
  "clientId",
581
575
  "clientSecret",
582
576
  "authorizationEndpoint",
583
577
  "tokenEndpoint"
584
- ], be = ["endpoint", ...ye], $ = new Set(be), xe = (e) => {
578
+ ], xe = ["endpoint", ...be], Z = new Set(xe), Se = (e) => {
585
579
  let t = {};
586
- for (let n of Object.keys(e)) $.has(n) && (t[n] = !0);
580
+ for (let n of Object.keys(e)) Z.has(n) && (t[n] = !0);
587
581
  return t;
588
- }, Se = ({ initialForm: r, toolsetId: i, onPersist: o, onPostSaveLogin: c, onToolsetsChanged: u, onSaveSuccess: f, onSaveComplete: h, onBack: _, buildMcpUrl: v, listToolNames: b, authActions: T, onOAuthLogin: te, onNotifySuccess: ne, onNotifyError: E, bucket: re, FileManagerModal: O, resolveIconUrl: ie, allowedMimeTypes: ae, maxFileSizeBytes: k, availableLocaleOptions: A, onRefineDescription: j, labels: M }) => {
589
- let N = !!i, [P, F] = w(""), I = i || P, [L, oe] = w({
590
- initialForm: r,
582
+ }, Q = ({ initialForm: e, toolsetId: i, onPersist: a, onPostSaveLogin: s, onToolsetsChanged: l, onSaveSuccess: d, onSaveComplete: p, onBack: g, onDirtyChange: v, buildMcpUrl: y, listToolNames: b, authActions: te, onOAuthLogin: ne, onNotifySuccess: re, onNotifyError: E, bucket: ie, FileManagerModal: O, resolveIconUrl: ae, allowedMimeTypes: oe, maxFileSizeBytes: k, availableLocaleOptions: A, onRefineDescription: j, labels: M }) => {
583
+ let N = !!i, [P, F] = T(""), I = i || P, [L, se] = T({
584
+ initialForm: e,
591
585
  key: 0
592
- });
593
- L.initialForm !== r && oe({
594
- initialForm: r,
586
+ }), [R, z] = T(e);
587
+ L.initialForm !== e && (se({
588
+ initialForm: e,
595
589
  key: L.key + 1
596
- });
597
- let { values: R, setValues: z, markTouched: B, visibleErrorCodes: V, attemptSubmit: H } = a({
598
- initialValues: C(() => fe(r), [r]),
599
- validationOptions: ce,
590
+ }), z(e));
591
+ let { values: B, setValues: ue, markTouched: V, visibleErrorCodes: H, attemptSubmit: de } = o({
592
+ initialValues: C(() => me(e), [e]),
593
+ validationOptions: le,
600
594
  reseedKey: L.key
601
- }), [le, U] = w(r), W = C(() => ({
602
- ...le,
603
- ...R
604
- }), [le, R]), [K, q] = w(!1), [J, Y] = w({}), [de, X] = w({}), Z = ee(null);
595
+ }), [W, G] = T(e), K = C(() => ({
596
+ ...W,
597
+ ...B
598
+ }), [W, B]), pe = C(() => JSON.stringify(K) !== JSON.stringify(R), [K, R]);
605
599
  S(() => {
606
- U(r), Z.current = r, Y({}), X({}), F("");
607
- }, [r]);
600
+ v?.(pe);
601
+ }, [pe, v]);
602
+ let [q, J] = T(!1), [_e, Y] = T({}), [ve, X] = T({}), Z = w(null);
603
+ S(() => {
604
+ G(e), Z.current = e, Y({}), X({}), F("");
605
+ }, [e]);
608
606
  let Q = x((e) => {
609
- let { metadata: t, setup: r } = pe(e);
610
- Object.keys(t).length > 0 && (z(t), "name" in t && B(n.Name), "version" in t && B(n.Version)), Object.keys(r).length !== 0 && (U((e) => ({
607
+ let { metadata: t, setup: n } = he(e);
608
+ Object.keys(t).length > 0 && (ue(t), "name" in t && V(r.Name), "version" in t && V(r.Version)), Object.keys(n).length !== 0 && (G((e) => ({
611
609
  ...e,
612
- ...r
610
+ ...n
613
611
  })), X((e) => ({
614
612
  ...e,
615
- ...xe(r)
613
+ ...Se(n)
616
614
  })), Y((e) => {
617
615
  let t = { ...e };
618
- for (let e of Object.keys(r)) delete t[e];
616
+ for (let e of Object.keys(n)) delete t[e];
619
617
  return t;
620
618
  }));
621
- }, [z, B]), he = x((e) => {
622
- U((t) => ({
619
+ }, [ue, V]), Ce = x((e) => {
620
+ G((t) => ({
623
621
  ...t,
624
622
  auth: {
625
623
  ...t.auth,
@@ -627,104 +625,105 @@ var se = {
627
625
  }
628
626
  })), X((t) => ({
629
627
  ...t,
630
- ...xe(e)
628
+ ...Se(e)
631
629
  })), Y((t) => {
632
630
  let n = { ...t };
633
- if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of ye) delete n[e];
631
+ if ("authenticationType" in e || "withLogin" in e || "isLoggedIn" in e) for (let e of be) delete n[e];
634
632
  else for (let t of Object.keys(e)) delete n[t];
635
633
  return n;
636
- }), "isLoggedIn" in e && u();
637
- }, [u]), ge = x(async () => {
638
- if (I && Z.current != null && JSON.stringify(Z.current) === JSON.stringify(W)) return I;
639
- q(!0);
634
+ }), "isLoggedIn" in e && l();
635
+ }, [l]), we = x(async () => {
636
+ if (I && Z.current != null && JSON.stringify(Z.current) === JSON.stringify(K)) return I;
637
+ J(!0);
640
638
  try {
641
- let e = await o(W, I);
642
- return e ? (I || F(e), Z.current = W, await u(), e) : null;
639
+ let e = await a(K, I);
640
+ return e ? (I || F(e), Z.current = K, z(K), v?.(!1), await l(), e) : null;
643
641
  } catch {
644
642
  return null;
645
643
  } finally {
646
- q(!1);
644
+ J(!1);
647
645
  }
648
646
  }, [
649
- W,
647
+ K,
650
648
  I,
651
- o,
652
- u
653
- ]), _e = x(async () => await ge() ?? !1, [ge]), $ = x((e) => {
649
+ a,
650
+ l,
651
+ v
652
+ ]), Te = x(async () => await we() ?? !1, [we]), $ = x((e) => {
654
653
  let t = M?.validation, n = {};
655
- 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"), e.auth.tokenEndpoint?.trim() && !G(e.auth.tokenEndpoint) && (n.tokenEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"))), n;
656
- }, [M, N]), Se = x(async () => {
657
- let e = H(), t = $(W);
654
+ return e.endpoint.trim() ? U(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() && !U(e.auth.authorizationEndpoint) && (n.authorizationEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"), e.auth.tokenEndpoint?.trim() && !U(e.auth.tokenEndpoint) && (n.tokenEndpoint = t?.endpointInvalid ?? "Enter a valid http(s) URL"))), n;
655
+ }, [M, N]), Ee = x(async () => {
656
+ let e = de(), t = $(K);
658
657
  if (!e || Object.keys(t).length > 0) {
659
658
  Y(t);
660
659
  return;
661
660
  }
662
- Y({}), q(!0);
661
+ Y({}), J(!0);
663
662
  try {
664
- let e = await o(W, I);
663
+ let e = await a(K, I);
665
664
  if (!e) return;
666
- await u(), f(W);
665
+ z(K), await l(), d(K);
667
666
  try {
668
- await c(e, W.auth), h();
667
+ await s(e, K.auth), p();
669
668
  } catch (e) {
670
- let { traceId: t } = await d(e);
669
+ let { traceId: t } = await f(e);
671
670
  E(M?.settings?.auth?.errorLoginFailed ?? "Failed to log in. Please check your credentials and try again.", t);
672
671
  }
673
672
  } catch {} finally {
674
- q(!1);
673
+ J(!1);
675
674
  }
676
675
  }, [
677
- H,
678
- W,
676
+ de,
677
+ K,
679
678
  $,
680
679
  I,
681
- o,
682
- u,
683
- f,
684
- h,
685
- c,
680
+ a,
681
+ l,
682
+ d,
683
+ p,
684
+ s,
686
685
  E,
687
686
  M
688
- ]), Ce = y({
689
- value: R.description,
687
+ ]), De = ee({
688
+ value: B.description,
690
689
  onChange: (e) => Q({ description: e }),
691
690
  onRefine: j,
692
- disabled: K,
691
+ disabled: q,
693
692
  resetKey: L.key
694
- }), we = j ? (e, t) => /* @__PURE__ */ D(g, {
693
+ }), Oe = j ? (e, t) => /* @__PURE__ */ D(_, {
695
694
  isEnabled: !0,
696
695
  fieldId: t,
697
696
  label: M?.general?.form?.description.label ?? "Description",
698
697
  labels: M?.refinement,
699
- refinement: Ce,
700
- disabled: Ce.isPending || K,
698
+ refinement: De,
699
+ disabled: De.isPending || q,
701
700
  children: e
702
- }) : void 0, Te = C(() => !ue(W, N), [W, N]), Ee = C(() => {
703
- let t = M?.validation, n = $(W), r = { ...J };
704
- for (let e of be) {
705
- if (!de[e]) continue;
701
+ }) : void 0, ke = C(() => !fe(K, N), [K, N]), Ae = C(() => {
702
+ let e = M?.validation, n = $(K), r = { ..._e };
703
+ for (let e of xe) {
704
+ if (!ve[e]) continue;
706
705
  let t = n[e];
707
706
  t ? r[e] = t : delete r[e];
708
707
  }
709
- return V.name === e.Required ? r.name = t?.nameRequired ?? "Name is required" : V.name === e.TooLong ? r.name = t?.nameTooLong ?? `Use ${m} characters or fewer.` : V.name === e.ControlCharacters && (r.name = t?.nameControlCharacters ?? "Remove line breaks, tabs and other control characters."), V.description === e.TooLong && (r.description = t?.descriptionTooLong ?? `Use ${p} characters or fewer.`), V.version === e.InvalidFormat && (r.version = t?.versionInvalid ?? "Version must follow semantic versioning (e.g., 1.0.0)"), r;
708
+ return H.name === t.Required ? r.name = e?.nameRequired ?? "Name is required" : H.name === t.TooLong ? r.name = e?.nameTooLong ?? `Use ${h} characters or fewer.` : H.name === t.ControlCharacters && (r.name = e?.nameControlCharacters ?? "Remove line breaks, tabs and other control characters."), H.description === t.TooLong && (r.description = e?.descriptionTooLong ?? `Use ${m} characters or fewer.`), H.version === t.InvalidFormat && (r.version = e?.versionInvalid ?? "Version must follow semantic versioning (e.g., 1.0.0)"), r;
710
709
  }, [
711
- de,
712
- J,
713
- W,
710
+ ve,
711
+ _e,
712
+ K,
714
713
  M,
715
- V,
714
+ H,
716
715
  $
717
- ]), De = v && I ? v(I) : void 0;
718
- return /* @__PURE__ */ D(t, {
716
+ ]), je = y && I ? y(I) : void 0;
717
+ return /* @__PURE__ */ D(n, {
719
718
  title: N ? M?.layout?.editTitle ?? "Edit toolset" : M?.layout?.createTitle ?? "Create toolset",
720
- onBack: _,
721
- onCancel: _,
722
- onSubmit: Se,
719
+ onBack: g,
720
+ onCancel: g,
721
+ onSubmit: Ee,
723
722
  submitLabel: N ? M?.layout?.saveLabel ?? "Save" : M?.layout?.createLabel ?? "Create",
724
- isSubmitting: K,
725
- isSubmitDisabled: Te || Ce.isPending,
726
- metadataSectionClassName: se.metadataSection,
727
- setupSectionClassName: se.setupSection,
723
+ isSubmitting: q,
724
+ isSubmitDisabled: ke || De.isPending,
725
+ metadataSectionClassName: ce.metadataSection,
726
+ setupSectionClassName: ce.setupSection,
728
727
  labels: {
729
728
  backAriaLabel: M?.layout?.backAriaLabel ?? "Back to catalog",
730
729
  savingStatusLabel: M?.layout?.savingStatusLabel ?? "Saving",
@@ -732,37 +731,37 @@ var se = {
732
731
  setupTitle: M?.layout?.setupSectionTitle ?? "Setup",
733
732
  cancelLabel: M?.layout?.cancelLabel ?? "Cancel"
734
733
  },
735
- metadata: /* @__PURE__ */ D(me, {
736
- form: W,
737
- errors: Ee,
738
- bucket: re,
734
+ metadata: /* @__PURE__ */ D(ge, {
735
+ form: K,
736
+ errors: Ae,
737
+ bucket: ie,
739
738
  FileManagerModal: O,
740
- resolveIconUrl: ie,
741
- allowedMimeTypes: ae,
739
+ resolveIconUrl: ae,
740
+ allowedMimeTypes: oe,
742
741
  maxFileSizeBytes: k,
743
742
  availableLocaleOptions: A,
744
743
  onChange: Q,
745
- renderDescription: we,
744
+ renderDescription: Oe,
746
745
  labels: M?.general
747
746
  }),
748
- setup: /* @__PURE__ */ D(ve, {
749
- form: W,
750
- errors: Ee,
751
- isSaving: K,
747
+ setup: /* @__PURE__ */ D(ye, {
748
+ form: K,
749
+ errors: Ae,
750
+ isSaving: q,
752
751
  toolsetId: I,
753
752
  isEditMode: N,
754
- connectUrl: De,
753
+ connectUrl: je,
755
754
  listToolNames: b,
756
- authActions: T,
757
- onOAuthLogin: te,
758
- onNotifySuccess: ne,
755
+ authActions: te,
756
+ onOAuthLogin: ne,
757
+ onNotifySuccess: re,
759
758
  onNotifyError: E,
760
759
  onChange: Q,
761
- onAuthChange: he,
762
- onEnsureSaved: _e,
760
+ onAuthChange: Ce,
761
+ onEnsureSaved: Te,
763
762
  labels: M?.settings
764
763
  })
765
764
  });
766
765
  };
767
766
  //#endregion
768
- export { V as AUTH_TYPE_ICONS, z as DEFAULT_TOOLSET_NAME, B as DEFAULT_TOOLSET_VERSION, me as GeneralForm, se as TOOLSET_EDITOR_CLASS, Se as ToolsetEditor, Z as ToolsetOAuthLoginStatus, R as ToolsetTransportType, U as getDefaultToolsetForm, H as getStorageSafeUniqueToolsetName, Y as isToolsetAuthValid, ue as isToolsetFormValid, G as isValidEndpointUrl, q as normalizeReturnedEndpointUrl };
767
+ export { B as AUTH_TYPE_ICONS, z as DEFAULT_TOOLSET_VERSION, ge as GeneralForm, ce as TOOLSET_EDITOR_CLASS, Q as ToolsetEditor, J as ToolsetOAuthLoginStatus, R as ToolsetTransportType, V as getDefaultToolsetForm, K as isToolsetAuthValid, fe as isToolsetFormValid, U as isValidEndpointUrl, W as normalizeReturnedEndpointUrl };
@@ -105,6 +105,8 @@ export interface ToolsetEditorProps {
105
105
  onSaveComplete: () => void;
106
106
  /** Called for the Cancel button and the header back action. */
107
107
  onBack: () => void;
108
+ /** Called with whether the form differs from the values it was seeded with or last persisted, on mount and whenever that changes; `false` right after a Log In draft persist. */
109
+ onDirtyChange?: (isDirty: boolean) => void;
108
110
  /**
109
111
  * Builds the MCP endpoint URL shown in the Connect section for a toolset
110
112
  * id. Omit when the host has no external core URL configured — the
@@ -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,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAs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,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,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,gBAAgB,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;IACnE,sEAAsE;IACtE,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,4CAA4C;IAC5C,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,sBAAsB,EAAE,kCAAkC,EAAE,CAAC;IAC7D,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,sBAAsB,CAAC;IAC7C,wEAAwE;IACxE,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B"}
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.2.5",
4
+ "version": "1.3.0-dev.102",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@tabler/icons-react": "^3.44.0",
21
- "@epam/ai-dial-builder-form": "1.2.5"
21
+ "@epam/ai-dial-builder-form": "1.3.0-dev.102"
22
22
  },
23
23
  "peerDependencies": {
24
- "@epam/ai-dial-chat-hooks": "1.2.5",
25
- "@epam/ai-dial-chat-shared": "1.2.5",
26
- "@epam/ai-dial-ui-kit": "^0.15.4",
24
+ "@epam/ai-dial-chat-hooks": "1.3.0-dev.102",
25
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.102",
26
+ "@epam/ai-dial-ui-kit": "^0.16.0-dev.16",
27
27
  "react": "^19.2.8"
28
28
  },
29
29
  "repository": {
@@ -1,17 +1,7 @@
1
1
  import { DeploymentCreationFormValues } from '../../../builder-form/src/index.ts';
2
2
  import { ToolsetAuthFormData, ToolsetFormData } from '../models/toolset-form';
3
- /**
4
- * Returns a storage-safe toolset name that does not collide with any existing
5
- * name, appending a numeric suffix when the default name is taken.
6
- */
7
- export declare const getStorageSafeUniqueToolsetName: ({ defaultName, existingNames, }: {
8
- /** Candidate name to make unique. Defaults to `DEFAULT_TOOLSET_NAME`. */
9
- defaultName?: string;
10
- /** Names already taken by the user's toolsets. */
11
- existingNames: string[];
12
- }) => string;
13
- /** Returns the form state a brand-new toolset editor opens with. */
14
- export declare const getDefaultToolsetForm: (existingNames?: string[]) => ToolsetFormData;
3
+ /** Returns the form state a brand-new toolset editor opens with: an empty name and the default version. */
4
+ export declare const getDefaultToolsetForm: () => ToolsetFormData;
15
5
  /** Validates a toolset endpoint URL (http(s), parseable, no trailing `.`/`//`). */
16
6
  export declare const isValidEndpointUrl: (value: string) => boolean;
17
7
  /**
@@ -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;AAQpC,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,+BAA+B,GAAI,iCAG7C;IACD,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,KAAG,MAOH,CAAC;AAQF,oEAAoE;AACpE,eAAO,MAAM,qBAAq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