@epam/ai-dial-chat-shared 1.3.0-dev.98 → 1.3.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 (152) hide show
  1. package/components/ActionMenu/ActionMenu.d.ts +26 -0
  2. package/components/ActionMenu/ActionMenu.d.ts.map +1 -0
  3. package/components/ActionMenu/ActionMenu.js +50 -0
  4. package/components/ConfirmationDialog/ConfirmationDialog.d.ts +6 -1
  5. package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
  6. package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
  7. package/components/ConfirmationIdentityCard/ConfirmationIdentityCard.module.scss.js +5 -4
  8. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.js +2 -2
  9. package/components/ConfirmationIdentityRow/ConfirmationIdentityRow.module.scss.js +3 -2
  10. package/components/ConfirmationView/ConfirmationFooter.d.ts.map +1 -1
  11. package/components/ConfirmationView/ConfirmationFooter.js +24 -25
  12. package/components/ConfirmationView/ConfirmationView.d.ts +2 -0
  13. package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -1
  14. package/components/ConfirmationView/ConfirmationView.js +12 -12
  15. package/components/ConfirmationView/ConfirmationView.module.scss.js +6 -5
  16. package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts +31 -0
  17. package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.d.ts.map +1 -0
  18. package/components/DeleteConfirmationDrawer/DeleteConfirmationDrawer.js +36 -0
  19. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts +3 -0
  20. package/components/DeleteConfirmationView/DeleteConfirmationView.d.ts.map +1 -1
  21. package/components/DeleteConfirmationView/DeleteConfirmationView.js +36 -27
  22. package/components/DeleteConfirmationView/DeleteConfirmationView.module.scss.js +5 -4
  23. package/components/DeploymentIcon/DeploymentIcon.module.scss.js +3 -2
  24. package/components/EntityHeader/EntityHeader.js +1 -1
  25. package/components/InitialsAvatar/InitialsAvatar.d.ts +3 -0
  26. package/components/InitialsAvatar/InitialsAvatar.d.ts.map +1 -1
  27. package/components/InitialsAvatar/InitialsAvatar.js +4 -3
  28. package/components/ItemHeader/ItemHeader.module.scss.js +5 -4
  29. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts +6 -2
  30. package/components/MarkdownRenderer/CodeBlock/CodeBlock.d.ts.map +1 -1
  31. package/components/MarkdownRenderer/CodeBlock/CodeBlock.js +58 -58
  32. package/components/MarkdownRenderer/CodeBlock/CodeBlock.module.scss.js +9 -8
  33. package/components/MarkdownRenderer/CodeBlock/syntax-theme.d.ts.map +1 -1
  34. package/components/MarkdownRenderer/MarkdownRenderer.d.ts +6 -0
  35. package/components/MarkdownRenderer/MarkdownRenderer.d.ts.map +1 -1
  36. package/components/MarkdownRenderer/MarkdownRenderer.js +29 -24
  37. package/components/MarkdownRenderer/MarkdownRenderer.module.scss.js +9 -8
  38. package/components/MarkdownRenderer/Math/MarkdownMathBlock.module.scss.js +5 -4
  39. package/components/MarkdownRenderer/PlainTextRenderer.js +1 -1
  40. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts +4 -0
  41. package/components/MarkdownRenderer/Table/MarkdownTable.d.ts.map +1 -1
  42. package/components/MarkdownRenderer/Table/MarkdownTable.js +68 -63
  43. package/components/MarkdownRenderer/Table/MarkdownTable.module.scss.js +15 -13
  44. package/components/MarkdownRenderer/Table/TableHeader.module.scss.js +3 -2
  45. package/components/MarkdownRenderer/markdown-whitespace.js +2 -6
  46. package/components/NewVersionAlert/NewVersionAlert.d.ts +27 -0
  47. package/components/NewVersionAlert/NewVersionAlert.d.ts.map +1 -0
  48. package/components/NewVersionAlert/NewVersionAlert.js +28 -0
  49. package/components/NewVersionAlert/NewVersionAlert.module.scss.js +4 -0
  50. package/components/NotificationStack/NotificationStack.d.ts +48 -0
  51. package/components/NotificationStack/NotificationStack.d.ts.map +1 -0
  52. package/components/NotificationStack/NotificationStack.js +111 -0
  53. package/components/PanelEmptyState/PanelEmptyState.d.ts +12 -2
  54. package/components/PanelEmptyState/PanelEmptyState.d.ts.map +1 -1
  55. package/components/PanelEmptyState/PanelEmptyState.js +19 -9
  56. package/components/PanelEmptyState/PanelEmptyState.module.scss.js +6 -2
  57. package/components/ResourceSummary/ResourceSummary.module.scss.js +5 -4
  58. package/components/TextRefinementField/TextRefinementField.d.ts +4 -2
  59. package/components/TextRefinementField/TextRefinementField.d.ts.map +1 -1
  60. package/components/TextRefinementField/TextRefinementField.js +84 -55
  61. package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts +22 -0
  62. package/components/UnsavedChangesProvider/UnsavedChangesProvider.d.ts.map +1 -0
  63. package/components/UnsavedChangesProvider/UnsavedChangesProvider.js +57 -0
  64. package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts +44 -0
  65. package/components/UnsavedChangesProvider/unsaved-changes-context.d.ts.map +1 -0
  66. package/components/UnsavedChangesProvider/unsaved-changes-context.js +13 -0
  67. package/constants/breakpoint.d.ts +6 -0
  68. package/constants/breakpoint.d.ts.map +1 -1
  69. package/constants/breakpoint.js +2 -2
  70. package/conversation-transfer/conversation-transfer-queue.d.ts +16 -0
  71. package/conversation-transfer/conversation-transfer-queue.d.ts.map +1 -0
  72. package/conversation-transfer/conversation-transfer-queue.js +24 -0
  73. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts +9 -0
  74. package/file-manager/DialFileManagerShell/DialFileManagerShell.d.ts.map +1 -1
  75. package/file-manager/DialFileManagerShell/DialFileManagerShell.js +330 -269
  76. package/file-manager/DialFileManagerShell/DialFileManagerShell.module.scss.js +8 -0
  77. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts +7 -0
  78. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.d.ts.map +1 -1
  79. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.js +85 -80
  80. package/file-manager/FileManagerAttachModal/FileManagerAttachModal.module.scss.js +7 -0
  81. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts +5 -0
  82. package/file-manager/OperationLoaderModal/OperationLoaderModal.d.ts.map +1 -1
  83. package/file-manager/OperationLoaderModal/OperationLoaderModal.js +25 -20
  84. package/file-manager/OperationLoaderModal/OperationLoaderModal.module.scss.js +4 -0
  85. package/file-manager/file-manager-controller.d.ts +11 -3
  86. package/file-manager/file-manager-controller.d.ts.map +1 -1
  87. package/file-manager/index.d.ts +1 -0
  88. package/file-manager/index.d.ts.map +1 -1
  89. package/file-manager/labels.d.ts +21 -2
  90. package/file-manager/labels.d.ts.map +1 -1
  91. package/file-manager/shell-styles.d.ts +37 -0
  92. package/file-manager/shell-styles.d.ts.map +1 -0
  93. package/file-manager/upload-batch.d.ts +46 -0
  94. package/file-manager/upload-batch.d.ts.map +1 -1
  95. package/file-manager/upload-batch.js +6 -2
  96. package/file-manager/upload-queue.d.ts +44 -4
  97. package/file-manager/upload-queue.d.ts.map +1 -1
  98. package/file-manager/upload-queue.js +45 -13
  99. package/file-manager.js +4 -4
  100. package/hooks/useAvailableHeightCap.js +1 -1
  101. package/hooks/useControlErrorAssociation.d.ts +3 -0
  102. package/hooks/useControlErrorAssociation.d.ts.map +1 -0
  103. package/hooks/useControlErrorAssociation.js +12 -0
  104. package/hooks/useIsMobile.js +1 -1
  105. package/hooks/useIsPhone.d.ts +3 -0
  106. package/hooks/useIsPhone.d.ts.map +1 -0
  107. package/hooks/useIsPhone.js +13 -0
  108. package/hooks/useIsTablet.d.ts +3 -0
  109. package/hooks/useIsTablet.d.ts.map +1 -0
  110. package/hooks/useIsTablet.js +13 -0
  111. package/hooks/useIsTextClipped.d.ts +26 -0
  112. package/hooks/useIsTextClipped.d.ts.map +1 -0
  113. package/hooks/useIsTextClipped.js +25 -0
  114. package/hooks/useIsVerticallyClamped.d.ts +16 -0
  115. package/hooks/useIsVerticallyClamped.d.ts.map +1 -0
  116. package/hooks/useIsVerticallyClamped.js +20 -0
  117. package/hooks/useTextRefinement.d.ts +1 -1
  118. package/hooks/useTextRefinement.d.ts.map +1 -1
  119. package/hooks/useTextRefinement.js +4 -4
  120. package/hooks/useUnsavedChangesGuard.js +1 -5
  121. package/hooks/useUnsavedChangesLeaveConfirmation.d.ts +12 -0
  122. package/hooks/useUnsavedChangesLeaveConfirmation.d.ts.map +1 -0
  123. package/hooks/useUnsavedChangesLeaveConfirmation.js +22 -0
  124. package/hooks/useUnsavedChangesLeaveGuard.d.ts +24 -0
  125. package/hooks/useUnsavedChangesLeaveGuard.d.ts.map +1 -0
  126. package/hooks/useUnsavedChangesLeaveGuard.js +24 -0
  127. package/index.css +2 -2
  128. package/index.d.ts +15 -0
  129. package/index.d.ts.map +1 -1
  130. package/index.js +93 -78
  131. package/models/auth.d.ts +2 -0
  132. package/models/auth.d.ts.map +1 -1
  133. package/models/chat.d.ts +2 -0
  134. package/models/chat.d.ts.map +1 -1
  135. package/models/conversation-classification.d.ts +5 -0
  136. package/models/conversation-classification.d.ts.map +1 -1
  137. package/models/conversation-classification.js +3 -1
  138. package/models/text-refinement.d.ts +6 -2
  139. package/models/text-refinement.d.ts.map +1 -1
  140. package/package.json +10 -17
  141. package/utils/dom.d.ts +8 -0
  142. package/utils/dom.d.ts.map +1 -0
  143. package/utils/dom.js +10 -0
  144. package/utils/format-price.js +10 -10
  145. package/utils/inline-segments.js +1 -1
  146. package/utils/latex.d.ts +4 -3
  147. package/utils/latex.d.ts.map +1 -1
  148. package/utils/latex.js +47 -41
  149. package/utils/message-attachment-to-display.js +1 -1
  150. package/utils/mime-type.js +1 -1
  151. package/utils/prompt-variables.js +5 -9
  152. package/utils/syntax-highlighting.js +8 -8
