@epam/ai-dial-chat-shared 1.2.0-dev.98 → 1.2.0-rc.0
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/components/ConfirmationDialog/ConfirmationDialog.js +34 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.js +21 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +6 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +24 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -0
- package/components/ConfirmationView/ConfirmationFooter.js +42 -0
- package/components/ConfirmationView/ConfirmationView.js +39 -0
- package/components/ConfirmationView/ConfirmationView.module.scss.js +7 -0
- package/components/CopyButton/CopyButton.js +5 -5
- package/components/EntityHeader/EntityHeader.js +14 -13
- package/components/EntityTypeLabel/EntityTypeLabel.js +2 -2
- package/components/FeaturedChip/FeaturedChip.js +9 -14
- package/components/InitialsAvatar/InitialsAvatar.js +10 -27
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -64
- package/components/MarkdownRenderer/MDMessageViewer.js +25 -17
- package/components/MarkdownRenderer/MarkdownRenderer.js +119 -118
- package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +7 -7
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +2 -2
- package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +62 -65
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
- package/components/MarkdownRenderer/Table/TableHeader.js +18 -21
- package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +3 -2
- package/components/PanelEmptyState/PanelEmptyState.js +2 -1
- package/components/TextRefinementField/TextRefinementField.js +86 -0
- package/constants/dial.js +2 -2
- package/constants/resizable-fields.js +2 -2
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +248 -236
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +17 -14
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +17 -20
- package/file-manager/upload-batch.js +2 -2
- package/file-manager/upload-queue.js +17 -0
- package/file-manager.d.ts +25 -14
- package/file-manager.js +4 -3
- package/hooks/useTextRefinement.js +66 -0
- package/hooks/useUnsavedChangesGuard.js +30 -0
- package/index.css +2 -2
- package/index.d.ts +510 -46
- package/index.js +73 -62
- package/markdown.d.ts +64 -8
- package/markdown.js +5 -4
- package/models/chat.js +4 -2
- package/package.json +5 -5
- package/utils/entity-field-limits.js +4 -0
- package/utils/entity-type.js +15 -0
- package/utils/format-price.js +13 -9
- package/utils/is-skill-selection-unsupported.js +4 -0
- package/utils/syntax-highlighting.js +13 -0
- package/components/InitialsAvatar/InitialsAvatar.module.scss.js +0 -6
- package/file-manager/UploadProgressModal/UploadProgressModal.js +0 -50
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeClasses as e } from "../../utils/merge-class.js";
|
|
2
|
+
import { DialFileManagerActionProfile as t, DialFileManagerVariant as n } from "../file-manager-variant.js";
|
|
2
3
|
import { getParentFolderPath as ee } from "../path.js";
|
|
3
|
-
import { FileUploadStatus as n } from "../upload-batch.js";
|
|
4
4
|
import { useGridEditingScroll as te } from "../useGridEditingScroll/useGridEditingScroll.js";
|
|
5
5
|
import { OperationLoaderModal as ne } from "../OperationLoaderModal/OperationLoaderModal.js";
|
|
6
|
-
import {
|
|
7
|
-
import { NOT_ALLOWED_SYMBOLS_REGEXP as ie, PrimaryButton as
|
|
8
|
-
import { memo as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { DialFileManager as
|
|
6
|
+
import { toUploadQueueItems as re } from "../upload-queue.js";
|
|
7
|
+
import { NOT_ALLOWED_SYMBOLS_REGEXP as ie, PrimaryButton as ae, Spinner as oe, TransferQueue as se } from "@epam/ai-dial-ui-kit";
|
|
8
|
+
import { memo as r, useCallback as ce, useEffect as le, useMemo as i, useState as ue } from "react";
|
|
9
|
+
import { Fragment as de, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
10
|
+
import { DialFileManager as fe, DialFileManagerActions as s, DialFileManagerTabs as c, GridSelectionMode as pe } from "@epam/ai-dial-react-file-manager";
|
|
11
11
|
//#region src/file-manager/DialFileManagerShell/DialFileManagerShell.tsx
|
|
12
|
-
var
|
|
12
|
+
var me = (e, t) => {
|
|
13
13
|
if (e.isDownloading) return t.downloadingLabel;
|
|
14
14
|
if (e.isDeleting) return t.deletingLabel;
|
|
15
15
|
if (e.isRenaming && !e.isMoving) return t.renamingLabel;
|
|
16
16
|
if (e.isUnsharing) return t.unsharingLabel;
|
|
17
17
|
if (e.isRemovingAccess) return t.removingAccessLabel;
|
|
18
|
-
},
|
|
19
|
-
let { items:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [
|
|
23
|
-
let
|
|
18
|
+
}, l = ({ controller: r, labels: l, activeTab: u, tabs: d, onTabChange: f, selectedPaths: p, onSelectedPathsChange: he, variant: m, actionProfile: ge, autoSelectUploadedItems: _e = !1, allowedFileTypes: ve, maxSelectableFileSize: h, oversizedUploadMessage: g, isRowSelectable: _, getDisabledTooltip: ye, unsupportedFileTypeTooltip: be }) => {
|
|
19
|
+
let { items: xe, isLoading: Se, error: Ce, path: v, onPathChange: we, retry: Te, onSearchFiles: Ee, isSearching: De, searchResults: Oe, clearSearchResults: ke, expandedPaths: y, loadedPaths: b, onExpandedPathsChange: x, onFolderPopupPathChange: Ae, folderPopupLoadingPaths: S, onUploadFiles: C, onUploadArchive: je, onValidateUpload: Me, uploadBatchState: w, cancelUpload: T, cancelUploadFile: Ne, clearUploadBatch: E, onCreateFolder: Pe, onCreateFolderValidate: Fe, onDownloadFiles: D, isDownloading: Ie, onDeleteFiles: Le, isDeleting: Re, onMoveToFiles: ze, onRenameValidate: Be, isRenaming: Ve, onCopyFiles: He, isCopying: Ue, isMoving: O, cancelCopyMove: We, uploadEnabled: k, isNewButtonDisabled: A, disabledNewButtonTooltip: j, visibleColumns: M, dateLocale: N, dateOptions: P, actionLabels: F, sharedWithMeIds: Ge, sharedByMePaths: I, onUnshareFiles: Ke, isUnsharing: qe, onRemoveFilesAccess: Je, isRemovingAccess: Ye, fileMetadata: L, isFileMetadataLoading: R, onGetInfo: Xe, clearMetadata: z, sectionTab: Ze } = r, B = Ze ?? u, [V, Qe] = ue(void 0), { handleGridApiChange: $e, reset: H } = te();
|
|
20
|
+
le(() => {
|
|
21
|
+
H();
|
|
22
|
+
}, [B, H]);
|
|
23
|
+
let U = i(() => {
|
|
24
24
|
let e = {};
|
|
25
|
-
return
|
|
25
|
+
return s.Download in F && (e[s.Download] = l.downloadLabel), s.Delete in F && (e[s.Delete] = l.deleteLabel), s.Rename in F && (e[s.Rename] = l.renameLabel), s.Copy in F && (e[s.Copy] = l.copyLabel), s.Move in F && (e[s.Move] = l.moveLabel), s.Duplicate in F && (e[s.Duplicate] = l.duplicateLabel), s.Unshare in F && (e[s.Unshare] = l.unshareLabel), s.RemoveAccess in F && (e[s.RemoveAccess] = l.removeAccessLabel), e;
|
|
26
26
|
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
]),
|
|
37
|
-
...
|
|
38
|
-
[
|
|
39
|
-
} :
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
]),
|
|
44
|
-
if (
|
|
45
|
-
for (let e of
|
|
27
|
+
F,
|
|
28
|
+
l.downloadLabel,
|
|
29
|
+
l.deleteLabel,
|
|
30
|
+
l.renameLabel,
|
|
31
|
+
l.copyLabel,
|
|
32
|
+
l.moveLabel,
|
|
33
|
+
l.duplicateLabel,
|
|
34
|
+
l.unshareLabel,
|
|
35
|
+
l.removeAccessLabel
|
|
36
|
+
]), W = i(() => s.Info in F ? {
|
|
37
|
+
...U,
|
|
38
|
+
[s.Info]: l.infoLabel
|
|
39
|
+
} : U, [
|
|
40
|
+
U,
|
|
41
|
+
F,
|
|
42
|
+
l.infoLabel
|
|
43
|
+
]), G = i(() => {
|
|
44
|
+
if (p.size === 0) return !1;
|
|
45
|
+
for (let e of p) if (!I.has(e)) return !1;
|
|
46
46
|
return !0;
|
|
47
|
-
}, [
|
|
48
|
-
if (
|
|
49
|
-
let { [
|
|
47
|
+
}, [p, I]), K = i(() => {
|
|
48
|
+
if (G) return U;
|
|
49
|
+
let { [s.RemoveAccess]: e, ...t } = U;
|
|
50
50
|
return t;
|
|
51
|
-
}, [
|
|
52
|
-
selectionMode:
|
|
53
|
-
visibleColumns:
|
|
54
|
-
dateLocale:
|
|
55
|
-
dateOptions:
|
|
51
|
+
}, [U, G]), et = i(() => ({
|
|
52
|
+
selectionMode: pe.MULTIPLE,
|
|
53
|
+
visibleColumns: M,
|
|
54
|
+
dateLocale: N,
|
|
55
|
+
dateOptions: P,
|
|
56
56
|
additionalGridOptions: {
|
|
57
57
|
domLayout: "normal",
|
|
58
58
|
rowSelection: {
|
|
@@ -60,241 +60,253 @@ var l = (e, t) => {
|
|
|
60
60
|
isRowSelectable: _ ?? (() => !0)
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
-
actionLabels:
|
|
63
|
+
actionLabels: W
|
|
64
64
|
}), [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
M,
|
|
66
|
+
N,
|
|
67
|
+
P,
|
|
68
|
+
W,
|
|
69
69
|
_
|
|
70
|
-
]),
|
|
71
|
-
header:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
]), tt = i(() => ({
|
|
71
|
+
header: m === n.Attach ? null : l.treeHeaderByTab[u],
|
|
72
|
+
containerClassName: m === n.Attach ? "min-h-0 h-full w-[360px] shrink-0 rounded-xl bg-layer-raised shadow-sm" : void 0,
|
|
73
|
+
tabsAriaLabel: l.treeHeaderByTab[u],
|
|
74
|
+
tabs: d,
|
|
75
|
+
activeTab: u,
|
|
76
|
+
onTabChange: f,
|
|
77
|
+
expandedPaths: y,
|
|
78
|
+
loadedPaths: b,
|
|
79
|
+
loadingPaths: S,
|
|
80
|
+
onExpandedPathsChange: x,
|
|
81
|
+
actionLabels: U
|
|
80
82
|
}), [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
l.treeHeaderByTab,
|
|
84
|
+
m,
|
|
83
85
|
d,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
u,
|
|
87
|
+
f,
|
|
88
|
+
y,
|
|
89
|
+
b,
|
|
86
90
|
S,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
]), Y = pe === t.Standalone && me === e.Full && d === ue.MyFiles && M, Ye = a(() => ({
|
|
91
|
+
x,
|
|
92
|
+
U
|
|
93
|
+
]), q = m === n.Standalone && ge === t.Full && B === c.MyFiles && k, nt = i(() => ({
|
|
91
94
|
showHiddenFilesToggle: !0,
|
|
92
|
-
hiddenFilesSwitcherLabel:
|
|
93
|
-
showHiddenFilesLabel:
|
|
94
|
-
hideHiddenFilesLabel:
|
|
95
|
-
isNewButtonDisabled:
|
|
96
|
-
disabledNewButtonTooltip:
|
|
95
|
+
hiddenFilesSwitcherLabel: l.hiddenFilesLabel,
|
|
96
|
+
showHiddenFilesLabel: l.showHiddenFilesLabel,
|
|
97
|
+
hideHiddenFilesLabel: l.hideHiddenFilesLabel,
|
|
98
|
+
isNewButtonDisabled: A,
|
|
99
|
+
disabledNewButtonTooltip: j,
|
|
97
100
|
newActions: {
|
|
98
|
-
uploadFiles: {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
uploadFiles: {
|
|
102
|
+
label: l.uploadFilesLabel,
|
|
103
|
+
icon: null
|
|
104
|
+
},
|
|
105
|
+
newFolder: {
|
|
106
|
+
label: l.newFolderLabel,
|
|
107
|
+
icon: null
|
|
108
|
+
},
|
|
109
|
+
...q ? { uploadArchive: {
|
|
110
|
+
label: l.uploadArchiveAction,
|
|
111
|
+
icon: null
|
|
112
|
+
} } : {}
|
|
101
113
|
}
|
|
102
114
|
}), [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
]),
|
|
113
|
-
getSelectionLabel:
|
|
114
|
-
actionLabels:
|
|
115
|
-
}), [
|
|
116
|
-
cancelLabel:
|
|
117
|
-
confirmLabel:
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
l.hiddenFilesLabel,
|
|
116
|
+
l.showHiddenFilesLabel,
|
|
117
|
+
l.hideHiddenFilesLabel,
|
|
118
|
+
A,
|
|
119
|
+
j,
|
|
120
|
+
l.uploadFilesLabel,
|
|
121
|
+
l.newFolderLabel,
|
|
122
|
+
q,
|
|
123
|
+
l.uploadArchiveAction
|
|
124
|
+
]), rt = i(() => ({
|
|
125
|
+
getSelectionLabel: l.getSelectionLabel,
|
|
126
|
+
actionLabels: K
|
|
127
|
+
}), [l.getSelectionLabel, K]), it = i(() => ({
|
|
128
|
+
cancelLabel: l.deleteCancelLabel,
|
|
129
|
+
confirmLabel: l.deleteConfirmLabel,
|
|
130
|
+
closeLabel: l.deleteCloseLabel,
|
|
131
|
+
titleRenderer: l.deleteConfirmTitle,
|
|
132
|
+
contentRenderer: l.deleteConfirmBody
|
|
120
133
|
}), [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
134
|
+
l.deleteCancelLabel,
|
|
135
|
+
l.deleteConfirmLabel,
|
|
136
|
+
l.deleteCloseLabel,
|
|
137
|
+
l.deleteConfirmTitle,
|
|
138
|
+
l.deleteConfirmBody
|
|
139
|
+
]), at = i(() => {
|
|
126
140
|
let e;
|
|
127
|
-
for (let t of
|
|
141
|
+
for (let t of p) {
|
|
128
142
|
let n = ee(t);
|
|
129
143
|
if (e === void 0) e = n;
|
|
130
144
|
else if (e !== n) return;
|
|
131
145
|
}
|
|
132
146
|
return e;
|
|
133
|
-
}, [
|
|
134
|
-
copyLabel:
|
|
135
|
-
moveLabel:
|
|
136
|
-
addFolderLabel:
|
|
137
|
-
hiddenFilesSwitcherLabel:
|
|
138
|
-
getCopyHeader:
|
|
139
|
-
getMoveHeader:
|
|
140
|
-
disabledPathTooltip:
|
|
141
|
-
emptyStateTitle:
|
|
142
|
-
emptyStateDescription:
|
|
143
|
-
sourceFolder:
|
|
144
|
-
destinationFolderPath:
|
|
145
|
-
setDestinationFolderPath:
|
|
146
|
-
filesLoading:
|
|
147
|
+
}, [p]), J = V != null && S.has(V), Y = J ? V : at, ot = i(() => ({
|
|
148
|
+
copyLabel: l.copyLabel,
|
|
149
|
+
moveLabel: l.moveLabel,
|
|
150
|
+
addFolderLabel: l.addFolderLabel,
|
|
151
|
+
hiddenFilesSwitcherLabel: l.hiddenFilesSwitcherLabel,
|
|
152
|
+
getCopyHeader: l.getCopyHeader,
|
|
153
|
+
getMoveHeader: l.getMoveHeader,
|
|
154
|
+
disabledPathTooltip: J ? l.folderPickerLoadingTooltip : l.moveSourceDisabledTooltip,
|
|
155
|
+
emptyStateTitle: l.folderPickerEmptyStateTitle,
|
|
156
|
+
emptyStateDescription: l.folderPickerEmptyStateDescription,
|
|
157
|
+
sourceFolder: Y,
|
|
158
|
+
destinationFolderPath: V,
|
|
159
|
+
setDestinationFolderPath: Qe,
|
|
160
|
+
filesLoading: J
|
|
147
161
|
}), [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
]),
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
fileMetadata:
|
|
165
|
-
loading:
|
|
166
|
-
clearMetadata:
|
|
167
|
-
header:
|
|
168
|
-
nameLabel:
|
|
169
|
-
pathLabel:
|
|
170
|
-
modifiedDateLabel:
|
|
171
|
-
sizeLabel:
|
|
172
|
-
authorLabel:
|
|
162
|
+
l.copyLabel,
|
|
163
|
+
l.moveLabel,
|
|
164
|
+
l.addFolderLabel,
|
|
165
|
+
l.hiddenFilesSwitcherLabel,
|
|
166
|
+
l.getCopyHeader,
|
|
167
|
+
l.getMoveHeader,
|
|
168
|
+
l.folderPickerLoadingTooltip,
|
|
169
|
+
l.moveSourceDisabledTooltip,
|
|
170
|
+
l.folderPickerEmptyStateTitle,
|
|
171
|
+
l.folderPickerEmptyStateDescription,
|
|
172
|
+
J,
|
|
173
|
+
Y,
|
|
174
|
+
V
|
|
175
|
+
]), st = ce(() => {
|
|
176
|
+
T(), E();
|
|
177
|
+
}, [T, E]), X = i(() => re(w?.files ?? []), [w]), ct = i(() => ({
|
|
178
|
+
fileMetadata: L,
|
|
179
|
+
loading: R,
|
|
180
|
+
clearMetadata: z,
|
|
181
|
+
header: l.metadataHeader,
|
|
182
|
+
nameLabel: l.metadataNameLabel,
|
|
183
|
+
pathLabel: l.metadataPathLabel,
|
|
184
|
+
modifiedDateLabel: l.metadataModifiedDateLabel,
|
|
185
|
+
sizeLabel: l.metadataSizeLabel,
|
|
186
|
+
authorLabel: l.metadataAuthorLabel
|
|
173
187
|
}), [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
]),
|
|
184
|
-
isDownloading:
|
|
185
|
-
isDeleting:
|
|
186
|
-
isRenaming:
|
|
187
|
-
isMoving:
|
|
188
|
-
isUnsharing:
|
|
189
|
-
isRemovingAccess:
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
let e = k.files.filter((e) => e.status !== n.Uploading).length;
|
|
193
|
-
return u.getUploadProgressText(e, k.files.length);
|
|
194
|
-
}, [k, u]), $ = a(() => b != null && !y ? {
|
|
195
|
-
title: u.searchEmptyStateTitle,
|
|
196
|
-
description: ""
|
|
197
|
-
} : v.split("/").filter(Boolean).length > 1 ? {
|
|
198
|
-
title: u.folderEmptyStateTitle,
|
|
188
|
+
L,
|
|
189
|
+
R,
|
|
190
|
+
z,
|
|
191
|
+
l.metadataHeader,
|
|
192
|
+
l.metadataNameLabel,
|
|
193
|
+
l.metadataPathLabel,
|
|
194
|
+
l.metadataModifiedDateLabel,
|
|
195
|
+
l.metadataSizeLabel,
|
|
196
|
+
l.metadataAuthorLabel
|
|
197
|
+
]), Z = me({
|
|
198
|
+
isDownloading: Ie,
|
|
199
|
+
isDeleting: Re,
|
|
200
|
+
isRenaming: Ve,
|
|
201
|
+
isMoving: O,
|
|
202
|
+
isUnsharing: qe,
|
|
203
|
+
isRemovingAccess: Ye
|
|
204
|
+
}, l), Q = m === n.Standalone ? "bg-layer-base" : "bg-layer-sunken", $ = i(() => v.split("/").filter(Boolean).length > 1 ? {
|
|
205
|
+
title: l.folderEmptyStateTitle,
|
|
199
206
|
description: ""
|
|
200
|
-
} :
|
|
201
|
-
b,
|
|
202
|
-
y,
|
|
207
|
+
} : l.emptyStateByTab[B], [
|
|
203
208
|
v,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
d
|
|
209
|
+
l.folderEmptyStateTitle,
|
|
210
|
+
l.emptyStateByTab,
|
|
211
|
+
B
|
|
208
212
|
]);
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
|
|
211
|
-
className: "relative flex min-h-0 w-full grow overflow-auto
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
className: "min-h-0 w-full grow
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
return /* @__PURE__ */ o(de, { children: [
|
|
214
|
+
Ce == null ? /* @__PURE__ */ o("div", {
|
|
215
|
+
className: e("relative flex min-h-0 w-full grow overflow-auto", Q),
|
|
216
|
+
children: [/* @__PURE__ */ a(fe, {
|
|
217
|
+
className: e("min-h-0 w-full grow", Q),
|
|
218
|
+
contentClassName: m === n.Attach ? "px-0 pb-0" : void 0,
|
|
219
|
+
gridClassName: m === n.Attach ? "size-full gap-6 px-6 py-4" : "size-full",
|
|
220
|
+
items: xe,
|
|
216
221
|
path: v,
|
|
217
|
-
onPathChange:
|
|
218
|
-
onGridApiChange:
|
|
219
|
-
filesLoading:
|
|
220
|
-
allowedFileTypes:
|
|
222
|
+
onPathChange: we,
|
|
223
|
+
onGridApiChange: $e,
|
|
224
|
+
filesLoading: Se,
|
|
225
|
+
allowedFileTypes: ve,
|
|
221
226
|
maxSelectableFileSize: h,
|
|
222
227
|
maxFileSize: h,
|
|
223
228
|
uploadValidationMessages: g == null ? void 0 : { oversizedFiles: g },
|
|
224
|
-
selectedPaths:
|
|
225
|
-
onSelectedPathsChange:
|
|
226
|
-
navigationPanelOptions: {
|
|
229
|
+
selectedPaths: p,
|
|
230
|
+
onSelectedPathsChange: he,
|
|
231
|
+
navigationPanelOptions: {
|
|
232
|
+
searchable: !0,
|
|
233
|
+
placeholder: l.searchPlaceholderByTab?.[B]
|
|
234
|
+
},
|
|
227
235
|
hideSearchPathItemName: !0,
|
|
228
|
-
onSearchFiles:
|
|
229
|
-
searchInProgress:
|
|
230
|
-
searchResults:
|
|
231
|
-
clearSearchResults:
|
|
232
|
-
gridOptions:
|
|
233
|
-
treeOptions:
|
|
234
|
-
onFolderPopupPathChange:
|
|
235
|
-
toolbarOptions:
|
|
236
|
-
bulkActionsToolbarOptions:
|
|
237
|
-
autoSelectUploadedItems:
|
|
236
|
+
onSearchFiles: Ee,
|
|
237
|
+
searchInProgress: De,
|
|
238
|
+
searchResults: Oe ?? [],
|
|
239
|
+
clearSearchResults: ke,
|
|
240
|
+
gridOptions: et,
|
|
241
|
+
treeOptions: tt,
|
|
242
|
+
onFolderPopupPathChange: Ae,
|
|
243
|
+
toolbarOptions: nt,
|
|
244
|
+
bulkActionsToolbarOptions: rt,
|
|
245
|
+
autoSelectUploadedItems: _e,
|
|
238
246
|
emptyStateTitle: $.title,
|
|
239
247
|
emptyStateDescription: $.description,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
248
|
+
searchEmptyStateTitle: l.searchEmptyStateTitle,
|
|
249
|
+
uploadEnabled: k,
|
|
250
|
+
sharedWithMeIds: Ge,
|
|
251
|
+
sharedByMePaths: I,
|
|
252
|
+
onUnshareFiles: Ke,
|
|
253
|
+
onRemoveFilesAccess: Je,
|
|
254
|
+
fileMetadataPopupOptions: ct,
|
|
255
|
+
onGetInfo: Xe,
|
|
256
|
+
onUploadFiles: C,
|
|
257
|
+
onUploadArchive: je,
|
|
258
|
+
onValidateUpload: Me,
|
|
259
|
+
onCreateFolder: Pe,
|
|
260
|
+
onCreateFolderValidate: Fe,
|
|
261
|
+
onDownloadFiles: D,
|
|
262
|
+
onDeleteFiles: Le,
|
|
263
|
+
onMoveToFiles: ze,
|
|
264
|
+
onCopyFiles: He,
|
|
265
|
+
onRenameValidate: Be,
|
|
266
|
+
renameValidationMessages: l.renameValidationMessages,
|
|
267
|
+
isRenameFileAvailable: k,
|
|
268
|
+
deleteConfirmationOptions: it,
|
|
269
|
+
conflictResolutionPopupOptions: l.conflictResolutionPopupOptions,
|
|
270
|
+
destinationFolderPopupOptions: ot,
|
|
262
271
|
forbiddenSymbolsRegExp: ie,
|
|
263
|
-
forbiddenSymbolsTooltip:
|
|
264
|
-
getDisabledTooltip:
|
|
265
|
-
unsupportedFileTypeTooltip:
|
|
266
|
-
}),
|
|
272
|
+
forbiddenSymbolsTooltip: l.forbiddenSymbolsTooltip,
|
|
273
|
+
getDisabledTooltip: ye,
|
|
274
|
+
unsupportedFileTypeTooltip: be
|
|
275
|
+
}), Z != null && /* @__PURE__ */ a("div", {
|
|
267
276
|
"aria-live": "polite",
|
|
268
277
|
className: "absolute inset-0 z-[52] flex items-center justify-center bg-backdrop desktop:p-4",
|
|
269
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ a(oe, {
|
|
270
279
|
size: 32,
|
|
271
280
|
fullWidth: !1,
|
|
272
|
-
ariaLabel:
|
|
281
|
+
ariaLabel: Z
|
|
273
282
|
})
|
|
274
283
|
})]
|
|
275
|
-
}) : /* @__PURE__ */
|
|
284
|
+
}) : /* @__PURE__ */ o("div", {
|
|
276
285
|
role: "alert",
|
|
277
286
|
className: "flex flex-col items-center gap-4 p-6",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
279
|
-
label:
|
|
280
|
-
onClick:
|
|
287
|
+
children: [/* @__PURE__ */ a("p", { children: l.errorMessage }), /* @__PURE__ */ a(ae, {
|
|
288
|
+
label: l.retryLabel,
|
|
289
|
+
onClick: Te
|
|
281
290
|
})]
|
|
282
291
|
}),
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
/* @__PURE__ */ a("div", {
|
|
293
|
+
className: "fixed bottom-4 end-4 z-[70]",
|
|
294
|
+
children: /* @__PURE__ */ a(se, {
|
|
295
|
+
title: l.getUploadQueueTitle(X.length),
|
|
296
|
+
items: X,
|
|
297
|
+
onClose: st,
|
|
298
|
+
onCancelItem: Ne,
|
|
299
|
+
labels: l.uploadQueueLabels
|
|
300
|
+
})
|
|
289
301
|
}),
|
|
290
|
-
(
|
|
291
|
-
title:
|
|
292
|
-
text:
|
|
293
|
-
cancelLabel:
|
|
294
|
-
onCancel:
|
|
302
|
+
(Ue || O) && /* @__PURE__ */ a(ne, {
|
|
303
|
+
title: O ? l.operationLoaderMoveTitle : l.operationLoaderCopyTitle,
|
|
304
|
+
text: O ? l.movingLabel : l.copyingLabel,
|
|
305
|
+
cancelLabel: l.operationLoaderCancelLabel,
|
|
306
|
+
onCancel: We
|
|
295
307
|
})
|
|
296
308
|
] });
|
|
297
309
|
};
|
|
298
|
-
|
|
310
|
+
r(l);
|
|
299
311
|
//#endregion
|
|
300
|
-
export {
|
|
312
|
+
export { l as DialFileManagerShell };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isHiddenPath as e } from "../path.js";
|
|
2
2
|
import { DialFileManagerShell as t } from "../DialFileManagerShell/DialFileManagerShell.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ButtonVariant as n, Popup as r, PopupSize as i } from "@epam/ai-dial-ui-kit";
|
|
4
4
|
import { memo as a, useCallback as o, useMemo as s } from "react";
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
import { DialFileNodeType as u } from "@epam/ai-dial-react-file-manager";
|
|
@@ -60,27 +60,30 @@ var d = a(({ isOpen: a, onClose: d, onAttach: f, onSkippedUnsupportedFiles: p, o
|
|
|
60
60
|
z,
|
|
61
61
|
T
|
|
62
62
|
]), { title: U, attachLabel: W, headerDescription: G, ...K } = b;
|
|
63
|
-
return /* @__PURE__ */ c(
|
|
63
|
+
return /* @__PURE__ */ c(r, {
|
|
64
64
|
open: a,
|
|
65
|
-
header: /* @__PURE__ */ l("div", {
|
|
66
|
-
className: "flex flex-col gap-1",
|
|
67
|
-
children: [/* @__PURE__ */ c("
|
|
65
|
+
header: G == null ? U : /* @__PURE__ */ l("div", {
|
|
66
|
+
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
67
|
+
children: [/* @__PURE__ */ c("h3", {
|
|
68
|
+
className: "dial-h1-text truncate text-primary",
|
|
69
|
+
children: U
|
|
70
|
+
}), /* @__PURE__ */ c("p", {
|
|
68
71
|
className: "dial-small-text text-start",
|
|
69
72
|
children: G
|
|
70
73
|
})]
|
|
71
74
|
}),
|
|
72
75
|
ariaLabel: U,
|
|
73
|
-
size:
|
|
76
|
+
size: i.Lg,
|
|
74
77
|
className: "flex !h-[min(800px,100dvh)] w-full flex-col !bg-layer-sunken",
|
|
78
|
+
headerClassName: "pb-0",
|
|
79
|
+
footerClassName: "pt-0",
|
|
75
80
|
onClose: d,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
}),
|
|
81
|
+
mainButtons: [{
|
|
82
|
+
label: W,
|
|
83
|
+
variant: n.Primary,
|
|
84
|
+
disabled: B.length === 0 || L || g,
|
|
85
|
+
onClick: H
|
|
86
|
+
}],
|
|
84
87
|
children: /* @__PURE__ */ c("div", {
|
|
85
88
|
className: "flex h-full min-h-0 flex-col",
|
|
86
89
|
children: /* @__PURE__ */ c(t, {
|