@argusoft/medplat-core 1.0.10 → 1.0.12

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 (116) hide show
  1. package/dist/index-D6bNg8bx.js +66 -0
  2. package/dist/index-D6bNg8bx.js.map +1 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +99455 -445
  5. package/dist/index.js.map +1 -1
  6. package/package.json +4 -1
  7. package/dist/AccessRights-sgIhYR30.js +0 -1238
  8. package/dist/AccessRights-sgIhYR30.js.map +0 -1
  9. package/dist/AddEditQueryBuilder-BaZxS2Cm.js +0 -289
  10. package/dist/AddEditQueryBuilder-BaZxS2Cm.js.map +0 -1
  11. package/dist/AddEditQueryBuilder.css +0 -1
  12. package/dist/AddFeatures-DLbjDGei.js +0 -212
  13. package/dist/AddFeatures-DLbjDGei.js.map +0 -1
  14. package/dist/AddLabelModal-DE3ploGD.js +0 -734
  15. package/dist/AddLabelModal-DE3ploGD.js.map +0 -1
  16. package/dist/AddMenuConfiguration-QWfpcnuP.js +0 -2237
  17. package/dist/AddMenuConfiguration-QWfpcnuP.js.map +0 -1
  18. package/dist/AddMenuConfiguration.css +0 -1
  19. package/dist/AddRoleDrawer-ZK1eejxI.js +0 -453
  20. package/dist/AddRoleDrawer-ZK1eejxI.js.map +0 -1
  21. package/dist/AppModal-BgZyfrd-.js +0 -428
  22. package/dist/AppModal-BgZyfrd-.js.map +0 -1
  23. package/dist/ChangePasswordModal-MV7g8tkA.js +0 -176
  24. package/dist/ChangePasswordModal-MV7g8tkA.js.map +0 -1
  25. package/dist/ConditionConfig-GDCXIg3C.js +0 -395
  26. package/dist/ConditionConfig-GDCXIg3C.js.map +0 -1
  27. package/dist/ConditionConfig.css +0 -1
  28. package/dist/EntityManagement-D-x6Qzal.js +0 -50
  29. package/dist/EntityManagement-D-x6Qzal.js.map +0 -1
  30. package/dist/EventConfigurations-jGCJ4LqP.js +0 -384
  31. package/dist/EventConfigurations-jGCJ4LqP.js.map +0 -1
  32. package/dist/EventConfigurations.css +0 -1
  33. package/dist/EventsExceptionModal-BF6E1Np7.js +0 -200
  34. package/dist/EventsExceptionModal-BF6E1Np7.js.map +0 -1
  35. package/dist/EventsSkeleton-BN7_0IGs.js +0 -74
  36. package/dist/EventsSkeleton-BN7_0IGs.js.map +0 -1
  37. package/dist/FeatureMenu-BYSRoNm0.js +0 -249
  38. package/dist/FeatureMenu-BYSRoNm0.js.map +0 -1
  39. package/dist/Features-CKMmuqcs.js +0 -11
  40. package/dist/Features-CKMmuqcs.js.map +0 -1
  41. package/dist/FlywayQuery-Cx2sly6g.js +0 -169
  42. package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
  43. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js +0 -5166
  44. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js.map +0 -1
  45. package/dist/ImmunizationConfigurationBase.css +0 -1
  46. package/dist/ImmunizationConfigurationsList-CQnxWa09.js +0 -335
  47. package/dist/ImmunizationConfigurationsList-CQnxWa09.js.map +0 -1
  48. package/dist/ImmunizationSkeleton-D2tdv5k-.js +0 -186
  49. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +0 -1
  50. package/dist/LanguagesModal-rk6IGQwY.js +0 -394
  51. package/dist/LanguagesModal-rk6IGQwY.js.map +0 -1
  52. package/dist/ManageDynamicFeature-BKkCnQvF.js +0 -4189
  53. package/dist/ManageDynamicFeature-BKkCnQvF.js.map +0 -1
  54. package/dist/ManageEventConfiguration-BJxS2Su0.js +0 -1017
  55. package/dist/ManageEventConfiguration-BJxS2Su0.js.map +0 -1
  56. package/dist/ManageEventConfiguration.css +0 -1
  57. package/dist/ManageNotification-B4prX-9Z.js +0 -6819
  58. package/dist/ManageNotification-B4prX-9Z.js.map +0 -1
  59. package/dist/ManageRole-BjIIXAlK.js +0 -728
  60. package/dist/ManageRole-BjIIXAlK.js.map +0 -1
  61. package/dist/ManageTranslation-BTxvSYKb.js +0 -616
  62. package/dist/ManageTranslation-BTxvSYKb.js.map +0 -1
  63. package/dist/ManageTranslation.css +0 -1
  64. package/dist/ManageUser-PHiTNyF8.js +0 -2160
  65. package/dist/ManageUser-PHiTNyF8.js.map +0 -1
  66. package/dist/ManageUser.css +0 -1
  67. package/dist/MobileMenuManagement-DmQU5TTo.js +0 -108
  68. package/dist/MobileMenuManagement-DmQU5TTo.js.map +0 -1
  69. package/dist/MobileTypeEventConfigModal-ChhO_A4f.js +0 -783
  70. package/dist/MobileTypeEventConfigModal-ChhO_A4f.js.map +0 -1
  71. package/dist/NewServerManagement-5YcAtF-g.js +0 -1002
  72. package/dist/NewServerManagement-5YcAtF-g.js.map +0 -1
  73. package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
  74. package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
  75. package/dist/NotificationList-BkpOrCpM.js +0 -400
  76. package/dist/NotificationList-BkpOrCpM.js.map +0 -1
  77. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js +0 -1953
  78. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js.map +0 -1
  79. package/dist/QueryBuilder-Cus_mRwZ.js +0 -378
  80. package/dist/QueryBuilder-Cus_mRwZ.js.map +0 -1
  81. package/dist/QueryBuilder.css +0 -1
  82. package/dist/QueryManagement-DXA73N2j.js +0 -671
  83. package/dist/QueryManagement-DXA73N2j.js.map +0 -1
  84. package/dist/QueryManagement.css +0 -1
  85. package/dist/RoleManagement-v5Nyp1vr.js +0 -416
  86. package/dist/RoleManagement-v5Nyp1vr.js.map +0 -1
  87. package/dist/ServerSyncModal-uNjGCQJz.js +0 -869
  88. package/dist/ServerSyncModal-uNjGCQJz.js.map +0 -1
  89. package/dist/ShowFlywayQuery-DMsAbtOW.js +0 -130
  90. package/dist/ShowFlywayQuery-DMsAbtOW.js.map +0 -1
  91. package/dist/ShowFlywayQuery-DVRCd384.js +0 -259
  92. package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
  93. package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
  94. package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
  95. package/dist/SubMenu-BHcSNSUF.js +0 -187
  96. package/dist/SubMenu-BHcSNSUF.js.map +0 -1
  97. package/dist/TableDetails-DzREeJkm.js +0 -1508
  98. package/dist/TableDetails-DzREeJkm.js.map +0 -1
  99. package/dist/TableList-B9hr05Hs.js +0 -428
  100. package/dist/TableList-B9hr05Hs.js.map +0 -1
  101. package/dist/TypeConfiguration-C-lk8Szs.js +0 -117
  102. package/dist/TypeConfiguration-C-lk8Szs.js.map +0 -1
  103. package/dist/UserList-BxB1tCwM.js +0 -13042
  104. package/dist/UserList-BxB1tCwM.js.map +0 -1
  105. package/dist/UserList.css +0 -1
  106. package/dist/UserListSkeleton-cglK2SaU.js +0 -184
  107. package/dist/UserListSkeleton-cglK2SaU.js.map +0 -1
  108. package/dist/WidgetList-BSApErov.js +0 -188
  109. package/dist/WidgetList-BSApErov.js.map +0 -1
  110. package/dist/_commonjsHelpers-BItOPCY9.js +0 -29
  111. package/dist/_commonjsHelpers-BItOPCY9.js.map +0 -1
  112. package/dist/i18next-CTOWN_jH.js +0 -1394
  113. package/dist/i18next-CTOWN_jH.js.map +0 -1
  114. package/dist/manageImmunization-B4swS745.js +0 -1204
  115. package/dist/manageImmunization-B4swS745.js.map +0 -1
  116. package/dist/manageImmunization.css +0 -1
