@argusoft/medplat-form-engine 1.0.15 → 1.0.17
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.
- package/dist/AccessRights-BMRM1u9S-D1Gc0rKI.js +1228 -0
- package/dist/AccessRights-BMRM1u9S-D1Gc0rKI.js.map +1 -0
- package/dist/AddEditQueryBuilder-7JRplV5J-DHgS6TYG.js +313 -0
- package/dist/AddEditQueryBuilder-7JRplV5J-DHgS6TYG.js.map +1 -0
- package/dist/AddEditQueryBuilder-7JRplV5J.css +1 -0
- package/dist/AddFeatures-CkTu7sOI-BGplSFp6.js +212 -0
- package/dist/AddFeatures-CkTu7sOI-BGplSFp6.js.map +1 -0
- package/dist/AddLabelModal-DE3ploGD-OOyaGC02.js +734 -0
- package/dist/AddLabelModal-DE3ploGD-OOyaGC02.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js +5389 -0
- package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js.map +1 -0
- package/dist/AddMenuConfiguration-QWfpcnuP.css +1 -0
- package/dist/AddRoleDrawer-ZK1eejxI-BM6rfhh5.js +453 -0
- package/dist/AddRoleDrawer-ZK1eejxI-BM6rfhh5.js.map +1 -0
- package/dist/AppModal-BgZyfrd--BO3wW4ma.js +428 -0
- package/dist/AppModal-BgZyfrd--BO3wW4ma.js.map +1 -0
- package/dist/ChangePasswordModalCore-DIe4rzW--Dz71RCI6.js +176 -0
- package/dist/ChangePasswordModalCore-DIe4rzW--Dz71RCI6.js.map +1 -0
- package/dist/ConditionConfig-GDCXIg3C-DuEy85LD.js +395 -0
- package/dist/ConditionConfig-GDCXIg3C-DuEy85LD.js.map +1 -0
- package/dist/ConditionConfig-GDCXIg3C.css +1 -0
- package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js +50 -0
- package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP-CJBCGp6J.js +384 -0
- package/dist/EventConfigurations-jGCJ4LqP-CJBCGp6J.js.map +1 -0
- package/dist/EventConfigurations-jGCJ4LqP.css +1 -0
- package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js +200 -0
- package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js.map +1 -0
- package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js +74 -0
- package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js.map +1 -0
- package/dist/FeatureMenu-Ds6lFg4w-ShGx4okQ.js +249 -0
- package/dist/FeatureMenu-Ds6lFg4w-ShGx4okQ.js.map +1 -0
- package/dist/Features-Cshdl06N-CZ02Tt89.js +12 -0
- package/dist/Features-Cshdl06N-CZ02Tt89.js.map +1 -0
- package/dist/FileSaver.min-CN9EpL2h-N-3OFAd7.js +77 -0
- package/dist/FileSaver.min-CN9EpL2h-N-3OFAd7.js.map +1 -0
- package/dist/FlywayQuery-Cx2sly6g-DdhUw6bN.js +169 -0
- package/dist/FlywayQuery-Cx2sly6g-DdhUw6bN.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF-B4x4_1v0.js +5162 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF-B4x4_1v0.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF.css +1 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09-Bbr0iyGy.js +335 -0
- package/dist/ImmunizationConfigurationsList-CQnxWa09-Bbr0iyGy.js.map +1 -0
- package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js +186 -0
- package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js.map +1 -0
- package/dist/LanguagesModal-rk6IGQwY-B0Jtpivu.js +394 -0
- package/dist/LanguagesModal-rk6IGQwY-B0Jtpivu.js.map +1 -0
- package/dist/ManageDynamicFeature-C2I7Ho7i-Bbxkpw0S.js +4189 -0
- package/dist/ManageDynamicFeature-C2I7Ho7i-Bbxkpw0S.js.map +1 -0
- package/dist/ManageEventConfiguration-BJxS2Su0-CRATBMym.js +1017 -0
- package/dist/ManageEventConfiguration-BJxS2Su0-CRATBMym.js.map +1 -0
- package/dist/ManageEventConfiguration-BJxS2Su0.css +1 -0
- package/dist/ManageNotification-DMN2szWy-DQvdrfwC.js +6819 -0
- package/dist/ManageNotification-DMN2szWy-DQvdrfwC.js.map +1 -0
- package/dist/ManageRole-CuXmWQyp-Cy15Mlax.js +728 -0
- package/dist/ManageRole-CuXmWQyp-Cy15Mlax.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb-CdO4Fk7f.js +616 -0
- package/dist/ManageTranslation-BTxvSYKb-CdO4Fk7f.js.map +1 -0
- package/dist/ManageTranslation-BTxvSYKb.css +1 -0
- package/dist/ManageUser-Dr3ptCYp-CzLX1rCi.js +2179 -0
- package/dist/ManageUser-Dr3ptCYp-CzLX1rCi.js.map +1 -0
- package/dist/ManageUser-Dr3ptCYp.css +1 -0
- package/dist/MedplatFormWrapper-CfKQpZOJ.js +52228 -0
- package/dist/MedplatFormWrapper-CfKQpZOJ.js.map +1 -0
- package/dist/MedplatFormWrapper.css +1 -0
- package/dist/MobileMenuManagement-BmrO-7MN-xFkU87j6.js +111 -0
- package/dist/MobileMenuManagement-BmrO-7MN-xFkU87j6.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-ChhO_A4f-DfJDqFB9.js +783 -0
- package/dist/MobileTypeEventConfigModal-ChhO_A4f-DfJDqFB9.js.map +1 -0
- package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js +1002 -0
- package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js.map +1 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js +244 -0
- package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js.map +1 -0
- package/dist/NotificationList-BqibwMaM-D4mMbj4h.js +400 -0
- package/dist/NotificationList-BqibwMaM-D4mMbj4h.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js +1953 -0
- package/dist/OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js.map +1 -0
- package/dist/QueryBuilder-BPfavHH9-M3wgeHB3.js +378 -0
- package/dist/QueryBuilder-BPfavHH9-M3wgeHB3.js.map +1 -0
- package/dist/QueryBuilder-BPfavHH9.css +1 -0
- package/dist/QueryManagement-DXA73N2j-C2RCVmd2.js +671 -0
- package/dist/QueryManagement-DXA73N2j-C2RCVmd2.js.map +1 -0
- package/dist/QueryManagement-DXA73N2j.css +1 -0
- package/dist/RoleManagement-C0feJCuq-DIGwGqOD.js +410 -0
- package/dist/RoleManagement-C0feJCuq-DIGwGqOD.js.map +1 -0
- package/dist/SecurityAuditLogList-DHTcOtbx-VvwDlRuu.js +746 -0
- package/dist/SecurityAuditLogList-DHTcOtbx-VvwDlRuu.js.map +1 -0
- package/dist/ServerSyncModal-D_oFpv3C-C6c3_3lx.js +836 -0
- package/dist/ServerSyncModal-D_oFpv3C-C6c3_3lx.js.map +1 -0
- package/dist/ShowFlywayQuery-BkyA6QaA-2t9pZjcx.js +130 -0
- package/dist/ShowFlywayQuery-BkyA6QaA-2t9pZjcx.js.map +1 -0
- package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js +259 -0
- package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js.map +1 -0
- package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js +190 -0
- package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js.map +1 -0
- package/dist/SubMenu-DAfZC9Xi-B0BQYLdI.js +188 -0
- package/dist/SubMenu-DAfZC9Xi-B0BQYLdI.js.map +1 -0
- package/dist/TableDetails-DzREeJkm-B-WEBbQz.js +1508 -0
- package/dist/TableDetails-DzREeJkm-B-WEBbQz.js.map +1 -0
- package/dist/TableList-B9hr05Hs-BIsMbnIV.js +428 -0
- package/dist/TableList-B9hr05Hs-BIsMbnIV.js.map +1 -0
- package/dist/TypeConfiguration-C-lk8Szs-DkvHWHhr.js +117 -0
- package/dist/TypeConfiguration-C-lk8Szs-DkvHWHhr.js.map +1 -0
- package/dist/UserList-S5Q76wO7-Cj5u_K4_.js +1104 -0
- package/dist/UserList-S5Q76wO7-Cj5u_K4_.js.map +1 -0
- package/dist/UserList-S5Q76wO7.css +1 -0
- package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js +184 -0
- package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js.map +1 -0
- package/dist/WidgetList-BSApErov-Z61Kpq4T.js +188 -0
- package/dist/WidgetList-BSApErov-Z61Kpq4T.js.map +1 -0
- package/dist/_commonjsHelpers-B4e78b8K-B9tZyK9c.js +29 -0
- package/dist/_commonjsHelpers-B4e78b8K-B9tZyK9c.js.map +1 -0
- package/dist/default-DlLB_mdl.js +11341 -0
- package/dist/default-DlLB_mdl.js.map +1 -0
- package/dist/default.css +1 -0
- package/dist/i18next-CTOWN_jH-BKKbdDel.js +1389 -0
- package/dist/i18next-CTOWN_jH-BKKbdDel.js.map +1 -0
- package/dist/index-B4r0wjBD.js +563 -0
- package/dist/index-B4r0wjBD.js.map +1 -0
- package/dist/index-BFznsakV-CzCTrTvj.js +42638 -0
- package/dist/index-BFznsakV-CzCTrTvj.js.map +1 -0
- package/dist/index-Dta_LKti.js +744 -0
- package/dist/index-Dta_LKti.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +6 -52390
- package/dist/index.js.map +1 -1
- package/dist/manageImmunization-B4swS745-JldexHrO.js +1204 -0
- package/dist/manageImmunization-B4swS745-JldexHrO.js.map +1 -0
- package/dist/manageImmunization-B4swS745.css +1 -0
- package/dist/xlsx.min-D1LFqt_b-BGwkpd8r.js +11869 -0
- package/dist/xlsx.min-D1LFqt_b-BGwkpd8r.js.map +1 -0
- package/package.json +1 -4
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { p as D } from "./RoleManagement-C0feJCuq-DIGwGqOD.js";
|
|
3
|
+
import { yupResolver as M } from "@hookform/resolvers/yup";
|
|
4
|
+
import { Modal as O, Box as y, Typography as f, List as R, ListItem as $, Stack as V, Button as v } from "@mui/material";
|
|
5
|
+
import i from "@mui/material/Grid2";
|
|
6
|
+
import n from "prop-types";
|
|
7
|
+
import { useRef as g, useState as z, useEffect as Y } from "react";
|
|
8
|
+
import { useForm as q } from "react-hook-form";
|
|
9
|
+
import * as x from "yup";
|
|
10
|
+
import { showToast as p } from "@/common/toaster/toaster";
|
|
11
|
+
import { useTranslateProvider as H } from "@/common/languageTranslator/TranslationContext";
|
|
12
|
+
import J from "@/hooks/useTrackEvent";
|
|
13
|
+
import K from "@/views/custom-components/CustomAutoComplete";
|
|
14
|
+
import { getFeaturesV2 as Q } from "@/common/services/AuthenticateService";
|
|
15
|
+
function U({
|
|
16
|
+
assignedFeatureList: c,
|
|
17
|
+
selectedId: w,
|
|
18
|
+
setData: _,
|
|
19
|
+
open: C,
|
|
20
|
+
setOpenModal: F
|
|
21
|
+
}) {
|
|
22
|
+
const I = g(null), h = g(!1), { translate: u } = H(), [N, j] = z([]), T = x.object().shape({
|
|
23
|
+
values: x.array().min(1, "Please select at least one feature.")
|
|
24
|
+
}), {
|
|
25
|
+
formState: { errors: k },
|
|
26
|
+
handleSubmit: B,
|
|
27
|
+
reset: E,
|
|
28
|
+
control: L,
|
|
29
|
+
watch: S
|
|
30
|
+
} = q({
|
|
31
|
+
defaultValues: {
|
|
32
|
+
values: []
|
|
33
|
+
},
|
|
34
|
+
resolver: M(T),
|
|
35
|
+
mode: "onChange"
|
|
36
|
+
}), b = S("values");
|
|
37
|
+
function A(e) {
|
|
38
|
+
const o = [];
|
|
39
|
+
for (const a in e)
|
|
40
|
+
e[a].forEach((r) => {
|
|
41
|
+
r.subGroups ? r.subGroups.forEach((l) => o.push(l)) : o.push(r);
|
|
42
|
+
});
|
|
43
|
+
return o;
|
|
44
|
+
}
|
|
45
|
+
const d = J();
|
|
46
|
+
function m() {
|
|
47
|
+
E(), F(!1), d("conversion_event", {
|
|
48
|
+
form: I.current,
|
|
49
|
+
form_name: "Add Feature",
|
|
50
|
+
submit: h.current
|
|
51
|
+
}), d("button_click", {
|
|
52
|
+
button_name: "add feature cancel button",
|
|
53
|
+
button_type: "cancel",
|
|
54
|
+
button_id: "assignfeatures-button-cancel"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const G = async (e) => {
|
|
58
|
+
try {
|
|
59
|
+
d("button_click", {
|
|
60
|
+
button_name: "add feature save button",
|
|
61
|
+
button_type: "submit",
|
|
62
|
+
button_id: "assignfeatures-button-save"
|
|
63
|
+
});
|
|
64
|
+
const o = {
|
|
65
|
+
featureId: e.values.map((a) => a.id).join(",")
|
|
66
|
+
};
|
|
67
|
+
await D(o, w), p({
|
|
68
|
+
message: "Feature successfully assigned to selected role",
|
|
69
|
+
type: "success"
|
|
70
|
+
}), await _(), h.current = !0, m();
|
|
71
|
+
} catch (o) {
|
|
72
|
+
p({
|
|
73
|
+
message: `Error : ${o == null ? void 0 : o.message}`,
|
|
74
|
+
type: "error"
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, P = async () => {
|
|
78
|
+
try {
|
|
79
|
+
const { data: e } = await Q(), o = A(e).sort(
|
|
80
|
+
(a, r) => {
|
|
81
|
+
var l;
|
|
82
|
+
return (l = a.name) == null ? void 0 : l.localeCompare(r.name);
|
|
83
|
+
}
|
|
84
|
+
).filter(
|
|
85
|
+
(a) => !(c != null && c.some(
|
|
86
|
+
(r) => r.featureId === a.id
|
|
87
|
+
))
|
|
88
|
+
);
|
|
89
|
+
j(o);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
p({
|
|
92
|
+
message: `Error : ${e == null ? void 0 : e.message}`,
|
|
93
|
+
type: "error"
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return Y(() => {
|
|
98
|
+
P();
|
|
99
|
+
}, [c]), /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
|
|
100
|
+
O,
|
|
101
|
+
{
|
|
102
|
+
open: C,
|
|
103
|
+
onClose: m,
|
|
104
|
+
"data-testid": "assignfeatures-modal",
|
|
105
|
+
children: /* @__PURE__ */ t(
|
|
106
|
+
i,
|
|
107
|
+
{
|
|
108
|
+
container: !0,
|
|
109
|
+
className: "absolute top-[10%] left-[50%] transform -translate-x-1/2 w-[95%] sm:w-[37.5rem] shadow-2xl rounded-md border flex flex-col h-auto max-h-[80vh] overflow-y-auto",
|
|
110
|
+
sx: { bgcolor: "background.paper" },
|
|
111
|
+
children: /* @__PURE__ */ s(i, { className: "flex flex-col gap-2", children: [
|
|
112
|
+
/* @__PURE__ */ t(
|
|
113
|
+
y,
|
|
114
|
+
{
|
|
115
|
+
className: "p-2.5 px-5 flex w-full justify-start",
|
|
116
|
+
sx: { borderBottom: 1, borderColor: "divider" },
|
|
117
|
+
children: /* @__PURE__ */ t(
|
|
118
|
+
f,
|
|
119
|
+
{
|
|
120
|
+
className: "font-medium text-lg text-customBlue",
|
|
121
|
+
sx: { color: "text.primary" },
|
|
122
|
+
children: u("Assign New Feature")
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ s(
|
|
128
|
+
y,
|
|
129
|
+
{
|
|
130
|
+
className: "p-2.5 max-h-100 overflow-auto",
|
|
131
|
+
sx: { borderBottom: 1, borderColor: "divider" },
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ t(
|
|
134
|
+
K,
|
|
135
|
+
{
|
|
136
|
+
options: N,
|
|
137
|
+
getOptionLabel: (e) => e.name,
|
|
138
|
+
control: L,
|
|
139
|
+
name: "values",
|
|
140
|
+
errors: k,
|
|
141
|
+
dataTestId: "assignfeatures-autocomplete"
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
b.length > 0 && /* @__PURE__ */ t(i, { className: "overflow-y-auto flex flex-col max-h-40 h-auto", children: /* @__PURE__ */ t(R, { children: b.filter((e) => e.description).map((e) => /* @__PURE__ */ t($, { children: /* @__PURE__ */ s(f, { children: [
|
|
145
|
+
/* @__PURE__ */ s("strong", { children: [
|
|
146
|
+
e == null ? void 0 : e.name,
|
|
147
|
+
":"
|
|
148
|
+
] }),
|
|
149
|
+
" ",
|
|
150
|
+
e == null ? void 0 : e.description
|
|
151
|
+
] }) }, e == null ? void 0 : e.id)) }) })
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ s(
|
|
156
|
+
V,
|
|
157
|
+
{
|
|
158
|
+
direction: "row",
|
|
159
|
+
spacing: 2,
|
|
160
|
+
justifyContent: "flex-end",
|
|
161
|
+
mt: 2,
|
|
162
|
+
mb: 1,
|
|
163
|
+
className: "px-4",
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ t(
|
|
166
|
+
v,
|
|
167
|
+
{
|
|
168
|
+
variant: "contained",
|
|
169
|
+
color: "secondary",
|
|
170
|
+
onClick: m,
|
|
171
|
+
"data-testid": "assignfeatures-button-cancel",
|
|
172
|
+
children: /* @__PURE__ */ t(
|
|
173
|
+
f,
|
|
174
|
+
{
|
|
175
|
+
variant: "caption",
|
|
176
|
+
"data-testid": "assignfeatures-typography-cancel",
|
|
177
|
+
children: u("Cancel")
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ t(
|
|
183
|
+
v,
|
|
184
|
+
{
|
|
185
|
+
size: "small",
|
|
186
|
+
variant: "contained",
|
|
187
|
+
color: "primary",
|
|
188
|
+
onClick: B(G),
|
|
189
|
+
"data-testid": "assignfeatures-button-save",
|
|
190
|
+
children: u("Add")
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
] })
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
) });
|
|
201
|
+
}
|
|
202
|
+
U.propTypes = {
|
|
203
|
+
assignedFeatureList: n.any,
|
|
204
|
+
selectedId: n.any,
|
|
205
|
+
open: n.any,
|
|
206
|
+
setOpenModal: n.any,
|
|
207
|
+
setData: n.any
|
|
208
|
+
};
|
|
209
|
+
export {
|
|
210
|
+
U as default
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=AddFeatures-CkTu7sOI-BGplSFp6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddFeatures-CkTu7sOI-BGplSFp6.js","sources":["../../core/dist/AddFeatures-CkTu7sOI.js"],"sourcesContent":["import { jsx as t, jsxs as n } from \"react/jsx-runtime\";\nimport { p as M } from \"./RoleManagement-C0feJCuq.js\";\nimport { yupResolver as O } from \"@hookform/resolvers/yup\";\nimport { Modal as V, Box as x, Typography as p, List as $, ListItem as z, Stack as W, Button as v } from \"@mui/material\";\nimport i from \"@mui/material/Grid2\";\nimport c from \"prop-types\";\nimport { useRef as g, useState as q, useEffect as H } from \"react\";\nimport { useForm as J } from \"react-hook-form\";\nimport * as w from \"yup\";\nimport { showToast as f } from \"@/common/toaster/toaster\";\nimport { useTranslateProvider as K } from \"@/common/languageTranslator/TranslationContext\";\nimport Q from \"@/hooks/useTrackEvent\";\nimport U from \"@/views/custom-components/CustomAutoComplete\";\nimport { getFeaturesV2 as X } from \"@/common/services/AuthenticateService\";\nfunction Y({\n assignedFeatureList: l,\n selectedId: C,\n setData: _,\n open: k,\n setOpenModal: N\n}) {\n const F = g(null), h = g(!1), { translate: m } = K(), [I, E] = q([]), T = w.object().shape({\n values: w.array().min(1, \"Please select at least one feature.\")\n }), {\n formState: { errors: j },\n handleSubmit: A,\n reset: S,\n control: B,\n watch: R\n } = J({\n defaultValues: {\n values: []\n },\n resolver: O(T),\n mode: \"onChange\"\n }), b = R(\"values\");\n function G(e) {\n const o = [];\n for (const s in e)\n e[s].forEach((a) => {\n a.subGroups ? a.subGroups.forEach((r) => o.push(r)) : o.push(a);\n });\n return o;\n }\n const d = Q();\n function u() {\n S(), N(!1), d(\"conversion_event\", {\n form: F.current,\n form_name: \"Add Feature\",\n submit: h.current\n }), d(\"button_click\", {\n button_name: \"add feature cancel button\",\n button_type: \"cancel\",\n button_id: \"assignfeatures-button-cancel\"\n });\n }\n const P = async (e) => {\n try {\n d(\"button_click\", {\n button_name: \"add feature save button\",\n button_type: \"submit\",\n button_id: \"assignfeatures-button-save\"\n });\n const s = {\n featureId: e.values.map((a) => a.id).join(\",\")\n };\n await M(s, C), f({\n message: \"Feature successfully assigned to selected role\",\n type: \"success\"\n }), await _(), h.current = !0, u();\n } catch (o) {\n f({\n message: `Error : ${o == null ? void 0 : o.message}`,\n type: \"error\"\n });\n }\n }, D = async () => {\n try {\n const { data: e } = await X(), s = G(e).sort(\n (a, r) => {\n var y;\n return (y = a.name) == null ? void 0 : y.localeCompare(r.name);\n }\n ).filter(\n (a) => !(l != null && l.some(\n (r) => r.featureId === a.id\n ))\n );\n E(s);\n } catch (e) {\n f({\n message: `Error : ${e == null ? void 0 : e.message}`,\n type: \"error\"\n });\n }\n };\n return H(() => {\n D();\n }, [l]), /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(\n V,\n {\n open: k,\n onClose: u,\n \"data-testid\": \"assignfeatures-modal\",\n children: /* @__PURE__ */ t(\n i,\n {\n container: !0,\n className: \"absolute top-[10%] left-[50%] transform -translate-x-1/2 w-[95%] sm:w-[37.5rem] shadow-2xl rounded-md border flex flex-col h-auto max-h-[80vh] overflow-y-auto\",\n sx: { bgcolor: \"background.paper\" },\n children: /* @__PURE__ */ n(i, { className: \"flex flex-col gap-2\", children: [\n /* @__PURE__ */ t(\n x,\n {\n className: \"p-2.5 px-5 flex w-full justify-start\",\n sx: { borderBottom: 1, borderColor: \"divider\" },\n children: /* @__PURE__ */ t(\n p,\n {\n className: \"font-medium text-lg text-customBlue\",\n sx: { color: \"text.primary\" },\n children: m(\"Assign New Feature\")\n }\n )\n }\n ),\n /* @__PURE__ */ n(\n x,\n {\n className: \"p-2.5 max-h-100 overflow-auto\",\n sx: { borderBottom: 1, borderColor: \"divider\" },\n children: [\n /* @__PURE__ */ t(\n U,\n {\n options: I,\n getOptionLabel: (e) => e.name,\n control: B,\n name: \"values\",\n errors: j,\n dataTestId: \"assignfeatures-autocomplete\"\n }\n ),\n b.length > 0 && /* @__PURE__ */ t(i, { className: \"overflow-y-auto flex flex-col max-h-40 h-auto\", children: /* @__PURE__ */ t($, { children: b.filter((e) => e.description).map((e) => /* @__PURE__ */ t(z, { children: /* @__PURE__ */ n(p, { children: [\n /* @__PURE__ */ n(\"strong\", { children: [\n e == null ? void 0 : e.name,\n \":\"\n ] }),\n \" \",\n e == null ? void 0 : e.description\n ] }) }, e == null ? void 0 : e.id)) }) })\n ]\n }\n ),\n /* @__PURE__ */ n(\n W,\n {\n direction: \"row\",\n spacing: 2,\n justifyContent: \"flex-end\",\n mt: 2,\n mb: 1,\n className: \"px-4\",\n children: [\n /* @__PURE__ */ t(\n v,\n {\n variant: \"contained\",\n color: \"secondary\",\n onClick: u,\n \"data-testid\": \"assignfeatures-button-cancel\",\n children: /* @__PURE__ */ t(\n p,\n {\n variant: \"caption\",\n \"data-testid\": \"assignfeatures-typography-cancel\",\n children: m(\"Cancel\")\n }\n )\n }\n ),\n /* @__PURE__ */ t(\n v,\n {\n size: \"small\",\n variant: \"contained\",\n color: \"primary\",\n onClick: A(P),\n \"data-testid\": \"assignfeatures-button-save\",\n children: m(\"Add\")\n }\n )\n ]\n }\n )\n ] })\n }\n )\n }\n ) });\n}\nY.propTypes = {\n assignedFeatureList: c.any,\n selectedId: c.any,\n open: c.any,\n setOpenModal: c.any,\n setData: c.any\n};\nexport {\n Y as default\n};\n//# sourceMappingURL=AddFeatures-CkTu7sOI.js.map\n"],"names":["Y","l","C","k","N","F","g","m","K","I","E","q","w","j","A","S","B","R","J","O","G","s","a","r","Q","u","P","M","f","D","X","y","H","t","i","V","n","x","p","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