@@ -0,0 +1,57 @@
1
+ import { ConfirmationDialog as e } from "../ConfirmationDialog/ConfirmationDialog.js";
2
+ import { UnsavedChangesContext as t, UnsavedChangesInternalContext as n } from "./unsaved-changes-context.js";
3
+ import { ConfirmationPopupVariant as r } from "@epam/ai-dial-ui-kit";
4
+ import { useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ //#region src/components/UnsavedChangesProvider/UnsavedChangesProvider.tsx
7
+ var d = {
8
+ title: "Discard unsaved changes?",
9
+ message: "You have unsaved changes. Leaving now will discard them.",
10
+ confirmLabel: "Discard changes",
11
+ cancelLabel: "Keep editing"
12
+ }, f = ({ children: f, labels: p }) => {
13
+ let [m, h] = c(!1), [g, _] = c(null), v = s(!1), y = {
14
+ title: p?.title ?? d.title,
15
+ message: p?.message ?? d.message,
16
+ confirmLabel: p?.confirmLabel ?? d.confirmLabel,
17
+ cancelLabel: p?.cancelLabel ?? d.cancelLabel
18
+ };
19
+ a(() => () => {
20
+ v.current = !1;
21
+ }, []);
22
+ let b = i((e) => (h(e), () => h(!1)), []), x = i((e) => (v.current = !1, _(e), () => _((t) => t === e ? null : t)), []), S = i((e) => {
23
+ x({
24
+ onDiscard: e,
25
+ shouldAllowUnload: !0
26
+ });
27
+ }, [x]), C = () => {
28
+ g && (_(null), g.shouldAllowUnload && (v.current = !0), g.onDiscard());
29
+ }, w = () => {
30
+ g && (_(null), g.onKeep?.());
31
+ }, T = o(() => ({
32
+ hasUnsavedChanges: m,
33
+ requestDiscard: S
34
+ }), [m, S]), E = o(() => ({
35
+ register: b,
36
+ open: x,
37
+ unloadAllowedRef: v
38
+ }), [b, x]);
39
+ return /* @__PURE__ */ l(n.Provider, {
40
+ value: E,
41
+ children: /* @__PURE__ */ u(t.Provider, {
42
+ value: T,
43
+ children: [f, /* @__PURE__ */ l(e, {
44
+ open: g != null,
45
+ title: y.title,
46
+ message: y.message,
47
+ confirmLabel: y.confirmLabel,
48
+ cancelLabel: y.cancelLabel,
49
+ variant: r.Danger,
50
+ onConfirm: C,
51
+ onClose: w
52
+ })]
53
+ })
54
+ });
55
+ };
56
+ //#endregion
57
+ export { f as UnsavedChangesProvider };
@@ -0,0 +1,44 @@
1
+ import { RefObject } from 'react';
2
+ /** Value of {@link useUnsavedChanges}. */
3
+ export interface UnsavedChangesContextValue {
4
+ /** Whether the guarded form reports unsaved changes. `false` when no form is registered. */
5
+ hasUnsavedChanges: boolean;
6
+ /**
7
+ * Opens the unsaved-changes dialog. **Discard changes** allows the next page
8
+ * unload, closes the dialog and runs `onDiscard`; **Keep editing** or any
9
+ * dismissal closes it and runs nothing. Used by exits that are not router
10
+ * transitions, such as Log out.
11
+ */
12
+ requestDiscard: (onDiscard: () => void) => void;
13
+ }
14
+ /** Actions run by the dialog's two outcomes. */
15
+ export interface PendingDiscard {
16
+ /** Runs when the user chooses Discard changes. */
17
+ onDiscard: () => void;
18
+ /** Runs when the user chooses Keep editing or dismisses the dialog. */
19
+ onKeep?: () => void;
20
+ /** Whether confirming lets the next `beforeunload` pass without the native prompt. Defaults to `false`. */
21
+ shouldAllowUnload?: boolean;
22
+ }
23
+ /** Registration and dialog plumbing shared by the provider and the leave-guard hooks. */
24
+ export interface UnsavedChangesInternalContextValue {
25
+ /** Registers the guarded form's dirty state; the returned callback unregisters it. */
26
+ register: (isDirty: boolean) => () => void;
27
+ /**
28
+ * Opens the dialog wired to the given outcomes. The returned callback closes
29
+ * it without running either outcome, and does nothing once the dialog has
30
+ * been answered or another request has replaced it.
31
+ */
32
+ open: (pending: PendingDiscard) => () => void;
33
+ /** Set once a discard has allowed the page to unload; the `beforeunload` listener skips its prompt while it is `true`. */
34
+ unloadAllowedRef: RefObject<boolean>;
35
+ }
36
+ /** Public unsaved-changes state, read through `useUnsavedChanges`. */
37
+ export declare const UnsavedChangesContext: import('react').Context<UnsavedChangesContextValue | undefined>;
38
+ /** Registration and dialog plumbing, read through `useUnsavedChangesInternal`. */
39
+ export declare const UnsavedChangesInternalContext: import('react').Context<UnsavedChangesInternalContextValue | undefined>;
40
+ /** Returns the guarded form's dirty state and the dialog entry point for exits that are not router transitions; throws outside `UnsavedChangesProvider`. */
41
+ export declare const useUnsavedChanges: () => UnsavedChangesContextValue;
42
+ /** Returns the registration and dialog plumbing for the leave-guard hooks; throws outside `UnsavedChangesProvider`. Not re-exported from the package. */
43
+ export declare const useUnsavedChangesInternal: () => UnsavedChangesInternalContextValue;
44
+ //# sourceMappingURL=unsaved-changes-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsaved-changes-context.d.ts","sourceRoot":"","sources":["../../../src/components/UnsavedChangesProvider/unsaved-changes-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,0CAA0C;AAC1C,MAAM,WAAW,0BAA0B;IACzC,4FAA4F;IAC5F,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACjD;AAED,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,2GAA2G;IAC3G,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,yFAAyF;AACzF,MAAM,WAAW,kCAAkC;IACjD,sFAAsF;IACtF,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC;IAC3C;;;;OAIG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,MAAM,IAAI,CAAC;IAC9C,0HAA0H;IAC1H,gBAAgB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,iEAEtB,CAAC;AAEb,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,yEAE9B,CAAC;AAEb,4JAA4J;AAC5J,eAAO,MAAM,iBAAiB,QAAO,0BAQpC,CAAC;AAEF,yJAAyJ;AACzJ,eAAO,MAAM,yBAAyB,QAChC,kCAQH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ //#region src/components/UnsavedChangesProvider/unsaved-changes-context.ts
3
+ var n = e(void 0), r = e(void 0), i = () => {
4
+ let e = t(n);
5
+ if (!e) throw Error("useUnsavedChanges must be used within an UnsavedChangesProvider");
6
+ return e;
7
+ }, a = () => {
8
+ let e = t(r);
9
+ if (!e) throw Error("The unsaved-changes leave guard must be used within an UnsavedChangesProvider");
10
+ return e;
11
+ };
12
+ //#endregion
13
+ export { n as UnsavedChangesContext, r as UnsavedChangesInternalContext, i as useUnsavedChanges, a as useUnsavedChangesInternal };
@@ -6,4 +6,10 @@ export declare const MOBILE_MAX_WIDTH_PX: number;
6
6
  export declare const DESKTOP_MEDIA_QUERY = "(min-width: 1280px)";
7
7
  /** `matchMedia` query matching the mobile/tablet band (up to 1279px). */
8
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)";
9
15
  //# sourceMappingURL=breakpoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../src/constants/breakpoint.ts"],"names":[],"mappings":"AAYA,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"}
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"}
@@ -1,4 +1,4 @@
1
1
  //#region src/constants/breakpoint.ts
