@epam/ai-dial-chat-hooks 1.2.0-dev.99 → 1.3.0-dev.5

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.
Files changed (84) hide show
  1. package/api-error/api-error.js +7 -4
  2. package/catalog/catalog-derivations.js +1 -1
  3. package/catalog/deployment-id.js +8 -2
  4. package/catalog/map-deployment-limits-to-catalog.js +16 -24
  5. package/catalog/map-deployment-limits-to-input.js +81 -9
  6. package/catalog/map-deployment-to-catalog-item.js +34 -34
  7. package/catalog/map-entity-details-to-catalog.js +237 -192
  8. package/catalog/map-skill-to-catalog-item.js +61 -54
  9. package/catalog/publish.js +4 -4
  10. package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
  11. package/catalog/useCatalogItemDetails.js +9 -8
  12. package/catalog/usePublishFolders/usePublishFolders.js +1 -1
  13. package/catalog.d.ts +171 -34
  14. package/catalog.js +23 -23
  15. package/conversation/conversation-transfer/export-conversation.js +24 -16
  16. package/conversation/conversation-transfer/import-conversation.js +80 -31
  17. package/conversation/create-chat-stream-api.js +89 -49
  18. package/conversation/get-model-id-from-conversation-id.js +15 -9
  19. package/conversation/message-utils.js +44 -2
  20. package/conversation/stage.js +6 -2
  21. package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
  22. package/conversation/useConversationExport/useConversationExport.js +9 -9
  23. package/conversation/useConversationHandlers/message-utils.js +8 -5
  24. package/conversation/useConversationHandlers/useConversationHandlers.js +181 -167
  25. package/conversation/useConversationImport/useConversationImport.js +123 -121
  26. package/conversation/useConversationPanelItems/useConversationPanelItems.js +49 -31
  27. package/conversation/useConversationStream/frame-scheduler.js +39 -0
  28. package/conversation/useConversationStream/generation-resume.js +122 -64
  29. package/conversation/useConversationStream/useConversationStream.js +298 -118
  30. package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
  31. package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
  32. package/conversation-sources.d.ts +1 -1
  33. package/conversation-transfer.d.ts +2 -1
  34. package/conversation.d.ts +218 -22
  35. package/conversation.js +32 -31
  36. package/file-manager-canvas.d.ts +27 -7
  37. package/file-manager.d.ts +87 -32
  38. package/file-manager.js +25 -24
  39. package/files/attachment-canvas.js +67 -44
  40. package/files/dial-file-manager-copy-move.util.js +9 -8
  41. package/files/dial-file-manager-mapping.util.js +2 -1
  42. package/files/dial-file-manager-path.util.js +24 -2
  43. package/files/dial-file-manager.model.js +23 -19
  44. package/files/dial-file-manager.types.js +3 -3
  45. package/files/file-manager-variant.js +1 -1
  46. package/files/resolve-dial-file-api-path.js +11 -12
  47. package/files/useDialFileListing/useDialFileListing.js +140 -127
  48. package/files/useDialFileManager/useDialFileManager.js +139 -135
  49. package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
  50. package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -15
  51. package/files/useDialFileMutations/useDialFileMutations.js +65 -60
  52. package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
  53. package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +28 -23
  54. package/index.d.ts +643 -128
  55. package/index.js +136 -134
  56. package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
  57. package/oauth/authorize-url.js +3 -3
  58. package/oauth/toolset-id.js +5 -3
  59. package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
  60. package/oauth.d.ts +34 -2
  61. package/oauth.js +9 -9
  62. package/package.json +19 -23
  63. package/scheduled-task/scheduled-task-description.js +43 -39
  64. package/scheduled-task/scheduled-task-trigger.js +74 -71
  65. package/scheduled-task/use-scheduled-task-runs.js +162 -50
  66. package/scheduled-task/use-scheduled-tasks.js +52 -48
  67. package/scheduled-tasks.d.ts +27 -6
  68. package/scheduled-tasks.js +2 -2
  69. package/shared/application-schema.js +5 -2
  70. package/shared/cron-day-of-month.js +13 -0
  71. package/skill/skill-archive.js +19 -0
  72. package/skill/skill-types.js +8 -7
  73. package/skill/skill.js +52 -29
  74. package/skill/useSkillArchiveImport/useSkillArchiveImport.js +38 -34
  75. package/skill/useSkillEditorLoad.js +65 -59
  76. package/skill/useSkillEditorSubmit.js +105 -93
  77. package/skill/useSkillFileActions.js +70 -58
  78. package/skill-editor.d.ts +62 -13
  79. package/skill-editor.js +9 -9
  80. package/usage/map-user-usage-to-model-limits.js +137 -95
  81. package/usage.d.ts +8 -3
  82. package/usePageFileDrag/usePageFileDrag.js +3 -3
  83. package/utils.d.ts +26 -6
  84. package/utils.js +10 -10
