awing-library 2.1.26-beta → 2.1.26
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.d.ts +3 -1
- package/lib/ACM-AXN/Campaign/CreateOrEdit/index.js +8 -4
- 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.js +6 -0
- 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 +76 -7
- package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.js +74 -30
- 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 +45 -46
- package/lib/ACM-AXN/CampaignSchedule/interface.d.ts +18 -2
- 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/SystemDirectory/SystemDirectory.test.js +1 -0
- 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/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 +119 -102
- 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 +55 -10
- 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 +24 -33
- package/lib/ACM-AXN/Statistics/interface.d.ts +2 -2
- 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/CornJobInput.js +1 -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/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 +50 -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/Event.d.ts +12 -0
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Event.js +69 -0
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Event.test.d.ts +1 -0
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Event.test.js +84 -0
- 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/TemplateField/Utils.d.ts +5 -0
- package/lib/ACM-AXN/ViewTemplate/TemplateField/Utils.js +14 -0
- package/lib/ACM-AXN/ViewTemplate/container.d.ts +1 -1
- package/lib/ACM-AXN/ViewTemplate/container.js +14 -2
- package/lib/ACM-AXN/ViewTemplate/index.d.ts +2 -1
- package/lib/ACM-AXN/ViewTemplate/interface.d.ts +3 -2
- 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 +6 -11
- 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 +2 -1
- package/lib/Utils/Helpers.js +18 -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,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @author dauquan1108@gmail.com on 12/1/2023.
|
|
46
|
+
*
|
|
47
|
+
**/
|
|
48
|
+
var react_1 = require("react");
|
|
49
|
+
var material_1 = require("@mui/material");
|
|
50
|
+
var Notifications_1 = __importDefault(require("@mui/icons-material/Notifications"));
|
|
51
|
+
var signalr_1 = require("@microsoft/signalr");
|
|
52
|
+
var Constant_1 = require("../Constant");
|
|
53
|
+
var Hooks_1 = __importDefault(require("../Hooks"));
|
|
54
|
+
var NotificationDetail_1 = __importDefault(require("../NotificationDetail"));
|
|
55
|
+
var Container = function () {
|
|
56
|
+
var service = (0, Hooks_1.default)().service;
|
|
57
|
+
var _a = (0, react_1.useState)(null), anchorEl = _a[0], setAnchorEl = _a[1];
|
|
58
|
+
var _b = (0, react_1.useState)(0), totalNotification = _b[0], setTotalNotification = _b[1];
|
|
59
|
+
var _c = (0, react_1.useState)(null), signalRConnection = _c[0], setSignalRConnection = _c[1];
|
|
60
|
+
(0, react_1.useEffect)(function () {
|
|
61
|
+
service.notificationsCountUnreadMessages().then(setTotalNotification);
|
|
62
|
+
setUpSignalRConnection().then(function (connection) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
setSignalRConnection(connection);
|
|
65
|
+
return [2 /*return*/];
|
|
66
|
+
});
|
|
67
|
+
}); });
|
|
68
|
+
return function () {
|
|
69
|
+
if (signalRConnection)
|
|
70
|
+
signalRConnection.stop();
|
|
71
|
+
};
|
|
72
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
|
+
}, []);
|
|
74
|
+
var setUpSignalRConnection = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
+
var connection, err_1;
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
connection = new signalr_1.HubConnectionBuilder()
|
|
80
|
+
.withUrl("".concat(Constant_1.Constants.API_ENDPOINT, "/api/hubs/notification"))
|
|
81
|
+
.configureLogging(signalr_1.LogLevel.None)
|
|
82
|
+
.withAutomaticReconnect([0, 5000, 10000, 15000])
|
|
83
|
+
.build();
|
|
84
|
+
connection.on('ReceiveMessage', function (message) {
|
|
85
|
+
setTotalNotification(function (prev) { return prev + 1; });
|
|
86
|
+
});
|
|
87
|
+
_a.label = 1;
|
|
88
|
+
case 1:
|
|
89
|
+
_a.trys.push([1, 3, , 4]);
|
|
90
|
+
return [4 /*yield*/, connection.start()];
|
|
91
|
+
case 2:
|
|
92
|
+
_a.sent();
|
|
93
|
+
return [3 /*break*/, 4];
|
|
94
|
+
case 3:
|
|
95
|
+
err_1 = _a.sent();
|
|
96
|
+
console.log(err_1);
|
|
97
|
+
return [3 /*break*/, 4];
|
|
98
|
+
case 4: return [2 /*return*/, connection];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}); };
|
|
102
|
+
var handleClick = function (event) {
|
|
103
|
+
var href = window.location.href;
|
|
104
|
+
// nếu đang ở notifications thì click vào quả chuông sẽ không mở popover nữa.
|
|
105
|
+
if (!href.includes(Constant_1.Constants.NOTIFICATIONS_PATH)) {
|
|
106
|
+
setTotalNotification(0);
|
|
107
|
+
setAnchorEl(event.currentTarget);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
var handleClose = function () {
|
|
111
|
+
setAnchorEl(null);
|
|
112
|
+
};
|
|
113
|
+
var open = Boolean(anchorEl);
|
|
114
|
+
var id = open ? 'simple-popover' : undefined;
|
|
115
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "div", children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-describedby": id, onClick: handleClick, sx: { backgroundColor: open ? '#F98D9C' : 'inherit' }, children: (0, jsx_runtime_1.jsx)(material_1.Badge, { badgeContent: totalNotification, color: "error", children: (0, jsx_runtime_1.jsx)(Notifications_1.default, { "data-testid": "notification-icon", sx: { color: open ? '#DD040C' : 'inherit' } }) }) }), (0, jsx_runtime_1.jsx)(material_1.Popover, { id: id, open: open, anchorEl: anchorEl, onClose: handleClose, sx: { zIndex: 1100 }, anchorOrigin: {
|
|
116
|
+
vertical: 'bottom',
|
|
117
|
+
horizontal: 'center',
|
|
118
|
+
}, transformOrigin: {
|
|
119
|
+
vertical: 'top',
|
|
120
|
+
horizontal: 'center',
|
|
121
|
+
}, PaperProps: {
|
|
122
|
+
style: {
|
|
123
|
+
borderRadius: '8px',
|
|
124
|
+
},
|
|
125
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Box, { "data-testid": "popover", component: "div", sx: [
|
|
126
|
+
{
|
|
127
|
+
width: '400px',
|
|
128
|
+
overflowY: 'auto',
|
|
129
|
+
maxHeight: 'calc(90vh - 8px)',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
'&::-webkit-scrollbar': {
|
|
133
|
+
width: '10px',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
'&::-webkit-scrollbar-track': {
|
|
138
|
+
backgroundColor: '#f1f1f1',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
'&::-webkit-scrollbar-thumb': {
|
|
143
|
+
borderRadius: '4px',
|
|
144
|
+
backgroundColor: '#c1c1c1',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
], children: (0, jsx_runtime_1.jsx)(NotificationDetail_1.default, { onClosePopover: handleClose }) }) })] }));
|
|
148
|
+
};
|
|
149
|
+
exports.default = Container;
|
|
@@ -7,11 +7,11 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
require("@testing-library/jest-dom");
|
|
8
8
|
var react_1 = require("@testing-library/react");
|
|
9
9
|
// Component
|
|
10
|
-
var
|
|
11
|
-
describe(
|
|
12
|
-
it(
|
|
13
|
-
var getByTestId = (0, react_1.render)((0, jsx_runtime_1.jsx)(
|
|
14
|
-
var notificationsIcon = getByTestId(
|
|
10
|
+
var Container_1 = __importDefault(require("./Container"));
|
|
11
|
+
describe('NotificationPopover', function () {
|
|
12
|
+
it('renders the component', function () {
|
|
13
|
+
var getByTestId = (0, react_1.render)((0, jsx_runtime_1.jsx)(Container_1.default, {})).getByTestId;
|
|
14
|
+
var notificationsIcon = getByTestId('notification-icon');
|
|
15
15
|
expect(notificationsIcon).toBeInTheDocument();
|
|
16
16
|
});
|
|
17
17
|
// it("Mở dao diện 'NotificationPopover' khi click vào quả chuông.", async () => {
|
|
@@ -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;
|