awing-library 2.1.3 → 2.1.4

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 (66) hide show
  1. package/lib/ACM-AXN/Campaign/index.js +2 -1
  2. package/lib/ACM-AXN/DomainPreview/PreviewButton.js +50 -27
  3. package/lib/ACM-AXN/Notifications/Constant.d.ts +144 -0
  4. package/lib/ACM-AXN/Notifications/Constant.js +134 -0
  5. package/lib/ACM-AXN/Notifications/Context.d.ts +8 -0
  6. package/lib/ACM-AXN/Notifications/Context.js +10 -0
  7. package/lib/ACM-AXN/Notifications/Hooks.d.ts +7 -0
  8. package/lib/ACM-AXN/Notifications/Hooks.js +17 -0
  9. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/ButtonTabs.js +26 -20
  10. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.d.ts +1 -1
  11. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.js +30 -39
  12. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.d.ts +2 -5
  13. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.js +18 -15
  14. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.d.ts +1 -1
  15. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.js +15 -15
  16. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.d.ts +0 -6
  17. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.test.js +29 -28
  18. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.d.ts +10 -0
  19. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.js +380 -0
  20. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.d.ts +1 -1
  21. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.js +3 -3
  22. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.test.d.ts +0 -6
  23. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.test.js +38 -48
  24. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.d.ts +2 -2
  25. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.js +32 -32
  26. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.test.d.ts +0 -6
  27. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.test.js +65 -73
  28. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.d.ts +4 -11
  29. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.js +46 -36
  30. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.test.d.ts +0 -6
  31. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.test.js +56 -50
  32. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationLoading.js +30 -30
  33. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.d.ts +3 -15
  34. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.js +35 -4
  35. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.test.d.ts +0 -6
  36. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.test.js +88 -83
  37. package/lib/ACM-AXN/Notifications/NotificationDetail/index.d.ts +1 -1
  38. package/lib/ACM-AXN/Notifications/NotificationDetail/index.js +101 -100
  39. package/lib/ACM-AXN/Notifications/{NotificationPopover.d.ts → NotificationPopover/Container.d.ts} +2 -2
  40. package/lib/ACM-AXN/Notifications/NotificationPopover/Container.js +149 -0
  41. package/lib/ACM-AXN/Notifications/{NotificationPopover.test.d.ts → NotificationPopover/Container.test.d.ts} +1 -1
  42. package/lib/ACM-AXN/Notifications/{NotificationPopover.test.js → NotificationPopover/Container.test.js} +5 -5
  43. package/lib/ACM-AXN/Notifications/NotificationPopover/index.d.ts +8 -0
  44. package/lib/ACM-AXN/Notifications/NotificationPopover/index.js +13 -0
  45. package/lib/ACM-AXN/Notifications/NotificationScreen.d.ts +1 -1
  46. package/lib/ACM-AXN/Notifications/NotificationScreen.js +4 -4
  47. package/lib/ACM-AXN/Notifications/Types.d.ts +241 -0
  48. package/lib/ACM-AXN/Notifications/Types.js +290 -0
  49. package/lib/ACM-AXN/Notifications/index.d.ts +2 -2
  50. package/lib/ACM-AXN/Notifications/index.js +5 -5
  51. package/lib/ACM-AXN/Page/Container.js +2 -2
  52. package/lib/ACM-AXN/Page/index.js +2 -1
  53. package/lib/ACM-AXN/PlaceGroup/Context.d.ts +1 -1
  54. package/lib/ACM-AXN/ViewTemplate/TemplateField/Fields/BasicField/index.js +1 -1
  55. package/lib/AWING/Directory/CreateDirectory.d.ts +3 -0
  56. package/lib/AWING/Directory/CreateDirectory.js +27 -10
  57. package/lib/Commons/Components/ClassicBaseDrawer.d.ts +1 -0
  58. package/lib/Commons/Components/ClassicBaseDrawer.js +7 -3
  59. package/lib/translate/en/translation.json +53 -0
  60. package/lib/translate/vi/translation.json +53 -0
  61. package/package.json +2 -1
  62. package/lib/ACM-AXN/Notifications/NotificationDetail/Common.d.ts +0 -39
  63. package/lib/ACM-AXN/Notifications/NotificationDetail/Common.js +0 -304
  64. package/lib/ACM-AXN/Notifications/NotificationPopover.js +0 -69
  65. package/lib/ACM-AXN/Page/ViewDomain/index.d.ts +0 -9
  66. package/lib/ACM-AXN/Page/ViewDomain/index.js +0 -148