@@ -1,7 +1,7 @@
1
1
  import { isDialFileId as e } from "./dial-file.js";
2
2
  import { AttachmentContentType as t, AttachmentErrorType as n, OoxmlFileType as r, OoxmlHighlightKind as i, getOoxmlFileType as a } from "@epam/ai-dial-attachment-canvas";
3
3
  import { MIMEType as o, base64ToBlob as s, tryBase64ToBytes as c } from "@epam/ai-dial-chat-shared";
4
- import { annotationHighlightId as l, annotationToOfficeHighlightLocations as u, annotationsToPdfHighlights as d, gatherSameSourceAnnotations as f, getAnnotationPdfPage as p, parsePdfPageReference as m } from "@epam/ai-dial-quotations";
4
+ import { annotationHighlightIds as l, annotationToOfficeHighlightLocations as u, annotationsToPdfHighlights as d, gatherSameSourceAnnotations as f, getAnnotationPdfPage as p, parsePdfPageReference as m } from "@epam/ai-dial-quotations";
5
5
  import { LRUCache as h } from "lru-cache";
6
6
  //#region src/files/attachment-canvas.ts
7
7
  var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
@@ -124,31 +124,67 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
124
124
  text: i,
125
125
  language: r
126
126
  } : i;
127
- }, I = async (e, n) => {
128
- let r = await k(e, n);
129
- if (r == null) return null;
130
- if (typeof r != "string") return r;
131
- if (r.length > P) return null;
132
- let i = n.resolveDialUrl(e) ?? void 0;
133
- return {
127
+ }, I = (e) => {
128
+ try {
129
+ return new URL(e, window.location.href).origin;
130
+ } catch {
131
+ return;
132
+ }
133
+ }, L = async (e, n) => {
134
+ let r = n.resolveDialUrl(e) ?? void 0;
135
+ if (r != null) return {
134
136
  type: t.Html,
135
- srcdoc: r,
136
- url: i
137
+ url: r,
138
+ isSameOriginUrl: I(r) === I(window.location.href),
139
+ resolveSourceText: async () => {
140
+ let t = await k(e, n);
141
+ if (t == null || typeof t != "string") throw Error("Failed to resolve HTML source text");
142
+ return t;
143
+ }
137
144
  };
138
- }, L = (n, r, i) => {
145
+ let i = await k(e, n);
146
+ return i == null ? null : typeof i == "string" ? i.length > P ? null : {
147
+ type: t.Html,
148
+ srcdoc: i,
149
+ srcdocHostUrl: n.htmlSrcdocHostUrl
150
+ } : i;
151
+ }, R = (e, t) => ({
152
+ id: e,
153
+ bboxes: [{
154
+ page: t,
155
+ x1: 0,
156
+ y1: 0,
157
+ x2: 0,
158
+ y2: 0
159
+ }],
160
+ style: {
161
+ backgroundColor: "transparent",
162
+ opacity: 0
163
+ }
164
+ }), z = (n, r, i) => {
139
165
  let a = n.body?.source?.attachment;
140
166
  if (a?.type !== o.PDF) return null;
141
167
  let s = e(a.url) ? i.resolveDialFileDownloadUrl(a.url) : a.url;
142
168
  if (s == null) return null;
143
- let c = (r.find((e) => e.annotations.includes(n))?.annotations ?? [n]).filter((e) => e.body?.source?.attachment?.url === a.url), u = c.indexOf(n), f = d(c), m = l(n, u);
169
+ let c = (r.find((e) => e.annotations.includes(n))?.annotations ?? [n]).filter((e) => e.body?.source?.attachment?.url === a.url), u = c.indexOf(n), f = d(c), m = l(c)[u], h = p(n), g = f.some((e) => e.id === m);
170
+ if (!g && h != null) {
171
+ let e = `page-anchor-${m}`;
172
+ return {
173
+ type: t.Pdf,
174
+ url: s,
175
+ highlights: [...f, R(e, h)],
176
+ selectedHighlightId: e,
177
+ page: h
178
+ };
179
+ }
144
180
  return {
145
181
  type: t.Pdf,
146
182
  url: s,
147
183
  highlights: f,
148
- selectedHighlightId: f.some((e) => e.id === m) ? m : void 0,
149
- page: p(n)
184
+ selectedHighlightId: g ? m : void 0,
185
+ page: h
150
186
  };
151
- }, R = (e) => {
187
+ }, B = (e) => {
152
188
  switch (e.type) {
153
189
  case "docx_text_anchor": return {
154
190
  kind: i.DocxTableRow,
@@ -184,22 +220,22 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
184
220
  end: e.end
185
221
  };
186
222
  }
187
- }, z = (n, i, o) => {
223
+ }, V = (n, i, o) => {
188
224
  let s = n.body?.source?.attachment;
189
225
  if (s?.url == null) return null;
190
226
  let c = a(s.title ?? s.url, s.type);
191
227
  if (c !== r.Docx && c !== r.Xlsx && c !== r.Pptx) return null;
192
228
  let d = e(s.url) ? o.resolveDialFileDownloadUrl(s.url) : s.url;
193
229
  if (d == null) return null;
194
- let p = f(n, i), m = [], h;
230
+ let p = f(n, i), m = [], h, g = l(p);
195
231
  return p.forEach((e, t) => {
196
232
  let r = u(e);
197
233
  if (r.length === 0) return;
198
- let i = l(e, t);
234
+ let i = g[t];
199
235
  m.push({
200
236
  id: i,
201
- locations: r.map(R)
202
- }), e === n && (h = i);
237
+ locations: r.map(B)
238
+ }), e === n && h == null && (h = i);
203
239
  }), {
204
240
  type: t.Ooxml,
205
241
  url: d,
@@ -209,7 +245,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
209
245
  selectedHighlightId: h
210
246
  } : {}
