componentes-sinco 1.0.31 → 1.0.32
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 +21 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -557,7 +557,7 @@ declare const CALENDAR_CONSTANTS: {
|
|
|
557
557
|
readonly GRID_TEMPLATE: "repeat(7, minmax(150px, 1fr))";
|
|
558
558
|
readonly DAY_HEIGHT: 60;
|
|
559
559
|
readonly SIDEBAR_WIDTH: 47;
|
|
560
|
-
readonly MIN_CELL_HEIGHT:
|
|
560
|
+
readonly MIN_CELL_HEIGHT: 90;
|
|
561
561
|
readonly DEFAULT_START_HOUR: 0;
|
|
562
562
|
readonly DEFAULT_END_HOUR: 23;
|
|
563
563
|
readonly DRAWER_WIDTH: "350px";
|
package/dist/index.d.ts
CHANGED
|
@@ -557,7 +557,7 @@ declare const CALENDAR_CONSTANTS: {
|
|
|
557
557
|
readonly GRID_TEMPLATE: "repeat(7, minmax(150px, 1fr))";
|
|
558
558
|
readonly DAY_HEIGHT: 60;
|
|
559
559
|
readonly SIDEBAR_WIDTH: 47;
|
|
560
|
-
readonly MIN_CELL_HEIGHT:
|
|
560
|
+
readonly MIN_CELL_HEIGHT: 90;
|
|
561
561
|
readonly DEFAULT_START_HOUR: 0;
|
|
562
562
|
readonly DEFAULT_END_HOUR: 23;
|
|
563
563
|
readonly DRAWER_WIDTH: "350px";
|
package/dist/index.js
CHANGED
|
@@ -1868,7 +1868,7 @@ function SCAutocomplete({
|
|
|
1868
1868
|
__spreadProps(__spreadValues({}, optionProps), {
|
|
1869
1869
|
disabled: isDisabled,
|
|
1870
1870
|
style: {
|
|
1871
|
-
background: typeFormat != "multiselect" ? state.hiddenValue == getItemValue(option).value ? "#
|
|
1871
|
+
//background: typeFormat != "multiselect" ? state.hiddenValue == getItemValue(option).value ? "#be308fff" : 'white' : 'white',
|
|
1872
1872
|
padding: "7px 16px",
|
|
1873
1873
|
opacity: isDisabled ? 0.5 : 1
|
|
1874
1874
|
}
|
|
@@ -1937,7 +1937,8 @@ function SCAutocomplete({
|
|
|
1937
1937
|
onClick: (event2) => {
|
|
1938
1938
|
event2.stopPropagation();
|
|
1939
1939
|
cleanOptions(event2);
|
|
1940
|
-
}
|
|
1940
|
+
},
|
|
1941
|
+
disabled: state.hiddenValue.toString() == "-1" || state.hiddenValue.toString() == "" ? true : false
|
|
1941
1942
|
},
|
|
1942
1943
|
"Limpiar"
|
|
1943
1944
|
) : "",
|
|
@@ -1986,14 +1987,29 @@ var SCDateRange = ({
|
|
|
1986
1987
|
const isStartEmpty = required && !state[0];
|
|
1987
1988
|
const isEndEmpty = required && !state[1];
|
|
1988
1989
|
const hasError = isStartEmpty || isEndEmpty;
|
|
1990
|
+
const minDate = new Date(2013, 0, 1);
|
|
1991
|
+
const [notification, setNotification] = React12.useState(false);
|
|
1989
1992
|
const handleDateChange = (newValue) => {
|
|
1993
|
+
const minDateDayjs = dayjs("2013-01-01");
|
|
1990
1994
|
const convertedValue = [
|
|
1991
1995
|
newValue[0] ? dayjs(newValue[0]) : null,
|
|
1992
1996
|
newValue[1] ? dayjs(newValue[1]) : null
|
|
1993
1997
|
];
|
|
1998
|
+
if (convertedValue[0] != null) {
|
|
1999
|
+
if ((!convertedValue[0].isValid() || !convertedValue[0].isAfter(minDateDayjs)) == true) {
|
|
2000
|
+
setNotification(true);
|
|
2001
|
+
return;
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
if (convertedValue[1] != null) {
|
|
2005
|
+
if ((!convertedValue[1].isValid() || !convertedValue[1].isAfter(minDateDayjs)) == true) {
|
|
2006
|
+
setNotification(true);
|
|
2007
|
+
return;
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
1994
2010
|
setState(convertedValue);
|
|
1995
2011
|
};
|
|
1996
|
-
return /* @__PURE__ */ React12.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React12.createElement(Box9, { sx: { width: "100%" } }, /* @__PURE__ */ React12.createElement(
|
|
2012
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React12.createElement(Box9, { sx: { width: "100%" } }, /* @__PURE__ */ React12.createElement(
|
|
1997
2013
|
DateRangePicker,
|
|
1998
2014
|
{
|
|
1999
2015
|
value: state,
|
|
@@ -2040,7 +2056,7 @@ var SCDateRange = ({
|
|
|
2040
2056
|
width: "100%"
|
|
2041
2057
|
}
|
|
2042
2058
|
}
|
|
2043
|
-
)));
|
|
2059
|
+
))), notification && /* @__PURE__ */ React12.createElement(SCToastNotification, { title: "El Formato de la fecha no es v\xE1lido", type: "error" }));
|
|
2044
2060
|
};
|
|
2045
2061
|
|
|
2046
2062
|
// src/Components/Drawer/components/DrawerContent.tsx
|
|
@@ -3786,7 +3802,7 @@ var CALENDAR_CONSTANTS = {
|
|
|
3786
3802
|
GRID_TEMPLATE: "repeat(7, minmax(150px, 1fr))",
|
|
3787
3803
|
DAY_HEIGHT: 60,
|
|
3788
3804
|
SIDEBAR_WIDTH: 47,
|
|
3789
|
-
MIN_CELL_HEIGHT:
|
|
3805
|
+
MIN_CELL_HEIGHT: 90,
|
|
3790
3806
|
DEFAULT_START_HOUR: 0,
|
|
3791
3807
|
DEFAULT_END_HOUR: 23,
|
|
3792
3808
|
DRAWER_WIDTH: "350px",
|