@epam/ai-dial-chat-shared 1.2.0-dev.98 → 1.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/components/ConfirmationDialog/ConfirmationDialog.js +34 -0
  2. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.js +21 -0
  3. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +6 -0
  4. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +24 -0
  5. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -0
  6. package/components/ConfirmationView/ConfirmationFooter.js +42 -0
  7. package/components/ConfirmationView/ConfirmationView.js +39 -0
  8. package/components/ConfirmationView/ConfirmationView.module.scss.js +7 -0
  9. package/components/CopyButton/CopyButton.js +5 -5
  10. package/components/EntityHeader/EntityHeader.js +14 -13
  11. package/components/EntityTypeLabel/EntityTypeLabel.js +2 -2
  12. package/components/FeaturedChip/FeaturedChip.js +9 -14
  13. package/components/InitialsAvatar/InitialsAvatar.js +10 -27
  14. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +65 -64
  15. package/components/MarkdownRenderer/MDMessageViewer.js +25 -17
  16. package/components/MarkdownRenderer/MarkdownRenderer.js +119 -118
  17. package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +7 -7
  18. package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +2 -2
  19. package/components/MarkdownRenderer/PlainTextRenderer.js +21 -0
  20. package/components/MarkdownRenderer/Table/MarkdownTable.js +62 -65
  21. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +11 -11
  22. package/components/MarkdownRenderer/Table/TableHeader.js +18 -21
  23. package/components/MarkdownRenderer/ThinkingShimmer.js +14 -0
  24. package/components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js +3 -2
  25. package/components/PanelEmptyState/PanelEmptyState.js +2 -1
  26. package/components/TextRefinementField/TextRefinementField.js +86 -0
  27. package/constants/dial.js +2 -2
  28. package/constants/resizable-fields.js +2 -2
  29. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +248 -236
  30. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +17 -14
  31. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +17 -20
  32. package/file-manager/upload-batch.js +2 -2
  33. package/file-manager/upload-queue.js +17 -0
  34. package/file-manager.d.ts +25 -14
  35. package/file-manager.js +4 -3
  36. package/hooks/useTextRefinement.js +66 -0
  37. package/hooks/useUnsavedChangesGuard.js +30 -0
  38. package/index.css +2 -2
  39. package/index.d.ts +510 -46
  40. package/index.js +73 -62
  41. package/markdown.d.ts +64 -8
  42. package/markdown.js +5 -4
  43. package/models/chat.js +4 -2
  44. package/package.json +5 -5
  45. package/utils/entity-field-limits.js +4 -0
  46. package/utils/entity-type.js +15 -0
  47. package/utils/format-price.js +13 -9
  48. package/utils/is-skill-selection-unsupported.js +4 -0
  49. package/utils/syntax-highlighting.js +13 -0
  50. package/components/InitialsAvatar/InitialsAvatar.module.scss.js +0 -6
  51. package/file-manager/UploadProgressModal/UploadProgressModal.js +0 -50
package/index.js CHANGED
@@ -1,64 +1,75 @@
1
1
  import { ConversationTransferErrorCode as e, ConversationTransferJobStatus as t, ConversationTransferSubjectKind as n, ConversationTransferUnitKind as r, ConversationTransferWarningCode as i } from "./models/conversation-transfer.js";
2
2
  import { FilterTab as a } from "./models/conversation-classification.js";
