componentes-sinco 1.0.10-rc.4 → 1.0.10
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/index.cjs +161 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +149 -137
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/create-KZGO2OZA.svg +0 -18
- package/dist/empty-3NEKE7WO.svg +0 -13
- package/dist/error-RUCZUXDN.svg +0 -5
- package/dist/search-OKSCVF2W.svg +0 -12
package/dist/index.js
CHANGED
|
@@ -2358,35 +2358,47 @@ var SCDataGrid = React15.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
|
2358
2358
|
});
|
|
2359
2359
|
|
|
2360
2360
|
// src/Components/EmptyState/EmptyState.tsx
|
|
2361
|
-
import
|
|
2361
|
+
import React20 from "react";
|
|
2362
2362
|
import { Button as Button8, Stack as Stack7, Typography as Typography12 } from "@mui/material";
|
|
2363
2363
|
|
|
2364
|
-
// src/assets/ImgEmptyState/create.
|
|
2365
|
-
|
|
2364
|
+
// src/assets/ImgEmptyState/create.tsx
|
|
2365
|
+
import React16 from "react";
|
|
2366
|
+
var Create = () => {
|
|
2367
|
+
return /* @__PURE__ */ React16.createElement("svg", { width: "45", height: "41", viewBox: "0 0 45 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React16.createElement("g", { "clip-path": "url(#clip0_1283_39624)" }, /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M44.4956 13.1869C44.4386 13.8714 43.8367 14.3801 43.1514 14.3231L39.9978 14.0608C39.3124 14.0038 38.8032 13.4027 38.8602 12.7182C38.9173 12.0336 39.5191 11.525 40.2044 11.582L43.3581 11.8443C44.0434 11.9013 44.5527 12.5024 44.4956 13.1869Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M41.0393 1.01388C41.4429 1.57002 41.3187 2.34766 40.7619 2.75078L38.099 4.6787C37.5423 5.08182 36.7637 4.95777 36.3601 4.40163C35.9565 3.84548 36.0807 3.06785 36.6375 2.66473L39.3004 0.736804C39.8572 0.333685 40.6357 0.457736 41.0393 1.01388Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M36.6656 21.2361C36.1755 21.7179 36.1692 22.5054 36.6515 22.9949L38.9584 25.3363C39.4408 25.8258 40.2291 25.8321 40.7193 25.3503C41.2094 24.8685 41.2157 24.0811 40.7333 23.5915L38.4264 21.2502C37.9441 20.7606 37.1557 20.7543 36.6656 21.2361Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0.504365 13.1869C0.561439 13.8714 1.16326 14.3801 1.84856 14.323L5.00224 14.0607C5.68755 14.0037 6.19683 13.4026 6.13976 12.7181C6.08268 12.0336 5.48087 11.5249 4.79556 11.5819L1.64188 11.8442C0.956574 11.9012 0.447291 12.5023 0.504365 13.1869Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M3.95913 1.01431C3.55554 1.57046 3.67974 2.34809 4.23653 2.75121L6.8994 4.67914C7.45619 5.08225 8.23473 4.9582 8.63832 4.40206C9.04191 3.84592 8.91771 3.06828 8.36092 2.66516L5.69805 0.737237C5.14126 0.334118 4.36272 0.458169 3.95913 1.01431Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.33389 21.236C8.82403 21.7178 8.83033 22.5053 8.34796 22.9949L6.04107 25.3362C5.5587 25.8257 4.77034 25.832 4.28021 25.3502C3.79008 24.8684 3.78378 24.081 4.26614 23.5914L6.57304 21.2501C7.0554 20.7605 7.84376 20.7542 8.33389 21.236Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { d: "M19.1448 37.3573H25.5804L25.1621 38.889C25.0636 39.2498 24.7356 39.5 24.3613 39.5H20.3638C19.9895 39.5 19.6615 39.2498 19.563 38.889L19.1448 37.3573Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { d: "M17.6534 35.3665C17.5381 34.8487 17.9326 34.3575 18.4637 34.3575H26.3983C26.9294 34.3575 27.3239 34.8487 27.2087 35.3665L26.9829 36.3814C26.8563 36.9504 26.351 37.3553 25.7674 37.3553H19.0946C18.511 37.3553 18.0057 36.9504 17.8791 36.3814L17.6534 35.3665Z", fill: "#CED1D4" }), /* @__PURE__ */ React16.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.85423 13.9906C8.85423 6.60807 14.935 0.652473 22.3998 0.652473C29.8646 0.652473 35.9455 6.60807 35.9455 13.9906C35.9455 17.6153 34.4759 20.9015 32.0983 23.3022C31.9627 23.4392 31.8257 23.5745 31.6935 23.7052L31.6917 23.707C30.7961 24.5922 30.1385 25.2699 29.8494 26.1116C29.7242 26.4761 29.6012 27.1915 29.4988 28.0885C29.4002 28.9527 29.3306 29.8872 29.2854 30.6281C29.2099 31.864 28.1896 32.8547 26.9266 32.8547H17.8731C16.6101 32.8547 15.5898 31.864 15.5143 30.6281C15.469 29.8872 15.3995 28.9527 15.3009 28.0885C15.1985 27.1915 15.0755 26.4761 14.9503 26.1116C14.6612 25.2699 14.0036 24.5922 13.108 23.707L13.106 23.7051C12.9739 23.5744 12.837 23.4391 12.7014 23.3022C10.3238 20.9015 8.85423 17.6153 8.85423 13.9906ZM22.3998 2.85676C16.1214 2.85676 11.0611 7.85765 11.0611 13.9906C11.0611 17.0068 12.2813 19.7437 14.2703 21.752C14.3969 21.8798 14.526 22.0075 14.6602 22.1401C14.6831 22.1627 14.7062 22.1855 14.7294 22.2085C15.5402 23.0091 16.5655 24.0215 17.0377 25.3961C17.2505 26.0156 17.3925 26.9534 17.4936 27.8388C17.5983 28.757 17.6707 29.7342 17.7171 30.4939C17.723 30.59 17.8001 30.6504 17.8731 30.6504H26.9266C26.9996 30.6504 27.0767 30.59 27.0826 30.4939C27.129 29.7342 27.2013 28.757 27.3061 27.8388C27.4072 26.9534 27.5492 26.0156 27.762 25.3961C28.2342 24.0215 29.2594 23.0091 30.0702 22.2085C30.0935 22.1855 30.1166 22.1627 30.1395 22.1401C30.2737 22.0075 30.4028 21.8798 30.5294 21.752C32.5184 19.7437 33.7386 17.0068 33.7386 13.9906C33.7386 7.85765 28.6783 2.85676 22.3998 2.85676Z", fill: "#B9BDC1" })), /* @__PURE__ */ React16.createElement("defs", null, /* @__PURE__ */ React16.createElement("clipPath", { id: "clip0_1283_39624" }, /* @__PURE__ */ React16.createElement("rect", { width: "44", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
2368
|
+
};
|
|
2366
2369
|
|
|
2367
|
-
// src/assets/ImgEmptyState/
|
|
2368
|
-
|
|
2370
|
+
// src/assets/ImgEmptyState/empty.tsx
|
|
2371
|
+
import React17 from "react";
|
|
2372
|
+
var Empty = () => {
|
|
2373
|
+
return /* @__PURE__ */ React17.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("g", { "clip-path": "url(#clip0_1283_39626)" }, /* @__PURE__ */ React17.createElement("path", { d: "M36.1351 20.9955C25.1396 25.3151 16.1875 30.5689 11.8186 30.9221L14.7134 35.4696L36.1351 20.9955Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { d: "M37.4531 24.9937C39.7468 28.137 42.9751 35.0522 37.4531 35.3441C34.9101 35.4058 31.3306 32.981 37.4531 24.9937Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M25.6074 1.30001C25.1055 0.501016 24.051 0.26003 23.2522 0.761943L19.6474 3.02673C17.5114 2.68138 14.5326 2.642 12.1799 3.71891C10.8937 4.30766 9.75284 5.25155 9.09396 6.68863C8.65845 7.63849 8.46029 8.74589 8.52317 10.0159L1.2996 14.5543C0.500747 15.0562 0.260156 16.1108 0.762045 16.9098L12.7907 36.0589C13.2926 36.8579 14.3471 37.0989 15.1459 36.597L37.0985 22.8046C37.8973 22.3027 38.1379 21.2481 37.636 20.4491L25.6074 1.30001ZM2.79326 16.1347L8.88857 12.3051C8.91842 12.3953 8.95405 12.4868 8.99634 12.5777C9.70948 14.1097 11.2554 15.9861 13.7088 16.7327C16.2084 17.4934 19.3887 17.0049 23.1824 14.2981L23.3709 14.1636L22.1324 12.4273L21.9439 12.5618C18.5121 15.0104 16.0132 15.2048 14.3292 14.6924C12.5992 14.1659 11.458 12.8132 10.9295 11.6778C10.9197 11.6569 10.9072 11.6225 10.8968 11.5772C10.8595 11.4156 10.8267 11.2584 10.7981 11.1054L24.0275 2.79363L35.6048 21.2243L14.3706 34.5653L2.79326 16.1347ZM13.0675 5.65821C14.0932 5.18871 15.3429 4.98089 16.5902 4.94754L10.716 8.63821C10.7826 8.23367 10.8925 7.88269 11.0323 7.57786C11.4327 6.70447 12.1364 6.08441 13.0675 5.65821Z", fill: "#B9BDC1" }), /* @__PURE__ */ React17.createElement("path", { d: "M24.3482 14.3207C24.0493 15.6305 22.7454 16.4497 21.4358 16.1505C20.1262 15.8513 19.3069 14.547 19.6058 13.2372C19.9047 11.9274 21.2086 11.1082 22.5182 11.4074C23.8278 11.7066 24.6471 13.011 24.3482 14.3207Z", fill: "#CED1D4" })), /* @__PURE__ */ React17.createElement("defs", null, /* @__PURE__ */ React17.createElement("clipPath", { id: "clip0_1283_39626" }, /* @__PURE__ */ React17.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
2374
|
+
};
|
|
2369
2375
|
|
|
2370
|
-
// src/assets/ImgEmptyState/
|
|
2371
|
-
|
|
2376
|
+
// src/assets/ImgEmptyState/error.tsx
|
|
2377
|
+
import React18 from "react";
|
|
2378
|
+
var Error2 = () => {
|
|
2379
|
+
return /* @__PURE__ */ React18.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React18.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M17.8035 3.2925C17.0304 3.2925 16.358 3.82772 16.1913 4.58349L14.0944 13.8188C13.8625 14.8535 14.6474 15.8412 15.7066 15.8412H25.4175C26.4764 15.8412 27.2677 14.8538 27.0297 13.8185L24.9328 4.58323C24.7608 3.82996 24.0975 3.29514 23.3264 3.2925H17.8035ZM15.9436 13.9945L17.9555 5.13336L23.1745 5.12121L25.1863 13.9945H15.9436Z", fill: "#B9BDC1" }), /* @__PURE__ */ React18.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.5449 28.1551C10.7717 28.1551 10.0993 28.6904 9.93264 29.4462L8.54048 35.6049C8.46109 35.7863 8.54048 35.6049 8.46109 35.7863H5.42145C4.91308 35.7863 4.50096 36.1984 4.50096 36.7068C4.50096 37.2152 4.91308 37.6273 5.42145 37.6273H35.5795C36.0879 37.6273 36.5 37.2152 36.5 36.7068C36.5 36.1984 36.0879 35.7863 35.5795 35.7863H32.595C32.5443 35.6284 32.5801 35.745 32.5443 35.5928L31.1121 29.4342C30.9394 28.6844 30.2672 28.1551 29.5 28.1551H11.5449ZM10.3781 35.7863L11.6854 29.9961H29.3426L30.6891 35.7863H10.3781Z", fill: "#B9BDC1" }), /* @__PURE__ */ React18.createElement("path", { d: "M13.7368 17.4381H28.0252C28.2486 17.4381 28.4434 17.5928 28.495 17.8162L30.271 25.9114C30.334 26.2094 30.1106 26.4901 29.8012 26.4901H11.6743C11.3649 26.4901 11.1358 26.1979 11.2102 25.8943L13.2727 17.799C13.3243 17.587 13.519 17.4381 13.7368 17.4381Z", fill: "#CED1D4" }));
|
|
2380
|
+
};
|
|
2372
2381
|
|
|
2373
|
-
// src/assets/ImgEmptyState/search.
|
|
2374
|
-
|
|
2382
|
+
// src/assets/ImgEmptyState/search.tsx
|
|
2383
|
+
import React19 from "react";
|
|
2384
|
+
var Search2 = () => {
|
|
2385
|
+
return /* @__PURE__ */ React19.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React19.createElement("g", { "clip-path": "url(#clip0_1283_39628)" }, /* @__PURE__ */ React19.createElement("path", { d: "M29.421 4.71198C28.943 2.92749 30.0021 1.09315 31.7865 0.61487C33.5709 0.136592 35.405 1.19549 35.883 2.97998L40.3853 19.7878C40.8633 21.5723 39.8042 23.4066 38.0198 23.8849C36.2354 24.3632 34.4013 23.3043 33.9233 21.5198L29.421 4.71198Z", fill: "#CED1D4" }), /* @__PURE__ */ React19.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0.607749 18.613C0.158895 16.9369 1.15336 15.2141 2.82895 14.7649C4.50454 14.3157 6.22674 15.3102 6.67559 16.9862L8.06043 22.1573C8.50928 23.8333 7.51482 25.5561 5.83923 26.0054C4.16364 26.4546 2.44144 25.46 1.99259 23.784L0.607749 18.613ZM3.41576 16.9561C2.95002 17.0809 2.67359 17.5598 2.79836 18.0257L4.18319 23.1967C4.30796 23.6626 4.78667 23.939 5.25242 23.8142C5.71816 23.6893 5.99459 23.2104 5.86982 22.7445L4.48499 17.5735C4.36022 17.1076 3.88151 16.8312 3.41576 16.9561Z", fill: "#B9BDC1" }), /* @__PURE__ */ React19.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.0672 23.7222C17.6115 24.3518 16.9814 24.8602 16.2239 25.1659L23.5692 38.9314C23.929 39.6056 23.6742 40.4438 23.0003 40.8037C22.3263 41.1635 21.4883 40.9087 21.1286 40.2346L14.2002 27.2506L6.15159 39.7788C5.73857 40.4217 4.88273 40.6079 4.24003 40.1948C3.59732 39.7816 3.41113 38.9255 3.82416 38.2826L12.4422 24.8681C11.8201 24.4937 11.2926 23.9601 10.9267 23.3057L6.9728 23.4848C6.43282 23.5092 5.94855 23.1546 5.80865 22.6324L4.48764 17.7008C4.34775 17.1786 4.5899 16.6293 5.06976 16.3804L11.2775 13.1606L11.2169 12.934C11.0764 12.4095 11.3213 11.8581 11.8046 11.6107L26.5904 4.04383C26.8999 3.88542 27.2644 3.87542 27.5822 4.01662C27.8999 4.15781 28.1369 4.43508 28.2269 4.77102L32.7303 21.5831C32.8203 21.9191 32.7537 22.2777 32.5491 22.5589C32.3445 22.8401 32.0238 23.0137 31.6766 23.0314L18.0672 23.7222ZM17.9643 23.1894C18.1495 22.8739 18.2903 22.5322 18.3806 22.1748C18.4139 22.0434 18.4403 21.9098 18.4596 21.7746C18.4048 22.1588 18.2927 22.5298 18.1297 22.876C18.0793 22.983 18.0241 23.0876 17.9643 23.1894ZM18.8739 21.375L30.1375 20.8032L26.3713 6.7432L13.6819 13.2372L14.6854 16.9834C16.5391 17.0063 18.2272 18.2517 18.7306 20.1311C18.8421 20.5473 18.8877 20.9656 18.8739 21.375ZM12.4612 17.5793C11.2373 18.3061 10.4581 19.6082 10.3898 21.0243L7.79324 21.142L6.95134 17.999L11.8877 15.4386L12.4612 17.5793ZM15.1332 23.1064C16.1692 22.8287 16.784 21.7635 16.5064 20.7272C16.2288 19.6909 15.164 19.0759 14.128 19.3536C13.092 19.6313 12.4772 20.6965 12.7547 21.7328C12.9527 22.4718 13.5511 22.9972 14.2553 23.1365C14.2923 23.1351 14.3294 23.1351 14.3667 23.1366C14.4569 23.1402 14.5456 23.1526 14.6318 23.1732C14.797 23.173 14.9652 23.1515 15.1332 23.1064Z", fill: "#B9BDC1" })), /* @__PURE__ */ React19.createElement("defs", null, /* @__PURE__ */ React19.createElement("clipPath", { id: "clip0_1283_39628" }, /* @__PURE__ */ React19.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
2386
|
+
};
|
|
2375
2387
|
|
|
2376
2388
|
// src/Components/EmptyState/EmptyState.tsx
|
|
2377
2389
|
var EmptyStateImageUrls = {
|
|
2378
|
-
create:
|
|
2379
|
-
error:
|
|
2380
|
-
noResult:
|
|
2381
|
-
search:
|
|
2390
|
+
create: /* @__PURE__ */ React20.createElement(Create, null),
|
|
2391
|
+
error: /* @__PURE__ */ React20.createElement(Error2, null),
|
|
2392
|
+
noResult: /* @__PURE__ */ React20.createElement(Empty, null),
|
|
2393
|
+
search: /* @__PURE__ */ React20.createElement(Search2, null)
|
|
2382
2394
|
};
|
|
2383
2395
|
var DefaultIcon = ({
|
|
2384
2396
|
state = "create",
|
|
2385
2397
|
size = "large"
|
|
2386
2398
|
}) => {
|
|
2387
|
-
const
|
|
2399
|
+
const Icon = EmptyStateImageUrls[state];
|
|
2388
2400
|
const iconSize = size === "small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
|
|
2389
|
-
return /* @__PURE__ */
|
|
2401
|
+
return /* @__PURE__ */ React20.createElement("div", null, Icon);
|
|
2390
2402
|
};
|
|
2391
2403
|
var EmptyState = ({
|
|
2392
2404
|
state = "create",
|
|
@@ -2395,11 +2407,11 @@ var EmptyState = ({
|
|
|
2395
2407
|
subtitle,
|
|
2396
2408
|
actions,
|
|
2397
2409
|
containerHeight = "100vh",
|
|
2398
|
-
icon = /* @__PURE__ */
|
|
2410
|
+
icon = /* @__PURE__ */ React20.createElement(DefaultIcon, { state, size })
|
|
2399
2411
|
}) => {
|
|
2400
2412
|
const titleVariant = size === "small" ? "subtitle2" : "h6";
|
|
2401
2413
|
const subtitleVariant = size === "small" ? "caption" : "body1";
|
|
2402
|
-
return /* @__PURE__ */
|
|
2414
|
+
return /* @__PURE__ */ React20.createElement(
|
|
2403
2415
|
Stack7,
|
|
2404
2416
|
{
|
|
2405
2417
|
alignItems: "center",
|
|
@@ -2408,8 +2420,8 @@ var EmptyState = ({
|
|
|
2408
2420
|
height: containerHeight,
|
|
2409
2421
|
"data-testid": "empty-state-container"
|
|
2410
2422
|
},
|
|
2411
|
-
icon && /* @__PURE__ */
|
|
2412
|
-
/* @__PURE__ */
|
|
2423
|
+
icon && /* @__PURE__ */ React20.createElement(Stack7, null, icon),
|
|
2424
|
+
/* @__PURE__ */ React20.createElement(Stack7, { gap: 0.5 }, /* @__PURE__ */ React20.createElement(Typography12, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React20.createElement(
|
|
2413
2425
|
Typography12,
|
|
2414
2426
|
{
|
|
2415
2427
|
variant: subtitleVariant,
|
|
@@ -2417,7 +2429,7 @@ var EmptyState = ({
|
|
|
2417
2429
|
color: "text.secondary"
|
|
2418
2430
|
},
|
|
2419
2431
|
subtitle
|
|
2420
|
-
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */
|
|
2432
|
+
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React20.createElement(
|
|
2421
2433
|
Stack7,
|
|
2422
2434
|
{
|
|
2423
2435
|
direction: "row",
|
|
@@ -2427,15 +2439,15 @@ var EmptyState = ({
|
|
|
2427
2439
|
},
|
|
2428
2440
|
actions.map((action, index) => {
|
|
2429
2441
|
var _a, _b, _c, _d;
|
|
2430
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ React20.createElement(
|
|
2431
2443
|
Button8,
|
|
2432
2444
|
{
|
|
2433
2445
|
key: index,
|
|
2434
2446
|
color: (_a = action.color) != null ? _a : "primary",
|
|
2435
2447
|
variant: (_b = action.variant) != null ? _b : "text",
|
|
2436
2448
|
size: (_c = action.size) != null ? _c : "small",
|
|
2437
|
-
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */
|
|
2438
|
-
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */
|
|
2449
|
+
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React20.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2450
|
+
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React20.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2439
2451
|
onClick: action.onClick
|
|
2440
2452
|
},
|
|
2441
2453
|
capitalize((_d = action.text) != null ? _d : "action")
|
|
@@ -2446,7 +2458,7 @@ var EmptyState = ({
|
|
|
2446
2458
|
};
|
|
2447
2459
|
|
|
2448
2460
|
// src/Components/SCDialog.tsx
|
|
2449
|
-
import
|
|
2461
|
+
import React21, { useEffect as useEffect13, useState as useState9 } from "react";
|
|
2450
2462
|
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";
|
|
2451
2463
|
import Grid6 from "@mui/material/Grid2";
|
|
2452
2464
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
@@ -2482,7 +2494,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2482
2494
|
});
|
|
2483
2495
|
if (iconTitle) {
|
|
2484
2496
|
if (Muicon5[iconTitle] == void 0) {
|
|
2485
|
-
if (iconTitle &&
|
|
2497
|
+
if (iconTitle && React21.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
2486
2498
|
iconTitleValidation = "image";
|
|
2487
2499
|
IconTitle = iconTitle;
|
|
2488
2500
|
} else {
|
|
@@ -2507,8 +2519,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2507
2519
|
}
|
|
2508
2520
|
};
|
|
2509
2521
|
const dialogActions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
2510
|
-
content = content != null ? content : { component: /* @__PURE__ */
|
|
2511
|
-
return /* @__PURE__ */
|
|
2522
|
+
content = content != null ? content : { component: /* @__PURE__ */ React21.createElement(Box11, null, " Aqui va el contenido ") };
|
|
2523
|
+
return /* @__PURE__ */ React21.createElement("div", null, buttonDialog ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React21.createElement(Tooltip3, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React21.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__ */ React21.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React21.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React21.createElement(IconButton8, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React21.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React21.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React21.createElement(
|
|
2512
2524
|
Dialog,
|
|
2513
2525
|
{
|
|
2514
2526
|
"data-testid": "dialog-element",
|
|
@@ -2522,8 +2534,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2522
2534
|
}
|
|
2523
2535
|
}
|
|
2524
2536
|
},
|
|
2525
|
-
title && /* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
2537
|
+
title && /* @__PURE__ */ React21.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React21.createElement(Grid6, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ React21.createElement(Grid6, { container: true, size: 11, sx: { alignItems: "center" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React21.createElement(Box11, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React21.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React21.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React21.createElement(Grid6, null, /* @__PURE__ */ React21.createElement(Typography13, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), /* @__PURE__ */ React21.createElement(Typography13, { color: "text.secondary", variant: "body2", gutterBottom: true }, subtitle ? subtitle : ""))), disableClose != true ? /* @__PURE__ */ React21.createElement(IconButton8, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React21.createElement(CloseIcon2, null)) : "")),
|
|
2538
|
+
/* @__PURE__ */ React21.createElement(
|
|
2527
2539
|
DialogContent,
|
|
2528
2540
|
{
|
|
2529
2541
|
"data-testid": "dialog-content",
|
|
@@ -2551,7 +2563,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2551
2563
|
}
|
|
2552
2564
|
}
|
|
2553
2565
|
},
|
|
2554
|
-
content.url ? /* @__PURE__ */
|
|
2566
|
+
content.url ? /* @__PURE__ */ React21.createElement(
|
|
2555
2567
|
"iframe",
|
|
2556
2568
|
{
|
|
2557
2569
|
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
@@ -2561,7 +2573,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2561
2573
|
}
|
|
2562
2574
|
) : content.component
|
|
2563
2575
|
),
|
|
2564
|
-
dialogActions.length > 0 ? /* @__PURE__ */
|
|
2576
|
+
dialogActions.length > 0 ? /* @__PURE__ */ React21.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, dialogActions.length >= 3 ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
2565
2577
|
Button9,
|
|
2566
2578
|
{
|
|
2567
2579
|
variant: "text",
|
|
@@ -2569,11 +2581,11 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2569
2581
|
size: "small",
|
|
2570
2582
|
onClick: dialogActions[0].fn,
|
|
2571
2583
|
disabled: dialogActions[0].disabled || false,
|
|
2572
|
-
startIcon: dialogActions[0].icon ? /* @__PURE__ */
|
|
2584
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React21.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
2573
2585
|
},
|
|
2574
2586
|
dialogActions[0].text
|
|
2575
|
-
), /* @__PURE__ */
|
|
2576
|
-
return /* @__PURE__ */
|
|
2587
|
+
), /* @__PURE__ */ React21.createElement(Box11, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
2588
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2577
2589
|
Button9,
|
|
2578
2590
|
{
|
|
2579
2591
|
key: index + 1,
|
|
@@ -2582,12 +2594,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2582
2594
|
size: "small",
|
|
2583
2595
|
onClick: boton.fn,
|
|
2584
2596
|
disabled: boton.disabled || false,
|
|
2585
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
2597
|
+
startIcon: boton.icon ? /* @__PURE__ */ React21.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
|
|
2586
2598
|
},
|
|
2587
2599
|
boton.text
|
|
2588
2600
|
);
|
|
2589
2601
|
}))) : dialogActions.map((boton, index) => {
|
|
2590
|
-
return /* @__PURE__ */
|
|
2602
|
+
return /* @__PURE__ */ React21.createElement(
|
|
2591
2603
|
Button9,
|
|
2592
2604
|
{
|
|
2593
2605
|
key: index,
|
|
@@ -2596,7 +2608,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2596
2608
|
size: "small",
|
|
2597
2609
|
onClick: boton.fn,
|
|
2598
2610
|
disabled: boton.disabled || false,
|
|
2599
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
2611
|
+
startIcon: boton.icon ? /* @__PURE__ */ React21.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
|
|
2600
2612
|
},
|
|
2601
2613
|
boton.text
|
|
2602
2614
|
);
|
|
@@ -2605,7 +2617,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2605
2617
|
};
|
|
2606
2618
|
|
|
2607
2619
|
// src/Components/SCMenu.tsx
|
|
2608
|
-
import
|
|
2620
|
+
import React22 from "react";
|
|
2609
2621
|
import { Box as Box12, Typography as Typography14, Paper, Divider as Divider4, MenuList, MenuItem as MenuItem4, ListItemIcon as ListItemIcon4, SvgIcon as SvgIcon6 } from "@mui/material";
|
|
2610
2622
|
import Grid7 from "@mui/material/Grid2";
|
|
2611
2623
|
|
|
@@ -2638,12 +2650,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
2638
2650
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
2639
2651
|
const widthContainer = menuSize + pageSize;
|
|
2640
2652
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2641
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2642
|
-
const [value, setValue] =
|
|
2643
|
-
|
|
2653
|
+
const [selectedIndex, setSelectedIndex] = React22.useState("1");
|
|
2654
|
+
const [value, setValue] = React22.useState("1");
|
|
2655
|
+
React22.useEffect(() => {
|
|
2644
2656
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2645
2657
|
}, [height]);
|
|
2646
|
-
|
|
2658
|
+
React22.useEffect(() => {
|
|
2647
2659
|
if (defaultOption) {
|
|
2648
2660
|
handleClickMenusItem(event, void 0);
|
|
2649
2661
|
}
|
|
@@ -2673,7 +2685,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
2673
2685
|
setValue(String(index + 1));
|
|
2674
2686
|
}
|
|
2675
2687
|
};
|
|
2676
|
-
return /* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Grid7, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React22.createElement(Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React22.createElement(MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
|
|
2677
2689
|
MenuItem4,
|
|
2678
2690
|
{
|
|
2679
2691
|
disabled: disable == true ? true : false,
|
|
@@ -2681,25 +2693,25 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
2681
2693
|
selected: String(index + 1) === selectedIndex,
|
|
2682
2694
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
2683
2695
|
},
|
|
2684
|
-
option.iconLeft ? /* @__PURE__ */
|
|
2685
|
-
/* @__PURE__ */
|
|
2686
|
-
), option.divider == true ? /* @__PURE__ */
|
|
2696
|
+
option.iconLeft ? /* @__PURE__ */ React22.createElement(ListItemIcon4, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React22.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
2697
|
+
/* @__PURE__ */ React22.createElement(Grid7, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React22.createElement(Typography14, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React22.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React22.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
2698
|
+
), option.divider == true ? /* @__PURE__ */ React22.createElement(Divider4, null) : "")))), /* @__PURE__ */ React22.createElement(Grid7, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React22.createElement(Box12, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React22.createElement(Typography14, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
2687
2699
|
};
|
|
2688
2700
|
|
|
2689
2701
|
// src/Components/SCTabs.tsx
|
|
2690
|
-
import
|
|
2702
|
+
import React23, { useEffect as useEffect15 } from "react";
|
|
2691
2703
|
import { Typography as Typography15, Box as Box13, SvgIcon as SvgIcon7, Tab, Tabs, Badge } from "@mui/material";
|
|
2692
2704
|
import TabPanel from "@mui/lab/TabPanel";
|
|
2693
2705
|
import TabContext from "@mui/lab/TabContext";
|
|
2694
2706
|
import * as Muicon7 from "@mui/icons-material";
|
|
2695
2707
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
2696
|
-
const [toast, setToast] =
|
|
2708
|
+
const [toast, setToast] = React23.useState(null);
|
|
2697
2709
|
let i = 0;
|
|
2698
2710
|
let j = 0;
|
|
2699
2711
|
let k = 0;
|
|
2700
2712
|
let l = 0;
|
|
2701
2713
|
let validateTypeIcon = true;
|
|
2702
|
-
const [value, setValue] =
|
|
2714
|
+
const [value, setValue] = React23.useState("1");
|
|
2703
2715
|
useEffect15(() => {
|
|
2704
2716
|
if (defaultOption) {
|
|
2705
2717
|
handleChange(event, void 0);
|
|
@@ -2750,7 +2762,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2750
2762
|
setValue(newValue);
|
|
2751
2763
|
}
|
|
2752
2764
|
};
|
|
2753
|
-
return /* @__PURE__ */
|
|
2765
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React23.createElement(Box13, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React23.createElement(TabContext, { value }, /* @__PURE__ */ React23.createElement(
|
|
2754
2766
|
Tabs,
|
|
2755
2767
|
{
|
|
2756
2768
|
"data-testid": "tab-container",
|
|
@@ -2764,7 +2776,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2764
2776
|
orientation: orientation || "horizontal",
|
|
2765
2777
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
2766
2778
|
},
|
|
2767
|
-
options.map((option) => /* @__PURE__ */
|
|
2779
|
+
options.map((option) => /* @__PURE__ */ React23.createElement(
|
|
2768
2780
|
Tab,
|
|
2769
2781
|
{
|
|
2770
2782
|
"data-testid": "tab-item",
|
|
@@ -2773,7 +2785,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2773
2785
|
label: option.name || "",
|
|
2774
2786
|
disabled: option.disabled || false,
|
|
2775
2787
|
iconPosition: iconPosition || "end",
|
|
2776
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
2788
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ React23.createElement(
|
|
2777
2789
|
Badge,
|
|
2778
2790
|
{
|
|
2779
2791
|
sx: {
|
|
@@ -2788,27 +2800,27 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2788
2800
|
badgeContent: option.iconOrBadge,
|
|
2789
2801
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
2790
2802
|
}
|
|
2791
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
2803
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ React23.createElement(SvgIcon7, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
2792
2804
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
2793
2805
|
}
|
|
2794
2806
|
))
|
|
2795
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
2807
|
+
), children, options.map((option) => /* @__PURE__ */ React23.createElement(
|
|
2796
2808
|
TabPanel,
|
|
2797
2809
|
{
|
|
2798
2810
|
key: k = k + 1,
|
|
2799
2811
|
value: String(l = l + 1),
|
|
2800
2812
|
sx: { padding: "16px" }
|
|
2801
2813
|
},
|
|
2802
|
-
option.page ? option.page : /* @__PURE__ */
|
|
2803
|
-
)))) : /* @__PURE__ */
|
|
2814
|
+
option.page ? option.page : /* @__PURE__ */ React23.createElement(Typography15, null, "No se ha configurado el componente a visualizar ")
|
|
2815
|
+
)))) : /* @__PURE__ */ React23.createElement(Box13, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React23.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
2804
2816
|
};
|
|
2805
2817
|
|
|
2806
2818
|
// src/Components/Calendario/Calendar.tsx
|
|
2807
|
-
import
|
|
2819
|
+
import React30, { useState as useState12 } from "react";
|
|
2808
2820
|
import { Box as Box19, CircularProgress as CircularProgress4 } from "@mui/material";
|
|
2809
2821
|
|
|
2810
2822
|
// src/Components/Calendario/CalendarToolbar.tsx
|
|
2811
|
-
import
|
|
2823
|
+
import React24, { useState as useState11 } from "react";
|
|
2812
2824
|
import { ChevronLeft, ChevronRight, KeyboardArrowDown as KeyboardArrowDown2, LightModeOutlined } from "@mui/icons-material";
|
|
2813
2825
|
import { Box as Box14, Chip as Chip3, IconButton as IconButton9, Menu, MenuItem as MenuItem5, Stack as Stack8, Typography as Typography16 } from "@mui/material";
|
|
2814
2826
|
import dayjs2 from "dayjs";
|
|
@@ -2850,15 +2862,15 @@ var CalendarToolbar = ({
|
|
|
2850
2862
|
}
|
|
2851
2863
|
return labelDate.format(" DD MMMM YYYY");
|
|
2852
2864
|
};
|
|
2853
|
-
return /* @__PURE__ */
|
|
2865
|
+
return /* @__PURE__ */ React24.createElement(Stack8, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 0.5, px: 1, py: 0.5 }, /* @__PURE__ */ React24.createElement(Box14, null, /* @__PURE__ */ React24.createElement(
|
|
2854
2866
|
Chip3,
|
|
2855
2867
|
{
|
|
2856
2868
|
label: "Hoy",
|
|
2857
|
-
icon: /* @__PURE__ */
|
|
2869
|
+
icon: /* @__PURE__ */ React24.createElement(LightModeOutlined, { fontSize: "small" }),
|
|
2858
2870
|
color: "primary",
|
|
2859
2871
|
onClick: () => onNavigate("TODAY")
|
|
2860
2872
|
}
|
|
2861
|
-
)), /* @__PURE__ */
|
|
2873
|
+
)), /* @__PURE__ */ React24.createElement(Stack8, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React24.createElement(IconButton9, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ React24.createElement(ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ React24.createElement(IconButton9, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ React24.createElement(ChevronRight, { fontSize: "small" })), /* @__PURE__ */ React24.createElement(Typography16, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ React24.createElement(IconButton9, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ React24.createElement(KeyboardArrowDown2, { fontSize: "small" })), /* @__PURE__ */ React24.createElement(
|
|
2862
2874
|
Menu,
|
|
2863
2875
|
{
|
|
2864
2876
|
anchorEl,
|
|
@@ -2867,14 +2879,14 @@ var CalendarToolbar = ({
|
|
|
2867
2879
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2868
2880
|
transformOrigin: { vertical: "top", horizontal: "center" }
|
|
2869
2881
|
},
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
2872
|
-
/* @__PURE__ */
|
|
2873
|
-
)), children ? /* @__PURE__ */
|
|
2882
|
+
/* @__PURE__ */ React24.createElement(MenuItem5, { onClick: () => handleViewChange("month") }, "Mes"),
|
|
2883
|
+
/* @__PURE__ */ React24.createElement(MenuItem5, { onClick: () => handleViewChange("week") }, "Semana"),
|
|
2884
|
+
/* @__PURE__ */ React24.createElement(MenuItem5, { onClick: () => handleViewChange("day") }, "D\xEDa")
|
|
2885
|
+
)), children ? /* @__PURE__ */ React24.createElement(Box14, null, children) : /* @__PURE__ */ React24.createElement(Box14, { width: "24px" }), " ");
|
|
2874
2886
|
};
|
|
2875
2887
|
|
|
2876
2888
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
2877
|
-
import
|
|
2889
|
+
import React27 from "react";
|
|
2878
2890
|
import { Box as Box16, Typography as Typography18, IconButton as IconButton10, Paper as Paper2, Tooltip as Tooltip5, Stack as Stack10, Divider as Divider6, CircularProgress } from "@mui/material";
|
|
2879
2891
|
import AddIcon from "@mui/icons-material/Add";
|
|
2880
2892
|
import dayjs4 from "dayjs";
|
|
@@ -2907,10 +2919,10 @@ var stateColors = {
|
|
|
2907
2919
|
};
|
|
2908
2920
|
|
|
2909
2921
|
// src/Components/Calendario/Event.tsx
|
|
2910
|
-
import
|
|
2922
|
+
import React25 from "react";
|
|
2911
2923
|
import { Box as Box15, Stack as Stack9, Typography as Typography17, Divider as Divider5, Popover as Popover4 } from "@mui/material";
|
|
2912
2924
|
var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
2913
|
-
const [anchorEl, setAnchorEl] =
|
|
2925
|
+
const [anchorEl, setAnchorEl] = React25.useState(null);
|
|
2914
2926
|
const handlePopoverOpen = (event3) => {
|
|
2915
2927
|
setAnchorEl(event3.currentTarget);
|
|
2916
2928
|
};
|
|
@@ -2918,7 +2930,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2918
2930
|
setAnchorEl(null);
|
|
2919
2931
|
};
|
|
2920
2932
|
const open = Boolean(anchorEl);
|
|
2921
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2922
2934
|
Stack9,
|
|
2923
2935
|
{
|
|
2924
2936
|
direction: "row",
|
|
@@ -2939,7 +2951,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2939
2951
|
cursor: onClick ? "pointer" : "default"
|
|
2940
2952
|
}, sx)
|
|
2941
2953
|
},
|
|
2942
|
-
/* @__PURE__ */
|
|
2954
|
+
/* @__PURE__ */ React25.createElement(
|
|
2943
2955
|
Divider5,
|
|
2944
2956
|
{
|
|
2945
2957
|
orientation: "vertical",
|
|
@@ -2951,7 +2963,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2951
2963
|
}
|
|
2952
2964
|
}
|
|
2953
2965
|
),
|
|
2954
|
-
/* @__PURE__ */
|
|
2966
|
+
/* @__PURE__ */ React25.createElement(
|
|
2955
2967
|
Box15,
|
|
2956
2968
|
{
|
|
2957
2969
|
px: 1,
|
|
@@ -2961,7 +2973,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2961
2973
|
display: "flex",
|
|
2962
2974
|
alignItems: "center"
|
|
2963
2975
|
},
|
|
2964
|
-
/* @__PURE__ */
|
|
2976
|
+
/* @__PURE__ */ React25.createElement(
|
|
2965
2977
|
Typography17,
|
|
2966
2978
|
{
|
|
2967
2979
|
color: "text.primary",
|
|
@@ -2977,7 +2989,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2977
2989
|
},
|
|
2978
2990
|
event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
|
|
2979
2991
|
),
|
|
2980
|
-
/* @__PURE__ */
|
|
2992
|
+
/* @__PURE__ */ React25.createElement(
|
|
2981
2993
|
Popover4,
|
|
2982
2994
|
{
|
|
2983
2995
|
id: "mouse-over-popover",
|
|
@@ -3002,9 +3014,9 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3002
3014
|
};
|
|
3003
3015
|
|
|
3004
3016
|
// src/assets/LogoCalendario.tsx
|
|
3005
|
-
import
|
|
3017
|
+
import React26 from "react";
|
|
3006
3018
|
var LogoCalendario = () => {
|
|
3007
|
-
return /* @__PURE__ */
|
|
3019
|
+
return /* @__PURE__ */ React26.createElement("svg", { width: "60", height: "61", viewBox: "0 0 60 61", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React26.createElement("g", { "clip-path": "url(#clip0_5353_24891)" }, /* @__PURE__ */ React26.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M40.7361 11.1589C39.7792 11.1589 39.0106 11.9722 39.0106 12.9661V15.4375H20.0309V12.9661C20.0309 11.964 19.2545 11.1589 18.3055 11.1589C17.3487 11.1589 16.5801 11.9722 16.5801 12.9661V15.4375H12.8819C12.0652 15.4375 11.4038 16.0918 11.4038 16.8998V20.6551C11.4038 21.463 12.0652 22.1174 12.8819 22.1174H46.8383C47.655 22.1174 48.3165 21.463 48.3165 20.6551V16.8998C48.3165 16.0918 47.655 15.4375 46.8383 15.4375H42.4615V12.9661C42.4615 11.964 41.6851 11.1589 40.7361 11.1589ZM19.4827 19.2049C19.6528 19.1343 19.7361 19.006 19.7724 18.8352C19.6916 18.9714 19.594 19.0957 19.4827 19.2049Z", fill: "#00BCD4" }), /* @__PURE__ */ React26.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14.2037 25.8653C13.7579 25.8653 13.425 26.2168 13.425 26.6093V47.3669C13.425 47.7595 13.7579 48.1109 14.2037 48.1109H46.0004C46.4782 48.1109 46.8656 47.7236 46.8656 47.2458V26.6093C46.8656 26.2168 46.5327 25.8653 46.087 25.8653H14.2037ZM11.6948 26.6093C11.6948 25.2255 12.8384 24.135 14.2037 24.135H46.087C47.4522 24.135 48.5959 25.2255 48.5959 26.6093V47.2458C48.5959 48.6792 47.4339 49.8412 46.0004 49.8412H14.2037C12.8384 49.8412 11.6948 48.7508 11.6948 47.3669V26.6093Z", fill: "#6392BD" }), /* @__PURE__ */ React26.createElement("path", { d: "M19.481 30.9138C19.481 30.5164 20.1155 30.1903 20.9058 30.1903C21.6894 30.1903 22.3305 30.5131 22.3305 30.9138V32.8862C22.3305 33.2836 21.6894 33.6097 20.9058 33.6097C20.1222 33.6097 19.481 33.2869 19.481 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ React26.createElement("path", { d: "M30.0242 30.1903C29.2339 30.1903 28.5995 30.5164 28.5995 30.9138V32.8862C28.5995 33.2869 29.2406 33.6097 30.0242 33.6097C30.8079 33.6097 31.449 33.2836 31.449 32.8862V30.9138C31.449 30.5131 30.8079 30.1903 30.0242 30.1903Z", fill: "#6392BD" }), /* @__PURE__ */ React26.createElement("path", { d: "M37.7179 30.9138C37.7179 30.5164 38.3524 30.1903 39.1427 30.1903C39.608 30.1903 40.022 30.3038 40.2825 30.4797C40.3515 30.5276 40.4116 30.5788 40.4561 30.6344C40.5274 30.7201 40.5675 30.8147 40.5675 30.9138V32.8862C40.5675 33.2836 39.9263 33.6097 39.1427 33.6097C38.3591 33.6097 37.7179 33.2869 37.7179 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ React26.createElement("path", { d: "M20.9058 39.8787C20.1155 39.8787 19.481 40.2048 19.481 40.6022V42.5746C19.481 42.687 19.5322 42.7927 19.6213 42.8874C19.7036 42.9731 19.8172 43.0499 19.9552 43.1122C20.2068 43.228 20.5407 43.2981 20.9058 43.2981C21.6894 43.2981 22.3305 42.972 22.3305 42.5746V40.6022C22.3305 40.2015 21.6894 39.8787 20.9058 39.8787Z", fill: "#6392BD" }), /* @__PURE__ */ React26.createElement("path", { d: "M29.524 39.9477C29.7087 39.9032 29.9158 39.8787 30.1339 39.8787C30.9176 39.8787 31.5587 40.2015 31.5587 40.6022V42.5746C31.5587 42.972 30.9176 43.2981 30.1339 43.2981C29.3503 43.2981 28.7092 42.9753 28.7092 42.5746V40.6022C28.7092 40.315 29.0409 40.0646 29.524 39.9477Z", fill: "#6392BD" }), /* @__PURE__ */ React26.createElement("path", { d: "M38.5141 39.9482C38.6989 39.9037 38.9059 39.8792 39.1241 39.8792C39.9077 39.8792 40.5488 40.202 40.5488 40.6027V42.5751C40.5488 42.9725 39.9077 43.2986 39.1241 43.2986C38.3405 43.2986 37.6993 42.9758 37.6993 42.5751V40.6027C37.6993 40.3155 38.031 40.0651 38.5141 39.9482Z", fill: "#6392BD" })), /* @__PURE__ */ React26.createElement("defs", null, /* @__PURE__ */ React26.createElement("clipPath", { id: "clip0_5353_24891" }, /* @__PURE__ */ React26.createElement("rect", { width: "60", height: "60", fill: "white", transform: "translate(0 0.5)" }))));
|
|
3008
3020
|
};
|
|
3009
3021
|
|
|
3010
3022
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
@@ -3014,22 +3026,22 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3014
3026
|
const noEvents = events.length === 0;
|
|
3015
3027
|
const days = getMonthDays(currentDate);
|
|
3016
3028
|
const weekDays = Array.from({ length: 7 }, (_, i) => dayjs4().day(i));
|
|
3017
|
-
const [openDrawer, setOpenDrawer] =
|
|
3018
|
-
const [selectedDay, setSelectedDay] =
|
|
3019
|
-
const [selectedEvents, setSelectedEvents] =
|
|
3020
|
-
return /* @__PURE__ */
|
|
3029
|
+
const [openDrawer, setOpenDrawer] = React27.useState(false);
|
|
3030
|
+
const [selectedDay, setSelectedDay] = React27.useState(null);
|
|
3031
|
+
const [selectedEvents, setSelectedEvents] = React27.useState([]);
|
|
3032
|
+
return /* @__PURE__ */ React27.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React27.createElement(Box16, { minWidth: "1050px" }, /* @__PURE__ */ React27.createElement(Box16, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React27.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React27.createElement(Typography18, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React27.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React27.createElement(CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React27.createElement(
|
|
3021
3033
|
EmptyState,
|
|
3022
3034
|
{
|
|
3023
3035
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3024
3036
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3025
|
-
icon: /* @__PURE__ */
|
|
3037
|
+
icon: /* @__PURE__ */ React27.createElement(LogoCalendario, null)
|
|
3026
3038
|
}
|
|
3027
|
-
) : /* @__PURE__ */
|
|
3039
|
+
) : /* @__PURE__ */ React27.createElement(Box16, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5 }, days.map((day) => {
|
|
3028
3040
|
const dayEvents = events.filter(
|
|
3029
3041
|
(e) => day.isBetween(e.start.startOf("day"), e.end.endOf("day"), null, "[]")
|
|
3030
3042
|
);
|
|
3031
3043
|
const isCurrentMonth = day.month() === currentDate.month();
|
|
3032
|
-
return /* @__PURE__ */
|
|
3044
|
+
return /* @__PURE__ */ React27.createElement(
|
|
3033
3045
|
Paper2,
|
|
3034
3046
|
{
|
|
3035
3047
|
key: day.toString(),
|
|
@@ -3046,7 +3058,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3046
3058
|
overflow: "hidden"
|
|
3047
3059
|
}
|
|
3048
3060
|
},
|
|
3049
|
-
/* @__PURE__ */
|
|
3061
|
+
/* @__PURE__ */ React27.createElement(Box16, { p: 1, flexShrink: 0 }, /* @__PURE__ */ React27.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ React27.createElement(
|
|
3050
3062
|
Box16,
|
|
3051
3063
|
{
|
|
3052
3064
|
sx: {
|
|
@@ -3059,7 +3071,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3059
3071
|
justifyContent: "center"
|
|
3060
3072
|
}
|
|
3061
3073
|
},
|
|
3062
|
-
/* @__PURE__ */
|
|
3074
|
+
/* @__PURE__ */ React27.createElement(
|
|
3063
3075
|
Typography18,
|
|
3064
3076
|
{
|
|
3065
3077
|
variant: "body2",
|
|
@@ -3067,7 +3079,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3067
3079
|
},
|
|
3068
3080
|
day.date()
|
|
3069
3081
|
)
|
|
3070
|
-
), dayEvents.length > 2 && /* @__PURE__ */
|
|
3082
|
+
), dayEvents.length > 2 && /* @__PURE__ */ React27.createElement(Tooltip5, { title: "M\xE1s eventos" }, /* @__PURE__ */ React27.createElement(
|
|
3071
3083
|
IconButton10,
|
|
3072
3084
|
{
|
|
3073
3085
|
color: "primary",
|
|
@@ -3079,9 +3091,9 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3079
3091
|
setSelectedEvents(dayEvents);
|
|
3080
3092
|
}
|
|
3081
3093
|
},
|
|
3082
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ React27.createElement(AddIcon, { fontSize: "small" })
|
|
3083
3095
|
)))),
|
|
3084
|
-
/* @__PURE__ */
|
|
3096
|
+
/* @__PURE__ */ React27.createElement(Box16, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, 2).map((event2) => /* @__PURE__ */ React27.createElement(
|
|
3085
3097
|
CalendarEventCard,
|
|
3086
3098
|
{
|
|
3087
3099
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3091,7 +3103,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3091
3103
|
onHover: onEventHover
|
|
3092
3104
|
}
|
|
3093
3105
|
))),
|
|
3094
|
-
dayEvents.length > 2 && /* @__PURE__ */
|
|
3106
|
+
dayEvents.length > 2 && /* @__PURE__ */ React27.createElement(
|
|
3095
3107
|
Stack10,
|
|
3096
3108
|
{
|
|
3097
3109
|
justifyItems: "center",
|
|
@@ -3100,7 +3112,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3100
3112
|
onClick: (e) => e.stopPropagation(),
|
|
3101
3113
|
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3102
3114
|
},
|
|
3103
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ React27.createElement(
|
|
3104
3116
|
SCDrawer,
|
|
3105
3117
|
{
|
|
3106
3118
|
width: "350px",
|
|
@@ -3112,7 +3124,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3112
3124
|
arrayElements: [{
|
|
3113
3125
|
component: (() => {
|
|
3114
3126
|
const [first, ...rest] = dayEvents;
|
|
3115
|
-
return /* @__PURE__ */
|
|
3127
|
+
return /* @__PURE__ */ React27.createElement(Box16, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ React27.createElement(Typography18, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ React27.createElement(Box16, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ React27.createElement(
|
|
3116
3128
|
CalendarEventCard,
|
|
3117
3129
|
{
|
|
3118
3130
|
event: first,
|
|
@@ -3127,7 +3139,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3127
3139
|
}
|
|
3128
3140
|
}
|
|
3129
3141
|
}
|
|
3130
|
-
)), /* @__PURE__ */
|
|
3142
|
+
)), /* @__PURE__ */ React27.createElement(Divider6, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ React27.createElement(Typography18, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ React27.createElement(
|
|
3131
3143
|
Box16,
|
|
3132
3144
|
{
|
|
3133
3145
|
width: "100%",
|
|
@@ -3140,7 +3152,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3140
3152
|
flexDirection: "column",
|
|
3141
3153
|
gap: 1.5
|
|
3142
3154
|
},
|
|
3143
|
-
rest.map((event2) => /* @__PURE__ */
|
|
3155
|
+
rest.map((event2) => /* @__PURE__ */ React27.createElement(
|
|
3144
3156
|
CalendarEventCard,
|
|
3145
3157
|
{
|
|
3146
3158
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3169,7 +3181,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3169
3181
|
};
|
|
3170
3182
|
|
|
3171
3183
|
// src/Components/Calendario/Views/WeekView.tsx
|
|
3172
|
-
import
|
|
3184
|
+
import React28 from "react";
|
|
3173
3185
|
import { Box as Box17, CircularProgress as CircularProgress2, Typography as Typography19 } from "@mui/material";
|
|
3174
3186
|
import dayjs5 from "dayjs";
|
|
3175
3187
|
import localeData2 from "dayjs/plugin/localeData";
|
|
@@ -3204,9 +3216,9 @@ var WeekView = ({
|
|
|
3204
3216
|
}
|
|
3205
3217
|
return "none";
|
|
3206
3218
|
};
|
|
3207
|
-
return /* @__PURE__ */
|
|
3219
|
+
return /* @__PURE__ */ React28.createElement(Box17, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React28.createElement(Box17, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ React28.createElement(Box17, { width: 45, bgcolor: "transparent" }), days.map((day) => {
|
|
3208
3220
|
const isToday2 = day.format("YYYY-MM-DD") === todayString;
|
|
3209
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ React28.createElement(
|
|
3210
3222
|
Box17,
|
|
3211
3223
|
{
|
|
3212
3224
|
key: day.toString(),
|
|
@@ -3223,19 +3235,19 @@ var WeekView = ({
|
|
|
3223
3235
|
borderBottom: isToday2 ? 2 : 0,
|
|
3224
3236
|
borderColor: isToday2 ? "primary.main" : "transparent"
|
|
3225
3237
|
},
|
|
3226
|
-
/* @__PURE__ */
|
|
3227
|
-
/* @__PURE__ */
|
|
3238
|
+
/* @__PURE__ */ React28.createElement(Typography19, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3239
|
+
/* @__PURE__ */ React28.createElement(Typography19, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3228
3240
|
);
|
|
3229
|
-
})), isLoading ? /* @__PURE__ */
|
|
3241
|
+
})), isLoading ? /* @__PURE__ */ React28.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React28.createElement(CircularProgress2, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React28.createElement(
|
|
3230
3242
|
EmptyState,
|
|
3231
3243
|
{
|
|
3232
3244
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3233
3245
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3234
|
-
icon: /* @__PURE__ */
|
|
3246
|
+
icon: /* @__PURE__ */ React28.createElement(LogoCalendario, null)
|
|
3235
3247
|
}
|
|
3236
3248
|
) : (
|
|
3237
3249
|
// Grid de horas y eventos
|
|
3238
|
-
/* @__PURE__ */
|
|
3250
|
+
/* @__PURE__ */ React28.createElement(Box17, { display: "flex", flex: 1 }, /* @__PURE__ */ React28.createElement(Box17, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ React28.createElement(
|
|
3239
3251
|
Box17,
|
|
3240
3252
|
{
|
|
3241
3253
|
key: h,
|
|
@@ -3244,7 +3256,7 @@ var WeekView = ({
|
|
|
3244
3256
|
pr: 1,
|
|
3245
3257
|
borderColor: "divider"
|
|
3246
3258
|
},
|
|
3247
|
-
/* @__PURE__ */
|
|
3259
|
+
/* @__PURE__ */ React28.createElement(Typography19, { variant: "caption", color: "text.secondary" }, dayjs5().hour(h).format("h A"))
|
|
3248
3260
|
))), days.map((day) => {
|
|
3249
3261
|
const dayEvents = events.filter(
|
|
3250
3262
|
(event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
@@ -3253,7 +3265,7 @@ var WeekView = ({
|
|
|
3253
3265
|
const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
|
|
3254
3266
|
return startsInRange || endsInRange;
|
|
3255
3267
|
}).sort((a, b) => a.start.valueOf() - b.start.valueOf());
|
|
3256
|
-
return /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ React28.createElement(
|
|
3257
3269
|
Box17,
|
|
3258
3270
|
{
|
|
3259
3271
|
key: day.toString(),
|
|
@@ -3266,7 +3278,7 @@ var WeekView = ({
|
|
|
3266
3278
|
},
|
|
3267
3279
|
hours.map((hourIdx) => {
|
|
3268
3280
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3269
|
-
return /* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ React28.createElement(
|
|
3270
3282
|
Box17,
|
|
3271
3283
|
{
|
|
3272
3284
|
key: hourIdx,
|
|
@@ -3282,7 +3294,7 @@ var WeekView = ({
|
|
|
3282
3294
|
const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
|
|
3283
3295
|
const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
|
|
3284
3296
|
const durationMinutes = eventEnd.diff(eventStart, "minute");
|
|
3285
|
-
return /* @__PURE__ */
|
|
3297
|
+
return /* @__PURE__ */ React28.createElement(
|
|
3286
3298
|
CalendarEventCard,
|
|
3287
3299
|
{
|
|
3288
3300
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3307,7 +3319,7 @@ var WeekView = ({
|
|
|
3307
3319
|
};
|
|
3308
3320
|
|
|
3309
3321
|
// src/Components/Calendario/Views/DayView.tsx
|
|
3310
|
-
import
|
|
3322
|
+
import React29 from "react";
|
|
3311
3323
|
import { Box as Box18, CircularProgress as CircularProgress3, Typography as Typography20 } from "@mui/material";
|
|
3312
3324
|
import dayjs6 from "dayjs";
|
|
3313
3325
|
var DayView = ({
|
|
@@ -3339,14 +3351,14 @@ var DayView = ({
|
|
|
3339
3351
|
(event2) => currentDate.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
3340
3352
|
);
|
|
3341
3353
|
const noEvents = events.length === 0;
|
|
3342
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ React29.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React29.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React29.createElement(Box18, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React29.createElement(Box18, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React29.createElement(Typography20, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React29.createElement(Typography20, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React29.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ React29.createElement(
|
|
3343
3355
|
EmptyState,
|
|
3344
3356
|
{
|
|
3345
3357
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3346
3358
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3347
|
-
icon: /* @__PURE__ */
|
|
3359
|
+
icon: /* @__PURE__ */ React29.createElement(LogoCalendario, null)
|
|
3348
3360
|
}
|
|
3349
|
-
) : /* @__PURE__ */
|
|
3361
|
+
) : /* @__PURE__ */ React29.createElement(Box18, { display: "flex", flex: 1 }, /* @__PURE__ */ React29.createElement(Box18, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ React29.createElement(
|
|
3350
3362
|
Box18,
|
|
3351
3363
|
{
|
|
3352
3364
|
key: h,
|
|
@@ -3357,10 +3369,10 @@ var DayView = ({
|
|
|
3357
3369
|
borderRight: "1px solid",
|
|
3358
3370
|
borderColor: "divider"
|
|
3359
3371
|
},
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
))), /* @__PURE__ */
|
|
3372
|
+
/* @__PURE__ */ React29.createElement(Typography20, { variant: "caption", color: "text.secondary" }, dayjs6().hour(h).format("h A"))
|
|
3373
|
+
))), /* @__PURE__ */ React29.createElement(Box18, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
|
|
3362
3374
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3363
|
-
return /* @__PURE__ */
|
|
3375
|
+
return /* @__PURE__ */ React29.createElement(
|
|
3364
3376
|
Box18,
|
|
3365
3377
|
{
|
|
3366
3378
|
key: hourIdx,
|
|
@@ -3379,7 +3391,7 @@ var DayView = ({
|
|
|
3379
3391
|
const clampedEnd = eventEnd.isAfter(maxEnd) ? maxEnd : eventEnd;
|
|
3380
3392
|
const startMinutes = (clampedStart.hour() - startHour) * 60 + clampedStart.minute();
|
|
3381
3393
|
const durationMinutes = clampedEnd.diff(clampedStart, "minute");
|
|
3382
|
-
return /* @__PURE__ */
|
|
3394
|
+
return /* @__PURE__ */ React29.createElement(
|
|
3383
3395
|
CalendarEventCard,
|
|
3384
3396
|
{
|
|
3385
3397
|
key: `${event2.id}-${currentDate.toString()}`,
|
|
@@ -3435,7 +3447,7 @@ var Calendar = ({
|
|
|
3435
3447
|
} else if (action === "TODAY") newDate = dayjs7();
|
|
3436
3448
|
setCurrentDate(newDate);
|
|
3437
3449
|
};
|
|
3438
|
-
return /* @__PURE__ */
|
|
3450
|
+
return /* @__PURE__ */ React30.createElement(Box19, null, /* @__PURE__ */ React30.createElement(
|
|
3439
3451
|
CalendarToolbar,
|
|
3440
3452
|
{
|
|
3441
3453
|
labelDate: currentDate,
|
|
@@ -3444,7 +3456,7 @@ var Calendar = ({
|
|
|
3444
3456
|
onNavigate: handleNavigate
|
|
3445
3457
|
},
|
|
3446
3458
|
toolbar
|
|
3447
|
-
), isLoading ? /* @__PURE__ */
|
|
3459
|
+
), isLoading ? /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(Box19, null, /* @__PURE__ */ React30.createElement(
|
|
3448
3460
|
Box19,
|
|
3449
3461
|
{
|
|
3450
3462
|
display: "flex",
|
|
@@ -3452,8 +3464,8 @@ var Calendar = ({
|
|
|
3452
3464
|
alignItems: "center",
|
|
3453
3465
|
height: "400px"
|
|
3454
3466
|
},
|
|
3455
|
-
/* @__PURE__ */
|
|
3456
|
-
))) : /* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ React30.createElement(CircularProgress4, { variant: "indeterminate" })
|
|
3468
|
+
))) : /* @__PURE__ */ React30.createElement(React30.Fragment, null, view === "month" && /* @__PURE__ */ React30.createElement(
|
|
3457
3469
|
MonthView,
|
|
3458
3470
|
{
|
|
3459
3471
|
events,
|
|
@@ -3463,7 +3475,7 @@ var Calendar = ({
|
|
|
3463
3475
|
onEventClick,
|
|
3464
3476
|
onEventHover
|
|
3465
3477
|
}
|
|
3466
|
-
), view === "week" && /* @__PURE__ */
|
|
3478
|
+
), view === "week" && /* @__PURE__ */ React30.createElement(
|
|
3467
3479
|
WeekView,
|
|
3468
3480
|
{
|
|
3469
3481
|
events,
|
|
@@ -3475,7 +3487,7 @@ var Calendar = ({
|
|
|
3475
3487
|
startHour,
|
|
3476
3488
|
endHour
|
|
3477
3489
|
}
|
|
3478
|
-
), view === "day" && /* @__PURE__ */
|
|
3490
|
+
), view === "day" && /* @__PURE__ */ React30.createElement(
|
|
3479
3491
|
DayView,
|
|
3480
3492
|
{
|
|
3481
3493
|
events,
|
|
@@ -3489,7 +3501,7 @@ var Calendar = ({
|
|
|
3489
3501
|
};
|
|
3490
3502
|
|
|
3491
3503
|
// src/Components/SCTime.tsx
|
|
3492
|
-
import
|
|
3504
|
+
import React31, { useState as useState13 } from "react";
|
|
3493
3505
|
import { Box as Box20, InputAdornment as InputAdornment6, Popover as Popover5, ClickAwayListener } from "@mui/material";
|
|
3494
3506
|
import { LocalizationProvider as LocalizationProvider3 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
3495
3507
|
import { AdapterDayjs as AdapterDayjs2 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
@@ -3546,7 +3558,7 @@ var SCTime = ({
|
|
|
3546
3558
|
setIsOpenPopover(false);
|
|
3547
3559
|
setAnchorEl(null);
|
|
3548
3560
|
};
|
|
3549
|
-
return /* @__PURE__ */
|
|
3561
|
+
return /* @__PURE__ */ React31.createElement(LocalizationProvider3, { dateAdapter: AdapterDayjs2 }, /* @__PURE__ */ React31.createElement(Box20, { sx: { position: "relative", width: "120px" } }, /* @__PURE__ */ React31.createElement(
|
|
3550
3562
|
TimeField,
|
|
3551
3563
|
{
|
|
3552
3564
|
label,
|
|
@@ -3558,7 +3570,7 @@ var SCTime = ({
|
|
|
3558
3570
|
slotProps: {
|
|
3559
3571
|
textField: {
|
|
3560
3572
|
InputProps: {
|
|
3561
|
-
endAdornment: /* @__PURE__ */
|
|
3573
|
+
endAdornment: /* @__PURE__ */ React31.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React31.createElement(
|
|
3562
3574
|
AccessTimeIcon,
|
|
3563
3575
|
{
|
|
3564
3576
|
color: disabled ? "disabled" : "action",
|
|
@@ -3587,7 +3599,7 @@ var SCTime = ({
|
|
|
3587
3599
|
}
|
|
3588
3600
|
}
|
|
3589
3601
|
}
|
|
3590
|
-
), /* @__PURE__ */
|
|
3602
|
+
), /* @__PURE__ */ React31.createElement(
|
|
3591
3603
|
Popover5,
|
|
3592
3604
|
{
|
|
3593
3605
|
open: isOpenPopover,
|
|
@@ -3615,7 +3627,7 @@ var SCTime = ({
|
|
|
3615
3627
|
}
|
|
3616
3628
|
}
|
|
3617
3629
|
},
|
|
3618
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ React31.createElement(ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ React31.createElement(Box20, { sx: { p: 0 } }, /* @__PURE__ */ React31.createElement(
|
|
3619
3631
|
DigitalClock,
|
|
3620
3632
|
{
|
|
3621
3633
|
value: state,
|
|
@@ -3637,7 +3649,7 @@ var SCTime = ({
|
|
|
3637
3649
|
};
|
|
3638
3650
|
|
|
3639
3651
|
// src/Components/SCCard.tsx
|
|
3640
|
-
import
|
|
3652
|
+
import React32 from "react";
|
|
3641
3653
|
import { Button as Button11, Box as Box21, SvgIcon as SvgIcon8 } from "@mui/material";
|
|
3642
3654
|
import IconButton11 from "@mui/material/IconButton";
|
|
3643
3655
|
import Card from "@mui/material/Card";
|
|
@@ -3651,10 +3663,10 @@ import * as Muicon8 from "@mui/icons-material";
|
|
|
3651
3663
|
var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
3652
3664
|
let iconTitleValidation = "";
|
|
3653
3665
|
let IconTitle;
|
|
3654
|
-
const [expanded, setExpanded] =
|
|
3666
|
+
const [expanded, setExpanded] = React32.useState(false);
|
|
3655
3667
|
if (iconTitle) {
|
|
3656
3668
|
if (Muicon8[iconTitle] == void 0) {
|
|
3657
|
-
if (iconTitle &&
|
|
3669
|
+
if (iconTitle && React32.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
3658
3670
|
iconTitleValidation = "image";
|
|
3659
3671
|
IconTitle = iconTitle;
|
|
3660
3672
|
} else {
|
|
@@ -3669,11 +3681,11 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
3669
3681
|
const handleExpandClick = () => {
|
|
3670
3682
|
setExpanded(!expanded);
|
|
3671
3683
|
};
|
|
3672
|
-
return /* @__PURE__ */
|
|
3684
|
+
return /* @__PURE__ */ React32.createElement(Card, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ React32.createElement(
|
|
3673
3685
|
CardHeader,
|
|
3674
3686
|
{
|
|
3675
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */
|
|
3676
|
-
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */
|
|
3687
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React32.createElement(Box21, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React32.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React32.createElement(SvgIcon8, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
3688
|
+
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React32.createElement(Button11, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React32.createElement(IconButton11, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React32.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
|
|
3677
3689
|
title,
|
|
3678
3690
|
subheader: subtitle,
|
|
3679
3691
|
sx: {
|
|
@@ -3692,14 +3704,14 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
3692
3704
|
}
|
|
3693
3705
|
}
|
|
3694
3706
|
}
|
|
3695
|
-
), image && /* @__PURE__ */
|
|
3707
|
+
), image && /* @__PURE__ */ React32.createElement(
|
|
3696
3708
|
CardMedia,
|
|
3697
3709
|
{
|
|
3698
3710
|
component: "img",
|
|
3699
3711
|
height: "194",
|
|
3700
3712
|
image
|
|
3701
3713
|
}
|
|
3702
|
-
), content && /* @__PURE__ */
|
|
3714
|
+
), content && /* @__PURE__ */ React32.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React32.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React32.createElement(Button11, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React32.createElement(IconButton11, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React32.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React32.createElement(
|
|
3703
3715
|
Button11,
|
|
3704
3716
|
{
|
|
3705
3717
|
key: index,
|
|
@@ -3710,14 +3722,14 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
3710
3722
|
disabled: action.disabled || false
|
|
3711
3723
|
},
|
|
3712
3724
|
action.text
|
|
3713
|
-
)) : ""), expand && /* @__PURE__ */
|
|
3725
|
+
)) : ""), expand && /* @__PURE__ */ React32.createElement(Collapse, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React32.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
3714
3726
|
};
|
|
3715
3727
|
|
|
3716
3728
|
// src/Theme/index.ts
|
|
3717
3729
|
import { createTheme } from "@mui/material/styles";
|
|
3718
3730
|
|
|
3719
3731
|
// src/Theme/components.ts
|
|
3720
|
-
import
|
|
3732
|
+
import React33 from "react";
|
|
3721
3733
|
import {
|
|
3722
3734
|
InfoRounded as InfoRounded2,
|
|
3723
3735
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -4420,10 +4432,10 @@ var components = {
|
|
|
4420
4432
|
MuiAlert: {
|
|
4421
4433
|
defaultProps: {
|
|
4422
4434
|
iconMapping: {
|
|
4423
|
-
success:
|
|
4424
|
-
error:
|
|
4425
|
-
warning:
|
|
4426
|
-
info:
|
|
4435
|
+
success: React33.createElement(CheckCircleRounded2),
|
|
4436
|
+
error: React33.createElement(ErrorRounded2),
|
|
4437
|
+
warning: React33.createElement(WarningRounded2),
|
|
4438
|
+
info: React33.createElement(InfoRounded2)
|
|
4427
4439
|
}
|
|
4428
4440
|
},
|
|
4429
4441
|
variants: [
|