@argusoft/medplat-core 1.0.26 → 1.0.27

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 (63) hide show
  1. package/dist/{AccessRights-CupmTG3T.js → AccessRights-CHu27ZOw.js} +220 -217
  2. package/dist/AccessRights-CHu27ZOw.js.map +1 -0
  3. package/dist/{AddEditQueryBuilder-C8ZSkOF0.js → AddEditQueryBuilder-Brdnm6rQ.js} +2 -2
  4. package/dist/{AddEditQueryBuilder-C8ZSkOF0.js.map → AddEditQueryBuilder-Brdnm6rQ.js.map} +1 -1
  5. package/dist/{AddFeatures-CqE3v0BN.js → AddFeatures-C0Z29oSd.js} +2 -2
  6. package/dist/{AddFeatures-CqE3v0BN.js.map → AddFeatures-C0Z29oSd.js.map} +1 -1
  7. package/dist/{AddLabelModal-CB8E8cYG.js → AddLabelModal-DFllBVcd.js} +2 -2
  8. package/dist/{AddLabelModal-CB8E8cYG.js.map → AddLabelModal-DFllBVcd.js.map} +1 -1
  9. package/dist/{AppModal-BKgIwe1h.js → AppModal-CtG2GjD_.js} +2 -2
  10. package/dist/{AppModal-BKgIwe1h.js.map → AppModal-CtG2GjD_.js.map} +1 -1
  11. package/dist/{ChangePasswordModalCore-DTYWRTa-.js → ChangePasswordModalCore-CDxkeIIM.js} +2 -2
  12. package/dist/{ChangePasswordModalCore-DTYWRTa-.js.map → ChangePasswordModalCore-CDxkeIIM.js.map} +1 -1
  13. package/dist/{EventConfigurations-lPcZGpLi.js → EventConfigurations-kNtAj_WM.js} +76 -76
  14. package/dist/EventConfigurations-kNtAj_WM.js.map +1 -0
  15. package/dist/{FeatureMenu-DUZL32RI.js → FeatureMenu-jl7-Tk6y.js} +49 -49
  16. package/dist/FeatureMenu-jl7-Tk6y.js.map +1 -0
  17. package/dist/FileSaver.min-CN9EpL2h.js.map +1 -1
  18. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js → ImmunizationConfigurationsList-DdSZicTP.js} +72 -73
  19. package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js.map → ImmunizationConfigurationsList-DdSZicTP.js.map} +1 -1
  20. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -1
  21. package/dist/{LanguagesModal-CX3oS8rk.js → LanguagesModal-D6VfaGrl.js} +2 -2
  22. package/dist/{LanguagesModal-CX3oS8rk.js.map → LanguagesModal-D6VfaGrl.js.map} +1 -1
  23. package/dist/{ManageNotification-CSl02Wq7.js → ManageNotification-CaBAOhji.js} +2 -2
  24. package/dist/ManageNotification-CaBAOhji.js.map +1 -0
  25. package/dist/{ManageRole-B9bs_T00.js → ManageRole-CGYfglpo.js} +2 -2
  26. package/dist/{ManageRole-B9bs_T00.js.map → ManageRole-CGYfglpo.js.map} +1 -1
  27. package/dist/{ManageTranslation-D9IScGhk.js → ManageTranslation-B4C9-lWD.js} +74 -74
  28. package/dist/ManageTranslation-B4C9-lWD.js.map +1 -0
  29. package/dist/{ManageUser-AB3_Vfp_.js → ManageUser-AY1EUDLI.js} +600 -601
  30. package/dist/ManageUser-AY1EUDLI.js.map +1 -0
  31. package/dist/{NotificationList-D1U1LYnz.js → NotificationList-C3Vb_jKU.js} +73 -73
  32. package/dist/NotificationList-C3Vb_jKU.js.map +1 -0
  33. package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +1 -1
  34. package/dist/{QueryBuilder-DI0wCJbz.js → QueryBuilder-z7eqfd7D.js} +117 -119
  35. package/dist/QueryBuilder-z7eqfd7D.js.map +1 -0
  36. package/dist/{QueryManagement-CRykYGum.js → QueryManagement-BIhEDKuA.js} +114 -114
  37. package/dist/QueryManagement-BIhEDKuA.js.map +1 -0
  38. package/dist/{RoleManagement-BIiW9uTq.js → RoleManagement-BPl2cE27.js} +99 -99
  39. package/dist/RoleManagement-BPl2cE27.js.map +1 -0
  40. package/dist/{SubMenu-CM_4wNCR.js → SubMenu-DYxAPH2Z.js} +34 -34
  41. package/dist/SubMenu-DYxAPH2Z.js.map +1 -0
  42. package/dist/{UserList-2gGuDgNa.js → UserList-Bc8gYxRL.js} +397 -400
  43. package/dist/UserList-Bc8gYxRL.js.map +1 -0
  44. package/dist/{WidgetList-B7X8Awkg.js → WidgetList-Dw_FmbbE.js} +26 -26
  45. package/dist/WidgetList-Dw_FmbbE.js.map +1 -0
  46. package/dist/i18next-CTOWN_jH.js.map +1 -1
  47. package/dist/index.css +1 -1
  48. package/dist/index.js +10 -10
  49. package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
  50. package/package.json +1 -1
  51. package/dist/AccessRights-CupmTG3T.js.map +0 -1
  52. package/dist/EventConfigurations-lPcZGpLi.js.map +0 -1
  53. package/dist/FeatureMenu-DUZL32RI.js.map +0 -1
  54. package/dist/ManageNotification-CSl02Wq7.js.map +0 -1
  55. package/dist/ManageTranslation-D9IScGhk.js.map +0 -1
  56. package/dist/ManageUser-AB3_Vfp_.js.map +0 -1
  57. package/dist/NotificationList-D1U1LYnz.js.map +0 -1
  58. package/dist/QueryBuilder-DI0wCJbz.js.map +0 -1
  59. package/dist/QueryManagement-CRykYGum.js.map +0 -1
  60. package/dist/RoleManagement-BIiW9uTq.js.map +0 -1
  61. package/dist/SubMenu-CM_4wNCR.js.map +0 -1
  62. package/dist/UserList-2gGuDgNa.js.map +0 -1
  63. package/dist/WidgetList-B7X8Awkg.js.map +0 -1
@@ -1,31 +1,31 @@
1
1
  import { jsx as s, jsxs as f, Fragment as Je } from "react/jsx-runtime";
2
- import { Modal as je, Box as re, Card as Ue, Typography as H, IconButton as Se, Button as Ne, Autocomplete as xt, TextField as ze, debounce as gt, ListItem as Te, FormControlLabel as Ee, Checkbox as _e, Tooltip as Ae, Menu as Nt, MenuItem as St } from "@mui/material";
2
+ import { Modal as je, Box as re, Card as Ue, Typography as H, IconButton as Se, Button as Ne, Autocomplete as xt, TextField as $e, debounce as gt, ListItem as Ee, FormControlLabel as Te, Checkbox as _e, Tooltip as Ae, Menu as Nt, MenuItem as St } from "@mui/material";
3
3
  import k from "@mui/material/Grid2";
4
4
  import l from "prop-types";
5
5
  import It from "@/views/custom-components/CustomConfirmationModal";
6
- import { useState as m, useEffect as ie, createElement as Pe, useRef as Le, useCallback as bt } from "react";
6
+ import { useState as m, useEffect as ae, createElement as Pe, useRef as Le, useCallback as wt } from "react";
7
7
  import { useTheme as vt } from "@mui/material/styles";
