impact-ui 5.0.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/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index3.js +2 -4
- package/dist/_virtual/index4.js +3 -3
- package/dist/_virtual/index5.js +4 -2
- 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/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 +141 -13
- 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/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 -8
- package/dist/node_modules/@impactsmartsuite/impact-icons/dist/index.js +295 -411
- package/dist/node_modules/@mui/icons-material/Check.js +17 -0
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-with-styles-interface-css/dist/index.js +1 -1
- 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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __exports as Check } from "../../../_virtual/Check.js";
|
|
2
|
+
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
+
import { __require as requireCreateSvgIcon } from "./utils/createSvgIcon.js";
|
|
4
|
+
import require$$2 from "react/jsx-runtime";
|
|
5
|
+
var _interopRequireDefault = require$$0;
|
|
6
|
+
Object.defineProperty(Check, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
var default_1 = Check.default = void 0;
|
|
10
|
+
var _createSvgIcon = _interopRequireDefault(requireCreateSvgIcon());
|
|
11
|
+
var _jsxRuntime = require$$2;
|
|
12
|
+
default_1 = Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
|
|
13
|
+
d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
14
|
+
}), "Check");
|
|
15
|
+
export {
|
|
16
|
+
default_1 as default
|
|
17
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as colorManipulator } from "../../../_virtual/colorManipulator.js";
|
|
2
2
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
-
import require$$1 from "../../../_virtual/
|
|
4
|
-
import require$$2 from "../../../_virtual/
|
|
3
|
+
import require$$1 from "../../../_virtual/index4.js";
|
|
4
|
+
import require$$2 from "../../../_virtual/index5.js";
|
|
5
5
|
var _interopRequireDefault = require$$0;
|
|
6
6
|
Object.defineProperty(colorManipulator, "__esModule", {
|
|
7
7
|
value: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../../../_virtual/index13.js";
|
|
2
2
|
import { __require as requireReactIs_production_min } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
if (process.env.NODE_ENV === "production") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../_virtual/index3.js";
|
|
2
2
|
import { __require as requireReactIs_production } from "./cjs/react-is.production.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
if (process.env.NODE_ENV === "production") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as dist } from "../../../_virtual/
|
|
1
|
+
import { __exports as dist } from "../../../_virtual/index14.js";
|
|
2
2
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
3
|
import { __require as requireArray_prototype_flat } from "../../array.prototype.flat/index.js";
|
|
4
4
|
import { __require as requireGlobalCache } from "../../global-cache/index.js";
|
|
@@ -34,48 +34,21 @@ export declare const tableV36ChatColumnDefs: ({
|
|
|
34
34
|
pinned?: undefined;
|
|
35
35
|
maxWidth?: undefined;
|
|
36
36
|
})[];
|
|
37
|
-
declare const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
unreadCount: number;
|
|
42
|
-
owner: number;
|
|
43
|
-
} | {
|
|
44
|
-
id: number;
|
|
45
|
-
title: string;
|
|
46
|
-
time: string;
|
|
47
|
-
unreadCount: number;
|
|
48
|
-
owner?: undefined;
|
|
49
|
-
} | {
|
|
50
|
-
id: number;
|
|
51
|
-
title: string;
|
|
52
|
-
time: string;
|
|
53
|
-
unreadCount?: undefined;
|
|
54
|
-
owner?: undefined;
|
|
55
|
-
})[];
|
|
56
|
-
type ChatTopic = {
|
|
57
|
-
id: string;
|
|
58
|
-
user: string;
|
|
59
|
-
text: string | null;
|
|
60
|
-
title?: string;
|
|
61
|
-
subtitle?: string | null;
|
|
62
|
-
isChecked: boolean;
|
|
63
|
-
isPinned: boolean;
|
|
64
|
-
unreadCount: number;
|
|
65
|
-
messageCount: number;
|
|
66
|
-
timestamp: string;
|
|
67
|
-
otherProps: Record<string, unknown>;
|
|
68
|
-
};
|
|
69
|
-
declare const seedChatsByChannel: () => Record<number, ChatTopic[]>;
|
|
70
|
-
declare const generateMessages: (chatId: string, page?: number, limit?: number) => {
|
|
37
|
+
declare const seedChatsByChannel: () => Record<string, any[]>;
|
|
38
|
+
declare const seedChannels: () => any[];
|
|
39
|
+
/** Page 1: ~8 calendar days (date badge → weekday → Yesterday → Today). Older pages: prior week. */
|
|
40
|
+
declare const generateMessages: (chatId: string, page?: number, _limit?: number) => ({
|
|
71
41
|
id: string;
|
|
72
42
|
author: string;
|
|
73
|
-
authorName: string;
|
|
43
|
+
authorName: string | undefined;
|
|
74
44
|
content: string;
|
|
75
45
|
timestamp: string;
|
|
76
46
|
date: string;
|
|
77
47
|
showReplyBadge: boolean;
|
|
78
|
-
|
|
48
|
+
quote: {
|
|
49
|
+
authorLabel: string;
|
|
50
|
+
content: string;
|
|
51
|
+
} | undefined;
|
|
79
52
|
priority: string;
|
|
80
53
|
edited: boolean;
|
|
81
54
|
deleted: boolean;
|
|
@@ -86,7 +59,23 @@ declare const generateMessages: (chatId: string, page?: number, limit?: number)
|
|
|
86
59
|
created_at: string;
|
|
87
60
|
sender_name: string;
|
|
88
61
|
};
|
|
89
|
-
}
|
|
62
|
+
} | {
|
|
63
|
+
id: string;
|
|
64
|
+
type: string;
|
|
65
|
+
author: string;
|
|
66
|
+
authorName: string;
|
|
67
|
+
content: string;
|
|
68
|
+
timestamp: string;
|
|
69
|
+
date: string;
|
|
70
|
+
showReplyBadge: boolean;
|
|
71
|
+
showActions: boolean;
|
|
72
|
+
deleted: boolean;
|
|
73
|
+
isPinned: boolean;
|
|
74
|
+
otherProps: {
|
|
75
|
+
created_at: string;
|
|
76
|
+
is_system: boolean;
|
|
77
|
+
};
|
|
78
|
+
})[];
|
|
90
79
|
export type TableV36ChatApiStore = {
|
|
91
80
|
channels: ReturnType<typeof seedChannels>;
|
|
92
81
|
chatsByChannel: ReturnType<typeof seedChatsByChannel>;
|
|
@@ -98,6 +87,16 @@ export type TableV36ChatApiStore = {
|
|
|
98
87
|
pinStateByChat: Record<string, boolean>;
|
|
99
88
|
};
|
|
100
89
|
export declare const createTableV36ChatApiStore: () => TableV36ChatApiStore;
|
|
90
|
+
/**
|
|
91
|
+
* Host helper for row chat cell indicator.
|
|
92
|
+
* Returns null when the row has no channel / chats (no icon rendered).
|
|
93
|
+
* Badge shows resolvedChats/totalChats (resolved UI comes later).
|
|
94
|
+
*/
|
|
95
|
+
export declare const getRowChatMetaFromStore: (store: TableV36ChatApiStore) => (rowData: Record<string, unknown> | null | undefined) => {
|
|
96
|
+
totalChats: number;
|
|
97
|
+
resolvedChats: number;
|
|
98
|
+
hasUnread: boolean;
|
|
99
|
+
} | null;
|
|
101
100
|
export type CreateTableV36ApiDrivenChatConfigurationOptions = {
|
|
102
101
|
store: TableV36ChatApiStore;
|
|
103
102
|
/** Bump when store mutates so React recomputes chatConfiguration */
|
|
@@ -121,17 +120,27 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
121
120
|
currentTopicId: null;
|
|
122
121
|
isThreadIconVisible: boolean;
|
|
123
122
|
isPinChatIconVisible: boolean;
|
|
123
|
+
showReplyActions: boolean;
|
|
124
|
+
showFinalize: boolean;
|
|
125
|
+
moreOptions: (message: {
|
|
126
|
+
id?: string;
|
|
127
|
+
}) => {
|
|
128
|
+
label: string;
|
|
129
|
+
value: string;
|
|
130
|
+
onClick: () => void;
|
|
131
|
+
}[];
|
|
124
132
|
emptyChannelStateTitle: string;
|
|
125
133
|
emptyChannelStateSubTitle: string;
|
|
126
134
|
emptyChatStateTitle: string;
|
|
127
135
|
emptyChatStateSubTitle: string;
|
|
128
136
|
currentUserId: number;
|
|
129
|
-
selectedMessageId:
|
|
137
|
+
selectedMessageId: null;
|
|
130
138
|
maxSearchPages: number;
|
|
131
139
|
highlightDuration: number;
|
|
132
140
|
scrollBehavior: string;
|
|
133
141
|
scrollBlock: string;
|
|
134
142
|
highlightColor: null;
|
|
143
|
+
onFinalize: (messageId: string, chatId: string, item: unknown) => Promise<boolean>;
|
|
135
144
|
onRealTimeMessageUpdate: (newMessage: unknown) => void;
|
|
136
145
|
onMessageReply: (messageId: string, message: unknown) => void;
|
|
137
146
|
onMessageBookmark: (messageId: string, message: unknown) => void;
|
|
@@ -139,10 +148,51 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
139
148
|
id: string;
|
|
140
149
|
isPinned: boolean;
|
|
141
150
|
}>;
|
|
142
|
-
onMessageUpdate: (messageId: string, updatedData:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
onMessageUpdate: (messageId: string, updatedData: {
|
|
152
|
+
content?: string;
|
|
153
|
+
}) => Promise<{
|
|
154
|
+
content: string;
|
|
155
|
+
edited: boolean;
|
|
156
|
+
id: string;
|
|
157
|
+
author: string;
|
|
158
|
+
authorName: string | undefined;
|
|
159
|
+
timestamp: string;
|
|
160
|
+
date: string;
|
|
161
|
+
showReplyBadge: boolean;
|
|
162
|
+
quote: {
|
|
163
|
+
authorLabel: string;
|
|
164
|
+
content: string;
|
|
165
|
+
} | undefined;
|
|
166
|
+
priority: string;
|
|
167
|
+
deleted: boolean;
|
|
168
|
+
isPinned: boolean;
|
|
169
|
+
showActions: boolean;
|
|
170
|
+
otherProps: {
|
|
171
|
+
sender_id: number;
|
|
172
|
+
created_at: string;
|
|
173
|
+
sender_name: string;
|
|
174
|
+
};
|
|
175
|
+
} | {
|
|
176
|
+
content: string;
|
|
177
|
+
edited: boolean;
|
|
178
|
+
id: string;
|
|
179
|
+
type: string;
|
|
180
|
+
author: string;
|
|
181
|
+
authorName: string;
|
|
182
|
+
timestamp: string;
|
|
183
|
+
date: string;
|
|
184
|
+
showReplyBadge: boolean;
|
|
185
|
+
showActions: boolean;
|
|
186
|
+
deleted: boolean;
|
|
187
|
+
isPinned: boolean;
|
|
188
|
+
otherProps: {
|
|
189
|
+
created_at: string;
|
|
190
|
+
is_system: boolean;
|
|
191
|
+
};
|
|
192
|
+
} | {
|
|
193
|
+
id: string;
|
|
194
|
+
content: string | undefined;
|
|
195
|
+
edited: boolean;
|
|
146
196
|
}>;
|
|
147
197
|
onMessageDelete: (messageId: string) => Promise<{
|
|
148
198
|
success: boolean;
|
|
@@ -188,6 +238,18 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
188
238
|
};
|
|
189
239
|
headerChatConfig: {
|
|
190
240
|
participants: unknown[] | undefined;
|
|
241
|
+
showChatId: boolean;
|
|
242
|
+
showResolve: boolean;
|
|
243
|
+
isResolved: boolean;
|
|
244
|
+
onResolve: (chatId: string) => Promise<{
|
|
245
|
+
success: boolean;
|
|
246
|
+
chatId: string;
|
|
247
|
+
}>;
|
|
248
|
+
onTitleChange: (chatId: string, title: string) => Promise<{
|
|
249
|
+
success: boolean;
|
|
250
|
+
chatId: string;
|
|
251
|
+
title: string;
|
|
252
|
+
}>;
|
|
191
253
|
loadParticipants: (radioValue: string, selectedChannelInfo: unknown, selectedChatInfo: unknown) => Promise<({
|
|
192
254
|
id: number;
|
|
193
255
|
label: string;
|
|
@@ -268,15 +330,20 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
268
330
|
inputChatConfig: {
|
|
269
331
|
onSend: (payload: {
|
|
270
332
|
content?: string;
|
|
333
|
+
quote?: unknown;
|
|
334
|
+
replyToMessageId?: string;
|
|
271
335
|
}, chatId: string) => Promise<{
|
|
272
336
|
id: string;
|
|
273
337
|
author: string;
|
|
274
|
-
authorName: string;
|
|
338
|
+
authorName: string | undefined;
|
|
275
339
|
content: string;
|
|
276
340
|
timestamp: string;
|
|
277
341
|
date: string;
|
|
278
342
|
showReplyBadge: boolean;
|
|
279
|
-
|
|
343
|
+
quote: {
|
|
344
|
+
authorLabel: string;
|
|
345
|
+
content: string;
|
|
346
|
+
} | undefined;
|
|
280
347
|
priority: string;
|
|
281
348
|
edited: boolean;
|
|
282
349
|
deleted: boolean;
|
|
@@ -294,6 +361,7 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
294
361
|
onAttachFile: (file: unknown) => void;
|
|
295
362
|
onImageUpload: (image: unknown) => void;
|
|
296
363
|
onEmojiSelect: (emoji: unknown) => void;
|
|
364
|
+
onQuickAction: (option: unknown, chatId: string) => void;
|
|
297
365
|
inputConfig: {
|
|
298
366
|
placeholder: string;
|
|
299
367
|
maxLength: number;
|
|
@@ -303,15 +371,14 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
303
371
|
showQuickAction: boolean;
|
|
304
372
|
quickActionLabel: string;
|
|
305
373
|
allowedFileTypes: string[];
|
|
306
|
-
quickActions: {
|
|
307
|
-
label: string;
|
|
308
|
-
action: string;
|
|
309
|
-
}[];
|
|
310
374
|
};
|
|
311
375
|
};
|
|
312
376
|
leftPanel: {
|
|
377
|
+
channelListTitle: string;
|
|
313
378
|
leftHeaderPanel: {
|
|
314
379
|
showAddChat: boolean;
|
|
380
|
+
showFilterChips: boolean;
|
|
381
|
+
onFilterChipChange: (value: string) => void;
|
|
315
382
|
};
|
|
316
383
|
leftChatPanel: {
|
|
317
384
|
showCheckbox: boolean;
|
|
@@ -326,33 +393,15 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
326
393
|
inputPlaceholder: string;
|
|
327
394
|
textAreaPlaceholder: string;
|
|
328
395
|
};
|
|
329
|
-
loadChannelsList: () => Promise<
|
|
330
|
-
id: number;
|
|
331
|
-
title: string;
|
|
332
|
-
time: string;
|
|
333
|
-
unreadCount: number;
|
|
334
|
-
owner: number;
|
|
335
|
-
} | {
|
|
336
|
-
id: number;
|
|
337
|
-
title: string;
|
|
338
|
-
time: string;
|
|
339
|
-
unreadCount: number;
|
|
340
|
-
owner?: undefined;
|
|
341
|
-
} | {
|
|
342
|
-
id: number;
|
|
343
|
-
title: string;
|
|
344
|
-
time: string;
|
|
345
|
-
unreadCount?: undefined;
|
|
346
|
-
owner?: undefined;
|
|
347
|
-
})[]>;
|
|
396
|
+
loadChannelsList: () => Promise<any[]>;
|
|
348
397
|
loadChatList: (selectedChannelInfo: {
|
|
349
|
-
id?: number;
|
|
350
|
-
}) => Promise<
|
|
398
|
+
id?: string | number;
|
|
399
|
+
}) => Promise<any[]>;
|
|
351
400
|
handleChatName: (formData: {
|
|
352
401
|
chatName?: string;
|
|
353
402
|
chatDescription?: string;
|
|
354
403
|
}, selectedChannelInfo: {
|
|
355
|
-
id?: number;
|
|
404
|
+
id?: string | number;
|
|
356
405
|
} | null) => Promise<{
|
|
357
406
|
success: boolean;
|
|
358
407
|
formattedChat: {
|
|
@@ -363,16 +412,24 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
363
412
|
subtitle: string | null;
|
|
364
413
|
isChecked: boolean;
|
|
365
414
|
isPinned: boolean;
|
|
415
|
+
isResolved: boolean;
|
|
416
|
+
displayId: string;
|
|
366
417
|
unreadCount: number;
|
|
367
418
|
messageCount: number;
|
|
368
419
|
timestamp: string;
|
|
420
|
+
createdBy: string;
|
|
369
421
|
otherProps: {
|
|
370
422
|
topic_id: string;
|
|
371
423
|
name: string | undefined;
|
|
372
424
|
description: string | null;
|
|
373
425
|
object_type: string;
|
|
374
426
|
object_ids: string[];
|
|
427
|
+
channel_id: string | number;
|
|
375
428
|
is_pinned: boolean;
|
|
429
|
+
is_resolved: boolean;
|
|
430
|
+
reference_id: string;
|
|
431
|
+
created_by_user: string;
|
|
432
|
+
created_at: string;
|
|
376
433
|
};
|
|
377
434
|
};
|
|
378
435
|
}>;
|
|
@@ -383,19 +440,94 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
383
440
|
directChatList: never[];
|
|
384
441
|
hasDirectChatList: boolean;
|
|
385
442
|
selectedChatId: null;
|
|
443
|
+
/**
|
|
444
|
+
* Select row → Start new chat:
|
|
445
|
+
* Row = channel. Create channel if missing, always create a new chat under it,
|
|
446
|
+
* return openChat so the panel opens the chat window directly.
|
|
447
|
+
* Titles / ids come from host (this mock) — not from the panel.
|
|
448
|
+
*/
|
|
449
|
+
onStartNewChat: (selectedRows?: Array<Record<string, unknown>>) => Promise<{
|
|
450
|
+
success: boolean;
|
|
451
|
+
channel: any;
|
|
452
|
+
channelsList: any[];
|
|
453
|
+
chatList: any[] | undefined;
|
|
454
|
+
openChat: {
|
|
455
|
+
id: string;
|
|
456
|
+
user: string;
|
|
457
|
+
text: null;
|
|
458
|
+
title: string | undefined;
|
|
459
|
+
subtitle: string | null;
|
|
460
|
+
isChecked: boolean;
|
|
461
|
+
isPinned: boolean;
|
|
462
|
+
isResolved: boolean;
|
|
463
|
+
displayId: string;
|
|
464
|
+
unreadCount: number;
|
|
465
|
+
messageCount: number;
|
|
466
|
+
timestamp: string;
|
|
467
|
+
createdBy: string;
|
|
468
|
+
otherProps: {
|
|
469
|
+
topic_id: string;
|
|
470
|
+
name: string | undefined;
|
|
471
|
+
description: string | null;
|
|
472
|
+
object_type: string;
|
|
473
|
+
object_ids: string[];
|
|
474
|
+
channel_id: string | number;
|
|
475
|
+
is_pinned: boolean;
|
|
476
|
+
is_resolved: boolean;
|
|
477
|
+
reference_id: string;
|
|
478
|
+
created_by_user: string;
|
|
479
|
+
created_at: string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
screen: string;
|
|
483
|
+
}>;
|
|
484
|
+
/**
|
|
485
|
+
* Channel list → select channel: return that channel's chat list only.
|
|
486
|
+
* Do not auto-open a chat (user picks a chat next).
|
|
487
|
+
*/
|
|
488
|
+
onChannelOpen: (channelInfo: {
|
|
489
|
+
id?: string | number;
|
|
490
|
+
}) => Promise<{
|
|
491
|
+
success: boolean;
|
|
492
|
+
screen?: undefined;
|
|
493
|
+
chatList?: undefined;
|
|
494
|
+
} | {
|
|
495
|
+
success: boolean;
|
|
496
|
+
screen: string;
|
|
497
|
+
chatList: any[];
|
|
498
|
+
}>;
|
|
499
|
+
/**
|
|
500
|
+
* Row cell chat icon → same as selecting that channel: chat list only.
|
|
501
|
+
*/
|
|
502
|
+
onOpenChannelFromRow: (selectedRows?: Array<Record<string, unknown>>) => Promise<{
|
|
503
|
+
success: boolean;
|
|
504
|
+
channel?: undefined;
|
|
505
|
+
channelsList?: undefined;
|
|
506
|
+
chatList?: undefined;
|
|
507
|
+
screen?: undefined;
|
|
508
|
+
} | {
|
|
509
|
+
success: boolean;
|
|
510
|
+
channel: any;
|
|
511
|
+
channelsList: any[];
|
|
512
|
+
chatList: any[];
|
|
513
|
+
screen: string;
|
|
514
|
+
}>;
|
|
386
515
|
clearDirectChatList: () => void;
|
|
387
516
|
};
|
|
388
517
|
rightPanel: {
|
|
389
518
|
messagesClearedTrigger: number;
|
|
390
|
-
loadMessages: (chatId: string, page?: number) => Promise<{
|
|
519
|
+
loadMessages: (chatId: string, page?: number) => Promise<({
|
|
391
520
|
id: string;
|
|
392
521
|
author: string;
|
|
393
|
-
authorName: string;
|
|
522
|
+
authorName: string | undefined;
|
|
394
523
|
content: string;
|
|
395
524
|
timestamp: string;
|
|
396
525
|
date: string;
|
|
397
526
|
showReplyBadge: boolean;
|
|
398
|
-
|
|
527
|
+
quote: {
|
|
528
|
+
authorLabel: string;
|
|
529
|
+
content: string;
|
|
530
|
+
} | undefined;
|
|
399
531
|
priority: string;
|
|
400
532
|
edited: boolean;
|
|
401
533
|
deleted: boolean;
|
|
@@ -406,7 +538,23 @@ export declare const createTableV36ApiDrivenChatConfiguration: ({ store, revisio
|
|
|
406
538
|
created_at: string;
|
|
407
539
|
sender_name: string;
|
|
408
540
|
};
|
|
409
|
-
}
|
|
541
|
+
} | {
|
|
542
|
+
id: string;
|
|
543
|
+
type: string;
|
|
544
|
+
author: string;
|
|
545
|
+
authorName: string;
|
|
546
|
+
content: string;
|
|
547
|
+
timestamp: string;
|
|
548
|
+
date: string;
|
|
549
|
+
showReplyBadge: boolean;
|
|
550
|
+
showActions: boolean;
|
|
551
|
+
deleted: boolean;
|
|
552
|
+
isPinned: boolean;
|
|
553
|
+
otherProps: {
|
|
554
|
+
created_at: string;
|
|
555
|
+
is_system: boolean;
|
|
556
|
+
};
|
|
557
|
+
})[]>;
|
|
410
558
|
loadOlderMessages: (channelId: string) => Promise<{
|
|
411
559
|
id: string;
|
|
412
560
|
author: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableV36ChatApiMock.d.ts","sourceRoot":"","sources":["../../src/st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19
|
inputProps?: Record<string, unknown>;
|
|
20
20
|
columnFieldsInAdvanceSearch?: string[];
|
|
21
|
+
/** Maps advance-search field names to AG Grid filterModel keys. Optional. */
|
|
22
|
+
columnFieldsFilterMap?: Record<string, string>;
|
|
21
23
|
toShowDuplicateColumnInAdvanceSearch?: boolean;
|
|
22
24
|
extra_params?: {
|
|
23
25
|
is_advance_search?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/utils/helper.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,2BAA2B,CAAC,EAAE,MAAM,EAAE,CAAC;IACvC,oCAAoC,CAAC,EAAE,OAAO,CAAC;IAC/C,YAAY,CAAC,EAAE;QACb,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,EAAE,CAAC;CACL;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,OAAO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AgB,GAAI,SAAS,gBAAgB,EAAE,KAAG,YAAY,EAS1E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,gBAAgB,EAAE,KAAG,wBAAwB,EAGvF,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAUpE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,MAAM,EAAE,WAAW,EAAE,GACpB,OAAO,CAgBT;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC3C,cAAc,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAC1C,iBAAiB,EAAE,SAAS,EAAE,EAC9B,WAAW,GAAE,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAC,GAAG,IAAW,EACnE,2BAA2B,UAAQ,GAClC,OAAO,CAwBT;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MAM7B,CAAC;AAEd;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CASvE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-ui",
|
|
3
|
-
"version": "5.0.1",
|
|
3
|
+
"version": "5.0.2-alpha.1",
|
|
4
4
|
"description": "Impact Analytics UI library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/components/index.js",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@chromatic-com/storybook": "^5.0.1",
|
|
109
109
|
"@emotion/react": "^11.14.0",
|
|
110
110
|
"@emotion/styled": "^11.14.1",
|
|
111
|
-
"@impactsmartsuite/impact-icons": "
|
|
111
|
+
"@impactsmartsuite/impact-icons": "0.1.8-beta.3",
|
|
112
112
|
"@mui/base": "^5.0.0-alpha.82",
|
|
113
113
|
"@mui/docs": "^5.8.0",
|
|
114
114
|
"@mui/envinfo": "^2.0.6",
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { getAssetUrl } from "../../../../../utils/assetBase.js";
|
|
4
|
-
import { useTranslation } from "../../../../../i18n/useTranslation.js";
|
|
5
|
-
const ThreeDotIcon = getAssetUrl("icons/treedotIcon.svg");
|
|
6
|
-
const TreadChatIcon = getAssetUrl("icons/treadChatIcon.svg");
|
|
7
|
-
const PinnedIcon = getAssetUrl("icons/pinedIcon.svg");
|
|
8
|
-
const UnpinIcon = getAssetUrl("icons/unpinedIcon.svg");
|
|
9
|
-
const ChatEditedMessageType = ({
|
|
10
|
-
content,
|
|
11
|
-
timestamp,
|
|
12
|
-
handleClickOnMoreOptions,
|
|
13
|
-
priority = "default",
|
|
14
|
-
edited = false,
|
|
15
|
-
onThreadClick,
|
|
16
|
-
pinned,
|
|
17
|
-
onPin
|
|
18
|
-
}) => {
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
const [showPinned, setShowPinned] = useState(pinned);
|
|
21
|
-
const handlePin = async (isPinned) => {
|
|
22
|
-
try {
|
|
23
|
-
const response = await onPin(isPinned);
|
|
24
|
-
console.log("Response: [DefaultMessageType]", response);
|
|
25
|
-
if (response) {
|
|
26
|
-
setShowPinned(isPinned);
|
|
27
|
-
}
|
|
28
|
-
return response;
|
|
29
|
-
} catch (error) {
|
|
30
|
-
console.error("Error pinning message:", error);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ jsxs("div", { className: `message-text ${priority}`, children: [
|
|
34
|
-
typeof content === "string" ? /* @__PURE__ */ jsx("p", { children: content }) : content,
|
|
35
|
-
/* @__PURE__ */ jsxs("div", { className: `message-header ${!isUser ? "flex-end" : ""}`, children: [
|
|
36
|
-
/* @__PURE__ */ jsxs("div", { className: "message-action-container", children: [
|
|
37
|
-
/* @__PURE__ */ jsx("img", { alt: "threedot", src: ThreeDotIcon, onClick: handleClickOnMoreOptions }),
|
|
38
|
-
/* @__PURE__ */ jsx("img", { alt: "treaddd", src: TreadChatIcon, onClick: onThreadClick })
|
|
39
|
-
] }),
|
|
40
|
-
/* @__PURE__ */ jsxs("div", { className: "message-action-info-container", children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
"img",
|
|
43
|
-
{
|
|
44
|
-
alt: "unpinned",
|
|
45
|
-
height: 12.63,
|
|
46
|
-
src: pinned ? PinnedIcon : UnpinIcon,
|
|
47
|
-
style: { cursor: "pointer" },
|
|
48
|
-
width: 12.63,
|
|
49
|
-
onClick: () => handlePin(!showPinned)
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ jsxs("span", { className: "message-action-info", children: [
|
|
53
|
-
timestamp,
|
|
54
|
-
edited && /* @__PURE__ */ jsxs("span", { className: "edited-label", children: [
|
|
55
|
-
" ",
|
|
56
|
-
t("commentsPanel.edited")
|
|
57
|
-
] })
|
|
58
|
-
] })
|
|
59
|
-
] })
|
|
60
|
-
] })
|
|
61
|
-
] });
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
ChatEditedMessageType as default
|
|
65
|
-
};
|