@epam/ai-dial-catalog 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "./mapping-CA0Z7TOl.js";
1
+ import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "./mapping-pfzXbpRv.js";
2
2
  import { CatalogEntityType as E, ConfirmationFooter as D, ConfirmationView as O, DESKTOP_BREAKPOINT_PX as k, DeploymentIcon as A, EntityHeader as j, EntityTypeLabel as M, FeaturedChip as ee, ItemHeader as te, MarkdownCodeBlock as N, MarkdownRenderer as ne, MarkdownWithPlaceholders as re, PanelEmptyState as ie, SELECT_LIST_MAX_HEIGHT_CLASS_NAME as ae, buildCssVars as oe, mergeClasses as P, useIsMobile as se } from "@epam/ai-dial-chat-shared";
3
3
  import { Fragment as ce, createContext as le, memo as ue, startTransition as de, useCallback as F, useContext as fe, useEffect as I, useId as pe, useLayoutEffect as me, useMemo as L, useRef as R, useState as z } from "react";
4
4
  import { Badge as he, BottomSheet as ge, Button as _e, ButtonAppearance as ve, ButtonDropdown as ye, ButtonVariant as be, CardShell as xe, Checkbox as Se, ConfirmationPopupVariant as Ce, DIAL_ICON_SIZE as B, DIAL_KIT_ICON_STROKE as V, DangerButton as we, Dropdown as H, DropdownItemType as Te, ElementSize as Ee, EllipsisTooltip as De, FolderPath as Oe, GhostButton as ke, GhostIconButton as Ae, Highlight as je, InlineSelect as Me, InlineSelectTrigger as U, Input as Ne, InteractiveTooltip as Pe, LinkButton as Fe, MenuItem as W, MenuItemMark as G, NeutralButton as K, NeutralIconButton as Ie, NoDataContent as Le, PrimaryButton as Re, ProgressBar as ze, RadioGroup as Be, Search as Ve, SegmentedControl as He, SideDrawer as Ue, Skeleton as We, SkeletonAvatarShape as q, Spinner as Ge, Tabs as Ke, ToggleIconButton as qe, Tooltip as Je, mergeClasses as Ye } from "@epam/ai-dial-ui-kit";
@@ -234,24 +234,28 @@ var kt = /* @__PURE__ */ function(e) {
234
234
  })]
235
235
  })]
236
236
  });
