@argusoft/medplat-core 1.0.14 → 1.0.16

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 (119) hide show
  1. package/dist/AccessRights-Bvd5Bm5K.js +1259 -0
  2. package/dist/AccessRights-Bvd5Bm5K.js.map +1 -0
  3. package/dist/{AddEditQueryBuilder-7JRplV5J.js → AddEditQueryBuilder-Bcjl5mXE.js} +2 -2
  4. package/dist/{AddEditQueryBuilder-7JRplV5J.js.map → AddEditQueryBuilder-Bcjl5mXE.js.map} +1 -1
  5. package/dist/{AddFeatures-CkTu7sOI.js → AddFeatures-CE5rBxEG.js} +2 -2
  6. package/dist/{AddFeatures-CkTu7sOI.js.map → AddFeatures-CE5rBxEG.js.map} +1 -1
  7. package/dist/{AddLabelModal-DE3ploGD.js → AddLabelModal-CB8E8cYG.js} +2 -2
  8. package/dist/{AddLabelModal-DE3ploGD.js.map → AddLabelModal-CB8E8cYG.js.map} +1 -1
  9. package/dist/{AddRoleDrawer-ZK1eejxI.js → AddRoleDrawer-SvntLdRu.js} +44 -43
  10. package/dist/AddRoleDrawer-SvntLdRu.js.map +1 -0
  11. package/dist/{AppModal-BgZyfrd-.js → AppModal-BKgIwe1h.js} +2 -2
  12. package/dist/{AppModal-BgZyfrd-.js.map → AppModal-BKgIwe1h.js.map} +1 -1
  13. package/dist/{ChangePasswordModalCore-DIe4rzW-.js → ChangePasswordModalCore-ClND1mel.js} +67 -62
  14. package/dist/ChangePasswordModalCore-ClND1mel.js.map +1 -0
  15. package/dist/{ConditionConfig-GDCXIg3C.js → ConditionConfig-DB0FqwgG.js} +2 -2
  16. package/dist/{ConditionConfig-GDCXIg3C.js.map → ConditionConfig-DB0FqwgG.js.map} +1 -1
  17. package/dist/{EntityManagement-D-x6Qzal.js → EntityManagement-DQKXnEzz.js} +2 -2
  18. package/dist/{EntityManagement-D-x6Qzal.js.map → EntityManagement-DQKXnEzz.js.map} +1 -1
  19. package/dist/EventConfigurations-DZvSJ5EZ.js +395 -0
  20. package/dist/EventConfigurations-DZvSJ5EZ.js.map +1 -0
  21. package/dist/{EventsExceptionModal-BF6E1Np7.js → EventsExceptionModal-DsvngLi8.js} +2 -2
  22. package/dist/{EventsExceptionModal-BF6E1Np7.js.map → EventsExceptionModal-DsvngLi8.js.map} +1 -1
  23. package/dist/EventsSkeleton-DCXwwPbb.js +76 -0
  24. package/dist/EventsSkeleton-DCXwwPbb.js.map +1 -0
  25. package/dist/FeatureMenu-CLX8VNZ-.js +265 -0
  26. package/dist/FeatureMenu-CLX8VNZ-.js.map +1 -0
  27. package/dist/Features-Cpf1PDx0.js +13 -0
  28. package/dist/Features-Cpf1PDx0.js.map +1 -0
  29. package/dist/FileSaver.min-CN9EpL2h.js.map +1 -1
  30. package/dist/{ImmunizationConfigurationBase-DZ8EqXlF.js → ImmunizationConfigurationBase-VqVvVR57.js} +2095 -1872
  31. package/dist/ImmunizationConfigurationBase-VqVvVR57.js.map +1 -0
  32. package/dist/ImmunizationConfigurationsList-K2ddBpPJ.js +345 -0
  33. package/dist/ImmunizationConfigurationsList-K2ddBpPJ.js.map +1 -0
  34. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -1
  35. package/dist/{LanguagesModal-rk6IGQwY.js → LanguagesModal-CX3oS8rk.js} +2 -2
  36. package/dist/{LanguagesModal-rk6IGQwY.js.map → LanguagesModal-CX3oS8rk.js.map} +1 -1
  37. package/dist/{ManageDynamicFeature-C2I7Ho7i.js → ManageDynamicFeature-CsIett5x.js} +2 -2
  38. package/dist/{ManageDynamicFeature-C2I7Ho7i.js.map → ManageDynamicFeature-CsIett5x.js.map} +1 -1
  39. package/dist/{ManageEventConfiguration-BJxS2Su0.js → ManageEventConfiguration-0YBDaxOI.js} +60 -60
  40. package/dist/ManageEventConfiguration-0YBDaxOI.js.map +1 -0
  41. package/dist/{ManageNotification-DMN2szWy.js → ManageNotification-BUAvg5Ge.js} +1797 -1705
  42. package/dist/ManageNotification-BUAvg5Ge.js.map +1 -0
  43. package/dist/{ManageRole-CuXmWQyp.js → ManageRole-Cbs9dUhc.js} +244 -191
  44. package/dist/ManageRole-Cbs9dUhc.js.map +1 -0
  45. package/dist/ManageTranslation-D9IScGhk.js +625 -0
  46. package/dist/ManageTranslation-D9IScGhk.js.map +1 -0
  47. package/dist/{ManageUser-Dr3ptCYp.js → ManageUser-eBS0yC5k.js} +754 -748
  48. package/dist/ManageUser-eBS0yC5k.js.map +1 -0
  49. package/dist/{MobileTypeEventConfigModal-ChhO_A4f.js → MobileTypeEventConfigModal-Ltm529jG.js} +2 -2
  50. package/dist/{MobileTypeEventConfigModal-ChhO_A4f.js.map → MobileTypeEventConfigModal-Ltm529jG.js.map} +1 -1
  51. package/dist/NotificationList-CUZSWp2J.js +402 -0
  52. package/dist/NotificationList-CUZSWp2J.js.map +1 -0
  53. package/dist/{OtherTypeEventConfigModal-ZnCGWm9v.js → OtherTypeEventConfigModal-dXt2qDg_.js} +2 -2
  54. package/dist/OtherTypeEventConfigModal-dXt2qDg_.js.map +1 -0
  55. package/dist/{QueryBuilder-BPfavHH9.js → QueryBuilder-DXexUIe8.js} +154 -148
  56. package/dist/QueryBuilder-DXexUIe8.js.map +1 -0
  57. package/dist/QueryManagement-B2y23kus.js +935 -0
  58. package/dist/QueryManagement-B2y23kus.js.map +1 -0
  59. package/dist/RoleManagement-BThAL5LO.js +422 -0
  60. package/dist/RoleManagement-BThAL5LO.js.map +1 -0
  61. package/dist/SubMenu-BGznOP2a.js +191 -0
  62. package/dist/SubMenu-BGznOP2a.js.map +1 -0
  63. package/dist/TableDetails-DztbjsIA.js +2069 -0
  64. package/dist/TableDetails-DztbjsIA.js.map +1 -0
  65. package/dist/TableList-DYwotUDO.js +1425 -0
  66. package/dist/TableList-DYwotUDO.js.map +1 -0
  67. package/dist/{TypeConfiguration-C-lk8Szs.js → TypeConfiguration-DYbBG_hZ.js} +2 -2
  68. package/dist/{TypeConfiguration-C-lk8Szs.js.map → TypeConfiguration-DYbBG_hZ.js.map} +1 -1
  69. package/dist/{UserList-S5Q76wO7.js → UserList-BAeAFeXZ.js} +410 -400
  70. package/dist/UserList-BAeAFeXZ.js.map +1 -0
  71. package/dist/{UserListSkeleton-cglK2SaU.js → UserListSkeleton-DhIJ5X3y.js} +10 -7
  72. package/dist/UserListSkeleton-DhIJ5X3y.js.map +1 -0
  73. package/dist/WidgetList-D-fIf3N2.js +200 -0
  74. package/dist/WidgetList-D-fIf3N2.js.map +1 -0
  75. package/dist/i18next-CTOWN_jH.js.map +1 -1
  76. package/dist/index.css +1 -1
  77. package/dist/index.js +64 -63
  78. package/dist/index.js.map +1 -1
  79. package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
  80. package/package.json +1 -1
  81. package/dist/AccessRights-BMRM1u9S.js +0 -1228
  82. package/dist/AccessRights-BMRM1u9S.js.map +0 -1
  83. package/dist/AddRoleDrawer-ZK1eejxI.js.map +0 -1
  84. package/dist/ChangePasswordModalCore-DIe4rzW-.js.map +0 -1
  85. package/dist/EventConfigurations-jGCJ4LqP.js +0 -384
  86. package/dist/EventConfigurations-jGCJ4LqP.js.map +0 -1
  87. package/dist/EventsSkeleton-BN7_0IGs.js +0 -74
  88. package/dist/EventsSkeleton-BN7_0IGs.js.map +0 -1
  89. package/dist/FeatureMenu-Ds6lFg4w.js +0 -249
  90. package/dist/FeatureMenu-Ds6lFg4w.js.map +0 -1
  91. package/dist/Features-Cshdl06N.js +0 -12
  92. package/dist/Features-Cshdl06N.js.map +0 -1
  93. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js.map +0 -1
  94. package/dist/ImmunizationConfigurationsList-CQnxWa09.js +0 -335
  95. package/dist/ImmunizationConfigurationsList-CQnxWa09.js.map +0 -1
  96. package/dist/ManageEventConfiguration-BJxS2Su0.js.map +0 -1
  97. package/dist/ManageNotification-DMN2szWy.js.map +0 -1
  98. package/dist/ManageRole-CuXmWQyp.js.map +0 -1
  99. package/dist/ManageTranslation-BTxvSYKb.js +0 -616
  100. package/dist/ManageTranslation-BTxvSYKb.js.map +0 -1
  101. package/dist/ManageUser-Dr3ptCYp.js.map +0 -1
  102. package/dist/NotificationList-BqibwMaM.js +0 -400
  103. package/dist/NotificationList-BqibwMaM.js.map +0 -1
  104. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js.map +0 -1
  105. package/dist/QueryBuilder-BPfavHH9.js.map +0 -1
  106. package/dist/QueryManagement-DXA73N2j.js +0 -671
  107. package/dist/QueryManagement-DXA73N2j.js.map +0 -1
  108. package/dist/RoleManagement-C0feJCuq.js +0 -410
  109. package/dist/RoleManagement-C0feJCuq.js.map +0 -1
  110. package/dist/SubMenu-DAfZC9Xi.js +0 -188
  111. package/dist/SubMenu-DAfZC9Xi.js.map +0 -1
  112. package/dist/TableDetails-DzREeJkm.js +0 -1508
  113. package/dist/TableDetails-DzREeJkm.js.map +0 -1
  114. package/dist/TableList-B9hr05Hs.js +0 -428
  115. package/dist/TableList-B9hr05Hs.js.map +0 -1
  116. package/dist/UserList-S5Q76wO7.js.map +0 -1
  117. package/dist/UserListSkeleton-cglK2SaU.js.map +0 -1
  118. package/dist/WidgetList-BSApErov.js +0 -188
  119. package/dist/WidgetList-BSApErov.js.map +0 -1