3
- import { MessageRating as o, MessageRole as s, RequestStatus as c, StageStatus as l, StatusEvent as u } from "./models/chat.js";
4
- import { ResponseFormat as d } from "./models/deployment-features.js";
5
- import { AttachmentErrorReason as f, AttachmentType as p } from "./types/attachment.js";
6
- import { CatalogEntityType as m } from "./types/entity-type.js";
7
- import { FileExtension as h, MIMEType as g } from "./types/mime-type.js";
8
- import { CodeBlockTheme as _ } from "./types/code-editor.js";
9
- import { MIME_TYPE_ALIASES as v, MIME_TYPE_AUDIO_PREFIX as y, MIME_TYPE_EXT_MAP as b, MIME_TYPE_WILDCARD as x } from "./constants/mime-types.js";
10
- import { getAttachmentTypeFromMime as S, getBaseMimeType as C, inferMimeTypeFromPath as w, normalizeMimeType as T, stripUrlQueryAndFragment as E } from "./utils/mime-type.js";
11
- import { isAnnotationSelector as D, normalizePersistedHtmlTagAttachmentType as O, normalizeRawAnnotations as k } from "./utils/annotation.js";
12
- import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as A, getUtf8ByteLength as j, sanitizeConversationName as M, stripTrailingDots as N, truncateToUtf8Bytes as P } from "./utils/string-utils.js";
13
- import { mergeClasses as F } from "./utils/merge-class.js";
14
- import { buildCssVars as I } from "./utils/build-css-vars.js";
15
- import { isStatusMessage as L } from "./utils/message.js";
16
- import { messageAttachmentToDisplayAttachment as R, messageAttachmentsToDisplayAttachments as z } from "./utils/message-attachment-to-display.js";
17
- import { isAudioTranscriptionSupported as B } from "./utils/is-audio-transcription-supported.js";
18
- import { copyMarkdownAsRichText as V, copyToClipboard as H, markdownToRichTextHtml as U } from "./utils/copy-to-clipboard.js";
19
- import { formatLastUsed as W } from "./utils/format-last-used.js";
20
- import { formatFileSize as G } from "./utils/format-file-size.js";
21
- import { formatCost as K, formatPrice as q, formatUnitPrice as J } from "./utils/format-price.js";
22
- import { base64ToBlob as Y, downloadTextFile as X, ensureDownloadFilename as Z, getFileExtensionForLanguage as Q, triggerAnchorDownload as $, triggerBlobDownload as ee, tryBase64ToBytes as te } from "./utils/file-download.js";
23
- import { ENTITY_TYPE_BG_COLOR as ne, ENTITY_TYPE_COLOR as re } from "./constants/entity-colors.js";
24
- import { PROMPT_PARAM_DEFAULT_SEPARATOR as ie, PROMPT_PARAM_PATTERN as ae, PROMPT_VARIABLE_CLASS_NAME as oe, buildPromptParamDefaults as se, extractPromptParams as ce, rehypePromptVariables as le, resolvePromptParams as ue } from "./utils/prompt-variables.js";
25
- import { generateUUID as de } from "./utils/generate-uuid.js";
26
- import { BASE_LG_ICON_PROPS as fe, BASE_MD_ICON_PROPS as pe } from "./constants/icon.js";
27
- import { HIDDEN_FILE as me } from "./constants/dial.js";
28
- import { TAG_INPUT_TAG_CLASS_NAME as he } from "./constants/tag-input.js";
29
- import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as ge, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as _e, RESIZABLE_TEXTAREA_CLASS_NAME as ve } from "./constants/resizable-fields.js";
30
- import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as ye } from "./constants/markdown-editor.js";
31
- import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as be, SELECT_LIST_MAX_HEIGHT_PX as xe } from "./constants/select-list.js";
32
- import { DESKTOP_BREAKPOINT_PX as Se, DESKTOP_MEDIA_QUERY as Ce, MOBILE_MAX_WIDTH_PX as we, MOBILE_MEDIA_QUERY as Te } from "./constants/breakpoint.js";
33
- import { pickAvatarColor as Ee } from "./utils/avatar-color.js";
34
- import { extractInitials as De } from "./utils/initials.js";
35
- import { InitialsAvatar as Oe } from "./components/InitialsAvatar/InitialsAvatar.js";
36
- import { DeploymentIcon as ke } from "./components/DeploymentIcon/DeploymentIcon.js";
37
- import { CopyButton as Ae, CopyIconButton as je } from "./components/CopyButton/CopyButton.js";
38
- import { PanelEmptyState as Me } from "./components/PanelEmptyState/PanelEmptyState.js";
39
- import { ItemHeader as Ne } from "./components/ItemHeader/ItemHeader.js";
40
- import { EntityTypeLabel as Pe } from "./components/EntityTypeLabel/EntityTypeLabel.js";
41
- import { FeaturedChip as Fe } from "./components/FeaturedChip/FeaturedChip.js";
42
- import { EntityHeader as Ie } from "./components/EntityHeader/EntityHeader.js";
43
- import { ResourceSummary as Le } from "./components/ResourceSummary/ResourceSummary.js";
44
- import { TableHeader as Re } from "./components/MarkdownRenderer/Table/TableHeader.js";
45
- import { CHAT_SHARED_CLASS as ze } from "./constants/public-class-names.js";
46
- import { useCodeCopy as Be } from "./hooks/useCodeCopy.js";
47
- import { restrainedSyntaxTheme as Ve } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
48
- import { MarkdownCodeBlock as He } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
49
- import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as Ue, MARKDOWN_TABLE_CSV_MIME_TYPE as We, MarkdownTableCopyFormat as Ge, serializeMarkdownTableRows as Ke } from "./components/MarkdownRenderer/Table/table-serialization.js";
50
- import { MarkdownTable as qe } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
51
- import { MarkdownRenderer as Je, defaultMarkdownComponents as Ye } from "./components/MarkdownRenderer/MarkdownRenderer.js";
52
- import { COMPACT_MARKDOWN_CLASS_NAMES as Xe, DEFAULT_MARKDOWN_CLASS_NAMES as Ze } from "./components/MarkdownRenderer/markdown-class-names.js";
53
- import { MDMessageViewer as Qe } from "./components/MarkdownRenderer/MDMessageViewer.js";
54
- import { MarkdownWithPlaceholders as $e } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
55
- import { useCollapsedText as et } from "./hooks/useCollapsedText.js";
56
- import { useAvailableHeightCap as tt } from "./hooks/useAvailableHeightCap.js";
57
- import { useIsMobile as nt } from "./hooks/useIsMobile.js";
58
- import { DialFileManagerActionProfile as rt, DialFileManagerVariant as it } from "./file-manager/file-manager-variant.js";
59
- import { getParentFolderPath as at, isHiddenPath as ot } from "./file-manager/path.js";
60
- import { FileUploadStatus as st } from "./file-manager/upload-batch.js";
61
- import { useGridEditingScroll as ct } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
62
- import { OperationLoaderModal as lt } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
63
- import { UploadProgressModal as ut } from "./file-manager/UploadProgressModal/UploadProgressModal.js";
64
- export { f as AttachmentErrorReason, p as AttachmentType, fe as BASE_LG_ICON_PROPS, pe as BASE_MD_ICON_PROPS, ze as CHAT_SHARED_CLASS, Xe as COMPACT_MARKDOWN_CLASS_NAMES, m as CatalogEntityType, _ as CodeBlockTheme, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, Ae as CopyButton, je as CopyIconButton, Ze as DEFAULT_MARKDOWN_CLASS_NAMES, Ue as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, Se as DESKTOP_BREAKPOINT_PX, Ce as DESKTOP_MEDIA_QUERY, ke as DeploymentIcon, rt as DialFileManagerActionProfile, it as DialFileManagerVariant, ne as ENTITY_TYPE_BG_COLOR, re as ENTITY_TYPE_COLOR, Ie as EntityHeader, Pe as EntityTypeLabel, Fe as FeaturedChip, h as FileExtension, st as FileUploadStatus, a as FilterTab, me as HIDDEN_FILE, Oe as InitialsAvatar, Ne as ItemHeader, ge as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, ye as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, We as MARKDOWN_TABLE_CSV_MIME_TYPE, Qe as MDMessageViewer, g as MIMEType, v as MIME_TYPE_ALIASES, y as MIME_TYPE_AUDIO_PREFIX, b as MIME_TYPE_EXT_MAP, x as MIME_TYPE_WILDCARD, we as MOBILE_MAX_WIDTH_PX, Te as MOBILE_MEDIA_QUERY, He as MarkdownCodeBlock, Je as MarkdownRenderer, qe as MarkdownTable, Ge as MarkdownTableCopyFormat, $e as MarkdownWithPlaceholders, o as MessageRating, s as MessageRole, lt as OperationLoaderModal, A as PROHIBITED_CONVERSATION_NAME_CHARS_RE, ie as PROMPT_PARAM_DEFAULT_SEPARATOR, ae as PROMPT_PARAM_PATTERN, oe as PROMPT_VARIABLE_CLASS_NAME, Me as PanelEmptyState, _e as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, ve as RESIZABLE_TEXTAREA_CLASS_NAME, c as RequestStatus, Le as ResourceSummary, d as ResponseFormat, be as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, xe as SELECT_LIST_MAX_HEIGHT_PX, l as StageStatus, u as StatusEvent, he as TAG_INPUT_TAG_CLASS_NAME, Re as TableHeader, ut as UploadProgressModal, Y as base64ToBlob, I as buildCssVars, se as buildPromptParamDefaults, V as copyMarkdownAsRichText, H as copyToClipboard, Ye as defaultMarkdownComponents, X as downloadTextFile, Z as ensureDownloadFilename, De as extractInitials, ce as extractPromptParams, K as formatCost, G as formatFileSize, W as formatLastUsed, q as formatPrice, J as formatUnitPrice, de as generateUUID, S as getAttachmentTypeFromMime, C as getBaseMimeType, Q as getFileExtensionForLanguage, at as getParentFolderPath, j as getUtf8ByteLength, w as inferMimeTypeFromPath, D as isAnnotationSelector, B as isAudioTranscriptionSupported, ot as isHiddenPath, L as isStatusMessage, U as markdownToRichTextHtml, F as mergeClasses, R as messageAttachmentToDisplayAttachment, z as messageAttachmentsToDisplayAttachments, T as normalizeMimeType, O as normalizePersistedHtmlTagAttachmentType, k as normalizeRawAnnotations, Ee as pickAvatarColor, le as rehypePromptVariables, ue as resolvePromptParams, Ve as restrainedSyntaxTheme, M as sanitizeConversationName, Ke as serializeMarkdownTableRows, N as stripTrailingDots, E as stripUrlQueryAndFragment, $ as triggerAnchorDownload, ee as triggerBlobDownload, P as truncateToUtf8Bytes, te as tryBase64ToBytes, tt as useAvailableHeightCap, Be as useCodeCopy, et as useCollapsedText, ct as useGridEditingScroll, nt as useIsMobile };
3
+ import { BackgroundGenerationStatus as o, MessageRating as s, MessageRole as c, RequestStatus as l, StageStatus as u, StatusEvent as d } from "./models/chat.js";
4
+ import { ResponseFormat as f } from "./models/deployment-features.js";
5
+ import { AttachmentErrorReason as p, AttachmentType as m } from "./types/attachment.js";
6
+ import { CatalogEntityType as h } from "./types/entity-type.js";
7
+ import { FileExtension as g, MIMEType as _ } from "./types/mime-type.js";
8
+ import { CodeBlockTheme as v } from "./types/code-editor.js";
9
+ import { MIME_TYPE_ALIASES as y, MIME_TYPE_AUDIO_PREFIX as b, MIME_TYPE_EXT_MAP as x, MIME_TYPE_WILDCARD as S } from "./constants/mime-types.js";
10
+ import { getAttachmentTypeFromMime as C, getBaseMimeType as w, inferMimeTypeFromPath as T, normalizeMimeType as E, stripUrlQueryAndFragment as D } from "./utils/mime-type.js";
11
+ import { isAnnotationSelector as O, normalizePersistedHtmlTagAttachmentType as k, normalizeRawAnnotations as A } from "./utils/annotation.js";
12
+ import { PROHIBITED_CONVERSATION_NAME_CHARS_RE as j, getUtf8ByteLength as M, sanitizeConversationName as N, stripTrailingDots as P, truncateToUtf8Bytes as F } from "./utils/string-utils.js";
13
+ import { ENTITY_DESCRIPTION_MAX_LENGTH as I, ENTITY_INSTRUCTIONS_MAX_LENGTH as L, ENTITY_NAME_MAX_LENGTH as R, exceedsMaxLength as z, hasControlCharacters as B } from "./utils/entity-field-limits.js";
14
+ import { mergeClasses as V } from "./utils/merge-class.js";
15
+ import { buildCssVars as H } from "./utils/build-css-vars.js";
16
+ import { isStatusMessage as U } from "./utils/message.js";
17
+ import { messageAttachmentToDisplayAttachment as W, messageAttachmentsToDisplayAttachments as G } from "./utils/message-attachment-to-display.js";
18
+ import { isAudioTranscriptionSupported as K } from "./utils/is-audio-transcription-supported.js";
19
+ import { copyMarkdownAsRichText as q, copyToClipboard as J, markdownToRichTextHtml as Y } from "./utils/copy-to-clipboard.js";
20
+ import { formatLastUsed as X } from "./utils/format-last-used.js";
21
+ import { formatFileSize as Z } from "./utils/format-file-size.js";
22
+ import { formatCost as Q, formatPrice as $, formatUnitPrice as ee } from "./utils/format-price.js";
23
+ import { base64ToBlob as te, downloadTextFile as ne, ensureDownloadFilename as re, getFileExtensionForLanguage as ie, triggerAnchorDownload as ae, triggerBlobDownload as oe, tryBase64ToBytes as se } from "./utils/file-download.js";
24
+ import { isSyntaxHighlightingAllowed as ce } from "./utils/syntax-highlighting.js";
25
+ import { ENTITY_TYPE_BG_COLOR as le, ENTITY_TYPE_COLOR as ue } from "./constants/entity-colors.js";
26
+ import { PROMPT_PARAM_DEFAULT_SEPARATOR as de, PROMPT_PARAM_PATTERN as fe, PROMPT_VARIABLE_CLASS_NAME as pe, buildPromptParamDefaults as me, extractPromptParams as he, rehypePromptVariables as ge, resolvePromptParams as _e } from "./utils/prompt-variables.js";
27
+ import { generateUUID as ve } from "./utils/generate-uuid.js";
28
+ import { BASE_LG_ICON_PROPS as ye, BASE_MD_ICON_PROPS as be } from "./constants/icon.js";
29
+ import { HIDDEN_FILE as xe, PUBLIC_BUCKET as Se } from "./constants/dial.js";
30
+ import { TAG_INPUT_TAG_CLASS_NAME as Ce } from "./constants/tag-input.js";
31
+ import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as we, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as Te, RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE as Ee, RESIZABLE_TEXTAREA_CLASS_NAME as De } from "./constants/resizable-fields.js";
32
+ import { MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as Oe } from "./constants/markdown-editor.js";
33
+ import { SELECT_LIST_MAX_HEIGHT_CLASS_NAME as ke, SELECT_LIST_MAX_HEIGHT_PX as Ae } from "./constants/select-list.js";
34
+ import { DESKTOP_BREAKPOINT_PX as je, DESKTOP_MEDIA_QUERY as Me, MOBILE_MAX_WIDTH_PX as Ne, MOBILE_MEDIA_QUERY as Pe } from "./constants/breakpoint.js";
35
+ import { InitialsAvatar as Fe } from "./components/InitialsAvatar/InitialsAvatar.js";
36
+ import { DeploymentIcon as Ie } from "./components/DeploymentIcon/DeploymentIcon.js";
37
+ import { CopyButton as Le, CopyIconButton as Re } from "./components/CopyButton/CopyButton.js";
38
+ import { extractInitials as ze } from "./utils/initials.js";
39
+ import { pickAvatarColor as Be } from "./utils/avatar-color.js";
40
+ import { PanelEmptyState as Ve } from "./components/PanelEmptyState/PanelEmptyState.js";
41
+ import { ItemHeader as He } from "./components/ItemHeader/ItemHeader.js";
42
+ import { EntityTypeLabel as Ue } from "./components/EntityTypeLabel/EntityTypeLabel.js";
43
+ import { FeaturedChip as We } from "./components/FeaturedChip/FeaturedChip.js";
44
+ import { EntityHeader as Ge } from "./components/EntityHeader/EntityHeader.js";
45
+ import { ResourceSummary as Ke } from "./components/ResourceSummary/ResourceSummary.js";
46
+ import { ConfirmationIdentityCard as qe } from "./components/ConfirmationIdentityCard/ConfirmationIdentityCard.js";
47
+ import { ConfirmationIdentityRow as Je } from "./components/ConfirmationIdentityRow/ConfirmationIdentityRow.js";
48
+ import { ConfirmationView as Ye } from "./components/ConfirmationView/ConfirmationView.js";
49
+ import { ConfirmationFooter as Xe } from "./components/ConfirmationView/ConfirmationFooter.js";
50
+ import { ConfirmationDialog as Ze } from "./components/ConfirmationDialog/ConfirmationDialog.js";
51
+ import { TableHeader as Qe } from "./components/MarkdownRenderer/Table/TableHeader.js";
52
+ import { TextRefinementState as $e, useTextRefinement as et } from "./hooks/useTextRefinement.js";
53
+ import { TextRefinementField as tt } from "./components/TextRefinementField/TextRefinementField.js";
54
+ import { CHAT_SHARED_CLASS as nt } from "./constants/public-class-names.js";
55
+ import { useCodeCopy as rt } from "./hooks/useCodeCopy.js";
56
+ import { restrainedSyntaxTheme as it } from "./components/MarkdownRenderer/CodeBlock/syntax-theme.js";
57
+ import { MarkdownCodeBlock as at } from "./components/MarkdownRenderer/CodeBlock/CodeBlock.js";
58
+ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as ot, MARKDOWN_TABLE_CSV_MIME_TYPE as st, MarkdownTableCopyFormat as ct, serializeMarkdownTableRows as lt } from "./components/MarkdownRenderer/Table/table-serialization.js";
59
+ import { MarkdownTable as ut } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
60
+ import { MarkdownRenderer as dt, defaultMarkdownComponents as ft } from "./components/MarkdownRenderer/MarkdownRenderer.js";
61
+ import { COMPACT_MARKDOWN_CLASS_NAMES as pt, DEFAULT_MARKDOWN_CLASS_NAMES as mt } from "./components/MarkdownRenderer/markdown-class-names.js";
62
+ import { PlainTextRenderer as ht } from "./components/MarkdownRenderer/PlainTextRenderer.js";
63
+ import { MDMessageViewer as gt } from "./components/MarkdownRenderer/MDMessageViewer.js";
64
+ import { MarkdownWithPlaceholders as _t } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
65
+ import { useCollapsedText as vt } from "./hooks/useCollapsedText.js";
66
+ import { useAvailableHeightCap as yt } from "./hooks/useAvailableHeightCap.js";
67
+ import { useIsMobile as bt } from "./hooks/useIsMobile.js";
68
+ import { useUnsavedChangesGuard as xt } from "./hooks/useUnsavedChangesGuard.js";
69
+ import { DialFileManagerActionProfile as St, DialFileManagerVariant as Ct } from "./file-manager/file-manager-variant.js";
70
+ import { getParentFolderPath as wt, isHiddenPath as Tt } from "./file-manager/path.js";
71
+ import { FileUploadStatus as Et, isUploadInProgress as Dt } from "./file-manager/upload-batch.js";
72
+ import { useGridEditingScroll as Ot } from "./file-manager/useGridEditingScroll/useGridEditingScroll.js";
73
+ import { OperationLoaderModal as kt } from "./file-manager/OperationLoaderModal/OperationLoaderModal.js";
74
+ import { isSkillSelectionUnsupported as At } from "./utils/is-skill-selection-unsupported.js";
75
+ export { p as AttachmentErrorReason, m as AttachmentType, ye as BASE_LG_ICON_PROPS, be as BASE_MD_ICON_PROPS, o as BackgroundGenerationStatus, nt as CHAT_SHARED_CLASS, pt as COMPACT_MARKDOWN_CLASS_NAMES, h as CatalogEntityType, v as CodeBlockTheme, Ze as ConfirmationDialog, Xe as ConfirmationFooter, qe as ConfirmationIdentityCard, Je as ConfirmationIdentityRow, Ye as ConfirmationView, e as ConversationTransferErrorCode, t as ConversationTransferJobStatus, n as ConversationTransferSubjectKind, r as ConversationTransferUnitKind, i as ConversationTransferWarningCode, Le as CopyButton, Re as CopyIconButton, mt as DEFAULT_MARKDOWN_CLASS_NAMES, ot as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, je as DESKTOP_BREAKPOINT_PX, Me as DESKTOP_MEDIA_QUERY, Ie as DeploymentIcon, St as DialFileManagerActionProfile, Ct as DialFileManagerVariant, I as ENTITY_DESCRIPTION_MAX_LENGTH, L as ENTITY_INSTRUCTIONS_MAX_LENGTH, R as ENTITY_NAME_MAX_LENGTH, le as ENTITY_TYPE_BG_COLOR, ue as ENTITY_TYPE_COLOR, Ge as EntityHeader, Ue as EntityTypeLabel, We as FeaturedChip, g as FileExtension, Et as FileUploadStatus, a as FilterTab, xe as HIDDEN_FILE, Fe as InitialsAvatar, He as ItemHeader, we as MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME, Te as MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME, Oe as MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME, st as MARKDOWN_TABLE_CSV_MIME_TYPE, gt as MDMessageViewer, _ as MIMEType, y as MIME_TYPE_ALIASES, b as MIME_TYPE_AUDIO_PREFIX, x as MIME_TYPE_EXT_MAP, S as MIME_TYPE_WILDCARD, Ne as MOBILE_MAX_WIDTH_PX, Pe as MOBILE_MEDIA_QUERY, at as MarkdownCodeBlock, dt as MarkdownRenderer, ut as MarkdownTable, ct as MarkdownTableCopyFormat, _t as MarkdownWithPlaceholders, s as MessageRating, c as MessageRole, kt as OperationLoaderModal, j as PROHIBITED_CONVERSATION_NAME_CHARS_RE, de as PROMPT_PARAM_DEFAULT_SEPARATOR, fe as PROMPT_PARAM_PATTERN, pe as PROMPT_VARIABLE_CLASS_NAME, Se as PUBLIC_BUCKET, Ve as PanelEmptyState, ht as PlainTextRenderer, Ee as RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE, De as RESIZABLE_TEXTAREA_CLASS_NAME, l as RequestStatus, Ke as ResourceSummary, f as ResponseFormat, ke as SELECT_LIST_MAX_HEIGHT_CLASS_NAME, Ae as SELECT_LIST_MAX_HEIGHT_PX, u as StageStatus, d as StatusEvent, Ce as TAG_INPUT_TAG_CLASS_NAME, Qe as TableHeader, tt as TextRefinementField, $e as TextRefinementState, te as base64ToBlob, H as buildCssVars, me as buildPromptParamDefaults, q as copyMarkdownAsRichText, J as copyToClipboard, ft as defaultMarkdownComponents, ne as downloadTextFile, re as ensureDownloadFilename, z as exceedsMaxLength, ze as extractInitials, he as extractPromptParams, Q as formatCost, Z as formatFileSize, X as formatLastUsed, $ as formatPrice, ee as formatUnitPrice, ve as generateUUID, C as getAttachmentTypeFromMime, w as getBaseMimeType, ie as getFileExtensionForLanguage, wt as getParentFolderPath, M as getUtf8ByteLength, B as hasControlCharacters, T as inferMimeTypeFromPath, O as isAnnotationSelector, K as isAudioTranscriptionSupported, Tt as isHiddenPath, At as isSkillSelectionUnsupported, U as isStatusMessage, ce as isSyntaxHighlightingAllowed, Dt as isUploadInProgress, Y as markdownToRichTextHtml, V as mergeClasses, W as messageAttachmentToDisplayAttachment, G as messageAttachmentsToDisplayAttachments, E as normalizeMimeType, k as normalizePersistedHtmlTagAttachmentType, A as normalizeRawAnnotations, Be as pickAvatarColor, ge as rehypePromptVariables, _e as resolvePromptParams, it as restrainedSyntaxTheme, N as sanitizeConversationName, lt as serializeMarkdownTableRows, P as stripTrailingDots, D as stripUrlQueryAndFragment, ae as triggerAnchorDownload, oe as triggerBlobDownload, F as truncateToUtf8Bytes, se as tryBase64ToBytes, yt as useAvailableHeightCap, rt as useCodeCopy, vt as useCollapsedText, Ot as useGridEditingScroll, bt as useIsMobile, et as useTextRefinement, xt as useUnsavedChangesGuard };
package/markdown.d.ts CHANGED
@@ -123,11 +123,6 @@ export declare interface MarkdownRendererClassNames extends MarkdownTableClassNa
123
123
  strong?: string;