2
- var e = 1280, t = e - 1, n = `(min-width: ${e}px)`, r = `(max-width: ${t}px)`;
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,16 @@
1
+ import { TransferQueueItem } from '@epam/ai-dial-ui-kit';
2
+ import { ConversationTransferErrorCode, ConversationTransferJob, ConversationTransferWarningCode } from '../models/conversation-transfer';
3
+ /** Resolves the translated reason shown on a failed or warned queue row. */
4
+ export interface TransferQueueMessageResolvers {
5
+ /** Resolves a failure code, including an absent code. */
6
+ getErrorMessage: (code: ConversationTransferErrorCode | undefined) => string;
7
+ /** Resolves a warning code and optional affected names. */
8
+ getWarningMessage: (code: ConversationTransferWarningCode | undefined, names?: string[]) => string;
9
+ }
10
+ /**
11
+ * Maps export/import jobs onto the UI kit's `TransferQueue` rows. A row is
12
+ * identified by its file name; the failure or warning reason is resolved here
13
+ * because the kit knows nothing about transfer error codes.
14
+ */
15
+ export declare const toConversationTransferQueueItems: (jobs: readonly ConversationTransferJob[], { getErrorMessage, getWarningMessage }: TransferQueueMessageResolvers) => TransferQueueItem[];
16
+ //# sourceMappingURL=conversation-transfer-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-transfer-queue.d.ts","sourceRoot":"","sources":["../../src/conversation-transfer/conversation-transfer-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,KAAK,uBAAuB,EAE5B,KAAK,+BAA+B,EACrC,MAAM,iCAAiC,CAAC;AAEzC,4EAA4E;AAC5E,MAAM,WAAW,6BAA6B;IAC5C,yDAAyD;IACzD,eAAe,EAAE,CAAC,IAAI,EAAE,6BAA6B,GAAG,SAAS,KAAK,MAAM,CAAC;IAC7E,2DAA2D;IAC3D,iBAAiB,EAAE,CACjB,IAAI,EAAE,+BAA+B,GAAG,SAAS,EACjD,KAAK,CAAC,EAAE,MAAM,EAAE,KACb,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,GAC3C,MAAM,SAAS,uBAAuB,EAAE,EACxC,wCAAwC,6BAA6B,KACpE,iBAAiB,EA6BnB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { ConversationTransferJobStatus as e } from "../models/conversation-transfer.js";
2
+ import { TransferQueueItemStatus as t } from "@epam/ai-dial-ui-kit";
3
+ //#region src/conversation-transfer/conversation-transfer-queue.ts
4
+ var n = (n, { getErrorMessage: r, getWarningMessage: i }) => {
5
+ let a = {
6
+ [e.InProgress]: t.InProgress,
7
+ [e.Success]: t.Success,
8
+ [e.Warning]: t.Warning,
9
+ [e.Failed]: t.Failed,
10
+ [e.Canceled]: t.Canceled
11
+ };
12
+ return n.map((t) => {
13
+ let n;
14
+ return t.status === e.Failed ? n = r(t.errorCode) : t.status === e.Warning && (n = i(t.warningCode, t.warningNames)), {
15
+ id: t.id,
16
+ name: t.fileName,
17
+ status: a[t.status],
18
+ percent: t.progress.percent,
19
+ message: n
20
+ };
21
+ });
22
+ };
23
+ //#endregion
24
+ export { n as toConversationTransferQueueItems };
@@ -4,6 +4,7 @@ import { FileManagerSelectableNode } from '../../types/file-manager-node';
4
4
  import { FileManagerController } from '../file-manager-controller';
