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.
Files changed (248) hide show
  1. package/lib/ACM-AXN/Campaign/Container.js +1 -1
  2. package/lib/ACM-AXN/Campaign/CreateOrEdit/Recoils.js +1 -1
  3. package/lib/ACM-AXN/Campaign/CreateOrEdit/TabInfomation.js +3 -9
  4. package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AdList.js +4 -4
  5. package/lib/ACM-AXN/Campaign/CreateOrEdit/TabSubCampaign/AddOrEditRule/RuleForm/RetargetMacAddress/component.js +2 -1
  6. package/lib/ACM-AXN/Campaign/CreateOrEdit/index.js +6 -0
  7. package/lib/ACM-AXN/Campaign/Types.d.ts +8 -0
  8. package/lib/ACM-AXN/Campaign/Utils.js +1 -1
  9. package/lib/ACM-AXN/Campaign/index.js +2 -1
  10. package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/Filter.d.ts +2 -2
  11. package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/Filter.js +44 -42
  12. package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/GroupPanel.d.ts +1 -1
  13. package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/GroupPanel.js +38 -30
  14. package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/index.d.ts +2 -2
  15. package/lib/ACM-AXN/CampaignSchedule/Components/ControlPanel/index.js +2 -2
  16. package/lib/ACM-AXN/CampaignSchedule/Components/EnhancedPagination/index.d.ts +1 -1
  17. package/lib/ACM-AXN/CampaignSchedule/Components/EnhancedPagination/index.js +4 -2
  18. package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/component.js +69 -5
  19. package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.d.ts +1 -1
  20. package/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/container.js +85 -36
  21. package/lib/ACM-AXN/CampaignSchedule/Components/TableHeaderDragable.d.ts +1 -1
  22. package/lib/ACM-AXN/CampaignSchedule/Components/TableHeaderDragable.js +38 -29
  23. package/lib/ACM-AXN/CampaignSchedule/DataConfigAXN.d.ts +4 -0
  24. package/lib/ACM-AXN/CampaignSchedule/DataConfigAXN.js +58 -0
  25. package/lib/ACM-AXN/CampaignSchedule/Enum.d.ts +14 -2
  26. package/lib/ACM-AXN/CampaignSchedule/Enum.js +12 -0
  27. package/lib/ACM-AXN/CampaignSchedule/component.d.ts +2 -2
  28. package/lib/ACM-AXN/CampaignSchedule/component.js +44 -15
  29. package/lib/ACM-AXN/CampaignSchedule/container.d.ts +1 -1
  30. package/lib/ACM-AXN/CampaignSchedule/container.js +100 -99
  31. package/lib/ACM-AXN/CampaignSchedule/interface.d.ts +19 -3
  32. package/lib/ACM-AXN/Directory/DomainDirectory/DomainDirectory.test.js +1 -0
  33. package/lib/ACM-AXN/Directory/DomainDirectory/FolderDetail.test.js +1 -0
  34. package/lib/ACM-AXN/Directory/MenuDirectory/MenuDirectory.test.js +1 -0
  35. package/lib/ACM-AXN/Directory/MenuDirectory/index.js +7 -21
  36. package/lib/ACM-AXN/Directory/SystemDirectory/SystemDirectory.test.js +1 -0
  37. package/lib/ACM-AXN/Directory/SystemDirectory/index.js +6 -5
  38. package/lib/ACM-AXN/Directory/components/CreateOrEditFolder.test.js +1 -0
  39. package/lib/ACM-AXN/Directory/components/Permission/AddAuthen.test.js +2 -0
  40. package/lib/ACM-AXN/Directory/components/Permission/CreateOrEditPermission.test.js +2 -0
  41. package/lib/ACM-AXN/Directory/components/Permission/Management.js +7 -5
  42. package/lib/ACM-AXN/Directory/components/Permission/ManagementPermission.test.js +3 -0
  43. package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.js +9 -7
  44. package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.test.js +2 -0
  45. package/lib/ACM-AXN/Directory/function.d.ts +1 -0
  46. package/lib/ACM-AXN/Directory/function.js +15 -1
  47. package/lib/ACM-AXN/DomainPreview/PreviewButton.js +57 -34
  48. package/lib/ACM-AXN/GroupUser/Container.js +1 -1
  49. package/lib/ACM-AXN/GroupUser/CreateOrEdit.js +25 -10
  50. package/lib/ACM-AXN/GroupUser/User/UserComponent.d.ts +2 -1
  51. package/lib/ACM-AXN/GroupUser/User/UserComponent.js +10 -4
  52. package/lib/ACM-AXN/Notifications/Constant.d.ts +146 -0
  53. package/lib/ACM-AXN/Notifications/Constant.js +136 -0
  54. package/lib/ACM-AXN/Notifications/Context.d.ts +8 -0
  55. package/lib/ACM-AXN/Notifications/Context.js +10 -0
  56. package/lib/ACM-AXN/Notifications/Hooks.d.ts +7 -0
  57. package/lib/ACM-AXN/Notifications/Hooks.js +17 -0
  58. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/ButtonTabs.d.ts +3 -3
  59. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/ButtonTabs.js +31 -30
  60. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.d.ts +1 -1
  61. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.js +30 -39
  62. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.d.ts +3 -5
  63. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.js +18 -17
  64. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.d.ts +1 -1
  65. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.js +15 -15
  66. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.d.ts +0 -6
  67. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.js +29 -28
  68. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.d.ts +11 -0
  69. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.js +291 -0
  70. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.d.ts +1 -1
  71. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.js +3 -3
  72. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.test.d.ts +0 -6
  73. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.test.js +38 -48
  74. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.d.ts +2 -2
  75. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.js +38 -35
  76. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.test.d.ts +0 -6
  77. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.test.js +65 -73
  78. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.d.ts +4 -11
  79. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.js +48 -36
  80. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.test.d.ts +0 -6
  81. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.test.js +56 -50
  82. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationLoading.js +30 -30
  83. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.d.ts +3 -15
  84. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.js +35 -4
  85. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.test.d.ts +0 -6
  86. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.test.js +88 -83
  87. package/lib/ACM-AXN/Notifications/NotificationDetail/index.d.ts +5 -2
  88. package/lib/ACM-AXN/Notifications/NotificationDetail/index.js +115 -101
  89. package/lib/ACM-AXN/Notifications/{NotificationPopover.d.ts → NotificationPopover/Container.d.ts} +2 -2
  90. package/lib/ACM-AXN/Notifications/NotificationPopover/Container.js +149 -0
  91. package/lib/ACM-AXN/Notifications/{NotificationPopover.test.d.ts → NotificationPopover/Container.test.d.ts} +1 -1
  92. package/lib/ACM-AXN/Notifications/{NotificationPopover.test.js → NotificationPopover/Container.test.js} +5 -5
  93. package/lib/ACM-AXN/Notifications/NotificationPopover/index.d.ts +8 -0
  94. package/lib/ACM-AXN/Notifications/NotificationPopover/index.js +13 -0
  95. package/lib/ACM-AXN/Notifications/NotificationScreen.d.ts +1 -1
  96. package/lib/ACM-AXN/Notifications/NotificationScreen.js +4 -4
  97. package/lib/ACM-AXN/Notifications/Types.d.ts +84 -0
  98. package/lib/ACM-AXN/Notifications/Types.js +13 -0
  99. package/lib/ACM-AXN/Notifications/index.d.ts +2 -2
  100. package/lib/ACM-AXN/Notifications/index.js +5 -5
  101. package/lib/ACM-AXN/Page/Container.js +5 -4
  102. package/lib/ACM-AXN/Page/CreateOrEdit/Components/useListPageView.js +9 -4
  103. package/lib/ACM-AXN/Page/CreateOrEdit/DrawerAction.js +6 -1
  104. package/lib/ACM-AXN/Page/CreateOrEdit/Recoil.d.ts +2 -1
  105. package/lib/ACM-AXN/Page/CreateOrEdit/Recoil.js +14 -1
  106. package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/FileUtils.d.ts +3 -1
  107. package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/FileUtils.js +1 -6
  108. package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.d.ts +7 -0
  109. package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.js +13 -15
  110. package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewContent.js +24 -2
  111. package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewInfo.d.ts +3 -2
  112. package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/ViewInfo.js +1 -0
  113. package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/index.js +2 -1
  114. package/lib/ACM-AXN/Page/CreateOrEdit/Tabview/index.test.js +2 -1
  115. package/lib/ACM-AXN/Page/CreateOrEdit/Utils.d.ts +4 -4
  116. package/lib/ACM-AXN/Page/CreateOrEdit/Utils.js +19 -8
  117. package/lib/ACM-AXN/Page/Types.d.ts +11 -37
  118. package/lib/ACM-AXN/Page/enums.d.ts +6 -0
  119. package/lib/ACM-AXN/Page/enums.js +8 -1
  120. package/lib/ACM-AXN/Page/index.js +2 -1
  121. package/lib/ACM-AXN/PlaceFilter/DataTable/container.js +1 -2
  122. package/lib/ACM-AXN/PlaceFilter/Input/container.js +12 -2
  123. package/lib/ACM-AXN/PlaceFilter/common.d.ts +1 -0
  124. package/lib/ACM-AXN/PlaceFilter/common.js +27 -1
  125. package/lib/ACM-AXN/PlaceGroup/Container.js +1 -1
  126. package/lib/ACM-AXN/PlaceGroup/ContentCreateOrEdit.d.ts +0 -7
  127. package/lib/ACM-AXN/PlaceGroup/ContentCreateOrEdit.js +0 -135
  128. package/lib/ACM-AXN/PlaceGroup/ContentCreateOrEdit.test.js +2 -2
  129. package/lib/ACM-AXN/PlaceGroup/Context.d.ts +1 -1
  130. package/lib/ACM-AXN/PlaceGroup/CreateOrEdit.js +103 -3
  131. package/lib/ACM-AXN/Statistics/ControlPanel.js +27 -39
  132. package/lib/ACM-AXN/Statistics/interface.d.ts +2 -2
  133. package/lib/ACM-AXN/StatisticsAudienceDemographic/container.d.ts +1 -1
  134. package/lib/ACM-AXN/StatisticsAudienceDemographic/container.js +2 -3
  135. package/lib/ACM-AXN/StatisticsAudienceDemographic/interfaces.d.ts +1 -0
  136. package/lib/ACM-AXN/StatisticsByProvince/container.d.ts +1 -1
  137. package/lib/ACM-AXN/StatisticsByProvince/container.js +2 -2
  138. package/lib/ACM-AXN/TaskScheduler/Components/TriggerInput.js +4 -2
  139. package/lib/ACM-AXN/TaskScheduler/Constant.d.ts +0 -107
  140. package/lib/ACM-AXN/TaskScheduler/Constant.js +1 -105
  141. package/lib/ACM-AXN/TaskScheduler/Container.js +1 -1
  142. package/lib/ACM-AXN/TaskScheduler/CreateOrEdit.js +6 -8
  143. package/lib/ACM-AXN/TaskScheduler/Utils.js +6 -1
  144. package/lib/ACM-AXN/Template/Constants.d.ts +0 -0
  145. package/lib/ACM-AXN/Template/Constants.js +1 -0
  146. package/lib/ACM-AXN/Template/Container.d.ts +2 -0
  147. package/lib/ACM-AXN/Template/Container.js +74 -0
  148. package/lib/ACM-AXN/Template/Container.test.d.ts +1 -0
  149. package/lib/ACM-AXN/Template/Container.test.js +259 -0
  150. package/lib/ACM-AXN/Template/CreateOrEdit/CreateOrEdit.test.d.ts +1 -0
  151. package/lib/ACM-AXN/Template/CreateOrEdit/CreateOrEdit.test.js +370 -0
  152. package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.d.ts +9 -0
  153. package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.js +78 -0
  154. package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.test.d.ts +1 -0
  155. package/lib/ACM-AXN/Template/CreateOrEdit/Infomation.test.js +150 -0
  156. package/lib/ACM-AXN/Template/CreateOrEdit/Recoils.d.ts +6 -0
  157. package/lib/ACM-AXN/Template/CreateOrEdit/Recoils.js +79 -0
  158. package/lib/ACM-AXN/Template/CreateOrEdit/Script.d.ts +3 -0
  159. package/lib/ACM-AXN/Template/CreateOrEdit/Script.js +58 -0
  160. package/lib/ACM-AXN/Template/CreateOrEdit/Script.test.d.ts +1 -0
  161. package/lib/ACM-AXN/Template/CreateOrEdit/Script.test.js +162 -0
  162. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Events.d.ts +5 -0
  163. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Events.js +41 -0
  164. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.d.ts +20 -0
  165. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.js +283 -0
  166. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.test.d.ts +1 -0
  167. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Parameter.test.js +220 -0
  168. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Utils.d.ts +25 -0
  169. package/lib/ACM-AXN/Template/CreateOrEdit/Template/Utils.js +138 -0
  170. package/lib/ACM-AXN/Template/CreateOrEdit/Template/index.d.ts +3 -0
  171. package/lib/ACM-AXN/Template/CreateOrEdit/Template/index.js +46 -0
  172. package/lib/ACM-AXN/Template/CreateOrEdit/index.d.ts +3 -0
  173. package/lib/ACM-AXN/Template/CreateOrEdit/index.js +215 -0
  174. package/lib/ACM-AXN/Template/Hooks.d.ts +5 -0
  175. package/lib/ACM-AXN/Template/Hooks.js +13 -0
  176. package/lib/ACM-AXN/Template/Import.d.ts +2 -0
  177. package/lib/ACM-AXN/Template/Import.js +123 -0
  178. package/lib/ACM-AXN/Template/Import.test.d.ts +1 -0
  179. package/lib/ACM-AXN/Template/Import.test.js +188 -0
  180. package/lib/ACM-AXN/Template/Types.d.ts +84 -0
  181. package/lib/ACM-AXN/Template/Types.js +2 -0
  182. package/lib/ACM-AXN/Template/UploadButton.d.ts +2 -0
  183. package/lib/ACM-AXN/Template/UploadButton.js +14 -0
  184. package/lib/ACM-AXN/Template/index.d.ts +5 -0
  185. package/lib/ACM-AXN/Template/index.js +44 -0
  186. package/lib/ACM-AXN/TransactionLog/Container.js +7 -5
  187. package/lib/ACM-AXN/TransactionLog/Detail.js +3 -1
  188. package/lib/ACM-AXN/TransactionLog/Types.d.ts +1 -107
  189. package/lib/ACM-AXN/TransactionLog/Types.js +1 -109
  190. package/lib/ACM-AXN/TransactionLog/Utils.d.ts +0 -103
  191. package/lib/ACM-AXN/TransactionLog/Utils.js +1 -104
  192. package/lib/ACM-AXN/User/Container.js +1 -1
  193. package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/BasicField/index.js +1 -1
  194. package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/ObjectField.d.ts +2 -0
  195. package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/ObjectField.js +19 -3
  196. package/lib/ACM-AXN/ViewTemplate/container.js +2 -1
  197. package/lib/ACM-AXN/ViewTemplate/index.d.ts +2 -1
  198. package/lib/ACM-AXN/ViewTemplate/interface.d.ts +6 -1
  199. package/lib/AWING/AdvancedSearch/component.js +1 -1
  200. package/lib/AWING/AdvancedSearch/interface.d.ts +1 -0
  201. package/lib/AWING/BasicDataForm/index.js +3 -1
  202. package/lib/AWING/BasicDataForm/interface.d.ts +2 -2
  203. package/lib/AWING/ButtonDateRangePicker/ButtonDateRangePicker.js +2 -2
  204. package/lib/AWING/ButtonDateRangePicker/interface.d.ts +1 -0
  205. package/lib/AWING/ButtonSelect/index.js +2 -2
  206. package/lib/AWING/Chart/BarLineComponent.d.ts +8 -5
  207. package/lib/AWING/Chart/BarLineComponent.js +34 -28
  208. package/lib/AWING/Chart/PieComponent.d.ts +8 -7
  209. package/lib/AWING/Chart/PieComponent.js +1 -2
  210. package/lib/AWING/Chart/Styles.d.ts +6 -2
  211. package/lib/AWING/Chart/Styles.js +6 -2
  212. package/lib/AWING/Chart/index.d.ts +3 -0
  213. package/lib/AWING/Chart/index.js +10 -0
  214. package/lib/AWING/DataForm/DataInput.js +19 -10
  215. package/lib/AWING/DataForm/interface.d.ts +8 -4
  216. package/lib/AWING/DataGrid/index.js +17 -5
  217. package/lib/AWING/DataGrid/interface.d.ts +1 -1
  218. package/lib/AWING/DateRangePicker/component.js +101 -132
  219. package/lib/AWING/DateRangePicker/configDate.d.ts +8 -0
  220. package/lib/AWING/DateRangePicker/configDate.js +71 -0
  221. package/lib/AWING/DateRangePicker/interface.d.ts +1 -0
  222. package/lib/AWING/Directory/CreateDirectory.d.ts +3 -0
  223. package/lib/AWING/Directory/CreateDirectory.js +27 -10
  224. package/lib/AWING/HOC/Wrapper.d.ts +6 -0
  225. package/lib/AWING/HOC/Wrapper.js +10 -0
  226. package/lib/AWING/LogicExpression/script.js +0 -1
  227. package/lib/AWING/PageManagement/PageManagement.js +1 -1
  228. package/lib/AWING/index.d.ts +1 -0
  229. package/lib/AWING/index.js +1 -0
  230. package/lib/AWING/ultis/validation.d.ts +1 -1
  231. package/lib/AWING/ultis/validation.js +4 -2
  232. package/lib/Commons/Components/ClassicBaseDrawer.d.ts +1 -0
  233. package/lib/Commons/Components/ClassicBaseDrawer.js +7 -3
  234. package/lib/Commons/Components/ClassicDrawer.js +1 -1
  235. package/lib/Context/index.js +1 -0
  236. package/lib/Context/interface.d.ts +1 -0
  237. package/lib/Utils/Helpers.d.ts +1 -0
  238. package/lib/Utils/Helpers.js +17 -9
  239. package/lib/translate/en/translation.json +102 -3
  240. package/lib/translate/vi/translation.json +102 -3
  241. package/package.json +3 -1
  242. package/lib/ACM-AXN/Notifications/NotificationDetail/Common.d.ts +0 -39
  243. package/lib/ACM-AXN/Notifications/NotificationDetail/Common.js +0 -304
  244. package/lib/ACM-AXN/Notifications/NotificationPopover.js +0 -69
  245. package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.test.d.ts +0 -1
  246. package/lib/ACM-AXN/Page/CreateOrEdit/TabFile/index.test.js +0 -326
  247. package/lib/ACM-AXN/Page/ViewDomain/index.d.ts +0 -9
  248. package/lib/ACM-AXN/Page/ViewDomain/index.js +0 -148