211
247
  };
212
- }, B = (n, r) => {
248
+ }, H = (n, r) => {
213
249
  let i = m(n.url);
214
250
  if (i == null) return null;
215
251
  let a = e(i.baseUrl) ? r.resolveDialFileDownloadUrl(i.baseUrl) : i.baseUrl;
@@ -222,55 +258,42 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
222
258
  return {
223
259
  type: t.Pdf,
224
260
  url: a,
225
- highlights: [{
226
- id: o,
227
- bboxes: [{
228
- page: i.page,
229
- x1: 0,
230
- y1: 0,
231
- x2: 0,
232
- y2: 0
233
- }],
234
- style: {
235
- backgroundColor: "transparent",
236
- opacity: 0
237
- }
238
- }],
261
+ highlights: [R(o, i.page)],
239
262
  selectedHighlightId: o,
240
263
  page: i.page
241
264
  };
242
- }, V = (e) => {
265
+ }, U = (e) => {
243
266
  try {
244
267
  let t = new URL(e).protocol;
245
268
  return t === "http:" || t === "https:" || t === "blob:";
246
269
  } catch {
247
270
  return !1;
248
271
  }
249
- }, H = (t) => t.url != null && !e(t.url) && V(t.url) ? t.url : void 0, U = async (e, n) => {
272
+ }, W = (t) => t.url != null && !e(t.url) && U(t.url) ? t.url : void 0, G = async (e, n) => {
250
273
  let r = await O(e, n);
251
274
  if (r != null) return typeof r == "string" ? {
252
275
  type: t.Pdf,
253
276
  url: r
254
277
  } : r;
255
- let i = H(e);
278
+ let i = W(e);
256
279
  return i == null ? null : {
257
280
  type: t.Pdf,
258
281
  url: i
259
282
  };
260
- }, W = async (e, n, r) => {
283
+ }, K = async (e, n, r) => {
261
284
  let i = await O(e, n);
262
285
  if (i != null) return typeof i == "string" ? {
263
286
  type: t.Ooxml,
264
287
  url: i,
265
288
  format: r
266
289
  } : i;
267
- let a = H(e);
290
+ let a = W(e);
268
291
  return a == null ? null : {
269
292
  type: t.Ooxml,
270
293
  url: a,
271
294
  format: r
272
295
  };
273
- }, G = async (e, n) => {
296
+ }, q = async (e, n) => {
274
297
  let r = await k(e, n);
275
298
  if (r == null) return null;
276
299
  if (typeof r != "string") return r;
@@ -286,7 +309,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
286
309
  text: r
287
310
  };