5
5
  import { DialFileManagerActionProfile, DialFileManagerVariant } from '../file-manager-variant';
6
6
  import { DialFileManagerShellLabels } from '../labels';
7
+ import { DialFileManagerShellStyles } from '../shell-styles';
7
8
  /** Props for the shared file-manager shell component. */
8
9
  export interface DialFileManagerShellProps {
9
10
  /** Structural view contract containing all controller state and callbacks. */
@@ -46,6 +47,14 @@ export interface DialFileManagerShellProps {
46
47
  * Omit to keep the variant's default.
47
48
  */
48
49
  treeContainerClassName?: string;
50
+ /** Called with the virtual path of the file the user chose to preview. */
51
+ onPreview?: (path?: string) => void;
52
+ /** Called with the grid row when the user clicks a file (folders open instead). */
53
+ onTableFileClick?: (row: FileManagerGridRow) => void;
54
+ /** Dotted extensions (e.g. `.md`) the Preview row action is offered for. The file manager matches them exactly as written, so list every spelling that should qualify. */
55
+ previewExtensions?: string[];
56
+ /** Color overrides, e.g. a different surface background. */
57
+ styles?: DialFileManagerShellStyles;
49
58
  }
50
59
  /**
51
60
  * Renders the DialFileManager grid/tree/toolbar and its operation overlays
@@ -1 +1 @@
1
- {"version":3,"file":"DialFileManagerShell.d.ts","sourceRoot":"","sources":["../../../src/file-manager/DialFileManagerShell/DialFileManagerShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAEnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,yBAAy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,GAAG,SAAS,CAAC;IACrE,uDAAuD;IACvD,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAohB9D,CAAC;;AAEF,wBAA0C"}
1
+ {"version":3,"file":"DialFileManagerShell.d.ts","sourceRoot":"","sources":["../../../src/file-manager/DialFileManagerShell/DialFileManagerShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAEnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAa1C,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAEV,0BAA0B,EAE3B,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAgDlE,yDAAyD;AACzD,MAAM,WAAW,yBAAyB;IACxC,8EAA8E;IAC9E,UAAU,EAAE,qBAAqB,CAAC;IAClC,qDAAqD;IACrD,MAAM,EAAE,0BAA0B,CAAC;IACnC,4BAA4B;IAC5B,SAAS,EAAE,mBAAmB,CAAC;IAC/B,kFAAkF;IAClF,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC9B,0CAA0C;IAC1C,WAAW,EAAE,CAAC,GAAG,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChD,2DAA2D;IAC3D,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,yCAAyC;IACzC,qBAAqB,EAA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