8
- import { a as ee, d as wt, b as xe, c as Dt, p as Ct } from "./Features-CObdzJp_.js";
8
+ import { a as ee, d as bt, b as xe, c as Dt, p as Ct } from "./Features-CObdzJp_.js";
9
9
  import { execute as te, getRoleList as kt } from "@/common/services/GlobalApis.js";
10
10
  import "@/assets/scss/scrollBar.scss";
11
11
  import { useForm as Ie, Controller as Ot } from "react-hook-form";
12
- import { showToast as E } from "@/common/toaster/toaster";
12
+ import { showToast as T } from "@/common/toaster/toaster";
13
13
  import Jt from "@/hooks/useTrackEvent";
14
- import { useTranslateProvider as $e } from "@/common/languageTranslator/TranslationContext";
14
+ import { useTranslateProvider as ze } from "@/common/languageTranslator/TranslationContext";
15
15
  import { FontAwesomeIcon as B } from "@fortawesome/react-fontawesome";
16
- import { faXmark as Be, faCheck as Tt, faArrowRight as Et, faTrash as _t, faPen as At, faAngleDown as Pt, faEyeSlash as Fe, faEye as Me } from "@fortawesome/free-solid-svg-icons";
16
+ import { faXmark as Be, faCheck as Et, faArrowRight as Tt, faTrash as _t, faPen as At, faAngleDown as Pt, faEyeSlash as Re, faEye as Fe } from "@fortawesome/free-solid-svg-icons";
17
17
  import { yupResolver as Lt } from "@hookform/resolvers/yup";
18
18
  import * as V from "yup";
19
19
  import ge from "@/views/custom-components/CustomCheckBox";
20
- import Re from "@/views/custom-components/CustomDatePicker";
21
- import { execute as Ft } from "@/common/services/GlobalApis";
22
- import Mt from "@/views/custom-components/CustomAutoComplete";
20
+ import Me from "@/views/custom-components/CustomDatePicker";
21
+ import { execute as Rt } from "@/common/services/GlobalApis";
22
+ import Ft from "@/views/custom-components/CustomAutoComplete";
23
23
  import ne from "@/common/services/util/GeneralUtil";
24
- import Rt from "@mui/material/Accordion";
24
+ import Mt from "@mui/material/Accordion";
25
25
  import jt from "@mui/material/AccordionDetails";
26
26
  import Ut from "@mui/material/AccordionSummary";