237
- }, on = { icon: "_icon_a0p4u_1" }, sn = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => e == null || h(e) == null ? null : /* @__PURE__ */ Y(Je, {
238
- tooltip: t,
239
- asChild: !0,
240
- children: /* @__PURE__ */ Y("span", {
241
- role: "img",
242
- "aria-label": t,
243
- style: oe({
244
- "--cat-cred-badge-halo": r?.halo,
245
- "--cat-cred-badge-icon": r?.icon
246
- }),
247
- className: P("absolute -bottom-1 -end-1 shrink-0", n),
248
- children: /* @__PURE__ */ Y(Ze, {
249
- size: B.SM,
250
- className: on.icon,
251
- "aria-hidden": !0
237
+ }, on = { icon: "_icon_a0p4u_1" }, sn = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => {
238
+ if (e == null || h(e) == null) return null;
239
+ let i = oe({
240
+ "--cat-cred-badge-halo": r?.halo,
241
+ "--cat-cred-badge-icon": r?.icon
242
+ });
243
+ return /* @__PURE__ */ Y(Je, {
244
+ tooltip: t,
245
+ asChild: !0,
246
+ children: /* @__PURE__ */ Y("span", {
247
+ role: "img",
248
+ "aria-label": t,
249
+ style: i,
250
+ className: P("absolute -bottom-1 -end-1 shrink-0", n),
251
+ children: /* @__PURE__ */ Y(Ze, {
252
+ size: B.SM,
253
+ className: on.icon,
254
+ "aria-hidden": !0
255
+ })
252
256
  })
253
- })
254
- }), cn = {
257
+ });
258
+ }, cn = {
255
259
  starFilledIcon: "_starFilledIcon_po6zj_1",
256
260
  starPop: "_starPop_po6zj_1"
257
261
  }, ln = ({ isStarred: e, onClick: t, size: n, ariaLabel: r = "Toggle favorite", className: i, starFilledColor: a }) => /* @__PURE__ */ Y(qe, {
@@ -307,7 +311,7 @@ var kt = /* @__PURE__ */ function(e) {
307
311
  d();
308
312
  }), me(() => {
309
313
  let e = r.current;
310
- !e || c === 0 || e.scrollWidth <= e.clientWidth || (s.current = c - 1, l(s.current));
314
+ e && c !== 0 && (e.scrollWidth <= e.clientWidth || (s.current = c - 1, l(s.current)));
311
315
  }, [c]), I(() => {
312
316
  let e = r.current;
313
317
  if (!e) return;
@@ -477,12 +481,12 @@ var kt = /* @__PURE__ */ function(e) {
477
481
  ]
478
482
  });
479
483
  }, xn = ue(({ rowIndex: e, items: t, columnCount: n, query: r, onToggleFavorite: i, isFavoriteVisible: a, onItemClick: o, featuredLabel: s, addToFavoritesAriaLabel: c, removeFromFavoritesAriaLabel: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f, featuredChipStyle: p, markdownLabels: m }) => {
480
- let h = e * n, g = t.slice(h, h + n);
484
+ let h = e * n, g = t.slice(h, h + n), _ = {
485
+ top: e * 268,
486
+ height: 268
487
+ };
481
488
  return /* @__PURE__ */ Y("div", {
482
- style: {
483
- top: e * 268,
484
- height: 268
485
- },
489
+ style: _,
486
490
  className: "absolute flex w-full gap-5 pb-5",
487
491
  children: Array.from({ length: n }, (e, t) => {
488
492
  let n = g[t];
@@ -608,9 +612,8 @@ var kt = /* @__PURE__ */ function(e) {
608
612
  }) : /* @__PURE__ */ Y("span", {
609
613
  className: P("min-w-0 break-words", t, En.valueText),
610
614
  children: e
611
- }), On = ({ sectionLabel: e = "Section", values: t, labelClassName: n = "dial-small-semi-text", valueClassName: r = "dial-small-text", valueTrueClassName: i = "dial-small-semi-text", checkIconClassName: a, sectionClassName: o = "dial-caption-text", yesLabel: s = "Yes", noLabel: c = "No", colors: l }) => /* @__PURE__ */ Y("div", {
612
- className: "flex flex-col",
613
- style: oe({
615
+ }), On = ({ sectionLabel: e = "Section", values: t, labelClassName: n = "dial-small-semi-text", valueClassName: r = "dial-small-text", valueTrueClassName: i = "dial-small-semi-text", checkIconClassName: a, sectionClassName: o = "dial-caption-text", yesLabel: s = "Yes", noLabel: c = "No", colors: l }) => {
616
+ let u = oe({
614
617
  "--tv-section-heading": l?.sectionHeading,
615
618
  "--tv-row-alt-bg": l?.rowAlt,
616
619
  "--tv-label": l?.label,
@@ -618,31 +621,35 @@ var kt = /* @__PURE__ */ function(e) {
618
621
  "--tv-value-true": l?.valueTrue,
619
622
  "--tv-value-false": l?.valueFalse,
620
623
  "--tv-value-text": l?.valueText
621
- }),
622
- children: t != null && t.length > 0 && /* @__PURE__ */ X("section", { children: [/* @__PURE__ */ Y("p", {
623
- className: P("mb-3 mt-0", o, En.sectionHeading),
624
- children: e
625
- }), /* @__PURE__ */ Y("ul", {
626
- className: "m-0 list-none p-0",
627
- children: t.map((e, t) => /* @__PURE__ */ X("li", {
628
- className: P("flex items-center rounded px-3 py-2", t % 2 == 0 ? En.rowAlt : void 0),
629
- children: [/* @__PURE__ */ Y("span", {
630
- className: P(n, En.label, "w-2/5 shrink-0"),
631
- children: e.label
632
- }), /* @__PURE__ */ Y("div", {
633
- className: "flex w-3/5 min-w-0 items-center gap-1",
634
- children: /* @__PURE__ */ Y(Dn, {
635
- value: e.value,
636
- valueClassName: r,
637
- valueTrueClassName: i,
638
- checkIconClassName: a,
639
- yesLabel: s,
640
- noLabel: c
641
- })
642
- })]
643
- }, e.label))
644
- })] })
645
- }), kn = { sectionHeading: "_sectionHeading_148lj_1" }, An = {
624
+ });
625
+ return /* @__PURE__ */ Y("div", {
626
+ className: "flex flex-col",
627
+ style: u,
628
+ children: t != null && t.length > 0 && /* @__PURE__ */ X("section", { children: [/* @__PURE__ */ Y("p", {
629
+ className: P("mb-3 mt-0", o, En.sectionHeading),
630
+ children: e
631
+ }), /* @__PURE__ */ Y("ul", {
632
+ className: "m-0 list-none p-0",
633
+ children: t.map((e, t) => /* @__PURE__ */ X("li", {
634
+ className: P("flex items-center rounded px-3 py-2", t % 2 == 0 ? En.rowAlt : void 0),
635
+ children: [/* @__PURE__ */ Y("span", {
636
+ className: P(n, En.label, "w-2/5 shrink-0"),
637
+ children: e.label
638
+ }), /* @__PURE__ */ Y("div", {
639
+ className: "flex w-3/5 min-w-0 items-center gap-1",
640
+ children: /* @__PURE__ */ Y(Dn, {
641
+ value: e.value,
642
+ valueClassName: r,
643
+ valueTrueClassName: i,
644
+ checkIconClassName: a,
645
+ yesLabel: s,
646
+ noLabel: c
647
+ })
648
+ })]
649
+ }, e.label))
650
+ })] })
651
+ });
652
+ }, kn = { sectionHeading: "_sectionHeading_148lj_1" }, An = {
646
653
  [kt.Python]: "Python",
647
654
  [kt.Curl]: "cURL",
648
655
  [kt.JavaScript]: "JavaScript"
@@ -867,10 +874,11 @@ var kt = /* @__PURE__ */ function(e) {
867
874
  title: e
868
875
  });
869
876
  }
877
+ let a = (r?.orgFallbackBannerTitle ?? Bn)(n), o = (r?.orgFallbackBannerDescription ?? Vn)(n);
870
878
  return /* @__PURE__ */ Y(zn, {
871
879
  icon: i,
872
- title: (r?.orgFallbackBannerTitle ?? Bn)(n),
873
- description: (r?.orgFallbackBannerDescription ?? Vn)(n)
880
+ title: a,
881
+ description: o
874
882
  });
875
883
  }, Kn = {
876
884
  surface: "_surface_1q3s8_1",
@@ -883,17 +891,16 @@ var kt = /* @__PURE__ */ function(e) {
883
891
  }, []), N = async () => {
884
892
  if (j || y) return;
885
893
  let e = o === t.ApiKey;
886
- if (e && !D.trim()) {
887
- A(!0);
888
- return;
889
- }
890
- M(!0), E(void 0);
891
- try {
892
- await l?.(e ? D : void 0) !== !1 && O("");
893
- } catch (e) {
894
- E(e instanceof Error ? e.message : String(e));
895
- } finally {
896
- M(!1);
894
+ if (e && !D.trim()) A(!0);
895
+ else {
896
+ M(!0), E(void 0);
897
+ try {
898
+ await l?.(e ? D : void 0) !== !1 && O("");
899
+ } catch (e) {
900
+ E(e instanceof Error ? e.message : String(e));
901
+ } finally {
902
+ M(!1);
903
+ }
897
904
  }
898
905
  }, ne = f?.loginActionLabel ?? "Log in", re = f?.logoutActionLabel ?? "Log out", ie = f?.addApiKeyActionLabel ?? "Add", ae = f?.deleteActionLabel ?? "Delete", oe = f?.credentialsSignedInLabel ?? "Signed in", se = f?.credentialsSignedOutLabel ?? "Signed out", ce = f?.addingApiKeyStatusLabel ?? "Adding", le = f?.apiKeyConfiguredMessage ?? "Key has been configured", ue = `${C}-header-hint`, de = c ? (f?.apiKeyHeaderHint ?? ((e) => `Enter your API key value for "${e}" header`))(c) : void 0, fe = s == null ? void 0 : (f?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(s);
899
906
  return /* @__PURE__ */ X("div", {
@@ -1103,18 +1110,17 @@ var kt = /* @__PURE__ */ function(e) {
1103
1110
  let [d, f] = z(""), [p, m] = z(!1), [h, g] = z(!1), [_, v] = z(!1), y = n === w.SignedIn, b = F((e) => {
1104
1111
  f(e ?? ""), m(!1);
1105
1112
  }, []), x = F(async () => {
1106
- if (d.trim().length === 0) {
1107
- m(!0);
1108
- return;
1109
- }
1110
- g(!0);
1111
- try {
1112
- await a?.(e, {
1113
- level: t,
1114
- apiKey: d
1115
- }), s();
1116
- } finally {
1117
- g(!1);
1113
+ if (d.trim().length === 0) m(!0);
1114
+ else {
1115
+ g(!0);
1116
+ try {
1117
+ await a?.(e, {
1118
+ level: t,
1119
+ apiKey: d
1120
+ }), s();
1121
+ } finally {
1122
+ g(!1);
1123
+ }
1118
1124
  }
1119
1125
  }, [
1120
1126
  e,
@@ -1134,17 +1140,17 @@ var kt = /* @__PURE__ */ function(e) {
1134
1140
  t,
1135
1141
  o,
1136
1142
  s
1137
- ]), C = c?.personalApiKeyPanelTitle ?? "Personal API key", T = c?.addApiKeyActionLabel ?? "Add", E = c?.deleteActionLabel ?? "Delete", D = c?.addingApiKeyStatusLabel ?? "Adding", O = c?.deletingStatusLabel ?? "Deleting", k = c?.apiKeyRequiredErrorMessage ?? "API key is required.", A = c?.personalApiKeyAddedMessage ?? "Personal key has been added", j = `catalog-item-${e.id}-${t}-api-key`, M = `${j}-header-hint`, ee = i ? (c?.apiKeyHeaderHint ?? ((e) => `Enter your API key value for "${e}" header`))(i) : void 0, te = r == null ? void 0 : (c?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(r);
1143
+ ]), C = c?.personalApiKeyPanelTitle ?? "Personal API key", T = c?.addApiKeyActionLabel ?? "Add", E = c?.deleteActionLabel ?? "Delete", D = c?.addingApiKeyStatusLabel ?? "Adding", O = c?.deletingStatusLabel ?? "Deleting", k = c?.apiKeyRequiredErrorMessage ?? "API key is required.", A = c?.personalApiKeyAddedMessage ?? "Personal key has been added", j = `catalog-item-${e.id}-${t}-api-key`, M = `${j}-header-hint`, ee = i ? (c?.apiKeyHeaderHint ?? ((e) => `Enter your API key value for "${e}" header`))(i) : void 0, te = r == null ? void 0 : (c?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(r), N = oe({
1144
+ "--cat-details-divider": l?.divider,
1145
+ "--cat-cred-hint-text": l?.credentialsHintText,
1146
+ "--cat-cred-card-bg": l?.credentialsCardBackground,
1147
+ "--cat-cred-card-icon": l?.credentialsCardIcon,
1148
+ "--cat-cred-card-title-text": l?.credentialsCardTitleText,
1149
+ "--cat-cred-card-description-text": l?.credentialsCardDescriptionText
1150
+ });
1138
1151
  return /* @__PURE__ */ X("div", {
1139
1152
  className: "flex w-[418px] flex-col",
1140
- style: oe({
1141
- "--cat-details-divider": l?.divider,
1142
- "--cat-cred-hint-text": l?.credentialsHintText,
1143
- "--cat-cred-card-bg": l?.credentialsCardBackground,
1144
- "--cat-cred-card-icon": l?.credentialsCardIcon,
1145
- "--cat-cred-card-title-text": l?.credentialsCardTitleText,
1146
- "--cat-cred-card-description-text": l?.credentialsCardDescriptionText
1147
- }),
1153
+ style: N,
1148
1154
  children: [
1149
1155
  /* @__PURE__ */ Y("div", {
1150
1156
  className: "flex items-center gap-2 px-4 py-3",
@@ -1219,11 +1225,7 @@ var kt = /* @__PURE__ */ function(e) {
1219
1225
  });
1220
1226
  }, tr = { name: "_name_gfs1p_1" }, nr = (e) => e.isMyApp === !0, rr = ({ item: e, onShare: t, shareOverlay: n, isShareVisible: r, label: i = "Share" }) => {
1221
1227
  let [a, o] = z(!1), s = F(() => {
1222
- if (n) {
1223
- o((e) => !e);
1224
- return;
1225
- }
1226
- t?.(e);
1228
+ n ? o((e) => !e) : t?.(e);
1227
1229
  }, [
1228
1230
  e,
1229
1231
  t,
@@ -1295,11 +1297,7 @@ var kt = /* @__PURE__ */ function(e) {
1295
1297
  ve(!1);
1296
1298
  }, [e.id]);
1297
1299
  let ye = F(() => {
1298
- if (o) {
1299
- ve(!0);
1300
- return;
1301
- }
1302
- a?.(e);
1300
+ o ? ve(!0) : a?.(e);
1303
1301
  }, [
1304
1302
  e,
1305
1303
  a,
@@ -1431,19 +1429,7 @@ var kt = /* @__PURE__ */ function(e) {
1431
1429
  danger: i,
1432
1430
  onClick: a
1433
1431
  })), [nt]), it = M?.(e), st = !re && !!ne && (it == null || it && !te), ct = !re && !!_ && !!v && e.isMyApp === !0 && (y?.(e) ?? !0), ut = nt.length === 1 && !Me && !st && !ct ? nt[0] : void 0, [Z, ht] = z(!1), _t = We === t.ApiKey && q !== r.ManageCredentials, vt = We === t.ApiKey && q === r.LogOut, bt = We !== t.ApiKey && q !== r.ManageCredentials && q === r.LogOut, wt = F(() => {
1434
- if (q === r.ManageCredentials) {
1435
- S?.();
1436
- return;
1437
- }
1438
- if (_t) {
1439
- ht((e) => !e);
1440
- return;
1441
- }
1442
- if (q === r.LogOut) {
1443
- w?.();
1444
- return;
1445
- }
1446
- b?.(e, { level: C.User });
1432
+ q === r.ManageCredentials ? S?.() : _t ? ht((e) => !e) : q === r.LogOut ? w?.() : b?.(e, { level: C.User });
1447
1433
  }, [
1448
1434
  q,
1449
1435
  _t,
@@ -1685,10 +1671,7 @@ var kt = /* @__PURE__ */ function(e) {
1685
1671
  case " ":
1686
1672
  e.preventDefault(), o.node.type === It.Folder ? r(o.node.id) : i(o.node.id);
1687
1673
  break;
1688
- case "Escape":
1689
- e.preventDefault(), a();
1690
- break;
1691
- default: break;
1674
+ case "Escape": e.preventDefault(), a();
1692
1675
  }
1693
1676
  }, m = (e) => P("flex h-10 shrink-0 cursor-pointer items-center gap-2 rounded-2 px-3 outline-none", "hover:bg-control-accent-alpha-hover focus-visible:bg-control-accent-alpha-hover", e && "bg-control-accent-alpha-hover"), h = (e) => {
1694
1677
  let a = e.id === u;
@@ -1946,19 +1929,21 @@ var kt = /* @__PURE__ */ function(e) {
1946
1929
  }, e.label))
1947
1930
  })] }), Tr = ({ limits: e, layout: t = Ft.Inline, labelClassName: n = "dial-small-semi-text", captionClassName: r = "dial-caption-text", valueClassName: i = "dial-tiny-text", noteValueClassName: a = "dial-tiny-semi-text", noteClassName: o = "dial-caption-text", sectionClassName: s = "dial-caption-text", footerClassName: c = "dial-caption-text", footerNote: l, colors: u }) => {
1948
1931
  let d = e?.groups.filter((e) => e.rows.length > 0);
1949
- return d == null || d.length === 0 ? null : /* @__PURE__ */ X("div", {
1932
+ if (d == null || d.length === 0) return null;
1933
+ let f = oe({
1934
+ "--lt-section-heading": u?.sectionHeading,
1935
+ "--lt-label": u?.label,
1936
+ "--lt-value-primary": u?.valuePrimary,
1937
+ "--lt-value-danger": u?.valueDanger,
1938
+ "--lt-divider": u?.divider,
1939
+ "--lt-progress-track": u?.progressTrack,
1940
+ "--lt-progress-fill-default": u?.progressFillDefault,
1941
+ "--lt-progress-fill-warning": u?.progressFillWarning,
1942
+ "--lt-progress-fill-danger": u?.progressFillDanger
1943
+ });
1944
+ return /* @__PURE__ */ X("div", {
1950
1945
  className: "flex flex-col gap-6",
1951
- style: oe({
1952
- "--lt-section-heading": u?.sectionHeading,
1953
- "--lt-label": u?.label,
1954
- "--lt-value-primary": u?.valuePrimary,
1955
- "--lt-value-danger": u?.valueDanger,
1956
- "--lt-divider": u?.divider,
1957
- "--lt-progress-track": u?.progressTrack,
1958
- "--lt-progress-fill-default": u?.progressFillDefault,
1959
- "--lt-progress-fill-warning": u?.progressFillWarning,
1960
- "--lt-progress-fill-danger": u?.progressFillDanger
1961
- }),
1946
+ style: f,
1962
1947
  children: [d.map((e) => /* @__PURE__ */ Y(wr, {
1963
1948
  group: e,
1964
1949
  layout: t,
@@ -2139,7 +2124,7 @@ var kt = /* @__PURE__ */ function(e) {
2139
2124
  "Everyone you shared it with loses access",
2140
2125
  "Existing share links stop working",
2141
2126
  "You keep full access — nothing is deleted"
2142
- ], Hr = (e) => e === t.ApiKey ? "Toolset API keys" : "Toolset credentials", Ur = (e) => e === C.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", Wr = new Set([Q.Delete, Q.Unshare]), Gr = ({ item: e, isOpen: t, isStarred: n = !1, isDetailsLoading: r = !1, isReadonly: i = !1, onClose: o, onToggleFavorite: c, isFavoriteVisible: l, onUseInChat: u, isPrimaryActionVisible: d, onShare: f, isPublishVisible: m, isPublishPrimary: h, getPublishHistory: g, publishFolderItems: _ = Ir, publishExpandedPaths: y, onPublishExpandedPathsChange: x, publishLoadingPaths: S, hasPublishWriteAccess: w, publishDefaultAuthor: k, onPublish: A, onPublishSuccess: j, onPublishError: M, onCreatePublishFolder: ee, publishLabels: te, ruleSourceOptions: N = Lr, onFetchExistingRules: ne, shareOverlay: re, isShareVisible: ie, isSharePrimary: ae, onEdit: se, onDownload: ce, isDownloadVisible: le, isDownloadPrimary: ue, onLoadContentFile: de, onLoadContentFilePreview: fe, renderContentFilePreview: pe, renderContentFileTree: me, renderCredentials: he, onDelete: ge, onUnshare: _e, isUnshareVisible: ve, onRevokeShare: ye, onFetchRecipientsCount: be, isRevokeShareVisible: xe, onUnpublish: Se, isUnpublishVisible: B, onLogin: V, onLogout: we, texts: H, styles: Te, limitsFooterNote: Ee }) => {
2127
+ ], Hr = (e) => e === t.ApiKey ? "Toolset API keys" : "Toolset credentials", Ur = (e) => e === C.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", Wr = /* @__PURE__ */ new Set([Q.Delete, Q.Unshare]), Gr = ({ item: e, isOpen: t, isStarred: n = !1, isDetailsLoading: r = !1, isReadonly: i = !1, onClose: o, onToggleFavorite: c, isFavoriteVisible: l, onUseInChat: u, isPrimaryActionVisible: d, onShare: f, isPublishVisible: m, isPublishPrimary: h, getPublishHistory: g, publishFolderItems: _ = Ir, publishExpandedPaths: y, onPublishExpandedPathsChange: x, publishLoadingPaths: S, hasPublishWriteAccess: w, publishDefaultAuthor: k, onPublish: A, onPublishSuccess: j, onPublishError: M, onCreatePublishFolder: ee, publishLabels: te, ruleSourceOptions: N = Lr, onFetchExistingRules: ne, shareOverlay: re, isShareVisible: ie, isSharePrimary: ae, onEdit: se, onDownload: ce, isDownloadVisible: le, isDownloadPrimary: ue, onLoadContentFile: de, onLoadContentFilePreview: fe, renderContentFilePreview: pe, renderContentFileTree: me, renderCredentials: he, onDelete: ge, onUnshare: _e, isUnshareVisible: ve, onRevokeShare: ye, onFetchRecipientsCount: be, isRevokeShareVisible: xe, onUnpublish: Se, isUnpublishVisible: B, onLogin: V, onLogout: we, texts: H, styles: Te, limitsFooterNote: Ee }) => {
2143
2128
  let { subViewTitleClassName: De = "dial-body-semi-text", overviewSectionClassName: Oe = "dial-caption-text", overviewLabelClassName: ke = "dial-small-semi-text", overviewValueClassName: Ae = "dial-small-text", overviewValueTrueClassName: je = "dial-small-text", confirmMessageClassName: Me = "dial-small-text" } = Te?.typography ?? {}, U = Te?.colors, Ne = oe({
2144
2129
  "--cat-details-backdrop": U?.backdrop,
2145
2130
  "--cat-details-bg": U?.background,
@@ -2799,7 +2784,7 @@ var kt = /* @__PURE__ */ function(e) {
2799
2784
  let r = !m;
2800
2785
  h(r), r ? n?.(e.id, r) : _(!0);
2801
2786
  }, y = i && !g ? () => i(e) : void 0, b = F((t) => {
2802
- !i || g || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), i(e));
2787
+ i && !g && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), i(e));
2803
2788
  }, [
2804
2789
  i,
2805
2790
  e,
@@ -2935,7 +2920,7 @@ var kt = /* @__PURE__ */ function(e) {
2935
2920
  }), a && e) {
2936
2921
  e.style.transition = "height 280ms cubic-bezier(0, 0, 0.2, 1)", e.style.height = `${i}px`;
2937
2922
  let t = (n) => {
2938
- n.target !== e || n.propertyName !== "height" || (e.style.height = "", e.style.overflow = "", e.style.transition = "", e.removeEventListener("transitionend", t));
2923
+ n.target === e && n.propertyName === "height" && (e.style.height = "", e.style.overflow = "", e.style.transition = "", e.removeEventListener("transitionend", t));
2939
2924
  };
2940
2925
  e.addEventListener("transitionend", t);
2941
2926
  }
@@ -2956,7 +2941,7 @@ var kt = /* @__PURE__ */ function(e) {
2956
2941
  if (t === 0) return;
2957
2942
  se.current = !0, e.style.height = "0px", e.offsetHeight, e.style.transition = "height 300ms cubic-bezier(0, 0, 0.2, 1)", e.style.height = `${t}px`;
2958
2943
  let n = (t) => {
2959
- t.target !== e || t.propertyName !== "height" || r();
2944
+ t.target === e && t.propertyName === "height" && r();
2960
2945
  }, r = () => {
2961
2946
  se.current = !1, parseFloat(e.style.height || "0") > 0 && (e.style.height = "", e.style.transition = ""), clearTimeout(i), e.removeEventListener("transitionend", n);
2962
2947
  }, i = setTimeout(r, 400);
@@ -3393,14 +3378,10 @@ var kt = /* @__PURE__ */ function(e) {
3393
3378
  let [u, d] = z(null), f = u ? r.find((e) => e.key === u) : void 0, p = f?.children ?? r, m = i ? Bt(p, i.value) : p, h = () => {
3394
3379
  d(null), t();
3395
3380
  }, g = (e, t) => {
3396
- if (e.children?.length) {
3397
- d(e.key);
3398
- return;
3399
- }
3400
- e.onClick?.({
3381
+ e.children?.length ? d(e.key) : (e.onClick?.({
3401
3382
  key: e.key,
3402
3383
  domEvent: t
3403
- }), h();
3384
+ }), h());
3404
3385
  };
3405
3386
  return /* @__PURE__ */ X(ge, {
3406
3387
  open: e,
@@ -3472,45 +3453,48 @@ var kt = /* @__PURE__ */ function(e) {
3472
3453
  backLabel: s,
3473
3454
  closeLabel: c
3474
3455
  })] });
3475
- if (r) return /* @__PURE__ */ Y("div", {
3476
- ref: u,
3477
- children: /* @__PURE__ */ Y(H, {
3478
- items: t?.length ? Bt(t, r.value) : [{
3479
- key: "no-results",
3480
- type: Te.PlainText,
3481
- label: /* @__PURE__ */ Y("span", {
3482
- role: "status",
3483
- children: o
3484
- })
3485
- }],
3486
- maxDropdownHeight: 344,
3487
- placement: "bottom-end",
3488
- matchReferenceWidth: !1,
3489
- listClassName: Ci,
3490
- menuHeader: /* @__PURE__ */ Y("div", {
3491
- className: "sticky -top-1 z-10 bg-layer-raised px-2 pb-1 pt-2",
3492
- children: /* @__PURE__ */ Y(Ve, {
3493
- value: r.value,
3494
- placeholder: i,
3495
- "aria-label": i,
3496
- clearLabel: a,
3497
- size: Ee.Small,
3498
- onChange: (e) => r.onChange(e ?? "")
3456
+ if (r) {
3457
+ let n = t?.length ? Bt(t, r.value) : [{
3458
+ key: "no-results",
3459
+ type: Te.PlainText,
3460
+ label: /* @__PURE__ */ Y("span", {
3461
+ role: "status",
3462
+ children: o
3463
+ })
3464
+ }];
3465
+ return /* @__PURE__ */ Y("div", {
3466
+ ref: u,
3467
+ children: /* @__PURE__ */ Y(H, {
3468
+ items: n,
3469
+ maxDropdownHeight: 344,
3470
+ placement: "bottom-end",
3471
+ matchReferenceWidth: !1,
3472
+ listClassName: Ci,
3473
+ menuHeader: /* @__PURE__ */ Y("div", {
3474
+ className: "sticky -top-1 z-10 bg-layer-raised px-2 pb-1 pt-2",
3475
+ children: /* @__PURE__ */ Y(Ve, {
3476
+ value: r.value,
3477
+ placeholder: i,
3478
+ "aria-label": i,
3479
+ clearLabel: a,
3480
+ size: Ee.Small,
3481
+ onChange: (e) => r.onChange(e ?? "")
3482
+ })
3483
+ }),
3484
+ onOpenChange: (e) => {
3485
+ f(e), e || r.onChange("");
3486
+ },
3487
+ children: /* @__PURE__ */ Y(_e, {
3488
+ label: e,
3489
+ variant: l,
3490
+ appearance: ve.Solid,
3491
+ iconAfter: m,
3492
+ "aria-haspopup": "menu",
3493
+ "aria-expanded": d
3499
3494
  })
3500
- }),
3501
- onOpenChange: (e) => {
3502
- f(e), e || r.onChange("");
3503
- },
3504
- children: /* @__PURE__ */ Y(_e, {
3505
- label: e,
3506
- variant: l,
3507
- appearance: ve.Solid,
3508
- iconAfter: m,
3509
- "aria-haspopup": "menu",
3510
- "aria-expanded": d
3511
3495
  })
3512
- })
3513
- });
3496
+ });
3497
+ }
3514
3498
  if (!t?.length) {
3515
3499
  let t = /* @__PURE__ */ Y(ht, {
3516
3500
  size: B.SM,
@@ -4101,7 +4085,7 @@ var kt = /* @__PURE__ */ function(e) {
4101
4085
  }, [se]), nn = F(async (e) => (Kt(e), Xt(void 0), tn(e)), [tn]), rn = F(async (e, t) => {
4102
4086
  for (let n = 0; n < zi; n++) {
4103
4087
  if ($t.current !== e.id || t(await tn(e))) return;
4104
- n < zi - 1 && await y(Bi);
4088
+ n < 2 && await y(Bi);
4105
4089
  }
4106
4090
  }, [tn]), an = R(null);
4107
4091
  I(() => {
@@ -4472,11 +4456,7 @@ var kt = /* @__PURE__ */ function(e) {
4472
4456
  value: n ?? t.find((t) => t.id === e)?.label ?? e ?? "",
4473
4457
  placeholder: r,
4474
4458
  onKeyDown: (e) => {
4475
- if (e.key === "Escape") {
4476
- k();
4477
- return;
4478
- }
4479
- b && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), w(!C));
4459
+ e.key === "Escape" ? k() : b && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), w(!C));
4480
4460
  },
4481
4461
  containerClassName: "w-full min-w-0",
4482
4462
  wrapperClassName: P("cursor-pointer", m),
@@ -4567,7 +4547,7 @@ var kt = /* @__PURE__ */ function(e) {
4567
4547
  label: m,
4568
4548
  disabled: l,
4569
4549
  onClick: async () => {
4570
- if (!(l || !e.canLogout)) {
4550
+ if (!l && e.canLogout) {
4571
4551
  u(!0), f(void 0);
4572
4552
  try {
4573
4553
  await i(e.id), c(!1);
@@ -59,7 +59,7 @@ var t = /* @__PURE__ */ function(e) {
59
59
  if (t == null) return;
60
60
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = getComputedStyle(e), a = parseFloat(i.paddingInlineStart) || 0, o = parseFloat(i.paddingInlineEnd) || 0;
61
61
  r.left < n.left + a ? e.scrollLeft -= n.left + a - r.left : r.right > n.right - o && (e.scrollLeft += r.right - (n.right - o));
62
- }, b = new Set([e.Prompt, e.Skill]), x = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, S = (e, t = {}) => {
62
+ }, b = /* @__PURE__ */ new Set([e.Prompt, e.Skill]), x = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, S = (e, t = {}) => {
63
63
  let n = [], r = b.has(e.type), i = e.details;
64
64
  return r || n.push(c.About), (r || i?.promptContent != null) && n.push(c.Content), i?.overview != null && n.push(c.Overview), i?.pricing != null && n.push(c.Pricing), i?.limits != null && n.push(c.Limits), i?.tools != null && n.push(c.Tools), !t.isConnectHidden && x(i?.api) && n.push(c.Api), n;
65
65
  }, C = (e) => e === n.SignedIn, w = (e, t) => C(t === r.User ? e?.userStatus : e?.globalStatus), T = (e) => new Promise((t) => setTimeout(t, e)), E = (e) => {
package/mapping.js CHANGED
@@ -1,2 +1 @@
1
- import { C as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, f as c, h as l, i as u, n as d, r as f, u as p, w as m, x as h, y as g } from "./mapping-CA0Z7TOl.js";
2
- export { g as CatalogDetailsTab, o as CatalogSortKey, h as CredentialStatus, n as CredentialsBadgeState, e as CredentialsBannerState, m as CredentialsLevel, r as CredentialsUiState, t as ToolsetAuthenticationType, p as buildCatalogTabs, l as filterCatalogItems, s as getCatalogDetailsTabs, d as getCredentialsBadgeState, f as getCredentialsBannerState, u as getCredentialsUiState, a as getSignedInLevel, i as getTopicOptions, c as sortCatalogItems };
1
+ export { y as CatalogDetailsTab, b as CatalogSortKey, x as CredentialStatus, S as CredentialsBadgeState, C as CredentialsBannerState, w as CredentialsLevel, T as CredentialsUiState, E as ToolsetAuthenticationType, u as buildCatalogTabs, h as filterCatalogItems, c as getCatalogDetailsTabs, n as getCredentialsBadgeState, r as getCredentialsBannerState, i as getCredentialsUiState, a as getSignedInLevel, _ as getTopicOptions, f as sortCatalogItems } from "./mapping-pfzXbpRv.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-catalog",
3
3
  "description": "Marketplace catalog component for browsing models, tools, and assistants with search, filter, and sort",
4
- "version": "1.2.8",
4
+ "version": "1.2.9",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -28,11 +28,11 @@
28
28
  "dependencies": {
29
29
  "@tabler/icons-react": "^3.44.0",
30
30
  "ag-grid-community": "^35.3.0",
31
- "@epam/ai-dial-publish-panel": "1.2.8"
31
+ "@epam/ai-dial-publish-panel": "1.2.9"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^19.2.8",
35
- "@epam/ai-dial-chat-shared": "1.2.8",
35
+ "@epam/ai-dial-chat-shared": "1.2.9",
36
36
  "@epam/ai-dial-ui-kit": "^0.15.4"
37
37
  },
38
38
  "repository": {