288
311
  }
289
- }, K = async (e, n, r, i) => {
312
+ }, J = async (e, n, r, i) => {
290
313
  let a = await k(e, n);
291
314
  if (a == null || typeof a != "string") return null;
292
315
  let o = {};
@@ -308,7 +331,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
308
331
  visualizerName: r.title,
309
332
  requestTimeout: r.requestTimeout
310
333
  };
311
- }, q = (e, n, r, i) => {
334
+ }, Y = (e, n, r, i) => {
312
335
  let a = {
313
336
  width: r.width,
314
337
  height: r.height,
@@ -338,4 +361,4 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
338
361
  };
339
362
  };
340
363
  //#endregion
341
- export { z as annotationToOoxmlCanvasContent, L as annotationToPdfCanvasContent, S as clearAttachmentCache, A as hasAttachmentTextSource, B as referenceAttachmentToPdfCanvasContent, F as resolveCodeCanvasContent, q as resolveGroupedVisualizerCanvasContent, I as resolveHtmlCanvasContent, j as resolveImageCanvasContent, G as resolveJsonCanvasContent, N as resolveMarkdownCanvasContent, W as resolveOoxmlCanvasContent, U as resolvePdfCanvasContent, M as resolveTextCanvasContent, K as resolveVisualizerCanvasContent };
364
+ export { V as annotationToOoxmlCanvasContent, z as annotationToPdfCanvasContent, S as clearAttachmentCache, A as hasAttachmentTextSource, H as referenceAttachmentToPdfCanvasContent, F as resolveCodeCanvasContent, Y as resolveGroupedVisualizerCanvasContent, L as resolveHtmlCanvasContent, j as resolveImageCanvasContent, q as resolveJsonCanvasContent, N as resolveMarkdownCanvasContent, K as resolveOoxmlCanvasContent, G as resolvePdfCanvasContent, M as resolveTextCanvasContent, J as resolveVisualizerCanvasContent };
@@ -1,24 +1,25 @@
1
1
  import { getVirtualPathName as e } from "./dial-file-manager-path.util.js";
2
- import { getParentFolderPath as t, virtualPathToApiPath as n } from "./resolve-dial-file-api-path.js";
2
+ import { virtualPathToApiPath as t } from "./resolve-dial-file-api-path.js";
3
+ import { getParentFolderPath as n } from "@epam/ai-dial-chat-shared";
3
4
  import { CopyItemDtoNodeTypeEnum as r, MoveItemDtoNodeTypeEnum as i, RenameItemDtoNodeTypeEnum as a } from "@epam/ai-dial-chat-api-client";
4
5
  import { DialFileNodeType as o } from "@epam/ai-dial-react-file-manager";
5
6
  //#region src/files/dial-file-manager-copy-move.util.ts
