impact-ui 5.0.1-chart.1 → 5.0.2-alpha.1
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/Check.js +4 -0
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.d.ts +1 -1
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +8 -4
- package/dist/components/Chart/index.d.ts +1 -4
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Chart/index.js +3 -43
- package/dist/components/Panel/Panel.types.d.ts +7 -0
- 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 +5 -2
- package/dist/components/TableChat/EmptyContainer.js +3 -3
- package/dist/components/TableChat/TableChatSidePanel.d.ts +2 -1
- package/dist/components/TableChat/TableChatSidePanel.d.ts.map +1 -1
- package/dist/components/TableChat/TableChatSidePanel.js +214 -23
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts +4 -2
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.js +55 -24
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.js +3 -2
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.d.ts +11 -0
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.d.ts.map +1 -0
- package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.js +57 -0
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.js +20 -43
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +37 -2
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +54 -18
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts +4 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +90 -81
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -2
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +11 -4
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.js +67 -56
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts +8 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.js +170 -4
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.d.ts +12 -0
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.d.ts.map +1 -0
- package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.js +132 -0
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts +5 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +138 -124
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts +11 -9
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +102 -106
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +0 -17
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +4 -1
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.js +29 -0
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +327 -215
- package/dist/components/TableChat/components/chatConfig.js +0 -1
- package/dist/components/TableV36/AdvanceSearchModalItem.d.ts.map +1 -1
- package/dist/components/TableV36/advanceSearchModal.d.ts.map +1 -1
- package/dist/components/TableV36/filterUtils.d.ts +21 -0
- package/dist/components/TableV36/filterUtils.d.ts.map +1 -1
- package/dist/components/TableV36/filterUtils.js +126 -16
- package/dist/components/TableV36/filterUtils.test.d.ts +2 -0
- package/dist/components/TableV36/filterUtils.test.d.ts.map +1 -0
- package/dist/components/TableV36/index.d.ts.map +1 -1
- package/dist/components/TableV36/index.js +140 -12
- package/dist/components/TableV36/tableFunctions.d.ts.map +1 -1
- package/dist/components/TableV36/tableFunctions.js +73 -17
- package/dist/components/TableV36/tableHeader.d.ts +5 -1
- package/dist/components/TableV36/tableHeader.d.ts.map +1 -1
- package/dist/components/TableV36/tableHeader.js +36 -11
- package/dist/components/TableV36/withChatIndicator.d.ts +3 -0
- package/dist/components/TableV36/withChatIndicator.d.ts.map +1 -0
- package/dist/components/TableV36/withChatIndicator.js +89 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/locales/de-DE.json.d.ts +17 -3
- package/dist/locales/de-DE.json.js +16 -3
- package/dist/locales/en-US.json.d.ts +17 -3
- package/dist/locales/en-US.json.js +16 -3
- package/dist/locales/es-ES.json.d.ts +17 -3
- package/dist/locales/es-ES.json.js +16 -3
- package/dist/mcp-component-registry.json +8 -7
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +6 -2
- package/dist/node_modules/@mui/icons-material/Check.js +17 -0
- package/dist/stories/tableV36ChatApiMock.d.ts +222 -74
- package/dist/stories/tableV36ChatApiMock.d.ts.map +1 -1
- package/dist/utils/helper.d.ts +2 -0
- package/dist/utils/helper.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.js +0 -65
|
@@ -1,6 +1,8 @@
|
|
|
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-panel .impact_drawer_container{background:#f8f9fb}.table-chat-panel .impact_drawer_header{background:#fff;border-bottom:1px solid #d9dde7;box-sizing:border-box;height:auto;padding:12px 16px}.table-chat-panel .impact_drawer_header .impact_drawer_heading{color:#1f2b4d;font-size:20px;font-weight:800;line-height:30px}.table-chat-panel .impact_drawer_header .table-chat-panel-close{height:26px;min-width:26px;padding:0;width:26px}.table-chat-panel .impact_drawer_body{height:calc(100% - 56px)!important;padding:6px}.table-chat-container{box-sizing:border-box;display:flex;flex-direction:row;gap:10px;height:100%;overflow:hidden;padding:4px;width:100%}.table-chat-container .table-left-panel-container{flex:0 0 350px;flex-shrink:0;max-width:350px;width:350px;z-index:2}.empty-container{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;gap:4px;justify-content:center;max-width:100%;padding:16px;text-align:center;width:100%}.empty-container img{height:197px;object-fit:contain;width:190px}.empty-container__title{color:#1f2b4d;font-size:20px;font-style:normal;font-weight:800;line-height:30px}.empty-container__subtitle{color:#7a8294;font-size:16px;font-style:normal;font-weight:500;line-height:1.25;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";
|
|
4
6
|
import { Panel } from "../Panel/index.js";
|
|
5
7
|
import { Prompt } from "../Prompt/index.js";
|
|
6
8
|
import { Toast } from "../Toast/index.js";
|
|
@@ -13,8 +15,8 @@ import { EmptyContainer } from "./EmptyContainer.js";
|
|
|
13
15
|
import { formatChatHeaderTimestamp } from "./utils/formatChatTimestamp.js";
|
|
14
16
|
|
|
15
17
|
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
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;
|
|
18
|
+
const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration, entryContext = null }) => {
|
|
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, _M, _N, _O, _P, _Q, _R;
|
|
18
20
|
const { t } = useTranslation();
|
|
19
21
|
const [selectedChannelId, setSelectedChannelId] = useState(null);
|
|
20
22
|
const [selectedChannelInfo, setSelectedChannelInfo] = useState(null);
|
|
@@ -171,9 +173,14 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
171
173
|
setToastVariant("info");
|
|
172
174
|
}
|
|
173
175
|
};
|
|
174
|
-
const handleChatClick = async (chatId, selectedChatData) => {
|
|
176
|
+
const handleChatClick = async (chatId, selectedChatData, options = {}) => {
|
|
175
177
|
var _a2;
|
|
176
|
-
|
|
178
|
+
const { screen, keepScreen = false } = options;
|
|
179
|
+
if (screen) {
|
|
180
|
+
setCurrentSelectedScreen(screen);
|
|
181
|
+
} else if (!keepScreen) {
|
|
182
|
+
setCurrentSelectedScreen("chats");
|
|
183
|
+
}
|
|
177
184
|
setLoadingMessages(true);
|
|
178
185
|
setSelectedChatId(chatId);
|
|
179
186
|
setSelectedChatInfo(selectedChatData);
|
|
@@ -189,7 +196,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
189
196
|
setLoadingMessages(false);
|
|
190
197
|
}
|
|
191
198
|
};
|
|
192
|
-
const fetchChatList = async (currentActiveChannelInfo) => {
|
|
199
|
+
const fetchChatList = async (currentActiveChannelInfo, { autoOpenFirst = true } = {}) => {
|
|
193
200
|
var _a2;
|
|
194
201
|
setCurrentSelectedScreen("chats");
|
|
195
202
|
setSelectedChat([]);
|
|
@@ -199,6 +206,10 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
199
206
|
const chatList2 = await chatConfiguration.leftPanel.loadChatList(currentActiveChannelInfo);
|
|
200
207
|
setChatList(chatList2);
|
|
201
208
|
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
|
+
}
|
|
202
213
|
return chatList2;
|
|
203
214
|
} catch (err) {
|
|
204
215
|
console.error("[TableChatSidePanel] [fetchChatList] [error]:", err);
|
|
@@ -225,7 +236,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
225
236
|
title: t("tableChat.sidePanel.chatList"),
|
|
226
237
|
objectType: (_e2 = newChat == null ? void 0 : newChat.otherProps) == null ? void 0 : _e2.object_type
|
|
227
238
|
};
|
|
228
|
-
await fetchChatList(newChannelInfo);
|
|
239
|
+
await fetchChatList(newChannelInfo, { autoOpenFirst: false });
|
|
229
240
|
setSelectedChannelInfo(newChannelInfo);
|
|
230
241
|
setSelectedChannelId((_g2 = (_f2 = newChat == null ? void 0 : newChat.otherProps) == null ? void 0 : _f2.object_ids) == null ? void 0 : _g2[0]);
|
|
231
242
|
await handleChatClick(newChat.id, newChat);
|
|
@@ -241,6 +252,12 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
241
252
|
};
|
|
242
253
|
const fetchChannelList = async () => {
|
|
243
254
|
setCurrentSelectedScreen("channels");
|
|
255
|
+
setSelectedChannelId(null);
|
|
256
|
+
setSelectedChannelInfo(null);
|
|
257
|
+
setSelectedChatId(null);
|
|
258
|
+
setSelectedChatInfo(null);
|
|
259
|
+
setChatList([]);
|
|
260
|
+
setOriginalChatList([]);
|
|
244
261
|
setLoadingChannelsOrChats(true);
|
|
245
262
|
try {
|
|
246
263
|
const channelList = await chatConfiguration.leftPanel.loadChannelsList();
|
|
@@ -296,11 +313,90 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
296
313
|
setLoadingChannelsOrChats(false);
|
|
297
314
|
}
|
|
298
315
|
};
|
|
316
|
+
const openChatFromSelection = async (selectedRows = []) => {
|
|
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);
|
|
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
|
+
};
|
|
299
393
|
const clearnupLocalStates = () => {
|
|
300
394
|
setSelectedChannelId(null);
|
|
301
395
|
setSelectedChannelInfo(null);
|
|
302
396
|
setSelectedChatInfo(null);
|
|
303
397
|
setSelectedChatId(null);
|
|
398
|
+
setChannelsList([]);
|
|
399
|
+
setOriginalChanelList([]);
|
|
304
400
|
setChatList([]);
|
|
305
401
|
setOriginalChatList([]);
|
|
306
402
|
setSelectedChat([]);
|
|
@@ -312,6 +408,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
312
408
|
setIsMoreOpen(false);
|
|
313
409
|
setHighlightMessageId(null);
|
|
314
410
|
setIsCreateNewChatOpen(false);
|
|
411
|
+
setCurrentSelectedScreen("channels");
|
|
315
412
|
};
|
|
316
413
|
const handleBackToChannels = async () => {
|
|
317
414
|
var _a2;
|
|
@@ -322,10 +419,17 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
322
419
|
await fetchChannelList();
|
|
323
420
|
};
|
|
324
421
|
useEffect(() => {
|
|
325
|
-
if (isOpen) {
|
|
422
|
+
if (!isOpen) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
if ((entryContext == null ? void 0 : entryContext.mode) === "startNewChat") {
|
|
426
|
+
openChatFromSelection(entryContext.selectedRows);
|
|
427
|
+
} else if ((entryContext == null ? void 0 : entryContext.mode) === "openChannel") {
|
|
428
|
+
openChannelFromRow(entryContext.selectedRows);
|
|
429
|
+
} else {
|
|
326
430
|
fetchChannelsOrChats();
|
|
327
431
|
}
|
|
328
|
-
}, [isOpen]);
|
|
432
|
+
}, [isOpen, entryContext == null ? void 0 : entryContext.mode, entryContext == null ? void 0 : entryContext.openedAt]);
|
|
329
433
|
useEffect(() => {
|
|
330
434
|
var _a2;
|
|
331
435
|
if (!isOpen) {
|
|
@@ -373,13 +477,42 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
373
477
|
setHighlightTrigger((prev) => prev + 1);
|
|
374
478
|
};
|
|
375
479
|
const handleChannelClick = async (selectedChannelId2, selectedChannelInfo2) => {
|
|
480
|
+
var _a2, _b2, _c2;
|
|
376
481
|
setSelectedChannelId(selectedChannelId2);
|
|
377
482
|
setSelectedChannelInfo(selectedChannelInfo2);
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
483
|
+
setSelectedChatId(null);
|
|
484
|
+
setSelectedChatInfo(null);
|
|
485
|
+
setSelectedChat([]);
|
|
486
|
+
const onChannelOpen = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _a2.onChannelOpen;
|
|
487
|
+
if (typeof onChannelOpen === "function") {
|
|
488
|
+
try {
|
|
489
|
+
const result = await onChannelOpen(selectedChannelInfo2);
|
|
490
|
+
if (Array.isArray(result == null ? void 0 : result.channelsList)) {
|
|
491
|
+
setChannelsList(result.channelsList);
|
|
492
|
+
setOriginalChanelList(result.channelsList);
|
|
493
|
+
}
|
|
494
|
+
if (Array.isArray(result == null ? void 0 : result.chatList)) {
|
|
495
|
+
setCurrentSelectedScreen(result.screen === "channels" ? "channels" : "chats");
|
|
496
|
+
setChatList(result.chatList);
|
|
497
|
+
setOriginalChatList(result.chatList);
|
|
498
|
+
} else {
|
|
499
|
+
await fetchChatList(selectedChannelInfo2);
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
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;
|
|
503
|
+
if (chatToOpen == null ? void 0 : chatToOpen.id) {
|
|
504
|
+
await handleChatClick(chatToOpen.id, chatToOpen, {
|
|
505
|
+
screen: result.screen === "channels" ? "channels" : "chats"
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
return;
|
|
509
|
+
} catch (error) {
|
|
510
|
+
console.error("[TableChatSidePanel] [onChannelOpen] [error]:", error);
|
|
511
|
+
handleToast(true, t("tableChat.sidePanel.errorLoadingChat"), "error");
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
382
514
|
}
|
|
515
|
+
await fetchChatList(selectedChannelInfo2);
|
|
383
516
|
};
|
|
384
517
|
const handleChatSelect = (selectedChatId2) => {
|
|
385
518
|
setSelectedChat(
|
|
@@ -469,10 +602,22 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
469
602
|
{
|
|
470
603
|
anchor: "right",
|
|
471
604
|
className: "table-chat-panel",
|
|
605
|
+
headerRightContent: /* @__PURE__ */ jsx(
|
|
606
|
+
Button,
|
|
607
|
+
{
|
|
608
|
+
"aria-label": t("common.close"),
|
|
609
|
+
className: "table-chat-panel-close",
|
|
610
|
+
icon: /* @__PURE__ */ jsx(default_1, { fontSize: "small" }),
|
|
611
|
+
size: "medium",
|
|
612
|
+
variant: "text",
|
|
613
|
+
onClick: handleClose
|
|
614
|
+
}
|
|
615
|
+
),
|
|
472
616
|
open: isOpen,
|
|
473
617
|
setIsOpen: () => {
|
|
474
618
|
setIsChatOpen(!isChatOpen);
|
|
475
619
|
},
|
|
620
|
+
showCloseButton: false,
|
|
476
621
|
size: "medium",
|
|
477
622
|
title: chatConfiguration == null ? void 0 : chatConfiguration.title,
|
|
478
623
|
width: pinnedMsg || showThread ? 1450 : 985,
|
|
@@ -497,7 +642,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
497
642
|
showAddChatBtn: (_u = (_t = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _t.leftHeaderPanel) == null ? void 0 : _u.showAddChat,
|
|
498
643
|
showChannelList: isChannelsScreen,
|
|
499
644
|
showCheckbox: (_w = (_v = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _v.leftChatPanel) == null ? void 0 : _w.showCheckbox,
|
|
500
|
-
title: isChannelsScreen ? t("tableChat.sidePanel.channelsList") : selectedChannelInfo == null ? void 0 : selectedChannelInfo.title,
|
|
645
|
+
title: isChannelsScreen ? ((_x = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _x.channelListTitle) ?? t("tableChat.sidePanel.channelsList") : selectedChannelInfo == null ? void 0 : selectedChannelInfo.title,
|
|
501
646
|
onBack: handleBackToChannels,
|
|
502
647
|
onChannelSelect: (id, selectedChannelOrChat) => {
|
|
503
648
|
if (isChannelsScreen) {
|
|
@@ -509,21 +654,67 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
509
654
|
onDeleteTopics: handleDeletePromptOpen,
|
|
510
655
|
onMenuClick: toggleMenu,
|
|
511
656
|
onMoreClick: showMore,
|
|
512
|
-
onPinnedChatClick: (
|
|
657
|
+
onPinnedChatClick: (_y = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _y.onPinnedChatClick,
|
|
513
658
|
onSearchClick: openSearch
|
|
514
659
|
}
|
|
515
660
|
),
|
|
516
661
|
loadingMessages ? /* @__PURE__ */ jsx(ChatSkeleton, { text: t("tableChat.loadingMessages") }) : /* @__PURE__ */ jsx(Fragment, { children: !selectedChannelId || !selectedChatId ? /* @__PURE__ */ jsx(
|
|
517
662
|
EmptyContainer,
|
|
518
663
|
{
|
|
519
|
-
subTitle: !selectedChannelId ? (
|
|
520
|
-
title: !selectedChannelId ? (
|
|
664
|
+
subTitle: !selectedChannelId ? (_z = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _z.emptyChannelStateSubTitle : !selectedChatId ? (_A = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _A.emptyChatStateSubTitle : "",
|
|
665
|
+
title: !selectedChannelId ? (_B = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _B.emptyChannelStateTitle : !selectedChatId ? (_C = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _C.emptyChatStateTitle : ""
|
|
521
666
|
}
|
|
522
667
|
) : /* @__PURE__ */ jsx(
|
|
523
668
|
TableChatRightSection,
|
|
524
669
|
{
|
|
525
670
|
chatHeaderConfig: {
|
|
526
671
|
...chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig,
|
|
672
|
+
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),
|
|
673
|
+
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),
|
|
674
|
+
onResolve: async (resolvedChatId) => {
|
|
675
|
+
var _a2, _b2;
|
|
676
|
+
const result = await ((_b2 = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _a2.onResolve) == null ? void 0 : _b2.call(_a2, resolvedChatId));
|
|
677
|
+
setSelectedChatInfo(
|
|
678
|
+
(prev) => prev ? {
|
|
679
|
+
...prev,
|
|
680
|
+
isResolved: true,
|
|
681
|
+
otherProps: { ...prev.otherProps, is_resolved: true }
|
|
682
|
+
} : prev
|
|
683
|
+
);
|
|
684
|
+
return result;
|
|
685
|
+
},
|
|
686
|
+
onTitleChange: async (renamedChatId, nextTitle) => {
|
|
687
|
+
var _a2, _b2, _c2;
|
|
688
|
+
const result = await ((_b2 = (_a2 = chatConfiguration == null ? void 0 : chatConfiguration.headerChatConfig) == null ? void 0 : _a2.onTitleChange) == null ? void 0 : _b2.call(
|
|
689
|
+
_a2,
|
|
690
|
+
renamedChatId,
|
|
691
|
+
nextTitle
|
|
692
|
+
));
|
|
693
|
+
const resolvedTitle = (result == null ? void 0 : result.title) ?? ((_c2 = result == null ? void 0 : result.formattedChat) == null ? void 0 : _c2.title) ?? nextTitle;
|
|
694
|
+
setSelectedChatInfo(
|
|
695
|
+
(prev) => prev ? {
|
|
696
|
+
...prev,
|
|
697
|
+
title: resolvedTitle,
|
|
698
|
+
otherProps: {
|
|
699
|
+
...prev.otherProps,
|
|
700
|
+
name: resolvedTitle
|
|
701
|
+
}
|
|
702
|
+
} : prev
|
|
703
|
+
);
|
|
704
|
+
const patchChatTitle = (list = []) => list.map(
|
|
705
|
+
(chat) => (chat == null ? void 0 : chat.id) === renamedChatId ? {
|
|
706
|
+
...chat,
|
|
707
|
+
title: resolvedTitle,
|
|
708
|
+
otherProps: {
|
|
709
|
+
...chat.otherProps,
|
|
710
|
+
name: resolvedTitle
|
|
711
|
+
}
|
|
712
|
+
} : chat
|
|
713
|
+
);
|
|
714
|
+
setChatList((prev) => patchChatTitle(prev));
|
|
715
|
+
setOriginalChatList((prev) => patchChatTitle(prev));
|
|
716
|
+
return result;
|
|
717
|
+
},
|
|
527
718
|
onPinnedClick: (chatId) => {
|
|
528
719
|
setShowThread(false);
|
|
529
720
|
setShowPinnedMsg(true);
|
|
@@ -531,18 +722,18 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
531
722
|
}
|
|
532
723
|
},
|
|
533
724
|
chatId: selectedChatId,
|
|
534
|
-
CreatedBy: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdBy) || (selectedChatInfo == null ? void 0 : selectedChatInfo.user) || ((
|
|
725
|
+
CreatedBy: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdBy) || (selectedChatInfo == null ? void 0 : selectedChatInfo.user) || ((_I = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _I.created_by_user),
|
|
535
726
|
handleToast,
|
|
536
727
|
inputChatConfig: {
|
|
537
728
|
...chatConfiguration.inputChatConfig
|
|
538
729
|
},
|
|
539
730
|
messageConfig: memoizedMessageConfig,
|
|
540
731
|
setPinnedMessages,
|
|
541
|
-
showActionBtn: (
|
|
542
|
-
showParticipantsList: (
|
|
543
|
-
showPinnedChat: (
|
|
544
|
-
showSearch: (
|
|
545
|
-
createdAt: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdAt) || formatChatHeaderTimestamp((
|
|
732
|
+
showActionBtn: (_K = (_J = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _J.rightHeaderPanel) == null ? void 0 : _K.showActionBtn,
|
|
733
|
+
showParticipantsList: (_M = (_L = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _L.rightHeaderPanel) == null ? void 0 : _M.showParticipants,
|
|
734
|
+
showPinnedChat: (_O = (_N = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _N.rightHeaderPanel) == null ? void 0 : _O.showPinnedChat,
|
|
735
|
+
showSearch: (_Q = (_P = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _P.rightHeaderPanel) == null ? void 0 : _Q.showChatSearch,
|
|
736
|
+
createdAt: (selectedChatInfo == null ? void 0 : selectedChatInfo.createdAt) || formatChatHeaderTimestamp((_R = selectedChatInfo == null ? void 0 : selectedChatInfo.otherProps) == null ? void 0 : _R.created_at),
|
|
546
737
|
title: selectedChatInfo == null ? void 0 : selectedChatInfo.title
|
|
547
738
|
}
|
|
548
739
|
) }),
|
|
@@ -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;display:grid;grid-auto-flow:row;padding:10px;
|
|
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;box-sizing:border-box;display:grid;grid-auto-flow:row;padding:10px;row-gap:10px;width:231px}.chatcontainer .MuiInputBase-root input.MuiInputBase-input{min-width:210px!important}.chatFooterContainer{display:flex;gap:8px;justify-content:flex-end}.addChat_container{position:absolute;right:0;top:calc(100% + 4px);z-index:10}.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,10 +1,12 @@
|
|
|
1
|
-
export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, unreadCount, avatar, isSelected, isMuted, onClick, showChannelList, showCheckbox, handleChatSelect, selectedChat, onPinnedChatClick, onPinnedChange, handleToast, isPinned: isPinnedProp, ...rest }: {
|
|
1
|
+
export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, time, unreadCount, chatCount, 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?: string | undefined;
|
|
6
6
|
timestamp: any;
|
|
7
|
+
time: any;
|
|
7
8
|
unreadCount: any;
|
|
9
|
+
chatCount: any;
|
|
8
10
|
avatar: any;
|
|
9
11
|
isSelected: any;
|
|
10
12
|
isMuted: any;
|
|
@@ -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":"AAgBA,eAAO,MAAM,eAAe,GAAI;;;;;;;;;;;;;;;;;;;;;;;CAqB/B,4CAgHA,CAAC"}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, 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";
|
|
7
8
|
import { useTranslation } from "../../../../i18n/useTranslation.js";
|
|
8
9
|
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
|
+
};
|
|
9
14
|
const ChatChannelItem = ({
|
|
10
15
|
id,
|
|
11
16
|
title,
|
|
12
|
-
subtitle,
|
|
17
|
+
subtitle = "",
|
|
13
18
|
timestamp,
|
|
19
|
+
time,
|
|
14
20
|
unreadCount,
|
|
21
|
+
chatCount,
|
|
15
22
|
avatar,
|
|
16
23
|
isSelected,
|
|
17
24
|
isMuted,
|
|
@@ -28,6 +35,8 @@ const ChatChannelItem = ({
|
|
|
28
35
|
}) => {
|
|
29
36
|
const { t } = useTranslation();
|
|
30
37
|
const isPinned = Boolean(isPinnedProp ?? rest.isPinned);
|
|
38
|
+
const displayTime = timestamp ?? time;
|
|
39
|
+
const channelBadgeLabel = formatBadgeCountLabel(chatCount);
|
|
31
40
|
const handlePinnedChatClick = async (chatId, newPinned) => {
|
|
32
41
|
if (onPinnedChatClick) {
|
|
33
42
|
onPinnedChange == null ? void 0 : onPinnedChange(chatId, newPinned);
|
|
@@ -41,31 +50,53 @@ const ChatChannelItem = ({
|
|
|
41
50
|
}
|
|
42
51
|
}
|
|
43
52
|
};
|
|
53
|
+
const handleActivate = (e) => {
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
onClick == null ? void 0 : onClick(id);
|
|
56
|
+
};
|
|
57
|
+
const handleKeyDown = (e) => {
|
|
58
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
onClick == null ? void 0 : onClick(id);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
if (showChannelList) {
|
|
64
|
+
return /* @__PURE__ */ jsxs(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: `channel-list-item${isSelected ? " channel-list-item--selected" : ""}${isMuted ? " channel-list-item--muted" : ""}`,
|
|
68
|
+
role: "button",
|
|
69
|
+
tabIndex: 0,
|
|
70
|
+
onClick: handleActivate,
|
|
71
|
+
onKeyDown: handleKeyDown,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "channel-list-item__content", children: [
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "channel-list-item__title", children: title }),
|
|
75
|
+
displayTime ? /* @__PURE__ */ jsx("span", { className: "channel-list-item__time", children: displayTime }) : null
|
|
76
|
+
] }),
|
|
77
|
+
channelBadgeLabel ? /* @__PURE__ */ jsx(Badge, { color: "info", label: channelBadgeLabel, size: "small", variant: "filled" }) : null
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
44
82
|
return /* @__PURE__ */ jsxs(
|
|
45
83
|
"div",
|
|
46
84
|
{
|
|
47
|
-
className:
|
|
85
|
+
className: `chat_list${isSelected ? " selected" : ""}${isMuted ? " muted" : ""}`,
|
|
48
86
|
role: "button",
|
|
49
87
|
tabIndex: 0,
|
|
50
|
-
onClick:
|
|
51
|
-
|
|
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
|
-
},
|
|
88
|
+
onClick: handleActivate,
|
|
89
|
+
onKeyDown: handleKeyDown,
|
|
57
90
|
children: [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
] }),
|
|
91
|
+
showCheckbox && /* @__PURE__ */ jsx(
|
|
92
|
+
ChannelCheckbox,
|
|
93
|
+
{
|
|
94
|
+
handleChatSelect,
|
|
95
|
+
id,
|
|
96
|
+
selectedChat
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__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 }) }),
|
|
69
100
|
/* @__PURE__ */ jsxs("div", { className: "channel-content", children: [
|
|
70
101
|
/* @__PURE__ */ jsxs("div", { className: "channel-header", children: [
|
|
71
102
|
/* @__PURE__ */ jsx("h3", { className: "channel-title", children: title }),
|
|
@@ -74,10 +105,10 @@ const ChatChannelItem = ({
|
|
|
74
105
|
/* @__PURE__ */ jsx(UnreadBadge, { count: unreadCount })
|
|
75
106
|
] })
|
|
76
107
|
] }),
|
|
77
|
-
/* @__PURE__ */ jsx("p", { className: "channel-subtitle", children: subtitle }),
|
|
108
|
+
subtitle ? /* @__PURE__ */ jsx("p", { className: "channel-subtitle", children: subtitle }) : null,
|
|
78
109
|
/* @__PURE__ */ jsxs("div", { className: "pinnedChat_container", children: [
|
|
79
|
-
/* @__PURE__ */ jsx("span", { className: "channel-time", children:
|
|
80
|
-
|
|
110
|
+
/* @__PURE__ */ jsx("span", { className: "channel-time", children: displayTime }),
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
81
112
|
"img",
|
|
82
113
|
{
|
|
83
114
|
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,4CAqFA,CAAC"}
|
|
@@ -51,7 +51,8 @@ const ChatChannelList = ({
|
|
|
51
51
|
if (aPinned === bPinned) return 0;
|
|
52
52
|
return aPinned ? -1 : 1;
|
|
53
53
|
}) : [];
|
|
54
|
-
|
|
54
|
+
const listClassName = showChannelList ? "channel-list" : "chat-channel-list";
|
|
55
|
+
return /* @__PURE__ */ jsx("div", { className: listClassName, children: sortedChannels.length > 0 ? sortedChannels.map((channel, index) => /* @__PURE__ */ jsx(
|
|
55
56
|
ChatChannelItem,
|
|
56
57
|
{
|
|
57
58
|
...channel,
|
|
@@ -62,7 +63,7 @@ const ChatChannelList = ({
|
|
|
62
63
|
selectedChat,
|
|
63
64
|
showChannelList,
|
|
64
65
|
showCheckbox,
|
|
65
|
-
onClick: (
|
|
66
|
+
onClick: () => onChannelSelect(channel == null ? void 0 : channel.id, channel),
|
|
66
67
|
onPinnedChange: handlePinnedChange,
|
|
67
68
|
onPinnedChatClick
|
|
68
69
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
export declare const ChatFilterChips: ({ options, value, defaultValue, onChange, className, }: {
|
|
3
|
+
options: any;
|
|
4
|
+
value: any;
|
|
5
|
+
defaultValue?: string | undefined;
|
|
6
|
+
onChange: any;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const DEFAULT_CHAT_FILTER_VALUES: string[];
|
|
10
|
+
export default ChatFilterChips;
|
|
11
|
+
//# sourceMappingURL=ChatFilterChips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatFilterChips.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.tsx"],"names":[],"mappings":"AAIA,OAAO,+BAA+B,CAAC;AAIvC,eAAO,MAAM,eAAe,GAAI;;;;;;CAM/B,4CAmDA,CAAC;AAEF,eAAO,MAAM,0BAA0B,UAAwB,CAAC;AAEhE,eAAe,eAAe,CAAC"}
|