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
|
@@ -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) {
|
|
@@ -35,17 +46,26 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
47
|
}
|
|
37
48
|
};
|
|
49
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
38
58
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
59
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
60
|
};
|
|
41
61
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
62
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
63
|
var material_1 = require("@mui/material");
|
|
64
|
+
var AWING_1 = require("../../../../AWING");
|
|
65
|
+
var Context_1 = require("../../../../Context");
|
|
44
66
|
var lodash_1 = require("lodash");
|
|
45
67
|
var react_1 = __importDefault(require("react"));
|
|
46
68
|
var recoil_1 = require("recoil");
|
|
47
|
-
var AWING_1 = require("../../../../AWING");
|
|
48
|
-
var Context_1 = require("../../../../Context");
|
|
49
69
|
var ViewTemplate_1 = __importDefault(require("../../../ViewTemplate"));
|
|
50
70
|
var Context_2 = __importDefault(require("../../Context"));
|
|
51
71
|
var enums_1 = require("../../enums");
|
|
@@ -53,14 +73,16 @@ var Recoil_1 = require("../Recoil");
|
|
|
53
73
|
var Utils_1 = require("../Utils");
|
|
54
74
|
var Styles_1 = require("./Styles");
|
|
55
75
|
var ViewContent = function (_a) {
|
|
56
|
-
var _b, _c, _d;
|
|
76
|
+
var _b, _c, _d, _e, _f;
|
|
57
77
|
var viewInfoData = _a.viewInfoData, pageId = _a.pageId, viewNumber = _a.viewNumber, onChange = _a.onChange, isCreate = _a.isCreate;
|
|
58
|
-
var
|
|
78
|
+
var _g = (0, Context_2.default)(), service = _g.service, pageCode = _g.pageCode, domainId = _g.domainId, CONFIGS = _g.configs;
|
|
59
79
|
var appHelper = (0, Context_1.useAwing)().appHelper;
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
80
|
+
var _h = react_1.default.useState(''), scriptValidationTemplate = _h[0], setScriptValidationTemplate = _h[1];
|
|
81
|
+
var _j = react_1.default.useState(''), scriptAutoField = _j[0], setScriptAutoField = _j[1];
|
|
82
|
+
var _k = react_1.default.useState(false), loading = _k[0], setLoading = _k[1];
|
|
83
|
+
var isUniq = react_1.default.useRef(false);
|
|
63
84
|
var rootDirectory = (0, recoil_1.useRecoilValue)(Recoil_1.pageRootDeirectory);
|
|
85
|
+
var _l = (0, recoil_1.useRecoilState)(Recoil_1.pageEventState), events = _l[0], setEvent = _l[1];
|
|
64
86
|
react_1.default.useEffect(function () {
|
|
65
87
|
if (viewInfoData === null || viewInfoData === void 0 ? void 0 : viewInfoData.templateId) {
|
|
66
88
|
setLoading(true);
|
|
@@ -76,8 +98,26 @@ var ViewContent = function (_a) {
|
|
|
76
98
|
}
|
|
77
99
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
100
|
}, [viewInfoData.templateId, viewInfoData.viewDatas.length]);
|
|
101
|
+
react_1.default.useEffect(function () {
|
|
102
|
+
if (!isUniq.current) {
|
|
103
|
+
console.log("uniq...");
|
|
104
|
+
setEvent(function (prev) {
|
|
105
|
+
return (0, lodash_1.uniqBy)(prev, function (a) {
|
|
106
|
+
return JSON.stringify({
|
|
107
|
+
event: a.event,
|
|
108
|
+
viewNumber: a.viewNumber,
|
|
109
|
+
pageId: a.pageId,
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
isUniq.current = true;
|
|
114
|
+
}
|
|
115
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
116
|
+
}, [events]);
|
|
79
117
|
var handleResData = function (res) {
|
|
80
118
|
onChange(['viewDatas'], (0, Utils_1.getTemplateDatas)(res.templateParameters, viewInfoData, pageId, viewNumber));
|
|
119
|
+
setEvent(function (prev) { var _a; return __spreadArray(__spreadArray([], (_a = res === null || res === void 0 ? void 0 : res.templateEvents) === null || _a === void 0 ? void 0 : _a.map(function (item) { return ({ id: item.id, event: item.event, viewNumber: viewNumber + 1, pageId: pageId, protected: true }); }), true), prev, true); });
|
|
120
|
+
isUniq.current = false;
|
|
81
121
|
onChange(['templateValidation'], res.template.validation);
|
|
82
122
|
onChange(['templateHandleEvent'], res.template.autoField);
|
|
83
123
|
setScriptValidationTemplate(res.template.validation || '');
|
|
@@ -134,14 +174,19 @@ var ViewContent = function (_a) {
|
|
|
134
174
|
? CONFIGS.FILE_TEMP_PATH
|
|
135
175
|
: CONFIGS.FILE_STATIC_PATH, "/").concat(pageCode === enums_1.PageCode.Lgn
|
|
136
176
|
? '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:
|
|
177
|
+
: '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: (_f = (_e = viewInfoData.viewDatas) === null || _e === void 0 ? void 0 : _e.filter(function (item) { return item === null || item === void 0 ? void 0 : item.isAdvanced; })) === null || _f === void 0 ? void 0 : _f.map(function (field) { return field.fieldName; }), scriptValidate: scriptValidationTemplate, scriptAutoField: scriptAutoField, domainId: domainId, configs: CONFIGS,
|
|
138
178
|
// validStatus={validStatus}
|
|
139
|
-
validStatus: viewInfoData.validStatus, onChange: handleOnChange, onChangeViewValid: function (status) {
|
|
179
|
+
validStatus: viewInfoData.validStatus, viewEvents: events === null || events === void 0 ? void 0 : events.filter(function (item) { return item.viewNumber === viewNumber + 1; }), onChange: handleOnChange, onChangeViewValid: function (status) {
|
|
140
180
|
onChange(['isValidationFields'], [status]);
|
|
141
181
|
}, onChangeValidateProcess: function (processValue) {
|
|
142
182
|
onChange(['validProcessStatus'], processValue);
|
|
143
183
|
}, onNotifyError: function (errorMessage) {
|
|
144
184
|
appHelper.snackbar('error', errorMessage);
|
|
145
|
-
}, onUploadFile: onUploadFile
|
|
185
|
+
}, onUploadFile: onUploadFile, onChangeEvent: function (values) {
|
|
186
|
+
setEvent(function (prev) {
|
|
187
|
+
return prev.filter(function (item) { return item.viewNumber !== viewNumber + 1; }).concat(values.map(function (value) { return (__assign(__assign({}, value), { viewNumber: viewNumber + 1, pageId: pageId })); }));
|
|
188
|
+
});
|
|
189
|
+
isUniq.current = false;
|
|
190
|
+
} }) }) })) })) }));
|
|
146
191
|
};
|
|
147
192
|
exports.default = ViewContent;
|
|
@@ -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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ITemplateFileService } from '../../ACM-AXN/Template/Types';
|
|
2
3
|
import { DirectoryRoot } from '../../ACM-AXN/Campaign/Enum';
|
|
3
4
|
import { Directory, Timestamp } from '../../ACM-AXN/Campaign/Types';
|
|
4
5
|
import { PageCode, VALID_PROCESS_CODE, VERIFIED_STATUS } from './enums';
|
|
@@ -16,6 +17,7 @@ export interface TemplateData {
|
|
|
16
17
|
fieldName?: string;
|
|
17
18
|
fieldValue?: string;
|
|
18
19
|
isRequired?: boolean;
|
|
20
|
+
isAdvanced?: boolean;
|
|
19
21
|
}
|
|
20
22
|
export interface IPage {
|
|
21
23
|
pageId: string;
|
|
@@ -42,10 +44,17 @@ export interface ViewModel {
|
|
|
42
44
|
validProcessStatus: VALID_PROCESS_CODE;
|
|
43
45
|
viewDatas: TemplateData[];
|
|
44
46
|
}
|
|
47
|
+
export interface PageViewEvent {
|
|
48
|
+
id?: number;
|
|
49
|
+
pageId?: string;
|
|
50
|
+
viewNumber?: number;
|
|
51
|
+
event?: string | undefined;
|
|
52
|
+
}
|
|
45
53
|
export interface PageModel {
|
|
46
54
|
page: IPage;
|
|
47
55
|
commonHtml: string;
|
|
48
56
|
views: ViewModel[];
|
|
57
|
+
viewEvents: PageViewEvent[];
|
|
49
58
|
}
|
|
50
59
|
export interface FileResponse {
|
|
51
60
|
data: Blob;
|
|
@@ -68,11 +77,6 @@ export interface PagesPaging {
|
|
|
68
77
|
hasPreviousPage: boolean;
|
|
69
78
|
hasNextPage: boolean;
|
|
70
79
|
}
|
|
71
|
-
export interface TemplateType {
|
|
72
|
-
id: number;
|
|
73
|
-
name: string;
|
|
74
|
-
templateTypeCode: string;
|
|
75
|
-
}
|
|
76
80
|
export interface Template {
|
|
77
81
|
id: string;
|
|
78
82
|
directoryId: string;
|
|
@@ -85,20 +89,7 @@ export interface Template {
|
|
|
85
89
|
templateTypeId: number;
|
|
86
90
|
validation: string;
|
|
87
91
|
autoField: string;
|
|
88
|
-
|
|
89
|
-
export interface TemplateParameter {
|
|
90
|
-
id: string;
|
|
91
|
-
templateId: string;
|
|
92
|
-
fieldName: string;
|
|
93
|
-
fieldType: string;
|
|
94
|
-
defaultValue: string;
|
|
95
|
-
labelName: string;
|
|
96
|
-
isRequired: boolean;
|
|
97
|
-
childrens: TemplateParameter[];
|
|
98
|
-
}
|
|
99
|
-
export interface TemplateModel {
|
|
100
|
-
template: Template;
|
|
101
|
-
templateParameters: TemplateParameter[];
|
|
92
|
+
isDeprecated?: boolean;
|
|
102
93
|
}
|
|
103
94
|
export interface PhysicalFolder {
|
|
104
95
|
name: string;
|
|
@@ -116,30 +107,13 @@ export interface IDomain {
|
|
|
116
107
|
rateSharing: number;
|
|
117
108
|
description: string | undefined;
|
|
118
109
|
}
|
|
119
|
-
export interface PageService {
|
|
110
|
+
export interface PageService extends ITemplateFileService {
|
|
120
111
|
directoriesGetByObjectTypeCode: (type: DirectoryRoot) => Promise<Directory[]>;
|
|
121
112
|
pagesPaging: (searchString?: string, pageSize?: number, pageIndex?: number, directoryId?: string) => Promise<PagesPaging>;
|
|
122
113
|
directoriesPost: (body: Directory) => Promise<void>;
|
|
123
114
|
pagesDelete: (id: string) => Promise<void>;
|
|
124
115
|
pagesExport: (id: string) => Promise<FileResponse>;
|
|
125
116
|
pagesImport: (id: string, directoryId: string, name: string, file: FileParameter) => Promise<void>;
|
|
126
|
-
templatesGetDirectories: () => Promise<Directory[]>;
|
|
127
|
-
templateTypesGet: () => Promise<TemplateType[]>;
|
|
128
|
-
templatesGetByDirectoryId: (directoryId: string) => Promise<Template[]>;
|
|
129
|
-
templatesGet: (id: string) => Promise<TemplateModel>;
|
|
130
|
-
pageFilesCreateCreateUpload: (parentDirectoryId: string, code: PageCode, objectId: string, path: string, files: FileParameter[]) => Promise<void>;
|
|
131
|
-
pageFilesUpdateUpload: (code: PageCode, objectId: string, path: string, files: FileParameter[]) => Promise<void>;
|
|
132
|
-
pagesGenerateId: () => Promise<string>;
|
|
133
|
-
pageFilesUpdateGetTreeFolder: (code: PageCode, objectId: string) => Promise<PhysicalFolder>;
|
|
134
|
-
pageFilesCreateGetTreeFolder: (parentDirectoryId: string, code: PageCode, objectId: string) => Promise<PhysicalFolder>;
|
|
135
|
-
pageFilesCreateDownload: (parentDirectoryId: string, code: PageCode, objectId: string, pathFile: string) => Promise<FileResponse>;
|
|
136
|
-
pageFilesUpdateDownload: (code: PageCode, objectId: string, pathFile: string) => Promise<FileResponse>;
|
|
137
|
-
pageFilesUpdateDownloadFolder: (code: PageCode, objectId: string, path: string) => Promise<FileResponse>;
|
|
138
|
-
pageFilesCreateDownloadFolder: (parentDirectoryId: string, code: PageCode, objectId: string, path: string) => Promise<FileResponse>;
|
|
139
|
-
pageFilesCreateCreateFolder: (parentDirectoryId: string, code: PageCode, objectId: string, path: string, name: string) => Promise<void>;
|
|
140
|
-
pageFilesUpdateCreateFolder: (code: PageCode, objectId: string, path: string, name: string) => Promise<void>;
|
|
141
|
-
pageFilesCreateDelete: (parentDirectoryId: string, code: PageCode, objectId: string, path: string) => Promise<void>;
|
|
142
|
-
pageFilesUpdateDelete: (code: PageCode, objectId: string, path: string) => Promise<void>;
|
|
143
117
|
pagesPost: (body: PageModel) => Promise<void>;
|
|
144
118
|
pagesPut: (id: string, body: PageModel) => Promise<void>;
|
|
145
119
|
pagesGet: (id: string) => Promise<PageModel>;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VERIFIED_STATUS = exports.VALID_PROCESS_CODE = exports.TrackingType = exports.PathType = exports.PageCode = void 0;
|
|
3
|
+
exports.VERIFIED_STATUS = exports.VALID_PROCESS_CODE = exports.TrackingType = exports.PathType = exports.FileTypeCode = exports.PageCode = void 0;
|
|
4
4
|
var PageCode;
|
|
5
5
|
(function (PageCode) {
|
|
6
6
|
PageCode[PageCode["Wlc"] = 0] = "Wlc";
|
|
7
7
|
PageCode[PageCode["Lgn"] = 1] = "Lgn";
|
|
8
8
|
})(PageCode || (exports.PageCode = PageCode = {}));
|
|
9
|
+
var FileTypeCode;
|
|
10
|
+
(function (FileTypeCode) {
|
|
11
|
+
FileTypeCode[FileTypeCode["Wlc"] = 0] = "Wlc";
|
|
12
|
+
FileTypeCode[FileTypeCode["Lgn"] = 1] = "Lgn";
|
|
13
|
+
FileTypeCode[FileTypeCode["Domain"] = 2] = "Domain";
|
|
14
|
+
FileTypeCode[FileTypeCode["Template"] = 3] = "Template";
|
|
15
|
+
})(FileTypeCode || (exports.FileTypeCode = FileTypeCode = {}));
|
|
9
16
|
var PathType;
|
|
10
17
|
(function (PathType) {
|
|
11
18
|
PathType["CREATE"] = "Create";
|
|
@@ -29,6 +29,7 @@ var Context_1 = require("./Context");
|
|
|
29
29
|
var enums_1 = require("./enums");
|
|
30
30
|
var CreateOrEdit_1 = __importDefault(require("./CreateOrEdit"));
|
|
31
31
|
var index_1 = __importDefault(require("./Import/index"));
|
|
32
|
+
var Enum_1 = require("../../ACM-AXN/Campaign/Enum");
|
|
32
33
|
var Page = function (props) {
|
|
33
34
|
var paths = [
|
|
34
35
|
{ path: Constant_1.pageConstants.IMPORT_PAGE, element: (0, jsx_runtime_1.jsx)(index_1.default, {}) },
|
|
@@ -46,7 +47,7 @@ var Page = function (props) {
|
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
path: Constant_1.pageConstants.PAGE_CREATE_DIRECTORY + '/:directoryId',
|
|
49
|
-
element: ((0, jsx_runtime_1.jsx)(CreateDirectory_1.default, __assign({ parentDirectory: props.pageCode === enums_1.PageCode.Lgn
|
|
50
|
+
element: ((0, jsx_runtime_1.jsx)(CreateDirectory_1.default, __assign({ directoryRoot: Enum_1.DirectoryRoot[props.pageCode === enums_1.PageCode.Lgn ? 'PageLogin' : 'PageWelcome'], parentDirectory: props.pageCode === enums_1.PageCode.Lgn
|
|
50
51
|
? 'pageLogin'
|
|
51
52
|
: 'pageWelcome' }, props))),
|
|
52
53
|
},
|
|
@@ -74,7 +74,6 @@ var DataTable = function (props) {
|
|
|
74
74
|
return;
|
|
75
75
|
if (isError)
|
|
76
76
|
setIsError(function () { return false; });
|
|
77
|
-
console.log("query");
|
|
78
77
|
if (isSelectedTagAll) {
|
|
79
78
|
setIsLoading(function () { return true; });
|
|
80
79
|
getTagAllPlaces()
|
|
@@ -105,7 +104,7 @@ var DataTable = function (props) {
|
|
|
105
104
|
(0, react_1.useEffect)(function () {
|
|
106
105
|
queryData();
|
|
107
106
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
-
}, [pageIndex, pageSize]);
|
|
107
|
+
}, [pageIndex, pageSize, isSelectedTagAll]);
|
|
109
108
|
var getAllPlaces = function () {
|
|
110
109
|
return getPlacesByFilter((tagSelected === null || tagSelected === void 0 ? void 0 : tagSelected.filterFields) || []);
|
|
111
110
|
};
|
|
@@ -20,8 +20,9 @@ var recoil_1 = require("recoil");
|
|
|
20
20
|
var component_1 = __importDefault(require("./component"));
|
|
21
21
|
var common_1 = require("../common");
|
|
22
22
|
var Enum_1 = require("../Enum");
|
|
23
|
+
var react_1 = require("react");
|
|
23
24
|
var FieldInput = function () {
|
|
24
|
-
var _a = (0, recoil_1.useRecoilState)(Atom_1.isSelectedTagAllState), setIsSelectedTagAll = _a[1];
|
|
25
|
+
var _a = (0, recoil_1.useRecoilState)(Atom_1.isSelectedTagAllState), isSelectedTagAll = _a[0], setIsSelectedTagAll = _a[1];
|
|
25
26
|
var _b = (0, recoil_1.useRecoilState)(Atom_1.tagSelectedState), tagSelected = _b[0], setTagSelected = _b[1];
|
|
26
27
|
var tagsAll = (0, recoil_1.useRecoilValue)(Atom_1.tagsAllState);
|
|
27
28
|
var handleChange = function (newValue, index, isChangeOperator) {
|
|
@@ -55,6 +56,15 @@ var FieldInput = function () {
|
|
|
55
56
|
setTagSelected(tagPrepare);
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
+
// console.log("defaultTagValue", defaultTagValue)
|
|
60
|
+
var inputFilters = (0, react_1.useMemo)(function () {
|
|
61
|
+
if (isSelectedTagAll) {
|
|
62
|
+
return ((tagSelected === null || tagSelected === void 0 ? void 0 : tagSelected.filterFields) || []).map(function (input, index) {
|
|
63
|
+
return __assign(__assign({}, input), { value: common_1.defaultTagValue[input.type] });
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return (tagSelected === null || tagSelected === void 0 ? void 0 : tagSelected.filterFields) || [];
|
|
67
|
+
}, [isSelectedTagAll, tagSelected]);
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(component_1.default, { inputFilters: inputFilters, onChange: handleChange }));
|
|
59
69
|
};
|
|
60
70
|
exports.default = FieldInput;
|
|
@@ -1,6 +1,18 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compareTwoArrayObject = void 0;
|
|
14
|
+
exports.defaultTagValue = exports.compareTwoArrayObject = void 0;
|
|
15
|
+
var Enum_1 = require("./Enum");
|
|
4
16
|
var isEqual = require("lodash/isEqual");
|
|
5
17
|
var compareTwoArrayObject = function (arrObj1, arrObj2) {
|
|
6
18
|
var result = (arrObj1 || []).filter(function (object1) {
|
|
@@ -23,3 +35,17 @@ var compareTwoArrayObject = function (arrObj1, arrObj2) {
|
|
|
23
35
|
return result;
|
|
24
36
|
};
|
|
25
37
|
exports.compareTwoArrayObject = compareTwoArrayObject;
|
|
38
|
+
exports.defaultTagValue = Object.entries(Enum_1.EnumFieldInputType).reduce(function (obj, _a) {
|
|
39
|
+
var _b;
|
|
40
|
+
var key = _a[0], value = _a[1];
|
|
41
|
+
return __assign(__assign({}, obj), (_b = {}, _b[value] = (function () {
|
|
42
|
+
switch (value) {
|
|
43
|
+
case Enum_1.EnumFieldInputType.TEXT:
|
|
44
|
+
return "";
|
|
45
|
+
case Enum_1.EnumFieldInputType.GEO_FENCING:
|
|
46
|
+
return undefined;
|
|
47
|
+
default:
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
})(), _b));
|
|
51
|
+
}, {});
|
|
@@ -19,7 +19,7 @@ function Container() {
|
|
|
19
19
|
var navigate = (0, Router_1.useNavigate)();
|
|
20
20
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
21
21
|
var _a = (0, Hooks_1.default)(), service = _a.service, confirm = _a.appHelper.confirm;
|
|
22
|
-
var _b = (0, react_1.useState)(
|
|
22
|
+
var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1];
|
|
23
23
|
var _c = (0, react_1.useState)(), PagedList = _c[0], setPagedList = _c[1];
|
|
24
24
|
var queryData = (0, react_1.useCallback)(function (queryInput) {
|
|
25
25
|
var searchString = queryInput.searchString, pageIndex = queryInput.pageIndex, pageSize = queryInput.pageSize;
|