componentes-sinco 1.1.23 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +53 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +52 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -718,11 +718,25 @@ interface SCDatePickerProps {
|
|
|
718
718
|
state: Dayjs;
|
|
719
719
|
setState: (value: Dayjs) => void;
|
|
720
720
|
width?: string;
|
|
721
|
+
minDate?: Dayjs;
|
|
722
|
+
maxDate?: Dayjs;
|
|
721
723
|
}
|
|
722
|
-
declare const SCDatePicker: ({ label, required, disabled, background, state, setState, width }: SCDatePickerProps) => React__default.JSX.Element;
|
|
724
|
+
declare const SCDatePicker: ({ label, required, disabled, background, state, setState, width, minDate, maxDate }: SCDatePickerProps) => React__default.JSX.Element;
|
|
725
|
+
|
|
726
|
+
interface SCAlertProps {
|
|
727
|
+
title: string;
|
|
728
|
+
subtitle?: string;
|
|
729
|
+
severity?: 'success' | 'error' | 'warning' | 'info';
|
|
730
|
+
variant?: 'filled' | 'outlined' | 'standard';
|
|
731
|
+
width?: string;
|
|
732
|
+
close?: boolean;
|
|
733
|
+
openState: boolean;
|
|
734
|
+
setOpenState: any;
|
|
735
|
+
}
|
|
736
|
+
declare const SCAlert: ({ title, subtitle, severity, variant, width, close, openState, setOpenState, }: SCAlertProps) => React__default.JSX.Element;
|
|
723
737
|
|
|
724
738
|
declare const SincoTheme: _mui_material_styles.Theme;
|
|
725
739
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
726
740
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
727
741
|
|
|
728
|
-
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
742
|
+
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAlert, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.d.ts
CHANGED
|
@@ -718,11 +718,25 @@ interface SCDatePickerProps {
|
|
|
718
718
|
state: Dayjs;
|
|
719
719
|
setState: (value: Dayjs) => void;
|
|
720
720
|
width?: string;
|
|
721
|
+
minDate?: Dayjs;
|
|
722
|
+
maxDate?: Dayjs;
|
|
721
723
|
}
|
|
722
|
-
declare const SCDatePicker: ({ label, required, disabled, background, state, setState, width }: SCDatePickerProps) => React__default.JSX.Element;
|
|
724
|
+
declare const SCDatePicker: ({ label, required, disabled, background, state, setState, width, minDate, maxDate }: SCDatePickerProps) => React__default.JSX.Element;
|
|
725
|
+
|
|
726
|
+
interface SCAlertProps {
|
|
727
|
+
title: string;
|
|
728
|
+
subtitle?: string;
|
|
729
|
+
severity?: 'success' | 'error' | 'warning' | 'info';
|
|
730
|
+
variant?: 'filled' | 'outlined' | 'standard';
|
|
731
|
+
width?: string;
|
|
732
|
+
close?: boolean;
|
|
733
|
+
openState: boolean;
|
|
734
|
+
setOpenState: any;
|
|
735
|
+
}
|
|
736
|
+
declare const SCAlert: ({ title, subtitle, severity, variant, width, close, openState, setOpenState, }: SCAlertProps) => React__default.JSX.Element;
|
|
723
737
|
|
|
724
738
|
declare const SincoTheme: _mui_material_styles.Theme;
|
|
725
739
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
726
740
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
727
741
|
|
|
728
|
-
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
742
|
+
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAlert, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.js
CHANGED
|
@@ -5110,7 +5110,7 @@ var SCActivityCalendar = ({
|
|
|
5110
5110
|
console.log("D\xEDa:", day);
|
|
5111
5111
|
console.log("Filtrando eventos para el d\xEDa:", datosEventos);
|
|
5112
5112
|
const eventosDelDia = datosEventos.filter(
|
|
5113
|
-
(event2) => new Date(event2.date).toDateString() === day.toDateString()
|
|
5113
|
+
(event2) => (/* @__PURE__ */ new Date(event2.date + "T00:00:00")).toDateString() === day.toDateString()
|
|
5114
5114
|
);
|
|
5115
5115
|
console.log("Cantidad eventos para el d\xEDa:", eventosDelDia);
|
|
5116
5116
|
if (eventosDelDia.length > 0) {
|
|
@@ -5120,10 +5120,10 @@ var SCActivityCalendar = ({
|
|
|
5120
5120
|
key: idx,
|
|
5121
5121
|
options: [{
|
|
5122
5122
|
title: event2.activityDescription,
|
|
5123
|
-
subtitle: /* @__PURE__ */ React42.createElement(React42.Fragment, null, configRangeHour && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getMinutes() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25,
|
|
5123
|
+
subtitle: /* @__PURE__ */ React42.createElement(React42.Fragment, null, configRangeHour && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getMinutes() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25, { variant: "body2" }, "Todo el dia"), /* @__PURE__ */ React42.createElement(LightModeOutlinedIcon, { fontSize: "small" })) : /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25, { variant: "body2" }, (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ React42.createElement(ArrowForwardIcon, { fontSize: "small" }), /* @__PURE__ */ React42.createElement(Typography25, { variant: "body2" }, (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
|
|
5124
5124
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
5125
5125
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
5126
|
-
description: /* @__PURE__ */ React42.createElement(
|
|
5126
|
+
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, { variant: "body2" }, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null, /* @__PURE__ */ React42.createElement(Typography25, { variant: "body1" }, event2.equipmentDescription)),
|
|
5127
5127
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
5128
5128
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
5129
5129
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -5711,7 +5711,7 @@ import "dayjs/locale/es";
|
|
|
5711
5711
|
import { LocalizationProvider as LocalizationProvider5 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
5712
5712
|
import { AdapterDayjs as AdapterDayjs3 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
5713
5713
|
import InsertInvitationOutlinedIcon from "@mui/icons-material/InsertInvitationOutlined";
|
|
5714
|
-
var SCDatePicker = ({ label, required, disabled, background, state, setState, width }) => {
|
|
5714
|
+
var SCDatePicker = ({ label, required, disabled, background, state, setState, width, minDate, maxDate }) => {
|
|
5715
5715
|
return /* @__PURE__ */ React47.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3, adapterLocale: "es" }, /* @__PURE__ */ React47.createElement(
|
|
5716
5716
|
DatePicker,
|
|
5717
5717
|
{
|
|
@@ -5720,21 +5720,21 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5720
5720
|
value: state,
|
|
5721
5721
|
onChange: (value) => {
|
|
5722
5722
|
if (value && dayjs11.isDayjs(value) && value.isValid()) {
|
|
5723
|
-
const
|
|
5724
|
-
const
|
|
5725
|
-
if (value.isBefore(
|
|
5723
|
+
const minDate2 = dayjs11("2015-01-01");
|
|
5724
|
+
const maxDate2 = dayjs11().add(3, "month");
|
|
5725
|
+
if (value.isBefore(minDate2, "day")) {
|
|
5726
5726
|
alert("La fecha no puede ser anterior al 01/01/2015");
|
|
5727
5727
|
return;
|
|
5728
5728
|
}
|
|
5729
|
-
if (value.isAfter(
|
|
5729
|
+
if (value.isAfter(maxDate2, "day")) {
|
|
5730
5730
|
alert("La fecha no puede ser posterior a 3 meses desde hoy");
|
|
5731
5731
|
return;
|
|
5732
5732
|
}
|
|
5733
5733
|
setState(value);
|
|
5734
5734
|
}
|
|
5735
5735
|
},
|
|
5736
|
-
minDate: dayjs11("2015-01-01"),
|
|
5737
|
-
maxDate: dayjs11().add(3, "month"),
|
|
5736
|
+
minDate: minDate != null ? minDate : dayjs11("2015-01-01"),
|
|
5737
|
+
maxDate: maxDate != null ? maxDate : dayjs11().add(3, "month"),
|
|
5738
5738
|
sx: {
|
|
5739
5739
|
minWidth: 120,
|
|
5740
5740
|
width: width || "100%",
|
|
@@ -5767,11 +5767,47 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5767
5767
|
));
|
|
5768
5768
|
};
|
|
5769
5769
|
|
|
5770
|
+
// src/Components/SCAlert.tsx
|
|
5771
|
+
import React48 from "react";
|
|
5772
|
+
import { Alert, AlertTitle, Typography as Typography28 } from "@mui/material";
|
|
5773
|
+
var SCAlert = ({
|
|
5774
|
+
title,
|
|
5775
|
+
subtitle,
|
|
5776
|
+
severity = "success",
|
|
5777
|
+
variant = "standard",
|
|
5778
|
+
width,
|
|
5779
|
+
close = true,
|
|
5780
|
+
openState,
|
|
5781
|
+
setOpenState
|
|
5782
|
+
}) => {
|
|
5783
|
+
const handleClose = (event2) => {
|
|
5784
|
+
setOpenState(false);
|
|
5785
|
+
};
|
|
5786
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, openState && /* @__PURE__ */ React48.createElement(
|
|
5787
|
+
Alert,
|
|
5788
|
+
__spreadProps(__spreadValues({
|
|
5789
|
+
severity,
|
|
5790
|
+
variant
|
|
5791
|
+
}, close ? { onClose: handleClose } : {}), {
|
|
5792
|
+
sx: __spreadValues({
|
|
5793
|
+
width: width != null ? width : "auto",
|
|
5794
|
+
alignItems: subtitle ? "flex-start" : "center"
|
|
5795
|
+
}, variant !== "filled" && {
|
|
5796
|
+
"& .MuiAlert-icon": {
|
|
5797
|
+
background: severity == "info" ? "#C0E2EE" : severity == "warning" ? "#FEDAB3" : severity == "error" ? "#F1C7C7" : "#DDEFC4"
|
|
5798
|
+
}
|
|
5799
|
+
})
|
|
5800
|
+
}),
|
|
5801
|
+
/* @__PURE__ */ React48.createElement(AlertTitle, null, title),
|
|
5802
|
+
subtitle ? /* @__PURE__ */ React48.createElement(Typography28, { variant: "body3" }, subtitle) : null
|
|
5803
|
+
));
|
|
5804
|
+
};
|
|
5805
|
+
|
|
5770
5806
|
// src/Theme/index.ts
|
|
5771
5807
|
import { createTheme } from "@mui/material/styles";
|
|
5772
5808
|
|
|
5773
5809
|
// src/Theme/components.ts
|
|
5774
|
-
import
|
|
5810
|
+
import React49 from "react";
|
|
5775
5811
|
import {
|
|
5776
5812
|
InfoRounded as InfoRounded2,
|
|
5777
5813
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -6475,10 +6511,10 @@ var components = {
|
|
|
6475
6511
|
MuiAlert: {
|
|
6476
6512
|
defaultProps: {
|
|
6477
6513
|
iconMapping: {
|
|
6478
|
-
success:
|
|
6479
|
-
error:
|
|
6480
|
-
warning:
|
|
6481
|
-
info:
|
|
6514
|
+
success: React49.createElement(CheckCircleRounded2),
|
|
6515
|
+
error: React49.createElement(ErrorRounded2),
|
|
6516
|
+
warning: React49.createElement(WarningRounded2),
|
|
6517
|
+
info: React49.createElement(InfoRounded2)
|
|
6482
6518
|
}
|
|
6483
6519
|
},
|
|
6484
6520
|
variants: [
|
|
@@ -7530,6 +7566,7 @@ export {
|
|
|
7530
7566
|
MultiSelect,
|
|
7531
7567
|
PageHeader,
|
|
7532
7568
|
SCActivityCalendar,
|
|
7569
|
+
SCAlert,
|
|
7533
7570
|
SCAppBar,
|
|
7534
7571
|
SCAutocomplete,
|
|
7535
7572
|
SCCalendarSwipeable,
|