@epam/ai-dial-chat-hooks 1.2.0-dev.21 → 1.2.0-dev.217
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/api-error/api-error.js +7 -4
- package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
- package/attachments.d.ts +10 -4
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/deployment-id.js +8 -2
- package/catalog/map-deployment-limits-to-input.js +81 -9
- package/catalog/map-deployment-to-catalog-item.js +34 -34
- package/catalog/map-entity-details-to-catalog.js +7 -0
- package/catalog/map-skill-to-catalog-item.js +30 -27
- package/catalog/publish.js +6 -5
- package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
- package/catalog/useSkillItemDetails.js +17 -13
- package/catalog.d.ts +116 -20
- package/catalog.js +23 -22
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/conversation-transfer/queue.js +8 -5
- package/conversation/create-chat-stream-api.js +85 -49
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +23 -0
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/useConversationHandlers.js +16 -5
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +2 -3
- package/conversation/useConversationScroll/useConversationScroll.js +68 -64
- package/conversation/useConversationStream/apply-chunk.js +1 -1
- package/conversation/useConversationStream/generation-resume.js +104 -63
- package/conversation/useConversationStream/useConversationStream.js +181 -110
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
- package/conversation-overlay.d.ts +7 -0
- package/conversation-overlay.js +2 -0
- package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
- package/conversation-sources.d.ts +1 -1
- package/conversation-transfer.d.ts +2 -1
- package/conversation.d.ts +241 -13
- package/conversation.js +32 -30
- package/file-manager-canvas.d.ts +409 -0
- package/file-manager-canvas.js +2 -0
- package/file-manager.d.ts +153 -350
- package/file-manager.js +25 -24
- package/files/attachment-canvas.js +73 -22
- package/files/attachment-types.js +14 -13
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +23 -1
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/useDialFileListing/useDialFileListing.js +139 -127
- package/files/useDialFileManager/useDialFileManager.js +132 -128
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
- package/files/useDialFileMutations/useDialFileMutations.js +33 -32
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +43 -0
- package/index.d.ts +1094 -86
- package/index.js +136 -122
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
- package/mcp-apps.d.ts +8 -6
- package/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +32 -0
- package/oauth.js +9 -9
- package/package.json +36 -21
- package/scheduled-task/scheduled-task-description.js +77 -0
- package/scheduled-task/scheduled-task-preparation.js +24 -0
- package/scheduled-task/scheduled-task-trigger.js +7 -2
- package/scheduled-task/scheduled-tasks-api-client.js +19 -0
- package/scheduled-task/use-scheduled-task-runs.js +194 -0
- package/scheduled-task/use-scheduled-tasks.js +93 -0
- package/scheduled-tasks.d.ts +195 -3
- package/scheduled-tasks.js +7 -2
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +42 -27
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +79 -0
- package/skill/useSkillEditorLoad.js +29 -28
- package/skill/useSkillEditorSubmit.js +108 -84
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +133 -3
- package/skill-editor.js +9 -8
- package/usage/map-usage-data-to-dashboard.js +66 -0
- package/usage/map-user-usage-to-model-limits.js +202 -0
- package/usage.d.ts +125 -0
- package/usage.js +3 -0
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +18 -6
package/file-manager.js
CHANGED
|
@@ -3,27 +3,28 @@ import { isDialFileAcceptType as r, mimeTypesToAttachmentExtensionLabels as i, m
|
|
|
3
3
|
import { sanitizeFileName as s, splitFileNameExtension as c, trimFileNameToByteLimit as l } from "./files/file-name.js";
|
|
4
4
|
import { DialFilesApiUploadMode as u } from "./files/dial-files-api.js";
|
|
5
5
|
import { FileManagerNotificationReason as d, FileNameValidationErrorReason as f, FileOperationKind as p } from "./files/dial-file-manager.types.js";
|
|
6
|
-
import { COLUMNS_WITHOUT_AUTHOR as m, COLUMNS_WITH_AUTHOR as h, CORE_PERMISSION_MAP as g, DATE_OPTIONS as _,
|
|
7
|
-
import { DialFileManagerActionProfile as
|
|
8
|
-
import { buildSharedItemVirtualPath as
|
|
9
|
-
import { getParentFolderPath as
|
|
10
|
-
import { prepareCopyItems as
|
|
11
|
-
import { buildFromCache as
|
|
12
|
-
import { createFilesApiClient as
|
|
13
|
-
import { createUploadFileWithProgress as
|
|
14
|
-
import { openAnnotationAttachment as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { useDialFileManagerTabConfig as
|
|
28
|
-
import {
|
|
29
|
-
|
|
6
|
+
import { COLUMNS_WITHOUT_AUTHOR as m, COLUMNS_WITH_AUTHOR as h, CORE_PERMISSION_MAP as g, DATE_OPTIONS as _, DIAL_FILE_MANAGER_SECTION_TABS as v, PATH_SEPARATOR_REGEXP as y, RESERVED_MARKER_NAME as b, UPLOAD_CONCURRENCY as x } from "./files/dial-file-manager.model.js";
|
|
7
|
+
import { DialFileManagerActionProfile as S, DialFileManagerVariant as C, deriveActionProfile as w } from "./files/file-manager-variant.js";
|
|
8
|
+
import { buildSharedItemVirtualPath as T, dialCorePathToRelative as E, findDialFileByPath as D, findFolderByVirtualPath as O, formatOperationFolderName as k, getVirtualPathName as A, hasDialFileWritePermission as j, hasForbiddenNameSymbols as M, hasSamePaths as N, isCopyMoveDuplicateAllowed as P, isShareActionsAllowed as F, normalizeVirtualPath as I, parseNewFolderVirtualPath as L, resolveOwnerCoords as R, resolveSectionByPath as z, unionPathSets as B, withRoutableRootLabels as V } from "./files/dial-file-manager-path.util.js";
|
|
9
|
+
import { getParentFolderPath as H, resolveDialFileApiPath as U, virtualPathToApiPath as W } from "./files/resolve-dial-file-api-path.js";
|
|
10
|
+
import { prepareCopyItems as G, prepareMoveRenameItems as K } from "./files/dial-file-manager-copy-move.util.js";
|
|
11
|
+
import { buildFromCache as q, fetchByTab as J, fetchForSearch as Y, findFirstSuccessfulCopyMoveItem as X, mapCorePermissions as Z, mapFileMetadataToDialFile as Q, mapSearchItem as $, mergeCreatedFolderIntoCache as ee, updateEntry as te } from "./files/dial-file-manager-mapping.util.js";
|
|
12
|
+
import { createFilesApiClient as ne } from "./files/create-files-api.js";
|
|
13
|
+
import { createUploadFileWithProgress as re } from "./files/create-upload-file-with-progress.js";
|
|
14
|
+
import { openAnnotationAttachment as ie } from "./files/annotation.js";
|
|
15
|
+
import { getUrlFileName as ae, isExternalSourcePreviewable as oe, resolveExternalSourceContentType as se } from "./files/source-content.js";
|
|
16
|
+
import { annotationToDisplayAttachment as ce, attachmentDtoToDisplayAttachment as le, attachmentDtosToDisplayAttachments as ue } from "./files/attachment-dto-to-display.js";
|
|
17
|
+
import { dialFileToAttachment as de, dialFilesToAttachments as fe, dialFolderPathToAttachment as pe } from "./files/dial-file-to-attachment.js";
|
|
18
|
+
import { DownloadDestinationType as me } from "./files/download-destination.js";
|
|
19
|
+
import { prepareDownloadDestination as he } from "./files/prepare-download-destination.js";
|
|
20
|
+
import { useDialFileListing as ge } from "./files/useDialFileListing/useDialFileListing.js";
|
|
21
|
+
import { useDialFileMetadata as _e } from "./files/useDialFileMetadata/useDialFileMetadata.js";
|
|
22
|
+
import { useDialFileMutations as ve } from "./files/useDialFileMutations/useDialFileMutations.js";
|
|
23
|
+
import { useDialFileSharing as ye } from "./files/useDialFileSharing/useDialFileSharing.js";
|
|
24
|
+
import { useDialFileUploadBatch as be } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
|
|
25
|
+
import { useDialFileManager as xe } from "./files/useDialFileManager/useDialFileManager.js";
|
|
26
|
+
import { useDialFileManagerSections as Se } from "./files/useDialFileManagerSections/useDialFileManagerSections.js";
|
|
27
|
+
import { useDialFileManagerTabConfig as Ce } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
|
|
28
|
+
import { useFileAttachmentPicker as we } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
|
|
29
|
+
import { useGridEditingScroll as Te } from "@epam/ai-dial-chat-shared";
|
|
30
|
+
export { m as COLUMNS_WITHOUT_AUTHOR, h as COLUMNS_WITH_AUTHOR, g as CORE_PERMISSION_MAP, _ as DATE_OPTIONS, v as DIAL_FILE_MANAGER_SECTION_TABS, S as DialFileManagerActionProfile, C as DialFileManagerVariant, u as DialFilesApiUploadMode, me as DownloadDestinationType, d as FileManagerNotificationReason, f as FileNameValidationErrorReason, p as FileOperationKind, y as PATH_SEPARATOR_REGEXP, b as RESERVED_MARKER_NAME, x as UPLOAD_CONCURRENCY, ce as annotationToDisplayAttachment, le as attachmentDtoToDisplayAttachment, ue as attachmentDtosToDisplayAttachments, q as buildFromCache, T as buildSharedItemVirtualPath, ne as createFilesApiClient, re as createUploadFileWithProgress, w as deriveActionProfile, E as dialCorePathToRelative, de as dialFileToAttachment, fe as dialFilesToAttachments, pe as dialFolderPathToAttachment, J as fetchByTab, Y as fetchForSearch, D as findDialFileByPath, X as findFirstSuccessfulCopyMoveItem, O as findFolderByVirtualPath, k as formatOperationFolderName, H as getParentFolderPath, ae as getUrlFileName, A as getVirtualPathName, j as hasDialFileWritePermission, M as hasForbiddenNameSymbols, N as hasSamePaths, P as isCopyMoveDuplicateAllowed, r as isDialFileAcceptType, e as isDialFileId, oe as isExternalSourcePreviewable, F as isShareActionsAllowed, Z as mapCorePermissions, Q as mapFileMetadataToDialFile, $ as mapSearchItem, ee as mergeCreatedFolderIntoCache, i as mimeTypesToAttachmentExtensionLabels, a as mimeTypesToDialFileAcceptTypes, o as mimeTypesToFileAccept, I as normalizeVirtualPath, ie as openAnnotationAttachment, L as parseNewFolderVirtualPath, G as prepareCopyItems, he as prepareDownloadDestination, K as prepareMoveRenameItems, U as resolveDialFileApiPath, t as resolveDialFileBucketAndPath, se as resolveExternalSourceContentType, R as resolveOwnerCoords, n as resolveRelativeDialFilePath, z as resolveSectionByPath, s as sanitizeFileName, c as splitFileNameExtension, l as trimFileNameToByteLimit, B as unionPathSets, te as updateEntry, ge as useDialFileListing, xe as useDialFileManager, Se as useDialFileManagerSections, Ce as useDialFileManagerTabConfig, _e as useDialFileMetadata, ve as useDialFileMutations, ye as useDialFileSharing, be as useDialFileUploadBatch, we as useFileAttachmentPicker, Te as useGridEditingScroll, W as virtualPathToApiPath, V as withRoutableRootLabels };
|
|
@@ -124,18 +124,30 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
124
124
|
text: i,
|
|
125
125
|
language: r
|
|
126
126
|
} : i;
|
|
127
|
-
}, I =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
136
|
-
|
|
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
|
-
|
|
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
|
+
} : i;
|
|
150
|
+
}, R = (n, r, i) => {
|
|
139
151
|
let a = n.body?.source?.attachment;
|
|
140
152
|
if (a?.type !== o.PDF) return null;
|
|
141
153
|
let s = e(a.url) ? i.resolveDialFileDownloadUrl(a.url) : a.url;
|
|
@@ -148,8 +160,19 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
148
160
|
selectedHighlightId: f.some((e) => e.id === m) ? m : void 0,
|
|
149
161
|
page: p(n)
|
|
150
162
|
};
|
|
151
|
-
},
|
|
163
|
+
}, z = (e) => {
|
|
152
164
|
switch (e.type) {
|
|
165
|
+
case "docx_text_anchor": return {
|
|
166
|
+
kind: i.DocxTableRow,
|
|
167
|
+
cells: e.cells,
|
|
168
|
+
occurrence: e.occurrence
|
|
169
|
+
};
|
|
170
|
+
case "pptx_text_anchor": return {
|
|
171
|
+
kind: i.PptxTableRow,
|
|
172
|
+
cells: e.cells,
|
|
173
|
+
occurrence: e.occurrence,
|
|
174
|
+
slide: e.slide
|
|
175
|
+
};
|
|
153
176
|
case "docx_text_range": return {
|
|
154
177
|
kind: i.DocxTextRange,
|
|
155
178
|
story: e.story,
|
|
@@ -173,7 +196,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
173
196
|
end: e.end
|
|
174
197
|
};
|
|
175
198
|
}
|
|
176
|
-
},
|
|
199
|
+
}, B = (n, i, o) => {
|
|
177
200
|
let s = n.body?.source?.attachment;
|
|
178
201
|
if (s?.url == null) return null;
|
|
179
202
|
let c = a(s.title ?? s.url, s.type);
|
|
@@ -187,7 +210,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
187
210
|
let i = l(e, t);
|
|
188
211
|
m.push({
|
|
189
212
|
id: i,
|
|
190
|
-
locations: r.map(
|
|
213
|
+
locations: r.map(z)
|
|
191
214
|
}), e === n && (h = i);
|
|
192
215
|
}), {
|
|
193
216
|
type: t.Ooxml,
|
|
@@ -198,7 +221,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
198
221
|
selectedHighlightId: h
|
|
199
222
|
} : {}
|
|
200
223
|
};
|
|
201
|
-
},
|
|
224
|
+
}, V = (n, r) => {
|
|
202
225
|
let i = m(n.url);
|
|
203
226
|
if (i == null) return null;
|
|
204
227
|
let a = e(i.baseUrl) ? r.resolveDialFileDownloadUrl(i.baseUrl) : i.baseUrl;
|
|
@@ -228,38 +251,38 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
228
251
|
selectedHighlightId: o,
|
|
229
252
|
page: i.page
|
|
230
253
|
};
|
|
231
|
-
},
|
|
254
|
+
}, H = (e) => {
|
|
232
255
|
try {
|
|
233
256
|
let t = new URL(e).protocol;
|
|
234
257
|
return t === "http:" || t === "https:" || t === "blob:";
|
|
235
258
|
} catch {
|
|
236
259
|
return !1;
|
|
237
260
|
}
|
|
238
|
-
},
|
|
261
|
+
}, U = (t) => t.url != null && !e(t.url) && H(t.url) ? t.url : void 0, W = async (e, n) => {
|
|
239
262
|
let r = await O(e, n);
|
|
240
263
|
if (r != null) return typeof r == "string" ? {
|
|
241
264
|
type: t.Pdf,
|
|
242
265
|
url: r
|
|
243
266
|
} : r;
|
|
244
|
-
let i =
|
|
267
|
+
let i = U(e);
|
|
245
268
|
return i == null ? null : {
|
|
246
269
|
type: t.Pdf,
|
|
247
270
|
url: i
|
|
248
271
|
};
|
|
249
|
-
},
|
|
272
|
+
}, G = async (e, n, r) => {
|
|
250
273
|
let i = await O(e, n);
|
|
251
274
|
if (i != null) return typeof i == "string" ? {
|
|
252
275
|
type: t.Ooxml,
|
|
253
276
|
url: i,
|
|
254
277
|
format: r
|
|
255
278
|
} : i;
|
|
256
|
-
let a =
|
|
279
|
+
let a = U(e);
|
|
257
280
|
return a == null ? null : {
|
|
258
281
|
type: t.Ooxml,
|
|
259
282
|
url: a,
|
|
260
283
|
format: r
|
|
261
284
|
};
|
|
262
|
-
},
|
|
285
|
+
}, K = async (e, n) => {
|
|
263
286
|
let r = await k(e, n);
|
|
264
287
|
if (r == null) return null;
|
|
265
288
|
if (typeof r != "string") return r;
|
|
@@ -275,7 +298,7 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
275
298
|
text: r
|
|
276
299
|
};
|
|
277
300
|
}
|
|
278
|
-
},
|
|
301
|
+
}, q = async (e, n, r, i) => {
|
|
279
302
|
let a = await k(e, n);
|
|
280
303
|
if (a == null || typeof a != "string") return null;
|
|
281
304
|
let o = {};
|
|
@@ -297,6 +320,34 @@ var g = (e, t) => URL.createObjectURL(s(e, t)), _ = (e) => {
|
|
|
297
320
|
visualizerName: r.title,
|
|
298
321
|
requestTimeout: r.requestTimeout
|
|
299
322
|
};
|
|
323
|
+
}, J = (e, n, r, i) => {
|
|
324
|
+
let a = {
|
|
325
|
+
width: r.width,
|
|
326
|
+
height: r.height,
|
|
327
|
+
mobileHeight: r.mobileHeight,
|
|
328
|
+
themeId: i
|
|
329
|
+
}, o = [], s = [];
|
|
330
|
+
return e.forEach((e) => {
|
|
331
|
+
let t = n(e);
|
|
332
|
+
t != null && (s.push(e), o.push({
|
|
333
|
+
url: t,
|
|
334
|
+
mimeType: e.contentType,
|
|
335
|
+
visualizerData: { layout: a }
|
|
336
|
+
}));
|
|
337
|
+
}), o.length === 0 ? {
|
|
338
|
+
content: null,
|
|
339
|
+
resolved: []
|
|
340
|
+
} : {
|
|
341
|
+
content: {
|
|
342
|
+
type: t.GroupedVisualizer,
|
|
343
|
+
url: r.url,
|
|
344
|
+
attachments: o,
|
|
345
|
+
layout: a,
|
|
346
|
+
visualizerName: r.title,
|
|
347
|
+
requestTimeout: r.requestTimeout
|
|
348
|
+
},
|
|
349
|
+
resolved: s
|
|
350
|
+
};
|
|
300
351
|
};
|
|
301
352
|
//#endregion
|
|
302
|
-
export {
|
|
353
|
+
export { B as annotationToOoxmlCanvasContent, R as annotationToPdfCanvasContent, S as clearAttachmentCache, A as hasAttachmentTextSource, V as referenceAttachmentToPdfCanvasContent, F as resolveCodeCanvasContent, J as resolveGroupedVisualizerCanvasContent, L as resolveHtmlCanvasContent, j as resolveImageCanvasContent, K as resolveJsonCanvasContent, N as resolveMarkdownCanvasContent, G as resolveOoxmlCanvasContent, W as resolvePdfCanvasContent, M as resolveTextCanvasContent, q as resolveVisualizerCanvasContent };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeMimeType as e } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { extension as t } from "mime-types";
|
|
2
3
|
//#region src/files/attachment-types.ts
|
|
3
|
-
var
|
|
4
|
-
if (
|
|
5
|
-
},
|
|
6
|
-
let
|
|
7
|
-
if (!(
|
|
8
|
-
},
|
|
9
|
-
if (
|
|
10
|
-
let
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
13
|
-
return
|
|
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()}`;
|
|
14
15
|
}).join(", ");
|
|
15
16
|
//#endregion
|
|
16
|
-
export {
|
|
17
|
+
export { r as isDialFileAcceptType, o as mimeTypesToAttachmentExtensionLabels, i as mimeTypesToDialFileAcceptTypes, a as mimeTypesToFileAccept };
|
|
@@ -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
|
|
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);
|
|
@@ -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 {
|
|
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
|
|
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
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
],
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
],
|
|
23
|
-
READ:
|
|
24
|
-
WRITE:
|
|
25
|
-
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 {
|
|
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
|
|
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 };
|