impact-ui 4.0.1-alpha.21 → 4.0.1-alpha.22
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/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +3 -1
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Chart/index.js +23 -27
- package/dist/components/Chatbot/bookMarkPanel.d.ts.map +1 -1
- package/dist/components/Chatbot/bookMarkPanel.js +8 -6
- package/dist/components/Chatbot/chatInput.d.ts.map +1 -1
- package/dist/components/Chatbot/chatInput.js +4 -2
- package/dist/components/Chatbot/chatbotModuleMenu.d.ts.map +1 -1
- package/dist/components/Chatbot/chatbotModuleMenu.js +5 -3
- package/dist/components/Chatbot/conversationScreen.d.ts.map +1 -1
- package/dist/components/Chatbot/conversationScreen.js +5 -3
- package/dist/components/Chatbot/historyPanel.d.ts.map +1 -1
- package/dist/components/Chatbot/historyPanel.js +18 -9
- package/dist/components/Chatbot/index.d.ts.map +1 -1
- package/dist/components/Chatbot/index.js +28 -11
- package/dist/components/Chatbot/newChatComponent.d.ts.map +1 -1
- package/dist/components/Chatbot/newChatComponent.js +11 -9
- package/dist/components/Chatbot/utils.d.ts +3 -1
- package/dist/components/Chatbot/utils.d.ts.map +1 -1
- package/dist/components/Chatbot/utils.js +4 -4
- package/dist/components/CommentsPanel/CommentsContext.d.ts.map +1 -1
- package/dist/components/CommentsPanel/CommentsContext.js +18 -15
- package/dist/components/CommentsPanel/CommentsPanel.impl.d.ts.map +1 -1
- package/dist/components/CommentsPanel/CommentsPanel.impl.js +25 -24
- package/dist/components/CreateItemFlow/index.d.ts.map +1 -1
- package/dist/components/CreateItemFlow/index.js +23 -8
- package/dist/components/DatePicker/datePickerFooter.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerFooter.js +5 -3
- package/dist/components/DatePicker/datePickerInput.d.ts.map +1 -1
- package/dist/components/DatePicker/datePickerInput.js +4 -2
- package/dist/components/DateRangePicker/dateRangePickerCustom.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerCustom.js +5 -3
- package/dist/components/DateRangePicker/dateRangePickerFooter.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerFooter.js +8 -8
- package/dist/components/DateRangePicker/dateRangePickerInput.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerInput.js +4 -2
- package/dist/components/DateRangePicker/index.js +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.js +4 -2
- package/dist/components/DateRangePicker/utils.d.ts +5 -0
- package/dist/components/DateRangePicker/utils.d.ts.map +1 -1
- package/dist/components/DateRangePicker/utils.js +13 -0
- package/dist/components/FileUpload/TemplatePreview.d.ts.map +1 -1
- package/dist/components/FileUpload/TemplatePreview.js +3 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/FileUpload/index.js +26 -21
- package/dist/components/FiltersStrip/AppliedFilters.d.ts.map +1 -1
- package/dist/components/FiltersStrip/AppliedFilters.js +9 -7
- package/dist/components/FiltersStrip/FilterDropDown.d.ts.map +1 -1
- package/dist/components/FiltersStrip/FilterDropDown.js +6 -3
- package/dist/components/FiltersStrip/index.d.ts.map +1 -1
- package/dist/components/FiltersStrip/index.js +6 -3
- package/dist/components/Header/Header.types.d.ts +7 -0
- package/dist/components/Header/Header.types.d.ts.map +1 -1
- package/dist/components/Header/index.d.ts +1 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +93 -5
- package/dist/components/HomePage/index.d.ts.map +1 -1
- package/dist/components/HomePage/index.js +44 -34
- package/dist/components/KeyboardShortCuts/ShortcutLandingPage.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/ShortcutLandingPage.js +36 -28
- package/dist/components/KeyboardShortCuts/ShortcutModal.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/ShortcutModal.js +4 -2
- package/dist/components/KeyboardShortCuts/allSetBox.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/allSetBox.js +8 -2
- package/dist/components/KeyboardShortCuts/index.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/index.js +7 -5
- package/dist/components/KeyboardShortCuts/screen2.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/screen2.js +4 -2
- package/dist/components/KeyboardShortCuts/screen3.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/screen3.js +4 -2
- package/dist/components/KeyboardShortCuts/tutorial.d.ts.map +1 -1
- package/dist/components/KeyboardShortCuts/tutorial.js +14 -12
- package/dist/components/Loader/index.d.ts.map +1 -1
- package/dist/components/Loader/index.js +5 -2
- package/dist/components/Menu/MenuHeaderInfo.d.ts.map +1 -1
- package/dist/components/Menu/MenuHeaderInfo.js +6 -4
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +18 -8
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -3
- package/dist/components/MonthPicker/index.d.ts.map +1 -1
- package/dist/components/MonthPicker/index.js +17 -14
- package/dist/components/MonthRangePicker/index.d.ts +1 -1
- package/dist/components/MonthRangePicker/index.d.ts.map +1 -1
- package/dist/components/MonthRangePicker/index.js +17 -14
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +14 -10
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationListItem.js +28 -17
- package/dist/components/Notification/NotificationBody/NotificationPanelContent.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationPanelContent.js +1 -1
- package/dist/components/Notification/NotificationBody/NotificationTaskList.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationTaskList.js +7 -5
- package/dist/components/Notification/NotificationBody/index.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/index.js +3 -1
- package/dist/components/Notification/index.d.ts.map +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/Select/SearchFilter.d.ts.map +1 -1
- package/dist/components/Select/SearchFilter.js +6 -4
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +14 -10
- package/dist/components/Select/menuList.d.ts.map +1 -1
- package/dist/components/Select/menuList.js +31 -20
- package/dist/components/Select/utils.d.ts +1 -1
- package/dist/components/Select/utils.d.ts.map +1 -1
- package/dist/components/Select/utils.js +2 -2
- package/dist/components/Sidebar/SidebarActions.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarActions.js +6 -3
- package/dist/components/Sidebar/SidebarMenus.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMenus.js +3 -4
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +6 -4
- package/dist/components/Table/AdvanceSearchModalItem.d.ts.map +1 -1
- package/dist/components/Table/AdvanceSearchModalItem.js +7 -5
- package/dist/components/Table/AdvanceSortModal.d.ts.map +1 -1
- package/dist/components/Table/AdvanceSortModal.js +34 -30
- package/dist/components/Table/AgGridHeader.d.ts.map +1 -1
- package/dist/components/Table/AgGridHeader.js +5 -3
- package/dist/components/Table/CommentsPortal.d.ts +3 -5
- package/dist/components/Table/CommentsPortal.d.ts.map +1 -1
- package/dist/components/Table/CommentsPortal.js +8 -5
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts.map +1 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +11 -9
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts.map +1 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +11 -6
- package/dist/components/Table/NoComments.d.ts.map +1 -1
- package/dist/components/Table/NoComments.js +5 -3
- package/dist/components/Table/actionBar.d.ts.map +1 -1
- package/dist/components/Table/actionBar.js +5 -1
- package/dist/components/Table/advanceSearchModal.d.ts.map +1 -1
- package/dist/components/Table/advanceSearchModal.js +14 -12
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +29 -21
- package/dist/components/Table/tableFunctions.d.ts +10 -12
- package/dist/components/Table/tableFunctions.d.ts.map +1 -1
- package/dist/components/Table/tableFunctions.js +59 -53
- package/dist/components/Table/tableHeader.d.ts.map +1 -1
- package/dist/components/Table/tableHeader.js +22 -13
- package/dist/components/Table/tableMoreOptions.d.ts.map +1 -1
- package/dist/components/Table/tableMoreOptions.js +10 -8
- package/dist/components/Table/tablePagination.d.ts.map +1 -1
- package/dist/components/Table/tablePagination.js +16 -6
- package/dist/components/Table/tableSettings.d.ts +1 -1
- package/dist/components/Table/tableSettings.d.ts.map +1 -1
- package/dist/components/Table/tableSettings.js +17 -14
- package/dist/components/Table/withCommentIcon.d.ts.map +1 -1
- package/dist/components/Table/withCommentIcon.js +5 -1
- package/dist/components/TableChat/TableChatSidePanel.d.ts.map +1 -1
- package/dist/components/TableChat/TableChatSidePanel.js +22 -22
- package/dist/components/TableChat/components/SkeletonList.d.ts +1 -1
- package/dist/components/TableChat/components/SkeletonList.d.ts.map +1 -1
- package/dist/components/TableChat/components/SkeletonList.js +6 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.d.ts +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +37 -29
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts +3 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelItem.js +25 -27
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatChannelList.js +45 -3
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.d.ts +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.js +4 -2
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.d.ts +1 -3
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.js +5 -3
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.d.ts +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +6 -3
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +13 -4
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +14 -5
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +3 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatEditedMessageType /ChatEditedMessageType.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatEditedMessageType /ChatEditedMessageType.js +6 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +7 -5
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.js +6 -2
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.js +3 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts +2 -2
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +27 -22
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +9 -7
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +18 -20
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +5 -3
- package/dist/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.d.ts +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.js +26 -7
- package/dist/components/TableChat/components/TableChatRightSection/ImageUploader/ImageUploader.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/ImageUploader/ImageUploader.js +30 -4
- package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.js +13 -7
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts +2 -2
- package/dist/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.d.ts.map +1 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +25 -23
- package/dist/components/TableChat/components/TextEditor/EditorToolbar.d.ts.map +1 -1
- package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +19 -17
- package/dist/components/TableChat/components/TextEditor/Mention.d.ts +1 -2
- package/dist/components/TableChat/components/TextEditor/Mention.d.ts.map +1 -1
- package/dist/components/TableChat/components/TextEditor/Mention.js +6 -3
- package/dist/components/TableChat/components/TextEditor/MentionList.d.ts +1 -2
- package/dist/components/TableChat/components/TextEditor/MentionList.d.ts.map +1 -1
- package/dist/components/TableChat/components/TextEditor/MentionList.js +4 -2
- package/dist/components/TableOld/AgGridHeader.d.ts.map +1 -1
- package/dist/components/TableOld/AgGridHeader.js +5 -3
- package/dist/components/TableOld/actionBar.d.ts.map +1 -1
- package/dist/components/TableOld/actionBar.js +5 -1
- package/dist/components/TableOld/index.d.ts +1 -2
- package/dist/components/TableOld/index.d.ts.map +1 -1
- package/dist/components/TableOld/index.js +14 -8
- package/dist/components/TableOld/tableFunctions.d.ts +10 -12
- package/dist/components/TableOld/tableFunctions.d.ts.map +1 -1
- package/dist/components/TableOld/tableFunctions.js +65 -57
- package/dist/components/TableOld/tableHeader.d.ts.map +1 -1
- package/dist/components/TableOld/tableHeader.js +4 -2
- package/dist/components/TableOld/tablePagination.d.ts.map +1 -1
- package/dist/components/TableOld/tablePagination.js +17 -5
- package/dist/components/TableOld/tableSettings.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +18 -1
- package/dist/i18n/I18nContext.d.ts +23 -0
- package/dist/i18n/I18nContext.d.ts.map +1 -0
- package/dist/i18n/I18nContext.js +58 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/translate.d.ts +15 -0
- package/dist/i18n/translate.d.ts.map +1 -0
- package/dist/i18n/translate.js +22 -0
- package/dist/i18n/types.d.ts +18 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/useI18n.d.ts +10 -0
- package/dist/i18n/useI18n.d.ts.map +1 -0
- package/dist/i18n/useI18n.js +28 -0
- package/dist/i18n/useTranslation.d.ts +15 -0
- package/dist/i18n/useTranslation.d.ts.map +1 -0
- package/dist/i18n/useTranslation.js +8 -0
- package/dist/locales/de-DE.json.d.ts +559 -0
- package/dist/locales/de-DE.json.js +503 -0
- package/dist/locales/en-US.json.d.ts +554 -0
- package/dist/locales/en-US.json.js +500 -0
- package/dist/locales/index.d.ts +24 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +32 -0
- package/dist/mcp-component-registry.json +1 -1
- package/dist/node_modules/moment/dist/locale/de.js +75 -0
- package/dist/node_modules/moment/dist/moment.js +3986 -0
- package/dist/stories/i18nDemo.d.ts +7 -0
- package/dist/stories/i18nDemo.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -3,22 +3,32 @@ import { useState } from "react";
|
|
|
3
3
|
import default_1 from "../../node_modules/@mui/icons-material/ExpandLess.js";
|
|
4
4
|
import { Button } from "../Button/index.js";
|
|
5
5
|
import { Menu } from "../Menu/index.js";
|
|
6
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
6
7
|
function TablePagination({
|
|
7
8
|
actualRef,
|
|
8
9
|
localPageSize,
|
|
9
10
|
setLocalPageSize,
|
|
10
11
|
paginationPageSizeSelector
|
|
11
12
|
}) {
|
|
13
|
+
const { t } = useTranslation();
|
|
12
14
|
const [paginationOptionsAnchorEl, setPaginationOptionsAnchorEl] = useState(null);
|
|
13
15
|
const paginationOptionsOpen = Boolean(paginationOptionsAnchorEl);
|
|
14
16
|
const handlePageSizeClick = (e) => {
|
|
15
17
|
setPaginationOptionsAnchorEl(e.currentTarget);
|
|
16
18
|
};
|
|
17
19
|
const onPageSizeChange = (val) => {
|
|
18
|
-
var _a
|
|
20
|
+
var _a;
|
|
19
21
|
setLocalPageSize(val);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
try {
|
|
23
|
+
const api = (_a = actualRef == null ? void 0 : actualRef.current) == null ? void 0 : _a.api;
|
|
24
|
+
if (typeof (api == null ? void 0 : api.setGridOption) === "function") {
|
|
25
|
+
api.setGridOption("paginationPageSize", val);
|
|
26
|
+
} else if (typeof (api == null ? void 0 : api.paginationSetPageSize) === "function") {
|
|
27
|
+
api.paginationSetPageSize(val);
|
|
28
|
+
}
|
|
29
|
+
} finally {
|
|
30
|
+
setPaginationOptionsAnchorEl(null);
|
|
31
|
+
}
|
|
22
32
|
};
|
|
23
33
|
return /* @__PURE__ */ jsxs("div", { className: "pagination-container", children: [
|
|
24
34
|
/* @__PURE__ */ jsx("div", { className: "select-button-container", children: /* @__PURE__ */ jsx(
|
|
@@ -28,10 +38,10 @@ function TablePagination({
|
|
|
28
38
|
"data-type": "pagination-btn",
|
|
29
39
|
icon: /* @__PURE__ */ jsx(default_1, {}),
|
|
30
40
|
iconPlacement: "right",
|
|
31
|
-
label:
|
|
41
|
+
label: t("table.pagination.perPage", { count: localPageSize }),
|
|
32
42
|
variant: "secondary",
|
|
33
43
|
onClick: handlePageSizeClick,
|
|
34
|
-
children: /* @__PURE__ */ jsx("span", { className: "ia-pageSize", children:
|
|
44
|
+
children: /* @__PURE__ */ jsx("span", { className: "ia-pageSize", children: t("table.pagination.perPage", { count: localPageSize }) })
|
|
35
45
|
}
|
|
36
46
|
) }),
|
|
37
47
|
/* @__PURE__ */ jsx(
|
|
@@ -44,7 +54,7 @@ function TablePagination({
|
|
|
44
54
|
},
|
|
45
55
|
open: paginationOptionsOpen,
|
|
46
56
|
options: paginationPageSizeSelector.map((opt) => ({
|
|
47
|
-
label:
|
|
57
|
+
label: t("table.pagination.perPage", { count: opt }),
|
|
48
58
|
onClick: () => {
|
|
49
59
|
onPageSizeChange(opt);
|
|
50
60
|
},
|
|
@@ -34,7 +34,7 @@ export default function TableSettings({ showMenu, Columns, actualRef, tableFontS
|
|
|
34
34
|
onTableSettingClick: any;
|
|
35
35
|
deleteViewPromptText: any;
|
|
36
36
|
isViewNameUniqueAcrossTypes: any;
|
|
37
|
-
tableSettingsTitle
|
|
37
|
+
tableSettingsTitle: any;
|
|
38
38
|
registerTableSettingToggle: any;
|
|
39
39
|
numericFormatDefault: any;
|
|
40
40
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableSettings.d.ts","sourceRoot":"","sources":["../../../src/components/Table/tableSettings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tableSettings.d.ts","sourceRoot":"","sources":["../../../src/components/Table/tableSettings.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,GACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA,2CAoKA"}
|
|
@@ -5,6 +5,7 @@ import default_1$1 from "../../node_modules/@mui/icons-material/FormatColorTextO
|
|
|
5
5
|
import default_1 from "../../node_modules/@mui/icons-material/ViewColumnOutlined.js";
|
|
6
6
|
import { RadioButtonGroup } from "../RadioButtonGroup/index.js";
|
|
7
7
|
import { Tabs } from "../Tabs/index.js";
|
|
8
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
8
9
|
function TableSettings({
|
|
9
10
|
showMenu,
|
|
10
11
|
Columns,
|
|
@@ -41,10 +42,11 @@ function TableSettings({
|
|
|
41
42
|
onTableSettingClick,
|
|
42
43
|
deleteViewPromptText,
|
|
43
44
|
isViewNameUniqueAcrossTypes,
|
|
44
|
-
tableSettingsTitle
|
|
45
|
+
tableSettingsTitle,
|
|
45
46
|
registerTableSettingToggle,
|
|
46
47
|
numericFormatDefault
|
|
47
48
|
}) {
|
|
49
|
+
const { t } = useTranslation();
|
|
48
50
|
const [selectedMenuTab, setSelectedMenuTab] = useState("Columns");
|
|
49
51
|
const [numericFormat, setNumericFormat] = useState(numericFormatDefault || "full_no");
|
|
50
52
|
const onFontSizeChange = (val) => {
|
|
@@ -96,17 +98,17 @@ function TableSettings({
|
|
|
96
98
|
].filter(Boolean);
|
|
97
99
|
const tabNames = [
|
|
98
100
|
{
|
|
99
|
-
label: selectedMenuTab === "Columns" ? "
|
|
101
|
+
label: selectedMenuTab === "Columns" ? t("table.settings.columns") : "",
|
|
100
102
|
value: "Columns",
|
|
101
103
|
icon: /* @__PURE__ */ jsx(default_1, { fontSize: "small" })
|
|
102
104
|
},
|
|
103
105
|
!hideTableFormat && {
|
|
104
|
-
label: selectedMenuTab === "Format" ? "
|
|
106
|
+
label: selectedMenuTab === "Format" ? t("table.settings.format") : "",
|
|
105
107
|
value: "Format",
|
|
106
108
|
icon: /* @__PURE__ */ jsx(default_1$1, { fontSize: "small" })
|
|
107
109
|
},
|
|
108
110
|
!hideTableActions && {
|
|
109
|
-
label: selectedMenuTab === "Actions" ? "
|
|
111
|
+
label: selectedMenuTab === "Actions" ? t("table.settings.actions") : "",
|
|
110
112
|
value: "Actions",
|
|
111
113
|
icon: /* @__PURE__ */ jsx(default_1$2, {})
|
|
112
114
|
},
|
|
@@ -165,7 +167,7 @@ function TableSettings({
|
|
|
165
167
|
className: `table-setting-main-container ${showTableSetting ? "display-table-setting" : ""} ${showFilterStrip ? "filters-strip-visible" : ""}`,
|
|
166
168
|
children: [
|
|
167
169
|
/* @__PURE__ */ jsxs("div", { className: "table-setting-header", children: [
|
|
168
|
-
/* @__PURE__ */ jsx("h2", { children: tableSettingsTitle }),
|
|
170
|
+
/* @__PURE__ */ jsx("h2", { children: tableSettingsTitle || t("table.settings.title") }),
|
|
169
171
|
/* @__PURE__ */ jsx(
|
|
170
172
|
"span",
|
|
171
173
|
{
|
|
@@ -209,23 +211,24 @@ const TableFormat = ({
|
|
|
209
211
|
hideNumericFormat,
|
|
210
212
|
hideFontSize
|
|
211
213
|
}) => {
|
|
214
|
+
const { t } = useTranslation();
|
|
212
215
|
return /* @__PURE__ */ jsxs("div", { className: "table-setting-format-settings", children: [
|
|
213
216
|
!hideFontSize && /* @__PURE__ */ jsxs("div", { className: "table-setting-font-size-setting-container", children: [
|
|
214
|
-
/* @__PURE__ */ jsx("h3", { className: "custom-menu-sub-header", children: "
|
|
217
|
+
/* @__PURE__ */ jsx("h3", { className: "custom-menu-sub-header", children: t("table.settings.fontSize") }),
|
|
215
218
|
/* @__PURE__ */ jsx(
|
|
216
219
|
RadioButtonGroup,
|
|
217
220
|
{
|
|
218
221
|
options: [
|
|
219
222
|
{
|
|
220
|
-
label: "
|
|
223
|
+
label: t("table.more.small"),
|
|
221
224
|
value: "small"
|
|
222
225
|
},
|
|
223
226
|
{
|
|
224
|
-
label: "
|
|
227
|
+
label: t("table.settings.mediumDefault"),
|
|
225
228
|
value: "medium"
|
|
226
229
|
},
|
|
227
230
|
{
|
|
228
|
-
label: "
|
|
231
|
+
label: t("table.more.large"),
|
|
229
232
|
value: "large"
|
|
230
233
|
}
|
|
231
234
|
],
|
|
@@ -238,25 +241,25 @@ const TableFormat = ({
|
|
|
238
241
|
)
|
|
239
242
|
] }),
|
|
240
243
|
!hideNumericFormat && /* @__PURE__ */ jsxs("div", { className: "table-setting-number-format-setting-container", children: [
|
|
241
|
-
/* @__PURE__ */ jsx("h3", { className: "custom-menu-sub-header", children: "
|
|
244
|
+
/* @__PURE__ */ jsx("h3", { className: "custom-menu-sub-header", children: t("table.menu.numericValues") }),
|
|
242
245
|
/* @__PURE__ */ jsx(
|
|
243
246
|
RadioButtonGroup,
|
|
244
247
|
{
|
|
245
248
|
options: [
|
|
246
249
|
{
|
|
247
|
-
label: "
|
|
250
|
+
label: t("table.menu.fullNumber"),
|
|
248
251
|
value: "full_no"
|
|
249
252
|
},
|
|
250
253
|
{
|
|
251
|
-
label: "
|
|
254
|
+
label: t("table.settings.inKThousands"),
|
|
252
255
|
value: "thou"
|
|
253
256
|
},
|
|
254
257
|
{
|
|
255
|
-
label: "
|
|
258
|
+
label: t("table.settings.inMMillions"),
|
|
256
259
|
value: "mil"
|
|
257
260
|
},
|
|
258
261
|
{
|
|
259
|
-
label: "
|
|
262
|
+
label: t("table.settings.inBBillions"),
|
|
260
263
|
value: "bil"
|
|
261
264
|
}
|
|
262
265
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withCommentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Table/withCommentIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withCommentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Table/withCommentIcon.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,GAAI,aAAQ,MAC9B,UAAK,4CAuGd,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
import { CommentIndicator as CommentIndicator_default } from "../../node_modules/@impactsmartsuite/impact-icons/dist/index.js";
|
|
4
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
4
5
|
const withCommentIcon = (Renderer) => {
|
|
5
6
|
return (props) => {
|
|
6
7
|
var _a, _b;
|
|
8
|
+
const { t } = useTranslation();
|
|
7
9
|
const iconRef = useRef(null);
|
|
8
10
|
const {
|
|
9
11
|
handleCommentIconHover,
|
|
@@ -65,7 +67,9 @@ const withCommentIcon = (Renderer) => {
|
|
|
65
67
|
cursor: "pointer",
|
|
66
68
|
zIndex: 2
|
|
67
69
|
},
|
|
68
|
-
title:
|
|
70
|
+
title: commentsArray.length > 1 ? t("table.comments.countPlural", {
|
|
71
|
+
count: commentsArray.length
|
|
72
|
+
}) : t("table.comments.count", { count: commentsArray.length }),
|
|
69
73
|
onMouseLeave: handleMouseLeave,
|
|
70
74
|
onMouseOver: () => {
|
|
71
75
|
handleMouseEnter();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableChatSidePanel.d.ts","sourceRoot":"","sources":["../../../src/components/TableChat/TableChatSidePanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableChatSidePanel.d.ts","sourceRoot":"","sources":["../../../src/components/TableChat/TableChatSidePanel.tsx"],"names":[],"mappings":"AAaA,OAAO,kCAAkC,CAAC;AAU1C,QAAA,MAAM,kBAAkB,GAAI;;;;CAA0C,4CAmvBrE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -12,8 +12,10 @@ import TableChatRightSection from "./components/TableChatRightSection/TableChatR
|
|
|
12
12
|
import { EmptyContainer } from "./EmptyContainer.js";
|
|
13
13
|
import { formatChatHeaderTimestamp } from "./utils/formatChatTimestamp.js";
|
|
14
14
|
|
|
15
|
+
import { useTranslation } from "../../i18n/useTranslation.js";
|
|
15
16
|
const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
16
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
18
|
+
const { t } = useTranslation();
|
|
17
19
|
const [selectedChannelId, setSelectedChannelId] = useState(null);
|
|
18
20
|
const [selectedChannelInfo, setSelectedChannelInfo] = useState(null);
|
|
19
21
|
const [selectedChatId, setSelectedChatId] = useState(null);
|
|
@@ -182,7 +184,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
182
184
|
}
|
|
183
185
|
} catch (err) {
|
|
184
186
|
console.error("[TableChatSidePanel] [handleChatClick] [error]:", err);
|
|
185
|
-
handleToast(true, "
|
|
187
|
+
handleToast(true, t("tableChat.sidePanel.errorLoadingChat"), "error");
|
|
186
188
|
} finally {
|
|
187
189
|
setLoadingMessages(false);
|
|
188
190
|
}
|
|
@@ -200,7 +202,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
200
202
|
return chatList2;
|
|
201
203
|
} catch (err) {
|
|
202
204
|
console.error("[TableChatSidePanel] [fetchChatList] [error]:", err);
|
|
203
|
-
handleToast(true, "
|
|
205
|
+
handleToast(true, t("tableChat.sidePanel.errorLoadingChats"), "error");
|
|
204
206
|
} finally {
|
|
205
207
|
setLoadingChannelsOrChats(false);
|
|
206
208
|
}
|
|
@@ -220,7 +222,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
220
222
|
const newChat = response.formattedChat;
|
|
221
223
|
const newChannelInfo = {
|
|
222
224
|
id: (_d2 = (_c2 = newChat == null ? void 0 : newChat.otherProps) == null ? void 0 : _c2.object_ids) == null ? void 0 : _d2[0],
|
|
223
|
-
title: "
|
|
225
|
+
title: t("tableChat.sidePanel.chatList"),
|
|
224
226
|
objectType: (_e2 = newChat == null ? void 0 : newChat.otherProps) == null ? void 0 : _e2.object_type
|
|
225
227
|
};
|
|
226
228
|
await fetchChatList(newChannelInfo);
|
|
@@ -246,7 +248,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
246
248
|
setOriginalChanelList(channelList);
|
|
247
249
|
} catch (error) {
|
|
248
250
|
console.error("[TableChatSidePanel] [fetchChannelList] [error]:", error);
|
|
249
|
-
handleToast(true, "
|
|
251
|
+
handleToast(true, t("tableChat.sidePanel.errorLoadingChannels"), "error");
|
|
250
252
|
} finally {
|
|
251
253
|
setLoadingChannelsOrChats(false);
|
|
252
254
|
}
|
|
@@ -262,7 +264,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
262
264
|
setOriginalChatList(directChatList);
|
|
263
265
|
const channelInfo = {
|
|
264
266
|
id: (_f2 = (_e2 = (_d2 = directChatList == null ? void 0 : directChatList[0]) == null ? void 0 : _d2.otherProps) == null ? void 0 : _e2.object_ids) == null ? void 0 : _f2[0],
|
|
265
|
-
title: "
|
|
267
|
+
title: t("tableChat.sidePanel.chatList"),
|
|
266
268
|
objectType: (_h2 = (_g2 = directChatList == null ? void 0 : directChatList[0]) == null ? void 0 : _g2.otherProps) == null ? void 0 : _h2.object_type
|
|
267
269
|
// or get from configuration
|
|
268
270
|
};
|
|
@@ -289,7 +291,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
289
291
|
}
|
|
290
292
|
} catch (error) {
|
|
291
293
|
console.error("[TableChatSidePanel] [fetchChannels] [error]:", error);
|
|
292
|
-
handleToast(true, "
|
|
294
|
+
handleToast(true, t("tableChat.sidePanel.errorLoadingChannelsList"), "error");
|
|
293
295
|
} finally {
|
|
294
296
|
setLoadingChannelsOrChats(false);
|
|
295
297
|
}
|
|
@@ -407,7 +409,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
407
409
|
);
|
|
408
410
|
const handleDeletePromptOpen = () => {
|
|
409
411
|
if (!selectedChat || selectedChat.length === 0) {
|
|
410
|
-
handleToast(true, "
|
|
412
|
+
handleToast(true, t("tableChat.sidePanel.noChatsSelected"), "error");
|
|
411
413
|
return;
|
|
412
414
|
}
|
|
413
415
|
setShowDeletePrompt(true);
|
|
@@ -415,7 +417,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
415
417
|
const handleDeleteChat = async () => {
|
|
416
418
|
var _a2, _b2, _c2;
|
|
417
419
|
if (!selectedChat || selectedChat.length === 0) {
|
|
418
|
-
handleToast(true, "
|
|
420
|
+
handleToast(true, t("tableChat.sidePanel.noChatsSelected"), "error");
|
|
419
421
|
return;
|
|
420
422
|
}
|
|
421
423
|
try {
|
|
@@ -455,7 +457,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
455
457
|
}
|
|
456
458
|
} catch (error) {
|
|
457
459
|
console.error("[TableChatSidePanel] [handleDeleteChat] [error]:", error);
|
|
458
|
-
handleToast(true, "
|
|
460
|
+
handleToast(true, t("tableChat.sidePanel.errorDeletingTopics"), "error");
|
|
459
461
|
} finally {
|
|
460
462
|
setIsDeleting(false);
|
|
461
463
|
setLoadingChannelsOrChats(false);
|
|
@@ -495,7 +497,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
495
497
|
showAddChatBtn: (_u = (_t = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _t.leftHeaderPanel) == null ? void 0 : _u.showAddChat,
|
|
496
498
|
showChannelList: isChannelsScreen,
|
|
497
499
|
showCheckbox: (_w = (_v = chatConfiguration == null ? void 0 : chatConfiguration.leftPanel) == null ? void 0 : _v.leftChatPanel) == null ? void 0 : _w.showCheckbox,
|
|
498
|
-
title: isChannelsScreen ? "
|
|
500
|
+
title: isChannelsScreen ? t("tableChat.sidePanel.channelsList") : selectedChannelInfo == null ? void 0 : selectedChannelInfo.title,
|
|
499
501
|
onBack: handleBackToChannels,
|
|
500
502
|
onChannelSelect: (id, selectedChannelOrChat) => {
|
|
501
503
|
if (isChannelsScreen) {
|
|
@@ -511,7 +513,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
511
513
|
onSearchClick: openSearch
|
|
512
514
|
}
|
|
513
515
|
),
|
|
514
|
-
loadingMessages ? /* @__PURE__ */ jsx(ChatSkeleton, { text: "
|
|
516
|
+
loadingMessages ? /* @__PURE__ */ jsx(ChatSkeleton, { text: t("tableChat.loadingMessages") }) : /* @__PURE__ */ jsx(Fragment, { children: !selectedChannelId || !selectedChatId ? /* @__PURE__ */ jsx(
|
|
515
517
|
EmptyContainer,
|
|
516
518
|
{
|
|
517
519
|
subTitle: !selectedChannelId ? (_y = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _y.emptyChannelStateSubTitle : !selectedChatId ? (_z = chatConfiguration == null ? void 0 : chatConfiguration.messageChatConfig) == null ? void 0 : _z.emptyChatStateSubTitle : "",
|
|
@@ -569,7 +571,7 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
569
571
|
] })
|
|
570
572
|
}
|
|
571
573
|
),
|
|
572
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ jsx(
|
|
573
575
|
Prompt,
|
|
574
576
|
{
|
|
575
577
|
handleClose: () => {
|
|
@@ -578,13 +580,13 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
578
580
|
}
|
|
579
581
|
},
|
|
580
582
|
isOpen: showDeletePrompt || isDeleting,
|
|
581
|
-
primaryButtonLabel: isDeleting ? "
|
|
583
|
+
primaryButtonLabel: isDeleting ? t("commentsPanel.deleting") : t("commentsPanel.delete"),
|
|
582
584
|
primaryButtonProps: {
|
|
583
585
|
disabled: isDeleting,
|
|
584
586
|
loading: isDeleting
|
|
585
587
|
},
|
|
586
|
-
secondaryButtonLabel: "
|
|
587
|
-
title: "
|
|
588
|
+
secondaryButtonLabel: t("common.cancel"),
|
|
589
|
+
title: t("tableChat.sidePanel.deleteChatsTitle"),
|
|
588
590
|
variant: "error",
|
|
589
591
|
onPrimaryButtonClick: () => {
|
|
590
592
|
if (!isDeleting) {
|
|
@@ -596,13 +598,11 @@ const TableChatSidePanel = ({ isOpen, handleClose, chatConfiguration }) => {
|
|
|
596
598
|
setShowDeletePrompt(false);
|
|
597
599
|
}
|
|
598
600
|
},
|
|
599
|
-
children:
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
"? This action cannot be undone."
|
|
605
|
-
]
|
|
601
|
+
children: selectedChat.length > 1 ? t("tableChat.deleteChats.confirmMany", {
|
|
602
|
+
count: selectedChat.length
|
|
603
|
+
}) : t("tableChat.deleteChats.confirmOne", {
|
|
604
|
+
count: selectedChat.length
|
|
605
|
+
})
|
|
606
606
|
}
|
|
607
607
|
),
|
|
608
608
|
/* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonList.d.ts","sourceRoot":"","sources":["../../../../src/components/TableChat/components/SkeletonList.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,GAAI;;;
|
|
1
|
+
{"version":3,"file":"SkeletonList.d.ts","sourceRoot":"","sources":["../../../../src/components/TableChat/components/SkeletonList.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,GAAI;;;CAAmB,4CAY/C,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Loader } from "../../Loader/index.js";
|
|
3
|
-
|
|
3
|
+
import { useTranslation } from "../../../i18n/useTranslation.js";
|
|
4
|
+
const SkeletonList = ({ count = 5, text }) => {
|
|
5
|
+
const { t } = useTranslation();
|
|
6
|
+
const resolvedText = text ?? t("common.loading");
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: "table-chat-right-section-container-empty loader-padding", children: [...Array(count)].map((_, i) => /* @__PURE__ */ jsx("div", { style: { marginBottom: 20 }, children: /* @__PURE__ */ jsx(Loader, { showSkeleton: true, progress: "100%", size: "large", text: resolvedText }) }, i)) });
|
|
8
|
+
};
|
|
4
9
|
export {
|
|
5
10
|
SkeletonList
|
|
6
11
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
declare const AddChat: ({ setShowAddChat, handleChatName, selectedChannelInfo, handleToast, setIsCreateNewChatOpen, }: {
|
|
2
|
+
declare const AddChat: ({ setShowAddChat, handleChatName, selectedChannelInfo, handleToast, setIsCreateNewChatOpen, inputPanelConfig, }: {
|
|
3
3
|
setShowAddChat: any;
|
|
4
4
|
handleChatName: any;
|
|
5
5
|
selectedChannelInfo: any;
|
|
6
6
|
handleToast: any;
|
|
7
7
|
setIsCreateNewChatOpen: any;
|
|
8
|
+
inputPanelConfig: any;
|
|
8
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default AddChat;
|
|
10
11
|
//# sourceMappingURL=AddChatContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddChatContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddChatContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,gCAAgC,CAAC;AAExC,QAAA,MAAM,OAAO,GAAI;;;;;;;CAOhB,4CA0JA,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -6,32 +6,40 @@ import { Button } from "../../../../Button/index.js";
|
|
|
6
6
|
import { Input } from "../../../../Input/index.js";
|
|
7
7
|
import { TextArea } from "../../../../TextArea/index.js";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
chatName: {
|
|
11
|
-
required: "Chat name is required",
|
|
12
|
-
minLength: {
|
|
13
|
-
value: 2,
|
|
14
|
-
message: "Chat name must be at least 2 characters long"
|
|
15
|
-
},
|
|
16
|
-
maxLength: {
|
|
17
|
-
value: 50,
|
|
18
|
-
message: "Chat name cannot exceed 50 characters"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
chatDescription: {
|
|
22
|
-
maxLength: {
|
|
23
|
-
value: 100,
|
|
24
|
-
message: "Description cannot exceed 100 characters"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
};
|
|
9
|
+
import { useTranslation } from "../../../../../i18n/useTranslation.js";
|
|
28
10
|
const AddChat = ({
|
|
29
11
|
setShowAddChat,
|
|
30
12
|
handleChatName,
|
|
31
13
|
selectedChannelInfo,
|
|
32
14
|
handleToast,
|
|
33
|
-
setIsCreateNewChatOpen
|
|
15
|
+
setIsCreateNewChatOpen,
|
|
16
|
+
inputPanelConfig
|
|
34
17
|
}) => {
|
|
18
|
+
const { t } = useTranslation();
|
|
19
|
+
const validationRules = {
|
|
20
|
+
chatName: {
|
|
21
|
+
required: t("tableChat.addChat.nameRequired"),
|
|
22
|
+
minLength: {
|
|
23
|
+
value: 2,
|
|
24
|
+
message: t("tableChat.addChat.nameMinLength")
|
|
25
|
+
},
|
|
26
|
+
maxLength: {
|
|
27
|
+
value: 50,
|
|
28
|
+
message: t("tableChat.addChat.nameMaxLength")
|
|
29
|
+
}
|
|
30
|
+
// pattern: {
|
|
31
|
+
// value: /^[a-zA-Z0-9\s\-_]+$/,
|
|
32
|
+
// message:
|
|
33
|
+
// "Chat name can only contain letters, numbers, spaces, hyphens, and underscores",
|
|
34
|
+
// },
|
|
35
|
+
},
|
|
36
|
+
chatDescription: {
|
|
37
|
+
maxLength: {
|
|
38
|
+
value: 100,
|
|
39
|
+
message: t("tableChat.addChat.descriptionMaxLength")
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
35
43
|
const containerRef = useRef(null);
|
|
36
44
|
const {
|
|
37
45
|
control,
|
|
@@ -65,14 +73,14 @@ const AddChat = ({
|
|
|
65
73
|
try {
|
|
66
74
|
const response = await handleChatName(data, selectedChannelInfo);
|
|
67
75
|
if ((response == null ? void 0 : response.success) === false) {
|
|
68
|
-
handleToast(true, "
|
|
76
|
+
handleToast(true, t("tableChat.addChat.saveError"), "error");
|
|
69
77
|
return;
|
|
70
78
|
}
|
|
71
|
-
handleToast(true, "
|
|
79
|
+
handleToast(true, t("tableChat.addChat.savedSuccess"), "success");
|
|
72
80
|
handleCancel();
|
|
73
81
|
} catch (err) {
|
|
74
82
|
console.error("Error while saving chat:", err);
|
|
75
|
-
handleToast(true, "
|
|
83
|
+
handleToast(true, t("tableChat.addChat.saveError"), "error");
|
|
76
84
|
}
|
|
77
85
|
};
|
|
78
86
|
return /* @__PURE__ */ jsx("div", { ref: containerRef, className: "addChat_container", children: /* @__PURE__ */ jsxs("form", { noValidate: true, className: "chatcontainer", onSubmit: handleSubmit(onSubmit), children: [
|
|
@@ -90,9 +98,9 @@ const AddChat = ({
|
|
|
90
98
|
isDisabled: isSubmitting,
|
|
91
99
|
isError: !!errors.chatName,
|
|
92
100
|
isHelperText: !!errors.chatName,
|
|
93
|
-
label: "
|
|
101
|
+
label: t("tableChat.addChat.nameLabel"),
|
|
94
102
|
name: field.name,
|
|
95
|
-
placeholder:
|
|
103
|
+
placeholder: (inputPanelConfig == null ? void 0 : inputPanelConfig.inputPlaceholder) || t("tableChat.addChat.namePlaceholder"),
|
|
96
104
|
type: "text",
|
|
97
105
|
value: field.value,
|
|
98
106
|
onBlur: field.onBlur,
|
|
@@ -117,10 +125,10 @@ const AddChat = ({
|
|
|
117
125
|
height: "80px",
|
|
118
126
|
isDisabled: isSubmitting,
|
|
119
127
|
isError: !!errors.chatDescription,
|
|
120
|
-
label: "
|
|
128
|
+
label: t("tableChat.addChat.descriptionLabel"),
|
|
121
129
|
maxRows: 2,
|
|
122
130
|
name: field.name,
|
|
123
|
-
placeholder:
|
|
131
|
+
placeholder: (inputPanelConfig == null ? void 0 : inputPanelConfig.textAreaPlaceholder) || t("tableChat.addChat.descriptionPlaceholder"),
|
|
124
132
|
secondaryLabel: (_a = errors.chatDescription) == null ? void 0 : _a.message,
|
|
125
133
|
value: field.value || "",
|
|
126
134
|
width: "100%",
|
|
@@ -141,7 +149,7 @@ const AddChat = ({
|
|
|
141
149
|
size: "large",
|
|
142
150
|
variant: "tertiary",
|
|
143
151
|
onClick: handleCancel,
|
|
144
|
-
children: "
|
|
152
|
+
children: t("common.cancel")
|
|
145
153
|
}
|
|
146
154
|
),
|
|
147
155
|
/* @__PURE__ */ jsx(
|
|
@@ -152,7 +160,7 @@ const AddChat = ({
|
|
|
152
160
|
htmlType: "submit",
|
|
153
161
|
size: "large",
|
|
154
162
|
variant: "primary",
|
|
155
|
-
children: isSubmitting ? /* @__PURE__ */ jsx(Fragment, { children: "
|
|
163
|
+
children: isSubmitting ? /* @__PURE__ */ jsx(Fragment, { children: t("table.views.saving") }) : t("common.save")
|
|
156
164
|
}
|
|
157
165
|
)
|
|
158
166
|
] })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, unreadCount, avatar, isSelected, isMuted, onClick, showChannelList, showCheckbox, handleChatSelect, selectedChat, onPinnedChatClick, handleToast, ...rest }: {
|
|
1
|
+
export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, unreadCount, avatar, isSelected, isMuted, onClick, showChannelList, showCheckbox, handleChatSelect, selectedChat, onPinnedChatClick, onPinnedChange, handleToast, isPinned: isPinnedProp, ...rest }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
id: any;
|
|
4
4
|
title: any;
|
|
@@ -16,6 +16,8 @@ export declare const ChatChannelItem: ({ id, title, subtitle, timestamp, unreadC
|
|
|
16
16
|
} | undefined;
|
|
17
17
|
selectedChat: any;
|
|
18
18
|
onPinnedChatClick: any;
|
|
19
|
+
onPinnedChange: any;
|
|
19
20
|
handleToast: any;
|
|
21
|
+
isPinned: any;
|
|
20
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
//# sourceMappingURL=ChatChannelItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatChannelItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,GAAI
|
|
1
|
+
{"version":3,"file":"ChatChannelItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,GAAI;;;;;;;;;;;;;;;;;;;;;CAmB/B,4CAsFA,CAAC"}
|