@droppii-org/chat-sdk 0.1.80 → 0.1.81
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/dist/assets/droppiiFontSelection.json +24523 -24523
- package/dist/assets/sdk/sql-wasm.wasm +0 -0
- package/dist/assets/svg/canned-response.tsx +48 -48
- package/dist/assets/svg/document.tsx +37 -37
- package/dist/assets/svg/index.ts +1 -1
- package/dist/components/conversation-detail/bot/BotSuggest.d.ts +2 -1
- package/dist/components/conversation-detail/bot/BotSuggest.d.ts.map +1 -1
- package/dist/components/conversation-detail/bot/BotSuggest.js +4 -2
- package/dist/components/message/item/MessageBubble.d.ts +2 -1
- package/dist/components/message/item/MessageBubble.d.ts.map +1 -1
- package/dist/components/message/item/MessageBubble.js +14 -11
- package/dist/components/message/item/StickerMessage.d.ts +7 -0
- package/dist/components/message/item/StickerMessage.d.ts.map +1 -0
- package/dist/components/message/item/StickerMessage.js +15 -0
- package/dist/components/message/item/index.d.ts.map +1 -1
- package/dist/components/message/item/index.js +2 -1
- package/dist/components/message/item/renderMessageContent.d.ts.map +1 -1
- package/dist/components/message/item/renderMessageContent.js +3 -0
- package/dist/constants/botFlow.d.ts +4 -0
- package/dist/constants/botFlow.d.ts.map +1 -1
- package/dist/constants/botFlow.js +4 -0
- package/dist/hooks/conversation/useBotFlow.d.ts +1 -0
- package/dist/hooks/conversation/useBotFlow.d.ts.map +1 -1
- package/dist/hooks/conversation/useBotFlow.js +7 -5
- package/dist/hooks/message/useMessage.d.ts.map +1 -1
- package/dist/hooks/message/useMessage.js +1 -0
- package/dist/locales/i18n.ts +19 -19
- package/dist/locales/vi/common.json +162 -161
- package/dist/locales/vi/conversation-inbox.json +52 -52
- package/dist/screens/conversation-detail/index.d.ts.map +1 -1
- package/dist/screens/conversation-detail/index.js +2 -1
- package/dist/styles/global.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/conversation.d.ts +3 -1
- package/dist/types/conversation.d.ts.map +1 -1
- package/dist/types/sticker.d.ts +9 -0
- package/dist/types/sticker.d.ts.map +1 -0
- package/dist/types/sticker.js +5 -0
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/utils/common.js +3 -0
- package/dist/utils/messageTransform.d.ts.map +1 -1
- package/dist/utils/messageTransform.js +7 -5
- package/package.json +132 -132
|
File without changes
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
interface ISvgProps {
|
|
2
|
-
size?: number;
|
|
3
|
-
className?: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const CannedResponseIcon = (props: ISvgProps) => (
|
|
7
|
-
<svg
|
|
8
|
-
width={props.size || 18}
|
|
9
|
-
height={props.size || 18}
|
|
10
|
-
viewBox={`${0} ${0} ${props.size || 18} ${props.size || 18}`}
|
|
11
|
-
fill="none"
|
|
12
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
-
className={props?.className}
|
|
14
|
-
>
|
|
15
|
-
<g clipPath="url(#clip0_4070_70030)">
|
|
16
|
-
<path
|
|
17
|
-
fillRule="evenodd"
|
|
18
|
-
clipRule="evenodd"
|
|
19
|
-
d="M6.66732 0.833374C7.12755 0.833374 7.50065 1.20647 7.50065 1.66671L5.00065 18.3334C5.00065 18.7936 4.62755 19.1667 4.16732 19.1667C3.70708 19.1667 3.33398 18.7936 3.33398 18.3334L5.83398 1.66671C5.83398 1.20647 6.20708 0.833374 6.66732 0.833374Z"
|
|
20
|
-
fill="currentColor"
|
|
21
|
-
/>
|
|
22
|
-
<path
|
|
23
|
-
fillRule="evenodd"
|
|
24
|
-
clipRule="evenodd"
|
|
25
|
-
d="M14.9993 0.833374C15.4596 0.833374 15.8327 1.20647 15.8327 1.66671L13.3327 18.3334C13.3327 18.7936 12.9596 19.1667 12.4993 19.1667C12.0391 19.1667 11.666 18.7936 11.666 18.3334L14.166 1.66671C14.166 1.20647 14.5391 0.833374 14.9993 0.833374Z"
|
|
26
|
-
fill="currentColor"
|
|
27
|
-
/>
|
|
28
|
-
<path
|
|
29
|
-
fillRule="evenodd"
|
|
30
|
-
clipRule="evenodd"
|
|
31
|
-
d="M19.1673 5.83333C19.1673 6.29357 18.7942 6.66667 18.334 6.66667H1.66732C1.20708 6.66667 0.833984 6.29357 0.833984 5.83333C0.833984 5.37309 1.20708 5 1.66732 5H18.334C18.7942 5 19.1673 5.3731 19.1673 5.83333Z"
|
|
32
|
-
fill="currentColor"
|
|
33
|
-
/>
|
|
34
|
-
<path
|
|
35
|
-
fillRule="evenodd"
|
|
36
|
-
clipRule="evenodd"
|
|
37
|
-
d="M19.1673 14.1667C19.1673 14.627 18.7942 15 18.334 15H1.66732C1.20708 15 0.833984 14.627 0.833984 14.1667C0.833984 13.7065 1.20708 13.3334 1.66732 13.3334H18.334C18.7942 13.3334 19.1673 13.7065 19.1673 14.1667Z"
|
|
38
|
-
fill="currentColor"
|
|
39
|
-
/>
|
|
40
|
-
</g>
|
|
41
|
-
<defs>
|
|
42
|
-
<clipPath id="clip0_4070_70030">
|
|
43
|
-
<rect width={props.size || 18} height={props.size || 18} fill="white" />
|
|
44
|
-
</clipPath>
|
|
45
|
-
</defs>
|
|
46
|
-
</svg>
|
|
47
|
-
);
|
|
48
|
-
export default CannedResponseIcon;
|
|
1
|
+
interface ISvgProps {
|
|
2
|
+
size?: number;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const CannedResponseIcon = (props: ISvgProps) => (
|
|
7
|
+
<svg
|
|
8
|
+
width={props.size || 18}
|
|
9
|
+
height={props.size || 18}
|
|
10
|
+
viewBox={`${0} ${0} ${props.size || 18} ${props.size || 18}`}
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
className={props?.className}
|
|
14
|
+
>
|
|
15
|
+
<g clipPath="url(#clip0_4070_70030)">
|
|
16
|
+
<path
|
|
17
|
+
fillRule="evenodd"
|
|
18
|
+
clipRule="evenodd"
|
|
19
|
+
d="M6.66732 0.833374C7.12755 0.833374 7.50065 1.20647 7.50065 1.66671L5.00065 18.3334C5.00065 18.7936 4.62755 19.1667 4.16732 19.1667C3.70708 19.1667 3.33398 18.7936 3.33398 18.3334L5.83398 1.66671C5.83398 1.20647 6.20708 0.833374 6.66732 0.833374Z"
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
fillRule="evenodd"
|
|
24
|
+
clipRule="evenodd"
|
|
25
|
+
d="M14.9993 0.833374C15.4596 0.833374 15.8327 1.20647 15.8327 1.66671L13.3327 18.3334C13.3327 18.7936 12.9596 19.1667 12.4993 19.1667C12.0391 19.1667 11.666 18.7936 11.666 18.3334L14.166 1.66671C14.166 1.20647 14.5391 0.833374 14.9993 0.833374Z"
|
|
26
|
+
fill="currentColor"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
fillRule="evenodd"
|
|
30
|
+
clipRule="evenodd"
|
|
31
|
+
d="M19.1673 5.83333C19.1673 6.29357 18.7942 6.66667 18.334 6.66667H1.66732C1.20708 6.66667 0.833984 6.29357 0.833984 5.83333C0.833984 5.37309 1.20708 5 1.66732 5H18.334C18.7942 5 19.1673 5.3731 19.1673 5.83333Z"
|
|
32
|
+
fill="currentColor"
|
|
33
|
+
/>
|
|
34
|
+
<path
|
|
35
|
+
fillRule="evenodd"
|
|
36
|
+
clipRule="evenodd"
|
|
37
|
+
d="M19.1673 14.1667C19.1673 14.627 18.7942 15 18.334 15H1.66732C1.20708 15 0.833984 14.627 0.833984 14.1667C0.833984 13.7065 1.20708 13.3334 1.66732 13.3334H18.334C18.7942 13.3334 19.1673 13.7065 19.1673 14.1667Z"
|
|
38
|
+
fill="currentColor"
|
|
39
|
+
/>
|
|
40
|
+
</g>
|
|
41
|
+
<defs>
|
|
42
|
+
<clipPath id="clip0_4070_70030">
|
|
43
|
+
<rect width={props.size || 18} height={props.size || 18} fill="white" />
|
|
44
|
+
</clipPath>
|
|
45
|
+
</defs>
|
|
46
|
+
</svg>
|
|
47
|
+
);
|
|
48
|
+
export default CannedResponseIcon;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export const documentIcon = (
|
|
2
|
-
<svg
|
|
3
|
-
width="40"
|
|
4
|
-
height="40"
|
|
5
|
-
viewBox="0 0 40 40"
|
|
6
|
-
fill="none"
|
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
-
>
|
|
9
|
-
<path
|
|
10
|
-
d="M10.1923 5.83301L23.4363 5.83301L34.1656 14.2054V29.8639C34.1656 31.8997 32.5286 34.1663 29.8068 34.1663C27.0849 34.1663 10.1923 34.1663 10.1923 34.1663C7.4704 34.1663 5.8335 31.8997 5.8335 29.8639V10.0305C5.8335 7.99475 7.4704 5.83301 10.1923 5.83301Z"
|
|
11
|
-
fill="#24B0FF"
|
|
12
|
-
></path>
|
|
13
|
-
<path
|
|
14
|
-
d="M10.8335 28.1394V20.833H16.0309V22.4222H12.7026V23.5916H15.3612V25.1708H12.7026V28.1394H10.8335Z"
|
|
15
|
-
fill="#edf6ff"
|
|
16
|
-
></path>
|
|
17
|
-
<path
|
|
18
|
-
d="M19.0073 28.0885V20.833H20.8613V26.5118H24.0146V28.0885L19.0073 28.0885Z"
|
|
19
|
-
fill="#edf6ff"
|
|
20
|
-
></path>
|
|
21
|
-
<path
|
|
22
|
-
d="M16.5918 28.1001V20.833H18.4485V28.1001H16.5918Z"
|
|
23
|
-
fill="#edf6ff"
|
|
24
|
-
></path>
|
|
25
|
-
<path
|
|
26
|
-
d="M24.5737 20.833V28.1393H29.7723V26.5573H26.439L26.4422 25.1708H29.1017V23.5916H26.4422V22.4222H29.7723V20.833H24.5737Z"
|
|
27
|
-
fill="#edf6ff"
|
|
28
|
-
></path>
|
|
29
|
-
<path
|
|
30
|
-
opacity="0.302"
|
|
31
|
-
fillRule="evenodd"
|
|
32
|
-
clipRule="evenodd"
|
|
33
|
-
d="M23.2686 5.83301V14.2281H34.1655L23.2686 5.83301Z"
|
|
34
|
-
fill="#edf6ff"
|
|
35
|
-
></path>
|
|
36
|
-
</svg>
|
|
37
|
-
);
|
|
1
|
+
export const documentIcon = (
|
|
2
|
+
<svg
|
|
3
|
+
width="40"
|
|
4
|
+
height="40"
|
|
5
|
+
viewBox="0 0 40 40"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M10.1923 5.83301L23.4363 5.83301L34.1656 14.2054V29.8639C34.1656 31.8997 32.5286 34.1663 29.8068 34.1663C27.0849 34.1663 10.1923 34.1663 10.1923 34.1663C7.4704 34.1663 5.8335 31.8997 5.8335 29.8639V10.0305C5.8335 7.99475 7.4704 5.83301 10.1923 5.83301Z"
|
|
11
|
+
fill="#24B0FF"
|
|
12
|
+
></path>
|
|
13
|
+
<path
|
|
14
|
+
d="M10.8335 28.1394V20.833H16.0309V22.4222H12.7026V23.5916H15.3612V25.1708H12.7026V28.1394H10.8335Z"
|
|
15
|
+
fill="#edf6ff"
|
|
16
|
+
></path>
|
|
17
|
+
<path
|
|
18
|
+
d="M19.0073 28.0885V20.833H20.8613V26.5118H24.0146V28.0885L19.0073 28.0885Z"
|
|
19
|
+
fill="#edf6ff"
|
|
20
|
+
></path>
|
|
21
|
+
<path
|
|
22
|
+
d="M16.5918 28.1001V20.833H18.4485V28.1001H16.5918Z"
|
|
23
|
+
fill="#edf6ff"
|
|
24
|
+
></path>
|
|
25
|
+
<path
|
|
26
|
+
d="M24.5737 20.833V28.1393H29.7723V26.5573H26.439L26.4422 25.1708H29.1017V23.5916H26.4422V22.4222H29.7723V20.833H24.5737Z"
|
|
27
|
+
fill="#edf6ff"
|
|
28
|
+
></path>
|
|
29
|
+
<path
|
|
30
|
+
opacity="0.302"
|
|
31
|
+
fillRule="evenodd"
|
|
32
|
+
clipRule="evenodd"
|
|
33
|
+
d="M23.2686 5.83301V14.2281H34.1655L23.2686 5.83301Z"
|
|
34
|
+
fill="#edf6ff"
|
|
35
|
+
></path>
|
|
36
|
+
</svg>
|
|
37
|
+
);
|
package/dist/assets/svg/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./document";
|
|
1
|
+
export * from "./document";
|
|
2
2
|
export * from "./canned-response";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export interface BotSuggestProps {
|
|
2
2
|
disabled?: boolean;
|
|
3
|
+
showRestart?: boolean;
|
|
3
4
|
showMenuTrigger?: boolean;
|
|
4
5
|
onRestart: () => void;
|
|
5
6
|
onOpenMenu: () => void;
|
|
6
7
|
}
|
|
7
|
-
declare const BotSuggest: ({ disabled, showMenuTrigger, onRestart, onOpenMenu, }: BotSuggestProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const BotSuggest: ({ disabled, showRestart, showMenuTrigger, onRestart, onOpenMenu, }: BotSuggestProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
9
|
export default BotSuggest;
|
|
9
10
|
//# sourceMappingURL=BotSuggest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BotSuggest.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation-detail/bot/BotSuggest.tsx"],"names":[],"mappings":"AAiCA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,UAAU,GAAI,
|
|
1
|
+
{"version":3,"file":"BotSuggest.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation-detail/bot/BotSuggest.tsx"],"names":[],"mappings":"AAiCA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,UAAU,GAAI,oEAMjB,eAAe,mDA6BjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -5,8 +5,10 @@ import { useTranslation } from "react-i18next";
|
|
|
5
5
|
import { Icon } from "../../../components/icon";
|
|
6
6
|
const CHIP_ICON_SIZE = 14;
|
|
7
7
|
const SuggestChip = ({ disabled, icon, label, testId, onClick }) => (_jsxs("button", { type: "button", disabled: disabled, onClick: onClick, "data-testid": testId, className: clsx("flex h-7 shrink-0 items-center gap-1 rounded-lg bg-gray-25 px-3", "text-[12px] font-[510] leading-[1.6] tracking-[0.12px] text-gray-900 transition-colors", disabled && "cursor-not-allowed opacity-60"), children: [icon && _jsx(Icon, { icon: icon, size: CHIP_ICON_SIZE, className: "text-gray-900" }), _jsx("span", { className: "whitespace-nowrap", children: label })] }));
|
|
8
|
-
const BotSuggest = ({ disabled, showMenuTrigger = true, onRestart, onOpenMenu, }) => {
|
|
8
|
+
const BotSuggest = ({ disabled, showRestart = true, showMenuTrigger = true, onRestart, onOpenMenu, }) => {
|
|
9
9
|
const { t } = useTranslation("conversation-inbox");
|
|
10
|
-
|
|
10
|
+
if (!showRestart && !showMenuTrigger)
|
|
11
|
+
return null;
|
|
12
|
+
return (_jsxs("div", { "data-testid": "conversation-bot-suggest", className: "flex w-full items-center gap-2 overflow-x-auto bg-chat-bubble-neutral/[0.05] px-2 pt-2", children: [showRestart && (_jsx(SuggestChip, { disabled: disabled, icon: "arrow-reload-o", label: t("thread_detail.bot.restart"), onClick: onRestart })), showMenuTrigger && (_jsx(SuggestChip, { disabled: disabled, label: t("thread_detail.bot.menu.trigger"), testId: "conversation-bot-suggest-menu-trigger", onClick: onOpenMenu }))] }));
|
|
11
13
|
};
|
|
12
14
|
export default BotSuggest;
|
|
@@ -7,7 +7,8 @@ export interface MessageBubbleProps {
|
|
|
7
7
|
showTip?: boolean;
|
|
8
8
|
isInternal?: boolean;
|
|
9
9
|
id?: string;
|
|
10
|
+
isTransparent?: boolean;
|
|
10
11
|
}
|
|
11
|
-
declare const MessageBubble: ({ isMine, content, senderName, showSenderName, showTip, isInternal, id, }: MessageBubbleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const MessageBubble: ({ isMine, content, senderName, showSenderName, showTip, isInternal, id, isTransparent, }: MessageBubbleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default MessageBubble;
|
|
13
14
|
//# sourceMappingURL=MessageBubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/MessageBubble.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/MessageBubble.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA4CD,QAAA,MAAM,aAAa,GAAI,0FASpB,kBAAkB,4CA6CpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -8,16 +8,19 @@ const MessageBubbleTail = ({ isMine, isInternal, }) => (_jsx("div", { className:
|
|
|
8
8
|
: isMine
|
|
9
9
|
? "text-chat-bubble-mine"
|
|
10
10
|
: "text-chat-bubble-neutral"), children: _jsx("div", { className: "flex-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "4", height: "18", viewBox: "0 0 4 18", fill: "none", "aria-hidden": true, children: _jsx("path", { d: isMine ? OUTGOING_TAIL_PATH : INCOMING_TAIL_PATH, fill: "currentColor", fillOpacity: "0.1" }) }) }) }));
|
|
11
|
-
const MessageBubble = ({ isMine, content, senderName, showSenderName, showTip = true, isInternal = false, id, }) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
const MessageBubble = ({ isMine, content, senderName, showSenderName, showTip = true, isInternal = false, id, isTransparent = false, }) => {
|
|
12
|
+
const showTail = showTip && !isTransparent;
|
|
13
|
+
const bubbleClass = clsx("relative max-w-full", isTransparent
|
|
14
|
+
? "bg-transparent p-0"
|
|
15
|
+
: clsx("p-2", showTip
|
|
16
|
+
? isMine
|
|
17
|
+
? "rounded-[20px] rounded-br-none"
|
|
18
|
+
: "rounded-[20px] rounded-bl-none"
|
|
19
|
+
: "rounded-[20px]", isInternal
|
|
20
|
+
? "bg-chat-internal/10"
|
|
21
|
+
: isMine
|
|
22
|
+
? "bg-chat-bubble-mine/10"
|
|
23
|
+
: "bg-chat-bubble-neutral/10"));
|
|
24
|
+
return (_jsxs("div", { className: "relative flex items-end", "data-testid": "message-bubble", children: [!isMine && showTail && (_jsx(MessageBubbleTail, { isMine: isMine, isInternal: isInternal })), _jsx("div", { className: bubbleClass, id: id, children: _jsxs("div", { className: clsx("flex flex-col gap-1", !isTransparent && "px-1"), children: [showSenderName && senderName && (_jsx("span", { className: "text-[12px] font-medium leading-[160%] tracking-[0.12px] text-gray-400", children: senderName })), _jsx("div", { className: "flex flex-col gap-2", children: content })] }) }), isMine && showTail && (_jsx(MessageBubbleTail, { isMine: isMine, isInternal: isInternal }))] }));
|
|
22
25
|
};
|
|
23
26
|
export default MessageBubble;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MessageItem } from "@openim/wasm-client-sdk";
|
|
2
|
+
interface StickerMessageItemProps {
|
|
3
|
+
message: MessageItem;
|
|
4
|
+
}
|
|
5
|
+
declare const StickerMessageItem: ({ message }: StickerMessageItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default StickerMessageItem;
|
|
7
|
+
//# sourceMappingURL=StickerMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StickerMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/StickerMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,UAAU,uBAAuB;IAC/B,OAAO,EAAE,WAAW,CAAC;CACtB;AAID,QAAA,MAAM,kBAAkB,GAAI,aAAa,uBAAuB,4CAyB/D,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { Icon } from "../../../components/icon";
|
|
5
|
+
const STICKER_SIZE_CLASS = "h-[120px] w-[120px]";
|
|
6
|
+
const StickerMessageItem = ({ message }) => {
|
|
7
|
+
var _a;
|
|
8
|
+
const [hasLoadError, setHasLoadError] = useState(false);
|
|
9
|
+
const stickerUrl = (_a = message.stickerElem) === null || _a === void 0 ? void 0 : _a.content;
|
|
10
|
+
if (!stickerUrl || hasLoadError) {
|
|
11
|
+
return (_jsx("div", { className: clsx("flex items-center justify-center rounded-xl bg-black/5", STICKER_SIZE_CLASS), children: _jsx(Icon, { icon: "image-o", size: 32, className: "text-gray-400" }) }));
|
|
12
|
+
}
|
|
13
|
+
return (_jsx("img", { src: stickerUrl, alt: "", className: clsx("block object-cover", STICKER_SIZE_CLASS), onError: () => setHasLoadError(true) }));
|
|
14
|
+
};
|
|
15
|
+
export default StickerMessageItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,IAAI,eAAe,EAG/B,MAAM,yBAAyB,CAAC;AAiCjC,UAAU,gBAAgB;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAeD,QAAA,MAAM,WAAW,GAAI,qMAalB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,IAAI,eAAe,EAG/B,MAAM,yBAAyB,CAAC;AAiCjC,UAAU,gBAAgB;IACxB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAeD,QAAA,MAAM,WAAW,GAAI,qMAalB,gBAAgB,mDAgRlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -114,6 +114,7 @@ const MessageItem = ({ message, allMessages, isGroupChat = false, forceHideTip =
|
|
|
114
114
|
}, [conversationData === null || conversationData === void 0 ? void 0 : conversationData.ex, isCrm, message === null || message === void 0 ? void 0 : message.sendID, userID]);
|
|
115
115
|
const isInternalMessage = Boolean(message === null || message === void 0 ? void 0 : message.isInternal);
|
|
116
116
|
const isSystemLogMessage = isSystemLogMessageType(message === null || message === void 0 ? void 0 : message.contentType);
|
|
117
|
+
const isStickerMessage = (message === null || message === void 0 ? void 0 : message.contentType) === MessageType.StickerMessage;
|
|
117
118
|
const hasContextMenu = contextMenuItems.length > 0;
|
|
118
119
|
const isLatestMine = ((_a = allMessages.find((m) => m.sendID === userID)) === null || _a === void 0 ? void 0 : _a.clientMsgID) ===
|
|
119
120
|
message.clientMsgID;
|
|
@@ -140,7 +141,7 @@ const MessageItem = ({ message, allMessages, isGroupChat = false, forceHideTip =
|
|
|
140
141
|
timeBreakNode,
|
|
141
142
|
_jsx(SystemLogMessageItem, { message: message })));
|
|
142
143
|
}
|
|
143
|
-
const bubbleNode = (_jsx(MessageBubble, { isMine: isMine, isInternal: isInternalMessage, senderName: message === null || message === void 0 ? void 0 : message.senderNickname, showSenderName: showSenderName, showTip: showTip, id: `${MSG_ITEM_CONTENT_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, content: renderBubbleContent(message, onPressQuoteMessage) }));
|
|
144
|
+
const bubbleNode = (_jsx(MessageBubble, { isMine: isMine, isInternal: isInternalMessage, senderName: message === null || message === void 0 ? void 0 : message.senderNickname, showSenderName: showSenderName, showTip: showTip, id: `${MSG_ITEM_CONTENT_PREFIX}${message === null || message === void 0 ? void 0 : message.clientMsgID}`, content: renderBubbleContent(message, onPressQuoteMessage), isTransparent: isStickerMessage }));
|
|
144
145
|
const showPinnedBadge = Boolean(message === null || message === void 0 ? void 0 : message.isPinned) && Boolean(onPinMessage);
|
|
145
146
|
const pinnedBadgeNode = showPinnedBadge ? (_jsx("span", { "data-testid": "message-pinned-badge", className: clsx("absolute -top-2.5 z-[1] flex h-[22px] w-[26px] items-center justify-center rounded-full border border-white bg-gray-25", isMine ? "left-0" : "right-0"), children: _jsx(Icon, { icon: "thumbtack-b", size: 12, className: "text-primary-400" }) })) : null;
|
|
146
147
|
const wrappedBubble = hasContextMenu ? (_jsx(Dropdown, { menu: { items: contextMenuItems }, trigger: ["contextMenu"], open: contextMenuOpen, onOpenChange: onContextMenuOpenChange, overlayClassName: MESSAGE_TOOLBOX_OVERLAY_CLASSNAME, children: _jsxs("div", { ref: bubbleWrapperRef, className: "relative min-w-0", children: [bubbleNode, pinnedBadgeNode] }) })) : (_jsxs("div", { className: "relative min-w-0", children: [bubbleNode, pinnedBadgeNode] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderMessageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/renderMessageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAe,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"renderMessageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/message/item/renderMessageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAe,MAAM,yBAAyB,CAAC;AAatF,eAAO,MAAM,mBAAmB,GAAI,SAAS,eAAe,4CA2B3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,eAAe,EACxB,sBAAsB,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,4CAwBpD,CAAC"}
|
|
@@ -10,6 +10,7 @@ import RevokeMessageItem from "./RevokeMessage";
|
|
|
10
10
|
import QuoteMessageItem from "./QuoteMessage";
|
|
11
11
|
import SystemLogMessageItem from "./SystemLogMessage";
|
|
12
12
|
import CustomMessageItem from "./CustomMessage";
|
|
13
|
+
import StickerMessageItem from "./StickerMessage";
|
|
13
14
|
export const renderMessageByType = (message) => {
|
|
14
15
|
switch (message === null || message === void 0 ? void 0 : message.contentType) {
|
|
15
16
|
case MessageType.TextMessage:
|
|
@@ -31,6 +32,8 @@ export const renderMessageByType = (message) => {
|
|
|
31
32
|
return _jsx(RevokeMessageItem, {});
|
|
32
33
|
case MessageType.CustomMessage:
|
|
33
34
|
return _jsx(CustomMessageItem, { message: message });
|
|
35
|
+
case MessageType.StickerMessage:
|
|
36
|
+
return _jsx(StickerMessageItem, { message: message });
|
|
34
37
|
default:
|
|
35
38
|
return _jsx(TextMessageItem, { message: message });
|
|
36
39
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const BOT_DEFAULT_BUTTON_ID = "default-item-button";
|
|
2
|
+
export declare const BOT_TYPE: {
|
|
3
|
+
readonly FLOW: "FLOW";
|
|
4
|
+
readonly CS_TEAM: "CS_TEAM";
|
|
5
|
+
};
|
|
2
6
|
export declare const BOT_BUTTON_MENU_THRESHOLD = 3;
|
|
3
7
|
export declare const BOT_HIDDEN_COMMAND_PREFIX = "context:";
|
|
4
8
|
export declare const BOT_COMMAND_CHAT_WITH_CS = "context:chat_with_cs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"botFlow.d.ts","sourceRoot":"","sources":["../../src/constants/botFlow.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,eAAO,MAAM,yBAAyB,aAAa,CAAC;AAEpD,eAAO,MAAM,wBAAwB,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"botFlow.d.ts","sourceRoot":"","sources":["../../src/constants/botFlow.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAE3D,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AAEX,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,eAAO,MAAM,yBAAyB,aAAa,CAAC;AAEpD,eAAO,MAAM,wBAAwB,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export const BOT_DEFAULT_BUTTON_ID = "default-item-button";
|
|
2
|
+
export const BOT_TYPE = {
|
|
3
|
+
FLOW: "FLOW",
|
|
4
|
+
CS_TEAM: "CS_TEAM",
|
|
5
|
+
};
|
|
2
6
|
export const BOT_BUTTON_MENU_THRESHOLD = 3;
|
|
3
7
|
export const BOT_HIDDEN_COMMAND_PREFIX = "context:";
|
|
4
8
|
export const BOT_COMMAND_CHAT_WITH_CS = "context:chat_with_cs";
|
|
@@ -8,6 +8,7 @@ export declare const useBotFlow: ({ conversationId, isBotThread, }: UseBotFlowPa
|
|
|
8
8
|
status: BotFlowStatus;
|
|
9
9
|
flowIsEnd: boolean;
|
|
10
10
|
isBotInactive: boolean;
|
|
11
|
+
botType: import("../../types/conversation").BotType | undefined;
|
|
11
12
|
isProcessing: boolean;
|
|
12
13
|
shouldShowButtons: boolean;
|
|
13
14
|
currentButtonsBlock: BotInputButtonsBlock | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBotFlow.d.ts","sourceRoot":"","sources":["../../../src/hooks/conversation/useBotFlow.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAgB9B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AAEtD,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB;AAsBD,eAAO,MAAM,UAAU,GAAI,kCAGxB,gBAAgB
|
|
1
|
+
{"version":3,"file":"useBotFlow.d.ts","sourceRoot":"","sources":["../../../src/hooks/conversation/useBotFlow.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAgB9B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,aAAa,CAAC;AAEtD,UAAU,gBAAgB;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB;AAsBD,eAAO,MAAM,UAAU,GAAI,kCAGxB,gBAAgB;;;;;;;;;;;;6BAmIqB,MAAM;;6BAkDN,eAAe;;;CA+CtD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { message as toastMessage } from "antd";
|
|
5
5
|
import { BotBlockType, BotFlowNodeType, BotStatus, } from "../../types/conversation";
|
|
6
|
-
import { BOT_DEFAULT_BUTTON_ID } from "../../constants/botFlow";
|
|
6
|
+
import { BOT_DEFAULT_BUTTON_ID, BOT_TYPE } from "../../constants/botFlow";
|
|
7
7
|
import { useSendMessage } from "../../hooks/message/useSendMessage";
|
|
8
8
|
import useAuthStore from "../../store/auth";
|
|
9
9
|
import useConversationStore from "../../store/conversation";
|
|
@@ -31,7 +31,7 @@ const parseMessageFlowGroupId = (ex) => {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
export const useBotFlow = ({ conversationId, isBotThread, }) => {
|
|
34
|
-
var _a, _b, _c;
|
|
34
|
+
var _a, _b, _c, _d;
|
|
35
35
|
const [botFlowState, setBotFlowState] = useState(INITIAL_BOT_FLOW_STATE);
|
|
36
36
|
const { conversationId: storedConversationId, flowCurrentStep } = botFlowState;
|
|
37
37
|
const isActiveConversation = storedConversationId === conversationId;
|
|
@@ -47,6 +47,7 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
|
|
|
47
47
|
const detailQuery = useBotConversationDetail(conversationId, isBotThread);
|
|
48
48
|
const botDetailQuery = useBotDetail(botId, isBotThread);
|
|
49
49
|
const isBotInactive = ((_a = botDetailQuery.data) === null || _a === void 0 ? void 0 : _a.status) === BotStatus.INACTIVE;
|
|
50
|
+
const botType = (_b = botDetailQuery.data) === null || _b === void 0 ? void 0 : _b.type;
|
|
50
51
|
const runMutation = useRunBotFlow();
|
|
51
52
|
const resetMutation = useResetBotFlow();
|
|
52
53
|
const closeSessionMutation = useCloseBotSession();
|
|
@@ -54,8 +55,8 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
|
|
|
54
55
|
scrollEvent: "CONVERSATION_CHAT_SCROLL_TO_BOTTOM_IF_AT_BOTTOM",
|
|
55
56
|
});
|
|
56
57
|
const [pendingMenuOption, setPendingMenuOption] = useState(null);
|
|
57
|
-
const menuQuery = useBotMainMenu(conversationId, isBotThread);
|
|
58
|
-
const menuItems = filterVisibleBotButtons((
|
|
58
|
+
const menuQuery = useBotMainMenu(conversationId, isBotThread && botType === BOT_TYPE.FLOW);
|
|
59
|
+
const menuItems = filterVisibleBotButtons((_c = menuQuery.data) !== null && _c !== void 0 ? _c : []);
|
|
59
60
|
useEffect(() => {
|
|
60
61
|
if (!isBotThread) {
|
|
61
62
|
setBotFlowState(INITIAL_BOT_FLOW_STATE);
|
|
@@ -89,7 +90,7 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
|
|
|
89
90
|
};
|
|
90
91
|
}, [authUserID]);
|
|
91
92
|
const activeStep = storedConversationId === conversationId ? flowCurrentStep : null;
|
|
92
|
-
const currentButtonsBlock = (
|
|
93
|
+
const currentButtonsBlock = (_d = activeStep === null || activeStep === void 0 ? void 0 : activeStep.data.children.find((child) => child.type === BotBlockType.InputButtons)) !== null && _d !== void 0 ? _d : null;
|
|
93
94
|
const isInActiveCsSession = isInCsSession({ flowCurrentStep: activeStep });
|
|
94
95
|
const isProcessing = runMutation.isPending ||
|
|
95
96
|
resetMutation.isPending ||
|
|
@@ -200,6 +201,7 @@ export const useBotFlow = ({ conversationId, isBotThread, }) => {
|
|
|
200
201
|
status,
|
|
201
202
|
flowIsEnd,
|
|
202
203
|
isBotInactive,
|
|
204
|
+
botType,
|
|
203
205
|
isProcessing,
|
|
204
206
|
shouldShowButtons,
|
|
205
207
|
currentButtonsBlock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EACX,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAYjC,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,WAAW,EACX,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAYjC,eAAO,MAAM,kBAAkB,eAiB9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,SAAS,WAAW,EACpB,OAAO,OAAO,KACb,OAWF,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,iBAAiB,MAAM,EACvB,oBAAoB,MAAM,EAC1B,iBAAc,EACd,uBAAqB;;;;;qBAeA,WAAW,EAAE;;;;;;qBAAb,WAAW,EAAE;;;;;;CAsSnC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,SACpB,CAAC;AAChC,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,SACpB,CAAC;AAClC,eAAO,MAAM,gBAAgB,GAAI,aAAa,MAAM,SACf,CAAC;AAEtC,eAAO,MAAM,kBAAkB,GAC7B,aAAa,WAAW,EAAE,EAC1B,SAAS,WAAW,EACpB,WAAW,MAAM,GAAG,MAAM,KACzB,WAAW,GAAG,SAkBhB,CAAC"}
|
package/dist/locales/i18n.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import i18n from "i18next";
|
|
2
|
-
import { initReactI18next } from "react-i18next";
|
|
3
|
-
import vi from "./vi/common.json";
|
|
4
|
-
import viConversationInbox from "./vi/conversation-inbox.json";
|
|
5
|
-
|
|
6
|
-
if (!i18n.isInitialized) {
|
|
7
|
-
i18n.use(initReactI18next).init({
|
|
8
|
-
resources: {
|
|
9
|
-
vi: { common: vi, "conversation-inbox": viConversationInbox },
|
|
10
|
-
},
|
|
11
|
-
lng: "vi",
|
|
12
|
-
fallbackLng: "vi",
|
|
13
|
-
interpolation: { escapeValue: false },
|
|
14
|
-
ns: ["common", "conversation-inbox"],
|
|
15
|
-
defaultNS: "common",
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default i18n;
|
|
1
|
+
import i18n from "i18next";
|
|
2
|
+
import { initReactI18next } from "react-i18next";
|
|
3
|
+
import vi from "./vi/common.json";
|
|
4
|
+
import viConversationInbox from "./vi/conversation-inbox.json";
|
|
5
|
+
|
|
6
|
+
if (!i18n.isInitialized) {
|
|
7
|
+
i18n.use(initReactI18next).init({
|
|
8
|
+
resources: {
|
|
9
|
+
vi: { common: vi, "conversation-inbox": viConversationInbox },
|
|
10
|
+
},
|
|
11
|
+
lng: "vi",
|
|
12
|
+
fallbackLng: "vi",
|
|
13
|
+
interpolation: { escapeValue: false },
|
|
14
|
+
ns: ["common", "conversation-inbox"],
|
|
15
|
+
defaultNS: "common",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default i18n;
|