@epam/ai-dial-chat-hooks 1.2.0-dev.164 → 1.2.0-dev.173
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/catalog/map-entity-details-to-catalog.js +7 -0
- package/catalog.d.ts +2 -0
- package/conversation/create-chat-stream-api.js +63 -36
- package/conversation/useConversationStream/generation-resume.js +80 -51
- package/conversation/useConversationStream/useConversationStream.js +162 -130
- package/conversation.d.ts +20 -0
- package/conversation.js +32 -32
- package/file-manager.d.ts +23 -17
- package/files/dial-file-manager-mapping.util.js +1 -1
- package/files/dial-file-manager.types.js +2 -2
- package/files/useDialFileManager/useDialFileManager.js +130 -128
- package/files/useDialFileMutations/useDialFileMutations.js +33 -32
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/index.d.ts +83 -21
- package/index.js +124 -124
- package/package.json +17 -17
- package/scheduled-task/use-scheduled-task-runs.js +162 -50
- package/scheduled-tasks.d.ts +17 -2
- package/scheduled-tasks.js +2 -2
- package/skill/skill-archive.js +19 -0
- package/skill/skill.js +41 -29
- package/skill/useSkillEditorSubmit.js +98 -92
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +21 -2
- package/skill-editor.js +9 -9
|
@@ -6,141 +6,143 @@ import { useDialFileMetadata as u } from "../useDialFileMetadata/useDialFileMeta
|
|
|
6
6
|
import { useDialFileMutations as d } from "../useDialFileMutations/useDialFileMutations.js";
|
|
7
7
|
import { useDialFileSharing as f } from "../useDialFileSharing/useDialFileSharing.js";
|
|
8
8
|
import { useDialFileUploadBatch as p } from "../useDialFileUploadBatch/useDialFileUploadBatch.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { isUploadInProgress as m } from "@epam/ai-dial-chat-shared";
|
|
10
|
+
import { useCallback as h, useMemo as g } from "react";
|
|
11
|
+
import { DialFileManagerActions as _, DialFileManagerTabs as v } from "@epam/ai-dial-react-file-manager";
|
|
11
12
|
//#region src/files/useDialFileManager/useDialFileManager.ts
|
|
12
|
-
var
|
|
13
|
-
let
|
|
14
|
-
filesApi:
|
|
15
|
-
bucket:
|
|
16
|
-
rootLabel:
|
|
17
|
-
activeTab:
|
|
18
|
-
onNotification:
|
|
19
|
-
}),
|
|
20
|
-
filesApi:
|
|
21
|
-
bucket:
|
|
22
|
-
rootLabel:
|
|
23
|
-
activeTab:
|
|
24
|
-
cache:
|
|
25
|
-
sharedRootMetaRef:
|
|
26
|
-
invalidateFolders:
|
|
27
|
-
bumpRetry:
|
|
28
|
-
onNotification:
|
|
29
|
-
}),
|
|
30
|
-
filesApi:
|
|
31
|
-
bucket:
|
|
32
|
-
rootLabel:
|
|
33
|
-
activeTab:
|
|
34
|
-
folderPath:
|
|
35
|
-
currentFolder:
|
|
36
|
-
sharedRootMetaRef:
|
|
37
|
-
listingPermissionsCache:
|
|
38
|
-
invalidateFolders:
|
|
39
|
-
bumpRetry:
|
|
40
|
-
mergeCreatedFolder:
|
|
41
|
-
setFolderPath:
|
|
42
|
-
onNotification:
|
|
43
|
-
onOperationSuccess:
|
|
44
|
-
downloadDestination:
|
|
45
|
-
forbiddenSymbolsRegExp:
|
|
46
|
-
}),
|
|
47
|
-
filesApi:
|
|
48
|
-
bucket:
|
|
49
|
-
rootLabel:
|
|
50
|
-
bumpRetry:
|
|
51
|
-
onNotification:
|
|
52
|
-
}),
|
|
53
|
-
filesApi:
|
|
54
|
-
bucket:
|
|
55
|
-
rootLabel:
|
|
56
|
-
onNotification:
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
]),
|
|
13
|
+
var y = ({ filesApi: y, bucket: b, rootLabel: x = "My files", activeTab: S = v.MyFiles, onNotification: C, onOperationSuccess: w, forbiddenSymbolsRegExp: T, variant: E = i.Attach, actionProfile: D, labels: O, locale: k, disabledNewButtonTooltip: A, downloadDestination: j, buildValidationErrorMessage: M }) => {
|
|
14
|
+
let N = D ?? a(E), P = l({
|
|
15
|
+
filesApi: y,
|
|
16
|
+
bucket: b,
|
|
17
|
+
rootLabel: x,
|
|
18
|
+
activeTab: S,
|
|
19
|
+
onNotification: C
|
|
20
|
+
}), F = p({
|
|
21
|
+
filesApi: y,
|
|
22
|
+
bucket: b,
|
|
23
|
+
rootLabel: x,
|
|
24
|
+
activeTab: S,
|
|
25
|
+
cache: P.cache,
|
|
26
|
+
sharedRootMetaRef: P.sharedRootMetaRef,
|
|
27
|
+
invalidateFolders: P.invalidateFolders,
|
|
28
|
+
bumpRetry: P.bumpRetry,
|
|
29
|
+
onNotification: C
|
|
30
|
+
}), I = d({
|
|
31
|
+
filesApi: y,
|
|
32
|
+
bucket: b,
|
|
33
|
+
rootLabel: x,
|
|
34
|
+
activeTab: S,
|
|
35
|
+
folderPath: P.folderPath,
|
|
36
|
+
currentFolder: P.currentFolder,
|
|
37
|
+
sharedRootMetaRef: P.sharedRootMetaRef,
|
|
38
|
+
listingPermissionsCache: P.listingPermissionsCache,
|
|
39
|
+
invalidateFolders: P.invalidateFolders,
|
|
40
|
+
bumpRetry: P.bumpRetry,
|
|
41
|
+
mergeCreatedFolder: P.mergeCreatedFolder,
|
|
42
|
+
setFolderPath: P.setFolderPath,
|
|
43
|
+
onNotification: C,
|
|
44
|
+
onOperationSuccess: w,
|
|
45
|
+
downloadDestination: j,
|
|
46
|
+
forbiddenSymbolsRegExp: T
|
|
47
|
+
}), L = f({
|
|
48
|
+
filesApi: y,
|
|
49
|
+
bucket: b,
|
|
50
|
+
rootLabel: x,
|
|
51
|
+
bumpRetry: P.bumpRetry,
|
|
52
|
+
onNotification: C
|
|
53
|
+
}), R = u({
|
|
54
|
+
filesApi: y,
|
|
55
|
+
bucket: b,
|
|
56
|
+
rootLabel: x,
|
|
57
|
+
onNotification: C
|
|
58
|
+
}), z = o(P.currentFolder), B = g(() => S === v.Organization || S === v.Shared && P.folderPath === "" ? !1 : z, [
|
|
59
|
+
S,
|
|
60
|
+
P.folderPath,
|
|
61
|
+
z
|
|
62
|
+
]), V = g(() => S === v.Shared ? t : e, [S]), H = g(() => {
|
|
62
63
|
let e = {}, t = (t) => {
|
|
63
|
-
let n =
|
|
64
|
+
let n = O[t];
|
|
64
65
|
n != null && (e[t] = n);
|
|
65
66
|
};
|
|
66
|
-
return t(
|
|
67
|
+
return t(_.Download), S === v.MyFiles ? (t(_.Delete), B && (t(_.Rename), s(N) && (t(_.Copy), t(_.Move), t(_.Duplicate))), c(N) && t(_.RemoveAccess)) : S === v.Shared && c(N) && t(_.Unshare), N === r.Full && t(_.Info), e;
|
|
67
68
|
}, [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
]),
|
|
83
|
-
let n =
|
|
84
|
-
return n ?
|
|
85
|
-
}, [
|
|
86
|
-
let n =
|
|
87
|
-
return n ?
|
|
88
|
-
}, [
|
|
69
|
+
S,
|
|
70
|
+
B,
|
|
71
|
+
N,
|
|
72
|
+
O
|
|
73
|
+
]), U = g(() => I.isCreatingFolder || I.isDownloading || I.isDeleting || I.isRenaming || I.isCopying || I.isMoving || L.isUnsharing || L.isRemovingAccess || m(F.uploadBatchState), [
|
|
74
|
+
I.isCreatingFolder,
|
|
75
|
+
I.isDownloading,
|
|
76
|
+
I.isDeleting,
|
|
77
|
+
I.isRenaming,
|
|
78
|
+
I.isCopying,
|
|
79
|
+
I.isMoving,
|
|
80
|
+
L.isUnsharing,
|
|
81
|
+
L.isRemovingAccess,
|
|
82
|
+
F.uploadBatchState
|
|
83
|
+
]), W = h((e, t) => {
|
|
84
|
+
let n = I.onCreateFolderValidate(e, t);
|
|
85
|
+
return n ? M(n) : null;
|
|
86
|
+
}, [I, M]), G = h((e, t) => {
|
|
87
|
+
let n = I.onRenameValidate(e, t);
|
|
88
|
+
return n ? M(n, t) : null;
|
|
89
|
+
}, [I, M]);
|
|
89
90
|
return {
|
|
90
|
-
items:
|
|
91
|
-
isLoading:
|
|
92
|
-
error:
|
|
93
|
-
path:
|
|
94
|
-
onPathChange:
|
|
95
|
-
retry:
|
|
96
|
-
onSearchFiles:
|
|
97
|
-
isSearching:
|
|
98
|
-
searchResults:
|
|
99
|
-
clearSearchResults:
|
|
100
|
-
expandedPaths:
|
|
101
|
-
loadedPaths:
|
|
102
|
-
onExpandedPathsChange:
|
|
103
|
-
onFolderPopupPathChange:
|
|
104
|
-
folderPopupLoadingPaths:
|
|
105
|
-
onUploadFiles:
|
|
106
|
-
onUploadArchive:
|
|
107
|
-
onValidateUpload:
|
|
108
|
-
uploadBatchState:
|
|
109
|
-
cancelUpload:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
91
|
+
items: P.items,
|
|
92
|
+
isLoading: P.isLoading,
|
|
93
|
+
error: P.error,
|
|
94
|
+
path: P.path,
|
|
95
|
+
onPathChange: P.onPathChange,
|
|
96
|
+
retry: P.retry,
|
|
97
|
+
onSearchFiles: P.onSearchFiles,
|
|
98
|
+
isSearching: P.isSearching,
|
|
99
|
+
searchResults: P.searchResults,
|
|
100
|
+
clearSearchResults: P.clearSearchResults,
|
|
101
|
+
expandedPaths: P.expandedPaths,
|
|
102
|
+
loadedPaths: P.loadedPaths,
|
|
103
|
+
onExpandedPathsChange: P.onExpandedPathsChange,
|
|
104
|
+
onFolderPopupPathChange: P.onFolderPopupPathChange,
|
|
105
|
+
folderPopupLoadingPaths: P.folderPopupLoadingPaths,
|
|
106
|
+
onUploadFiles: F.onUploadFiles,
|
|
107
|
+
onUploadArchive: F.onUploadArchive,
|
|
108
|
+
onValidateUpload: F.onValidateUpload,
|
|
109
|
+
uploadBatchState: F.uploadBatchState,
|
|
110
|
+
cancelUpload: F.cancelUpload,
|
|
111
|
+
cancelUploadFile: F.cancelUploadFile,
|
|
112
|
+
clearUploadBatch: F.clearUploadBatch,
|
|
113
|
+
onCreateFolder: I.onCreateFolder,
|
|
114
|
+
onCreateFolderValidate: W,
|
|
115
|
+
isCreatingFolder: I.isCreatingFolder,
|
|
116
|
+
onDownloadFiles: I.onDownloadFiles,
|
|
117
|
+
isDownloading: I.isDownloading,
|
|
118
|
+
onDeleteFiles: I.onDeleteFiles,
|
|
119
|
+
isDeleting: I.isDeleting,
|
|
120
|
+
onRenameValidate: G,
|
|
121
|
+
onMoveToFiles: I.onMoveToFiles,
|
|
122
|
+
isRenaming: I.isRenaming,
|
|
123
|
+
onCopyFiles: I.onCopyFiles,
|
|
124
|
+
isCopying: I.isCopying,
|
|
125
|
+
isMoving: I.isMoving,
|
|
126
|
+
cancelCopyMove: I.cancelCopyMove,
|
|
127
|
+
uploadEnabled: B,
|
|
128
|
+
isNewButtonDisabled: !B,
|
|
129
|
+
disabledNewButtonTooltip: A,
|
|
130
|
+
visibleColumns: V,
|
|
131
|
+
dateLocale: k,
|
|
130
132
|
dateOptions: n,
|
|
131
|
-
actionLabels:
|
|
132
|
-
sharedWithMeIds:
|
|
133
|
-
sharedByMePaths:
|
|
134
|
-
onUnshareFiles:
|
|
135
|
-
isUnsharing:
|
|
136
|
-
onRemoveFilesAccess:
|
|
137
|
-
isRemovingAccess:
|
|
138
|
-
fileMetadata:
|
|
139
|
-
isFileMetadataLoading:
|
|
140
|
-
onGetInfo:
|
|
141
|
-
clearMetadata:
|
|
142
|
-
isAnyOperationInProgress:
|
|
133
|
+
actionLabels: H,
|
|
134
|
+
sharedWithMeIds: P.sharedWithMeIds,
|
|
135
|
+
sharedByMePaths: P.sharedByMePaths,
|
|
136
|
+
onUnshareFiles: L.onUnshareFiles,
|
|
137
|
+
isUnsharing: L.isUnsharing,
|
|
138
|
+
onRemoveFilesAccess: L.onRemoveFilesAccess,
|
|
139
|
+
isRemovingAccess: L.isRemovingAccess,
|
|
140
|
+
fileMetadata: R.fileMetadata,
|
|
141
|
+
isFileMetadataLoading: R.isFileMetadataLoading,
|
|
142
|
+
onGetInfo: R.onGetInfo,
|
|
143
|
+
clearMetadata: R.clearMetadata,
|
|
144
|
+
isAnyOperationInProgress: U
|
|
143
145
|
};
|
|
144
146
|
};
|
|
145
147
|
//#endregion
|
|
146
|
-
export {
|
|
148
|
+
export { y as useDialFileManager };
|
|
@@ -6,19 +6,18 @@ import { prepareCopyItems as f, prepareMoveRenameItems as p } from "../dial-file
|
|
|
6
6
|
import { findFirstSuccessfulCopyMoveItem as m } from "../dial-file-manager-mapping.util.js";
|
|
7
7
|
import { DownloadDestinationType as h } from "../download-destination.js";
|
|
8
8
|
import { useCallback as g, useRef as _, useState as v } from "react";
|
|
9
|
-
import { ArchiveItemDtoNodeTypeEnum as y,
|
|
9
|
+
import { ArchiveItemDtoNodeTypeEnum as y, CopyItemDtoNodeTypeEnum as b, DeleteItemDtoNodeTypeEnum as x, MoveItemDtoNodeTypeEnum as ee, RenameItemDtoNodeTypeEnum as te } from "@epam/ai-dial-chat-api-client";
|
|
10
10
|
import { NOT_ALLOWED_SYMBOLS as S, NotificationVariant as C } from "@epam/ai-dial-ui-kit";
|
|
11
11
|
import { DialFileManagerTabs as w, DialFileNodeType as T } from "@epam/ai-dial-react-file-manager";
|
|
12
12
|
//#region src/files/useDialFileMutations/useDialFileMutations.ts
|
|
13
13
|
var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, currentFolder: j, sharedRootMetaRef: M, listingPermissionsCache: N, invalidateFolders: P, bumpRetry: F, mergeCreatedFolder: I, setFolderPath: L, onNotification: R, onOperationSuccess: z, downloadDestination: B, forbiddenSymbolsRegExp: V }) => {
|
|
14
|
-
let [
|
|
14
|
+
let [ne, H] = v(!1), [re, U] = v(!1), [ie, W] = v(!1), [G, K] = v(!1), [q, J] = v(!1), [Y, X] = v(!1), Z = _(null), Q = _(null), $ = g((e, n) => {
|
|
15
15
|
let i = null;
|
|
16
16
|
if (!e || e.trim() === "") i = { reason: t.Empty };
|
|
17
17
|
else if (o(e, V)) i = {
|
|
18
18
|
reason: t.ForbiddenSymbols,
|
|
19
19
|
symbols: S
|
|
20
20
|
};
|
|
21
|
-
else if (e.startsWith(".")) i = { reason: t.LeadingDot };
|
|
22
21
|
else if (e === r) i = { reason: t.ReservedName };
|
|
23
22
|
else if (e.length > 255) i = {
|
|
24
23
|
reason: t.TooLong,
|
|
@@ -32,7 +31,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
33
|
return Q.current = i, i;
|
|
35
|
-
}, [V]),
|
|
34
|
+
}, [V]), ae = g(async (t, r, i) => {
|
|
36
35
|
let { parentVirtualPath: a, name: o } = s(r, O), l = d(a, O), u = j && A === l ? j : {
|
|
37
36
|
id: l,
|
|
38
37
|
path: l,
|
|
@@ -78,7 +77,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
78
77
|
z,
|
|
79
78
|
M,
|
|
80
79
|
R
|
|
81
|
-
]),
|
|
80
|
+
]), oe = g((t) => {
|
|
82
81
|
(async () => {
|
|
83
82
|
U(!0);
|
|
84
83
|
try {
|
|
@@ -128,7 +127,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
128
127
|
R,
|
|
129
128
|
E,
|
|
130
129
|
B
|
|
131
|
-
]),
|
|
130
|
+
]), se = g((t, n) => {
|
|
132
131
|
t.length !== 0 && (async () => {
|
|
133
132
|
W(!0);
|
|
134
133
|
let r = t.map((e) => {
|
|
@@ -140,7 +139,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
140
139
|
bucket: o,
|
|
141
140
|
path: s,
|
|
142
141
|
name: i,
|
|
143
|
-
nodeType: t ?
|
|
142
|
+
nodeType: t ? x.Folder : x.Item
|
|
144
143
|
};
|
|
145
144
|
});
|
|
146
145
|
try {
|
|
@@ -166,9 +165,9 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
166
165
|
reason: e.DeleteFailed
|
|
167
166
|
});
|
|
168
167
|
}
|
|
169
|
-
let i = r.filter((e) => e.nodeType ===
|
|
168
|
+
let i = r.filter((e) => e.nodeType === x.Folder).map((e) => e.path.endsWith("/") ? e.path : `${e.path}/`);
|
|
170
169
|
P([...new Set(r.map((e) => {
|
|
171
|
-
if (e.nodeType ===
|
|
170
|
+
if (e.nodeType === x.Folder) return e.path.endsWith("/") ? e.path : `${e.path}/`;
|
|
172
171
|
let t = e.path.lastIndexOf("/");
|
|
173
172
|
return t > 0 ? e.path.slice(0, t + 1) : "";
|
|
174
173
|
}))]), i.some((e) => A === e || A.startsWith(e)) && L((e) => e.replace(/[^/]+\/$/, "")), F(), W(!1);
|
|
@@ -184,7 +183,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
184
183
|
P,
|
|
185
184
|
F,
|
|
186
185
|
L
|
|
187
|
-
]),
|
|
186
|
+
]), ce = g((e, n) => {
|
|
188
187
|
if (!e || e.trim() === "") return { reason: t.Empty };
|
|
189
188
|
if (e === r) return { reason: t.ReservedName };
|
|
190
189
|
if (o(e, V)) return {
|
|
@@ -200,20 +199,21 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
200
199
|
reason: t.DuplicateName,
|
|
201
200
|
existingName: s.name
|
|
202
201
|
} : null;
|
|
203
|
-
}, [V, j]),
|
|
202
|
+
}, [V, j]), le = g((t, r) => {
|
|
204
203
|
if (t.length === 0 || q || Y) return;
|
|
205
204
|
let a = new AbortController();
|
|
206
205
|
Z.current = a, (async () => {
|
|
207
206
|
J(!0);
|
|
208
207
|
let o = f(t, D, O), s = o.map(({ dto: e }) => e);
|
|
209
208
|
try {
|
|
210
|
-
let { results: t } = await E.copyFiles(s, a.signal), c = t.filter((e) => !e.success).length,
|
|
211
|
-
if (
|
|
212
|
-
let e = m(o, t);
|
|
213
|
-
z?.({
|
|
214
|
-
kind:
|
|
209
|
+
let { results: t } = await E.copyFiles(s, a.signal), c = t.filter((e) => !e.success).length, u = t.length - c;
|
|
210
|
+
if (u > 0) {
|
|
211
|
+
let e = m(o, t), a = s.every((e) => l(e.sourcePath) === l(e.destinationPath)), c;
|
|
212
|
+
c = a ? u === 1 ? n.FileDuplicated : n.FilesDuplicated : u === 1 ? n.FileCopied : n.FilesCopied, z?.({
|
|
213
|
+
kind: c,
|
|
215
214
|
name: e?.destinationName,
|
|
216
|
-
count:
|
|
215
|
+
count: u,
|
|
216
|
+
isFolder: e?.dto.nodeType === b.Folder,
|
|
217
217
|
destinationFolderName: i(r, O)
|
|
218
218
|
});
|
|
219
219
|
}
|
|
@@ -244,21 +244,21 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
244
244
|
Y,
|
|
245
245
|
P,
|
|
246
246
|
F
|
|
247
|
-
]),
|
|
247
|
+
]), ue = g(() => {
|
|
248
248
|
Z.current?.abort();
|
|
249
249
|
}, []);
|
|
250
250
|
return {
|
|
251
|
-
isCreatingFolder:
|
|
252
|
-
isDownloading:
|
|
253
|
-
isDeleting:
|
|
251
|
+
isCreatingFolder: ne,
|
|
252
|
+
isDownloading: re,
|
|
253
|
+
isDeleting: ie,
|
|
254
254
|
isRenaming: G,
|
|
255
255
|
isCopying: q,
|
|
256
256
|
isMoving: Y,
|
|
257
|
-
onCreateFolder:
|
|
257
|
+
onCreateFolder: ae,
|
|
258
258
|
onCreateFolderValidate: $,
|
|
259
|
-
onDownloadFiles:
|
|
260
|
-
onDeleteFiles:
|
|
261
|
-
onRenameValidate:
|
|
259
|
+
onDownloadFiles: oe,
|
|
260
|
+
onDeleteFiles: se,
|
|
261
|
+
onRenameValidate: ce,
|
|
262
262
|
onMoveToFiles: g((t, r, o) => {
|
|
263
263
|
if (t.length === 0 || q || Y || G) return;
|
|
264
264
|
let { renameDtos: s, preparedMoveItems: c } = p(t, D, O), u = c.map(({ dto: e }) => e), d = new AbortController();
|
|
@@ -308,6 +308,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
308
308
|
kind: _ === 1 ? n.FileMoved : n.FilesMoved,
|
|
309
309
|
name: e?.destinationName,
|
|
310
310
|
count: _,
|
|
311
|
+
isFolder: e?.dto.nodeType === ee.Folder,
|
|
311
312
|
destinationFolderName: i(o, O)
|
|
312
313
|
});
|
|
313
314
|
}
|
|
@@ -316,7 +317,7 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
316
317
|
z?.({
|
|
317
318
|
kind: n.FileRenamed,
|
|
318
319
|
name: a(e.destinationPath, e.destinationPath),
|
|
319
|
-
isFolder: e.nodeType ===
|
|
320
|
+
isFolder: e.nodeType === te.Folder
|
|
320
321
|
});
|
|
321
322
|
}
|
|
322
323
|
y > 0 && (y === v ? R?.({
|
|
@@ -327,11 +328,11 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
327
328
|
reason: b ? e.MovePartiallyFailed : e.RenamePartiallyFailed,
|
|
328
329
|
count: y
|
|
329
330
|
}));
|
|
330
|
-
let
|
|
331
|
-
if (
|
|
332
|
-
let e =
|
|
331
|
+
let x = s.find((e) => e.nodeType === te.Folder && t.results.some((t) => t.success && t.sourcePath === e.sourcePath));
|
|
332
|
+
if (x != null) {
|
|
333
|
+
let e = x.sourcePath.endsWith("/") ? x.sourcePath : `${x.sourcePath}/`;
|
|
333
334
|
if (A === e || A.startsWith(e)) {
|
|
334
|
-
let t =
|
|
335
|
+
let t = x.destinationPath.endsWith("/") ? x.destinationPath : `${x.destinationPath}/`;
|
|
335
336
|
L(A.replace(e, t));
|
|
336
337
|
}
|
|
337
338
|
}
|
|
@@ -351,8 +352,8 @@ var E = ({ filesApi: E, bucket: D, rootLabel: O, activeTab: k, folderPath: A, cu
|
|
|
351
352
|
F,
|
|
352
353
|
L
|
|
353
354
|
]),
|
|
354
|
-
onCopyFiles:
|
|
355
|
-
cancelCopyMove:
|
|
355
|
+
onCopyFiles: le,
|
|
356
|
+
cancelCopyMove: ue
|
|
356
357
|
};
|
|
357
358
|
};
|
|
358
359
|
//#endregion
|