@@ -5,7 +5,7 @@
5
5
  *
6
6
  **/
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.tryParseJSONObject = exports.TRANSACTION_TYPE = exports.accountAdmin = exports.STATUS_CODE = void 0;
8
+ exports.tryParseJSONObject = exports.accountAdmin = exports.STATUS_CODE = void 0;
9
9
  exports.STATUS_CODE = {
10
10
  All: -1,
11
11
  Start: 0,
@@ -25,109 +25,6 @@ exports.accountAdmin = {
25
25
  phone: '',
26
26
  image: '',
27
27
  };
28
- exports.TRANSACTION_TYPE = {
29
- None: 0,
30
- StartDay: 1,
31
- CampaignCreate: 1000,
32
- CampaignUpdate: 1001,
33
- CampaignDelete: 1002,
34
- CampaignBlocked: 1003,
35
- PlaceCreate: 1100,
36
- PlaceUpdate: 1101,
37
- PlaceDelete: 1102,
38
- PlaceJoinRequest: 1103,
39
- PlaceJoinApprove: 1104,
40
- PlaceJoinReject: 1105,
41
- PlaceJoinDelete: 1106,
42
- PlaceUnjoinRequest: 1107,
43
- PlaceUnjoinApprove: 1108,
44
- PlaceUnjoinReject: 1109,
45
- PlaceUnjoinDelete: 1110,
46
- PlaceCustomerInfoUpdate: 1111,
47
- PlaceStatsNeedCalculate: 1112,
48
- PlaceStatsUpdate: 1113,
49
- PlaceClearCache: 1114,
50
- PlaceCustomerInfoCreate: 1115,
51
- PlaceCustomerInfoDelete: 1116,
52
- PlaceGroupCreate: 1117,
53
- PlaceGroupUpdate: 1118,
54
- PlaceGroupDelete: 1119,
55
- PlaceStatusUpdate: 1120,
56
- DomainCreate: 1200,
57
- DomainUpdate: 1201,
58
- DomainDelete: 1202,
59
- DomainJoinRequest: 1203,
60
- DomainJoinApprove: 1204,
61
- DomainJoinReject: 1205,
62
- DomainJoinDelete: 1206,
63
- DomainJoinUpdate: 1207,
64
- DomainUnjoinRequest: 1208,
65
- DomainUnjoinApprove: 1209,
66
- DomainUnjoinReject: 1210,
67
- DomainUnjoinDelete: 1211,
68
- DomainClearCache: 1212,
69
- PageCreate: 1300,
70
- PageUpdate: 1301,
71
- PageDelete: 1302,
72
- PageArchive: 1303,
73
- DirectoryCreate: 1400,
74
- DirectoryUpdate: 1401,
75
- DirectoryDelete: 1402,
76
- DirectoryPermissionUpdate: 1501,
77
- DirectoryPermissionDelete: 1502,
78
- SystemDirectoryPermissionUpdate: 1551,
79
- SystemDirectoryPermissionDelete: 1552,
80
- StaticFileUpload: 1601,
81
- StaticFileDelete: 1602,
82
- StaticFileDownload: 1603,
83
- FolderFileCreate: 1700,
84
- ScheduleNeedCalculate: 1803,
85
- ScheduleAllCalculate: 1804,
86
- ScheduleCampaignCalculate: 1805,
87
- ApCreate: 1900,
88
- ApUpdate: 1901,
89
- ApDelete: 1902,
90
- ApControllerClearCache: 1903,
91
- AuthenticationProfileCreate: 2000,
92
- AuthenticationProfileUpdate: 2001,
93
- AuthenticationProfileDelete: 2002,
94
- CaptiveClearCache: 2100,
95
- GroupCreate: 2200,
96
- GroupUpdate: 2201,
97
- GroupDelete: 2202,
98
- UserCreate: 2300,
99
- UserUpdate: 2301,
100
- UserDelete: 2302,
101
- UserChangePassword: 2303,
102
- UserAddToDomain: 2304,
103
- UserRemoveFromDomain: 2305,
104
- TemplateCreate: 2400,
105
- TemplateUpdate: 2401,
106
- TemplateDelete: 2402,
107
- RemarketingListCreate: 2500,
108
- RemarketingListUpdate: 2501,
109
- RemarketingListDelete: 2502,
110
- Login: 2600,
111
- Logout: 2601,
112
- WizardCreate: 2700,
113
- WizardUpdate: 2701,
114
- WizardDelete: 2702,
115
- HolidayCreate: 2800,
116
- HolidayUpdate: 2801,
117
- HolidayDelete: 2802,
118
- AttributeCreate: 2900,
119
- AttributeUpdate: 2901,
120
- AttributeDelete: 2902,
121
- InventoryCreate: 3000,
122
- InventoryUpdate: 3001,
123
- InventoryDelete: 3002,
124
- MenuPermissionCreate: 3100,
125
- MenuPermissionUpdate: 3101,
126
- MenuPermissionDelete: 3102,
127
- TaskSchedulerCreate: 3400,
128
- TaskSchedulerUpdate: 3401,
129
- TaskSchedulerDelete: 3402,
130
- };
131
28
  function convertLongsToStrings(obj) {
132
29
  // Step 1: Check if the current value is a long number and convert it to a string
133
30
  if (typeof obj === 'number' && obj > Number.MAX_SAFE_INTEGER) {
@@ -16,7 +16,7 @@ var Container = function () {
16
16
  var t = (0, react_i18next_1.useTranslation)().t;
17
17
  var _a = (0, Hook_1.default)(), service = _a.service, currentUser = _a.currentUser;
18
18
  var _b = (0, Context_1.useAwing)().appHelper, confirm = _b.confirm, snackbar = _b.snackbar;
19
- var _c = (0, react_1.useState)(false), loading = _c[0], setLoading = _c[1];
19
+ var _c = (0, react_1.useState)(true), loading = _c[0], setLoading = _c[1];
20
20
  var _d = (0, react_1.useState)(), users = _d[0], setUsers = _d[1];
21
21
  var handleNavigate = function () {
22
22
  window.open("".concat(window.REACT_APP_ID_DOMAIN, "/organization/").concat(currentUser.userId, "/User"), '_blank');
@@ -168,7 +168,7 @@ function BasicField(props) {
168
168
  };
169
169
  var renderDropdownListField = function (field, isError) {
170
170
  var opts = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.split('\\n');
171
- return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({}, field, { fullWidth: true, component: "fieldset", className: classes.radioGroup, error: isError, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { required: true, id: "deviceTypeLabel", children: labelName || fieldName }), (0, jsx_runtime_1.jsx)(material_1.Select, { fullWidth: true, defaultValue: '', value: getValues(fieldPath), MenuProps: {
171
+ return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, __assign({}, field, { fullWidth: true, component: "fieldset", className: classes.radioGroup, error: isError, children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { required: true, id: "deviceTypeLabel", variant: "standard", children: labelName || fieldName }), (0, jsx_runtime_1.jsx)(material_1.Select, { variant: "standard", fullWidth: true, defaultValue: '', value: getValues(fieldPath), MenuProps: {
172
172
  anchorOrigin: {
173
173
  vertical: 'bottom',
174
174
  horizontal: 'left',
@@ -1,3 +1,5 @@
1
1
  import { FieldProps, FieldInfo } from "../../interface";
2
+ import { DataObject } from "../../../../AWING";
2
3
  export default function ObjectField(props: FieldProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare const getChilds: <T extends Record<string, DataObject>>(child: T, action: (p: T) => any) => any;
3
5
  export declare const getObjectDefaultValue: (fieldInfo: FieldInfo) => any;
@@ -14,13 +14,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getObjectDefaultValue = void 0;
17
+ exports.getObjectDefaultValue = exports.getChilds = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var ListField_1 = require("./ListField");
20
20
  var material_1 = require("@mui/material");
21
21
  var styles_1 = require("@mui/styles");
22
22
  var TemplateField_1 = __importDefault(require("../../TemplateField"));
23
23
  var react_1 = require("react");
24
+ var Helpers_1 = require("../../../../Utils/Helpers");
25
+ var lodash_1 = require("lodash");
24
26
  var useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
25
27
  root: {
26
28
  textAlign: "center",
@@ -70,13 +72,27 @@ function ObjectField(props) {
70
72
  fieldChild.fieldName.split(".").slice(-1)[0]) }), index)); }) })] }));
71
73
  }
72
74
  exports.default = ObjectField;
75
+ var getChilds = function (child, action) {
76
+ var _a;
77
+ action(child);
78
+ if (((_a = child === null || child === void 0 ? void 0 : child.childrens) === null || _a === void 0 ? void 0 : _a.length) > 0) {
79
+ return child.childrens.map(function (c) { return (0, exports.getChilds)(c, action); });
80
+ }
81
+ };
82
+ exports.getChilds = getChilds;
73
83
  var getObjectDefaultValue = function (fieldInfo) {
74
84
  var _a;
75
85
  var result = {};
76
86
  (_a = fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.childrens) === null || _a === void 0 ? void 0 : _a.map(function (child) {
77
87
  if (child.fieldType !== "list") {
78
- var defaultValue = child.defaultValue || "";
79
- result[child.fieldName.split(".").slice(-1)[0]] = defaultValue;
88
+ var item_1 = {};
89
+ (0, exports.getChilds)(child, function (el) {
90
+ var keys = el.fieldName.split('.');
91
+ if (keys.length > 1) {
92
+ (0, Helpers_1.setObject)(item_1, keys, el.defaultValue);
93
+ }
94
+ });
95
+ result[child.fieldName.split(".").slice(-1)[0]] = (0, lodash_1.get)(item_1, child.fieldName);
80
96
  }
81
97
  else {
82
98
  result[child.fieldName.split(".").slice(-1)[0]] =
@@ -106,7 +106,7 @@ var addChilds = function (fields, fieldInfo) {
106
106
  return result;
107
107
  };
108
108
  var convertToTreeData = function (data) {
109
- return data
109
+ var treeData = data
110
110
  .map(function (item) { return addChilds(data, item); })
111
111
  .filter(function (item) { return !item.fieldName.includes("."); })
112
112
  .map(function (item) {
@@ -121,4 +121,5 @@ var convertToTreeData = function (data) {
121
121
  return item;
122
122
  }
123
123
  });
124
+ return treeData;
124
125
  };
@@ -1,2 +1,3 @@
1
- export declare function ViewTemplate(props: any): import("react/jsx-runtime").JSX.Element;
1
+ import { ViewTemplateProps } from "./interface";
2
+ export declare function ViewTemplate(props: ViewTemplateProps): import("react/jsx-runtime").JSX.Element;
2
3
  export default ViewTemplate;
@@ -1,3 +1,4 @@
1
+ import { PageViewEvent } from "../../ACM-AXN/Page/Types";
1
2
  export interface Configs {
2
3
  TEMPLATE_FILE_PATH?: string;
3
4
  FILE_TEMP_PATH?: string;
@@ -48,6 +49,9 @@ export interface FieldProps {
48
49
  onNotifyError: (errorMessage: string) => void;
49
50
  onUploadFile: (files: any[]) => Promise<string>;
50
51
  }
52
+ export interface ViewTemplateEvents extends Omit<PageViewEvent, 'viewNumber'> {
53
+ protected?: boolean;
54
+ }
51
55
  export interface ViewTemplateProps {
52
56
  templateDatas: FieldInfo[];
53
57
  /**
@@ -90,5 +94,6 @@ export interface ViewTemplateProps {
90
94
  * Hiển thị thông báo lỗi
91
95
  */
92
96
  onNotifyError?: (errorMessage: string) => void;
93
- onUploadFile: (files: any[]) => Promise<string>;
97
+ onUploadFile: (files: any[]) => Promise<any>;
98
+ viewEvents?: ViewTemplateEvents[];
94
99
  }
@@ -60,7 +60,7 @@ var AdvancedSearch = function (props) {
60
60
  : undefined, onChange: function (val) {
61
61
  var _a;
62
62
  return onChangeValue(__assign(__assign({}, value), (_a = {}, _a[fieldName] = val, _a)));
63
- }, isOutsideRange: fieldDef.isOutsideRange, isDayBlocked: fieldDef.isDayBlocked, children: fieldDef.label }, fieldName));
63
+ }, isOutsideRange: fieldDef.isOutsideRange, isDayBlocked: fieldDef.isDayBlocked, isShowCalendarInfo: fieldDef.isShowCalendarInfo, children: fieldDef.label }, fieldName));
64
64
  case 'directory':
65
65
  return ((0, jsx_runtime_1.jsx)(DirectoryTree_1.default, { labelSearch: fieldDef.label, rootDirectoryId: fieldDef.rootId || '', defaultValue: fieldValue, options: options !== null && options !== void 0 ? options : [], onChange: function (val) {
66
66
  var _a;
@@ -7,6 +7,7 @@ export interface AdvancedSearchFieldDefinition extends BaseTextFieldProps {
7
7
  icon?: React.ReactElement;
8
8
  label: string;
9
9
  type: 'select' | 'date-range' | 'autocomplete' | 'directory';
10
+ isShowCalendarInfo?: boolean;
10
11
  options?: MenuOption[];
11
12
  loading?: boolean;
12
13
  width?: number;
@@ -33,8 +33,10 @@ var jsx_runtime_1 = require("react/jsx-runtime");
33
33
  var BasicDataForm_1 = __importDefault(require("./BasicDataForm"));
34
34
  var i18n_1 = __importDefault(require("../../i18n"));
35
35
  var react_i18next_1 = require("react-i18next");
36
+ var x_date_pickers_1 = require("@mui/x-date-pickers");
37
+ var AdapterMoment_1 = require("@mui/x-date-pickers/AdapterMoment");
36
38
  function BasicDataForm(props) {
37
- return ((0, jsx_runtime_1.jsx)(react_i18next_1.I18nextProvider, { i18n: i18n_1.default, children: (0, jsx_runtime_1.jsx)(BasicDataForm_1.default, __assign({}, props)) }));
39
+ return ((0, jsx_runtime_1.jsx)(react_i18next_1.I18nextProvider, { i18n: i18n_1.default, children: (0, jsx_runtime_1.jsx)(x_date_pickers_1.LocalizationProvider, { dateAdapter: AdapterMoment_1.AdapterMoment, children: (0, jsx_runtime_1.jsx)(BasicDataForm_1.default, __assign({}, props)) }) }));
38
40
  }
39
41
  exports.BasicDataForm = BasicDataForm;
40
42
  __exportStar(require("./interface"), exports);
@@ -21,14 +21,14 @@ export interface BasicFieldDefinition extends BaseTextFieldProps {
21
21
  /**
22
22
  * Định dạng regex cho hàm textValid
23
23
  */
24
- pattern?: RegExp;
24
+ pattern?: RegExp | false;
25
25
  /**
26
26
  *
27
27
  * @param value
28
28
  * @param length - Độ dài byte, only type text và text-area
29
29
  * @param pattern - Định dạng regex, only type text và text-area
30
30
  */
31
- checkValid?(value: any, length?: number, pattern?: RegExp): boolean;
31
+ checkValid?(value: any, length?: number, pattern?: RegExp | false): boolean;
32
32
  options?: MenuOption[];
33
33
  loading?: boolean;
34
34
  readOnly?: boolean;
@@ -50,7 +50,7 @@ var DateRangePicker_1 = __importDefault(require("../DateRangePicker"));
50
50
  var react_i18next_1 = require("react-i18next");
51
51
  var ButtonDateRangePicker = function (props) {
52
52
  var t = (0, react_i18next_1.useTranslation)().t;
53
- var defaultValue = props.value, onChange = props.onChange, isOutsideRange = props.isOutsideRange, isDayBlocked = props.isDayBlocked, other = __rest(props, ["value", "onChange", "isOutsideRange", "isDayBlocked"]);
53
+ var defaultValue = props.value, onChange = props.onChange, isOutsideRange = props.isOutsideRange, isDayBlocked = props.isDayBlocked, isShowCalendarInfo = props.isShowCalendarInfo, other = __rest(props, ["value", "onChange", "isOutsideRange", "isDayBlocked", "isShowCalendarInfo"]);
54
54
  var _a = react_1.default.useState(false), open = _a[0], setOpen = _a[1];
55
55
  var anchorRef = react_1.default.useRef(null);
56
56
  var handleToggle = function () {
@@ -105,7 +105,7 @@ var ButtonDateRangePicker = function (props) {
105
105
  dateRange.startDate,
106
106
  dateRange.endDate,
107
107
  ]);
108
- }, isOutsideRange: isOutsideRange, isDayBlocked: isDayBlocked }) })] }) }) }) })));
108
+ }, isOutsideRange: isOutsideRange, isDayBlocked: isDayBlocked, isShowCalendarInfo: isShowCalendarInfo }) })] }) }) }) })));
109
109
  } })] }));