27
- import { useSelector as zt } from "react-redux";
28
- import { getUseSkeleton as $t } from "@/store/reducers/SkeletonReducer";
27
+ import { useSelector as $t } from "react-redux";
28
+ import { getUseSkeleton as zt } from "@/store/reducers/SkeletonReducer";
29
29
  const Bt = V.object().shape({
30
30
  noStartDate: V.boolean().default(!0),
31
31
  noEndDate: V.boolean().default(!0),
@@ -53,13 +53,13 @@ function Ye({
53
53
  subMenuId: C,
54
54
  newApiData: p
55
55
  }) {
56
- const { translate: R } = $e(), {
56
+ const { translate: M } = ze(), {
57
57
  handleSubmit: j,
58
- control: T,
58
+ control: E,
59
59
  reset: O,
60
60
  watch: x,
61
61
  formState: { errors: c },
62
- trigger: F
62
+ trigger: R
63
63
  } = Ie({
64
64
  resolver: Lt(Bt),
65
65
  defaultValues: {
@@ -70,8 +70,8 @@ function Ye({
70
70
  isBackendOnly: !1
71
71
  },
72
72
  mode: "onChange"
73
- }), Y = x("noStartDate"), J = x("noEndDate"), A = x("startDate"), N = x("endDate"), w = async (I) => {
74
- var d, b;
73
+ }), Y = x("noStartDate"), J = x("noEndDate"), A = x("startDate"), N = x("endDate"), b = async (I) => {
74
+ var d, w;
75
75
  if (y) {
76
76
  try {
77
77
  await te({
@@ -84,16 +84,16 @@ function Ye({
84
84
  endDate: I.noEndDate ? null : I.endDate,
85
85
  isBackendOnly: I.isBackendOnly
86
86
  }
87
- }), E({
87
+ }), T({
88
88
  type: "success",
89
89
  message: "Permission Granted Successfully"
90
90
  });
91
91
  const { data: U } = await ee(C);
92
92
  p(U);
93
93
  } catch (U) {
94
- E({
94
+ T({
95
95
  type: "error",
96
- message: `Error granting permission: ${(b = (d = U == null ? void 0 : U.response) == null ? void 0 : d.data) == null ? void 0 : b.message}`
96
+ message: `Error granting permission: ${(w = (d = U == null ? void 0 : U.response) == null ? void 0 : d.data) == null ? void 0 : w.message}`
97
97
  });
98
98
  }
99
99
  O(), _();
@@ -112,14 +112,14 @@ function Ye({
112
112
  lg:w-[40vw] lg:max-w-2xl
113
113
  xl:w-[30vw] xl:max-w-3xl
114
114
  `,
115
- children: /* @__PURE__ */ f("form", { onSubmit: j(w), children: [
115
+ children: /* @__PURE__ */ f("form", { onSubmit: j(b), children: [
116
116
  /* @__PURE__ */ f(k, { className: "flex justify-between items-center mb-4", children: [
117
117
  /* @__PURE__ */ s(
118
118
  H,
119
119
  {
120
120
  variant: "h6",
121
121
  className: "text-base sm:text-lg text-customBlue",
122
- children: R("Set Access Window")
122
+ children: M("Set Access Window")
123
123
  }
124
124
  ),
125
125
  /* @__PURE__ */ s(Se, { onClick: P, children: /* @__PURE__ */ s(B, { icon: Be }) })
@@ -131,16 +131,16 @@ function Ye({
131
131
  {
132
132
  defaultChecked: !0,
133
133
  label: "No Start Date",
134
- control: T,
134
+ control: E,
135
135
  errors: c,
136
136
  name: "noStartDate",
137
- onChange: () => F("startDate")
137
+ onChange: () => R("startDate")
138
138
  }
139
139
  ),
140
140
  /* @__PURE__ */ s(
141
- Re,
141
+ Me,
142
142
  {
143
- control: T,
143
+ control: E,
144
144
  name: "startDate",
145
145
  errors: c,
146
146
  disabled: Y,
@@ -154,16 +154,16 @@ function Ye({
154
154
  ge,
155
155
  {
156
156
  label: "No End Date",
157
- control: T,
157
+ control: E,
158
158
  name: "noEndDate",
159
159
  errors: c,
160
- onChange: () => F("endDate")
160
+ onChange: () => R("endDate")
161
161
  }
162
162
  ),
163
163
  /* @__PURE__ */ s(
164
- Re,
164
+ Me,
165
165
  {
166
- control: T,
166
+ control: E,
167
167
  name: "endDate",
168
168
  errors: c,
169
169
  disabled: J,
@@ -177,7 +177,7 @@ function Ye({
177
177
  ge,
178
178
  {
179
179
  label: "Is Backend Only?",
180
- control: T,
180
+ control: E,
181
181
  name: "isBackendOnly",
182
182
  className: ""
183
183
  }
@@ -192,7 +192,7 @@ function Ye({
192
192
  onClick: P,
193
193
  type: "button",
194
194
  className: "mt-2",
195
- children: R("Close")
195
+ children: M("Close")
196
196
  }
197
197
  ),
198
198
  /* @__PURE__ */ s(
@@ -203,7 +203,7 @@ function Ye({
203
203
  size: "small",
204
204
  type: "submit",
205
205
  className: "mt-2",
206
- children: R("Submit")
206
+ children: M("Submit")
207
207
  }
208
208
  )
209
209
  ] })
@@ -227,28 +227,28 @@ function qe({
227
227
  roleList: y,
228
228
  featureData: C
229
229
  }) {
230
- const [p, R] = m(""), [j, T] = m(""), [O, x] = m([]), { control: c, handleSubmit: F, reset: Y } = Ie({}), J = y.filter(
231
- (N) => !(C != null && C.some((w) => (w == null ? void 0 : w.designationId) === (N == null ? void 0 : N.id)))
230
+ const [p, M] = m(""), [j, E] = m(""), [O, x] = m([]), { control: c, handleSubmit: R, reset: Y } = Ie({}), J = y.filter(
231
+ (N) => !(C != null && C.some((b) => (b == null ? void 0 : b.designationId) === (N == null ? void 0 : N.id)))
232
232
  );
233
- ie(() => {
233
+ ae(() => {
234
234
  const N = setTimeout(() => {
235
- T(p);
235
+ E(p);
236
236
  }, 300);
237
237
  return () => clearTimeout(N);
238
- }, [p]), ie(() => {
238
+ }, [p]), ae(() => {
239
239
  j !== "" && A(j);
240
- }, [j]), ie(() => {
240
+ }, [j]), ae(() => {
241
241
  A("");
242
242
  }, []);
243
- const A = async (N, w = C) => {
243
+ const A = async (N, b = C) => {
244
244
  try {
245
- const { data: P } = await Ft({
245
+ const { data: P } = await Rt({
246
246
  code: "user_search_for_selectize",
247
247
  parameters: {
248
248
  searchString: N
249
249
  }
250
250
  }), I = ((P == null ? void 0 : P.result) || []).filter((d) => d == null ? void 0 : d.id).filter(
251
- (d) => !(w != null && w.some((b) => (b == null ? void 0 : b.userId) === (d == null ? void 0 : d.id)))
251
+ (d) => !(b != null && b.some((w) => (w == null ? void 0 : w.userId) === (d == null ? void 0 : d.id)))
252
252
  ).map((d) => ({
253
253
  ...d,
254
254
  displayName: `${d.firstName || ""} ${d.lastName || ""} (${d.userName || ""})`.trim()
@@ -274,22 +274,22 @@ function qe({
274
274
  users: !0,
275
275
  control: c,
276
276
  defaultValue: null,
277
- render: ({ field: { onChange: N, value: w, ref: P } }) => /* @__PURE__ */ s(
277
+ render: ({ field: { onChange: N, value: b, ref: P } }) => /* @__PURE__ */ s(
278
278
  xt,
279
279
  {
280
280
  options: O,
281
281
  getOptionLabel: (I) => I.displayName || "",
282
282
  isOptionEqualToValue: (I, d) => I.id === (d == null ? void 0 : d.id),
283
- value: w || null,
284
- onChange: (I, d, b) => {
285
- b === "clear" && A(""), N(d);
283
+ value: b || null,
284
+ onChange: (I, d, w) => {
285
+ w === "clear" && A(""), N(d);
286
286
  },
287
- onInputChange: (I, d, b) => {
288
- b === "input" && R(d);
287
+ onInputChange: (I, d, w) => {
288
+ w === "input" && M(d);
289
289
  },
290
290
  renderOption: (I, d) => {
291
- const b = d.displayName || "", U = p.trim(), z = b.toLowerCase().indexOf(U.toLowerCase());
292
- if (z === -1)
291
+ const w = d.displayName || "", U = p.trim(), $ = w.toLowerCase().indexOf(U.toLowerCase());
292
+ if ($ === -1)
293
293
  return /* @__PURE__ */ Pe(
294
294
  "li",
295
295
  {
@@ -297,13 +297,13 @@ function qe({
297
297
  key: d.id,
298
298
  style: { lineHeight: 1.5, fontSize: "14px" }
299
299
  },
300
- b
300
+ w
301
301
  );
302
- const le = b.substring(0, z), ce = b.substring(
303
- z,
304
- z + U.length
305
- ), K = b.substring(
306
- z + U.length
302
+ const le = w.substring(0, $), ce = w.substring(
303
+ $,
304
+ $ + U.length
305
+ ), K = w.substring(
306
+ $ + U.length
307
307
  );
308
308
  return /* @__PURE__ */ Pe("li", { ...I, key: d.id }, /* @__PURE__ */ f("span", { className: "inline", children: [
309
309
  le,
@@ -312,7 +312,7 @@ function qe({
312
312
  ] }));
313
313
  },
314
314
  renderInput: (I) => /* @__PURE__ */ s(
315
- ze,
315
+ $e,
316
316
  {
317
317
  ...I,
318
318
  label: "User",
@@ -329,7 +329,7 @@ function qe({
329
329
  /* @__PURE__ */ f(k, { className: "flex flex-row flex-2 md:space-x-3 items-center w-full", children: [
330
330
  /* @__PURE__ */ s(H, { className: "flex-1", children: r("Role") }),
331
331
  /* @__PURE__ */ s(k, { className: "flex-3", children: /* @__PURE__ */ s(
332
- Mt,
332
+ Ft,
333
333
  {
334
334
  id: "selectedRoles",
335
335
  name: "selectedRoles",
@@ -349,9 +349,9 @@ function qe({
349
349
  {
350
350
  variant: "contained",
351
351
  size: "small",
352
- onClick: F((N) => {
353
- var w;
354
- _(N), A("", [...C, { userId: (w = N.roles) == null ? void 0 : w.id }]), Y();
352
+ onClick: R((N) => {
353
+ var b;
354
+ _(N), A("", [...C, { userId: (b = N.roles) == null ? void 0 : b.id }]), Y();
355
355
  }),
356
356
  children: r("add")
357
357
  }
@@ -374,14 +374,14 @@ function We({
374
374
  featureState: C,
375
375
  featureName: p
376
376
  }) {
377
- const R = () => {
377
+ const M = () => {
378
378
  _();
379
- }, j = C[p] || !1, T = (O, x = 0) => {
379
+ }, j = C[p] || !1, E = (O, x = 0) => {
380
380
  if (!O) return null;
381
- const c = O.child || [], F = O.display_name || O.name || O.id;
381
+ const c = O.child || [], R = O.display_name || O.name || O.id;
382
382
  return /* @__PURE__ */ f("div", { className: "py-2 ", children: [
383
383
  /* @__PURE__ */ f("div", { className: "flex items-center ", children: [
384
- j ? /* @__PURE__ */ s(B, { icon: Tt }) : /* @__PURE__ */ s(B, { icon: Et }),
384
+ j ? /* @__PURE__ */ s(B, { icon: Et }) : /* @__PURE__ */ s(B, { icon: Tt }),
385
385
  /* @__PURE__ */ s("div", { className: "top-6.5 w-4 border-t border-gray-300" }),
386
386
  /* @__PURE__ */ s(
387
387
  "div",
@@ -398,7 +398,7 @@ function We({
398
398
  transition-all duration-200 cursor-pointer
399
399
 
400
400
  `,
401
- children: F
401
+ children: R
402
402
  }
403
403
  )
404
404
  ] }),
@@ -415,12 +415,12 @@ function We({
415
415
  }
416
416
  ),
417
417
  /* @__PURE__ */ s("div", { className: "absolute left-0 top-6.5 w-3 border-t border-gray-300" }),
418
- T(Y, x + 1)
418
+ E(Y, x + 1)
419
419
  ] }, J);
420
420
  }) })
