@epam/ai-dial-chat-hooks 1.1.0-dev.422 → 1.1.0-dev.426
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/{api-error-DuLNy43N.js → api-error/api-error.js} +1 -1
- package/api-transport/create-csrf-middleware.js +21 -0
- package/api-transport/create-unauthorized-middleware.js +41 -0
- package/attachment/useAttachmentAction/useAttachmentAction.js +74 -0
- package/attachment/useAttachmentValidation/useAttachmentValidation.js +35 -0
- package/attachments.js +3 -2
- package/catalog/catalog-derivations.js +10 -0
- package/catalog/catalog-primary-action.js +21 -0
- package/catalog/create-publish-api.js +27 -0
- package/catalog/deployment-endpoint-url.js +34 -0
- package/{deployment-id-CxWgJTs9.js → catalog/deployment-id.js} +1 -1
- package/catalog/entity-details.js +6 -0
- package/catalog/map-deployment-limits-to-catalog.js +73 -0
- package/catalog/map-deployment-limits-to-input.js +14 -0
- package/catalog/map-deployment-to-catalog-item.js +92 -0
- package/catalog/map-entity-details-to-catalog.js +350 -0
- package/catalog/map-prompt-to-catalog-item.js +49 -0
- package/catalog/map-skill-to-catalog-item.js +123 -0
- package/catalog/mcp-endpoint-url.js +26 -0
- package/catalog/publish.js +18 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +109 -0
- package/catalog/useCatalogItemDetails.js +101 -0
- package/catalog/useCatalogToolsetCredentials/useCatalogToolsetCredentials.js +146 -0
- package/catalog/useFavoriteEntitiesState/useFavoriteEntitiesState.js +50 -0
- package/catalog/usePublishFolders/usePublishFolders.js +72 -0
- package/catalog.js +22 -3
- package/conversation/announcement-message.js +42 -0
- package/conversation/conversation-transfer/async.js +18 -0
- package/conversation/conversation-transfer/attachment-refs.js +11 -0
- package/conversation/conversation-transfer/build-upload-path.js +27 -0
- package/{date-BeuD8G79.js → conversation/conversation-transfer/date.js} +1 -1
- package/conversation/conversation-transfer/dial-file-resolve.js +18 -0
- package/conversation/conversation-transfer/export-conversation.js +32 -0
- package/conversation/conversation-transfer/import-conversation.js +93 -0
- package/conversation/conversation-transfer/progress.js +39 -0
- package/conversation/conversation-transfer/queue.js +84 -0
- package/conversation/conversation-transfer/types.js +9 -0
- package/conversation/conversation-transfer/zip-export.js +19 -0
- package/conversation/conversation-transfer/zip-import.js +29 -0
- package/conversation/create-chat-stream-api.js +96 -0
- package/conversation/deriveConversationRowActionState/deriveConversationRowActionState.js +14 -0
- package/conversation/display-name-watch.js +5 -0
- package/conversation/footer-message.js +23 -0
- package/conversation/get-model-id-from-conversation-id.js +14 -0
- package/conversation/greeting.js +7 -0
- package/conversation/message-factory.js +19 -0
- package/conversation/message-utils.js +13 -0
- package/conversation/overlay-messages.js +8 -0
- package/conversation/quick-app-conversation-starters.js +29 -0
- package/conversation/starter-option.js +27 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +19 -0
- package/conversation/useAsyncConfirmDialog/useAsyncConfirmDialog.js +39 -0
- package/conversation/useAttachmentUpload/useAttachmentUpload.js +33 -0
- package/conversation/useConversationExport/useConversationExport.js +285 -0
- package/conversation/useConversationHandlers/attachment-to-dto.js +13 -0
- package/conversation/useConversationHandlers/message-factory.js +21 -0
- package/conversation/useConversationHandlers/message-utils.js +8 -0
- package/conversation/useConversationHandlers/starter-option.js +11 -0
- package/conversation/useConversationHandlers/useConversationHandlers.js +263 -0
- package/conversation/useConversationImport/useConversationImport.js +239 -0
- package/conversation/useConversationLookupMaps/useConversationLookupMaps.js +11 -0
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +35 -0
- package/{useConversationScroll-CliIMnjP.js → conversation/useConversationScroll/useConversationScroll.js} +1 -1
- package/conversation/useConversationStream/apply-chunk.js +78 -0
- package/conversation/useConversationStream/buffered-generation.js +18 -0
- package/conversation/useConversationStream/conversation-path.js +8 -0
- package/conversation/useConversationStream/generation-resume.js +126 -0
- package/conversation/useConversationStream/useConversationStream.js +148 -0
- package/conversation/useImportFilePicker/useImportFilePicker.js +20 -0
- package/conversation/useTranscribeAudio/audio-transcription-error.js +12 -0
- package/conversation/useTranscribeAudio/transcription-retry.js +38 -0
- package/conversation/useTranscribeAudio/useTranscribeAudio.js +41 -0
- package/{useConversationSources-DKaKvjXZ.js → conversation-sources/useConversationSources/useConversationSources.js} +1 -1
- package/conversation-sources.js +1 -1
- package/conversation-transfer.js +7 -3
- package/conversation.d.ts +66 -0
- package/conversation.js +31 -2
- package/file-manager.d.ts +3 -4
- package/file-manager.js +28 -3
- package/files/annotation.js +15 -0
- package/files/attachment-canvas.js +218 -0
- package/files/attachment-dto-to-display.js +15 -0
- package/files/attachment-types.js +16 -0
- package/files/create-files-api.js +40 -0
- package/files/create-upload-file-with-progress.js +42 -0
- package/files/dial-file-manager-copy-move.util.js +55 -0
- package/files/dial-file-manager-mapping.util.js +140 -0
- package/files/dial-file-manager-path.util.js +72 -0
- package/files/dial-file-manager.model.js +25 -0
- package/files/dial-file-manager.types.js +10 -0
- package/files/dial-file-to-attachment.js +37 -0
- package/files/dial-file.js +30 -0
- package/files/dial-files-api.js +6 -0
- package/files/download-destination.js +6 -0
- package/files/file-manager-variant.js +11 -0
- package/files/file-name.js +19 -0
- package/files/prepare-download-destination.js +24 -0
- package/files/resolve-dial-file-api-path.js +33 -0
- package/files/source-content.js +37 -0
- package/files/useDialFileListing/useDialFileListing.js +295 -0
- package/files/useDialFileManager/useDialFileManager.js +146 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +23 -0
- package/files/useDialFileMetadata/useDialFileMetadata.js +42 -0
- package/files/useDialFileMutations/useDialFileMutations.js +359 -0
- package/files/useDialFileSharing/useDialFileSharing.js +70 -0
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +156 -0
- package/index.d.ts +69 -4
- package/index.js +134 -28
- package/mcp-apps/mcp-apps-api-client.js +48 -0
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +26 -0
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +26 -0
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +71 -0
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +58 -0
- package/mcp-apps.js +6 -2
- package/oauth/authorize-url.js +12 -0
- package/oauth/handshake.js +65 -0
- package/oauth/popup.js +29 -0
- package/oauth/toolset-id.js +10 -0
- package/oauth/types.js +24 -0
- package/oauth/useOAuthCallbackCompletion/useOAuthCallbackCompletion.js +94 -0
- package/oauth/useToolsetLogin/useToolsetLogin.js +73 -0
- package/oauth.js +9 -3
- package/package.json +35 -23
- package/prompt/export-prompt.js +28 -0
- package/prompt/prompt-resource.js +15 -0
- package/prompt/prompt.js +12 -0
- package/prompt/usePromptsState/usePromptsState.js +42 -0
- package/scheduled-task/scheduled-task-mapping.js +6 -0
- package/{scheduled-task-trigger-D9RZCk52.js → scheduled-task/scheduled-task-trigger.js} +39 -40
- package/scheduled-tasks.js +3 -2
- package/scroll-anchoring.js +1 -1
- package/shared/application-schema.js +4 -0
- package/shared/browser-timezone.js +10 -0
- package/{cron-weekday-B4w29eAC.js → shared/cron-weekday.js} +1 -1
- package/shared/custom-apps.js +30 -0
- package/shared/external-services.js +18 -0
- package/{formatting-CZyyxBG3.js → shared/formatting.js} +1 -1
- package/{prompt-resource-Bt1I-8ri.js → shared/locale.js} +2 -13
- package/{string-utils-iBi2Y55C.js → shared/string-utils.js} +1 -1
- package/shared/toolset-login-events.js +13 -0
- package/sharing.js +3 -3
- package/skill/skill-file-batch-validation.js +48 -0
- package/skill/skill-file-preview.js +15 -0
- package/skill/skill-manifest.js +70 -0
- package/skill/skill-types.js +15 -0
- package/skill/skill.js +48 -0
- package/skill/useSkillEditorLoad.js +103 -0
- package/skill/useSkillEditorSubmit.js +135 -0
- package/skill/useSkillFileActions.js +99 -0
- package/skill/useSkillFilePreview.js +29 -0
- package/{useSkillsState-BoLlwmzb.js → skill/useSkillsState/useSkillsState.js} +1 -1
- package/skill-editor.js +8 -3
- package/skills-state.js +1 -1
- package/source-content.d.ts +29 -0
- package/source-content.js +2 -0
- package/usage/useUsageData/useUsageData.js +32 -0
- package/useChatSettingsFormConfig/useChatSettingsFormConfig.js +74 -0
- package/{usePanelMaxWidth-BEZYuqF9.js → usePageFileDrag/usePageFileDrag.js} +1 -11
- package/usePanelMaxWidth/usePanelMaxWidth.js +8 -0
- package/{useShareLink-xkiaxATt.js → useShareLink/useShareLink.js} +1 -1
- package/{useShareRecipientsCount-BgwCLKY0.js → useShareRecipientsCount/useShareRecipientsCount.js} +1 -1
- package/useToolsMenu/useToolsMenu.js +50 -0
- package/useViewportWidth/useViewportWidth.js +12 -0
- package/utils.js +17 -7
- package/viewport-layout.js +4 -2
- package/attachment-types-AAoN9E95.js +0 -7760
- package/browser-Btsa0Lmr.js +0 -607
- package/skill-manifest-CeG6-WSK.js +0 -4056
- package/useAttachmentValidation-CkMTd5lA.js +0 -102
- package/useConversationImport-CDRs7JF1.js +0 -826
- package/useDialFileManagerTabConfig-CjI46lMo.js +0 -2291
- package/useOAuthCallbackCompletion-CvyTKLER.js +0 -93
- package/useOpenMcpAppCanvas-C7-AMseH.js +0 -207
- package/useSkillFileActions-B-VaGD20.js +0 -373
- package/useSkillFilePreview-B5o1n_0F.js +0 -1244
- package/useToolsMenu-zURpMEn1.js +0 -1882
- package/useToolsetLogin-B05m134e.js +0 -195
- package/useUsageData-D7BxloKZ.js +0 -201
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { a as e, i as t } from "./attachment-types-AAoN9E95.js";
|
|
2
|
-
import { AttachmentContentType as n, useAttachmentCanvas as r } from "@epam/ai-dial-attachment-canvas";
|
|
3
|
-
import { AttachmentErrorReason as i, MIMEType as a, base64ToBlob as o, ensureDownloadFilename as s, triggerAnchorDownload as c, triggerBlobDownload as l } from "@epam/ai-dial-chat-shared";
|
|
4
|
-
import { parsePdfPageReference as u } from "@epam/ai-dial-quotations";
|
|
5
|
-
import { useCallback as d, useEffect as f, useMemo as p, useRef as m } from "react";
|
|
6
|
-
import { isMimeTypeAllowed as h, mimeTypesToExtensionLabels as g } from "@epam/ai-dial-attachment-input";
|
|
7
|
-
//#region src/attachment/useAttachmentAction/useAttachmentAction.ts
|
|
8
|
-
var _ = (t) => t.url != null && e(t.url) || t.data != null, v = (t, n) => {
|
|
9
|
-
let { url: r, name: i, contentType: u, data: d } = t;
|
|
10
|
-
if (r != null && e(r)) {
|
|
11
|
-
let e = n(r);
|
|
12
|
-
return e == null ? !1 : (c(e, s(i, r, u)), !0);
|
|
13
|
-
}
|
|
14
|
-
return d == null ? !1 : (l(o(d, u || a.Plain), s(i, r, u)), !0);
|
|
15
|
-
}, y = (t, n) => {
|
|
16
|
-
let { url: r } = t;
|
|
17
|
-
if (r == null) return;
|
|
18
|
-
let i = r.split("#")[0];
|
|
19
|
-
if (e(i)) {
|
|
20
|
-
let e = n(i);
|
|
21
|
-
if (e == null) return;
|
|
22
|
-
c(e, s(t.title ?? i.split("/").pop() ?? "", i, t.type));
|
|
23
|
-
} else window.open(r, "_blank", "noopener,noreferrer");
|
|
24
|
-
}, b = (t, r) => {
|
|
25
|
-
let i = u(t.url);
|
|
26
|
-
if (i == null) return null;
|
|
27
|
-
let a = e(i.baseUrl) ? r(i.baseUrl) : i.baseUrl;
|
|
28
|
-
if (a == null) return null;
|
|
29
|
-
if (i.page == null) return {
|
|
30
|
-
type: n.Pdf,
|
|
31
|
-
url: a
|
|
32
|
-
};
|
|
33
|
-
let o = `reference-page-${i.page}`;
|
|
34
|
-
return {
|
|
35
|
-
type: n.Pdf,
|
|
36
|
-
url: a,
|
|
37
|
-
highlights: [{
|
|
38
|
-
id: o,
|
|
39
|
-
bboxes: [{
|
|
40
|
-
page: i.page,
|
|
41
|
-
x1: 0,
|
|
42
|
-
y1: 0,
|
|
43
|
-
x2: 0,
|
|
44
|
-
y2: 0
|
|
45
|
-
}],
|
|
46
|
-
style: {
|
|
47
|
-
backgroundColor: "transparent",
|
|
48
|
-
opacity: 0
|
|
49
|
-
}
|
|
50
|
-
}],
|
|
51
|
-
selectedHighlightId: o
|
|
52
|
-
};
|
|
53
|
-
}, x = ({ resolveDownloadUrl: e }) => {
|
|
54
|
-
let { openCanvas: t } = r();
|
|
55
|
-
return { handleAttachmentClick: d((n) => {
|
|
56
|
-
let { url: r, referenceUrl: i, data: a, name: o } = n;
|
|
57
|
-
if (r != null || a != null) {
|
|
58
|
-
v(n, e);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (i == null) return;
|
|
62
|
-
let s = {
|
|
63
|
-
type: n.contentType,
|
|
64
|
-
url: i,
|
|
65
|
-
title: o
|
|
66
|
-
}, c = b(s, e);
|
|
67
|
-
if (c) {
|
|
68
|
-
t(c, o);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
y(s, e);
|
|
72
|
-
}, [t, e]) };
|
|
73
|
-
}, S = 100, C = /* @__PURE__ */ function(e) {
|
|
74
|
-
return e.NoTypesAllowed = "noTypesAllowed", e.UnsupportedType = "unsupportedType", e;
|
|
75
|
-
}({}), w = ({ allowedMimeTypes: e, onValidationError: n, debounceMs: r = S }) => {
|
|
76
|
-
let a = m(e);
|
|
77
|
-
(a.current.length !== e.length || a.current.some((t, n) => t !== e[n])) && (a.current = e);
|
|
78
|
-
let o = a.current, s = o.length > 0, c = p(() => t(o), [o]), l = m(null);
|
|
79
|
-
return f(() => () => {
|
|
80
|
-
l.current != null && clearTimeout(l.current);
|
|
81
|
-
}, []), {
|
|
82
|
-
inputAttachmentTypes: o,
|
|
83
|
-
isAttachmentsAllowed: s,
|
|
84
|
-
validateAttachment: d((e) => {
|
|
85
|
-
if (!h(e.contentType, o)) return l.current != null && clearTimeout(l.current), l.current = setTimeout(() => {
|
|
86
|
-
let e = o.length === 0;
|
|
87
|
-
n?.({
|
|
88
|
-
reason: e ? "noTypesAllowed" : "unsupportedType",
|
|
89
|
-
allowedMimeTypes: o,
|
|
90
|
-
...e ? {} : { formats: g(o) }
|
|
91
|
-
}), l.current = null;
|
|
92
|
-
}, r), i.UnsupportedType;
|
|
93
|
-
}, [
|
|
94
|
-
o,
|
|
95
|
-
r,
|
|
96
|
-
n
|
|
97
|
-
]),
|
|
98
|
-
fileAccept: c
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
//#endregion
|
|
102
|
-
export { x as a, _ as i, w as n, v as r, C as t };
|