@epam/ai-dial-chat-shared 1.3.0-dev.14 → 1.3.0-dev.142
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 +1 -1
- package/components/ConfirmationView/ConfirmationView.d.ts +59 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -0
- package/components/ConfirmationView/ConfirmationView.js +17 -16
- 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/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 +7 -0
- 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/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/ItemHeader/ItemHeader.module.scss.js +5 -4
- 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 +27 -27
- 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 +139 -0
- package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -0
- package/components/MarkdownRenderer/MarkdownRenderer.js +140 -133
- 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 +47 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -0
- package/components/MarkdownRenderer/Table/MarkdownTable.js +35 -31
- package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +14 -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 +14 -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/PanelEmptyState/PanelEmptyState.js +12 -9
- package/components/PanelEmptyState/PanelEmptyState.module.scss.js +3 -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 +27 -17
- 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/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 +65 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -0
- package/file-manager/DialFileManagerShell/DialFileManagerShell.js +297 -255
- package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +4 -0
- 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 +3 -6
- 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 +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 +11 -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/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/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/hooks/useUnsavedChangesGuard.js +1 -5
- package/index.css +3 -2
- package/index.d.ts +79 -3072
- package/index.d.ts.map +1 -0
- package/index.js +78 -74
- 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 +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 +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/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,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,aAAa;IACrB,6DAA6D;IAC7D,QAAQ,aAAa;IACrB,4DAA4D;IAC5D,SAAS,cAAc;IACvB,qEAAqE;IACrE,WAAW,gBAAgB;IAC3B,qEAAqE;IACrE,OAAO,YAAY;IACnB,yBAAyB;IACzB,OAAO,YAAY;CACpB;AAED,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,MAAM,EAAE,gBAAgB,CAAC;IACzB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC;AAED,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,mFAAmF;IACnF,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,mEAAmE;AACnE,oBAAY,kBAAkB;IAC5B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,qFAAqF;AACrF,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC;AAED,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC,sFAAsF;IACtF,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,yEAAyE;IACzE,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,sEAAsE;AACtE,eAAO,MAAM,oBAAoB,GAC/B,YAAY,sBAAsB,GAAG,IAAI,KACxC,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"}
|