421
421
  ] });
422
422
  };
423
- return /* @__PURE__ */ s(je, { open: r, onClose: R, children: /* @__PURE__ */ s(re, { className: "fixed inset-0 flex items-start justify-center z-50 bg-opacity-10", children: /* @__PURE__ */ f(
423
+ return /* @__PURE__ */ s(je, { open: r, onClose: M, children: /* @__PURE__ */ s(re, { className: "fixed inset-0 flex items-start justify-center z-50 bg-opacity-10", children: /* @__PURE__ */ f(
424
424
  Ue,
425
425
  {
426
426
  className: `
@@ -439,13 +439,13 @@ function We({
439
439
  Se,
440
440
  {
441
441
  size: "small",
442
- onClick: R,
442
+ onClick: M,
443
443
  "data-testid": "flywayquery-close-button",
444
444
  children: /* @__PURE__ */ s(B, { icon: Be })
445
445
  }
446
446
  )
447
447
  ] }),
448
- /* @__PURE__ */ s("div", { className: " max-h-[75vh] overflow-y-auto", children: y && /* @__PURE__ */ s("div", { className: "w-max pl-6 m-3 rounded px-2 py-1 h-fit ", children: T(y) }) })
448
+ /* @__PURE__ */ s("div", { className: " max-h-[75vh] overflow-y-auto", children: y && /* @__PURE__ */ s("div", { className: "w-max pl-6 m-3 rounded px-2 py-1 h-fit ", children: E(y) }) })
449
449
  ]
450
450
  }
451
451
  ) }) });
@@ -459,11 +459,11 @@ We.propTypes = {
459
459
  };
460
460
  function He({ config: r, row: _ }) {
461
461
  var O;
462
- const [y, C] = m(null), p = !!y, R = (x) => {
462
+ const [y, C] = m(null), p = !!y, M = (x) => {
463
463
  x.stopPropagation(), C(x.currentTarget), typeof r.menuClick == "function" && r.menuClick(_);
464
464
  }, j = (x) => {
465
465
  x && x.stopPropagation(), C(null);
466
- }, T = (x) => (c) => {
466
+ }, E = (x) => (c) => {
467
467
  c.stopPropagation(), typeof x.onClick == "function" && x.onClick(_), C(null);
468
468
  };
469
469
  return /* @__PURE__ */ f(re, { children: [
@@ -477,7 +477,7 @@ function He({ config: r, row: _ }) {
477
477
  backgroundColor: "transparent"
478
478
  }
479
479
  },
480
- onClick: R,
480
+ onClick: M,
481
481
  "data-testid": r.dataTestId,
482
482
  children: r.icon
483
483
  }
@@ -490,7 +490,7 @@ function He({ config: r, row: _ }) {
490
490
  onClose: j,
491
491
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
492
492
  transformOrigin: { vertical: "top", horizontal: "right" },
493
- children: (O = r.menuItems) == null ? void 0 : O.map((x, c) => /* @__PURE__ */ s(St, { onClick: T(x), children: x.label }, c))
493
+ children: (O = r.menuItems) == null ? void 0 : O.map((x, c) => /* @__PURE__ */ s(St, { onClick: E(x), children: x.label }, c))
494
494
  }
495
495
  )
496
496
  ] });
@@ -508,26 +508,29 @@ function Yt({
508
508
  onNewAPIChange: C,
509
509
  rights: p
510
510
  }) {
511
- const R = zt($t), j = vt(), T = Le(null), O = Le(!1), x = Jt(), [c, F] = m([]), [Y, J] = m([]), [A, N] = m([]), [w, P] = m([]), [I, d] = m([]), [b, U] = m(""), [z, le] = m({}), [ce, K] = m(!1), [Ke, de] = m(!1), [be, Qe] = m(""), [$, Xe] = m(null), [Ze, Ge] = m({}), [Ve, Q] = m(!1), [se, ve] = m(!1), [et, ae] = m(null), [q, tt] = m([]), [st, ue] = m(0), [nt, we] = m(""), { translate: De } = $e(), [it, fe] = m(""), [at, me] = m([]), [L, X] = m(null), Ce = () => {
512
- var n, a, i;
511
+ const M = $t(zt), j = vt(), E = Le(null), O = Le(!1), x = Jt(), [c, R] = m([]), [Y, J] = m([]), [A, N] = m([]), [b, P] = m([]), [I, d] = m([]), [w, U] = m(""), [$, le] = m({}), [ce, K] = m(!1), [Ke, de] = m(!1), [we, Qe] = m(""), [z, Xe] = m(null), [Ze, Ge] = m({}), [Ve, Q] = m(!1), [se, ve] = m(!1), [et, ie] = m(null), [q, tt] = m([]), [st, ue] = m(0), [nt, be] = m(""), { translate: De } = ze(), [at, fe] = m(""), [it, me] = m([]), [L, X] = m(null), Ce = () => {
512
+ var n;
513
513
  if (!q || q.length === 0) return null;
514
514
  const e = q.filter(
515
- (t) => {
516
- var o;
517
- return (o = t == null ? void 0 : t.id) == null ? void 0 : o.startsWith("view");
515
+ (i) => {
516
+ var a;
517
+ return (a = i == null ? void 0 : i.id) == null ? void 0 : a.startsWith("view");
518
518
  }
519
519
  );
520
520
  if (e && e.length > 0) {
521
- if ((a = (n = e[0]) == null ? void 0 : n.id) != null && a.includes("report"))
522
- return "view.report";
523
- const t = e.filter((o) => o.id.split(".").length === 3);
524
- if (t.length > 0)
525
- return t[0].id;
521
+ const i = e.find(
522
+ (t) => /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.id)
523
+ );
524
+ if (i) return i.id;
525
+ if (e.some((t) => t.id === "view.report")) return "view.report";
526
+ const a = e.filter((t) => t.id.split(".").length === 3);
527
+ if (a.length > 0)
528
+ return a[0].id;
526
529
  }
527
- return (i = q[0]) == null ? void 0 : i.id;
530
+ return (n = q[0]) == null ? void 0 : n.id;
528
531
  };
529
- ie(() => {
530
- let e = T.current;
532
+ ae(() => {
533
+ let e = E.current;
531
534
  return () => {
532
535
  x("conversion_event", {
533
536
  form: e,
@@ -537,9 +540,9 @@ function Yt({
537
540
  };
538
541
  }, []);
539
542
  const pe = (e) => {
540
- var a;
543
+ var i;
541
544
  let n;
542
- return n = (a = e.userMenuItemDtos) == null ? void 0 : a.toSorted((i, t) => i.designationId !== void 0 && t.designationId !== void 0 ? i.designationId - t.designationId : i.designationId !== void 0 && t.designationId === void 0 ? -1 : i.designationId === void 0 && t.designationId !== void 0 ? 1 : i.userId !== void 0 && t.userId !== void 0 ? i.userId - t.userId : i.userId !== void 0 && t.userId === void 0 ? -1 : i.userId === void 0 && t.userId !== void 0 ? 1 : 0), n;
545
+ return n = (i = e.userMenuItemDtos) == null ? void 0 : i.toSorted((a, t) => a.designationId !== void 0 && t.designationId !== void 0 ? a.designationId - t.designationId : a.designationId !== void 0 && t.designationId === void 0 ? -1 : a.designationId === void 0 && t.designationId !== void 0 ? 1 : a.userId !== void 0 && t.userId !== void 0 ? a.userId - t.userId : a.userId !== void 0 && t.userId === void 0 ? -1 : a.userId === void 0 && t.userId !== void 0 ? 1 : 0), n;
543
546
  };
544
547
  l.any;
545
548
  const he = (e) => (e == null || e.userMenuItemDtos.forEach((n) => {
@@ -550,54 +553,54 @@ function Yt({
550
553
  }), e), ot = async () => {
551
554
  var e, n;
552
555
  try {
553
- if (Q((a) => !a), se) {
554
- const a = [];
555
- Object.entries(JSON.parse($ == null ? void 0 : $.featureJson)).forEach(
556
- ([i, t]) => {
557
- t === !0 && a.push(i);
556
+ if (Q((i) => !i), se) {
557
+ const i = [];
558
+ Object.entries(JSON.parse(z == null ? void 0 : z.featureJson)).forEach(
559
+ ([a, t]) => {
560
+ t === !0 && i.push(a);
558
561
  }
559
562
  );
560
563
  try {
561
564
  await te({
562
565
  code: "delete_permissions",
563
566
  parameters: {
564
- permissionList: a,
565
- roleId: parseInt($ == null ? void 0 : $.designationId),
566
- userId: parseInt($ == null ? void 0 : $.userId)
567
+ permissionList: i,
568
+ roleId: parseInt(z == null ? void 0 : z.designationId),
569
+ userId: parseInt(z == null ? void 0 : z.userId)
567
570
  }
568
- }), E({
571
+ }), T({
569
572
  type: "success",
570
573
  message: "Permission Deleted Successfully"
571
574
  });
572
- const { data: i } = await ee(r);
573
- Z(i);
575
+ const { data: a } = await ee(r);
576
+ Z(a);
574
577
  } catch {
575
- E({
578
+ T({
576
579
  type: "error",
577
580
  message: "error occurred"
578
581
  });
579
582
  }
580
583
  } else {
581
- await wt(be);
582
- let { data: a } = await xe(r);
583
- (a == null ? void 0 : a.userMenuItemDtos.length) > 0 && (a = he(a)), J(a.userMenuItemDtos);
584
+ await bt(we);
585
+ let { data: i } = await xe(r);
586
+ (i == null ? void 0 : i.userMenuItemDtos.length) > 0 && (i = he(i)), J(i.userMenuItemDtos);
584
587
  }
585
- K(!1), Q((a) => !a);
586
- } catch (a) {
587
- E({
588
+ K(!1), Q((i) => !i);
589
+ } catch (i) {
590
+ T({
588
591
  type: "error",
589
- message: `Error Deleting data: ${(n = (e = a == null ? void 0 : a.response) == null ? void 0 : e.data) == null ? void 0 : n.message}`
590
- }), Q((i) => !i), K(!1);
592
+ message: `Error Deleting data: ${(n = (e = i == null ? void 0 : i.response) == null ? void 0 : e.data) == null ? void 0 : n.message}`
593
+ }), Q((a) => !a), K(!1);
591
594
  }
592
595
  }, rt = (e, n) => {
593
- const a = new Set(e.map((t) => t.id)), i = [];
596
+ const i = new Set(e.map((t) => t.id)), a = [];
594
597
  return Object.entries(n).forEach(([t, o]) => {
595
- o === !0 && !a.has(t) && i.push({ id: t, action: "grant" });
598
+ o === !0 && !i.has(t) && a.push({ id: t, action: "grant" });
596
599
  }), e.forEach((t) => {
597
- n[t.id] || i.push({ id: t.id, action: "revoke" });
598
- }), i;
600
+ n[t.id] || a.push({ id: t.id, action: "revoke" });
601
+ }), a;
599
602
  }, { handleSubmit: lt } = Ie({}), ye = async (e) => {
600
- var n, a, i, t, o, g;
603
+ var n, i, a, t, o, g;
601
604
  try {
602
605
  if (se) {
603
606
  e = { ...e, featureJson: JSON.parse(e == null ? void 0 : e.featureJson) };
@@ -606,11 +609,11 @@ function Yt({
606
609
  e == null ? void 0 : e.featureJson
607
610
  );
608
611
  if (((n = S[0]) == null ? void 0 : n.action) === "grant")
609
- ae({
612
+ ie({
610
613
  ...e,
611
- id: (a = S[0]) == null ? void 0 : a.id
614
+ id: (i = S[0]) == null ? void 0 : i.id
612
615
  }), ue(1);
613
- else if (((i = S[0]) == null ? void 0 : i.action) === "revoke")
616
+ else if (((a = S[0]) == null ? void 0 : a.action) === "revoke")
614
617
  try {
615
618
  await te({
616
619
  code: "revoke_permission",
@@ -619,12 +622,12 @@ function Yt({
619
622
  roleId: parseInt(e == null ? void 0 : e.designationId),
620
623
  userId: parseInt(e == null ? void 0 : e.userId)
621
624
  }
622
- }), E({
625
+ }), T({
623
626
  type: "success",
624
627
  message: "Permission Revoked Successfully"
625
628
  });
626
629
  } catch {
627
- E({
630
+ T({
628
631
  type: "error",
629
632
  message: "Error in revoking permission"
630
633
  });
@@ -634,7 +637,7 @@ function Yt({
634
637
  } else
635
638
  await Dt(e);
636
639
  } catch (S) {
637
- E({
640
+ T({
638
641
  type: "error",
639
642
  message: `Error Updating data: ${(g = (o = S == null ? void 0 : S.response) == null ? void 0 : o.data) == null ? void 0 : g.message}`
640
643
  });
@@ -645,15 +648,15 @@ function Yt({
645
648
  ...e,
646
649
  featureJson: JSON.parse(e == null ? void 0 : e.featureJson)
647
650
  }, e != null && e.checkAll) {
648
- const a = Object.keys(e == null ? void 0 : e.featureJson).filter((i) => (e == null ? void 0 : e.featureJson[i]) === !1).join(",");
651
+ const i = Object.keys(e == null ? void 0 : e.featureJson).filter((a) => (e == null ? void 0 : e.featureJson[a]) === !1).join(",");
649
652
  await te({
650
653
  code: "grant_permission_bulk",
651
654
  parameters: {
652
- permission_id_list: a,
655
+ permission_id_list: i,
653
656
  role_id: parseInt(e == null ? void 0 : e.designationId),
654
657
  user_id: parseInt(e == null ? void 0 : e.userId)
655
658
  }
656
- }), E({
659
+ }), T({
657
660
  type: "success",
658
661
  message: "Permission granted Successfully"
659
662
  });
@@ -664,53 +667,53 @@ function Yt({
664
667
  console.error(n);
665
668
  }
666
669
  }, ke = async (e) => {
667
- var n, a, i, t;
670
+ var n, i, a, t;
668
671
  if (!(e != null && e.roles || e != null && e.selectedRoles)) {
669
- E({
672
+ T({
670
673
  message: "Please select either user or role !!",
671
674
  type: "info"
672
675
  });
673
676
  return;
674
677
  }
675
678
  if (se && c.length < 1) {
676
- E({
679
+ T({
677
680
  message: "Please add permissions first for this feature !!",
678
681
  type: "info"
679
682
  });
680
683
  return;
681
684
  }
682
685
  try {
683
- const o = ((n = e == null ? void 0 : e.selectedRoles) == null ? void 0 : n.map((v) => v == null ? void 0 : v.id)) || [], g = z != null && z.id ? Y.some((v) => (v == null ? void 0 : v.userId) === (z == null ? void 0 : z.id)) : !1, S = (o == null ? void 0 : o.length) > 0 ? Y.some(
686
+ const o = ((n = e == null ? void 0 : e.selectedRoles) == null ? void 0 : n.map((v) => v == null ? void 0 : v.id)) || [], g = $ != null && $.id ? Y.some((v) => (v == null ? void 0 : v.userId) === ($ == null ? void 0 : $.id)) : !1, S = (o == null ? void 0 : o.length) > 0 ? Y.some(
684
687
  (v) => o.includes(v == null ? void 0 : v.designationId)
685
688
  ) : !1;
686
689
  if (g || S)
687
- E({
690
+ T({
688
691
  message: "Selected User Already found please select another id",
689
692
  type: "warning"
690
693
  });
691
694
  else {
692
695
  const v = o == null ? void 0 : o.join(","), D = {
693
- userId: (a = e == null ? void 0 : e.roles) == null ? void 0 : a.id,
696
+ userId: (i = e == null ? void 0 : e.roles) == null ? void 0 : i.id,
694
697
  designationId: v || null
695
- }, M = q.filter(
698
+ }, F = q.filter(
696
699
  (h) => {
697
700
  var G;
698
701
  return (G = h == null ? void 0 : h.id) == null ? void 0 : G.startsWith("view");
699
702
  }
700
703
  );
701
704
  if (se) {
702
- const h = (i = M.find(
705
+ const h = (a = F.find(
703
706
  (W) => /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(W.id)
704
- )) == null ? void 0 : i.id;
705
- h ? ae({
707
+ )) == null ? void 0 : a.id;
708
+ h ? ie({
706
709
  ...D,
707
710
  id: h
708
- }) : M.some((W) => W.id === "view.report") ? ae({
711
+ }) : F.some((W) => W.id === "view.report") ? ie({
709
712
  ...D,
710
713
  id: "view.report"
711
- }) : ae({
714
+ }) : ie({
712
715
  ...D,
713
- id: (M == null ? void 0 : M.filter((W) => W.id.split(".").length === 3).map((W) => W.id)[0]) || ((t = q[0]) == null ? void 0 : t.id)
716
+ id: (F == null ? void 0 : F.filter((W) => W.id.split(".").length === 3).map((W) => W.id)[0]) || ((t = q[0]) == null ? void 0 : t.id)
714
717
  }), ue(1);
715
718
  const { data: G } = await ee(r);
716
719
  Z(G);
@@ -729,10 +732,10 @@ function Yt({
729
732
  feature_name_list: W
730
733
  }
731
734
  });
732
- F(yt.result);
735
+ R(yt.result);
733
736
  } else
734
- F([]);
735
- E({
737
+ R([]);
738
+ T({
736
739
  message: "menu item added successfully",
737
740
  type: "success"
738
741
  });
@@ -740,20 +743,20 @@ function Yt({
740
743
  O.current = !0, le({});
741
744
  }
742
745
  } catch (o) {
743
- console.error(o), E({
746
+ console.error(o), T({
744
747
  message: "cannot add menu item",
745
748
  type: "error"
746
749
  });
747
750
  }
748
- }, dt = bt(
751
+ }, dt = wt(
749
752
  gt((e) => {
750
753
  if (!e)
751
754
  J(A);
752
755
  else {
753
756
  const n = A == null ? void 0 : A.filter(
754
- (a) => {
755
- var i, t;
756
- return a != null && a.designationId ? (i = a.roleName) == null ? void 0 : i.toLowerCase().includes(e) : (t = a.fullName) == null ? void 0 : t.toLowerCase().includes(e);
757
+ (i) => {
758
+ var a, t;
759
+ return i != null && i.designationId ? (a = i.roleName) == null ? void 0 : a.toLowerCase().includes(e) : (t = i.fullName) == null ? void 0 : t.toLowerCase().includes(e);
757
760
  }
758
761
  );
759
762
  x("search_tracking", {
@@ -766,37 +769,37 @@ function Yt({
766
769
  [c, x]
767
770
  ), ut = (e) => {
768
771
  const n = e.target.value.toLowerCase();
769
- we(n), dt(n);
772
+ be(n), dt(n);
770
773
  }, ft = (e, n = {}) => {
771
- const a = {};
772
- return Object.keys(e).forEach((i) => {
773
- Object.prototype.hasOwnProperty.call(n, i) ? a[i] = n[i] : a[i] = e[i];
774
- }), JSON.stringify(a);
774
+ const i = {};
775
+ return Object.keys(e).forEach((a) => {
776
+ Object.prototype.hasOwnProperty.call(n, a) ? i[a] = n[a] : i[a] = e[a];
777
+ }), JSON.stringify(i);
775
778
  }, mt = (e, n) => {
776
- const a = new Set(n.map((t) => t.id)), i = {};
779
+ const i = new Set(n.map((t) => t.id)), a = {};
777
780
  return e.forEach((t) => {
778
- i[t.id] = a.has(t.id);
779
- }), JSON.stringify(i);
781
+ a[t.id] = i.has(t.id);
782
+ }), JSON.stringify(a);
780
783
  }, Z = (e) => {
781
- e == null || e.userMenuItemDtos.forEach((i) => {
782
- i.id = (i == null ? void 0 : i.designationId) || (i == null ? void 0 : i.userId), i.featureJson = mt(
784
+ e == null || e.userMenuItemDtos.forEach((a) => {
785
+ a.id = (a == null ? void 0 : a.designationId) || (a == null ? void 0 : a.userId), a.featureJson = mt(
783
786
  e == null ? void 0 : e.permissions,
784
- i == null ? void 0 : i.permissions
785
- ), i.designationId ? (i.code = "Role", i.displayName = i.roleName) : (i.code = "User", i.displayName = i.fullName);
787
+ a == null ? void 0 : a.permissions
788
+ ), a.designationId ? (a.code = "Role", a.displayName = a.roleName) : (a.code = "User", a.displayName = a.fullName);
786
789
  });
787
790
  const n = [
788
- ...new Set(e.permissions.map((i) => i.id))
791
+ ...new Set(e.permissions.map((a) => a.id))
789
792
  ];
790
- F(n), tt(e == null ? void 0 : e.permissions);
791
- const a = pe(e);
792
- J(a), N(a);
793
+ R(n), tt(e == null ? void 0 : e.permissions);
794
+ const i = pe(e);
795
+ J(i), N(i);
793
796
  };
794
- ie(() => {
797
+ ae(() => {
795
798
  (async () => {
796
- var n, a, i;
799
+ var n, i, a;
797
800
  try {
798
801
  if (r) {
799
- X(null), Oe(!1), Q((u) => !u), we("");
802
+ X(null), Oe(!1), Q((u) => !u), be("");
800
803
  let t, o;
801
804
  if (_ ? (t = (await ee(r)).data, o = !0, ve(!0), C({ id: r, val: !0 })) : (t = (await xe(r)).data, o = !1, ve(!1), C({ id: r, val: !1 })), o)
802
805
  Z(t);
@@ -806,13 +809,13 @@ function Yt({
806
809
  J(u), N(u);
807
810
  }
808
811
  let g = I;
809
- if (!w || w.length === 0) {
812
+ if (!b || b.length === 0) {
810
813
  const { data: u } = await kt();
811
814
  d(u), g = u;
812
815
  }
813
816
  let S;
814
817
  if (o)
815
- S = t.permissions.map((u) => u.id), F(S);
818
+ S = t.permissions.map((u) => u.id), R(S);
816
819
  else if (S = t.featureJson ? Object.keys(JSON.parse(t.featureJson)) : [], S.length > 0) {
817
820
  const [u] = await Promise.all([
818
821
  await te({
@@ -823,14 +826,14 @@ function Yt({
823
826
  }
824
827
  })
825
828
  ]);
826
- F((n = u.data) == null ? void 0 : n.result);
829
+ R((n = u.data) == null ? void 0 : n.result);
827
830
  } else
828
- F([]);
831
+ R([]);
829
832
  if (g && g.length > 0)
830
833
  if (t.isDynamicFeature) {
831
834
  const v = JSON.parse(JSON.stringify(g)).filter((D) => {
832
- const M = D.roleType;
833
- return M === null || t != null && t.isMobileFeature && (t != null && t.isWebFeature) ? !0 : t.isMobileFeature ? M === "MOBILE" || M === "BOTH" : t.isWebFeature ? M === "WEB" || M === "BOTH" : !1;
835
+ const F = D.roleType;
836
+ return F === null || t != null && t.isMobileFeature && (t != null && t.isWebFeature) ? !0 : t.isMobileFeature ? F === "MOBILE" || F === "BOTH" : t.isWebFeature ? F === "WEB" || F === "BOTH" : !1;
834
837
  });
835
838
  P(v);
836
839
  } else
@@ -838,23 +841,23 @@ function Yt({
838
841
  Q((u) => !u);
839
842
  }
840
843
  } catch (t) {
841
- E({
844
+ T({
842
845
  type: "error",
843
- message: `Error loading initial data: ${(i = (a = t == null ? void 0 : t.response) == null ? void 0 : a.data) == null ? void 0 : i.message}`
846
+ message: `Error loading initial data: ${(a = (i = t == null ? void 0 : t.response) == null ? void 0 : i.data) == null ? void 0 : a.message}`
844
847
  }), Q((o) => !o);
845
848
  }
846
849
  })();
847
850
  }, [r, C]);
848
851
  function oe(e, n) {
849
- for (const a of e)
850
- if (String(a.id) === String(n))
851
- return a;
852
+ for (const i of e)
853
+ if (String(i.id) === String(n))
854
+ return i;
852
855
  return null;
853
856
  }
854
- const [pt, Oe] = m(!1), ht = (e) => (n, a) => {
855
- Oe(a ? e : !1);
857
+ const [pt, Oe] = m(!1), ht = (e) => (n, i) => {
858
+ Oe(i ? e : !1);
856
859
  };
857
- return /* @__PURE__ */ s(Je, { children: (Ve || y) && R ? /* @__PURE__ */ s("div", { className: "w-full flex flex-wrap", children: /* @__PURE__ */ f("div", { className: "w-full flex flex-col px-2", children: [
860
+ return /* @__PURE__ */ s(Je, { children: (Ve || y) && M ? /* @__PURE__ */ s("div", { className: "w-full flex flex-wrap", children: /* @__PURE__ */ f("div", { className: "w-full flex flex-col px-2", children: [
858
861
  /* @__PURE__ */ s("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[70px] mb-2" }),
859
862
  /* @__PURE__ */ s("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[280px] mb-2" })
860
863
  ] }) }) : /* @__PURE__ */ f(k, { container: !0, sx: { borderTop: `1px solid ${j.palette.divider}` }, children: [
@@ -863,7 +866,7 @@ function Yt({
863
866
  {
864
867
  description: "Are you sure , Do you want to delete this ?",
865
868
  title: "CONFIRM ACTION",
866
- open: ce && be === ($ == null ? void 0 : $.id),
869
+ open: ce && we === (z == null ? void 0 : z.id),
867
870
  handleClick: ot,
868
871
  handleClose: () => K((e) => !e),
869
872
  dataTestId: "accessrights-delete-modal"
@@ -876,8 +879,8 @@ function Yt({
876
879
  onClose: () => {
877
880
  de((e) => !e), X(null), fe(""), me([]);
878
881
  },
879
- featureState: at,
880
- featureName: it,
882
+ featureState: it,
883
+ featureName: at,
881
884
  permissions: L
882
885
  }
883
886
  ),
@@ -894,7 +897,7 @@ function Yt({
894
897
  /* @__PURE__ */ s(
895
898
  "form",
896
899
  {
897
- ref: T,
900
+ ref: E,
898
901
  onSubmit: lt(ke),
899
902
  className: "w-full",
900
903
  children: /* @__PURE__ */ f(
@@ -907,7 +910,7 @@ function Yt({
907
910
  /* @__PURE__ */ f(k, { className: "flex-1 flex space-x-10 items-center justify-between", children: [
908
911
  /* @__PURE__ */ s(H, { variant: "body2", children: De("Search") }),
909
912
  /* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(
910
- ze,
913
+ $e,
911
914
  {
912
915
  id: "searchQuery",
913
916
  placeholder: "Search Text",
@@ -923,12 +926,12 @@ function Yt({
923
926
  }
924
927
  ) })
925
928
  ] }),
926
- (!ne.isTecho || (p == null ? void 0 : p["update.manage.featurelist"])) && /* @__PURE__ */ s(k, { className: "flex-3 flex space-x-10 items-center justify-between w-full", children: /* @__PURE__ */ s(
929
+ ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) && /* @__PURE__ */ s(k, { className: "flex-3 flex space-x-10 items-center justify-between w-full", children: /* @__PURE__ */ s(
927
930
  qe,
928
931
  {
929
932
  translate: De,
930
933
  onSubmit: ke,
931
- roleList: w,
934
+ roleList: b,
932
935
  featureData: Y
933
936
  }
934
937
  ) })
@@ -938,7 +941,7 @@ function Yt({
938
941
  }
939
942
  ),
940
943
  /* @__PURE__ */ s("div", { style: { width: "100%" }, children: Y.map((e) => /* @__PURE__ */ s(Je, { children: /* @__PURE__ */ f(
941
- Rt,
944
+ Mt,
942
945
  {
943
946
  expanded: pt === `panel${e == null ? void 0 : e.id}`,
944
947
  onChange: ht(`panel${e == null ? void 0 : e.id}`),
@@ -967,7 +970,7 @@ function Yt({
967
970
  }
968
971
  ),
969
972
  /* @__PURE__ */ f("div", { className: "ml-auto mr-4 flex items-center space-x-3", children: [
970
- (!ne.isTecho || (p == null ? void 0 : p["update.manage.featurelist"])) && /* @__PURE__ */ s(
973
+ ne.hasCheckRights(p == null ? void 0 : p["delete.manage.featurelist"]) && /* @__PURE__ */ s(
971
974
  B,
972
975
  {
973
976
  icon: _t,
@@ -982,7 +985,7 @@ function Yt({
982
985
  }
983
986
  }
984
987
  ),
985
- (!ne.isTecho || (p == null ? void 0 : p["update.manage.featurelist"])) && /* @__PURE__ */ s(
988
+ ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) && /* @__PURE__ */ s(
986
989
  He,
987
990
  {
988
991
  config: {
@@ -1018,11 +1021,11 @@ function Yt({
1018
1021
  checkAll: !0
1019
1022
  });
1020
1023
  else {
1021
- let a = JSON.parse(b);
1022
- const i = (c == null ? void 0 : c.length) > 0 ? c.reduce(
1024
+ let i = JSON.parse(w);
1025
+ const a = (c == null ? void 0 : c.length) > 0 ? c.reduce(
1023
1026
  (t, { feature_name: o }) => (t[o] = !0, t),
1024
1027
  {}
1025
- ) : Object.keys(a).reduce(
1028
+ ) : Object.keys(i).reduce(
1026
1029
  (t, o) => (t[o] = !0, t),
1027
1030
  {}
1028
1031
  );
@@ -1030,12 +1033,12 @@ function Yt({
1030
1033
  (t) => t.map(
1031
1034
  (o) => o.id === n.id ? {
1032
1035
  ...o,
1033
- featureJson: JSON.stringify(i)
1036
+ featureJson: JSON.stringify(a)
1034
1037
  } : o
1035
1038
  )
1036
1039
  ), ye({
1037
1040
  ...Ze,
1038
- featureJson: JSON.stringify(i)
1041
+ featureJson: JSON.stringify(a)
1039
1042
  });
1040
1043
  }
1041
1044
  }
@@ -1050,40 +1053,40 @@ function Yt({
1050
1053
  }
1051
1054
  ),
1052
1055
  /* @__PURE__ */ s(jt, { children: /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: /* @__PURE__ */ s("div", { className: "flex gap-6 w-max", children: /* @__PURE__ */ f("div", { className: "grid grid-cols-3 w-max p-0 m-0", children: [
1053
- c.length <= 0 && Object.keys(JSON.parse(b || "{}")).length <= 0 && /* @__PURE__ */ s("div", { className: "text-gray-500 px-4 italic", children: "No Data to Display" }),
1056
+ c.length <= 0 && Object.keys(JSON.parse(w || "{}")).length <= 0 && /* @__PURE__ */ s("div", { className: "text-gray-500 px-4 italic", children: "No Data to Display" }),
1054
1057
  (c == null ? void 0 : c.length) > 0 ? Object.keys(
1055
1058
  JSON.parse(e.featureJson || "{}")
1056
- ).map((n, a) => {
1059
+ ).map((n, i) => {
1057
1060
  var u, v;
1058
- const i = JSON.parse(
1061
+ const a = JSON.parse(
1059
1062
  e.featureJson || "{}"
1060
1063
  ), t = ((u = c.find(
1061
1064
  (D) => D.feature_name === n
1062
- )) == null ? void 0 : u.display_name) || n, o = i[n] || !1, g = oe(
1065
+ )) == null ? void 0 : u.display_name) || n, o = a[n] || !1, g = oe(
1063
1066
  q,
1064
1067
  t
1065
1068
  ), S = (((v = g == null ? void 0 : g.child) == null ? void 0 : v.length) || 0) > 0;
1066
1069
  return /* @__PURE__ */ f(
1067
- Te,
1070
+ Ee,
1068
1071
  {
1069
1072
  className: "p-0 flex ",
1070
1073
  children: [
1071
1074
  /* @__PURE__ */ s(
1072
- Ee,
1075
+ Te,
1073
1076
  {
1074
1077
  control: /* @__PURE__ */ s(
1075
1078
  _e,
1076
1079
  {
1077
- disabled: ne.isTecho && !(p != null && p["update.manage.featurelist"]) || n === Ce(),
1080
+ disabled: !ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) || n === Ce(),
1078
1081
  checked: o,
1079
1082
  name: n,
1080
1083
  onClick: () => {
1081
1084
  const D = {
1082
- ...i,
1085
+ ...a,
1083
1086
  [n]: !o
1084
1087
  };
1085
1088
  J(
1086
- (M) => M.map(
1089
+ (F) => F.map(
1087
1090
  (h) => h.id === e.id ? {
1088
1091
  ...h,
1089
1092
  featureJson: JSON.stringify(
@@ -1121,7 +1124,7 @@ function Yt({
1121
1124
  return;
1122
1125
  }
1123
1126
  fe(n), me(
1124
- i
1127
+ a
1125
1128
  ), de(!0), X(g);
1126
1129
  },
1127
1130
  className: "cursor-pointer text-gray-600 transition-transform duration-200 hover:scale-[1.2] py-1 pr-3",
@@ -1129,48 +1132,48 @@ function Yt({
1129
1132
  B,
1130
1133
  {
1131
1134
  color: "primary",
1132
- icon: Fe
1135
+ icon: Re
1133
1136
  }
1134
1137
  ) }) : /* @__PURE__ */ s(Ae, { title: "View Permissions", children: /* @__PURE__ */ s(
1135
1138
  B,
1136
1139
  {
1137
1140
  className: " text-[var(--color-primary)] ",
1138
1141
  color: "primary",
1139
- icon: Me
1142
+ icon: Fe
1140
1143
  }
1141
1144
  ) })
1142
1145
  }
1143
1146
  )
1144
1147
  ]
1145
1148
  },
1146
- `featureName-${a}`
1149
+ `featureName-${i}`
1147
1150
  );
1148
- }) : Object.keys(JSON.parse(b || "{}")).map(
1149
- (n, a) => {
1151
+ }) : Object.keys(JSON.parse(w || "{}")).map(
1152
+ (n, i) => {
1150
1153
  var S;
1151
- const i = JSON.parse(
1154
+ const a = JSON.parse(
1152
1155
  e.featureJson || "{}"
1153
- ), t = i[n] || !1, o = oe(
1156
+ ), t = a[n] || !1, o = oe(
1154
1157
  q,
1155
1158
  n
1156
1159
  ), g = (((S = o == null ? void 0 : o.child) == null ? void 0 : S.length) || 0) > 0;
1157
1160
  return /* @__PURE__ */ f(
1158
- Te,
1161
+ Ee,
1159
1162
  {
1160
1163
  className: "p-0",
1161
1164
  children: [
1162
1165
  /* @__PURE__ */ s(
1163
- Ee,
1166
+ Te,
1164
1167
  {
1165
1168
  control: /* @__PURE__ */ s(
1166
1169
  _e,
1167
1170
  {
1168
- disabled: ne.isTecho && !(p != null && p["update.manage.featurelist"]) || n === Ce(),
1171
+ disabled: !ne.hasCheckRights(p == null ? void 0 : p["update.manage.featurelist"]) || n === Ce(),
1169
1172
  checked: t,
1170
1173
  name: n,
1171
1174
  onClick: () => {
1172
1175
  const u = {
1173
- ...i,
1176
+ ...a,
1174
1177
  [n]: !t
1175
1178
  };
1176
1179
  J(
@@ -1218,21 +1221,21 @@ function Yt({
1218
1221
  B,
1219
1222
  {
1220
1223
  color: "primary",
1221
- icon: Fe
1224
+ icon: Re
1222
1225
  }
1223
1226
  ) : /* @__PURE__ */ s(
1224
1227
  B,
1225
1228
  {
1226
1229
  className: " text-[var(--color-primary)] ",
1227
1230
  color: "primary",
1228
- icon: Me
1231
+ icon: Fe
1229
1232
  }
1230
1233
  )
1231
1234
  }
1232
1235
  )
1233
1236
  ]
1234
1237
  },
1235
- `featureName-${a}`
1238
+ `featureName-${i}`
1236
1239
  );
1237
1240
  }
1238
1241
  )
@@ -1256,4 +1259,4 @@ Yt.propTypes = {
1256
1259
  export {
1257
1260
  Yt as default
1258
1261
  };
1259
- //# sourceMappingURL=AccessRights-CupmTG3T.js.map
1262
+ //# sourceMappingURL=AccessRights-CHu27ZOw.js.map