@epam/ai-dial-chat-hooks 1.4.0-dev.67 → 1.4.0-dev.69

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,4 +1,4 @@
1
- import { PublishApi, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishRuleDto, ResourceDependenciesResultDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto } from '@epam/ai-dial-chat-api-client';
1
+ import { PublishApi, PublishCatalogEntityDto, PublishHistoryEntryDto, PublishResultDto, PublishRuleDto, ResourceDependenciesResultDto, UnpublishAccessDto, UnpublishCatalogEntityDto, UnpublishResultDto, VersionStatusEntryDto } from '@epam/ai-dial-chat-api-client';
2
2
  import { PublicationRule } from '@epam/ai-dial-publish-panel';
3
3
  import { CatalogPublishEntityType } from './publish';
4
4
  /**
@@ -27,6 +27,8 @@ export interface PublishApiClient {
27
27
  getCatalogPublishDependencies: (entityType: CatalogPublishEntityType, entityId: string) => Promise<ResourceDependenciesResultDto>;
28
28
  /** Reads whether the caller may request removal of one catalog entity. */
29
29
  getCatalogUnpublishAccess: (entityType: CatalogPublishEntityType, entityId: string) => Promise<UnpublishAccessDto>;
30
+ /** Reads the publication status of every saved version of one application or toolset. */
31
+ getCatalogVersionStatuses: (entityType: CatalogPublishEntityType, entityId: string) => Promise<VersionStatusEntryDto[]>;
30
32
  /** Reads a destination folder's already-configured access rules. */
31
33
  getPublishRules: (folderPath: string) => Promise<PublicationRule[]>;
32
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-publish-api.d.ts","sourceRoot":"","sources":["../../src/catalog/create-publish-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,6BAA6B,EAC7B,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,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MAAM,KAAK,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;CACrE;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,YAAY,UAAU,KACrB,gBA4BD,CAAC"}
@@ -26,6 +26,10 @@ var e = (e) => ({
26
26
  entityType: t,
27
27
  entityId: n
28
28
  }),
