@epam/ai-dial-chat-shared 1.3.0-dev.10 → 1.3.0-dev.102
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.d.ts +41 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.js +3 -1
- package/components/ConfirmationView/ConfirmationView.d.ts +57 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +15 -14
- package/components/CopyButton/CopyButton.d.ts +19 -0
- package/components/CopyButton/CopyButton.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts +41 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.d.ts.map +1 -0
- package/components/DeleteConfirmationDialog/DeleteConfirmationDialog.js +34 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.js +37 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +6 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.d.ts +38 -0
- package/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/components/EntityHeader/EntityHeader.js +1 -1
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts +18 -0
- package/components/EntityTypeLabel/EntityTypeLabel.d.ts.map +1 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +15 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.d.ts +40 -0
- package/components/ItemHeader/ItemHeader.d.ts.map +1 -0
- package/components/ItemHeader/ItemHeader.js +4 -1
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +55 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +25 -25
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts +7 -0
- package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts +66 -0
- package/components/MarkdownRenderer/MDMessageViewer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MDMessageViewer.js +14 -12
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts +139 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +140 -133
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts +18 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/Math/MarkdownMathBlock.js +1 -1
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts +39 -0
- package/components/MarkdownRenderer/PlainTextRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +3 -3
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts +16 -0
- package/components/MarkdownRenderer/Table/table-serialization.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts +27 -0
- package/components/MarkdownRenderer/Table/useMarkdownTableActions/useMarkdownTableActions.d.ts.map +1 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts +9 -0
- package/components/MarkdownRenderer/TaskCheckbox/MarkdownTaskCheckbox.d.ts.map +1 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts +17 -0
- package/components/MarkdownRenderer/ThinkingShimmer.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts +10 -0
- package/components/MarkdownRenderer/markdown-class-names.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts +15 -0
- package/components/MarkdownRenderer/markdown-whitespace.d.ts.map +1 -0
- package/components/MarkdownRenderer/markdown-whitespace.js +18 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +22 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.d.ts +33 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.js +27 -17
- package/constants/breakpoint.d.ts +9 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/dial.d.ts +5 -0
- package/constants/dial.d.ts.map +1 -0
- package/constants/entity-colors.d.ts +6 -0
- package/constants/entity-colors.d.ts.map +1 -0
- package/constants/icon.d.ts +14 -0
- package/constants/icon.d.ts.map +1 -0
- package/constants/markdown-editor.d.ts +2 -0
- package/constants/markdown-editor.d.ts.map +1 -0
- package/constants/mime-types.d.ts +27 -0
- package/constants/mime-types.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +13 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/constants/resizable-fields.d.ts +5 -0
- package/constants/resizable-fields.d.ts.map +1 -0
- package/constants/select-list.d.ts +4 -0
- package/constants/select-list.d.ts.map +1 -0
- package/constants/tag-input.d.ts +2 -0
- package/constants/tag-input.d.ts.map +1 -0
- package/entry-points/file-manager.d.ts +5 -0
- package/entry-points/file-manager.d.ts.map +1 -0
- package/entry-points/markdown.d.ts +19 -0
- package/entry-points/markdown.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +58 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +193 -190
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +89 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +2 -1
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +17 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +1 -1
- package/file-manager/attach-result.d.ts +9 -0
- package/file-manager/attach-result.d.ts.map +1 -0
- package/file-manager/file-manager-controller.d.ts +121 -0
- package/file-manager/file-manager-controller.d.ts.map +1 -0
- package/file-manager/file-manager-variant.d.ts +21 -0
- package/file-manager/file-manager-variant.d.ts.map +1 -0
- package/file-manager/file-upload-validation.d.ts +8 -0
- package/file-manager/file-upload-validation.d.ts.map +1 -0
- package/file-manager/index.d.ts +10 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +158 -0
- package/file-manager/labels.d.ts.map +1 -0
- package/file-manager/path.d.ts +12 -0
- package/file-manager/path.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +29 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-queue.d.ts +5 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts +27 -0
- package/file-manager/useGridEditingScroll/useGridEditingScroll.d.ts.map +1 -0
- package/file-manager.d.ts +2 -506
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useCodeCopy.d.ts +6 -0
- package/hooks/useCodeCopy.d.ts.map +1 -0
- package/hooks/useCollapsedText.d.ts +27 -0
- package/hooks/useCollapsedText.d.ts.map +1 -0
- package/hooks/useHorizontalOverflow.d.ts +21 -0
- package/hooks/useHorizontalOverflow.d.ts.map +1 -0
- package/hooks/useIsMobile.d.ts +3 -0
- package/hooks/useIsMobile.d.ts.map +1 -0
- package/hooks/useStreamedMarkdownContent.d.ts +3 -0
- package/hooks/useStreamedMarkdownContent.d.ts.map +1 -0
- package/hooks/useTextRefinement.d.ts +44 -0
- package/hooks/useTextRefinement.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.d.ts +14 -0
- package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/index.css +3 -2
- package/index.d.ts +79 -3072
- package/index.d.ts.map +1 -0
- package/index.js +68 -64
- package/markdown.d.ts +2 -465
- package/markdown.js +3 -2
- package/models/annotation.d.ts +143 -0
- package/models/annotation.d.ts.map +1 -0
- package/models/application-visualizer.d.ts +67 -0
- package/models/application-visualizer.d.ts.map +1 -0
- package/models/auth.d.ts +26 -0
- package/models/auth.d.ts.map +1 -0
- package/models/chat.d.ts +407 -0
- package/models/chat.d.ts.map +1 -0
- package/models/conversation-classification.d.ts +9 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-transfer.d.ts +96 -0
- package/models/conversation-transfer.d.ts.map +1 -0
- package/models/custom-visualizer.d.ts +61 -0
- package/models/custom-visualizer.d.ts.map +1 -0
- package/models/deployment-configuration.d.ts +55 -0
- package/models/deployment-configuration.d.ts.map +1 -0
- package/models/deployment-features.d.ts +17 -0
- package/models/deployment-features.d.ts.map +1 -0
- package/models/deployment.d.ts +31 -0
- package/models/deployment.d.ts.map +1 -0
- package/models/dial-model.d.ts +19 -0
- package/models/dial-model.d.ts.map +1 -0
- package/models/entity.d.ts +15 -0
- package/models/entity.d.ts.map +1 -0
- package/models/import-export.d.ts +23 -0
- package/models/import-export.d.ts.map +1 -0
- package/models/inline-segment.d.ts +11 -0
- package/models/inline-segment.d.ts.map +1 -0
- package/models/locale.d.ts +19 -0
- package/models/locale.d.ts.map +1 -0
- package/models/text-refinement.d.ts +18 -0
- package/models/text-refinement.d.ts.map +1 -0
- package/models/theme.d.ts +36 -0
- package/models/theme.d.ts.map +1 -0
- package/models/tool-menu-item.d.ts +13 -0
- package/models/tool-menu-item.d.ts.map +1 -0
- package/package.json +3 -3
- package/types/attachment.d.ts +25 -0
- package/types/attachment.d.ts.map +1 -0
- package/types/code-editor.d.ts +8 -0
- package/types/code-editor.d.ts.map +1 -0
- package/types/entity-type.d.ts +10 -0
- package/types/entity-type.d.ts.map +1 -0
- package/types/file-manager-node.d.ts +17 -0
- package/types/file-manager-node.d.ts.map +1 -0
- package/types/mime-type.d.ts +59 -0
- package/types/mime-type.d.ts.map +1 -0
- package/utils/annotation.d.ts +29 -0
- package/utils/annotation.d.ts.map +1 -0
- package/utils/avatar-color.d.ts +10 -0
- package/utils/avatar-color.d.ts.map +1 -0
- package/utils/base64-json.d.ts +14 -0
- package/utils/base64-json.d.ts.map +1 -0
- package/utils/base64-json.js +4 -0
- package/utils/build-css-vars.d.ts +4 -0
- package/utils/build-css-vars.d.ts.map +1 -0
- package/utils/copy-to-clipboard.d.ts +18 -0
- package/utils/copy-to-clipboard.d.ts.map +1 -0
- package/utils/entity-field-limits.d.ts +11 -0
- package/utils/entity-field-limits.d.ts.map +1 -0
- package/utils/entity-type.d.ts +5 -0
- package/utils/entity-type.d.ts.map +1 -0
- package/utils/file-download.d.ts +21 -0
- package/utils/file-download.d.ts.map +1 -0
- package/utils/format-file-size.d.ts +3 -0
- package/utils/format-file-size.d.ts.map +1 -0
- package/utils/format-last-used.d.ts +3 -0
- package/utils/format-last-used.d.ts.map +1 -0
- package/utils/format-price.d.ts +7 -0
- package/utils/format-price.d.ts.map +1 -0
- package/utils/generate-uuid.d.ts +3 -0
- package/utils/generate-uuid.d.ts.map +1 -0
- package/utils/initials.d.ts +3 -0
- package/utils/initials.d.ts.map +1 -0
- package/utils/inline-segments.d.ts +38 -0
- package/utils/inline-segments.d.ts.map +1 -0
- package/utils/inline-segments.js +53 -0
- package/utils/is-audio-transcription-supported.d.ts +3 -0
- package/utils/is-audio-transcription-supported.d.ts.map +1 -0
- package/utils/is-skill-selection-unsupported.d.ts +3 -0
- package/utils/is-skill-selection-unsupported.d.ts.map +1 -0
- package/utils/latex.d.ts +21 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/markdown-html.d.ts +14 -0
- package/utils/markdown-html.d.ts.map +1 -0
- package/utils/markdown-html.js +11 -0
- package/utils/merge-class.d.ts +4 -0
- package/utils/merge-class.d.ts.map +1 -0
- package/utils/message-attachment-to-display.d.ts +22 -0
- package/utils/message-attachment-to-display.d.ts.map +1 -0
- package/utils/message.d.ts +4 -0
- package/utils/message.d.ts.map +1 -0
- package/utils/mime-type.d.ts +22 -0
- package/utils/mime-type.d.ts.map +1 -0
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/string-utils.d.ts +11 -0
- package/utils/string-utils.d.ts.map +1 -0
- package/utils/syntax-highlighting.d.ts +8 -0
- package/utils/syntax-highlighting.d.ts.map +1 -0
|
@@ -4,52 +4,52 @@ import { getParentFolderPath as ee } from "../path.js";
|
|
|
4
4
|
import { useGridEditingScroll as te } from "../useGridEditingScroll/useGridEditingScroll.js";
|
|
5
5
|
import { OperationLoaderModal as ne } from "../OperationLoaderModal/OperationLoaderModal.js";
|
|
6
6
|
import { toUploadQueueItems as re } from "../upload-queue.js";
|
|
7
|
-
import { ButtonVariant as
|
|
8
|
-
import { memo as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { DialFileManager as
|
|
7
|
+
import { ButtonVariant as ie, NOT_ALLOWED_SYMBOLS_REGEXP as ae, PrimaryButton as oe, Spinner as se, TransferQueue as ce } from "@epam/ai-dial-ui-kit";
|
|
8
|
+
import { memo as r, useCallback as le, useEffect as ue, useMemo as i, useState as de } from "react";
|
|
9
|
+
import { Fragment as fe, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
10
|
+
import { DialFileManager as pe, DialFileManagerActions as s, DialFileManagerTabs as me, GridSelectionMode as he } from "@epam/ai-dial-react-file-manager";
|
|
11
11
|
//#region src/file-manager/DialFileManagerShell/DialFileManagerShell.tsx
|
|
12
|
-
var
|
|
12
|
+
var ge = (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
|
-
|
|
18
|
+
}, c = ({ controller: r, labels: c, activeTab: l, tabs: u, onTabChange: d, selectedPaths: f, onSelectedPathsChange: _e, variant: p, actionProfile: ve, autoSelectUploadedItems: ye = !1, allowedFileTypes: be, maxSelectableFileSize: m, oversizedUploadMessage: h, isRowSelectable: g, getDisabledTooltip: xe, unsupportedFileTypeTooltip: Se, treeContainerClassName: _ }) => {
|
|
19
|
+
let { items: Ce, isLoading: we, error: Te, path: v, onPathChange: Ee, retry: De, onSearchFiles: Oe, isSearching: ke, searchResults: Ae, clearSearchResults: je, expandedPaths: y, loadedPaths: b, onExpandedPathsChange: x, onFolderPopupPathChange: Me, folderPopupLoadingPaths: S, onUploadFiles: Ne, onUploadArchive: Pe, onValidateUpload: Fe, uploadBatchState: C, cancelUpload: w, cancelUploadFile: Ie, clearUploadBatch: T, onCreateFolder: Le, onCreateFolderValidate: Re, onDownloadFiles: ze, isDownloading: Be, onDeleteFiles: E, isDeleting: Ve, onMoveToFiles: He, onRenameValidate: Ue, isRenaming: We, onCopyFiles: Ge, isCopying: Ke, isMoving: D, cancelCopyMove: qe, uploadEnabled: O, isNewButtonDisabled: k, disabledNewButtonTooltip: A, visibleColumns: j, dateLocale: M, dateOptions: N, actionLabels: P, sharedWithMeIds: Je, sharedByMePaths: F, onUnshareFiles: Ye, isUnsharing: Xe, onRemoveFilesAccess: Ze, isRemovingAccess: Qe, fileMetadata: I, isFileMetadataLoading: L, onGetInfo: $e, clearMetadata: R, sectionTab: et } = r, z = et ?? l, [B, tt] = de(void 0), { handleGridApiChange: nt, reset: V } = te();
|
|
20
|
+
ue(() => {
|
|
21
21
|
V();
|
|
22
22
|
}, [z, V]);
|
|
23
|
-
let H =
|
|
23
|
+
let H = i(() => {
|
|
24
24
|
let e = {};
|
|
25
|
-
return
|
|
25
|
+
return s.Download in P && (e[s.Download] = c.downloadLabel), s.Delete in P && (e[s.Delete] = c.deleteLabel), s.Rename in P && (e[s.Rename] = c.renameLabel), s.Copy in P && (e[s.Copy] = c.copyLabel), s.Move in P && (e[s.Move] = c.moveLabel), s.Duplicate in P && (e[s.Duplicate] = c.duplicateLabel), s.Unshare in P && (e[s.Unshare] = c.unshareLabel), s.RemoveAccess in P && (e[s.RemoveAccess] = c.removeAccessLabel), e;
|
|
26
26
|
}, [
|
|
27
27
|
P,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
]), U =
|
|
28
|
+
c.downloadLabel,
|
|
29
|
+
c.deleteLabel,
|
|
30
|
+
c.renameLabel,
|
|
31
|
+
c.copyLabel,
|
|
32
|
+
c.moveLabel,
|
|
33
|
+
c.duplicateLabel,
|
|
34
|
+
c.unshareLabel,
|
|
35
|
+
c.removeAccessLabel
|
|
36
|
+
]), U = i(() => s.Info in P ? {
|
|
37
37
|
...H,
|
|
38
|
-
[
|
|
38
|
+
[s.Info]: c.infoLabel
|
|
39
39
|
} : H, [
|
|
40
40
|
H,
|
|
41
41
|
P,
|
|
42
|
-
|
|
43
|
-
]), W =
|
|
44
|
-
if (
|
|
45
|
-
for (let e of
|
|
42
|
+
c.infoLabel
|
|
43
|
+
]), W = i(() => {
|
|
44
|
+
if (f.size === 0) return !1;
|
|
45
|
+
for (let e of f) if (!F.has(e)) return !1;
|
|
46
46
|
return !0;
|
|
47
|
-
}, [
|
|
47
|
+
}, [f, F]), G = i(() => {
|
|
48
48
|
if (W) return H;
|
|
49
|
-
let { [
|
|
49
|
+
let { [s.RemoveAccess]: e, ...t } = H;
|
|
50
50
|
return t;
|
|
51
|
-
}, [H, W]), K =
|
|
52
|
-
selectionMode:
|
|
51
|
+
}, [H, W]), K = p === n.Attach, rt = i(() => ({
|
|
52
|
+
selectionMode: he.MULTIPLE,
|
|
53
53
|
...K ? { filterable: !1 } : {},
|
|
54
54
|
visibleColumns: j,
|
|
55
55
|
dateLocale: M,
|
|
@@ -58,7 +58,7 @@ var he = (e, t) => {
|
|
|
58
58
|
domLayout: "normal",
|
|
59
59
|
rowSelection: {
|
|
60
60
|
mode: "multiRow",
|
|
61
|
-
isRowSelectable:
|
|
61
|
+
isRowSelectable: g ?? (() => !0)
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
actionLabels: U
|
|
@@ -68,253 +68,256 @@ var he = (e, t) => {
|
|
|
68
68
|
M,
|
|
69
69
|
N,
|
|
70
70
|
U,
|
|
71
|
-
|
|
72
|
-
]),
|
|
73
|
-
header:
|
|
74
|
-
containerClassName:
|
|
75
|
-
tabsAriaLabel:
|
|
76
|
-
tabs:
|
|
77
|
-
activeTab:
|
|
78
|
-
onTabChange:
|
|
71
|
+
g
|
|
72
|
+
]), it = i(() => ({
|
|
73
|
+
header: p === n.Attach ? null : c.treeHeaderByTab[l],
|
|
74
|
+
containerClassName: _ ?? (p === n.Attach ? "min-h-0 h-full w-[360px] shrink-0 rounded-xl bg-layer-raised shadow-sm" : void 0),
|
|
75
|
+
tabsAriaLabel: c.treeHeaderByTab[l],
|
|
76
|
+
tabs: u,
|
|
77
|
+
activeTab: l,
|
|
78
|
+
onTabChange: d,
|
|
79
79
|
expandedPaths: y,
|
|
80
80
|
loadedPaths: b,
|
|
81
81
|
loadingPaths: S,
|
|
82
82
|
onExpandedPathsChange: x,
|
|
83
83
|
actionLabels: H
|
|
84
84
|
}), [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
c.treeHeaderByTab,
|
|
86
|
+
_,
|
|
87
|
+
p,
|
|
88
88
|
u,
|
|
89
|
-
|
|
89
|
+
l,
|
|
90
|
+
d,
|
|
90
91
|
y,
|
|
91
92
|
b,
|
|
92
93
|
S,
|
|
93
94
|
x,
|
|
94
95
|
H
|
|
95
|
-
]), q =
|
|
96
|
+
]), q = p === n.Standalone && ve === t.Full && z === me.MyFiles && O, at = i(() => ({
|
|
96
97
|
showHiddenFilesToggle: !0,
|
|
97
|
-
...K ? { newButtonVariant:
|
|
98
|
-
hiddenFilesSwitcherLabel:
|
|
99
|
-
showHiddenFilesLabel:
|
|
100
|
-
hideHiddenFilesLabel:
|
|
98
|
+
...K ? { newButtonVariant: ie.Neutral } : {},
|
|
99
|
+
hiddenFilesSwitcherLabel: c.hiddenFilesLabel,
|
|
100
|
+
showHiddenFilesLabel: c.showHiddenFilesLabel,
|
|
101
|
+
hideHiddenFilesLabel: c.hideHiddenFilesLabel,
|
|
101
102
|
isNewButtonDisabled: k,
|
|
102
103
|
disabledNewButtonTooltip: A,
|
|
103
104
|
newActions: {
|
|
104
105
|
uploadFiles: {
|
|
105
|
-
label:
|
|
106
|
+
label: c.uploadFilesLabel,
|
|
106
107
|
icon: null
|
|
107
108
|
},
|
|
108
109
|
newFolder: {
|
|
109
|
-
label:
|
|
110
|
+
label: c.newFolderLabel,
|
|
110
111
|
icon: null
|
|
111
112
|
},
|
|
112
113
|
...q ? { uploadArchive: {
|
|
113
|
-
label:
|
|
114
|
+
label: c.uploadArchiveAction,
|
|
114
115
|
icon: null
|
|
115
116
|
} } : {}
|
|
116
117
|
}
|
|
117
118
|
}), [
|
|
118
119
|
K,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
c.hiddenFilesLabel,
|
|
121
|
+
c.showHiddenFilesLabel,
|
|
122
|
+
c.hideHiddenFilesLabel,
|
|
122
123
|
k,
|
|
123
124
|
A,
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
c.uploadFilesLabel,
|
|
126
|
+
c.newFolderLabel,
|
|
126
127
|
q,
|
|
127
|
-
|
|
128
|
-
]),
|
|
129
|
-
getSelectionLabel:
|
|
128
|
+
c.uploadArchiveAction
|
|
129
|
+
]), ot = i(() => K ? void 0 : {
|
|
130
|
+
getSelectionLabel: c.getSelectionLabel,
|
|
130
131
|
actionLabels: G
|
|
131
132
|
}, [
|
|
132
133
|
K,
|
|
133
|
-
|
|
134
|
+
c.getSelectionLabel,
|
|
134
135
|
G
|
|
135
|
-
]),
|
|
136
|
-
cancelLabel:
|
|
137
|
-
confirmLabel:
|
|
138
|
-
closeLabel:
|
|
139
|
-
titleRenderer:
|
|
140
|
-
contentRenderer:
|
|
136
|
+
]), st = i(() => ({
|
|
137
|
+
cancelLabel: c.deleteCancelLabel,
|
|
138
|
+
confirmLabel: c.deleteConfirmLabel,
|
|
139
|
+
closeLabel: c.deleteCloseLabel,
|
|
140
|
+
titleRenderer: c.deleteConfirmTitle,
|
|
141
|
+
contentRenderer: c.deleteConfirmBody
|
|
141
142
|
}), [
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
]),
|
|
143
|
+
c.deleteCancelLabel,
|
|
144
|
+
c.deleteConfirmLabel,
|
|
145
|
+
c.deleteCloseLabel,
|
|
146
|
+
c.deleteConfirmTitle,
|
|
147
|
+
c.deleteConfirmBody
|
|
148
|
+
]), ct = i(() => {
|
|
148
149
|
let e;
|
|
149
|
-
for (let t of
|
|
150
|
+
for (let t of f) {
|
|
150
151
|
let n = ee(t);
|
|
151
152
|
if (e === void 0) e = n;
|
|
152
153
|
else if (e !== n) return;
|
|
153
154
|
}
|
|
154
155
|
return e;
|
|
155
|
-
}, [
|
|
156
|
-
copyLabel:
|
|
157
|
-
moveLabel:
|
|
158
|
-
addFolderLabel:
|
|
159
|
-
hiddenFilesSwitcherLabel:
|
|
160
|
-
getCopyHeader:
|
|
161
|
-
getMoveHeader:
|
|
162
|
-
disabledPathTooltip: J ?
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
}, [f]), J = B != null && S.has(B), Y = J ? B : ct, lt = i(() => ({
|
|
157
|
+
copyLabel: c.copyLabel,
|
|
158
|
+
moveLabel: c.moveLabel,
|
|
159
|
+
addFolderLabel: c.addFolderLabel,
|
|
160
|
+
hiddenFilesSwitcherLabel: c.hiddenFilesSwitcherLabel,
|
|
161
|
+
getCopyHeader: c.getCopyHeader,
|
|
162
|
+
getMoveHeader: c.getMoveHeader,
|
|
163
|
+
disabledPathTooltip: J ? c.folderPickerLoadingTooltip : c.moveSourceDisabledTooltip,
|
|
164
|
+
movedIntoItselfTooltip: c.movedIntoItselfTooltip,
|
|
165
|
+
emptyStateTitle: c.folderPickerEmptyStateTitle,
|
|
166
|
+
emptyStateDescription: c.folderPickerEmptyStateDescription,
|
|
165
167
|
sourceFolder: Y,
|
|
166
168
|
destinationFolderPath: B,
|
|
167
|
-
setDestinationFolderPath:
|
|
169
|
+
setDestinationFolderPath: tt,
|
|
168
170
|
filesLoading: J
|
|
169
171
|
}), [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
c.copyLabel,
|
|
173
|
+
c.moveLabel,
|
|
174
|
+
c.addFolderLabel,
|
|
175
|
+
c.hiddenFilesSwitcherLabel,
|
|
176
|
+
c.getCopyHeader,
|
|
177
|
+
c.getMoveHeader,
|
|
178
|
+
c.folderPickerLoadingTooltip,
|
|
179
|
+
c.moveSourceDisabledTooltip,
|
|
180
|
+
c.movedIntoItselfTooltip,
|
|
181
|
+
c.folderPickerEmptyStateTitle,
|
|
182
|
+
c.folderPickerEmptyStateDescription,
|
|
180
183
|
J,
|
|
181
184
|
Y,
|
|
182
185
|
B
|
|
183
|
-
]),
|
|
184
|
-
w(),
|
|
185
|
-
}, [w,
|
|
186
|
+
]), ut = le(() => {
|
|
187
|
+
w(), T();
|
|
188
|
+
}, [w, T]), X = i(() => re(C?.files ?? []), [C]), dt = i(() => ({
|
|
186
189
|
fileMetadata: I,
|
|
187
190
|
loading: L,
|
|
188
191
|
clearMetadata: R,
|
|
189
|
-
header:
|
|
190
|
-
nameLabel:
|
|
191
|
-
pathLabel:
|
|
192
|
-
modifiedDateLabel:
|
|
193
|
-
sizeLabel:
|
|
194
|
-
authorLabel:
|
|
192
|
+
header: c.metadataHeader,
|
|
193
|
+
nameLabel: c.metadataNameLabel,
|
|
194
|
+
pathLabel: c.metadataPathLabel,
|
|
195
|
+
modifiedDateLabel: c.metadataModifiedDateLabel,
|
|
196
|
+
sizeLabel: c.metadataSizeLabel,
|
|
197
|
+
authorLabel: c.metadataAuthorLabel
|
|
195
198
|
}), [
|
|
196
199
|
I,
|
|
197
200
|
L,
|
|
198
201
|
R,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
]), Z =
|
|
206
|
-
isDownloading:
|
|
207
|
-
isDeleting:
|
|
208
|
-
isRenaming:
|
|
202
|
+
c.metadataHeader,
|
|
203
|
+
c.metadataNameLabel,
|
|
204
|
+
c.metadataPathLabel,
|
|
205
|
+
c.metadataModifiedDateLabel,
|
|
206
|
+
c.metadataSizeLabel,
|
|
207
|
+
c.metadataAuthorLabel
|
|
208
|
+
]), Z = ge({
|
|
209
|
+
isDownloading: Be,
|
|
210
|
+
isDeleting: Ve,
|
|
211
|
+
isRenaming: We,
|
|
209
212
|
isMoving: D,
|
|
210
|
-
isUnsharing:
|
|
211
|
-
isRemovingAccess:
|
|
212
|
-
},
|
|
213
|
-
title:
|
|
213
|
+
isUnsharing: Xe,
|
|
214
|
+
isRemovingAccess: Qe
|
|
215
|
+
}, c), Q = "bg-layer-base", $ = i(() => v.split("/").filter(Boolean).length > 1 ? {
|
|
216
|
+
title: c.folderEmptyStateTitle,
|
|
214
217
|
description: ""
|
|
215
|
-
} :
|
|
218
|
+
} : c.emptyStateByTab[z], [
|
|
216
219
|
v,
|
|
217
|
-
|
|
218
|
-
|
|
220
|
+
c.folderEmptyStateTitle,
|
|
221
|
+
c.emptyStateByTab,
|
|
219
222
|
z
|
|
220
223
|
]);
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
|
|
224
|
+
return /* @__PURE__ */ o(fe, { children: [
|
|
225
|
+
Te == null ? /* @__PURE__ */ o("div", {
|
|
223
226
|
className: e("relative flex min-h-0 w-full grow overflow-auto", Q),
|
|
224
|
-
children: [/* @__PURE__ */
|
|
225
|
-
className: e("min-h-0 w-full grow", Q),
|
|
226
|
-
contentClassName:
|
|
227
|
-
gridClassName:
|
|
228
|
-
items:
|
|
227
|
+
children: [/* @__PURE__ */ a(pe, {
|
|
228
|
+
className: e("min-h-0 w-full grow", Q, K && "p-0"),
|
|
229
|
+
contentClassName: p === n.Attach ? "px-0 pb-0" : void 0,
|
|
230
|
+
gridClassName: p === n.Attach ? "size-full gap-6 px-6 py-4" : "size-full",
|
|
231
|
+
items: Ce,
|
|
229
232
|
path: v,
|
|
230
|
-
onPathChange:
|
|
231
|
-
onGridApiChange:
|
|
232
|
-
filesLoading:
|
|
233
|
-
allowedFileTypes:
|
|
234
|
-
maxSelectableFileSize:
|
|
235
|
-
maxFileSize:
|
|
236
|
-
uploadValidationMessages:
|
|
237
|
-
selectedPaths:
|
|
238
|
-
onSelectedPathsChange:
|
|
233
|
+
onPathChange: Ee,
|
|
234
|
+
onGridApiChange: nt,
|
|
235
|
+
filesLoading: we,
|
|
236
|
+
allowedFileTypes: be,
|
|
237
|
+
maxSelectableFileSize: m,
|
|
238
|
+
maxFileSize: m,
|
|
239
|
+
uploadValidationMessages: h == null ? void 0 : { oversizedFiles: h },
|
|
240
|
+
selectedPaths: f,
|
|
241
|
+
onSelectedPathsChange: _e,
|
|
239
242
|
navigationPanelOptions: {
|
|
240
243
|
searchable: !0,
|
|
241
|
-
placeholder:
|
|
244
|
+
placeholder: c.searchPlaceholderByTab?.[z]
|
|
242
245
|
},
|
|
243
246
|
hideSearchPathItemName: !0,
|
|
244
|
-
onSearchFiles:
|
|
245
|
-
searchInProgress:
|
|
246
|
-
searchResults:
|
|
247
|
-
clearSearchResults:
|
|
248
|
-
gridOptions:
|
|
249
|
-
treeOptions:
|
|
250
|
-
onFolderPopupPathChange:
|
|
251
|
-
toolbarOptions:
|
|
252
|
-
bulkActionsToolbarOptions:
|
|
253
|
-
autoSelectUploadedItems:
|
|
247
|
+
onSearchFiles: Oe,
|
|
248
|
+
searchInProgress: ke,
|
|
249
|
+
searchResults: Ae ?? [],
|
|
250
|
+
clearSearchResults: je,
|
|
251
|
+
gridOptions: rt,
|
|
252
|
+
treeOptions: it,
|
|
253
|
+
onFolderPopupPathChange: Me,
|
|
254
|
+
toolbarOptions: at,
|
|
255
|
+
bulkActionsToolbarOptions: ot,
|
|
256
|
+
autoSelectUploadedItems: ye,
|
|
254
257
|
emptyStateTitle: $.title,
|
|
255
258
|
emptyStateDescription: $.description,
|
|
256
|
-
searchEmptyStateTitle:
|
|
259
|
+
searchEmptyStateTitle: c.searchEmptyStateTitle,
|
|
257
260
|
uploadEnabled: O,
|
|
258
|
-
sharedWithMeIds:
|
|
261
|
+
sharedWithMeIds: Je,
|
|
259
262
|
sharedByMePaths: F,
|
|
260
|
-
onUnshareFiles:
|
|
261
|
-
onRemoveFilesAccess:
|
|
262
|
-
fileMetadataPopupOptions:
|
|
263
|
-
onGetInfo:
|
|
264
|
-
onUploadFiles:
|
|
265
|
-
onUploadArchive:
|
|
266
|
-
onValidateUpload:
|
|
267
|
-
onCreateFolder:
|
|
268
|
-
onCreateFolderValidate:
|
|
269
|
-
onDownloadFiles:
|
|
270
|
-
onDeleteFiles:
|
|
271
|
-
onMoveToFiles:
|
|
272
|
-
onCopyFiles:
|
|
273
|
-
onRenameValidate:
|
|
274
|
-
renameValidationMessages:
|
|
263
|
+
onUnshareFiles: Ye,
|
|
264
|
+
onRemoveFilesAccess: Ze,
|
|
265
|
+
fileMetadataPopupOptions: dt,
|
|
266
|
+
onGetInfo: $e,
|
|
267
|
+
onUploadFiles: Ne,
|
|
268
|
+
onUploadArchive: Pe,
|
|
269
|
+
onValidateUpload: Fe,
|
|
270
|
+
onCreateFolder: Le,
|
|
271
|
+
onCreateFolderValidate: Re,
|
|
272
|
+
onDownloadFiles: ze,
|
|
273
|
+
onDeleteFiles: E,
|
|
274
|
+
onMoveToFiles: He,
|
|
275
|
+
onCopyFiles: Ge,
|
|
276
|
+
onRenameValidate: Ue,
|
|
277
|
+
renameValidationMessages: c.renameValidationMessages,
|
|
275
278
|
isRenameFileAvailable: O,
|
|
276
|
-
deleteConfirmationOptions:
|
|
277
|
-
conflictResolutionPopupOptions:
|
|
278
|
-
destinationFolderPopupOptions:
|
|
279
|
-
forbiddenSymbolsRegExp:
|
|
280
|
-
forbiddenSymbolsTooltip:
|
|
281
|
-
getDisabledTooltip:
|
|
282
|
-
unsupportedFileTypeTooltip:
|
|
283
|
-
}), Z != null && /* @__PURE__ */
|
|
279
|
+
deleteConfirmationOptions: st,
|
|
280
|
+
conflictResolutionPopupOptions: c.conflictResolutionPopupOptions,
|
|
281
|
+
destinationFolderPopupOptions: lt,
|
|
282
|
+
forbiddenSymbolsRegExp: ae,
|
|
283
|
+
forbiddenSymbolsTooltip: c.forbiddenSymbolsTooltip,
|
|
284
|
+
getDisabledTooltip: xe,
|
|
285
|
+
unsupportedFileTypeTooltip: Se
|
|
286
|
+
}), Z != null && /* @__PURE__ */ a("div", {
|
|
284
287
|
"aria-live": "polite",
|
|
285
|
-
className: "absolute inset-0 z-
|
|
286
|
-
children: /* @__PURE__ */
|
|
288
|
+
className: "absolute inset-0 z-52 flex items-center justify-center bg-backdrop desktop:p-4",
|
|
289
|
+
children: /* @__PURE__ */ a(se, {
|
|
287
290
|
size: 32,
|
|
288
291
|
fullWidth: !1,
|
|
289
292
|
ariaLabel: Z
|
|
290
293
|
})
|
|
291
294
|
})]
|
|
292
|
-
}) : /* @__PURE__ */
|
|
295
|
+
}) : /* @__PURE__ */ o("div", {
|
|
293
296
|
role: "alert",
|
|
294
297
|
className: "flex flex-col items-center gap-4 p-6",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
296
|
-
label:
|
|
297
|
-
onClick:
|
|
298
|
+
children: [/* @__PURE__ */ a("p", { children: c.errorMessage }), /* @__PURE__ */ a(oe, {
|
|
299
|
+
label: c.retryLabel,
|
|
300
|
+
onClick: De
|
|
298
301
|
})]
|
|
299
302
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
className: "fixed
|
|
302
|
-
children: /* @__PURE__ */
|
|
303
|
-
title:
|
|
303
|
+
/* @__PURE__ */ a("div", {
|
|
304
|
+
className: "fixed inset-e-4 bottom-4 z-70",
|
|
305
|
+
children: /* @__PURE__ */ a(ce, {
|
|
306
|
+
title: c.getUploadQueueTitle(X.length),
|
|
304
307
|
items: X,
|
|
305
|
-
onClose:
|
|
306
|
-
onCancelItem:
|
|
307
|
-
labels:
|
|
308
|
+
onClose: ut,
|
|
309
|
+
onCancelItem: Ie,
|
|
310
|
+
labels: c.uploadQueueLabels
|
|
308
311
|
})
|
|
309
312
|
}),
|
|
310
|
-
(
|
|
311
|
-
title: D ?
|
|
312
|
-
text: D ?
|
|
313
|
-
cancelLabel:
|
|
314
|
-
onCancel:
|
|
313
|
+
(Ke || D) && /* @__PURE__ */ a(ne, {
|
|
314
|
+
title: D ? c.operationLoaderMoveTitle : c.operationLoaderCopyTitle,
|
|
315
|
+
text: D ? c.movingLabel : c.copyingLabel,
|
|
316
|
+
cancelLabel: c.operationLoaderCancelLabel,
|
|
317
|
+
onCancel: qe
|
|
315
318
|
})
|
|
316
319
|
] });
|
|
317
320
|
};
|
|
318
|
-
|
|
321
|
+
r(c);
|
|
319
322
|
//#endregion
|
|
320
|
-
export {
|
|
323
|
+
export { c as DialFileManagerShell };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { DialFileManagerTabs, DialFile, DialFileAcceptType, FileManagerGridRow, FileTreeOptions } from '@epam/ai-dial-react-file-manager';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { FileManagerSelectableNode } from '../../types/file-manager-node';
|
|
4
|
+
import { AttachResult } from '../attach-result';
|
|
5
|
+
import { FileManagerController } from '../file-manager-controller';
|
|
6
|
+
import { DialFileManagerActionProfile, DialFileManagerVariant } from '../file-manager-variant';
|
|
7
|
+
import { FileManagerAttachModalLabels } from '../labels';
|
|
8
|
+
/** Props accepted by `FileManagerAttachModal`. */
|
|
9
|
+
export interface FileManagerAttachModalProps {
|
|
10
|
+
/** Whether the modal is open. */
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
/** Called when the modal requests to be closed. */
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
/** Called with the confirmed selection when the user presses Attach. */
|
|
15
|
+
onAttach: (result: AttachResult) => void;
|
|
16
|
+
/** Called when one or more selected files were filtered out due to an unsupported type. */
|
|
17
|
+
onSkippedUnsupportedFiles?: () => void;
|
|
18
|
+
/** Called when the total attachment count would exceed the limit. */
|
|
19
|
+
onCountLimitExceeded?: (totalCount: number, limit: number) => void;
|
|
20
|
+
/** Live file-manager state driving the grid. */
|
|
21
|
+
controller: FileManagerController;
|
|
22
|
+
/**
|
|
23
|
+
* True while any mutating operation is in progress (upload, delete, rename, etc.).
|
|
24
|
+
* Disables the Attach button alongside `isLoading`.
|
|
25
|
+
*/
|
|
26
|
+
isAnyOperationInProgress: boolean;
|
|
27
|
+
/** Currently active tab. */
|
|
28
|
+
activeTab: DialFileManagerTabs;
|
|
29
|
+
/** Filter chips scoping the tree and the grid, rendered above the folder tree. */
|
|
30
|
+
tabs: FileTreeOptions['tabs'];
|
|
31
|
+
/**
|
|
32
|
+
* Called when the user switches tabs.
|
|
33
|
+
* The host is responsible for resetting `selectedPaths` to an empty set.
|
|
34
|
+
*/
|
|
35
|
+
onTabChange: (tab: DialFileManagerTabs) => void;
|
|
36
|
+
/** All user-visible strings. */
|
|
37
|
+
labels: FileManagerAttachModalLabels;
|
|
38
|
+
/** File-manager variant (controls which toolbar entries are shown). */
|
|
39
|
+
variant: DialFileManagerVariant;
|
|
40
|
+
/** Action profile controlling toolbar entry visibility. */
|
|
41
|
+
actionProfile: DialFileManagerActionProfile;
|
|
42
|
+
/**
|
|
43
|
+
* Current set of selected virtual paths, managed by the host.
|
|
44
|
+
* The host must reset this to an empty set when the active tab changes.
|
|
45
|
+
*/
|
|
46
|
+
selectedPaths: Set<string>;
|
|
47
|
+
/** Called when the user changes the grid selection. */
|
|
48
|
+
onSelectedPathsChange: (paths: Set<string>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Resolves a folder `DialFile` to its DIAL Core path string for inclusion in
|
|
51
|
+
* `AttachResult.folderPaths`. Return `null` to skip the folder.
|
|
52
|
+
* Path normalization and bucket resolution are the host's responsibility.
|
|
53
|
+
*/
|
|
54
|
+
resolveFolderPath: (file: DialFile) => string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Returns `false` for file content-types that must be filtered out on attach.
|
|
57
|
+
* When absent, all content types are accepted.
|
|
58
|
+
*/
|
|
59
|
+
isFileTypeAllowed?: (contentType: string) => boolean;
|
|
60
|
+
/** Maximum size in bytes a selectable file may have. */
|
|
61
|
+
maxSelectableFileSize?: number;
|
|
62
|
+
/** Maximum total attachments (already-attached plus newly selected). */
|
|
63
|
+
maximumAttachmentsAmount?: number;
|
|
64
|
+
/** Count of attachments already present before this modal opens. Defaults to `0`. */
|
|
65
|
+
existingAttachmentsAmount?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Row selectability predicate forwarded to the grid and re-applied to every
|
|
68
|
+
* selection change, so items that were not clicked manually (e.g. the file
|
|
69
|
+
* manager's auto-select of newly created items) cannot enter selection
|
|
70
|
+
* unless manually selectable. Paths resolving to no listed node are dropped.
|
|
71
|
+
* When absent, selection changes are forwarded unfiltered.
|
|
72
|
+
*/
|
|
73
|
+
isRowSelectable?: (node: {
|
|
74
|
+
data?: FileManagerSelectableNode | null;
|
|
75
|
+
}) => boolean;
|
|
76
|
+
/** Returns a tooltip for disabled rows; forwarded to the grid. */
|
|
77
|
+
getDisabledTooltip?: (row: FileManagerGridRow) => string | undefined;
|
|
78
|
+
/** Tooltip shown on files with an unsupported type; forwarded to the grid. */
|
|
79
|
+
unsupportedFileTypeTooltip?: string;
|
|
80
|
+
/** Accepted file types for the upload file input. */
|
|
81
|
+
allowedFileTypes?: DialFileAcceptType[];
|
|
82
|
+
/** Whether to auto-select items immediately after upload. Defaults to `false`. */
|
|
83
|
+
autoSelectUploadedItems?: boolean;
|
|
84
|
+
/** Pre-translated message shown by the ui-kit when a newly-selected file exceeds `maxSelectableFileSize`. Omit to leave upload-size validation unrestricted regardless of `maxSelectableFileSize`. */
|
|
85
|
+
oversizedUploadMessage?: string;
|
|
86
|
+
}
|
|
87
|
+
/** File-manager modal with Popup chrome and an Attach footer. Selection and tab state are controlled by the host. */
|
|
88
|
+
export declare const FileManagerAttachModal: FC<FileManagerAttachModalProps>;
|
|
89
|
+
//# sourceMappingURL=FileManagerAttachModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileManagerAttachModal.d.ts","sourceRoot":"","sources":["../../../src/file-manager/FileManagerAttachModal/FileManagerAttachModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEnB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAA8B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAG9D,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,2FAA2F;IAC3F,yBAAyB,CAAC,EAAE,MAAM,IAAI,CAAC;IACvC,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnE,gDAAgD;IAChD,UAAU,EAAE,qBAAqB,CAAC;IAClC;;;OAGG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAClC,4BAA4B;IAC5B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,kFAAkF;IAClF,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9B;;;OAGG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAEhD,gCAAgC;IAChC,MAAM,EAAE,4BAA4B,CAAC;IAErC,uEAAuE;IACvE,OAAO,EAAE,sBAAsB,CAAC;IAChC,2DAA2D;IAC3D,aAAa,EAAE,4BAA4B,CAAC;IAE5C;;;OAGG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,uDAAuD;IACvD,qBAAqB,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IAEpD;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,MAAM,GAAG,IAAI,CAAC;IAErD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;IACrD,wDAAwD;IACxD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qFAAqF;IACrF,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE;QACvB,IAAI,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;KACzC,KAAK,OAAO,CAAC;IACd,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,MAAM,GAAG,SAAS,CAAC;IACrE,8EAA8E;IAC9E,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAEpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACxC,kFAAkF;IAClF,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sMAAsM;IACtM,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,qHAAqH;AACrH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAkOlE,CAAC"}
|
|
@@ -74,7 +74,8 @@ var d = a(({ isOpen: a, onClose: d, onAttach: f, onSkippedUnsupportedFiles: p, o
|
|
|
74
74
|
}),
|
|
75
75
|
ariaLabel: U,
|
|
76
76
|
size: i.Lg,
|
|
77
|
-
className: "flex
|
|
77
|
+
className: "flex h-[min(900px,100dvh)]! w-full max-w-[1600px]! flex-col bg-layer-base! mobile:h-full! mobile:max-w-full! mobile:rounded-none",
|
|
78
|
+
overlayClassName: "mobile:p-0",
|
|
78
79
|
headerClassName: "pb-0",
|
|
79
80
|
footerClassName: "pt-0",
|
|
80
81
|
onClose: d,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
/** Props for the operation-in-progress overlay modal (copy/move spinner). */
|
|
3
|
+
export interface OperationLoaderModalProps {
|
|
4
|
+
/** Title shown above the spinner (e.g. "Copying files"). */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Secondary text below the title (e.g. "Copying 2 items"). */
|
|
7
|
+
text: string;
|
|
8
|
+
/** Label for the cancel button. */
|
|
9
|
+
cancelLabel: string;
|
|
10
|
+
/** Called when the user clicks Cancel. */
|
|
11
|
+
onCancel: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** Modal overlay with a spinner and cancel button for long-running file operations. */
|
|
14
|
+
export declare const OperationLoaderModal: FC<OperationLoaderModalProps>;
|
|
15
|
+
declare const _default: import('react').NamedExoticComponent<OperationLoaderModalProps>;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=OperationLoaderModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationLoaderModal.d.ts","sourceRoot":"","sources":["../../../src/file-manager/OperationLoaderModal/OperationLoaderModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEtC,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAyB9D,CAAC;;AAEF,wBAA0C"}
|
|
@@ -3,7 +3,7 @@ import { memo as n } from "react";
|
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/file-manager/OperationLoaderModal/OperationLoaderModal.tsx
|
|
5
5
|
var a = ({ title: n, text: a, cancelLabel: o, onCancel: s }) => /* @__PURE__ */ r(e, {
|
|
6
|
-
className: "
|
|
6
|
+
className: "h-fit! max-h-full! w-[400px]!",
|
|
7
7
|
open: !0,
|
|
8
8
|
closeOnOutsideClick: !1,
|
|
9
9
|
hideClose: !0,
|