componentes-sinco 1.1.13 → 1.1.15-rc.2
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 +44 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +48 -80
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -109,6 +109,7 @@ interface DrawerProps<T> {
|
|
|
109
109
|
setOpen?: any;
|
|
110
110
|
chipFilters?: any[];
|
|
111
111
|
heightDrawer?: number;
|
|
112
|
+
filterSideCard?: any;
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -135,7 +136,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
135
136
|
progressToast: number;
|
|
136
137
|
};
|
|
137
138
|
|
|
138
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, }: DrawerProps<T>): React__default.JSX.Element;
|
|
139
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, }: DrawerProps<T>): React__default.JSX.Element;
|
|
139
140
|
|
|
140
141
|
interface FooterActionsProperties {
|
|
141
142
|
label?: React.ReactNode;
|
|
@@ -332,9 +333,10 @@ interface SCDataGridInitialProps<T> {
|
|
|
332
333
|
checkboxSelection?: boolean;
|
|
333
334
|
width?: string | number;
|
|
334
335
|
maxHeight?: number;
|
|
335
|
-
|
|
336
|
+
disableColumnMenu?: boolean;
|
|
337
|
+
disableColumnSorting?: boolean;
|
|
336
338
|
}
|
|
337
|
-
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight,
|
|
339
|
+
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, disableColumnMenu, disableColumnSorting }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
338
340
|
declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
|
|
339
341
|
|
|
340
342
|
interface SCAutocompleteProps<T> {
|
package/dist/index.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ interface DrawerProps<T> {
|
|
|
109
109
|
setOpen?: any;
|
|
110
110
|
chipFilters?: any[];
|
|
111
111
|
heightDrawer?: number;
|
|
112
|
+
filterSideCard?: any;
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -135,7 +136,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
135
136
|
progressToast: number;
|
|
136
137
|
};
|
|
137
138
|
|
|
138
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, }: DrawerProps<T>): React__default.JSX.Element;
|
|
139
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, }: DrawerProps<T>): React__default.JSX.Element;
|
|
139
140
|
|
|
140
141
|
interface FooterActionsProperties {
|
|
141
142
|
label?: React.ReactNode;
|
|
@@ -332,9 +333,10 @@ interface SCDataGridInitialProps<T> {
|
|
|
332
333
|
checkboxSelection?: boolean;
|
|
333
334
|
width?: string | number;
|
|
334
335
|
maxHeight?: number;
|
|
335
|
-
|
|
336
|
+
disableColumnMenu?: boolean;
|
|
337
|
+
disableColumnSorting?: boolean;
|
|
336
338
|
}
|
|
337
|
-
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight,
|
|
339
|
+
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, disableColumnMenu, disableColumnSorting }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
338
340
|
declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
|
|
339
341
|
|
|
340
342
|
interface SCAutocompleteProps<T> {
|
package/dist/index.js
CHANGED
|
@@ -2257,7 +2257,8 @@ var DrawerHeader = ({
|
|
|
2257
2257
|
title,
|
|
2258
2258
|
colorTitle,
|
|
2259
2259
|
onClose,
|
|
2260
|
-
anchor
|
|
2260
|
+
anchor,
|
|
2261
|
+
filterSideCard
|
|
2261
2262
|
}) => {
|
|
2262
2263
|
return /* @__PURE__ */ React15.createElement(
|
|
2263
2264
|
Grid5,
|
|
@@ -2275,7 +2276,7 @@ var DrawerHeader = ({
|
|
|
2275
2276
|
}
|
|
2276
2277
|
},
|
|
2277
2278
|
/* @__PURE__ */ React15.createElement(Typography8, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"),
|
|
2278
|
-
/* @__PURE__ */ React15.createElement(IconButton8, { onClick: onClose }, /* @__PURE__ */ React15.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))
|
|
2279
|
+
filterSideCard ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, filterSideCard) : /* @__PURE__ */ React15.createElement(IconButton8, { onClick: onClose }, /* @__PURE__ */ React15.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))
|
|
2279
2280
|
);
|
|
2280
2281
|
};
|
|
2281
2282
|
|
|
@@ -2291,7 +2292,8 @@ function SCDrawer({
|
|
|
2291
2292
|
open,
|
|
2292
2293
|
setOpen,
|
|
2293
2294
|
chipFilters,
|
|
2294
|
-
heightDrawer = 456
|
|
2295
|
+
heightDrawer = 456,
|
|
2296
|
+
filterSideCard
|
|
2295
2297
|
}) {
|
|
2296
2298
|
const drawerBleeding = heightDrawer;
|
|
2297
2299
|
const { drawerOpen, handleDrawerClose, toggleDrawer } = useDrawerState({ open, setOpen });
|
|
@@ -2360,7 +2362,7 @@ function SCDrawer({
|
|
|
2360
2362
|
Drawer,
|
|
2361
2363
|
{
|
|
2362
2364
|
open: drawerOpen,
|
|
2363
|
-
onClose: toggleDrawer(false),
|
|
2365
|
+
onClose: filterSideCard ? void 0 : toggleDrawer(false),
|
|
2364
2366
|
anchor: anchor != null ? anchor : "left",
|
|
2365
2367
|
sx: {
|
|
2366
2368
|
"& .MuiDrawer-paper": {
|
|
@@ -2375,7 +2377,9 @@ function SCDrawer({
|
|
|
2375
2377
|
{
|
|
2376
2378
|
title,
|
|
2377
2379
|
colorTitle,
|
|
2378
|
-
onClose: handleDrawerClose
|
|
2380
|
+
onClose: handleDrawerClose,
|
|
2381
|
+
anchor,
|
|
2382
|
+
filterSideCard
|
|
2379
2383
|
}
|
|
2380
2384
|
), /* @__PURE__ */ React16.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ React16.createElement(DrawerActions, { actions: drawerActions, anchor }))
|
|
2381
2385
|
) : /* @__PURE__ */ React16.createElement(
|
|
@@ -2804,7 +2808,7 @@ import { LicenseInfo as LicenseInfo2 } from "@mui/x-license";
|
|
|
2804
2808
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
2805
2809
|
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
|
2806
2810
|
import { useTheme } from "@mui/material/styles";
|
|
2807
|
-
function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight,
|
|
2811
|
+
function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, disableColumnMenu, disableColumnSorting }) {
|
|
2808
2812
|
LicenseInfo2.setLicenseKey(
|
|
2809
2813
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
2810
2814
|
);
|
|
@@ -2955,11 +2959,12 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
2955
2959
|
}
|
|
2956
2960
|
}
|
|
2957
2961
|
};
|
|
2962
|
+
let densityC = "compact";
|
|
2958
2963
|
let validationTreeData = groupColumns ? true : false;
|
|
2959
2964
|
let validationCheckboxSelection = checkboxSelection || false;
|
|
2960
|
-
let styleDensity =
|
|
2965
|
+
let styleDensity = densityC || "compact";
|
|
2961
2966
|
let styleTopContainerHeight = styleDensity === "compact" ? "26px" : styleDensity === "standard" ? "38px" : styleDensity === "comfortable" ? "60px" : "27px";
|
|
2962
|
-
let styleRowHeight =
|
|
2967
|
+
let styleRowHeight = densityC == "compact" ? 32 : densityC == "standard" ? 28 : densityC == "comfortable" ? 36 : 32;
|
|
2963
2968
|
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
2964
2969
|
let validationGroupingColDef = groupingColDefs || {};
|
|
2965
2970
|
const [groupDataLenght, setGroupDataLengh] = useState13(0);
|
|
@@ -3033,6 +3038,24 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3033
3038
|
flex: 1
|
|
3034
3039
|
});
|
|
3035
3040
|
});
|
|
3041
|
+
const columnVisibilityModel = {};
|
|
3042
|
+
processedColumns.forEach((col) => {
|
|
3043
|
+
if (col.hide === true) {
|
|
3044
|
+
columnVisibilityModel[col.field] = false;
|
|
3045
|
+
}
|
|
3046
|
+
});
|
|
3047
|
+
console.log("columnVisibilityModel:", columnVisibilityModel);
|
|
3048
|
+
const initialState = {
|
|
3049
|
+
pagination: { paginationModel: { pageSize: rows } }
|
|
3050
|
+
};
|
|
3051
|
+
if (Object.keys(columnVisibilityModel).length > 0) {
|
|
3052
|
+
initialState.columns = { columnVisibilityModel };
|
|
3053
|
+
}
|
|
3054
|
+
useEffect13(() => {
|
|
3055
|
+
if (apiRef.current && Object.keys(columnVisibilityModel).length > 0) {
|
|
3056
|
+
apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
3057
|
+
}
|
|
3058
|
+
}, [columnVisibilityModel, apiRef]);
|
|
3036
3059
|
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, data && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React21.createElement(
|
|
3037
3060
|
DataGridPro,
|
|
3038
3061
|
{
|
|
@@ -3050,6 +3073,8 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3050
3073
|
pagination: { paginationModel: { pageSize: rows } }
|
|
3051
3074
|
},
|
|
3052
3075
|
scrollbarSize: 0,
|
|
3076
|
+
disableColumnMenu: disableColumnMenu ? disableColumnMenu : false,
|
|
3077
|
+
disableColumnSorting: disableColumnSorting ? disableColumnSorting : false,
|
|
3053
3078
|
checkboxSelection: validationCheckboxSelection,
|
|
3054
3079
|
rowSelectionModel: selectionModel,
|
|
3055
3080
|
onRowSelectionModelChange: (newSelection) => handleSelectionChange(newSelection),
|
|
@@ -3178,7 +3203,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3178
3203
|
))));
|
|
3179
3204
|
}
|
|
3180
3205
|
var SCDataGrid = React21.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
3181
|
-
const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight
|
|
3206
|
+
const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight;
|
|
3182
3207
|
return isEqual;
|
|
3183
3208
|
});
|
|
3184
3209
|
|
|
@@ -3445,7 +3470,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
3445
3470
|
);
|
|
3446
3471
|
})) : /* @__PURE__ */ React27.createElement(Box14, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ React27.createElement(ToggleButtonGroup, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
|
|
3447
3472
|
var _a;
|
|
3448
|
-
return /* @__PURE__ */ React27.createElement(ToggleButton, { disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ React27.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }));
|
|
3473
|
+
return /* @__PURE__ */ React27.createElement(ToggleButton, { sx: { color: "primary.main" }, disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ React27.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }));
|
|
3449
3474
|
})))) : "" : ""
|
|
3450
3475
|
)));
|
|
3451
3476
|
};
|
|
@@ -4580,6 +4605,7 @@ var SCTime = ({
|
|
|
4580
4605
|
const [anchorEl, setAnchorEl] = useState21(null);
|
|
4581
4606
|
const [isOpenPopover, setIsOpenPopover] = useState21(false);
|
|
4582
4607
|
const [popoverPlacement, setPopoverPlacement] = useState21("bottom");
|
|
4608
|
+
const [popoverWidth, setPopoverWidth] = useState21(void 0);
|
|
4583
4609
|
const detectPlacement = (element) => {
|
|
4584
4610
|
const rect = element.getBoundingClientRect();
|
|
4585
4611
|
const windowHeight = window.innerHeight;
|
|
@@ -4596,6 +4622,7 @@ var SCTime = ({
|
|
|
4596
4622
|
if (!disabled) {
|
|
4597
4623
|
const target = event2.currentTarget;
|
|
4598
4624
|
setAnchorEl(target);
|
|
4625
|
+
setPopoverWidth(target.offsetWidth);
|
|
4599
4626
|
detectPlacement(target);
|
|
4600
4627
|
setIsOpenPopover(true);
|
|
4601
4628
|
}
|
|
@@ -4676,7 +4703,8 @@ var SCTime = ({
|
|
|
4676
4703
|
border: "1px solid #e0e0e0",
|
|
4677
4704
|
maxHeight: "300px",
|
|
4678
4705
|
overflow: "visible",
|
|
4679
|
-
width:
|
|
4706
|
+
width: popoverWidth ? `${popoverWidth}px` : "100%",
|
|
4707
|
+
maxWidth: "none"
|
|
4680
4708
|
}
|
|
4681
4709
|
}
|
|
4682
4710
|
}
|
|
@@ -4782,7 +4810,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4782
4810
|
|
|
4783
4811
|
// src/Components/SCActivityCalendar.tsx
|
|
4784
4812
|
import React42, { useState as useState23 } from "react";
|
|
4785
|
-
import { Typography as Typography25, IconButton as IconButton15, Box as Box27, Badge as Badge2
|
|
4813
|
+
import { Typography as Typography25, IconButton as IconButton15, Box as Box27, Badge as Badge2 } from "@mui/material";
|
|
4786
4814
|
import Grid11 from "@mui/material/Grid";
|
|
4787
4815
|
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4788
4816
|
import { LocalizationProvider as LocalizationProvider4 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
@@ -4793,11 +4821,6 @@ import KeyboardDoubleArrowDownIcon2 from "@mui/icons-material/KeyboardDoubleArro
|
|
|
4793
4821
|
import KeyboardDoubleArrowUpIcon2 from "@mui/icons-material/KeyboardDoubleArrowUp";
|
|
4794
4822
|
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
|
|
4795
4823
|
import LightModeOutlinedIcon from "@mui/icons-material/LightModeOutlined";
|
|
4796
|
-
import FilterListIcon from "@mui/icons-material/FilterList";
|
|
4797
|
-
import CalendarMonthOutlinedIcon from "@mui/icons-material/CalendarMonthOutlined";
|
|
4798
|
-
import CheckCircleOutlineOutlinedIcon from "@mui/icons-material/CheckCircleOutlineOutlined";
|
|
4799
|
-
import EventBusyOutlinedIcon from "@mui/icons-material/EventBusyOutlined";
|
|
4800
|
-
import PendingOutlinedIcon from "@mui/icons-material/PendingOutlined";
|
|
4801
4824
|
var SCActivityCalendar = ({
|
|
4802
4825
|
//informativas
|
|
4803
4826
|
//apariencia
|
|
@@ -4814,9 +4837,6 @@ var SCActivityCalendar = ({
|
|
|
4814
4837
|
const [fechaSeleccionada, setFechaSeleccionada] = useState23();
|
|
4815
4838
|
const [stateVal, setstateVal] = React42.useState(/* @__PURE__ */ new Date());
|
|
4816
4839
|
const [openCalendar, setOpenCalendar] = React42.useState(false);
|
|
4817
|
-
const [anchorPopoverFiltro, setAnchorPopoverFiltro] = useState23(null);
|
|
4818
|
-
const [datosEventos, setDatosEventos] = React42.useState(events);
|
|
4819
|
-
const openPopoverFiltro = Boolean(anchorPopoverFiltro);
|
|
4820
4840
|
const hoy = /* @__PURE__ */ new Date();
|
|
4821
4841
|
const inicioSemana = startOfWeek2(fecha, { weekStartsOn: 0 });
|
|
4822
4842
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays2(inicioSemana, i));
|
|
@@ -4844,22 +4864,6 @@ var SCActivityCalendar = ({
|
|
|
4844
4864
|
// 0 = domingo, 1 = lunes
|
|
4845
4865
|
})
|
|
4846
4866
|
});
|
|
4847
|
-
const handleClickPopoverFiltro = (event2) => {
|
|
4848
|
-
setAnchorPopoverFiltro(event2.currentTarget);
|
|
4849
|
-
};
|
|
4850
|
-
const handleClosePopoverFiltro = () => {
|
|
4851
|
-
setAnchorPopoverFiltro(null);
|
|
4852
|
-
};
|
|
4853
|
-
const filtrarActividad = (event2, filtro) => {
|
|
4854
|
-
if (filtro === "Todo") {
|
|
4855
|
-
setDatosEventos(events);
|
|
4856
|
-
} else {
|
|
4857
|
-
const resultado = events.filter(
|
|
4858
|
-
(item) => item.state === filtro
|
|
4859
|
-
);
|
|
4860
|
-
setDatosEventos(resultado);
|
|
4861
|
-
}
|
|
4862
|
-
};
|
|
4863
4867
|
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(LocalizationProvider4, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React42.createElement(Box27, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React42.createElement(Box27, { sx: { width: "100%", padding: "0px", background: "transparent" } }, /* @__PURE__ */ React42.createElement(Grid11, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 16px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React42.createElement(Grid11, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React42.createElement(Box27, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React42.createElement(Typography25, { sx: { fontSize: "12px !important", color: "#10184099" } }, format2(dia, "EEEE", { locale: es2 }).charAt(0).toUpperCase())), /* @__PURE__ */ React42.createElement(
|
|
4864
4868
|
Box27,
|
|
4865
4869
|
{
|
|
@@ -4899,36 +4903,7 @@ var SCActivityCalendar = ({
|
|
|
4899
4903
|
},
|
|
4900
4904
|
onChange: (newValue) => setFecha(newValue)
|
|
4901
4905
|
}
|
|
4902
|
-
), /* @__PURE__ */ React42.createElement(Grid11, { container: true, justifyContent: "center" }, /* @__PURE__ */ React42.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React42.createElement(KeyboardDoubleArrowUpIcon2, { color: "action" }))))), /* @__PURE__ */ React42.createElement(
|
|
4903
|
-
Popover7,
|
|
4904
|
-
{
|
|
4905
|
-
open: openPopoverFiltro,
|
|
4906
|
-
anchorEl: anchorPopoverFiltro,
|
|
4907
|
-
onClose: handleClosePopoverFiltro,
|
|
4908
|
-
anchorOrigin: {
|
|
4909
|
-
vertical: "bottom",
|
|
4910
|
-
horizontal: "right"
|
|
4911
|
-
}
|
|
4912
|
-
},
|
|
4913
|
-
/* @__PURE__ */ React42.createElement(
|
|
4914
|
-
Menu3,
|
|
4915
|
-
{
|
|
4916
|
-
id: "basic-menu",
|
|
4917
|
-
anchorEl: anchorPopoverFiltro,
|
|
4918
|
-
open: openPopoverFiltro,
|
|
4919
|
-
onClose: handleClosePopoverFiltro,
|
|
4920
|
-
slotProps: {
|
|
4921
|
-
list: {
|
|
4922
|
-
"aria-labelledby": "basic-button"
|
|
4923
|
-
}
|
|
4924
|
-
}
|
|
4925
|
-
},
|
|
4926
|
-
/* @__PURE__ */ React42.createElement(MenuItem8, { onClick: (event2) => filtrarActividad(event2, "Todo") }, /* @__PURE__ */ React42.createElement(ListItemIcon6, null, /* @__PURE__ */ React42.createElement(CalendarMonthOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React42.createElement(Typography25, { variant: "inherit" }, "Ver todo")),
|
|
4927
|
-
/* @__PURE__ */ React42.createElement(MenuItem8, { onClick: (event2) => filtrarActividad(event2, "Finalizada") }, /* @__PURE__ */ React42.createElement(ListItemIcon6, null, /* @__PURE__ */ React42.createElement(CheckCircleOutlineOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React42.createElement(Typography25, { variant: "inherit" }, "Ver finalizadas")),
|
|
4928
|
-
/* @__PURE__ */ React42.createElement(MenuItem8, { onClick: (event2) => filtrarActividad(event2, "Aplazada") }, /* @__PURE__ */ React42.createElement(ListItemIcon6, null, /* @__PURE__ */ React42.createElement(EventBusyOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React42.createElement(Typography25, { variant: "inherit" }, "Ver aplazadas")),
|
|
4929
|
-
/* @__PURE__ */ React42.createElement(MenuItem8, { onClick: (event2) => filtrarActividad(event2, "En progreso") }, /* @__PURE__ */ React42.createElement(ListItemIcon6, null, /* @__PURE__ */ React42.createElement(PendingOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React42.createElement(Typography25, { variant: "inherit" }, "Ver en progreso"))
|
|
4930
|
-
)
|
|
4931
|
-
), /* @__PURE__ */ React42.createElement(Box27, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 260px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React42.createElement(
|
|
4906
|
+
), /* @__PURE__ */ React42.createElement(Grid11, { container: true, justifyContent: "center" }, /* @__PURE__ */ React42.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React42.createElement(KeyboardDoubleArrowUpIcon2, { color: "action" }))))), /* @__PURE__ */ React42.createElement(Box27, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 260px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React42.createElement(
|
|
4932
4907
|
Box27,
|
|
4933
4908
|
{
|
|
4934
4909
|
key: dayIndex
|
|
@@ -4945,7 +4920,7 @@ var SCActivityCalendar = ({
|
|
|
4945
4920
|
flexDirection: "column"
|
|
4946
4921
|
} }, (() => {
|
|
4947
4922
|
const esDomingo = day.getDay() === 0;
|
|
4948
|
-
const eventosDelDia =
|
|
4923
|
+
const eventosDelDia = events.filter(
|
|
4949
4924
|
(event2) => new Date(event2.date).toDateString() === day.toDateString()
|
|
4950
4925
|
);
|
|
4951
4926
|
if (eventosDelDia.length > 0) {
|
|
@@ -4958,7 +4933,7 @@ var SCActivityCalendar = ({
|
|
|
4958
4933
|
subtitle: /* @__PURE__ */ React42.createElement(React42.Fragment, null, configRangeHour && new Date(event2.date.replace("00:00:00", event2.startTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getHours() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getHours() && new Date(event2.date.replace("00:00:00", event2.startTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getMinutes() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25, null, "Todo el dia"), /* @__PURE__ */ React42.createElement(LightModeOutlinedIcon, { fontSize: "small" })) : /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25, null, new Date(event2.date.replace("00:00:00", event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ React42.createElement(ArrowForwardIcon, { fontSize: "small" }), /* @__PURE__ */ React42.createElement(Typography25, null, new Date(event2.date.replace("00:00:00", event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
|
|
4959
4934
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
4960
4935
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4961
|
-
description: /* @__PURE__ */ React42.createElement(
|
|
4936
|
+
description: /* @__PURE__ */ React42.createElement(Grid11, { display: "flex", flexDirection: "column", alignItems: "flex-start" }, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ React42.createElement(Grid11, { display: "flex", flexDirection: "row", alignItems: "center", gap: 0.5, sx: { marginLeft: "7px" } }, /* @__PURE__ */ React42.createElement(Badge2, { variant: "dot", badgeContent: "", sx: { display: "flex", alignItems: "center", "& .MuiBadge-badge": { top: "50%", transform: "translateY(-50%)" }, color: "action" } }), /* @__PURE__ */ React42.createElement(Typography25, null, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null, /* @__PURE__ */ React42.createElement(Typography25, { variant: "body2" }, event2.equipmentDescription)),
|
|
4962
4937
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4963
4938
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4964
4939
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -5307,7 +5282,7 @@ var AttachmentMobile = ({
|
|
|
5307
5282
|
screenshotFormat: "image/jpeg",
|
|
5308
5283
|
videoConstraints: {
|
|
5309
5284
|
//facingMode: { exact: "environment" }
|
|
5310
|
-
facingMode: "
|
|
5285
|
+
facingMode: "environment"
|
|
5311
5286
|
//facingMode: "environment" // cámara trasera
|
|
5312
5287
|
},
|
|
5313
5288
|
style: {
|
|
@@ -5462,7 +5437,7 @@ var SCSnackBar = ({
|
|
|
5462
5437
|
|
|
5463
5438
|
// src/Components/SCAppBar.tsx
|
|
5464
5439
|
import React46, { useState as useState26, useEffect as useEffect22 } from "react";
|
|
5465
|
-
import { Menu as
|
|
5440
|
+
import { Menu as Menu3, Box as Box29, Typography as Typography27, MenuItem as MenuItem8, IconButton as IconButton17, Badge as Badge3 } from "@mui/material";
|
|
5466
5441
|
import Grid12 from "@mui/material/Grid";
|
|
5467
5442
|
import "dayjs/locale/es";
|
|
5468
5443
|
import MenuIcon from "@mui/icons-material/Menu";
|
|
@@ -5518,7 +5493,7 @@ var SCAppBar = ({
|
|
|
5518
5493
|
color: isOnline ? "success" : "error"
|
|
5519
5494
|
}
|
|
5520
5495
|
), /* @__PURE__ */ React46.createElement(Typography27, { variant: "caption", color: "text.secondary" }, isOnline ? "Online" : "Offline")), visibleMenu && /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(IconButton17, { size: "medium", onClick: handleMenuClick }, /* @__PURE__ */ React46.createElement(MenuIcon, { color: "action" })), /* @__PURE__ */ React46.createElement(
|
|
5521
|
-
|
|
5496
|
+
Menu3,
|
|
5522
5497
|
{
|
|
5523
5498
|
anchorEl,
|
|
5524
5499
|
open: openMenu,
|
|
@@ -5533,7 +5508,7 @@ var SCAppBar = ({
|
|
|
5533
5508
|
},
|
|
5534
5509
|
sx: { zIndex: "2000" }
|
|
5535
5510
|
},
|
|
5536
|
-
options.map((option, index) => /* @__PURE__ */ React46.createElement(
|
|
5511
|
+
options.map((option, index) => /* @__PURE__ */ React46.createElement(MenuItem8, { onClick: option.fn, disabled: option.disabled, key: index }, /* @__PURE__ */ React46.createElement(Typography27, { variant: "body2" }, option.name)))
|
|
5537
5512
|
)))), /* @__PURE__ */ React46.createElement(Box29, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
|
|
5538
5513
|
};
|
|
5539
5514
|
|
|
@@ -5572,7 +5547,6 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5572
5547
|
maxDate: dayjs11().add(3, "month"),
|
|
5573
5548
|
sx: {
|
|
5574
5549
|
minWidth: 140,
|
|
5575
|
-
padding: "13px 0px",
|
|
5576
5550
|
width: width || "100%",
|
|
5577
5551
|
"& .MuiPickersInputBase-sectionsContainer": {
|
|
5578
5552
|
padding: "8px 0px"
|
|
@@ -5587,13 +5561,7 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5587
5561
|
},
|
|
5588
5562
|
textField: {
|
|
5589
5563
|
required: required || false,
|
|
5590
|
-
|
|
5591
|
-
sx: {
|
|
5592
|
-
"&.MuiInputLabel-shrink": {
|
|
5593
|
-
transform: "translate(10px, 5px) scale(0.9) !important"
|
|
5594
|
-
}
|
|
5595
|
-
}
|
|
5596
|
-
}
|
|
5564
|
+
size: "small"
|
|
5597
5565
|
}
|
|
5598
5566
|
},
|
|
5599
5567
|
slots: {
|