awing-library 2.1.13-beta → 2.1.13
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/README.md +4 -19
- package/lib/ACM-AXN/Campaign/Container.js +6 -7
- package/lib/ACM-AXN/Campaign/Container.test.js +1 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/Recoils.d.ts +3 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/Recoils.js +22 -21
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabInfomation.d.ts +1 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabInfomation.js +79 -24
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AdDetail.test.js +1 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AdList.js +50 -6
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AdRow.d.ts +5 -0
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AdRow.js +6 -18
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AddOrEditRule/AddOrEditRule.js +7 -12
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AddOrEditRule/RuleForm/RetargetMacAddress/container.d.ts +1 -0
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AddOrEditRule/RuleForm/RetargetMacAddress/container.js +4 -12
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/Advanced.js +16 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/SubCampaignList.test.js +1 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/index.js +19 -3
- package/lib/ACM-AXN/Campaign/Types.d.ts +10 -0
- package/lib/ACM-AXN/Campaign/Utils.d.ts +8 -0
- package/lib/ACM-AXN/Campaign/Utils.js +22 -18
- package/lib/ACM-AXN/Campaign/index.js +3 -2
- package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/Filter.d.ts +2 -2
- package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/Filter.js +44 -42
- package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/GroupPanel.d.ts +1 -1
- package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/GroupPanel.js +38 -30
- package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/index.d.ts +2 -2
- package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/index.js +2 -2
- package/lib/ACM-AXN/CampaignSchedule/Components/EnhancedPagination/index.d.ts +1 -1
- package/lib/ACM-AXN/CampaignSchedule/Components/EnhancedPagination/index.js +4 -2
- package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/component.js +33 -3
- package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.d.ts +1 -1
- package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.js +81 -34
- package/lib/ACM-AXN/CampaignSchedule/Components/TableHeaderDragable.d.ts +1 -1
- package/lib/ACM-AXN/CampaignSchedule/Components/TableHeaderDragable.js +38 -29
- package/lib/ACM-AXN/CampaignSchedule/DataConfigAXN.d.ts +4 -0
- package/lib/ACM-AXN/CampaignSchedule/DataConfigAXN.js +58 -0
- package/lib/ACM-AXN/CampaignSchedule/Enum.d.ts +14 -2
- package/lib/ACM-AXN/CampaignSchedule/Enum.js +12 -0
- package/lib/ACM-AXN/CampaignSchedule/component.js +6 -5
- package/lib/ACM-AXN/CampaignSchedule/container.d.ts +1 -1
- package/lib/ACM-AXN/CampaignSchedule/container.js +100 -99
- package/lib/ACM-AXN/CampaignSchedule/interface.d.ts +16 -3
- package/lib/ACM-AXN/Directory/MenuDirectory/index.js +7 -21
- package/lib/ACM-AXN/Directory/SystemDirectory/index.js +6 -5
- package/lib/ACM-AXN/Directory/components/Permission/Management.js +7 -5
- package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.js +9 -7
- package/lib/ACM-AXN/Directory/function.d.ts +1 -0
- package/lib/ACM-AXN/Directory/function.js +15 -1
- package/lib/ACM-AXN/DomainPreview/PreviewButton.d.ts +15 -0
- package/lib/ACM-AXN/DomainPreview/PreviewButton.js +188 -0
- package/lib/ACM-AXN/DomainPreview/index.d.ts +7 -0
- package/lib/ACM-AXN/DomainPreview/index.js +10 -0
- package/lib/ACM-AXN/GroupUser/Constants.d.ts +7 -0
- package/lib/ACM-AXN/GroupUser/Constants.js +10 -0
- package/lib/ACM-AXN/GroupUser/Container.d.ts +2 -0
- package/lib/ACM-AXN/GroupUser/Container.js +55 -0
- package/lib/ACM-AXN/GroupUser/Container.test.d.ts +1 -0
- package/lib/ACM-AXN/GroupUser/Container.test.js +210 -0
- package/lib/ACM-AXN/GroupUser/CreateOrEdit.d.ts +3 -0
- package/lib/ACM-AXN/GroupUser/CreateOrEdit.js +91 -0
- package/lib/ACM-AXN/GroupUser/CreateOrEdit.test.d.ts +1 -0
- package/lib/ACM-AXN/GroupUser/CreateOrEdit.test.js +235 -0
- package/lib/ACM-AXN/GroupUser/Hooks.d.ts +5 -0
- package/lib/ACM-AXN/GroupUser/Hooks.js +13 -0
- package/lib/ACM-AXN/GroupUser/Types.d.ts +31 -0
- package/lib/ACM-AXN/GroupUser/Types.js +2 -0
- package/lib/ACM-AXN/GroupUser/User/SearchUser.d.ts +9 -0
- package/lib/ACM-AXN/GroupUser/User/SearchUser.js +63 -0
- package/lib/ACM-AXN/GroupUser/User/SearchUser.test.d.ts +1 -0
- package/lib/ACM-AXN/GroupUser/User/SearchUser.test.js +140 -0
- package/lib/ACM-AXN/GroupUser/User/UserComponent.d.ts +8 -0
- package/lib/ACM-AXN/GroupUser/User/UserComponent.js +77 -0
- package/lib/ACM-AXN/GroupUser/User/UserComponent.test.d.ts +1 -0
- package/lib/ACM-AXN/GroupUser/User/UserComponent.test.js +128 -0
- package/lib/ACM-AXN/GroupUser/index.d.ts +4 -0
- package/lib/ACM-AXN/GroupUser/index.js +27 -0
- package/lib/ACM-AXN/Notifications/Constant.d.ts +146 -0
- package/lib/ACM-AXN/Notifications/Constant.js +136 -0
- package/lib/ACM-AXN/Notifications/Context.d.ts +8 -0
- package/lib/ACM-AXN/Notifications/Context.js +10 -0
- package/lib/ACM-AXN/Notifications/Hooks.d.ts +7 -0
- package/lib/ACM-AXN/Notifications/Hooks.js +17 -0
- package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/ButtonTabs.d.ts +3 -3
- package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/ButtonTabs.js +31 -30
- package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.d.ts +1 -1
- package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.js +30 -39
- package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.d.ts +3 -5
- package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.js +18 -17
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.d.ts +1 -1
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.js +15 -15
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.d.ts +0 -6
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.js +29 -28
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.d.ts +10 -0
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.js +393 -0
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.d.ts +1 -1
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.js +3 -3
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.test.d.ts +0 -6
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.test.js +38 -48
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.d.ts +2 -2
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.js +36 -35
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.test.d.ts +0 -6
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.test.js +65 -73
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.d.ts +4 -11
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.js +46 -36
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.test.d.ts +0 -6
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.test.js +56 -50
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationLoading.js +30 -30
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.d.ts +3 -15
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.js +35 -4
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.test.d.ts +0 -6
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.test.js +88 -83
- package/lib/ACM-AXN/Notifications/NotificationDetail/index.d.ts +5 -2
- package/lib/ACM-AXN/Notifications/NotificationDetail/index.js +115 -101
- package/lib/ACM-AXN/Notifications/{NotificationPopover.d.ts → NotificationPopover/Container.d.ts} +2 -2
- package/lib/ACM-AXN/Notifications/NotificationPopover/Container.js +149 -0
- package/lib/ACM-AXN/Notifications/{NotificationPopover.test.d.ts → NotificationPopover/Container.test.d.ts} +1 -1
- package/lib/ACM-AXN/Notifications/{NotificationPopover.test.js → NotificationPopover/Container.test.js} +5 -5
- package/lib/ACM-AXN/Notifications/NotificationPopover/index.d.ts +8 -0
- package/lib/ACM-AXN/Notifications/NotificationPopover/index.js +13 -0
- package/lib/ACM-AXN/Notifications/NotificationScreen.d.ts +1 -1
- package/lib/ACM-AXN/Notifications/NotificationScreen.js +4 -4
- package/lib/ACM-AXN/Notifications/Types.d.ts +242 -0
- package/lib/ACM-AXN/Notifications/Types.js +290 -0
- package/lib/ACM-AXN/Notifications/index.d.ts +2 -2
- package/lib/ACM-AXN/Notifications/index.js +5 -5
- package/lib/ACM-AXN/Page/Container.js +101 -63
- package/lib/ACM-AXN/Page/CreateOrEdit/DrawerAction.js +22 -5
- package/lib/ACM-AXN/Page/CreateOrEdit/Recoil.d.ts +1 -0
- package/lib/ACM-AXN/Page/CreateOrEdit/Recoil.js +5 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewContent.js +1 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewInfo.js +11 -4
- package/lib/ACM-AXN/Page/CreateOrEdit/Utils.js +1 -1
- package/lib/ACM-AXN/Page/Types.d.ts +9 -0
- package/lib/ACM-AXN/Page/index.js +2 -1
- package/lib/ACM-AXN/Permission/Components/Management.test.js +1 -1
- package/lib/ACM-AXN/PlaceGroup/Context.d.ts +1 -1
- package/lib/ACM-AXN/Statistics/ControlPanel.js +49 -47
- package/lib/ACM-AXN/Statistics/Enums.d.ts +1 -0
- package/lib/ACM-AXN/Statistics/Enums.js +1 -0
- package/lib/ACM-AXN/Statistics/container.js +1 -1
- package/lib/ACM-AXN/StatisticsAudienceDemographic/container.d.ts +1 -1
- package/lib/ACM-AXN/StatisticsAudienceDemographic/container.js +2 -3
- package/lib/ACM-AXN/StatisticsAudienceDemographic/interfaces.d.ts +1 -0
- package/lib/ACM-AXN/StatisticsByProvince/container.d.ts +1 -1
- package/lib/ACM-AXN/StatisticsByProvince/container.js +2 -2
- package/lib/ACM-AXN/TaskScheduler/Container.js +1 -1
- package/lib/ACM-AXN/TaskScheduler/CreateOrEdit.js +1 -1
- package/lib/ACM-AXN/TaskScheduler/Utils.js +2 -0
- package/lib/ACM-AXN/User/Add.d.ts +2 -0
- package/lib/ACM-AXN/User/Add.js +64 -0
- package/lib/ACM-AXN/User/Add.test.d.ts +1 -0
- package/lib/ACM-AXN/User/Add.test.js +115 -0
- package/lib/ACM-AXN/User/Constants.d.ts +2 -0
- package/lib/ACM-AXN/User/Constants.js +5 -0
- package/lib/ACM-AXN/User/Container.d.ts +2 -0
- package/lib/ACM-AXN/User/Container.js +60 -0
- package/lib/ACM-AXN/User/Container.test.d.ts +1 -0
- package/lib/ACM-AXN/User/Container.test.js +202 -0
- package/lib/ACM-AXN/User/Hook.d.ts +5 -0
- package/lib/ACM-AXN/User/Hook.js +13 -0
- package/lib/ACM-AXN/User/Types.d.ts +45 -0
- package/lib/ACM-AXN/User/Types.js +2 -0
- package/lib/ACM-AXN/User/index.d.ts +4 -0
- package/lib/ACM-AXN/User/index.js +18 -0
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/BasicField/index.js +1 -1
- package/lib/AWING/AdvancedSearch/component.js +1 -1
- package/lib/AWING/AdvancedSearch/interface.d.ts +1 -0
- package/lib/AWING/ButtonDateRangePicker/ButtonDateRangePicker.js +2 -2
- package/lib/AWING/ButtonDateRangePicker/interface.d.ts +1 -0
- package/lib/AWING/Chart/BarLineComponent.d.ts +1 -0
- package/lib/AWING/Chart/BarLineComponent.js +39 -24
- package/lib/AWING/Chart/PieComponent.d.ts +1 -1
- package/lib/AWING/Chart/PieComponent.js +0 -1
- package/lib/AWING/Chart/Styles.d.ts +6 -2
- package/lib/AWING/Chart/Styles.js +6 -2
- package/lib/AWING/Chart/index.d.ts +3 -0
- package/lib/AWING/Chart/index.js +10 -0
- package/lib/AWING/DataForm/DataInput.js +17 -8
- package/lib/AWING/DataForm/interface.d.ts +6 -2
- package/lib/AWING/DataGrid/index.js +20 -5
- package/lib/AWING/DataGrid/interface.d.ts +6 -1
- package/lib/AWING/Directory/CreateDirectory.d.ts +3 -0
- package/lib/AWING/Directory/CreateDirectory.js +27 -10
- package/lib/AWING/PageManagement/PageManagement.js +1 -1
- package/lib/AWING/index.d.ts +1 -0
- package/lib/AWING/index.js +1 -0
- package/lib/AWING/ultis/validation.d.ts +2 -2
- package/lib/AWING/ultis/validation.js +6 -4
- package/lib/Commons/Components/ClassicBaseDrawer.d.ts +1 -0
- package/lib/Commons/Components/ClassicBaseDrawer.js +7 -3
- package/lib/Commons/Components/ClassicDrawer.js +2 -2
- package/lib/translate/en/translation.json +81 -2
- package/lib/translate/vi/translation.json +81 -2
- package/package.json +4 -2
- package/lib/ACM-AXN/Notifications/NotificationDetail/Common.d.ts +0 -39
- package/lib/ACM-AXN/Notifications/NotificationDetail/Common.js +0 -304
- package/lib/ACM-AXN/Notifications/NotificationPopover.js +0 -69
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -20,12 +11,11 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
20
11
|
**/
|
|
21
12
|
var react_1 = __importDefault(require("react"));
|
|
22
13
|
var react_i18next_1 = require("react-i18next");
|
|
23
|
-
var material_1 = require("@mui/material");
|
|
24
14
|
var MoreHorizOutlined_1 = __importDefault(require("@mui/icons-material/MoreHorizOutlined"));
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
15
|
+
var material_1 = require("@mui/material");
|
|
16
|
+
var Constant_1 = require("../../Constant");
|
|
17
|
+
var check_svg_1 = __importDefault(require("../../../../Assets/Images/check.svg"));
|
|
18
|
+
var settingScreen_svg_1 = __importDefault(require("../../../../Assets/Images/settingScreen.svg"));
|
|
29
19
|
var MenuNotification = function (props) {
|
|
30
20
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
31
21
|
var _a = props.onUpdateMenuItem, onUpdateMenuItem = _a === void 0 ? function () { return null; } : _a;
|
|
@@ -33,28 +23,29 @@ var MenuNotification = function (props) {
|
|
|
33
23
|
var menuData = function () {
|
|
34
24
|
var commonData = [
|
|
35
25
|
{
|
|
36
|
-
id:
|
|
26
|
+
id: '1',
|
|
37
27
|
icon: check_svg_1.default,
|
|
38
|
-
title: t(
|
|
39
|
-
value:
|
|
28
|
+
title: t('Notifications.SelectAll'),
|
|
29
|
+
value: Constant_1.Constants.SELECT_ALL,
|
|
40
30
|
},
|
|
41
31
|
{
|
|
42
|
-
id:
|
|
32
|
+
id: '2',
|
|
43
33
|
icon: settingScreen_svg_1.default,
|
|
44
|
-
title: t(
|
|
45
|
-
value:
|
|
34
|
+
title: t('Notifications.NotificationSettings'),
|
|
35
|
+
value: Constant_1.Constants.NOTIFICATION_SETTING_SCREEN_PATH,
|
|
46
36
|
},
|
|
47
37
|
];
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
// Comment màn hình Notifications
|
|
39
|
+
// const { href } = window.location
|
|
40
|
+
// if (!href.includes(Constants.NOTIFICATIONS_PATH)) {
|
|
41
|
+
// const dataNew = {
|
|
42
|
+
// id: '3',
|
|
43
|
+
// icon: iconNotificationSreen,
|
|
44
|
+
// title: t('Notifications.OpenNotification'),
|
|
45
|
+
// value: Constants.NOTIFICATIONS_PATH,
|
|
46
|
+
// }
|
|
47
|
+
// return [...commonData, dataNew]
|
|
48
|
+
// }
|
|
58
49
|
return commonData;
|
|
59
50
|
};
|
|
60
51
|
var handleClick = function (event) {
|
|
@@ -65,23 +56,23 @@ var MenuNotification = function (props) {
|
|
|
65
56
|
};
|
|
66
57
|
var selectMenuItem = function (event) {
|
|
67
58
|
var _a, _b;
|
|
68
|
-
var valueItem = ((_b = (_a = event === null || event === void 0 ? void 0 : event.currentTarget) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.value) ||
|
|
59
|
+
var valueItem = ((_b = (_a = event === null || event === void 0 ? void 0 : event.currentTarget) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.value) || '';
|
|
69
60
|
onUpdateMenuItem(valueItem);
|
|
70
61
|
handleClose();
|
|
71
62
|
};
|
|
72
63
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "small", "aria-label": "more", "aria-controls": "long-menu", "aria-haspopup": "true", onClick: handleClick, children: (0, jsx_runtime_1.jsx)(MoreHorizOutlined_1.default, {}) }), (0, jsx_runtime_1.jsx)(material_1.Popover, { anchorEl: anchorEl, onClose: handleClose, open: Boolean(anchorEl), anchorOrigin: {
|
|
73
|
-
vertical:
|
|
74
|
-
horizontal:
|
|
64
|
+
vertical: 'bottom',
|
|
65
|
+
horizontal: 'center',
|
|
75
66
|
}, transformOrigin: {
|
|
76
|
-
vertical:
|
|
77
|
-
horizontal:
|
|
67
|
+
vertical: 'top',
|
|
68
|
+
horizontal: 'center',
|
|
78
69
|
}, PaperProps: {
|
|
79
70
|
style: {
|
|
80
|
-
borderRadius:
|
|
71
|
+
borderRadius: '8px',
|
|
81
72
|
},
|
|
82
73
|
}, children: menuData().map(function (item) { return ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: selectMenuItem, "data-value": item.value, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { mr: 2, style: {
|
|
83
|
-
display:
|
|
84
|
-
justifyContent:
|
|
85
|
-
}, children: (item === null || item === void 0 ? void 0 : item.icon) && ((0, jsx_runtime_1.jsx)("img", { alt: "", src: item.icon, style: { width:
|
|
74
|
+
display: 'flex',
|
|
75
|
+
justifyContent: 'center',
|
|
76
|
+
}, children: (item === null || item === void 0 ? void 0 : item.icon) && ((0, jsx_runtime_1.jsx)("img", { alt: "", src: item.icon, style: { width: '20px', height: '20px' } })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "inherit", sx: { fontSize: '15px', fontWeight: 400 }, children: item.title })] }, item.id)); }) })] }));
|
|
86
77
|
};
|
|
87
78
|
exports.default = react_1.default.memo(MenuNotification);
|
|
@@ -4,16 +4,14 @@
|
|
|
4
4
|
*
|
|
5
5
|
**/
|
|
6
6
|
/// <reference types="react" />
|
|
7
|
-
|
|
8
|
-
id: string | number;
|
|
9
|
-
status: boolean;
|
|
10
|
-
}
|
|
7
|
+
import { IValueItem } from '../../Types';
|
|
11
8
|
interface PropsHeaderInfo {
|
|
12
9
|
valueFilter: {
|
|
13
10
|
textSearch: string;
|
|
14
11
|
tabs: string;
|
|
15
12
|
};
|
|
16
|
-
|
|
13
|
+
onClosePopover?: () => void;
|
|
14
|
+
onUpdateStatus: (dataSent: IValueItem | string) => void;
|
|
17
15
|
onValueFilter: (textSearch: string, tabs: string) => void;
|
|
18
16
|
}
|
|
19
17
|
declare const HeaderInfo: (props: PropsHeaderInfo) => JSX.Element;
|
|
@@ -12,20 +12,26 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
12
12
|
var react_1 = __importDefault(require("react"));
|
|
13
13
|
var react_i18next_1 = require("react-i18next");
|
|
14
14
|
var material_1 = require("@mui/material");
|
|
15
|
-
var Common_1 = require("../Common");
|
|
16
|
-
var SearchBox_1 = __importDefault(require("../../../../AWING/SearchBox"));
|
|
17
15
|
var ButtonTabs_1 = __importDefault(require("./ButtonTabs"));
|
|
16
|
+
var Constant_1 = require("../../Constant");
|
|
18
17
|
var MenuNotification_1 = __importDefault(require("./MenuNotification"));
|
|
18
|
+
var SearchBox_1 = __importDefault(require("../../../../AWING/SearchBox"));
|
|
19
|
+
var Router_1 = require("../../../../AWING/Router");
|
|
19
20
|
var HeaderInfo = function (props) {
|
|
21
|
+
var navigate = (0, Router_1.useNavigate)();
|
|
20
22
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
21
|
-
var valueFilter = props.valueFilter, _a = props.onValueFilter, onValueFilter = _a === void 0 ? function () { return null; } : _a, _b = props.onUpdateStatus, onUpdateStatus = _b === void 0 ? function () { return null; } : _b;
|
|
23
|
+
var valueFilter = props.valueFilter, _a = props.onValueFilter, onValueFilter = _a === void 0 ? function () { return null; } : _a, _b = props.onUpdateStatus, onUpdateStatus = _b === void 0 ? function () { return null; } : _b, _c = props.onClosePopover, onClosePopover = _c === void 0 ? function () { return null; } : _c;
|
|
22
24
|
var handleUpdateMenuItem = function (value) {
|
|
23
|
-
if (value ===
|
|
24
|
-
onUpdateStatus(
|
|
25
|
+
if (value === Constant_1.Constants.SELECT_ALL) {
|
|
26
|
+
onUpdateStatus(Constant_1.Constants.ALL);
|
|
27
|
+
}
|
|
28
|
+
else if (value === Constant_1.Constants.NOTIFICATION_SETTING_SCREEN_PATH) {
|
|
29
|
+
navigate("".concat(value));
|
|
30
|
+
onClosePopover();
|
|
25
31
|
}
|
|
26
32
|
else {
|
|
27
33
|
// Chuyển đến trang tương ứng
|
|
28
|
-
|
|
34
|
+
navigate("".concat(value));
|
|
29
35
|
}
|
|
30
36
|
};
|
|
31
37
|
var handleKeyWordPassing = react_1.default.useCallback(function (searchType, searchString) {
|
|
@@ -35,18 +41,13 @@ var HeaderInfo = function (props) {
|
|
|
35
41
|
onValueFilter(valueFilter.textSearch, tabItem);
|
|
36
42
|
}, [valueFilter]);
|
|
37
43
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "div", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { mb: 1, component: "div", sx: {
|
|
38
|
-
display:
|
|
39
|
-
flexDirection:
|
|
40
|
-
justifyContent:
|
|
41
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, {
|
|
42
|
-
fontWeight: "700",
|
|
43
|
-
fontSize: "1.5em"
|
|
44
|
-
}, children: t("Common.Notification") }), (0, jsx_runtime_1.jsx)(MenuNotification_1.default, { onUpdateMenuItem: handleUpdateMenuItem })] }), (0, jsx_runtime_1.jsx)(SearchBox_1.default, { variantPaper: "outlined", onSearch: handleKeyWordPassing, stylePaper: {
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexDirection: 'row',
|
|
46
|
+
justifyContent: 'space-between',
|
|
47
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { component: "h1", variant: "h5", color: "inherit", noWrap: true, fontWeight: 'bold', children: t('Common.Notification') }), (0, jsx_runtime_1.jsx)(MenuNotification_1.default, { onUpdateMenuItem: handleUpdateMenuItem })] }), (0, jsx_runtime_1.jsx)(SearchBox_1.default, { onSearch: handleKeyWordPassing, stylePaper: {
|
|
45
48
|
flex: 1,
|
|
46
|
-
width:
|
|
47
|
-
maxWidth:
|
|
48
|
-
borderRadius: "24px",
|
|
49
|
-
padding: "2px 20px 2px 10px",
|
|
49
|
+
width: 'auto',
|
|
50
|
+
maxWidth: '100%',
|
|
50
51
|
} }), (0, jsx_runtime_1.jsx)(ButtonTabs_1.default, { tabActive: valueFilter.tabs, onUpdateTabActive: handleUpdateTabActive })] }));
|
|
51
52
|
};
|
|
52
53
|
exports.default = HeaderInfo;
|
|
@@ -12,25 +12,25 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
12
12
|
var react_1 = __importDefault(require("react"));
|
|
13
13
|
var react_i18next_1 = require("react-i18next");
|
|
14
14
|
var material_1 = require("@mui/material");
|
|
15
|
-
var bell_svg_1 = __importDefault(require("Assets/Images/bell.svg"));
|
|
16
|
-
var binoculars_svg_1 = __importDefault(require("Assets/Images/binoculars.svg"));
|
|
15
|
+
var bell_svg_1 = __importDefault(require("../../../../Assets/Images/bell.svg"));
|
|
16
|
+
var binoculars_svg_1 = __importDefault(require("../../../../Assets/Images/binoculars.svg"));
|
|
17
17
|
var NotificationEmpty = function (props) {
|
|
18
18
|
var _a = props.isSearch, isSearch = _a === void 0 ? false : _a;
|
|
19
19
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
20
20
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "div", sx: {
|
|
21
|
-
paddingBottom:
|
|
22
|
-
display:
|
|
23
|
-
flexDirection:
|
|
24
|
-
alignItems:
|
|
25
|
-
justifyContent:
|
|
26
|
-
}, children: [(0, jsx_runtime_1.jsx)("img", { src: (isSearch ? binoculars_svg_1.default : bell_svg_1.default), alt: isSearch ?
|
|
27
|
-
fontSize:
|
|
28
|
-
color:
|
|
29
|
-
fontWeight:
|
|
30
|
-
marginTop:
|
|
31
|
-
textAlign:
|
|
21
|
+
paddingBottom: '30px',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'column',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'space-between',
|
|
26
|
+
}, children: [(0, jsx_runtime_1.jsx)("img", { src: (isSearch ? binoculars_svg_1.default : bell_svg_1.default), alt: isSearch ? 'iconBinoculars' : 'iconBell', style: { width: '80px', height: '80px' } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { style: {
|
|
27
|
+
fontSize: '20px',
|
|
28
|
+
color: '#65676B',
|
|
29
|
+
fontWeight: 600,
|
|
30
|
+
marginTop: '10px',
|
|
31
|
+
textAlign: 'center',
|
|
32
32
|
}, children: isSearch
|
|
33
|
-
? t(
|
|
34
|
-
: t(
|
|
33
|
+
? t('Notifications.InappropriateNotification')
|
|
34
|
+
: t('Notifications.TitleNoNotifications') })] }));
|
|
35
35
|
};
|
|
36
36
|
exports.default = react_1.default.memo(NotificationEmpty);
|
package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
2
|
+
// /**
|
|
3
|
+
// *
|
|
4
|
+
// * @author dauquan1108@gmail.com on 12/06/2023.
|
|
5
|
+
// *
|
|
6
|
+
// **/
|
|
7
|
+
// import React from 'react';
|
|
8
|
+
// import {render} from '@testing-library/react';
|
|
9
|
+
// import '@testing-library/jest-dom';
|
|
10
|
+
// import NotificationEmpty from './NotificationEmpty';
|
|
11
|
+
// describe("NotificationEmpty component", () => {
|
|
12
|
+
// it("Hiển thị thông báo mặc định đối với trường hợp 'isSearch = false'.", () => {
|
|
13
|
+
// const {getByText, getByAltText} = render(<NotificationEmpty isSearch={false}/>);
|
|
14
|
+
// // kiểm tra icon hiển thị khi trạng thái bằng false.
|
|
15
|
+
// const iconEmpty = getByAltText("iconBell");
|
|
16
|
+
// expect(iconEmpty).toBeInTheDocument();
|
|
17
|
+
// // Kiểm tra text hiển thị khi trạng thái bằng false.
|
|
18
|
+
// const titleText = getByText("Notifications.TitleNoNotifications");
|
|
19
|
+
// expect(titleText).toBeInTheDocument();
|
|
20
|
+
// });
|
|
21
|
+
// it("Hiển thị thông báo khi đối với trường hợp 'isSearch=true'.", () => {
|
|
22
|
+
// const {getByText, getByAltText} = render(<NotificationEmpty isSearch={true}/>);
|
|
23
|
+
// // kiểm tra icon hiển thị khi trạng thái bằng true.
|
|
24
|
+
// const iconEmpty = getByAltText("iconBinoculars");
|
|
25
|
+
// expect(iconEmpty).toBeInTheDocument();
|
|
26
|
+
// // Kiểm tra text hiển thị khi trạng thái bằng true.
|
|
27
|
+
// const titleText = getByText("Notifications.InappropriateNotification");
|
|
28
|
+
// expect(titleText).toBeInTheDocument();
|
|
29
|
+
// });
|
|
30
|
+
// });
|
package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @author dauquan1108@gmail.com on 11/27/2023.
|
|
4
|
+
*
|
|
5
|
+
**/
|
|
6
|
+
import { NotificationMessageField, SagaTransactionType } from '../../../Types';
|
|
7
|
+
export declare const getFullDescription: (type: SagaTransactionType, translation: any, fields: NotificationMessageField[]) => {
|
|
8
|
+
title: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
url: string;
|
|
10
|
+
};
|