@epam/ai-dial-catalog 1.3.0-dev.191 → 1.3.0-dev.195

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.
@@ -56,33 +56,33 @@ var t = /* @__PURE__ */ function(e) {
56
56
  e.Toolset,
57
57
  e.Skill,
58
58
  e.Prompt
59
- ], x = (e, t) => {
59
+ ], x = (e) => e.catalogTabs != null && e.catalogTabs.length > 0 ? e.catalogTabs : [e.type], S = (e, t) => {
60
60
  let n = {
61
61
  ...y,
62
62
  ...t
63
- }, r = new Set(e.map((e) => e.type));
63
+ }, r = new Set(e.flatMap(x));
64
64
  return b.filter((e) => r.has(e)).map((e) => ({
65
65
  id: e,
66
66
  label: n[e] ?? e
67
67
  }));
68
- }, S = (e) => {
68
+ }, C = (e) => {
69
69
  let t = e.querySelector("[role=\"tab\"][aria-selected=\"true\"]");
70
70
  if (t == null) return;
71
71
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = getComputedStyle(e), a = parseFloat(i.paddingInlineStart) || 0, o = parseFloat(i.paddingInlineEnd) || 0;
72
72
  r.left < n.left + a ? e.scrollLeft -= n.left + a - r.left : r.right > n.right - o && (e.scrollLeft += r.right - (n.right - o));
73
- }, C = (e, t) => typeof e == "function" ? e(t) : e, w = /* @__PURE__ */ new Set([e.Prompt, e.Skill]), T = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, E = (e, t = {}) => {
74
- let n = [], r = w.has(e.type), i = e.details;
75
- 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 && T(i?.api) && n.push(c.Api), n;
76
- }, D = (e) => e === n.SignedIn, O = (e, t) => D(t === r.User ? e?.userStatus : e?.globalStatus), k = (e) => new Promise((t) => setTimeout(t, e)), A = (e) => {
77
- let t = D(e.userStatus), n = D(e.globalStatus);
73
+ }, w = (e, t) => typeof e == "function" ? e(t) : e, T = /* @__PURE__ */ new Set([e.Prompt, e.Skill]), E = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, D = (e, t = {}) => {
74
+ let n = [], r = T.has(e.type), i = e.details;
75
+ 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 && E(i?.api) && n.push(c.Api), n;
76
+ }, O = (e) => e === n.SignedIn, k = (e, t) => O(t === r.User ? e?.userStatus : e?.globalStatus), A = (e) => new Promise((t) => setTimeout(t, e)), j = (e) => {
77
+ let t = O(e.userStatus), n = O(e.globalStatus);
78
78
  return e.isManageableByAdmin ? i.ManageCredentials : e.isPublic && !t ? i.LoginWithMyCreds : !t && !n ? i.LogIn : i.LogOut;
79
- }, j = (e) => {
79
+ }, M = (e) => {
80
80
  if (e.authenticationType === t.None) return;
81
- let n = D(e.userStatus), r = D(e.globalStatus);
81
+ let n = O(e.userStatus), r = O(e.globalStatus);
82
82
  return !n && !r ? a.LoggedOut : void 0;
83
- }, M = (e) => e?.authenticationType == null || e.authenticationType === t.None ? !1 : D(e.globalStatus), N = (e) => e.isPublic || D(e.userStatus) ? r.User : r.Global, P = (e) => D(e.userStatus) ? r.User : r.Global, F = (e) => {
84
- if (e.isManageableByAdmin) return D(e.userStatus) ? o.PersonalCredentialsActive : D(e.globalStatus) ? o.OrgCredentialsActive : void 0;
85
- if (D(e.globalStatus) && e.isPublic && !D(e.userStatus)) return o.UsingOrgCredentials;
83
+ }, N = (e) => e?.authenticationType == null || e.authenticationType === t.None ? !1 : O(e.globalStatus), P = (e) => e.isPublic || O(e.userStatus) ? r.User : r.Global, F = (e) => O(e.userStatus) ? r.User : r.Global, I = (e) => {
84
+ if (e.isManageableByAdmin) return O(e.userStatus) ? o.PersonalCredentialsActive : O(e.globalStatus) ? o.OrgCredentialsActive : void 0;
85
+ if (O(e.globalStatus) && e.isPublic && !O(e.userStatus)) return o.UsingOrgCredentials;
86
86
  };
87
87
  //#endregion
