|
|
|
@ -1,26 +1,17 @@
|
|
|
|
|
import React, { useState, useRef, useEffect } from 'react';
|
|
|
|
|
import { App, Input, Flex, Button, Image, Tooltip } from 'antd';
|
|
|
|
|
import { App, Input, Flex, Button, Image } from 'antd';
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
// import { Input } from 'react-chat-elements';
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore';
|
|
|
|
|
import useConversationStore from '@/stores/ConversationStore';
|
|
|
|
|
import {
|
|
|
|
|
SendOutlined,
|
|
|
|
|
CloseCircleOutlined,
|
|
|
|
|
LoadingOutlined, FileOutlined,
|
|
|
|
|
DollarOutlined
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
import { SendOutlined, CloseCircleOutlined, LoadingOutlined, FileOutlined } from '@ant-design/icons'
|
|
|
|
|
import { isEmpty, } from '@/utils/commons';
|
|
|
|
|
import { v4 as uuid } from 'uuid';
|
|
|
|
|
import { sentMsgTypeMapped, whatsappSupportFileTypes, uploadProgressSimulate } from '@/channel/bubbleMsgUtils';
|
|
|
|
|
import InputTemplate from './Template';
|
|
|
|
|
import InputEmoji from './Emoji';
|
|
|
|
|
import InputMediaUpload from './MediaUpload';
|
|
|
|
|
import { OSS_URL as aliOSSHost } from '@/config';
|
|
|
|
|
import { postUploadFileItem } from '@/actions/CommonActions';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import useStyleStore from '@/stores/StyleStore';
|
|
|
|
|
import { useOrderStore } from '@/stores/OrderStore'
|
|
|
|
|
import ComposerTools from './ComposerTools';
|
|
|
|
|
|
|
|
|
|
const ButtonStyleClsMapped =
|
|
|
|
@ -34,7 +25,6 @@ const InputComposer = ({ channel, currentActive }) => {
|
|
|
|
|
const [mobile] = useStyleStore((state) => [state.mobile]);
|
|
|
|
|
|
|
|
|
|
const {userId, whatsAppBusiness} = useAuthStore((state) => state.loginUser);
|
|
|
|
|
const [openPaymentDrawer] = useOrderStore((state) => [state.openDrawer])
|
|
|
|
|
|
|
|
|
|
const websocket = useConversationStore((state) => state.websocket);
|
|
|
|
|
const websocketOpened = useConversationStore((state) => state.websocketOpened);
|
|
|
|
|