awing-library 2.1.21-beta → 2.1.21
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/lib/ACM-AXN/Campaign/Container.js +1 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/Recoils.js +1 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabInfomation.js +3 -9
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AdList.js +4 -4
- package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AddOrEditRule/RuleForm/RetargetMacAddress/component.js +2 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/index.js +6 -0
- package/lib/ACM-AXN/Campaign/Types.d.ts +8 -0
- package/lib/ACM-AXN/Campaign/Utils.js +1 -1
- package/lib/ACM-AXN/Campaign/index.js +2 -1
- 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 +69 -5
- package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.d.ts +1 -1
- package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.js +85 -36
- 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.d.ts +2 -2
- package/lib/ACM-AXN/CampaignSchedule/component.js +44 -15
- 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 +19 -3
- package/lib/ACM-AXN/Directory/DomainDirectory/DomainDirectory.test.js +1 -0
- package/lib/ACM-AXN/Directory/DomainDirectory/FolderDetail.test.js +1 -0
- package/lib/ACM-AXN/Directory/MenuDirectory/MenuDirectory.test.js +1 -0
- package/lib/ACM-AXN/Directory/MenuDirectory/index.js +7 -21
- package/lib/ACM-AXN/Directory/SystemDirectory/SystemDirectory.test.js +1 -0
- package/lib/ACM-AXN/Directory/SystemDirectory/index.js +6 -5
- package/lib/ACM-AXN/Directory/components/CreateOrEditFolder.test.js +1 -0
- package/lib/ACM-AXN/Directory/components/Permission/AddAuthen.test.js +2 -0
- package/lib/ACM-AXN/Directory/components/Permission/CreateOrEditPermission.test.js +2 -0
- package/lib/ACM-AXN/Directory/components/Permission/Management.js +7 -5
- package/lib/ACM-AXN/Directory/components/Permission/ManagementPermission.test.js +3 -0
- package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.js +9 -7
- package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.test.js +2 -0
- 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.js +57 -34
- package/lib/ACM-AXN/GroupUser/Container.js +1 -1
- package/lib/ACM-AXN/GroupUser/CreateOrEdit.js +25 -10
- package/lib/ACM-AXN/GroupUser/User/UserComponent.d.ts +2 -1
- package/lib/ACM-AXN/GroupUser/User/UserComponent.js +10 -4
- 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 +11 -0
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.js +291 -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 +38 -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 +48 -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 +84 -0
- package/lib/ACM-AXN/Notifications/Types.js +13 -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 +5 -4
- package/lib/ACM-AXN/Page/CreateOrEdit/Components/useListPageView.js +9 -4
- package/lib/ACM-AXN/Page/CreateOrEdit/DrawerAction.js +6 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/Recoil.d.ts +2 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/Recoil.js +14 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/FileUtils.d.ts +3 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/FileUtils.js +1 -6
- package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.d.ts +7 -0
- package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.js +13 -15
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewContent.js +24 -2
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewInfo.d.ts +3 -2
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewInfo.js +1 -0
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/index.js +2 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/index.test.js +2 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/Utils.d.ts +4 -4
- package/lib/ACM-AXN/Page/CreateOrEdit/Utils.js +19 -8
- package/lib/ACM-AXN/Page/Types.d.ts +11 -37
- package/lib/ACM-AXN/Page/enums.d.ts +6 -0
- package/lib/ACM-AXN/Page/enums.js +8 -1
- package/lib/ACM-AXN/Page/index.js +2 -1
- package/lib/ACM-AXN/PlaceFilter/DataTable/container.js +1 -2
- package/lib/ACM-AXN/PlaceFilter/Input/container.js +12 -2
- package/lib/ACM-AXN/PlaceFilter/common.d.ts +1 -0
- package/lib/ACM-AXN/PlaceFilter/common.js +27 -1
- package/lib/ACM-AXN/PlaceGroup/Container.js +1 -1
- package/lib/ACM-AXN/PlaceGroup/ContentCreateOrEdit.d.ts +0 -7
- package/lib/ACM-AXN/PlaceGroup/ContentCreateOrEdit.js +0 -135
- package/lib/ACM-AXN/PlaceGroup/ContentCreateOrEdit.test.js +2 -2
- package/lib/ACM-AXN/PlaceGroup/Context.d.ts +1 -1
- package/lib/ACM-AXN/PlaceGroup/CreateOrEdit.js +103 -3
- package/lib/ACM-AXN/Statistics/ControlPanel.js +27 -39
- package/lib/ACM-AXN/Statistics/interface.d.ts +2 -2
- 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/Components/TriggerInput.js +4 -2
- package/lib/ACM-AXN/TaskScheduler/Constant.d.ts +0 -107
- package/lib/ACM-AXN/TaskScheduler/Constant.js +1 -105
- package/lib/ACM-AXN/TaskScheduler/Container.js +1 -1
- package/lib/ACM-AXN/TaskScheduler/CreateOrEdit.js +6 -8
- package/lib/ACM-AXN/TaskScheduler/Utils.js +6 -1
- package/lib/ACM-AXN/Template/Constants.d.ts +0 -0
- package/lib/ACM-AXN/Template/Constants.js +1 -0
- package/lib/ACM-AXN/Template/Container.d.ts +2 -0
- package/lib/ACM-AXN/Template/Container.js +74 -0
- package/lib/ACM-AXN/Template/Container.test.d.ts +1 -0
- package/lib/ACM-AXN/Template/Container.test.js +259 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/CreateOrEdit.test.d.ts +1 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/CreateOrEdit.test.js +370 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.d.ts +9 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.js +78 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.test.d.ts +1 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.test.js +150 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Recoils.d.ts +6 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Recoils.js +79 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Script.d.ts +3 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Script.js +58 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Script.test.d.ts +1 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Script.test.js +162 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Events.d.ts +5 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Events.js +41 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.d.ts +20 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.js +283 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.test.d.ts +1 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.test.js +220 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Utils.d.ts +25 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/Utils.js +138 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/index.d.ts +3 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/Template/index.js +46 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/index.d.ts +3 -0
- package/lib/ACM-AXN/Template/CreateOrEdit/index.js +215 -0
- package/lib/ACM-AXN/Template/Hooks.d.ts +5 -0
- package/lib/ACM-AXN/Template/Hooks.js +13 -0
- package/lib/ACM-AXN/Template/Import.d.ts +2 -0
- package/lib/ACM-AXN/Template/Import.js +123 -0
- package/lib/ACM-AXN/Template/Import.test.d.ts +1 -0
- package/lib/ACM-AXN/Template/Import.test.js +188 -0
- package/lib/ACM-AXN/Template/Types.d.ts +84 -0
- package/lib/ACM-AXN/Template/Types.js +2 -0
- package/lib/ACM-AXN/Template/UploadButton.d.ts +2 -0
- package/lib/ACM-AXN/Template/UploadButton.js +14 -0
- package/lib/ACM-AXN/Template/index.d.ts +5 -0
- package/lib/ACM-AXN/Template/index.js +44 -0
- package/lib/ACM-AXN/TransactionLog/Container.js +7 -5
- package/lib/ACM-AXN/TransactionLog/Detail.js +3 -1
- package/lib/ACM-AXN/TransactionLog/Types.d.ts +1 -107
- package/lib/ACM-AXN/TransactionLog/Types.js +1 -109
- package/lib/ACM-AXN/TransactionLog/Utils.d.ts +0 -103
- package/lib/ACM-AXN/TransactionLog/Utils.js +1 -104
- package/lib/ACM-AXN/User/Container.js +1 -1
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/BasicField/index.js +1 -1
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/ObjectField.d.ts +2 -0
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/ObjectField.js +19 -3
- package/lib/ACM-AXN/ViewTemplate/container.js +2 -1
- package/lib/ACM-AXN/ViewTemplate/index.d.ts +2 -1
- package/lib/ACM-AXN/ViewTemplate/interface.d.ts +6 -1
- package/lib/AWING/AdvancedSearch/component.js +1 -1
- package/lib/AWING/AdvancedSearch/interface.d.ts +1 -0
- package/lib/AWING/BasicDataForm/index.js +3 -1
- package/lib/AWING/BasicDataForm/interface.d.ts +2 -2
- package/lib/AWING/ButtonDateRangePicker/ButtonDateRangePicker.js +2 -2
- package/lib/AWING/ButtonDateRangePicker/interface.d.ts +1 -0
- package/lib/AWING/ButtonSelect/index.js +2 -2
- package/lib/AWING/Chart/BarLineComponent.d.ts +8 -5
- package/lib/AWING/Chart/BarLineComponent.js +34 -28
- package/lib/AWING/Chart/PieComponent.d.ts +8 -7
- package/lib/AWING/Chart/PieComponent.js +1 -2
- 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 +19 -10
- package/lib/AWING/DataForm/interface.d.ts +8 -4
- package/lib/AWING/DataGrid/index.js +17 -5
- package/lib/AWING/DataGrid/interface.d.ts +1 -1
- package/lib/AWING/DateRangePicker/component.js +101 -132
- package/lib/AWING/DateRangePicker/configDate.d.ts +8 -0
- package/lib/AWING/DateRangePicker/configDate.js +71 -0
- package/lib/AWING/DateRangePicker/interface.d.ts +1 -0
- package/lib/AWING/Directory/CreateDirectory.d.ts +3 -0
- package/lib/AWING/Directory/CreateDirectory.js +27 -10
- package/lib/AWING/HOC/Wrapper.d.ts +6 -0
- package/lib/AWING/HOC/Wrapper.js +10 -0
- package/lib/AWING/LogicExpression/script.js +0 -1
- 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 +1 -1
- package/lib/AWING/ultis/validation.js +4 -2
- package/lib/Commons/Components/ClassicBaseDrawer.d.ts +1 -0
- package/lib/Commons/Components/ClassicBaseDrawer.js +7 -3
- package/lib/Commons/Components/ClassicDrawer.js +1 -1
- package/lib/Context/index.js +1 -0
- package/lib/Context/interface.d.ts +1 -0
- package/lib/Utils/Helpers.d.ts +1 -0
- package/lib/Utils/Helpers.js +17 -9
- package/lib/translate/en/translation.json +102 -3
- package/lib/translate/vi/translation.json +102 -3
- package/package.json +3 -1
- 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
- package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.test.d.ts +0 -1
- package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.test.js +0 -326
- package/lib/ACM-AXN/Page/ViewDomain/index.d.ts +0 -9
- package/lib/ACM-AXN/Page/ViewDomain/index.js +0 -148
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NotificationPopover = void 0;
|
|
7
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
var Container_1 = __importDefault(require("./Container"));
|
|
9
|
+
var Context_1 = require("../Context");
|
|
10
|
+
var NotificationPopover = function (props) {
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(Context_1.NotificationContext.Provider, { value: props, children: (0, jsx_runtime_1.jsx)(Container_1.default, {}) }));
|
|
12
|
+
};
|
|
13
|
+
exports.NotificationPopover = NotificationPopover;
|
|
@@ -8,11 +8,11 @@ var Box_1 = __importDefault(require("@mui/material/Box"));
|
|
|
8
8
|
var NotificationDetail_1 = __importDefault(require("./NotificationDetail"));
|
|
9
9
|
var NotificationScreen = function () {
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)(Box_1.default, { component: "div", sx: {
|
|
11
|
-
borderRadius:
|
|
12
|
-
border:
|
|
13
|
-
boxShadow:
|
|
11
|
+
borderRadius: '8px',
|
|
12
|
+
border: '0.1px solid #0000001a',
|
|
13
|
+
boxShadow: '0 4px 8px rgba(0, 0, 0, 0.1)',
|
|
14
14
|
}, "data-testid": "notificationScreen",
|
|
15
15
|
// width={{xs, sm, md, lg, xl}}
|
|
16
|
-
width: { xs:
|
|
16
|
+
width: { xs: '100%', sm: '600px', lg: '680px' }, children: (0, jsx_runtime_1.jsx)(NotificationDetail_1.default, {}) }));
|
|
17
17
|
};
|
|
18
18
|
exports.default = NotificationScreen;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @author dauquan1108@gmail.com on 04/15/2024.
|
|
4
|
+
*
|
|
5
|
+
**/
|
|
6
|
+
import { Timestamp } from '../../ACM-AXN/Campaign/Types';
|
|
7
|
+
import { SagaTransactionType } from '../../ACM-AXN/TransactionLog/Types';
|
|
8
|
+
export interface IValueFilterState {
|
|
9
|
+
textSearch: string;
|
|
10
|
+
tabs: string;
|
|
11
|
+
status: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface IValueItem {
|
|
14
|
+
id: number;
|
|
15
|
+
status: NotificationMessageStatus;
|
|
16
|
+
}
|
|
17
|
+
export interface INotificationItem {
|
|
18
|
+
id: string | number;
|
|
19
|
+
content: string;
|
|
20
|
+
url: string;
|
|
21
|
+
status: boolean;
|
|
22
|
+
userName: string;
|
|
23
|
+
avatarUrl: string;
|
|
24
|
+
time: number | string;
|
|
25
|
+
}
|
|
26
|
+
export interface Cancel {
|
|
27
|
+
message: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface CancelToken {
|
|
30
|
+
promise: Promise<Cancel>;
|
|
31
|
+
reason?: Cancel;
|
|
32
|
+
throwIfRequested(): void;
|
|
33
|
+
}
|
|
34
|
+
export interface NotificationPropsContext {
|
|
35
|
+
service: NotificationService;
|
|
36
|
+
}
|
|
37
|
+
export interface NotificationService {
|
|
38
|
+
/**
|
|
39
|
+
* notificationsPaging: API hiện thị Danh sách Notification.
|
|
40
|
+
**/
|
|
41
|
+
notificationsPaging: (pageIndex: number | undefined, pageSize: number | undefined, searchString: string | undefined, status: number | undefined, body: SagaTransactionType[] | undefined, cancelToken?: CancelToken) => Promise<PagedList_1OfNotificationMessage>;
|
|
42
|
+
/**
|
|
43
|
+
* notificationsReadAll: API Chuyển trang Notifications thành đã đọc.
|
|
44
|
+
**/
|
|
45
|
+
notificationsReadAll: (cancelToken?: CancelToken) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* notificationsRead: API Chuyển trang NotificationItem sang đã đọc.
|
|
48
|
+
**/
|
|
49
|
+
notificationsRead: (body: number[] | undefined, cancelToken?: CancelToken) => Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* notificationsUnread: API Chuyển trang NotificationItem sang chưa đọc.
|
|
52
|
+
**/
|
|
53
|
+
notificationsUnread: (body: number[] | undefined, cancelToken?: CancelToken) => Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* notificationsCountUnreadMessages: API Hiển thị số lượng thông báo chưa đọc.
|
|
56
|
+
**/
|
|
57
|
+
notificationsCountUnreadMessages: (cancelToken?: CancelToken) => Promise<number>;
|
|
58
|
+
}
|
|
59
|
+
export declare enum NotificationMessageStatus {
|
|
60
|
+
Unread = 0,
|
|
61
|
+
Read = 1
|
|
62
|
+
}
|
|
63
|
+
export interface NotificationMessage {
|
|
64
|
+
id?: number;
|
|
65
|
+
userId?: string;
|
|
66
|
+
sagaTransactionType?: SagaTransactionType[string];
|
|
67
|
+
fields?: NotificationMessageField[] | undefined;
|
|
68
|
+
status?: NotificationMessageStatus;
|
|
69
|
+
createdDate?: Timestamp;
|
|
70
|
+
}
|
|
71
|
+
export interface NotificationMessageField {
|
|
72
|
+
name?: string | undefined;
|
|
73
|
+
value?: string | undefined;
|
|
74
|
+
text?: string | undefined;
|
|
75
|
+
}
|
|
76
|
+
export interface PagedList_1OfNotificationMessage {
|
|
77
|
+
items?: NotificationMessage[] | undefined;
|
|
78
|
+
pageCount?: number;
|
|
79
|
+
totalItemCount?: number;
|
|
80
|
+
pageNumber?: number;
|
|
81
|
+
pageSize?: number;
|
|
82
|
+
hasPreviousPage?: boolean;
|
|
83
|
+
hasNextPage?: boolean;
|
|
84
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @author dauquan1108@gmail.com on 04/15/2024.
|
|
5
|
+
*
|
|
6
|
+
**/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.NotificationMessageStatus = void 0;
|
|
9
|
+
var NotificationMessageStatus;
|
|
10
|
+
(function (NotificationMessageStatus) {
|
|
11
|
+
NotificationMessageStatus[NotificationMessageStatus["Unread"] = 0] = "Unread";
|
|
12
|
+
NotificationMessageStatus[NotificationMessageStatus["Read"] = 1] = "Read";
|
|
13
|
+
})(NotificationMessageStatus || (exports.NotificationMessageStatus = NotificationMessageStatus = {}));
|
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Notifications = void 0;
|
|
6
7
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
8
|
var Box_1 = __importDefault(require("@mui/material/Box"));
|
|
8
|
-
var i18n_1 = __importDefault(require("../../i18n"));
|
|
9
|
-
var react_i18next_1 = require("react-i18next");
|
|
10
9
|
var NotificationScreen_1 = __importDefault(require("./NotificationScreen"));
|
|
11
|
-
var
|
|
12
|
-
|
|
10
|
+
var Context_1 = require("./Context");
|
|
11
|
+
var Notifications = function (props) {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Context_1.NotificationContext.Provider, { value: props, children: (0, jsx_runtime_1.jsx)(Box_1.default, { component: "div", display: "flex", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(NotificationScreen_1.default, {}) }) }));
|
|
13
13
|
};
|
|
14
|
-
exports.
|
|
14
|
+
exports.Notifications = Notifications;
|
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var icons_material_1 = require("@mui/icons-material");
|
|
19
19
|
var material_1 = require("@mui/material");
|
|
20
|
+
var DomainPreview_1 = __importDefault(require("../../ACM-AXN/DomainPreview"));
|
|
21
|
+
var PreviewButton_1 = __importDefault(require("../../ACM-AXN/DomainPreview/PreviewButton"));
|
|
20
22
|
var lodash_1 = require("lodash");
|
|
21
23
|
var react_1 = require("react");
|
|
22
24
|
var react_i18next_1 = require("react-i18next");
|
|
@@ -29,8 +31,6 @@ var Helpers_1 = require("../../Utils/Helpers");
|
|
|
29
31
|
var Constant_1 = require("./Constant");
|
|
30
32
|
var Context_2 = __importDefault(require("./Context"));
|
|
31
33
|
var enums_1 = require("./enums");
|
|
32
|
-
var DomainPreview_1 = __importDefault(require("../../ACM-AXN/DomainPreview"));
|
|
33
|
-
var PreviewButton_1 = __importDefault(require("../../ACM-AXN/DomainPreview/PreviewButton"));
|
|
34
34
|
var PageContainer = function () {
|
|
35
35
|
var _a;
|
|
36
36
|
var _b = (0, Context_2.default)(), pageCode = _b.pageCode, service = _b.service, domainId = _b.domainId, CONFIGS = _b.configs;
|
|
@@ -38,7 +38,7 @@ var PageContainer = function () {
|
|
|
38
38
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
39
39
|
var navigate = (0, react_router_1.useNavigate)();
|
|
40
40
|
var location = (0, react_router_1.useLocation)();
|
|
41
|
-
var _d = (0, react_1.useState)(
|
|
41
|
+
var _d = (0, react_1.useState)(true), loading = _d[0], setLoading = _d[1];
|
|
42
42
|
var _e = (0, react_1.useState)(true), init = _e[0], setInit = _e[1]; // First time render
|
|
43
43
|
var _f = (0, react_1.useState)([]), directories = _f[0], setDirectories = _f[1];
|
|
44
44
|
var _g = (0, react_1.useState)(true), isLoadDirectory = _g[0], setLoadLoadDirectory = _g[1];
|
|
@@ -103,6 +103,7 @@ var PageContainer = function () {
|
|
|
103
103
|
(0, react_1.useLayoutEffect)(function () {
|
|
104
104
|
setDirectories([]);
|
|
105
105
|
setInit(true);
|
|
106
|
+
setLoading(true);
|
|
106
107
|
setPage({
|
|
107
108
|
items: [],
|
|
108
109
|
totalItemCount: 0,
|
|
@@ -158,7 +159,7 @@ var PageContainer = function () {
|
|
|
158
159
|
prevQuery.current = (0, lodash_1.cloneDeep)(input);
|
|
159
160
|
}, [directories, handleFetchPaging]);
|
|
160
161
|
var handlePreview = function (id, domainId) {
|
|
161
|
-
var url = "".concat(CONFIGS.CAPTIVE_DOMAIN, "/").concat(CONFIGS.PAGE_LOGIN_PREVIEW, "?loginId=").concat(id, "&domainId=").concat(domainId, "&isNetworkCampaign=
|
|
162
|
+
var url = "".concat(CONFIGS.CAPTIVE_DOMAIN, "/").concat(CONFIGS.PAGE_LOGIN_PREVIEW, "?loginId=").concat(id, "&domainId=").concat(domainId, "&isNetworkCampaign=").concat(Boolean(service.domainsGetAll).toString());
|
|
162
163
|
window.open(url, '_blank');
|
|
163
164
|
};
|
|
164
165
|
var handlePreviewClick = function (id) {
|
|
@@ -30,18 +30,23 @@ var react_1 = __importStar(require("react"));
|
|
|
30
30
|
var TabInfo_1 = __importDefault(require("../TabInfo"));
|
|
31
31
|
var Tabview_1 = __importDefault(require("../Tabview"));
|
|
32
32
|
var TabFile_1 = __importDefault(require("../TabFile"));
|
|
33
|
+
var Recoil_1 = require("../Recoil");
|
|
33
34
|
var AWING_1 = require("../../../../AWING");
|
|
34
35
|
var react_i18next_1 = require("react-i18next");
|
|
35
36
|
var react_router_dom_1 = require("react-router-dom");
|
|
36
37
|
var recoil_1 = require("recoil");
|
|
37
|
-
var
|
|
38
|
+
var Recoil_2 = require("../Recoil");
|
|
38
39
|
var Constant_1 = require("../../../Page/Constant");
|
|
40
|
+
var Context_1 = __importDefault(require("../../../../ACM-AXN/Page/Context"));
|
|
39
41
|
var useListPageView = function () {
|
|
40
42
|
var _a;
|
|
41
43
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
42
44
|
var params = (0, react_router_dom_1.useParams)();
|
|
43
45
|
var setDrawerState = (0, AWING_1.useDrawer)().setDrawerState;
|
|
44
|
-
var formValid = (0, recoil_1.useRecoilValue)(
|
|
46
|
+
var formValid = (0, recoil_1.useRecoilValue)(Recoil_2.validForm);
|
|
47
|
+
var _b = (0, Context_1.default)(), configs = _b.configs, service = _b.service, pageCode = _b.pageCode;
|
|
48
|
+
var pageId = (0, recoil_1.useRecoilValue)((0, Recoil_1.pageState)('page')).page.pageId;
|
|
49
|
+
var rootDirectory = (0, recoil_1.useRecoilValue)(Recoil_1.pageRootDeirectory);
|
|
45
50
|
var isCreate = !Boolean((_a = params['*']) === null || _a === void 0 ? void 0 : _a.includes(Constant_1.pageConstants.EDIT_PAGE));
|
|
46
51
|
react_1.default.useEffect(function () {
|
|
47
52
|
setDrawerState(AWING_1.DrawerStateEnum[!Object.values(formValid).includes(false) ? 'VALID' : 'INVALID']);
|
|
@@ -61,11 +66,11 @@ var useListPageView = function () {
|
|
|
61
66
|
{
|
|
62
67
|
label: 'File',
|
|
63
68
|
valid: 'tabFileValid',
|
|
64
|
-
compoent: (0, react_1.createElement)(TabFile_1.default, { isCreate: isCreate }),
|
|
69
|
+
compoent: (0, react_1.createElement)(TabFile_1.default, { isCreate: isCreate, pageCode: pageCode, service: service, rootDirectory: rootDirectory, pageId: pageId, pathName: configs.FILE_RELATIVE_PATH }),
|
|
65
70
|
},
|
|
66
71
|
]; },
|
|
67
72
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
-
[t]);
|
|
73
|
+
[isCreate, pageCode, pageId, rootDirectory, service, t]);
|
|
69
74
|
return { tabs: tabs, formValid: formValid };
|
|
70
75
|
};
|
|
71
76
|
exports.default = useListPageView;
|
|
@@ -36,7 +36,12 @@ var DrawerAction = function (_a) {
|
|
|
36
36
|
setAnchorEl(null);
|
|
37
37
|
};
|
|
38
38
|
var handlePreview = function (domainId) {
|
|
39
|
-
var
|
|
39
|
+
var params = new URLSearchParams({
|
|
40
|
+
loginId: pageId,
|
|
41
|
+
domainId: domainId,
|
|
42
|
+
isNetworkCampaign: Boolean(service.domainsGetAll).toString(),
|
|
43
|
+
});
|
|
44
|
+
var url = "".concat(CONFIGS.CAPTIVE_DOMAIN, "/").concat(CONFIGS.PAGE_LOGIN_PREVIEW, "?").concat(params.toString());
|
|
40
45
|
window.open(url, '_blank');
|
|
41
46
|
};
|
|
42
47
|
var handlePreviewPage = function (e) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Directory } from '../../Campaign/Types';
|
|
2
|
-
import { FormValid, PageModel } from '../Types';
|
|
2
|
+
import { FormValid, PageModel, PageViewEvent } from '../Types';
|
|
3
3
|
export declare const pageDirectoriesState: import("recoil").RecoilState<Directory[]>;
|
|
4
4
|
export declare const wiewMounted: import("recoil").RecoilState<boolean>;
|
|
5
5
|
export declare const pageRootDeirectory: import("recoil").RecoilState<string>;
|
|
6
6
|
export declare const pageChangedFormState: import("recoil").RecoilState<Record<keyof PageModel, boolean>>;
|
|
7
7
|
export declare const pageRootState: import("recoil").RecoilState<PageModel>;
|
|
8
|
+
export declare const pageEventState: import("recoil").RecoilState<PageViewEvent[]>;
|
|
8
9
|
export declare const validForm: import("recoil").RecoilState<FormValid>;
|
|
9
10
|
export declare const pageState: (param: keyof PageModel) => import("recoil").RecoilState<PageModel>;
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.pageState = exports.validForm = exports.pageRootState = exports.pageChangedFormState = exports.pageRootDeirectory = exports.wiewMounted = exports.pageDirectoriesState = void 0;
|
|
14
|
+
exports.pageState = exports.validForm = exports.pageEventState = exports.pageRootState = exports.pageChangedFormState = exports.pageRootDeirectory = exports.wiewMounted = exports.pageDirectoriesState = void 0;
|
|
15
15
|
var lodash_1 = require("lodash");
|
|
16
16
|
var recoil_1 = require("recoil");
|
|
17
17
|
var Constant_1 = require("../Constant");
|
|
@@ -48,6 +48,7 @@ exports.pageChangedFormState = (0, recoil_1.atom)({
|
|
|
48
48
|
page: false,
|
|
49
49
|
commonHtml: false,
|
|
50
50
|
views: pageData.views.some(function (view) { return view.isChanged; }),
|
|
51
|
+
viewEvents: false,
|
|
51
52
|
};
|
|
52
53
|
},
|
|
53
54
|
}),
|
|
@@ -71,6 +72,18 @@ exports.pageRootState = (0, recoil_1.atom)({
|
|
|
71
72
|
},
|
|
72
73
|
commonHtml: '',
|
|
73
74
|
views: [Constant_1.defaultView],
|
|
75
|
+
viewEvents: [],
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
exports.pageEventState = (0, recoil_1.selector)({
|
|
79
|
+
key: 'pageEventState',
|
|
80
|
+
get: function (_a) {
|
|
81
|
+
var get = _a.get;
|
|
82
|
+
return get(exports.pageRootState).viewEvents;
|
|
83
|
+
},
|
|
84
|
+
set: function (_a, newValue) {
|
|
85
|
+
var set = _a.set;
|
|
86
|
+
set(exports.pageRootState, function (prev) { return (__assign(__assign({}, prev), { viewEvents: newValue })); });
|
|
74
87
|
},
|
|
75
88
|
});
|
|
76
89
|
exports.validForm = (0, recoil_1.atom)({
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { ITemplateFileService } from '../../../../ACM-AXN/Template';
|
|
2
|
+
import { PageCode } from '../../../../ACM-AXN/Page/enums';
|
|
3
|
+
export declare const useFileUtils: (parentDirectoryId: string, objectId: string, isCreate: boolean, service: ITemplateFileService, pageCode: PageCode) => {
|
|
2
4
|
createFolder: (pathData: string, directoryName: string) => Promise<void>;
|
|
3
5
|
delete: (pathData: string) => Promise<void>;
|
|
4
6
|
upload: (pathData: string, files: File[]) => Promise<void>;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.useFileUtils = void 0;
|
|
7
|
-
var Context_1 = __importDefault(require("../../Context"));
|
|
8
4
|
var Helpers_1 = require("../../../../Utils/Helpers");
|
|
9
5
|
var react_1 = require("react");
|
|
10
|
-
var useFileUtils = function (parentDirectoryId, objectId, isCreate) {
|
|
11
|
-
var _a = (0, Context_1.default)(), service = _a.service, pageCode = _a.pageCode;
|
|
6
|
+
var useFileUtils = function (parentDirectoryId, objectId, isCreate, service, pageCode) {
|
|
12
7
|
var clientMethod = (0, react_1.useMemo)(function () {
|
|
13
8
|
return {
|
|
14
9
|
createFolder: function (pathData, directoryName) {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { ITemplateFileService } from '../../../../ACM-AXN/Template';
|
|
3
|
+
import { PageCode } from '../../../../ACM-AXN/Page/enums';
|
|
2
4
|
interface FileTabProps {
|
|
3
5
|
isCreate?: boolean;
|
|
6
|
+
pathName?: string;
|
|
7
|
+
service: ITemplateFileService;
|
|
8
|
+
rootDirectory: string;
|
|
9
|
+
pageId: string;
|
|
10
|
+
pageCode: PageCode;
|
|
4
11
|
}
|
|
5
12
|
declare const FileTab: FC<FileTabProps>;
|
|
6
13
|
export default FileTab;
|
|
@@ -20,25 +20,23 @@ var DeprecatedEnhancedDialog_1 = __importDefault(require("../../../../Commons/Co
|
|
|
20
20
|
var react_1 = require("react");
|
|
21
21
|
var react_i18next_1 = require("react-i18next");
|
|
22
22
|
var FileUtils_1 = require("./FileUtils");
|
|
23
|
-
var Context_1 = __importDefault(require("../../Context"));
|
|
24
|
-
var Recoil_1 = require("../Recoil");
|
|
25
|
-
var recoil_1 = require("recoil");
|
|
26
23
|
var FolderTreeView_1 = __importDefault(require("../../../../Commons/Components/FolderTreeView"));
|
|
27
24
|
var AWING_1 = require("../../../../AWING");
|
|
28
|
-
var
|
|
25
|
+
var Context_1 = require("../../../../Context");
|
|
29
26
|
var FileTab = function (_a) {
|
|
30
|
-
var isCreate = _a.isCreate;
|
|
27
|
+
var isCreate = _a.isCreate, pathName = _a.pathName, service = _a.service, rootDirectory = _a.rootDirectory, pageId = _a.pageId, pageCode = _a.pageCode;
|
|
31
28
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
32
|
-
var _b = (0, Context_1.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
var _b = (0, Context_1.useAwing)().appHelper, confirm = _b.confirm, snackbar = _b.snackbar;
|
|
30
|
+
// const {
|
|
31
|
+
// page: { pageId },
|
|
32
|
+
// } = useRecoilValue(pageState('page'))
|
|
33
|
+
// const rootDirectory = useRecoilValue(pageRootDeirectory)
|
|
34
|
+
var fileMethod = (0, FileUtils_1.useFileUtils)(rootDirectory, pageId, Boolean(isCreate), service, pageCode);
|
|
37
35
|
var fileRef = (0, react_1.useRef)();
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
36
|
+
var _c = (0, react_1.useState)({ upload: '', create: '' }), pathData = _c[0], setPathData = _c[1];
|
|
37
|
+
var _d = (0, react_1.useState)(false), openCreateFolder = _d[0], setOpenCreateFolder = _d[1];
|
|
38
|
+
var _e = (0, react_1.useState)(true), triggerReload = _e[0], setTrigger = _e[1];
|
|
39
|
+
var _f = (0, react_1.useState)(), treeFolder = _f[0], setTreeFolder = _f[1];
|
|
42
40
|
(0, react_1.useEffect)(function () {
|
|
43
41
|
getTreeFolder();
|
|
44
42
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -107,6 +105,6 @@ var FileTab = function (_a) {
|
|
|
107
105
|
pointerEvents: 'unset',
|
|
108
106
|
padding: '10px 0',
|
|
109
107
|
borderRadius: '4px',
|
|
110
|
-
}, children: !treeFolder ? ((0, jsx_runtime_1.jsx)(AWING_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(FolderTreeView_1.default, { rootItem: treeFolder, onUploadFiles: handleUploadFile, onCreateDirectory: handleCreateDirectory, onDownload: handleDownloadFile, onDelete: handleDelete, onDownloadFolder: handleDownLoadFolder })) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { xs: 12, container: true, item: true, justifyContent: "flex-end", children: (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { padding: '8px' }, children: "".concat(t('Common.StaticUseFormat'), ": <img src=\"").concat(
|
|
108
|
+
}, children: !treeFolder ? ((0, jsx_runtime_1.jsx)(AWING_1.CircularProgress, {})) : ((0, jsx_runtime_1.jsx)(FolderTreeView_1.default, { rootItem: treeFolder, onUploadFiles: handleUploadFile, onCreateDirectory: handleCreateDirectory, onDownload: handleDownloadFile, onDelete: handleDelete, onDownloadFolder: handleDownLoadFolder })) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { xs: 12, container: true, item: true, justifyContent: "flex-end", children: (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { padding: '8px' }, children: "".concat(t('Common.StaticUseFormat'), ": <img src=\"").concat(pathName, "/a.jpg\" />") }) })] }) }) })] }));
|
|
111
109
|
};
|
|
112
110
|
exports.default = FileTab;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -61,6 +72,7 @@ var ViewContent = function (_a) {
|
|
|
61
72
|
var _g = react_1.default.useState(''), scriptAutoField = _g[0], setScriptAutoField = _g[1];
|
|
62
73
|
var _h = react_1.default.useState(false), loading = _h[0], setLoading = _h[1];
|
|
63
74
|
var rootDirectory = (0, recoil_1.useRecoilValue)(Recoil_1.pageRootDeirectory);
|
|
75
|
+
var _j = (0, recoil_1.useRecoilState)(Recoil_1.pageEventState), events = _j[0], setEvent = _j[1];
|
|
64
76
|
react_1.default.useEffect(function () {
|
|
65
77
|
if (viewInfoData === null || viewInfoData === void 0 ? void 0 : viewInfoData.templateId) {
|
|
66
78
|
setLoading(true);
|
|
@@ -77,7 +89,13 @@ var ViewContent = function (_a) {
|
|
|
77
89
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
90
|
}, [viewInfoData.templateId, viewInfoData.viewDatas.length]);
|
|
79
91
|
var handleResData = function (res) {
|
|
92
|
+
console.log("res", res.templateEvents);
|
|
80
93
|
onChange(['viewDatas'], (0, Utils_1.getTemplateDatas)(res.templateParameters, viewInfoData, pageId, viewNumber));
|
|
94
|
+
setEvent(function (prev) {
|
|
95
|
+
var viewEvents = prev.filter(function (item) { return item.viewNumber !== viewNumber; });
|
|
96
|
+
viewEvents.concat(res.templateEvents.map(function (item) { return (__assign(__assign({}, item), { viewNumber: viewNumber })); }));
|
|
97
|
+
return viewEvents;
|
|
98
|
+
});
|
|
81
99
|
onChange(['templateValidation'], res.template.validation);
|
|
82
100
|
onChange(['templateHandleEvent'], res.template.autoField);
|
|
83
101
|
setScriptValidationTemplate(res.template.validation || '');
|
|
@@ -91,10 +109,12 @@ var ViewContent = function (_a) {
|
|
|
91
109
|
var _a;
|
|
92
110
|
var keys = fieldPath.split('.');
|
|
93
111
|
var fieldChange = templateDatasUpdated[keys[1]];
|
|
112
|
+
console.log(fieldPath, fieldChange);
|
|
94
113
|
var indexOfFieldChange = (_a = viewInfoData.viewDatas) === null || _a === void 0 ? void 0 : _a.findIndex(function (field) { return field.fieldName === fieldChange.fieldName; });
|
|
95
114
|
onChange(['viewDatas', String(indexOfFieldChange), 'fieldValue'], fieldChange.fieldValue);
|
|
96
115
|
setChanged();
|
|
97
116
|
};
|
|
117
|
+
console.log("events", events);
|
|
98
118
|
var onUploadFile = function (files) { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
119
|
var fieldName, params;
|
|
100
120
|
return __generator(this, function (_a) {
|
|
@@ -134,9 +154,11 @@ var ViewContent = function (_a) {
|
|
|
134
154
|
? CONFIGS.FILE_TEMP_PATH
|
|
135
155
|
: CONFIGS.FILE_STATIC_PATH, "/").concat(pageCode === enums_1.PageCode.Lgn
|
|
136
156
|
? 'lgn'
|
|
137
|
-
: 'wlc', "/").concat((_d = (_c = viewInfoData.viewDatas) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pageId), enablePreview: pageCode === enums_1.PageCode.Lgn, advanceFields:
|
|
157
|
+
: 'wlc', "/").concat((_d = (_c = viewInfoData.viewDatas) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.pageId), enablePreview: pageCode === enums_1.PageCode.Lgn, advanceFields: viewInfoData.viewDatas.filter(function (item) { return item === null || item === void 0 ? void 0 : item.isAdvanced; }).map(function (field) { return field.fieldName; }), scriptValidate: scriptValidationTemplate, scriptAutoField: scriptAutoField, domainId: domainId, configs: CONFIGS,
|
|
138
158
|
// validStatus={validStatus}
|
|
139
|
-
validStatus: viewInfoData.validStatus,
|
|
159
|
+
validStatus: viewInfoData.validStatus,
|
|
160
|
+
// viewEvent={}
|
|
161
|
+
onChange: handleOnChange, onChangeViewValid: function (status) {
|
|
140
162
|
onChange(['isValidationFields'], [status]);
|
|
141
163
|
}, onChangeValidateProcess: function (processValue) {
|
|
142
164
|
onChange(['validProcessStatus'], processValue);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Directory } from '../../../Campaign/Types';
|
|
3
|
-
import { ViewModel
|
|
3
|
+
import { ViewModel } from '../../Types';
|
|
4
|
+
import { ITemplateType } from '../../../../ACM-AXN/Template/Types';
|
|
4
5
|
interface ViewInfoProps {
|
|
5
|
-
templateTypes:
|
|
6
|
+
templateTypes: ITemplateType[];
|
|
6
7
|
directories: Directory[];
|
|
7
8
|
onChange: (keys: string[], value: unknown) => void;
|
|
8
9
|
viewInfoData: ViewModel;
|
|
@@ -179,6 +179,7 @@ var ViewInfo = function (_a) {
|
|
|
179
179
|
options: templateOptions.map(function (template) { return ({
|
|
180
180
|
value: template.id,
|
|
181
181
|
text: template.description,
|
|
182
|
+
disabled: template === null || template === void 0 ? void 0 : template.isDeprecated,
|
|
182
183
|
}); }),
|
|
183
184
|
},
|
|
184
185
|
], oldValue: __assign(__assign({}, viewInfoData), { templateTypeId: 0 }), onUpdate: handleChangeForm }) }));
|
|
@@ -52,6 +52,7 @@ var ViewList_1 = __importDefault(require("./Components/ViewList"));
|
|
|
52
52
|
var ViewContent_1 = __importDefault(require("./ViewContent"));
|
|
53
53
|
var ViewInfo_1 = __importDefault(require("./ViewInfo"));
|
|
54
54
|
var Context_2 = require("../../../../Context");
|
|
55
|
+
var Helpers_1 = require("../../../../Utils/Helpers");
|
|
55
56
|
var TabView = function (_a) {
|
|
56
57
|
var isCreate = _a.isCreate;
|
|
57
58
|
var _b = (0, recoil_1.useRecoilState)((0, Recoil_1.pageState)('views')), _c = _b[0], views = _c.views, page = _c.page, setView = _b[1];
|
|
@@ -130,7 +131,7 @@ var TabView = function (_a) {
|
|
|
130
131
|
return;
|
|
131
132
|
}
|
|
132
133
|
setView((0, immer_1.default)(function (draf) {
|
|
133
|
-
(0,
|
|
134
|
+
(0, Helpers_1.setObject)(draf, keys, value);
|
|
134
135
|
}));
|
|
135
136
|
};
|
|
136
137
|
var handleChange = function (key) {
|
|
@@ -174,7 +174,8 @@ var renderUi = function () {
|
|
|
174
174
|
},
|
|
175
175
|
},
|
|
176
176
|
commonHtml: '',
|
|
177
|
-
views: [Constant_1.defaultView, Constant_1.defaultView]
|
|
177
|
+
views: [Constant_1.defaultView, Constant_1.defaultView],
|
|
178
|
+
viewEvents: [],
|
|
178
179
|
});
|
|
179
180
|
}, children: (0, jsx_runtime_1.jsx)(_1.default, {}) }));
|
|
180
181
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DataObject } from '../../../AWING';
|
|
2
|
-
import { PageModel, TemplateData,
|
|
2
|
+
import { PageModel, TemplateData, ViewModel } from '../Types';
|
|
3
|
+
import { ITemplateParameter } from '../../../ACM-AXN/Template/Types';
|
|
3
4
|
export declare const isObjectType: (value: unknown) => value is object;
|
|
4
5
|
export declare const isObject: <T extends object>(value: unknown) => value is T;
|
|
5
6
|
export declare const composeKey: <F extends (...p: any[]) => any, G extends (...p: any[]) => any>(f: F, g: G) => F;
|
|
6
7
|
export declare const concatKey: (parent: string | string[]) => (child: string | string[]) => string[];
|
|
7
|
-
export declare const setObject: <O extends {}>(obj: O, arrKey: Array<keyof O>, value: unknown) => void;
|
|
8
8
|
export declare const convertTreeArrayToFlatArray: (treeArray: DataObject[]) => any[];
|
|
9
9
|
export declare const convertValueByType: (type: string, val: any) => any;
|
|
10
10
|
export declare const getFieldsValid: (templateDatas: TemplateData[]) => boolean[];
|
|
@@ -14,10 +14,10 @@ export declare function updateStateByPageModel(this: {
|
|
|
14
14
|
/**
|
|
15
15
|
* Retrieves the template data based on the provided template parameters, view information data, page ID, and view number.
|
|
16
16
|
*
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {ITemplateParameter[]} templateParameters - The array of template parameters.
|
|
18
18
|
* @param {ViewModel} viewInfoData - The view information data.
|
|
19
19
|
* @param {string} pageId - The page ID.
|
|
20
20
|
* @param {number} viewNumber - The view number.
|
|
21
21
|
* @returns {TemplateData[]} - The array of template data.
|
|
22
22
|
*/
|
|
23
|
-
export declare const getTemplateDatas: (templateParameters:
|
|
23
|
+
export declare const getTemplateDatas: (templateParameters: ITemplateParameter[], viewInfoData: ViewModel, pageId: string, viewNumber: number) => TemplateData[];
|
|
@@ -15,12 +15,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.getTemplateDatas = exports.updateStateByPageModel = exports.getFieldsValid = exports.convertValueByType = exports.convertTreeArrayToFlatArray = exports.
|
|
18
|
+
exports.getTemplateDatas = exports.updateStateByPageModel = exports.getFieldsValid = exports.convertValueByType = exports.convertTreeArrayToFlatArray = exports.concatKey = exports.composeKey = exports.isObject = exports.isObjectType = void 0;
|
|
19
19
|
var Enum_1 = require("../../ViewTemplate/Enum");
|
|
20
20
|
var lodash_1 = require("lodash");
|
|
21
21
|
var immer_1 = __importDefault(require("immer"));
|
|
22
22
|
var common_1 = require("../../ViewTemplate/common");
|
|
23
23
|
var enums_1 = require("../enums");
|
|
24
|
+
var Helpers_1 = require("../../../Utils/Helpers");
|
|
24
25
|
// }
|
|
25
26
|
var isDateObject = function (value) { return value instanceof Date; };
|
|
26
27
|
var isNullOrUndefined = function (value) {
|
|
@@ -53,14 +54,22 @@ var concatKey = function (parent) {
|
|
|
53
54
|
};
|
|
54
55
|
};
|
|
55
56
|
exports.concatKey = concatKey;
|
|
56
|
-
var setObject = function (obj, arrKey, value) {
|
|
57
|
-
(0, lodash_1.set)(obj, arrKey.reduce(function (acc, val) { return acc + '[' + val + ']'; }, ''), value);
|
|
58
|
-
};
|
|
59
|
-
exports.setObject = setObject;
|
|
60
57
|
var convertTreeArrayToFlatArray = function (treeArray) {
|
|
61
58
|
var result = [];
|
|
62
59
|
treeArray === null || treeArray === void 0 ? void 0 : treeArray.forEach(function (data) {
|
|
63
|
-
getChilds(data, function (item) {
|
|
60
|
+
getChilds(data, function (item) {
|
|
61
|
+
if (item.fieldType === Enum_1.TYPE_FIELD_TEMPLATE.OBJECT && !item.fieldName.includes('.')) {
|
|
62
|
+
var child_1 = {};
|
|
63
|
+
getChilds(item, function (el) {
|
|
64
|
+
var keys = el.fieldName.split('.');
|
|
65
|
+
if (keys.length > 1) {
|
|
66
|
+
(0, Helpers_1.setObject)(child_1, keys, el.fieldValue || el.defaultValue);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
item.fieldValue = JSON.stringify((0, lodash_1.get)(child_1, item.fieldName));
|
|
70
|
+
}
|
|
71
|
+
result.push(item);
|
|
72
|
+
});
|
|
64
73
|
});
|
|
65
74
|
return result;
|
|
66
75
|
};
|
|
@@ -194,7 +203,7 @@ var objectFieldValid = function (fieldDatas, indexOfField, fieldValue, isSubFiel
|
|
|
194
203
|
return !!((_a = fieldDatas[indexOfField]) === null || _a === void 0 ? void 0 : _a.isRequired);
|
|
195
204
|
};
|
|
196
205
|
function updateStateByPageModel(pageModel) {
|
|
197
|
-
var page = pageModel.page, commonHtml = pageModel.commonHtml, views = pageModel.views;
|
|
206
|
+
var page = pageModel.page, commonHtml = pageModel.commonHtml, views = pageModel.views, viewEvents = pageModel.viewEvents;
|
|
198
207
|
this.setPageRoot((0, immer_1.default)(function (draft) {
|
|
199
208
|
draft.views = views.map(function (view) { return ({
|
|
200
209
|
templateId: view.templateId,
|
|
@@ -212,13 +221,14 @@ function updateStateByPageModel(pageModel) {
|
|
|
212
221
|
}); });
|
|
213
222
|
draft.page = page;
|
|
214
223
|
draft.commonHtml = commonHtml;
|
|
224
|
+
draft.viewEvents = viewEvents;
|
|
215
225
|
}));
|
|
216
226
|
}
|
|
217
227
|
exports.updateStateByPageModel = updateStateByPageModel;
|
|
218
228
|
/**
|
|
219
229
|
* Retrieves the template data based on the provided template parameters, view information data, page ID, and view number.
|
|
220
230
|
*
|
|
221
|
-
* @param {
|
|
231
|
+
* @param {ITemplateParameter[]} templateParameters - The array of template parameters.
|
|
222
232
|
* @param {ViewModel} viewInfoData - The view information data.
|
|
223
233
|
* @param {string} pageId - The page ID.
|
|
224
234
|
* @param {number} viewNumber - The view number.
|
|
@@ -242,6 +252,7 @@ var getTemplateDatas = function (templateParameters, viewInfoData, pageId, viewN
|
|
|
242
252
|
defaultValue: parameter.defaultValue,
|
|
243
253
|
fieldValue: fieldValue,
|
|
244
254
|
isRequired: parameter.isRequired,
|
|
255
|
+
isAdvanced: parameter.isAdvanced,
|
|
245
256
|
};
|
|
246
257
|
});
|
|
247
258
|
return result;
|