impact-ui 5.0.2-alpha.5 → 5.0.2-alpha.6

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.
Files changed (103) hide show
  1. package/dist/_virtual/Check.js +4 -0
  2. package/dist/_virtual/index2.js +2 -2
  3. package/dist/_virtual/index3.js +4 -2
  4. package/dist/_virtual/index4.js +3 -3
  5. package/dist/_virtual/index5.js +2 -4
  6. package/dist/components/Badge/index.js +1 -1
  7. package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +1 -1
  8. package/dist/components/Checkbox/index.js +1 -1
  9. package/dist/components/Menu/MenuHeaderInfo.d.ts.map +1 -1
  10. package/dist/components/Menu/MenuHeaderInfo.js +4 -3
  11. package/dist/components/Menu/index.d.ts.map +1 -1
  12. package/dist/components/Menu/index.js +1 -1
  13. package/dist/components/Panel/Panel.types.d.ts +7 -0
  14. package/dist/components/Panel/Panel.types.d.ts.map +1 -1
  15. package/dist/components/Panel/index.d.ts +1 -1
  16. package/dist/components/Panel/index.d.ts.map +1 -1
  17. package/dist/components/Panel/index.js +5 -2
  18. package/dist/components/TableChat/EmptyContainer.js +3 -3
  19. package/dist/components/TableChat/TableChatSidePanel.d.ts +2 -1
  20. package/dist/components/TableChat/TableChatSidePanel.d.ts.map +1 -1
  21. package/dist/components/TableChat/TableChatSidePanel.js +227 -26
  22. package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +1 -1
  23. package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts +7 -2
  24. package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts.map +1 -1
  25. package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.js +92 -24
  26. package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.d.ts.map +1 -1
  27. package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.js +3 -2
  28. package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.d.ts +11 -0
  29. package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.d.ts.map +1 -0
  30. package/dist/components/TableChat/components/TableChatLeftSection/ChatFilterChips/ChatFilterChips.js +57 -0
  31. package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.d.ts +2 -2
  32. package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.d.ts.map +1 -1
  33. package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.js +3 -2
  34. package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.d.ts.map +1 -1
  35. package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.js +66 -51
  36. package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.d.ts.map +1 -1
  37. package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +37 -2
  38. package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.d.ts.map +1 -1
  39. package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +54 -18
  40. package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts +4 -1
  41. package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts.map +1 -1
  42. package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +90 -81
  43. package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -2
  44. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.d.ts.map +1 -1
  45. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +51 -16
  46. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.d.ts.map +1 -1
  47. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.js +68 -57
  48. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts +8 -1
  49. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts.map +1 -1
  50. package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.js +170 -4
  51. package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.d.ts +12 -0
  52. package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.d.ts.map +1 -0
  53. package/dist/components/TableChat/components/TableChatRightSection/ChatInlineEdit/ChatInlineEdit.js +132 -0
  54. package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts +5 -1
  55. package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts.map +1 -1
  56. package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +203 -176
  57. package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts +11 -9
  58. package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts.map +1 -1
  59. package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +102 -106
  60. package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.d.ts +2 -1
  61. package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.d.ts.map +1 -1
  62. package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +64 -77
  63. package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.d.ts.map +1 -1
  64. package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +4 -1
  65. package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.d.ts +3 -1
  66. package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.d.ts.map +1 -1
  67. package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.js +7 -2
  68. package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts +2 -1
  69. package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts.map +1 -1
  70. package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.js +29 -0
  71. package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.d.ts.map +1 -1
  72. package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +346 -223
  73. package/dist/components/TableChat/components/chatConfig.js +0 -1
  74. package/dist/components/TableV36/AgGridHeader.d.ts.map +1 -1
  75. package/dist/components/TableV36/AgGridHeader.js +8 -34
  76. package/dist/components/TableV36/advanceSearchModal.d.ts.map +1 -1
  77. package/dist/components/TableV36/filterUtils.d.ts +0 -10
  78. package/dist/components/TableV36/filterUtils.d.ts.map +1 -1
  79. package/dist/components/TableV36/filterUtils.js +0 -29
  80. package/dist/components/TableV36/index.d.ts.map +1 -1
  81. package/dist/components/TableV36/index.js +140 -15
  82. package/dist/components/TableV36/tableHeader.d.ts +6 -1
  83. package/dist/components/TableV36/tableHeader.d.ts.map +1 -1
  84. package/dist/components/TableV36/tableHeader.js +39 -11
  85. package/dist/components/TableV36/withChatIndicator.d.ts +3 -0
  86. package/dist/components/TableV36/withChatIndicator.d.ts.map +1 -0
  87. package/dist/components/TableV36/withChatIndicator.js +89 -0
  88. package/dist/locales/de-DE.json.d.ts +19 -3
  89. package/dist/locales/de-DE.json.js +18 -3
  90. package/dist/locales/en-US.json.d.ts +19 -3
  91. package/dist/locales/en-US.json.js +18 -3
  92. package/dist/locales/es-ES.json.d.ts +19 -3
  93. package/dist/locales/es-ES.json.js +18 -3
  94. package/dist/mcp-component-registry.json +1 -7
  95. package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +3 -1
  96. package/dist/node_modules/@mui/icons-material/Check.js +17 -0
  97. package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
  98. package/dist/node_modules/prop-types/index.js +1 -1
  99. package/dist/node_modules/react-is/index.js +1 -1
  100. package/dist/stories/tableV36ChatApiMock.d.ts +227 -74
  101. package/dist/stories/tableV36ChatApiMock.d.ts.map +1 -1
  102. package/package.json +2 -2
  103. package/dist/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.js +0 -65