88
- export { i as A, l as C, a as D, n as E, o as O, h as S, s as T, d as _, N as a, u as b, k as c, x as d, C as f, f as g, _ as h, A as i, t as j, r as k, E as l, v as m, j as n, P as o, S as p, F as r, O as s, M as t, T as u, m as v, c as w, p as x, g as y };
88
+ export { r as A, h as C, n as D, s as E, t as M, a as O, p as S, c as T, f as _, P as a, g as b, A as c, S as d, x as f, _ as g, v as h, j as i, i as j, o as k, D as l, C as m, M as n, F as o, w as p, I as r, k as s, N as t, E as u, d as v, l as w, u as x, m as y };
package/mapping.js CHANGED
@@ -1 +1 @@
1
- export { w as CatalogDetailsTab, T as CatalogSortKey, E as CredentialStatus, D as CredentialsBadgeState, O as CredentialsBannerState, k as CredentialsLevel, A as CredentialsUiState, j as ToolsetAuthenticationType, m as applyCatalogSelection, d as buildCatalogTabs, v as filterCatalogItems, y as filterCatalogItemsByQuery, l as getCatalogDetailsTabs, n as getCredentialsBadgeState, r as getCredentialsBannerState, i as getCredentialsUiState, a as getDirectCredentialsLevel, o as getSignedInLevel, x as getTopicOptions, C as sortCatalogItems } from "./mapping-CaLNwK9q.js";
1
+ export { T as CatalogDetailsTab, E as CatalogSortKey, D as CredentialStatus, O as CredentialsBadgeState, k as CredentialsBannerState, A as CredentialsLevel, j as CredentialsUiState, M as ToolsetAuthenticationType, h as applyCatalogSelection, d as buildCatalogTabs, y as filterCatalogItems, b as filterCatalogItemsByQuery, l as getCatalogDetailsTabs, f as getCatalogItemTabs, n as getCredentialsBadgeState, r as getCredentialsBannerState, i as getCredentialsUiState, a as getDirectCredentialsLevel, o as getSignedInLevel, S as getTopicOptions, w as sortCatalogItems } from "./mapping-DWjFiV8g.js";
@@ -5,8 +5,10 @@ import { CatalogItemTabData } from './item-details-data';
5
5
  export interface CatalogItem {
6
6
  /** Unique identifier. */
7
7
  id: string;
8
- /** Entity category. */
8
+ /** Entity kind; drives the item's actions and details. */
9
9
  type: CatalogEntityType;
10
+ /** Browse tabs the item is listed under. Defaults to `[type]`. */
11
+ catalogTabs?: readonly CatalogEntityType[];
10
12
  /** Display name. */
11
13
  name: string;
12
14
  /** Version string shown next to the name. */
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-item.d.ts","sourceRoot":"","sources":["../../src/models/catalog-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,qDAAqD;AACrD,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,IAAI,EAAE,iBAAiB,CAAC;IACxB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oGAAoG;IACpG,YAAY,CAAC,EAAE,OAAO,CAAC;I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,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sGAAsG;IACtG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oGAAoG;IACpG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8IAA8I;IAC9I,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yGAAyG;IACzG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uCAAuC;IACvC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,gFAAgF;IAChF,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,4GAA4G;IAC5G,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,mGAAmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oLAAoL;IACpL,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
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.3.0-dev.191",
4
+ "version": "1.3.0-dev.195",
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.3.0-dev.191"
31
+ "@epam/ai-dial-publish-panel": "1.3.0-dev.195"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^19.2.8",
35
- "@epam/ai-dial-chat-shared": "1.3.0-dev.191",
35
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.195",
36
36
  "@epam/ai-dial-ui-kit": "^0.16.0-dev.45"
37
37
  },
38
38
  "repository": {
@@ -1,7 +1,9 @@
1
1
  import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
2
2
  import { TabModel } from '@epam/ai-dial-ui-kit';
3
3
  import { CatalogItem } from '../models/catalog-item';
4
- /** Derives entity-type tabs from items present in the catalog, sorted by canonical order. */
4
+ /** Returns the Browse tabs `item` is listed under: its non-empty `catalogTabs`, otherwise `[item.type]`. */
5
+ export declare const getCatalogItemTabs: (item: CatalogItem) => readonly CatalogEntityType[];
6
+ /** Derives entity-type tabs from the tabs the catalog's items are listed under, sorted by canonical order. */
5
7
  export declare const buildCatalogTabs: (items: CatalogItem[], tabLabels?: Partial<Record<CatalogEntityType, string>>) => TabModel[];
6
8
  /** Scrolls a horizontally scrolling tab row just enough to bring its selected tab fully into view. */
7
9
  export declare const scrollSelectedTabIntoView: (row: HTMLElement) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-tabs.d.ts","sourceRoot":"","sources":["../../src/utils/catalog-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAuB1D,6FAA6F;AAC7F,eAAO,MAAM,gBAAgB,GAC3B,OAAO,WAAW,EAAE,EACpB,YAAY,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,KACrD,QAAQ,EAOV,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,yBAAyB,GAAI,KAAK,WAAW,KAAG,IAiB5D,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,EAC1D,WAAW,MAAM,KAChB,MAA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