@argusoft/medplat-core 1.0.23 → 1.0.25
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/{AddFeatures-CTVs_Gr9.js → AddFeatures-CqE3v0BN.js} +2 -2
- package/dist/{AddFeatures-CTVs_Gr9.js.map → AddFeatures-CqE3v0BN.js.map} +1 -1
- package/dist/AddMenuConfiguration-BSQLl88V.js +6570 -0
- package/dist/AddMenuConfiguration-BSQLl88V.js.map +1 -0
- package/dist/AddMenuConfiguration.css +1 -1
- package/dist/{ChangePasswordModalCore-DONyFFlx.js → ChangePasswordModalCore-DTYWRTa-.js} +955 -952
- package/dist/ChangePasswordModalCore-DTYWRTa-.js.map +1 -0
- package/dist/{ConditionConfig-C3rF2wXU.js → ConditionConfig-DSsgGEXS.js} +2 -2
- package/dist/{ConditionConfig-C3rF2wXU.js.map → ConditionConfig-DSsgGEXS.js.map} +1 -1
- package/dist/FhirRawResourceList-ZZFd7gTX.js +550 -0
- package/dist/FhirRawResourceList-ZZFd7gTX.js.map +1 -0
- package/dist/FhirServerList-Dkq7Kbes.js +116 -0
- package/dist/FhirServerList-Dkq7Kbes.js.map +1 -0
- package/dist/FhirServerProfile-CUOwC6Wb.js +253 -0
- package/dist/FhirServerProfile-CUOwC6Wb.js.map +1 -0
- package/dist/FhirServerWizard-Db6Hm4bQ.js +161 -0
- package/dist/FhirServerWizard-Db6Hm4bQ.js.map +1 -0
- package/dist/{ImmunizationConfigurationBase-CTBoSuSz.js → ImmunizationConfigurationBase-BevKZx_l.js} +386 -302
- package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +1 -0
- package/dist/{ManageEventConfiguration-BntUc_YI.js → ManageEventConfiguration-DV3I5POA.js} +4 -4
- package/dist/{ManageEventConfiguration-BntUc_YI.js.map → ManageEventConfiguration-DV3I5POA.js.map} +1 -1
- package/dist/{ManageRole-CZAk-IlM.js → ManageRole-B9bs_T00.js} +116 -116
- package/dist/ManageRole-B9bs_T00.js.map +1 -0
- package/dist/{ManageUser-Gv38VHMu.js → ManageUser-AB3_Vfp_.js} +85 -84
- package/dist/{ManageUser-Gv38VHMu.js.map → ManageUser-AB3_Vfp_.js.map} +1 -1
- package/dist/{MobileMenuManagement-CV6QCeos.js → MobileMenuManagement-CVAKyKDa.js} +33 -32
- package/dist/MobileMenuManagement-CVAKyKDa.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js → MobileTypeEventConfigModal-BxLympIO.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-BNjZ8pnq.js.map → MobileTypeEventConfigModal-BxLympIO.js.map} +1 -1
- package/dist/{OtherTypeEventConfigModal-DiVhWDpG.js → OtherTypeEventConfigModal-BeG1GrUi.js} +94 -93
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +1 -0
- package/dist/{RoleManagement-B9WgZGEj.js → RoleManagement-BIiW9uTq.js} +2 -2
- package/dist/{RoleManagement-B9WgZGEj.js.map → RoleManagement-BIiW9uTq.js.map} +1 -1
- package/dist/ServerFormFields-SLghoZ2z.js +136 -0
- package/dist/ServerFormFields-SLghoZ2z.js.map +1 -0
- package/dist/SyncDialog-BRGpHOE4.js +130 -0
- package/dist/SyncDialog-BRGpHOE4.js.map +1 -0
- package/dist/{TypeConfiguration-CupQxH9Y.js → TypeConfiguration-37wp-gsl.js} +2 -2
- package/dist/{TypeConfiguration-CupQxH9Y.js.map → TypeConfiguration-37wp-gsl.js.map} +1 -1
- package/dist/{UserList-BzHsbYel.js → UserList-2gGuDgNa.js} +38 -37
- package/dist/{UserList-BzHsbYel.js.map → UserList-2gGuDgNa.js.map} +1 -1
- package/dist/{UserListSkeleton-DhIJ5X3y.js → UserListSkeleton-BMKANCtW.js} +57 -93
- package/dist/UserListSkeleton-BMKANCtW.js.map +1 -0
- package/dist/Users-CsJ08Kjm.js +40 -0
- package/dist/Users-CsJ08Kjm.js.map +1 -0
- package/dist/dashboardLayoutUtils-Bt5HA96J.js +265 -0
- package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +190 -134
- package/dist/index.js.map +1 -1
- package/dist/permissions-DEWACxJN.js +308 -0
- package/dist/permissions-DEWACxJN.js.map +1 -0
- package/package.json +1 -1
- package/dist/AddMenuConfiguration-DsnY0Rws.js +0 -2237
- package/dist/AddMenuConfiguration-DsnY0Rws.js.map +0 -1
- package/dist/ChangePasswordModalCore-DONyFFlx.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-CTBoSuSz.js.map +0 -1
- package/dist/ManageRole-CZAk-IlM.js.map +0 -1
- package/dist/MobileMenuManagement-CV6QCeos.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-DiVhWDpG.js.map +0 -1
- package/dist/UserListSkeleton-DhIJ5X3y.js.map +0 -1
|
@@ -1,2237 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as e, Fragment as Ze } from "react/jsx-runtime";
|
|
2
|
-
import { execute as Ie } from "@/common/services/QueryBuilder";
|
|
3
|
-
import { showToast as ie } from "@/common/toaster/toaster";
|
|
4
|
-
import { useDroppable as rt, DndContext as Nt, useDraggable as Mt, DragOverlay as ir, rectIntersection as At, closestCenter as ar } from "@dnd-kit/core";
|
|
5
|
-
import { SortableContext as De, verticalListSortingStrategy as Ue, arrayMove as Pe, useSortable as nt } from "@dnd-kit/sortable";
|
|
6
|
-
import { Box as U, Typography as v, FormControl as Ve, InputLabel as sr, Select as lr, MenuItem as Tt, Tooltip as cr, Paper as xe, IconButton as dr, Divider as ot, Button as Ge, Switch as Ot, TextField as Qe, InputAdornment as ur, Accordion as Ye, AccordionSummary as Je, AccordionDetails as Xe, Grid2 as pr, Autocomplete as mr } from "@mui/material";
|
|
7
|
-
import I from "@mui/material/Grid2";
|
|
8
|
-
import { Grid as ye, Box as N } from "@mui/system";
|
|
9
|
-
import K, { createContext as hr, useState as _, useCallback as Re, useMemo as Fe, useEffect as Ke } from "react";
|
|
10
|
-
import { useForm as gr } from "react-hook-form";
|
|
11
|
-
import { useSelector as fr } from "react-redux";
|
|
12
|
-
import { useLocation as xr, useNavigate as yr } from "react-router";
|
|
13
|
-
import br from "@/views/custom-components/CustomDropdown";
|
|
14
|
-
import h from "prop-types";
|
|
15
|
-
import { FontAwesomeIcon as z } from "@fortawesome/react-fontawesome";
|
|
16
|
-
import { faWifi as vr, faSignal as Sr, faBatteryFull as Cr, faLocationDot as Ir, faRotate as Rr, faBell as wr, faCircleUser as Er, faChevronDown as kt, faMagnifyingGlass as _t, faTimes as Ar, faTrashCan as Tr } from "@fortawesome/free-solid-svg-icons";
|
|
17
|
-
import Or from "@/assets/img/home.svg";
|
|
18
|
-
import Nr from "@/assets/img/programs.svg";
|
|
19
|
-
import Mr from "@/assets/img/analytics.svg";
|
|
20
|
-
import kr from "@/assets/img/family-management.svg";
|
|
21
|
-
import { CSS as _r } from "@dnd-kit/utilities";
|
|
22
|
-
import X from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
23
|
-
import { generateUUID as fe } from "@/utils/UUIDgenerator";
|
|
24
|
-
import Fr from "@/views/custom-components/CustomConfirmationModal";
|
|
25
|
-
import './AddMenuConfiguration.css';const Pr = hr(), Gr = ({ id: o, children: c, componentType: d }) => {
|
|
26
|
-
const { attributes: b, listeners: E, setNodeRef: u, isDragging: y } = nt({
|
|
27
|
-
id: o,
|
|
28
|
-
data: { sortable: !0, type: d }
|
|
29
|
-
}), R = {
|
|
30
|
-
opacity: y ? 0.3 : 1
|
|
31
|
-
};
|
|
32
|
-
return K.cloneElement(c, {
|
|
33
|
-
ref: u,
|
|
34
|
-
style: { ...c.props.style, ...R },
|
|
35
|
-
dnd: { listeners: E, attributes: b }
|
|
36
|
-
});
|
|
37
|
-
}, Dr = ({ id: o, children: c, componentType: d }) => {
|
|
38
|
-
const { attributes: b, listeners: E, setNodeRef: u, isDragging: y } = Mt({
|
|
39
|
-
id: o,
|
|
40
|
-
data: {
|
|
41
|
-
type: d,
|
|
42
|
-
deletable: !0
|
|
43
|
-
}
|
|
44
|
-
}), R = {
|
|
45
|
-
opacity: y ? 0.3 : 1
|
|
46
|
-
};
|
|
47
|
-
return K.cloneElement(c, {
|
|
48
|
-
ref: u,
|
|
49
|
-
style: { ...c.props.style, ...R },
|
|
50
|
-
...E,
|
|
51
|
-
...b
|
|
52
|
-
});
|
|
53
|
-
}, Ft = ({ id: o, children: c, sectionId: d, featureName: b }) => {
|
|
54
|
-
const { attributes: E, listeners: u, setNodeRef: y, isDragging: R } = nt({
|
|
55
|
-
id: o,
|
|
56
|
-
data: {
|
|
57
|
-
sortable: !0,
|
|
58
|
-
type: "FEATURE_TILE",
|
|
59
|
-
sectionId: d,
|
|
60
|
-
name: b
|
|
61
|
-
}
|
|
62
|
-
}), F = {
|
|
63
|
-
opacity: R ? 0.3 : 1
|
|
64
|
-
};
|
|
65
|
-
return K.cloneElement(c, {
|
|
66
|
-
ref: y,
|
|
67
|
-
style: { ...c.props.style, ...F },
|
|
68
|
-
...E,
|
|
69
|
-
...u
|
|
70
|
-
});
|
|
71
|
-
}, it = K.forwardRef(({ id: o, style: c, handleSectionClick: d, ...b }, E) => /* @__PURE__ */ p(
|
|
72
|
-
U,
|
|
73
|
-
{
|
|
74
|
-
id: o,
|
|
75
|
-
ref: E,
|
|
76
|
-
onContextMenu: (y) => {
|
|
77
|
-
y.preventDefault(), d(o);
|
|
78
|
-
},
|
|
79
|
-
sx: {
|
|
80
|
-
...c,
|
|
81
|
-
width: "100%",
|
|
82
|
-
minHeight: "50px",
|
|
83
|
-
p: 1.5,
|
|
84
|
-
border: "1px solid #ccc",
|
|
85
|
-
borderRadius: "8px",
|
|
86
|
-
backgroundColor: "var(--color-background2)",
|
|
87
|
-
display: "flex",
|
|
88
|
-
alignItems: "center",
|
|
89
|
-
mt: 1,
|
|
90
|
-
boxShadow: "0 1px 3px rgba(0,0,0,0.05)",
|
|
91
|
-
mb: 3
|
|
92
|
-
},
|
|
93
|
-
...b,
|
|
94
|
-
children: [
|
|
95
|
-
/* @__PURE__ */ e(z, { icon: _t, style: { marginRight: "8px", color: "#888" } }),
|
|
96
|
-
/* @__PURE__ */ e(v, { variant: "body2", color: "textSecondary", sx: { flexGrow: 1 }, children: "Search..." })
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
));
|
|
100
|
-
it.displayName = "MobileSearchBar";
|
|
101
|
-
it.propTypes = {
|
|
102
|
-
id: h.any,
|
|
103
|
-
style: h.any,
|
|
104
|
-
handleSectionClick: h.any
|
|
105
|
-
};
|
|
106
|
-
const at = K.forwardRef(
|
|
107
|
-
({
|
|
108
|
-
id: o,
|
|
109
|
-
arrayIndex: c,
|
|
110
|
-
sectionTitle: d,
|
|
111
|
-
handleSectionClick: b,
|
|
112
|
-
dnd: E,
|
|
113
|
-
sectionFeatures: u,
|
|
114
|
-
SvgIconBox: y,
|
|
115
|
-
onGroupClick: R,
|
|
116
|
-
activeGroupId: F,
|
|
117
|
-
...Q
|
|
118
|
-
}, ee) => {
|
|
119
|
-
const { listeners: de, attributes: T } = E || {}, te = (A) => {
|
|
120
|
-
A.preventDefault(), b(o);
|
|
121
|
-
}, M = (A) => {
|
|
122
|
-
A.stopPropagation();
|
|
123
|
-
}, re = (A, j) => {
|
|
124
|
-
A.preventDefault(), A.stopPropagation(), R && R(A, j);
|
|
125
|
-
}, { setNodeRef: ae, isOver: ue } = rt({
|
|
126
|
-
id: `section-drop-zone-${o}`,
|
|
127
|
-
data: {
|
|
128
|
-
type: "SECTION_DROP_ZONE",
|
|
129
|
-
sectionId: o
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
return /* @__PURE__ */ p(
|
|
133
|
-
U,
|
|
134
|
-
{
|
|
135
|
-
id: o,
|
|
136
|
-
ref: ee,
|
|
137
|
-
...de,
|
|
138
|
-
...T,
|
|
139
|
-
onContextMenu: te,
|
|
140
|
-
sx: {
|
|
141
|
-
display: "flex",
|
|
142
|
-
flexDirection: "column",
|
|
143
|
-
alignItems: "flex-start",
|
|
144
|
-
justifyContent: "flex-start",
|
|
145
|
-
p: 1,
|
|
146
|
-
border: ue ? "1px dashed var(--color-tableHeader)" : "0.1px solid #A9BCCD",
|
|
147
|
-
cursor: "pointer",
|
|
148
|
-
backgroundColor: "#e6f0ff",
|
|
149
|
-
borderRadius: "14px",
|
|
150
|
-
mt: 1
|
|
151
|
-
},
|
|
152
|
-
...Q,
|
|
153
|
-
children: [
|
|
154
|
-
/* @__PURE__ */ e(
|
|
155
|
-
U,
|
|
156
|
-
{
|
|
157
|
-
sx: {
|
|
158
|
-
display: "flex",
|
|
159
|
-
justifyContent: "space-between",
|
|
160
|
-
alignItems: "center",
|
|
161
|
-
width: "100%",
|
|
162
|
-
mb: 0.5
|
|
163
|
-
},
|
|
164
|
-
children: /* @__PURE__ */ e(v, { variant: "body2", sx: { fontWeight: "bold", color: "var(--color-text)", flexGrow: 1 }, children: d || `Section ${c + 1}` })
|
|
165
|
-
}
|
|
166
|
-
),
|
|
167
|
-
/* @__PURE__ */ e(
|
|
168
|
-
U,
|
|
169
|
-
{
|
|
170
|
-
ref: ae,
|
|
171
|
-
sx: {
|
|
172
|
-
width: "100%",
|
|
173
|
-
minHeight: "40px",
|
|
174
|
-
border: `${ue ? "1px dashed var(--color-tableHeader)" : ""}`,
|
|
175
|
-
borderRadius: "4px",
|
|
176
|
-
textAlign: "center",
|
|
177
|
-
display: "flex",
|
|
178
|
-
flexDirection: "column",
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
justifyContent: (u == null ? void 0 : u.length) > 0 ? "flex-start" : "center",
|
|
181
|
-
transition: "background-color 0.1s"
|
|
182
|
-
},
|
|
183
|
-
children: (u == null ? void 0 : u.length) > 0 ? /* @__PURE__ */ e(De, { items: u.map((A) => A.instanceId), strategy: Ue, children: /* @__PURE__ */ e(ye, { container: !0, spacing: 1, sx: { width: "100%", m: 0 }, children: u.map((A) => {
|
|
184
|
-
const j = A.type === "GROUP", be = j && F === A.instanceId;
|
|
185
|
-
return /* @__PURE__ */ e(
|
|
186
|
-
Ft,
|
|
187
|
-
{
|
|
188
|
-
id: A.instanceId,
|
|
189
|
-
sectionId: o,
|
|
190
|
-
featureName: A.name,
|
|
191
|
-
children: /* @__PURE__ */ e(
|
|
192
|
-
ye,
|
|
193
|
-
{
|
|
194
|
-
item: !0,
|
|
195
|
-
xs: 3,
|
|
196
|
-
sm: 3,
|
|
197
|
-
sx: {
|
|
198
|
-
flexBasis: "calc(25% - 8px)",
|
|
199
|
-
maxWidth: "calc(25% - 8px)",
|
|
200
|
-
flexGrow: 0,
|
|
201
|
-
flexShrink: 0,
|
|
202
|
-
minWidth: 0
|
|
203
|
-
},
|
|
204
|
-
children: /* @__PURE__ */ p(
|
|
205
|
-
U,
|
|
206
|
-
{
|
|
207
|
-
onClick: (P) => A.type === "FEATURE" && M(P),
|
|
208
|
-
onContextMenu: (P) => A.type === "GROUP" && re(P, A),
|
|
209
|
-
sx: {
|
|
210
|
-
display: "flex",
|
|
211
|
-
flexDirection: "column",
|
|
212
|
-
alignItems: "center",
|
|
213
|
-
justifyContent: "flex-start",
|
|
214
|
-
p: 0.5,
|
|
215
|
-
height: "100%",
|
|
216
|
-
backgroundColor: "transparent",
|
|
217
|
-
cursor: j ? "pointer" : "grab",
|
|
218
|
-
minWidth: 0,
|
|
219
|
-
overflow: "hidden",
|
|
220
|
-
"&:hover": {
|
|
221
|
-
backgroundColor: "var(--color-gray4)"
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
children: [
|
|
225
|
-
Ut(
|
|
226
|
-
Object.prototype.hasOwnProperty.call(A, "icon") ? A.icon : null,
|
|
227
|
-
y
|
|
228
|
-
),
|
|
229
|
-
/* @__PURE__ */ e(
|
|
230
|
-
v,
|
|
231
|
-
{
|
|
232
|
-
variant: "body2",
|
|
233
|
-
sx: {
|
|
234
|
-
mt: 0.5,
|
|
235
|
-
textAlign: "center",
|
|
236
|
-
lineHeight: 1.2,
|
|
237
|
-
width: "100%",
|
|
238
|
-
fontSize: "0.7rem",
|
|
239
|
-
color: "var(--color-text)",
|
|
240
|
-
fontWeight: "bold",
|
|
241
|
-
letterSpacing: 0.2,
|
|
242
|
-
whiteSpace: "normal",
|
|
243
|
-
wordBreak: "break-word",
|
|
244
|
-
overflowWrap: "break-word"
|
|
245
|
-
},
|
|
246
|
-
children: Dt(A.name)
|
|
247
|
-
}
|
|
248
|
-
),
|
|
249
|
-
j && /* @__PURE__ */ e(U, { sx: { ml: 0.5, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ e(
|
|
250
|
-
z,
|
|
251
|
-
{
|
|
252
|
-
icon: kt,
|
|
253
|
-
sx: {
|
|
254
|
-
fontSize: "0.7rem",
|
|
255
|
-
color: "var(--color-text)",
|
|
256
|
-
transition: "transform 0.2s",
|
|
257
|
-
transform: be ? "rotate(180deg)" : "rotate(0deg)"
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
) })
|
|
261
|
-
]
|
|
262
|
-
}
|
|
263
|
-
)
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
},
|
|
267
|
-
A.instanceId
|
|
268
|
-
);
|
|
269
|
-
}) }) }) : /* @__PURE__ */ e(v, { variant: "caption", color: "textSecondary", children: ue ? "Drop Feature Here" : "Drag features here later." })
|
|
270
|
-
}
|
|
271
|
-
)
|
|
272
|
-
]
|
|
273
|
-
}
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
);
|
|
277
|
-
at.displayName = "MobileSection";
|
|
278
|
-
at.propTypes = {
|
|
279
|
-
id: h.any,
|
|
280
|
-
arrayIndex: h.any,
|
|
281
|
-
sectionTitle: h.any,
|
|
282
|
-
handleSectionClick: h.any,
|
|
283
|
-
dnd: h.any,
|
|
284
|
-
sectionFeatures: h.any,
|
|
285
|
-
SvgIconBox: h.any,
|
|
286
|
-
onGroupClick: h.any,
|
|
287
|
-
activeGroupId: h.any
|
|
288
|
-
};
|
|
289
|
-
const Pt = ({ feature: o, SvgIconBox: c, handleFeatureClick: d }) => {
|
|
290
|
-
const { attributes: b, listeners: E, setNodeRef: u, transform: y, transition: R, isDragging: F } = nt({
|
|
291
|
-
id: o.uuid || o.id
|
|
292
|
-
}), Q = {
|
|
293
|
-
transform: _r.Transform.toString(y),
|
|
294
|
-
transition: R,
|
|
295
|
-
zIndex: F ? 2e3 : 1,
|
|
296
|
-
opacity: F ? 0.8 : 1,
|
|
297
|
-
boxShadow: F ? "0px 4px 10px rgba(0,0,0,0.1)" : "none"
|
|
298
|
-
};
|
|
299
|
-
return /* @__PURE__ */ e(
|
|
300
|
-
ye,
|
|
301
|
-
{
|
|
302
|
-
item: !0,
|
|
303
|
-
xs: 4,
|
|
304
|
-
ref: u,
|
|
305
|
-
style: Q,
|
|
306
|
-
sx: {
|
|
307
|
-
flexBasis: "calc(33.3333% - 8px)",
|
|
308
|
-
maxWidth: "calc(33.3333% - 8px)",
|
|
309
|
-
flexGrow: 0,
|
|
310
|
-
flexShrink: 0,
|
|
311
|
-
minWidth: 0,
|
|
312
|
-
p: 0.5
|
|
313
|
-
},
|
|
314
|
-
children: /* @__PURE__ */ p(
|
|
315
|
-
U,
|
|
316
|
-
{
|
|
317
|
-
onClick: (T) => {
|
|
318
|
-
T.stopPropagation(), d && d();
|
|
319
|
-
},
|
|
320
|
-
...E,
|
|
321
|
-
...b,
|
|
322
|
-
sx: {
|
|
323
|
-
display: "flex",
|
|
324
|
-
flexDirection: "column",
|
|
325
|
-
alignItems: "center",
|
|
326
|
-
justifyContent: "flex-start",
|
|
327
|
-
p: 0.5,
|
|
328
|
-
height: "100%",
|
|
329
|
-
backgroundColor: "transparent",
|
|
330
|
-
cursor: "grab",
|
|
331
|
-
minWidth: 0,
|
|
332
|
-
overflow: "hidden",
|
|
333
|
-
borderRadius: "8px",
|
|
334
|
-
"&:hover": {
|
|
335
|
-
backgroundColor: "var(--color-gray4)"
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ e(U, { sx: { mt: 0.5, mb: 0.5, display: "flex", alignItems: "center" }, children: ((T, te) => {
|
|
340
|
-
let M = null;
|
|
341
|
-
if (typeof T == "object" && T !== null ? T.type === "svg" && typeof T.content == "string" ? M = T.content : typeof T.svg == "string" && (M = T.svg) : typeof T == "string" ? M = T : typeof o.icon == "object" && o.icon !== null && (M = o.icon.content || o.icon.svg), typeof M == "string" && M.includes("<svg")) {
|
|
342
|
-
const re = M.match(/<svg[\s\S]*<\/svg>/i);
|
|
343
|
-
re && (M = re[0]);
|
|
344
|
-
}
|
|
345
|
-
return M ? /* @__PURE__ */ e(U, { sx: { height: "24px", width: "24px", display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(te, { svg: M }) }) : /* @__PURE__ */ e(
|
|
346
|
-
U,
|
|
347
|
-
{
|
|
348
|
-
sx: {
|
|
349
|
-
height: "24px",
|
|
350
|
-
width: "24px",
|
|
351
|
-
display: "flex",
|
|
352
|
-
justifyContent: "center",
|
|
353
|
-
alignItems: "center",
|
|
354
|
-
color: "var(--color-gray3)",
|
|
355
|
-
border: "1px solid",
|
|
356
|
-
borderRadius: "4px",
|
|
357
|
-
fontSize: "0.8rem"
|
|
358
|
-
},
|
|
359
|
-
children: "?"
|
|
360
|
-
}
|
|
361
|
-
);
|
|
362
|
-
})(o.icon, c) }),
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
-
v,
|
|
365
|
-
{
|
|
366
|
-
variant: "body2",
|
|
367
|
-
sx: {
|
|
368
|
-
mt: 0.5,
|
|
369
|
-
textAlign: "center",
|
|
370
|
-
lineHeight: 1.2,
|
|
371
|
-
width: "100%",
|
|
372
|
-
fontSize: "0.7rem",
|
|
373
|
-
color: "var(--color-text)",
|
|
374
|
-
fontWeight: "bold",
|
|
375
|
-
letterSpacing: 0.2,
|
|
376
|
-
whiteSpace: "normal",
|
|
377
|
-
wordBreak: "break-word",
|
|
378
|
-
overflowWrap: "break-word",
|
|
379
|
-
p: "0 4px"
|
|
380
|
-
},
|
|
381
|
-
children: o.name
|
|
382
|
-
}
|
|
383
|
-
)
|
|
384
|
-
]
|
|
385
|
-
}
|
|
386
|
-
)
|
|
387
|
-
}
|
|
388
|
-
);
|
|
389
|
-
};
|
|
390
|
-
Pt.propTypes = {
|
|
391
|
-
feature: h.any,
|
|
392
|
-
SvgIconBox: h.any,
|
|
393
|
-
handleFeatureClick: h.any
|
|
394
|
-
};
|
|
395
|
-
function Gt({
|
|
396
|
-
tabStatus: o,
|
|
397
|
-
layoutComponents: c,
|
|
398
|
-
componentTypes: d,
|
|
399
|
-
handleSectionClick: b,
|
|
400
|
-
activeElementId: E,
|
|
401
|
-
activeTabId: u,
|
|
402
|
-
handleTabSwitch: y,
|
|
403
|
-
formList: R,
|
|
404
|
-
selectedForm: F,
|
|
405
|
-
onFormSelect: Q,
|
|
406
|
-
SvgIconBox: ee,
|
|
407
|
-
setCurrentLayoutComponents: de,
|
|
408
|
-
programFeatures: T
|
|
409
|
-
}) {
|
|
410
|
-
const te = "mobile-content", M = u === "programs" ? "PROGRAMS_ROOT_DROP_ZONE" : "LAYOUT_ROOT_DROP_ZONE", { setNodeRef: re, isOver: ae } = rt({
|
|
411
|
-
id: te,
|
|
412
|
-
data: {
|
|
413
|
-
type: M,
|
|
414
|
-
sectionId: te
|
|
415
|
-
}
|
|
416
|
-
}), A = [
|
|
417
|
-
{ id: "home", label: "Home", icon: Or, alt: "Home" },
|
|
418
|
-
{ id: "programs", label: "Programs", icon: Nr, alt: "Programs" },
|
|
419
|
-
{ id: "analytics", label: "Analytics", icon: Mr, alt: "Analytics" },
|
|
420
|
-
{ id: "familyManagement", label: "Family Management", icon: kr, alt: "Family Management" }
|
|
421
|
-
].filter((m) => o[m.id]), j = c.find((m) => m.type === d.SEARCH_BAR), be = c.filter((m) => m.type === d.SECTION), [P, se] = _({
|
|
422
|
-
anchorEl: null,
|
|
423
|
-
groupData: null
|
|
424
|
-
}), $ = Re(
|
|
425
|
-
(m, G) => {
|
|
426
|
-
var W;
|
|
427
|
-
const q = m.currentTarget;
|
|
428
|
-
((W = P.groupData) == null ? void 0 : W.instanceId) === G.instanceId ? ve() : se({
|
|
429
|
-
anchorEl: q,
|
|
430
|
-
groupData: G
|
|
431
|
-
});
|
|
432
|
-
},
|
|
433
|
-
[P.groupData]
|
|
434
|
-
), ve = Re(() => {
|
|
435
|
-
se({ anchorEl: null, groupData: null });
|
|
436
|
-
}, []), Be = (m) => {
|
|
437
|
-
var W;
|
|
438
|
-
const G = m.type === "GROUP", q = G && ((W = P.groupData) == null ? void 0 : W.instanceId) === m.instanceId;
|
|
439
|
-
return /* @__PURE__ */ e(
|
|
440
|
-
Ft,
|
|
441
|
-
{
|
|
442
|
-
id: m.instanceId,
|
|
443
|
-
sectionId: null,
|
|
444
|
-
featureName: m.name,
|
|
445
|
-
children: /* @__PURE__ */ e(
|
|
446
|
-
ye,
|
|
447
|
-
{
|
|
448
|
-
item: !0,
|
|
449
|
-
xs: 4,
|
|
450
|
-
sm: 4,
|
|
451
|
-
sx: {
|
|
452
|
-
flexBasis: "calc(33.3333% - 8px)",
|
|
453
|
-
maxWidth: "calc(33.3333% - 8px)",
|
|
454
|
-
flexGrow: 0,
|
|
455
|
-
flexShrink: 0,
|
|
456
|
-
minWidth: 0
|
|
457
|
-
},
|
|
458
|
-
children: /* @__PURE__ */ p(
|
|
459
|
-
U,
|
|
460
|
-
{
|
|
461
|
-
onClick: (L) => m.type === "FEATURE" && L.stopPropagation(),
|
|
462
|
-
onContextMenu: (L) => m.type === "GROUP" && $(L, m),
|
|
463
|
-
sx: {
|
|
464
|
-
display: "flex",
|
|
465
|
-
flexDirection: "column",
|
|
466
|
-
alignItems: "center",
|
|
467
|
-
justifyContent: "flex-start",
|
|
468
|
-
p: 0.5,
|
|
469
|
-
height: "100%",
|
|
470
|
-
backgroundColor: "transparent",
|
|
471
|
-
cursor: G ? "pointer" : "grab",
|
|
472
|
-
minWidth: 0,
|
|
473
|
-
overflow: "hidden",
|
|
474
|
-
"&:hover": {
|
|
475
|
-
backgroundColor: "var(--color-gray4)"
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
children: [
|
|
479
|
-
Ut(Object.prototype.hasOwnProperty.call(m, "icon") ? m.icon : null, ee),
|
|
480
|
-
/* @__PURE__ */ e(
|
|
481
|
-
v,
|
|
482
|
-
{
|
|
483
|
-
variant: "body2",
|
|
484
|
-
sx: {
|
|
485
|
-
mt: 0.5,
|
|
486
|
-
textAlign: "center",
|
|
487
|
-
lineHeight: 1.2,
|
|
488
|
-
width: "100%",
|
|
489
|
-
fontSize: "0.7rem",
|
|
490
|
-
color: "var(--color-text)",
|
|
491
|
-
fontWeight: "bold",
|
|
492
|
-
letterSpacing: 0.2,
|
|
493
|
-
whiteSpace: "normal",
|
|
494
|
-
wordBreak: "break-word",
|
|
495
|
-
overflowWrap: "break-word"
|
|
496
|
-
},
|
|
497
|
-
children: Dt(m.name)
|
|
498
|
-
}
|
|
499
|
-
),
|
|
500
|
-
G && /* @__PURE__ */ e(U, { sx: { ml: 0.5, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ e(
|
|
501
|
-
z,
|
|
502
|
-
{
|
|
503
|
-
icon: kt,
|
|
504
|
-
sx: {
|
|
505
|
-
fontSize: "0.7rem",
|
|
506
|
-
color: "var(--color-text)",
|
|
507
|
-
transition: "transform 0.2s",
|
|
508
|
-
transform: q ? "rotate(180deg)" : "rotate(0deg)"
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
) })
|
|
512
|
-
]
|
|
513
|
-
}
|
|
514
|
-
)
|
|
515
|
-
}
|
|
516
|
-
)
|
|
517
|
-
},
|
|
518
|
-
m.instanceId
|
|
519
|
-
);
|
|
520
|
-
}, He = (m) => {
|
|
521
|
-
const { active: G, over: q } = m;
|
|
522
|
-
if (!q || G.id === q.id || !P.groupData)
|
|
523
|
-
return;
|
|
524
|
-
const W = P.groupData.instanceId;
|
|
525
|
-
let L = null;
|
|
526
|
-
de((Se) => Se.map((pe) => pe.features ? {
|
|
527
|
-
...pe,
|
|
528
|
-
features: pe.features.map((B) => {
|
|
529
|
-
if (B.instanceId === W && B.type === "GROUP" && B.menus) {
|
|
530
|
-
const me = B.menus.findIndex((Y) => (Y.uuid || Y.instanceId) === G.id), Ce = B.menus.findIndex((Y) => (Y.uuid || Y.instanceId) === q.id);
|
|
531
|
-
if (me !== -1 && Ce !== -1) {
|
|
532
|
-
const Y = Pe(B.menus, me, Ce);
|
|
533
|
-
return L = { ...B, menus: Y }, L;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
return B;
|
|
537
|
-
})
|
|
538
|
-
} : pe)), L && se((Se) => ({
|
|
539
|
-
...Se,
|
|
540
|
-
groupData: L
|
|
541
|
-
}));
|
|
542
|
-
}, Ae = () => {
|
|
543
|
-
ve();
|
|
544
|
-
}, Te = (m, G) => {
|
|
545
|
-
var W;
|
|
546
|
-
const q = m.id === E;
|
|
547
|
-
return /* @__PURE__ */ e(Gr, { id: m.id, componentType: d.SECTION, isSortable: !0, children: /* @__PURE__ */ e(
|
|
548
|
-
at,
|
|
549
|
-
{
|
|
550
|
-
id: m.id,
|
|
551
|
-
arrayIndex: G,
|
|
552
|
-
sectionTitle: m.title,
|
|
553
|
-
handleSectionClick: b,
|
|
554
|
-
sectionFeatures: m.features,
|
|
555
|
-
isActive: q,
|
|
556
|
-
SvgIconBox: ee,
|
|
557
|
-
onGroupClick: $,
|
|
558
|
-
activeGroupId: (W = P.groupData) == null ? void 0 : W.instanceId
|
|
559
|
-
}
|
|
560
|
-
) }, m.id);
|
|
561
|
-
};
|
|
562
|
-
return /* @__PURE__ */ p("div", { className: "mobile-screen-v2", id: "mobile-screen", children: [
|
|
563
|
-
/* @__PURE__ */ p("div", { className: "status-bar-v2", children: [
|
|
564
|
-
/* @__PURE__ */ e("span", { className: "time-v2", children: "12:16" }),
|
|
565
|
-
/* @__PURE__ */ e("div", { className: "notch-v2" }),
|
|
566
|
-
/* @__PURE__ */ p("div", { className: "right-status-icons-v2", children: [
|
|
567
|
-
/* @__PURE__ */ e("span", { "aria-label": "wifi", children: /* @__PURE__ */ e(z, { icon: vr }) }),
|
|
568
|
-
/* @__PURE__ */ e("span", { "aria-label": "signal", children: /* @__PURE__ */ e(z, { icon: Sr }) }),
|
|
569
|
-
/* @__PURE__ */ e("span", { "aria-label": "battery", className: "battery-icon", children: /* @__PURE__ */ e(z, { icon: Cr }) })
|
|
570
|
-
] })
|
|
571
|
-
] }),
|
|
572
|
-
/* @__PURE__ */ p("div", { className: "header-v2", children: [
|
|
573
|
-
/* @__PURE__ */ p("div", { className: "location-v2", children: [
|
|
574
|
-
/* @__PURE__ */ e(z, { icon: Ir }),
|
|
575
|
-
/* @__PURE__ */ e("span", { className: "location-text-v2", children: "પાલડી-કાંકજ" })
|
|
576
|
-
] }),
|
|
577
|
-
/* @__PURE__ */ p("div", { className: "header-actions-v2", children: [
|
|
578
|
-
/* @__PURE__ */ e("span", { className: "action-icon-v2 rotate-icon", role: "button", "aria-label": "refresh", children: /* @__PURE__ */ e(z, { icon: Rr }) }),
|
|
579
|
-
/* @__PURE__ */ e("span", { className: "action-icon-v2 notification-outline", role: "button", "aria-label": "notifications", children: /* @__PURE__ */ e(z, { icon: wr }) }),
|
|
580
|
-
/* @__PURE__ */ e("span", { className: "action-icon-v2 profile-icon", role: "button", "aria-label": "profile", children: /* @__PURE__ */ e(z, { icon: Er }) })
|
|
581
|
-
] })
|
|
582
|
-
] }),
|
|
583
|
-
/* @__PURE__ */ e(
|
|
584
|
-
"div",
|
|
585
|
-
{
|
|
586
|
-
className: "content-v2",
|
|
587
|
-
id: "mobile-content",
|
|
588
|
-
ref: u !== "familyManagement" ? re : null,
|
|
589
|
-
style: {
|
|
590
|
-
border: u !== "familyManagement" && ae ? "2px dashed var(--color-tableHeader)" : "none",
|
|
591
|
-
backgroundColor: u !== "familyManagement" && ae ? "var(--color-gray4)" : "transparent",
|
|
592
|
-
minHeight: "300px",
|
|
593
|
-
maxHeight: "calc(100% - 110px)",
|
|
594
|
-
overflowY: "auto",
|
|
595
|
-
padding: "8px",
|
|
596
|
-
marginTop: u === "programs" ? 20 : 0,
|
|
597
|
-
marginLeft: u === "programs" ? 3 : 0
|
|
598
|
-
},
|
|
599
|
-
children: u === "familyManagement" ? /* @__PURE__ */ p(
|
|
600
|
-
U,
|
|
601
|
-
{
|
|
602
|
-
sx: {
|
|
603
|
-
p: 2,
|
|
604
|
-
width: "100%",
|
|
605
|
-
display: "flex",
|
|
606
|
-
flexDirection: "column",
|
|
607
|
-
alignItems: "center",
|
|
608
|
-
justifyContent: "center",
|
|
609
|
-
height: "100%"
|
|
610
|
-
},
|
|
611
|
-
children: [
|
|
612
|
-
/* @__PURE__ */ e(v, { variant: "body1", sx: { mb: 2, fontWeight: "bold" }, children: "Select Form for Family Management" }),
|
|
613
|
-
/* @__PURE__ */ p(Ve, { fullWidth: !0, sx: { maxWidth: "90%", mb: 2 }, children: [
|
|
614
|
-
/* @__PURE__ */ e(sr, { id: "form-selector-label", children: "Form Name" }),
|
|
615
|
-
/* @__PURE__ */ p(
|
|
616
|
-
lr,
|
|
617
|
-
{
|
|
618
|
-
labelId: "form-selector-label",
|
|
619
|
-
id: "form-selector",
|
|
620
|
-
value: (F == null ? void 0 : F.code) || "",
|
|
621
|
-
label: "Form Name",
|
|
622
|
-
onChange: Q,
|
|
623
|
-
MenuProps: {
|
|
624
|
-
PaperProps: {
|
|
625
|
-
style: {
|
|
626
|
-
maxHeight: 240
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
},
|
|
630
|
-
children: [
|
|
631
|
-
R == null ? void 0 : R.map((m) => /* @__PURE__ */ e(Tt, { value: m.code, children: m.name }, m.code)),
|
|
632
|
-
(R == null ? void 0 : R.length) === 0 && /* @__PURE__ */ e(Tt, { disabled: !0, children: "No Forms Available" })
|
|
633
|
-
]
|
|
634
|
-
}
|
|
635
|
-
)
|
|
636
|
-
] })
|
|
637
|
-
]
|
|
638
|
-
}
|
|
639
|
-
) : u === "programs" ? /* @__PURE__ */ e(Ze, { children: T && T.length > 0 ? /* @__PURE__ */ e(De, { items: T.map((m) => m.instanceId), strategy: Ue, children: /* @__PURE__ */ e(ye, { container: !0, spacing: 1, sx: { width: "100%", m: 0 }, children: T.map((m) => Be(m)) }) }) : /* @__PURE__ */ e(v, { variant: "body2", color: "textSecondary", sx: { mt: 5, textAlign: "center" }, children: ae ? "Drop features here (Groups are not allowed)." : "Drag features directly onto the screen." }) }) : /* @__PURE__ */ p(Ze, { children: [
|
|
640
|
-
j && /* @__PURE__ */ e(Dr, { id: j.id, componentType: d.SEARCH_BAR, children: /* @__PURE__ */ e(
|
|
641
|
-
it,
|
|
642
|
-
{
|
|
643
|
-
id: j.id,
|
|
644
|
-
style: { marginBottom: "8px" },
|
|
645
|
-
handleSectionClick: b
|
|
646
|
-
}
|
|
647
|
-
) }),
|
|
648
|
-
be.map((m, G) => Te(m, G)),
|
|
649
|
-
c.length === 0 && /* @__PURE__ */ e(v, { variant: "body2", color: "textSecondary", sx: { mt: 5, textAlign: "center" }, children: "Drag components here to build the layout." })
|
|
650
|
-
] })
|
|
651
|
-
}
|
|
652
|
-
),
|
|
653
|
-
P.groupData && P.anchorEl && /* @__PURE__ */ e("div", { onPointerDown: (m) => m.stopPropagation(), children: /* @__PURE__ */ e(Nt, { onDragEnd: He, children: /* @__PURE__ */ e(
|
|
654
|
-
Bt,
|
|
655
|
-
{
|
|
656
|
-
groupData: P.groupData,
|
|
657
|
-
anchorEl: P.anchorEl,
|
|
658
|
-
onClose: ve,
|
|
659
|
-
SvgIconBox: ee,
|
|
660
|
-
handleFeatureClick: Ae
|
|
661
|
-
}
|
|
662
|
-
) }) }),
|
|
663
|
-
/* @__PURE__ */ p("div", { className: "bottom-nav-v2", children: [
|
|
664
|
-
/* @__PURE__ */ e("div", { className: "nav-bar-v2", children: A.map((m) => /* @__PURE__ */ e(cr, { title: m.label, placement: "bottom", arrow: !0, children: /* @__PURE__ */ e(
|
|
665
|
-
"div",
|
|
666
|
-
{
|
|
667
|
-
className: `nav-item-v2 ${u === m.id ? "active-v2" : ""}`,
|
|
668
|
-
role: "button",
|
|
669
|
-
"aria-label": m.label,
|
|
670
|
-
onClick: () => y(m.id),
|
|
671
|
-
children: /* @__PURE__ */ e("img", { src: m.icon, alt: m.alt })
|
|
672
|
-
},
|
|
673
|
-
m.id
|
|
674
|
-
) }, m.id)) }),
|
|
675
|
-
/* @__PURE__ */ e("div", { className: "home-indicator-v2" })
|
|
676
|
-
] })
|
|
677
|
-
] });
|
|
678
|
-
}
|
|
679
|
-
Gt.propTypes = {
|
|
680
|
-
tabStatus: h.any.isRequired,
|
|
681
|
-
layoutComponents: h.any,
|
|
682
|
-
componentTypes: h.any,
|
|
683
|
-
handleSectionClick: h.any,
|
|
684
|
-
activeElementId: h.any,
|
|
685
|
-
activeTabId: h.any,
|
|
686
|
-
handleTabSwitch: h.any,
|
|
687
|
-
formList: h.any,
|
|
688
|
-
selectedForm: h.any,
|
|
689
|
-
onFormSelect: h.any,
|
|
690
|
-
SvgIconBox: h.any,
|
|
691
|
-
setCurrentLayoutComponents: h.any,
|
|
692
|
-
programFeatures: h.any
|
|
693
|
-
};
|
|
694
|
-
const Dt = (o) => {
|
|
695
|
-
const c = o.split(" ");
|
|
696
|
-
return c.map((d, b) => /* @__PURE__ */ p(K.Fragment, { children: [
|
|
697
|
-
d,
|
|
698
|
-
b < c.length - 1 && /* @__PURE__ */ e("br", {})
|
|
699
|
-
] }, b));
|
|
700
|
-
}, Ut = (o, c) => {
|
|
701
|
-
let d = null;
|
|
702
|
-
if (typeof o == "object" && o !== null ? o.type === "svg" && typeof o.content == "string" ? d = o.content : typeof o.svg == "string" && (d = o.svg) : typeof o == "string" && (d = o), typeof d == "string" && d.includes("<svg")) {
|
|
703
|
-
const b = d.match(/<svg[\s\S]*<\/svg>/i);
|
|
704
|
-
b && (d = b[0]);
|
|
705
|
-
}
|
|
706
|
-
return d ? /* @__PURE__ */ e(
|
|
707
|
-
U,
|
|
708
|
-
{
|
|
709
|
-
sx: {
|
|
710
|
-
height: "36px",
|
|
711
|
-
width: "36px",
|
|
712
|
-
display: "flex",
|
|
713
|
-
justifyContent: "center",
|
|
714
|
-
alignItems: "center"
|
|
715
|
-
},
|
|
716
|
-
children: /* @__PURE__ */ e(c, { svg: d })
|
|
717
|
-
}
|
|
718
|
-
) : /* @__PURE__ */ e(
|
|
719
|
-
U,
|
|
720
|
-
{
|
|
721
|
-
sx: {
|
|
722
|
-
fontSize: "1.2rem",
|
|
723
|
-
color: "var(--color-gray3)",
|
|
724
|
-
border: "1px solid",
|
|
725
|
-
borderRadius: "50%",
|
|
726
|
-
height: "36px",
|
|
727
|
-
width: "36px",
|
|
728
|
-
display: "flex",
|
|
729
|
-
alignItems: "center",
|
|
730
|
-
justifyContent: "center",
|
|
731
|
-
marginBottom: "4px"
|
|
732
|
-
},
|
|
733
|
-
children: "?"
|
|
734
|
-
}
|
|
735
|
-
);
|
|
736
|
-
}, Bt = ({ groupData: o, anchorEl: c, onClose: d, SvgIconBox: b, handleFeatureClick: E }) => {
|
|
737
|
-
if (!o || !c) return null;
|
|
738
|
-
const u = o.menus || [], y = c.getBoundingClientRect();
|
|
739
|
-
return /* @__PURE__ */ p(
|
|
740
|
-
xe,
|
|
741
|
-
{
|
|
742
|
-
elevation: 8,
|
|
743
|
-
sx: {
|
|
744
|
-
position: "fixed",
|
|
745
|
-
top: y.bottom,
|
|
746
|
-
left: y.left + y.width + 65,
|
|
747
|
-
minWidth: "320px",
|
|
748
|
-
maxWidth: "100%",
|
|
749
|
-
p: 2,
|
|
750
|
-
borderRadius: "12px",
|
|
751
|
-
boxShadow: "0 8px 30px rgba(0,0,0,0.25)",
|
|
752
|
-
backgroundColor: "var(--color-gray4)",
|
|
753
|
-
zIndex: 1500,
|
|
754
|
-
maxHeight: "400px",
|
|
755
|
-
overflowY: "auto",
|
|
756
|
-
transform: "translateX(-50%)"
|
|
757
|
-
},
|
|
758
|
-
children: [
|
|
759
|
-
/* @__PURE__ */ p(U, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 1 }, children: [
|
|
760
|
-
/* @__PURE__ */ e(v, { variant: "h6", sx: { color: "var(--color-text)", fontWeight: "bold", fontSize: "1rem" }, children: o.name }),
|
|
761
|
-
/* @__PURE__ */ e(dr, { onClick: d, size: "small", sx: { color: "var(--color-text)", p: 0.5 }, children: /* @__PURE__ */ e(z, { icon: Ar }) })
|
|
762
|
-
] }),
|
|
763
|
-
/* @__PURE__ */ e(ot, {}),
|
|
764
|
-
u.length > 0 ? /* @__PURE__ */ e(De, { items: u.map((R) => R.uuid || R.instanceId), strategy: Ue, children: /* @__PURE__ */ e(ye, { container: !0, spacing: 1, children: u.map((R) => /* @__PURE__ */ e(
|
|
765
|
-
Pt,
|
|
766
|
-
{
|
|
767
|
-
feature: R,
|
|
768
|
-
SvgIconBox: b,
|
|
769
|
-
handleFeatureClick: E
|
|
770
|
-
},
|
|
771
|
-
R.uuid || R.instanceId
|
|
772
|
-
)) }) }) : /* @__PURE__ */ e(v, { variant: "body2", color: "textSecondary", sx: { fontStyle: "italic", p: 1 }, children: "This menu is empty." })
|
|
773
|
-
]
|
|
774
|
-
}
|
|
775
|
-
);
|
|
776
|
-
};
|
|
777
|
-
Bt.propTypes = {
|
|
778
|
-
groupData: h.any,
|
|
779
|
-
anchorEl: h.any,
|
|
780
|
-
onClose: h.any,
|
|
781
|
-
SvgIconBox: h.any,
|
|
782
|
-
handleFeatureClick: h.any
|
|
783
|
-
};
|
|
784
|
-
function cn() {
|
|
785
|
-
var gt, ft;
|
|
786
|
-
const o = xr(), c = o.state, d = Fe(() => new URLSearchParams(o.search), [o.search]), b = yr(), [E, u] = _([]), [y, R] = _(!1), [F, Q] = _([]), [ee, de] = _([]), [T, te] = _({}), [M, re] = _([]), [ae, ue] = _(!0), [A, j] = _(!0), [be, P] = _(!1), { user: se } = fr((t) => t.Authenticate), $ = gr({
|
|
787
|
-
defaultValues: {
|
|
788
|
-
role: "",
|
|
789
|
-
isAttendanceRequired: !1
|
|
790
|
-
},
|
|
791
|
-
mode: "onChange"
|
|
792
|
-
});
|
|
793
|
-
Ke(() => {
|
|
794
|
-
(async () => (await He(), await ve(), await Be(), d.get("id") && (c != null && c.mobileMenuList) ? (R(!0), $.setValue("role", c.roleId), await Ae(c.roleId)) : R(!1)))();
|
|
795
|
-
}, []), Ke(() => {
|
|
796
|
-
var t;
|
|
797
|
-
if (Object.keys(T).length > 0 && d.get("id") && (c != null && c.mobileMenuList)) {
|
|
798
|
-
const { appConfiguration: r, tabStatus: n, selectedForm: a, isAttendanceRequired: i } = q(
|
|
799
|
-
(t = c == null ? void 0 : c.mobileMenuList) == null ? void 0 : t.configJson
|
|
800
|
-
);
|
|
801
|
-
J(r), Ce(n), ct(a), $.setValue("isAttendanceRequired", i);
|
|
802
|
-
}
|
|
803
|
-
}, [T]);
|
|
804
|
-
const ve = async () => {
|
|
805
|
-
const n = (await Ie({
|
|
806
|
-
code: "medplat_form_get_all_form_details",
|
|
807
|
-
parameters: {}
|
|
808
|
-
})).data.result.map((a, i) => ({
|
|
809
|
-
id: a.form_code,
|
|
810
|
-
name: a.form_name,
|
|
811
|
-
code: a.form_code,
|
|
812
|
-
uuid: a.uuid || `temp-uuid-${i}`
|
|
813
|
-
}));
|
|
814
|
-
Q(n);
|
|
815
|
-
}, Be = async () => {
|
|
816
|
-
const r = (await Ie({
|
|
817
|
-
code: "get_all_mobile_query",
|
|
818
|
-
parameters: {}
|
|
819
|
-
})).data.result;
|
|
820
|
-
de(r);
|
|
821
|
-
}, He = async () => {
|
|
822
|
-
try {
|
|
823
|
-
const t = (await Ie({
|
|
824
|
-
code: "RETRIEVE_MENU_CONFIG_ROLE_V2"
|
|
825
|
-
})).data;
|
|
826
|
-
t.result && u(t.result);
|
|
827
|
-
} catch (t) {
|
|
828
|
-
ie({
|
|
829
|
-
message: t,
|
|
830
|
-
type: "error"
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
}, Ae = async (t) => {
|
|
834
|
-
if (t)
|
|
835
|
-
try {
|
|
836
|
-
const r = (await Ie({
|
|
837
|
-
code: "fetch_linked_menus_by_role_id",
|
|
838
|
-
parameters: {
|
|
839
|
-
id: t
|
|
840
|
-
}
|
|
841
|
-
})).data;
|
|
842
|
-
r.result && W(r.result);
|
|
843
|
-
} catch (r) {
|
|
844
|
-
ie({
|
|
845
|
-
message: r,
|
|
846
|
-
type: "error"
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
}, Te = (t, r, n) => {
|
|
850
|
-
const a = r[t];
|
|
851
|
-
if (a) return a;
|
|
852
|
-
const i = n.find((s) => s.type === "GROUP" && s.id === t);
|
|
853
|
-
return i || null;
|
|
854
|
-
}, m = (t, r, n, a) => {
|
|
855
|
-
const i = Te(t.id, n, a);
|
|
856
|
-
if (!i) return null;
|
|
857
|
-
const s = fe();
|
|
858
|
-
if (i.type === "GROUP") {
|
|
859
|
-
const l = t.menus.map((S) => {
|
|
860
|
-
const Z = Te(S.id, n, a);
|
|
861
|
-
return Z ? {
|
|
862
|
-
...Z,
|
|
863
|
-
uuid: fe(),
|
|
864
|
-
isGroupMember: !0,
|
|
865
|
-
groupId: t.id
|
|
866
|
-
} : null;
|
|
867
|
-
}).filter((S) => S !== null);
|
|
868
|
-
return l.length === 0 ? null : {
|
|
869
|
-
...i,
|
|
870
|
-
id: s,
|
|
871
|
-
instanceId: `${r}_GROUP_${s}`,
|
|
872
|
-
menus: l
|
|
873
|
-
};
|
|
874
|
-
} else if (i.type === "FEATURE") {
|
|
875
|
-
const l = r === "PROGRAMS_ROOT" ? r : `${r}_${i.id}`;
|
|
876
|
-
return {
|
|
877
|
-
...i,
|
|
878
|
-
id: i.id,
|
|
879
|
-
uuid: s,
|
|
880
|
-
instanceId: `${l}_${s}`
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
return null;
|
|
884
|
-
}, G = (t, r, n, a) => {
|
|
885
|
-
if (!t || !Array.isArray(t)) return [];
|
|
886
|
-
if (t.every((i) => i.id && !i.type && !i.features)) {
|
|
887
|
-
const i = r === "programs" ? "PROGRAMS_ROOT" : r;
|
|
888
|
-
return t.map((s) => m(s, i, n, a)).filter((s) => s !== null);
|
|
889
|
-
}
|
|
890
|
-
return t.map((i) => {
|
|
891
|
-
const s = fe();
|
|
892
|
-
if (i.type === "SEARCH_BAR")
|
|
893
|
-
return { ...i, id: s };
|
|
894
|
-
if (i.type === "SECTION") {
|
|
895
|
-
const l = `comp-${s}`, S = i.features.map((Z) => m(Z, l, n, a)).filter((Z) => Z !== null);
|
|
896
|
-
return { type: i.type, title: i.title, id: l, features: S };
|
|
897
|
-
}
|
|
898
|
-
return null;
|
|
899
|
-
}).filter((i) => i !== null);
|
|
900
|
-
}, q = (t) => {
|
|
901
|
-
var s;
|
|
902
|
-
const r = {}, n = {};
|
|
903
|
-
let a = null;
|
|
904
|
-
const i = ((s = t == null ? void 0 : t.isAttendanceRequired) == null ? void 0 : s.value) || !1;
|
|
905
|
-
for (const l in t) {
|
|
906
|
-
const S = t[l];
|
|
907
|
-
if (n[l] = S.active, S.active)
|
|
908
|
-
if (l === "home" && S.layout)
|
|
909
|
-
r[l] = G(S.layout, l, T, M);
|
|
910
|
-
else if (l === "programs" && (S != null && S.features)) {
|
|
911
|
-
const Z = G(S.features, l, T, M);
|
|
912
|
-
r[l] = {
|
|
913
|
-
features: Z
|
|
914
|
-
};
|
|
915
|
-
} else S != null && S.features ? r[l] = G(S == null ? void 0 : S.features, l, T, M) : l === "familyManagement" && S.formCode && (a = {
|
|
916
|
-
formName: `Form for ${S.formCode}`,
|
|
917
|
-
code: S.formCode,
|
|
918
|
-
formUuid: fe()
|
|
919
|
-
});
|
|
920
|
-
else
|
|
921
|
-
l === "programs" ? r[l] = { features: [] } : r[l] = [];
|
|
922
|
-
}
|
|
923
|
-
return {
|
|
924
|
-
appConfiguration: r,
|
|
925
|
-
tabStatus: n,
|
|
926
|
-
selectedForm: a,
|
|
927
|
-
isAttendanceRequired: i
|
|
928
|
-
};
|
|
929
|
-
}, W = (t) => {
|
|
930
|
-
const r = [], n = {};
|
|
931
|
-
t.forEach((a) => {
|
|
932
|
-
const s = JSON.parse(a.menus || "[]").map((l) => {
|
|
933
|
-
const S = {
|
|
934
|
-
uuid: fe(),
|
|
935
|
-
id: l.id ? parseInt(l.id) : null,
|
|
936
|
-
name: l.name || "",
|
|
937
|
-
icon: l.icon || "",
|
|
938
|
-
type: "FEATURE",
|
|
939
|
-
isGroupMember: a.id != null,
|
|
940
|
-
groupId: a.id || null
|
|
941
|
-
};
|
|
942
|
-
return n[S.id] = S, S;
|
|
943
|
-
});
|
|
944
|
-
a.id != null ? r.push({
|
|
945
|
-
uuid: fe(),
|
|
946
|
-
id: a.id,
|
|
947
|
-
name: a.name,
|
|
948
|
-
icon: a.icon || "",
|
|
949
|
-
type: "GROUP",
|
|
950
|
-
menus: s
|
|
951
|
-
}) : r.push(...s);
|
|
952
|
-
}), te(n), re(r);
|
|
953
|
-
}, L = (t) => {
|
|
954
|
-
var r, n;
|
|
955
|
-
if (t.type === "GROUP") {
|
|
956
|
-
const a = (n = (r = t.menus) == null ? void 0 : r[0]) == null ? void 0 : n.groupId;
|
|
957
|
-
return a ? {
|
|
958
|
-
id: a,
|
|
959
|
-
menus: t.menus.map((i) => ({
|
|
960
|
-
id: i.id
|
|
961
|
-
}))
|
|
962
|
-
} : null;
|
|
963
|
-
} else if (t.type === "FEATURE")
|
|
964
|
-
return {
|
|
965
|
-
id: t.id
|
|
966
|
-
};
|
|
967
|
-
return null;
|
|
968
|
-
}, Se = (t) => !t || !Array.isArray(t) ? [] : t.map((r) => {
|
|
969
|
-
if (r.type === "SEARCH_BAR")
|
|
970
|
-
return {
|
|
971
|
-
type: r.type,
|
|
972
|
-
queryName: r.queryName
|
|
973
|
-
};
|
|
974
|
-
if (r.type === "SECTION") {
|
|
975
|
-
const n = r == null ? void 0 : r.features.map(L).filter((a) => a !== null);
|
|
976
|
-
return {
|
|
977
|
-
type: r.type,
|
|
978
|
-
title: r.title,
|
|
979
|
-
features: n
|
|
980
|
-
};
|
|
981
|
-
}
|
|
982
|
-
return null;
|
|
983
|
-
}).filter((r) => r !== null), lt = () => {
|
|
984
|
-
const t = {
|
|
985
|
-
isAttendanceRequired: { value: $.getValues("isAttendanceRequired") }
|
|
986
|
-
};
|
|
987
|
-
return B.forEach((r) => {
|
|
988
|
-
var s;
|
|
989
|
-
const n = r.id, a = me[n], i = {
|
|
990
|
-
active: a
|
|
991
|
-
};
|
|
992
|
-
if (a) {
|
|
993
|
-
if (n === "familyManagement" && ze)
|
|
994
|
-
i.formCode = ze.code;
|
|
995
|
-
else if (n === "home") {
|
|
996
|
-
const l = ge[n] || [];
|
|
997
|
-
i.layout = Se(l);
|
|
998
|
-
} else if (n === "programs") {
|
|
999
|
-
const l = ((s = ge[n]) == null ? void 0 : s.features) || [];
|
|
1000
|
-
l.length > 0 && (i.features = l.map(L).filter((S) => S !== null));
|
|
1001
|
-
} else if (n !== "analytics") {
|
|
1002
|
-
const l = ge[n] || [];
|
|
1003
|
-
Array.isArray(l) && (i.features = l.map(L).filter((S) => S !== null));
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
t[n] = i;
|
|
1007
|
-
}), t;
|
|
1008
|
-
}, pe = async (t) => {
|
|
1009
|
-
const r = lt(), n = JSON.stringify(r), a = {
|
|
1010
|
-
roleId: t.role,
|
|
1011
|
-
userId: se == null ? void 0 : se.id,
|
|
1012
|
-
config_json: n
|
|
1013
|
-
};
|
|
1014
|
-
try {
|
|
1015
|
-
(await Ie({
|
|
1016
|
-
code: "save_mobile_menu_role_relation",
|
|
1017
|
-
parameters: a
|
|
1018
|
-
})).data.result && (ie({
|
|
1019
|
-
message: "Menu configuration saved successfully",
|
|
1020
|
-
type: "success"
|
|
1021
|
-
}), b("/ui/medplat/admin/mobileMenuManagement"));
|
|
1022
|
-
} catch (i) {
|
|
1023
|
-
ie({
|
|
1024
|
-
message: i,
|
|
1025
|
-
type: "error"
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
}, B = [
|
|
1029
|
-
{ id: "home", name: "Home" },
|
|
1030
|
-
{ id: "programs", name: "Programs" },
|
|
1031
|
-
{ id: "analytics", name: "Analytics" },
|
|
1032
|
-
{ id: "familyManagement", name: "Family Management" }
|
|
1033
|
-
], [me, Ce] = _({
|
|
1034
|
-
home: !0,
|
|
1035
|
-
programs: !0,
|
|
1036
|
-
analytics: !0,
|
|
1037
|
-
familyManagement: !0
|
|
1038
|
-
}), Y = (t) => {
|
|
1039
|
-
Ce((r) => {
|
|
1040
|
-
const n = {
|
|
1041
|
-
...r,
|
|
1042
|
-
[t]: !r[t]
|
|
1043
|
-
};
|
|
1044
|
-
if (t === H && !n[t]) {
|
|
1045
|
-
const i = B.find((s) => s.id !== t && n[s.id] === !0);
|
|
1046
|
-
i ? Oe(i.id) : n.home ? Oe("home") : Oe(B[0].id);
|
|
1047
|
-
}
|
|
1048
|
-
return n;
|
|
1049
|
-
});
|
|
1050
|
-
}, w = {
|
|
1051
|
-
SEARCH_BAR: "SEARCH_BAR",
|
|
1052
|
-
SECTION: "SECTION",
|
|
1053
|
-
FEATURE: "FEATURE",
|
|
1054
|
-
SECTION_DROP_ZONE: "SECTION_DROP_ZONE",
|
|
1055
|
-
GROUP: "GROUP"
|
|
1056
|
-
}, [ze, ct] = _(null), Wt = (t) => {
|
|
1057
|
-
const r = t.target.value, n = F.find((a) => a.code === r);
|
|
1058
|
-
ct(n);
|
|
1059
|
-
}, [he, We] = _(null), [dt, ut] = _(null), [H, Oe] = _("home"), [ge, J] = _(() => {
|
|
1060
|
-
const t = {};
|
|
1061
|
-
return B.forEach((r) => {
|
|
1062
|
-
t[r.id] = [];
|
|
1063
|
-
}), t;
|
|
1064
|
-
}), [Le, Lt] = _(""), [jt, $t] = _(null), le = ((gt = ge.programs) == null ? void 0 : gt.features) || [], qt = (t) => {
|
|
1065
|
-
$t((r) => r === t ? null : t);
|
|
1066
|
-
}, pt = ge[H], ne = Array.isArray(pt) ? pt : [], je = Fe(() => {
|
|
1067
|
-
const t = Le.toLowerCase();
|
|
1068
|
-
return M.map((r) => {
|
|
1069
|
-
if (r.type === "GROUP") {
|
|
1070
|
-
const n = r.menus.filter((a) => a.name.toLowerCase().includes(t));
|
|
1071
|
-
return r.name.toLowerCase().includes(t) || n.length > 0 ? { ...r, menus: n } : null;
|
|
1072
|
-
}
|
|
1073
|
-
return r.name.toLowerCase().includes(t) ? r : null;
|
|
1074
|
-
}).filter(Boolean);
|
|
1075
|
-
}, [M, Le]), { separatedGroups: Ne, separatedFeatures: Me } = Fe(() => {
|
|
1076
|
-
const t = je.filter((n) => n.type === "GROUP"), r = je.filter((n) => n.type !== "GROUP");
|
|
1077
|
-
return { separatedGroups: t, separatedFeatures: r };
|
|
1078
|
-
}, [je]), oe = Re(
|
|
1079
|
-
(t) => {
|
|
1080
|
-
J((r) => ({
|
|
1081
|
-
...r,
|
|
1082
|
-
[H]: typeof t == "function" ? t(r[H] || []) : t
|
|
1083
|
-
}));
|
|
1084
|
-
},
|
|
1085
|
-
[H]
|
|
1086
|
-
), Zt = Re((t) => {
|
|
1087
|
-
Oe(t);
|
|
1088
|
-
}, []), Vt = (t, r, n) => {
|
|
1089
|
-
oe((a) => a.map((i) => i.id === t ? { ...i, [r]: n } : i));
|
|
1090
|
-
}, Qt = (t) => {
|
|
1091
|
-
We(t.active.id);
|
|
1092
|
-
}, Yt = Re(
|
|
1093
|
-
(t) => {
|
|
1094
|
-
var S, Z, xt, yt, bt, vt, St, Ct, It, Rt, wt, Et;
|
|
1095
|
-
const { active: r, over: n } = t;
|
|
1096
|
-
if (!r || !r.data.current) {
|
|
1097
|
-
We(null);
|
|
1098
|
-
return;
|
|
1099
|
-
}
|
|
1100
|
-
const a = (S = n == null ? void 0 : n.data.current) == null ? void 0 : S.type, i = (Z = n == null ? void 0 : n.data.current) == null ? void 0 : Z.sectionId, s = (xt = r.data.current) == null ? void 0 : xt.sectionId, l = (yt = r.data.current) == null ? void 0 : yt.type;
|
|
1101
|
-
if (We(null), !n && H === "programs" && l === w.FEATURE) {
|
|
1102
|
-
const f = r.data.current.data;
|
|
1103
|
-
if (!f) return;
|
|
1104
|
-
J((g) => {
|
|
1105
|
-
const x = g.programs || {}, C = (x == null ? void 0 : x.features) || [], O = {
|
|
1106
|
-
id: f.id,
|
|
1107
|
-
name: f.name,
|
|
1108
|
-
instanceId: `PROGRAMS_ROOT_${f.id}_${crypto.randomUUID()}`,
|
|
1109
|
-
type: "FEATURE",
|
|
1110
|
-
icon: {
|
|
1111
|
-
id: `svg-icon-${f.id}`,
|
|
1112
|
-
content: f.icon,
|
|
1113
|
-
type: "svg"
|
|
1114
|
-
}
|
|
1115
|
-
};
|
|
1116
|
-
return {
|
|
1117
|
-
...g,
|
|
1118
|
-
programs: {
|
|
1119
|
-
...x,
|
|
1120
|
-
features: [...C, O]
|
|
1121
|
-
}
|
|
1122
|
-
};
|
|
1123
|
-
});
|
|
1124
|
-
return;
|
|
1125
|
-
}
|
|
1126
|
-
if ((n == null ? void 0 : n.id) === "trash-zone") {
|
|
1127
|
-
const f = r.id, g = r.data.current.sectionId;
|
|
1128
|
-
l === "FEATURE_TILE" ? g ? oe(
|
|
1129
|
-
(x) => x.map((C) => {
|
|
1130
|
-
if (C.id === g && (C != null && C.features)) {
|
|
1131
|
-
const O = C == null ? void 0 : C.features.filter((k) => k.instanceId !== f);
|
|
1132
|
-
return { ...C, features: O };
|
|
1133
|
-
}
|
|
1134
|
-
return C;
|
|
1135
|
-
})
|
|
1136
|
-
) : H === "programs" && J((x) => {
|
|
1137
|
-
const C = x.programs || {}, k = ((C == null ? void 0 : C.features) || []).filter((D) => D.instanceId !== f);
|
|
1138
|
-
return {
|
|
1139
|
-
...x,
|
|
1140
|
-
programs: {
|
|
1141
|
-
...C,
|
|
1142
|
-
features: k
|
|
1143
|
-
}
|
|
1144
|
-
};
|
|
1145
|
-
}) : (l === w.SECTION || l === w.SEARCH_BAR) && oe((x) => x.filter((C) => C.id !== r.id));
|
|
1146
|
-
return;
|
|
1147
|
-
}
|
|
1148
|
-
if (l === "FEATURE_TILE" && a === "FEATURE_TILE") {
|
|
1149
|
-
if (!s && H === "programs") {
|
|
1150
|
-
J((f) => {
|
|
1151
|
-
const g = f.programs || {}, x = (g == null ? void 0 : g.features) || [], C = x.findIndex((D) => D.instanceId === r.id), O = x.findIndex((D) => D.instanceId === n.id);
|
|
1152
|
-
if (C === -1 || O === -1)
|
|
1153
|
-
return f;
|
|
1154
|
-
const k = Pe(x, C, O);
|
|
1155
|
-
return {
|
|
1156
|
-
...f,
|
|
1157
|
-
programs: {
|
|
1158
|
-
...g,
|
|
1159
|
-
features: k
|
|
1160
|
-
}
|
|
1161
|
-
};
|
|
1162
|
-
});
|
|
1163
|
-
return;
|
|
1164
|
-
}
|
|
1165
|
-
s === i && r.id !== n.id && oe(
|
|
1166
|
-
(f) => f.map((g) => {
|
|
1167
|
-
if (g.id === s) {
|
|
1168
|
-
const x = g == null ? void 0 : g.features, C = x.findIndex((D) => D.instanceId === r.id), O = x.findIndex((D) => D.instanceId === n.id);
|
|
1169
|
-
if (C === -1 || O === -1) return g;
|
|
1170
|
-
const k = Pe(x, C, O);
|
|
1171
|
-
return { ...g, features: k };
|
|
1172
|
-
}
|
|
1173
|
-
return g;
|
|
1174
|
-
})
|
|
1175
|
-
);
|
|
1176
|
-
return;
|
|
1177
|
-
}
|
|
1178
|
-
if (l === w.GROUP && a === w.SECTION_DROP_ZONE) {
|
|
1179
|
-
const f = r.data.current.data, g = (bt = n == null ? void 0 : n.data.current) == null ? void 0 : bt.sectionId;
|
|
1180
|
-
f && g && J((x) => {
|
|
1181
|
-
const C = x[H] || [], O = C.findIndex((_e) => _e.id === g);
|
|
1182
|
-
if (O === -1) return x;
|
|
1183
|
-
const k = C[O], D = String(f.uuid);
|
|
1184
|
-
if (k == null ? void 0 : k.features.some((_e) => _e.type === "GROUP" && String(_e.uuid) === D))
|
|
1185
|
-
return ie({
|
|
1186
|
-
type: "warn",
|
|
1187
|
-
message: `Group ${f.name} is already in this section.`
|
|
1188
|
-
}), x;
|
|
1189
|
-
const qe = {
|
|
1190
|
-
id: f.uuid,
|
|
1191
|
-
name: f.name,
|
|
1192
|
-
instanceId: `${g}_GROUP_${f.uuid}_${crypto.randomUUID()}`,
|
|
1193
|
-
type: "GROUP",
|
|
1194
|
-
menus: f.menus || [],
|
|
1195
|
-
icon: f.icon
|
|
1196
|
-
}, ke = {
|
|
1197
|
-
...k,
|
|
1198
|
-
features: [...k.features, qe]
|
|
1199
|
-
}, ce = [...C];
|
|
1200
|
-
return ce[O] = ke, { ...x, [H]: ce };
|
|
1201
|
-
});
|
|
1202
|
-
return;
|
|
1203
|
-
}
|
|
1204
|
-
if (l === w.FEATURE && a === w.SECTION_DROP_ZONE) {
|
|
1205
|
-
const f = r.data.current.data, g = (vt = n == null ? void 0 : n.data.current) == null ? void 0 : vt.sectionId;
|
|
1206
|
-
f && g && J((x) => {
|
|
1207
|
-
const C = x[H] || [], O = C.findIndex((ce) => ce.id === g);
|
|
1208
|
-
if (O === -1) return x;
|
|
1209
|
-
const k = C[O];
|
|
1210
|
-
if (k == null ? void 0 : k.features.some((ce) => ce.id === f.id && ce.type === "FEATURE"))
|
|
1211
|
-
return ie({
|
|
1212
|
-
type: "warn",
|
|
1213
|
-
message: `Feature ${f.name} is already in this section.`
|
|
1214
|
-
}), x;
|
|
1215
|
-
const V = {
|
|
1216
|
-
id: f.id,
|
|
1217
|
-
name: f.name,
|
|
1218
|
-
instanceId: `${g}_${f.id}_${crypto.randomUUID()}`,
|
|
1219
|
-
type: "FEATURE",
|
|
1220
|
-
icon: {
|
|
1221
|
-
id: `svg-icon-${f.id}`,
|
|
1222
|
-
content: f.icon,
|
|
1223
|
-
type: "svg"
|
|
1224
|
-
}
|
|
1225
|
-
}, qe = {
|
|
1226
|
-
...k,
|
|
1227
|
-
features: [...k.features, V]
|
|
1228
|
-
}, ke = [...C];
|
|
1229
|
-
return ke[O] = qe, { ...x, [H]: ke };
|
|
1230
|
-
});
|
|
1231
|
-
return;
|
|
1232
|
-
}
|
|
1233
|
-
if (!((St = r.data.current) != null && St.sortable && !((Ct = n == null ? void 0 : n.data.current) != null && Ct.sortable) && (n == null ? void 0 : n.id) === "mobile-content")) {
|
|
1234
|
-
if ((It = n == null ? void 0 : n.data.current) != null && It.sortable && ((Rt = r.data.current) == null ? void 0 : Rt.type) === w.SECTION && r.id !== n.id) {
|
|
1235
|
-
oe((f) => {
|
|
1236
|
-
const g = f.find((V) => V.type === w.SEARCH_BAR), x = f.filter((V) => V.type !== w.SEARCH_BAR), C = x.findIndex((V) => V.id === r.id), O = x.findIndex((V) => V.id === n.id);
|
|
1237
|
-
if (C === -1 || O === -1)
|
|
1238
|
-
return f;
|
|
1239
|
-
let D = Pe(x, C, O);
|
|
1240
|
-
return g && (D = [g, ...D]), D;
|
|
1241
|
-
});
|
|
1242
|
-
return;
|
|
1243
|
-
}
|
|
1244
|
-
if ((n == null ? void 0 : n.id) === "mobile-content" && l) {
|
|
1245
|
-
const f = (wt = n.data.current) == null ? void 0 : wt.type;
|
|
1246
|
-
if (f === "PROGRAMS_ROOT_DROP_ZONE") {
|
|
1247
|
-
if (l === w.GROUP) {
|
|
1248
|
-
ie({
|
|
1249
|
-
type: "warn",
|
|
1250
|
-
message: "Groups cannot be dropped directly onto the Programs tab."
|
|
1251
|
-
});
|
|
1252
|
-
return;
|
|
1253
|
-
}
|
|
1254
|
-
if (l === w.FEATURE) {
|
|
1255
|
-
const g = r.data.current.data;
|
|
1256
|
-
if (!g) return;
|
|
1257
|
-
J((x) => ({
|
|
1258
|
-
...x,
|
|
1259
|
-
programs: {
|
|
1260
|
-
...x.programs,
|
|
1261
|
-
features: [
|
|
1262
|
-
...x.programs.features,
|
|
1263
|
-
{
|
|
1264
|
-
id: g.id,
|
|
1265
|
-
name: g.name,
|
|
1266
|
-
instanceId: `PROGRAMS_ROOT_${g.id}_${crypto.randomUUID()}`,
|
|
1267
|
-
type: "FEATURE",
|
|
1268
|
-
icon: {
|
|
1269
|
-
id: `svg-icon-${g.id}`,
|
|
1270
|
-
content: g.icon,
|
|
1271
|
-
type: "svg"
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
]
|
|
1275
|
-
}
|
|
1276
|
-
}));
|
|
1277
|
-
return;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
if ((Et = r.data.current) != null && Et.sortable && f === "LAYOUT_ROOT_DROP_ZONE")
|
|
1281
|
-
return;
|
|
1282
|
-
if (f === "LAYOUT_ROOT_DROP_ZONE") {
|
|
1283
|
-
oe((g) => {
|
|
1284
|
-
if (l === w.SEARCH_BAR)
|
|
1285
|
-
return g.some((O) => O.type === w.SEARCH_BAR) ? (ie({
|
|
1286
|
-
type: "info",
|
|
1287
|
-
message: "Only one Search Bar is allowed."
|
|
1288
|
-
}), g) : [{
|
|
1289
|
-
id: `comp-${Date.now()}`,
|
|
1290
|
-
type: w.SEARCH_BAR,
|
|
1291
|
-
queryName: "Query Name"
|
|
1292
|
-
}, ...g];
|
|
1293
|
-
if (l === w.SECTION) {
|
|
1294
|
-
const x = {
|
|
1295
|
-
id: `comp-${Date.now()}`,
|
|
1296
|
-
type: l,
|
|
1297
|
-
title: "Section",
|
|
1298
|
-
features: []
|
|
1299
|
-
};
|
|
1300
|
-
return [...g, x];
|
|
1301
|
-
}
|
|
1302
|
-
return g;
|
|
1303
|
-
});
|
|
1304
|
-
return;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
},
|
|
1309
|
-
[oe, J, H, w]
|
|
1310
|
-
), mt = "350px", Jt = () => /* @__PURE__ */ p(
|
|
1311
|
-
N,
|
|
1312
|
-
{
|
|
1313
|
-
sx: {
|
|
1314
|
-
width: mt,
|
|
1315
|
-
p: 1.5,
|
|
1316
|
-
border: "1px solid #ccc",
|
|
1317
|
-
borderRadius: "8px",
|
|
1318
|
-
backgroundColor: "var(--color-background2)",
|
|
1319
|
-
display: "flex",
|
|
1320
|
-
alignItems: "center",
|
|
1321
|
-
boxShadow: "0 1px 10px rgba(0,0,0,0.3)"
|
|
1322
|
-
},
|
|
1323
|
-
children: [
|
|
1324
|
-
/* @__PURE__ */ e(z, { icon: _t, style: { marginRight: "8px", color: "#888" } }),
|
|
1325
|
-
/* @__PURE__ */ e(v, { variant: "body2", color: "textSecondary", sx: { flexGrow: 1 }, children: "Search..." })
|
|
1326
|
-
]
|
|
1327
|
-
}
|
|
1328
|
-
), Xt = () => /* @__PURE__ */ e(
|
|
1329
|
-
N,
|
|
1330
|
-
{
|
|
1331
|
-
sx: {
|
|
1332
|
-
width: mt,
|
|
1333
|
-
minHeight: "100px",
|
|
1334
|
-
backgroundColor: "#e6f0ff",
|
|
1335
|
-
border: "1px dashed var(--color-tableHeader)",
|
|
1336
|
-
borderRadius: "4px",
|
|
1337
|
-
display: "flex",
|
|
1338
|
-
alignItems: "center",
|
|
1339
|
-
justifyContent: "center",
|
|
1340
|
-
boxShadow: "0 1px 10px rgba(0,0,0,0.3)",
|
|
1341
|
-
color: "var(--color-text)"
|
|
1342
|
-
},
|
|
1343
|
-
children: /* @__PURE__ */ e(v, { variant: "caption", sx: { fontWeight: "bold" }, children: "Section Dragging" })
|
|
1344
|
-
}
|
|
1345
|
-
), $e = ({ feature: t }) => /* @__PURE__ */ e(I, { item: !0, xs: 4, sm: 4, children: /* @__PURE__ */ p(
|
|
1346
|
-
N,
|
|
1347
|
-
{
|
|
1348
|
-
sx: {
|
|
1349
|
-
display: "flex",
|
|
1350
|
-
flexDirection: "column",
|
|
1351
|
-
alignItems: "center",
|
|
1352
|
-
justifyContent: "center",
|
|
1353
|
-
p: 0.5,
|
|
1354
|
-
height: "100%",
|
|
1355
|
-
backgroundColor: "transparent",
|
|
1356
|
-
cursor: "grab"
|
|
1357
|
-
},
|
|
1358
|
-
children: [
|
|
1359
|
-
Ee(t.icon),
|
|
1360
|
-
/* @__PURE__ */ e(
|
|
1361
|
-
v,
|
|
1362
|
-
{
|
|
1363
|
-
variant: "caption",
|
|
1364
|
-
sx: {
|
|
1365
|
-
mt: 1,
|
|
1366
|
-
textAlign: "center",
|
|
1367
|
-
lineHeight: 1.2,
|
|
1368
|
-
width: "100%",
|
|
1369
|
-
fontSize: "0.65rem"
|
|
1370
|
-
},
|
|
1371
|
-
children: t.name
|
|
1372
|
-
}
|
|
1373
|
-
)
|
|
1374
|
-
]
|
|
1375
|
-
}
|
|
1376
|
-
) });
|
|
1377
|
-
$e.propTypes = {
|
|
1378
|
-
feature: h.any
|
|
1379
|
-
};
|
|
1380
|
-
const ht = ({ feature: t }) => /* @__PURE__ */ p(
|
|
1381
|
-
N,
|
|
1382
|
-
{
|
|
1383
|
-
sx: {
|
|
1384
|
-
width: "fit-content",
|
|
1385
|
-
p: "10px",
|
|
1386
|
-
pl: "10px",
|
|
1387
|
-
backgroundColor: "var(--color-background2)",
|
|
1388
|
-
border: "1px solid var(--color-gray3)",
|
|
1389
|
-
borderRadius: "4px",
|
|
1390
|
-
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
1391
|
-
cursor: "grab",
|
|
1392
|
-
display: "flex",
|
|
1393
|
-
alignItems: "center",
|
|
1394
|
-
transition: "all 0.1s",
|
|
1395
|
-
mt: "4px",
|
|
1396
|
-
"&:hover": {
|
|
1397
|
-
backgroundColor: "var(--color-gray4)",
|
|
1398
|
-
borderColor: "var(--color-gray3)"
|
|
1399
|
-
}
|
|
1400
|
-
},
|
|
1401
|
-
children: [
|
|
1402
|
-
((n, a) => {
|
|
1403
|
-
const i = Ee(t.icon, "18px");
|
|
1404
|
-
return i && i.type === N ? K.cloneElement(i, {
|
|
1405
|
-
sx: {
|
|
1406
|
-
...i.props.sx,
|
|
1407
|
-
height: "18px",
|
|
1408
|
-
width: "18px",
|
|
1409
|
-
marginRight: "8px"
|
|
1410
|
-
}
|
|
1411
|
-
}) : /* @__PURE__ */ e(N, { sx: { mr: "8px", display: "flex", alignItems: "center" }, children: Ee(n, a) });
|
|
1412
|
-
})(t.icon, "18px"),
|
|
1413
|
-
/* @__PURE__ */ e(v, { variant: "body2", sx: { fontWeight: "normal", color: "#333" }, children: t == null ? void 0 : t.name })
|
|
1414
|
-
]
|
|
1415
|
-
}
|
|
1416
|
-
);
|
|
1417
|
-
ht.propTypes = {
|
|
1418
|
-
feature: h.any
|
|
1419
|
-
};
|
|
1420
|
-
const Kt = (t) => {
|
|
1421
|
-
const n = M.flatMap((s) => s.type === w.GROUP ? [s, ...s.menus] : [s]).find((s) => (s.uuid || s.id) === t);
|
|
1422
|
-
if (n) {
|
|
1423
|
-
let s;
|
|
1424
|
-
return n.type ? s = n.type : n.menus ? s = w.GROUP : s = w.FEATURE, {
|
|
1425
|
-
type: s,
|
|
1426
|
-
data: n
|
|
1427
|
-
};
|
|
1428
|
-
}
|
|
1429
|
-
const a = le == null ? void 0 : le.find((s) => s.instanceId === t);
|
|
1430
|
-
if (a)
|
|
1431
|
-
return { type: "FEATURE_TILE", data: a };
|
|
1432
|
-
const i = ne.find((s) => s.id === t);
|
|
1433
|
-
if (i) return { type: i.type, data: i };
|
|
1434
|
-
for (const s of ne)
|
|
1435
|
-
if (s != null && s.features) {
|
|
1436
|
-
const l = s == null ? void 0 : s.features.find((S) => S.instanceId === t);
|
|
1437
|
-
if (l)
|
|
1438
|
-
return { type: "FEATURE_TILE", data: l };
|
|
1439
|
-
}
|
|
1440
|
-
return null;
|
|
1441
|
-
}, er = ne.find((t) => t.id === dt), tr = (t) => {
|
|
1442
|
-
const r = Kt(t);
|
|
1443
|
-
return r ? r.type === w.SEARCH_BAR ? /* @__PURE__ */ e(Jt, {}) : r.type === w.SECTION ? /* @__PURE__ */ e(Xt, {}) : r.type === w.FEATURE ? /* @__PURE__ */ e(ht, { feature: r.data }) : r.type === w.GROUP ? /* @__PURE__ */ e($e, { feature: r.data }) : r.type === "FEATURE_TILE" ? /* @__PURE__ */ e($e, { feature: r.data }) : null : null;
|
|
1444
|
-
}, rr = Fe(() => {
|
|
1445
|
-
if (!he) return !1;
|
|
1446
|
-
const t = ne.some((a) => a.id === he), r = ne.some((a) => {
|
|
1447
|
-
var i;
|
|
1448
|
-
return (i = a == null ? void 0 : a.features) == null ? void 0 : i.some((s) => s.instanceId === he);
|
|
1449
|
-
}), n = le == null ? void 0 : le.some((a) => a.instanceId === he);
|
|
1450
|
-
return t || r || n;
|
|
1451
|
-
}, [he, ne, le]), nr = ne.filter((t) => t.type === w.SECTION).map((t) => t.id), or = (t) => {
|
|
1452
|
-
var n, a;
|
|
1453
|
-
const r = (a = (n = t.active) == null ? void 0 : n.data.current) == null ? void 0 : a.type;
|
|
1454
|
-
if (r === w.FEATURE) {
|
|
1455
|
-
const i = t.droppableContainers.filter(
|
|
1456
|
-
(s) => {
|
|
1457
|
-
var l;
|
|
1458
|
-
return ((l = s.data.current) == null ? void 0 : l.type) === "SECTION_DROP_ZONE";
|
|
1459
|
-
}
|
|
1460
|
-
);
|
|
1461
|
-
return At({
|
|
1462
|
-
...t,
|
|
1463
|
-
droppableContainers: i
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
if (r === w.SECTION) {
|
|
1467
|
-
const i = t.droppableContainers.filter((s) => {
|
|
1468
|
-
var l;
|
|
1469
|
-
return !(s.id === t.active.id || ((l = s.data.current) == null ? void 0 : l.type) === "SECTION_DROP_ZONE");
|
|
1470
|
-
});
|
|
1471
|
-
return At({
|
|
1472
|
-
...t,
|
|
1473
|
-
droppableContainers: i
|
|
1474
|
-
});
|
|
1475
|
-
}
|
|
1476
|
-
return ar(t);
|
|
1477
|
-
};
|
|
1478
|
-
return /* @__PURE__ */ p(Ze, { children: [
|
|
1479
|
-
/* @__PURE__ */ e(Pr.Provider, { children: /* @__PURE__ */ e("form", { noValidate: !0, onSubmit: $.handleSubmit(pe), children: /* @__PURE__ */ p(
|
|
1480
|
-
Nt,
|
|
1481
|
-
{
|
|
1482
|
-
onDragStart: Qt,
|
|
1483
|
-
onDragEnd: Yt,
|
|
1484
|
-
collisionDetection: or,
|
|
1485
|
-
children: [
|
|
1486
|
-
/* @__PURE__ */ p(I, { container: !0, spacing: 1, children: [
|
|
1487
|
-
/* @__PURE__ */ e(I, { size: 1 }),
|
|
1488
|
-
/* @__PURE__ */ e(I, { size: 6, children: /* @__PURE__ */ p(
|
|
1489
|
-
I,
|
|
1490
|
-
{
|
|
1491
|
-
sx: {
|
|
1492
|
-
padding: "2px",
|
|
1493
|
-
margin: "6px 0px"
|
|
1494
|
-
},
|
|
1495
|
-
children: [
|
|
1496
|
-
/* @__PURE__ */ p(I, { container: !0, sx: { justifyContent: "space-between" }, children: [
|
|
1497
|
-
/* @__PURE__ */ e(I, { size: 2 }),
|
|
1498
|
-
/* @__PURE__ */ e(v, { variant: "subtitle1", sx: { fontWeight: "bold", marginLeft: "5px", mb: 1 }, children: "Mobile View" }),
|
|
1499
|
-
/* @__PURE__ */ p(I, { container: !0, spacing: 1, children: [
|
|
1500
|
-
/* @__PURE__ */ e(
|
|
1501
|
-
Ge,
|
|
1502
|
-
{
|
|
1503
|
-
variant: "contained",
|
|
1504
|
-
color: "gray",
|
|
1505
|
-
sx: { fontSize: "0.8rem", height: "30px" },
|
|
1506
|
-
type: "submit",
|
|
1507
|
-
onClick: () => {
|
|
1508
|
-
P(!0);
|
|
1509
|
-
},
|
|
1510
|
-
children: "Back"
|
|
1511
|
-
}
|
|
1512
|
-
),
|
|
1513
|
-
/* @__PURE__ */ e(
|
|
1514
|
-
Ge,
|
|
1515
|
-
{
|
|
1516
|
-
variant: "contained",
|
|
1517
|
-
color: "primary",
|
|
1518
|
-
sx: { fontSize: "0.8rem", height: "30px" },
|
|
1519
|
-
type: "submit",
|
|
1520
|
-
children: "Save"
|
|
1521
|
-
}
|
|
1522
|
-
)
|
|
1523
|
-
] })
|
|
1524
|
-
] }),
|
|
1525
|
-
/* @__PURE__ */ e(I, { sx: { height: "100%", maxHeight: "100%", overflowY: "auto" }, children: /* @__PURE__ */ e(De, { items: nr, strategy: Ue, children: /* @__PURE__ */ e(
|
|
1526
|
-
Gt,
|
|
1527
|
-
{
|
|
1528
|
-
tabStatus: me,
|
|
1529
|
-
layoutComponents: ne,
|
|
1530
|
-
componentTypes: w,
|
|
1531
|
-
handleSectionClick: ut,
|
|
1532
|
-
activeElementId: dt,
|
|
1533
|
-
activeTabId: H,
|
|
1534
|
-
handleTabSwitch: Zt,
|
|
1535
|
-
formList: F,
|
|
1536
|
-
selectedForm: ze,
|
|
1537
|
-
onFormSelect: Wt,
|
|
1538
|
-
SvgIconBox: st,
|
|
1539
|
-
setCurrentLayoutComponents: oe,
|
|
1540
|
-
programFeatures: ((ft = ge.programs) == null ? void 0 : ft.features) || []
|
|
1541
|
-
}
|
|
1542
|
-
) }) }),
|
|
1543
|
-
/* @__PURE__ */ e(I, { container: !0, spacing: 2, justifyContent: "space-around", sx: { my: "1.25rem" }, children: B.map((t) => /* @__PURE__ */ e(I, { item: !0, xs: 12, sm: 6, md: 3, children: /* @__PURE__ */ p(I, { container: !0, alignItems: "center", justifyContent: "space-between", children: [
|
|
1544
|
-
/* @__PURE__ */ e(v, { variant: "body2", sx: { fontWeight: "bolder" }, children: t.name }),
|
|
1545
|
-
/* @__PURE__ */ e(
|
|
1546
|
-
Ot,
|
|
1547
|
-
{
|
|
1548
|
-
checked: me[t.id],
|
|
1549
|
-
onChange: () => Y(t.id),
|
|
1550
|
-
name: t.name,
|
|
1551
|
-
sx: {
|
|
1552
|
-
"& .MuiSwitch-switchBase.Mui-checked": {
|
|
1553
|
-
color: "var(--color-text)",
|
|
1554
|
-
"&:hover": {
|
|
1555
|
-
backgroundColor: "rgba(7, 49, 73, 0.08)"
|
|
1556
|
-
}
|
|
1557
|
-
},
|
|
1558
|
-
"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track": {
|
|
1559
|
-
backgroundColor: "var(--color-tableHeader)",
|
|
1560
|
-
opacity: 0.7
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
)
|
|
1565
|
-
] }) }, t.id)) })
|
|
1566
|
-
]
|
|
1567
|
-
}
|
|
1568
|
-
) }),
|
|
1569
|
-
/* @__PURE__ */ e(I, { size: 1 }),
|
|
1570
|
-
/* @__PURE__ */ p(I, { size: 4, children: [
|
|
1571
|
-
/* @__PURE__ */ e(I, { size: 12, children: /* @__PURE__ */ p(xe, { sx: { padding: "2px", margin: "6px 0px" }, children: [
|
|
1572
|
-
/* @__PURE__ */ e(I, { className: "justify-between items-center", container: !0, children: /* @__PURE__ */ e(v, { variant: "subtitle1", sx: { fontWeight: "bold", marginLeft: "5px" }, children: "Menu Relation" }) }),
|
|
1573
|
-
/* @__PURE__ */ p(I, { container: !0, children: [
|
|
1574
|
-
/* @__PURE__ */ e(I, { size: 12, children: /* @__PURE__ */ p(
|
|
1575
|
-
Ve,
|
|
1576
|
-
{
|
|
1577
|
-
variant: "outlined",
|
|
1578
|
-
className: "ml-3 mb-1 flex flex-row items-center align-items w-[90%]",
|
|
1579
|
-
children: [
|
|
1580
|
-
/* @__PURE__ */ p(v, { variant: "body2", children: [
|
|
1581
|
-
"Select Role",
|
|
1582
|
-
/* @__PURE__ */ e("span", { className: "text-red-500 ml-1", children: "*" }),
|
|
1583
|
-
" :"
|
|
1584
|
-
] }),
|
|
1585
|
-
/* @__PURE__ */ e(N, { className: "w-[60%] ms-3", children: /* @__PURE__ */ e(
|
|
1586
|
-
br,
|
|
1587
|
-
{
|
|
1588
|
-
control: $.control,
|
|
1589
|
-
size: "small",
|
|
1590
|
-
id: "role",
|
|
1591
|
-
name: "role",
|
|
1592
|
-
options: E || [],
|
|
1593
|
-
disabled: y,
|
|
1594
|
-
displayName: "name",
|
|
1595
|
-
optionValue: "id",
|
|
1596
|
-
errors: $.formState.errors,
|
|
1597
|
-
sx: { height: "50px", mt: 2 },
|
|
1598
|
-
disableClearable: !!y,
|
|
1599
|
-
placeholder: "Select role",
|
|
1600
|
-
onChange: (t) => Ae(t.target.value)
|
|
1601
|
-
}
|
|
1602
|
-
) })
|
|
1603
|
-
]
|
|
1604
|
-
}
|
|
1605
|
-
) }),
|
|
1606
|
-
/* @__PURE__ */ e(I, { size: 12, children: /* @__PURE__ */ p(
|
|
1607
|
-
Ve,
|
|
1608
|
-
{
|
|
1609
|
-
variant: "standard",
|
|
1610
|
-
className: "ml-3 mb-3 flex flex-row items-center align-items w-[90%]",
|
|
1611
|
-
children: [
|
|
1612
|
-
/* @__PURE__ */ e(v, { variant: "body2", children: "Attendance Required? :" }),
|
|
1613
|
-
/* @__PURE__ */ e(N, { className: "w-[60%] ms-3", children: /* @__PURE__ */ e(
|
|
1614
|
-
Ot,
|
|
1615
|
-
{
|
|
1616
|
-
checked: $.watch("isAttendanceRequired"),
|
|
1617
|
-
onChange: (t) => $.setValue("isAttendanceRequired", t.target.checked),
|
|
1618
|
-
sx: {
|
|
1619
|
-
"& .MuiSwitch-switchBase.Mui-checked": {
|
|
1620
|
-
color: "var(--color-text)",
|
|
1621
|
-
"&:hover": {
|
|
1622
|
-
backgroundColor: "rgba(7, 49, 73, 0.08)"
|
|
1623
|
-
}
|
|
1624
|
-
},
|
|
1625
|
-
"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track": {
|
|
1626
|
-
backgroundColor: "var(--color-tableHeader)",
|
|
1627
|
-
opacity: 0.7
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
) })
|
|
1632
|
-
]
|
|
1633
|
-
}
|
|
1634
|
-
) })
|
|
1635
|
-
] })
|
|
1636
|
-
] }) }),
|
|
1637
|
-
/* @__PURE__ */ e(I, { size: 12, children: /* @__PURE__ */ p(
|
|
1638
|
-
xe,
|
|
1639
|
-
{
|
|
1640
|
-
sx: {
|
|
1641
|
-
padding: "5px",
|
|
1642
|
-
margin: "2px 0px",
|
|
1643
|
-
height: "595px",
|
|
1644
|
-
transition: "height 0.3s ease-in-out"
|
|
1645
|
-
},
|
|
1646
|
-
children: [
|
|
1647
|
-
/* @__PURE__ */ e(v, { variant: "subtitle1", sx: { fontWeight: "bold", marginLeft: "5px", mb: 1 }, children: "Draggable Components" }),
|
|
1648
|
-
/* @__PURE__ */ p(I, { container: !0, spacing: 2, justifyContent: "space-around", sx: { p: 1 }, children: [
|
|
1649
|
-
/* @__PURE__ */ e(we, { id: "draggable-search", componentType: w.SEARCH_BAR, children: /* @__PURE__ */ e(I, { item: !0, xs: 6, sm: 4, size: 6, children: /* @__PURE__ */ p(
|
|
1650
|
-
N,
|
|
1651
|
-
{
|
|
1652
|
-
sx: {
|
|
1653
|
-
width: "100%",
|
|
1654
|
-
height: "50px",
|
|
1655
|
-
p: "8px 10px",
|
|
1656
|
-
backgroundColor: "var(--color-gray4)",
|
|
1657
|
-
border: "1px solid var(--color-gray3)",
|
|
1658
|
-
borderRadius: "8px",
|
|
1659
|
-
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)",
|
|
1660
|
-
cursor: "grab",
|
|
1661
|
-
display: "flex",
|
|
1662
|
-
alignItems: "center",
|
|
1663
|
-
justifyContent: "flex-start",
|
|
1664
|
-
color: "var(--color-text)",
|
|
1665
|
-
transition: "all 0.2s ease-in-out",
|
|
1666
|
-
"&:hover": {
|
|
1667
|
-
backgroundColor: "#e0eaf1",
|
|
1668
|
-
borderColor: "var(--color-gray3)",
|
|
1669
|
-
boxShadow: "0 2px 5px rgba(0, 0, 0, 0.15)"
|
|
1670
|
-
}
|
|
1671
|
-
},
|
|
1672
|
-
children: [
|
|
1673
|
-
/* @__PURE__ */ e(
|
|
1674
|
-
X,
|
|
1675
|
-
{
|
|
1676
|
-
iconName: "faMagnifyingGlass",
|
|
1677
|
-
style: { fontSize: "1.2rem", marginRight: "8px" }
|
|
1678
|
-
}
|
|
1679
|
-
),
|
|
1680
|
-
/* @__PURE__ */ e(v, { variant: "body2", sx: { fontWeight: "bold", lineHeight: 1 }, children: "Search Bar" })
|
|
1681
|
-
]
|
|
1682
|
-
}
|
|
1683
|
-
) }) }),
|
|
1684
|
-
/* @__PURE__ */ e(we, { id: "draggable-section", componentType: w.SECTION, children: /* @__PURE__ */ e(I, { item: !0, xs: 6, sm: 4, size: 6, children: /* @__PURE__ */ p(
|
|
1685
|
-
N,
|
|
1686
|
-
{
|
|
1687
|
-
sx: {
|
|
1688
|
-
width: "100%",
|
|
1689
|
-
height: "50px",
|
|
1690
|
-
p: "8px 10px",
|
|
1691
|
-
backgroundColor: "var(--color-gray4)",
|
|
1692
|
-
border: "1px solid var(--color-gray3)",
|
|
1693
|
-
borderRadius: "8px",
|
|
1694
|
-
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)",
|
|
1695
|
-
cursor: "grab",
|
|
1696
|
-
display: "flex",
|
|
1697
|
-
alignItems: "center",
|
|
1698
|
-
justifyContent: "flex-start",
|
|
1699
|
-
color: "var(--color-text)",
|
|
1700
|
-
transition: "all 0.2s ease-in-out",
|
|
1701
|
-
"&:hover": {
|
|
1702
|
-
backgroundColor: "#c5e1ff",
|
|
1703
|
-
borderColor: "var(--color-tableHeader)",
|
|
1704
|
-
boxShadow: "0 2px 5px rgba(0, 0, 0, 0.15)"
|
|
1705
|
-
}
|
|
1706
|
-
},
|
|
1707
|
-
children: [
|
|
1708
|
-
/* @__PURE__ */ e(X, { iconName: "faBox", style: { fontSize: "1.2rem", marginRight: "8px" } }),
|
|
1709
|
-
/* @__PURE__ */ e(v, { variant: "body2", sx: { fontWeight: "bold", lineHeight: 1 }, children: "Section" })
|
|
1710
|
-
]
|
|
1711
|
-
}
|
|
1712
|
-
) }) })
|
|
1713
|
-
] }),
|
|
1714
|
-
/* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(Ht, { isDraggingSortable: rr }) }),
|
|
1715
|
-
/* @__PURE__ */ e(ot, { sx: { mt: 2 } }),
|
|
1716
|
-
/* @__PURE__ */ e(I, { size: 12, children: /* @__PURE__ */ p(
|
|
1717
|
-
N,
|
|
1718
|
-
{
|
|
1719
|
-
sx: {
|
|
1720
|
-
padding: "0px",
|
|
1721
|
-
margin: "10px 0px",
|
|
1722
|
-
height: "450px",
|
|
1723
|
-
overflowY: "auto",
|
|
1724
|
-
transition: "height 0.3s ease-in-out"
|
|
1725
|
-
},
|
|
1726
|
-
children: [
|
|
1727
|
-
/* @__PURE__ */ e(v, { variant: "subtitle1", sx: { fontWeight: "bold", marginLeft: "5px", mb: 1 }, children: "Available Features" }),
|
|
1728
|
-
/* @__PURE__ */ e(
|
|
1729
|
-
Qe,
|
|
1730
|
-
{
|
|
1731
|
-
fullWidth: !0,
|
|
1732
|
-
size: "small",
|
|
1733
|
-
placeholder: "Search Feature...",
|
|
1734
|
-
variant: "outlined",
|
|
1735
|
-
sx: { mb: 2, px: 1 },
|
|
1736
|
-
value: Le,
|
|
1737
|
-
onChange: (t) => Lt(t.target.value),
|
|
1738
|
-
InputProps: {
|
|
1739
|
-
startAdornment: /* @__PURE__ */ e(ur, { position: "start", children: /* @__PURE__ */ e(X, { iconName: "faMagnifyingGlass" }) })
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
),
|
|
1743
|
-
/* @__PURE__ */ e(
|
|
1744
|
-
N,
|
|
1745
|
-
{
|
|
1746
|
-
sx: {
|
|
1747
|
-
flexGrow: 1,
|
|
1748
|
-
overflowY: "auto",
|
|
1749
|
-
padding: "0 8px"
|
|
1750
|
-
},
|
|
1751
|
-
children: /* @__PURE__ */ p(I, { container: !0, direction: "column", spacing: 0, sx: { px: 1 }, children: [
|
|
1752
|
-
Ne.length > 0 && /* @__PURE__ */ e(
|
|
1753
|
-
I,
|
|
1754
|
-
{
|
|
1755
|
-
item: !0,
|
|
1756
|
-
xs: 12,
|
|
1757
|
-
sx: {
|
|
1758
|
-
mb: 1
|
|
1759
|
-
},
|
|
1760
|
-
children: /* @__PURE__ */ p(
|
|
1761
|
-
Ye,
|
|
1762
|
-
{
|
|
1763
|
-
sx: {
|
|
1764
|
-
"&:before": { display: "none" },
|
|
1765
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.05)",
|
|
1766
|
-
border: "1px solid #c5e1ff",
|
|
1767
|
-
borderRadius: "4px!important",
|
|
1768
|
-
backgroundColor: "var(--color-background2)"
|
|
1769
|
-
},
|
|
1770
|
-
expanded: ae,
|
|
1771
|
-
onChange: () => ue((t) => !t),
|
|
1772
|
-
disableGutters: !0,
|
|
1773
|
-
children: [
|
|
1774
|
-
/* @__PURE__ */ e(
|
|
1775
|
-
Je,
|
|
1776
|
-
{
|
|
1777
|
-
expandIcon: /* @__PURE__ */ e(X, { iconName: "faChevronDown", style: { color: "#3f51b5" } }),
|
|
1778
|
-
sx: {
|
|
1779
|
-
minHeight: "40px",
|
|
1780
|
-
backgroundColor: "#e3f2fd",
|
|
1781
|
-
"&:hover": { backgroundColor: "#c5e3f8" },
|
|
1782
|
-
"& .MuiAccordionSummary-content": { margin: "0" },
|
|
1783
|
-
p: "0 10px"
|
|
1784
|
-
},
|
|
1785
|
-
children: /* @__PURE__ */ p(v, { variant: "subtitle2", sx: { fontWeight: "bold", color: "#3f51b5" }, children: [
|
|
1786
|
-
/* @__PURE__ */ e(X, { iconName: "faLayerGroup", style: { marginRight: "6px" } }),
|
|
1787
|
-
"Menu Groups (",
|
|
1788
|
-
Ne.length,
|
|
1789
|
-
")"
|
|
1790
|
-
] })
|
|
1791
|
-
}
|
|
1792
|
-
),
|
|
1793
|
-
/* @__PURE__ */ e(Xe, { sx: { p: "8px", pt: 1, backgroundColor: "var(--color-gray4)" }, children: /* @__PURE__ */ e(I, { container: !0, spacing: 0.5, direction: "column", children: Ne.map((t) => /* @__PURE__ */ e(
|
|
1794
|
-
tt,
|
|
1795
|
-
{
|
|
1796
|
-
item: t,
|
|
1797
|
-
COMPONENT_TYPES: w,
|
|
1798
|
-
activeGroupId: jt,
|
|
1799
|
-
onGroupToggle: qt
|
|
1800
|
-
},
|
|
1801
|
-
t.uuid
|
|
1802
|
-
)) }) })
|
|
1803
|
-
]
|
|
1804
|
-
}
|
|
1805
|
-
)
|
|
1806
|
-
}
|
|
1807
|
-
),
|
|
1808
|
-
Me.length > 0 && /* @__PURE__ */ e(I, { item: !0, xs: 12, children: /* @__PURE__ */ p(
|
|
1809
|
-
Ye,
|
|
1810
|
-
{
|
|
1811
|
-
sx: {
|
|
1812
|
-
mt: 0.5,
|
|
1813
|
-
"&:before": { display: "none" },
|
|
1814
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.05)",
|
|
1815
|
-
border: "1px solid #c8e6c9",
|
|
1816
|
-
mb: 1,
|
|
1817
|
-
borderRadius: "4px!important",
|
|
1818
|
-
backgroundColor: "var(--color-background2)"
|
|
1819
|
-
},
|
|
1820
|
-
expanded: A,
|
|
1821
|
-
onChange: () => j((t) => !t),
|
|
1822
|
-
disableGutters: !0,
|
|
1823
|
-
children: [
|
|
1824
|
-
/* @__PURE__ */ e(
|
|
1825
|
-
Je,
|
|
1826
|
-
{
|
|
1827
|
-
expandIcon: /* @__PURE__ */ e(X, { iconName: "faChevronDown", style: { color: "#009688" } }),
|
|
1828
|
-
sx: {
|
|
1829
|
-
minHeight: "40px",
|
|
1830
|
-
backgroundColor: "#e8f5e9",
|
|
1831
|
-
"&:hover": { backgroundColor: "#cbe6cc" },
|
|
1832
|
-
"& .MuiAccordionSummary-content": { margin: "0" },
|
|
1833
|
-
p: "0 10px"
|
|
1834
|
-
},
|
|
1835
|
-
children: /* @__PURE__ */ p(v, { variant: "subtitle2", sx: { fontWeight: "bold", color: "#009688" }, children: [
|
|
1836
|
-
/* @__PURE__ */ e(X, { iconName: "faPuzzlePiece", style: { marginRight: "6px" } }),
|
|
1837
|
-
"Standalone Features (",
|
|
1838
|
-
Me.length,
|
|
1839
|
-
")"
|
|
1840
|
-
] })
|
|
1841
|
-
}
|
|
1842
|
-
),
|
|
1843
|
-
/* @__PURE__ */ e(Xe, { sx: { p: "8px", pt: 1, backgroundColor: "var(--color-background2)" }, children: /* @__PURE__ */ e(I, { container: !0, spacing: 0.5, direction: "column", children: Me.map((t) => /* @__PURE__ */ e(
|
|
1844
|
-
tt,
|
|
1845
|
-
{
|
|
1846
|
-
item: t,
|
|
1847
|
-
COMPONENT_TYPES: w
|
|
1848
|
-
},
|
|
1849
|
-
t.uuid
|
|
1850
|
-
)) }) })
|
|
1851
|
-
]
|
|
1852
|
-
}
|
|
1853
|
-
) }),
|
|
1854
|
-
Ne.length === 0 && Me.length === 0 && /* @__PURE__ */ e(v, { variant: "body2", sx: { p: 2, color: "var(--color-gray1)", textAlign: "center" }, children: "No groups or features match your search criteria." })
|
|
1855
|
-
] })
|
|
1856
|
-
}
|
|
1857
|
-
)
|
|
1858
|
-
]
|
|
1859
|
-
}
|
|
1860
|
-
) })
|
|
1861
|
-
]
|
|
1862
|
-
}
|
|
1863
|
-
) }),
|
|
1864
|
-
/* @__PURE__ */ e(I, { size: 12, sx: { mt: 1 }, children: /* @__PURE__ */ e(
|
|
1865
|
-
zt,
|
|
1866
|
-
{
|
|
1867
|
-
activeComponent: er,
|
|
1868
|
-
onUpdate: Vt,
|
|
1869
|
-
onDeselect: () => ut(null),
|
|
1870
|
-
mobileQueries: ee
|
|
1871
|
-
}
|
|
1872
|
-
) })
|
|
1873
|
-
] })
|
|
1874
|
-
] }),
|
|
1875
|
-
/* @__PURE__ */ e(ir, { children: tr(he) })
|
|
1876
|
-
]
|
|
1877
|
-
}
|
|
1878
|
-
) }) }),
|
|
1879
|
-
/* @__PURE__ */ e(
|
|
1880
|
-
Fr,
|
|
1881
|
-
{
|
|
1882
|
-
open: be,
|
|
1883
|
-
handleClose: () => {
|
|
1884
|
-
P(!1);
|
|
1885
|
-
},
|
|
1886
|
-
handleClick: () => {
|
|
1887
|
-
b("/ui/medplat/admin/mobileMenuManagement");
|
|
1888
|
-
},
|
|
1889
|
-
title: "Leave Page",
|
|
1890
|
-
description: "Changes you made will be discarded. Do you want to continue?",
|
|
1891
|
-
dataTestId: "delete-auth-confirmation"
|
|
1892
|
-
}
|
|
1893
|
-
)
|
|
1894
|
-
] });
|
|
1895
|
-
}
|
|
1896
|
-
function we({ id: o, children: c, componentType: d, dragData: b = null }) {
|
|
1897
|
-
const { attributes: E, listeners: u, setNodeRef: y, transform: R } = Mt({
|
|
1898
|
-
id: o,
|
|
1899
|
-
data: { type: d, ...b && { data: b } }
|
|
1900
|
-
}), F = R ? {
|
|
1901
|
-
transform: `translate3d(${R.x}px, ${R.y}px, 0)`,
|
|
1902
|
-
zIndex: 1e3,
|
|
1903
|
-
opacity: 0.9
|
|
1904
|
-
} : void 0;
|
|
1905
|
-
return K.cloneElement(c, {
|
|
1906
|
-
ref: y,
|
|
1907
|
-
style: { ...c.props.style, ...F },
|
|
1908
|
-
...u,
|
|
1909
|
-
...E
|
|
1910
|
-
});
|
|
1911
|
-
}
|
|
1912
|
-
h.node, h.number.isRequired, h.number.isRequired;
|
|
1913
|
-
const Ht = ({ isDraggingSortable: o }) => {
|
|
1914
|
-
const { setNodeRef: c, isOver: d } = rt({
|
|
1915
|
-
id: "trash-zone"
|
|
1916
|
-
});
|
|
1917
|
-
return o ? /* @__PURE__ */ p(
|
|
1918
|
-
N,
|
|
1919
|
-
{
|
|
1920
|
-
ref: c,
|
|
1921
|
-
sx: {
|
|
1922
|
-
position: "fixed",
|
|
1923
|
-
bottom: 20,
|
|
1924
|
-
left: "50%",
|
|
1925
|
-
transform: "translateX(-50%)",
|
|
1926
|
-
width: 250,
|
|
1927
|
-
height: 50,
|
|
1928
|
-
p: 2,
|
|
1929
|
-
borderRadius: "8px",
|
|
1930
|
-
display: "flex",
|
|
1931
|
-
alignItems: "center",
|
|
1932
|
-
justifyContent: "center",
|
|
1933
|
-
backgroundColor: d ? "#d32f2f" : "#ef5350",
|
|
1934
|
-
color: "white",
|
|
1935
|
-
zIndex: 3e3,
|
|
1936
|
-
transition: "background-color 0.2s"
|
|
1937
|
-
},
|
|
1938
|
-
children: [
|
|
1939
|
-
/* @__PURE__ */ e(z, { icon: Tr, style: { marginRight: "10px" } }),
|
|
1940
|
-
/* @__PURE__ */ e(v, { variant: "body1", children: d ? "Release to Delete" : "Drag Here to Delete" })
|
|
1941
|
-
]
|
|
1942
|
-
}
|
|
1943
|
-
) : null;
|
|
1944
|
-
};
|
|
1945
|
-
Ht.propTypes = {
|
|
1946
|
-
isDraggingSortable: h.any
|
|
1947
|
-
};
|
|
1948
|
-
const zt = ({ activeComponent: o, onUpdate: c, onDeselect: d, mobileQueries: b }) => {
|
|
1949
|
-
if (!o)
|
|
1950
|
-
return /* @__PURE__ */ p(
|
|
1951
|
-
xe,
|
|
1952
|
-
{
|
|
1953
|
-
sx: {
|
|
1954
|
-
p: 1,
|
|
1955
|
-
backgroundColor: "var(--color-gray4)",
|
|
1956
|
-
textAlign: "center"
|
|
1957
|
-
},
|
|
1958
|
-
children: [
|
|
1959
|
-
/* @__PURE__ */ e(v, { variant: "subtitle1", sx: { fontWeight: "bold", mb: 1, color: "var(--color-text)" }, children: "Component Configuration" }),
|
|
1960
|
-
/* @__PURE__ */ e(ot, { sx: { mb: 1 } }),
|
|
1961
|
-
/* @__PURE__ */ p(v, { variant: "body1", children: [
|
|
1962
|
-
"To add or edit ",
|
|
1963
|
-
/* @__PURE__ */ e("b", { children: "Section Title" }),
|
|
1964
|
-
" or ",
|
|
1965
|
-
/* @__PURE__ */ e("b", { children: "Search Bar Query Name" }),
|
|
1966
|
-
":"
|
|
1967
|
-
] }),
|
|
1968
|
-
/* @__PURE__ */ p(N, { sx: { display: "flex", alignItems: "center", justifyContent: "center", mb: 1 }, children: [
|
|
1969
|
-
/* @__PURE__ */ e(v, { variant: "body1", color: "primary", children: "Right-Click" }),
|
|
1970
|
-
/* @__PURE__ */ e(v, { variant: "body1", sx: { ml: 1 }, children: "on the selected component card" })
|
|
1971
|
-
] }),
|
|
1972
|
-
/* @__PURE__ */ e(v, { variant: "caption", color: "textSecondary", children: "This will open the menu to access the **Configuration Panel**." })
|
|
1973
|
-
]
|
|
1974
|
-
}
|
|
1975
|
-
);
|
|
1976
|
-
if (o.type === "SEARCH_BAR") {
|
|
1977
|
-
const E = b.map((u) => u.code);
|
|
1978
|
-
if (o.type === "SEARCH_BAR")
|
|
1979
|
-
return /* @__PURE__ */ p(xe, { sx: { p: 2, height: "100%" }, children: [
|
|
1980
|
-
/* @__PURE__ */ e(v, { variant: "h6", sx: { mb: 2 }, children: "Search Bar Configuration" }),
|
|
1981
|
-
/* @__PURE__ */ e(
|
|
1982
|
-
mr,
|
|
1983
|
-
{
|
|
1984
|
-
disablePortal: !0,
|
|
1985
|
-
id: "query-name-autocomplete",
|
|
1986
|
-
options: E,
|
|
1987
|
-
size: "small",
|
|
1988
|
-
fullWidth: !0,
|
|
1989
|
-
sx: { mb: 2 },
|
|
1990
|
-
value: o.queryName || null,
|
|
1991
|
-
onChange: (u, y) => {
|
|
1992
|
-
c(o.id, "queryName", y || "");
|
|
1993
|
-
},
|
|
1994
|
-
renderInput: (u) => /* @__PURE__ */ e(Qe, { ...u, label: "Query Code", variant: "outlined", placeholder: "Select or search query code" })
|
|
1995
|
-
}
|
|
1996
|
-
),
|
|
1997
|
-
/* @__PURE__ */ e(Ge, { onClick: d, variant: "outlined", color: "gray", children: "Close" })
|
|
1998
|
-
] });
|
|
1999
|
-
}
|
|
2000
|
-
return o.type === "SECTION" ? /* @__PURE__ */ p(xe, { sx: { p: 2, height: "100%" }, children: [
|
|
2001
|
-
/* @__PURE__ */ e(v, { variant: "h6", sx: { mb: 2 }, children: "Section Configuration" }),
|
|
2002
|
-
/* @__PURE__ */ e(
|
|
2003
|
-
Qe,
|
|
2004
|
-
{
|
|
2005
|
-
label: "Section Title",
|
|
2006
|
-
variant: "outlined",
|
|
2007
|
-
fullWidth: !0,
|
|
2008
|
-
value: o.title || "",
|
|
2009
|
-
onChange: (E) => c(o.id, "title", E.target.value),
|
|
2010
|
-
sx: { mb: 2 }
|
|
2011
|
-
}
|
|
2012
|
-
),
|
|
2013
|
-
/* @__PURE__ */ e(Ge, { onClick: d, variant: "outlined", color: "gray", children: "Close" })
|
|
2014
|
-
] }) : null;
|
|
2015
|
-
};
|
|
2016
|
-
zt.propTypes = {
|
|
2017
|
-
activeComponent: h.any,
|
|
2018
|
-
onUpdate: h.any,
|
|
2019
|
-
onDeselect: h.any,
|
|
2020
|
-
mobileQueries: h.any
|
|
2021
|
-
};
|
|
2022
|
-
function st({ svg: o }) {
|
|
2023
|
-
const [c, d] = _("");
|
|
2024
|
-
return Ke(() => {
|
|
2025
|
-
if (o) {
|
|
2026
|
-
const u = new DOMParser().parseFromString(o, "image/svg+xml").documentElement;
|
|
2027
|
-
if (!u.getAttribute("viewBox")) {
|
|
2028
|
-
const F = u.getAttribute("width") || "512", Q = u.getAttribute("height") || "512";
|
|
2029
|
-
u.setAttribute("viewBox", `0 0 ${F} ${Q}`);
|
|
2030
|
-
}
|
|
2031
|
-
u.removeAttribute("width"), u.removeAttribute("height"), u.setAttribute("style", "width: 100%; height: 100%;");
|
|
2032
|
-
const R = new XMLSerializer().serializeToString(u);
|
|
2033
|
-
d(R);
|
|
2034
|
-
}
|
|
2035
|
-
}, [o]), /* @__PURE__ */ e(
|
|
2036
|
-
pr,
|
|
2037
|
-
{
|
|
2038
|
-
size: 2,
|
|
2039
|
-
sx: {
|
|
2040
|
-
alignItems: "center",
|
|
2041
|
-
alignSelf: "center",
|
|
2042
|
-
height: "40px",
|
|
2043
|
-
width: "40px",
|
|
2044
|
-
display: "flex",
|
|
2045
|
-
justifyContent: "center",
|
|
2046
|
-
textAlign: "center",
|
|
2047
|
-
backgroundColor: "",
|
|
2048
|
-
borderRadius: "3%",
|
|
2049
|
-
transition: "background-color 0.3s ease",
|
|
2050
|
-
"&:hover": {
|
|
2051
|
-
backgroundColor: "var(--color-gray3)",
|
|
2052
|
-
cursor: "pointer"
|
|
2053
|
-
},
|
|
2054
|
-
overflow: "hidden"
|
|
2055
|
-
},
|
|
2056
|
-
children: /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: c } })
|
|
2057
|
-
}
|
|
2058
|
-
);
|
|
2059
|
-
}
|
|
2060
|
-
st.propTypes = {
|
|
2061
|
-
svg: h.string.isRequired
|
|
2062
|
-
};
|
|
2063
|
-
const Ee = (o, c = "36px") => {
|
|
2064
|
-
let d = null;
|
|
2065
|
-
if (typeof o == "object" && o !== null ? o.type === "svg" && typeof o.content == "string" ? d = o.content : typeof o.svg == "string" && (d = o.svg) : typeof o == "string" && (d = o), typeof d == "string" && d.includes("<svg")) {
|
|
2066
|
-
const b = d.match(/<svg[\s\S]*<\/svg>/i);
|
|
2067
|
-
b && (d = b[0]);
|
|
2068
|
-
}
|
|
2069
|
-
return d ? /* @__PURE__ */ e(
|
|
2070
|
-
N,
|
|
2071
|
-
{
|
|
2072
|
-
sx: {
|
|
2073
|
-
height: c,
|
|
2074
|
-
width: c,
|
|
2075
|
-
display: "flex",
|
|
2076
|
-
justifyContent: "center",
|
|
2077
|
-
alignItems: "center"
|
|
2078
|
-
},
|
|
2079
|
-
children: /* @__PURE__ */ e(st, { svg: d })
|
|
2080
|
-
}
|
|
2081
|
-
) : /* @__PURE__ */ e(
|
|
2082
|
-
N,
|
|
2083
|
-
{
|
|
2084
|
-
sx: {
|
|
2085
|
-
fontSize: "1.2rem",
|
|
2086
|
-
color: "var(--color-gray3)",
|
|
2087
|
-
border: "1px solid",
|
|
2088
|
-
borderRadius: "50%",
|
|
2089
|
-
height: "36px",
|
|
2090
|
-
width: "36px",
|
|
2091
|
-
display: "flex",
|
|
2092
|
-
alignItems: "center",
|
|
2093
|
-
justifyContent: "center",
|
|
2094
|
-
marginBottom: "4px"
|
|
2095
|
-
},
|
|
2096
|
-
children: "?"
|
|
2097
|
-
}
|
|
2098
|
-
);
|
|
2099
|
-
}, et = ({ feature: o, isGroupMember: c = !1 }) => /* @__PURE__ */ p(
|
|
2100
|
-
N,
|
|
2101
|
-
{
|
|
2102
|
-
sx: {
|
|
2103
|
-
width: "fit-content",
|
|
2104
|
-
p: "10px",
|
|
2105
|
-
pl: c ? "20px" : "10px",
|
|
2106
|
-
backgroundColor: "var(--color-background2)",
|
|
2107
|
-
border: "1px solid var(--color-gray3)",
|
|
2108
|
-
borderRadius: "4px",
|
|
2109
|
-
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
|
|
2110
|
-
cursor: "grab",
|
|
2111
|
-
display: "flex",
|
|
2112
|
-
alignItems: "center",
|
|
2113
|
-
transition: "all 0.1s",
|
|
2114
|
-
mt: "4px",
|
|
2115
|
-
"&:hover": {
|
|
2116
|
-
backgroundColor: "var(--color-gray4)",
|
|
2117
|
-
borderColor: "var(--color-gray3)"
|
|
2118
|
-
}
|
|
2119
|
-
},
|
|
2120
|
-
children: [
|
|
2121
|
-
((b, E) => {
|
|
2122
|
-
const u = Ee(o.icon, "18px");
|
|
2123
|
-
return u && u.type === N ? K.cloneElement(u, {
|
|
2124
|
-
sx: {
|
|
2125
|
-
...u.props.sx,
|
|
2126
|
-
height: "18px",
|
|
2127
|
-
width: "18px",
|
|
2128
|
-
marginRight: "8px"
|
|
2129
|
-
}
|
|
2130
|
-
}) : /* @__PURE__ */ e(N, { sx: { mr: "8px", display: "flex", alignItems: "center" }, children: Ee(b, E) });
|
|
2131
|
-
})(o.icon, "18px"),
|
|
2132
|
-
/* @__PURE__ */ e(v, { variant: "body2", sx: { fontWeight: "normal", color: "#333" }, children: o == null ? void 0 : o.name })
|
|
2133
|
-
]
|
|
2134
|
-
}
|
|
2135
|
-
);
|
|
2136
|
-
et.propTypes = {
|
|
2137
|
-
feature: h.any,
|
|
2138
|
-
isGroupMember: h.any
|
|
2139
|
-
};
|
|
2140
|
-
const tt = ({ item: o, COMPONENT_TYPES: c, activeGroupId: d, onGroupToggle: b }) => {
|
|
2141
|
-
const E = d === o.uuid, u = (y) => {
|
|
2142
|
-
y.stopPropagation();
|
|
2143
|
-
};
|
|
2144
|
-
return o.type !== "GROUP" ? /* @__PURE__ */ e(we, { id: o.uuid, componentType: c.FEATURE, dragData: o, children: /* @__PURE__ */ e(I, { item: !0, xs: 12, children: /* @__PURE__ */ e(et, { feature: o }) }, o.id) }, o.uuid) : /* @__PURE__ */ p(
|
|
2145
|
-
Ye,
|
|
2146
|
-
{
|
|
2147
|
-
sx: {
|
|
2148
|
-
m: 0,
|
|
2149
|
-
"&:before": { display: "none" },
|
|
2150
|
-
boxShadow: "none",
|
|
2151
|
-
border: "1px solid var(--color-gray3)",
|
|
2152
|
-
mb: 1,
|
|
2153
|
-
borderRadius: "4px!important"
|
|
2154
|
-
},
|
|
2155
|
-
expanded: E,
|
|
2156
|
-
onChange: () => b(o.uuid),
|
|
2157
|
-
disableGutters: !0,
|
|
2158
|
-
children: [
|
|
2159
|
-
/* @__PURE__ */ e(
|
|
2160
|
-
Je,
|
|
2161
|
-
{
|
|
2162
|
-
expandIcon: /* @__PURE__ */ e(N, { sx: { p: 1 }, onMouseDown: u, onTouchStart: u, children: /* @__PURE__ */ e(
|
|
2163
|
-
X,
|
|
2164
|
-
{
|
|
2165
|
-
iconName: "faChevronDown",
|
|
2166
|
-
style: {
|
|
2167
|
-
fontSize: "1rem",
|
|
2168
|
-
color: "var(--color-text)",
|
|
2169
|
-
transform: E ? "rotate(360deg)" : "rotate(0deg)",
|
|
2170
|
-
transition: "transform 0.2s"
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
) }),
|
|
2174
|
-
sx: {
|
|
2175
|
-
minHeight: "15px",
|
|
2176
|
-
backgroundColor: "#e3f2fd",
|
|
2177
|
-
borderBottom: "1px solid #bbdefb",
|
|
2178
|
-
cursor: "grab",
|
|
2179
|
-
"&:hover": { backgroundColor: "#c5e3f8" },
|
|
2180
|
-
"& .MuiAccordionSummary-content": { margin: "0" },
|
|
2181
|
-
p: "0 10px"
|
|
2182
|
-
},
|
|
2183
|
-
children: /* @__PURE__ */ p(N, { sx: { display: "flex", alignItems: "center", width: "100%" }, children: [
|
|
2184
|
-
/* @__PURE__ */ e(
|
|
2185
|
-
we,
|
|
2186
|
-
{
|
|
2187
|
-
id: o.uuid,
|
|
2188
|
-
componentType: c.GROUP,
|
|
2189
|
-
dragData: o,
|
|
2190
|
-
children: /* @__PURE__ */ e(
|
|
2191
|
-
N,
|
|
2192
|
-
{
|
|
2193
|
-
component: "span",
|
|
2194
|
-
sx: { cursor: "grab", mr: 1, px: 0.5, "&:hover": { color: "#007bff" } },
|
|
2195
|
-
onClick: (y) => y.stopPropagation(),
|
|
2196
|
-
onMouseDown: (y) => y.stopPropagation(),
|
|
2197
|
-
onTouchStart: (y) => y.stopPropagation(),
|
|
2198
|
-
children: /* @__PURE__ */ e(X, { iconName: "faBars", style: { fontSize: "0.8rem", color: "var(--color-text)" } })
|
|
2199
|
-
}
|
|
2200
|
-
)
|
|
2201
|
-
},
|
|
2202
|
-
`drag-handle-${o.uuid}`
|
|
2203
|
-
),
|
|
2204
|
-
/* @__PURE__ */ p(v, { variant: "subtitle2", sx: { fontWeight: "bold", color: "var(--color-text)", flexGrow: 1 }, children: [
|
|
2205
|
-
o.name,
|
|
2206
|
-
" (",
|
|
2207
|
-
o.menus.length,
|
|
2208
|
-
")"
|
|
2209
|
-
] })
|
|
2210
|
-
] })
|
|
2211
|
-
}
|
|
2212
|
-
),
|
|
2213
|
-
/* @__PURE__ */ e(Xe, { sx: { p: "8px", pt: 1, backgroundColor: "var(--color-gray4)" }, children: /* @__PURE__ */ e(I, { container: !0, spacing: 0.5, children: o.menus.map((y) => /* @__PURE__ */ e(
|
|
2214
|
-
we,
|
|
2215
|
-
{
|
|
2216
|
-
id: y.uuid,
|
|
2217
|
-
componentType: c.FEATURE,
|
|
2218
|
-
dragData: y,
|
|
2219
|
-
children: /* @__PURE__ */ e(I, { item: !0, xs: 12, children: /* @__PURE__ */ e(et, { feature: y, isGroupMember: !0 }) }, y.id)
|
|
2220
|
-
},
|
|
2221
|
-
y.uuid
|
|
2222
|
-
)) }) })
|
|
2223
|
-
]
|
|
2224
|
-
},
|
|
2225
|
-
o.uuid
|
|
2226
|
-
);
|
|
2227
|
-
};
|
|
2228
|
-
tt.propTypes = {
|
|
2229
|
-
item: h.any,
|
|
2230
|
-
COMPONENT_TYPES: h.any,
|
|
2231
|
-
activeGroupId: h.any,
|
|
2232
|
-
onGroupToggle: h.any
|
|
2233
|
-
};
|
|
2234
|
-
export {
|
|
2235
|
-
cn as default
|
|
2236
|
-
};
|
|
2237
|
-
//# sourceMappingURL=AddMenuConfiguration-DsnY0Rws.js.map
|