@epam/ai-dial-chat-shared 1.3.0-dev.33 → 1.3.0-dev.331
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/ActionMenu/ActionMenu.d.ts +26 -0
- package/components/ActionMenu/ActionMenu.d.ts.map +1 -0
- package/components/ActionMenu/ActionMenu.js +50 -0
- 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/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts +31 -0
- package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts.map +1 -0
- package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js +36 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +52 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -0
- package/components/DeleteConfirmationView/DeleteConfirmationView.js +36 -27
- 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/FeaturedChip/FeaturedChip.d.ts +16 -0
- package/components/FeaturedChip/FeaturedChip.d.ts.map +1 -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 +28 -0
- package/components/NewVersionAlert/NewVersionAlert.module.scss.js +4 -0
- package/components/NotificationStack/NotificationStack.d.ts +48 -0
- package/components/NotificationStack/NotificationStack.d.ts.map +1 -0
- package/components/NotificationStack/NotificationStack.js +111 -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 +15 -0
- package/constants/breakpoint.d.ts.map +1 -0
- package/constants/breakpoint.js +2 -2
- 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/useIsPhone.d.ts +3 -0
- package/hooks/useIsPhone.d.ts.map +1 -0
- package/hooks/useIsPhone.js +13 -0
- package/hooks/useIsTablet.d.ts +3 -0
- package/hooks/useIsTablet.d.ts.map +1 -0
- package/hooks/useIsTablet.js +13 -0
- 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 +89 -3167
- package/index.d.ts.map +1 -0
- package/index.js +88 -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/dom.d.ts +8 -0
- package/utils/dom.d.ts.map +1 -0
- package/utils/dom.js +10 -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,111 @@
|
|
|
1
|
+
import { mergeClasses as e } from "../../utils/merge-class.js";
|
|
2
|
+
import { copyToClipboard as t } from "../../utils/copy-to-clipboard.js";
|
|
3
|
+
import { DIAL_ICON_SIZE as n, DIAL_KIT_ICON_STROKE as r, GhostIconButton as i, LiveRegion as a, LiveRegionElement as o, Notification as s } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { memo as c, useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
5
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
|
+
import { IconCopy as _ } from "@tabler/icons-react";
|
|
7
|
+
import { createPortal as v } from "react-dom";
|
|
8
|
+
//#region src/components/NotificationStack/NotificationStack.tsx
|
|
9
|
+
var y = 2e3, b = "pointer-events-none fixed inset-x-0 bottom-[calc(1.5rem+env(safe-area-inset-bottom))] z-70 flex max-h-[calc(100dvh-3rem)] flex-col items-center gap-2 overflow-y-auto px-4 desktop:inset-s-auto desktop:me-6 desktop:w-[min(600px,calc(100vw-3rem))] desktop:items-end desktop:px-0", x = ({ requestId: s, labels: c, className: u }) => {
|
|
10
|
+
let [d, f] = p("idle");
|
|
11
|
+
l(() => {
|
|
12
|
+
if (d === "idle") return;
|
|
13
|
+
let e = window.setTimeout(() => f("idle"), y);
|
|
14
|
+
return () => window.clearTimeout(e);
|
|
15
|
+
}, [d]);
|
|
16
|
+
let m = async () => {
|
|
17
|
+
try {
|
|
18
|
+
let e = await t(s);
|
|
19
|
+
f(e ? "copied" : "failed");
|
|
20
|
+
} catch {
|
|
21
|
+
f("failed");
|
|
22
|
+
}
|
|
23
|
+
}, v = "";
|
|
24
|
+
return d === "copied" ? v = c.requestIdCopied : d === "failed" && (v = c.requestIdCopyFailed), /* @__PURE__ */ g("div", {
|
|
25
|
+
className: e("mt-1 flex min-w-0 items-center gap-1", u),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ g("span", {
|
|
28
|
+
className: "text-start",
|
|
29
|
+
children: [c.requestId, ":"]
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ h("span", {
|
|
32
|
+
dir: "ltr",
|
|
33
|
+
className: "min-w-0 truncate",
|
|
34
|
+
children: s
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ h(i, {
|
|
37
|
+
icon: /* @__PURE__ */ h(_, {
|
|
38
|
+
size: n.SM,
|
|
39
|
+
"aria-hidden": !0,
|
|
40
|
+
stroke: r
|
|
41
|
+
}),
|
|
42
|
+
"aria-label": c.copyRequestIdAriaLabel,
|
|
43
|
+
onClick: () => void m()
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ h(a, {
|
|
46
|
+
visuallyHidden: !0,
|
|
47
|
+
as: o.Span,
|
|
48
|
+
children: v
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}, S = c(({ item: e, onDismiss: t, dismissDelayMs: n, labels: r, requestIdClassName: i }) => {
|
|
53
|
+
l(() => {
|
|
54
|
+
if (e.requestId || e.action) return;
|
|
55
|
+
let r = setTimeout(() => t(e.id), n);
|
|
56
|
+
return () => clearTimeout(r);
|
|
57
|
+
}, [
|
|
58
|
+
e.id,
|
|
59
|
+
e.requestId,
|
|
60
|
+
e.action,
|
|
61
|
+
t,
|
|
62
|
+
n
|
|
63
|
+
]);
|
|
64
|
+
let a = d(() => /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
|
|
65
|
+
className: "max-h-[30vh] overflow-y-auto wrap-anywhere",
|
|
66
|
+
children: e.message
|
|
67
|
+
}), e.requestId && /* @__PURE__ */ h(x, {
|
|
68
|
+
requestId: e.requestId,
|
|
69
|
+
labels: r,
|
|
70
|
+
className: i
|
|
71
|
+
})] }), [
|
|
72
|
+
e.message,
|
|
73
|
+
e.requestId,
|
|
74
|
+
r,
|
|
75
|
+
i
|
|
76
|
+
]);
|
|
77
|
+
return /* @__PURE__ */ h(s, {
|
|
78
|
+
className: "pointer-events-auto w-full max-w-[min(600px,100%)] desktop:w-auto",
|
|
79
|
+
variant: e.variant,
|
|
80
|
+
title: e.title,
|
|
81
|
+
message: a,
|
|
82
|
+
action: e.action,
|
|
83
|
+
closable: !0,
|
|
84
|
+
closeAriaLabel: r.close,
|
|
85
|
+
onClose: () => t(e.id)
|
|
86
|
+
});
|
|
87
|
+
}), C = c(({ items: e, onDismiss: t, labels: n, dismissDelayMs: r = 5e3, className: i = b, requestIdClassName: a = "dial-tiny-text" }) => {
|
|
88
|
+
let o = f(null), s = f(/* @__PURE__ */ new Set()), c = d(() => ({
|
|
89
|
+
requestId: n?.requestId ?? "Request ID",
|
|
90
|
+
copyRequestIdAriaLabel: n?.copyRequestIdAriaLabel ?? "Copy request ID",
|
|
91
|
+
requestIdCopied: n?.requestIdCopied ?? "Request ID copied",
|
|
92
|
+
requestIdCopyFailed: n?.requestIdCopyFailed ?? "Couldn't copy request ID",
|
|
93
|
+
close: n?.close ?? "Close notification"
|
|
94
|
+
}), [n]);
|
|
95
|
+
return u(() => {
|
|
96
|
+
let t = o.current, n = s.current;
|
|
97
|
+
t && e.some(({ id: e }) => !n.has(e)) && (t.scrollTop = t.scrollHeight), s.current = new Set(e.map(({ id: e }) => e));
|
|
98
|
+
}, [e]), e.length ? v(/* @__PURE__ */ h("div", {
|
|
99
|
+
ref: o,
|
|
100
|
+
className: i,
|
|
101
|
+
children: e.map((e) => /* @__PURE__ */ h(S, {
|
|
102
|
+
item: e,
|
|
103
|
+
onDismiss: t,
|
|
104
|
+
dismissDelayMs: r,
|
|
105
|
+
labels: c,
|
|
106
|
+
requestIdClassName: a
|
|
107
|
+
}, e.id))
|
|
108
|
+
}), document.body) : null;
|
|
109
|
+
});
|
|
110
|
+
//#endregion
|
|
111
|
+
export { C as NotificationStack };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
/** CSS custom-property overrides for the `PanelEmptyState` component. */
|
|
3
|
+
export interface PanelEmptyStateColors {
|
|
4
|
+
/** Label text color. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Description text color. */
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Props for `PanelEmptyState`. */
|
|
10
|
+
export interface PanelEmptyStateProps {
|
|
11
|
+
/** Primary message of the empty state. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Secondary line under the label, e.g. what to do next. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Optional way forward, such as a button, rendered under the text. */
|
|
16
|
+
action?: ReactNode;
|
|
17
|
+
/** Color overrides applied as CSS custom properties. */
|
|
18
|
+
colors?: PanelEmptyStateColors;
|
|
19
|
+
/** CSS class applied to the label text, on top of the kit's title typography. */
|
|
20
|
+
labelClassName?: string;
|
|
21
|
+
/** CSS class applied to the description text, on top of the kit's description typography. */
|
|
22
|
+
descriptionClassName?: string;
|
|
23
|
+
/** CSS class applied to the empty-state container. */
|
|
24
|
+
containerClassName?: string;
|
|
25
|
+
/** Decorative illustration above the label. Defaults to the kit's `NoDataContent` illustration. */
|
|
26
|
+
icon?: ReactNode;
|
|
27
|
+
/** Announces the empty state to assistive tech as it appears, e.g. after a search. */
|
|
28
|
+
live?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** Centered empty-state block for use inside a sidebar panel body. */
|
|
31
|
+
export declare const PanelEmptyState: FC<PanelEmptyStateProps>;
|
|
32
|
+
//# sourceMappingURL=PanelEmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelEmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/PanelEmptyState/PanelEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mGAAmG;IACnG,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sFAAsF;IACtF,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,sEAAsE;AACtE,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAmCpD,CAAC"}
|
|
@@ -5,14 +5,24 @@ import { NoDataContent as r } from "@epam/ai-dial-ui-kit";
|
|
|
5
5
|
import { memo as i } from "react";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/PanelEmptyState/PanelEmptyState.tsx
|
|
8
|
-
var o = i(({ label: i,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
var o = i(({ label: i, description: o, action: s, colors: c, labelClassName: l, descriptionClassName: u, containerClassName: d, icon: f, live: p }) => {
|
|
9
|
+
let m = t({
|
|
10
|
+
"--pes-label-color": c?.label,
|
|
11
|
+
"--pes-description-color": c?.description
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ a("div", {
|
|
14
|
+
style: m,
|
|
15
|
+
children: /* @__PURE__ */ a(r, {
|
|
16
|
+
title: i,
|
|
17
|
+
description: o,
|
|
18
|
+
action: s,
|
|
19
|
+
icon: f,
|
|
20
|
+
live: p,
|
|
21
|
+
titleClassName: e(n.label, l),
|
|
22
|
+
descriptionClassName: e(n.description, u),
|
|
23
|
+
className: d
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
});
|
|
17
27
|
//#endregion
|
|
18
28
|
export { o as PanelEmptyState };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/components/PanelEmptyState/PanelEmptyState.module.scss
|
|
2
|
+
var e = "_label_1qwvo_1", t = "_description_1qwvo_5", n = {
|
|
3
|
+
label: e,
|
|
4
|
+
description: t
|
|
5
|
+
};
|
|
2
6
|
//#endregion
|
|
3
|
-
export {
|
|
7
|
+
export { n as default, t as description, e as label };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { EntityHeaderItem } from '../../models/entity';
|
|
3
|
+
/** CSS custom-property overrides for the `ResourceSummary` row. */
|
|
4
|
+
export interface ResourceSummaryColors {
|
|
5
|
+
/** Row border color. Defaults to `--stroke-tertiary`. */
|
|
6
|
+
border?: string;
|
|
7
|
+
/** Row background color. Defaults to `--bg-layer-sunken`. */
|
|
8
|
+
background?: string;
|
|
9
|
+
/** Version tag border color. Defaults to `--stroke-tertiary`. */
|
|
10
|
+
versionTagBorder?: string;
|
|
11
|
+
/** Version tag background color. Defaults to `--bg-control-accent-alpha`. */
|
|
12
|
+
versionTagBackground?: string;
|
|
13
|
+
/** Version tag text color. Defaults to `--text-accent`. */
|
|
14
|
+
versionTagText?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Typography overrides for the `ResourceSummary` row. */
|
|
17
|
+
export interface ResourceSummaryTypography {
|
|
18
|
+
/** Typography class applied to the version tag. Defaults to `'dial-tiny-text'`. */
|
|
19
|
+
versionTagClassName?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Style overrides for `ResourceSummary`. */
|
|
22
|
+
export interface ResourceSummaryStyles {
|
|
23
|
+
/** Color overrides applied as CSS custom properties. */
|
|
24
|
+
colors?: ResourceSummaryColors;
|
|
25
|
+
/** Typography class overrides. */
|
|
26
|
+
typography?: ResourceSummaryTypography;
|
|
27
|
+
}
|
|
28
|
+
/** Props for `ResourceSummary`. */
|
|
29
|
+
export interface ResourceSummaryProps {
|
|
30
|
+
/** Entity shown in the row as an icon, type label, name, and version tag. Ignored when `children` is set. */
|
|
31
|
+
item?: EntityHeaderItem;
|
|
32
|
+
/** Row content rendered instead of the entity header and version tag. */
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/** Version tag text; `{version}` is replaced with `item.version`. The tag is omitted when `item.version` is empty. Defaults to `'Version {version} · current'`. */
|
|
35
|
+
versionLabel?: string;
|
|
36
|
+
/** Whether the version is shown as a trailing tag. When `false` it is shown inline after the name instead. Defaults to `true`. */
|
|
37
|
+
hasVersionTag?: boolean;
|
|
38
|
+
/** Size of the entity icon. Defaults to `40`. */
|
|
39
|
+
iconSize?: number;
|
|
40
|
+
/** CSS class applied to the row. */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Style overrides. */
|
|
43
|
+
styles?: ResourceSummaryStyles;
|
|
44
|
+
/** Color overrides applied as CSS custom properties. Prefer `styles.colors`. */
|
|
45
|
+
colors?: ResourceSummaryColors;
|
|
46
|
+
}
|
|
47
|
+
/** Bordered summary row pairing an entity's identity block with its current-version tag. */
|
|
48
|
+
export declare const ResourceSummary: FC<ResourceSummaryProps>;
|
|
49
|
+
//# sourceMappingURL=ResourceSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourceSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ResourceSummary/ResourceSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,mEAAmE;AACnE,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0DAA0D;AAC1D,MAAM,WAAW,yBAAyB;IACxC,mFAAmF;IACnF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,kCAAkC;IAClC,UAAU,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAED,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,6GAA6G;IAC7G,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mKAAmK;IACnK,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kIAAkI;IAClI,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,gFAAgF;IAChF,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAED,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2DpD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/ResourceSummary/ResourceSummary.module.scss
|
|
2
|
+
var e = "_row_1csuq_1", t = "_versionTag_1csuq_7", n = {
|
|
3
|
+
row: e,
|
|
4
|
+
versionTag: t
|
|
4
5
|
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { n as default, e as row, t as versionTag };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TextRefinementResult } from '../../hooks/useTextRefinement';
|
|
3
|
+
import { TextRefinementLabels } from '../../models/text-refinement';
|
|
4
|
+
/** Props for `TextRefinementField`. */
|
|
5
|
+
export interface TextRefinementFieldProps {
|
|
6
|
+
/** When false, renders `children` alone — no label row, actions, or feedback. */
|
|
7
|
+
isEnabled: boolean;
|
|
8
|
+
/** Id of the labelled control; also the prefix for the label and error ids. */
|
|
9
|
+
fieldId: string;
|
|
10
|
+
/** Visible field label; names the group. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Class applied to the `<label>`, after the kit `Label` defaults. */
|
|
13
|
+
labelClassName?: string;
|
|
14
|
+
/** Marks the label as required. */
|
|
15
|
+
required?: boolean;
|
|
16
|
+
/** Action, status, and error copy. */
|
|
17
|
+
labels?: TextRefinementLabels;
|
|
18
|
+
/** The field's `useTextRefinement` result. */
|
|
19
|
+
refinement: TextRefinementResult;
|
|
20
|
+
/** Disables both actions. */
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
/** Class applied to the status message and the error message. */
|
|
23
|
+
feedbackClassName?: string;
|
|
24
|
+
/** Class applied to the error message, after `feedbackClassName`. */
|
|
25
|
+
errorClassName?: string;
|
|
26
|
+
/** Caption shown at the end of the row below the control, beside the refinement status — e.g. a character counter. */
|
|
27
|
+
caption?: string;
|
|
28
|
+
/** The refinable control, whose id must equal `fieldId`; it is made read-only while a request is pending. */
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/** Label row with Refine, Restore original and Regenerate actions and live feedback around one refinable field. */
|
|
32
|
+
export declare const TextRefinementField: FC<TextRefinementFieldProps>;
|
|
33
|
+
//# sourceMappingURL=TextRefinementField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextRefinementField.d.ts","sourceRoot":"","sources":["../../../src/components/TextRefinementField/TextRefinementField.tsx"],"names":[],"mappings":"AAYA,OAAO,EAA2B,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGzE,uCAAuC;AACvC,MAAM,WAAW,wBAAwB;IACvC,iFAAiF;IACjF,SAAS,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,EAAE,oBAAoB,CAAC;IACjC,6BAA6B;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sHAAsH;IACtH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6GAA6G;IAC7G,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,mHAAmH;AACnH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA2K5D,CAAC"}
|
|
@@ -1,86 +1,115 @@
|
|
|
1
1
|
import { mergeClasses as e } from "../../utils/merge-class.js";
|
|
2
2
|
import { TextRefinementState as t } from "../../hooks/useTextRefinement.js";
|
|
3
|
-
import { CaptionText as n, DIAL_ICON_SIZE as r, DIAL_KIT_ICON_STROKE as i, ElementSize as a, ErrorText as o, GhostButton as s, Label as c,
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { IconSparkles as
|
|
3
|
+
import { CaptionText as n, DIAL_ICON_SIZE as r, DIAL_KIT_ICON_STROKE as i, ElementSize as a, ErrorText as o, GhostButton as s, Label as c, LiveRegionPoliteness as l, Spinner as u } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { useLayoutEffect as d, useRef as f } from "react";
|
|
5
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
6
|
+
import { IconRestore as g, IconSparkles as _ } from "@tabler/icons-react";
|
|
7
7
|
//#region src/components/TextRefinementField/TextRefinementField.tsx
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var v = ({ isEnabled: v, fieldId: y, label: b, labelClassName: x, required: S, labels: C, refinement: w, disabled: T, feedbackClassName: E, errorClassName: D, caption: O, children: k }) => {
|
|
9
|
+
let A = f(null), j = f(null), M = v && w.isPending;
|
|
10
|
+
d(() => {
|
|
11
|
+
if (!M) return;
|
|
12
|
+
let e = Array.from(j.current?.querySelectorAll("input, textarea") ?? []).find((e) => e.id === y);
|
|
13
|
+
if (!e) return;
|
|
14
|
+
let t = e.readOnly;
|
|
15
|
+
return e.readOnly = !0, () => {
|
|
16
|
+
e.readOnly = t;
|
|
17
|
+
};
|
|
18
|
+
}, [M, y]);
|
|
19
|
+
let N = O && /* @__PURE__ */ m(n, {
|
|
20
|
+
text: O,
|
|
21
|
+
className: "ms-auto shrink-0 text-end"
|
|
22
|
+
});
|
|
23
|
+
if (!v) return N ? /* @__PURE__ */ h("div", {
|
|
24
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
25
|
+
children: [k, N]
|
|
26
|
+
}) : /* @__PURE__ */ m(p, { children: k });
|
|
27
|
+
let P = w.state === t.Error, F = w.canUndo, I = C?.refineWithAiLabel ?? "Refine with AI";
|
|
28
|
+
M ? I = C?.refineRefiningLabel ?? "Refining" : F && (I = C?.refineRegenerateLabel ?? "Regenerate");
|
|
29
|
+
let L = w.state === t.Pending || w.state === t.Success || w.state === t.Restored, R = {
|
|
12
30
|
[t.Idle]: "",
|
|
13
|
-
[t.Pending]:
|
|
14
|
-
[t.Success]:
|
|
15
|
-
[t.Restored]:
|
|
16
|
-
[t.Unchanged]:
|
|
31
|
+
[t.Pending]: C?.refinePendingAriaLabel ?? "Refining text",
|
|
32
|
+
[t.Success]: C?.refineSuccessAriaLabel ?? "Text refined",
|
|
33
|
+
[t.Restored]: C?.refineUndoAriaLabel ?? "Original text restored.",
|
|
34
|
+
[t.Unchanged]: C?.refineUnchangedAriaLabel ?? "No changes were needed.",
|
|
17
35
|
[t.Error]: ""
|
|
18
|
-
}[
|
|
19
|
-
return /* @__PURE__ */
|
|
36
|
+
}[w.state];
|
|
37
|
+
return /* @__PURE__ */ h("div", {
|
|
20
38
|
className: "flex min-w-0 flex-col gap-1",
|
|
21
39
|
role: "group",
|
|
22
|
-
"aria-labelledby":
|
|
23
|
-
"aria-describedby":
|
|
40
|
+
"aria-labelledby": y + "-label",
|
|
41
|
+
"aria-describedby": P ? y + "-refinement-error" : void 0,
|
|
24
42
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ h("div", {
|
|
26
44
|
className: "flex min-w-0 flex-wrap items-center gap-x-3",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
-
id:
|
|
29
|
-
htmlFor:
|
|
30
|
-
className:
|
|
31
|
-
label:
|
|
32
|
-
required:
|
|
33
|
-
}), /* @__PURE__ */
|
|
34
|
-
ref:
|
|
45
|
+
children: [/* @__PURE__ */ m(c, {
|
|
46
|
+
id: y + "-label",
|
|
47
|
+
htmlFor: y,
|
|
48
|
+
className: x,
|
|
49
|
+
label: b,
|
|
50
|
+
required: S
|
|
51
|
+
}), /* @__PURE__ */ h("div", {
|
|
52
|
+
ref: A,
|
|
35
53
|
className: "ms-auto flex min-w-0 flex-wrap items-center",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [F && !M && /* @__PURE__ */ m(s, {
|
|
37
55
|
size: a.Small,
|
|
38
|
-
label:
|
|
39
|
-
disabled:
|
|
56
|
+
label: C?.refineUndoLabel ?? "Restore original",
|
|
57
|
+
disabled: T,
|
|
40
58
|
onClick: () => {
|
|
41
|
-
|
|
59
|
+
w.undo();
|
|
60
|
+
let e = A.current?.querySelectorAll("button");
|
|
61
|
+
e?.[e.length - 1]?.focus();
|
|
42
62
|
},
|
|
43
|
-
iconBefore:
|
|
63
|
+
iconBefore: /* @__PURE__ */ m(g, {
|
|
64
|
+
size: r.SM,
|
|
65
|
+
stroke: i,
|
|
66
|
+
"aria-hidden": !0
|
|
67
|
+
})
|
|
68
|
+
}), /* @__PURE__ */ m(s, {
|
|
69
|
+
size: a.Small,
|
|
70
|
+
label: I,
|
|
71
|
+
disabled: T || !w.canRefine,
|
|
72
|
+
onClick: () => {
|
|
73
|
+
w.refine();
|
|
74
|
+
},
|
|
75
|
+
iconBefore: M ? /* @__PURE__ */ m("span", {
|
|
44
76
|
"aria-hidden": !0,
|
|
45
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ m(u, {
|
|
46
78
|
size: r.SM,
|
|
47
79
|
ariaLabel: ""
|
|
48
80
|
})
|
|
49
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ m(_, {
|
|
50
82
|
size: r.SM,
|
|
51
83
|
stroke: i,
|
|
52
84
|
"aria-hidden": !0
|
|
53
85
|
})
|
|
54
|
-
}), x.canUndo && /* @__PURE__ */ f(s, {
|
|
55
|
-
size: a.Small,
|
|
56
|
-
label: b?.refineUndoLabel ?? "Undo",
|
|
57
|
-
disabled: S,
|
|
58
|
-
onClick: () => {
|
|
59
|
-
x.undo(), E.current?.querySelector("button")?.focus();
|
|
60
|
-
}
|
|
61
86
|
})]
|
|
62
87
|
})]
|
|
63
88
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
|
|
89
|
+
/* @__PURE__ */ m("div", {
|
|
90
|
+
ref: j,
|
|
91
|
+
"aria-busy": w.isPending,
|
|
92
|
+
children: k
|
|
67
93
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
94
|
+
/* @__PURE__ */ h("div", {
|
|
95
|
+
className: "flex min-w-0 items-start gap-3",
|
|
96
|
+
children: [/* @__PURE__ */ m("div", {
|
|
97
|
+
className: "min-w-0 flex-1",
|
|
98
|
+
children: /* @__PURE__ */ m(n, {
|
|
99
|
+
text: R,
|
|
100
|
+
announce: l.Polite,
|
|
101
|
+
className: e(E, L && "sr-only")
|
|
102
|
+
})
|
|
103
|
+
}), N]
|
|
75
104
|
}),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
className: e(
|
|
80
|
-
text:
|
|
105
|
+
/* @__PURE__ */ m(o, {
|
|
106
|
+
id: y + "-refinement-error",
|
|
107
|
+
announce: l.Assertive,
|
|
108
|
+
className: e(E, D),
|
|
109
|
+
text: P ? C?.refineErrorLabel ?? "Could not refine this text. Please try again." : ""
|
|
81
110
|
})
|
|
82
111
|
]
|
|
83
112
|
});
|
|
84
113
|
};
|
|
85
114
|
//#endregion
|
|
86
|
-
export {
|
|
115
|
+
export { v as TextRefinementField };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The viewport width (inclusive) where the desktop presentation begins. */
|
|
2
|
+
export declare const DESKTOP_BREAKPOINT_PX = 1280;
|
|
3
|
+
/** The largest viewport width that still renders the mobile/tablet presentation. */
|
|
4
|
+
export declare const MOBILE_MAX_WIDTH_PX: number;
|
|
5
|
+
/** `matchMedia` query matching the desktop band (1280px and wider). */
|
|
6
|
+
export declare const DESKTOP_MEDIA_QUERY = "(min-width: 1280px)";
|
|
7
|
+
/** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
|
|
8
|
+
export declare const MOBILE_MEDIA_QUERY = "(max-width: 1279px)";
|
|
9
|
+
/** Inclusive boundary for anchored menus and bounded tablet panels, independent of layout. */
|
|
10
|
+
export declare const TABLET_BREAKPOINT_PX = 768;
|
|
11
|
+
/** Phone menu presentation, including fractional widths below 768px. */
|
|
12
|
+
export declare const PHONE_MEDIA_QUERY = "(width < 768px)";
|
|
13
|
+
/** Bounded overlays without changing the app's mobile layout policy. */
|
|
14
|
+
export declare const TABLET_MEDIA_QUERY = "(768px <= width < 1280px)";
|
|
15
|
+
//# sourceMappingURL=breakpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../src/constants/breakpoint.ts"],"names":[],"mappings":"AAKA,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,QAA4B,CAAC;AAE7D,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,wBAA4C,CAAC;AAE7E,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,wBAA0C,CAAC;AAE1E,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,oBAAwC,CAAC;AAEvE,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,8BAAsE,CAAC"}
|
package/constants/breakpoint.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/constants/breakpoint.ts
|
|
2
|
-
var e = 1280, t =
|
|
2
|
+
var e = 1280, t = 1279, n = `(min-width: ${e}px)`, r = `(max-width: ${t}px)`, i = 768, a = "(width < 768px)", o = `(768px <= width < ${e}px)`;
|
|
3
3
|
//#endregion
|
|
4
|
-
export { e as DESKTOP_BREAKPOINT_PX, n as DESKTOP_MEDIA_QUERY, t as MOBILE_MAX_WIDTH_PX, r as MOBILE_MEDIA_QUERY };
|
|
4
|
+
export { e as DESKTOP_BREAKPOINT_PX, n as DESKTOP_MEDIA_QUERY, t as MOBILE_MAX_WIDTH_PX, r as MOBILE_MEDIA_QUERY, a as PHONE_MEDIA_QUERY, i as TABLET_BREAKPOINT_PX, o as TABLET_MEDIA_QUERY };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Reserved folder name used to mark a hidden storage folder. */
|
|
2
|
+
export declare const HIDDEN_FILE = ".dial_folder";
|
|
3
|
+
/** DIAL Core bucket that holds published (organization-wide) resources, readable by every user. */
|
|
4
|
+
export declare const PUBLIC_BUCKET = "public";
|
|
5
|
+
//# sourceMappingURL=dial.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dial.d.ts","sourceRoot":"","sources":["../../src/constants/dial.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAE1C,mGAAmG;AACnG,eAAO,MAAM,aAAa,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CatalogEntityType } from '../types/entity-type';
|
|
2
|
+
/** Text color per entity type — used for the type label, featured chip, and drop shadow. */
|
|
3
|
+
export declare const ENTITY_TYPE_COLOR: Record<CatalogEntityType, string>;
|
|
4
|
+
/** Background color per entity type — used for the featured chip surface. */
|
|
5
|
+
export declare const ENTITY_TYPE_BG_COLOR: Record<CatalogEntityType, string>;
|
|
6
|
+
//# sourceMappingURL=entity-colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-colors.d.ts","sourceRoot":"","sources":["../../src/constants/entity-colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAM/D,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAMlE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DIAL_ICON_SIZE } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
/** Base props for medium-sized Tabler icons (MD size, icon stroke, `aria-hidden`). */
|
|
3
|
+
export declare const BASE_MD_ICON_PROPS: {
|
|
4
|
+
size: DIAL_ICON_SIZE;
|
|
5
|
+
stroke: number;
|
|
6
|
+
'aria-hidden': boolean;
|
|
7
|
+
};
|
|
8
|
+
/** Base props for large Tabler icons (LG size, icon stroke, `aria-hidden`). */
|
|
9
|
+
export declare const BASE_LG_ICON_PROPS: {
|
|
10
|
+
size: DIAL_ICON_SIZE;
|
|
11
|
+
stroke: number;
|
|
12
|
+
'aria-hidden': boolean;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/constants/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAwB,MAAM,sBAAsB,CAAC;AAE5E,sFAAsF;AACtF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-editor.d.ts","sourceRoot":"","sources":["../../src/constants/markdown-editor.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,uCAAuC,wJACmG,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps common MIME types to canonical file extensions.
|
|
3
|
+
*
|
|
4
|
+
* The standard entries follow MDN's common media types table. Project-specific
|
|
5
|
+
* aliases are retained for MIME values produced by existing integrations.
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types
|
|
7
|
+
*/
|
|
8
|
+
export declare const MIME_TYPE_EXT_MAP: Record<string, string>;
|
|
9
|
+
/** MIME type wildcard that matches any content type. */
|
|
10
|
+
export declare const MIME_TYPE_WILDCARD = "*/*";
|
|
11
|
+
/** MIME type prefix shared by all audio content types. */
|
|
12
|
+
export declare const MIME_TYPE_AUDIO_PREFIX = "audio/";
|
|
13
|
+
/**
|
|
14
|
+
* Maps non-canonical MIME type spellings to the canonical type they denote.
|
|
15
|
+
*
|
|
16
|
+
* Deployments declare their `inputAttachmentTypes` by hand, while DIAL Core
|
|
17
|
+
* stores the content type a browser or an upload client reported, so the two
|
|
18
|
+
* sides routinely disagree on which of several equivalent spellings to use for
|
|
19
|
+
* the same format (`text/json` vs `application/json`). Resolving both through
|
|
20
|
+
* this map before comparing them keeps a declared type matching the files it
|
|
21
|
+
* is meant to describe.
|
|
22
|
+
*
|
|
23
|
+
* Only aliases for one and the same format belong here — never a pair of
|
|
24
|
+
* distinct formats that happen to share an extension.
|
|
25
|
+
*/
|
|
26
|
+
export declare const MIME_TYPE_ALIASES: Record<string, string>;
|
|
27
|
+
//# sourceMappingURL=mime-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime-types.d.ts","sourceRoot":"","sources":["../../src/constants/mime-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6GpD,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqEpD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const CHAT_SHARED_CLASS: {
|
|
2
|
+
/** The bordered container of a fenced code block. */
|
|
3
|
+
readonly codeBlock: "dial-chat-shared-code-block";
|
|
4
|
+
/** The code block's sticky header, holding the language label and actions. */
|
|
5
|
+
readonly codeBlockHeader: "dial-chat-shared-code-block-header";
|
|
6
|
+
/** The bordered container of a Markdown table. */
|
|
7
|
+
readonly table: "dial-chat-shared-table";
|
|
8
|
+
/** The scrolling box around a Markdown table, which owns its overflow. */
|
|
9
|
+
readonly tableScroll: "dial-chat-shared-table-scroll";
|
|
10
|
+
/** The scrolling box around a display-math block. */
|
|
11
|
+
readonly mathBlock: "dial-chat-shared-math-block";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=public-class-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-class-names.d.ts","sourceRoot":"","sources":["../../src/constants/public-class-names.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB;IAC5B,qDAAqD;;IAErD,8EAA8E;;IAE9E,kDAAkD;;IAElD,0EAA0E;;IAE1E,qDAAqD;;CAE7C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const RESIZABLE_TEXTAREA_CLASS_NAME = "max-h-[50vh]";
|
|
2
|
+
export declare const RESIZABLE_FIELD_MAX_HEIGHT_CSS_VARIABLE = "--resizable-field-max-height";
|
|
3
|
+
export declare const MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME = "[&_.w-md-editor:not(.w-md-editor-fullscreen)]:max-h-[var(--resizable-field-max-height,70vh)]";
|
|
4
|
+
export declare const MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME = "[&_.w-md-editor:not(.w-md-editor-fullscreen)]:!h-[var(--resizable-field-max-height,70vh)]";
|
|
5
|
+
//# sourceMappingURL=resizable-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable-fields.d.ts","sourceRoot":"","sources":["../../src/constants/resizable-fields.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,iBAAiB,CAAC;AAQ5D,eAAO,MAAM,uCAAuC,iCACpB,CAAC;AAkBjC,eAAO,MAAM,qCAAqC,iGAC8C,CAAC;AAWjG,eAAO,MAAM,sCAAsC,8FAC0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-list.d.ts","sourceRoot":"","sources":["../../src/constants/select-list.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,sFAAsF;AACtF,eAAO,MAAM,iCAAiC,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-input.d.ts","sourceRoot":"","sources":["../../src/constants/tag-input.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB,oBAAoB,CAAC"}
|