@epam/ai-dial-chat-shared 1.3.0-dev.28 → 1.3.0-dev.288
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 +46 -0
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -0
- package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts +33 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.d.ts.map +1 -0
- package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts +33 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.d.ts.map +1 -0
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
- package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
- package/components/ConfirmationView/ConfirmationFooter.d.ts +41 -0
- package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationFooter.js +25 -26
- package/components/ConfirmationView/ConfirmationView.d.ts +59 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +12 -12
- package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
- 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/DeleteConfirmationView/DeleteConfirmationView.d.ts +49 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +5 -4
- package/components/DeploymentIcon/DeploymentIcon.d.ts +36 -0
- package/components/DeploymentIcon/DeploymentIcon.d.ts.map +1 -0
- package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
- 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/ErrorAlert/ErrorAlert.d.ts +27 -0
- package/components/ErrorAlert/ErrorAlert.d.ts.map +1 -0
- package/components/ErrorAlert/ErrorAlert.js +26 -0
- package/components/ErrorAlert/ErrorAlert.module.scss.js +4 -0
- package/components/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -0
- package/components/FullScreenAlert/FullScreenAlert.d.ts +17 -0
- package/components/FullScreenAlert/FullScreenAlert.d.ts.map +1 -0
- package/components/FullScreenAlert/FullScreenAlert.js +19 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts +18 -0
- package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -0
- package/components/InitialsAvatar/InitialsAvatar.js +4 -3
- 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/ItemHeader/ItemHeader.module.scss.js +5 -4
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +57 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +58 -58
- package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +9 -8
- 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 +145 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +146 -136
- package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +9 -8
- 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/Math/MarkdownMathBlock.module.scss.js +5 -4
- 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 +51 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +68 -63
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +15 -13
- package/components/MarkdownRenderer/Table/TableHeader.d.ts +22 -0
- package/components/MarkdownRenderer/Table/TableHeader.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -2
- 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 +2 -6
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts +25 -0
- package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.d.ts.map +1 -0
- package/components/NewVersionAlert/NewVersionAlert.d.ts +27 -0
- package/components/NewVersionAlert/NewVersionAlert.d.ts.map +1 -0
- package/components/NewVersionAlert/NewVersionAlert.js +26 -0
- package/components/NewVersionAlert/NewVersionAlert.module.scss.js +4 -0
- package/components/NotificationStack/NotificationStack.d.ts +46 -0
- package/components/NotificationStack/NotificationStack.d.ts.map +1 -0
- package/components/NotificationStack/NotificationStack.js +109 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts +32 -0
- package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -0
- package/components/PanelEmptyState/PanelEmptyState.js +19 -9
- package/components/PanelEmptyState/PanelEmptyState.module.scss.js +6 -2
- package/components/ResourceSummary/ResourceSummary.d.ts +49 -0
- package/components/ResourceSummary/ResourceSummary.d.ts.map +1 -0
- package/components/ResourceSummary/ResourceSummary.module.scss.js +5 -4
- package/components/TextRefinementField/TextRefinementField.d.ts +33 -0
- package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -0
- package/components/TextRefinementField/TextRefinementField.js +84 -55
- package/constants/breakpoint.d.ts +9 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/breakpoint.js +1 -1
- 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/conversation-transfer/conversation-transfer-queue.d.ts +16 -0
- package/conversation-transfer/conversation-transfer-queue.d.ts.map +1 -0
- package/conversation-transfer/conversation-transfer-queue.js +24 -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 +67 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +328 -266
- package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +8 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +96 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -0
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +82 -78
- package/file-manager/FileManagerAttachModal/FileManagerAttachModal.module.scss.js +7 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +22 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -0
- package/file-manager/OperationLoaderModal/OperationLoaderModal.js +21 -17
- package/file-manager/OperationLoaderModal/OperationLoaderModal.module.scss.js +4 -0
- 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 +129 -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 +11 -0
- package/file-manager/index.d.ts.map +1 -0
- package/file-manager/labels.d.ts +177 -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/shell-styles.d.ts +33 -0
- package/file-manager/shell-styles.d.ts.map +1 -0
- package/file-manager/upload-batch.d.ts +75 -0
- package/file-manager/upload-batch.d.ts.map +1 -0
- package/file-manager/upload-batch.js +6 -2
- package/file-manager/upload-queue.d.ts +45 -0
- package/file-manager/upload-queue.d.ts.map +1 -0
- package/file-manager/upload-queue.js +45 -13
- 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/file-manager.js +4 -4
- package/hooks/useAvailableHeightCap.d.ts +30 -0
- package/hooks/useAvailableHeightCap.d.ts.map +1 -0
- package/hooks/useAvailableHeightCap.js +1 -1
- 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/useControlErrorAssociation.d.ts +3 -0
- package/hooks/useControlErrorAssociation.d.ts.map +1 -0
- package/hooks/useControlErrorAssociation.js +12 -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/useIsMobile.js +1 -1
- package/hooks/useIsTextClipped.d.ts +26 -0
- package/hooks/useIsTextClipped.d.ts.map +1 -0
- package/hooks/useIsTextClipped.js +25 -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/useTextRefinement.js +4 -4
- package/hooks/useUnsavedChangesGuard.d.ts +14 -0
- package/hooks/useUnsavedChangesGuard.d.ts.map +1 -0
- package/hooks/useUnsavedChangesGuard.js +1 -5
- package/index.css +3 -2
- package/index.d.ts +86 -3167
- package/index.d.ts.map +1 -0
- package/index.js +85 -76
- 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 +28 -0
- package/models/auth.d.ts.map +1 -0
- package/models/chat.d.ts +409 -0
- package/models/chat.d.ts.map +1 -0
- package/models/conversation-classification.d.ts +14 -0
- package/models/conversation-classification.d.ts.map +1 -0
- package/models/conversation-classification.js +3 -1
- 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 +22 -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 +10 -17
- 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/format-price.js +10 -10
- 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 +22 -0
- package/utils/latex.d.ts.map +1 -0
- package/utils/latex.js +47 -41
- 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-attachment-to-display.js +1 -1
- 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/mime-type.js +1 -1
- package/utils/prompt-variables.d.ts +62 -0
- package/utils/prompt-variables.d.ts.map +1 -0
- package/utils/prompt-variables.js +5 -9
- 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
- package/utils/syntax-highlighting.js +8 -8
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { DialFile, DialFileManager, DialFileManagerTabs } from '@epam/ai-dial-react-file-manager';
|
|
2
|
+
import { TransferQueueLabels } from '@epam/ai-dial-ui-kit';
|
|
3
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
4
|
+
import { FileUploadFailureReason } from './upload-batch';
|
|
5
|
+
type DialFileManagerComponentProps = ComponentProps<typeof DialFileManager>;
|
|
6
|
+
/** Options for the conflict-resolution popup shown during copy/move operations. */
|
|
7
|
+
export type ConflictResolutionPopupOptions = NonNullable<DialFileManagerComponentProps['conflictResolutionPopupOptions']>;
|
|
8
|
+
/** Validation messages shown during inline rename editing. */
|
|
9
|
+
export type RenameValidationMessages = NonNullable<DialFileManagerComponentProps['renameValidationMessages']>;
|
|
10
|
+
/** Configuration for the destination-folder picker popup. */
|
|
11
|
+
export type DialFileManagerDestinationFolderPopupOptions = NonNullable<DialFileManagerComponentProps['destinationFolderPopupOptions']>;
|
|
12
|
+
/** Title and description pair for an empty-state display. */
|
|
13
|
+
export interface EmptyStateCopy {
|
|
14
|
+
/** Primary empty-state heading. */
|
|
15
|
+
title: string;
|
|
16
|
+
/** Secondary empty-state description text. */
|
|
17
|
+
description: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Pre-translated strings and resolved renderers the shell renders as-is.
|
|
21
|
+
* The shell never calls `useTranslation` — every host (the attach modal
|
|
22
|
+
* today; a future standalone page) resolves these via its own i18n.
|
|
23
|
+
*/
|
|
24
|
+
export interface DialFileManagerShellLabels {
|
|
25
|
+
/** Error message shown when the current folder listing fails. */
|
|
26
|
+
errorMessage: string;
|
|
27
|
+
/** Label for the retry button shown alongside the error message. */
|
|
28
|
+
retryLabel: string;
|
|
29
|
+
/** Label for the hidden-files toggle in the toolbar. */
|
|
30
|
+
hiddenFilesLabel: string;
|
|
31
|
+
/** Label shown when hidden files are currently visible. */
|
|
32
|
+
showHiddenFilesLabel: string;
|
|
33
|
+
/** Label shown when hidden files are currently hidden. */
|
|
34
|
+
hideHiddenFilesLabel: string;
|
|
35
|
+
/** Returns the text shown after the selection-count badge; the file manager renders the count itself, so omit it (e.g. "items selected"). */
|
|
36
|
+
getSelectionLabel: (count: number) => string;
|
|
37
|
+
/** Label for the "Upload files" action in the New menu. */
|
|
38
|
+
uploadFilesLabel: string;
|
|
39
|
+
/** Label for the "Upload archive" action in the New menu. */
|
|
40
|
+
uploadArchiveAction: string;
|
|
41
|
+
/** Label for the "New folder" action in the New menu. */
|
|
42
|
+
newFolderLabel: string;
|
|
43
|
+
/** Label for the Download action. */
|
|
44
|
+
downloadLabel: string;
|
|
45
|
+
/**
|
|
46
|
+
* Overlay label shown while a download was in progress.
|
|
47
|
+
* @deprecated Not read: downloads run as transfer-queue rows with no overlay.
|
|
48
|
+
*/
|
|
49
|
+
downloadingLabel?: string;
|
|
50
|
+
/** Label for the Delete action. */
|
|
51
|
+
deleteLabel: string;
|
|
52
|
+
/** Overlay label shown while a delete operation is in progress. */
|
|
53
|
+
deletingLabel: string;
|
|
54
|
+
/** Label for the Rename action. */
|
|
55
|
+
renameLabel: string;
|
|
56
|
+
/** Overlay label shown while a rename operation is in progress. */
|
|
57
|
+
renamingLabel: string;
|
|
58
|
+
/** Label for the Copy action. */
|
|
59
|
+
copyLabel: string;
|
|
60
|
+
/** Label for the Move action. */
|
|
61
|
+
moveLabel: string;
|
|
62
|
+
/** Label for the Duplicate action. */
|
|
63
|
+
duplicateLabel: string;
|
|
64
|
+
/** Label for the "Add folder" button in the destination picker. */
|
|
65
|
+
addFolderLabel: string;
|
|
66
|
+
/** Label for the hidden-files toggle in the destination-folder picker. */
|
|
67
|
+
hiddenFilesSwitcherLabel: string;
|
|
68
|
+
/** Returns the header for the copy destination popup. */
|
|
69
|
+
getCopyHeader: (count: number, name?: string) => string;
|
|
70
|
+
/** Returns the header for the move destination popup. */
|
|
71
|
+
getMoveHeader: (count: number, name?: string) => string;
|
|
72
|
+
/** Tooltip shown on the disabled source folder in the destination picker. */
|
|
73
|
+
moveSourceDisabledTooltip: string;
|
|
74
|
+
/** Tooltip shown when the move destination is a moved folder or lies inside one. */
|
|
75
|
+
movedIntoItselfTooltip: string;
|
|
76
|
+
/** Tooltip shown when a destination folder is still loading. */
|
|
77
|
+
folderPickerLoadingTooltip: string;
|
|
78
|
+
/** Empty-state title in the destination-folder picker. */
|
|
79
|
+
folderPickerEmptyStateTitle: string;
|
|
80
|
+
/** Empty-state description in the destination-folder picker. */
|
|
81
|
+
folderPickerEmptyStateDescription: string;
|
|
82
|
+
/** Overlay text shown during a copy operation. */
|
|
83
|
+
copyingLabel: string;
|
|
84
|
+
/** Overlay text shown during a move operation. */
|
|
85
|
+
movingLabel: string;
|
|
86
|
+
/** Title for the copy operation loader modal. */
|
|
87
|
+
operationLoaderCopyTitle: string;
|
|
88
|
+
/** Title for the move operation loader modal. */
|
|
89
|
+
operationLoaderMoveTitle: string;
|
|
90
|
+
/** Cancel-button label in the operation loader modal. */
|
|
91
|
+
operationLoaderCancelLabel: string;
|
|
92
|
+
/** Returns the delete confirmation dialog title for the given item names and items; the items carry `nodeType`, so a folder and a file can be titled differently. */
|
|
93
|
+
deleteConfirmTitle: (names: string[], items: DialFile[]) => ReactNode;
|
|
94
|
+
/** Returns the delete confirmation dialog body for the given item names. */
|
|
95
|
+
deleteConfirmBody: (names: string[]) => ReactNode;
|
|
96
|
+
/** Confirm-button label in the delete confirmation dialog. */
|
|
97
|
+
deleteConfirmLabel: string;
|
|
98
|
+
/** Cancel-button label in the delete confirmation dialog. */
|
|
99
|
+
deleteCancelLabel: string;
|
|
100
|
+
/** Accessible name of the delete confirmation dialog's close control. Unset falls back to the file manager's English default. */
|
|
101
|
+
deleteCloseLabel?: string;
|
|
102
|
+
/** Returns the upload queue heading for the number of files in it (e.g. "Uploading 5 files"). */
|
|
103
|
+
getUploadQueueTitle: (count: number) => string;
|
|
104
|
+
/** Translated strings for the upload `TransferQueue`; unset ones fall back to the kit's English defaults. */
|
|
105
|
+
uploadQueueLabels?: Partial<TransferQueueLabels>;
|
|
106
|
+
/** Tooltip and accessible name of a failed upload or download row, per failure reason; a reason without one shows `uploadQueueLabels.failedMessage`. */
|
|
107
|
+
uploadFailureMessages?: Partial<Record<FileUploadFailureReason, string>>;
|
|
108
|
+
/** Returns the transfer queue heading from the number of upload and download rows; unset falls back to `getUploadQueueTitle` with the total. */
|
|
109
|
+
getTransferQueueTitle?: (counts: {
|
|
110
|
+
uploads: number;
|
|
111
|
+
downloads: number;
|
|
112
|
+
}) => string;
|
|
113
|
+
/** Download-row wording of the transfer queue (cancel and progress names, and the aggregate bar's name when only downloads run); unset ones use `uploadQueueLabels`. */
|
|
114
|
+
downloadQueueLabels?: Partial<Pick<TransferQueueLabels, 'cancelItemAriaLabel' | 'itemProgressAriaLabel' | 'queueProgressAriaLabel'>>;
|
|
115
|
+
/** Accessible name of the queue's aggregate progress bar while uploads and downloads both run; unset uses `uploadQueueLabels.queueProgressAriaLabel`. */
|
|
116
|
+
transferQueueProgressAriaLabel?: string;
|
|
117
|
+
/** Empty-state title when a search yields no results. */
|
|
118
|
+
searchEmptyStateTitle: string;
|
|
119
|
+
/** Empty-state title for an empty subfolder. */
|
|
120
|
+
folderEmptyStateTitle: string;
|
|
121
|
+
/** Tooltip explaining which symbols are forbidden in file names. */
|
|
122
|
+
forbiddenSymbolsTooltip: string;
|
|
123
|
+
/** Per-tab empty-state title and description. */
|
|
124
|
+
emptyStateByTab: Record<DialFileManagerTabs, EmptyStateCopy>;
|
|
125
|
+
/** Per-tab tree header label. */
|
|
126
|
+
treeHeaderByTab: Record<DialFileManagerTabs, string>;
|
|
127
|
+
/** Optional title rendered above the tabs. Omitted by default, so the tabs stand alone; the per-tab label above is then only used as the tabs' aria-label. */
|
|
128
|
+
treeHeader?: string;
|
|
129
|
+
/** Search field placeholder per source tab of the browsed folder; a tab without an entry keeps the file manager's default. */
|
|
130
|
+
searchPlaceholderByTab?: Partial<Record<DialFileManagerTabs, string>>;
|
|
131
|
+
/** Messages for inline rename validation. */
|
|
132
|
+
renameValidationMessages: RenameValidationMessages;
|
|
133
|
+
/** Options for the conflict resolution popup. */
|
|
134
|
+
conflictResolutionPopupOptions: ConflictResolutionPopupOptions;
|
|
135
|
+
/** Label for the Unshare action. */
|
|
136
|
+
unshareLabel: string;
|
|
137
|
+
/** Overlay label shown while an unshare operation is in progress. */
|
|
138
|
+
unsharingLabel: string;
|
|
139
|
+
/** Label for the Remove Access action. */
|
|
140
|
+
removeAccessLabel: string;
|
|
141
|
+
/** Overlay label shown while a remove-access operation is in progress. */
|
|
142
|
+
removingAccessLabel: string;
|
|
143
|
+
/** Label for the Info action. */
|
|
144
|
+
infoLabel: string;
|
|
145
|
+
/** Label for the Preview action. Omit to hide the action. */
|
|
146
|
+
previewLabel?: string;
|
|
147
|
+
/** Header for the metadata popup. */
|
|
148
|
+
metadataHeader: string;
|
|
149
|
+
/** Label for the file name in the metadata popup. */
|
|
150
|
+
metadataNameLabel: string;
|
|
151
|
+
/** Label for the file path in the metadata popup. */
|
|
152
|
+
metadataPathLabel: string;
|
|
153
|
+
/** Label for the modified date in the metadata popup. */
|
|
154
|
+
metadataModifiedDateLabel: string;
|
|
155
|
+
/** Label for the file size in the metadata popup. */
|
|
156
|
+
metadataSizeLabel: string;
|
|
157
|
+
/** Label for the author in the metadata popup. */
|
|
158
|
+
metadataAuthorLabel: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Labels for `FileManagerAttachModal`. Extends the shell labels with
|
|
162
|
+
* attach-specific strings.
|
|
163
|
+
*
|
|
164
|
+
* Declared here rather than beside the component so a host can type its label
|
|
165
|
+
* object from this package's root entry without reaching the `./file-manager`
|
|
166
|
+
* entry, which is the one that pulls in the grid.
|
|
167
|
+
*/
|
|
168
|
+
export interface FileManagerAttachModalLabels extends DialFileManagerShellLabels {
|
|
169
|
+
/** Title displayed in the Popup header. */
|
|
170
|
+
title: string;
|
|
171
|
+
/** Label for the primary Attach button. */
|
|
172
|
+
attachLabel: string;
|
|
173
|
+
/** Optional subtitle shown below the title (e.g. allowed types / size). Pass `null` to hide. */
|
|
174
|
+
headerDescription?: string | null;
|
|
175
|
+
}
|
|
176
|
+
export {};
|
|
177
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/file-manager/labels.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB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CAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,cAAc,EAAE,MAAM,CAAC;IACvB,0CAA0C;IAC1C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,yBAAyB,EAAE,MAAM,CAAC;IAClC,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kDAAkD;IAClD,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA6B,SAAQ,0BAA0B;IAC9E,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Returns true when any path segment starts with a dot (hidden file or folder). */
|
|
2
|
+
export declare const isHiddenPath: (path: string) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Returns the parent folder of a path (virtual or API), always trailing-slashed.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* getParentFolderPath("reports/file.txt") // "reports/"
|
|
8
|
+
* getParentFolderPath("/My files/reports/") // "/My files/"
|
|
9
|
+
* getParentFolderPath("report.pdf") // ""
|
|
10
|
+
*/
|
|
11
|
+
export declare const getParentFolderPath: (path: string) => string;
|
|
12
|
+
//# sourceMappingURL=path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/file-manager/path.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,OACgB,CAAC;AAE7D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MAIlD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** CSS custom-property overrides for `OperationLoaderModal`. */
|
|
2
|
+
export interface OperationLoaderModalColors {
|
|
3
|
+
/** Text color of the progress line under the title. Defaults to `--text-secondary`. */
|
|
4
|
+
text?: string;
|
|
5
|
+
}
|
|
6
|
+
/** CSS custom-property overrides for `DialFileManagerShell`. */
|
|
7
|
+
export interface DialFileManagerShellColors {
|
|
8
|
+
/** Background of the shell's surface. Defaults to `--bg-layer-base`. */
|
|
9
|
+
surface?: string;
|
|
10
|
+
/** Background of the folder tree in the attach variant. Defaults to `--bg-layer-raised`. */
|
|
11
|
+
treeBackground?: string;
|
|
12
|
+
/** Border color between the folder tree and the grid in the attach variant. Defaults to `--stroke-tertiary`. */
|
|
13
|
+
treeBorder?: string;
|
|
14
|
+
/** Scrim behind the spinner shown while an overlay operation runs. Defaults to `--bg-backdrop`. */
|
|
15
|
+
overlayBackdrop?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Style overrides for `DialFileManagerShell`. */
|
|
18
|
+
export interface DialFileManagerShellStyles {
|
|
19
|
+
/** Color overrides applied as CSS custom properties. */
|
|
20
|
+
colors?: DialFileManagerShellColors;
|
|
21
|
+
/** Color overrides forwarded to the copy/move `OperationLoaderModal`. */
|
|
22
|
+
operationLoader?: OperationLoaderModalColors;
|
|
23
|
+
/** Typography class of the copy/move `OperationLoaderModal` secondary text. Defaults to `'dial-small-text'`. */
|
|
24
|
+
operationLoaderTextClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
/** CSS custom-property overrides for `FileManagerAttachModal`. */
|
|
27
|
+
export interface FileManagerAttachModalColors {
|
|
28
|
+
/** Background of the dialog and of the file-manager surface inside it. Defaults to `--bg-layer-raised`. */
|
|
29
|
+
background?: string;
|
|
30
|
+
/** Text color of the title when a header description is shown. Defaults to `--text-primary`. */
|
|
31
|
+
title?: string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=shell-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-styles.d.ts","sourceRoot":"","sources":["../../src/file-manager/shell-styles.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,gEAAgE;AAChE,MAAM,WAAW,0BAA0B;IACzC,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mGAAmG;IACnG,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,kDAAkD;AAClD,MAAM,WAAW,0BAA0B;IACzC,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,yEAAyE;IACzE,eAAe,CAAC,EAAE,0BAA0B,CAAC;IAC7C,gHAAgH;IAChH,4BAA4B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,kEAAkE;AAClE,MAAM,WAAW,4BAA4B;IAC3C,2GAA2G;IAC3G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** Lifecycle status of a single file within an upload batch. */
|
|
2
|
+
export declare enum FileUploadStatus {
|
|
3
|
+
Queued = "queued",
|
|
4
|
+
Uploading = "uploading",
|
|
5
|
+
Completed = "completed",
|
|
6
|
+
Failed = "failed",
|
|
7
|
+
Cancelled = "cancelled"
|
|
8
|
+
}
|
|
9
|
+
/** Why a file in an upload batch failed, derived from the upload response. */
|
|
10
|
+
export declare enum FileUploadFailureReason {
|
|
11
|
+
/** A file with this name already exists at the destination (HTTP 409). */
|
|
12
|
+
Conflict = "conflict",
|
|
13
|
+
/** The file is larger than the server accepts (HTTP 413). */
|
|
14
|
+
TooLarge = "tooLarge",
|
|
15
|
+
/** The user may not write to the destination (HTTP 403). */
|
|
16
|
+
Forbidden = "forbidden",
|
|
17
|
+
/** The file service behind the API is unavailable (HTTP 502/503). */
|
|
18
|
+
Unavailable = "unavailable",
|
|
19
|
+
/** The request never got a response, e.g. the connection dropped. */
|
|
20
|
+
Network = "network",
|
|
21
|
+
/** Any other failure. */
|
|
22
|
+
Unknown = "unknown"
|
|
23
|
+
}
|
|
24
|
+
/** Progress state for a single file within an upload batch. */
|
|
25
|
+
export interface FileUploadEntry {
|
|
26
|
+
/** Unique identifier of the file in the batch. */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Display name of the file. */
|
|
29
|
+
name: string;
|
|
30
|
+
/** Current upload lifecycle status. */
|
|
31
|
+
status: FileUploadStatus;
|
|
32
|
+
/** 0–100 while uploading when the transport reports byte progress. */
|
|
33
|
+
percent?: number;
|
|
34
|
+
/** Why the upload failed; set only when `status` is `Failed`. */
|
|
35
|
+
failureReason?: FileUploadFailureReason;
|
|
36
|
+
}
|
|
37
|
+
/** State of the upload queue, as returned by `useDialFileUploadBatch`. */
|
|
38
|
+
export interface FileUploadBatchState {
|
|
39
|
+
/** Every file uploaded since the queue was last cleared, settled ones included. */
|
|
40
|
+
files: FileUploadEntry[];
|
|
41
|
+
/** Whether the upload queue should be visible. */
|
|
42
|
+
isOpen: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Lifecycle status of a single download in the download batch. */
|
|
45
|
+
export declare enum FileDownloadStatus {
|
|
46
|
+
Downloading = "downloading",
|
|
47
|
+
Completed = "completed",
|
|
48
|
+
Failed = "failed",
|
|
49
|
+
Cancelled = "cancelled"
|
|
50
|
+
}
|
|
51
|
+
/** Progress state for a single download: one file, or one archive of a selection. */
|
|
52
|
+
export interface FileDownloadEntry {
|
|
53
|
+
/** Unique identifier of the download in the batch. */
|
|
54
|
+
id: string;
|
|
55
|
+
/** Display name: the file name, or the archive name (`<folder>.zip` / `files.zip`). */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Current download lifecycle status. */
|
|
58
|
+
status: FileDownloadStatus;
|
|
59
|
+
/** 0–100 while downloading when the total size is known or estimated; unset otherwise. */
|
|
60
|
+
percent?: number;
|
|
61
|
+
/** Why the download failed; set only when `status` is `Failed`. Shares the upload reasons. */
|
|
62
|
+
failureReason?: FileUploadFailureReason;
|
|
63
|
+
}
|
|
64
|
+
/** State of the download batch kept by `useDialFileMutations`. */
|
|
65
|
+
export interface FileDownloadBatchState {
|
|
66
|
+
/** Every download started since the batch was last cleared, settled ones included. */
|
|
67
|
+
files: FileDownloadEntry[];
|
|
68
|
+
/** Whether the download rows should be visible in the transfer queue. */
|
|
69
|
+
isOpen: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** Returns whether any download in the batch is still in progress. */
|
|
72
|
+
export declare const isDownloadInProgress: (batchState: FileDownloadBatchState | null) => boolean;
|
|
73
|
+
/** Returns whether any file in the batch is still queued or uploading. */
|
|
74
|
+
export declare const isUploadInProgress: (batchState: FileUploadBatchState | null) => boolean;
|
|
75
|
+
//# sourceMappingURL=upload-batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-batch.d.ts","sourceRoot":"","sources":["../../src/file-manager/upload-batch.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,8EAA8E;AAC9E,oBAAY,uBAAuB;IACjC,0EAA0E;IAC1E,QAAQ,a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,OAGS,CAAC;AAEb,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,GAC7B,YAAY,oBAAoB,GAAG,IAAI,KACtC,OAKS,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
//#region src/file-manager/upload-batch.ts
|
|
2
2
|
var e = /* @__PURE__ */ function(e) {
|
|
3
3
|
return e.Queued = "queued", e.Uploading = "uploading", e.Completed = "completed", e.Failed = "failed", e.Cancelled = "cancelled", e;
|
|
4
|
-
}({}), t =
|
|
4
|
+
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
|
+
return e.Conflict = "conflict", e.TooLarge = "tooLarge", e.Forbidden = "forbidden", e.Unavailable = "unavailable", e.Network = "network", e.Unknown = "unknown", e;
|
|
6
|
+
}({}), n = /* @__PURE__ */ function(e) {
|
|
7
|
+
return e.Downloading = "downloading", e.Completed = "completed", e.Failed = "failed", e.Cancelled = "cancelled", e;
|
|
8
|
+
}({}), r = (e) => e?.files.some((e) => e.status === "downloading") ?? !1, i = (e) => e?.files.some((e) => e.status === "queued" || e.status === "uploading") ?? !1;
|
|
5
9
|
//#endregion
|
|
6
|
-
export { e as FileUploadStatus,
|
|
10
|
+
export { n as FileDownloadStatus, t as FileUploadFailureReason, e as FileUploadStatus, r as isDownloadInProgress, i as isUploadInProgress };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TransferQueueItem, TransferQueueLabels } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
import { FileDownloadBatchState, FileUploadBatchState, FileUploadEntry, FileUploadFailureReason } from './upload-batch';
|
|
3
|
+
/** Maps upload entries onto the UI kit's `TransferQueue` rows; a failed row's `message` is the host text for its reason, when there is one. */
|
|
4
|
+
export declare const toUploadQueueItems: (files: FileUploadEntry[], failureMessages?: Partial<Record<FileUploadFailureReason, string>>) => TransferQueueItem[];
|
|
5
|
+
/** Kind of a transfer-queue row, carried as its id prefix so cancel routes to the right batch. */
|
|
6
|
+
export declare enum TransferQueueRowKind {
|
|
7
|
+
Upload = "upload",
|
|
8
|
+
Download = "download"
|
|
9
|
+
}
|
|
10
|
+
/** Builds the id of a transfer-queue row from its kind and its batch entry id. */
|
|
11
|
+
export declare const toTransferQueueRowId: (kind: TransferQueueRowKind, entryId: string) => string;
|
|
12
|
+
/** Splits a transfer-queue row id back into its kind and batch entry id; `undefined` for an id of neither kind. */
|
|
13
|
+
export declare const parseTransferQueueRowId: (rowId: string) => {
|
|
14
|
+
kind: TransferQueueRowKind;
|
|
15
|
+
entryId: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Maps the upload and download batches onto one UI kit `TransferQueue`:
|
|
19
|
+
* upload rows first, then download rows, each id prefixed by its kind.
|
|
20
|
+
*/
|
|
21
|
+
export declare const toTransferQueueItems: (uploadBatch: FileUploadBatchState | null, downloadBatch: FileDownloadBatchState | null, failureMessages?: Partial<Record<FileUploadFailureReason, string>>) => TransferQueueItem[];
|
|
22
|
+
/** Row wording for a download row, as `DialFileManagerShellLabels.downloadQueueLabels` carries it. */
|
|
23
|
+
type DownloadRowLabels = Partial<Pick<TransferQueueLabels, 'cancelItemAriaLabel' | 'itemProgressAriaLabel' | 'queueProgressAriaLabel'>>;
|
|
24
|
+
/** Inputs of {@link buildTransferQueueLabels}. */
|
|
25
|
+
interface TransferQueueLabelSources {
|
|
26
|
+
/** The upload queue's labels, used for every upload row and as the base. */
|
|
27
|
+
uploadLabels?: Partial<TransferQueueLabels>;
|
|
28
|
+
/** Download-row wording; without it the queue keeps the upload labels. */
|
|
29
|
+
downloadLabels?: DownloadRowLabels;
|
|
30
|
+
/** Name of the aggregate bar while both kinds run. */
|
|
31
|
+
mixedProgressLabel?: string;
|
|
32
|
+
/** File names of the upload rows. */
|
|
33
|
+
uploadNames: ReadonlySet<string>;
|
|
34
|
+
/** File names of the download rows. */
|
|
35
|
+
downloadNames: ReadonlySet<string>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The queue's labels with each row's cancel and progress names worded for its
|
|
39
|
+
* own kind (uploading / downloading), since the kit labels a whole queue
|
|
40
|
+
* rather than a row. A name present in both kinds keeps the upload wording.
|
|
41
|
+
* The aggregate bar is named for downloads, uploads, or both.
|
|
42
|
+
*/
|
|
43
|
+
export declare const buildTransferQueueLabels: ({ uploadLabels, downloadLabels, mixedProgressLabel, uploadNames, downloadNames, }: TransferQueueLabelSources) => Partial<TransferQueueLabels> | undefined;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=upload-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-queue.d.ts","sourceRoot":"","sources":["../../src/file-manager/upload-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,sBAAsB,EAG3B,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AAexB,+IAA+I;AAC/I,eAAO,MAAM,kBAAkB,GAC7B,OAAO,eAAe,EAAE,EACxB,kBAAkB,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,KACjE,iBAAiB,EAWf,CAAC;AAYN,kGAAkG;AAClG,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,GAC/B,MAAM,oBAAoB,EAC1B,SAAS,MAAM,KACd,MAA8B,CAAC;AAElC,mHAAmH;AACnH,eAAO,MAAM,uBAAuB,GAClC,OAAO,MAAM,KACZ;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAUpD,CAAC;AAgBF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,aAAa,oBAAoB,GAAG,IAAI,EACxC,eAAe,sBAAsB,GAAG,IAAI,EAC5C,kBAAkB,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,KACjE,iBAAiB,EAUnB,CAAC;AAEF,sGAAsG;AACtG,KAAK,iBAAiB,GAAG,OAAO,CAC9B,IAAI,CACF,mBAAmB,EACnB,qBAAqB,GAAG,uBAAuB,GAAG,wBAAwB,CAC3E,CACF,CAAC;AAEF,kDAAkD;AAClD,UAAU,yBAAyB;IACjC,4EAA4E;IAC5E,YAAY,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC5C,0EAA0E;IAC1E,cAAc,CAAC,EAAE,iBAAiB,CAAC;IACnC,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,uCAAuC;IACvC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACpC;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,mFAMtC,yBAAyB,KAAG,OAAO,CAAC,mBAAmB,CAAC,GAAG,SAoC7D,CAAC"}
|
|
@@ -1,17 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TransferQueueItemStatus as
|
|
1
|
+
import { FileDownloadStatus as e, FileUploadStatus as t } from "./upload-batch.js";
|
|
2
|
+
import { TransferQueueItemStatus as n } from "@epam/ai-dial-ui-kit";
|
|
3
3
|
//#region src/file-manager/upload-queue.ts
|
|
4
|
-
var
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
},
|
|
4
|
+
var r = {
|
|
5
|
+
[t.Queued]: n.InProgress,
|
|
6
|
+
[t.Uploading]: n.InProgress,
|
|
7
|
+
[t.Completed]: n.Success,
|
|
8
|
+
[t.Failed]: n.Failed,
|
|
9
|
+
[t.Cancelled]: n.Canceled
|
|
10
|
+
}, i = (e, n) => e.map((e) => ({
|
|
11
11
|
id: e.id,
|
|
12
12
|
name: e.name,
|
|
13
|
-
status:
|
|
14
|
-
percent: e.percent
|
|
15
|
-
|
|
13
|
+
status: r[e.status],
|
|
14
|
+
percent: e.percent,
|
|
15
|
+
message: e.status === t.Failed && e.failureReason != null ? n?.[e.failureReason] : void 0
|
|
16
|
+
})), a = {
|
|
17
|
+
[e.Downloading]: n.InProgress,
|
|
18
|
+
[e.Completed]: n.Success,
|
|
19
|
+
[e.Failed]: n.Failed,
|
|
20
|
+
[e.Cancelled]: n.Canceled
|
|
21
|
+
}, o = /* @__PURE__ */ function(e) {
|
|
22
|
+
return e.Upload = "upload", e.Download = "download", e;
|
|
23
|
+
}({}), s = (e, t) => `${e}:${t}`, c = (e) => {
|
|
24
|
+
let t = e.indexOf(":"), n = e.slice(0, t);
|
|
25
|
+
if (n === "upload" || n === "download") return {
|
|
26
|
+
kind: n,
|
|
27
|
+
entryId: e.slice(t + 1)
|
|
28
|
+
};
|
|
29
|
+
}, l = (t, n) => ({
|
|
30
|
+
id: s("download", t.id),
|
|
31
|
+
name: t.name,
|
|
32
|
+
status: a[t.status],
|
|
33
|
+
percent: t.percent,
|
|
34
|
+
message: t.status === e.Failed && t.failureReason != null ? n?.[t.failureReason] : void 0
|
|
35
|
+
}), u = (e, t, n) => [...i(e?.files ?? [], n).map((e) => ({
|
|
36
|
+
...e,
|
|
37
|
+
id: s("upload", e.id)
|
|
38
|
+
})), ...(t?.files ?? []).map((e) => l(e, n))], d = ({ uploadLabels: e, downloadLabels: t, mixedProgressLabel: n, uploadNames: r, downloadNames: i }) => {
|
|
39
|
+
if (!t || i.size === 0) return e;
|
|
40
|
+
let a = (e) => i.has(e) && !r.has(e), o = (e, t) => e && t ? (n) => a(n) ? t(n) : e(n) : e ?? t, s = r.size === 0 ? t.queueProgressAriaLabel ?? e?.queueProgressAriaLabel : n ?? e?.queueProgressAriaLabel, c = o(e?.cancelItemAriaLabel, t.cancelItemAriaLabel), l = o(e?.itemProgressAriaLabel, t.itemProgressAriaLabel);
|
|
41
|
+
return {
|
|
42
|
+
...e,
|
|
43
|
+
...c ? { cancelItemAriaLabel: c } : {},
|
|
44
|
+
...l ? { itemProgressAriaLabel: l } : {},
|
|
45
|
+
...s ? { queueProgressAriaLabel: s } : {}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
16
48
|
//#endregion
|
|
17
|
-
export {
|
|
49
|
+
export { o as TransferQueueRowKind, d as buildTransferQueueLabels, c as parseTransferQueueRowId, u as toTransferQueueItems, s as toTransferQueueRowId, i as toUploadQueueItems };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FileManagerGridRow } from '@epam/ai-dial-react-file-manager';
|
|
2
|
+
import { GridApi, IRowNode } from 'ag-grid-community';
|
|
3
|
+
/** Options accepted by `useGridEditingScroll`. */
|
|
4
|
+
export interface UseGridEditingScrollOptions {
|
|
5
|
+
/** Picks the row to scroll to among the rows newly added since the last `rowDataUpdated`. Defaults to the first row flagged `isTemporary`, or the first new row. */
|
|
6
|
+
resolveTargetNode?: (newNodes: IRowNode<FileManagerGridRow>[]) => IRowNode<FileManagerGridRow> | null;
|
|
7
|
+
}
|
|
8
|
+
/** Values returned by `useGridEditingScroll`. */
|
|
9
|
+
export interface UseGridEditingScrollResult {
|
|
10
|
+
/** Pass to `DialFileManager`'s `onGridApiChange` prop. */
|
|
11
|
+
handleGridApiChange: (api: GridApi<FileManagerGridRow>) => void;
|
|
12
|
+
/** Re-seeds the known-row-id set without scrolling — call on a data-source change such as a tab switch. */
|
|
13
|
+
reset: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `@epam/ai-dial-react-file-manager`'s `GridOptions` type does not forward raw AG Grid
|
|
17
|
+
* event callbacks (`onCellEditingStarted`/`onRowDataUpdated`), so this hook
|
|
18
|
+
* binds directly to the `GridApi` obtained via `DialFileManager`'s
|
|
19
|
+
* `onGridApiChange` prop and uses AG Grid's own `addEventListener` instead of
|
|
20
|
+
* a `gridOptions` fragment. Scrolls a newly inline-edited or newly-inserted
|
|
21
|
+
* row into view. `handleGridApiChange` takes the raw `GridApi` only to bind
|
|
22
|
+
* to `onGridApiChange` — the narrow AGENTS.md D9 exception for this hook —
|
|
23
|
+
* and never renders, themes, or otherwise exposes AG Grid beyond that one
|
|
24
|
+
* event-binding parameter.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useGridEditingScroll: ({ resolveTargetNode, }?: UseGridEditingScrollOptions) => UseGridEditingScrollResult;
|
|
27
|
+
//# sourceMappingURL=useGridEditingScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGridEditingScroll.d.ts","sourceRoot":"","sources":["../../../src/file-manager/useGridEditingScroll/useGridEditingScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAEV,OAAO,EACP,QAAQ,EAET,MAAM,mBAAmB,CAAC;AAmC3B,kDAAkD;AAClD,MAAM,WAAW,2BAA2B;IAC1C,oKAAoK;IACpK,iBAAiB,CAAC,EAAE,CAClB,QAAQ,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,KACrC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;CAC1C;AAOD,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC,0DAA0D;IAC1D,mBAAmB,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,2GAA2G;IAC3G,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,yBAElC,2BAAgC,KAAG,0BAiFrC,CAAC"}
|