componentes-sinco 1.2.5 → 1.2.7

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 CHANGED
@@ -1650,7 +1650,24 @@ var useChipFilters = (arrayElements, chipFilters) => {
1650
1650
  return;
1651
1651
  }
1652
1652
  arrayElements.forEach((arrayElement) => {
1653
+ var _a;
1653
1654
  const { validation, element: typeElement } = validateTypeElements(arrayElement);
1655
+ if (Array.isArray((_a = typeElement.state) == null ? void 0 : _a.textValue)) {
1656
+ chipFilters.forEach((chipFilter) => {
1657
+ const chipValue = String(chipFilter).trim();
1658
+ const isInArray = typeElement.state.textValue.some(
1659
+ (v) => String(v).trim() === chipValue
1660
+ );
1661
+ if (isInArray && chipValue !== "" && chipValue !== ",") {
1662
+ setTextFilters((prev) => {
1663
+ const exists = prev.findIndex((f) => f.value === chipValue) !== -1;
1664
+ if (exists) return prev;
1665
+ return [...prev, { value: chipValue, arrayElement: typeElement }];
1666
+ });
1667
+ }
1668
+ });
1669
+ return;
1670
+ }
1654
1671
  const currentValue = getCurrentValue(validation, typeElement);
1655
1672
  chipFilters.forEach((chipFilter) => {
1656
1673
  const chipValue = String(chipFilter).trim();
@@ -3018,7 +3035,7 @@ var SCDateRange = ({
3018
3035
  setState
3019
3036
  }) => {
3020
3037
  import_x_license.LicenseInfo.setLicenseKey(
3021
- "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
3038
+ "aa892a011e4c240f3cdaf811ecfff54fTz0xMjkyODQsRT0xODEwNDI1NTk5MDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LEtWPTI="
3022
3039
  );
3023
3040
  const isStartEmpty = required && !state[0];
3024
3041
  const isEndEmpty = required && !state[1];
@@ -3333,6 +3350,7 @@ function SCDrawer({
3333
3350
  chipFilters,
3334
3351
  heightDrawer = 456,
3335
3352
  filterSideCard,
3353
+ type = "Drawer",
3336
3354
  onChipDelete
3337
3355
  }) {
3338
3356
  const drawerBleeding = heightDrawer;
@@ -3383,7 +3401,7 @@ function SCDrawer({
3383
3401
  justifyContent: "flex-start",
3384
3402
  flexWrap: "nowrap",
3385
3403
  alignItems: "center",
3386
- sx: { width: "100%", border: "1px solid" }
3404
+ sx: { width: "100%" }
3387
3405
  },
3388
3406
  shouldShowChips && /* @__PURE__ */ import_react24.default.createElement(
3389
3407
  ChipFiltersDisplay,
@@ -3399,26 +3417,26 @@ function SCDrawer({
3399
3417
  onToggle: toggleDrawer(true)
3400
3418
  }
3401
3419
  )
3402
- ), anchor != "bottom" ? /* @__PURE__ */ import_react24.default.createElement(
3420
+ ), type != "Swipeable" ? /* @__PURE__ */ import_react24.default.createElement(
3403
3421
  import_material18.Drawer,
3404
3422
  {
3405
3423
  open: drawerOpen,
3406
- onClose: filterSideCard ? void 0 : toggleDrawer(false),
3424
+ onClose: type == "Sidecar" ? void 0 : toggleDrawer(false),
3407
3425
  anchor: anchor != null ? anchor : "left",
3408
3426
  sx: {
3409
3427
  "& .MuiDrawer-paper": {
3410
- width: filterSideCard ? "100%" : width != null ? width : "450px",
3428
+ width: type == "Sidecar" ? "100%" : width != null ? width : "450px",
3411
3429
  boxSizing: "border-box",
3412
3430
  borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px",
3413
- boxShadow: filterSideCard ? "none !important" : "0px 8px 10px -5px rgba(24, 39, 75, 0.2), 0px 16px 24px 2px rgba(24, 39, 75, 0.14), 0px 6px 30px 5px rgba(24, 39, 75, 0.12)"
3431
+ boxShadow: type == "Sidecar" ? "none !important" : "0px 8px 10px -5px rgba(24, 39, 75, 0.2), 0px 16px 24px 2px rgba(24, 39, 75, 0.14), 0px 6px 30px 5px rgba(24, 39, 75, 0.12)"
3414
3432
  },
3415
3433
  "&.MuiDrawer-root": {
3416
- boxShadow: filterSideCard ? "none !important" : "0px 3px 1px -2px rgba(24, 39, 75, 0.20),0px 2px 2px 0px rgba(24, 39, 75, 0.14),0px 1px 5px 0px rgba(24, 39, 75, 0.12)"
3434
+ boxShadow: type == "Sidecar" ? "none !important" : "0px 3px 1px -2px rgba(24, 39, 75, 0.20),0px 2px 2px 0px rgba(24, 39, 75, 0.14),0px 1px 5px 0px rgba(24, 39, 75, 0.12)"
3417
3435
  }
3418
3436
  },
3419
3437
  ModalProps: {
3420
3438
  keepMounted: true,
3421
- disablePortal: filterSideCard ? true : false,
3439
+ disablePortal: type == "Sidecar" ? true : false,
3422
3440
  slotProps: {
3423
3441
  root: {
3424
3442
  style: {
@@ -4556,36 +4574,19 @@ var PageHeader = ({
4556
4574
  var import_react43 = __toESM(require("react"), 1);
4557
4575
  var import_material29 = require("@mui/material");
4558
4576
  var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"), 1);
4559
- var import_ExpandLess = __toESM(require("@mui/icons-material/ExpandLess"), 1);
4560
4577
  var SCAccordion = ({
4561
4578
  title,
4562
4579
  actions,
4563
4580
  children
4564
4581
  }) => {
4565
4582
  const [open, setOpen] = (0, import_react43.useState)(false);
4566
- return /* @__PURE__ */ import_react43.default.createElement(
4567
- import_material29.Grid,
4583
+ return /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, /* @__PURE__ */ import_react43.default.createElement(import_material29.Accordion, null, /* @__PURE__ */ import_react43.default.createElement(
4584
+ import_material29.AccordionSummary,
4568
4585
  {
4569
- flexDirection: "column",
4570
- sx: {
4571
- background: "white",
4572
- boxShadow: "0px 2px 4px 0px #18274B33",
4573
- padding: "0px 2px 0px 2px"
4574
- }
4586
+ expandIcon: /* @__PURE__ */ import_react43.default.createElement(import_ExpandMore.default, { fontSize: "small", color: "action" })
4575
4587
  },
4576
- /* @__PURE__ */ import_react43.default.createElement(
4577
- import_material29.Grid,
4578
- {
4579
- container: true,
4580
- sx: { alignItems: "center", padding: "12px 16px 12px 16px", cursor: "pointer" },
4581
- justifyContent: "space-between",
4582
- onClick: () => setOpen((prev) => !prev)
4583
- },
4584
- /* @__PURE__ */ import_react43.default.createElement(import_material29.Grid, { sx: { textAlign: "left" } }, /* @__PURE__ */ import_react43.default.createElement(import_material29.Typography, { noWrap: true, variant: "subtitle1", align: "left", color: "text.primary" }, title)),
4585
- /* @__PURE__ */ import_react43.default.createElement(import_material29.Grid, null, /* @__PURE__ */ import_react43.default.createElement(import_material29.Grid, { container: true, justifyContent: "flex-end", alignItems: "center", gap: 1 }, actions, /* @__PURE__ */ import_react43.default.createElement(import_material29.Grid, { color: "#3975ac", sx: { textAlign: "right" } }, open ? /* @__PURE__ */ import_react43.default.createElement(import_ExpandLess.default, { fontSize: "small", color: "action" }) : /* @__PURE__ */ import_react43.default.createElement(import_ExpandMore.default, { fontSize: "small", color: "action" }))))
4586
- ),
4587
- open && /* @__PURE__ */ import_react43.default.createElement(import_material29.Grid, { container: true, padding: "12px" }, children)
4588
- );
4588
+ /* @__PURE__ */ import_react43.default.createElement(import_material29.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" } }, typeof title === "string" ? /* @__PURE__ */ import_react43.default.createElement(import_material29.Typography, { noWrap: true, variant: "body1", color: "text.primary" }, title) : title, actions)
4589
+ ), /* @__PURE__ */ import_react43.default.createElement(import_material29.AccordionDetails, { sx: { padding: "12px" } }, children)));
4589
4590
  };
4590
4591
 
4591
4592
  // src/Components/SCActivityCalendar.tsx
@@ -6114,7 +6115,7 @@ var SCTime = ({
6114
6115
  error = false
6115
6116
  }) => {
6116
6117
  import_x_license3.LicenseInfo.setLicenseKey(
6117
- "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
6118
+ "aa892a011e4c240f3cdaf811ecfff54fTz0xMjkyODQsRT0xODEwNDI1NTk5MDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LEtWPTI="
6118
6119
  );
6119
6120
  const isTimeEmpty = required && !state;
6120
6121
  const hasError = isTimeEmpty || error;