componentes-sinco 1.0.4 → 1.0.6
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/create-KZGO2OZA.svg +18 -0
- package/dist/empty-3NEKE7WO.svg +13 -0
- package/dist/error-RUCZUXDN.svg +5 -0
- package/dist/index.cjs +4387 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +43 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +464 -0
- package/dist/index.d.ts +464 -0
- package/dist/index.js +4327 -0
- package/dist/index.js.map +1 -0
- package/dist/search-OKSCVF2W.svg +12 -0
- package/package.json +3 -2
package/dist/index.js
ADDED
|
@@ -0,0 +1,4327 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/Components/Drawer/SCDrawer.tsx
|
|
34
|
+
import React7 from "react";
|
|
35
|
+
import { Box as Box7, Drawer, Typography as Typography7, IconButton as IconButton5, Button as Button4, Stack as Stack3, Chip as Chip2 } from "@mui/material";
|
|
36
|
+
import Grid4 from "@mui/material/Grid2";
|
|
37
|
+
import CloseIcon from "@mui/icons-material/Close";
|
|
38
|
+
|
|
39
|
+
// src/Components/Textfield/SCTextField.tsx
|
|
40
|
+
import React, { useEffect, useState } from "react";
|
|
41
|
+
import { FormControl, IconButton, InputAdornment, InputLabel, OutlinedInput, FilledInput, Popover, Input, Box, Typography, SvgIcon, Tooltip } from "@mui/material";
|
|
42
|
+
import Grid from "@mui/material/Grid2";
|
|
43
|
+
import { Visibility, VisibilityOff, InfoOutlined } from "@mui/icons-material";
|
|
44
|
+
|
|
45
|
+
// src/Components/Textfield/Helpers/validateIcon.tsx
|
|
46
|
+
import * as Muicon from "@mui/icons-material";
|
|
47
|
+
function getIconComponent(name) {
|
|
48
|
+
if (typeof name !== "string") return name;
|
|
49
|
+
return name in Muicon ? Muicon[name] : void 0;
|
|
50
|
+
}
|
|
51
|
+
function getIconValidation(name) {
|
|
52
|
+
if (typeof name !== "string") {
|
|
53
|
+
return (name == null ? void 0 : name.type) ? "icon" : "text";
|
|
54
|
+
}
|
|
55
|
+
return name in Muicon ? "icon" : "text";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/Components/Textfield/Helpers/validateKeyDown.tsx
|
|
59
|
+
function validateKeyDown(event2, format2) {
|
|
60
|
+
const key = event2.key;
|
|
61
|
+
const target = event2.target;
|
|
62
|
+
if (format2 === "int" && !/^[0-9]$/.test(key)) {
|
|
63
|
+
event2.preventDefault();
|
|
64
|
+
}
|
|
65
|
+
if (format2 === "decimal" && (target.value === "" && key === "." || key === "-" || key === "+")) {
|
|
66
|
+
event2.preventDefault();
|
|
67
|
+
}
|
|
68
|
+
if (target.type === "text") {
|
|
69
|
+
const regex = /^[a-zA-ZáéíóúÁÉÍÓÚñÑ0-9\s_\-.,@]+$/;
|
|
70
|
+
if (!regex.test(key)) {
|
|
71
|
+
event2.preventDefault();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/Components/Textfield/Helpers/validateOnBlur.tsx
|
|
77
|
+
var validateOnBlurField = ({
|
|
78
|
+
state,
|
|
79
|
+
required = false,
|
|
80
|
+
setError,
|
|
81
|
+
onBlur
|
|
82
|
+
}) => (event2) => {
|
|
83
|
+
const isError = !state.trim() && required;
|
|
84
|
+
setError(isError);
|
|
85
|
+
if (onBlur) {
|
|
86
|
+
onBlur(event2);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
// src/Components/Textfield/SCTextField.tsx
|
|
91
|
+
var SCTextField = ({
|
|
92
|
+
//informativas
|
|
93
|
+
title,
|
|
94
|
+
iconTitle,
|
|
95
|
+
infoTitle,
|
|
96
|
+
label = "",
|
|
97
|
+
placeholder = "",
|
|
98
|
+
infoElement,
|
|
99
|
+
iconInputStart,
|
|
100
|
+
iconInputEnd,
|
|
101
|
+
maxLength,
|
|
102
|
+
//Apariencia
|
|
103
|
+
variant = "outlined",
|
|
104
|
+
format: format2,
|
|
105
|
+
disabled,
|
|
106
|
+
required,
|
|
107
|
+
size,
|
|
108
|
+
width = "100%",
|
|
109
|
+
color,
|
|
110
|
+
background,
|
|
111
|
+
//Funcionales
|
|
112
|
+
setState,
|
|
113
|
+
state,
|
|
114
|
+
onChange,
|
|
115
|
+
onBlur,
|
|
116
|
+
onKeyDown
|
|
117
|
+
}) => {
|
|
118
|
+
const inputComponents = {
|
|
119
|
+
outlined: OutlinedInput,
|
|
120
|
+
filled: FilledInput,
|
|
121
|
+
standard: Input
|
|
122
|
+
};
|
|
123
|
+
const InputComponent = inputComponents[variant] || OutlinedInput;
|
|
124
|
+
let IconInputStartValidation;
|
|
125
|
+
let IconInputEndValidation;
|
|
126
|
+
let IconInputStart;
|
|
127
|
+
let IconInputEnd;
|
|
128
|
+
let IconTitle;
|
|
129
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
130
|
+
const [error, setError] = useState(false);
|
|
131
|
+
const [anchorInfoTitle, setAnchorInfoTitle] = useState(null);
|
|
132
|
+
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
133
|
+
const [anchorInfoElement, setAnchorInfoElement] = useState(null);
|
|
134
|
+
const openInfoElement = Boolean(anchorInfoElement);
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
if (error) {
|
|
137
|
+
setTimeout(() => {
|
|
138
|
+
setError(false);
|
|
139
|
+
}, 1e3);
|
|
140
|
+
}
|
|
141
|
+
}, [error]);
|
|
142
|
+
if (iconInputStart) {
|
|
143
|
+
IconInputStartValidation = getIconValidation(iconInputStart);
|
|
144
|
+
IconInputStart = getIconComponent(iconInputStart);
|
|
145
|
+
}
|
|
146
|
+
if (iconInputEnd) {
|
|
147
|
+
IconInputEndValidation = getIconValidation(iconInputEnd);
|
|
148
|
+
IconInputEnd = getIconComponent(iconInputEnd);
|
|
149
|
+
}
|
|
150
|
+
if (iconTitle) {
|
|
151
|
+
IconTitle = getIconComponent(iconTitle);
|
|
152
|
+
}
|
|
153
|
+
const handleClickShowPassword = () => setShowPassword((show) => !show);
|
|
154
|
+
const handleMouseDownPassword = (event2) => {
|
|
155
|
+
event2.preventDefault();
|
|
156
|
+
};
|
|
157
|
+
const handleKeyDown = (event2) => {
|
|
158
|
+
validateKeyDown(event2, format2);
|
|
159
|
+
if (onKeyDown) onKeyDown(event2);
|
|
160
|
+
};
|
|
161
|
+
const handleInputChange = (event2) => {
|
|
162
|
+
let valueMax = maxLength ? maxLength + 1 : 50;
|
|
163
|
+
if (event2.target.value.length < valueMax) {
|
|
164
|
+
if (setState) {
|
|
165
|
+
setState(event2.target.value);
|
|
166
|
+
}
|
|
167
|
+
if (onChange) {
|
|
168
|
+
onChange(event2);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const handleBlur = validateOnBlurField({ state, required, setError, onBlur });
|
|
173
|
+
const handleOpenInfoTitle = (event2) => {
|
|
174
|
+
setAnchorInfoTitle(event2.currentTarget);
|
|
175
|
+
};
|
|
176
|
+
const handleCloseInfoTitle = () => {
|
|
177
|
+
setAnchorInfoTitle(null);
|
|
178
|
+
};
|
|
179
|
+
const handleOpenInfoElement = (event2) => {
|
|
180
|
+
setAnchorInfoElement(event2.currentTarget);
|
|
181
|
+
};
|
|
182
|
+
const handleCloseInfoElement = () => {
|
|
183
|
+
setAnchorInfoElement(null);
|
|
184
|
+
};
|
|
185
|
+
return /* @__PURE__ */ React.createElement(Box, { sx: { width } }, /* @__PURE__ */ React.createElement(Grid, { container: true, alignItems: "center", mb: 1.25, gap: 0.5 }, iconTitle && IconTitle ? /* @__PURE__ */ React.createElement(SvgIcon, { color: "action", fontSize: "small", component: IconTitle }) : "", title ? /* @__PURE__ */ React.createElement(Typography, { mx: 0.5, variant: "subtitle2", color: "text.secondary" }, title) : "", infoTitle ? /* @__PURE__ */ React.createElement(React.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
186
|
+
InfoOutlined,
|
|
187
|
+
{
|
|
188
|
+
color: "action",
|
|
189
|
+
fontSize: "small",
|
|
190
|
+
onMouseEnter: (event2) => handleOpenInfoTitle(event2),
|
|
191
|
+
onMouseLeave: () => handleCloseInfoTitle()
|
|
192
|
+
}
|
|
193
|
+
), /* @__PURE__ */ React.createElement(
|
|
194
|
+
Popover,
|
|
195
|
+
{
|
|
196
|
+
sx: {
|
|
197
|
+
pointerEvents: "none",
|
|
198
|
+
"& .MuiBackdrop-root": {
|
|
199
|
+
backgroundColor: "transparent"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
open: openInfoTitle,
|
|
203
|
+
anchorEl: anchorInfoTitle,
|
|
204
|
+
onClose: handleCloseInfoTitle,
|
|
205
|
+
anchorOrigin: {
|
|
206
|
+
vertical: "bottom",
|
|
207
|
+
horizontal: "left"
|
|
208
|
+
},
|
|
209
|
+
transformOrigin: {
|
|
210
|
+
vertical: "top",
|
|
211
|
+
horizontal: "left"
|
|
212
|
+
},
|
|
213
|
+
disableRestoreFocus: true
|
|
214
|
+
},
|
|
215
|
+
/* @__PURE__ */ React.createElement(Typography, { p: 2 }, infoTitle.text)
|
|
216
|
+
)) : /* @__PURE__ */ React.createElement(Tooltip, { title: infoTitle.text, "data-testid": "test-infoTitle", placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React.createElement(
|
|
217
|
+
InfoOutlined,
|
|
218
|
+
{
|
|
219
|
+
color: "action",
|
|
220
|
+
fontSize: "small"
|
|
221
|
+
}
|
|
222
|
+
))) : ""), /* @__PURE__ */ React.createElement(Grid, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ React.createElement(
|
|
223
|
+
FormControl,
|
|
224
|
+
{
|
|
225
|
+
color,
|
|
226
|
+
fullWidth: true,
|
|
227
|
+
size: size ? size : "medium",
|
|
228
|
+
variant,
|
|
229
|
+
sx: { background: background || "transparent", borderRadius: "4px" }
|
|
230
|
+
},
|
|
231
|
+
/* @__PURE__ */ React.createElement(
|
|
232
|
+
InputLabel,
|
|
233
|
+
{
|
|
234
|
+
"data-testid": "test-label",
|
|
235
|
+
htmlFor: "",
|
|
236
|
+
required: required && label !== "" ? true : false,
|
|
237
|
+
error,
|
|
238
|
+
disabled: disabled || false
|
|
239
|
+
},
|
|
240
|
+
label ? label : ""
|
|
241
|
+
),
|
|
242
|
+
/* @__PURE__ */ React.createElement(
|
|
243
|
+
InputComponent,
|
|
244
|
+
{
|
|
245
|
+
size: size ? size : "medium",
|
|
246
|
+
fullWidth: true,
|
|
247
|
+
value: state,
|
|
248
|
+
error,
|
|
249
|
+
id: label == null ? void 0 : label.replace(/\s+/g, ""),
|
|
250
|
+
disabled: disabled != null ? disabled : false,
|
|
251
|
+
onKeyDown: handleKeyDown,
|
|
252
|
+
onChange: handleInputChange,
|
|
253
|
+
onBlur: handleBlur,
|
|
254
|
+
inputProps: { maxLength: maxLength ? maxLength : 50 },
|
|
255
|
+
type: !showPassword && format2 === "password" ? "password" : (format2 || "text").toUpperCase() === "INT" || (format2 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
|
|
256
|
+
className: format2 === "password" && !showPassword ? "" : "",
|
|
257
|
+
placeholder,
|
|
258
|
+
startAdornment: iconInputStart ? /* @__PURE__ */ React.createElement(InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ React.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
|
|
259
|
+
endAdornment: /* @__PURE__ */ React.createElement(InputAdornment, { position: "end" }, format2 === "password" ? /* @__PURE__ */ React.createElement(
|
|
260
|
+
IconButton,
|
|
261
|
+
{
|
|
262
|
+
"aria-label": "toggle password visibility",
|
|
263
|
+
onClick: handleClickShowPassword,
|
|
264
|
+
onMouseDown: handleMouseDownPassword,
|
|
265
|
+
edge: "end"
|
|
266
|
+
},
|
|
267
|
+
showPassword ? /* @__PURE__ */ React.createElement(VisibilityOff, null) : /* @__PURE__ */ React.createElement(Visibility, null)
|
|
268
|
+
) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
269
|
+
InfoOutlined,
|
|
270
|
+
{
|
|
271
|
+
"data-testid": "test-infoElement",
|
|
272
|
+
sx: { ml: 0.5 },
|
|
273
|
+
color: "action",
|
|
274
|
+
fontSize: "small",
|
|
275
|
+
component: "svg",
|
|
276
|
+
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
277
|
+
onMouseLeave: () => handleCloseInfoElement()
|
|
278
|
+
}
|
|
279
|
+
), /* @__PURE__ */ React.createElement(
|
|
280
|
+
Popover,
|
|
281
|
+
{
|
|
282
|
+
sx: {
|
|
283
|
+
pointerEvents: "none",
|
|
284
|
+
"& .MuiBackdrop-root": {
|
|
285
|
+
backgroundColor: "transparent"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
open: openInfoElement,
|
|
289
|
+
anchorEl: anchorInfoElement,
|
|
290
|
+
onClose: handleCloseInfoElement,
|
|
291
|
+
anchorOrigin: {
|
|
292
|
+
vertical: "bottom",
|
|
293
|
+
horizontal: "left"
|
|
294
|
+
},
|
|
295
|
+
transformOrigin: {
|
|
296
|
+
vertical: "top",
|
|
297
|
+
horizontal: "left"
|
|
298
|
+
},
|
|
299
|
+
disableRestoreFocus: true
|
|
300
|
+
},
|
|
301
|
+
/* @__PURE__ */ React.createElement(Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
302
|
+
)) : /* @__PURE__ */ React.createElement(Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React.createElement(
|
|
303
|
+
InfoOutlined,
|
|
304
|
+
{
|
|
305
|
+
color: "action",
|
|
306
|
+
fontSize: "small"
|
|
307
|
+
}
|
|
308
|
+
))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ React.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
|
|
309
|
+
label: label ? label + (format2 === "password" && !showPassword ? "" : "") : "",
|
|
310
|
+
autoComplete: format2 === "password" ? "new-password" : "off"
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
), (iconInputEnd !== void 0 || format2 === "password") && infoElement ? /* @__PURE__ */ React.createElement(React.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
314
|
+
InfoOutlined,
|
|
315
|
+
{
|
|
316
|
+
"data-testid": "test-infoElement",
|
|
317
|
+
component: "svg",
|
|
318
|
+
sx: { marginLeft: "4px" },
|
|
319
|
+
color: "action",
|
|
320
|
+
fontSize: "small",
|
|
321
|
+
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
322
|
+
onMouseLeave: handleCloseInfoElement
|
|
323
|
+
}
|
|
324
|
+
), /* @__PURE__ */ React.createElement(
|
|
325
|
+
Popover,
|
|
326
|
+
{
|
|
327
|
+
sx: { pointerEvents: "none" },
|
|
328
|
+
open: openInfoElement,
|
|
329
|
+
anchorEl: anchorInfoElement,
|
|
330
|
+
onClose: handleCloseInfoElement,
|
|
331
|
+
anchorOrigin: {
|
|
332
|
+
vertical: "bottom",
|
|
333
|
+
horizontal: "left"
|
|
334
|
+
},
|
|
335
|
+
transformOrigin: {
|
|
336
|
+
vertical: "top",
|
|
337
|
+
horizontal: "left"
|
|
338
|
+
},
|
|
339
|
+
disableRestoreFocus: true
|
|
340
|
+
},
|
|
341
|
+
/* @__PURE__ */ React.createElement(Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
342
|
+
)) : /* @__PURE__ */ React.createElement(Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React.createElement(
|
|
343
|
+
InfoOutlined,
|
|
344
|
+
{
|
|
345
|
+
sx: { marginLeft: "4px" },
|
|
346
|
+
color: "action",
|
|
347
|
+
fontSize: "small"
|
|
348
|
+
}
|
|
349
|
+
))) : ""));
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
353
|
+
import React2, { useEffect as useEffect3, useState as useState3 } from "react";
|
|
354
|
+
import { Stack, LinearProgress, Divider, Box as Box2, Typography as Typography2, IconButton as IconButton2, Button } from "@mui/material";
|
|
355
|
+
import { Close, InfoRounded, CheckCircleRounded, WarningRounded, ErrorRounded, KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material";
|
|
356
|
+
|
|
357
|
+
// src/Components/ToastNotification/useProgress.ts
|
|
358
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
359
|
+
var useProgress = (timeProgress, lote) => {
|
|
360
|
+
const [progress, setProgress] = useState2(0);
|
|
361
|
+
useEffect2(() => {
|
|
362
|
+
const interval = setInterval(() => {
|
|
363
|
+
setProgress((prev) => {
|
|
364
|
+
if (prev >= 100) {
|
|
365
|
+
clearInterval(interval);
|
|
366
|
+
}
|
|
367
|
+
if (lote) {
|
|
368
|
+
const nextProgress = prev + lote;
|
|
369
|
+
return nextProgress <= 100 ? nextProgress : 100;
|
|
370
|
+
} else {
|
|
371
|
+
return prev + 1;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}, timeProgress * 10);
|
|
375
|
+
return () => {
|
|
376
|
+
clearInterval(interval);
|
|
377
|
+
};
|
|
378
|
+
}, [timeProgress, lote]);
|
|
379
|
+
return {
|
|
380
|
+
progress
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
var ToastProgress = (timeProgress) => {
|
|
384
|
+
const [progress, setProgress] = useState2(100);
|
|
385
|
+
useEffect2(() => {
|
|
386
|
+
const interval = setInterval(() => {
|
|
387
|
+
setProgress((prev) => {
|
|
388
|
+
if (prev <= 0) {
|
|
389
|
+
clearInterval(interval);
|
|
390
|
+
}
|
|
391
|
+
return prev - 1;
|
|
392
|
+
});
|
|
393
|
+
}, timeProgress * 10);
|
|
394
|
+
return () => {
|
|
395
|
+
clearInterval(interval);
|
|
396
|
+
};
|
|
397
|
+
}, [timeProgress]);
|
|
398
|
+
return {
|
|
399
|
+
progressToast: progress
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
404
|
+
var SCToastNotification = (toast) => {
|
|
405
|
+
var _a;
|
|
406
|
+
const [stateOptions, setStateOptions] = useState3(true);
|
|
407
|
+
const [stateToast, setStateToast] = useState3(true);
|
|
408
|
+
const timeProgress = toast.time || 10;
|
|
409
|
+
const { progress } = useProgress(timeProgress);
|
|
410
|
+
const toastColorConfig = toast.type || "info";
|
|
411
|
+
const toastIconOption = {
|
|
412
|
+
success: /* @__PURE__ */ React2.createElement(CheckCircleRounded, { color: "success" }),
|
|
413
|
+
error: /* @__PURE__ */ React2.createElement(ErrorRounded, { color: "error" }),
|
|
414
|
+
warning: /* @__PURE__ */ React2.createElement(WarningRounded, { color: "warning" }),
|
|
415
|
+
info: /* @__PURE__ */ React2.createElement(InfoRounded, { color: "info" })
|
|
416
|
+
};
|
|
417
|
+
const acciones = [...toast.actions || [{ text: "Action", fn: () => {
|
|
418
|
+
alert("");
|
|
419
|
+
} }, { text: "Consultar", fn: () => {
|
|
420
|
+
} }]];
|
|
421
|
+
const ToastIconConfig = toastIconOption[toast.type];
|
|
422
|
+
const closeToast = () => {
|
|
423
|
+
setStateToast(false);
|
|
424
|
+
};
|
|
425
|
+
const toggleToastOptions = () => {
|
|
426
|
+
setStateOptions((prevShowOptions) => !prevShowOptions);
|
|
427
|
+
};
|
|
428
|
+
useEffect3(() => {
|
|
429
|
+
progress >= 100 && setStateToast(false);
|
|
430
|
+
}, [progress]);
|
|
431
|
+
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, stateToast && /* @__PURE__ */ React2.createElement(
|
|
432
|
+
Stack,
|
|
433
|
+
{
|
|
434
|
+
position: "fixed",
|
|
435
|
+
zIndex: 1400,
|
|
436
|
+
right: 16,
|
|
437
|
+
top: 16,
|
|
438
|
+
width: 370,
|
|
439
|
+
sx: {
|
|
440
|
+
boxShadow: (theme) => theme.shadows[8]
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
/* @__PURE__ */ React2.createElement(
|
|
444
|
+
Box2,
|
|
445
|
+
{
|
|
446
|
+
padding: 1.5,
|
|
447
|
+
gap: 1.5,
|
|
448
|
+
display: "flex",
|
|
449
|
+
alignItems: "center",
|
|
450
|
+
sx: {
|
|
451
|
+
backgroundColor: {
|
|
452
|
+
success: "success.50",
|
|
453
|
+
error: "error.50",
|
|
454
|
+
warning: "warning.50",
|
|
455
|
+
info: "info.50"
|
|
456
|
+
}[toastColorConfig]
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
/* @__PURE__ */ React2.createElement(
|
|
460
|
+
Stack,
|
|
461
|
+
{
|
|
462
|
+
p: 1,
|
|
463
|
+
gap: 1,
|
|
464
|
+
borderRadius: 50,
|
|
465
|
+
bgcolor: {
|
|
466
|
+
success: "success.100",
|
|
467
|
+
error: "error.100",
|
|
468
|
+
warning: "warning.100",
|
|
469
|
+
info: "info.100"
|
|
470
|
+
}[(_a = toast.type) != null ? _a : "info"]
|
|
471
|
+
},
|
|
472
|
+
/* @__PURE__ */ React2.createElement(Stack, null, ToastIconConfig)
|
|
473
|
+
),
|
|
474
|
+
/* @__PURE__ */ React2.createElement(Divider, { orientation: "vertical", flexItem: true }),
|
|
475
|
+
/* @__PURE__ */ React2.createElement(Stack, { width: 285 }, /* @__PURE__ */ React2.createElement(
|
|
476
|
+
Stack,
|
|
477
|
+
{
|
|
478
|
+
justifyContent: "space-between",
|
|
479
|
+
flexDirection: "row",
|
|
480
|
+
alignItems: "center"
|
|
481
|
+
},
|
|
482
|
+
/* @__PURE__ */ React2.createElement(Typography2, { variant: "subtitle2", color: "text.primary" }, toast.title),
|
|
483
|
+
/* @__PURE__ */ React2.createElement(
|
|
484
|
+
IconButton2,
|
|
485
|
+
{
|
|
486
|
+
size: "small",
|
|
487
|
+
"data-testid": "close-icon",
|
|
488
|
+
onClick: closeToast
|
|
489
|
+
},
|
|
490
|
+
/* @__PURE__ */ React2.createElement(Close, { fontSize: "small" })
|
|
491
|
+
)
|
|
492
|
+
), /* @__PURE__ */ React2.createElement(Stack, { gap: 0.5 }, /* @__PURE__ */ React2.createElement(Typography2, { color: "text.primary", variant: "body2" }, toast.subtitle), !stateOptions && toast.listITems && toast.listITems.length > 0 && /* @__PURE__ */ React2.createElement(Stack, null, toast.listITems.map((element, i) => /* @__PURE__ */ React2.createElement(Typography2, { variant: "caption", key: i }, "\u2022 ", element)))), /* @__PURE__ */ React2.createElement(Stack, { justifyContent: "flex-end", flexDirection: "row", gap: 0.5 }, toast.actions && toast.actions.length > 0 && /* @__PURE__ */ React2.createElement(Stack, { flexDirection: "row", gap: 0.5 }, toast.actions.map((button, index) => /* @__PURE__ */ React2.createElement(
|
|
493
|
+
Button,
|
|
494
|
+
{
|
|
495
|
+
key: index,
|
|
496
|
+
color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
|
|
497
|
+
variant: "text",
|
|
498
|
+
onClick: button.fn,
|
|
499
|
+
disabled: button.disabled || false,
|
|
500
|
+
size: "small"
|
|
501
|
+
},
|
|
502
|
+
button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
|
|
503
|
+
))), toast.seeMore && /* @__PURE__ */ React2.createElement(
|
|
504
|
+
Button,
|
|
505
|
+
{
|
|
506
|
+
onClick: toggleToastOptions,
|
|
507
|
+
size: "small",
|
|
508
|
+
variant: "text",
|
|
509
|
+
color: toastColorConfig
|
|
510
|
+
},
|
|
511
|
+
stateOptions ? "Ver m\xE1s" : "Ver menos",
|
|
512
|
+
stateOptions ? /* @__PURE__ */ React2.createElement(KeyboardArrowDown, null) : /* @__PURE__ */ React2.createElement(KeyboardArrowUp, null)
|
|
513
|
+
)))
|
|
514
|
+
),
|
|
515
|
+
/* @__PURE__ */ React2.createElement(
|
|
516
|
+
LinearProgress,
|
|
517
|
+
{
|
|
518
|
+
sx: {
|
|
519
|
+
".MuiLinearProgress-bar": {
|
|
520
|
+
transition: "0.1s linear !important",
|
|
521
|
+
transform: "scaleX(-1)"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
color: toastColorConfig,
|
|
525
|
+
variant: "determinate",
|
|
526
|
+
value: 100 - progress
|
|
527
|
+
}
|
|
528
|
+
)
|
|
529
|
+
));
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
// src/Components/TextArea/Helpers/validateIcon.tsx
|
|
533
|
+
import * as MuiIcons from "@mui/icons-material";
|
|
534
|
+
function getIcon(name) {
|
|
535
|
+
if (!name || !(name in MuiIcons)) {
|
|
536
|
+
return null;
|
|
537
|
+
}
|
|
538
|
+
return MuiIcons[name];
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// src/Components/TextArea/SCTextArea.tsx
|
|
542
|
+
import React3, { useEffect as useEffect4, useState as useState4 } from "react";
|
|
543
|
+
import { Typography as Typography3, Stack as Stack2, TextField, Box as Box3, Popover as Popover2, Tooltip as Tooltip2, SvgIcon as SvgIcon2, Grid as Grid2 } from "@mui/material";
|
|
544
|
+
import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
|
|
545
|
+
var SCTextArea = ({
|
|
546
|
+
//informativas
|
|
547
|
+
title,
|
|
548
|
+
iconTitle,
|
|
549
|
+
infoTitle,
|
|
550
|
+
label = "",
|
|
551
|
+
placeholder,
|
|
552
|
+
maxLength = 200,
|
|
553
|
+
//apariencia
|
|
554
|
+
variant,
|
|
555
|
+
disabled,
|
|
556
|
+
required,
|
|
557
|
+
width = "100%",
|
|
558
|
+
rows = 3,
|
|
559
|
+
colorTitle,
|
|
560
|
+
background,
|
|
561
|
+
//funcionales
|
|
562
|
+
setState,
|
|
563
|
+
state,
|
|
564
|
+
onBlur
|
|
565
|
+
}) => {
|
|
566
|
+
const [helperCount, setHelperCount] = useState4(0);
|
|
567
|
+
const [stateError, setStateError] = useState4(false);
|
|
568
|
+
const [anchorInfoTitle, setAnchorInfoTitle] = React3.useState(null);
|
|
569
|
+
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
570
|
+
useEffect4(() => {
|
|
571
|
+
setHelperCount(state == null ? void 0 : state.length);
|
|
572
|
+
}, [state]);
|
|
573
|
+
const IconTitle = getIcon(iconTitle);
|
|
574
|
+
const handleBlur = (event2) => {
|
|
575
|
+
if (required && state.trim() === "") {
|
|
576
|
+
setStateError(true);
|
|
577
|
+
setTimeout(() => {
|
|
578
|
+
setStateError(false);
|
|
579
|
+
}, 1e3);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
if (onBlur) {
|
|
583
|
+
onBlur(event2);
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
const handleOpenInfoTitle = (event2) => {
|
|
587
|
+
setAnchorInfoTitle(event2.currentTarget);
|
|
588
|
+
};
|
|
589
|
+
const handleCloseInfoTitle = () => {
|
|
590
|
+
setAnchorInfoTitle(null);
|
|
591
|
+
};
|
|
592
|
+
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(Box3, { sx: { width } }, /* @__PURE__ */ React3.createElement(Grid2, { container: true, sx: { alignItems: "center" }, gap: 0.5 }, iconTitle && IconTitle && /* @__PURE__ */ React3.createElement(SvgIcon2, { color: "action", fontSize: "small", component: IconTitle }), title && /* @__PURE__ */ React3.createElement(Typography3, { color: colorTitle || "text.secondary", variant: "subtitle2" }, title), infoTitle ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
|
|
593
|
+
InfoOutlined2,
|
|
594
|
+
{
|
|
595
|
+
color: "action",
|
|
596
|
+
fontSize: "small",
|
|
597
|
+
onMouseEnter: (event2) => handleOpenInfoTitle(event2),
|
|
598
|
+
onMouseLeave: () => handleCloseInfoTitle()
|
|
599
|
+
}
|
|
600
|
+
), /* @__PURE__ */ React3.createElement(
|
|
601
|
+
Popover2,
|
|
602
|
+
{
|
|
603
|
+
sx: { pointerEvents: "none" },
|
|
604
|
+
open: openInfoTitle,
|
|
605
|
+
anchorEl: anchorInfoTitle,
|
|
606
|
+
onClose: handleCloseInfoTitle,
|
|
607
|
+
anchorOrigin: {
|
|
608
|
+
vertical: "bottom",
|
|
609
|
+
horizontal: "left"
|
|
610
|
+
},
|
|
611
|
+
transformOrigin: {
|
|
612
|
+
vertical: "top",
|
|
613
|
+
horizontal: "left"
|
|
614
|
+
},
|
|
615
|
+
disableRestoreFocus: true
|
|
616
|
+
},
|
|
617
|
+
/* @__PURE__ */ React3.createElement(Typography3, { sx: { p: 2 } }, infoTitle.text)
|
|
618
|
+
)) : /* @__PURE__ */ React3.createElement(Tooltip2, { title: infoTitle.text, placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React3.createElement(
|
|
619
|
+
InfoOutlined2,
|
|
620
|
+
{
|
|
621
|
+
color: "action",
|
|
622
|
+
fontSize: "small"
|
|
623
|
+
}
|
|
624
|
+
))) : ""), /* @__PURE__ */ React3.createElement(Stack2, null, /* @__PURE__ */ React3.createElement(
|
|
625
|
+
TextField,
|
|
626
|
+
{
|
|
627
|
+
required,
|
|
628
|
+
placeholder,
|
|
629
|
+
error: stateError,
|
|
630
|
+
variant,
|
|
631
|
+
sx: { mt: "10px", background: background || "transparent", borderRadius: "4px" },
|
|
632
|
+
id: "outlined-multiline-static",
|
|
633
|
+
label,
|
|
634
|
+
multiline: true,
|
|
635
|
+
disabled,
|
|
636
|
+
rows,
|
|
637
|
+
value: state,
|
|
638
|
+
onBlur: handleBlur,
|
|
639
|
+
onChange: (e) => {
|
|
640
|
+
if (setState) {
|
|
641
|
+
setState(e.target.value.substring(0, maxLength));
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
autoComplete: "off"
|
|
645
|
+
}
|
|
646
|
+
)), /* @__PURE__ */ React3.createElement(Stack2, null, /* @__PURE__ */ React3.createElement(
|
|
647
|
+
Typography3,
|
|
648
|
+
{
|
|
649
|
+
variant: "caption",
|
|
650
|
+
color: "text.secondary",
|
|
651
|
+
mr: 1,
|
|
652
|
+
mt: 1,
|
|
653
|
+
align: "right"
|
|
654
|
+
},
|
|
655
|
+
helperCount + "/" + maxLength
|
|
656
|
+
))));
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
// src/Components/SCSelect.tsx
|
|
660
|
+
import React4, { useEffect as useEffect5 } from "react";
|
|
661
|
+
import { InputLabel as InputLabel2, FormControl as FormControl2, MenuItem, SvgIcon as SvgIcon3, ListItemIcon, ListItemText, Box as Box4 } from "@mui/material";
|
|
662
|
+
import Select from "@mui/material/Select";
|
|
663
|
+
import * as Muicon2 from "@mui/icons-material";
|
|
664
|
+
function SCSelect({
|
|
665
|
+
label = "",
|
|
666
|
+
data,
|
|
667
|
+
getItemValue,
|
|
668
|
+
width = "100%",
|
|
669
|
+
size = "small",
|
|
670
|
+
variant = "outlined",
|
|
671
|
+
deleteType = "button",
|
|
672
|
+
required,
|
|
673
|
+
disabled,
|
|
674
|
+
background,
|
|
675
|
+
fnAplicar,
|
|
676
|
+
setState,
|
|
677
|
+
state
|
|
678
|
+
}) {
|
|
679
|
+
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
680
|
+
const [prevData, setPrevData] = React4.useState(data);
|
|
681
|
+
const [error, setError] = React4.useState(false);
|
|
682
|
+
useEffect5(() => {
|
|
683
|
+
if (error) {
|
|
684
|
+
setTimeout(() => {
|
|
685
|
+
setError(false);
|
|
686
|
+
}, 1e3);
|
|
687
|
+
}
|
|
688
|
+
}, [error]);
|
|
689
|
+
useEffect5(() => {
|
|
690
|
+
let dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
691
|
+
if (dataChangeValidation == false) {
|
|
692
|
+
setState({ hiddenValue: "", textValue: "" });
|
|
693
|
+
setPrevData(data);
|
|
694
|
+
}
|
|
695
|
+
}, [data]);
|
|
696
|
+
data.map(function(option, index, array) {
|
|
697
|
+
if (option == null ? void 0 : option.icon) {
|
|
698
|
+
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
699
|
+
option.icon = Muicon2[option == null ? void 0 : option.icon];
|
|
700
|
+
} else {
|
|
701
|
+
option;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
const handleBlur = () => {
|
|
706
|
+
const currentValue = Array.isArray(state.hiddenValue) ? state.hiddenValue[0] : state.hiddenValue;
|
|
707
|
+
const isError = !currentValue && !!required;
|
|
708
|
+
setError(Boolean(isError));
|
|
709
|
+
};
|
|
710
|
+
const handleChange = (event2) => {
|
|
711
|
+
const selectedValue = event2.target.value;
|
|
712
|
+
if (selectedValue) {
|
|
713
|
+
const selectedOption = data.find((item) => getItemValue(item).value === selectedValue);
|
|
714
|
+
if (selectedOption) {
|
|
715
|
+
const itemValue = getItemValue(selectedOption);
|
|
716
|
+
setState({
|
|
717
|
+
hiddenValue: itemValue.value,
|
|
718
|
+
textValue: itemValue.text
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, data && /* @__PURE__ */ React4.createElement(Box4, { sx: { width } }, /* @__PURE__ */ React4.createElement(
|
|
724
|
+
FormControl2,
|
|
725
|
+
{
|
|
726
|
+
fullWidth: true,
|
|
727
|
+
size: size ? size : "medium",
|
|
728
|
+
variant
|
|
729
|
+
},
|
|
730
|
+
/* @__PURE__ */ React4.createElement(
|
|
731
|
+
InputLabel2,
|
|
732
|
+
{
|
|
733
|
+
error
|
|
734
|
+
},
|
|
735
|
+
required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
|
|
736
|
+
),
|
|
737
|
+
/* @__PURE__ */ React4.createElement(
|
|
738
|
+
Select,
|
|
739
|
+
{
|
|
740
|
+
value: Array.isArray(state.hiddenValue) ? state.hiddenValue[0] || "" : state.hiddenValue != "-1" ? state.hiddenValue : "",
|
|
741
|
+
label: required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
742
|
+
onChange: handleChange,
|
|
743
|
+
onBlur: handleBlur,
|
|
744
|
+
variant,
|
|
745
|
+
disabled: disabled || false,
|
|
746
|
+
error,
|
|
747
|
+
MenuProps: {
|
|
748
|
+
PaperProps: {
|
|
749
|
+
sx: {
|
|
750
|
+
left: "0px !important"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
sx: {
|
|
754
|
+
"& .MuiPaper-root": {
|
|
755
|
+
left: "0px !important"
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
data.map((option, index) => {
|
|
761
|
+
return /* @__PURE__ */ React4.createElement(MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ React4.createElement(ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React4.createElement(SvgIcon3, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ React4.createElement(ListItemText, { primary: getItemValue(option).text, color: "text.primary" }));
|
|
762
|
+
})
|
|
763
|
+
)
|
|
764
|
+
)));
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// src/Components/SCAutocomplete.tsx
|
|
768
|
+
import React5, { useEffect as useEffect6 } from "react";
|
|
769
|
+
import { Autocomplete, Checkbox, InputAdornment as InputAdornment3, MenuItem as MenuItem2, TextField as TextField3, Typography as Typography5, SvgIcon as SvgIcon4, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton4, Chip, Box as Box5, Button as Button3 } from "@mui/material";
|
|
770
|
+
import Grid3 from "@mui/material/Grid2";
|
|
771
|
+
import { Search, Clear } from "@mui/icons-material";
|
|
772
|
+
import * as Muicon3 from "@mui/icons-material";
|
|
773
|
+
function SCAutocomplete({
|
|
774
|
+
label = "",
|
|
775
|
+
data,
|
|
776
|
+
columnGroup,
|
|
777
|
+
getItemValue,
|
|
778
|
+
typeFormat = "normal",
|
|
779
|
+
checkMassive = false,
|
|
780
|
+
deleteType = "button",
|
|
781
|
+
fnAplicar,
|
|
782
|
+
required,
|
|
783
|
+
disabled,
|
|
784
|
+
background,
|
|
785
|
+
setState,
|
|
786
|
+
state,
|
|
787
|
+
inputChange,
|
|
788
|
+
maxCheck
|
|
789
|
+
// Agregar el parámetro maxCheck
|
|
790
|
+
}) {
|
|
791
|
+
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
792
|
+
let group = "";
|
|
793
|
+
let isSelected = false;
|
|
794
|
+
const [selectedOptions, setSelectedOptions] = React5.useState([]);
|
|
795
|
+
const [prevData, setPrevData] = React5.useState(data);
|
|
796
|
+
const [originalData, setOriginalData] = React5.useState(data);
|
|
797
|
+
const [inputValue, setInputValue] = React5.useState("");
|
|
798
|
+
const [isUserTyping, setIsUserTyping] = React5.useState(false);
|
|
799
|
+
useEffect6(() => {
|
|
800
|
+
const dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
801
|
+
if (!dataChangeValidation && !isUserTyping) {
|
|
802
|
+
setState({ hiddenValue: "-1", textValue: "" });
|
|
803
|
+
setSelectedOptions([]);
|
|
804
|
+
setOriginalData(data);
|
|
805
|
+
} else if (!isUserTyping) {
|
|
806
|
+
setOriginalData(data);
|
|
807
|
+
}
|
|
808
|
+
setPrevData(data);
|
|
809
|
+
}, [data, isUserTyping]);
|
|
810
|
+
useEffect6(() => {
|
|
811
|
+
if (typeFormat == "multiselect") {
|
|
812
|
+
if (state.hiddenValue != "-1" && Array.isArray(state.hiddenValue)) {
|
|
813
|
+
const newSelectedOptions = originalData.filter(
|
|
814
|
+
(item) => state.hiddenValue.includes(getItemValue(item).value)
|
|
815
|
+
);
|
|
816
|
+
setSelectedOptions(newSelectedOptions);
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}, [state.hiddenValue, originalData, typeFormat]);
|
|
820
|
+
useEffect6(() => {
|
|
821
|
+
if (inputValue === "") {
|
|
822
|
+
setIsUserTyping(false);
|
|
823
|
+
}
|
|
824
|
+
}, [inputValue]);
|
|
825
|
+
data.map(function(option) {
|
|
826
|
+
if (option == null ? void 0 : option.icon) {
|
|
827
|
+
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
828
|
+
option.icon = Muicon3[option == null ? void 0 : option.icon];
|
|
829
|
+
} else {
|
|
830
|
+
option;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
const cleanOptions = (event2) => {
|
|
835
|
+
setState({ hiddenValue: "-1", textValue: "" });
|
|
836
|
+
setSelectedOptions([]);
|
|
837
|
+
setInputValue("");
|
|
838
|
+
setIsUserTyping(false);
|
|
839
|
+
};
|
|
840
|
+
const handleCheckAll = (event2) => {
|
|
841
|
+
if (event2.target.checked) {
|
|
842
|
+
const itemsToSelect = maxCheck ? data.slice(0, maxCheck) : data;
|
|
843
|
+
setSelectedOptions(itemsToSelect);
|
|
844
|
+
setState({
|
|
845
|
+
hiddenValue: itemsToSelect.map((item) => getItemValue(item).value),
|
|
846
|
+
textValue: itemsToSelect.map((item) => getItemValue(item).text)
|
|
847
|
+
});
|
|
848
|
+
} else {
|
|
849
|
+
setSelectedOptions([]);
|
|
850
|
+
setState({ hiddenValue: "-1", textValue: "" });
|
|
851
|
+
setInputValue("");
|
|
852
|
+
setIsUserTyping(false);
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
const allSelected = data.length > 0 && selectedOptions.length === data.length;
|
|
856
|
+
const handleChange = (event2, value) => {
|
|
857
|
+
if (typeFormat === "multiselect") {
|
|
858
|
+
if (maxCheck && value.length > maxCheck) {
|
|
859
|
+
value = value.slice(0, maxCheck);
|
|
860
|
+
}
|
|
861
|
+
const ids = value.map((v) => getItemValue ? getItemValue(v).value : "");
|
|
862
|
+
const texts = value.map((v) => getItemValue ? getItemValue(v).text : "");
|
|
863
|
+
setSelectedOptions(value);
|
|
864
|
+
setState({
|
|
865
|
+
hiddenValue: ids,
|
|
866
|
+
textValue: texts
|
|
867
|
+
});
|
|
868
|
+
} else {
|
|
869
|
+
setState({
|
|
870
|
+
hiddenValue: getItemValue(value).value,
|
|
871
|
+
textValue: getItemValue(value).text
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
const selectedValue = typeFormat === "multiselect" ? selectedOptions : originalData.find(
|
|
876
|
+
(item) => getItemValue(item).value === state.hiddenValue
|
|
877
|
+
) || null;
|
|
878
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, data && /* @__PURE__ */ React5.createElement(
|
|
879
|
+
Autocomplete,
|
|
880
|
+
{
|
|
881
|
+
multiple: typeFormat === "multiselect",
|
|
882
|
+
clearOnEscape: true,
|
|
883
|
+
disabled,
|
|
884
|
+
options: data,
|
|
885
|
+
isOptionEqualToValue: (option, value) => getItemValue(option).value === getItemValue(value).value,
|
|
886
|
+
onInputChange: (event2, value) => {
|
|
887
|
+
setInputValue(value);
|
|
888
|
+
setIsUserTyping(value.length > 0);
|
|
889
|
+
if (inputChange) {
|
|
890
|
+
inputChange(value);
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
onChange: handleChange,
|
|
894
|
+
getOptionLabel: (option) => getItemValue(option).text,
|
|
895
|
+
value: selectedValue,
|
|
896
|
+
sx: {
|
|
897
|
+
background: background || "transparent",
|
|
898
|
+
width: "100%",
|
|
899
|
+
maxWidth: "100%"
|
|
900
|
+
},
|
|
901
|
+
limitTags: 2,
|
|
902
|
+
renderTags: (value, getTagProps) => {
|
|
903
|
+
const limit = 2;
|
|
904
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, value.slice(0, limit).map((option, index) => {
|
|
905
|
+
const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
|
|
906
|
+
return /* @__PURE__ */ React5.createElement(
|
|
907
|
+
Chip,
|
|
908
|
+
__spreadProps(__spreadValues({
|
|
909
|
+
key,
|
|
910
|
+
color: "default",
|
|
911
|
+
size: "small",
|
|
912
|
+
variant: "filled",
|
|
913
|
+
label: getItemValue(option).text
|
|
914
|
+
}, chipProps), {
|
|
915
|
+
style: { maxWidth: 120, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
916
|
+
})
|
|
917
|
+
);
|
|
918
|
+
}), value.length > limit && /* @__PURE__ */ React5.createElement(Box5, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
|
|
919
|
+
},
|
|
920
|
+
renderOption: (props, option) => {
|
|
921
|
+
const _a = props, { key } = _a, optionProps = __objRest(_a, ["key"]);
|
|
922
|
+
let isValid;
|
|
923
|
+
let isDisabled = false;
|
|
924
|
+
if (typeFormat == "multiselect") {
|
|
925
|
+
isSelected = selectedOptions.some(
|
|
926
|
+
(selected) => getItemValue(selected).value === getItemValue(option).value
|
|
927
|
+
);
|
|
928
|
+
if (maxCheck && selectedOptions.length >= maxCheck && !isSelected) {
|
|
929
|
+
isDisabled = true;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
if (columnGroup) {
|
|
933
|
+
isValid = group == option[columnGroup];
|
|
934
|
+
group = option[columnGroup];
|
|
935
|
+
}
|
|
936
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(React5.Fragment, { key }, columnGroup ? !isValid ? /* @__PURE__ */ React5.createElement(Typography5, { color: "text.secondary", sx: { margin: "7px 16px !important", fontSize: "13px !important" } }, option[columnGroup]) : "" : "", /* @__PURE__ */ React5.createElement(
|
|
937
|
+
MenuItem2,
|
|
938
|
+
__spreadProps(__spreadValues({}, optionProps), {
|
|
939
|
+
disabled: isDisabled,
|
|
940
|
+
style: {
|
|
941
|
+
background: typeFormat != "multiselect" ? state.hiddenValue == getItemValue(option).value ? "#dfe6ec" : "white" : "white",
|
|
942
|
+
padding: "7px 16px",
|
|
943
|
+
opacity: isDisabled ? 0.5 : 1
|
|
944
|
+
}
|
|
945
|
+
}),
|
|
946
|
+
typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */ React5.createElement(ListItemIcon2, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React5.createElement(SvgIcon4, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "",
|
|
947
|
+
typeFormat == "multiselect" ? /* @__PURE__ */ React5.createElement(
|
|
948
|
+
Checkbox,
|
|
949
|
+
{
|
|
950
|
+
checked: isSelected,
|
|
951
|
+
disabled: isDisabled,
|
|
952
|
+
value: getItemValue(option).text,
|
|
953
|
+
color: "primary"
|
|
954
|
+
}
|
|
955
|
+
) : "",
|
|
956
|
+
/* @__PURE__ */ React5.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
|
|
957
|
+
getItemValue(option).component != void 0 ? getItemValue(option).component : ""
|
|
958
|
+
)));
|
|
959
|
+
},
|
|
960
|
+
renderInput: (params) => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
961
|
+
TextField3,
|
|
962
|
+
__spreadProps(__spreadValues({}, params), {
|
|
963
|
+
label: required ? /* @__PURE__ */ React5.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
964
|
+
placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
|
|
965
|
+
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
966
|
+
endAdornment: /* @__PURE__ */ React5.createElement(React5.Fragment, null, deleteType == "icon" && (state.hiddenValue.toString() != "-1" && state.hiddenValue.toString() != "") ? /* @__PURE__ */ React5.createElement(IconButton4, { size: "small", onClick: cleanOptions, sx: { marginLeft: "auto", textAlign: "right", padding: "0px" } }, /* @__PURE__ */ React5.createElement(Clear, { fontSize: "small" })) : "", /* @__PURE__ */ React5.createElement(InputAdornment3, { style: { zIndex: 1, position: "relative" }, position: "end" }, /* @__PURE__ */ React5.createElement(Search, { fontSize: "small", color: "action", style: { cursor: "pointer" } })))
|
|
967
|
+
})
|
|
968
|
+
})
|
|
969
|
+
)),
|
|
970
|
+
slotProps: {
|
|
971
|
+
listbox: {
|
|
972
|
+
component: React5.forwardRef(function ListboxComponent(props, ref) {
|
|
973
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
974
|
+
Box5,
|
|
975
|
+
__spreadProps(__spreadValues({
|
|
976
|
+
ref
|
|
977
|
+
}, props), {
|
|
978
|
+
sx: __spreadValues({
|
|
979
|
+
position: "relative",
|
|
980
|
+
paddingBottom: "56px",
|
|
981
|
+
backgroundColor: "white"
|
|
982
|
+
}, props.sx)
|
|
983
|
+
}),
|
|
984
|
+
checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(FormControlLabel2, { control: /* @__PURE__ */ React5.createElement(Checkbox, { checked: allSelected, indeterminate: selectedOptions.length > 0 && selectedOptions.length < data.length, onChange: handleCheckAll, color: "primary" }), label: "Todos los items", sx: { marginLeft: "0px !important", marginRight: "0px !important", padding: "7px 16px" } }), /* @__PURE__ */ React5.createElement(Divider3, null)) : "",
|
|
985
|
+
props.children,
|
|
986
|
+
deleteType == "button" || fnAplicar ? /* @__PURE__ */ React5.createElement(
|
|
987
|
+
Grid3,
|
|
988
|
+
{
|
|
989
|
+
container: true,
|
|
990
|
+
sx: {
|
|
991
|
+
position: "sticky",
|
|
992
|
+
bottom: -8,
|
|
993
|
+
left: 0,
|
|
994
|
+
width: "100%",
|
|
995
|
+
backgroundColor: "grey.50",
|
|
996
|
+
padding: "8px 16px",
|
|
997
|
+
textAlign: "left",
|
|
998
|
+
justifyContent: "space-between"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
deleteType == "button" ? /* @__PURE__ */ React5.createElement(
|
|
1002
|
+
Button3,
|
|
1003
|
+
{
|
|
1004
|
+
variant: "text",
|
|
1005
|
+
color: "primary",
|
|
1006
|
+
size: "small",
|
|
1007
|
+
onClick: (event2) => {
|
|
1008
|
+
event2.stopPropagation();
|
|
1009
|
+
cleanOptions(event2);
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"Limpiar"
|
|
1013
|
+
) : "",
|
|
1014
|
+
fnAplicar && /* @__PURE__ */ React5.createElement(
|
|
1015
|
+
Button3,
|
|
1016
|
+
{
|
|
1017
|
+
variant: "contained",
|
|
1018
|
+
color: "primary",
|
|
1019
|
+
size: "small",
|
|
1020
|
+
onClick: fnAplicar
|
|
1021
|
+
},
|
|
1022
|
+
"Aplicar"
|
|
1023
|
+
)
|
|
1024
|
+
) : ""
|
|
1025
|
+
));
|
|
1026
|
+
})
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
));
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// src/Components/SCDateRange.tsx
|
|
1034
|
+
import React6 from "react";
|
|
1035
|
+
import { Box as Box6, InputAdornment as InputAdornment4 } from "@mui/material";
|
|
1036
|
+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
1037
|
+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
1038
|
+
import { DateRangePicker } from "@mui/x-date-pickers-pro/DateRangePicker";
|
|
1039
|
+
import { MultiInputDateRangeField } from "@mui/x-date-pickers-pro/MultiInputDateRangeField";
|
|
1040
|
+
import dayjs from "dayjs";
|
|
1041
|
+
import "dayjs/locale/es";
|
|
1042
|
+
import { LicenseInfo } from "@mui/x-license-pro";
|
|
1043
|
+
import EventIcon from "@mui/icons-material/Event";
|
|
1044
|
+
var SCDateRange = ({
|
|
1045
|
+
labelDateInitial = "Fecha inicial",
|
|
1046
|
+
labelDateFinal = "Fecha final",
|
|
1047
|
+
required = false,
|
|
1048
|
+
disabled = false,
|
|
1049
|
+
background = "transparent",
|
|
1050
|
+
state,
|
|
1051
|
+
setState
|
|
1052
|
+
}) => {
|
|
1053
|
+
LicenseInfo.setLicenseKey(
|
|
1054
|
+
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
1055
|
+
);
|
|
1056
|
+
const isStartEmpty = required && !state[0];
|
|
1057
|
+
const isEndEmpty = required && !state[1];
|
|
1058
|
+
const hasError = isStartEmpty || isEndEmpty;
|
|
1059
|
+
const handleDateChange = (newValue) => {
|
|
1060
|
+
const convertedValue = [
|
|
1061
|
+
newValue[0] ? dayjs(newValue[0]) : null,
|
|
1062
|
+
newValue[1] ? dayjs(newValue[1]) : null
|
|
1063
|
+
];
|
|
1064
|
+
setState(convertedValue);
|
|
1065
|
+
};
|
|
1066
|
+
return /* @__PURE__ */ React6.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React6.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React6.createElement(
|
|
1067
|
+
DateRangePicker,
|
|
1068
|
+
{
|
|
1069
|
+
value: state,
|
|
1070
|
+
onChange: handleDateChange,
|
|
1071
|
+
disabled,
|
|
1072
|
+
slots: {
|
|
1073
|
+
field: MultiInputDateRangeField
|
|
1074
|
+
},
|
|
1075
|
+
slotProps: {
|
|
1076
|
+
field: {
|
|
1077
|
+
slotProps: {
|
|
1078
|
+
textField: ({ position }) => ({
|
|
1079
|
+
label: position === "start" ? labelDateInitial : labelDateFinal,
|
|
1080
|
+
size: "small",
|
|
1081
|
+
variant: "outlined",
|
|
1082
|
+
required,
|
|
1083
|
+
error: position === "start" ? isStartEmpty : isEndEmpty,
|
|
1084
|
+
InputProps: {
|
|
1085
|
+
endAdornment: /* @__PURE__ */ React6.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React6.createElement(
|
|
1086
|
+
EventIcon,
|
|
1087
|
+
{
|
|
1088
|
+
color: hasError ? "error" : "action",
|
|
1089
|
+
fontSize: "small"
|
|
1090
|
+
}
|
|
1091
|
+
))
|
|
1092
|
+
},
|
|
1093
|
+
sx: {
|
|
1094
|
+
mr: position === "start" ? 1 : 0,
|
|
1095
|
+
"& .MuiOutlinedInput-root": {
|
|
1096
|
+
backgroundColor: background === "transparent" ? "transparent" : background
|
|
1097
|
+
},
|
|
1098
|
+
"& .MuiInputLabel-asterisk": {
|
|
1099
|
+
color: "error.main"
|
|
1100
|
+
},
|
|
1101
|
+
background: background != null ? background : "transparent"
|
|
1102
|
+
}
|
|
1103
|
+
})
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
sx: {
|
|
1108
|
+
display: "flex",
|
|
1109
|
+
gap: 1,
|
|
1110
|
+
width: "100%"
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
)));
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
// src/Components/Drawer/Helpers/Utils.tsx
|
|
1117
|
+
import * as Muicon4 from "@mui/icons-material";
|
|
1118
|
+
var getIcon2 = (iconName) => {
|
|
1119
|
+
if (iconName && iconName in Muicon4) {
|
|
1120
|
+
return Muicon4[iconName];
|
|
1121
|
+
}
|
|
1122
|
+
return null;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
// src/Components/Drawer/Helpers/validateInput.tsx
|
|
1126
|
+
var validateInputs = (arrayElements, onError, onSuccess) => {
|
|
1127
|
+
var _a;
|
|
1128
|
+
let requiredValues = 0;
|
|
1129
|
+
let filledValues = 0;
|
|
1130
|
+
for (let i = 0; i < arrayElements.length; i++) {
|
|
1131
|
+
if (arrayElements[i].component === void 0) {
|
|
1132
|
+
if (arrayElements[i].required) {
|
|
1133
|
+
requiredValues++;
|
|
1134
|
+
}
|
|
1135
|
+
if (arrayElements[i].required && ((_a = arrayElements[i].state) == null ? void 0 : _a.trim()) !== "") {
|
|
1136
|
+
filledValues++;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
if (requiredValues === filledValues) {
|
|
1141
|
+
onSuccess();
|
|
1142
|
+
} else {
|
|
1143
|
+
onError({
|
|
1144
|
+
type: "error",
|
|
1145
|
+
title: "Algunos campos son requeridos",
|
|
1146
|
+
time: 10
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
// src/Components/Drawer/SCDrawer.tsx
|
|
1152
|
+
function SCDrawer({
|
|
1153
|
+
//informativas
|
|
1154
|
+
title,
|
|
1155
|
+
arrayElements = [],
|
|
1156
|
+
actions,
|
|
1157
|
+
buttonDrawer,
|
|
1158
|
+
//Apariencia
|
|
1159
|
+
colorTitle,
|
|
1160
|
+
anchor = "left",
|
|
1161
|
+
width,
|
|
1162
|
+
//Funcionales
|
|
1163
|
+
open
|
|
1164
|
+
}) {
|
|
1165
|
+
var _a, _b;
|
|
1166
|
+
const [drawerOpen, setDrawerOpen] = React7.useState(open);
|
|
1167
|
+
const [toast, setToast] = React7.useState(null);
|
|
1168
|
+
const handleDrawerClose = () => {
|
|
1169
|
+
setDrawerOpen(false);
|
|
1170
|
+
};
|
|
1171
|
+
const toggleDrawer = (newOpen) => () => {
|
|
1172
|
+
setDrawerOpen(newOpen);
|
|
1173
|
+
};
|
|
1174
|
+
const ButtonIcon = getIcon2(buttonDrawer == null ? void 0 : buttonDrawer.icon);
|
|
1175
|
+
const setToastWithDelay = (toastContent) => {
|
|
1176
|
+
setToast(null);
|
|
1177
|
+
setTimeout(() => {
|
|
1178
|
+
setToast(toastContent);
|
|
1179
|
+
}, 10);
|
|
1180
|
+
};
|
|
1181
|
+
const inputValidation = () => validateInputs(arrayElements, setToastWithDelay, handleDrawerClose);
|
|
1182
|
+
const clean = () => {
|
|
1183
|
+
arrayElements.forEach((element, index) => {
|
|
1184
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
1185
|
+
if (element.setState || React7.isValidElement(element == null ? void 0 : element.component) && ((_a2 = element.component.props) == null ? void 0 : _a2.setState)) {
|
|
1186
|
+
if (element.type === "textField" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCtextField" || (element.type === "textArea" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCtextArea")) {
|
|
1187
|
+
element.setState != void 0 ? element.setState("") : null;
|
|
1188
|
+
React7.isValidElement(element == null ? void 0 : element.component) && ((_b2 = element.component.props) == null ? void 0 : _b2.setState) && ((_d = (_c = element == null ? void 0 : element.component) == null ? void 0 : _c.props) == null ? void 0 : _d.setState(""));
|
|
1189
|
+
} else if (element.type === "dateRange" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCDateRange") {
|
|
1190
|
+
element.setState != void 0 ? element.setState([null, null]) : null;
|
|
1191
|
+
React7.isValidElement(element == null ? void 0 : element.component) && typeof ((_e = element.component.props) == null ? void 0 : _e.setState) === "function" && element.component.props.setState([null, null]);
|
|
1192
|
+
} else {
|
|
1193
|
+
if (element.type == "autocomplete" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCAutocomplete" || (element.typeFormat == "multiselect" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.props && ((_f = element == null ? void 0 : element.component) == null ? void 0 : _f.props).typeFormat == "multiselect")) {
|
|
1194
|
+
element.setState != void 0 ? element.setState({ hiddenValue: [], textValue: [] }) : null;
|
|
1195
|
+
React7.isValidElement(element == null ? void 0 : element.component) && typeof ((_g = element.component.props) == null ? void 0 : _g.setState) === "function" && element.component.props.setState({ hiddenValue: [], textValue: [] });
|
|
1196
|
+
} else {
|
|
1197
|
+
element.setState != void 0 ? element.setState({ hiddenValue: "-1", textValue: "" }) : null;
|
|
1198
|
+
React7.isValidElement(element == null ? void 0 : element.component) && typeof ((_h = element.component.props) == null ? void 0 : _h.setState) === "function" && element.component.props.setState({ hiddenValue: "-1", textValue: "" });
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
});
|
|
1203
|
+
};
|
|
1204
|
+
const actionsA = actions == false ? false : actions != void 0 ? actions : [{ text: "Aplicar filtros", fn: inputValidation }, { text: "Limpiar filtros", fn: clean }];
|
|
1205
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, toast && /* @__PURE__ */ React7.createElement(SCToastNotification, __spreadValues({}, toast)), (buttonDrawer == null ? void 0 : buttonDrawer.type) == "chip" ? /* @__PURE__ */ React7.createElement(
|
|
1206
|
+
Chip2,
|
|
1207
|
+
__spreadProps(__spreadValues({
|
|
1208
|
+
onClick: toggleDrawer(true),
|
|
1209
|
+
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
1210
|
+
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) == "contained" ? "filled" : "outlined",
|
|
1211
|
+
label: (_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "",
|
|
1212
|
+
icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
|
|
1213
|
+
deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : void 0
|
|
1214
|
+
}, (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? { onDelete: () => {
|
|
1215
|
+
} } : {}), {
|
|
1216
|
+
sx: {
|
|
1217
|
+
"& .MuiChip-icon": {
|
|
1218
|
+
color: "inherit"
|
|
1219
|
+
},
|
|
1220
|
+
textTransform: "capitalize"
|
|
1221
|
+
}
|
|
1222
|
+
})
|
|
1223
|
+
) : /* @__PURE__ */ React7.createElement(
|
|
1224
|
+
Button4,
|
|
1225
|
+
{
|
|
1226
|
+
"data-testid": "test-buttonDrawer",
|
|
1227
|
+
sx: { textTransform: "capitalize" },
|
|
1228
|
+
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
1229
|
+
onClick: toggleDrawer(true),
|
|
1230
|
+
size: "small",
|
|
1231
|
+
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.variant : "text",
|
|
1232
|
+
startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : null,
|
|
1233
|
+
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : null
|
|
1234
|
+
},
|
|
1235
|
+
(_b = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _b : ""
|
|
1236
|
+
), /* @__PURE__ */ React7.createElement(
|
|
1237
|
+
Drawer,
|
|
1238
|
+
{
|
|
1239
|
+
open: drawerOpen,
|
|
1240
|
+
onClose: toggleDrawer(false),
|
|
1241
|
+
anchor: anchor != null ? anchor : "left",
|
|
1242
|
+
sx: {
|
|
1243
|
+
"& .MuiDrawer-paper": {
|
|
1244
|
+
width: width != null ? width : "450px",
|
|
1245
|
+
boxSizing: "border-box",
|
|
1246
|
+
borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px"
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
},
|
|
1250
|
+
/* @__PURE__ */ React7.createElement(Stack3, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ React7.createElement(Grid4, { container: true, sx: { backgroundColor: "primary.50", alignItems: "center", height: "42px", textAlign: "left", padding: "8px 12px", justifyContent: "space-between", alignContent: "center" } }, /* @__PURE__ */ React7.createElement(Typography7, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"), /* @__PURE__ */ React7.createElement(IconButton5, { onClick: handleDrawerClose }, /* @__PURE__ */ React7.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))), /* @__PURE__ */ React7.createElement(Stack3, { alignItems: "flex-start", height: "100%", gap: "16px", flex: 1, overflow: "auto", padding: "16px" }, arrayElements == null ? void 0 : arrayElements.map((arrayElement, index) => {
|
|
1251
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
1252
|
+
return /* @__PURE__ */ React7.createElement(
|
|
1253
|
+
Box7,
|
|
1254
|
+
{
|
|
1255
|
+
key: `Stack_${(_a2 = arrayElement.type) != null ? _a2 : ""} ${(_b2 = arrayElement.label) != null ? _b2 : ""}${index}`,
|
|
1256
|
+
sx: { width: "100%" }
|
|
1257
|
+
},
|
|
1258
|
+
arrayElement.component ? /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React7.createElement(
|
|
1259
|
+
SCTextField,
|
|
1260
|
+
{
|
|
1261
|
+
title: arrayElement.title,
|
|
1262
|
+
iconTitle: arrayElement.iconTitle,
|
|
1263
|
+
infoTitle: arrayElement.infoTitle,
|
|
1264
|
+
label: arrayElement.label,
|
|
1265
|
+
placeholder: arrayElement.placeholder,
|
|
1266
|
+
infoElement: arrayElement.infoElement,
|
|
1267
|
+
iconInputStart: arrayElement.iconInputStart,
|
|
1268
|
+
iconInputEnd: arrayElement.iconInputEnd,
|
|
1269
|
+
maxLength: arrayElement.maxLength,
|
|
1270
|
+
variant: arrayElement.variant,
|
|
1271
|
+
format: arrayElement.format,
|
|
1272
|
+
disabled: arrayElement.disabled,
|
|
1273
|
+
required: arrayElement.required,
|
|
1274
|
+
size: arrayElement.size,
|
|
1275
|
+
width: arrayElement.width,
|
|
1276
|
+
color: arrayElement.color,
|
|
1277
|
+
background: arrayElement.background,
|
|
1278
|
+
setState: arrayElement.setState,
|
|
1279
|
+
state: arrayElement.state || "",
|
|
1280
|
+
onChange: arrayElement.onChange,
|
|
1281
|
+
onBlur: arrayElement.onBlur,
|
|
1282
|
+
onKeyDown: arrayElement.onKeyDown
|
|
1283
|
+
}
|
|
1284
|
+
) : arrayElement.type === "textArea" ? /* @__PURE__ */ React7.createElement(
|
|
1285
|
+
SCTextArea,
|
|
1286
|
+
{
|
|
1287
|
+
title: arrayElement.title,
|
|
1288
|
+
iconTitle: arrayElement.iconTitle,
|
|
1289
|
+
infoTitle: arrayElement.infoTitle,
|
|
1290
|
+
label: arrayElement.label,
|
|
1291
|
+
placeholder: arrayElement.placeholder,
|
|
1292
|
+
maxLength: arrayElement.maxLength,
|
|
1293
|
+
variant: arrayElement.variant,
|
|
1294
|
+
disabled: arrayElement.disabled,
|
|
1295
|
+
required: arrayElement.required,
|
|
1296
|
+
width: arrayElement.width,
|
|
1297
|
+
rows: arrayElement.rows,
|
|
1298
|
+
background: arrayElement.background,
|
|
1299
|
+
setState: arrayElement.setState,
|
|
1300
|
+
state: arrayElement.state || "",
|
|
1301
|
+
onBlur: arrayElement.onBlur
|
|
1302
|
+
}
|
|
1303
|
+
) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ React7.createElement(
|
|
1304
|
+
SCAutocomplete,
|
|
1305
|
+
{
|
|
1306
|
+
label: arrayElement.label,
|
|
1307
|
+
data: (_c = arrayElement.data) != null ? _c : [],
|
|
1308
|
+
columnGroup: arrayElement.columnGroup,
|
|
1309
|
+
getItemValue: (_d = arrayElement.getItemValue) != null ? _d : () => ({ text: "", value: "" }),
|
|
1310
|
+
typeFormat: arrayElement.typeFormat,
|
|
1311
|
+
checkMassive: arrayElement.checkMassive,
|
|
1312
|
+
deleteType: arrayElement.deleteType,
|
|
1313
|
+
required: arrayElement.required,
|
|
1314
|
+
disabled: arrayElement.disabled,
|
|
1315
|
+
background: arrayElement.background,
|
|
1316
|
+
fnAplicar: arrayElement.fnAplicar,
|
|
1317
|
+
setState: arrayElement.setState,
|
|
1318
|
+
state: arrayElement.state || "",
|
|
1319
|
+
inputChange: arrayElement.inputChange
|
|
1320
|
+
}
|
|
1321
|
+
) : arrayElement.type === "select" ? /* @__PURE__ */ React7.createElement(
|
|
1322
|
+
SCSelect,
|
|
1323
|
+
{
|
|
1324
|
+
label: arrayElement.label,
|
|
1325
|
+
data: (_e = arrayElement.data) != null ? _e : [],
|
|
1326
|
+
getItemValue: (_f = arrayElement.getItemValue) != null ? _f : () => ({ text: "", value: "" }),
|
|
1327
|
+
width: arrayElement.width,
|
|
1328
|
+
size: arrayElement.size,
|
|
1329
|
+
variant: arrayElement.variant,
|
|
1330
|
+
deleteType: arrayElement.deleteType,
|
|
1331
|
+
required: arrayElement.required,
|
|
1332
|
+
disabled: arrayElement.disabled,
|
|
1333
|
+
background: arrayElement.background,
|
|
1334
|
+
fnAplicar: arrayElement.fnAplicar,
|
|
1335
|
+
setState: arrayElement.setState,
|
|
1336
|
+
state: arrayElement.state || ""
|
|
1337
|
+
}
|
|
1338
|
+
) : arrayElement.type === "dateRange" ? /* @__PURE__ */ React7.createElement(
|
|
1339
|
+
SCDateRange,
|
|
1340
|
+
{
|
|
1341
|
+
labelDateInitial: arrayElement.labelDateInitial,
|
|
1342
|
+
labelDateFinal: arrayElement.labelDateFinal,
|
|
1343
|
+
required: arrayElement.required,
|
|
1344
|
+
disabled: arrayElement.disabled,
|
|
1345
|
+
background: arrayElement.background,
|
|
1346
|
+
state: arrayElement.state || [],
|
|
1347
|
+
setState: arrayElement.setState
|
|
1348
|
+
}
|
|
1349
|
+
) : null
|
|
1350
|
+
);
|
|
1351
|
+
})), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ React7.createElement(
|
|
1352
|
+
Grid4,
|
|
1353
|
+
{
|
|
1354
|
+
sx: { borderTop: 1, borderColor: "#1018403B" },
|
|
1355
|
+
container: true,
|
|
1356
|
+
gap: 2,
|
|
1357
|
+
padding: "8px 12px",
|
|
1358
|
+
height: "42px",
|
|
1359
|
+
alignItems: "center",
|
|
1360
|
+
justifyContent: actionsA.length > 1 ? "space-between" : !anchor && anchor != "right" ? "flex-end" : "flex-start",
|
|
1361
|
+
flexDirection: anchor != "right" ? "row-reverse" : "row"
|
|
1362
|
+
},
|
|
1363
|
+
actionsA.map((btn, index) => /* @__PURE__ */ React7.createElement(
|
|
1364
|
+
Button4,
|
|
1365
|
+
{
|
|
1366
|
+
key: index,
|
|
1367
|
+
variant: index === 0 || actionsA.length < 2 ? "contained" : "text",
|
|
1368
|
+
color: "primary",
|
|
1369
|
+
onClick: btn.fn,
|
|
1370
|
+
disabled: btn.disabled || false,
|
|
1371
|
+
size: "small"
|
|
1372
|
+
},
|
|
1373
|
+
btn.text
|
|
1374
|
+
))
|
|
1375
|
+
) : "" : "")
|
|
1376
|
+
));
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
// src/Components/FooterAction/FooterAction.tsx
|
|
1380
|
+
import React8 from "react";
|
|
1381
|
+
import { AppBar, Toolbar, Box as Box8, Typography as Typography8 } from "@mui/material";
|
|
1382
|
+
var FooterAction = ({
|
|
1383
|
+
leftContent,
|
|
1384
|
+
rightContent,
|
|
1385
|
+
label,
|
|
1386
|
+
variant
|
|
1387
|
+
}) => {
|
|
1388
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1389
|
+
AppBar,
|
|
1390
|
+
{
|
|
1391
|
+
color: "inherit",
|
|
1392
|
+
sx: { position: variant == "float" ? "relative" : "fixed", left: 0, right: "auto", width: "100%", top: "auto", bottom: 0 }
|
|
1393
|
+
},
|
|
1394
|
+
/* @__PURE__ */ React8.createElement(
|
|
1395
|
+
Toolbar,
|
|
1396
|
+
{
|
|
1397
|
+
id: "footer-toolbar",
|
|
1398
|
+
sx: { gap: 1.5, minHeight: "50px !important" }
|
|
1399
|
+
},
|
|
1400
|
+
leftContent,
|
|
1401
|
+
/* @__PURE__ */ React8.createElement(Box8, { flexGrow: 1 }),
|
|
1402
|
+
label && /* @__PURE__ */ React8.createElement(Typography8, { variant: "body2", color: "text.secondary" }, label),
|
|
1403
|
+
rightContent
|
|
1404
|
+
)
|
|
1405
|
+
);
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
// src/Components/Modal/Helpers/Data.tsx
|
|
1409
|
+
import React9 from "react";
|
|
1410
|
+
import { Info, Warning } from "@mui/icons-material";
|
|
1411
|
+
var modalStateConfig = {
|
|
1412
|
+
info: {
|
|
1413
|
+
color: "info",
|
|
1414
|
+
defaultDescription: "Se [sincronizar\xE1n] los datos trabajados en modo offline y se [subir\xE1n] a los servidores.",
|
|
1415
|
+
icon: /* @__PURE__ */ React9.createElement(Info, { color: "info", fontSize: "medium" })
|
|
1416
|
+
},
|
|
1417
|
+
delete: {
|
|
1418
|
+
color: "delete",
|
|
1419
|
+
defaultDescription: "[Elemento espec\xEDfico] [dejar\xE1 de existir en todos los lugares donde est\xE9 en uso]. Esta acci\xF3n es irreversible.",
|
|
1420
|
+
icon: /* @__PURE__ */ React9.createElement(Info, { color: "error", fontSize: "medium" })
|
|
1421
|
+
},
|
|
1422
|
+
warning: {
|
|
1423
|
+
color: "warning",
|
|
1424
|
+
defaultDescription: "Se descartar\xE1 la [creaci\xF3n] y los cambios se perder\xE1n.",
|
|
1425
|
+
icon: /* @__PURE__ */ React9.createElement(Warning, { color: "warning", fontSize: "medium" })
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
|
|
1429
|
+
// src/Components/Modal/Helpers/Utils.tsx
|
|
1430
|
+
import * as MuiIcons2 from "@mui/icons-material";
|
|
1431
|
+
import { FilterListOutlined } from "@mui/icons-material";
|
|
1432
|
+
var getIconComponent2 = (iconName) => {
|
|
1433
|
+
return iconName && MuiIcons2[iconName] ? MuiIcons2[iconName] : FilterListOutlined;
|
|
1434
|
+
};
|
|
1435
|
+
var getModalColor = (state) => {
|
|
1436
|
+
var _a;
|
|
1437
|
+
const colors = {
|
|
1438
|
+
info: "info.100",
|
|
1439
|
+
delete: "error.100",
|
|
1440
|
+
warning: "warning.100"
|
|
1441
|
+
};
|
|
1442
|
+
return (_a = colors[state]) != null ? _a : "warning.100";
|
|
1443
|
+
};
|
|
1444
|
+
var getButtonColor = (state) => {
|
|
1445
|
+
var _a;
|
|
1446
|
+
const colorMap = {
|
|
1447
|
+
info: "info",
|
|
1448
|
+
delete: "error",
|
|
1449
|
+
warning: "warning"
|
|
1450
|
+
};
|
|
1451
|
+
return (_a = colorMap[state]) != null ? _a : "info";
|
|
1452
|
+
};
|
|
1453
|
+
|
|
1454
|
+
// src/Components/Modal/SCModal.tsx
|
|
1455
|
+
import React10, { useCallback, useEffect as useEffect7, useMemo, useState as useState5 } from "react";
|
|
1456
|
+
import { Modal, Box as Box9, Typography as Typography9, IconButton as IconButton6, Button as Button5, Stack as Stack4 } from "@mui/material";
|
|
1457
|
+
import { Close as Close2 } from "@mui/icons-material";
|
|
1458
|
+
|
|
1459
|
+
// src/generales/capitalize.tsx
|
|
1460
|
+
function capitalize(text) {
|
|
1461
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
// src/Components/Modal/SCModal.tsx
|
|
1465
|
+
var SCModal = ({
|
|
1466
|
+
buttonModal,
|
|
1467
|
+
state = "info",
|
|
1468
|
+
open,
|
|
1469
|
+
title,
|
|
1470
|
+
description,
|
|
1471
|
+
action
|
|
1472
|
+
}) => {
|
|
1473
|
+
var _a, _b, _c, _d, _e;
|
|
1474
|
+
const [openModal, setOpenModal] = useState5(open != null ? open : false);
|
|
1475
|
+
useEffect7(() => {
|
|
1476
|
+
if (open !== void 0) {
|
|
1477
|
+
setOpenModal(open);
|
|
1478
|
+
}
|
|
1479
|
+
}, [open]);
|
|
1480
|
+
const Icon = useMemo(() => getIconComponent2(buttonModal == null ? void 0 : buttonModal.icon), [buttonModal == null ? void 0 : buttonModal.icon]);
|
|
1481
|
+
const handleClose = useCallback(() => setOpenModal(false), []);
|
|
1482
|
+
const toggleModal = (newOpen) => () => setOpenModal(newOpen);
|
|
1483
|
+
const prevAction = useMemo(
|
|
1484
|
+
() => action != null ? action : [{ text: "Cancelar", fn: handleClose }, { text: "Consultar", fn: () => {
|
|
1485
|
+
} }],
|
|
1486
|
+
[action, handleClose]
|
|
1487
|
+
);
|
|
1488
|
+
const { icon, defaultDescription } = modalStateConfig[state];
|
|
1489
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
1490
|
+
Button5,
|
|
1491
|
+
{
|
|
1492
|
+
"data-testid": "test-buttonModal",
|
|
1493
|
+
color: (_a = buttonModal == null ? void 0 : buttonModal.color) != null ? _a : "primary",
|
|
1494
|
+
onClick: toggleModal(true),
|
|
1495
|
+
variant: (_b = buttonModal == null ? void 0 : buttonModal.variant) != null ? _b : "text",
|
|
1496
|
+
size: (_c = buttonModal == null ? void 0 : buttonModal.size) != null ? _c : "small",
|
|
1497
|
+
startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */ React10.createElement(Icon, null),
|
|
1498
|
+
endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */ React10.createElement(Icon, null)
|
|
1499
|
+
},
|
|
1500
|
+
capitalize((_d = buttonModal == null ? void 0 : buttonModal.text) != null ? _d : "filtrar")
|
|
1501
|
+
), /* @__PURE__ */ React10.createElement(Modal, { open: openModal, onClose: toggleModal(false), sx: { boxShadow: 8 } }, /* @__PURE__ */ React10.createElement(
|
|
1502
|
+
Box9,
|
|
1503
|
+
{
|
|
1504
|
+
sx: {
|
|
1505
|
+
position: "absolute",
|
|
1506
|
+
top: "50%",
|
|
1507
|
+
left: "50%",
|
|
1508
|
+
transform: "translate(-50%, -50%)",
|
|
1509
|
+
width: 400,
|
|
1510
|
+
bgcolor: "background.paper",
|
|
1511
|
+
borderRadius: 1,
|
|
1512
|
+
boxShadow: 24
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
/* @__PURE__ */ React10.createElement(Stack4, { direction: "row", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React10.createElement(Stack4, { direction: "row", alignItems: "center", p: 1, gap: 1.5 }, /* @__PURE__ */ React10.createElement(Box9, { display: "flex", justifyContent: "center", alignItems: "center", borderRadius: "50%", height: 36, width: 36, bgcolor: getModalColor(state) }, icon), /* @__PURE__ */ React10.createElement(Typography9, { variant: "h6", color: "text.primary" }, title)), /* @__PURE__ */ React10.createElement(IconButton6, { onClick: toggleModal(false), "data-testid": "test-buttonClose" }, /* @__PURE__ */ React10.createElement(Close2, { color: "action" }))),
|
|
1516
|
+
/* @__PURE__ */ React10.createElement(Stack4, { py: 1, px: 3, gap: 1.5 }, /* @__PURE__ */ React10.createElement(Typography9, { variant: "body1" }, description || defaultDescription)),
|
|
1517
|
+
action && /* @__PURE__ */ React10.createElement(
|
|
1518
|
+
Stack4,
|
|
1519
|
+
{
|
|
1520
|
+
id: "Action",
|
|
1521
|
+
direction: "row",
|
|
1522
|
+
gap: 1,
|
|
1523
|
+
p: 1,
|
|
1524
|
+
justifyContent: "end",
|
|
1525
|
+
bgcolor: "grey.50",
|
|
1526
|
+
sx: { borderRadius: 1 }
|
|
1527
|
+
},
|
|
1528
|
+
/* @__PURE__ */ React10.createElement(
|
|
1529
|
+
Button5,
|
|
1530
|
+
{
|
|
1531
|
+
color: "inherit",
|
|
1532
|
+
variant: "text",
|
|
1533
|
+
onClick: handleClose,
|
|
1534
|
+
size: "small"
|
|
1535
|
+
},
|
|
1536
|
+
capitalize("cancelar")
|
|
1537
|
+
),
|
|
1538
|
+
/* @__PURE__ */ React10.createElement(
|
|
1539
|
+
Button5,
|
|
1540
|
+
{
|
|
1541
|
+
"data-testid": "test-aceptar",
|
|
1542
|
+
color: getButtonColor(state),
|
|
1543
|
+
variant: "contained",
|
|
1544
|
+
onClick: (_e = action[0]) == null ? void 0 : _e.fn,
|
|
1545
|
+
disabled: false,
|
|
1546
|
+
size: "small"
|
|
1547
|
+
},
|
|
1548
|
+
capitalize(action[0].text)
|
|
1549
|
+
)
|
|
1550
|
+
)
|
|
1551
|
+
)));
|
|
1552
|
+
};
|
|
1553
|
+
|
|
1554
|
+
// src/Components/MultiSelect/MultiSelect.tsx
|
|
1555
|
+
import React11, { useEffect as useEffect8, useMemo as useMemo3 } from "react";
|
|
1556
|
+
import { Button as Button6, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem3, Popover as Popover3, Stack as Stack5, TextField as TextField4 } from "@mui/material";
|
|
1557
|
+
import { SearchOutlined } from "@mui/icons-material";
|
|
1558
|
+
|
|
1559
|
+
// src/Components/MultiSelect/helpers/useHandlers.tsx
|
|
1560
|
+
import { useCallback as useCallback2, useState as useState6 } from "react";
|
|
1561
|
+
function useMultiSelectHandlers() {
|
|
1562
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
1563
|
+
const [open, setOpen] = useState6(false);
|
|
1564
|
+
const [selectedItems, setSelectedItems] = useState6([]);
|
|
1565
|
+
const [filterValue, setFilterValue] = useState6("");
|
|
1566
|
+
const handleOpen = useCallback2((e) => {
|
|
1567
|
+
setAnchorEl(e.currentTarget);
|
|
1568
|
+
setOpen(true);
|
|
1569
|
+
}, []);
|
|
1570
|
+
const handleClose = useCallback2(() => {
|
|
1571
|
+
setAnchorEl(null);
|
|
1572
|
+
setOpen(false);
|
|
1573
|
+
}, []);
|
|
1574
|
+
const handleFilterChange = useCallback2(
|
|
1575
|
+
(e) => {
|
|
1576
|
+
setFilterValue(e.target.value);
|
|
1577
|
+
},
|
|
1578
|
+
[]
|
|
1579
|
+
);
|
|
1580
|
+
const handleCheckboxToggle = useCallback2((item) => {
|
|
1581
|
+
setSelectedItems(
|
|
1582
|
+
(prev) => prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]
|
|
1583
|
+
);
|
|
1584
|
+
}, []);
|
|
1585
|
+
return {
|
|
1586
|
+
anchorEl,
|
|
1587
|
+
open,
|
|
1588
|
+
selectedItems,
|
|
1589
|
+
filterValue,
|
|
1590
|
+
setSelectedItems,
|
|
1591
|
+
handleOpen,
|
|
1592
|
+
handleClose,
|
|
1593
|
+
handleFilterChange,
|
|
1594
|
+
handleCheckboxToggle,
|
|
1595
|
+
setOpen
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
// src/Components/MultiSelect/helpers/Utils.tsx
|
|
1600
|
+
import * as MuiIcons3 from "@mui/icons-material";
|
|
1601
|
+
import { FilterListOutlined as FilterListOutlined2 } from "@mui/icons-material";
|
|
1602
|
+
function getIconMultiSelect(name) {
|
|
1603
|
+
return name in MuiIcons3 ? MuiIcons3[name] : FilterListOutlined2;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
// src/Components/MultiSelect/helpers/useFilteredItems.tsx
|
|
1607
|
+
import { useMemo as useMemo2 } from "react";
|
|
1608
|
+
function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
|
|
1609
|
+
const filteredItems = useMemo2(
|
|
1610
|
+
() => items.filter(
|
|
1611
|
+
(item) => getItemLabel(item).toLowerCase().includes(filterValue.toLowerCase())
|
|
1612
|
+
),
|
|
1613
|
+
[items, filterValue, getItemLabel]
|
|
1614
|
+
);
|
|
1615
|
+
const sortedItems = useMemo2(() => {
|
|
1616
|
+
return [
|
|
1617
|
+
...filteredItems.filter((item) => selectedItems.includes(item)),
|
|
1618
|
+
...filteredItems.filter((item) => !selectedItems.includes(item))
|
|
1619
|
+
];
|
|
1620
|
+
}, [filteredItems, selectedItems]);
|
|
1621
|
+
return { filteredItems, sortedItems };
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
// src/Components/MultiSelect/MultiSelect.tsx
|
|
1625
|
+
function MultiSelect({
|
|
1626
|
+
textButton,
|
|
1627
|
+
button,
|
|
1628
|
+
items,
|
|
1629
|
+
topPanel,
|
|
1630
|
+
actions,
|
|
1631
|
+
dense = false,
|
|
1632
|
+
open,
|
|
1633
|
+
selectAll = false,
|
|
1634
|
+
getItemLabel
|
|
1635
|
+
}) {
|
|
1636
|
+
var _a, _b;
|
|
1637
|
+
const {
|
|
1638
|
+
anchorEl,
|
|
1639
|
+
open: openMultiselect,
|
|
1640
|
+
selectedItems,
|
|
1641
|
+
filterValue,
|
|
1642
|
+
setSelectedItems,
|
|
1643
|
+
handleOpen,
|
|
1644
|
+
handleClose,
|
|
1645
|
+
handleFilterChange,
|
|
1646
|
+
handleCheckboxToggle,
|
|
1647
|
+
setOpen
|
|
1648
|
+
} = useMultiSelectHandlers();
|
|
1649
|
+
useEffect8(() => {
|
|
1650
|
+
if (open !== void 0) {
|
|
1651
|
+
setOpen(open);
|
|
1652
|
+
}
|
|
1653
|
+
}, [open, setOpen]);
|
|
1654
|
+
useEffect8(() => {
|
|
1655
|
+
setSelectedItems([]);
|
|
1656
|
+
}, [items, setSelectedItems]);
|
|
1657
|
+
const { filteredItems, sortedItems } = useFilteredItems(items, filterValue, getItemLabel, selectedItems);
|
|
1658
|
+
const Icon = useMemo3(() => {
|
|
1659
|
+
var _a2;
|
|
1660
|
+
return getIconMultiSelect((_a2 = button == null ? void 0 : button.icon) != null ? _a2 : "FilterListOutlined");
|
|
1661
|
+
}, [button == null ? void 0 : button.icon]);
|
|
1662
|
+
const handleSelectAll = () => {
|
|
1663
|
+
const allSelected2 = selectedItems.length === filteredItems.length;
|
|
1664
|
+
setSelectedItems(allSelected2 ? [] : filteredItems);
|
|
1665
|
+
};
|
|
1666
|
+
const allSelected = filteredItems.length > 0 && selectedItems.length === filteredItems.length;
|
|
1667
|
+
const resolvedActions = actions != null ? actions : [
|
|
1668
|
+
{ text: "Limpiar", fn: handleClose },
|
|
1669
|
+
{ text: "Aplicar", fn: () => {
|
|
1670
|
+
} }
|
|
1671
|
+
];
|
|
1672
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
1673
|
+
Button6,
|
|
1674
|
+
{
|
|
1675
|
+
"test-id": "multiselect-button",
|
|
1676
|
+
color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
|
|
1677
|
+
onClick: handleOpen,
|
|
1678
|
+
variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
|
|
1679
|
+
size: "small",
|
|
1680
|
+
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React11.createElement(Icon, null) : null,
|
|
1681
|
+
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React11.createElement(Icon, null) : null
|
|
1682
|
+
},
|
|
1683
|
+
capitalize(textButton != null ? textButton : "MultiSelect")
|
|
1684
|
+
), /* @__PURE__ */ React11.createElement(
|
|
1685
|
+
Popover3,
|
|
1686
|
+
{
|
|
1687
|
+
elevation: 8,
|
|
1688
|
+
anchorEl,
|
|
1689
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1690
|
+
open: openMultiselect,
|
|
1691
|
+
onClose: () => setOpen(false)
|
|
1692
|
+
},
|
|
1693
|
+
/* @__PURE__ */ React11.createElement(Stack5, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React11.createElement(Stack5, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React11.createElement(FormControl3, { fullWidth: true, size: "small" }, /* @__PURE__ */ React11.createElement(
|
|
1694
|
+
TextField4,
|
|
1695
|
+
{
|
|
1696
|
+
"data-testid": "multiselect-input",
|
|
1697
|
+
fullWidth: true,
|
|
1698
|
+
size: "small",
|
|
1699
|
+
variant: "outlined",
|
|
1700
|
+
placeholder: "Buscar",
|
|
1701
|
+
value: filterValue,
|
|
1702
|
+
onChange: handleFilterChange,
|
|
1703
|
+
slotProps: {
|
|
1704
|
+
input: {
|
|
1705
|
+
endAdornment: /* @__PURE__ */ React11.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React11.createElement(SearchOutlined, { fontSize: "small" }))
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
))), /* @__PURE__ */ React11.createElement(Stack5, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ React11.createElement(MenuItem3, { dense, onClick: handleSelectAll }, /* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(Checkbox2, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ React11.createElement(
|
|
1710
|
+
MenuItem3,
|
|
1711
|
+
{
|
|
1712
|
+
key: getItemLabel(item),
|
|
1713
|
+
dense,
|
|
1714
|
+
onClick: () => handleCheckboxToggle(item)
|
|
1715
|
+
},
|
|
1716
|
+
/* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(
|
|
1717
|
+
Checkbox2,
|
|
1718
|
+
{
|
|
1719
|
+
checked: selectedItems.includes(item),
|
|
1720
|
+
color: "primary"
|
|
1721
|
+
}
|
|
1722
|
+
)),
|
|
1723
|
+
getItemLabel(item)
|
|
1724
|
+
)) : /* @__PURE__ */ React11.createElement(MenuItem3, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React11.createElement(Stack5, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
|
|
1725
|
+
var _a2;
|
|
1726
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1727
|
+
Button6,
|
|
1728
|
+
{
|
|
1729
|
+
key: index,
|
|
1730
|
+
variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
|
|
1731
|
+
onClick: button2.fn,
|
|
1732
|
+
disabled: (_a2 = button2.disabled) != null ? _a2 : false,
|
|
1733
|
+
size: "small"
|
|
1734
|
+
},
|
|
1735
|
+
capitalize(button2.text)
|
|
1736
|
+
);
|
|
1737
|
+
})))
|
|
1738
|
+
));
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// src/Components/PageHeader/PageHeader.tsx
|
|
1742
|
+
import React12 from "react";
|
|
1743
|
+
import { Stack as Stack6, Typography as Typography10 } from "@mui/material";
|
|
1744
|
+
var PageHeader = ({
|
|
1745
|
+
title,
|
|
1746
|
+
subtitle,
|
|
1747
|
+
actions,
|
|
1748
|
+
buttonBack,
|
|
1749
|
+
fixed,
|
|
1750
|
+
shadow = true
|
|
1751
|
+
}) => {
|
|
1752
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1753
|
+
Stack6,
|
|
1754
|
+
{
|
|
1755
|
+
"data-testid": "main-container",
|
|
1756
|
+
justifyContent: "center",
|
|
1757
|
+
height: 48,
|
|
1758
|
+
position: fixed ? "fixed" : "relative",
|
|
1759
|
+
width: fixed ? "100%" : "inherit",
|
|
1760
|
+
bgcolor: "background.paper",
|
|
1761
|
+
zIndex: 10,
|
|
1762
|
+
sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
|
|
1763
|
+
},
|
|
1764
|
+
/* @__PURE__ */ React12.createElement(Stack6, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React12.createElement(Stack6, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ React12.createElement(Stack6, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ React12.createElement(Typography10, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ React12.createElement(Typography10, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.primary" }, subtitle))), actions && /* @__PURE__ */ React12.createElement(Stack6, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
|
|
1765
|
+
);
|
|
1766
|
+
};
|
|
1767
|
+
|
|
1768
|
+
// src/Components/SCCalendarSwipeable.tsx
|
|
1769
|
+
import React13, { useState as useState7 } from "react";
|
|
1770
|
+
import { Typography as Typography11, IconButton as IconButton7, Box as Box10 } from "@mui/material";
|
|
1771
|
+
import Grid5 from "@mui/material/Grid2";
|
|
1772
|
+
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
1773
|
+
import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
1774
|
+
import { StaticDatePicker } from "@mui/x-date-pickers/StaticDatePicker";
|
|
1775
|
+
import { es } from "date-fns/locale";
|
|
1776
|
+
import { format, startOfWeek, addDays, isSameDay } from "date-fns";
|
|
1777
|
+
import KeyboardDoubleArrowDownIcon from "@mui/icons-material/KeyboardDoubleArrowDown";
|
|
1778
|
+
import KeyboardDoubleArrowUpIcon from "@mui/icons-material/KeyboardDoubleArrowUp";
|
|
1779
|
+
var SCCalendarSwipeable = ({
|
|
1780
|
+
//informativas
|
|
1781
|
+
//apariencia
|
|
1782
|
+
background,
|
|
1783
|
+
//funcionales
|
|
1784
|
+
setState,
|
|
1785
|
+
state
|
|
1786
|
+
}) => {
|
|
1787
|
+
let convertFecha;
|
|
1788
|
+
const [fecha, setFecha] = useState7(/* @__PURE__ */ new Date());
|
|
1789
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState7();
|
|
1790
|
+
const [stateVal, setstateVal] = React13.useState(/* @__PURE__ */ new Date());
|
|
1791
|
+
const [openCalendar, setOpenCalendar] = React13.useState(false);
|
|
1792
|
+
const hoy = /* @__PURE__ */ new Date();
|
|
1793
|
+
const inicioSemana = startOfWeek(fecha, { weekStartsOn: 0 });
|
|
1794
|
+
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays(inicioSemana, i));
|
|
1795
|
+
React13.useEffect(() => {
|
|
1796
|
+
if (fecha != null) {
|
|
1797
|
+
handleConvertFecha(fecha);
|
|
1798
|
+
}
|
|
1799
|
+
}, [fecha]);
|
|
1800
|
+
const handleConvertFecha = (fecha2) => {
|
|
1801
|
+
if (fecha2) {
|
|
1802
|
+
let day = (fecha2.getDate() < 10 ? "0" : "") + fecha2.getDate();
|
|
1803
|
+
let month = (fecha2.getMonth() + 1 < 10 ? "0" : "") + (fecha2.getMonth() + 1);
|
|
1804
|
+
let year = fecha2.getFullYear();
|
|
1805
|
+
convertFecha = day + "/" + month + "/" + year;
|
|
1806
|
+
setState(convertFecha);
|
|
1807
|
+
setFecha(fecha2);
|
|
1808
|
+
}
|
|
1809
|
+
};
|
|
1810
|
+
const toggleCalendar = (newOpen) => () => {
|
|
1811
|
+
setOpenCalendar(newOpen);
|
|
1812
|
+
};
|
|
1813
|
+
const locale = __spreadValues({}, es);
|
|
1814
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React13.createElement(Box10, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React13.createElement(Grid5, { container: true, gap: 0.5, sx: {
|
|
1815
|
+
justifyContent: "space-between",
|
|
1816
|
+
padding: "12px 0px",
|
|
1817
|
+
background: "transparent"
|
|
1818
|
+
} }, diasSemana.map((dia) => /* @__PURE__ */ React13.createElement(Grid5, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React13.createElement(Typography11, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React13.createElement(
|
|
1819
|
+
Box10,
|
|
1820
|
+
{
|
|
1821
|
+
onClick: () => setFecha(dia),
|
|
1822
|
+
sx: {
|
|
1823
|
+
padding: "10px",
|
|
1824
|
+
textAlign: "center",
|
|
1825
|
+
backgroundColor: isSameDay(dia, fecha) ? "#2063a0" : "transparent",
|
|
1826
|
+
cursor: "pointer",
|
|
1827
|
+
borderRadius: "50%",
|
|
1828
|
+
//border: '1px solid lightgray',
|
|
1829
|
+
position: "relative"
|
|
1830
|
+
//width: '36px',
|
|
1831
|
+
//height: '36px',
|
|
1832
|
+
}
|
|
1833
|
+
},
|
|
1834
|
+
/* @__PURE__ */ React13.createElement(Typography11, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
|
|
1835
|
+
)))), /* @__PURE__ */ React13.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React13.createElement(IconButton7, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React13.createElement(KeyboardDoubleArrowDownIcon, null))))) : /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React13.createElement(
|
|
1836
|
+
StaticDatePicker,
|
|
1837
|
+
{
|
|
1838
|
+
orientation: "landscape",
|
|
1839
|
+
openTo: "day",
|
|
1840
|
+
value: fecha,
|
|
1841
|
+
slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
|
|
1842
|
+
sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
|
|
1843
|
+
onChange: (newValue) => setFecha(newValue)
|
|
1844
|
+
}
|
|
1845
|
+
), /* @__PURE__ */ React13.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React13.createElement(IconButton7, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React13.createElement(KeyboardDoubleArrowUpIcon, null))))));
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1848
|
+
// src/Components/SCDataGrid.tsx
|
|
1849
|
+
import React14, { useEffect as useEffect10, useState as useState8 } from "react";
|
|
1850
|
+
import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
|
|
1851
|
+
import { LicenseInfo as LicenseInfo2 } from "@mui/x-license-pro";
|
|
1852
|
+
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
1853
|
+
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
|
1854
|
+
import { useTheme } from "@mui/material/styles";
|
|
1855
|
+
var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) => {
|
|
1856
|
+
LicenseInfo2.setLicenseKey(
|
|
1857
|
+
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
1858
|
+
);
|
|
1859
|
+
const theme = useTheme();
|
|
1860
|
+
const apiRef = useGridApiRef();
|
|
1861
|
+
const isRowSelectable = (params) => params.row.bloqueoChecked == false ? false : true;
|
|
1862
|
+
function generateRandomId() {
|
|
1863
|
+
return Math.floor(Math.random() * 1e6);
|
|
1864
|
+
}
|
|
1865
|
+
const getTreeDataPaths = (row) => {
|
|
1866
|
+
return [
|
|
1867
|
+
row[groupColumns[0].split("[")[1].split("]")[0].trim()],
|
|
1868
|
+
...groupColumns.length > 2 ? [row[groupColumns[1].split("[")[1].split("]")[0].trim()]] : [],
|
|
1869
|
+
`${row[groupColumns[groupColumns.length - 1].split("[")[1].split("]")[0].trim()].toString()}/${generateRandomId()}`
|
|
1870
|
+
];
|
|
1871
|
+
};
|
|
1872
|
+
const groupingColDefs = {
|
|
1873
|
+
field: "grouping",
|
|
1874
|
+
headerName: groupColumns != void 0 ? groupColumns[groupColumns.length - 1].split("[").length == 2 ? groupColumns[groupColumns.length - 1].split("[")[0].trim() : "Agrupador" : "",
|
|
1875
|
+
renderCell: (params) => {
|
|
1876
|
+
var _a;
|
|
1877
|
+
let label = params.value.toString().includes("/") ? params.value.split("/")[0].toString() : params.value.toString();
|
|
1878
|
+
const maxDepth = groupColumns ? groupColumns.length - 2 : 0;
|
|
1879
|
+
if (groupColumns != void 0) {
|
|
1880
|
+
if (params.rowNode.depth === 0) {
|
|
1881
|
+
const textBegin = groupColumns[0] ? groupColumns[0].split("[")[0].trim() : "";
|
|
1882
|
+
const textEnd = groupColumns[0] ? groupColumns[0].split("]")[1].trim() : "";
|
|
1883
|
+
const labelGrouping1 = `${textBegin} ${label} ${textEnd}`;
|
|
1884
|
+
const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
|
|
1885
|
+
const fieldGrouping2 = groupColumns[1].split("[")[1].split("]")[0].trim();
|
|
1886
|
+
const subgroup1 = arrayRows.filter((r) => r[fieldGrouping1].toString() === label).map((r) => r[fieldGrouping2]);
|
|
1887
|
+
const groupedDataLength1 = subgroup1.filter((valor, indiceActual, arreglo) => arreglo.indexOf(valor) === indiceActual);
|
|
1888
|
+
label = `${labelGrouping1} (${groupedDataLength1.length})`;
|
|
1889
|
+
} else if (groupColumns.length > 2 && params.rowNode.depth === 1) {
|
|
1890
|
+
const labelGrouping1 = (_a = params.api.getRowNode(params.rowNode.parent)) == null ? void 0 : _a.groupingKey;
|
|
1891
|
+
const textBegin = groupColumns[1] ? groupColumns[1].split("[")[0] : "";
|
|
1892
|
+
const textEnd = groupColumns[1] ? groupColumns[1].split("]")[1].trim() : "";
|
|
1893
|
+
const labelGrouping2 = `${textBegin} ${label} ${textEnd}`;
|
|
1894
|
+
const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
|
|
1895
|
+
const fieldGrouping2 = groupColumns[1].split("[")[1].split("]")[0].trim();
|
|
1896
|
+
const groupedDataLength2 = arrayRows.filter(
|
|
1897
|
+
(r) => r[fieldGrouping1] === labelGrouping1 && r[fieldGrouping2] === label
|
|
1898
|
+
).length;
|
|
1899
|
+
label = `${labelGrouping2} (${groupedDataLength2})`;
|
|
1900
|
+
} else {
|
|
1901
|
+
label = label;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1905
|
+
"div",
|
|
1906
|
+
{
|
|
1907
|
+
style: {
|
|
1908
|
+
width: "100%",
|
|
1909
|
+
boxSizing: "border-box",
|
|
1910
|
+
overflow: "hidden",
|
|
1911
|
+
textOverflow: "ellipsis",
|
|
1912
|
+
whiteSpace: "nowrap",
|
|
1913
|
+
color: "#101840DE",
|
|
1914
|
+
display: "flex",
|
|
1915
|
+
alignItems: "center",
|
|
1916
|
+
paddingLeft: params.rowNode.depth == 0 ? "5px" : params.rowNode.depth == 1 ? "15px" : "25px",
|
|
1917
|
+
backgroundColor: params.rowNode.type === "group" ? theme.palette.grey[100 + (maxDepth - params.rowNode.depth) * 100] : "#FFFFFF",
|
|
1918
|
+
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
params.rowNode.type === "group" && /* @__PURE__ */ React14.createElement(
|
|
1922
|
+
"span",
|
|
1923
|
+
{
|
|
1924
|
+
style: {
|
|
1925
|
+
cursor: "pointer",
|
|
1926
|
+
marginRight: 8,
|
|
1927
|
+
userSelect: "none"
|
|
1928
|
+
},
|
|
1929
|
+
onClick: (e) => {
|
|
1930
|
+
e.stopPropagation();
|
|
1931
|
+
params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
params.rowNode.childrenExpanded ? /* @__PURE__ */ React14.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React14.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
|
|
1935
|
+
),
|
|
1936
|
+
label
|
|
1937
|
+
);
|
|
1938
|
+
},
|
|
1939
|
+
colSpan: (params) => {
|
|
1940
|
+
const value = String(params);
|
|
1941
|
+
const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
|
|
1942
|
+
const fieldGrouping2 = groupColumns.length > 2 ? groupColumns[1].split("[")[1].split("]")[0].trim() : void 0;
|
|
1943
|
+
let agrupado1 = false;
|
|
1944
|
+
let agrupado2 = false;
|
|
1945
|
+
if (fieldGrouping1 != void 0) {
|
|
1946
|
+
agrupado1 = arrayRows.some(
|
|
1947
|
+
(row) => String(row[fieldGrouping1]) === value
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
if (fieldGrouping2 != void 0) {
|
|
1951
|
+
agrupado2 = arrayRows.some(
|
|
1952
|
+
(row) => String(row[fieldGrouping2]) === value
|
|
1953
|
+
);
|
|
1954
|
+
}
|
|
1955
|
+
if (agrupado1 || agrupado2) {
|
|
1956
|
+
return columns.length + 1;
|
|
1957
|
+
} else {
|
|
1958
|
+
return 1;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
};
|
|
1962
|
+
let validationTreeData = groupColumns ? true : false;
|
|
1963
|
+
let validationCheckboxSelection = checkboxSelection || false;
|
|
1964
|
+
let styleDensity = density || "compact";
|
|
1965
|
+
let styleTopContainerHeight = styleDensity === "compact" ? "26px" : styleDensity === "standard" ? "38px" : styleDensity === "comfortable" ? "60px" : "27px";
|
|
1966
|
+
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 36 : 32;
|
|
1967
|
+
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
1968
|
+
let validationGroupingColDef = groupingColDefs || {};
|
|
1969
|
+
const [groupDataLenght, setGroupDataLengh] = useState8(0);
|
|
1970
|
+
const [pageSize, setPageSize] = useState8(rows);
|
|
1971
|
+
const [arrayRows, setArrayRows] = useState8([]);
|
|
1972
|
+
const [selectionModel, setSelectionModel] = useState8([]);
|
|
1973
|
+
useEffect10(() => {
|
|
1974
|
+
if ((data == null ? void 0 : data.length) > 0) {
|
|
1975
|
+
dataConvertRows(data, void 0);
|
|
1976
|
+
}
|
|
1977
|
+
}, [data]);
|
|
1978
|
+
const dataConvertRows = (data2, columnId) => {
|
|
1979
|
+
let dataConvert = [];
|
|
1980
|
+
if ((data2 == null ? void 0 : data2.length) > 0) {
|
|
1981
|
+
const dataKeys = Object.keys(data2[0]);
|
|
1982
|
+
data2.map((item) => {
|
|
1983
|
+
const newKeys = {};
|
|
1984
|
+
let i = 0;
|
|
1985
|
+
let id = dataConvert.length + 1;
|
|
1986
|
+
for (i = 0; i < dataKeys.length; i++) {
|
|
1987
|
+
newKeys[dataKeys[i]] = item[dataKeys[i]];
|
|
1988
|
+
}
|
|
1989
|
+
newKeys.id = columnId ? item[columnId] : id;
|
|
1990
|
+
dataConvert = [...dataConvert, newKeys];
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1993
|
+
setArrayRows(dataConvert);
|
|
1994
|
+
};
|
|
1995
|
+
const handleSelectionChange = (newSelection) => {
|
|
1996
|
+
if (groupDataLenght > 0 && validationTreeData == true) {
|
|
1997
|
+
let numberGrouped = 0;
|
|
1998
|
+
let idsRowSelectBefore = [];
|
|
1999
|
+
let idRowSelect = [];
|
|
2000
|
+
for (let i = 0; i < newSelection.length; i++) {
|
|
2001
|
+
if (typeof newSelection[i] === "string") {
|
|
2002
|
+
if (newSelection[i].includes("auto-generated-row-null")) {
|
|
2003
|
+
numberGrouped = i;
|
|
2004
|
+
}
|
|
2005
|
+
} else {
|
|
2006
|
+
idsRowSelectBefore.push(newSelection[i]);
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
arrayRows.forEach((array) => {
|
|
2010
|
+
if (typeof newSelection[numberGrouped] === "string") {
|
|
2011
|
+
if (newSelection[numberGrouped].includes(array.name)) {
|
|
2012
|
+
idRowSelect.push(array.id);
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
});
|
|
2016
|
+
if (idRowSelect !== null) {
|
|
2017
|
+
const soloEnArr1 = idsRowSelectBefore.filter((elemento) => !idRowSelect.includes(elemento));
|
|
2018
|
+
const hasCommonElements = idsRowSelectBefore.some((element) => idRowSelect.includes(element));
|
|
2019
|
+
if (hasCommonElements == true) {
|
|
2020
|
+
setSelectionModel([...soloEnArr1]);
|
|
2021
|
+
} else {
|
|
2022
|
+
setSelectionModel([...idsRowSelectBefore, ...idRowSelect]);
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
} else {
|
|
2026
|
+
setSelectionModel([...newSelection]);
|
|
2027
|
+
}
|
|
2028
|
+
};
|
|
2029
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, data && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React14.createElement(
|
|
2030
|
+
DataGridPro,
|
|
2031
|
+
{
|
|
2032
|
+
apiRef,
|
|
2033
|
+
rowHeight: styleRowHeight,
|
|
2034
|
+
rows: arrayRows,
|
|
2035
|
+
columns,
|
|
2036
|
+
density: styleDensity,
|
|
2037
|
+
treeData: validationTreeData,
|
|
2038
|
+
getTreeDataPath: validationTreeData == true ? getTreeDataPaths : void 0,
|
|
2039
|
+
groupingColDef: validationTreeData == true ? validationGroupingColDef : void 0,
|
|
2040
|
+
pagination: true,
|
|
2041
|
+
initialState: {
|
|
2042
|
+
pagination: { paginationModel: { pageSize: rows } }
|
|
2043
|
+
},
|
|
2044
|
+
checkboxSelection: validationCheckboxSelection,
|
|
2045
|
+
rowSelectionModel: selectionModel,
|
|
2046
|
+
onRowSelectionModelChange: (newSelection) => handleSelectionChange(newSelection),
|
|
2047
|
+
isRowSelectable,
|
|
2048
|
+
disableRowSelectionOnClick: true,
|
|
2049
|
+
hideFooter: validationTreeData == true ? true : false,
|
|
2050
|
+
localeText: {
|
|
2051
|
+
noRowsLabel: "No hay filas",
|
|
2052
|
+
columnMenuLabel: "Men\xFA de columna",
|
|
2053
|
+
footerTotalRows: "Filas Totales:",
|
|
2054
|
+
footerRowSelected: (count) => `${count.toLocaleString()} fila(s) seleccionada(s)`,
|
|
2055
|
+
// Ejemplo de traducción dinámica
|
|
2056
|
+
MuiTablePagination: {
|
|
2057
|
+
labelRowsPerPage: "Filas por p\xE1gina:",
|
|
2058
|
+
labelDisplayedRows: ({ from, to, count }) => `${from}\u2013${to} de ${count !== -1 ? count : `m\xE1s de ${to}`}`
|
|
2059
|
+
}
|
|
2060
|
+
},
|
|
2061
|
+
sx: {
|
|
2062
|
+
maxHeight: maxHeight ? `${maxHeight}px` : "none",
|
|
2063
|
+
//overflow: 'auto',
|
|
2064
|
+
"& .MuiDataGrid-filler": {
|
|
2065
|
+
display: "none !important"
|
|
2066
|
+
},
|
|
2067
|
+
"& .MuiDataGrid-footerContainer": {
|
|
2068
|
+
minHeight: "26px !important",
|
|
2069
|
+
height: "26px !important"
|
|
2070
|
+
},
|
|
2071
|
+
"& .MuiTablePagination-toolbar": {
|
|
2072
|
+
minHeight: "25px !important",
|
|
2073
|
+
height: "25px !important"
|
|
2074
|
+
},
|
|
2075
|
+
"& .MuiTablePagination-actions .MuiIconButton-root": {
|
|
2076
|
+
padding: "0px !important"
|
|
2077
|
+
},
|
|
2078
|
+
"&.MuiDataGrid-root": {
|
|
2079
|
+
[`--DataGrid-topContainerHeight`]: `${styleTopContainerHeight} !important`
|
|
2080
|
+
},
|
|
2081
|
+
"MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
|
|
2082
|
+
"--height": "0px !important",
|
|
2083
|
+
"minHeight": "0px !important",
|
|
2084
|
+
"maxHeight": "0px !important"
|
|
2085
|
+
},
|
|
2086
|
+
"& .MuiDataGrid-cell": {
|
|
2087
|
+
padding: "0 !important",
|
|
2088
|
+
background: "white"
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
))));
|
|
2093
|
+
};
|
|
2094
|
+
var SCDataGrid = React14.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
2095
|
+
const isEqual = prevProps.data === nextProps.data && prevProps.columns === nextProps.columns && prevProps.groupColumns === nextProps.groupColumns && prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight && prevProps.density === nextProps.density;
|
|
2096
|
+
return isEqual;
|
|
2097
|
+
});
|
|
2098
|
+
|
|
2099
|
+
// src/Components/EmptyState/EmptyState.tsx
|
|
2100
|
+
import React15 from "react";
|
|
2101
|
+
import { Button as Button8, Stack as Stack7, Typography as Typography12 } from "@mui/material";
|
|
2102
|
+
|
|
2103
|
+
// src/assets/ImgEmptyState/create.svg
|
|
2104
|
+
var create_default = "./create-KZGO2OZA.svg";
|
|
2105
|
+
|
|
2106
|
+
// src/assets/ImgEmptyState/error.svg
|
|
2107
|
+
var error_default = "./error-RUCZUXDN.svg";
|
|
2108
|
+
|
|
2109
|
+
// src/assets/ImgEmptyState/empty.svg
|
|
2110
|
+
var empty_default = "./empty-3NEKE7WO.svg";
|
|
2111
|
+
|
|
2112
|
+
// src/assets/ImgEmptyState/search.svg
|
|
2113
|
+
var search_default = "./search-OKSCVF2W.svg";
|
|
2114
|
+
|
|
2115
|
+
// src/Components/EmptyState/EmptyState.tsx
|
|
2116
|
+
var EmptyStateImageUrls = {
|
|
2117
|
+
create: create_default,
|
|
2118
|
+
error: error_default,
|
|
2119
|
+
noResult: empty_default,
|
|
2120
|
+
search: search_default
|
|
2121
|
+
};
|
|
2122
|
+
var DefaultIcon = ({
|
|
2123
|
+
state = "create",
|
|
2124
|
+
size = "large"
|
|
2125
|
+
}) => {
|
|
2126
|
+
const imageUrl = EmptyStateImageUrls[state];
|
|
2127
|
+
const iconSize = size === "small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
|
|
2128
|
+
return /* @__PURE__ */ React15.createElement("img", { src: imageUrl, alt: state, style: iconSize });
|
|
2129
|
+
};
|
|
2130
|
+
var EmptyState = ({
|
|
2131
|
+
state = "create",
|
|
2132
|
+
size = "large",
|
|
2133
|
+
title,
|
|
2134
|
+
subtitle,
|
|
2135
|
+
actions,
|
|
2136
|
+
containerHeight = "100vh",
|
|
2137
|
+
icon = /* @__PURE__ */ React15.createElement(DefaultIcon, { state, size })
|
|
2138
|
+
}) => {
|
|
2139
|
+
const titleVariant = size === "small" ? "subtitle2" : "h6";
|
|
2140
|
+
const subtitleVariant = size === "small" ? "caption" : "body1";
|
|
2141
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2142
|
+
Stack7,
|
|
2143
|
+
{
|
|
2144
|
+
alignItems: "center",
|
|
2145
|
+
justifyContent: "center",
|
|
2146
|
+
spacing: 2,
|
|
2147
|
+
height: containerHeight,
|
|
2148
|
+
"data-testid": "empty-state-container"
|
|
2149
|
+
},
|
|
2150
|
+
icon && /* @__PURE__ */ React15.createElement(Stack7, null, icon),
|
|
2151
|
+
/* @__PURE__ */ React15.createElement(Stack7, { gap: 0.5 }, /* @__PURE__ */ React15.createElement(Typography12, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React15.createElement(
|
|
2152
|
+
Typography12,
|
|
2153
|
+
{
|
|
2154
|
+
variant: subtitleVariant,
|
|
2155
|
+
textAlign: "center",
|
|
2156
|
+
color: "text.secondary"
|
|
2157
|
+
},
|
|
2158
|
+
subtitle
|
|
2159
|
+
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React15.createElement(
|
|
2160
|
+
Stack7,
|
|
2161
|
+
{
|
|
2162
|
+
direction: "row",
|
|
2163
|
+
spacing: 2,
|
|
2164
|
+
alignItems: "center",
|
|
2165
|
+
justifyContent: "center"
|
|
2166
|
+
},
|
|
2167
|
+
actions.map((action, index) => {
|
|
2168
|
+
var _a, _b, _c, _d;
|
|
2169
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2170
|
+
Button8,
|
|
2171
|
+
{
|
|
2172
|
+
key: index,
|
|
2173
|
+
color: (_a = action.color) != null ? _a : "primary",
|
|
2174
|
+
variant: (_b = action.variant) != null ? _b : "text",
|
|
2175
|
+
size: (_c = action.size) != null ? _c : "small",
|
|
2176
|
+
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React15.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2177
|
+
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React15.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2178
|
+
onClick: action.onClick
|
|
2179
|
+
},
|
|
2180
|
+
capitalize((_d = action.text) != null ? _d : "action")
|
|
2181
|
+
);
|
|
2182
|
+
})
|
|
2183
|
+
))
|
|
2184
|
+
);
|
|
2185
|
+
};
|
|
2186
|
+
|
|
2187
|
+
// src/Components/SCDialog.tsx
|
|
2188
|
+
import React16, { useEffect as useEffect11, useState as useState9 } from "react";
|
|
2189
|
+
import { Button as Button9, Typography as Typography13, Modal as Modal2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton8, Tooltip as Tooltip3, Box as Box11, SvgIcon as SvgIcon5 } from "@mui/material";
|
|
2190
|
+
import Grid6 from "@mui/material/Grid2";
|
|
2191
|
+
import CloseIcon2 from "@mui/icons-material/Close";
|
|
2192
|
+
import * as Muicon5 from "@mui/icons-material";
|
|
2193
|
+
var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }) => {
|
|
2194
|
+
let i = 0;
|
|
2195
|
+
let iconTitleValidation = "";
|
|
2196
|
+
let IconTitle;
|
|
2197
|
+
let ButtonIcon;
|
|
2198
|
+
const [open, setOpen] = useState9(show);
|
|
2199
|
+
useEffect11(() => {
|
|
2200
|
+
if (show) {
|
|
2201
|
+
handleOpen();
|
|
2202
|
+
} else {
|
|
2203
|
+
handleClose();
|
|
2204
|
+
}
|
|
2205
|
+
}, [show]);
|
|
2206
|
+
if ((buttonDialog == null ? void 0 : buttonDialog.icon) != void 0) {
|
|
2207
|
+
if (Muicon5[buttonDialog == null ? void 0 : buttonDialog.icon] == void 0) {
|
|
2208
|
+
ButtonIcon = buttonDialog == null ? void 0 : buttonDialog.icon;
|
|
2209
|
+
} else {
|
|
2210
|
+
ButtonIcon = Muicon5[buttonDialog == null ? void 0 : buttonDialog.icon];
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
actions == null ? void 0 : actions.map(function(option, index, array) {
|
|
2214
|
+
if (option == null ? void 0 : option.icon) {
|
|
2215
|
+
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
2216
|
+
option.icon = Muicon5[option == null ? void 0 : option.icon];
|
|
2217
|
+
} else {
|
|
2218
|
+
option;
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
});
|
|
2222
|
+
if (iconTitle) {
|
|
2223
|
+
if (Muicon5[iconTitle] == void 0) {
|
|
2224
|
+
if (iconTitle && React16.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
2225
|
+
iconTitleValidation = "image";
|
|
2226
|
+
IconTitle = iconTitle;
|
|
2227
|
+
} else {
|
|
2228
|
+
iconTitleValidation = "icon";
|
|
2229
|
+
IconTitle = iconTitle;
|
|
2230
|
+
}
|
|
2231
|
+
} else {
|
|
2232
|
+
iconTitleValidation = "icon";
|
|
2233
|
+
IconTitle = Muicon5[iconTitle];
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
const handleOpen = () => {
|
|
2237
|
+
setOpen(true);
|
|
2238
|
+
if (setShow) {
|
|
2239
|
+
setShow(true);
|
|
2240
|
+
}
|
|
2241
|
+
};
|
|
2242
|
+
const handleClose = () => {
|
|
2243
|
+
setOpen(false);
|
|
2244
|
+
if (setShow) {
|
|
2245
|
+
setShow(false);
|
|
2246
|
+
}
|
|
2247
|
+
};
|
|
2248
|
+
const dialogActions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
2249
|
+
content = content != null ? content : { component: /* @__PURE__ */ React16.createElement(Box11, null, " Aqui va el contenido ") };
|
|
2250
|
+
return /* @__PURE__ */ React16.createElement("div", null, buttonDialog ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React16.createElement(Tooltip3, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React16.createElement(Button9, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" ? /* @__PURE__ */ React16.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React16.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React16.createElement(IconButton8, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React16.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React16.createElement(
|
|
2251
|
+
Dialog,
|
|
2252
|
+
{
|
|
2253
|
+
"data-testid": "dialog-element",
|
|
2254
|
+
open: open || false,
|
|
2255
|
+
onClose: disableClose ? void 0 : handleClose,
|
|
2256
|
+
maxWidth: "xl",
|
|
2257
|
+
sx: {
|
|
2258
|
+
width: "100% !important",
|
|
2259
|
+
"& .MuiBackdrop-root": {
|
|
2260
|
+
backdropFilter: "blur(0px) !important"
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2264
|
+
title && /* @__PURE__ */ React16.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React16.createElement(Grid6, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ React16.createElement(Grid6, { container: true, size: 11, sx: { alignItems: "center" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React16.createElement(Box11, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React16.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React16.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React16.createElement(Grid6, null, /* @__PURE__ */ React16.createElement(Typography13, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), /* @__PURE__ */ React16.createElement(Typography13, { color: "text.secondary", variant: "body2", gutterBottom: true }, subtitle ? subtitle : ""))), disableClose != true ? /* @__PURE__ */ React16.createElement(IconButton8, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React16.createElement(CloseIcon2, null)) : "")),
|
|
2265
|
+
/* @__PURE__ */ React16.createElement(
|
|
2266
|
+
DialogContent,
|
|
2267
|
+
{
|
|
2268
|
+
"data-testid": "dialog-content",
|
|
2269
|
+
dividers: dividers ? dividers : false,
|
|
2270
|
+
sx: {
|
|
2271
|
+
m: 0,
|
|
2272
|
+
padding: "12px 16px 8px 16px",
|
|
2273
|
+
background: background ? background : "white",
|
|
2274
|
+
height: !heightContent ? { xs: "60vh", sm: "70vh", md: "508px" } : heightContent,
|
|
2275
|
+
width: () => {
|
|
2276
|
+
switch (widthContent) {
|
|
2277
|
+
case "extra-small":
|
|
2278
|
+
return { xs: "48vw", md: "33vw" };
|
|
2279
|
+
case "small":
|
|
2280
|
+
return { xs: "54vw", md: "39vw" };
|
|
2281
|
+
case "medium":
|
|
2282
|
+
return { xs: "64vw", md: "56vw" };
|
|
2283
|
+
case "large":
|
|
2284
|
+
return { xs: "74vw", md: "78vw" };
|
|
2285
|
+
case "extra-large":
|
|
2286
|
+
return { xs: "84vw", md: "93vw" };
|
|
2287
|
+
default:
|
|
2288
|
+
return { xs: "64vw", md: "56vw" };
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
},
|
|
2293
|
+
content.url ? /* @__PURE__ */ React16.createElement(
|
|
2294
|
+
"iframe",
|
|
2295
|
+
{
|
|
2296
|
+
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
2297
|
+
id: "inlineFrameExample",
|
|
2298
|
+
title: "Inline Frame Example",
|
|
2299
|
+
src: content.url
|
|
2300
|
+
}
|
|
2301
|
+
) : content.component
|
|
2302
|
+
),
|
|
2303
|
+
dialogActions.length > 0 ? /* @__PURE__ */ React16.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, dialogActions.length >= 3 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
2304
|
+
Button9,
|
|
2305
|
+
{
|
|
2306
|
+
variant: "text",
|
|
2307
|
+
color: dialogActions[0].color || "primary",
|
|
2308
|
+
size: "small",
|
|
2309
|
+
onClick: dialogActions[0].fn,
|
|
2310
|
+
disabled: dialogActions[0].disabled || false,
|
|
2311
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
2312
|
+
},
|
|
2313
|
+
dialogActions[0].text
|
|
2314
|
+
), /* @__PURE__ */ React16.createElement(Box11, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
2315
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2316
|
+
Button9,
|
|
2317
|
+
{
|
|
2318
|
+
key: index + 1,
|
|
2319
|
+
variant: index === dialogActions.length - 2 ? "contained" : "text",
|
|
2320
|
+
color: boton.color || "primary",
|
|
2321
|
+
size: "small",
|
|
2322
|
+
onClick: boton.fn,
|
|
2323
|
+
disabled: boton.disabled || false,
|
|
2324
|
+
startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
|
|
2325
|
+
},
|
|
2326
|
+
boton.text
|
|
2327
|
+
);
|
|
2328
|
+
}))) : dialogActions.map((boton, index) => {
|
|
2329
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2330
|
+
Button9,
|
|
2331
|
+
{
|
|
2332
|
+
key: index,
|
|
2333
|
+
variant: index === dialogActions.length - 1 ? "contained" : "text",
|
|
2334
|
+
color: boton.color || "primary",
|
|
2335
|
+
size: "small",
|
|
2336
|
+
onClick: boton.fn,
|
|
2337
|
+
disabled: boton.disabled || false,
|
|
2338
|
+
startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
|
|
2339
|
+
},
|
|
2340
|
+
boton.text
|
|
2341
|
+
);
|
|
2342
|
+
})) : ""
|
|
2343
|
+
)));
|
|
2344
|
+
};
|
|
2345
|
+
|
|
2346
|
+
// src/Components/SCMenu.tsx
|
|
2347
|
+
import React17 from "react";
|
|
2348
|
+
import { Box as Box12, Typography as Typography14, Paper, Divider as Divider4, MenuList, MenuItem as MenuItem4, ListItemIcon as ListItemIcon4, SvgIcon as SvgIcon6 } from "@mui/material";
|
|
2349
|
+
import Grid7 from "@mui/material/Grid2";
|
|
2350
|
+
|
|
2351
|
+
// src/Components/Hooks/useWindowDimensions.ts
|
|
2352
|
+
import { useState as useState10, useEffect as useEffect12 } from "react";
|
|
2353
|
+
function getWindowDimensions() {
|
|
2354
|
+
const { innerWidth: width, innerHeight: height } = window;
|
|
2355
|
+
return {
|
|
2356
|
+
width,
|
|
2357
|
+
height
|
|
2358
|
+
};
|
|
2359
|
+
}
|
|
2360
|
+
function useWindowDimensions() {
|
|
2361
|
+
const [windowDimensions, setWindowDimensions] = useState10(getWindowDimensions());
|
|
2362
|
+
useEffect12(() => {
|
|
2363
|
+
function handleResize() {
|
|
2364
|
+
setWindowDimensions(getWindowDimensions());
|
|
2365
|
+
}
|
|
2366
|
+
window.addEventListener("resize", handleResize);
|
|
2367
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
2368
|
+
}, []);
|
|
2369
|
+
return windowDimensions;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
// src/Components/SCMenu.tsx
|
|
2373
|
+
import * as Muicon6 from "@mui/icons-material";
|
|
2374
|
+
var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }) => {
|
|
2375
|
+
const { height, width } = useWindowDimensions();
|
|
2376
|
+
const menuSize = widthMenu ? parseInt(widthMenu) : 284;
|
|
2377
|
+
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
2378
|
+
const widthContainer = menuSize + pageSize;
|
|
2379
|
+
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2380
|
+
const [selectedIndex, setSelectedIndex] = React17.useState("1");
|
|
2381
|
+
const [value, setValue] = React17.useState("1");
|
|
2382
|
+
React17.useEffect(() => {
|
|
2383
|
+
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2384
|
+
}, [height]);
|
|
2385
|
+
React17.useEffect(() => {
|
|
2386
|
+
if (defaultOption) {
|
|
2387
|
+
handleClickMenusItem(event, void 0);
|
|
2388
|
+
}
|
|
2389
|
+
}, [defaultOption]);
|
|
2390
|
+
options.map(function(option, index, array) {
|
|
2391
|
+
if (option == null ? void 0 : option.iconLeft) {
|
|
2392
|
+
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
2393
|
+
option.iconLeft = Muicon6[option == null ? void 0 : option.iconLeft];
|
|
2394
|
+
} else {
|
|
2395
|
+
option;
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
if (option == null ? void 0 : option.iconRight) {
|
|
2399
|
+
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
2400
|
+
option.iconRight = Muicon6[option == null ? void 0 : option.iconRight];
|
|
2401
|
+
} else {
|
|
2402
|
+
option;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
const handleClickMenusItem = (event2, index) => {
|
|
2407
|
+
if (defaultOption && index == void 0) {
|
|
2408
|
+
setSelectedIndex(defaultOption);
|
|
2409
|
+
setValue(defaultOption);
|
|
2410
|
+
} else if (index != void 0) {
|
|
2411
|
+
setSelectedIndex(String(index + 1));
|
|
2412
|
+
setValue(String(index + 1));
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Grid7, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React17.createElement(Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React17.createElement(MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
2416
|
+
MenuItem4,
|
|
2417
|
+
{
|
|
2418
|
+
disabled: disable == true ? true : false,
|
|
2419
|
+
key: index,
|
|
2420
|
+
selected: String(index + 1) === selectedIndex,
|
|
2421
|
+
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
2422
|
+
},
|
|
2423
|
+
option.iconLeft ? /* @__PURE__ */ React17.createElement(ListItemIcon4, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React17.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
2424
|
+
/* @__PURE__ */ React17.createElement(Grid7, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React17.createElement(Typography14, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React17.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React17.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
2425
|
+
), option.divider == true ? /* @__PURE__ */ React17.createElement(Divider4, null) : "")))), /* @__PURE__ */ React17.createElement(Grid7, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React17.createElement(Box12, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React17.createElement(Typography14, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
2426
|
+
};
|
|
2427
|
+
|
|
2428
|
+
// src/Components/SCTabs.tsx
|
|
2429
|
+
import React18, { useEffect as useEffect13 } from "react";
|
|
2430
|
+
import { Typography as Typography15, Box as Box13, SvgIcon as SvgIcon7, Tab, Tabs, Badge } from "@mui/material";
|
|
2431
|
+
import TabPanel from "@mui/lab/TabPanel";
|
|
2432
|
+
import TabContext from "@mui/lab/TabContext";
|
|
2433
|
+
import * as Muicon7 from "@mui/icons-material";
|
|
2434
|
+
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
2435
|
+
const [toast, setToast] = React18.useState(null);
|
|
2436
|
+
let i = 0;
|
|
2437
|
+
let j = 0;
|
|
2438
|
+
let k = 0;
|
|
2439
|
+
let l = 0;
|
|
2440
|
+
let validateTypeIcon = true;
|
|
2441
|
+
const [value, setValue] = React18.useState("1");
|
|
2442
|
+
useEffect13(() => {
|
|
2443
|
+
if (defaultOption) {
|
|
2444
|
+
handleChange(event, void 0);
|
|
2445
|
+
}
|
|
2446
|
+
}, [defaultOption]);
|
|
2447
|
+
options.map(function(option) {
|
|
2448
|
+
const optionsLength = options.length;
|
|
2449
|
+
if (option == null ? void 0 : option.iconOrBadge) {
|
|
2450
|
+
if (typeIcon == "icon") {
|
|
2451
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon7 == true) {
|
|
2452
|
+
validateTypeIcon = true;
|
|
2453
|
+
option.iconOrBadge = Muicon7[option == null ? void 0 : option.iconOrBadge];
|
|
2454
|
+
} else {
|
|
2455
|
+
validateTypeIcon = false;
|
|
2456
|
+
setTimeout(() => {
|
|
2457
|
+
setToast({
|
|
2458
|
+
type: "error",
|
|
2459
|
+
title: "Componente SCTabs",
|
|
2460
|
+
subtitle: "En Option todos los iconOrBadge deben ser iconos de MUI, por favor verificar.",
|
|
2461
|
+
time: 50
|
|
2462
|
+
});
|
|
2463
|
+
}, 10);
|
|
2464
|
+
return;
|
|
2465
|
+
}
|
|
2466
|
+
} else if (typeIcon == "badge") {
|
|
2467
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon7 == false) {
|
|
2468
|
+
validateTypeIcon = true;
|
|
2469
|
+
option;
|
|
2470
|
+
} else {
|
|
2471
|
+
validateTypeIcon = false;
|
|
2472
|
+
setTimeout(() => {
|
|
2473
|
+
setToast({
|
|
2474
|
+
type: "error",
|
|
2475
|
+
title: "Componente SCTabs",
|
|
2476
|
+
subtitle: "En Option todos los iconOrBadge deben ser numeros para el badge, por favor verificar.",
|
|
2477
|
+
time: 10
|
|
2478
|
+
});
|
|
2479
|
+
}, 10);
|
|
2480
|
+
return;
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
});
|
|
2485
|
+
const handleChange = (event2, newValue) => {
|
|
2486
|
+
if (defaultOption && newValue == void 0) {
|
|
2487
|
+
setValue(defaultOption);
|
|
2488
|
+
} else if (newValue != void 0) {
|
|
2489
|
+
setValue(newValue);
|
|
2490
|
+
}
|
|
2491
|
+
};
|
|
2492
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React18.createElement(Box13, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React18.createElement(TabContext, { value }, /* @__PURE__ */ React18.createElement(
|
|
2493
|
+
Tabs,
|
|
2494
|
+
{
|
|
2495
|
+
"data-testid": "tab-container",
|
|
2496
|
+
value,
|
|
2497
|
+
onChange: handleChange,
|
|
2498
|
+
variant: variant ? orientation == "vertical" && variant == "fullWidth" ? "standard" : variant : "standard",
|
|
2499
|
+
scrollButtons: scrollButtons == false ? false : true,
|
|
2500
|
+
visibleScrollbar: scrollButtons == false ? true : false,
|
|
2501
|
+
textColor: colorTab,
|
|
2502
|
+
indicatorColor: colorTab,
|
|
2503
|
+
orientation: orientation || "horizontal",
|
|
2504
|
+
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
2505
|
+
},
|
|
2506
|
+
options.map((option) => /* @__PURE__ */ React18.createElement(
|
|
2507
|
+
Tab,
|
|
2508
|
+
{
|
|
2509
|
+
"data-testid": "tab-item",
|
|
2510
|
+
value: String(i = i + 1),
|
|
2511
|
+
key: j = j + 1,
|
|
2512
|
+
label: option.name || "",
|
|
2513
|
+
disabled: option.disabled || false,
|
|
2514
|
+
iconPosition: iconPosition || "end",
|
|
2515
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ React18.createElement(
|
|
2516
|
+
Badge,
|
|
2517
|
+
{
|
|
2518
|
+
sx: {
|
|
2519
|
+
width: "20px",
|
|
2520
|
+
height: "20px",
|
|
2521
|
+
"& .MuiBadge-badge": {
|
|
2522
|
+
top: "10px",
|
|
2523
|
+
right: "10px"
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
variant: "standard",
|
|
2527
|
+
badgeContent: option.iconOrBadge,
|
|
2528
|
+
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
2529
|
+
}
|
|
2530
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ React18.createElement(SvgIcon7, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
2531
|
+
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
2532
|
+
}
|
|
2533
|
+
))
|
|
2534
|
+
), children, options.map((option) => /* @__PURE__ */ React18.createElement(
|
|
2535
|
+
TabPanel,
|
|
2536
|
+
{
|
|
2537
|
+
key: k = k + 1,
|
|
2538
|
+
value: String(l = l + 1),
|
|
2539
|
+
sx: { padding: "16px" }
|
|
2540
|
+
},
|
|
2541
|
+
option.page ? option.page : /* @__PURE__ */ React18.createElement(Typography15, null, "No se ha configurado el componente a visualizar ")
|
|
2542
|
+
)))) : /* @__PURE__ */ React18.createElement(Box13, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React18.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
2543
|
+
};
|
|
2544
|
+
|
|
2545
|
+
// src/Theme/index.ts
|
|
2546
|
+
import { createTheme } from "@mui/material/styles";
|
|
2547
|
+
|
|
2548
|
+
// src/Theme/components.ts
|
|
2549
|
+
import React19 from "react";
|
|
2550
|
+
import {
|
|
2551
|
+
InfoRounded as InfoRounded2,
|
|
2552
|
+
CheckCircleRounded as CheckCircleRounded2,
|
|
2553
|
+
WarningRounded as WarningRounded2,
|
|
2554
|
+
ErrorRounded as ErrorRounded2
|
|
2555
|
+
} from "@mui/icons-material";
|
|
2556
|
+
var components = {
|
|
2557
|
+
MuiSelect: {
|
|
2558
|
+
styleOverrides: {
|
|
2559
|
+
outlined: {
|
|
2560
|
+
paddingBlock: "13px"
|
|
2561
|
+
},
|
|
2562
|
+
iconStandard: {
|
|
2563
|
+
"&.MuiSelect-iconStandard.MuiSvgIcon-root": {
|
|
2564
|
+
top: "calc(50% - .4em)"
|
|
2565
|
+
}
|
|
2566
|
+
},
|
|
2567
|
+
iconFilled: {
|
|
2568
|
+
"&.MuiSelect-iconFilled.MuiSvgIcon-root": {
|
|
2569
|
+
top: "calc(50% - .15em)"
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
iconOutlined: {
|
|
2573
|
+
"&.MuiSelect-iconOutlined.MuiSvgIcon-root": {
|
|
2574
|
+
top: "calc(50% - .35em)"
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2577
|
+
icon: {
|
|
2578
|
+
width: 16,
|
|
2579
|
+
height: 16
|
|
2580
|
+
},
|
|
2581
|
+
root: {
|
|
2582
|
+
fontSize: 13,
|
|
2583
|
+
fontStyle: "normal",
|
|
2584
|
+
fontWeight: 400,
|
|
2585
|
+
letterSpacing: "0.15px",
|
|
2586
|
+
lineHeight: "19px"
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
},
|
|
2590
|
+
MuiSpeedDialIcon: {
|
|
2591
|
+
styleOverrides: {
|
|
2592
|
+
icon: {
|
|
2593
|
+
height: 24,
|
|
2594
|
+
width: 24
|
|
2595
|
+
}
|
|
2596
|
+
}
|
|
2597
|
+
},
|
|
2598
|
+
MuiSpeedDialAction: {
|
|
2599
|
+
styleOverrides: {
|
|
2600
|
+
fab: {
|
|
2601
|
+
height: 40,
|
|
2602
|
+
width: 40
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
},
|
|
2606
|
+
MuiBadge: {
|
|
2607
|
+
styleOverrides: {
|
|
2608
|
+
badge: {
|
|
2609
|
+
fontSize: "11px",
|
|
2610
|
+
fontWeight: 400,
|
|
2611
|
+
lineHeight: "11px",
|
|
2612
|
+
letterSpacing: ".14px"
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
MuiSpeedDial: {
|
|
2617
|
+
styleOverrides: {
|
|
2618
|
+
fab: {
|
|
2619
|
+
height: 56,
|
|
2620
|
+
width: 56
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
MuiAccordion: {
|
|
2625
|
+
styleOverrides: {
|
|
2626
|
+
root: {
|
|
2627
|
+
".MuiButtonBase-root.MuiAccordionSummary-root": {
|
|
2628
|
+
minHeight: 44,
|
|
2629
|
+
height: 44
|
|
2630
|
+
}
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
MuiTabs: {
|
|
2635
|
+
styleOverrides: {
|
|
2636
|
+
root: {
|
|
2637
|
+
minHeight: 40
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2641
|
+
MuiTab: {
|
|
2642
|
+
styleOverrides: {
|
|
2643
|
+
labelIcon: {
|
|
2644
|
+
paddingBlock: 10
|
|
2645
|
+
},
|
|
2646
|
+
root: {
|
|
2647
|
+
textTransform: "none",
|
|
2648
|
+
minHeight: 40
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
MuiDataGrid: {
|
|
2653
|
+
defaultProps: {
|
|
2654
|
+
density: "compact"
|
|
2655
|
+
},
|
|
2656
|
+
styleOverrides: {
|
|
2657
|
+
columnHeader: {
|
|
2658
|
+
variants: [
|
|
2659
|
+
{
|
|
2660
|
+
props: { density: "compact" },
|
|
2661
|
+
style: {
|
|
2662
|
+
"--height": "24px",
|
|
2663
|
+
minHeight: "24px !important",
|
|
2664
|
+
maxHeight: "24px !important"
|
|
2665
|
+
}
|
|
2666
|
+
},
|
|
2667
|
+
{
|
|
2668
|
+
props: { density: "standard" },
|
|
2669
|
+
style: {
|
|
2670
|
+
"--height": "36px",
|
|
2671
|
+
minHeight: "36px !important",
|
|
2672
|
+
maxHeight: "36px !important"
|
|
2673
|
+
}
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
props: { density: "comfortable" },
|
|
2677
|
+
style: {
|
|
2678
|
+
"--height": "52px",
|
|
2679
|
+
minHeight: "52px !important",
|
|
2680
|
+
maxHeight: "52px !important"
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
]
|
|
2684
|
+
},
|
|
2685
|
+
columnSeparator: {
|
|
2686
|
+
variants: [
|
|
2687
|
+
{
|
|
2688
|
+
props: { density: "compact" },
|
|
2689
|
+
style: {
|
|
2690
|
+
"--height": "24px",
|
|
2691
|
+
minHeight: "24px !important",
|
|
2692
|
+
maxHeight: "24px !important"
|
|
2693
|
+
}
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
props: { density: "standard" },
|
|
2697
|
+
style: {
|
|
2698
|
+
"--height": "36px",
|
|
2699
|
+
minHeight: "36px !important",
|
|
2700
|
+
maxHeight: "36px !important"
|
|
2701
|
+
}
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
props: { density: "comfortable" },
|
|
2705
|
+
style: {
|
|
2706
|
+
"--height": "52px",
|
|
2707
|
+
minHeight: "52px !important",
|
|
2708
|
+
maxHeight: "52px !important"
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
]
|
|
2712
|
+
},
|
|
2713
|
+
iconButtonContainer: {
|
|
2714
|
+
fontSize: 16
|
|
2715
|
+
},
|
|
2716
|
+
columnHeaderDraggableContainer: {
|
|
2717
|
+
variants: [
|
|
2718
|
+
{
|
|
2719
|
+
props: { density: "compact" },
|
|
2720
|
+
style: {
|
|
2721
|
+
"--height": "24px",
|
|
2722
|
+
minHeight: "24px !important",
|
|
2723
|
+
maxHeight: "24px !important"
|
|
2724
|
+
}
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
props: { density: "standard" },
|
|
2728
|
+
style: {
|
|
2729
|
+
"--height": "36px",
|
|
2730
|
+
minHeight: "36px !important",
|
|
2731
|
+
maxHeight: "36px !important"
|
|
2732
|
+
}
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
props: { density: "comfortable" },
|
|
2736
|
+
style: {
|
|
2737
|
+
"--height": "52px",
|
|
2738
|
+
minHeight: "52px !important",
|
|
2739
|
+
maxHeight: "52px !important"
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
]
|
|
2743
|
+
},
|
|
2744
|
+
columnHeaderTitle: {
|
|
2745
|
+
fontFamily: "Roboto",
|
|
2746
|
+
fontWeight: 500,
|
|
2747
|
+
fontSize: 13,
|
|
2748
|
+
lineHeight: 1.5,
|
|
2749
|
+
letterSpacing: 0.17
|
|
2750
|
+
},
|
|
2751
|
+
row: {
|
|
2752
|
+
variants: [
|
|
2753
|
+
{
|
|
2754
|
+
props: { density: "compact" },
|
|
2755
|
+
style: {
|
|
2756
|
+
"--height": "22px",
|
|
2757
|
+
minHeight: "22px !important",
|
|
2758
|
+
maxHeight: "22px !important"
|
|
2759
|
+
}
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
props: { density: "standard" },
|
|
2763
|
+
style: {
|
|
2764
|
+
"--height": "28px",
|
|
2765
|
+
minHeight: "28px !important",
|
|
2766
|
+
maxHeight: "28px !important"
|
|
2767
|
+
}
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
props: { density: "comfortable" },
|
|
2771
|
+
style: {
|
|
2772
|
+
"--height": "48px",
|
|
2773
|
+
minHeight: "48px !important",
|
|
2774
|
+
maxHeight: "48px !important"
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
]
|
|
2778
|
+
},
|
|
2779
|
+
cell: {
|
|
2780
|
+
fontFamily: "Roboto",
|
|
2781
|
+
fontWeight: 300,
|
|
2782
|
+
fontSize: 12,
|
|
2783
|
+
lineHeight: 1.5,
|
|
2784
|
+
letterSpacing: 0.17,
|
|
2785
|
+
display: "flex",
|
|
2786
|
+
alignItems: "center",
|
|
2787
|
+
variants: [
|
|
2788
|
+
{
|
|
2789
|
+
props: { density: "compact" },
|
|
2790
|
+
style: {
|
|
2791
|
+
"--height": "22px",
|
|
2792
|
+
minHeight: "22px !important",
|
|
2793
|
+
maxHeight: "22px !important"
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
{
|
|
2797
|
+
props: { density: "standard" },
|
|
2798
|
+
style: {
|
|
2799
|
+
"--height": "28px",
|
|
2800
|
+
minHeight: "28px !important",
|
|
2801
|
+
maxHeight: "28px !important"
|
|
2802
|
+
}
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
props: { density: "comfortable" },
|
|
2806
|
+
style: {
|
|
2807
|
+
"--height": "48px",
|
|
2808
|
+
minHeight: "48px !important",
|
|
2809
|
+
maxHeight: "48px !important"
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
],
|
|
2813
|
+
// COMPONENTES DENTRO DE CELDAS
|
|
2814
|
+
".MuiButtonBase-root": {
|
|
2815
|
+
lineHeight: 0,
|
|
2816
|
+
textTransform: "capitalize"
|
|
2817
|
+
},
|
|
2818
|
+
// CELDA ENFOCADA
|
|
2819
|
+
".MuiDataGrid-cell": {
|
|
2820
|
+
"&:focus": {
|
|
2821
|
+
outline: "transparent",
|
|
2822
|
+
borderWidth: 0
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
// BOTOM MENU EN LAS CABECERA DE CADA COLUMNA
|
|
2827
|
+
menuIconButton: {
|
|
2828
|
+
svg: {
|
|
2829
|
+
fontSize: "16px"
|
|
2830
|
+
}
|
|
2831
|
+
},
|
|
2832
|
+
menu: {
|
|
2833
|
+
svg: {
|
|
2834
|
+
fontSize: "16px !important"
|
|
2835
|
+
},
|
|
2836
|
+
".MuiMenuItem-root": {
|
|
2837
|
+
minHeight: "28px",
|
|
2838
|
+
height: "28px"
|
|
2839
|
+
}
|
|
2840
|
+
},
|
|
2841
|
+
pinnedRows: {
|
|
2842
|
+
borderTop: "1px solid rgba(228, 236, 244, 1)"
|
|
2843
|
+
},
|
|
2844
|
+
root: {
|
|
2845
|
+
// FONT-SIZE DE CELDA EN MODO EDICION
|
|
2846
|
+
".MuiInputBase-root": {
|
|
2847
|
+
fontFamily: "Roboto",
|
|
2848
|
+
fontWeight: 300,
|
|
2849
|
+
fontSize: 12,
|
|
2850
|
+
letterSpacing: 0.17,
|
|
2851
|
+
borderRadius: "0px"
|
|
2852
|
+
},
|
|
2853
|
+
// CELDA FOCUS
|
|
2854
|
+
".Mui-focused, .MuiOutlinedInput-notchedOutline": {
|
|
2855
|
+
borderWidth: "0px !important"
|
|
2856
|
+
},
|
|
2857
|
+
// TAMAÑO PEQUEÑO
|
|
2858
|
+
"&.MuiDataGrid-root--densityCompact": {
|
|
2859
|
+
".MuiSvgIcon-root": {
|
|
2860
|
+
fontSize: 16
|
|
2861
|
+
},
|
|
2862
|
+
".MuiDataGrid-cellCheckbox": {
|
|
2863
|
+
".MuiButtonBase-root": {
|
|
2864
|
+
padding: 4
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
},
|
|
2871
|
+
MuiRating: {
|
|
2872
|
+
defaultProps: {
|
|
2873
|
+
size: "small"
|
|
2874
|
+
},
|
|
2875
|
+
styleOverrides: {
|
|
2876
|
+
sizeSmall: {
|
|
2877
|
+
fontSize: 18
|
|
2878
|
+
},
|
|
2879
|
+
sizeMedium: {
|
|
2880
|
+
fontSize: 24
|
|
2881
|
+
},
|
|
2882
|
+
sizeLarge: {
|
|
2883
|
+
fontSize: 30
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
},
|
|
2887
|
+
MuiDrawer: {
|
|
2888
|
+
styleOverrides: {
|
|
2889
|
+
root: {
|
|
2890
|
+
boxShadow: "0px 3px 1px -2px rgba(24, 39, 75, 0.20), 0px 2px 2px 0px rgba(24, 39, 75, 0.14), 0px 1px 5px 0px rgba(24, 39, 75, 0.12)"
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
},
|
|
2894
|
+
MuiTooltip: {
|
|
2895
|
+
styleOverrides: {
|
|
2896
|
+
tooltip: {
|
|
2897
|
+
backgroundColor: "#424242"
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
MuiDialog: {
|
|
2902
|
+
styleOverrides: {
|
|
2903
|
+
root: ({ theme }) => ({
|
|
2904
|
+
boxShadow: "0px 11px 15px -7px rgba(24, 39, 75, 0.2), 0px 24px 38px 3px rgba(24, 39, 75, 0.14), 0px 9px 46px 8px rgba(24, 39, 75, 0.12)",
|
|
2905
|
+
"& .MuiBackdrop-root": {
|
|
2906
|
+
backgroundColor: "#00000047"
|
|
2907
|
+
}
|
|
2908
|
+
})
|
|
2909
|
+
}
|
|
2910
|
+
},
|
|
2911
|
+
MuiBackdrop: {
|
|
2912
|
+
styleOverrides: {
|
|
2913
|
+
root: {
|
|
2914
|
+
backgroundColor: "transparent"
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
},
|
|
2918
|
+
MuiDialogTitle: {
|
|
2919
|
+
styleOverrides: {
|
|
2920
|
+
root: {
|
|
2921
|
+
padding: "8px 16px !important"
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
},
|
|
2925
|
+
MuiDialogContent: {
|
|
2926
|
+
styleOverrides: {
|
|
2927
|
+
root: {
|
|
2928
|
+
padding: "8px 16px !important"
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
},
|
|
2932
|
+
MuiDialogActions: {
|
|
2933
|
+
styleOverrides: {
|
|
2934
|
+
root: {
|
|
2935
|
+
padding: "12px 16px !important"
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
},
|
|
2939
|
+
MuiCheckbox: {
|
|
2940
|
+
variants: [
|
|
2941
|
+
{
|
|
2942
|
+
props: { size: "large" },
|
|
2943
|
+
style: {
|
|
2944
|
+
padding: 9,
|
|
2945
|
+
"& .MuiSvgIcon-fontSizeLarge": {
|
|
2946
|
+
height: 24,
|
|
2947
|
+
width: 24,
|
|
2948
|
+
fontSize: 24
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
props: { size: "small" },
|
|
2954
|
+
style: {
|
|
2955
|
+
padding: 3
|
|
2956
|
+
}
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
props: { size: "medium" },
|
|
2960
|
+
style: {
|
|
2961
|
+
padding: 4
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
],
|
|
2965
|
+
defaultProps: {
|
|
2966
|
+
size: "small"
|
|
2967
|
+
}
|
|
2968
|
+
},
|
|
2969
|
+
MuiToggleButton: {
|
|
2970
|
+
styleOverrides: {
|
|
2971
|
+
sizeSmall: {
|
|
2972
|
+
height: 32
|
|
2973
|
+
},
|
|
2974
|
+
sizeMedium: {
|
|
2975
|
+
height: 38
|
|
2976
|
+
},
|
|
2977
|
+
sizeLarge: {
|
|
2978
|
+
height: 48
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
},
|
|
2982
|
+
MuiChip: {
|
|
2983
|
+
defaultProps: {
|
|
2984
|
+
size: "small",
|
|
2985
|
+
variant: "standard",
|
|
2986
|
+
color: "default"
|
|
2987
|
+
},
|
|
2988
|
+
styleOverrides: {
|
|
2989
|
+
icon: {
|
|
2990
|
+
opacity: "70%"
|
|
2991
|
+
},
|
|
2992
|
+
deleteIconSmall: {
|
|
2993
|
+
height: 16,
|
|
2994
|
+
width: 16
|
|
2995
|
+
},
|
|
2996
|
+
deleteIconMedium: {
|
|
2997
|
+
height: 20,
|
|
2998
|
+
width: 20
|
|
2999
|
+
},
|
|
3000
|
+
sizeSmall: {
|
|
3001
|
+
height: 16
|
|
3002
|
+
},
|
|
3003
|
+
sizeMedium: {
|
|
3004
|
+
height: 20
|
|
3005
|
+
},
|
|
3006
|
+
avatarSmall: {
|
|
3007
|
+
height: 14,
|
|
3008
|
+
width: 14
|
|
3009
|
+
},
|
|
3010
|
+
avatarMedium: {
|
|
3011
|
+
height: 18,
|
|
3012
|
+
width: 18
|
|
3013
|
+
},
|
|
3014
|
+
iconColorPrimary: ({ theme }) => ({
|
|
3015
|
+
color: theme.palette.primary.main
|
|
3016
|
+
}),
|
|
3017
|
+
colorDefault: ({ theme }) => ({
|
|
3018
|
+
backgroundColor: theme.palette.default.main,
|
|
3019
|
+
color: theme.palette.default.contrastText
|
|
3020
|
+
}),
|
|
3021
|
+
deleteIcon: ({ theme }) => ({
|
|
3022
|
+
variants: [
|
|
3023
|
+
{
|
|
3024
|
+
props: { variant: "filled" },
|
|
3025
|
+
style: {
|
|
3026
|
+
color: theme.palette.background.paper,
|
|
3027
|
+
opacity: "50%"
|
|
3028
|
+
}
|
|
3029
|
+
},
|
|
3030
|
+
{
|
|
3031
|
+
props: { variant: "standard" },
|
|
3032
|
+
style: {
|
|
3033
|
+
color: theme.palette.default.contrastText,
|
|
3034
|
+
opacity: "30%",
|
|
3035
|
+
":hover": {
|
|
3036
|
+
color: theme.palette.default.contrastText,
|
|
3037
|
+
opacity: "30%"
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
props: { variant: "outlined" },
|
|
3043
|
+
style: {
|
|
3044
|
+
color: theme.palette.action.active,
|
|
3045
|
+
opacity: "54%",
|
|
3046
|
+
":hover": {
|
|
3047
|
+
color: theme.palette.action.active,
|
|
3048
|
+
opacity: "54%"
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
},
|
|
3052
|
+
{
|
|
3053
|
+
props: { variant: "filled", color: "default" },
|
|
3054
|
+
style: {
|
|
3055
|
+
color: theme.palette.default.contrastText,
|
|
3056
|
+
opacity: "30%"
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
]
|
|
3060
|
+
}),
|
|
3061
|
+
avatar: ({ theme }) => ({
|
|
3062
|
+
lineHeight: 1.8,
|
|
3063
|
+
variants: [
|
|
3064
|
+
{
|
|
3065
|
+
props: { variant: "filled" },
|
|
3066
|
+
style: {
|
|
3067
|
+
backgroundColor: theme.palette.background.paper,
|
|
3068
|
+
opacity: "70%",
|
|
3069
|
+
color: theme.palette.default.contrastText
|
|
3070
|
+
}
|
|
3071
|
+
},
|
|
3072
|
+
{
|
|
3073
|
+
props: { variant: "standard" },
|
|
3074
|
+
style: {
|
|
3075
|
+
backgroundColor: theme.palette.default.contrastText,
|
|
3076
|
+
color: theme.palette.primary.contrastText
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
{
|
|
3080
|
+
props: { variant: "outlined", color: "error" },
|
|
3081
|
+
style: {
|
|
3082
|
+
backgroundColor: theme.palette.error.main,
|
|
3083
|
+
color: theme.palette.background.paper
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3086
|
+
{
|
|
3087
|
+
props: { variant: "outlined", color: "success" },
|
|
3088
|
+
style: {
|
|
3089
|
+
backgroundColor: theme.palette.success.main,
|
|
3090
|
+
color: theme.palette.background.paper
|
|
3091
|
+
}
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
props: { variant: "outlined", color: "info" },
|
|
3095
|
+
style: {
|
|
3096
|
+
backgroundColor: theme.palette.info.main,
|
|
3097
|
+
color: theme.palette.background.paper
|
|
3098
|
+
}
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
props: { variant: "outlined", color: "warning" },
|
|
3102
|
+
style: {
|
|
3103
|
+
backgroundColor: theme.palette.warning.main,
|
|
3104
|
+
color: theme.palette.background.paper
|
|
3105
|
+
}
|
|
3106
|
+
},
|
|
3107
|
+
{
|
|
3108
|
+
props: { variant: "outlined", color: "default" },
|
|
3109
|
+
style: {
|
|
3110
|
+
backgroundColor: theme.palette.grey[400],
|
|
3111
|
+
color: theme.palette.background.paper
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
props: { variant: "filled", color: "default" },
|
|
3116
|
+
style: {
|
|
3117
|
+
backgroundColor: theme.palette.default.contrastText,
|
|
3118
|
+
color: theme.palette.background.paper
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
]
|
|
3122
|
+
}),
|
|
3123
|
+
label: ({ theme }) => __spreadValues({}, theme.typography.caption),
|
|
3124
|
+
root: ({ theme }) => ({
|
|
3125
|
+
height: "inherit",
|
|
3126
|
+
borderRadius: 4,
|
|
3127
|
+
variants: [
|
|
3128
|
+
{
|
|
3129
|
+
props: { variant: "outlined", color: "default" },
|
|
3130
|
+
style: {
|
|
3131
|
+
border: `1px solid ${theme.palette.grey[400]}`,
|
|
3132
|
+
backgroundColor: "transparent ",
|
|
3133
|
+
color: theme.palette.default.contrastText,
|
|
3134
|
+
":hover": {
|
|
3135
|
+
backgroundColor: theme.palette.default.main
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
props: { variant: "standard", color: "default" },
|
|
3141
|
+
style: {
|
|
3142
|
+
backgroundColor: theme.palette.default.main,
|
|
3143
|
+
color: theme.palette.default.contrastText,
|
|
3144
|
+
":hover": {
|
|
3145
|
+
backgroundColor: theme.palette.default.dark
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
},
|
|
3149
|
+
{
|
|
3150
|
+
props: { variant: "filled", color: "default" },
|
|
3151
|
+
style: {
|
|
3152
|
+
backgroundColor: theme.palette.grey[50],
|
|
3153
|
+
color: theme.palette.default.contrastText,
|
|
3154
|
+
":hover": {
|
|
3155
|
+
backgroundColor: theme.palette.grey[100]
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
props: { variant: "filled", color: "default" },
|
|
3161
|
+
style: {
|
|
3162
|
+
backgroundColor: theme.palette.grey[50],
|
|
3163
|
+
color: theme.palette.default.contrastText,
|
|
3164
|
+
":hover": {
|
|
3165
|
+
backgroundColor: theme.palette.grey[100]
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
props: { variant: "standard", avatar: true },
|
|
3171
|
+
style: {
|
|
3172
|
+
backgroundColor: theme.palette.default.contrastText,
|
|
3173
|
+
color: theme.palette.default.contrastText
|
|
3174
|
+
}
|
|
3175
|
+
},
|
|
3176
|
+
{
|
|
3177
|
+
props: { variant: "standard" },
|
|
3178
|
+
style: {
|
|
3179
|
+
backgroundColor: theme.palette.default.contrastText,
|
|
3180
|
+
color: theme.palette.default.contrastText
|
|
3181
|
+
}
|
|
3182
|
+
},
|
|
3183
|
+
{
|
|
3184
|
+
props: { variant: "standard", color: "primary" },
|
|
3185
|
+
style: {
|
|
3186
|
+
backgroundColor: theme.palette.chipPrimary.main,
|
|
3187
|
+
":hover": {
|
|
3188
|
+
backgroundColor: theme.palette.chipPrimary.dark
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
},
|
|
3192
|
+
{
|
|
3193
|
+
props: { variant: "standard", color: "secondary" },
|
|
3194
|
+
style: {
|
|
3195
|
+
backgroundColor: theme.palette.chipSecondary.main,
|
|
3196
|
+
":hover": {
|
|
3197
|
+
backgroundColor: theme.palette.chipSecondary.dark
|
|
3198
|
+
}
|
|
3199
|
+
}
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
props: { variant: "standard", color: "info" },
|
|
3203
|
+
style: {
|
|
3204
|
+
backgroundColor: theme.palette.chipInfo.main,
|
|
3205
|
+
":hover": {
|
|
3206
|
+
backgroundColor: theme.palette.chipInfo.dark
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
},
|
|
3210
|
+
{
|
|
3211
|
+
props: { variant: "standard", color: "error" },
|
|
3212
|
+
style: {
|
|
3213
|
+
backgroundColor: theme.palette.chipError.main,
|
|
3214
|
+
":hover": {
|
|
3215
|
+
backgroundColor: theme.palette.chipError.dark
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
props: { variant: "standard", color: "success" },
|
|
3221
|
+
style: {
|
|
3222
|
+
backgroundColor: theme.palette.chipSuccess.main,
|
|
3223
|
+
":hover": {
|
|
3224
|
+
backgroundColor: theme.palette.chipSuccess.dark
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
},
|
|
3228
|
+
{
|
|
3229
|
+
props: { variant: "standard", color: "warning" },
|
|
3230
|
+
style: {
|
|
3231
|
+
backgroundColor: theme.palette.chipWarning.main,
|
|
3232
|
+
":hover": {
|
|
3233
|
+
backgroundColor: theme.palette.chipWarning.dark
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
]
|
|
3238
|
+
})
|
|
3239
|
+
}
|
|
3240
|
+
},
|
|
3241
|
+
MuiAvatar: {
|
|
3242
|
+
styleOverrides: {
|
|
3243
|
+
root: {
|
|
3244
|
+
display: "flex",
|
|
3245
|
+
alignContent: "center"
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
},
|
|
3249
|
+
MuiAlert: {
|
|
3250
|
+
defaultProps: {
|
|
3251
|
+
iconMapping: {
|
|
3252
|
+
success: React19.createElement(CheckCircleRounded2),
|
|
3253
|
+
error: React19.createElement(ErrorRounded2),
|
|
3254
|
+
warning: React19.createElement(WarningRounded2),
|
|
3255
|
+
info: React19.createElement(InfoRounded2)
|
|
3256
|
+
}
|
|
3257
|
+
},
|
|
3258
|
+
variants: [
|
|
3259
|
+
{
|
|
3260
|
+
props: { variant: "filled" },
|
|
3261
|
+
style: {
|
|
3262
|
+
color: "#fff"
|
|
3263
|
+
}
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
props: { variant: "outlined" },
|
|
3267
|
+
style: {
|
|
3268
|
+
padding: "7px 12px 7px 12px"
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
],
|
|
3272
|
+
styleOverrides: {
|
|
3273
|
+
message: ({ theme }) => ({
|
|
3274
|
+
padding: "0px 4px",
|
|
3275
|
+
minWidth: 0,
|
|
3276
|
+
variants: [
|
|
3277
|
+
{
|
|
3278
|
+
props: { variant: "standard" },
|
|
3279
|
+
style: {
|
|
3280
|
+
color: theme.palette.text.primary
|
|
3281
|
+
}
|
|
3282
|
+
},
|
|
3283
|
+
{
|
|
3284
|
+
props: { variant: "outlined" },
|
|
3285
|
+
style: {
|
|
3286
|
+
color: theme.palette.text.primary
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
]
|
|
3290
|
+
}),
|
|
3291
|
+
icon: ({ theme }) => ({
|
|
3292
|
+
padding: "4px",
|
|
3293
|
+
marginRight: 0,
|
|
3294
|
+
display: "flex",
|
|
3295
|
+
alignItems: "center",
|
|
3296
|
+
borderRadius: 100,
|
|
3297
|
+
variants: [
|
|
3298
|
+
{
|
|
3299
|
+
props: { variant: "standard", color: "success" },
|
|
3300
|
+
style: {
|
|
3301
|
+
backgroundColor: theme.palette.success[100]
|
|
3302
|
+
}
|
|
3303
|
+
},
|
|
3304
|
+
{
|
|
3305
|
+
props: { variant: "standard", color: "error" },
|
|
3306
|
+
style: {
|
|
3307
|
+
backgroundColor: theme.palette.error[100]
|
|
3308
|
+
}
|
|
3309
|
+
},
|
|
3310
|
+
{
|
|
3311
|
+
props: { variant: "standard", color: "info" },
|
|
3312
|
+
style: {
|
|
3313
|
+
backgroundColor: theme.palette.info[100]
|
|
3314
|
+
}
|
|
3315
|
+
},
|
|
3316
|
+
{
|
|
3317
|
+
props: { variant: "standard", color: "warning" },
|
|
3318
|
+
style: {
|
|
3319
|
+
backgroundColor: theme.palette.warning[100]
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
]
|
|
3323
|
+
}),
|
|
3324
|
+
action: ({ theme }) => ({
|
|
3325
|
+
display: "flex",
|
|
3326
|
+
gap: 1.5,
|
|
3327
|
+
padding: "0px",
|
|
3328
|
+
variants: [
|
|
3329
|
+
{
|
|
3330
|
+
props: { variant: "standard" },
|
|
3331
|
+
style: {
|
|
3332
|
+
color: theme.palette.action.active
|
|
3333
|
+
}
|
|
3334
|
+
},
|
|
3335
|
+
{
|
|
3336
|
+
props: { variant: "outlined" },
|
|
3337
|
+
style: {
|
|
3338
|
+
color: theme.palette.action.active
|
|
3339
|
+
}
|
|
3340
|
+
}
|
|
3341
|
+
]
|
|
3342
|
+
}),
|
|
3343
|
+
root: {
|
|
3344
|
+
padding: "8px 12px 8px 12px",
|
|
3345
|
+
borderRadius: "8px",
|
|
3346
|
+
display: "flex",
|
|
3347
|
+
alignItems: "center",
|
|
3348
|
+
gap: 1.5,
|
|
3349
|
+
minWidth: "296px"
|
|
3350
|
+
}
|
|
3351
|
+
}
|
|
3352
|
+
},
|
|
3353
|
+
MuiAlertTitle: {
|
|
3354
|
+
defaultProps: {
|
|
3355
|
+
variant: "subtitle2"
|
|
3356
|
+
},
|
|
3357
|
+
styleOverrides: {
|
|
3358
|
+
root: {
|
|
3359
|
+
marginBottom: 0,
|
|
3360
|
+
marginTop: 2.5
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
},
|
|
3364
|
+
MuiButton: {
|
|
3365
|
+
styleOverrides: {
|
|
3366
|
+
root: {
|
|
3367
|
+
fontFamily: "Roboto",
|
|
3368
|
+
textTransform: "unset",
|
|
3369
|
+
fontWeightLight: 300,
|
|
3370
|
+
fontSize: "13px",
|
|
3371
|
+
lineHeight: "normal",
|
|
3372
|
+
"@media(max-width: 885px)": {
|
|
3373
|
+
fontSize: 14
|
|
3374
|
+
}
|
|
3375
|
+
},
|
|
3376
|
+
startIcon: {
|
|
3377
|
+
marginLeft: 2
|
|
3378
|
+
},
|
|
3379
|
+
endIcon: {
|
|
3380
|
+
marginRight: 2
|
|
3381
|
+
},
|
|
3382
|
+
sizeSmall: {
|
|
3383
|
+
height: 26,
|
|
3384
|
+
".MuiSvgIcon-fontSizeSmall": {
|
|
3385
|
+
height: 16,
|
|
3386
|
+
width: 16
|
|
3387
|
+
},
|
|
3388
|
+
".MuiSvgIcon-fontSizeMedium": {
|
|
3389
|
+
height: 18,
|
|
3390
|
+
width: 18
|
|
3391
|
+
},
|
|
3392
|
+
".MuiSvgIcon-fontSizeLarge": {
|
|
3393
|
+
height: 20,
|
|
3394
|
+
width: 20
|
|
3395
|
+
}
|
|
3396
|
+
},
|
|
3397
|
+
sizeMedium: {
|
|
3398
|
+
height: 32,
|
|
3399
|
+
".MuiSvgIcon-fontSizeSmall": {
|
|
3400
|
+
height: 16,
|
|
3401
|
+
width: 16
|
|
3402
|
+
},
|
|
3403
|
+
".MuiSvgIcon-fontSizeMedium": {
|
|
3404
|
+
height: 18,
|
|
3405
|
+
width: 18
|
|
3406
|
+
},
|
|
3407
|
+
".MuiSvgIcon-fontSizeLarge": {
|
|
3408
|
+
height: 20,
|
|
3409
|
+
width: 20
|
|
3410
|
+
}
|
|
3411
|
+
},
|
|
3412
|
+
sizeLarge: {
|
|
3413
|
+
height: 38,
|
|
3414
|
+
".MuiSvgIcon-fontSizeSmall": {
|
|
3415
|
+
height: 16,
|
|
3416
|
+
width: 16
|
|
3417
|
+
},
|
|
3418
|
+
"&.MuiSvgIcon-fontSizeMedium": {
|
|
3419
|
+
height: 18,
|
|
3420
|
+
width: 18
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
},
|
|
3425
|
+
MuiButtonGroup: {
|
|
3426
|
+
defaultProps: {
|
|
3427
|
+
size: "small"
|
|
3428
|
+
}
|
|
3429
|
+
},
|
|
3430
|
+
MuiFab: {
|
|
3431
|
+
defaultProps: {
|
|
3432
|
+
size: "small"
|
|
3433
|
+
},
|
|
3434
|
+
styleOverrides: {
|
|
3435
|
+
circular: {
|
|
3436
|
+
boxShadow: "0px 1px 18px 0px rgba(24, 39, 75, 0.12), 0px 6px 10px 0px rgba(24, 39, 75, 0.14), 0px 3px 5px -1px rgba(24, 39, 75, 0.20)",
|
|
3437
|
+
sizeSmall: {
|
|
3438
|
+
height: 36,
|
|
3439
|
+
width: 36,
|
|
3440
|
+
svg: {
|
|
3441
|
+
height: 20,
|
|
3442
|
+
width: 20
|
|
3443
|
+
}
|
|
3444
|
+
},
|
|
3445
|
+
sizeMedium: {
|
|
3446
|
+
height: 48,
|
|
3447
|
+
width: 48,
|
|
3448
|
+
svg: {
|
|
3449
|
+
height: 22,
|
|
3450
|
+
width: 22
|
|
3451
|
+
}
|
|
3452
|
+
},
|
|
3453
|
+
sizeLarge: {
|
|
3454
|
+
height: 56,
|
|
3455
|
+
width: 56,
|
|
3456
|
+
svg: {
|
|
3457
|
+
height: 24,
|
|
3458
|
+
width: 24
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
},
|
|
3462
|
+
extended: {
|
|
3463
|
+
gap: 1,
|
|
3464
|
+
boxShadow: " 0px 1px 18px 0px rgba(24, 39, 75, 0.12), 0px 6px 10px 0px rgba(24, 39, 75, 0.14), 0px 3px 5px -1px rgba(24, 39, 75, 0.20)",
|
|
3465
|
+
sizeSmall: {
|
|
3466
|
+
height: 32,
|
|
3467
|
+
svg: {
|
|
3468
|
+
height: 20,
|
|
3469
|
+
width: 20,
|
|
3470
|
+
marginRight: 4
|
|
3471
|
+
}
|
|
3472
|
+
},
|
|
3473
|
+
sizeMedium: {
|
|
3474
|
+
height: 38,
|
|
3475
|
+
svg: {
|
|
3476
|
+
height: 22,
|
|
3477
|
+
width: 22,
|
|
3478
|
+
marginRight: 4
|
|
3479
|
+
}
|
|
3480
|
+
},
|
|
3481
|
+
sizeLarge: {
|
|
3482
|
+
height: 48,
|
|
3483
|
+
svg: {
|
|
3484
|
+
height: 24,
|
|
3485
|
+
width: 24,
|
|
3486
|
+
marginRight: 4
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
},
|
|
3490
|
+
root: {
|
|
3491
|
+
textTransform: "capitalize"
|
|
3492
|
+
}
|
|
3493
|
+
}
|
|
3494
|
+
},
|
|
3495
|
+
MuiFormControl: {
|
|
3496
|
+
defaultProps: {
|
|
3497
|
+
size: "small",
|
|
3498
|
+
margin: "none"
|
|
3499
|
+
}
|
|
3500
|
+
},
|
|
3501
|
+
MuiFormHelperText: {
|
|
3502
|
+
defaultProps: {
|
|
3503
|
+
margin: "dense"
|
|
3504
|
+
}
|
|
3505
|
+
},
|
|
3506
|
+
MuiSvgIcon: {
|
|
3507
|
+
styleOverrides: {
|
|
3508
|
+
fontSizeLarge: {
|
|
3509
|
+
width: 35,
|
|
3510
|
+
height: 35,
|
|
3511
|
+
fontSize: 35
|
|
3512
|
+
},
|
|
3513
|
+
fontSizeMedium: {
|
|
3514
|
+
width: 20,
|
|
3515
|
+
height: 20,
|
|
3516
|
+
fontSize: 20
|
|
3517
|
+
},
|
|
3518
|
+
fontSizeSmall: {
|
|
3519
|
+
width: 16,
|
|
3520
|
+
height: 16,
|
|
3521
|
+
fontSize: 16
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
},
|
|
3525
|
+
MuiIconButton: {
|
|
3526
|
+
defaultProps: {
|
|
3527
|
+
color: "inherit"
|
|
3528
|
+
},
|
|
3529
|
+
styleOverrides: {
|
|
3530
|
+
sizeSmall: {
|
|
3531
|
+
padding: 3
|
|
3532
|
+
},
|
|
3533
|
+
sizeMedium: {
|
|
3534
|
+
padding: 8
|
|
3535
|
+
},
|
|
3536
|
+
sizeLarge: {
|
|
3537
|
+
padding: 12
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
},
|
|
3541
|
+
MuiInputBase: {
|
|
3542
|
+
defaultProps: {
|
|
3543
|
+
margin: "none"
|
|
3544
|
+
},
|
|
3545
|
+
styleOverrides: {
|
|
3546
|
+
root: {
|
|
3547
|
+
"&.MuiInput-underline": {
|
|
3548
|
+
marginTop: 9
|
|
3549
|
+
},
|
|
3550
|
+
".MuiOutlinedInput-input.MuiInputBase-inputSizeSmall": {
|
|
3551
|
+
paddingBlock: 6.51
|
|
3552
|
+
},
|
|
3553
|
+
".MuiOutlinedInput-input": {
|
|
3554
|
+
paddingBlock: 14
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3557
|
+
}
|
|
3558
|
+
},
|
|
3559
|
+
MuiOutlinedInput: {
|
|
3560
|
+
styleOverrides: {
|
|
3561
|
+
notchedOutline: {
|
|
3562
|
+
borderColor: "rgba(16, 24, 64, 0.23)"
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
MuiAutocomplete: {
|
|
3567
|
+
defaultProps: {
|
|
3568
|
+
size: "small"
|
|
3569
|
+
},
|
|
3570
|
+
styleOverrides: {
|
|
3571
|
+
root: {
|
|
3572
|
+
"&.MuiAutocomplete-root .MuiOutlinedInput-root": {
|
|
3573
|
+
padding: "6px 14px 6px 10px !important"
|
|
3574
|
+
},
|
|
3575
|
+
"& .MuiAutocomplete-endAdornment": {
|
|
3576
|
+
top: "calc(50% - 12px)",
|
|
3577
|
+
transform: "none"
|
|
3578
|
+
},
|
|
3579
|
+
"&.MuiAutocomplete-root .MuiOutlinedInput-root.MuiInputBase-sizeSmall": {
|
|
3580
|
+
paddingBlock: 3.5,
|
|
3581
|
+
paddingRight: 14,
|
|
3582
|
+
".MuiIconButton-sizeSmall .MuiAutocomplete-popupIndicator": {
|
|
3583
|
+
padding: 5
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
},
|
|
3589
|
+
MuiInputLabel: {
|
|
3590
|
+
styleOverrides: {
|
|
3591
|
+
asterisk: ({ theme }) => ({
|
|
3592
|
+
color: theme.palette.error.main
|
|
3593
|
+
}),
|
|
3594
|
+
root: {
|
|
3595
|
+
display: "flex",
|
|
3596
|
+
gap: ".2rem",
|
|
3597
|
+
flexDirection: "row-reverse",
|
|
3598
|
+
fontSize: 13,
|
|
3599
|
+
fontStyle: "normal",
|
|
3600
|
+
fontWeight: 400,
|
|
3601
|
+
letterSpacing: "0.15px"
|
|
3602
|
+
},
|
|
3603
|
+
filled: {
|
|
3604
|
+
"&.MuiInputLabel-filled.MuiInputLabel-sizeSmall:not(.MuiInputLabel-shrink)": {
|
|
3605
|
+
transform: "translate(12px,15px) scale(1)"
|
|
3606
|
+
},
|
|
3607
|
+
"&.MuiInputLabel-filled.MuiInputLabel-sizeMedium:not(.MuiInputLabel-shrink)": {
|
|
3608
|
+
transform: "translate(12px,19px) scale(1)"
|
|
3609
|
+
}
|
|
3610
|
+
},
|
|
3611
|
+
standard: {
|
|
3612
|
+
"&.MuiInputLabel-standard.MuiInputLabel-sizeSmall:not(.MuiInputLabel-shrink)": {
|
|
3613
|
+
transform: "translate(0, 14px) scale(1)"
|
|
3614
|
+
},
|
|
3615
|
+
"&.MuiInputLabel-standard.MuiInputLabel-sizeMedium:not(.MuiInputLabel-shrink)": {
|
|
3616
|
+
transform: "translate(0, 16px) scale(1)"
|
|
3617
|
+
}
|
|
3618
|
+
},
|
|
3619
|
+
outlined: {
|
|
3620
|
+
"&.MuiInputLabel-outlined.MuiInputLabel-sizeSmall ": {
|
|
3621
|
+
transform: "translate(14px,8px) scale(1)"
|
|
3622
|
+
},
|
|
3623
|
+
"&.MuiInputLabel-outlined ": {
|
|
3624
|
+
transform: "translate(14px, 14px) scale(1)",
|
|
3625
|
+
"&.MuiInputLabel-shrink": {
|
|
3626
|
+
transform: "translate(14px, -7px) scale(0.75)"
|
|
3627
|
+
}
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
},
|
|
3631
|
+
defaultProps: {
|
|
3632
|
+
margin: "dense"
|
|
3633
|
+
}
|
|
3634
|
+
},
|
|
3635
|
+
MuiCard: {
|
|
3636
|
+
styleOverrides: {
|
|
3637
|
+
root: {
|
|
3638
|
+
overflow: "initial",
|
|
3639
|
+
boxShadow: "0px 2px 1px -2px rgba(24, 39, 75, 0.20), 0px 1px 1px -1px rgba(24, 39, 75, 0.14), 0px 1px 3px 0px rgba(24, 39, 75, 0.12)"
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
},
|
|
3643
|
+
MuiCardHeader: {
|
|
3644
|
+
styleOverrides: {
|
|
3645
|
+
root: {
|
|
3646
|
+
padding: "8px 16px "
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
},
|
|
3650
|
+
MuiCardContent: {
|
|
3651
|
+
styleOverrides: {
|
|
3652
|
+
root: {
|
|
3653
|
+
padding: "8px 16px "
|
|
3654
|
+
}
|
|
3655
|
+
}
|
|
3656
|
+
},
|
|
3657
|
+
MuiCardActions: {
|
|
3658
|
+
styleOverrides: {
|
|
3659
|
+
root: {
|
|
3660
|
+
padding: "8px 16px"
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
},
|
|
3664
|
+
MuiRadio: {
|
|
3665
|
+
variants: [
|
|
3666
|
+
{
|
|
3667
|
+
props: { size: "small" },
|
|
3668
|
+
style: {
|
|
3669
|
+
padding: 3
|
|
3670
|
+
}
|
|
3671
|
+
},
|
|
3672
|
+
{
|
|
3673
|
+
props: { size: "medium" },
|
|
3674
|
+
style: {
|
|
3675
|
+
padding: 4
|
|
3676
|
+
}
|
|
3677
|
+
},
|
|
3678
|
+
{
|
|
3679
|
+
props: { size: "large" },
|
|
3680
|
+
style: {
|
|
3681
|
+
padding: 9,
|
|
3682
|
+
"& .MuiSvgIcon-fontSizeLarge": {
|
|
3683
|
+
width: 24,
|
|
3684
|
+
height: 24,
|
|
3685
|
+
fontSize: 24
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
}
|
|
3689
|
+
],
|
|
3690
|
+
defaultProps: {
|
|
3691
|
+
size: "small"
|
|
3692
|
+
}
|
|
3693
|
+
},
|
|
3694
|
+
MuiSwitch: {
|
|
3695
|
+
variants: [
|
|
3696
|
+
{
|
|
3697
|
+
props: { size: "small" },
|
|
3698
|
+
style: {
|
|
3699
|
+
height: 22,
|
|
3700
|
+
".MuiSwitch-switchBase": {
|
|
3701
|
+
padding: 3
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
],
|
|
3706
|
+
defaultProps: {
|
|
3707
|
+
size: "small"
|
|
3708
|
+
}
|
|
3709
|
+
},
|
|
3710
|
+
MuiTextField: {
|
|
3711
|
+
defaultProps: {
|
|
3712
|
+
size: "small",
|
|
3713
|
+
margin: "none"
|
|
3714
|
+
},
|
|
3715
|
+
variants: [
|
|
3716
|
+
{
|
|
3717
|
+
props: { variant: "standard" },
|
|
3718
|
+
style: {
|
|
3719
|
+
".MuiInputBase-input.MuiInputBase-inputSizeSmall": {
|
|
3720
|
+
padding: 1.5
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
]
|
|
3725
|
+
},
|
|
3726
|
+
MuiList: {
|
|
3727
|
+
defaultProps: {
|
|
3728
|
+
dense: false
|
|
3729
|
+
},
|
|
3730
|
+
styleOverrides: {
|
|
3731
|
+
padding: {
|
|
3732
|
+
".MuiListItem-padding": {
|
|
3733
|
+
paddingBlock: 1
|
|
3734
|
+
}
|
|
3735
|
+
},
|
|
3736
|
+
dense: {
|
|
3737
|
+
".MuiListItem-dense": {
|
|
3738
|
+
padding: "0.25px 0px 0.25px 16px"
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
},
|
|
3743
|
+
MuiListItemButton: {
|
|
3744
|
+
styleOverrides: {
|
|
3745
|
+
dense: {
|
|
3746
|
+
padding: "4px 16px 4px 16px "
|
|
3747
|
+
},
|
|
3748
|
+
root: {
|
|
3749
|
+
padding: "8.21px 16px",
|
|
3750
|
+
".MuiListItemText-multiline": {
|
|
3751
|
+
marginBlock: "4px"
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3755
|
+
},
|
|
3756
|
+
MuiMenuItem: {
|
|
3757
|
+
styleOverrides: {
|
|
3758
|
+
dense: {
|
|
3759
|
+
height: 30,
|
|
3760
|
+
minHeight: 30,
|
|
3761
|
+
".MuiListItemText-root > .MuiTypography-root": {
|
|
3762
|
+
lineHeight: "14.3px",
|
|
3763
|
+
letterSpacing: 0.15
|
|
3764
|
+
}
|
|
3765
|
+
},
|
|
3766
|
+
root: {
|
|
3767
|
+
padding: "7px 16px 7px 16px",
|
|
3768
|
+
".MuiMenuList-root": {
|
|
3769
|
+
height: 34,
|
|
3770
|
+
minHeight: 34
|
|
3771
|
+
},
|
|
3772
|
+
".MuiListItemText-root > .MuiTypography-root": {
|
|
3773
|
+
lineHeight: "20px",
|
|
3774
|
+
letterSpacing: 0.17
|
|
3775
|
+
},
|
|
3776
|
+
".MuiListItemIcon-root": {
|
|
3777
|
+
minWidth: 32
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
},
|
|
3782
|
+
MuiTableBody: {
|
|
3783
|
+
styleOverrides: {
|
|
3784
|
+
root: {
|
|
3785
|
+
".MuiTableCell-body.MuiTableCell-sizeMedium": {
|
|
3786
|
+
padding: "16px !important"
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
}
|
|
3790
|
+
},
|
|
3791
|
+
MuiTableCell: {
|
|
3792
|
+
styleOverrides: {
|
|
3793
|
+
sizeMedium: {
|
|
3794
|
+
padding: 13
|
|
3795
|
+
}
|
|
3796
|
+
}
|
|
3797
|
+
},
|
|
3798
|
+
MuiTable: {
|
|
3799
|
+
defaultProps: {
|
|
3800
|
+
size: "small"
|
|
3801
|
+
},
|
|
3802
|
+
styleOverrides: {
|
|
3803
|
+
root: {
|
|
3804
|
+
minWidth: 630
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
};
|
|
3809
|
+
|
|
3810
|
+
// src/Theme/palette.ts
|
|
3811
|
+
var BasicPalette = {
|
|
3812
|
+
default: {
|
|
3813
|
+
main: "#E4E5E7",
|
|
3814
|
+
dark: "#D1D3D7",
|
|
3815
|
+
light: "#F2F2F3",
|
|
3816
|
+
contrastText: "#5A5E73"
|
|
3817
|
+
},
|
|
3818
|
+
chipInfo: {
|
|
3819
|
+
main: "#C0E8FC",
|
|
3820
|
+
dark: "#9CD8FA",
|
|
3821
|
+
light: "#E0F4FE",
|
|
3822
|
+
contrastText: "#5A5E73"
|
|
3823
|
+
},
|
|
3824
|
+
chipWarning: {
|
|
3825
|
+
main: "#FCE4C0",
|
|
3826
|
+
dark: "#FAD19C",
|
|
3827
|
+
light: "#F3F2F0",
|
|
3828
|
+
contrastText: "#5A5E73"
|
|
3829
|
+
},
|
|
3830
|
+
chipError: {
|
|
3831
|
+
main: "#FCD4D4",
|
|
3832
|
+
dark: "#F4B9B9",
|
|
3833
|
+
light: "#FEEAEA",
|
|
3834
|
+
contrastText: "#5A5E73"
|
|
3835
|
+
},
|
|
3836
|
+
chipSuccess: {
|
|
3837
|
+
main: "#DDF8C3",
|
|
3838
|
+
dark: "#C8F3A2",
|
|
3839
|
+
light: "#EFFCE2",
|
|
3840
|
+
contrastText: "#5A5E73"
|
|
3841
|
+
},
|
|
3842
|
+
error: {
|
|
3843
|
+
50: "#F9E8E8",
|
|
3844
|
+
100: "#F1C7C7",
|
|
3845
|
+
200: "#E8A1A1",
|
|
3846
|
+
300: "#DF7B7B",
|
|
3847
|
+
light: "#D85F5F",
|
|
3848
|
+
main: "#D14343",
|
|
3849
|
+
600: "#CC3D3D",
|
|
3850
|
+
700: "#C63434",
|
|
3851
|
+
800: "#C02C2C",
|
|
3852
|
+
dark: "#B51E1E",
|
|
3853
|
+
A100: "#FFECEC",
|
|
3854
|
+
A200: "#FFB9B9",
|
|
3855
|
+
A400: "#FF8686",
|
|
3856
|
+
A700: "#FF6D6D",
|
|
3857
|
+
contrastText: "#ffffff"
|
|
3858
|
+
},
|
|
3859
|
+
warning: {
|
|
3860
|
+
50: "#FFF0E0",
|
|
3861
|
+
100: "#FEDAB3",
|
|
3862
|
+
200: "#FDC280",
|
|
3863
|
+
300: "#FCAA4D",
|
|
3864
|
+
light: "#FC9726",
|
|
3865
|
+
main: "#FB8500",
|
|
3866
|
+
600: "#FA7D00",
|
|
3867
|
+
700: "#FA7200",
|
|
3868
|
+
800: "#F96800",
|
|
3869
|
+
dark: "#F85500",
|
|
3870
|
+
A100: "#FFFFFF",
|
|
3871
|
+
A200: "#FFF1EB",
|
|
3872
|
+
A400: "#FFCCB8",
|
|
3873
|
+
A700: "#FFBA9F",
|
|
3874
|
+
contrastText: "#ffffff"
|
|
3875
|
+
},
|
|
3876
|
+
info: {
|
|
3877
|
+
50: "#E6F3F8",
|
|
3878
|
+
100: "#C0E2EE",
|
|
3879
|
+
200: "#96CFE2",
|
|
3880
|
+
300: "#6CBCD6",
|
|
3881
|
+
light: "#4DADCE",
|
|
3882
|
+
main: "#2D9FC5",
|
|
3883
|
+
600: "#2897BF",
|
|
3884
|
+
700: "#228DB8",
|
|
3885
|
+
800: "#1C83B0",
|
|
3886
|
+
dark: "#1172A3",
|
|
3887
|
+
A100: "#D4EFFF",
|
|
3888
|
+
A200: "#A1DCFF",
|
|
3889
|
+
A400: "#6ECAFF",
|
|
3890
|
+
A700: "#54C1FF",
|
|
3891
|
+
contrastText: "#ffffff"
|
|
3892
|
+
},
|
|
3893
|
+
success: {
|
|
3894
|
+
50: "#F2F9E7",
|
|
3895
|
+
100: "#DDEFC4",
|
|
3896
|
+
200: "#C7E49D",
|
|
3897
|
+
300: "#B1D975",
|
|
3898
|
+
light: "#A0D158",
|
|
3899
|
+
main: "#8FC93A",
|
|
3900
|
+
600: "#87C334",
|
|
3901
|
+
700: "#7CBC2C",
|
|
3902
|
+
800: "#72B525",
|
|
3903
|
+
dark: "#60A918",
|
|
3904
|
+
A100: "#EDFFDE",
|
|
3905
|
+
A200: "#D2FFAB",
|
|
3906
|
+
A400: "#B6FF78",
|
|
3907
|
+
A700: "#A9FF5E",
|
|
3908
|
+
contrastText: "#ffffff"
|
|
3909
|
+
},
|
|
3910
|
+
grey: {
|
|
3911
|
+
50: "#FBFBFB",
|
|
3912
|
+
100: "#F5F5F6",
|
|
3913
|
+
200: "#EAEBEC",
|
|
3914
|
+
300: "#DCDEE0",
|
|
3915
|
+
400: "#CED1D4",
|
|
3916
|
+
500: "#C4C7CA",
|
|
3917
|
+
600: "#B9BDC1",
|
|
3918
|
+
700: "#B2B7BB",
|
|
3919
|
+
800: "#AAAEB3",
|
|
3920
|
+
900: "#A2A6AB",
|
|
3921
|
+
A100: "#FFFFFF",
|
|
3922
|
+
A200: "#FFFFFF",
|
|
3923
|
+
A400: "#D4EAFF",
|
|
3924
|
+
A700: "#BBDDFF"
|
|
3925
|
+
},
|
|
3926
|
+
text: {
|
|
3927
|
+
primary: "#101840de",
|
|
3928
|
+
secondary: "#10184099",
|
|
3929
|
+
disabled: "#10184061"
|
|
3930
|
+
},
|
|
3931
|
+
action: {
|
|
3932
|
+
active: "#1018408a",
|
|
3933
|
+
hover: "#1018400a",
|
|
3934
|
+
selected: "#10184014",
|
|
3935
|
+
disabled: "#10184042",
|
|
3936
|
+
disabledBackground: "#1018401f",
|
|
3937
|
+
focus: "#1018401f"
|
|
3938
|
+
},
|
|
3939
|
+
background: {
|
|
3940
|
+
default: "#f5f5f5",
|
|
3941
|
+
paper: "#fff"
|
|
3942
|
+
},
|
|
3943
|
+
common: {
|
|
3944
|
+
black: "#000",
|
|
3945
|
+
white: "#fff"
|
|
3946
|
+
},
|
|
3947
|
+
divider: "#0000001f"
|
|
3948
|
+
};
|
|
3949
|
+
var paletteERP = __spreadValues({
|
|
3950
|
+
primary: {
|
|
3951
|
+
50: "#E4ECF4",
|
|
3952
|
+
100: "#BCD0E3",
|
|
3953
|
+
200: "#8FB1D0",
|
|
3954
|
+
300: "#6392BD",
|
|
3955
|
+
light: "#417AAE",
|
|
3956
|
+
main: "#2063A0",
|
|
3957
|
+
600: "#1C5B98",
|
|
3958
|
+
700: "#18518E",
|
|
3959
|
+
800: "#134784",
|
|
3960
|
+
dark: "#0B3573",
|
|
3961
|
+
A100: "#A5C5FF",
|
|
3962
|
+
A200: "#72A4FF",
|
|
3963
|
+
A400: "#3F83FF",
|
|
3964
|
+
A700: "#2572FF",
|
|
3965
|
+
contrastText: "#ffffff"
|
|
3966
|
+
},
|
|
3967
|
+
secondary: {
|
|
3968
|
+
50: "#E0F7FA",
|
|
3969
|
+
100: "#B3EBF2",
|
|
3970
|
+
200: "#80DEEA",
|
|
3971
|
+
300: "#4DD0E1",
|
|
3972
|
+
light: "#26C6DA",
|
|
3973
|
+
main: "#00BCD4",
|
|
3974
|
+
600: "#00B6CF",
|
|
3975
|
+
700: "#00ADC9",
|
|
3976
|
+
800: "#00A5C3",
|
|
3977
|
+
dark: "#0097B9",
|
|
3978
|
+
A100: "#E2F9FF",
|
|
3979
|
+
A200: "#AFEEFF",
|
|
3980
|
+
A400: "#7CE3FF",
|
|
3981
|
+
A700: "#63DDFF",
|
|
3982
|
+
contrastText: "#ffffff"
|
|
3983
|
+
},
|
|
3984
|
+
chipPrimary: {
|
|
3985
|
+
main: "#C4E1F5",
|
|
3986
|
+
dark: "#A2CDEE",
|
|
3987
|
+
light: "#E2F0FA",
|
|
3988
|
+
contrastText: "#5A5E73"
|
|
3989
|
+
},
|
|
3990
|
+
chipSecondary: {
|
|
3991
|
+
main: "#C4F6FD",
|
|
3992
|
+
dark: "#A8F1FB",
|
|
3993
|
+
light: "#E0FBFE",
|
|
3994
|
+
contrastText: "#545E73"
|
|
3995
|
+
}
|
|
3996
|
+
}, BasicPalette);
|
|
3997
|
+
var paletteADPRO = __spreadValues({
|
|
3998
|
+
primary: {
|
|
3999
|
+
50: "#F8FAFB",
|
|
4000
|
+
100: "#E6EFF0",
|
|
4001
|
+
200: "#D2E3E4",
|
|
4002
|
+
300: "#82C6CB",
|
|
4003
|
+
light: "#2B9DA7",
|
|
4004
|
+
main: "#058C97",
|
|
4005
|
+
600: "#04848F",
|
|
4006
|
+
700: "#047984",
|
|
4007
|
+
800: "#036F7A",
|
|
4008
|
+
dark: "#015C69",
|
|
4009
|
+
A100: "#98F0FF",
|
|
4010
|
+
A200: "#65E9FF",
|
|
4011
|
+
A400: "#32E1FF",
|
|
4012
|
+
A700: "#32E1FF"
|
|
4013
|
+
},
|
|
4014
|
+
secondary: {
|
|
4015
|
+
50: "#E0F7FA",
|
|
4016
|
+
100: "#B3EBF2",
|
|
4017
|
+
200: "#80DEEA",
|
|
4018
|
+
300: "#4DD0E1",
|
|
4019
|
+
light: "#26C6DA",
|
|
4020
|
+
main: "#00BCD4",
|
|
4021
|
+
600: "#00B6CF",
|
|
4022
|
+
700: "#00ADC9",
|
|
4023
|
+
800: "#00A5C3",
|
|
4024
|
+
dark: "#0097B9",
|
|
4025
|
+
A100: "#E2F9FF",
|
|
4026
|
+
A200: "#AFEEFF",
|
|
4027
|
+
A400: "#7CE3FF",
|
|
4028
|
+
A700: "#63DDFF",
|
|
4029
|
+
contrastText: "#ffffff"
|
|
4030
|
+
},
|
|
4031
|
+
chipPrimary: {
|
|
4032
|
+
main: "#CEE7E9",
|
|
4033
|
+
dark: "#B2D9DC",
|
|
4034
|
+
light: "#E3F1F2",
|
|
4035
|
+
contrastText: "#5A5E73"
|
|
4036
|
+
},
|
|
4037
|
+
chipSecondary: {
|
|
4038
|
+
main: "#C4F6FD",
|
|
4039
|
+
dark: "#A8F1FB",
|
|
4040
|
+
light: "#E0FBFE",
|
|
4041
|
+
contrastText: "#545E73"
|
|
4042
|
+
}
|
|
4043
|
+
}, BasicPalette);
|
|
4044
|
+
var paletteADC = __spreadValues({
|
|
4045
|
+
primary: {
|
|
4046
|
+
50: "#F8FAFB",
|
|
4047
|
+
100: "#E6EFF0",
|
|
4048
|
+
200: "#D2E3E4",
|
|
4049
|
+
300: "#82C6CB",
|
|
4050
|
+
light: "#2B9DA7",
|
|
4051
|
+
main: "#058C97",
|
|
4052
|
+
600: "#04848F",
|
|
4053
|
+
700: "#047984",
|
|
4054
|
+
800: "#036F7A",
|
|
4055
|
+
dark: "#015C69",
|
|
4056
|
+
A100: "#98F0FF",
|
|
4057
|
+
A200: "#65E9FF",
|
|
4058
|
+
A400: "#32E1FF",
|
|
4059
|
+
A700: "#32E1FF"
|
|
4060
|
+
},
|
|
4061
|
+
secondary: {
|
|
4062
|
+
50: "#E0F7FA",
|
|
4063
|
+
100: "#B3EBF2",
|
|
4064
|
+
200: "#80DEEA",
|
|
4065
|
+
300: "#4DD0E1",
|
|
4066
|
+
light: "#26C6DA",
|
|
4067
|
+
main: "#00BCD4",
|
|
4068
|
+
600: "#00B6CF",
|
|
4069
|
+
700: "#00ADC9",
|
|
4070
|
+
800: "#00A5C3",
|
|
4071
|
+
dark: "#0097B9",
|
|
4072
|
+
A100: "#E2F9FF",
|
|
4073
|
+
A200: "#AFEEFF",
|
|
4074
|
+
A400: "#7CE3FF",
|
|
4075
|
+
A700: "#63DDFF",
|
|
4076
|
+
contrastText: "#ffffff"
|
|
4077
|
+
},
|
|
4078
|
+
chipPrimary: {
|
|
4079
|
+
main: "#D4D8F7",
|
|
4080
|
+
dark: "#B2B9F0",
|
|
4081
|
+
light: "#E5E8FA",
|
|
4082
|
+
contrastText: "#5A5E73"
|
|
4083
|
+
},
|
|
4084
|
+
chipSecondary: {
|
|
4085
|
+
main: "#E0E0E0",
|
|
4086
|
+
dark: "#D1D1D1",
|
|
4087
|
+
light: "#EBEBEB",
|
|
4088
|
+
contrastText: "#545E73"
|
|
4089
|
+
}
|
|
4090
|
+
}, BasicPalette);
|
|
4091
|
+
|
|
4092
|
+
// src/Theme/breakpoints.ts
|
|
4093
|
+
import { createBreakpoints } from "@mui/system";
|
|
4094
|
+
var breakpoints = createBreakpoints({
|
|
4095
|
+
values: {
|
|
4096
|
+
xs: 0,
|
|
4097
|
+
sm: 600,
|
|
4098
|
+
md: 960,
|
|
4099
|
+
lg: 1280,
|
|
4100
|
+
xl: 1920
|
|
4101
|
+
}
|
|
4102
|
+
});
|
|
4103
|
+
|
|
4104
|
+
// src/Theme/mixins.ts
|
|
4105
|
+
var mixins = {
|
|
4106
|
+
toolbar: {
|
|
4107
|
+
minHeight: 48,
|
|
4108
|
+
[breakpoints.down("md")]: {
|
|
4109
|
+
minHeight: 52
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
};
|
|
4113
|
+
|
|
4114
|
+
// src/Theme/module.ts
|
|
4115
|
+
import "@mui/material/Typography";
|
|
4116
|
+
import "@mui/material/Radio";
|
|
4117
|
+
import "@mui/material/Chip";
|
|
4118
|
+
import "@mui/material/Checkbox";
|
|
4119
|
+
import "@mui/material/styles";
|
|
4120
|
+
|
|
4121
|
+
// src/Theme/typography.ts
|
|
4122
|
+
var typography = {
|
|
4123
|
+
fontSize: 13,
|
|
4124
|
+
body1: {
|
|
4125
|
+
fontFamily: "Roboto",
|
|
4126
|
+
fontSize: 14,
|
|
4127
|
+
fontWeight: 400,
|
|
4128
|
+
lineHeight: "16px",
|
|
4129
|
+
letterSpacing: "0.15px",
|
|
4130
|
+
"@media(max-width: 885px)": {
|
|
4131
|
+
fontSize: 15
|
|
4132
|
+
}
|
|
4133
|
+
},
|
|
4134
|
+
body2: {
|
|
4135
|
+
fontFamily: "Roboto",
|
|
4136
|
+
fontSize: 13,
|
|
4137
|
+
fontWeight: 400,
|
|
4138
|
+
lineHeight: "16px",
|
|
4139
|
+
letterSpacing: "0.17px",
|
|
4140
|
+
"@media(max-width: 885px)": {
|
|
4141
|
+
fontSize: 14
|
|
4142
|
+
}
|
|
4143
|
+
},
|
|
4144
|
+
body3: {
|
|
4145
|
+
fontFamily: "Roboto",
|
|
4146
|
+
fontWeight: 300,
|
|
4147
|
+
fontSize: 12,
|
|
4148
|
+
lineHeight: "16px",
|
|
4149
|
+
letterSpacing: "0.17px",
|
|
4150
|
+
[breakpoints.down("md")]: {
|
|
4151
|
+
fontSize: 11
|
|
4152
|
+
}
|
|
4153
|
+
},
|
|
4154
|
+
subtitle1: {
|
|
4155
|
+
fontFamily: "Roboto",
|
|
4156
|
+
fontSize: 14,
|
|
4157
|
+
fontWeight: 500,
|
|
4158
|
+
lineHeight: "16px",
|
|
4159
|
+
letterSpacing: "0.15px",
|
|
4160
|
+
"@media(max-width: 885px)": {
|
|
4161
|
+
fontSize: 15
|
|
4162
|
+
}
|
|
4163
|
+
},
|
|
4164
|
+
subtitle2: {
|
|
4165
|
+
fontFamily: "Roboto",
|
|
4166
|
+
fontSize: 13,
|
|
4167
|
+
fontWeight: 500,
|
|
4168
|
+
lineHeight: "16px",
|
|
4169
|
+
letterSpacing: "0.1px",
|
|
4170
|
+
"@media(max-width: 885px)": {
|
|
4171
|
+
fontSize: 14
|
|
4172
|
+
}
|
|
4173
|
+
},
|
|
4174
|
+
caption: {
|
|
4175
|
+
fontFamily: "Roboto",
|
|
4176
|
+
fontSize: 11,
|
|
4177
|
+
fontWeight: 400,
|
|
4178
|
+
lineHeight: "14px",
|
|
4179
|
+
letterSpacing: "0.4px",
|
|
4180
|
+
"@media(max-width: 885px)": {
|
|
4181
|
+
fontSize: 12
|
|
4182
|
+
}
|
|
4183
|
+
},
|
|
4184
|
+
overline: {
|
|
4185
|
+
fontFamily: "Roboto",
|
|
4186
|
+
fontSize: 11,
|
|
4187
|
+
fontWeight: 400,
|
|
4188
|
+
lineHeight: "24px",
|
|
4189
|
+
letterSpacing: "1px",
|
|
4190
|
+
"@media(max-width: 885px)": {
|
|
4191
|
+
fontSize: 12
|
|
4192
|
+
}
|
|
4193
|
+
},
|
|
4194
|
+
h6: {
|
|
4195
|
+
fontFamily: "Nunito",
|
|
4196
|
+
fontSize: 16,
|
|
4197
|
+
fontWeight: 600,
|
|
4198
|
+
lineHeight: "16px",
|
|
4199
|
+
letterSpacing: "0.15px",
|
|
4200
|
+
"@media(max-width: 885px)": {
|
|
4201
|
+
fontSize: 17
|
|
4202
|
+
}
|
|
4203
|
+
},
|
|
4204
|
+
h5: {
|
|
4205
|
+
fontFamily: "Nunito",
|
|
4206
|
+
fontSize: 18,
|
|
4207
|
+
fontWeight: 600,
|
|
4208
|
+
letterSpacing: 0,
|
|
4209
|
+
lineHeight: "24px"
|
|
4210
|
+
},
|
|
4211
|
+
h4: {
|
|
4212
|
+
fontFamily: "Nunito",
|
|
4213
|
+
fontSize: 22,
|
|
4214
|
+
fontWeight: 600,
|
|
4215
|
+
lineHeight: "24px",
|
|
4216
|
+
letterSpacing: "0.25px"
|
|
4217
|
+
},
|
|
4218
|
+
h3: {
|
|
4219
|
+
fontFamily: "Nunito",
|
|
4220
|
+
fontSize: 28,
|
|
4221
|
+
fontWeight: 500,
|
|
4222
|
+
lineHeight: "32px",
|
|
4223
|
+
letterSpacing: 0
|
|
4224
|
+
},
|
|
4225
|
+
h2: {
|
|
4226
|
+
fontFamily: "Nunito",
|
|
4227
|
+
fontSize: 32,
|
|
4228
|
+
fontWeight: 400,
|
|
4229
|
+
lineHeight: "40px",
|
|
4230
|
+
letterSpacing: -0.5
|
|
4231
|
+
},
|
|
4232
|
+
h1: {
|
|
4233
|
+
fontFamily: "Nunito",
|
|
4234
|
+
fontSize: 40,
|
|
4235
|
+
fontWeight: 300,
|
|
4236
|
+
letterSpacing: -1.5,
|
|
4237
|
+
lineHeight: "48px"
|
|
4238
|
+
}
|
|
4239
|
+
};
|
|
4240
|
+
|
|
4241
|
+
// src/Theme/shadows.ts
|
|
4242
|
+
var shadows = [
|
|
4243
|
+
"none",
|
|
4244
|
+
"0px 1px 3px rgba(24, 39, 75, 0.12), 0px 1px 1px -1px rgba(24, 39, 75, 0.14), 0px 2px 1px -2px rgba(24, 39, 75, 0.2)",
|
|
4245
|
+
"0px 1px 5px rgba(24, 39, 75, 0.12), 0px 2px 2px rgba(24, 39, 75, 0.14), 0px 3px 1px -2px rgba(24, 39, 75, 0.2)",
|
|
4246
|
+
"0px 1px 8px rgba(24, 39, 75, 0.12), 0px 3px 4px rgba(24, 39, 75, 0.14), 0px 3px 3px -2px rgba(24, 39, 75, 0.2)",
|
|
4247
|
+
"0px 2px 4px -1px rgba(24, 39, 75, 0.2), 0px 4px 5px rgba(24, 39, 75, 0.14), 0px 1px 10px rgba(24, 39, 75, 0.12)",
|
|
4248
|
+
"0px 3px 5px -1px rgba(24, 39, 75, 0.2), 0px 5px 8px rgba(24, 39, 75, 0.14), 0px 1px 14px rgba(24, 39, 75, 0.12)",
|
|
4249
|
+
"0px 3px 5px -1px rgba(24, 39, 75, 0.2), 0px 6px 10px rgba(24, 39, 75, 0.14), 0px 1px 18px rgba(24, 39, 75, 0.12)",
|
|
4250
|
+
"0px 4px 5px -2px rgba(24, 39, 75, 0.2), 0px 7px 10px 1px rgba(24, 39, 75, 0.14), 0px 2px 16px 1px rgba(24, 39, 75, 0.12)",
|
|
4251
|
+
"0px 5px 5px -3px rgba(24, 39, 75, 0.2), 0px 8px 10px 1px rgba(24, 39, 75, 0.14), 0px 3px 14px 2px rgba(24, 39, 75, 0.12)",
|
|
4252
|
+
"0px 5px 6px -3px rgba(24, 39, 75, 0.2), 0px 9px 12px 1px rgba(24, 39, 75, 0.14), 0px 3px 16px 2px rgba(24, 39, 75, 0.12)",
|
|
4253
|
+
"0px 6px 6px -3px rgba(24, 39, 75, 0.2), 0px 10px 14px 1px rgba(24, 39, 75, 0.14), 0px 4px 18px 3px rgba(24, 39, 75, 0.12)",
|
|
4254
|
+
"0px 6px 7px -4px rgba(24, 39, 75, 0.2), 0px 11px 15px 1px rgba(24, 39, 75, 0.14), 0px 4px 20px 3px rgba(24, 39, 75, 0.12)",
|
|
4255
|
+
"0px 7px 8px -4px rgba(24, 39, 75, 0.2), 0px 12px 17px 2px rgba(24, 39, 75, 0.14), 0px 5px 22px 4px rgba(24, 39, 75, 0.12)",
|
|
4256
|
+
"0px 7px 8px -4px rgba(24, 39, 75, 0.2), 0px 13px 19px 2px rgba(24, 39, 75, 0.14), 0px 5px 24px 4px rgba(24, 39, 75, 0.12)",
|
|
4257
|
+
"0px 7px 9px -4px rgba(24, 39, 75, 0.2), 0px 14px 21px 2px rgba(24, 39, 75, 0.14), 0px 5px 26px 4px rgba(24, 39, 75, 0.12)",
|
|
4258
|
+
"0px 8px 9px -5px rgba(24, 39, 75, 0.2), 0px 15px 22px 2px rgba(24, 39, 75, 0.14), 0px 6px 28px 5px rgba(24, 39, 75, 0.12)",
|
|
4259
|
+
"0px 8px 10px -5px rgba(24, 39, 75, 0.2), 0px 16px 24px 2px rgba(24, 39, 75, 0.14), 0px 6px 30px 5px rgba(24, 39, 75, 0.12)",
|
|
4260
|
+
"0px 8px 11px -5px rgba(24, 39, 75, 0.2), 0px 17px 26px 2px rgba(24, 39, 75, 0.14), 0px 6px 32px 5px rgba(24, 39, 75, 0.12)",
|
|
4261
|
+
"0px 9px 11px -5px rgba(24, 39, 75, 0.2), 0px 18px 28px 2px rgba(24, 39, 75, 0.14), 0px 7px 34px 6px rgba(24, 39, 75, 0.12)",
|
|
4262
|
+
"0px 9px 12px -6px rgba(24, 39, 75, 0.2), 0px 19px 29px 2px rgba(24, 39, 75, 0.14), 0px 7px 36px 6px rgba(24, 39, 75, 0.12)",
|
|
4263
|
+
"0px 10px 13px -6px rgba(24, 39, 75, 0.2), 0px 20px 31px 3px rgba(24, 39, 75, 0.14), 0px 8px 38px 7px rgba(24, 39, 75, 0.12)",
|
|
4264
|
+
"0px 10px 13px -6px rgba(24, 39, 75, 0.2), 0px 21px 33px 3px rgba(24, 39, 75, 0.14), 0px 8px 40px 7px rgba(24, 39, 75, 0.12)",
|
|
4265
|
+
"0px 10px 14px -6px rgba(24, 39, 75, 0.2), 0px 22px 35px 3px rgba(24, 39, 75, 0.14), 0px 8px 42px 7px rgba(24, 39, 75, 0.12)",
|
|
4266
|
+
"0px 11px 14px -7px rgba(24, 39, 75, 0.2), 0px 23px 36px 3px rgba(24, 39, 75, 0.14), 0px 9px 44px 8px rgba(24, 39, 75, 0.12)",
|
|
4267
|
+
"0px 11px 15px -7px rgba(24, 39, 75, 0.2), 0px 24px 38px 3px rgba(24, 39, 75, 0.14), 0px 9px 46px 8px rgba(24, 39, 75, 0.12)"
|
|
4268
|
+
];
|
|
4269
|
+
|
|
4270
|
+
// src/Theme/theme.ts
|
|
4271
|
+
var BasicTheme = {
|
|
4272
|
+
components,
|
|
4273
|
+
typography,
|
|
4274
|
+
spacing: 8,
|
|
4275
|
+
mixins,
|
|
4276
|
+
breakpoints,
|
|
4277
|
+
shadows
|
|
4278
|
+
};
|
|
4279
|
+
var ERPTheme = __spreadValues({
|
|
4280
|
+
palette: paletteERP
|
|
4281
|
+
}, BasicTheme);
|
|
4282
|
+
var ADPROTheme = __spreadValues({
|
|
4283
|
+
palette: paletteADPRO
|
|
4284
|
+
}, BasicTheme);
|
|
4285
|
+
var ADCTheme = __spreadValues({
|
|
4286
|
+
palette: paletteADC
|
|
4287
|
+
}, BasicTheme);
|
|
4288
|
+
|
|
4289
|
+
// src/Theme/index.ts
|
|
4290
|
+
var SincoTheme = createTheme(__spreadValues({}, ERPTheme));
|
|
4291
|
+
var AdproSincoTheme = createTheme(__spreadValues({}, ADPROTheme));
|
|
4292
|
+
var ADCSincoTheme = createTheme(__spreadValues({}, ADCTheme));
|
|
4293
|
+
export {
|
|
4294
|
+
ADCSincoTheme,
|
|
4295
|
+
AdproSincoTheme,
|
|
4296
|
+
EmptyState,
|
|
4297
|
+
FooterAction,
|
|
4298
|
+
MultiSelect,
|
|
4299
|
+
PageHeader,
|
|
4300
|
+
SCAutocomplete,
|
|
4301
|
+
SCCalendarSwipeable,
|
|
4302
|
+
SCDataGrid,
|
|
4303
|
+
SCDataGridInitial,
|
|
4304
|
+
SCDateRange,
|
|
4305
|
+
SCDialog,
|
|
4306
|
+
SCDrawer,
|
|
4307
|
+
SCMenu,
|
|
4308
|
+
SCModal,
|
|
4309
|
+
SCSelect,
|
|
4310
|
+
SCTabs,
|
|
4311
|
+
SCTextArea,
|
|
4312
|
+
SCTextField,
|
|
4313
|
+
SCToastNotification,
|
|
4314
|
+
SincoTheme,
|
|
4315
|
+
ToastProgress,
|
|
4316
|
+
capitalize,
|
|
4317
|
+
getButtonColor,
|
|
4318
|
+
getIcon,
|
|
4319
|
+
getIconComponent2 as getIconComponent,
|
|
4320
|
+
getIconMultiSelect,
|
|
4321
|
+
getModalColor,
|
|
4322
|
+
modalStateConfig,
|
|
4323
|
+
useFilteredItems,
|
|
4324
|
+
useMultiSelectHandlers,
|
|
4325
|
+
useProgress
|
|
4326
|
+
};
|
|
4327
|
+
//# sourceMappingURL=index.js.map
|