@@ -1,39 +0,0 @@
1
- /**
2
- *
3
- * @author dauquan1108@gmail.com on 11/28/2023.
4
- *
5
- **/
6
- declare const types: {
7
- /** Tab Tất cả "All" */
8
- ALL: string;
9
- /** Tab chưa đọc "Unread" */
10
- UNREAD: string;
11
- /** Value item menu "Đánh dấu tất cả là đã đọc" */
12
- SELECTALL: string;
13
- /** Value item menu "Cài đặt thông báo" */
14
- NOTIFICATIONSETTINGSCREEN: string;
15
- /**Đường dẫn đến trang chi tiết thông báo */
16
- NOTIFICATIONS: string;
17
- };
18
- declare const notificationsFake: ({
19
- id: string;
20
- content: string;
21
- url: string;
22
- status: boolean;
23
- userName: string;
24
- avatarUrl: string;
25
- time: string;
26
- } | {
27
- id: string;
28
- content: string;
29
- url: string;
30
- status: boolean;
31
- userName: string;
32
- avatarUrl: string;
33
- time: number;
34
- })[];
35
- declare const callAPI: {
36
- /** Số lượng mặc định khi thực hiện lấy mới dữ liệu từ server*/
37
- limit: number;
38
- };
39
- export { types, callAPI, notificationsFake };
@@ -1,304 +0,0 @@
1
- "use strict";
2
- /**
3
- *
4
- * @author dauquan1108@gmail.com on 11/28/2023.
5
- *
6
- **/
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.notificationsFake = exports.callAPI = exports.types = void 0;
9
- var types = {
10
- /** Tab Tất cả "All" */
11
- ALL: "All",
12
- /** Tab chưa đọc "Unread" */
13
- UNREAD: "Unread",
14
- /** Value item menu "Đánh dấu tất cả là đã đọc" */
15
- SELECTALL: "SelectAll",
16
- /** Value item menu "Cài đặt thông báo" */
17
- NOTIFICATIONSETTINGSCREEN: "NotificationSettingScreen",
18
- /**Đường dẫn đến trang chi tiết thông báo */
19
- NOTIFICATIONS: "notifications"
20
- };
21
- exports.types = types;
22
- var notificationsFake = [
23
- {
24
- id: "1",
25
- content: "<p>Chiến dịch <a href=\"https://github.com/dauquan1108\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Đậu Xuân Quân\">Đậu Xuân Quân</a> đã được cập nhật.</p>",
26
- url: "https://awing.vn/",
27
- status: true,
28
- userName: "Đậu Xuân Quân",
29
- avatarUrl: "https://i.pinimg.com/564x/7d/be/68/7dbe686677277a06de561b16c1e2740b.jpg",
30
- time: "2023-12-06 10:30"
31
- },
32
- {
33
- id: "2",
34
- content: "<p>Địa chỉ WMP_6786_VM + TNH 17 Nguyễn Văn Linh thuộc domain Địa chỉ WMP_6786_VM + TNH 17 Nguyễn Văn Linh thuộc domain Địa chỉ WMP_6786_VM + TNH 17 Nguyễn Văn Linh thuộc domain Địa chỉ WMP_6786_VM + TNH 17 Nguyễn Văn Linh thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
35
- url: "https://awing.vn/",
36
- status: true,
37
- userName: "Đậu Xuân Quân",
38
- avatarUrl: "https://i.pinimg.com/564x/7d/be/68/7dbe686677277a06de561b16c1e2740b.jpg",
39
- time: "2023-12-05 15:30"
40
- },
41
- {
42
- id: "3",
43
- content: "<p>Địa chỉ WMP_6787_VM + DNI 55/7 Phạm Văn Đồng thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
44
- url: "https://awing.vn/",
45
- status: true,
46
- userName: "Phạm Văn Đồng",
47
- avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
48
- time: "02-12-2023 10:30"
49
- },
50
- {
51
- id: "4",
52
- content: "<p>Địa chỉ WMP_6788_VM + 98 Dương Quảng Hàm thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
53
- url: "https://awing.vn/",
54
- status: true,
55
- userName: "Winmart",
56
- avatarUrl: "https://i.pinimg.com/564x/36/16/f3/3616f381a63e64ad00cdfb2a1fe07a5e.jpg",
57
- time: "2023/12/01 15:30"
58
- },
59
- {
60
- id: "5",
61
- content: "<p>Địa chỉ WMP_6789_VM + TNH Cầu Giấy thuộc domain <a href=\"https://ahacafe.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">aHa CAFF</a> đã bị từ chối join netWork.</p>",
62
- url: "https://awing.vn/",
63
- status: false,
64
- userName: "Đậu Xuân Quân",
65
- avatarUrl: "https://i.pinimg.com/564x/e2/58/45/e25845a241fdbc32edfa22d3362ba5aa.jpg",
66
- time: "2023/12/01 15:30"
67
- },
68
- {
69
- id: "6",
70
- content: "<p>Chiến dịch <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã được cập nhật.</p>",
71
- url: "https://awing.vn/",
72
- status: false,
73
- userName: "CAFE ÔNG BẦU",
74
- avatarUrl: "https://i.pinimg.com/564x/e2/58/45/e25845a241fdbc32edfa22d3362ba5aa.jpg",
75
- time: "30/11/2023"
76
- },
77
- {
78
- id: "7",
79
- content: "<p>Địa chỉ WMP_5003_VM + TNH 17 Nguyễn Văn Linh thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
80
- url: "https://awing.vn/",
81
- status: true,
82
- userName: "Nguyễn Văn Linh",
83
- avatarUrl: "https://i.pinimg.com/564x/95/1f/7a/951f7ab8d374337e88c7065065927bf9.jpg",
84
- time: 1701244363
85
- },
86
- {
87
- id: "8",
88
- content: "<p>Địa chỉ CAFE ÔNG BẦU_HN_331 Hoàng Diệu thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
89
- url: "https://awing.vn/",
90
- status: false,
91
- userName: "Hoàng Diệu",
92
- avatarUrl: "https://i.pinimg.com/564x/af/f7/bd/aff7bd16b0c46ff3a33e302c19e72368.jpg",
93
- time: 1701244363
94
- },
95
- {
96
- id: "9",
97
- content: "<p>Địa chỉ WMP_5001_VM CAFE ÔNG BẦU_HN_331 Hoàng Diệu thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
98
- url: "https://awing.vn/",
99
- status: false,
100
- userName: "Đậu Xuân Quân",
101
- avatarUrl: "https://i.pinimg.com/564x/95/1f/7a/951f7ab8d374337e88c7065065927bf9.jpg",
102
- time: 1701244363
103
- },
104
- {
105
- id: "10",
106
- content: "\n" +
107
- "<p>Địa chỉ WMP_5000_VM + TNH Cầu Giấy thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
108
- url: "https://awing.vn/",
109
- status: false,
110
- userName: "Đậu Xuân Quân",
111
- avatarUrl: "https://i.pinimg.com/564x/81/e9/35/81e935eb96f3be8dbbf61849e5153d3b.jpg",
112
- time: 1701244363
113
- },
114
- {
115
- id: "11",
116
- content: "<p>Chiến dịch <a href=\"https://github.com/dauquan1108\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Đậu Xuân Quân\">Đậu Xuân Quân</a> đã được cập nhật.</p>",
117
- url: "https://awing.vn/",
118
- status: true,
119
- userName: "Đậu Xuân Quân",
120
- avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
121
- time: 1701244363
122
- },
123
- {
124
- id: "12",
125
- content: "<p>Địa chỉ WMP_6786_VM + TNH 17 Nguyễn Văn Linh thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
126
- url: "https://awing.vn/",
127
- status: true,
128
- userName: "Đậu Xuân Quân",
129
- avatarUrl: "https://i.pinimg.com/564x/bd/be/ed/bdbeed3fbbd014bc52bb4fb888f6a0bb.jpg",
130
- time: 1701244363
131
- },
132
- {
133
- id: "13",
134
- content: "<p>Địa chỉ WMP_6787_VM + DNI 55/7 Phạm Văn Đồng thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
135
- url: "https://awing.vn/",
136
- status: true,
137
- userName: "Phạm Văn Đồng",
138
- avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
139
- time: 1701244363
140
- },
141
- {
142
- id: "14",
143
- content: "<p>Địa chỉ WMP_6788_VM + 98 Dương Quảng Hàm thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
144
- url: "https://awing.vn/",
145
- status: true,
146
- userName: "Winmart",
147
- avatarUrl: "https://i.pinimg.com/564x/bd/be/ed/bdbeed3fbbd014bc52bb4fb888f6a0bb.jpg",
148
- time: 1701244363
149
- },
150
- {
151
- id: "15",
152
- content: "<p>Địa chỉ WMP_6789_VM + TNH Cầu Giấy thuộc domain <a href=\"https://ahacafe.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">aHa CAFF</a> đã bị từ chối join netWork.</p>",
153
- url: "https://awing.vn/",
154
- status: false,
155
- userName: "Đậu Xuân Quân",
156
- avatarUrl: "https://i.pinimg.com/564x/e2/58/45/e25845a241fdbc32edfa22d3362ba5aa.jpg",
157
- time: 1701244363
158
- },
159
- {
160
- id: "16",
161
- content: "<p>Chiến dịch <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã được cập nhật.</p>",
162
- url: "https://awing.vn/",
163
- status: false,
164
- userName: "CAFE ÔNG BẦU",
165
- avatarUrl: "https://i.pinimg.com/564x/e2/58/45/e25845a241fdbc32edfa22d3362ba5aa.jpg",
166
- time: 1701244363
167
- },
168
- {
169
- id: "17",
170
- content: "<p>Địa chỉ WMP_5003_VM + TNH 17 Nguyễn Văn Linh thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
171
- url: "https://awing.vn/",
172
- status: true,
173
- userName: "Nguyễn Văn Linh",
174
- avatarUrl: "https://i.pinimg.com/564x/95/1f/7a/951f7ab8d374337e88c7065065927bf9.jpg",
175
- time: 1701244363
176
- },
177
- {
178
- id: "18",
179
- content: "<p>Địa chỉ CAFE ÔNG BẦU_HN_331 Hoàng Diệu thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
180
- url: "https://awing.vn/",
181
- status: false,
182
- userName: "Hoàng Diệu",
183
- avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
184
- time: 1701244363
185
- },
186
- {
187
- id: "19",
188
- content: "<p>Địa chỉ WMP_5001_VM CAFE ÔNG BẦU_HN_331 Hoàng Diệu thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
189
- url: "https://awing.vn/",
190
- status: false,
191
- userName: "Đậu Xuân Quân",
192
- avatarUrl: "https://i.pinimg.com/564x/95/1f/7a/951f7ab8d374337e88c7065065927bf9.jpg",
193
- time: 1701244363
194
- },
195
- {
196
- id: "20",
197
- content: "\n" +
198
- "<p>Địa chỉ WMP_5000_VM + TNH Cầu Giấy thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
199
- url: "https://awing.vn/",
200
- status: false,
201
- userName: "Đậu Xuân Quân",
202
- avatarUrl: "https://i.pinimg.com/564x/81/e9/35/81e935eb96f3be8dbbf61849e5153d3b.jpg",
203
- time: 1701244363
204
- },
205
- //
206
- //
207
- // {
208
- // id: "21",
209
- // content: "<p>Chiến dịch <a href=\"https://github.com/dauquan1108\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Đậu Xuân Quân\">Đậu Xuân Quân</a> đã được cập nhật.</p>",
210
- // url: "https://awing.vn/",
211
- // status: false,
212
- // userName: "Đậu Xuân Quân",
213
- // avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
214
- // time: 1701244363
215
- // },
216
- // {
217
- // id: "22",
218
- // content: "<p>Địa chỉ WMP_6786_VM + TNH 17 Nguyễn Văn Linh thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
219
- // url: "https://awing.vn/",
220
- // status: false,
221
- // userName: "Đậu Xuân Quân",
222
- // avatarUrl: "https://i.pinimg.com/564x/bd/be/ed/bdbeed3fbbd014bc52bb4fb888f6a0bb.jpg",
223
- // time: 1701244363
224
- // },
225
- // {
226
- // id: "23",
227
- // content: "<p>Địa chỉ WMP_6787_VM + DNI 55/7 Phạm Văn Đồng thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
228
- // url: "https://awing.vn/",
229
- // status: false,
230
- // userName: "Phạm Văn Đồng",
231
- // avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
232
- // time: 1701244363
233
- // },
234
- // {
235
- // id: "24",
236
- // content: "<p>Địa chỉ WMP_6788_VM + 98 Dương Quảng Hàm thuộc domain <a href=\"https://winmart.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">Winmart</a> đã bị từ chối join netWork.</p>",
237
- // url: "https://awing.vn/",
238
- // status: false,
239
- // userName: "Winmart",
240
- // avatarUrl: "https://i.pinimg.com/564x/bd/be/ed/bdbeed3fbbd014bc52bb4fb888f6a0bb.jpg",
241
- // time: 1701244363
242
- // },
243
- // {
244
- // id: "25",
245
- // content: "<p>Địa chỉ WMP_6789_VM + TNH Cầu Giấy thuộc domain <a href=\"https://ahacafe.vn/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"Winmart\">aHa CAFF</a> đã bị từ chối join netWork.</p>",
246
- // url: "https://awing.vn/",
247
- // status: false,
248
- // userName: "Đậu Xuân Quân",
249
- // avatarUrl: "https://i.pinimg.com/564x/e2/58/45/e25845a241fdbc32edfa22d3362ba5aa.jpg",
250
- // time: 1701244363
251
- // },
252
- // {
253
- // id: "26",
254
- // content: "<p>Chiến dịch <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã được cập nhật.</p>",
255
- // url: "https://awing.vn/",
256
- // status: false,
257
- // userName: "CAFE ÔNG BẦU",
258
- // avatarUrl: "https://i.pinimg.com/564x/e2/58/45/e25845a241fdbc32edfa22d3362ba5aa.jpg",
259
- // time: 1701244363
260
- // },
261
- // {
262
- // id: "27",
263
- // content: "<p>Địa chỉ WMP_5003_VM + TNH 17 Nguyễn Văn Linh thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
264
- // url: "https://awing.vn/",
265
- // status: false,
266
- // userName: "Nguyễn Văn Linh",
267
- // avatarUrl: "https://i.pinimg.com/564x/95/1f/7a/951f7ab8d374337e88c7065065927bf9.jpg",
268
- // time: 1701244363
269
- // },
270
- // {
271
- // id: "28",
272
- // content: "<p>Địa chỉ CAFE ÔNG BẦU_HN_331 Hoàng Diệu thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
273
- // url: "https://awing.vn/",
274
- // status: false,
275
- // userName: "Hoàng Diệu",
276
- // avatarUrl: "https://i.pinimg.com/564x/0e/75/db/0e75dbc6fec39c17d0c3cda8a69df254.jpg",
277
- // time: 1701244363
278
- // },
279
- // {
280
- // id: "29",
281
- // content: "<p>Địa chỉ WMP_5001_VM CAFE ÔNG BẦU_HN_331 Hoàng Diệu thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
282
- // url: "https://awing.vn/",
283
- // status: false,
284
- // userName: "Đậu Xuân Quân",
285
- // avatarUrl: "https://i.pinimg.com/564x/95/1f/7a/951f7ab8d374337e88c7065065927bf9.jpg",
286
- // time: 1701244363
287
- // },
288
- // {
289
- // id: "30",
290
- // content: "\n" +
291
- // "<p>Địa chỉ WMP_5000_VM + TNH Cầu Giấy thuộc domain <a href=\"https://www.cafeongbau.com/\" target=\"_blank\" style=\"text-decoration: none; color: blue;\" title=\"CAFE ÔNG BẦU\">CAFE ÔNG BẦU</a> đã bị từ chối join netWork.</p>",
292
- // url: "https://awing.vn/",
293
- // status: false,
294
- // userName: "Đậu Xuân Quân",
295
- // avatarUrl: "https://i.pinimg.com/564x/81/e9/35/81e935eb96f3be8dbbf61849e5153d3b.jpg",
296
- // time: 1701244363
297
- // },
298
- ];
299
- exports.notificationsFake = notificationsFake;
300
- var callAPI = {
301
- /** Số lượng mặc định khi thực hiện lấy mới dữ liệu từ server*/
302
- limit: 10,
303
- };
304
- exports.callAPI = callAPI;
@@ -1,69 +0,0 @@
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
- var jsx_runtime_1 = require("react/jsx-runtime");
7
- /**
8
- *
9
- * @author dauquan1108@gmail.com on 12/1/2023.
10
- *
11
- **/
12
- var react_1 = __importDefault(require("react"));
13
- var material_1 = require("@mui/material");
14
- var Notifications_1 = __importDefault(require("@mui/icons-material/Notifications"));
15
- var react_i18next_1 = require("react-i18next");
16
- var i18n_1 = __importDefault(require("../../i18n"));
17
- var NotificationDetail_1 = __importDefault(require("./NotificationDetail"));
18
- var Common_1 = require("./NotificationDetail/Common");
19
- var NotificationPopover = function () {
20
- var _a = react_1.default.useState(null), anchorEl = _a[0], setAnchorEl = _a[1];
21
- var _b = react_1.default.useState(11), totalNotification = _b[0], setTotalNotification = _b[1];
22
- var handleClick = function (event) {
23
- var href = window.location.href;
24
- // nếu đang ở notifications thì click vào quả chuông sẽ không mở popover nữa.
25
- if (!href.includes(Common_1.types.NOTIFICATIONS)) {
26
- setTotalNotification(0);
27
- setAnchorEl(event.currentTarget);
28
- }
29
- };
30
- var handleClose = function () {
31
- setAnchorEl(null);
32
- };
33
- var open = Boolean(anchorEl);
34
- var id = open ? "simple-popover" : undefined;
35
- return ((0, jsx_runtime_1.jsx)(react_i18next_1.I18nextProvider, { i18n: i18n_1.default, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "div", children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-describedby": id, onClick: handleClick, sx: { backgroundColor: open ? "#F98D9C" : "inherit" }, children: (0, jsx_runtime_1.jsx)(material_1.Badge, { badgeContent: totalNotification, color: "error", children: (0, jsx_runtime_1.jsx)(Notifications_1.default, { "data-testid": "notification-icon", sx: { color: open ? "#DD040C" : "inherit" } }) }) }), (0, jsx_runtime_1.jsx)(material_1.Popover, { id: id, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: {
36
- vertical: "bottom",
37
- horizontal: "center"
38
- }, transformOrigin: {
39
- vertical: "top",
40
- horizontal: "center"
41
- }, PaperProps: {
42
- style: {
43
- borderRadius: "8px",
44
- },
45
- }, children: (0, jsx_runtime_1.jsx)(material_1.Box, { "data-testid": "popover", component: "div", sx: [
46
- {
47
- width: "400px",
48
- overflowY: "auto",
49
- maxHeight: "calc(90vh - 8px)",
50
- },
51
- {
52
- "&::-webkit-scrollbar": {
53
- width: "10px",
54
- },
55
- },
56
- {
57
- "&::-webkit-scrollbar-track": {
58
- backgroundColor: "#f1f1f1",
59
- },
60
- },
61
- {
62
- "&::-webkit-scrollbar-thumb": {
63
- borderRadius: "4px",
64
- backgroundColor: "#c1c1c1",
65
- },
66
- },
67
- ], children: (0, jsx_runtime_1.jsx)(NotificationDetail_1.default, {}) }) })] }) }));
68
- };
69
- exports.default = NotificationPopover;
@@ -1,9 +0,0 @@
1
- interface Props {
2
- pageId: string;
3
- open: boolean;
4
- anchorEl: any;
5
- onPreviewClose: (event: any) => void;
6
- onPreviewDomain: (event: any, domainId: string) => void;
7
- }
8
- declare const PagePreview: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
- export default PagePreview;
@@ -1,148 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- var jsx_runtime_1 = require("react/jsx-runtime");
27
- var react_1 = __importStar(require("react"));
28
- var react_i18next_1 = require("react-i18next");
29
- var styles_1 = require("@mui/styles");
30
- var material_1 = require("@mui/material");
31
- var icons_material_1 = require("@mui/icons-material");
32
- var Context_1 = require("../../../Context");
33
- var useStyles = (0, styles_1.makeStyles)(function () {
34
- var _a, _b;
35
- var theme = (0, material_1.useTheme)();
36
- return {
37
- circularProgress: {
38
- width: "10px !important",
39
- height: "10px !important",
40
- margin: "0px auto",
41
- },
42
- drawer: {
43
- width: theme.spacing(60),
44
- },
45
- search: (_a = {
46
- position: "relative",
47
- borderRadius: theme.shape.borderRadius,
48
- backgroundColor: "rgba(255, 255, 255, 0.15)",
49
- "&:hover": {
50
- backgroundColor: "rgba(255, 255, 255, 0.25)",
51
- },
52
- marginRight: theme.spacing(2),
53
- marginLeft: 0,
54
- width: "100%"
55
- },
56
- _a[theme.breakpoints.up("sm")] = {
57
- marginLeft: theme.spacing(3),
58
- width: "auto",
59
- },
60
- _a),
61
- searchIcon: {
62
- padding: theme.spacing(0, 2),
63
- height: "100%",
64
- position: "absolute",
65
- pointerEvents: "none",
66
- display: "flex",
67
- alignItems: "center",
68
- justifyContent: "center",
69
- },
70
- inputRoot: {
71
- color: "inherit",
72
- },
73
- inputInput: (_b = {
74
- padding: theme.spacing(1, 1, 1, 0),
75
- // vertical padding + font size from searchIcon
76
- paddingLeft: "calc(1em + ".concat(theme.spacing(4), "px)"),
77
- transition: theme.transitions.create("width"),
78
- width: "100%"
79
- },
80
- _b[theme.breakpoints.up("md")] = {
81
- width: "20ch",
82
- },
83
- _b),
84
- };
85
- });
86
- var PagePreview = function (props) {
87
- var pageId = props.pageId, open = props.open, anchorEl = props.anchorEl, onPreviewClose = props.onPreviewClose, onPreviewDomain = props.onPreviewDomain;
88
- var appHelper = (0, Context_1.useAwing)().appHelper;
89
- var t = (0, react_i18next_1.useTranslation)().t;
90
- var _a = (0, react_1.useState)(false), loadingFlags = _a[0], setLoadingFlags = _a[1];
91
- var classes = useStyles();
92
- var _b = react_1.default.useState(false), openDrawer = _b[0], setOpenDrawer = _b[1];
93
- var toggleDrawer = function (open) { return function (event) {
94
- event.stopPropagation();
95
- if (event.type === "keydown" &&
96
- (event.key === "Tab" || event.key === "Shift")) {
97
- return;
98
- }
99
- setOpenDrawer(open);
100
- }; };
101
- var _c = react_1.default.useState(""), searchDomainString = _c[0], setSearchDomainString = _c[1];
102
- var _d = react_1.default.useState([]), allDomains = _d[0], setAllDomains = _d[1];
103
- (0, react_1.useEffect)(function () {
104
- setLoadingFlags(true);
105
- }, []);
106
- (0, react_1.useEffect)(function () {
107
- // if (pageId && open === true) {
108
- // DomainService.getAllDomain()
109
- // .then((res) => {
110
- // if (res.data.status === STATUS_CODE.OK) {
111
- // setAllDomains(res.data.data);
112
- // setLoadingFlags(false);
113
- // }
114
- // })
115
- // .catch((err) => Snackbar(SNACKBAR_TYPES.ERROR));
116
- // }
117
- // eslint-disable-next-line react-hooks/exhaustive-deps
118
- }, []);
119
- var translationText = {
120
- searchPlaceholder: t("Common.SearchPlaceholder"),
121
- copyToClipboard: t("Common.Preview"),
122
- other: t("Common.Other"),
123
- };
124
- return ((0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "domain-menu", anchorEl: anchorEl, keepMounted: true, open: open, onClose: onPreviewClose, PaperProps: {
125
- style: {
126
- maxHeight: 48 * 4.5,
127
- width: "25ch",
128
- },
129
- }, children: [loadingFlags ? ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { className: classes.circularProgress, color: "primary" }) })) : (allDomains &&
130
- allDomains.slice(0, 5).map(function (domain) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: function (event) {
131
- onPreviewClose(event);
132
- onPreviewDomain(event, domain.domainId);
133
- }, children: domain.name }, domain.domainId)); })), !loadingFlags && ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: toggleDrawer(true), children: translationText.other })), (0, jsx_runtime_1.jsx)(material_1.Drawer, { anchor: "right", open: openDrawer, onClose: toggleDrawer(false), onClick: function (e) { return e.stopPropagation(); }, children: allDomains.length === 0 ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { className: classes.circularProgress, color: "primary" })) : ((0, jsx_runtime_1.jsxs)(material_1.List, { className: classes.drawer, children: [(0, jsx_runtime_1.jsx)(material_1.ListItem, { component: "div", children: (0, jsx_runtime_1.jsxs)("div", { className: classes.search, children: [(0, jsx_runtime_1.jsx)("div", { className: classes.searchIcon, children: (0, jsx_runtime_1.jsx)(icons_material_1.Search, {}) }), (0, jsx_runtime_1.jsx)(material_1.InputBase, { placeholder: translationText.searchPlaceholder, classes: {
134
- root: classes.inputRoot,
135
- input: classes.inputInput,
136
- }, inputProps: { "aria-label": "search" }, onChange: function (e) { return setSearchDomainString(e.target.value); } })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, {}), allDomains &&
137
- allDomains
138
- .filter(function (d) {
139
- return d.name
140
- .toLowerCase()
141
- .includes(searchDomainString.toLowerCase());
142
- })
143
- .sort(function (a, b) {
144
- return a.name !== b.name ? (a.name < b.name ? -1 : 1) : 0;
145
- })
146
- .map(function (domain) { return ((0, jsx_runtime_1.jsxs)(material_1.ListItem, { button: true, onClick: function (e) { return onPreviewDomain(e, domain.domainId); }, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: domain.name }), (0, jsx_runtime_1.jsx)(material_1.ListItemSecondaryAction, { children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: translationText.copyToClipboard, placement: "left", arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { edge: "end", children: (0, jsx_runtime_1.jsx)(icons_material_1.VisibilityOutlined, { fontSize: "small" }) }) }) })] }, domain.domainId)); })] })) })] }));
147
- };
148
- exports.default = PagePreview;