6
- var s = (t, i, a) => t.map((t) => {
7
- let s = t.nodeType === o.FOLDER, c = n(t.sourceUrl, a), l = n(t.destinationUrl, a), u = e(t.sourceUrl, c);
7
+ var s = (n, i, a) => n.map((n) => {
8
+ let s = n.nodeType === o.FOLDER, c = t(n.sourceUrl, a), l = t(n.destinationUrl, a), u = e(n.sourceUrl, c);
8
9
  return {
9
- destinationName: e(t.destinationUrl, l),
10
+ destinationName: e(n.destinationUrl, l),
10
11
  dto: {
11
12
  bucket: i,
12
13
  sourcePath: s ? c.endsWith("/") ? c : `${c}/` : c.replace(/\/$/, ""),
13
14
  destinationPath: s ? l.endsWith("/") ? l : `${l}/` : l.replace(/\/$/, ""),
14
- overwrite: t.overwrite === !0,
15
+ overwrite: n.overwrite === !0,
15
16
  nodeType: s ? r.Folder : r.Item,
16
17
  name: u
17
18
  }
18
19
  };
19
20
  }), c = (r, s, c) => {
20
21
  let l = r.map((r) => {
21
- let i = r.nodeType === o.FOLDER, a = n(r.sourceUrl, c), s = n(r.destinationUrl, c), l = e(r.sourceUrl, a), u = e(r.destinationUrl, s), d = i ? a.endsWith("/") ? a : `${a}/` : a.replace(/\/$/, ""), f = i ? s.endsWith("/") ? s : `${s}/` : s.replace(/\/$/, "");
22
+ let i = r.nodeType === o.FOLDER, a = t(r.sourceUrl, c), s = t(r.destinationUrl, c), l = e(r.sourceUrl, a), u = e(r.destinationUrl, s), d = i ? a.endsWith("/") ? a : `${a}/` : a.replace(/\/$/, ""), f = i ? s.endsWith("/") ? s : `${s}/` : s.replace(/\/$/, "");
22
23
  return {
23
24
  isFolder: i,
24
25
  name: l,
@@ -26,8 +27,8 @@ var s = (t, i, a) => t.map((t) => {
26
27
  overwrite: r.overwrite === !0,
27
28
  sourcePath: d,
28
29
  destinationPath: f,
29
- sourceParent: t(d),
30
- destinationParent: t(f)
30
+ sourceParent: n(d),
31
+ destinationParent: n(f)
31
32
  };
32
33
  });
33
34
  return {
@@ -50,7 +50,7 @@ var o = (t) => {
50
50
  return o.some((e) => e.name.toLowerCase() === n.name.toLowerCase()) || o.push(s), a.set(t, o), a;
51
51
  }, u = (e, t, n) => {
52
52
  if (!e) return e;
53
- let r = typeof n == "string" ? { status: n } : n, i = e.files.map((e, n) => n === t ? {
53
+ let r = typeof n == "string" ? { status: n } : n, i = e.files.map((e) => e.id === t ? {
54
54
  ...e,
55
55
  ...r
56
56
  } : e);
@@ -59,6 +59,7 @@ var o = (t) => {
59
59
  files: i
60
60
  };
61
61
  }, d = (e, t, r, a, o) => {
62
+ if (t === i.All) return Promise.reject(/* @__PURE__ */ Error("fetchByTab cannot list the All tab; list each section instead"));
62
63
  if (t === i.Shared) {
63
64
  if (a === "") return e.listSharedFiles({ path: void 0 }).then((e) => ({ items: e.items }));
64
65
  let t = a.indexOf("/"), r = t === -1 ? a : a.slice(0, t), i = o.get(r);
@@ -1,6 +1,6 @@
1
1
  import { safeDecodeURI as e, stripTrailingSlashes as t } from "../shared/string-utils.js";
2
2
  import { PATH_SEPARATOR_REGEXP as n } from "./dial-file-manager.model.js";
3
- import { DialFileManagerActionProfile as r } from "./file-manager-variant.js";
3
+ import { DialFileManagerActionProfile as r } from "@epam/ai-dial-chat-shared";
4
4
  import { DialFileNodeType as i, DialFilePermission as a } from "@epam/ai-dial-react-file-manager";
5
5
  //#region src/files/dial-file-manager-path.util.ts
6
6
  var o = (e, t) => {
@@ -67,6 +67,28 @@ var o = (e, t) => {
67
67
  bucket: a.bucket,
68
68
  path: o + s
69
69
  };
70
+ }, y = (e, t) => {
71
+ let n = e.startsWith("/") ? e : `/${e}`;
72
+ return t.find((e) => {
73
+ let t = `/${e.rootLabel}`;
74
+ return n === t || n.startsWith(`${t}/`);
75
+ });
76
+ }, b = (e) => {
77
+ let t = /* @__PURE__ */ new Set();
78
+ return e.forEach((e) => e.forEach((e) => t.add(e))), t;
79
+ }, x = (e, t) => {
80
+ if (e.size !== t.size) return !1;
81
+ for (let n of e) if (!t.has(n)) return !1;
82
+ return !0;
83
+ }, S = (e) => {
84
+ let t = /* @__PURE__ */ new Set();
85
+ return e.map((e) => {
86
+ let n = e.rootLabel.trim(), r = n !== "" && !n.includes("/") && !t.has(n) ? n : e.tab;
87
+ return t.add(r), r === e.rootLabel ? e : {
88
+ ...e,
89
+ rootLabel: r
90
+ };
91
+ });
70
92
  };
71
93
  //#endregion
72
- export { _ as buildSharedItemVirtualPath, g as dialCorePathToRelative, f as findDialFileByPath, u as findFolderByVirtualPath, l as formatOperationFolderName, c as getVirtualPathName, d as hasDialFileWritePermission, o as hasForbiddenNameSymbols, p as isCopyMoveDuplicateAllowed, m as isShareActionsAllowed, s as normalizeVirtualPath, h as parseNewFolderVirtualPath, v as resolveOwnerCoords };
94
+ export { _ as buildSharedItemVirtualPath, g as dialCorePathToRelative, f as findDialFileByPath, u as findFolderByVirtualPath, l as formatOperationFolderName, c as getVirtualPathName, d as hasDialFileWritePermission, o as hasForbiddenNameSymbols, x as hasSamePaths, p as isCopyMoveDuplicateAllowed, m as isShareActionsAllowed, s as normalizeVirtualPath, h as parseNewFolderVirtualPath, v as resolveOwnerCoords, y as resolveSectionByPath, b as unionPathSets, S as withRoutableRootLabels };
@@ -1,28 +1,32 @@
1
1
  import { HIDDEN_FILE as e } from "@epam/ai-dial-chat-shared";
2
- import { DialFilePermission as t, FileManagerColumnKey as n } from "@epam/ai-dial-react-file-manager";
2
+ import { DialFileManagerTabs as t, DialFilePermission as n, FileManagerColumnKey as r } from "@epam/ai-dial-react-file-manager";
3
3
  //#region src/files/dial-file-manager.model.ts
4
- var r = 3, i = e, a = /[/\\]/, o = {
4
+ var i = 3, a = e, o = /[/\\]/, s = {
5
5
  year: "numeric",
6
6
  month: "short",
7
7
  day: "2-digit",
8
8
  hour: "2-digit",
9
9
  minute: "2-digit",
10
10
  hour12: !1
11
- }, s = [
12
- n.Name,
13
- n.UpdatedAt,
14
- n.Size,
15
- n.Actions
16
- ], c = [
17
- n.Name,
18
- n.UpdatedAt,
19
- n.Size,
20
- n.Author,
21
- n.Actions
22
- ], l = {
23
- READ: t.READ,
24
- WRITE: t.WRITE,
25
- SHARE: t.SHARE
26
- };
11
+ }, c = [
12
+ r.Name,
13
+ r.UpdatedAt,
14
+ r.Size,
15
+ r.Actions
16
+ ], l = [
17
+ r.Name,
18
+ r.UpdatedAt,
19
+ r.Size,
20
+ r.Author,
21
+ r.Actions
22
+ ], u = {
23
+ READ: n.READ,
24
+ WRITE: n.WRITE,
25
+ SHARE: n.SHARE
26
+ }, d = [
27
+ t.MyFiles,
28
+ t.Shared,
29
+ t.Organization
30
+ ];
27
31
  //#endregion
28
- export { s as COLUMNS_WITHOUT_AUTHOR, c as COLUMNS_WITH_AUTHOR, l as CORE_PERMISSION_MAP, o as DATE_OPTIONS, a as PATH_SEPARATOR_REGEXP, i as RESERVED_MARKER_NAME, r as UPLOAD_CONCURRENCY };
32
+ export { c as COLUMNS_WITHOUT_AUTHOR, l as COLUMNS_WITH_AUTHOR, u as CORE_PERMISSION_MAP, s as DATE_OPTIONS, d as DIAL_FILE_MANAGER_SECTION_TABS, o as PATH_SEPARATOR_REGEXP, a as RESERVED_MARKER_NAME, i as UPLOAD_CONCURRENCY };
@@ -1,10 +1,10 @@
1
1
  //#region src/files/dial-file-manager.types.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
- return e.FolderLoadFailed = "folderLoadFailed", e.MetadataLoadFailed = "metadataLoadFailed", e.FolderCreateFailed = "folderCreateFailed", e.DownloadFileFailed = "downloadFileFailed", e.DownloadFilesFailed = "downloadFilesFailed", e.FilesDeleted = "filesDeleted", e.FilesDeletePartiallyFailed = "filesDeletePartiallyFailed", e.DeleteFailed = "deleteFailed", e.RenameFailed = "renameFailed", e.RenamePartiallyFailed = "renamePartiallyFailed", e.MoveFailed = "moveFailed", e.MovePartiallyFailed = "movePartiallyFailed", e.CopyFailed = "copyFailed", e.CopyPartiallyFailed = "copyPartiallyFailed", e.UnshareFailed = "unshareFailed", e.RemoveAccessFailed = "removeAccessFailed", e.UploadFailed = "uploadFailed", e.UploadCompleted = "uploadCompleted", e.UploadArchiveFailed = "uploadArchiveFailed", e.UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed", e.UploadArchiveRequestFailed = "uploadArchiveRequestFailed", e;
3
+ return e.FolderLoadFailed = "folderLoadFailed", e.MetadataLoadFailed = "metadataLoadFailed", e.FolderCreateFailed = "folderCreateFailed", e.DownloadFileFailed = "downloadFileFailed", e.DownloadFilesFailed = "downloadFilesFailed", e.FilesDeleted = "filesDeleted", e.FilesDeletePartiallyFailed = "filesDeletePartiallyFailed", e.DeleteFailed = "deleteFailed", e.RenameFailed = "renameFailed", e.RenamePartiallyFailed = "renamePartiallyFailed", e.MoveFailed = "moveFailed", e.MovePartiallyFailed = "movePartiallyFailed", e.CopyFailed = "copyFailed", e.CopyPartiallyFailed = "copyPartiallyFailed", e.UnshareFailed = "unshareFailed", e.RemoveAccessFailed = "removeAccessFailed", e.UploadFailed = "uploadFailed", e.UploadCompleted = "uploadCompleted", e.UploadArchiveFailed = "uploadArchiveFailed", e.UploadArchivePartiallyFailed = "uploadArchivePartiallyFailed", e.UploadArchiveRequestFailed = "uploadArchiveRequestFailed", e.CrossSectionTransferUnsupported = "crossSectionTransferUnsupported", e;
4
4
  }({}), t = /* @__PURE__ */ function(e) {
5
- return e.Empty = "empty", e.ForbiddenSymbols = "forbiddenSymbols", e.ReservedName = "reservedName", e.TooLong = "tooLong", e.DuplicateName = "duplicateName", e.LeadingDot = "leadingDot", e;
5
+ return e.Empty = "empty", e.ForbiddenSymbols = "forbiddenSymbols", e.ReservedName = "reservedName", e.TooLong = "tooLong", e.DuplicateName = "duplicateName", e;
6
6
  }({}), n = /* @__PURE__ */ function(e) {
7
- return e.FolderCreated = "folderCreated", e.FileRenamed = "fileRenamed", e.FileDownloaded = "fileDownloaded", e.FilesDownloaded = "filesDownloaded", e.FileCopied = "fileCopied", e.FilesCopied = "filesCopied", e.FileMoved = "fileMoved", e.FilesMoved = "filesMoved", e;
7
+ return e.FolderCreated = "folderCreated", e.FileRenamed = "fileRenamed", e.FileDownloaded = "fileDownloaded", e.FilesDownloaded = "filesDownloaded", e.FileCopied = "fileCopied", e.FilesCopied = "filesCopied", e.FileMoved = "fileMoved", e.FilesMoved = "filesMoved", e.FileDuplicated = "fileDuplicated", e.FilesDuplicated = "filesDuplicated", e;
8
8
  }({});
9
9
  //#endregion
10
10
  export { e as FileManagerNotificationReason, t as FileNameValidationErrorReason, n as FileOperationKind };
@@ -8,4 +8,4 @@ var n = (n) => {
8
8
  }
9
9
  };
10
10
  //#endregion
11
- export { e as DialFileManagerActionProfile, t as DialFileManagerVariant, n as deriveActionProfile };
11
+ export { n as deriveActionProfile };
@@ -1,19 +1,18 @@
1
1
  import { safeDecodeURI as e } from "../shared/string-utils.js";
2
- import { getParentFolderPath as t } from "@epam/ai-dial-chat-shared";
3
- import { DialFileNodeType as n } from "@epam/ai-dial-react-file-manager";
2
+ import { DialFileNodeType as t } from "@epam/ai-dial-react-file-manager";
4
3
  //#region src/files/resolve-dial-file-api-path.ts
5
- var r = (e) => e.startsWith("files/"), i = (t, n) => {
6
- let i = `files/${n}/`;
4
+ var n = (e) => e.startsWith("files/"), r = (t, r) => {
5
+ let i = `files/${r}/`;
7
6
  if (t.startsWith(i)) return e(t.slice(i.length));
8
- if (r(t)) {
9
- let r = t.slice(6), i = r.indexOf("/");
7
+ if (n(t)) {
8
+ let n = t.slice(6), i = n.indexOf("/");
10
9
  if (i >= 0) {
11
- let t = r.slice(0, i), a = r.slice(i + 1);
12
- if (t === n) return e(a);
10
+ let t = n.slice(0, i), a = n.slice(i + 1);
11
+ if (t === r) return e(a);
13
12
  }
14
13
  }
15
14
  return t;
16
- }, a = (e, t) => {
15
+ }, i = (e, t) => {
17
16
  let n = `/${t}`, r = `/${t}/`, i = `${t}/`;
18
17
  if (e === n || e === `${t}` || e === r || e === i) return "";
19
18
  let a;
@@ -25,9 +24,9 @@ var r = (e) => e.startsWith("files/"), i = (t, n) => {
25
24
  }
26
25
  let o = a.replace(/\/{2,}/g, "/");
27
26
  return o && !o.endsWith("/") ? `${o}/` : o;
28
- }, o = (e, t) => e.startsWith("/") || e === t || e.startsWith(`${t}/`), s = (e, t, r) => {
29
- let s = e.nodeType === n.FOLDER, c = e.id ? i(e.id, t) : null, l = c != null && !o(c, r) ? c : a(e.path, r);
27
+ }, a = (e, t) => e.startsWith("/") || e === t || e.startsWith(`${t}/`), o = (e, n, o) => {
28
+ let s = e.nodeType === t.FOLDER, c = e.id ? r(e.id, n) : null, l = c != null && !a(c, o) ? c : i(e.path, o);
30
29
  return s ? l.endsWith("/") ? l : `${l}/` : l.replace(/\/$/, "");
31
30
  };
32
31
  //#endregion
33
- export { t as getParentFolderPath, s as resolveDialFileApiPath, a as virtualPathToApiPath };
32
+ export { o as resolveDialFileApiPath, i as virtualPathToApiPath };