124
124
  /** Typography class for `<em>`. Defaults to `'italic'`. */
125
125
  em?: string;
126
- /**
127
- * @deprecated The `<pre>` wrapper is now a fragment passthrough; this class no longer applies
128
- * to fenced code blocks. Migrate to `codeBlockContainer` for the block container.
129
- */
130
- codeBlock?: string;
131
126
  /** Extra classes on the {@link MarkdownCodeBlock} outer container. */
132
127
  codeBlockContainer?: string;
133
128
  /** Extra classes on the {@link MarkdownCodeBlock} header bar. */
@@ -172,7 +167,7 @@ export declare interface MarkdownRendererColors {
172
167
  blockquoteText?: string;
173
168
  /** Text color for `<a>` links. Defaults to `--text-accent`. */
174
169
  linkText?: string;
175
- /** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus-black`. */
170
+ /** Focus-visible outline color for `<a>` links. Defaults to `--stroke-focus`. */
176
171
  linkFocus?: string;
177
172
  /** Text color for `<th>` table header cells. Defaults to `--text-secondary`. */
178
173
  tableHeaderText?: string;
@@ -219,6 +214,8 @@ export declare interface MarkdownRendererProps {
219
214
  codeBlockCopyLabel?: string;
220
215
  /** Accessible label for the copy button after copying. Defaults to `'Copied!'`. */
221
216
  codeBlockCopiedLabel?: string;
217
+ /** Accessible label for the download button in code blocks. Defaults to `'Download code'`. */
218
+ codeBlockDownloadLabel?: string;
222
219
  /** Syntax highlight color theme for code blocks and tables. Defaults to `'dark'`. */
223
220
  codeBlockTheme?: CodeBlockTheme;
224
221
  /** Color overrides applied as CSS custom properties. */
@@ -260,7 +257,7 @@ export declare interface MarkdownTableColors {
260
257
  border?: string;
261
258
  /** Scrollbar thumb/track color. */
262
259
  scrollbar?: string;
263
- /** Edge-fade mask color. */
260
+ /** Edge-fade mask color; only its alpha is used. Defaults to `--stroke-focus-black`. */
264
261
  fade?: string;
265
262
  /** Divider color between rows. Defaults to `--stroke-tertiary`. */
266
263
  rowDivider?: string;
@@ -315,15 +312,32 @@ export declare interface MarkdownWithPlaceholdersProps {
315
312
  content: string;
316
313
  /** Typography class overrides applied to `<h1>`–`<h6>`. Defaults to no override. */
317
314
  headingClassName?: string;
315
+ /** Accessible label for the copy button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Copy code'`. */
316
+ codeBlockCopyLabel?: string;
317
+ /** Status announced after a code block has been copied. Forwarded to {@link MarkdownRenderer}; defaults to `'Copied!'`. */
318
+ codeBlockCopiedLabel?: string;
319
+ /** Accessible label for the download button in code blocks. Forwarded to {@link MarkdownRenderer}; defaults to `'Download code'`. */
320
+ codeBlockDownloadLabel?: string;
321
+ /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable table'`. */
322
+ tableScrollRegionAriaLabel?: string;
323
+ /** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}; defaults to `'Scrollable formula'`. */
324
+ mathScrollRegionAriaLabel?: string;
318
325
  }
319
326
 
320
- /** Renders assistant message content as formatted markdown. */
327
+ /** Renders assistant message content as formatted markdown, or as escaped plain text when `isPlainText` is set. */
321
328
  export declare const MDMessageViewer: FC<MDMessageViewerProps>;
322
329
 
323
330
  /** Props for the {@link MDMessageViewer} markdown renderer. */
324
331
  declare interface MDMessageViewerProps {
325
332
  /** Raw markdown string to render. */
326
333
  content: string;
334
+ /**
335
+ * Renders `content` verbatim as escaped plain text instead of running the
336
+ * Markdown pipeline — the conversation's `plain_text` response format.
337
+ * Markdown-only props (`components`, `urlTransform`, the code-block and
338
+ * table labels) do not apply while it is set. Defaults to `false`.
339
+ */
340
+ isPlainText?: boolean;
327
341
  /** Enables gradual reveal for appended streaming content. */
328
342
  isStreaming?: boolean;
329
343
  /**
@@ -346,6 +360,8 @@ declare interface MDMessageViewerProps {
346
360
  codeBlockCopyLabel?: string;
347
361
  /** Accessible label for the copy button after copying. Forwarded to {@link MarkdownRenderer}. */
348
362
  codeBlockCopiedLabel?: string;
363
+ /** Accessible label for the code-block download button. Forwarded to {@link MarkdownRenderer}. */
364
+ codeBlockDownloadLabel?: string;
349
365
  /** Syntax highlight color theme for code blocks. Forwarded to {@link MarkdownRenderer}. */
350
366
  codeBlockTheme?: CodeBlockTheme;
351
367
  /** Localized labels for Markdown table actions. Forwarded to {@link MarkdownRenderer}. */
@@ -355,6 +371,8 @@ declare interface MDMessageViewerProps {
355
371
  tableOnOpenInCanvas?: (markdown: string) => void;
356
372
  /** Accessible label for a table's scrollable region. Forwarded to {@link MarkdownRenderer}. */
357
373
  tableScrollRegionAriaLabel?: string;
374
+ /** Accessible label for a block formula's scrollable region. Forwarded to {@link MarkdownRenderer}. */
375
+ mathScrollRegionAriaLabel?: string;
358
376
  /**
359
377
  * Per-element typography classes. Defaults to {@link DEFAULT_MARKDOWN_CLASS_NAMES};
360
378
  * pass {@link COMPACT_MARKDOWN_CLASS_NAMES} for the smaller body scale. Give a
@@ -363,6 +381,44 @@ declare interface MDMessageViewerProps {
363
381
  classNames?: MarkdownRendererClassNames;
364
382
  }
365
383
 
384
+ /**
385
+ * Renders message text as plain text: no Markdown pipeline, no raw HTML, no
386
+ * syntax highlighting. The text is a React text child, so it is escaped by
387
+ * construction — a table, a heading, or `**bold**` reaches the reader exactly
388
+ * as the model emitted it, which is what a conversation's `plain_text`
389
+ * response format promises.
390
+ *
391
+ * Lives beside {@link MarkdownRenderer} because it is the other half of the
392
+ * same choice: both render an assistant message body, and both are selected
393
+ * by `MDMessageViewer` from the conversation's response format.
394
+ */
395
+ export declare const PlainTextRenderer: FC<PlainTextRendererProps>;
396
+
397
+ /** Props for {@link PlainTextRenderer}. */
398
+ export declare interface PlainTextRendererProps {
399
+ /** Message text. Rendered verbatim — never parsed as Markdown or HTML. */
400
+ content: string;
401
+ /** Classes applied to the renderer root. */
402
+ containerClassName?: string;
403
+ /** When true, appended content is revealed gradually for smoother streaming updates. */
404
+ isStreaming?: boolean;
405
+ /** Reveal speed used while `isStreaming` is true. Defaults to 120 characters per second. */
406
+ streamCharactersPerSecond?: number;
407
+ /**
408
+ * Typography classes. Only `p` is read — the single paragraph the renderer
409
+ * emits — so the same object a Markdown message is styled with keeps both
410
+ * formats on one type scale.
411
+ */
412
+ classNames?: Pick<MarkdownRendererClassNames, 'p'>;
413
+ /**
414
+ * Label shown with a shimmer animation while `isStreaming` is true and no
415
+ * content has arrived yet. Defaults to `'Thinking'`.
416
+ */
417
+ thinkingLabel?: string;
418
+ /** Color overrides applied as CSS custom properties. */
419
+ colors?: Pick<MarkdownRendererColors, 'thinkingPrimary' | 'thinkingSecondary'>;
420
+ }
421
+
366
422
  /** Style map consumed by `react-syntax-highlighter`'s `Prism` renderer. */
367
423
  declare type PrismStyleMap = Record<string, CSSProperties>;
368
424
 
package/markdown.js CHANGED
@@ -6,7 +6,8 @@ import { DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME as i, MARKDOWN_TABLE_CSV_MIME_
6
6
  import { MarkdownTable as c } from "./components/MarkdownRenderer/Table/MarkdownTable.js";
7
7
  import { MarkdownRenderer as l, defaultMarkdownComponents as u } from "./components/MarkdownRenderer/MarkdownRenderer.js";
8
8
  import { COMPACT_MARKDOWN_CLASS_NAMES as d, DEFAULT_MARKDOWN_CLASS_NAMES as f } from "./components/MarkdownRenderer/markdown-class-names.js";
9
- import { MDMessageViewer as p } from "./components/MarkdownRenderer/MDMessageViewer.js";
10
- import { MarkdownWithPlaceholders as m } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
11
- import { useCollapsedText as h } from "./hooks/useCollapsedText.js";
12
- export { e as CHAT_SHARED_CLASS, d as COMPACT_MARKDOWN_CLASS_NAMES, f as DEFAULT_MARKDOWN_CLASS_NAMES, i as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, a as MARKDOWN_TABLE_CSV_MIME_TYPE, p as MDMessageViewer, r as MarkdownCodeBlock, l as MarkdownRenderer, c as MarkdownTable, o as MarkdownTableCopyFormat, m as MarkdownWithPlaceholders, u as defaultMarkdownComponents, n as restrainedSyntaxTheme, s as serializeMarkdownTableRows, t as useCodeCopy, h as useCollapsedText };
9
+ import { PlainTextRenderer as p } from "./components/MarkdownRenderer/PlainTextRenderer.js";
10
+ import { MDMessageViewer as m } from "./components/MarkdownRenderer/MDMessageViewer.js";
11
+ import { MarkdownWithPlaceholders as h } from "./components/MarkdownWithPlaceholders/MarkdownWithPlaceholders.js";
12
+ import { useCollapsedText as g } from "./hooks/useCollapsedText.js";
13
+ export { e as CHAT_SHARED_CLASS, d as COMPACT_MARKDOWN_CLASS_NAMES, f as DEFAULT_MARKDOWN_CLASS_NAMES, i as DEFAULT_MARKDOWN_TABLE_DOWNLOAD_FILENAME, a as MARKDOWN_TABLE_CSV_MIME_TYPE, m as MDMessageViewer, r as MarkdownCodeBlock, l as MarkdownRenderer, c as MarkdownTable, o as MarkdownTableCopyFormat, h as MarkdownWithPlaceholders, p as PlainTextRenderer, u as defaultMarkdownComponents, n as restrainedSyntaxTheme, s as serializeMarkdownTableRows, t as useCodeCopy, g as useCollapsedText };
package/models/chat.js CHANGED
@@ -6,9 +6,11 @@ var e = /* @__PURE__ */ function(e) {
6
6
  }({}), n = /* @__PURE__ */ function(e) {
7
7
  return e.Completed = "completed", e.Failed = "failed", e;
8
8
  }({}), r = /* @__PURE__ */ function(e) {
9
- return e.ModelChanged = "model_changed", e;
9
+ return e.Pending = "pending", e.Completed = "completed", e.Stopped = "stopped", e.Failed = "failed", e;
10
10
  }({}), i = /* @__PURE__ */ function(e) {
11
+ return e.ModelChanged = "model_changed", e;
12
+ }({}), a = /* @__PURE__ */ function(e) {
11
13
  return e.Idle = "idle", e.Loading = "loading", e.Error = "error", e;
12
14
  }({});
13
15
  //#endregion
14
- export { t as MessageRating, e as MessageRole, i as RequestStatus, n as StageStatus, r as StatusEvent };
16
+ export { r as BackgroundGenerationStatus, t as MessageRating, e as MessageRole, a as RequestStatus, n as StageStatus, i as StatusEvent };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-shared",
3
3
  "description": "Shared domain models, utilities, and UI components for AI DIAL Chat libraries",
4
- "version": "1.2.0-dev.98",
4
+ "version": "1.2.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "^19.2.8",
35
- "@epam/ai-dial-ui-kit": "^0.15.0-dev.12",
36
- "@epam/ai-dial-react-file-manager": "^0.3.0-dev.4",
35
+ "@epam/ai-dial-ui-kit": "^0.15.0",
36
+ "@epam/ai-dial-react-file-manager": "^0.3.0",
37
37
  "ag-grid-community": "^35.3.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
@@ -47,8 +47,8 @@
47
47
  "dependencies": {
48
48
  "@tabler/icons-react": "^3.44.0",
49
49
  "classnames": "2.5.1",
50
- "dompurify": "3.4.15",
51
- "katex": "^0.16.22",
50
+ "dompurify": "3.4.16",
51
+ "katex": "^0.19.0",
52
52
  "react-markdown": "^10.1.0",
53
53
  "react-syntax-highlighter": "^16.1.1",
54
54
  "rehype-katex": "^7.0.1",
@@ -0,0 +1,4 @@
1
+ //#region src/utils/entity-field-limits.ts
2
+ var e = 256, t = 2e3, n = 5e4, r = /\p{Cc}/u, i = (e, t) => e.length > t, a = (e) => r.test(e);
3
+ //#endregion
4
+ export { t as ENTITY_DESCRIPTION_MAX_LENGTH, n as ENTITY_INSTRUCTIONS_MAX_LENGTH, e as ENTITY_NAME_MAX_LENGTH, i as exceedsMaxLength, a as hasControlCharacters };
@@ -0,0 +1,15 @@
1
+ import { CatalogEntityType as e } from "../types/entity-type.js";
2
+ import { BadgeColor as t } from "@epam/ai-dial-ui-kit";
3
+ //#region src/utils/entity-type.ts
4
+ var n = (n) => {
5
+ switch (n) {
6
+ case e.Agent: return t.Green;
7
+ case e.Skill: return t.Violet;
8
+ case e.Toolset: return t.Brown;
9
+ case e.Prompt: return t.Indigo;
10
+ case e.Model:
11
+ default: return t.Blue;
12
+ }
13
+ };
14
+ //#endregion
15
+ export { n as getEntityTypeBadgeColor };
@@ -1,18 +1,22 @@
1
1
  //#region src/utils/format-price.ts
2
- var e = "token", t = 1e6, n = "en-US", r = new Intl.NumberFormat(n, {
2
+ var e = "token", t = 1e6, n = {
3
+ token: "tokens",
4
+ char_without_whitespace: "chars without whitespace"
5
+ }, r = "en-US", i = new Intl.NumberFormat(r, {
3
6
  style: "currency",
4
7
  currency: "USD",
5
8
  minimumFractionDigits: 0,
6
9
  maximumFractionDigits: 2
7
- }), i = new Intl.NumberFormat(n, {
10
+ }), a = new Intl.NumberFormat(r, {
8
11
  style: "currency",
9
12
  currency: "USD",
10
- minimumFractionDigits: 0,
11
- maximumFractionDigits: 6
12
- }), a = (e) => r.format(e), o = (e) => e !== 0 && Math.abs(e) < 1 ? i.format(e) : a(e), s = (n, r) => {
13
- if (n == null) return;
14
- let i = Number(n);
15
- return n.trim() === "" || !Number.isFinite(i) ? n : r == null || r.toLowerCase() === e ? `${o(i * t)}/M tokens` : `${o(i)}/${r.replace(/_/g, " ")}`;
13
+ maximumSignificantDigits: 6
14
+ }), o = (e) => i.format(e), s = (e) => e !== 0 && Math.abs(e) < 1 ? a.format(e) : o(e), c = (r, i) => {
15
+ if (r == null) return;
16
+ let a = Number(r);
17
+ if (r.trim() === "" || !Number.isFinite(a)) return r;
18
+ let o = (i ?? e).toLowerCase(), c = n[o];
19
+ return c == null ? `${s(a)}/${o.replace(/_/g, " ")}` : `${s(a * t)}/M ${c}`;
16
20
  };
17
21
  //#endregion
18
- export { a as formatCost, o as formatPrice, s as formatUnitPrice };
22
+ export { o as formatCost, s as formatPrice, c as formatUnitPrice };
@@ -0,0 +1,4 @@
1
+ //#region src/utils/is-skill-selection-unsupported.ts
2
+ var e = (e, t) => !!e?.trim() && t !== !0;
3
+ //#endregion
4
+ export { e as isSkillSelectionUnsupported };
@@ -0,0 +1,13 @@
1
+ //#region src/utils/syntax-highlighting.ts
2
+ var e = 5e4, t = 2e3, n = (n) => {
3
+ if (n.length > e) return !1;
4
+ let r = 0;
5
+ for (let e = 0; e < n.length; e++) {
6
+ let i = n[e];
7
+ if (i === "\n" || i === "\r") r = 0;
8
+ else if (++r > t) return !1;
9
+ }
10
+ return !0;
11
+ };
12
+ //#endregion
13
+ export { n as isSyntaxHighlightingAllowed };
@@ -1,6 +0,0 @@
1
- var e = {
2
- badge: "_badge_1ko75_1",
3
- initials: "_initials_1ko75_5"
4
- };
5
- //#endregion
6
- export { e as default };
@@ -1,50 +0,0 @@
1
- import { DialFileName as e, ElementSize as t, NeutralButton as n, Popup as r, ProgressBar as i } from "@epam/ai-dial-ui-kit";
2
- import { memo as a, useCallback as o } from "react";
3
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
- //#region src/file-manager/UploadProgressModal/UploadProgressModal.tsx
5
- var l = ({ batchState: a, uploadProgressTitle: l, uploadProgressText: u, cancelLabel: d, onCancel: f }) => {
6
- let { files: p } = a, m = o((e, n) => n === void 0 ? null : /* @__PURE__ */ s(i, {
7
- value: n,
8
- size: t.Small,
9
- "aria-label": e,
10
- "data-qa": "uploading-indicator"
11
- }), []);
12
- return /* @__PURE__ */ s(r, {
13
- className: "!h-fit !max-h-full !w-[400px] mobile:!w-full desktop:!max-h-[693px]",
14
- open: a.isOpen,
15
- closeOnOutsideClick: !1,
16
- hideClose: !0,
17
- onClose: f,
18
- footer: /* @__PURE__ */ s("div", {
19
- className: "flex justify-end gap-2 px-6 py-4",
20
- children: /* @__PURE__ */ s(n, {
21
- label: d,
22
- onClick: f
23
- })
24
- }),
25
- header: /* @__PURE__ */ c("div", {
26
- className: "flex flex-col gap-2",
27
- children: [/* @__PURE__ */ s("div", { children: l }), /* @__PURE__ */ s("div", {
28
- className: "dial-small-text text-secondary",
29
- "data-qa": "uploading-items-count",
30
- children: u
31
- })]
32
- }),
33
- children: /* @__PURE__ */ s("div", {
34
- className: "flex h-full max-h-full flex-col gap-4 px-6",
35
- children: /* @__PURE__ */ s("div", {
36
- className: "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",
37
- children: p.map((t) => /* @__PURE__ */ s("div", {
38
- className: "rounded bg-layer-sunken px-3 py-2",
39
- children: /* @__PURE__ */ s(e, {
40
- name: t.name,
41
- details: m(t.name, t.percent)
42
- })
43
- }, t.id))
44
- })
45
- })
46
- });
47
- };
48
- a(l);
49
- //#endregion
50
- export { l as UploadProgressModal };