@@ -0,0 +1,345 @@
1
+ import { jsxs as C, Fragment as ae, jsx as n } from "react/jsx-runtime";
2
+ import { useState as r, useCallback as ne, useEffect as _, useRef as oe } from "react";
3
+ import { Dialog as ie, DialogTitle as se, DialogContent as re, TextField as H, DialogActions as le, Button as x, Box as ce, Card as de, Typography as me } from "@mui/material";
4
+ import { showToast as y } from "@/common/toaster/toaster";
5
+ import { execute as P } from "@/common/services/GlobalApis";
6
+ import $ from "@mui/material/Grid2";
7
+ import { useNavigate as ue } from "react-router";
8
+ import { u as fe, I as ye } from "./ImmunizationSkeleton-D2tdv5k-.js";
9
+ import A from "prop-types";
10
+ import J from "@/views/custom-components/CustomConfirmationModal";
11
+ import pe from "@/hooks/useTrackEvent";
12
+ import { useTranslateProvider as ge } from "@/common/languageTranslator/TranslationContext";
13
+ import he from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
14
+ import { FontAwesomeIcon as G } from "@fortawesome/react-fontawesome";
15
+ import { faPen as Ce, faTrash as we } from "@fortawesome/free-solid-svg-icons";
16
+ import { getAssignedFeatures as be } from "@/utils/feature";
17
+ import O from "@/common/services/util/GeneralUtil.js";
18
+ const V = ({ configuredQuery: p, open: w, onClose: g, dataTestId: F }) => {
19
+ const [b, v] = r(""), { translate: u } = ge(), [L, f] = r(!1), E = ne(() => {
20
+ let o = JSON.parse(JSON.stringify(p));
21
+ if (o.forEach((s) => {
22
+ delete s.id, delete s.created_at, delete s.updated_at;
23
+ }), !Array.isArray(o) || o.length === 0) {
24
+ y({ message: "No data to generate", type: "error" });
25
+ return;
26
+ }
27
+ const d = Object.keys(o[0]), h = o.map((s) => `(${d.map((M) => {
28
+ const t = s[M];
29
+ return typeof t == "string" ? `'${t.replace(/'/g, "''")}'` : t == null ? "NULL" : typeof t == "boolean" ? t ? "TRUE" : "FALSE" : t;
30
+ }).join(", ")})`).join(`,
31
+ `), D = `${d.filter((s) => s !== "code").map((s) => `${s} = EXCLUDED.${s}`).join(", ")}, updated_at = CURRENT_TIMESTAMP`, R = `INSERT INTO rch_immunization_configuration (${d.join(", ")})
32
+ VALUES
33
+ ${h}
34
+ ON CONFLICT (code) DO UPDATE SET
35
+ ${D};
36
+ `;
37
+ v(R);
38
+ }, [p]), I = () => {
39
+ var o;
40
+ (o = navigator == null ? void 0 : navigator.clipboard) == null || o.writeText(b).then(() => {
41
+ y({ message: "Query Copied", type: "success" }), g();
42
+ });
43
+ }, k = () => {
44
+ z(), f((o) => !o);
45
+ }, T = pe(), z = () => {
46
+ const o = new Blob([b], { type: "text/plain" }), d = (o.size / 1024).toFixed(2), h = URL.createObjectURL(o), c = document.createElement("a");
47
+ c.href = h, c.download = `V${(/* @__PURE__ */ new Date()).getTime()}__CHANGE_IN_IMMUNIZATION_TABLE}.sql`, document.body.appendChild(c), c.click(), T("file_download", {
48
+ file_type: "sql",
49
+ file_name: c.download,
50
+ file_size: `${d} KB`,
51
+ download_status: "success"
52
+ }), document.body.removeChild(c), URL.revokeObjectURL(h), y({ message: "Query Downloaded SuccessFully", type: "success" }), g();
53
+ }, S = () => {
54
+ z();
55
+ };
56
+ return _(() => {
57
+ p && E();
58
+ }, [p]), /* @__PURE__ */ C(ae, { children: [
59
+ /* @__PURE__ */ n(
60
+ J,
61
+ {
62
+ description: "This Flyway contains keyword 'public'. Are you sure you want to download?",
63
+ title: "CONFIRM ACTION",
64
+ handleClick: k,
65
+ open: L,
66
+ handleClose: () => f((o) => !o),
67
+ dataTestId: "showflywayquery-customconfirmationmodal-confirmation-modal"
68
+ }
69
+ ),
70
+ /* @__PURE__ */ C(ie, { open: w, onClose: g, fullWidth: !0, maxWidth: "md", "data-testid": F, children: [
71
+ /* @__PURE__ */ n(se, { className: "p-2.5 px-5 flex border-b font-medium text-lg", children: u("Flyway Query") }),
72
+ /* @__PURE__ */ n(re, { children: /* @__PURE__ */ n(
73
+ H,
74
+ {
75
+ multiline: !0,
76
+ rows: 10,
77
+ variant: "outlined",
78
+ fullWidth: !0,
79
+ value: b,
80
+ sx: {
81
+ "& .MuiInputBase-input": {
82
+ fontSize: "14px"
83
+ },
84
+ "& .MuiOutlinedInput-root": {
85
+ borderRadius: "5px"
86
+ }
87
+ },
88
+ slotProps: {
89
+ input: {
90
+ readOnly: !0
91
+ }
92
+ },
93
+ "data-testid": "showflywayquery-textfield-query-display"
94
+ }
95
+ ) }),
96
+ /* @__PURE__ */ C(le, { children: [
97
+ /* @__PURE__ */ n(
98
+ x,
99
+ {
100
+ onClick: S,
101
+ variant: "contained",
102
+ size: "small",
103
+ color: "primary",
104
+ "data-testid": "showflywayquery-button-download-action",
105
+ children: u("Download")
106
+ }
107
+ ),
108
+ /* @__PURE__ */ n(
109
+ x,
110
+ {
111
+ onClick: I,
112
+ variant: "contained",
113
+ size: "small",
114
+ color: "primary",
115
+ "data-testid": "showflywayquery-button-copyquery-action",
116
+ children: u("Copy Query")
117
+ }
118
+ ),
119
+ /* @__PURE__ */ n(
120
+ x,
121
+ {
122
+ onClick: g,
123
+ variant: "contained",
124
+ color: "secondary",
125
+ size: "small",
126
+ "data-testid": "showflywayquery-button-cancel-action",
127
+ children: u("Cancel")
128
+ }
129
+ )
130
+ ] })
131
+ ] })
132
+ ] });
133
+ };
134
+ V.propTypes = {
135
+ configuredQuery: A.any,
136
+ open: A.any,
137
+ onClose: A.any,
138
+ dataTestId: A.any
139
+ };
140
+ const $e = () => {
141
+ var Q;
142
+ const p = ue(), { t: w } = fe(), [g, F] = r([]), [b, v] = r([]), [u, L] = r([]), [f, E] = r(""), [I, k] = r(!1), [T, z] = r(!1), [S, o] = r([]), [d, h] = r([]), [c, D] = r(!1), [R, s] = r(!1), [j, M] = r({}), [t, W] = r({}), q = oe(t);
143
+ _(() => {
144
+ q.current = t;
145
+ }, [t]), _(() => {
146
+ h(() => g.filter(
147
+ (a) => S.some((l) => l.id === a.id)
148
+ ));
149
+ }, [S]);
150
+ const K = [
151
+ { field: "Sr. No.", label: "#", align: "left" },
152
+ // { field: 'code', label: 'Code', align: 'left', isBold: true },
153
+ { field: "name", label: "Name", align: "left" },
154
+ { field: "fromAgeDays", label: "Eligible From" },
155
+ { field: "toAgeDays", label: "Eligible To" },
156
+ { field: "base_date", label: "Base Date" },
157
+ { field: "Actions", label: "Actions" }
158
+ ], Y = [
159
+ (!O.isTecho || (t == null ? void 0 : t["update.manage.manageImmunization"])) && {
160
+ label: "Fill Form",
161
+ icon: /* @__PURE__ */ n(G, { icon: Ce }),
162
+ onClick: (e) => {
163
+ p(`/ui/medplat/manage/manageImmunization/${e == null ? void 0 : e.id}`);
164
+ }
165
+ },
166
+ (!O.isTecho || (t == null ? void 0 : t["update.manage.manageImmunization"])) && {
167
+ label: "",
168
+ icon: /* @__PURE__ */ n(G, { icon: we }),
169
+ onClick: (e) => {
170
+ s(!0), M(e);
171
+ }
172
+ }
173
+ ];
174
+ _(() => {
175
+ B();
176
+ }, []);
177
+ const X = (e) => {
178
+ const a = JSON.parse(e);
179
+ return a.dependencies && a.dependencies.length > 0 ? a.dependencies[0].message : "NA";
180
+ }, U = (e) => {
181
+ if (typeof e != "number" || e <= 0) return "-";
182
+ const a = Math.floor(e / 365), l = e % 365, m = Math.floor(l / 30), N = l % 30, i = [];
183
+ return a > 0 && i.push(`${a} ${a === 1 ? "year" : "years"}`), m > 0 && i.push(`${m} ${m === 1 ? "month" : "months"}`), (N > 0 || a === 0 && m === 0) && i.push(`${N} ${N === 1 ? "day" : "days"}`), i.join(" ") || "0 days";
184
+ }, B = async () => {
185
+ var e, a;
186
+ try {
187
+ D((i) => !i);
188
+ const l = await P({
189
+ code: "get_immunization_detail",
190
+ parameters: {}
191
+ });
192
+ F((e = l == null ? void 0 : l.data) == null ? void 0 : e.result);
193
+ const m = (a = l == null ? void 0 : l.data) == null ? void 0 : a.result.filter((i) => i.is_active === !0).map((i) => ({
194
+ ...i,
195
+ fromAgeDays: U(i.from_age_days),
196
+ toAgeDays: U(i.to_age_days),
197
+ validationMessage: i.validations ? X(i.validations) : "NA"
198
+ })), { data: N } = await be(
199
+ "techo.manage.immunizationConfiguratorList"
200
+ );
201
+ W(JSON.parse(N)), v(m), L(m), D((i) => !i);
202
+ } catch (l) {
203
+ console.error(l), y({ message: "Error in loading immunization", type: "error" }), D((m) => !m);
204
+ }
205
+ }, Z = (e) => {
206
+ E(e.target.value);
207
+ };
208
+ _(() => {
209
+ if (!f) {
210
+ v(u);
211
+ return;
212
+ }
213
+ const e = u.filter(
214
+ (a) => a.code.toLowerCase().includes(f.toLowerCase()) || a.name.toLowerCase().includes(f.toLowerCase())
215
+ );
216
+ v(e);
217
+ }, [f, u]);
218
+ const ee = () => {
219
+ (d == null ? void 0 : d.length) > 0 ? z(!0) : y({ message: "Select atleast one row", type: "info" });
220
+ }, te = async (e) => {
221
+ try {
222
+ let a = {
223
+ id: parseInt(e.id),
224
+ code: e.code,
225
+ name: e.name,
226
+ isrecursive: e.is_recursive || !1,
227
+ fromAgeDays: e.from_age_days,
228
+ toAgeDays: e.to_age_days,
229
+ basedate: e.base_date,
230
+ validations: e.validations,
231
+ recursiveobject: e.recursive_object,
232
+ locations: e.locations || "[]",
233
+ active: !1
234
+ };
235
+ s(!1), await P({
236
+ code: "update_immunization",
237
+ parameters: { ...a }
238
+ }), B(), y({
239
+ message: "Immunization status changed Successfully!",
240
+ type: "success"
241
+ });
242
+ } catch (a) {
243
+ console.error(a), y({ type: "error", message: "error toggling status" });
244
+ }
245
+ };
246
+ return O.isTecho && !c && !(t != null && t["view.manage.manageImmunization"]) ? /* @__PURE__ */ n(ce, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ n(
247
+ de,
248
+ {
249
+ className: "h-80 w-150 flex justify-center items-center",
250
+ children: /* @__PURE__ */ n(me, { variant: "h5", className: "text-customBlue", children: "You dont have permission to view Manage Immunization" })
251
+ }
252
+ ) }) : /* @__PURE__ */ C($, { container: !0, justifyContent: "flex-end", className: "mt-5 mr-5", children: [
253
+ T && /* @__PURE__ */ n(
254
+ V,
255
+ {
256
+ configuredQuery: d,
257
+ open: T,
258
+ onClose: () => {
259
+ z((e) => !e);
260
+ },
261
+ dataTestId: "eventconfiguration-query-showflywayquery"
262
+ }
263
+ ),
264
+ /* @__PURE__ */ C(ye, { isLoading: c, children: [
265
+ /* @__PURE__ */ C($, { item: !0, children: [
266
+ /* @__PURE__ */ n(
267
+ H,
268
+ {
269
+ className: "bg-white p-0 m-0",
270
+ placeholder: "Search code",
271
+ sx: {
272
+ "& .MuiInputBase-root": { height: "35px" },
273
+ // Controls the overall input height
274
+ "& .MuiInputBase-input": { padding: "6px 12px" }
275
+ // Adjust text padding inside input
276
+ },
277
+ value: f,
278
+ onChange: Z
279
+ }
280
+ ),
281
+ (O.isTecho ? t == null ? void 0 : t["view.manage.manageImmunization.flywayQuery"] : (Q = q.current) == null ? void 0 : Q.canGenerateFlyway) && /* @__PURE__ */ n(
282
+ x,
283
+ {
284
+ className: "mb-4 ml-4",
285
+ variant: "contained",
286
+ onClick: () => {
287
+ k((e) => !e);
288
+ },
289
+ size: "small",
290
+ "data-testid": "immunizationList-button-add",
291
+ children: w(I ? "Hide Selection" : "Select Immunization")
292
+ }
293
+ ),
294
+ I && !T && /* @__PURE__ */ n(
295
+ x,
296
+ {
297
+ className: "mb-4 ml-4",
298
+ variant: "contained",
299
+ onClick: () => {
300
+ ee();
301
+ },
302
+ size: "small",
303
+ "data-testid": "immunizationList-button-add",
304
+ children: w("Show Flyway")
305
+ }
306
+ )
307
+ ] }),
308
+ /* @__PURE__ */ n($, { size: { xs: 12 }, children: /* @__PURE__ */ n(
309
+ he,
310
+ {
311
+ dataTestId: "Immunization-configurator-customizedtable",
312
+ columns: K,
313
+ tableData: b,
314
+ paginationConfig: {
315
+ pagination: !0,
316
+ rowsPerPageInTable: 20
317
+ },
318
+ actions: Y,
319
+ rowSelectionConfig: {
320
+ rowSelectionEnabled: I,
321
+ selectedRows: S,
322
+ setSelectedRows: o
323
+ },
324
+ styleConfig: { tableStyle: { maxHeight: 45 } },
325
+ isLoading: c,
326
+ strip: !0
327
+ }
328
+ ) })
329
+ ] }),
330
+ /* @__PURE__ */ n(
331
+ J,
332
+ {
333
+ open: R,
334
+ description: "Are you sure you want to change the state of this Immunization ?",
335
+ title: "CONFIRM ACTION",
336
+ handleClick: () => te(j),
337
+ handleClose: () => s(!1)
338
+ }
339
+ )
340
+ ] });
341
+ };
342
+ export {
343
+ $e as default
344
+ };
345
+ //# sourceMappingURL=ImmunizationConfigurationsList-K2ddBpPJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImmunizationConfigurationsList-K2ddBpPJ.js","sources":["../src/views/Immunization/ShowFlywayQuery.jsx","../src/views/Immunization/ImmunizationConfigurationsList.jsx"],"sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport { Dialog, DialogActions, DialogContent, DialogTitle, Button, TextField } from '@mui/material';\nimport { showToast } from '@/common/toaster/toaster';\nimport CustomConfirmationModal from '@/views/custom-components/CustomConfirmationModal';\n// import moment from 'moment/moment';\nimport useTrackEvent from '@/hooks/useTrackEvent';\nimport { useTranslateProvider } from '@/common/languageTranslator/TranslationContext';\n\n/**\n * A React functional component that displays a configured Flyway query.\n * @module ShowFlywayQuery\n * @param {Object} props - Component properties.\n * @param {Object} props.configuredQuery - The query configuration object to display.\n * @param {boolean} props.open - Boolean flag indicating if the component should be visible.\n * @param {function} props.onClose - Callback function to close the component.\n */\n\nconst ShowFlywayQuery = ({ configuredQuery, open, onClose, dataTestId }) => {\n const [text, setText] = useState('');\n // const [isPublicKeyword, setIsPublicKeyword] = useState(false);\n const { translate } = useTranslateProvider();\n\n const [openConfirm, setOpenConfirm] = useState(false);\n\n /**\n *\n * Generates a SQL query string based on the `configuredQuery` object.\n * @function generateQueryText\n * @param {Object} configuredQuery - The query configuration object used to generate the SQL query.\n * @param {string} configuredQuery.code - The unique code for the query.\n * @param {string} configuredQuery.uuid - The unique identifier for the query.\n * @param {number} configuredQuery.createdBy - The ID of the user who created the query.\n * @param {string} [configuredQuery.params] - The parameters for the query.\n * @param {string} configuredQuery.query - The actual SQL query text.\n * @param {string} [configuredQuery.description] - A description of the query.\n * @param {boolean} [configuredQuery.returnsResultSet] - Flag indicating if the query returns a result set.\n * @param {string} [configuredQuery.state] - The state of the query (e.g., 'ACTIVE').\n * @returns {void}\n */\n\n const generateQueryText = useCallback(() => {\n // Ensure configuredQuery is a non-empty array\n // if (!Array.isArray(configuredQuery) || configuredQuery.length === 0) {\n // throw new Error('configuredQuery should be a non-empty array of objects.');\n // }\n\n // Remove 'id', 'created_at', and 'updated_at' properties from each object\n let queryList = JSON.parse(JSON.stringify(configuredQuery));\n queryList.forEach((obj) => {\n delete obj.id;\n delete obj.created_at;\n delete obj.updated_at;\n });\n\n // Extract column names from the first object\n if (!Array.isArray(queryList) || queryList.length === 0) {\n showToast({ message: 'No data to generate', type: 'error' });\n return;\n }\n\n // Extract column names from the first object\n const columns = Object.keys(queryList[0]);\n\n // Map over queryList to create a string of values for each object\n const values = queryList\n .map((row) => {\n const valueString = columns\n .map((col) => {\n const value = row[col];\n if (typeof value === 'string') {\n // Escape single quotes in strings and enclose in single quotes\n return `'${value.replace(/'/g, \"''\")}'`;\n } else if (value === null || value === undefined) {\n // Handle null or undefined values\n return 'NULL';\n } else if (typeof value === 'boolean') {\n // Convert boolean to PostgreSQL boolean literals\n return value ? 'TRUE' : 'FALSE';\n }\n // For numbers and other types, return as is\n return value;\n })\n .join(', ');\n return `(${valueString})`;\n })\n .join(',\\n');\n\n // Construct the ON CONFLICT clause to update all columns except the primary key\n const updateClause = columns\n .filter((col) => col !== 'code') // Assuming 'code' is the primary key\n .map((col) => `${col} = EXCLUDED.${col}`)\n .join(', ');\n const finalUpdateClause = `${updateClause}, updated_at = CURRENT_TIMESTAMP`;\n\n // Construct the final INSERT statement with ON CONFLICT DO UPDATE\n\n // Construct the final INSERT statement with ON CONFLICT DO UPDATE\n const query = `INSERT INTO rch_immunization_configuration (${columns.join(', ')}) \\nVALUES\\n${values}\\nON CONFLICT (code) DO UPDATE SET\\n${finalUpdateClause};\n `;\n\n // return query;\n setText(query);\n\n // const publicKeyword = configuredQuery?.configJson?.includes('public');\n // setIsPublicKeyword(publicKeyword);\n // // Delete existing event configuration\n // let queryText = `DELETE FROM EVENT_CONFIGURATION WHERE uuid = '${configuredQuery.uuid}';\\n\\n`;\n\n // // Insert new event configuration\n // queryText += `INSERT INTO EVENT_CONFIGURATION (created_by, created_on, modified_by, modified_on, day, description, event_type, event_type_detail_id, form_type_id, hour, minute, name, config_json, state, trigger_when, event_type_detail_code, uuid)\\nVALUES (\\n`;\n // queryText += `${configuredQuery.createdBy}, current_date, ${configuredQuery.createdBy}, current_date, `;\n\n // queryText +=\n // configuredQuery.day !== undefined && configuredQuery.day !== null ? `${configuredQuery.day}, ` : 'null, ';\n // queryText += configuredQuery.description ? `'${configuredQuery.description.replace(/'/g, \"''\")}', ` : 'null, ';\n // queryText += `'${configuredQuery.eventType}', `;\n // queryText +=\n // configuredQuery.eventTypeDetailId !== undefined && configuredQuery.eventTypeDetailId !== null\n // ? `${configuredQuery.eventTypeDetailId}, `\n // : 'null, ';\n // queryText +=\n // configuredQuery.formTypeId !== undefined && configuredQuery.formTypeId !== null\n // ? `${configuredQuery.formTypeId}, `\n // : 'null, ';\n // queryText +=\n // configuredQuery.hour !== undefined && configuredQuery.hour !== null ? `${configuredQuery.hour}, ` : 'null, ';\n // queryText +=\n // configuredQuery.minute !== undefined && configuredQuery.minute !== null\n // ? `${configuredQuery.minute}, `\n // : 'null, ';\n // queryText += `'${configuredQuery.name.replace(/'/g, \"''\")}', `;\n // queryText += `'${configuredQuery.configJson.replace(/'/g, \"''\")}', `;\n // queryText += `'${configuredQuery.state}', `;\n // queryText +=\n // configuredQuery.trigerWhen !== undefined && configuredQuery.trigerWhen !== null\n // ? `'${configuredQuery.trigerWhen}', `\n // : 'null, ';\n // queryText +=\n // configuredQuery.eventTypeDetailCode !== undefined && configuredQuery.eventTypeDetailCode !== null\n // ? `${configuredQuery.eventTypeDetailCode}, `\n // : 'null, ';\n // queryText += `'${configuredQuery.uuid}');\\n`;\n\n // if (configuredQuery.eventType === 'TIMMER_BASED' && configuredQuery.state !== 'INACTIVE') {\n // let nextDate = moment();\n // switch (configuredQuery.trigerWhen) {\n // case 'MONTHLY':\n // nextDate.add(1, 'months').set({\n // date: configuredQuery.day,\n // hour: configuredQuery.hour || 0,\n // minute: configuredQuery.minute || 0,\n // second: 0,\n // });\n // break;\n // case 'DAILY':\n // nextDate\n // .add(getNextDate(configuredQuery), 'days')\n // .set({ hour: configuredQuery.hour || 0, minute: configuredQuery.minute || 0, second: 0 });\n // break;\n // case 'HOURLY':\n // nextDate.add(1, 'hours').set({ minute: getNextDate(configuredQuery), second: 0 });\n // break;\n // case 'MINUTE':\n // nextDate.add(configuredQuery.minute, 'minutes').set({ second: 0 });\n // break;\n // default:\n // }\n\n // queryText += `\\nDELETE FROM TIMER_EVENT WHERE event_config_uuid = '${configuredQuery.uuid}' AND status = 'NEW';\\n\\n`;\n // queryText += `INSERT INTO timer_event (event_config_uuid, processed, status, type, system_trigger_on)\\nVALUES (\\n`;\n // queryText += `'${configuredQuery.uuid}', false, 'NEW', 'TIMER_EVENT', '${nextDate.format('MM-DD-yyyy HH:mm:ss')}');\\n`;\n // }\n\n // // Handle notification configurations\n // if (configuredQuery.configJson !== null) {\n // const notificationConfigs = JSON.parse(configuredQuery.configJson);\n // let firstDelete = true;\n\n // notificationConfigs.forEach((config) => {\n // if (config.conditions !== null && config.conditions.length > 0) {\n // config.conditions.forEach((condition) => {\n // if (condition.notificaitonConfigsType !== null && condition.notificaitonConfigsType.length > 0) {\n // if (firstDelete) {\n // queryText += `\\nDELETE FROM EVENT_CONFIGURATION_TYPE WHERE event_config_uuid = '${configuredQuery.uuid}';\\n`;\n // firstDelete = false;\n // }\n // condition.notificaitonConfigsType.forEach((configType) => {\n // queryText += `\\nINSERT INTO EVENT_CONFIGURATION_TYPE (id, base_date_field_name, event_config_uuid, day, email_subject, email_subject_parameter, hour, minute, mobile_notification_type, template, template_parameter, triger_when, type, user_field_name, family_field_name, member_field_name, query_master_id, query_master_param_json, query_code, sms_config_json, push_notification_config_json)\\nVALUES (\\n`;\n // queryText += `'${configType.id}', `;\n // queryText += configType.baseDateFieldName ? `'${configType.baseDateFieldName}', ` : 'null, ';\n // queryText += `'${configuredQuery.uuid}', `;\n // queryText += configType.day !== undefined && configType.day !== null ? `${configType.day}, ` : 'null, ';\n // queryText += configType.emailSubject ? `'${configType.emailSubject.replace(/'/g, \"''\")}', ` : 'null, ';\n // queryText += configType.emailSubjectParameter ? `'${configType.emailSubjectParameter}', ` : 'null, ';\n // queryText +=\n // configType.hour !== undefined && configType.hour !== null ? `${configType.hour}, ` : 'null, ';\n // queryText +=\n // configType.miniute !== undefined && configType.miniute !== null\n // ? `${configType.miniute}, `\n // : 'null, ';\n // queryText +=\n // configType.mobileNotificationType !== undefined && configType.mobileNotificationType !== null\n // ? `${configType.mobileNotificationType}, `\n // : 'null, ';\n // queryText += configType.template ? `'${configType.template.replace(/'/g, \"''\")}', ` : 'null, ';\n // queryText += configType.templateParameter\n // ? `'${configType.templateParameter.replace(/'/g, \"''\")}', `\n // : 'null, ';\n // queryText += configType.trigerWhen ? `'${configType.trigerWhen}', ` : 'null, ';\n // queryText += configType.type ? `'${configType.type}', ` : 'null, ';\n // queryText += configType.userFieldName ? `'${configType.userFieldName}', ` : 'null, ';\n // queryText += configType.familyFieldName ? `'${configType.familyFieldName}', ` : 'null, ';\n // queryText += configType.memberFieldName ? `'${configType.memberFieldName}', ` : 'null, ';\n // queryText +=\n // configType.queryMasterId !== undefined && configType.queryMasterId !== null\n // ? `${configType.queryMasterId}, `\n // : 'null, ';\n // queryText +=\n // configType.queryMasterParamJson !== undefined && configType.queryMasterParamJson !== null\n // ? `'${JSON.stringify(configType.queryMasterParamJson).replace(/'/g, \"''\")}', `\n // : 'null, ';\n // queryText += configType.queryCode ? `'${configType.queryCode}', ` : 'null, ';\n // queryText +=\n // configType.smsConfigJson !== undefined && configType.smsConfigJson !== null\n // ? `'${JSON.stringify(configType.smsConfigJson).replace(/'/g, \"''\")}', `\n // : 'null, ';\n // queryText +=\n // configType.pushNotificationConfigJson !== undefined && configType.pushNotificationConfigJson !== null\n // ? `'${JSON.stringify(configType.pushNotificationConfigJson).replace(/'/g, \"''\")}'`\n // : 'null';\n // queryText += ');\\n';\n\n // // Handle mobile notification configs\n // if (configType.mobileNotificationConfigs && configType.mobileNotificationConfigs.length > 0) {\n // queryText += `\\nDELETE FROM EVENT_MOBILE_CONFIGURATION WHERE notification_type_config_id = '${configType.id}';\\n`;\n // configType.mobileNotificationConfigs.forEach((mobileConfig) => {\n // queryText += `\\nINSERT INTO EVENT_MOBILE_CONFIGURATION (id, notification_code, notification_type_config_id, number_of_days_added_for_due_date, number_of_days_added_for_expiry_date, number_of_days_added_for_on_date)\\nVALUES (\\n`;\n // queryText += `'${mobileConfig.id}', '${mobileConfig.notificationCode}', '${mobileConfig.notificationTypeConfigId}', ${mobileConfig.numberOfDaysAddedForDueDate}, ${mobileConfig.numberOfDaysAddedForExpiryDate}, ${mobileConfig.numberOfDaysAddedForOnDate});\\n`;\n // });\n // }\n // });\n // }\n // });\n // }\n // });\n // }\n\n // // Insert sync system configuration master\n // let eventConfigObj = {\n // id: configuredQuery.id,\n // name: configuredQuery.name,\n // description: configuredQuery.description,\n // eventType: configuredQuery.eventType,\n // eventTypeDetailId: configuredQuery.eventTypeDetailId,\n // formTypeId: configuredQuery.formTypeId,\n // eventTypeDetailCode: configuredQuery.eventTypeDetailCode,\n // trigerWhen: configuredQuery.trigerWhen,\n // day: configuredQuery.day,\n // hour: configuredQuery.hour,\n // minute: configuredQuery.minute,\n // state: configuredQuery.state,\n // createdBy: configuredQuery.createdBy,\n // createdOn: moment().valueOf(),\n // notificationConfigDetails: JSON.parse(configuredQuery.configJson),\n // status: null,\n // completionTime: null,\n // configJson: null,\n // uuid: configuredQuery.uuid,\n // };\n\n // queryText += `\\nINSERT INTO SYNC_SYSTEM_CONFIGURATION_MASTER (feature_type, config_json, created_on, created_by, feature_uuid, feature_name)\\nVALUES (\\n`;\n // queryText += `'EVENT_BUILDER', '${JSON.stringify(eventConfigObj).replace(/'/g, \"''\")}', current_date, ${configuredQuery.createdBy}, '${configuredQuery.uuid}', '${configuredQuery.name}');\\n`;\n // setText(queryText);\n }, [configuredQuery]);\n\n /**\n *\n * Copies the generated query text to the clipboard and displays a success message.\n * @function copyQuery\n * @returns {void}\n */\n\n // const getNextDate = function (eventObj) {\n // const now = new Date();\n // const eventDate = new Date(now.getFullYear(), now.getMonth(), now.getDate(), eventObj.hour, eventObj.minute);\n\n // if (eventDate > now) {\n // return 0;\n // } else {\n // return 1;\n // }\n // };\n\n const copyQuery = () => {\n navigator?.clipboard?.writeText(text).then(() => {\n showToast({ message: 'Query Copied', type: 'success' });\n onClose();\n });\n };\n\n /**\n * Triggers a download operation and toggles the confirmation dialog visibility.\n * The function assumes that `download` and `setOpenConfirm` are available in the current scope.\n * @function askForConfirmation\n * @returns {void}\n */\n\n const askForConfirmation = () => {\n download();\n setOpenConfirm((cur) => !cur);\n };\n\n const trackEvent = useTrackEvent();\n\n /**\n * Creates and triggers a download of a text file containing the query text.\n *\n * @function download\n * @returns {void}\n */\n\n const download = () => {\n const blob = new Blob([text], { type: 'text/plain' });\n const blobSizeInKB = (blob.size / 1024).toFixed(2);\n const url = URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = `V${new Date().getTime()}__CHANGE_IN_IMMUNIZATION_TABLE}.sql`;\n document.body.appendChild(a);\n a.click();\n\n trackEvent('file_download', {\n file_type: 'sql',\n file_name: a.download,\n file_size: `${blobSizeInKB} KB`,\n download_status: 'success',\n });\n\n document.body.removeChild(a);\n URL.revokeObjectURL(url);\n\n showToast({ message: 'Query Downloaded SuccessFully', type: 'success' });\n\n onClose();\n };\n\n /**\n *\n * Handles the download process based on the presence of a public keyword in the query text.\n * @function handleDownload\n * @returns {void}\n */\n\n const handleDownload = () => {\n download();\n // if (isPublicKeyword) {\n // setOpenConfirm((cur) => !cur);\n // } else {\n // download();\n // }\n };\n\n /**\n * `useEffect` Hook to Generate Query Text\n *\n * This effect hook is used to generate the SQL query text whenever the `configuredQuery` dependency changes.\n *\n * @function useEffect\n * @param {Object} configuredQuery - The query configuration object used to generate the SQL query text.\n * @param {function} generateQueryText - A function that generates the query text based on `configuredQuery`.\n */\n\n useEffect(() => {\n if (configuredQuery) {\n generateQueryText();\n }\n }, [configuredQuery]);\n return (\n <>\n <CustomConfirmationModal\n description={\"This Flyway contains keyword 'public'. Are you sure you want to download?\"}\n title={'CONFIRM ACTION'}\n handleClick={askForConfirmation}\n open={openConfirm}\n handleClose={() => setOpenConfirm((cur) => !cur)}\n dataTestId=\"showflywayquery-customconfirmationmodal-confirmation-modal\"\n />\n <Dialog open={open} onClose={onClose} fullWidth maxWidth=\"md\" data-testid={dataTestId}>\n <DialogTitle className=\"p-2.5 px-5 flex border-b font-medium text-lg\">{translate('Flyway Query')}</DialogTitle>\n <DialogContent>\n <TextField\n multiline\n rows={10}\n variant=\"outlined\"\n fullWidth\n value={text}\n sx={{\n '& .MuiInputBase-input': {\n fontSize: '14px',\n },\n '& .MuiOutlinedInput-root': {\n borderRadius: '5px',\n },\n }}\n slotProps={{\n input: {\n readOnly: true,\n },\n }}\n data-testid=\"showflywayquery-textfield-query-display\"\n />\n </DialogContent>\n <DialogActions>\n <Button\n onClick={handleDownload}\n variant=\"contained\"\n size=\"small\"\n color=\"primary\"\n data-testid=\"showflywayquery-button-download-action\"\n >\n {translate('Download')}\n </Button>\n <Button\n onClick={copyQuery}\n variant=\"contained\"\n size=\"small\"\n color=\"primary\"\n data-testid=\"showflywayquery-button-copyquery-action\"\n >\n {translate('Copy Query')}\n </Button>\n <Button\n onClick={onClose}\n variant=\"contained\"\n color=\"secondary\"\n size=\"small\"\n data-testid=\"showflywayquery-button-cancel-action\"\n >\n {translate('Cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n </>\n );\n};\n\nShowFlywayQuery.propTypes = {\n configuredQuery: PropTypes.any,\n open: PropTypes.any,\n onClose: PropTypes.any,\n dataTestId: PropTypes.any,\n};\n\nexport default ShowFlywayQuery;\n","import React, { useEffect, useState, useRef } from \"react\";\nimport { Button, TextField, Box, Card, Typography } from \"@mui/material\";\nimport { showToast } from \"@/common/toaster/toaster\";\nimport { execute } from \"@/common/services/GlobalApis\";\nimport Grid from \"@mui/material/Grid2\";\nimport { useTranslation } from \"react-i18next\";\nimport { useNavigate } from \"react-router\";\nimport { ImmunizationConfigurationsListSkeleton } from \"./Skeletons/ImmunizationSkeleton\";\nimport ShowFlywayQuery from \"./ShowFlywayQuery.jsx\";\nimport CustomConfirmationModal from \"@/views/custom-components/CustomConfirmationModal\";\nimport CustomizedTable from \"@/views/custom-components/CustomizedTable/CustomizedTableV2\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faPen, faTrash } from \"@fortawesome/free-solid-svg-icons\";\nimport { getAssignedFeatures } from \"@/utils/feature\";\nimport GeneralUtil from \"@/common/services/util/GeneralUtil.js\";\n\nconst ImmunizationConfigurationsList = () => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n const [immunizationData, setImmunizationData] = useState([]);\n const [tableData, setTableData] = useState([]);\n const [originalData, setOriginalData] = useState([]);\n const [search, setSearch] = useState(\"\");\n const [openSelectColumn, setOpenSelectColumn] = useState(false);\n const [openFlywayQuery, setOpenFlywayQuery] = useState(false);\n const [selectedRows, setSelectedRows] = useState([]);\n const [configuredQueryList, setConfiguredQueryList] = useState([]);\n const [isLoading, setIsLoading] = useState(false);\n const [open, setOpen] = useState(false);\n const [rowData, setRowData] = useState({});\n const [rights, setRights] = useState({});\n const rightsRef = useRef(rights);\n\n useEffect(() => {\n rightsRef.current = rights;\n }, [rights]);\n\n\n useEffect(() => {\n setConfiguredQueryList(() => {\n const filteredImmunization = immunizationData.filter((item) =>\n selectedRows.some((selected) => selected.id === item.id)\n );\n return filteredImmunization;\n });\n }, [selectedRows]);\n\n const tableFields = [\n { field: \"Sr. No.\", label: \"#\", align: \"left\" },\n // { field: 'code', label: 'Code', align: 'left', isBold: true },\n { field: \"name\", label: \"Name\", align: \"left\" },\n { field: \"fromAgeDays\", label: \"Eligible From\" },\n { field: \"toAgeDays\", label: \"Eligible To\" },\n { field: \"base_date\", label: \"Base Date\" },\n { field: \"Actions\", label: \"Actions\" },\n ];\n\n const actions = [\n (!GeneralUtil.isTecho || rights?.['update.manage.manageImmunization']) && \n {\n label: \"Fill Form\",\n icon: <FontAwesomeIcon icon={faPen} />,\n onClick: (row) => {\n navigate(`/ui/medplat/manage/manageImmunization/${row?.id}`);\n },\n },\n (!GeneralUtil.isTecho || rights?.['update.manage.manageImmunization']) && \n {\n label: \"\",\n icon: <FontAwesomeIcon icon={faTrash} />,\n onClick: (row) => {\n setOpen(true);\n setRowData(row);\n },\n },\n ];\n\n useEffect(() => {\n loadInitial();\n }, []);\n\n const getValidationMessage = (validations) => {\n const validationsObj = JSON.parse(validations);\n return validationsObj.dependencies && validationsObj.dependencies.length > 0\n ? validationsObj.dependencies[0].message\n : \"NA\";\n };\n\n const convertDaysToHumanReadable = (days) => {\n if (typeof days !== \"number\" || days <= 0) return \"-\";\n\n const years = Math.floor(days / 365);\n const remainingDaysAfterYears = days % 365;\n const months = Math.floor(remainingDaysAfterYears / 30);\n const remainingDays = remainingDaysAfterYears % 30;\n\n const parts = [];\n if (years > 0) {\n parts.push(`${years} ${years === 1 ? \"year\" : \"years\"}`);\n }\n if (months > 0) {\n parts.push(`${months} ${months === 1 ? \"month\" : \"months\"}`);\n }\n if (remainingDays > 0 || (years === 0 && months === 0)) {\n parts.push(`${remainingDays} ${remainingDays === 1 ? \"day\" : \"days\"}`);\n }\n\n return parts.join(\" \") || \"0 days\";\n };\n\n const loadInitial = async () => {\n try {\n setIsLoading((cur) => !cur);\n const res = await execute({\n code: \"get_immunization_detail\",\n parameters: {},\n });\n setImmunizationData(res?.data?.result);\n const immunizations = res?.data?.result\n .filter((el) => el.is_active === true)\n .map((el) => {\n return {\n ...el,\n fromAgeDays: convertDaysToHumanReadable(el.from_age_days),\n toAgeDays: convertDaysToHumanReadable(el.to_age_days),\n validationMessage: el.validations\n ? getValidationMessage(el.validations)\n : \"NA\",\n };\n });\n const { data: assignedFeatures } = await getAssignedFeatures(\n \"techo.manage.immunizationConfiguratorList\"\n );\n setRights(JSON.parse(assignedFeatures));\n setTableData(immunizations);\n setOriginalData(immunizations);\n setIsLoading((cur) => !cur);\n } catch (error) {\n console.error(error);\n showToast({ message: \"Error in loading immunization\", type: \"error\" });\n setIsLoading((cur) => !cur);\n }\n };\n\n const handleSearch = (e) => {\n setSearch(e.target.value);\n };\n\n useEffect(() => {\n if (!search) {\n setTableData(originalData); // Reset to original data if search is empty\n return;\n }\n\n const filteredData = originalData.filter(\n (item) =>\n item.code.toLowerCase().includes(search.toLowerCase()) ||\n item.name.toLowerCase().includes(search.toLowerCase())\n );\n\n setTableData(filteredData);\n }, [search, originalData]);\n\n const handleFlywayOpen = () => {\n if (configuredQueryList?.length > 0) {\n setOpenFlywayQuery(true);\n } else {\n showToast({ message: \"Select atleast one row\", type: \"info\" });\n }\n };\n\n const handleOpenStatusModal = async (row) => {\n try {\n let formData = {\n id: parseInt(row.id),\n code: row.code,\n name: row.name,\n isrecursive: row.is_recursive || false,\n fromAgeDays: row.from_age_days,\n toAgeDays: row.to_age_days,\n basedate: row.base_date,\n validations: row.validations,\n recursiveobject: row.recursive_object,\n locations: row.locations || \"[]\",\n active: false,\n };\n setOpen(false);\n await execute({\n code: \"update_immunization\",\n parameters: { ...formData },\n });\n loadInitial();\n showToast({\n message: \"Immunization status changed Successfully!\",\n type: \"success\",\n });\n } catch (error) {\n console.error(error);\n showToast({ type: \"error\", message: \"error toggling status\" });\n }\n };\n\n return GeneralUtil.isTecho && !isLoading && !rights?.[\"view.manage.manageImmunization\"] ? (\n <Box className=\"flex justify-center items-center w-full h-[80vh]\">\n <Card\n className=\"h-80 w-150 flex justify-center items-center\"\n >\n <Typography variant=\"h5\" className=\"text-customBlue\">\n You dont have permission to view Manage Immunization\n </Typography>\n </Card>\n </Box>\n ) : (\n <Grid container justifyContent=\"flex-end\" className=\"mt-5 mr-5\">\n {openFlywayQuery && (\n <ShowFlywayQuery\n configuredQuery={configuredQueryList}\n open={openFlywayQuery}\n onClose={() => {\n setOpenFlywayQuery((cur) => !cur);\n }}\n dataTestId=\"eventconfiguration-query-showflywayquery\"\n />\n )}\n <ImmunizationConfigurationsListSkeleton isLoading={isLoading}>\n <Grid item>\n <TextField\n className=\"bg-white p-0 m-0\"\n placeholder=\"Search code\"\n sx={{\n \"& .MuiInputBase-root\": { height: \"35px\" }, // Controls the overall input height\n \"& .MuiInputBase-input\": { padding: \"6px 12px\" }, // Adjust text padding inside input\n }}\n value={search}\n onChange={handleSearch}\n />\n {(!GeneralUtil.isTecho\n ? rightsRef.current?.canGenerateFlyway\n : rights?.['view.manage.manageImmunization.flywayQuery']) && (\n <Button\n className=\"mb-4 ml-4\"\n variant=\"contained\"\n onClick={() => {\n setOpenSelectColumn((curr) => !curr);\n }}\n size=\"small\"\n data-testid=\"immunizationList-button-add\"\n >\n {!openSelectColumn\n ? t(\"Select Immunization\")\n : t(\"Hide Selection\")}\n </Button>\n )}\n {openSelectColumn && !openFlywayQuery && (\n <Button\n className=\"mb-4 ml-4\"\n variant=\"contained\"\n onClick={() => {\n handleFlywayOpen();\n }}\n size=\"small\"\n data-testid=\"immunizationList-button-add\"\n >\n {t(\"Show Flyway\")}\n </Button>\n )}\n {/* <Button\n className=\"mb-4 ml-4\"\n variant=\"contained\"\n onClick={() => {\n navigate(\"/ui/medplat/manage/manageImmunization\");\n }}\n size=\"small\"\n data-testid=\"immunizationList-button-add\"\n >\n {t(\"Add Immunization\")}\n </Button> */}\n </Grid>\n <Grid size={{ xs: 12 }}>\n <CustomizedTable\n dataTestId=\"Immunization-configurator-customizedtable\"\n columns={tableFields}\n tableData={tableData}\n paginationConfig={{\n pagination: true,\n rowsPerPageInTable: 20,\n }}\n actions={actions}\n rowSelectionConfig={{\n rowSelectionEnabled: openSelectColumn,\n selectedRows,\n setSelectedRows,\n }}\n styleConfig={{ tableStyle: { maxHeight: 45 } }}\n isLoading={isLoading}\n strip={true}\n />\n </Grid>\n </ImmunizationConfigurationsListSkeleton>\n <CustomConfirmationModal\n open={open}\n description={\n \"Are you sure you want to change the state of this Immunization ?\"\n }\n title={\"CONFIRM ACTION\"}\n handleClick={() => handleOpenStatusModal(rowData)}\n handleClose={() => setOpen(false)}\n />\n </Grid>\n );\n};\n\nexport default ImmunizationConfigurationsList;\n"],"names":["ShowFlywayQuery","configuredQuery","open","onClose","dataTestId","text","setText","useState","translate","useTranslateProvider","openConfirm","setOpenConfirm","generateQueryText","useCallback","queryList","obj","showToast","columns","values","row","col","value","finalUpdateClause","query","copyQuery","_a","askForConfirmation","download","cur","trackEvent","useTrackEvent","blob","blobSizeInKB","url","a","handleDownload","useEffect","jsxs","Fragment","jsx","CustomConfirmationModal","Dialog","DialogTitle","DialogContent","TextField","DialogActions","Button","PropTypes","ImmunizationConfigurationsList","navigate","useNavigate","t","useTranslation","immunizationData","setImmunizationData","tableData","setTableData","originalData","setOriginalData","search","setSearch","openSelectColumn","setOpenSelectColumn","openFlywayQuery","setOpenFlywayQuery","selectedRows","setSelectedRows","configuredQueryList","setConfiguredQueryList","isLoading","setIsLoading","setOpen","rowData","setRowData","rights","setRights","rightsRef","useRef","item","selected","tableFields","actions","GeneralUtil","FontAwesomeIcon","faPen","faTrash","loadInitial","getValidationMessage","validations","validationsObj","convertDaysToHumanReadable","days","years","remainingDaysAfterYears","months","remainingDays","parts","res","execute","immunizations","_b","el","assignedFeatures","getAssignedFeatures","error","handleSearch","filteredData","handleFlywayOpen","handleOpenStatusModal","formData","Box","Card","Typography","Grid","ImmunizationConfigurationsListSkeleton","curr","CustomizedTable"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,MAAMA,IAAkB,CAAC,EAAE,iBAAAC,GAAiB,MAAAC,GAAM,SAAAC,GAAS,YAAAC,QAAiB;AAC1E,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAE,GAE7B,EAAE,WAAAC,EAAA,IAAcC,GAAA,GAEhB,CAACC,GAAaC,CAAc,IAAIJ,EAAS,EAAK,GAkB9CK,IAAoBC,GAAY,MAAM;AAO1C,QAAIC,IAAY,KAAK,MAAM,KAAK,UAAUb,CAAe,CAAC;AAQ1D,QAPAa,EAAU,QAAQ,CAACC,MAAQ;AACzB,aAAOA,EAAI,IACX,OAAOA,EAAI,YACX,OAAOA,EAAI;AAAA,IACb,CAAC,GAGG,CAAC,MAAM,QAAQD,CAAS,KAAKA,EAAU,WAAW,GAAG;AACvD,MAAAE,EAAU,EAAE,SAAS,uBAAuB,MA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AAI,MAChB,UAAA,gBAAA1E;AAAA,QAAC6E;AAAA,QAAA;AAAA,UACC,YAAW;AAAA,UACX,SAASpC;AAAA,UACT,WAAAzB;AAAA,UACA,kBAAkB;AAAA,YAChB,YAAY;AAAA,YACZ,oBAAoB;AAAA,UAAA;AAAA,UAEtB,SAAA0B;AAAA,UACA,oBAAoB;AAAA,YAClB,qBAAqBpB;AAAA,YACrB,cAAAI;AAAA,YACA,iBAAAC;AAAA,UAAA;AAAA,UAEF,aAAa,EAAE,YAAY,EAAE,WAAW,KAAG;AAAA,UAC3C,WAAAG;AAAA,UACA,OAAO;AAAA,QAAA;AAAA,MAAA,EACT,CACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAA9B;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAtC;AAAA,QACA,aACE;AAAA,QAEF,OAAO;AAAA,QACP,aAAa,MAAM0G,GAAsBpC,CAAO;AAAA,QAChD,aAAa,MAAMD,EAAQ,EAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAClC,GACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImmunizationSkeleton-D2tdv5k-.js","sources":["../node_modules/react-i18next/dist/es/utils.js","../node_modules/react-i18next/dist/es/unescape.js","../node_modules/react-i18next/dist/es/defaults.js","../node_modules/react-i18next/dist/es/i18nInstance.js","../node_modules/react-i18next/dist/es/context.js","../node_modules/react-i18next/dist/es/useTranslation.js","../src/views/Immunization/Skeletons/ImmunizationSkeleton.jsx"],"sourcesContent":["export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"',\n '&nbsp;': ' ',\n '&#160;': ' ',\n '&copy;': '©',\n '&#169;': '©',\n '&reg;': '®',\n '&#174;': '®',\n '&hellip;': '…',\n '&#8230;': '…',\n '&#x2F;': '/',\n '&#47;': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","import { useState, useEffect, useContext, useRef, useCallback } from 'react';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst usePrevious = (value, ignore) => {\n const ref = useRef();\n useEffect(() => {\n ref.current = ignore ? ref.current : value;\n }, [value, ignore]);\n return ref.current;\n};\nconst alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);\nconst useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');\n const notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n return Array.isArray(k) ? k[k.length - 1] : k;\n };\n const retNotReady = [notReadyT, {}, false];\n retNotReady.t = notReadyT;\n retNotReady.i18n = {};\n retNotReady.ready = false;\n return retNotReady;\n }\n if (i18n.options.react?.wait) warnOnce(i18n, 'DEPRECATED_OPTION', 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');\n const i18nOptions = {\n ...getDefaults(),\n ...i18n.options.react,\n ...props\n };\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n i18n.reportNamespaces.addUsedNamespaces?.(namespaces);\n const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const getT = () => memoGetT;\n const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const [t, setT] = useState(getT);\n let joinedNS = namespaces.join();\n if (props.lng) joinedNS = `${props.lng}${joinedNS}`;\n const previousJoinedNS = usePrevious(joinedNS);\n const isMounted = useRef(true);\n useEffect(() => {\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n isMounted.current = true;\n if (!ready && !useSuspense) {\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, () => {\n if (isMounted.current) setT(getNewT);\n });\n } else {\n loadNamespaces(i18n, namespaces, () => {\n if (isMounted.current) setT(getNewT);\n });\n }\n }\n if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {\n setT(getNewT);\n }\n const boundReset = () => {\n if (isMounted.current) setT(getNewT);\n };\n if (bindI18n) i18n?.on(bindI18n, boundReset);\n if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);\n return () => {\n isMounted.current = false;\n if (i18n && bindI18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));\n if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));\n };\n }, [i18n, joinedNS]);\n useEffect(() => {\n if (isMounted.current && ready) {\n setT(getT);\n }\n }, [i18n, keyPrefix, ready]);\n const ret = [t, i18n, ready];\n ret.t = t;\n ret.i18n = i18n;\n ret.ready = ready;\n if (ready) return ret;\n if (!ready && !useSuspense) return ret;\n throw new Promise(resolve => {\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, () => resolve());\n } else {\n loadNamespaces(i18n, namespaces, () => resolve());\n }\n });\n};","import PropTypes from \"prop-types\";\nimport { useSelector } from \"react-redux\";\nimport { getUseSkeleton } from \"@/store/reducers/SkeletonReducer\";\n\nexport const ImmunizationConfigurationsListSkeleton = ({\n children,\n isLoading,\n}) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) return children;\n\n return (\n <div className=\"flex flex-col gap-2 w-full\">\n <div className=\"flex justify-end gap-5 mb-5\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n </div>\n\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-full h-100\"></div>\n </div>\n );\n};\n\nImmunizationConfigurationsListSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n\nexport const ManageImmunizationSkeleton = ({ children, isLoading }) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) return children;\n\n return (\n <div className=\"flex flex-col gap-5 p-5\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[20%] h-10\"></div>\n <div className=\"flex flex-wrap gap-5 justify-between my-10\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[45%] h-15\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[45%] h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[30%] h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[30%] h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[30%] h-10\"></div>\n </div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"flex justify-end gap-5\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n </div>\n </div>\n );\n};\n\nManageImmunizationSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n"],"names":["warn","i18n","code","msg","rest","args","_b","_a","isString","_d","_c","alreadyWarned","warnOnce","loadedClb","cb","initialized","loadNamespaces","ns","loadLanguages","lng","n","hasLoadedNamespace","options","i18nInstance","loadNotPending","obj","isObject","matchHtmlEntity","htmlEntities","unescapeHtmlEntity","m","unescape","text","defaultOptions","getDefaults","getI18n","I18nContext","createContext","ReportNamespaces","namespaces","usePrevious","value","ignore","ref","useRef","useEffect","alwaysNewT","language","namespace","keyPrefix","useMemoizedT","useCallback","useTranslation","props","i18nFromProps","i18nFromContext","defaultNSFromContext","useContext","notReadyT","k","optsOrDefaultValue","retNotReady","i18nOptions","useSuspense","ready","memoGetT","getT","getNewT","t","setT","useState","joinedNS","previousJoinedNS","isMounted","bindI18n","bindI18nStore","boundReset","e","ret","resolve","ImmunizationConfigurationsListSkeleton","children","isLoading","useSelector","getUseSkeleton","jsxs","jsx","PropTypes","ManageImmunizationSkeleton"],"mappings":";;;;;AAAO,MAAMA,IAAO,CAACC,GAAMC,GAAMC,GAAKC,MAAS;;AAC7C,QAAMC,IAAO,CAACF,GAAK;AAAA,IACjB,MAAAD;AAAA,IACA,GAAIE,KAAQ,CAAA;AAAA,EAChB,CAAG;AACD,OAAIE,KAAAC,IAAAN,KAAA,gBAAAA,EAAM,aAAN,gBAAAM,EAAgB,WAAhB,QAAAD,EAAwB;AAC1B,WAAOL,EAAK,SAAS,OAAO,QAAQI,GAAM,QAAQ,mBAAmB,EAAI;AAE3E,EAAIG,EAASH,EAAK,CAAC,CAAC,MAAGA,EAAK,CAAC,IAAI,mBAAmBA,EAAK,CAAC,CAAC,MACvDI,KAAAC,IAAAT,KAAA,gBAAAA,EAAM,aAAN,gBAAAS,EAAgB,W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CAAoD;AAAA,IACnE,gBAAAA,EAAC,OAAA,EAAI,WAAU,oDAAA,CAAoD;AAAA,EAAA,GACrE;AAAA,EACA,gBAAAA,EAAC,OAAA,EAAI,WAAU,iDAAA,CAAiD;AAAA,EAChE,gBAAAD,EAAC,OAAA,EAAI,WAAU,0BACb,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,iDAAA,CAAiD;AAAA,IAChE,gBAAAA,EAAC,OAAA,EAAI,WAAU,iDAAA,CAAiD;AAAA,EAAA,EAAA,CAClE;AAAA,GACF;AAIJE,GAA2B,YAAY;AAAA,EACrC,UAAUD,EAAU;AAAA,EACpB,WAAWA,EAAU;AACvB;","x_google_ignoreList":[0,1,2,3,4,5]}
1
+ {"version":3,"file":"ImmunizationSkeleton-D2tdv5k-.js","sources":["../../node_modules/react-i18next/dist/es/utils.js","../../node_modules/react-i18next/dist/es/unescape.js","../../node_modules/react-i18next/dist/es/defaults.js","../../node_modules/react-i18next/dist/es/i18nInstance.js","../../node_modules/react-i18next/dist/es/context.js","../../node_modules/react-i18next/dist/es/useTranslation.js","../src/views/Immunization/Skeletons/ImmunizationSkeleton.jsx"],"sourcesContent":["export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"',\n '&nbsp;': ' ',\n '&#160;': ' ',\n '&copy;': '©',\n '&#169;': '©',\n '&reg;': '®',\n '&#174;': '®',\n '&hellip;': '…',\n '&#8230;': '…',\n '&#x2F;': '/',\n '&#47;': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","import { useState, useEffect, useContext, useRef, useCallback } from 'react';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst usePrevious = (value, ignore) => {\n const ref = useRef();\n useEffect(() => {\n ref.current = ignore ? ref.current : value;\n }, [value, ignore]);\n return ref.current;\n};\nconst alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);\nconst useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');\n const notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n return Array.isArray(k) ? k[k.length - 1] : k;\n };\n const retNotReady = [notReadyT, {}, false];\n retNotReady.t = notReadyT;\n retNotReady.i18n = {};\n retNotReady.ready = false;\n return retNotReady;\n }\n if (i18n.options.react?.wait) warnOnce(i18n, 'DEPRECATED_OPTION', 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');\n const i18nOptions = {\n ...getDefaults(),\n ...i18n.options.react,\n ...props\n };\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n i18n.reportNamespaces.addUsedNamespaces?.(namespaces);\n const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const getT = () => memoGetT;\n const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const [t, setT] = useState(getT);\n let joinedNS = namespaces.join();\n if (props.lng) joinedNS = `${props.lng}${joinedNS}`;\n const previousJoinedNS = usePrevious(joinedNS);\n const isMounted = useRef(true);\n useEffect(() => {\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n isMounted.current = true;\n if (!ready && !useSuspense) {\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, () => {\n if (isMounted.current) setT(getNewT);\n });\n } else {\n loadNamespaces(i18n, namespaces, () => {\n if (isMounted.current) setT(getNewT);\n });\n }\n }\n if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {\n setT(getNewT);\n }\n const boundReset = () => {\n if (isMounted.current) setT(getNewT);\n };\n if (bindI18n) i18n?.on(bindI18n, boundReset);\n if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);\n return () => {\n isMounted.current = false;\n if (i18n && bindI18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));\n if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));\n };\n }, [i18n, joinedNS]);\n useEffect(() => {\n if (isMounted.current && ready) {\n setT(getT);\n }\n }, [i18n, keyPrefix, ready]);\n const ret = [t, i18n, ready];\n ret.t = t;\n ret.i18n = i18n;\n ret.ready = ready;\n if (ready) return ret;\n if (!ready && !useSuspense) return ret;\n throw new Promise(resolve => {\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, () => resolve());\n } else {\n loadNamespaces(i18n, namespaces, () => resolve());\n }\n });\n};","import PropTypes from \"prop-types\";\nimport { useSelector } from \"react-redux\";\nimport { getUseSkeleton } from \"@/store/reducers/SkeletonReducer\";\n\nexport const ImmunizationConfigurationsListSkeleton = ({\n children,\n isLoading,\n}) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) return children;\n\n return (\n <div className=\"flex flex-col gap-2 w-full\">\n <div className=\"flex justify-end gap-5 mb-5\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n </div>\n\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-full h-100\"></div>\n </div>\n );\n};\n\nImmunizationConfigurationsListSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n\nexport const ManageImmunizationSkeleton = ({ children, isLoading }) => {\n const useSkeleton = useSelector(getUseSkeleton);\n if (!useSkeleton) {\n return children;\n }\n if (!isLoading) return children;\n\n return (\n <div className=\"flex flex-col gap-5 p-5\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[20%] h-10\"></div>\n <div className=\"flex flex-wrap gap-5 justify-between my-10\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[45%] h-15\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[45%] h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[30%] h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[30%] h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-[30%] h-10\"></div>\n </div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"flex justify-end gap-5\">\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n <div className=\"bg-gray-300 animate-pulse rounded-sm w-40 h-10\"></div>\n </div>\n </div>\n );\n};\n\nManageImmunizationSkeleton.propTypes = {\n children: PropTypes.any,\n isLoading: PropTypes.any,\n};\n"],"names":["warn","i18n","code","msg","rest","args","_b","_a","isString","_d","_c","alreadyWarned","warnOnce","loadedClb","cb","initialized","loadNamespaces","ns","loadLanguages","lng","n","hasLoadedNamespace","options","i18nInstance","loadNotPending","obj","isObject","matchHtmlEntity","htmlEntities","unescapeHtmlEntity","m","unescape","text","defaultOptions","getDefaults","getI18n","I18nContext","createContext","ReportNamespaces","namespaces","usePrevious","value","ignore","ref","useRef","useEffect","alwaysNewT","language","namespace","keyPrefix","useMemoizedT","useCallback","useTranslation","props","i18nFromProps","i18nFromContext","defaultNSFromContext","useContext","notReadyT","k","optsOrDefaultValue","retNotReady","i18nOptions","useSuspense","ready","memoGetT","getT","getNewT","t","setT","useState","joinedNS","previousJoinedNS","isMounted","bindI18n","bindI18nStore","boundReset","e","ret","resolve","ImmunizationConfigurationsListSkeleton","children","isLoading","useSelector","getUseSkeleton","jsxs","jsx","PropTypes","ManageImmunizationSkeleton"],"mappings":";;;;;AAAO,MAAMA,IAAO,CAACC,GAAMC,GAAMC,GAAKC,MAAS;;AAC7C,QAAMC,IAAO,CAACF,GAAK;AAAA,IACjB,MAAAD;AAAA,IACA,GAAIE,KAAQ,CAAA;AAAA,EAChB,CAAG;AACD,OAAIE,KAAAC,IAAAN,KAAA,gBAAAA,EAAM,aAAN,gBAAAM,EAAgB,WAAhB,QAAAD,EAAwB;AAC1B,WAAOL,EAAK,SAAS,OAAO,QAAQI,GAAM,QAAQ,mBAAmB,EAAI;AAE3E,EAAIG,EAASH,EAAK,CAAC,CAAC,MAAGA,EAAK,CAAC,IAAI,mBAAmBA,EAAK,CAAC,CAAC,MACvDI,KAAAC,IAAAT,KAAA,gBAAAA,EAAM,aAAN,gBAAAS,EAAgB,WAAhB,QAAAD,EAAwB,OAC1BR,EAAK,SAAS,OAAO,KAAK,GAAGI,CAAI,IACxB,2BAAS,QAClB,QAAQ,KAAK,GAAGA,CAAI;AAExB,GACMM,IAAgB,CAAA,GACTC,IAAW,CAACX,GAAMC,GAAMC,GAAKC,MAAS;AACjD,EAAII,EAASL,C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A,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,iDAAA,CAAiD;AAAA,IAChE,gBAAAA,EAAC,OAAA,EAAI,WAAU,iDAAA,CAAiD;AAAA,EAAA,EAAA,CAClE;AAAA,GACF;AAIJE,GAA2B,YAAY;AAAA,EACrC,UAAUD,EAAU;AAAA,EACpB,WAAWA,EAAU;AACvB;","x_google_ignoreList":[0,1,2,3,4,5]}
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
2
  import { useTranslateProvider as le } from "@/common/languageTranslator/TranslationContext";
3
3
  import { execute as re } from "@/common/services/GlobalApis";
4
- import { a as ie, L as B, b as se, d as ce } from "./ManageTranslation-BTxvSYKb.js";
4
+ import { a as ie, L as B, b as se, d as ce } from "./ManageTranslation-D9IScGhk.js";
5
5
  import { showToast as m } from "@/common/toaster/toaster";
6
6
  import de from "@/hooks/useTrackEvent";
7
7
  import ue from "@/views/custom-components/CustomConfirmationModal";
@@ -391,4 +391,4 @@ Te.propTypes = {
391
391
  export {
392
392
  Te as default
393
393
  };
394
- //# sourceMappingURL=LanguagesModal-rk6IGQwY.js.map
394
+ //# sourceMappingURL=LanguagesModal-CX3oS8rk.js.map