110
110
  };
111
111
  exports.ButtonDateRangePicker = ButtonDateRangePicker;
@@ -5,4 +5,5 @@ export interface ButtonDateRangePickerProps extends ButtonProps {
5
5
  onChange?(value: any): void;
6
6
  isOutsideRange?(date: Moment): boolean;
7
7
  isDayBlocked?(date: Moment): boolean;
8
+ isShowCalendarInfo?: boolean;
8
9
  }
@@ -59,9 +59,9 @@ var ButtonSelect = function (props) {
59
59
  var handleClose = function () {
60
60
  setAnchorEl(null);
61
61
  };
62
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(material_1.Button, __assign({ id: "".concat(elementId, "-button-select"), "aria-controls": "".concat(elementId, "-menu"), "aria-haspopup": "true", "aria-expanded": open ? "true" : undefined, onClick: handleClick, endIcon: (0, jsx_runtime_1.jsx)(KeyboardArrowDown_1.default, {}), style: {
62
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, __assign({ id: "".concat(elementId, "-button-select"), "aria-controls": "".concat(elementId, "-menu"), "aria-haspopup": "true", "aria-expanded": open ? "true" : undefined, onClick: handleClick, endIcon: (0, jsx_runtime_1.jsx)(KeyboardArrowDown_1.default, {}), sx: {
63
63
  textTransform: "none",
64
- color: "white",
64
+ color: function (theme) { return theme.palette.text.primary; },
65
65
  fontWeight: "normal",
66
66
  } }, other)), (0, jsx_runtime_1.jsx)(material_1.Menu, { id: "".concat(elementId, "-menu"), anchorEl: anchorEl, open: open, onClose: handleClose, MenuListProps: {
67
67
  "aria-labelledby": "".concat(elementId, "-button-select"),
@@ -1,12 +1,15 @@
1
+ import { DataObject } from '../../AWING/interface';
2
+ import { ChartOptions, ChartType } from 'chart.js';
1
3
  import 'chartjs-adapter-moment';
2
- import { ChartProps } from 'react-chartjs-2/dist/types';
3
- interface IChartJsContainer extends ChartProps {
4
+ import { BaseChartComponent, ChartProps } from 'react-chartjs-2/dist/types';
5
+ export interface IChartJsContainer extends ChartProps {
4
6
  width?: number;
5
7
  height?: number;
6
8
  timeline?: number;
7
- optionCustom?: any;
8
- chart: any;
9
- dataChart: any;
9
+ optionCustom?: ChartOptions<ChartType>;
10
+ chart: BaseChartComponent;
11
+ dataChart: DataObject[];
12
+ optionsDefault?: boolean;
10
13
  }
11
14
  declare const BarLineComponent: (props: IChartJsContainer) => import("react/jsx-runtime").JSX.Element;
12
15
  export default BarLineComponent;
@@ -19,10 +19,12 @@ var Helpers_1 = require("../../Utils/Helpers");
19
19
  require("chartjs-adapter-moment");
20
20
  var moment_1 = __importDefault(require("moment"));
21
21
  var react_i18next_1 = require("react-i18next");
22
- var Styles_1 = require("./Styles");
22
+ var i18n_1 = __importDefault(require("../../i18n"));
23
23
  var Enums_1 = require("./Enums");
24
+ var Styles_1 = require("./Styles");
24
25
  var BarLineComponent = function (props) {
25
- var t = (0, react_i18next_1.useTranslation)().t;
26
+ var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
27
+ var optionsDefault = props.optionsDefault;
26
28
  var chart = props.chart, _a = props.width, width = _a === void 0 ? 'auto' : _a, _b = props.height, height = _b === void 0 ? 350 : _b, _c = props.timeline, timeline = _c === void 0 ? Enums_1.TYPE_TIMELINE.DAY : _c, _d = props.optionCustom, optionCustom = _d === void 0 ? {} : _d, dataChart = props.dataChart, type = props.type, _e = props.options, options = _e === void 0 ? {
27
29
  responsive: true,
28
30
  maintainAspectRatio: false,
@@ -39,8 +41,8 @@ var BarLineComponent = function (props) {
39
41
  bodySpacing: 8,
40
42
  callbacks: {
41
43
  title: function (tooltipItems) {
42
- //Sửa lại với thời gian theo giờ
43
44
  var _a;
45
+ //Sửa lại với thời gian theo giờ
44
46
  var timeFormat = (_a = tooltipItems[0].raw) === null || _a === void 0 ? void 0 : _a.x;
45
47
  var isTimelineHour = (timeFormat === null || timeFormat === void 0 ? void 0 : timeFormat.length) > 8;
46
48
  if (isTimelineHour) {
@@ -60,7 +62,7 @@ var BarLineComponent = function (props) {
60
62
  .slice(0, -1)
61
63
  .join(' ');
62
64
  }
63
- labels += ' ' + tooltipItem.formattedValue;
65
+ labels += ': ' + tooltipItem.formattedValue;
64
66
  return ' ' + labels;
65
67
  },
66
68
  },
@@ -90,33 +92,37 @@ var BarLineComponent = function (props) {
90
92
  },
91
93
  },
92
94
  scales: {
93
- x: {
94
- type: 'time',
95
- display: true,
96
- grid: { display: false },
97
- time: {
98
- parser: timeline === Enums_1.TYPE_TIMELINE.DAY
99
- ? 'YYYYMMDD'
100
- : 'YYYYMMDDHH',
101
- unit: timeline === Enums_1.TYPE_TIMELINE.DAY ? 'day' : 'hour',
102
- displayFormats: {
103
- day: 'DD/MM',
104
- hour: 'HH:mm',
95
+ x: optionsDefault
96
+ ? {}
97
+ : {
98
+ type: 'time',
99
+ display: true,
100
+ grid: { display: false },
101
+ time: {
102
+ parser: timeline === Enums_1.TYPE_TIMELINE.DAY
103
+ ? 'YYYYMMDD'
104
+ : 'YYYYMMDDHH',
105
+ unit: timeline === Enums_1.TYPE_TIMELINE.DAY
106
+ ? 'day'
107
+ : 'hour',
108
+ displayFormats: {
109
+ day: 'DD/MM',
110
+ hour: 'HH:mm',
111
+ },
105
112
  },
106
- },
107
- offset: true,
108
- ticks: {
109
- maxTicksLimit: 10,
110
- autoSkipPadding: 16,
111
- maxRotation: 0,
112
- },
113
- title: {
114
- font: {
115
- size: 14,
116
- family: 'Roboto',
113
+ offset: true,
114
+ ticks: {
115
+ maxTicksLimit: 10,
116
+ autoSkipPadding: 16,
117
+ maxRotation: 0,
118
+ },
119
+ title: {
120
+ font: {
121
+ size: 14,
122
+ family: 'Roboto',
123
+ },
117
124
  },
118
125
  },
119
- },
120
126
  y: {
121
127
  type: 'linear',
122
128
  display: true,
@@ -1,10 +1,11 @@
1
- import { ChartProps } from 'react-chartjs-2/dist/types';
2
- interface IPieComponent extends ChartProps {
3
- dataConvert?: any;
4
- widthChart?: any;
5
- heightChart?: any;
6
- optionCustom?: any;
7
- chart: any;
1
+ import { ChartData, ChartOptions, ChartType } from 'chart.js';
2
+ import { ChartProps, TypedChartComponent } from 'react-chartjs-2/dist/types';
3
+ export interface IPieComponent extends ChartProps {
4
+ dataConvert?: ChartData<ChartType>;
5
+ widthChart?: number;
6
+ heightChart?: number;
7
+ optionCustom?: ChartOptions<ChartType>;
8
+ chart: TypedChartComponent<"pie">;
8
9
  }
9
10
  declare const PieComponent: ({ chart, data, dataConvert, widthChart, heightChart, optionCustom, options, }: IPieComponent) => import("react/jsx-runtime").JSX.Element;
10
11
  export default PieComponent;
@@ -2,14 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var jsx_runtime_1 = require("react/jsx-runtime");
4
4
  var Helpers_1 = require("../../Utils/Helpers");
5
- // const chartColorDefaults = ['#0055b8', '#dd040c', '#80b0ff']
6
5
  var chartColorDefaults = [
7
6
  '#80b0ff',
8
7
  '#0055b8',
9
8
  '#dd040c',
10
9
  '#aed6dc',
11
10
  '#ff9a8d',
12
- '#4a536b'
11
+ '#4a536b',
13
12
  ];
14
13
  var PieComponent = function (_a) {
15
14
  var chart = _a.chart, data = _a.data, _b = _a.dataConvert, dataConvert = _b === void 0 ? {
@@ -4,8 +4,12 @@ export declare const styledLineFill: (defaultStyle: any, variant: any) => any;
4
4
  export declare const getStyle: (defaultStyle: any, type: any, color: any) => any;
5
5
  export declare const dataSetCommonStyled: {
6
6
  barStyle: {
7
- primary: {};
8
- secondary: {};
7
+ primary: {
8
+ backgroundColor: string;
9
+ };
10
+ secondary: {
11
+ backgroundColor: string;
12
+ };
9
13
  default: {
10
14
  backgroundColor: string;
11
15
  };
@@ -95,8 +95,12 @@ var getStyle = function (defaultStyle, type, color) {
95
95
  exports.getStyle = getStyle;
96
96
  exports.dataSetCommonStyled = {
97
97
  barStyle: {
98
- primary: {},
99
- secondary: {},
98
+ primary: {
99
+ backgroundColor: '#0055b8',
100
+ },
101
+ secondary: {
102
+ backgroundColor: '#dd040c',
103
+ },
100
104
  default: {
101
105
  backgroundColor: '#80b0ff',
102
106
  },
@@ -0,0 +1,3 @@
1
+ import BarLineComponent from './BarLineComponent';
2
+ import PieComponent from './PieComponent';
3
+ export { BarLineComponent, PieComponent };
@@ -0,0 +1,10 @@
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.PieComponent = exports.BarLineComponent = void 0;
7
+ var BarLineComponent_1 = __importDefault(require("./BarLineComponent"));
8
+ exports.BarLineComponent = BarLineComponent_1.default;
9
+ var PieComponent_1 = __importDefault(require("./PieComponent"));
10
+ exports.PieComponent = PieComponent_1.default;
@@ -43,14 +43,14 @@ var GeoFencing_1 = __importDefault(require("../../ACM-AXN/GeoFencing"));
43
43
  var i18n_1 = __importDefault(require("../../i18n"));
44
44
  var omit = require('lodash/omit');
45
45
  function DataInput(props) {
46
- var _a, _b, _c, _d, _e, _f, _g, _h;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47
47
  var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
48
48
  var fieldDefinition = props.fieldDefinition, onChange = props.onChange, value = props.value, error = props.error, disableHelperText = props.disableHelperText;
49
49
  var fieldName = fieldDefinition.fieldName, type = fieldDefinition.type, onValidate = fieldDefinition.onValidate, min = fieldDefinition.min, max = fieldDefinition.max, other = __rest(fieldDefinition, ["fieldName", "type", "onValidate", "min", "max"]);
50
- var _j = react_2.default.useState(t('Common.InvalidData')), errorText = _j[0], setErrorText = _j[1];
50
+ var _k = react_2.default.useState(t('Common.InvalidData')), errorText = _k[0], setErrorText = _k[1];
51
51
  var checkValidationValue = function (fieldDefinition, val) {
52
52
  if (!fieldDefinition.required &&
53
- (val === undefined || val === null || val === '' || val === []))
53
+ (val === undefined || val === null || val === '' || (Array.isArray(val) && val.length === 0)))
54
54
  return true;
55
55
  if (fieldDefinition.onValidate)
56
56
  return fieldDefinition.onValidate(val, fieldDefinition === null || fieldDefinition === void 0 ? void 0 : fieldDefinition.length, fieldDefinition === null || fieldDefinition === void 0 ? void 0 : fieldDefinition.pattern);
@@ -63,6 +63,8 @@ function DataInput(props) {
63
63
  else
64
64
  return (0, validation_1.notNullValid)(val);
65
65
  }
66
+ case 'multiple-hierarchical':
67
+ return (0, validation_1.arrayIsNotEmptyValid)(val);
66
68
  case 'month':
67
69
  case 'date':
68
70
  return (0, validation_1.dateValid)(val);
@@ -108,10 +110,10 @@ function DataInput(props) {
108
110
  case 'autocomplete': {
109
111
  return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { multiple: fieldDefinition.multiple, options: fieldDefinition.options, getOptionLabel: function (option) { var _a, _b; return (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.text) !== null && _b !== void 0 ? _b : ''; }, isOptionEqualToValue: function (option, value) {
110
112
  return (option === null || option === void 0 ? void 0 : option.value) === (value === null || value === void 0 ? void 0 : value.value);
111
- }, onChange: function (e, value) {
113
+ }, disableclearable: fieldDefinition.disableClearable, getOptionDisabled: function (option) { return option === null || option === void 0 ? void 0 : option.disabled; }, onChange: function (e, value) {
112
114
  var newValue = fieldDefinition.multiple
113
- ? value.map(function (x) { return x.value; })
114
- : value.value;
115
+ ? value.map(function (x) { return x === null || x === void 0 ? void 0 : x.value; })
116
+ : value === null || value === void 0 ? void 0 : value.value;
115
117
  onChange(newValue, checkValidationValue(fieldDefinition, newValue));
116
118
  }, value: fieldDefinition.multiple
117
119
  ? fieldDefinition.options.filter(function (x) {
@@ -155,7 +157,7 @@ function DataInput(props) {
155
157
  }, readOnly: fieldDefinition.readOnly }));
156
158
  }
157
159
  case 'date-range': {
158
- var _k = other, isDayBlocked = _k.isDayBlocked, isOutsideRange = _k.isOutsideRange;
160
+ var _l = other, isDayBlocked = _l.isDayBlocked, isOutsideRange = _l.isOutsideRange;
159
161
  return ((0, jsx_runtime_1.jsx)(AWING_1.DateRangePicker, { noBorder: true, variant: "standard", textFieldProps: __assign({ fullWidth: true, style: { margin: '8px 0px' } }, omit(other, ['isDayBlocked', 'isOutsideRange'])), value: {
160
162
  startDate: (value === null || value === void 0 ? void 0 : value[0]) || null,
161
163
  endDate: (value === null || value === void 0 ? void 0 : value[1]) || null,
@@ -168,8 +170,8 @@ function DataInput(props) {
168
170
  }
169
171
  case 'number': {
170
172
  return ((0, jsx_runtime_1.jsx)(AWING_1.NumberFormat, __assign({ id: fieldName.toString(), name: fieldName.toString(), fullWidth: true, variant: "standard" }, other, { value: value !== null && value !== void 0 ? value : '', onChange: function (event) {
171
- var newValue = event.target.value;
172
- onChange(event.target.value, checkValidationValue(fieldDefinition, newValue));
173
+ var newValue = Number(event.target.value);
174
+ onChange(newValue, checkValidationValue(fieldDefinition, newValue));
173
175
  }, error: error, helperText: !disableHelperText && error
174
176
  ? (_e = fieldDefinition.helperText) !== null && _e !== void 0 ? _e : t('Common.InvalidData')
175
177
  : '' })));
@@ -208,6 +210,13 @@ function DataInput(props) {
208
210
  }), { children: (_a = item.label) !== null && _a !== void 0 ? _a : item.text }), "".concat(fieldName.toString(), "-opt-").concat(index)));
209
211
  })] })));
210
212
  }
213
+ case 'multiple-hierarchical': {
214
+ return ((0, jsx_runtime_1.jsx)(AWING_1.MultipleHierarchicalChoice, __assign({}, fieldDefinition, { variant: "standard", value: value, onChange: function (value) {
215
+ onChange(value, checkValidationValue(fieldDefinition, value));
216
+ }, error: error, helperText: !disableHelperText && error
217
+ ? (_h = fieldDefinition.helperText) !== null && _h !== void 0 ? _h : t('Common.InvalidData')
218
+ : '' })));
219
+ }
211
220
  case 'geo-fencing': {
212
221
  var configs = fieldDefinition.configs, label = fieldDefinition.label, initValue = fieldDefinition.initValue, value_1 = fieldDefinition.value, limit = fieldDefinition.limit, isOnlyMap = fieldDefinition.isOnlyMap;
213
222
  return ((0, jsx_runtime_1.jsx)("div", { style: { marginTop: '16px' }, children: (0, jsx_runtime_1.jsx)(GeoFencing_1.default, { configs: configs, label: label, initValue: initValue, value: value_1, limit: limit, isOnlyMap: isOnlyMap, onChange: function (newValue) {
@@ -218,7 +227,7 @@ function DataInput(props) {
218
227
  return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({ id: fieldName.toString(), name: fieldName.toString(), type: fieldDefinition.type, fullWidth: true, variant: "standard" }, other, { value: value !== null && value !== void 0 ? value : '', onChange: function (event) {
219
228
  return onChange(event.target.value, checkValidationValue(fieldDefinition, event.target.value));
220
229
  }, error: error, helperText: !disableHelperText && error
221
- ? (_h = fieldDefinition.helperText) !== null && _h !== void 0 ? _h : t('Common.InvalidData')
230
+ ? (_j = fieldDefinition.helperText) !== null && _j !== void 0 ? _j : t('Common.InvalidData')
222
231
  : '' })));
223
232
  }
224
233
  }