29
+ getCatalogVersionStatuses: (t, n) => e.getCatalogVersionStatuses({
30
+ entityType: t,
31
+ entityId: n
32
+ }),
29
33
  getPublishRules: async (t) => (await e.getPublishRules({ folderPath: t })).rules.map(({ function: e, ...t }) => ({
30
34
  ...t,
31
35
  function: e
@@ -10,6 +10,8 @@ import { PublishDependency, PublishHistoryEntry } from '@epam/ai-dial-publish-pa
10
10
  export type CatalogPublishEntityType = 'model' | 'toolset' | 'application' | 'prompt' | 'skill' | 'project';
11
11
  /** Maps a catalog item's entity type to the publish API's entity-type path param, or `undefined` if that type is not publishable. */
12
12
  export declare const toPublishEntityType: (type: CatalogEntityType) => CatalogPublishEntityType | undefined;
13
+ /** Whether a catalog entity type has saved versions, and so a Versions history section. */
14
+ export declare const isVersionedCatalogEntityType: (type: CatalogEntityType) => boolean;
13
15
  /**
14
16
  * Whether a catalog entity id addresses the shared `public` bucket
15
17
  * (`{resourceType}/public/{folder…}/{name}`), i.e. the id names a published
@@ -1 +1 @@
1
- {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/catalog/publish.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAiB,MAAM,2BAA2B,CAAC;AAC7E,OAAO,KAAK,EACV,iBAAiB,EAEjB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAGrC;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAClC,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAYv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AM,KAAG,OACjB,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,UAAU,MAAM,KAAG,MAAM,EAGlE,CAAC;AAET,kGAAkG;AAClG,eAAO,MAAM,yBAAyB,GACpC,KAAK,sBAAsB,KAC1B,mBAKD,CAAC;AAEH,iHAAiH;AACjH,eAAO,MAAM,+BAA+B,GAC1C,KAAK,4BAA4B,KAChC,mBAKD,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GACnC,KAAK,qBAAqB,EAC1B,iBAAiB,CAAC,GAAG,EAAE,qBAAqB,KAAK,MAAM,GAAG,SAAS,KAClE,iBAWF,CAAC"}
@@ -7,15 +7,15 @@ var r = {
7
7
  [t.Agent]: "application",
8
8
  [t.Prompt]: "prompt",
9
9
  [t.Skill]: "skill"
10
- }, i = (e) => r[e], a = (e) => e.split("/")[1] === n, o = (t) => a(t) ? t.split("/").slice(2, -1).map(e) : [], s = (e) => ({
10
+ }, i = (e) => r[e], a = (e) => e === t.Agent || e === t.Toolset, o = (e) => e.split("/")[1] === n, s = (t) => o(t) ? t.split("/").slice(2, -1).map(e) : [], c = (e) => ({
11
11
  version: e.version,
12
12
  publishedAt: Date.parse(e.publishedAt),
13
13
  folderPath: e.folderPath.split("/").filter(Boolean),
14
14
  publishCredentials: e.publishCredentials
15
- }), c = (e) => ({
15
+ }), l = (e) => ({
16
16
  publishedAt: Date.parse(e.publishedAt),
17
17
  folderPath: e.folderPath.split("/").filter(Boolean)
18
- }), l = (e, t) => {
18
+ }), u = (e, t) => {
19
19
  let n = t?.(e);
20
20
  return {
21
21
  id: e.id,
@@ -28,4 +28,4 @@ var r = {
28
28
  };
29
29
  };
30
30
  //#endregion
31
- export { o as getPublicCatalogEntityFolderPath, a as isPublicCatalogEntityId, c as mapPublishConversationResultDto, s as mapPublishHistoryEntryDto, l as mapResourceDependencyDto, i as toPublishEntityType };
31
+ export { s as getPublicCatalogEntityFolderPath, o as isPublicCatalogEntityId, a as isVersionedCatalogEntityType, l as mapPublishConversationResultDto, c as mapPublishHistoryEntryDto, u as mapResourceDependencyDto, i as toPublishEntityType };
@@ -0,0 +1,38 @@
1
+ import { VersionHistoryRow } from '@epam/ai-dial-publish-panel';
2
+ import { PublishApiClient } from '../create-publish-api';
3
+ import { CatalogPublishEntityType } from '../publish';
4
+ import { VersionHistoryFormatters, VersionHistoryListingItem } from '../version-history';
5
+ /** Parameters of {@link useVersionHistory}. */
6
+ export interface UseVersionHistoryParams {
7
+ /** Items of the already-loaded deployments or toolsets listing. */
8
+ items: readonly VersionHistoryListingItem[];
9
+ /** Id of the resource being edited or published. */
10
+ resourceId: string;
11
+ /** Publish API entity type of the resource. */
12
+ entityType: CatalogPublishEntityType;
13
+ /** Whether the panel showing the history is open; statuses load only while it is. */
14
+ isEnabled: boolean;
15
+ /** Configured client that reads the version statuses. */
16
+ client: Pick<PublishApiClient, 'getCatalogVersionStatuses'>;
17
+ /** Host text and date formatting; keep it referentially stable. */
18
+ formatters: VersionHistoryFormatters;
19
+ }
20
+ /** Result of {@link useVersionHistory}. */
21
+ export interface UseVersionHistoryResult {
22
+ /** The other saved versions of the resource, newest first; statuses fill in once loaded. */
23
+ rows: VersionHistoryRow[];
24
+ /** Whether the listing holds another version the section can show; the host renders no section when it is `false`. */
25
+ hasVersions: boolean;
26
+ /** Whether the statuses are being loaded. */
27
+ isLoading: boolean;
28
+ /** Whether the last statuses request failed. */
29
+ hasError: boolean;
30
+ /** Reloads the statuses. */
31
+ onRetry: () => void;
32
+ }
33
+ /**
34
+ * Groups the listing by `versionGroupId`, builds the Versions history rows of the other versions and loads their publication statuses in the background while the panel is open.
35
+ * @param params - listing items, edited resource, open state, client and formatters
36
+ */
37
+ export declare const useVersionHistory: ({ items, resourceId, entityType, isEnabled, client, formatters, }: UseVersionHistoryParams) => UseVersionHistoryResult;
38
+ //# sourceMappingURL=useVersionHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVersionHistory.d.ts","sourceRoot":"","sources":["../../../src/catalog/useVersionHistory/useVersionHistory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAE5B,+CAA+C;AAC/C,MAAM,WAAW,uBAAuB;IACtC,mEAAmE;IACnE,KAAK,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAC5C,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,UAAU,EAAE,wBAAwB,CAAC;IACrC,qFAAqF;IACrF,SAAS,EAAE,OAAO,CAAC;IACnB,yDAAyD;IACzD,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,2BAA2B,CAAC,CAAC;IAC5D,mEAAmE;IACnE,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED,2CAA2C;AAC3C,MAAM,WAAW,uBAAuB;IACtC,4FAA4F;IAC5F,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,sHAAsH;IACtH,WAAW,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAOD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,mEAO/B,uBAAuB,KAAG,uBA2D5B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { safeDecodeURIComponent as e } from "../../shared/string-utils.js";
2
+ import { buildVersionHistoryRows as t, selectOtherVersions as n } from "../version-history.js";
3
+ import { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
4
+ //#region src/catalog/useVersionHistory/useVersionHistory.ts
5
+ var s = ({ items: s, resourceId: c, entityType: l, isEnabled: u, client: d, formatters: f }) => {
6
+ let p = a(() => n(s, c), [s, c]), m = p.length > 0, [h, g] = o(0), [_, v] = o(), [y, b] = o(), [x, S] = o(u);
7
+ x !== u && (S(u), u || (v(void 0), b(void 0)));
8
+ let C = `${l}:${c}:${h}`, w = u && m;
9
+ i(() => {
10
+ if (!w) return;
11
+ let t = !1;
12
+ return (async () => {
13
+ try {
14
+ let n = await d.getCatalogVersionStatuses(l, c);
15
+ if (t) return;
16
+ v({
17
+ key: C,
18
+ statuses: new Map(n.map((t) => [e(t.id), t]))
19
+ }), b(void 0);
20
+ } catch {
21
+ t || b(C);
22
+ }
23
+ })(), () => {
24
+ t = !0;
25
+ };
26
+ }, [
27
+ w,
28
+ d,
29
+ l,
30
+ c,
31
+ C
32
+ ]);
33
+ let T = a(() => t(p, _?.statuses, f), [
34
+ p,
35
+ _,
36
+ f
37
+ ]), E = w && y === C;
38
+ return {
39
+ rows: T,
40
+ hasVersions: m,
41
+ isLoading: w && !E && _?.key !== C,
42
+ hasError: E,
43
+ onRetry: r(() => {
44
+ b(void 0), g((e) => e + 1);
45
+ }, [])
46
+ };
47
+ };
48
+ //#endregion
49
+ export { s as useVersionHistory };
@@ -0,0 +1,30 @@
1
+ import { CatalogEntityType } from '@epam/ai-dial-chat-shared';
2
+ import { VersionHistoryLabels, VersionHistorySectionProps } from '@epam/ai-dial-publish-panel';
3
+ import { VersionHistoryFormatters, VersionHistoryListingItem } from '../version-history';
4
+ import { UseVersionHistoryParams } from './useVersionHistory';
5
+ /** Parameters of {@link useVersionHistorySection}. */
6
+ export interface UseVersionHistorySectionParams {
7
+ /** Id of the resource being edited or published. */
8
+ resourceId: string;
9
+ /** Catalog type of the resource. */
10
+ resourceType: CatalogEntityType;
11
+ /** Whether the panel showing the section is open; statuses load only while it is. */
12
+ isEnabled: boolean;
13
+ /** Items of the already-loaded deployments listing, used for applications. */
14
+ applications: readonly VersionHistoryListingItem[];
15
+ /** Items of the already-loaded toolsets listing, used for toolsets. */
16
+ toolsets: readonly VersionHistoryListingItem[];
17
+ /** Configured client that reads the version statuses. */
18
+ client: UseVersionHistoryParams['client'];
19
+ /** Translated section labels, from the host. */
20
+ labels: VersionHistoryLabels;
21
+ /** Host text and date formatting; keep it referentially stable. */
22
+ formatters: VersionHistoryFormatters;
23
+ }
24
+ /**
25
+ * Builds the props of the Versions history section for an application or toolset from the listings the host already holds.
26
+ * @param params - listings, edited resource, open state, client, labels and formatters
27
+ * @returns the section props, or `undefined` for an unversioned resource type and while the listing holds no version the user owns
28
+ */
29
+ export declare const useVersionHistorySection: ({ resourceId, resourceType, isEnabled, applications, toolsets, client, labels, formatters, }: UseVersionHistorySectionParams) => VersionHistorySectionProps | undefined;
30
+ //# sourceMappingURL=useVersionHistorySection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVersionHistorySection.d.ts","sourceRoot":"","sources":["../../../src/catalog/useVersionHistory/useVersionHistorySection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAE7B,sDAAsD;AACtD,MAAM,WAAW,8BAA8B;IAC7C,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,YAAY,EAAE,iBAAiB,CAAC;IAChC,qFAAqF;IACrF,SAAS,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,YAAY,EAAE,SAAS,yBAAyB,EAAE,CAAC;IACnD,uEAAuE;IACvE,QAAQ,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAC/C,yDAAyD;IACzD,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC1C,gDAAgD;IAChD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,mEAAmE;IACnE,UAAU,EAAE,wBAAwB,CAAC;CACtC;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GAAI,8FAStC,8BAA8B,KAAG,0BAA0B,GAAG,SAqBhE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { isVersionedCatalogEntityType as e, toPublishEntityType as t } from "../publish.js";
2
+ import { useVersionHistory as n } from "./useVersionHistory.js";
3
+ import { useMemo as r } from "react";
4
+ //#region src/catalog/useVersionHistory/useVersionHistorySection.ts
5
+ var i = ({ resourceId: i, resourceType: a, isEnabled: o, applications: s, toolsets: c, client: l, labels: u, formatters: d }) => {
6
+ let f = e(a), p = t(a) ?? "application", { rows: m, hasVersions: h, isLoading: g, hasError: _, onRetry: v } = n({
7
+ items: p === "toolset" ? c : s,
8
+ resourceId: i,
9
+ entityType: p,
10
+ isEnabled: o && f,
11
+ client: l,
12
+ formatters: d
13
+ });
14
+ return r(() => f && h ? {
15
+ rows: m,
16
+ isLoading: g,
17
+ hasError: _,
18
+ onRetry: v,
19
+ labels: u
20
+ } : void 0, [
21
+ f,
22
+ h,
23
+ m,
24
+ g,
25
+ _,
26
+ v,
27
+ u
28
+ ]);
29
+ };
30
+ //#endregion
31
+ export { i as useVersionHistorySection };
@@ -0,0 +1,42 @@
1
+ import { VersionStatusEntryDto } from '@epam/ai-dial-chat-api-client';
2
+ import { VersionHistoryRow } from '@epam/ai-dial-publish-panel';
3
+ /** The fields of a deployments or toolsets listing item the Versions history reads. */
4
+ export interface VersionHistoryListingItem {
5
+ /** Resource id as the listing returns it. */
6
+ id: string;
7
+ /** Key shared by every version of one resource saved by one owner in one folder. */
8
+ versionGroupId?: string;
9
+ /** Display version of the item. */
10
+ displayVersion?: string;
11
+ /** Last modified time, epoch milliseconds. */
12
+ updatedAt?: number;
13
+ /** Original author of the resource. */
14
+ owner?: string;
15
+ /** Whether the item belongs to the caller. */
16
+ isMy?: boolean;
17
+ }
18
+ /** Host-supplied text and date formatting for the Versions history rows. */
19
+ export interface VersionHistoryFormatters {
20
+ /** Translated label of the Personal root, the first part of every folder. */
21
+ rootLabel: string;
22
+ /** Formats a last-modified time given in epoch milliseconds. */
23
+ formatDate: (timestamp: number) => string;
24
+ /** Builds the author line of a published version, e.g. `Published by {name}`. */
25
+ formatPublishedBy: (name: string) => string;
26
+ /** Builds the author line of any other version, e.g. `by {name}`. */
27
+ formatOwner: (name: string) => string;
28
+ }
29
+ /**
30
+ * Selects the other saved versions of `resourceId` from a listing: the caller's own items that share its `versionGroupId`, without the version itself.
31
+ * @param items - deployments or toolsets listing items
32
+ * @param resourceId - id of the resource being edited or published
33
+ */
34
+ export declare const selectOtherVersions: <T extends VersionHistoryListingItem>(items: readonly T[], resourceId: string) => T[];
35
+ /**
36
+ * Builds the Versions history rows, newest first by last modified time.
37
+ * @param group - the other versions of the resource, from {@link selectOtherVersions}
38
+ * @param statuses - statuses by item id; omit while they load
39
+ * @param formatters - host text and date formatting
40
+ */
41
+ export declare const buildVersionHistoryRows: (group: readonly VersionHistoryListingItem[], statuses: ReadonlyMap<string, VersionStatusEntryDto> | undefined, formatters: VersionHistoryFormatters) => VersionHistoryRow[];
42
+ //# sourceMappingURL=version-history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-history.d.ts","sourceRoot":"","sources":["../../src/catalog/version-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AAIrC,uFAAuF;AACvF,MAAM,WAAW,yBAAyB;IACxC,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,4EAA4E;AAC5E,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C,iFAAiF;IACjF,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,qEAAqE;IACrE,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AASD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,yBAAyB,EACrE,OAAO,SAAS,CAAC,EAAE,EACnB,YAAY,MAAM,KACjB,CAAC,EAaH,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,SAAS,yBAAyB,EAAE,EAC3C,UAAU,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAAG,SAAS,EAChE,YAAY,wBAAwB,KACnC,iBAAiB,EA2BnB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { safeDecodeURIComponent as e } from "../shared/string-utils.js";
2
+ import { parseResourceFolderPath as t } from "./resource-folder.js";
3
+ import { VersionPublicationStatus as n } from "@epam/ai-dial-chat-api-client";
4
+ import { VersionHistoryStatus as r } from "@epam/ai-dial-publish-panel";
5
+ //#region src/catalog/version-history.ts
6
+ var i = {
7
+ [n.NotPublished]: r.NotPublished,
8
+ [n.InReview]: r.InReview,
9
+ [n.Published]: r.Published,
10
+ [n.Unknown]: r.Unknown
11
+ }, a = (t, n) => {
12
+ if (n === "") return [];
13
+ let r = e(n), i = t.find((t) => e(t.id) === r);
14
+ return i?.isMy !== !0 || i.versionGroupId == null ? [] : t.filter((e) => e !== i && e.isMy === !0 && e.versionGroupId === i.versionGroupId);
15
+ }, o = (n, a, o) => [...n].sort((e, t) => (t.updatedAt ?? 0) - (e.updatedAt ?? 0)).map((n) => {
16
+ let s = a?.get(e(n.id)), c = s ? i[s.status] : void 0, l;
17
+ return c === r.Published && s?.publishedBy ? l = o.formatPublishedBy(s.publishedBy) : n.owner && (l = o.formatOwner(n.owner)), {
18
+ id: n.id,
19
+ version: n.displayVersion ?? "",
20
+ status: c,
21
+ folder: [o.rootLabel, ...t(n.id)].join(" / "),
22
+ modifiedAt: n.updatedAt == null ? void 0 : o.formatDate(n.updatedAt),
23
+ author: l
24
+ };
25
+ });
26
+ //#endregion
27
+ export { o as buildVersionHistoryRows, a as selectOtherVersions };
package/catalog.js CHANGED
@@ -10,36 +10,39 @@ import { buildPromptOverview as C, isOrganisationPromptItem as w, mapPromptToCat
10
10
  import { PUBLIC_SKILL_BUCKET as E, SKILL_LISTING_MAX_PAGES as D, SKILL_LISTING_PAGE_SIZE as O, SKILL_MANIFEST_MAX_BYTES as k, SkillSource as A, parseSkillResourceUrl as j } from "./skill/skill-types.js";
11
11
  import { buildSkillContentTree as M, buildSkillOverview as N, mapSkillToCatalogItem as P, readSkillFileBytes as F, readSkillFilePreviewBytes as I, readSkillManifest as L, resolveSkillFileDownloadPath as R, resolveSkillManifestFileId as z } from "./catalog/map-skill-to-catalog-item.js";
12
12
  import { McpResourceKind as B, buildApplicationMcpUrl as V, buildConnectApi as H, buildToolsetMcpUrl as U, resolveMcpResourceKind as W } from "./catalog/mcp-endpoint-url.js";
13
- import { getPublicCatalogEntityFolderPath as G, isPublicCatalogEntityId as K, mapPublishConversationResultDto as q, mapPublishHistoryEntryDto as J, mapResourceDependencyDto as Y, toPublishEntityType as X } from "./catalog/publish.js";
14
- import { createPublishDependencyIconResolver as Z } from "./catalog/publish-dependency-icons.js";
15
- import { usePublishHistory as Q } from "./catalog/use-publish-history.js";
16
- import { usePublishDependencies as $ } from "./catalog/use-publish-dependencies.js";
17
- import { resolveUnpublishableFolders as ee } from "./catalog/unpublishable-folders.js";
18
- import { useUnpublishableFolders as te } from "./catalog/useUnpublishableFolders/useUnpublishableFolders.js";
19
- import { useUnpublishConfirmation as ne } from "./catalog/useUnpublishConfirmation/useUnpublishConfirmation.js";
20
- import { canEditShareAccess as re, deriveAvailableTabIds as ie, deriveFavoriteItems as ae, filterCatalogItemsBySelector as oe, filterHiddenOwnedItems as se, reconcileFilterTopics as ce } from "./catalog/catalog-derivations.js";
21
- import { CatalogEntityKind as le, findSchemaDisplayName as ue, resolveCatalogEntityKind as de } from "./catalog/catalog-entity-kind.js";
22
- import { FavoriteEntityType as fe, useFavoriteEntitiesState as pe } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
23
- import { resolveFavoriteEntityType as me } from "./catalog/favorite-entity-type.js";
24
- import { parseCatalogFilterTopics as he, resolveCatalogActiveTab as ge, resolveCatalogSortKey as _e } from "./catalog/catalog-preferences.js";
25
- import { findWorstCappedRow as ve } from "./catalog/usage-limit-rows.js";
26
- import { CatalogPrimaryActionType as ye, resolveCatalogPrimaryAction as be } from "./catalog/catalog-primary-action.js";
27
- import { useCatalogItemDelete as xe } from "./catalog/useCatalogItemDelete/useCatalogItemDelete.js";
28
- import { useCatalogEditNavigation as Se } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
29
- import { useSkillItemDetails as Ce } from "./catalog/useSkillItemDetails.js";
30
- import { useCatalogItemDetails as we } from "./catalog/useCatalogItemDetails.js";
31
- import { useCatalogToolsetCredentials as Te } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
32
- import { buildApplicationCredentialLoginParams as Ee, mapApplicationCredentials as De } from "./catalog/application-credentials.js";
33
- import { useApplicationCredentials as Oe } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
34
- import { DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS as ke, useApplicationCredentialActions as Ae } from "./catalog/useApplicationCredentialActions/useApplicationCredentialActions.js";
35
- import { useSkillDetailsPanelData as je } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
36
- import { hasPublishFolderWriteAccess as Me, rememberPublishFolderKey as Ne, usePublishFolders as Pe } from "./catalog/usePublishFolders/usePublishFolders.js";
37
- import { useResourceFolders as Fe } from "./catalog/useResourceFolders/useResourceFolders.js";
38
- import { parseResourceFolderPath as Ie } from "./catalog/resource-folder.js";
39
- import { ResourceSaveError as Le, isResourceCreateAdapter as Re } from "./catalog/resource-save-adapter.js";
40
- import { ResourceNameConflictKind as ze, getResourceNameConflictKind as Be, withResourceNameConflictMessages as Ve } from "./catalog/resource-name-conflict.js";
41
- import { ResourceSaveOutcome as He, ResourceSaveVersionError as Ue, SaveDestinationRoot as We, createPublishSavedResource as Ge, runResourceSave as Ke } from "./catalog/resource-save.js";
42
- import { createEmbeddedApplicationSaveAdapter as qe, createHostApplicationSaveAdapter as Je, createPromptCreateAdapter as Ye, createPromptFolderLister as Xe, createPromptSaveAdapter as Ze, createSkillFolderLister as Qe, createToolsetCreateAdapter as $e, createToolsetSaveAdapter as et } from "./catalog/resource-save-adapters.js";
43
- import { useResourceSavePanel as tt } from "./catalog/useResourceSavePanel/useResourceSavePanel.js";
44
- import { SkillPreviewErrorKind as nt, useSkillFilePreview as rt } from "./skill/useSkillFilePreview.js";
45
- export { u as AuthenticationType, le as CatalogEntityKind, ye as CatalogPrimaryActionType, ke as DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS, m as DEFAULT_ENTITY_DETAILS_LABELS, fe as FavoriteEntityType, B as McpResourceKind, E as PUBLIC_SKILL_BUCKET, ze as ResourceNameConflictKind, Le as ResourceSaveError, He as ResourceSaveOutcome, Ue as ResourceSaveVersionError, D as SKILL_LISTING_MAX_PAGES, O as SKILL_LISTING_PAGE_SIZE, k as SKILL_MANIFEST_MAX_BYTES, We as SaveDestinationRoot, nt as SkillPreviewErrorKind, A as SkillSource, Ee as buildApplicationCredentialLoginParams, V as buildApplicationMcpUrl, n as buildChatCompletionsUrl, H as buildConnectApi, r as buildDeploymentConnectApi, C as buildPromptOverview, d as buildResetFields, i as buildResponsesUrl, M as buildSkillContentTree, N as buildSkillOverview, U as buildToolsetMcpUrl, re as canEditShareAccess, a as createDeploymentLookup, qe as createEmbeddedApplicationSaveAdapter, Je as createHostApplicationSaveAdapter, Ye as createPromptCreateAdapter, Xe as createPromptFolderLister, Ze as createPromptSaveAdapter, e as createPublishApiClient, Z as createPublishDependencyIconResolver, Ge as createPublishSavedResource, Qe as createSkillFolderLister, $e as createToolsetCreateAdapter, et as createToolsetSaveAdapter, o as decodeDeploymentId, ie as deriveAvailableTabIds, ae as deriveFavoriteItems, s as encodeDeploymentId, oe as filterCatalogItemsBySelector, se as filterHiddenOwnedItems, c as findDeploymentByIdOrReference, ue as findSchemaDisplayName, ve as findWorstCappedRow, G as getPublicCatalogEntityFolderPath, Be as getResourceNameConflictKind, Me as hasPublishFolderWriteAccess, w as isOrganisationPromptItem, K as isPublicCatalogEntityId, Re as isResourceCreateAdapter, De as mapApplicationCredentials, h as mapDeploymentDetailsDtoToEntityDetails, p as mapDeploymentLimitsDtoToCatalogLimits, f as mapDeploymentLimitsToInput, v as mapDeploymentToCatalogItem, y as mapDeploymentToolsetCredentials, g as mapEntityDetailsToCatalogDetails, T as mapPromptToCatalogItem, q as mapPublishConversationResultDto, J as mapPublishHistoryEntryDto, Y as mapResourceDependencyDto, P as mapSkillToCatalogItem, _ as mapToolsetCredentials, b as mapToolsetToCatalogItem, l as normalizeDeploymentId, he as parseCatalogFilterTopics, Ie as parseResourceFolderPath, j as parseSkillResourceUrl, F as readSkillFileBytes, I as readSkillFilePreviewBytes, L as readSkillManifest, ce as reconcileFilterTopics, Ne as rememberPublishFolderKey, ge as resolveCatalogActiveTab, de as resolveCatalogEntityKind, be as resolveCatalogPrimaryAction, _e as resolveCatalogSortKey, x as resolveDeploymentFolder, me as resolveFavoriteEntityType, W as resolveMcpResourceKind, R as resolveSkillFileDownloadPath, z as resolveSkillManifestFileId, ee as resolveUnpublishableFolders, Ke as runResourceSave, S as supportsChatInterface, X as toPublishEntityType, t as toPublishRuleDto, Ae as useApplicationCredentialActions, Oe as useApplicationCredentials, Se as useCatalogEditNavigation, xe as useCatalogItemDelete, we as useCatalogItemDetails, Te as useCatalogToolsetCredentials, pe as useFavoriteEntitiesState, $ as usePublishDependencies, Pe as usePublishFolders, Q as usePublishHistory, Fe as useResourceFolders, tt as useResourceSavePanel, je as useSkillDetailsPanelData, rt as useSkillFilePreview, Ce as useSkillItemDetails, ne as useUnpublishConfirmation, te as useUnpublishableFolders, Ve as withResourceNameConflictMessages };
13
+ import { getPublicCatalogEntityFolderPath as G, isPublicCatalogEntityId as K, isVersionedCatalogEntityType as q, mapPublishConversationResultDto as J, mapPublishHistoryEntryDto as Y, mapResourceDependencyDto as X, toPublishEntityType as Z } from "./catalog/publish.js";
14
+ import { createPublishDependencyIconResolver as Q } from "./catalog/publish-dependency-icons.js";
15
+ import { usePublishHistory as $ } from "./catalog/use-publish-history.js";
16
+ import { usePublishDependencies as ee } from "./catalog/use-publish-dependencies.js";
17
+ import { resolveUnpublishableFolders as te } from "./catalog/unpublishable-folders.js";
18
+ import { useUnpublishableFolders as ne } from "./catalog/useUnpublishableFolders/useUnpublishableFolders.js";
19
+ import { useUnpublishConfirmation as re } from "./catalog/useUnpublishConfirmation/useUnpublishConfirmation.js";
20
+ import { canEditShareAccess as ie, deriveAvailableTabIds as ae, deriveFavoriteItems as oe, filterCatalogItemsBySelector as se, filterHiddenOwnedItems as ce, reconcileFilterTopics as le } from "./catalog/catalog-derivations.js";
21
+ import { CatalogEntityKind as ue, findSchemaDisplayName as de, resolveCatalogEntityKind as fe } from "./catalog/catalog-entity-kind.js";
22
+ import { FavoriteEntityType as pe, useFavoriteEntitiesState as me } from "./catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js";
23
+ import { resolveFavoriteEntityType as he } from "./catalog/favorite-entity-type.js";
24
+ import { parseCatalogFilterTopics as ge, resolveCatalogActiveTab as _e, resolveCatalogSortKey as ve } from "./catalog/catalog-preferences.js";
25
+ import { findWorstCappedRow as ye } from "./catalog/usage-limit-rows.js";
26
+ import { CatalogPrimaryActionType as be, resolveCatalogPrimaryAction as xe } from "./catalog/catalog-primary-action.js";
27
+ import { useCatalogItemDelete as Se } from "./catalog/useCatalogItemDelete/useCatalogItemDelete.js";
28
+ import { useCatalogEditNavigation as Ce } from "./catalog/useCatalogEditNavigation/useCatalogEditNavigation.js";
29
+ import { useSkillItemDetails as we } from "./catalog/useSkillItemDetails.js";
30
+ import { useCatalogItemDetails as Te } from "./catalog/useCatalogItemDetails.js";
31
+ import { useCatalogToolsetCredentials as Ee } from "./catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js";
32
+ import { buildApplicationCredentialLoginParams as De, mapApplicationCredentials as Oe } from "./catalog/application-credentials.js";
33
+ import { useApplicationCredentials as ke } from "./catalog/useApplicationCredentials/useApplicationCredentials.js";
34
+ import { DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS as Ae, useApplicationCredentialActions as je } from "./catalog/useApplicationCredentialActions/useApplicationCredentialActions.js";
35
+ import { useSkillDetailsPanelData as Me } from "./catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js";
36
+ import { hasPublishFolderWriteAccess as Ne, rememberPublishFolderKey as Pe, usePublishFolders as Fe } from "./catalog/usePublishFolders/usePublishFolders.js";
37
+ import { useResourceFolders as Ie } from "./catalog/useResourceFolders/useResourceFolders.js";
38
+ import { parseResourceFolderPath as Le } from "./catalog/resource-folder.js";
39
+ import { ResourceSaveError as Re, isResourceCreateAdapter as ze } from "./catalog/resource-save-adapter.js";
40
+ import { ResourceNameConflictKind as Be, getResourceNameConflictKind as Ve, withResourceNameConflictMessages as He } from "./catalog/resource-name-conflict.js";
41
+ import { ResourceSaveOutcome as Ue, ResourceSaveVersionError as We, SaveDestinationRoot as Ge, createPublishSavedResource as Ke, runResourceSave as qe } from "./catalog/resource-save.js";
42
+ import { createEmbeddedApplicationSaveAdapter as Je, createHostApplicationSaveAdapter as Ye, createPromptCreateAdapter as Xe, createPromptFolderLister as Ze, createPromptSaveAdapter as Qe, createSkillFolderLister as $e, createToolsetCreateAdapter as et, createToolsetSaveAdapter as tt } from "./catalog/resource-save-adapters.js";
43
+ import { useResourceSavePanel as nt } from "./catalog/useResourceSavePanel/useResourceSavePanel.js";
44
+ import { buildVersionHistoryRows as rt, selectOtherVersions as it } from "./catalog/version-history.js";
45
+ import { useVersionHistory as at } from "./catalog/useVersionHistory/useVersionHistory.js";
46
+ import { useVersionHistorySection as ot } from "./catalog/useVersionHistory/useVersionHistorySection.js";
47
+ import { SkillPreviewErrorKind as st, useSkillFilePreview as ct } from "./skill/useSkillFilePreview.js";
48
+ export { u as AuthenticationType, ue as CatalogEntityKind, be as CatalogPrimaryActionType, Ae as DEFAULT_APPLICATION_CREDENTIAL_ACTIONS_LABELS, m as DEFAULT_ENTITY_DETAILS_LABELS, pe as FavoriteEntityType, B as McpResourceKind, E as PUBLIC_SKILL_BUCKET, Be as ResourceNameConflictKind, Re as ResourceSaveError, Ue as ResourceSaveOutcome, We as ResourceSaveVersionError, D as SKILL_LISTING_MAX_PAGES, O as SKILL_LISTING_PAGE_SIZE, k as SKILL_MANIFEST_MAX_BYTES, Ge as SaveDestinationRoot, st as SkillPreviewErrorKind, A as SkillSource, De as buildApplicationCredentialLoginParams, V as buildApplicationMcpUrl, n as buildChatCompletionsUrl, H as buildConnectApi, r as buildDeploymentConnectApi, C as buildPromptOverview, d as buildResetFields, i as buildResponsesUrl, M as buildSkillContentTree, N as buildSkillOverview, U as buildToolsetMcpUrl, rt as buildVersionHistoryRows, ie as canEditShareAccess, a as createDeploymentLookup, Je as createEmbeddedApplicationSaveAdapter, Ye as createHostApplicationSaveAdapter, Xe as createPromptCreateAdapter, Ze as createPromptFolderLister, Qe as createPromptSaveAdapter, e as createPublishApiClient, Q as createPublishDependencyIconResolver, Ke as createPublishSavedResource, $e as createSkillFolderLister, et as createToolsetCreateAdapter, tt as createToolsetSaveAdapter, o as decodeDeploymentId, ae as deriveAvailableTabIds, oe as deriveFavoriteItems, s as encodeDeploymentId, se as filterCatalogItemsBySelector, ce as filterHiddenOwnedItems, c as findDeploymentByIdOrReference, de as findSchemaDisplayName, ye as findWorstCappedRow, G as getPublicCatalogEntityFolderPath, Ve as getResourceNameConflictKind, Ne as hasPublishFolderWriteAccess, w as isOrganisationPromptItem, K as isPublicCatalogEntityId, ze as isResourceCreateAdapter, q as isVersionedCatalogEntityType, Oe as mapApplicationCredentials, h as mapDeploymentDetailsDtoToEntityDetails, p as mapDeploymentLimitsDtoToCatalogLimits, f as mapDeploymentLimitsToInput, v as mapDeploymentToCatalogItem, y as mapDeploymentToolsetCredentials, g as mapEntityDetailsToCatalogDetails, T as mapPromptToCatalogItem, J as mapPublishConversationResultDto, Y as mapPublishHistoryEntryDto, X as mapResourceDependencyDto, P as mapSkillToCatalogItem, _ as mapToolsetCredentials, b as mapToolsetToCatalogItem, l as normalizeDeploymentId, ge as parseCatalogFilterTopics, Le as parseResourceFolderPath, j as parseSkillResourceUrl, F as readSkillFileBytes, I as readSkillFilePreviewBytes, L as readSkillManifest, le as reconcileFilterTopics, Pe as rememberPublishFolderKey, _e as resolveCatalogActiveTab, fe as resolveCatalogEntityKind, xe as resolveCatalogPrimaryAction, ve as resolveCatalogSortKey, x as resolveDeploymentFolder, he as resolveFavoriteEntityType, W as resolveMcpResourceKind, R as resolveSkillFileDownloadPath, z as resolveSkillManifestFileId, te as resolveUnpublishableFolders, qe as runResourceSave, it as selectOtherVersions, S as supportsChatInterface, Z as toPublishEntityType, t as toPublishRuleDto, je as useApplicationCredentialActions, ke as useApplicationCredentials, Ce as useCatalogEditNavigation, Se as useCatalogItemDelete, Te as useCatalogItemDetails, Ee as useCatalogToolsetCredentials, me as useFavoriteEntitiesState, ee as usePublishDependencies, Fe as usePublishFolders, $ as usePublishHistory, Ie as useResourceFolders, nt as useResourceSavePanel, Me as useSkillDetailsPanelData, ct as useSkillFilePreview, we as useSkillItemDetails, re as useUnpublishConfirmation, ne as useUnpublishableFolders, at as useVersionHistory, ot as useVersionHistorySection, He as withResourceNameConflictMessages };
@@ -39,6 +39,9 @@ export * from '../catalog/resource-name-conflict';
39
39
  export * from '../catalog/resource-save';
40
40
  export * from '../catalog/resource-save-adapters';
41
41
  export * from '../catalog/useResourceSavePanel/useResourceSavePanel';
42
+ export * from '../catalog/useVersionHistory/useVersionHistory';
43
+ export * from '../catalog/useVersionHistory/useVersionHistorySection';
44
+ export * from '../catalog/version-history';
42
45
  export * from '../skill/useSkillFilePreview';
43
46
  export * from '../skill/skill-types';
44
47
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/entry-points/catalog.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4DAA4D,CAAC;AAC3E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAm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cAAc,mCAAmC,CAAC;AAClD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,sDAAsD,CAAC;AACrE,cAAc,kCAAkC,CAAC;AACjD,cAAc,sEAAsE,CAAC;AACrF,cAAc,oCAAoC,CAAC;AACnD,cAAc,gEAAgE,CAAC;AAC/E,cAAc,4EAA4E,CAAC;AAC3F,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
@@ -5,6 +5,7 @@ export * from '../files/dial-file-manager-copy-move.util';
5
5
  export * from '../files/dial-file-manager-mapping.util';
6
6
  export * from '../files/dial-file-manager-path.util';
7
7
  export * from '../files/attachment-types';
8
+ export * from '../files/attachment-type-labels';
8
9
  export * from '../files/create-files-api';
9
10
  export * from '../files/create-upload-file-with-progress';
10
11
  export * from '../files/annotation';
@@ -1 +1 @@
1
- {"version":3,"file":"file-manager.d.ts","sourceRoot":"","sources":["../../src/entry-points/file-manager.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,kEAAkE,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C9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gEAAgE,CAAC;AAC/E,cAAc,kEAAkE,CAAC;AACjF,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wDAAwD,CAAC;AACvE,cAAc,0DAA0D,CAAC;AACzE,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,cAAc,kEAAkE,CAAC"}
package/file-manager.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import { FileSelectionKind as e, getFileSelectionKind as t, isDialFileId as n, isDialFolderId as r, resolveDialFileBucketAndPath as i, resolveDialFolderPath as a, resolveRelativeDialFilePath as o } from "./files/dial-file.js";
2
- import { isDialFileAcceptType as s, mimeTypesToAttachmentExtensionLabels as c, mimeTypesToDialFileAcceptTypes as l, mimeTypesToFileAccept as u } from "./files/attachment-types.js";
3
- import { sanitizeFileName as d, splitFileNameExtension as f, trimFileNameToByteLimit as p } from "./files/file-name.js";
4
- import { DialFilesApiUploadMode as m } from "./files/dial-files-api.js";
5
- import { FileManagerNotificationReason as h, FileNameValidationErrorReason as g, FileOperationKind as _ } from "./files/dial-file-manager.types.js";
6
- import { COLUMNS_MY_FILES as v, COLUMNS_ORGANIZATION as y, COLUMNS_SHARED as b, CORE_PERMISSION_MAP as x, DATE_OPTIONS as S, DIAL_FILE_MANAGER_SECTION_TABS as C, PATH_SEPARATOR_REGEXP as w, RESERVED_MARKER_NAME as T, UPLOAD_CONCURRENCY as E } from "./files/dial-file-manager.model.js";
7
- import { buildSharedItemVirtualPath as D, dialCorePathToRelative as O, findDialFileByPath as k, findFolderByVirtualPath as A, formatOperationFolderName as j, getVirtualPathName as M, hasDialFileWritePermission as N, hasForbiddenNameSymbols as P, hasSamePaths as F, isCopyMoveDuplicateAllowed as I, isShareActionsAllowed as L, normalizeVirtualPath as R, parseNewFolderVirtualPath as z, resolveOwnerCoords as B, resolveSectionByPath as V, unionPathSets as H, withRoutableRootLabels as U } from "./files/dial-file-manager-path.util.js";
8
- import { resolveDialFileApiPath as W, virtualPathToApiPath as G } from "./files/resolve-dial-file-api-path.js";
9
- import { prepareCopyItems as K, prepareMoveRenameItems as q } from "./files/dial-file-manager-copy-move.util.js";
10
- import { UploadBodyEncoding as J, UploadNetworkError as Y, createUploadFileWithProgress as X } from "./files/create-upload-file-with-progress.js";
11
- import { buildFromCache as Z, buildSharedSearchScope as Q, fetchByTab as $, fetchForSearch as ee, findFirstSuccessfulCopyMoveItem as te, mapCorePermissions as ne, mapFileMetadataToDialFile as re, mapSearchItem as ie, mergeCreatedFolderIntoCache as ae, resolveTransferFailureReason as oe, resolveUploadFailureReason as se, updateEntry as ce } from "./files/dial-file-manager-mapping.util.js";
2
+ import { isDialFileAcceptType as s, mimeTypesToDialFileAcceptTypes as c, mimeTypesToFileAccept as l } from "./files/attachment-types.js";
3
+ import { sanitizeFileName as u, splitFileNameExtension as d, trimFileNameToByteLimit as f } from "./files/file-name.js";
4
+ import { DialFilesApiUploadMode as p } from "./files/dial-files-api.js";
5
+ import { FileManagerNotificationReason as m, FileNameValidationErrorReason as h, FileOperationKind as g } from "./files/dial-file-manager.types.js";
6
+ import { COLUMNS_MY_FILES as _, COLUMNS_ORGANIZATION as v, COLUMNS_SHARED as y, CORE_PERMISSION_MAP as b, DATE_OPTIONS as x, DIAL_FILE_MANAGER_SECTION_TABS as S, PATH_SEPARATOR_REGEXP as C, RESERVED_MARKER_NAME as w, UPLOAD_CONCURRENCY as T } from "./files/dial-file-manager.model.js";
7
+ import { buildSharedItemVirtualPath as E, dialCorePathToRelative as D, findDialFileByPath as O, findFolderByVirtualPath as k, formatOperationFolderName as A, getVirtualPathName as j, hasDialFileWritePermission as M, hasForbiddenNameSymbols as N, hasSamePaths as P, isCopyMoveDuplicateAllowed as F, isShareActionsAllowed as I, normalizeVirtualPath as L, parseNewFolderVirtualPath as R, resolveOwnerCoords as z, resolveSectionByPath as B, unionPathSets as V, withRoutableRootLabels as H } from "./files/dial-file-manager-path.util.js";
8
+ import { resolveDialFileApiPath as U, virtualPathToApiPath as W } from "./files/resolve-dial-file-api-path.js";
9
+ import { prepareCopyItems as G, prepareMoveRenameItems as K } from "./files/dial-file-manager-copy-move.util.js";
10
+ import { UploadBodyEncoding as q, UploadNetworkError as J, createUploadFileWithProgress as Y } from "./files/create-upload-file-with-progress.js";
11
+ import { buildFromCache as X, buildSharedSearchScope as Z, fetchByTab as Q, fetchForSearch as $, findFirstSuccessfulCopyMoveItem as ee, mapCorePermissions as te, mapFileMetadataToDialFile as ne, mapSearchItem as re, mergeCreatedFolderIntoCache as ie, resolveTransferFailureReason as ae, resolveUploadFailureReason as oe, updateEntry as se } from "./files/dial-file-manager-mapping.util.js";
12
+ import { mimeTypesToAttachmentExtensionLabels as ce } from "./files/attachment-type-labels.js";
12
13
  import { createFilesApiClient as le } from "./files/create-files-api.js";
13
14
  import { openAnnotationAttachment as ue } from "./files/annotation.js";
14
15
  import { getUrlFileName as de, isExternalSourcePreviewable as fe, resolveExternalSourceContentType as pe } from "./files/source-content.js";
@@ -29,4 +30,4 @@ import { useDialFileManagerTabConfig as je } from "./files/useDialFileManagerTab
29
30
  import { useFileAttachmentPicker as Me } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
30
31
  import { useFileAttachmentModalState as Ne } from "./files/useFileAttachmentModalState/useFileAttachmentModalState.js";
31
32
  import { useGridEditingScroll as Pe } from "@epam/ai-dial-chat-shared";
32
- export { v as COLUMNS_MY_FILES, y as COLUMNS_ORGANIZATION, b as COLUMNS_SHARED, x as CORE_PERMISSION_MAP, S as DATE_OPTIONS, C as DIAL_FILE_MANAGER_SECTION_TABS, m as DialFilesApiUploadMode, xe as DownloadDestinationType, h as FileManagerNotificationReason, g as FileNameValidationErrorReason, _ as FileOperationKind, e as FileSelectionKind, w as PATH_SEPARATOR_REGEXP, T as RESERVED_MARKER_NAME, E as UPLOAD_CONCURRENCY, J as UploadBodyEncoding, Y as UploadNetworkError, me as annotationToDisplayAttachment, he as attachmentDtoToDisplayAttachment, ge as attachmentDtosToDisplayAttachments, Z as buildFromCache, D as buildSharedItemVirtualPath, Q as buildSharedSearchScope, le as createFilesApiClient, X as createUploadFileWithProgress, Ce as deriveActionProfile, O as dialCorePathToRelative, ve as dialFileToAttachment, ye as dialFilesToAttachments, be as dialFolderPathToAttachment, $ as fetchByTab, ee as fetchForSearch, k as findDialFileByPath, te as findFirstSuccessfulCopyMoveItem, A as findFolderByVirtualPath, j as formatOperationFolderName, t as getFileSelectionKind, de as getUrlFileName, M as getVirtualPathName, N as hasDialFileWritePermission, P as hasForbiddenNameSymbols, F as hasSamePaths, I as isCopyMoveDuplicateAllowed, s as isDialFileAcceptType, n as isDialFileId, r as isDialFolderId, fe as isExternalSourcePreviewable, L as isShareActionsAllowed, ne as mapCorePermissions, re as mapFileMetadataToDialFile, ie as mapSearchItem, ae as mergeCreatedFolderIntoCache, c as mimeTypesToAttachmentExtensionLabels, l as mimeTypesToDialFileAcceptTypes, u as mimeTypesToFileAccept, R as normalizeVirtualPath, ue as openAnnotationAttachment, z as parseNewFolderVirtualPath, K as prepareCopyItems, Se as prepareDownloadDestination, q as prepareMoveRenameItems, W as resolveDialFileApiPath, i as resolveDialFileBucketAndPath, a as resolveDialFolderPath, pe as resolveExternalSourceContentType, B as resolveOwnerCoords, o as resolveRelativeDialFilePath, V as resolveSectionByPath, oe as resolveTransferFailureReason, se as resolveUploadFailureReason, d as sanitizeFileName, f as splitFileNameExtension, p as trimFileNameToByteLimit, H as unionPathSets, ce as updateEntry, we as useDialFileListing, ke as useDialFileManager, Ae as useDialFileManagerSections, je as useDialFileManagerTabConfig, Te as useDialFileMetadata, Ee as useDialFileMutations, De as useDialFileSharing, Oe as useDialFileUploadBatch, Ne as useFileAttachmentModalState, Me as useFileAttachmentPicker, Pe as useGridEditingScroll, _e as useUnshareConfirmationState, G as virtualPathToApiPath, U as withRoutableRootLabels };
33
+ export { _ as COLUMNS_MY_FILES, v as COLUMNS_ORGANIZATION, y as COLUMNS_SHARED, b as CORE_PERMISSION_MAP, x as DATE_OPTIONS, S as DIAL_FILE_MANAGER_SECTION_TABS, p as DialFilesApiUploadMode, xe as DownloadDestinationType, m as FileManagerNotificationReason, h as FileNameValidationErrorReason, g as FileOperationKind, e as FileSelectionKind, C as PATH_SEPARATOR_REGEXP, w as RESERVED_MARKER_NAME, T as UPLOAD_CONCURRENCY, q as UploadBodyEncoding, J as UploadNetworkError, me as annotationToDisplayAttachment, he as attachmentDtoToDisplayAttachment, ge as attachmentDtosToDisplayAttachments, X as buildFromCache, E as buildSharedItemVirtualPath, Z as buildSharedSearchScope, le as createFilesApiClient, Y as createUploadFileWithProgress, Ce as deriveActionProfile, D as dialCorePathToRelative, ve as dialFileToAttachment, ye as dialFilesToAttachments, be as dialFolderPathToAttachment, Q as fetchByTab, $ as fetchForSearch, O as findDialFileByPath, ee as findFirstSuccessfulCopyMoveItem, k as findFolderByVirtualPath, A as formatOperationFolderName, t as getFileSelectionKind, de as getUrlFileName, j as getVirtualPathName, M as hasDialFileWritePermission, N as hasForbiddenNameSymbols, P as hasSamePaths, F as isCopyMoveDuplicateAllowed, s as isDialFileAcceptType, n as isDialFileId, r as isDialFolderId, fe as isExternalSourcePreviewable, I as isShareActionsAllowed, te as mapCorePermissions, ne as mapFileMetadataToDialFile, re as mapSearchItem, ie as mergeCreatedFolderIntoCache, ce as mimeTypesToAttachmentExtensionLabels, c as mimeTypesToDialFileAcceptTypes, l as mimeTypesToFileAccept, L as normalizeVirtualPath, ue as openAnnotationAttachment, R as parseNewFolderVirtualPath, G as prepareCopyItems, Se as prepareDownloadDestination, K as prepareMoveRenameItems, U as resolveDialFileApiPath, i as resolveDialFileBucketAndPath, a as resolveDialFolderPath, pe as resolveExternalSourceContentType, z as resolveOwnerCoords, o as resolveRelativeDialFilePath, B as resolveSectionByPath, ae as resolveTransferFailureReason, oe as resolveUploadFailureReason, u as sanitizeFileName, d as splitFileNameExtension, f as trimFileNameToByteLimit, V as unionPathSets, se as updateEntry, we as useDialFileListing, ke as useDialFileManager, Ae as useDialFileManagerSections, je as useDialFileManagerTabConfig, Te as useDialFileMetadata, Ee as useDialFileMutations, De as useDialFileSharing, Oe as useDialFileUploadBatch, Ne as useFileAttachmentModalState, Me as useFileAttachmentPicker, Pe as useGridEditingScroll, _e as useUnshareConfirmationState, W as virtualPathToApiPath, H as withRoutableRootLabels };
@@ -0,0 +1,3 @@
1
+ /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
2
+ export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
3
+ //# sourceMappingURL=attachment-type-labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-type-labels.d.ts","sourceRoot":"","sources":["../../src/files/attachment-type-labels.ts"],"names":[],"mappings":"AASA,iIAAiI;AACjI,eAAO,MAAM,oCAAoC,GAAI,OAAO,MAAM,EAAE,KAAG,MAiBxD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { normalizeMimeType as e } from "@epam/ai-dial-chat-shared";
2
+ import { extension as t } from "mime-types";
3
+ //#region src/files/attachment-type-labels.ts
4
+ var n = (n) => n.map((n) => {
5
+ if (n.endsWith("/*")) return n;
6
+ let r = e(n), i = t(r);
7
+ if (i !== !1) return `.${i}`;
8
+ let a = r.split("/")[1];
9
+ return a == null ? n : `.${a.toLowerCase()}`;
10
+ }).join(", ");
11
+ //#endregion
12
+ export { n as mimeTypesToAttachmentExtensionLabels };
@@ -16,6 +16,4 @@ export declare const mimeTypesToDialFileAcceptTypes: (types?: string[]) => DialF
16
16
  * given or any type accepts everything.
17
17
  */
18
18
  export declare const mimeTypesToFileAccept: (types?: string[]) => string | undefined;
19
- /** Formats MIME types as a human-readable, comma-separated list of dotted extensions (or the MIME type itself for wildcards). */
20
- export declare const mimeTypesToAttachmentExtensionLabels: (types: string[]) => string;
21
19
  //# sourceMappingURL=attachment-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-types.d.ts","sourceRoot":"","sources":["../../src/files/attachment-types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAK3E,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,GAC/B,MAAM,MAAM,KACX,IAAI,IAAI,kBAAgE,CAAC;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EAAE,KACf,kBAAkB,EAAE,GAAG,SAYzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,EAAE,KAAG,MAAM,GAAG,SASjE,CAAC;AAEF,iIAAiI;AACjI,eAAO,MAAM,oCAAoC,GAAI,OAAO,MAAM,EAAE,KAAG,MAiBxD,CAAC"}
1
+ {"version":3,"file":"attachment-types.d.ts","sourceRoot":"","sources":["../../src/files/attachment-types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAI3E,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,GAC/B,MAAM,MAAM,KACX,IAAI,IAAI,kBAAgE,CAAC;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EAAE,KACf,kBAAkB,EAAE,GAAG,SAYzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,EAAE,KAAG,MAAM,GAAG,SASjE,CAAC"}
@@ -1,17 +1,10 @@
1
1
  import { normalizeMimeType as e } from "@epam/ai-dial-chat-shared";
2
- import { extension as t } from "mime-types";
3
2
  //#region src/files/attachment-types.ts
4
- var n = "*/*", r = (e) => e.startsWith(".") || e.includes("/"), i = (t) => {
5
- if (t != null) return t.map((t) => t === "*" ? n : t.startsWith(".") ? t : e(t)).filter(r);
6
- }, a = (e) => {
7
- let t = i(e);
8
- if (t != null && t.length !== 0 && !t.some((e) => e === n)) return t.join(",");
9
- }, o = (n) => n.map((n) => {
10
- if (n.endsWith("/*")) return n;
11
- let r = e(n), i = t(r);
12
- if (i !== !1) return `.${i}`;
13
- let a = r.split("/")[1];
14
- return a == null ? n : `.${a.toLowerCase()}`;
15
- }).join(", ");
3
+ var t = "*/*", n = (e) => e.startsWith(".") || e.includes("/"), r = (r) => {
4
+ if (r != null) return r.map((n) => n === "*" ? t : n.startsWith(".") ? n : e(n)).filter(n);
5
+ }, i = (e) => {
6
+ let n = r(e);
7
+ if (n != null && n.length !== 0 && !n.some((e) => e === t)) return n.join(",");
8
+ };
16
9
  //#endregion
17
- export { r as isDialFileAcceptType, o as mimeTypesToAttachmentExtensionLabels, i as mimeTypesToDialFileAcceptTypes, a as mimeTypesToFileAccept };
10
+ export { n as isDialFileAcceptType, r as mimeTypesToDialFileAcceptTypes, i as mimeTypesToFileAccept };
package/index.d.ts CHANGED
@@ -48,6 +48,9 @@ export * from './catalog/resource-name-conflict';
48
48
  export * from './catalog/resource-save';
49
49
  export * from './catalog/resource-save-adapters';
50
50
  export * from './catalog/useResourceSavePanel/useResourceSavePanel';
51
+ export * from './catalog/useVersionHistory/useVersionHistory';
52
+ export * from './catalog/useVersionHistory/useVersionHistorySection';
53
+ export * from './catalog/version-history';
51
54
  export * from './conversation/announcement-message';
52
55
  export * from './conversation/conversation-draft/conversation-draft';
53
56
  export * from './conversation/conversation-draft/conversation-draft-store';
@@ -159,6 +162,7 @@ export * from './files/dial-file-manager-copy-move.util';
159
162
  export * from './files/dial-file-manager-mapping.util';
160
163
  export * from './files/dial-file-manager-path.util';
161
164
  export * from './files/attachment-types';
165
+ export * from './files/attachment-type-labels';
162
166
  export * from './files/create-files-api';
163
167
  export * from './files/create-upload-file-with-progress';
164
168
  export * from './files/annotation';