impact-ui 5.0.2-alpha.3 → 5.0.2-alpha.5
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/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +2 -4
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Menu/MenuHeaderInfo.d.ts.map +1 -1
- package/dist/components/Menu/MenuHeaderInfo.js +3 -4
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Panel/Panel.types.d.ts +0 -7
- package/dist/components/Panel/Panel.types.d.ts.map +1 -1
- package/dist/components/Panel/index.d.ts +1 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +2 -5
- package/dist/components/TableChat/EmptyContainer.js +3 -3
- package/dist/components/TableChat/TableChatSidePanel.d.ts +1 -2
- package/dist/components/TableChat/TableChatSidePanel.d.ts.map +1 -1
- package/dist/components/TableChat/TableChatSidePanel.js +23 -216
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts +2 -7
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.js +24 -92
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.js +2 -3
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.js +43 -20
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +2 -37
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +18 -54
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts +1 -4
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +81 -90
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -2
- package/dist/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.js +65 -0
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +16 -51
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.js +57 -68
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts +1 -8
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.js +4 -170
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts +1 -5
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +124 -138
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts +9 -11
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +106 -102
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +17 -0
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +1 -4
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts +1 -2
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +215 -327
- package/dist/components/TableChat/components/chatConfig.js +1 -0
- package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -1
- package/dist/components/TableV36/AgGridHeader.js +34 -8
- package/dist/components/TableV36/advanceSearchModal.d.ts.map +1 -1
- package/dist/components/TableV36/filterUtils.d.ts +10 -0
- package/dist/components/TableV36/filterUtils.d.ts.map +1 -1
- package/dist/components/TableV36/filterUtils.js +29 -0
- package/dist/components/TableV36/index.d.ts.map +1 -1
- package/dist/components/TableV36/index.js +15 -140
- package/dist/components/TableV36/tableHeader.d.ts +1 -6
- package/dist/components/TableV36/tableHeader.d.ts.map +1 -1
- package/dist/components/TableV36/tableHeader.js +11 -39
- package/dist/locales/de-DE.json.d.ts +3 -18
- package/dist/locales/de-DE.json.js +3 -17
- package/dist/locales/en-US.json.d.ts +3 -18
- package/dist/locales/en-US.json.js +3 -17
- package/dist/locales/es-ES.json.d.ts +3 -18
- package/dist/locales/es-ES.json.js +3 -17
- package/dist/mcp-component-registry.json +7 -1
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +1 -3
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/stories/tableV36ChatApiMock.d.ts +74 -226
- package/dist/stories/tableV36ChatApiMock.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/_virtual/Check.js +0 -4
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.d.ts +0 -11
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.d.ts.map +0 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.js +0 -57
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.d.ts +0 -12
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.d.ts.map +0 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.js +0 -132
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.js +0 -29
- package/dist/components/TableV36/withChatIndicator.d.ts +0 -3
- package/dist/components/TableV36/withChatIndicator.d.ts.map +0 -1
- package/dist/components/TableV36/withChatIndicator.js +0 -89
- package/dist/node_modules/@mui/icons-material/Check.js +0 -17
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}#table-chat-side-panel .impact_drawer_container{background:#fff}#table-chat-side-panel .impact_drawer_header{background:#eceefd;border-bottom:1px solid #d9dde7}#table-chat-side-panel .impact_drawer_body{padding:0}.table-chat-container{box-sizing:border-box;display:flex;flex-direction:row;gap:10px;height:100%;overflow:hidden;width:100%}.table-chat-container .table-left-panel-container{flex:0 0 350px;flex-shrink:0;max-width:350px;width:350px}.table-chat-container .table-chat-right-section-container{flex:1 1 0;max-width:100%;min-width:0;width:auto}.empty-container{align-items:center;display:flex;justify-content:center}.empty-container img{height:197px;width:190px}.empty-container p:first-of-type{color:#1f2b4d;font-size:20px;font-style:normal;font-weight:800;line-height:30px}.empty-container p:nth-of-type(2){color:#7a8294;font-size:16px;font-style:normal;font-weight:500;line-height:125%;text-align:center}.loader-padding{padding:16px;width:100%}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
2
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useCallback, useMemo, useEffect } from "react";
|
|
4
|
-
import default_1 from "../../node_modules/@mui/icons-material/Close.js";
|
|
5
|
-
import { Button } from "../Button/index.js";
|
|
6
4
|
import { Panel } from "../Panel/index.js";
|
|
7
5
|
import { Prompt } from "../Prompt/index.js";
|
|
8
6
|
import { Toast } from "../Toast/index.js";
|
|
@@ -15,8 +13,8 @@ import { EmptyContainer } from "./EmptyContainer.js";
|
|
|
15
13
|
import { formatChatHeaderTimestamp } from "./utils/formatChatTimestamp.js";
|
|
16
14
|
|
|
17
15
|
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
18
|
-
const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L
|
|
16
|
+
const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
20
18
|
const { t } = useTranslation();
|
|
21
19
|
const [selectedChannelId, setSelectedChannelId] = useState(null);
|
|
22
20
|
const [selectedChannelInfo, setSelectedChannelInfo] = useState(null);
|
|
@@ -173,14 +171,9 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
173
171
|
setToastVariant("info");
|
|
174
172
|
}
|
|
175
173
|
};
|
|
176
|
-
const handleChatClick = async (chatId, selectedChatData
|
|
174
|
+
const handleChatClick = async (chatId, selectedChatData) => {
|
|
177
175
|
var _a2;
|
|
178
|
-
|
|
179
|
-
if (screen) {
|
|
180
|
-
setCurrentSelectedScreen(screen);
|
|
181
|
-
} else if (!keepScreen) {
|
|
182
|
-
setCurrentSelectedScreen("chats");
|
|
183
|
-
}
|
|
176
|
+
setCurrentSelectedScreen("chats");
|
|
184
177
|
setLoadingMessages(true);
|
|
185
178
|
setSelectedChatId(chatId);
|
|
186
179
|
setSelectedChatInfo(selectedChatData);
|
|
@@ -196,7 +189,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
196
189
|
setLoadingMessages(false);
|
|
197
190
|
}
|
|
198
191
|
};
|
|
199
|
-
const fetchChatList = async (currentActiveChannelInfo
|
|
192
|
+
const fetchChatList = async (currentActiveChannelInfo) => {
|
|
200
193
|
var _a2;
|
|
201
194
|
setCurrentSelectedScreen("chats");
|
|
202
195
|
setSelectedChat([]);
|
|
@@ -206,10 +199,6 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
206
199
|
const chatList2 = await chatConfiguration.leftPanel.loadChatList(currentActiveChannelInfo);
|
|
207
200
|
setChatList(chatList2);
|
|
208
201
|
setOriginalChatList(chatList2);
|
|
209
|
-
if (autoOpenFirst && (chatList2 == null ? void 0 : chatList2.length) > 0) {
|
|
210
|
-
const firstChat = chatList2[0];
|
|
211
|
-
await handleChatClick(firstChat.id, firstChat, { keepScreen: true });
|
|
212
|
-
}
|
|
213
202
|
return chatList2;
|
|
214
203
|
} catch (err) {
|
|
215
204
|
console.error("[TableChatSidePanel] [fetchChatList] [error]:", err);
|
|
@@ -236,7 +225,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
236
225
|
title: t("tableChat.sidePanel.chatList"),
|
|
237
226
|
objectType: (_e2 = newChat == null ? void 0 : newChat.otherProps) == null ? void 0 : _e2.object_type
|
|
238
227
|
};
|
|
239
|
-
await fetchChatList(newChannelInfo
|
|
228
|
+
await fetchChatList(newChannelInfo);
|
|
240
229
|
setSelectedChannelInfo(newChannelInfo);
|
|
241
230
|
setSelectedChannelId((_g2 = (_f2 = newChat == null ? void 0 : newChat.otherProps) == null ? void 0 : _f2.object_ids) == null ? void 0 : _g2[0]);
|
|
242
231
|
await handleChatClick(newChat.id, newChat);
|
|
@@ -252,12 +241,6 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
252
241
|
};
|
|
253
242
|
const fetchChannelList = async () => {
|
|
254
243
|
setCurrentSelectedScreen("channels");
|
|
255
|
-
setSelectedChannelId(null);
|
|
256
|
-
setSelectedChannelInfo(null);
|
|
257
|
-
setSelectedChatId(null);
|
|
258
|
-
setSelectedChatInfo(null);
|
|
259
|
-
setChatList([]);
|
|
260
|
-
setOriginalChatList([]);
|
|
261
244
|
setLoadingChannelsOrChats(true);
|
|
262
245
|
try {
|
|
263
246
|
const channelList = await chatConfiguration.leftPanel.loadChannelsList();
|
|
@@ -313,90 +296,11 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
313
296
|
setLoadingChannelsOrChats(false);
|
|
314
297
|
}
|
|
315
298
|
};
|
|
316
|
-
const openChatFromSelection = async (selectedRows = [], { isSpace = false } = {}) => {
|
|
317
|
-
var _a2;
|
|
318
|
-
setLoadingChannelsOrChats(true);
|
|
319
|
-
setLoadingMessages(true);
|
|
320
|
-
setIsCreateNewChatOpen(false);
|
|
321
|
-
try {
|
|
322
|
-
const onStartNewChat = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _a2.onStartNewChat;
|
|
323
|
-
if (typeof onStartNewChat !== "function") {
|
|
324
|
-
await fetchChannelList();
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
const result = await onStartNewChat(selectedRows, { isSpace });
|
|
328
|
-
const channel = result == null ? void 0 : result.channel;
|
|
329
|
-
const chatToOpen = (result == null ? void 0 : result.openChat) || (result == null ? void 0 : result.formattedChat);
|
|
330
|
-
if (!(result == null ? void 0 : result.success) || !channel || !(chatToOpen == null ? void 0 : chatToOpen.id)) {
|
|
331
|
-
await fetchChannelList();
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
const nextChannels = Array.isArray(result.channelsList) ? result.channelsList : [channel];
|
|
335
|
-
const nextScreen = result.screen === "channels" ? "channels" : "chats";
|
|
336
|
-
const nextChatList = Array.isArray(result.chatList) ? result.chatList : [chatToOpen];
|
|
337
|
-
setChannelsList(nextChannels);
|
|
338
|
-
setOriginalChanelList(nextChannels);
|
|
339
|
-
setSelectedChannelId(channel.id);
|
|
340
|
-
setSelectedChannelInfo(channel);
|
|
341
|
-
setChatList(nextChatList);
|
|
342
|
-
setOriginalChatList(nextChatList);
|
|
343
|
-
setCurrentSelectedScreen(nextScreen);
|
|
344
|
-
await handleChatClick(chatToOpen.id, chatToOpen, { screen: nextScreen });
|
|
345
|
-
} catch (error) {
|
|
346
|
-
console.error("[TableChatSidePanel] [openChatFromSelection] [error]:", error);
|
|
347
|
-
handleToast(true, t("tableChat.sidePanel.errorLoadingChat"), "error");
|
|
348
|
-
await fetchChannelList();
|
|
349
|
-
} finally {
|
|
350
|
-
setLoadingChannelsOrChats(false);
|
|
351
|
-
setLoadingMessages(false);
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
const openChannelFromRow = async (selectedRows = []) => {
|
|
355
|
-
var _a2, _b2;
|
|
356
|
-
setLoadingChannelsOrChats(true);
|
|
357
|
-
setIsCreateNewChatOpen(false);
|
|
358
|
-
setSelectedChatId(null);
|
|
359
|
-
setSelectedChatInfo(null);
|
|
360
|
-
try {
|
|
361
|
-
const onOpenChannelFromRow = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _a2.onOpenChannelFromRow;
|
|
362
|
-
if (typeof onOpenChannelFromRow !== "function") {
|
|
363
|
-
await fetchChannelList();
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
const result = await onOpenChannelFromRow(selectedRows);
|
|
367
|
-
if (!(result == null ? void 0 : result.success) || !(result == null ? void 0 : result.channel)) {
|
|
368
|
-
await fetchChannelList();
|
|
369
|
-
return;
|
|
370
|
-
}
|
|
371
|
-
const nextChannels = Array.isArray(result.channelsList) ? result.channelsList : [result.channel];
|
|
372
|
-
const nextChatList = Array.isArray(result.chatList) ? result.chatList : [];
|
|
373
|
-
const nextScreen = result.screen === "channels" ? "channels" : "chats";
|
|
374
|
-
setChannelsList(nextChannels);
|
|
375
|
-
setOriginalChanelList(nextChannels);
|
|
376
|
-
setSelectedChannelId(result.channel.id);
|
|
377
|
-
setSelectedChannelInfo(result.channel);
|
|
378
|
-
setChatList(nextChatList);
|
|
379
|
-
setOriginalChatList(nextChatList);
|
|
380
|
-
setCurrentSelectedScreen(nextScreen);
|
|
381
|
-
const chatToOpen = ((_b2 = result.openChat) == null ? void 0 : _b2.id) != null ? result.openChat : nextChatList.length > 0 ? nextChatList[0] : null;
|
|
382
|
-
if (chatToOpen == null ? void 0 : chatToOpen.id) {
|
|
383
|
-
await handleChatClick(chatToOpen.id, chatToOpen, { screen: nextScreen });
|
|
384
|
-
}
|
|
385
|
-
} catch (error) {
|
|
386
|
-
console.error("[TableChatSidePanel] [openChannelFromRow] [error]:", error);
|
|
387
|
-
handleToast(true, t("tableChat.sidePanel.errorLoadingChat"), "error");
|
|
388
|
-
await fetchChannelList();
|
|
389
|
-
} finally {
|
|
390
|
-
setLoadingChannelsOrChats(false);
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
299
|
const clearnupLocalStates = () => {
|
|
394
300
|
setSelectedChannelId(null);
|
|
395
301
|
setSelectedChannelInfo(null);
|
|
396
302
|
setSelectedChatInfo(null);
|
|
397
303
|
setSelectedChatId(null);
|
|
398
|
-
setChannelsList([]);
|
|
399
|
-
setOriginalChanelList([]);
|
|
400
304
|
setChatList([]);
|
|
401
305
|
setOriginalChatList([]);
|
|
402
306
|
setSelectedChat([]);
|
|
@@ -408,7 +312,6 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
408
312
|
setIsMoreOpen(false);
|
|
409
313
|
setHighlightMessageId(null);
|
|
410
314
|
setIsCreateNewChatOpen(false);
|
|
411
|
-
setCurrentSelectedScreen("channels");
|
|
412
315
|
};
|
|
413
316
|
const handleBackToChannels = async () => {
|
|
414
317
|
var _a2;
|
|
@@ -419,19 +322,10 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
419
322
|
await fetchChannelList();
|
|
420
323
|
};
|
|
421
324
|
useEffect(() => {
|
|
422
|
-
if (
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
|
-
if ((entryContext == null ? void 0 : entryContext.mode) === "startNewChat" || (entryContext == null ? void 0 : entryContext.mode) === "createSpace") {
|
|
426
|
-
openChatFromSelection(entryContext.selectedRows, {
|
|
427
|
-
isSpace: entryContext.mode === "createSpace"
|
|
428
|
-
});
|
|
429
|
-
} else if ((entryContext == null ? void 0 : entryContext.mode) === "openChannel") {
|
|
430
|
-
openChannelFromRow(entryContext.selectedRows);
|
|
431
|
-
} else {
|
|
325
|
+
if (isOpen) {
|
|
432
326
|
fetchChannelsOrChats();
|
|
433
327
|
}
|
|
434
|
-
}, [isOpen
|
|
328
|
+
}, [isOpen]);
|
|
435
329
|
useEffect(() => {
|
|
436
330
|
var _a2;
|
|
437
331
|
if (!isOpen) {
|
|
@@ -479,42 +373,13 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
479
373
|
setHighlightTrigger((prev) => prev + 1);
|
|
480
374
|
};
|
|
481
375
|
const handleChannelClick = async (selectedChannelId2, selectedChannelInfo2) => {
|
|
482
|
-
var _a2, _b2, _c2;
|
|
483
376
|
setSelectedChannelId(selectedChannelId2);
|
|
484
377
|
setSelectedChannelInfo(selectedChannelInfo2);
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
if (typeof onChannelOpen === "function") {
|
|
490
|
-
try {
|
|
491
|
-
const result = await onChannelOpen(selectedChannelInfo2);
|
|
492
|
-
if (Array.isArray(result == null ? void 0 : result.channelsList)) {
|
|
493
|
-
setChannelsList(result.channelsList);
|
|
494
|
-
setOriginalChanelList(result.channelsList);
|
|
495
|
-
}
|
|
496
|
-
if (Array.isArray(result == null ? void 0 : result.chatList)) {
|
|
497
|
-
setCurrentSelectedScreen(result.screen === "channels" ? "channels" : "chats");
|
|
498
|
-
setChatList(result.chatList);
|
|
499
|
-
setOriginalChatList(result.chatList);
|
|
500
|
-
} else {
|
|
501
|
-
await fetchChatList(selectedChannelInfo2);
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
const chatToOpen = ((_b2 = result == null ? void 0 : result.openChat) == null ? void 0 : _b2.id) != null ? result.openChat : ((_c2 = result == null ? void 0 : result.chatList) == null ? void 0 : _c2.length) > 0 ? result.chatList[0] : null;
|
|
505
|
-
if (chatToOpen == null ? void 0 : chatToOpen.id) {
|
|
506
|
-
await handleChatClick(chatToOpen.id, chatToOpen, {
|
|
507
|
-
screen: result.screen === "channels" ? "channels" : "chats"
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
return;
|
|
511
|
-
} catch (error) {
|
|
512
|
-
console.error("[TableChatSidePanel] [onChannelOpen] [error]:", error);
|
|
513
|
-
handleToast(true, t("tableChat.sidePanel.errorLoadingChat"), "error");
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
378
|
+
const chatList2 = await fetchChatList(selectedChannelInfo2);
|
|
379
|
+
if (chatList2 && chatList2.length > 0) {
|
|
380
|
+
const firstChat = chatList2 == null ? void 0 : chatList2[0];
|
|
381
|
+
await handleChatClick(firstChat == null ? void 0 : firstChat.id, firstChat);
|
|
516
382
|
}
|
|
517
|
-
await fetchChatList(selectedChannelInfo2);
|
|
518
383
|
};
|
|
519
384
|
const handleChatSelect = (selectedChatId2) => {
|
|
520
385
|
setSelectedChat(
|
|
@@ -604,22 +469,10 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
604
469
|
{
|
|
605
470
|
anchor: "right",
|
|
606
471
|
className: "table-chat-panel",
|
|
607
|
-
headerRightContent: /* @__PURE__ */ jsx(
|
|
608
|
-
Button,
|
|
609
|
-
{
|
|
610
|
-
"aria-label": t("common.close"),
|
|
611
|
-
className: "table-chat-panel-close",
|
|
612
|
-
icon: /* @__PURE__ */ jsx(default_1, { fontSize: "small" }),
|
|
613
|
-
size: "medium",
|
|
614
|
-
variant: "text",
|
|
615
|
-
onClick: handleClose
|
|
616
|
-
}
|
|
617
|
-
),
|
|
618
472
|
open: isOpen,
|
|
619
473
|
setIsOpen: () => {
|
|
620
474
|
setIsChatOpen(!isChatOpen);
|
|
621
475
|
},
|
|
622
|
-
showCloseButton: false,
|
|
623
476
|
size: "medium",
|
|
624
477
|
title: chatConfiguration == null ? void 0 : chatConfiguration.title,
|
|
625
478
|
width: pinnedMsg || showThread ? 1450 : 985,
|
|
@@ -644,7 +497,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
644
497
|
showAddChatBtn: (_u = (_t = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _t.leftHeaderPanel) == null ? void 0 : _u.showAddChat,
|
|
645
498
|
showChannelList: isChannelsScreen,
|
|
646
499
|
showCheckbox: (_w = (_v = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _v.leftChatPanel) == null ? void 0 : _w.showCheckbox,
|
|
647
|
-
title: isChannelsScreen ?
|
|
500
|
+
title: isChannelsScreen ? t("tableChat.sidePanel.channelsList") : selectedChannelInfo == null ? void 0 : selectedChannelInfo.title,
|
|
648
501
|
onBack: handleBackToChannels,
|
|
649
502
|
onChannelSelect: (id, selectedChannelOrChat) => {
|
|
650
503
|
if (isChannelsScreen) {
|
|
@@ -656,67 +509,21 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
656
509
|
onDeleteTopics: handleDeletePromptOpen,
|
|
657
510
|
onMenuClick: toggleMenu,
|
|
658
511
|
onMoreClick: showMore,
|
|
659
|
-
onPinnedChatClick: (
|
|
512
|
+
onPinnedChatClick: (_x = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _x.onPinnedChatClick,
|
|
660
513
|
onSearchClick: openSearch
|
|
661
514
|
}
|
|
662
515
|
),
|
|
663
516
|
loadingMessages ? /* @__PURE__ */ jsx(ChatSkeleton, { text: t("tableChat.loadingMessages") }) : /* @__PURE__ */ jsx(Fragment, { children: !selectedChannelId || !selectedChatId ? /* @__PURE__ */ jsx(
|
|
664
517
|
EmptyContainer,
|
|
665
518
|
{
|
|
666
|
-
subTitle: !selectedChannelId ? (
|
|
667
|
-
title: !selectedChannelId ? (
|
|
519
|
+
subTitle: !selectedChannelId ? (_y = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _y.emptyChannelStateSubTitle : !selectedChatId ? (_z = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _z.emptyChatStateSubTitle : "",
|
|
520
|
+
title: !selectedChannelId ? (_A = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _A.emptyChannelStateTitle : !selectedChatId ? (_B = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _B.emptyChatStateTitle : ""
|
|
668
521
|
}
|
|
669
522
|
) : /* @__PURE__ */ jsx(
|
|
670
523
|
TableChatRightSection,
|
|
671
524
|
{
|
|
672
525
|
chatHeaderConfig: {
|
|
673
526
|
...chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig,
|
|
674
|
-
isResolved: (selectedChatInfo == null ? void 0 : selectedChatInfo.isResolved) ?? ((_D = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _D.is_resolved) ?? ((_E = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _E.isResolved),
|
|
675
|
-
chatDisplayId: (selectedChatInfo == null ? void 0 : selectedChatInfo.displayId) ?? ((_F = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _F.reference_id) ?? ((_G = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _G.display_id) ?? ((_H = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _H.chatDisplayId),
|
|
676
|
-
onResolve: async (resolvedChatId) => {
|
|
677
|
-
var _a2, _b2;
|
|
678
|
-
const result = await ((_b2 = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _a2.onResolve) == null ? void 0 : _b2.call(_a2, resolvedChatId));
|
|
679
|
-
setSelectedChatInfo(
|
|
680
|
-
(prev) => prev ? {
|
|
681
|
-
...prev,
|
|
682
|
-
isResolved: true,
|
|
683
|
-
otherProps: { ...prev.otherProps, is_resolved: true }
|
|
684
|
-
} : prev
|
|
685
|
-
);
|
|
686
|
-
return result;
|
|
687
|
-
},
|
|
688
|
-
onTitleChange: async (renamedChatId, nextTitle) => {
|
|
689
|
-
var _a2, _b2, _c2;
|
|
690
|
-
const result = await ((_b2 = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _a2.onTitleChange) == null ? void 0 : _b2.call(
|
|
691
|
-
_a2,
|
|
692
|
-
renamedChatId,
|
|
693
|
-
nextTitle
|
|
694
|
-
));
|
|
695
|
-
const resolvedTitle = (result == null ? void 0 : result.title) ?? ((_c2 = result == null ? void 0 : result.formattedChat) == null ? void 0 : _c2.title) ?? nextTitle;
|
|
696
|
-
setSelectedChatInfo(
|
|
697
|
-
(prev) => prev ? {
|
|
698
|
-
...prev,
|
|
699
|
-
title: resolvedTitle,
|
|
700
|
-
otherProps: {
|
|
701
|
-
...prev.otherProps,
|
|
702
|
-
name: resolvedTitle
|
|
703
|
-
}
|
|
704
|
-
} : prev
|
|
705
|
-
);
|
|
706
|
-
const patchChatTitle = (list = []) => list.map(
|
|
707
|
-
(chat) => (chat == null ? void 0 : chat.id) === renamedChatId ? {
|
|
708
|
-
...chat,
|
|
709
|
-
title: resolvedTitle,
|
|
710
|
-
otherProps: {
|
|
711
|
-
...chat.otherProps,
|
|
712
|
-
name: resolvedTitle
|
|
713
|
-
}
|
|
714
|
-
} : chat
|
|
715
|
-
);
|
|
716
|
-
setChatList((prev) => patchChatTitle(prev));
|
|
717
|
-
setOriginalChatList((prev) => patchChatTitle(prev));
|
|
718
|
-
return result;
|
|
719
|
-
},
|
|
720
527
|
onPinnedClick: (chatId) => {
|
|
721
528
|
setShowThread(false);
|
|
722
529
|
setShowPinnedMsg(true);
|
|
@@ -724,18 +531,18 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryConte
|
|
|
724
531
|
}
|
|
725
532
|
},
|
|
726
533
|
chatId: selectedChatId,
|
|
727
|
-
CreatedBy: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdBy) || (selectedChatInfo == null ? void 0 : selectedChatInfo.user) || ((
|
|
534
|
+
CreatedBy: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdBy) || (selectedChatInfo == null ? void 0 : selectedChatInfo.user) || ((_C = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _C.created_by_user),
|
|
728
535
|
handleToast,
|
|
729
536
|
inputChatConfig: {
|
|
730
537
|
...chatConfiguration.inputChatConfig
|
|
731
538
|
},
|
|
732
539
|
messageConfig: memoizedMessageConfig,
|
|
733
540
|
setPinnedMessages,
|
|
734
|
-
showActionBtn: (
|
|
735
|
-
showParticipantsList: (
|
|
736
|
-
showPinnedChat: (
|
|
737
|
-
showSearch: (
|
|
738
|
-
createdAt: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdAt) || formatChatHeaderTimestamp((
|
|
541
|
+
showActionBtn: (_E = (_D = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _D.rightHeaderPanel) == null ? void 0 : _E.showActionBtn,
|
|
542
|
+
showParticipantsList: (_G = (_F = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _F.rightHeaderPanel) == null ? void 0 : _G.showParticipants,
|
|
543
|
+
showPinnedChat: (_I = (_H = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _H.rightHeaderPanel) == null ? void 0 : _I.showPinnedChat,
|
|
544
|
+
showSearch: (_K = (_J = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _J.rightHeaderPanel) == null ? void 0 : _K.showChatSearch,
|
|
545
|
+
createdAt: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdAt) || formatChatHeaderTimestamp((_L = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _L.created_at),
|
|
739
546
|
title: selectedChatInfo == null ? void 0 : selectedChatInfo.title
|
|
740
547
|
}
|
|
741
548
|
) }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.chatcontainer{background:#fff;border-radius:10px;box-shadow:0 0 4px #0000001f;
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.chatcontainer{background:#fff;border-radius:10px;box-shadow:0 0 4px #0000001f;display:grid;grid-auto-flow:row;padding:10px;position:fixed;row-gap:10px;top:120px;width:231px;z-index:9999}.chatcontainer .chat-header-navigation .nav-right button{background-color:#4259ee!important;border:1px solid #c3c8d4}.chatcontainer .MuiInputBase-root input.MuiInputBase-input{min-width:210px!important}.chatFooterContainer{display:flex;gap:8px;justify-content:flex-end}.addChat_container{position:absolute}.chat_save_btn{background-color:#4259ee!important}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useRef, useEffect } from "react";
|
|
4
4
|
import { useForm, Controller } from "react-hook-form";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
export declare const ChatChannelItem: ({ id, title, subtitle, timestamp,
|
|
1
|
+
export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, unreadCount, avatar, isSelected, isMuted, onClick, showChannelList, showCheckbox, handleChatSelect, selectedChat, onPinnedChatClick, onPinnedChange, handleToast, isPinned: isPinnedProp, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
id: any;
|
|
4
4
|
title: any;
|
|
5
|
-
subtitle
|
|
5
|
+
subtitle: any;
|
|
6
6
|
timestamp: any;
|
|
7
|
-
time: any;
|
|
8
7
|
unreadCount: any;
|
|
9
|
-
chatCount: any;
|
|
10
8
|
avatar: any;
|
|
11
9
|
isSelected: any;
|
|
12
10
|
isMuted: any;
|
|
@@ -21,8 +19,5 @@ export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, time, u
|
|
|
21
19
|
onPinnedChange: any;
|
|
22
20
|
handleToast: any;
|
|
23
21
|
isPinned: any;
|
|
24
|
-
isSpace?: boolean | undefined;
|
|
25
|
-
badge: any;
|
|
26
|
-
badgeLabel: any;
|
|
27
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
28
23
|
//# sourceMappingURL=ChatChannelItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatChannelItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatChannelItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,GAAI;;;;;;;;;;;;;;;;;;;;;CAmB/B,4CAsFA,CAAC"}
|
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import default_1 from "../../../../node_modules/@mui/icons-material/NotificationsOff.js";
|
|
3
3
|
import { getAssetUrl } from "../../../../utils/assetBase.js";
|
|
4
4
|
import { ChannelCheckbox } from "./ChannelCheckbox/ChannelCheckbox.js";
|
|
5
5
|
import { UnreadBadge } from "./UnreadBadge/UnreadBadge.js";
|
|
6
6
|
import { Avatar } from "../../../Avatar/index.js";
|
|
7
|
-
import { Badge } from "../../../Badge/index.js";
|
|
8
7
|
import { useTranslation } from "../../../../i18n/useTranslation.js";
|
|
9
8
|
const PinnedIcon = getAssetUrl("icons/pinedIcon.svg");
|
|
10
|
-
const formatBadgeCountLabel = (count, maxCount = 99) => {
|
|
11
|
-
if (!count || count <= 0) return null;
|
|
12
|
-
return count > maxCount ? `${maxCount}+` : String(count);
|
|
13
|
-
};
|
|
14
|
-
const resolveLabelBadge = (badge, badgeLabel, isSpace, spaceLabel) => {
|
|
15
|
-
if (badge && typeof badge === "object" && badge.label) {
|
|
16
|
-
return {
|
|
17
|
-
label: badge.label,
|
|
18
|
-
variant: badge.variant || "stroke",
|
|
19
|
-
color: badge.color,
|
|
20
|
-
size: badge.size || "small"
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
if (typeof badgeLabel === "string" && badgeLabel.trim()) {
|
|
24
|
-
return { label: badgeLabel, variant: "stroke", size: "small" };
|
|
25
|
-
}
|
|
26
|
-
if (isSpace) {
|
|
27
|
-
return { label: spaceLabel, variant: "stroke", size: "small" };
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
};
|
|
31
9
|
const ChatChannelItem = ({
|
|
32
10
|
id,
|
|
33
11
|
title,
|
|
34
|
-
subtitle
|
|
12
|
+
subtitle,
|
|
35
13
|
timestamp,
|
|
36
|
-
time,
|
|
37
14
|
unreadCount,
|
|
38
|
-
chatCount,
|
|
39
15
|
avatar,
|
|
40
16
|
isSelected,
|
|
41
17
|
isMuted,
|
|
@@ -48,21 +24,10 @@ const ChatChannelItem = ({
|
|
|
48
24
|
onPinnedChange,
|
|
49
25
|
handleToast,
|
|
50
26
|
isPinned: isPinnedProp,
|
|
51
|
-
isSpace = false,
|
|
52
|
-
badge,
|
|
53
|
-
badgeLabel,
|
|
54
27
|
...rest
|
|
55
28
|
}) => {
|
|
56
29
|
const { t } = useTranslation();
|
|
57
30
|
const isPinned = Boolean(isPinnedProp ?? rest.isPinned);
|
|
58
|
-
const displayTime = timestamp ?? time;
|
|
59
|
-
const channelBadgeLabel = formatBadgeCountLabel(chatCount);
|
|
60
|
-
const labelBadge = resolveLabelBadge(
|
|
61
|
-
badge,
|
|
62
|
-
badgeLabel,
|
|
63
|
-
Boolean(isSpace ?? rest.isSpace),
|
|
64
|
-
t("tableChat.channelItem.spaceBadge")
|
|
65
|
-
);
|
|
66
31
|
const handlePinnedChatClick = async (chatId, newPinned) => {
|
|
67
32
|
if (onPinnedChatClick) {
|
|
68
33
|
onPinnedChange == null ? void 0 : onPinnedChange(chatId, newPinned);
|
|
@@ -76,64 +41,31 @@ const ChatChannelItem = ({
|
|
|
76
41
|
}
|
|
77
42
|
}
|
|
78
43
|
};
|
|
79
|
-
const handleActivate = (e) => {
|
|
80
|
-
e.stopPropagation();
|
|
81
|
-
onClick == null ? void 0 : onClick(id);
|
|
82
|
-
};
|
|
83
|
-
const handleKeyDown = (e) => {
|
|
84
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
85
|
-
e.preventDefault();
|
|
86
|
-
onClick == null ? void 0 : onClick(id);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
if (showChannelList) {
|
|
90
|
-
return /* @__PURE__ */ jsxs(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
className: `channel-list-item${isSelected ? " channel-list-item--selected" : ""}${isMuted ? " channel-list-item--muted" : ""}`,
|
|
94
|
-
role: "button",
|
|
95
|
-
tabIndex: 0,
|
|
96
|
-
onClick: handleActivate,
|
|
97
|
-
onKeyDown: handleKeyDown,
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ jsxs("div", { className: "channel-list-item__content", children: [
|
|
100
|
-
/* @__PURE__ */ jsxs("div", { className: "channel-list-item__title-row", children: [
|
|
101
|
-
/* @__PURE__ */ jsx("span", { className: "channel-list-item__title", children: title }),
|
|
102
|
-
labelBadge ? /* @__PURE__ */ jsx(
|
|
103
|
-
Badge,
|
|
104
|
-
{
|
|
105
|
-
color: labelBadge.color,
|
|
106
|
-
label: labelBadge.label,
|
|
107
|
-
size: labelBadge.size,
|
|
108
|
-
variant: labelBadge.variant
|
|
109
|
-
}
|
|
110
|
-
) : null
|
|
111
|
-
] }),
|
|
112
|
-
displayTime ? /* @__PURE__ */ jsx("span", { className: "channel-list-item__time", children: displayTime }) : null
|
|
113
|
-
] }),
|
|
114
|
-
!labelBadge && channelBadgeLabel ? /* @__PURE__ */ jsx(Badge, { color: "info", label: channelBadgeLabel, size: "small", variant: "filled" }) : null
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
44
|
return /* @__PURE__ */ jsxs(
|
|
120
45
|
"div",
|
|
121
46
|
{
|
|
122
|
-
className:
|
|
47
|
+
className: `${showChannelList ? "channel_list" : "chat_list"} ${isSelected ? "selected" : ""} ${isMuted ? "muted" : ""}`,
|
|
123
48
|
role: "button",
|
|
124
49
|
tabIndex: 0,
|
|
125
|
-
onClick:
|
|
126
|
-
|
|
50
|
+
onClick: (e) => {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
onClick == null ? void 0 : onClick(id);
|
|
53
|
+
},
|
|
54
|
+
onKeyPress: (e) => {
|
|
55
|
+
if (e.key === "Enter" || e.key === " ") onClick == null ? void 0 : onClick(id);
|
|
56
|
+
},
|
|
127
57
|
children: [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
58
|
+
!showChannelList && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
showCheckbox && /* @__PURE__ */ jsx(
|
|
60
|
+
ChannelCheckbox,
|
|
61
|
+
{
|
|
62
|
+
handleChatSelect,
|
|
63
|
+
id,
|
|
64
|
+
selectedChat
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ jsx("div", { className: "channel-avatar", children: /* @__PURE__ */ jsx(Avatar, { label: (avatar == null ? void 0 : avatar.label) || title, size: "medium", src: avatar == null ? void 0 : avatar.src }) })
|
|
68
|
+
] }),
|
|
137
69
|
/* @__PURE__ */ jsxs("div", { className: "channel-content", children: [
|
|
138
70
|
/* @__PURE__ */ jsxs("div", { className: "channel-header", children: [
|
|
139
71
|
/* @__PURE__ */ jsx("h3", { className: "channel-title", children: title }),
|
|
@@ -142,10 +74,10 @@ const ChatChannelItem = ({
|
|
|
142
74
|
/* @__PURE__ */ jsx(UnreadBadge, { count: unreadCount })
|
|
143
75
|
] })
|
|
144
76
|
] }),
|
|
145
|
-
|
|
77
|
+
/* @__PURE__ */ jsx("p", { className: "channel-subtitle", children: subtitle }),
|
|
146
78
|
/* @__PURE__ */ jsxs("div", { className: "pinnedChat_container", children: [
|
|
147
|
-
/* @__PURE__ */ jsx("span", { className: "channel-time", children:
|
|
148
|
-
/* @__PURE__ */ jsx(
|
|
79
|
+
/* @__PURE__ */ jsx("span", { className: "channel-time", children: timestamp }),
|
|
80
|
+
!showChannelList && /* @__PURE__ */ jsx(
|
|
149
81
|
"img",
|
|
150
82
|
{
|
|
151
83
|
alt: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatChannelList.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatChannelList.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,GAAI;;;;;;;;;;CAU/B,
|
|
1
|
+
{"version":3,"file":"ChatChannelList.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatChannelList.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,GAAI;;;;;;;;;;CAU/B,4CAmFA,CAAC"}
|
|
@@ -51,8 +51,7 @@ const ChatChannelList = ({
|
|
|
51
51
|
if (aPinned === bPinned) return 0;
|
|
52
52
|
return aPinned ? -1 : 1;
|
|
53
53
|
}) : [];
|
|
54
|
-
|
|
55
|
-
return /* @__PURE__ */ jsx("div", { className: listClassName, children: sortedChannels.length > 0 ? sortedChannels.map((channel, index) => /* @__PURE__ */ jsx(
|
|
54
|
+
return /* @__PURE__ */ jsx("div", { className: "chat-channel-list", children: sortedChannels.length > 0 ? sortedChannels.map((channel, index) => /* @__PURE__ */ jsx(
|
|
56
55
|
ChatChannelItem,
|
|
57
56
|
{
|
|
58
57
|
...channel,
|
|
@@ -63,7 +62,7 @@ const ChatChannelList = ({
|
|
|
63
62
|
selectedChat,
|
|
64
63
|
showChannelList,
|
|
65
64
|
showCheckbox,
|
|
66
|
-
onClick: () => onChannelSelect(channel == null ? void 0 : channel.id, channel),
|
|
65
|
+
onClick: (e) => onChannelSelect(channel == null ? void 0 : channel.id, channel),
|
|
67
66
|
onPinnedChange: handlePinnedChange,
|
|
68
67
|
onPinnedChatClick
|
|
69
68
|
},
|