@@ -1,17 +1,41 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
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
+ };
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
+ };
9
31
  const ChatChannelItem = ({
10
32
  id,
11
33
  title,
12
- subtitle,
34
+ subtitle = "",
13
35
  timestamp,
36
+ time,
14
37
  unreadCount,
38
+ chatCount,
15
39
  avatar,
16
40
  isSelected,
17
41
  isMuted,
@@ -24,10 +48,21 @@ const ChatChannelItem = ({
24
48
  onPinnedChange,
25
49
  handleToast,
26
50
  isPinned: isPinnedProp,
51
+ isSpace = false,
52
+ badge,
53
+ badgeLabel,
27
54
  ...rest
28
55
  }) => {
29
56
  const { t } = useTranslation();
30
57
  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
+ );
31
66
  const handlePinnedChatClick = async (chatId, newPinned) => {
32
67
  if (onPinnedChatClick) {
33
68
  onPinnedChange == null ? void 0 : onPinnedChange(chatId, newPinned);
@@ -41,31 +76,64 @@ const ChatChannelItem = ({
41
76
  }
42
77
  }
43
78
  };
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
+ }
44
119
  return /* @__PURE__ */ jsxs(
45
120
  "div",
46
121
  {
47
- className: `${showChannelList ? "channel_list" : "chat_list"} ${isSelected ? "selected" : ""} ${isMuted ? "muted" : ""}`,
122
+ className: `chat_list${isSelected ? " selected" : ""}${isMuted ? " muted" : ""}`,
48
123
  role: "button",
49
124
  tabIndex: 0,
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
- },
125
+ onClick: handleActivate,
126
+ onKeyDown: handleKeyDown,
57
127
  children: [
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
- ] }),
128
+ showCheckbox && /* @__PURE__ */ jsx(
129
+ ChannelCheckbox,
130
+ {
131
+ handleChatSelect,
132
+ id,
133
+ selectedChat
134
+ }
135
+ ),
136
+ /* @__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
137
  /* @__PURE__ */ jsxs("div", { className: "channel-content", children: [
70
138
  /* @__PURE__ */ jsxs("div", { className: "channel-header", children: [
71
139
  /* @__PURE__ */ jsx("h3", { className: "channel-title", children: title }),
@@ -74,10 +142,10 @@ const ChatChannelItem = ({
74
142
  /* @__PURE__ */ jsx(UnreadBadge, { count: unreadCount })
75
143
  ] })
76
144
  ] }),
77
- /* @__PURE__ */ jsx("p", { className: "channel-subtitle", children: subtitle }),
145
+ subtitle ? /* @__PURE__ */ jsx("p", { className: "channel-subtitle", children: subtitle }) : null,
78
146
  /* @__PURE__ */ jsxs("div", { className: "pinnedChat_container", children: [
79
- /* @__PURE__ */ jsx("span", { className: "channel-time", children: timestamp }),
80
- !showChannelList && /* @__PURE__ */ jsx(
147
+ /* @__PURE__ */ jsx("span", { className: "channel-time", children: displayTime }),
148
+ /* @__PURE__ */ jsx(
81
149
  "img",
82
150
  {
83
151
  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,4CAmFA,CAAC"}
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
- return /* @__PURE__ */ jsx("div", { className: "chat-channel-list", children: sortedChannels.length > 0 ? sortedChannels.map((channel, index) => /* @__PURE__ */ jsx(
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: (e) => onChannelSelect(channel == null ? void 0 : channel.id, channel),
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"}
@@ -0,0 +1,57 @@
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}.chat-filter-chips{align-items:flex-start;box-sizing:border-box;display:flex;flex-wrap:wrap;gap:8px;padding:8px 16px 0;width:100%}.chat-filter-chips .impact-chip-container{flex-shrink:0}.chat-filter-chips .impact-chip-container .MuiChip-filled{min-width:unset}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useState, useEffect, useMemo } from "react";
4
+ import { Chips } from "../../../../Chips/index.js";
5
+
6
+ import { useTranslation } from "../../../../../i18n/useTranslation.js";
7
+ const ChatFilterChips = ({
8
+ options,
9
+ value,
10
+ defaultValue = "all",
11
+ onChange,
12
+ className = ""
13
+ }) => {
14
+ const { t } = useTranslation();
15
+ const [selected, setSelected] = useState(value ?? defaultValue);
16
+ useEffect(() => {
17
+ if (value != null) {
18
+ setSelected(value);
19
+ }
20
+ }, [value]);
21
+ const chips = useMemo(() => {
22
+ if (Array.isArray(options) && options.length > 0) {
23
+ return options.map(
24
+ (opt) => typeof opt === "string" ? { value: opt, label: opt } : {
25
+ value: opt.value,
26
+ label: opt.label ?? opt.value
27
+ }
28
+ );
29
+ }
30
+ return [
31
+ { value: "all", label: t("tableChat.filterChips.all") },
32
+ { value: "starred", label: t("tableChat.filterChips.starred") },
33
+ { value: "resolved", label: t("tableChat.filterChips.resolved") }
34
+ ];
35
+ }, [options, t]);
36
+ const handleClick = (chip) => {
37
+ const next = chip.value;
38
+ if (value == null) {
39
+ setSelected(next);
40
+ }
41
+ onChange == null ? void 0 : onChange(next, chip);
42
+ };
43
+ return /* @__PURE__ */ jsx("div", { className: `chat-filter-chips ${className}`.trim(), role: "group", children: chips.map((chip) => /* @__PURE__ */ jsx(
44
+ Chips,
45
+ {
46
+ className: "chat-filter-chips__chip",
47
+ isActive: selected === chip.value,
48
+ label: chip.label,
49
+ type: "single",
50
+ onClick: () => handleClick(chip)
51
+ },
52
+ chip.value
53
+ )) });
54
+ };
55
+ export {
56
+ ChatFilterChips
57
+ };
@@ -1,11 +1,11 @@
1
- export declare const ChatHeaderButton: ({ onClick, label, icon, variant, size, className, type, ...props }: {
1
+ export declare const ChatHeaderButton: ({ onClick, label, icon, variant, size, type, disabled, ...props }: {
2
2
  [x: string]: any;
3
3
  onClick: any;
4
4
  label: any;
5
5
  icon?: import("react/jsx-runtime").JSX.Element | undefined;
6
6
  variant?: string | undefined;
7
7
  size?: string | undefined;
8
- className?: string | undefined;
9
8
  type?: string | undefined;
9
+ disabled?: boolean | undefined;
10
10
  }) => import("react/jsx-runtime").JSX.Element;
11
11
  //# sourceMappingURL=ChatHeaderButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatHeaderButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,GAAI;;;;;;;;;CAShC,4CAcA,CAAC"}
1
+ {"version":3,"file":"ChatHeaderButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB,GAAI;;;;;;;;;CAShC,4CAeA,CAAC"}
@@ -8,19 +8,20 @@ const ChatHeaderButton = ({
8
8
  icon = /* @__PURE__ */ jsx(default_1, { fontSize: "small" }),
9
9
  variant = "contained",
10
10
  size = "large",
11
- className = "chat-button",
12
11
  type = "button",
12
+ disabled = false,
13
13
  ...props
14
14
  }) => {
15
15
  const { t } = useTranslation();
16
+ console.log("disabled", disabled);
16
17
  return /* @__PURE__ */ jsx(
17
18
  Button,
18
19
  {
19
- className,
20
20
  icon,
21
21
  size,
22
22
  variant,
23
23
  onClick,
24
+ disabled,
24
25
  ...props,
25
26
  children: label ?? t("tableChat.chatButton.label")
26
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ChatHeaderNavigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,oBAAoB,8CAoLhC,CAAC"}
1
+ {"version":3,"file":"ChatHeaderNavigation.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,oBAAoB,8CAyLhC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { memo, useState, useEffect } from "react";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { memo, useState, useRef, useCallback, useEffect } from "react";
3
3
  import default_1$2 from "../../../../node_modules/@mui/icons-material/ChevronLeft.js";
4
4
  import default_1 from "../../../../node_modules/@mui/icons-material/Close.js";
5
5
  import default_1$3 from "../../../../node_modules/@mui/icons-material/DeleteOutlined.js";
@@ -24,23 +24,59 @@ const ChatHeaderNavigation = memo(
24
24
  handleToast,
25
25
  onDeleteTopics,
26
26
  isCreateNewChatOpen,
27
- setIsCreateNewChatOpen
27
+ setIsCreateNewChatOpen,
28
+ headerConfig
28
29
  }) => {
29
30
  const { t } = useTranslation();
30
31
  const [showAddChat, setShowAddChat] = useState(isCreateNewChatOpen);
32
+ const [isCreatingChat, setIsCreatingChat] = useState(false);
33
+ const creatingRef = useRef(false);
34
+ const skipAddChatForm = Boolean(headerConfig == null ? void 0 : headerConfig.skipAddChatForm);
35
+ const createChatDirectly = useCallback(async () => {
36
+ if (creatingRef.current || typeof handleChatName !== "function") return;
37
+ creatingRef.current = true;
38
+ setIsCreatingChat(true);
39
+ try {
40
+ const response = await handleChatName(
41
+ { chatName: "", chatDescription: "" },
42
+ selectedChannelInfo
43
+ );
44
+ if ((response == null ? void 0 : response.success) === false) {
45
+ handleToast == null ? void 0 : handleToast(true, t("tableChat.addChat.saveError"), "error");
46
+ return;
47
+ }
48
+ handleToast == null ? void 0 : handleToast(true, t("tableChat.addChat.savedSuccess"), "success");
49
+ setIsCreateNewChatOpen == null ? void 0 : setIsCreateNewChatOpen(false);
50
+ setShowAddChat(false);
51
+ } catch (err) {
52
+ console.error("Error while creating chat:", err);
53
+ handleToast == null ? void 0 : handleToast(true, t("tableChat.addChat.saveError"), "error");
54
+ } finally {
55
+ creatingRef.current = false;
56
+ setIsCreatingChat(false);
57
+ }
58
+ }, [handleChatName, selectedChannelInfo, handleToast, setIsCreateNewChatOpen, t]);
31
59
  useEffect(() => {
60
+ if (skipAddChatForm) {
61
+ if (isCreateNewChatOpen) {
62
+ createChatDirectly();
63
+ }
64
+ setShowAddChat(false);
65
+ return;
66
+ }
32
67
  setShowAddChat(Boolean(isCreateNewChatOpen));
33
- }, [isCreateNewChatOpen]);
68
+ }, [isCreateNewChatOpen, skipAddChatForm, createChatDirectly]);
69
+ const closeSearch = () => {
70
+ onSearchClick == null ? void 0 : onSearchClick();
71
+ filterChannelsByTitle == null ? void 0 : filterChannelsByTitle("");
72
+ };
34
73
  const renderSearch = () => /* @__PURE__ */ jsx(
35
74
  Input,
36
75
  {
37
76
  leftIcon: /* @__PURE__ */ jsx(default_1$1, {}),
38
- placeholder: t("tableChat.nav.searchChatPlaceholder"),
77
+ placeholder: showChannelList ? t("tableChat.nav.searchChannelPlaceholder") : t("tableChat.nav.searchChatPlaceholder"),
39
78
  rightIcon: /* @__PURE__ */ jsx(default_1, {}),
40
- rightIconClick: () => {
41
- onSearchClick(!onSearchClick);
42
- filterChannelsByTitle("");
43
- },
79
+ rightIconClick: closeSearch,
44
80
  type: "text",
45
81
  width: "100%",
46
82
  onChange: (e) => {
@@ -52,8 +88,7 @@ const ChatHeaderNavigation = memo(
52
88
  /* @__PURE__ */ jsx(
53
89
  Button,
54
90
  {
55
- className: "",
56
- icon: /* @__PURE__ */ jsx(default_1$2, {}),
91
+ icon: /* @__PURE__ */ jsx(default_1$2, { fontSize: "small" }),
57
92
  iconPlacement: "left",
58
93
  size: "small",
59
94
  type: "default",
@@ -78,13 +113,18 @@ const ChatHeaderNavigation = memo(
78
113
  showAddChatBtn && /* @__PURE__ */ jsx(
79
114
  ChatHeaderButton,
80
115
  {
116
+ disabled: isCreatingChat,
81
117
  label: t("tableChat.chatButton.label"),
82
118
  onClick: () => {
119
+ if (skipAddChatForm) {
120
+ createChatDirectly();
121
+ return;
122
+ }
83
123
  setShowAddChat((prev) => !prev);
84
124
  }
85
125
  }
86
126
  ),
87
- showAddChat && /* @__PURE__ */ jsx(
127
+ showAddChat && !skipAddChatForm && /* @__PURE__ */ jsx(
88
128
  AddChat,
89
129
  {
90
130
  handleChatName,
@@ -98,58 +138,33 @@ const ChatHeaderNavigation = memo(
98
138
  onSearchClick && /* @__PURE__ */ jsx(
99
139
  Button,
100
140
  {
101
- className: "",
141
+ className: "search_button",
102
142
  icon: /* @__PURE__ */ jsx(default_1$1, {}),
103
143
  iconPlacement: "left",
104
- size: "small",
105
144
  type: "default",
106
145
  variant: "tertiary",
107
146
  onClick: onSearchClick
108
147
  }
109
148
  )
110
149
  ] }) });
111
- const renderChannelListHeader = () => /* @__PURE__ */ jsxs("div", { className: showChannelList && "channel-list-header", children: [
112
- /* @__PURE__ */ jsx("h1", { className: "nav-title", style: { cursor: "pointer" }, onClick: onBack, children: title }),
113
- isSearchOpen ? /* @__PURE__ */ jsx(
114
- Input,
115
- {
116
- leftIcon: /* @__PURE__ */ jsx(default_1$1, {}),
117
- placeholder: t("tableChat.nav.searchChannelPlaceholder"),
118
- rightIcon: /* @__PURE__ */ jsx(default_1, {}),
119
- rightIconClick: () => {
120
- onSearchClick(!onSearchClick);
121
- filterChannelsByTitle("");
122
- },
123
- type: "text",
124
- width: "100%",
125
- onChange: (e) => {
126
- filterChannelsByTitle(e.target.value);
127
- }
128
- }
129
- ) : /* @__PURE__ */ jsx("div", { className: "chanel_right_navigation", children: /* @__PURE__ */ jsx("div", { className: "chanel_search", children: /* @__PURE__ */ jsx(
130
- "svg",
150
+ const renderChannelListHeader = () => /* @__PURE__ */ jsxs("div", { className: "channel-list-header", children: [
151
+ /* @__PURE__ */ jsx("h1", { className: "channel-list-header__title", children: title }),
152
+ onSearchClick ? /* @__PURE__ */ jsx(
153
+ Button,
131
154
  {
132
- fill: "none",
133
- height: "14",
134
- viewBox: "0 0 14 14",
135
- width: "14",
136
- xmlns: "http://www.w3.org/2000/svg",
137
- onClick: onSearchClick,
138
- children: /* @__PURE__ */ jsx(
139
- "path",
140
- {
141
- d: "M5.35163 10.7033C3.85592 10.7033 2.59005 10.1852 1.55403 9.14923C0.51801 8.11321 0 6.84734 0 5.35163C0 3.85592 0.51801 2.59005 1.55403 1.55403C2.59005 0.51801 3.85592 0 5.35163 0C6.84734 0 8.11321 0.51801 9.14923 1.55403C10.1852 2.59005 10.7033 3.85592 10.7033 5.35163C10.7033 5.9554 10.6072 6.52487 10.4151 7.06003C10.223 7.5952 9.96226 8.06861 9.63293 8.48027L13.7736 12.6209C13.9245 12.7719 14 12.964 14 13.1973C14 13.4305 13.9245 13.6226 13.7736 13.7736C13.6226 13.9245 13.4305 14 13.1973 14C12.964 14 12.7719 13.9245 12.6209 13.7736L8.48027 9.63293C8.06861 9.96226 7.5952 10.223 7.06003 10.4151C6.52487 10.6072 5.9554 10.7033 5.35163 10.7033ZM5.35163 9.0566C6.38079 9.0566 7.25557 8.6964 7.97599 7.97599C8.6964 7.25557 9.0566 6.38079 9.0566 5.35163C9.0566 4.32247 8.6964 3.44768 7.97599 2.72727C7.25557 2.00686 6.38079 1.64666 5.35163 1.64666C4.32247 1.64666 3.44768 2.00686 2.72727 2.72727C2.00686 3.44768 1.64666 4.32247 1.64666 5.35163C1.64666 6.38079 2.00686 7.25557 2.72727 7.97599C3.44768 8.6964 4.32247 9.0566 5.35163 9.0566Z",
142
- fill: "#60697D"
143
- }
144
- )
155
+ className: "channel-list-header__search",
156
+ icon: /* @__PURE__ */ jsx(default_1$1, {}),
157
+ iconPlacement: "left",
158
+ type: "default",
159
+ variant: "tertiary",
160
+ onClick: onSearchClick
145
161
  }
146
- ) }) })
162
+ ) : null
147
163
  ] });
148
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { className: "chat-header-navigation", children: isSearchOpen ? renderSearch() : showChannelList ? renderChannelListHeader() : /* @__PURE__ */ jsxs(Fragment, { children: [
164
+ return /* @__PURE__ */ jsx("div", { className: "chat-header-navigation", children: isSearchOpen ? renderSearch() : showChannelList ? renderChannelListHeader() : /* @__PURE__ */ jsxs(Fragment, { children: [
149
165
  renderNavLeft(),
150
- " ",
151
166
  renderNavRight()
152
- ] }) }) });
167
+ ] }) });
153
168
  }
154
169
  );
155
170
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"TableChatChannelHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.tsx"],"names":[],"mappings":"AAKA,OAAO,sCAAsC,CAAC;AAE9C,QAAA,MAAM,sBAAsB,GAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B/B,4CAoFA,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"TableChatChannelHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.tsx"],"names":[],"mappings":"AAOA,OAAO,sCAAsC,CAAC;AAE9C,QAAA,MAAM,sBAAsB,GAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B/B,4CAyFA,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -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}.table-left-panel-container{background:#fff;border-radius:16px;box-shadow:12px 13px 45px -1px #0000001a;flex-shrink:0;max-width:350px;overflow:hidden;width:350px}.table-left-panel-container:before{background:linear-gradient(180deg,#4259ee99,#4259ee33,#4259ee00);border-radius:16px;content:"";top:0;right:0;bottom:0;left:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1px;pointer-events:none;position:absolute}.table-left-panel-container .ia-styles.ia-btn.ia-btn-tertiary,.table-left-panel-container .ia-styles.ia-btn.ia-btn-tertiary:hover{background:none!important;box-shadow:none!important}.chat-header-navigation{align-items:center;background:#fff;border-bottom:1px solid #d9dde7;border-top-left-radius:10px;border-top-right-radius:10px;display:flex;justify-content:space-between;padding:12px 16px}.chat-header-navigation .nav-left{align-items:center;display:flex;gap:7px}.chat-header-navigation .nav-left button{background:none;border:none!important;box-shadow:none}.chat-header-navigation .nav-title{color:#0d152c;font-size:16px;font-weight:800;line-height:24px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:130px}.chat-header-navigation .nav-right{align-items:center;display:flex;gap:8px;position:relative}.chat-header-navigation .nav-right button{background:none;border:none!important;box-shadow:none}.chat-header-navigation .nav-icon-button{align-items:center;background:#0000;border:none;border-radius:6px;color:#7a8294;cursor:pointer;display:flex;height:20px;justify-content:center;transition:all .2s ease;width:20px}.chat-header-navigation .nav-icon-button:hover{color:#4259ee}.chat-header-navigation .nav-icon-button:focus{outline-offset:1px}.chat-header-navigation .chat-button{background:#4259ee!important;border-radius:8px!important;box-shadow:none!important;color:#fff!important;font-size:14px!important;font-weight:500!important;height:32px;padding:6px 12px!important;width:77px}.chat-header-navigation .chat-button:hover{background:#2b44ec!important}.chat-header-navigation .chat-button .ia-btn-icon{margin-right:4px}.chat-header-navigation .impact_inputbox_container_with_icons{width:100%}.channel_list{background:#f2f4fb}.channel_list,.chat-channel-item,.chat_list{align-items:baseline;border-radius:8px;cursor:pointer;display:flex;gap:12px;padding:12px 16px;transition:background-color .2s ease}.channel_list .ia-styles.ia-avatar,.chat-channel-item .ia-styles.ia-avatar,.chat_list .ia-styles.ia-avatar{background:#7a8294;border-radius:16px}.channel_list:hover,.chat-channel-item:hover,.chat_list:hover{background:#eceefd}.channel_list:hover .ia-styles.ia-avatar,.channel_list:hover .unread-badge,.chat-channel-item:hover .ia-styles.ia-avatar,.chat-channel-item:hover .unread-badge,.chat_list:hover .ia-styles.ia-avatar,.chat_list:hover .unread-badge{background:#4259ee}.channel_list.selected,.chat-channel-item.selected,.chat_list.selected{background:#eceefd}.channel_list.selected .ia-styles.ia-avatar,.channel_list.selected .unread-badge,.chat-channel-item.selected .ia-styles.ia-avatar,.chat-channel-item.selected .unread-badge,.chat_list.selected .ia-styles.ia-avatar,.chat_list.selected .unread-badge{background:#4259ee}.channel_list.muted,.chat-channel-item.muted,.chat_list.muted{opacity:.7}.channel_list:focus,.chat-channel-item:focus,.chat_list:focus{outline-offset:-2px}.channel_list:last-child,.chat-channel-item:last-child,.chat_list:last-child{border-bottom:none}.channel-checkbox{align-items:center;display:flex;padding-top:2px}.channel-checkbox input[type=checkbox]{accent-color:#4259ee;border:1px solid #d9dde7;border-radius:3px;cursor:pointer;height:16px;width:16px}.channel-checkbox input[type=checkbox]:checked{background:#4259ee;border-color:#4259ee}.channel-avatar{border-radius:16px;flex-shrink:0;margin-top:2px}.channel-avatar .ia-avatar{font-size:14px!important;font-weight:600!important;height:32px!important;width:32px!important}.channel-content{flex:1;min-width:0}.channel-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:4px}.channel-title{color:#0d152c;flex:1;font-size:16px;font-weight:600;height:24px;line-height:24px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-meta.selected{background:#eceefd}.muted-icon{color:#7a8294;font-size:16px!important}.unread-badge{align-items:center;background:#7a8294;border-radius:10px;color:#fff;display:flex;font-size:10px;font-weight:400;height:18px;justify-content:center;line-height:1;min-width:18px;padding:2px 6px}.channel-subtitle{color:#7a8294;margin:0 0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-subtitle,.channel-time{font-size:12px;font-weight:500;line-height:16px}.channel-time{color:#b4bac7}@media (max-width:768px){.chat-header-navigation .nav-title{font-size:15px}.chat-header-navigation .chat-button{font-size:13px!important;padding:4px 8px!important}.chat-channel-item{padding:10px 12px}.channel-title{font-size:13px}.channel-subtitle{font-size:12px}}.table-left-panel-container{background-image:url(https://impact-kit.iaproducts.ai/api/v1/files/uploads/impact-ui/prod/icons/tableChat_bg.svg);background-position:50%;background-repeat:repeat;background-size:cover;box-shadow:0 1px 3px #0000001a;position:relative}.chat-header-navigation{background:#0000;border-bottom-color:#d9dde7;box-shadow:0 1px 3px #0000001a;height:64px;overflow:hidden;padding-left:16px;position:relative}.nav-title{color:#fff}.chat-channel-list{display:flex;flex-direction:column;gap:12px;margin:8px;max-height:calc(100vh - 150px);overflow-y:auto}.chat-channel-list .no-channels-found-container{align-items:center;background:#f2f4fb;border-radius:8px;display:flex;flex-direction:column;gap:12px;justify-content:center;padding:12px}.chat-channel-list .no-channels-found-container .no-channels-found{color:#0d152c;font-size:16px;font-weight:600}.chat-channel-list .no-channels-found-container .no-channels-found-description{color:#7a8294;font-size:12px;font-weight:500;line-height:16px;text-align:center}.chat-channel-item.selected,.chat-channel-item:hover{background:#eceefd}.channel-time{color:#60697d}.channel-list-header{align-items:center;display:flex;justify-content:space-between;width:100%}.chanel_icon{background:#fff;border:1px solid #c3c8d4;border-radius:8px;max-height:32px;padding:8px}.chanel_search{align-items:center;background:#f5f6fa;border-radius:8px;display:flex;height:32px;justify-content:center;width:32px}.chanel_search svg{cursor:pointer}.chanel_right_navigation{display:flex;gap:8px}.delete_chat_container{height:32px!important;width:32px}.pinnedChat_container{display:flex;justify-content:space-between}.pinnedChat_container .pinnedChat{opacity:0;transition:opacity .2s ease}.chat_list:hover .pinnedChat_container .pinnedChat{opacity:1}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}}();
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-left-panel-container{background-color:#fff;border:1px solid #b3bdf8b3;border-radius:10px;box-shadow:12px 13px 45px #0000001a;flex-shrink:0;isolation:isolate;max-width:350px;overflow:hidden;position:relative;width:350px}.table-left-panel-container:before{background-image:linear-gradient(168.63deg,#ffffff8a 44.85%,#b3bdf81f 114.26%);border-radius:inherit;content:"";top:0;right:0;bottom:0;left:0;pointer-events:none;position:absolute;z-index:0}.table-left-panel-container>*{position:relative;z-index:1}.table-left-panel-container>.chat-header-navigation{z-index:2}.table-left-panel-container .ia-styles.ia-btn.ia-btn-tertiary:not(.channel-list-header__search),.table-left-panel-container .ia-styles.ia-btn.ia-btn-tertiary:not(.channel-list-header__search):hover{background:none!important;box-shadow:none!important}.chat-header-navigation{align-items:center;background:#0000;border-bottom:1px solid #b3bdf8;box-sizing:border-box;display:flex;justify-content:space-between;padding:16px;position:relative}.chat-header-navigation .nav-left{align-items:center;display:flex;gap:8px}.chat-header-navigation .nav-title{color:#1f2b4d;font-size:16px;font-weight:800;line-height:24px;margin:0;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-header-navigation .nav-right{align-items:center;display:flex;gap:8px;position:relative}.chat-header-navigation .nav-right .search_button{border:none!important}.chat-header-navigation .impact_inputbox_container_with_icons{width:100%}.channel-list-header{align-items:center;display:flex;gap:12px;justify-content:space-between;width:100%}.channel-list-header__title{color:#1f2b4d;font-size:16px;font-weight:800;line-height:24px;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-list-header__search{background:#f5f6fa!important;border:none!important;border-radius:8px!important;box-shadow:none!important;color:#60697d!important;flex-shrink:0;max-height:32px}.channel-list-header__search:hover{background:#f5f6fa!important}.channel-list{display:flex;flex-direction:column;gap:12px;max-height:calc(100vh - 150px);overflow-x:hidden;overflow-y:auto;padding:8px}.channel-list .no-channels-found-container{align-items:center;background:#f2f4fb;border-radius:8px;display:flex;flex-direction:column;gap:12px;justify-content:center;padding:12px}.channel-list .no-channels-found-container .no-channels-found{color:#0d152c;font-size:16px;font-weight:600}.channel-list .no-channels-found-container .no-channels-found-description{color:#7a8294;font-size:12px;font-weight:500;line-height:16px;text-align:center}.channel-list-item{align-items:flex-start;background:#f2f4fb;border-radius:8px;box-sizing:border-box;cursor:pointer;display:flex;gap:8px;padding:12px 16px;width:100%}.channel-list-item--selected,.channel-list-item:hover{background:#eceefd}.channel-list-item--muted{opacity:.7}.channel-list-item__content{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.channel-list-item__title-row{align-items:center;display:flex;gap:10px;min-width:0;width:100%}.channel-list-item__title{color:#0d152c;flex:1;font-size:16px;font-weight:600;line-height:24px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-list-item__time{color:#7a8294;font-size:12px;font-weight:500;line-height:16px}.channel-list-item .MuiChip-root,.channel-list-item .impact_badges_only_label_filled,.channel-list-item .impact_badges_only_label_stroke{flex-shrink:0}.chat-channel-list{display:flex;flex-direction:column;gap:12px;margin:8px;max-height:calc(100vh - 150px);overflow-y:auto}.chat-channel-list .no-channels-found-container{align-items:center;background:#f2f4fb;border-radius:8px;display:flex;flex-direction:column;gap:12px;justify-content:center;padding:12px}.chat-channel-list .no-channels-found-container .no-channels-found{color:#0d152c;font-size:16px;font-weight:600}.chat-channel-list .no-channels-found-container .no-channels-found-description{color:#7a8294;font-size:12px;font-weight:500;line-height:16px;text-align:center}.chat_list{align-items:baseline;border-radius:8px;cursor:pointer;display:flex;gap:12px;padding:12px 16px;transition:background-color .2s ease}.chat_list .ia-styles.ia-avatar{background:#7a8294;border-radius:16px}.chat_list:hover{background:#eceefd}.chat_list:hover .ia-styles.ia-avatar,.chat_list:hover .unread-badge{background:#4259ee}.chat_list:hover .pinnedChat_container .pinnedChat{opacity:1}.chat_list.selected{background:#eceefd}.chat_list.selected .ia-styles.ia-avatar,.chat_list.selected .unread-badge{background:#4259ee}.chat_list.muted{opacity:.7}.chat_list:focus{outline-offset:-2px}.channel-checkbox{align-items:center;display:flex;padding-top:2px}.channel-checkbox input[type=checkbox]{accent-color:#4259ee;border:1px solid #d9dde7;border-radius:3px;cursor:pointer;height:16px;width:16px}.channel-checkbox input[type=checkbox]:checked{background:#4259ee;border-color:#4259ee}.channel-avatar{border-radius:16px;flex-shrink:0;margin-top:2px}.channel-avatar .ia-avatar{font-size:14px!important;font-weight:600!important;height:32px!important;width:32px!important}.channel-content{flex:1;min-width:0}.channel-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:4px}.channel-title{color:#0d152c;flex:1;font-size:16px;font-weight:600;height:24px;line-height:24px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.muted-icon{color:#7a8294;font-size:16px!important}.unread-badge{align-items:center;background:#7a8294;border-radius:10px;color:#fff;display:flex;font-size:10px;font-weight:400;height:18px;justify-content:center;line-height:1;min-width:18px;padding:2px 6px}.channel-subtitle{margin:0 0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.channel-subtitle,.channel-time{color:#7a8294;font-size:12px;font-weight:500;line-height:16px}.delete_chat_container{height:32px!important;width:32px}.pinnedChat_container{display:flex;justify-content:space-between}.pinnedChat_container .pinnedChat{opacity:0;transition:opacity .2s ease}')),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
+ import { useState, useMemo } from "react";
3
4
  import { ChatChannelList } from "./ChatChannelList.js";
5
+ import { ChatFilterChips } from "./ChatFilterChips/ChatFilterChips.js";
4
6
  import { ChatHeaderNavigation } from "./ChatHeaderNavigation.js";
5
7
  import { SkeletonList } from "../SkeletonList.js";
6
8
 
@@ -38,7 +40,32 @@ const TableChatChannelHeader = ({
38
40
  };
39
41
  const { t } = useTranslation();
40
42
  const resolvedTitle = title ?? t("tableChat.channelHeader.createNewChat");
41
- const channelsToShow = channels;
43
+ const showFilterChips = !showChannelList && !isSearchOpen && (headerConfig == null ? void 0 : headerConfig.showFilterChips) !== false;
44
+ const [filterValue, setFilterValue] = useState((headerConfig == null ? void 0 : headerConfig.selectedFilterChip) ?? "all");
45
+ const channelsToShow = useMemo(() => {
46
+ if (!showFilterChips) return channels;
47
+ const selected = (headerConfig == null ? void 0 : headerConfig.selectedFilterChip) ?? filterValue;
48
+ if (selected === "starred") {
49
+ return channels.filter((ch) => {
50
+ var _a;
51
+ return (ch == null ? void 0 : ch.isPinned) || ((_a = ch == null ? void 0 : ch.otherProps) == null ? void 0 : _a.is_pinned);
52
+ });
53
+ }
54
+ if (selected === "resolved") {
55
+ return channels.filter((ch) => {
56
+ var _a;
57
+ return (ch == null ? void 0 : ch.isResolved) || ((_a = ch == null ? void 0 : ch.otherProps) == null ? void 0 : _a.is_resolved);
58
+ });
59
+ }
60
+ return channels;
61
+ }, [channels, showFilterChips, headerConfig == null ? void 0 : headerConfig.selectedFilterChip, filterValue]);
62
+ const handleFilterChange = (nextValue, chip) => {
63
+ var _a;
64
+ if ((headerConfig == null ? void 0 : headerConfig.selectedFilterChip) == null) {
65
+ setFilterValue(nextValue);
66
+ }
67
+ (_a = headerConfig == null ? void 0 : headerConfig.onFilterChipChange) == null ? void 0 : _a.call(headerConfig, nextValue, chip);
68
+ };
42
69
  return /* @__PURE__ */ jsx("div", { className: "table-left-panel-container", children: loadingChannels ? /* @__PURE__ */ jsx("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsx(SkeletonList, { text: t("tableChat.loadingMessages") }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
43
70
  /* @__PURE__ */ jsx(
44
71
  ChatHeaderNavigation,
@@ -65,6 +92,14 @@ const TableChatChannelHeader = ({
65
92
  onThreadClick
66
93
  }
67
94
  ),
95
+ showFilterChips ? /* @__PURE__ */ jsx(
96
+ ChatFilterChips,
97
+ {
98
+ options: headerConfig == null ? void 0 : headerConfig.filterChips,
99
+ value: (headerConfig == null ? void 0 : headerConfig.selectedFilterChip) ?? filterValue,
100
+ onChange: handleFilterChange
101
+ }
102
+ ) : null,
68
103
  /* @__PURE__ */ jsx(
69
104
  ChatChannelList,
70
105
  {
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,2BAA2B,CAAC;AA4CnC,eAAO,MAAM,UAAU,GAAI;;;;CAAmB,4CA2B7C,CAAC;AAeF,QAAA,MAAM,WAAW,GAAI;;;;CAA6C,4CA8BjE,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,CAAC;AA4CnC,eAAO,MAAM,UAAU,GAAI;;;;CAAmB,4CA2B7C,CAAC;AAiBF,QAAA,MAAM,WAAW,GAAI;;;;CAA6C,4CAwDjE,CAAC;AAEF,eAAe,WAAW,CAAC"}