@droppii-org/chat-sdk 0.6.3 → 0.6.4
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.
|
@@ -442,7 +442,7 @@ const ConversationDetailInput = ({ placeholder, onSendMessage, onInputChange, mo
|
|
|
442
442
|
void handleSend();
|
|
443
443
|
};
|
|
444
444
|
if (isViewOnlyMember) {
|
|
445
|
-
return (_jsxs("div", { "data-testid": "conversation-detail-input-view-only", className: "flex w-full shrink-0 items-center justify-
|
|
445
|
+
return (_jsxs("div", { "data-testid": "conversation-detail-input-view-only", className: "flex flex-col w-full shrink-0 items-center justify-center gap-3 bg-chat-bubble-neutral/[0.05] px-4 py-3 ", children: [_jsx("span", { className: "text-sm text-gray-500", children: t("thread_detail.view_only_notice") }), _jsx(Button, { type: "primary", size: "small", loading: isJoiningPublicGroup, onClick: handleJoinPublicGroup, children: tCommon("join_group") })] }));
|
|
446
446
|
}
|
|
447
447
|
return (_jsxs("div", { ref: containerRef, "data-testid": "conversation-detail-input", "data-cp-name": "ConversationDetailInput", className: "flex w-full shrink-0 flex-col bg-chat-bubble-neutral/[0.05]", children: [_jsx("input", { ref: mediaInputRef, type: "file", accept: "image/jpeg,image/png,image/jpg,video/*", multiple: true, className: "hidden", onChange: handleMediaInputChange }), _jsx("input", { ref: documentInputRef, type: "file", accept: ".pdf,.doc,.docx", multiple: true, className: "hidden", onChange: handleDocumentInputChange }), _jsx(ReplyPreviewBar, {}), listUploadFiles.length > 0 && (_jsx(FilePreviewList, { files: listUploadFiles, onRemove: (file) => handleRemoveFile(file.uid), onVideoReady: () => setIsVideoLoading(false) })), showLinkPreview && previewUrl && (_jsx(LinkInputPreview, { url: previewUrl, onRemove: () => setPreviewDismissed(true) })), _jsxs("div", { className: "flex items-end gap-3 px-3 py-2", children: [_jsx("div", { className: "flex shrink-0 items-center", children: _jsx("button", { type: "button", onClick: handleToggleMoreOption, "aria-label": t("thread_detail.more_option.toggle"), "aria-expanded": isMoreOptionOpen, "data-testid": "conversation-detail-more-option-toggle", className: "flex py-3 items-center justify-center rounded-full", children: isMoreOptionOpen ? (_jsx(Icon, { icon: "close-circle-b", size: 24, className: "text-[var(--dc-color-primary)]" })) : (_jsx(Icon, { icon: "plus-circle-o", size: 24, className: "text-gray-900" })) }) }), _jsx("div", { className: clsx("flex min-w-0 flex-1 overflow-hidden rounded-xl border bg-white transition-shadow", isFocused
|
|
448
448
|
? "border-[var(--dc-color-primary-focus)] shadow-[0px_0px_2px_var(--dc-color-primary-focus)]"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation-detail/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAWrF,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6CAA6C,CAAC;AAGrD,MAAM,WAAW,4BACf,SAAQ,4BAA4B,EACpC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,uBAAuB,GAAI,wFAS9B,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation-detail/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAWrF,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,6CAA6C,CAAC;AAGrD,MAAM,WAAW,4BACf,SAAQ,4BAA4B,EACpC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,uBAAuB,GAAI,wFAS9B,4BAA4B,mDA8L9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -35,6 +35,7 @@ const DChatConversationDetail = (_a) => {
|
|
|
35
35
|
const { useUrlState = true } = useChatContext();
|
|
36
36
|
const onNavigate = useChatNavigate();
|
|
37
37
|
const conversation = useConversationStore((state) => state.conversationData);
|
|
38
|
+
const isViewOnlyMember = useConversationStore((state) => state.isViewOnlyMember);
|
|
38
39
|
const clearSelectedConversation = useConversationStore((state) => state.clearSelectedConversation);
|
|
39
40
|
const setPendingResolveTarget = useConversationStore((state) => state.setPendingResolveTarget);
|
|
40
41
|
const { isResolving, error } = useResolveConversation({
|
|
@@ -88,8 +89,9 @@ const DChatConversationDetail = (_a) => {
|
|
|
88
89
|
}
|
|
89
90
|
const isBotInactive = isBotThread && botFlow.isBotInactive;
|
|
90
91
|
const isBotNotStarted = isBotThread && botFlow.status === "not_started";
|
|
91
|
-
const footer = isBotInactive ? (_jsx(BotInactiveNotice, {})) : isBotNotStarted ? (_jsx("div", { className: "bg-white p-6", children: _jsx(BotStartButton, { label: t("thread_detail.bot.start"), onClick: botFlow.start, disabled: botFlow.isProcessing }) })) : (_jsxs(_Fragment, { children: [isBotThread && (_jsx(BotSuggest, { disabled: botFlow.isProcessing, showRestart: botFlow.botType === BOT_TYPE.FLOW, showMenuTrigger: hasMenuItems, onRestart: botFlow.restart, onOpenMenu: openMenu })), _jsx(ConversationDetailInput, Object.assign({}, inputProps, { onOpenBotMenu: isBotThread && hasMenuItems ? openMenu : undefined }))] }));
|
|
92
|
+
const footer = isBotInactive ? (_jsx(BotInactiveNotice, {})) : isBotNotStarted ? (_jsx("div", { className: "bg-white p-6", children: _jsx(BotStartButton, { label: t("thread_detail.bot.start"), onClick: botFlow.start, disabled: botFlow.isProcessing }) })) : (_jsxs(_Fragment, { children: [isBotThread && !isViewOnlyMember && (_jsx(BotSuggest, { disabled: botFlow.isProcessing, showRestart: botFlow.botType === BOT_TYPE.FLOW, showMenuTrigger: hasMenuItems, onRestart: botFlow.restart, onOpenMenu: openMenu })), _jsx(ConversationDetailInput, Object.assign({}, inputProps, { onOpenBotMenu: isBotThread && hasMenuItems ? openMenu : undefined }))] }));
|
|
92
93
|
const botButtonsSlot = isBotThread &&
|
|
94
|
+
!isViewOnlyMember &&
|
|
93
95
|
!isBotInactive &&
|
|
94
96
|
!botFlow.flowIsEnd &&
|
|
95
97
|
botFlow.shouldShowButtons &&
|