@@ -1,400 +0,0 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useState as l, useRef as R, useEffect as C, useCallback as re, Suspense as W, lazy as q } from "react";
3
- import { useTranslateProvider as de } from "@/common/languageTranslator/TranslationContext";
4
- import { api as J } from "@/common/interceptors/AxiosInterceptor";
5
- import { getNotifications as U, getAllRoleList as ue } from "@/common/services/GlobalApis";
6
- import me from "@/common/syncWithServer/SyncWithServerDialog";
7
- import { showToast as T } from "@/common/toaster/toaster";
8
- import fe from "@/views/custom-components/CustomConfirmationModal";
9
- import { debounce as pe, Card as he, Typography as D, Box as I, FormControlLabel as Q, Checkbox as G, TextField as ge, Button as ye } from "@mui/material";
10
- import { Grid as S } from "@mui/system";
11
- import N from "prop-types";
12
- import { useSelector as K } from "react-redux";
13
- import { getUseSkeleton as X } from "@/store/reducers/SkeletonReducer";
14
- import be from "@/hooks/useTrackEvent";
15
- import xe from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
16
- import { faPen as Ne, faBars as ve } from "@fortawesome/free-solid-svg-icons";
17
- import { FontAwesomeIcon as H } from "@fortawesome/react-fontawesome";
18
- const we = ({ id: n, state: c }) => J.put(
19
- `notificationtype/${n}?is_active=${c === "INACTIVE" ? "true" : "false"}`
20
- ), De = (n) => J.post("notificationtype", n), Y = ({ children: n, isLoading: c }) => !K(X) || !c ? n : /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
21
- /* @__PURE__ */ s("div", { className: "flex space-between justify-between m-[0px]", children: [
22
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[130px] h-[40px]" }),
23
- /* @__PURE__ */ s("div", { className: "flex", children: [
24
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[150px] h-[40px] mx-[5px]" }),
25
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[100px] h-[40px]" })
26
- ] })
27
- ] }),
28
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-100" })
29
- ] });
30
- Y.propTypes = {
31
- children: N.any,
32
- isLoading: N.any
33
- };
34
- const Ce = ({ children: n, isLoading: c }) => !K(X) || !c ? n : /* @__PURE__ */ s("div", { className: "flex flex-col w-full md:w-[650px] bg-white ", children: [
35
- /* @__PURE__ */ e("div", { className: "px-2 py-2 flex items-center ", children: /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-60 h-10" }) }),
36
- /* @__PURE__ */ e("hr", {}),
37
- /* @__PURE__ */ s("div", { className: "flex flex-col w-full space-y-2 p-2", children: [
38
- /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2", children: [
39
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
40
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
41
- ] }),
42
- /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
43
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
44
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
45
- ] }),
46
- /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
47
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
48
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
49
- ] }),
50
- /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
51
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
52
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
53
- ] }),
54
- /* @__PURE__ */ s("div", { className: "flex flex-col space-y-2 ", children: [
55
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]" }),
56
- /* @__PURE__ */ e("button", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10 " })
57
- ] })
58
- ] }),
59
- /* @__PURE__ */ e("hr", {}),
60
- /* @__PURE__ */ s("div", { className: "px-2 py-2 w-full flex space-x-3 items-center justify-end ", children: [
61
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-20 h-10" }),
62
- /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-20 h-10" })
63
- ] })
64
- ] });
65
- Ce.propTypes = {
66
- children: N.any,
67
- isLoading: N.any
68
- };
69
- const Te = q(() => import("./ManageNotification-B4prX-9Z.js")), Ie = q(() => import("./NotificationFlywayQuery-BY8Zzml_.js"));
70
- function Se() {
71
- const n = be(), [c, b] = l(""), [v, k] = l([]), [A, p] = l([]), [h, r] = l(""), [o, x] = l({}), [w, Z] = l([]), { translate: m } = de(), [E, M] = l(null), [O, f] = l(!1), ee = [
72
- {
73
- field: "notificationName",
74
- label: "Name",
75
- sortable: !0,
76
- sortOrder: "asc",
77
- align: "left"
78
- },
79
- {
80
- field: "code",
81
- label: "Code",
82
- sortable: !0,
83
- sortOrder: "asc",
84
- align: "left"
85
- },
86
- {
87
- field: "notificationType",
88
- label: "Type",
89
- align: "left",
90
- render: (a) => /* @__PURE__ */ e(D, { mt: 0.5, children: a.notificationType === "WEB" ? "WEB" : "MOBILE" })
91
- },
92
- {
93
- field: "state",
94
- label: "State",
95
- sortable: !0,
96
- sortOrder: "asc",
97
- align: "left"
98
- },
99
- { field: "Actions", label: "Actions", align: "left" }
100
- ], [te, ae] = l(ee), [g, ie] = l(!0), [y, se] = l(!0), L = R(g), B = R(y);
101
- C(() => {
102
- L.current = g;
103
- }, [g]), C(() => {
104
- B.current = y;
105
- }, [y]);
106
- const oe = async () => {
107
- try {
108
- f((t) => !t), await we({ id: o.id, state: o.state }), r("");
109
- const { data: a } = await U();
110
- k(a), p(a), T({
111
- type: "success",
112
- message: `State succesfully changed from ${(o == null ? void 0 : o.state) === "INACTIVE" ? "inactive" : "active"} to ${(o == null ? void 0 : o.state) === "INACTIVE" ? "active" : "inactive"}`
113
- }), f((t) => !t);
114
- } catch (a) {
115
- T({
116
- type: "error",
117
- message: `Error ${a}`
118
- }), f((t) => !t);
119
- }
120
- }, ne = (a) => [
121
- {
122
- label: "",
123
- icon: /* @__PURE__ */ e(
124
- H,
125
- {
126
- icon: Ne,
127
- "data-testid": "notificationlist-button-edit"
128
- }
129
- ),
130
- onClick: (t) => {
131
- r(1), x(t);
132
- }
133
- },
134
- {
135
- label: "",
136
- icon: /* @__PURE__ */ e(
137
- H,
138
- {
139
- icon: ve,
140
- "data-testid": "notificationlist-button-menu"
141
- }
142
- ),
143
- menuItems: [
144
- {
145
- label: m(
146
- a.state === "ACTIVE" ? "Mark as Inactive" : "Mark as Active"
147
- ),
148
- onClick: (t) => {
149
- x(t), r(2);
150
- }
151
- },
152
- {
153
- label: m("Sync With Server"),
154
- onClick: (t) => {
155
- if (!t.uuid) {
156
- T({
157
- type: "info",
158
- message: "No configuration found. Please open the respective feature item and save it."
159
- });
160
- return;
161
- }
162
- r(4), M(t == null ? void 0 : t.uuid), x(t);
163
- }
164
- },
165
- {
166
- label: m("Show Flyway Query"),
167
- onClick: (t) => {
168
- r(3), x(t);
169
- }
170
- }
171
- ]
172
- }
173
- ], _ = re(
174
- pe((a) => {
175
- const t = v.filter(
176
- (i) => {
177
- var d;
178
- return ((d = i.notificationName) == null ? void 0 : d.toLowerCase().includes(a)) && i.state === (L.current ? "ACTIVE" : "INACTIVE") && i.notificationType === (B.current ? "MO" : "WEB");
179
- }
180
- );
181
- n("search_tracking", {
182
- searchTerm: a,
183
- results_count: t.length,
184
- search_type: "Page Search"
185
- }), p(t);
186
- }, 500),
187
- [v, n]
188
- ), le = (a) => {
189
- const t = a.target.value.toLowerCase();
190
- b(t), _(t);
191
- }, ce = (a) => {
192
- const t = a.sortOrder === "asc" ? "desc" : "asc";
193
- ae(
194
- (d) => d.map((u) => u.field === a.field ? { ...u, sortOrder: t } : u)
195
- );
196
- const i = [...A].sort((d, u) => {
197
- var j, z;
198
- const P = (j = d[a.field]) == null ? void 0 : j.toString().toLowerCase(), $ = (z = u[a.field]) == null ? void 0 : z.toString().toLowerCase();
199
- return P < $ ? t === "asc" ? -1 : 1 : P > $ ? t === "asc" ? 1 : -1 : 0;
200
- });
201
- p(i);
202
- }, V = async () => {
203
- try {
204
- f((i) => !i);
205
- const { data: a } = await U();
206
- k(a);
207
- const t = a.filter((i) => i.notificationType === "MO" && i.state === "ACTIVE");
208
- if (p(t), !w.length) {
209
- const { data: i } = await ue();
210
- Z(i);
211
- }
212
- f((i) => !i), b("");
213
- } catch (a) {
214
- console.error("error", a), f((t) => !t);
215
- }
216
- };
217
- C(() => {
218
- V();
219
- }, []);
220
- const F = (a, t) => {
221
- const i = t === "status" ? a : g, d = t === "notificationType" ? a : y;
222
- ie(i), se(d), c ? _(c) : p(
223
- v.filter(
224
- (u) => u.state === (i ? "ACTIVE" : "INACTIVE") && u.notificationType === (d ? "MO" : "WEB")
225
- )
226
- );
227
- };
228
- return /* @__PURE__ */ s(
229
- he,
230
- {
231
- variant: "elevation",
232
- container: !0,
233
- className: "mt-6 p-3 flex flex-col space-y-3 shadow-xl",
234
- children: [
235
- /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(
236
- Te,
237
- {
238
- open: h === 1 || h === 5,
239
- handleClose: () => r(""),
240
- data: h === 1 ? o : null,
241
- roleData: w,
242
- setNotifications: V,
243
- "data-testid": "notification-list-managenotification-dialog"
244
- }
245
- ) }),
246
- /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(
247
- Ie,
248
- {
249
- open: h === 3,
250
- handleClose: () => r(""),
251
- data: o,
252
- roleData: w
253
- }
254
- ) }),
255
- /* @__PURE__ */ e(
256
- fe,
257
- {
258
- title: "CONFIRM ACTION",
259
- open: h === 2,
260
- description: `Are you sure you want to change the state ${(o == null ? void 0 : o.state) === "INACTIVE" ? "inactive" : "active"} to ${(o == null ? void 0 : o.state) === "INACTIVE" ? "active" : "inactive"}`,
261
- handleClick: oe,
262
- handleClose: () => r(""),
263
- dataTestId: "notification-list-customconfirmationmodal-dialog"
264
- }
265
- ),
266
- /* @__PURE__ */ e(
267
- me,
268
- {
269
- isOpen: !!E,
270
- handleClose: () => M(() => null),
271
- featureUUID: E,
272
- dataTestId: "notification-list-syncwithserverdialog-dialog"
273
- }
274
- ),
275
- /* @__PURE__ */ s(Y, { isLoading: O, children: [
276
- /* @__PURE__ */ s(S, { container: !0, className: "flex justify-between", children: [
277
- /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(
278
- D,
279
- {
280
- variant: "body2",
281
- className: "font-bold font-sans text-lg text-customBlue uppercase",
282
- "data-testid": "notification-list-typography-title",
283
- children: m("Notification Configuration")
284
- }
285
- ) }),
286
- /* @__PURE__ */ s(I, { className: "flex flex-col sm:flex-row sm:items-center gap-3 w-full sm:w-auto", children: [
287
- /* @__PURE__ */ s(I, { className: "flex items-center gap-3", children: [
288
- /* @__PURE__ */ e(
289
- Q,
290
- {
291
- control: /* @__PURE__ */ e(
292
- G,
293
- {
294
- checked: g,
295
- onChange: (a) => F(a.target.checked, "status"),
296
- "data-testid": "notifications-checkbox-include-active"
297
- }
298
- ),
299
- label: m("Active"),
300
- slotProps: {
301
- typography: {
302
- className: "custom-label"
303
- }
304
- }
305
- }
306
- ),
307
- /* @__PURE__ */ e(
308
- Q,
309
- {
310
- control: /* @__PURE__ */ e(
311
- G,
312
- {
313
- checked: y,
314
- onChange: (a) => F(a.target.checked, "notificationType"),
315
- "data-testid": "notifications-checkbox-include-mobile"
316
- }
317
- ),
318
- label: m("Mobile"),
319
- slotProps: {
320
- typography: {
321
- className: "custom-label"
322
- }
323
- }
324
- }
325
- )
326
- ] }),
327
- /* @__PURE__ */ s(I, { className: "flex items-center gap-3 w-full sm:w-auto", children: [
328
- /* @__PURE__ */ e(
329
- ge,
330
- {
331
- id: "searchQuery",
332
- placeholder: "Search Text",
333
- size: "small",
334
- onChange: le,
335
- className: "m-0 p-0 bg-white",
336
- value: c,
337
- "data-testid": "notification-list-textfield-search",
338
- sx: {
339
- "& .MuiInputBase-root": {
340
- height: "2.4em",
341
- width: { xs: "100%", sm: "190px" }
342
- },
343
- flex: { xs: 1, sm: 1 }
344
- }
345
- }
346
- ),
347
- /* @__PURE__ */ e(
348
- ye,
349
- {
350
- size: "small",
351
- variant: "contained",
352
- onClick: () => {
353
- n("button_click", {
354
- button_name: "notification-list-add-button",
355
- button_type: "navigate",
356
- button_id: "notification-list-button-add"
357
- }), r(5);
358
- },
359
- "data-testid": "notification-list-button-add",
360
- sx: { whiteSpace: "nowrap" },
361
- children: m("Add")
362
- }
363
- )
364
- ] })
365
- ] })
366
- ] }),
367
- /* @__PURE__ */ e(S, { size: { xs: 12 }, children: /* @__PURE__ */ e(
368
- xe,
369
- {
370
- columns: te,
371
- actions: ne,
372
- tableData: A,
373
- paginationConfig: {
374
- pagination: !1
375
- },
376
- styleConfig: {
377
- tableStyle: {
378
- maxHeight: 40
379
- }
380
- },
381
- handleSort: ce,
382
- isLoading: O,
383
- dataTestId: "notification-list-customizedtable"
384
- }
385
- ) })
386
- ] })
387
- ]
388
- }
389
- );
390
- }
391
- const Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
392
- __proto__: null,
393
- default: Se
394
- }, Symbol.toStringTag, { value: "Module" }));
395
- export {
396
- Ce as M,
397
- Qe as N,
398
- De as P
399
- };
400
- //# sourceMappingURL=NotificationList-BkpOrCpM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificationList-BkpOrCpM.js","sources":["../src/services/Notifications.js","../src/views/Notifications/Skeletons/NotificationsSkeletons.jsx","../src/views/Notifications/NotificationList.jsx"],"sourcesContent":["import { api } from \"@/common/interceptors/AxiosInterceptor\";\nexport const toggleActiveState = ({ id, state }) =>\n api.put(\n `notificationtype/${id}?is_active=${state === \"INACTIVE\" ? \"true\" : \"false\"}`\n );\nexport const PostNotification = (params) =>\n api.post(\"notificationtype\", params);\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\n\nimport { useSelector } from \"react-redux\";\nimport { getUseSkeleton } from \"@/store/reducers/SkeletonReducer\";\n\nexport const NotificationListSkeleton = ({ children, isLoading }) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) {\n return children;\n }\n\n return (\n <div className=\"flex flex-col gap-2\">\n <div className=\"flex space-between justify-between m-[0px]\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[130px] h-[40px]\"></div>\n <div className=\"flex\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[150px] h-[40px] mx-[5px]\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[100px] h-[40px]\"></div>\n </div>\n </div>\n\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-full h-100\"></div>\n </div>\n );\n};\n\nNotificationListSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n\nexport const ManageNotificationSkeleton = ({ children, isLoading }) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) {\n return children;\n }\n\n return (\n <div className=\"flex flex-col w-full md:w-[650px] bg-white \">\n <div className=\"px-2 py-2 flex items-center \">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-60 h-10\"></div>\n </div>\n <hr></hr>\n <div className=\"flex flex-col w-full space-y-2 p-2\">\n <div className=\"flex flex-col space-y-2\">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n <div className=\"flex flex-col space-y-2 \">\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-5 mr-[100px]\"></button>\n <button className=\"bg-gray-300 animate-pulse rounded-sm w-full h-10 \"></button>\n </div>\n </div>\n <hr></hr>\n <div className=\"px-2 py-2 w-full flex space-x-3 items-center justify-end \">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-20 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-20 h-10\"></div>\n </div>\n </div>\n );\n};\n\nManageNotificationSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n","import {\n lazy,\n default as React,\n Suspense,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { useTranslateProvider } from \"@/common/languageTranslator/TranslationContext\";\nimport { toggleActiveState } from \"../../services/Notifications\";\nimport { getAllRoleList, getNotifications } from \"@/common/services/GlobalApis\";\nimport SyncWithServerDialog from \"@/common/syncWithServer/SyncWithServerDialog\";\nimport { showToast } from \"@/common/toaster/toaster\";\nimport CustomConfirmationModal from \"@/views/custom-components/CustomConfirmationModal\";\nconst ManageNotification = lazy(() => import(\"./ManageNotification\"));\nconst NotificationFlywayQuery = lazy(() => import(\"./NotificationFlywayQuery\"));\nimport { Box, Button, Card, Checkbox, debounce, FormControlLabel, TextField, Typography } from \"@mui/material\";\nimport { Grid } from \"@mui/system\";\nimport { NotificationListSkeleton } from \"./Skeletons/NotificationsSkeletons\";\nimport useTrackEvent from \"@/hooks/useTrackEvent\";\nimport CustomizedTable from \"@/views/custom-components/CustomizedTable/CustomizedTableV2\";\nimport { faBars, faPen } from \"@fortawesome/free-solid-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\n/**\n *\n * @module NotificationList\n * @returns {JSX.element}\n *\n */\nexport default function NotificationList() {\n const trackEvent = useTrackEvent();\n const [search, setSearch] = useState(\"\");\n const [notifications, setNotifications] = useState([]);\n const [filteredNotifications, setFilteredNotifications] = useState([]);\n const [openModal, setOpenModal] = useState(\"\");\n const [rowData, setRowData] = useState({});\n const [roleData, setRoleData] = useState([]);\n const { translate } = useTranslateProvider();\n const [featureUuid, setFeatureUuid] = useState(null);\n const [isLoading, setIsLoading] = useState(false);\n const defaultColumns = [\n {\n field: \"notificationName\",\n label: \"Name\",\n sortable: true,\n sortOrder: \"asc\",\n align: \"left\",\n },\n {\n field: \"code\",\n label: \"Code\",\n sortable: true,\n sortOrder: \"asc\",\n align: \"left\",\n },\n {\n field: \"notificationType\",\n label: \"Type\",\n align: \"left\",\n render: (row) => {\n return <Typography mt={0.5}>{row.notificationType === 'WEB' ? 'WEB' : 'MOBILE'}</Typography>;\n }\n },\n {\n field: \"state\",\n label: \"State\",\n sortable: true,\n sortOrder: \"asc\",\n align: \"left\",\n },\n { field: \"Actions\", label: \"Actions\", align: \"left\" },\n ];\n const [columns, setColumns] = useState(defaultColumns);\n const [isActive, setisActive] = useState(true);\n const [isMobile, setisMobile] = useState(true);\n\n const isActiveRef = useRef(isActive);\n const isMobileRef = useRef(isMobile);\n\n useEffect(() => {\n isActiveRef.current = isActive;\n }, [isActive]);\n\n useEffect(() => {\n isMobileRef.current = isMobile;\n }, [isMobile]);\n\n /**\n * Toggles the active/inactive status of a notification.\n * @async\n * @function toggleActiveStatus\n * @returns {Promise<void>} A promise that resolves when the active status has been toggled and notifications reloaded.\n */\n const toggleActiveStatus = async () => {\n try {\n setIsLoading((cur) => !cur);\n await toggleActiveState({ id: rowData.id, state: rowData.state });\n setOpenModal(\"\");\n const { data } = await getNotifications();\n setNotifications(data);\n setFilteredNotifications(data);\n showToast({\n type: \"success\",\n message: `State succesfully changed from ${rowData?.state === \"INACTIVE\" ? \"inactive\" : \"active\"} to ${rowData?.state === \"INACTIVE\" ? \"active\" : \"inactive\"}`,\n });\n setIsLoading((cur) => !cur);\n } catch (error) {\n showToast({\n type: \"error\",\n message: `Error ${error}`,\n });\n setIsLoading((cur) => !cur);\n }\n };\n\n const actions = (row) => [\n {\n label: \"\",\n icon: (\n <FontAwesomeIcon\n icon={faPen}\n data-testid=\"notificationlist-button-edit\"\n />\n ),\n onClick: (e) => {\n setOpenModal(1);\n setRowData(e);\n },\n },\n {\n label: \"\",\n icon: (\n <FontAwesomeIcon\n icon={faBars}\n data-testid=\"notificationlist-button-menu\"\n />\n ),\n menuItems: [\n {\n label: translate(\n row.state === \"ACTIVE\" ? \"Mark as Inactive\" : \"Mark as Active\"\n ),\n onClick: (e) => {\n setRowData(e);\n setOpenModal(2);\n },\n },\n {\n label: translate(\"Sync With Server\"),\n onClick: (e) => {\n if (!e.uuid) {\n showToast({\n type: \"info\",\n message: `No configuration found. Please open the respective feature item and save it.`,\n });\n return;\n }\n setOpenModal(4);\n setFeatureUuid(e?.uuid);\n setRowData(e);\n },\n },\n {\n label: translate(\"Show Flyway Query\"),\n onClick: (e) => {\n setOpenModal(3);\n setRowData(e);\n },\n },\n ],\n },\n ];\n\n const debouncedFilter = useCallback(\n debounce((searchValue) => {\n const filteredData = notifications.filter(d =>\n d.notificationName?.toLowerCase().includes(searchValue) &&\n d.state === (isActiveRef.current ? 'ACTIVE' : 'INACTIVE') &&\n d.notificationType === (isMobileRef.current ? 'MO' : 'WEB')\n );\n trackEvent(\"search_tracking\", {\n searchTerm: searchValue,\n results_count: filteredData.length,\n search_type: \"Page Search\",\n });\n setFilteredNotifications(filteredData);\n }, 500),\n [notifications, trackEvent]\n );\n\n /**\n * Handles the search input to filter notifications by name.\n * @function handleSearch\n * @param {Object} e - The event object from the input field.\n * @param {string} e.target.value - The current value in the search input field.\n */\n const handleSearch = (e) => {\n const searchValue = e.target.value.toLowerCase();\n setSearch(searchValue);\n debouncedFilter(searchValue);\n };\n\n /**\n * Handles sorting of the notification list based on the specified column.\n * @function handleSort\n */\n const handleSort = (column) => {\n const order = column.sortOrder === \"asc\" ? \"desc\" : \"asc\";\n setColumns((prev) =>\n prev.map((col) => {\n if (col.field === column.field) {\n return { ...col, sortOrder: order };\n }\n return col;\n })\n );\n\n const sortedData = [...filteredNotifications].sort((a, b) => {\n const valA = a[column.field]?.toString().toLowerCase();\n const valB = b[column.field]?.toString().toLowerCase();\n\n if (valA < valB) {\n return order === \"asc\" ? -1 : 1;\n }\n if (valA > valB) {\n return order === \"asc\" ? 1 : -1;\n }\n return 0;\n });\n\n setFilteredNotifications(sortedData);\n };\n\n /**\n * Loads initial data for notifications and roles when the component is mounted or when `openModal` changes.\n * @function useEffect\n * @param {boolean} openModal - The state that controls whether a modal is open. Triggers the hook to reload data when it changes.\n */\n\n const loadInitialData = async () => {\n try {\n setIsLoading((cur) => !cur);\n const { data } = await getNotifications();\n setNotifications(data);\n const filteredData = data.filter(d => d.notificationType === 'MO' && d.state === 'ACTIVE');\n setFilteredNotifications(filteredData);\n if (!roleData.length) {\n const { data: roleData } = await getAllRoleList();\n setRoleData(roleData);\n }\n setIsLoading((cur) => !cur);\n setSearch('');\n } catch (error) {\n console.error(\"error\", error);\n setIsLoading((cur) => !cur);\n }\n };\n\n useEffect(() => {\n loadInitialData();\n }, []);\n\n const handleFilter = (value, filterType) => {\n const nextIsActive =\n filterType === 'status' ? value : isActive;\n\n const nextIsMobile =\n filterType === 'notificationType' ? value : isMobile;\n\n setisActive(nextIsActive);\n setisMobile(nextIsMobile);\n\n if (search) {\n debouncedFilter(search);\n } else {\n setFilteredNotifications(\n notifications.filter(d =>\n d.state === (nextIsActive ? 'ACTIVE' : 'INACTIVE') &&\n d.notificationType === (nextIsMobile ? 'MO' : 'WEB')\n )\n );\n }\n };\n\n return (\n <Card\n variant=\"elevation\"\n container\n className=\"mt-6 p-3 flex flex-col space-y-3 shadow-xl\"\n >\n <Suspense>\n <ManageNotification\n open={openModal === 1 || openModal === 5}\n handleClose={() => setOpenModal(\"\")}\n data={openModal === 1 ? rowData : null}\n roleData={roleData}\n setNotifications={loadInitialData}\n data-testid=\"notification-list-managenotification-dialog\"\n />\n </Suspense>\n <Suspense>\n <NotificationFlywayQuery\n open={openModal === 3}\n handleClose={() => setOpenModal(\"\")}\n data={rowData}\n roleData={roleData}\n />\n </Suspense>\n <CustomConfirmationModal\n title={\"CONFIRM ACTION\"}\n open={openModal === 2}\n description={`Are you sure you want to change the state ${rowData?.state === \"INACTIVE\" ? \"inactive\" : \"active\"} to ${rowData?.state === \"INACTIVE\" ? \"active\" : \"inactive\"}`}\n handleClick={toggleActiveStatus}\n handleClose={() => setOpenModal(\"\")}\n dataTestId=\"notification-list-customconfirmationmodal-dialog\"\n />\n <SyncWithServerDialog\n isOpen={Boolean(featureUuid)}\n handleClose={() => setFeatureUuid(() => null)}\n featureUUID={featureUuid}\n dataTestId=\"notification-list-syncwithserverdialog-dialog\"\n />\n <NotificationListSkeleton isLoading={isLoading}>\n <Grid container className=\"flex justify-between\">\n <Grid>\n <Typography\n variant=\"body2\"\n className=\"font-bold font-sans text-lg text-customBlue uppercase\"\n data-testid=\"notification-list-typography-title\"\n >\n {translate(\"Notification Configuration\")}\n </Typography>\n </Grid>\n <Box className=\"flex flex-col sm:flex-row sm:items-center gap-3 w-full sm:w-auto\">\n <Box className=\"flex items-center gap-3\">\n <FormControlLabel\n control={\n <Checkbox\n checked={isActive}\n onChange={(e) =>\n handleFilter(e.target.checked, 'status')\n }\n data-testid=\"notifications-checkbox-include-active\"\n />\n }\n label={translate(\"Active\")}\n slotProps={{\n typography: {\n className: \"custom-label\",\n },\n }}\n />\n <FormControlLabel\n control={\n <Checkbox\n checked={isMobile}\n onChange={(e) =>\n handleFilter(e.target.checked, 'notificationType')\n }\n data-testid=\"notifications-checkbox-include-mobile\"\n />\n }\n label={translate(\"Mobile\")}\n slotProps={{\n typography: {\n className: \"custom-label\",\n },\n }}\n />\n </Box>\n <Box className=\"flex items-center gap-3 w-full sm:w-auto\">\n <TextField\n id=\"searchQuery\"\n placeholder=\"Search Text\"\n size=\"small\"\n onChange={handleSearch}\n className=\"m-0 p-0 bg-white\"\n value={search}\n data-testid=\"notification-list-textfield-search\"\n sx={{\n \"& .MuiInputBase-root\": {\n height: \"2.4em\",\n width: { xs: \"100%\", sm: \"190px\" },\n },\n flex: { xs: 1, sm: 1 }\n }}\n />\n <Button\n size=\"small\"\n variant=\"contained\"\n onClick={() => {\n trackEvent(\"button_click\", {\n button_name: \"notification-list-add-button\",\n button_type: \"navigate\",\n button_id: \"notification-list-button-add\",\n });\n setOpenModal(5);\n }}\n data-testid=\"notification-list-button-add\"\n sx={{ whiteSpace: 'nowrap' }}\n >\n {translate(\"Add\")}\n </Button>\n </Box>\n </Box>\n </Grid>\n <Grid size={{ xs: 12 }}>\n <CustomizedTable\n columns={columns}\n actions={actions}\n tableData={filteredNotifications}\n paginationConfig={{\n pagination: false,\n }}\n styleConfig={{\n tableStyle: {\n maxHeight: 40,\n },\n }}\n handleSort={handleSort}\n isLoading={isLoading}\n dataTestId=\"notification-list-customizedtable\"\n />\n </Grid>\n </NotificationListSkeleton>\n </Card>\n );\n}\n"],"names":["toggleActiveState","id","state","api","PostNotification","params","NotificationListSkeleton","children","isLoading","useSelector","getUseSkeleton","jsxs","jsx","PropTypes","ManageNotificationSkeleton","ManageNotification","lazy","NotificationFlywayQuery","NotificationList","trackEvent","useTrackEvent","search","setSearch","useState","notifications","setNotifications","filteredNotifications","setFilteredNotifications","openModal","setOpenModal","rowData","setRowData","roleData","setRoleData","translate","useTranslateProvider","featureUuid","setFeatureUuid","setIsLoading","defaultColumns","row","Typography","columns","setColumns","isActive","setisActive","isMobile","setisMobile","isActiveRef","useRef","isMobileRef","useEffect","toggleActiveStatus","cur","data","getNotifications","showToast","error","actions","FontAwesomeIcon","faPen","e","faBars","debouncedFilter","useCallback","debounce","searchValue","filteredData","_a","d","handleSearch","handleSort","column","order","prev","col","sortedData","a","b","valA","valB","_b","loadInitialData","getAllRoleList","handleFilter","value","filterType","nextIsActive","nextIsMobile","Card","Suspense","CustomConfirmationModal","SyncWithServerDialog","Grid","Box","FormControlLabel","Checkbox","TextField","Button","CustomizedTable"],"mappings":";;;;;;;;;;;;;;;;;AACO,MAAMA,KAAoB,CAAC,EAAE,IAAAC,GAAI,OAAAC,EAAK,MAC3CC,EAAI;AAAA,EACF,oBAAoBF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