@m4l/components 9.2.62 → 9.2.63

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.
Files changed (48) hide show
  1. package/components/DataGrid/Datagrid.styles.js +21 -10
  2. package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +2 -1
  3. package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +6 -42
  4. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.d.ts +8 -0
  5. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.js +58 -0
  6. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.d.ts +7 -0
  7. package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.js +19 -0
  8. package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +10 -3
  9. package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +2 -2
  10. package/components/DataGrid/slots/DataGridEnum.d.ts +3 -0
  11. package/components/DataGrid/slots/DataGridEnum.js +6 -1
  12. package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
  13. package/components/DataGrid/slots/DataGridSlot.js +24 -19
  14. package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
  15. package/components/DataGrid/subcomponents/HeaderActions/index.js +1 -1
  16. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Density/index.js +2 -1
  17. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/RowsCount/index.js +1 -1
  18. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
  19. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +1 -1
  20. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +2 -1
  21. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
  22. package/components/DataGrid/subcomponents/Table/index.js +1 -1
  23. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +14 -2
  24. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
  25. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
  26. package/components/DataGrid/types.d.ts +3 -2
  27. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
  28. package/components/ObjectLogs/ObjectLogs.styles.js +2 -1
  29. package/components/ObjectLogs/slots/ObjectLogsEnum.d.ts +1 -0
  30. package/components/ObjectLogs/slots/ObjectLogsEnum.js +1 -0
  31. package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +3 -0
  32. package/components/ObjectLogs/slots/ObjectLogsSlots.js +7 -2
  33. package/components/areas/contexts/AreasContext/store.js +2 -2
  34. package/components/formatters/BooleanFormatter/BooleanFormatter.js +7 -4
  35. package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +9 -1
  36. package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.d.ts +2 -1
  37. package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.js +1 -0
  38. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +3 -0
  39. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +6 -1
  40. package/components/formatters/BooleanFormatter/types.d.ts +1 -1
  41. package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
  42. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +1 -1
  43. package/package.json +1 -1
  44. package/storybook/components/DataGrid/DataGrid.stories.d.ts +8 -0
  45. package/storybook/components/DataGrid/helpers/icons.d.ts +6 -0
  46. package/storybook/components/DataGrid/helpers/types.d.ts +12 -0
  47. package/storybook/components/DataGrid/helpers/useColumns.d.ts +2 -1
  48. package/storybook/components/DataGrid/helpers/useSeed.d.ts +1 -1
@@ -406,9 +406,9 @@ const dataGridStyles = {
406
406
  ...theme.colorSchemes.finalTheme.typography.bodyDens,
407
407
  //ajuste de contenido filtro del DataGrid
408
408
  width: "100%",
409
- display: "flex",
410
- justifyContent: "center",
411
- alignItems: "center",
409
+ whiteSpace: "nowrap",
410
+ overflow: "hidden",
411
+ textOverflow: "ellipsis",
412
412
  ...getTypographyStyles(
413
413
  theme.generalSettings.isMobile,
414
414
  ownerState?.size || "medium",
@@ -446,6 +446,7 @@ const dataGridStyles = {
446
446
  textAlign: "start",
447
447
  display: "inline",
448
448
  justifyContent: "center",
449
+ alignContent: "center",
449
450
  alignItems: "center",
450
451
  '&:not([role="columnheader"])': {
451
452
  "& > div:first-of-type": {
@@ -466,6 +467,7 @@ const dataGridStyles = {
466
467
  },
467
468
  "& .rdg-cell.rdg-cell-align-right": {
468
469
  textAlign: "right",
470
+ alignContent: "center",
469
471
  '&:not([role="columnheader"])': {
470
472
  "& > div:first-of-type": {
471
473
  marginLeft: "auto"
@@ -474,17 +476,14 @@ const dataGridStyles = {
474
476
  }
475
477
  },
476
478
  '& [role="columnheader"].rdg-cell.rdg-cell-align-left .rdg-header-sort-name': {
477
- textAlign: "start",
478
- display: "inline",
479
- justifyContent: "center",
480
- alignItems: "center"
479
+ textAlign: "start"
481
480
  },
482
481
  '& [role="columnheader"].rdg-cell.rdg-cell-align-center .rdg-header-sort-name': {
483
- textAlign: "center",
484
- alignContent: "center"
482
+ textAlign: "center"
485
483
  },
486
484
  '& [role="columnheader"].rdg-cell.rdg-cell-align-right .rdg-header-sort-name': {
487
- textAlign: "right"
485
+ textAlign: "right",
486
+ paddingRight: theme.vars.size.baseSpacings.sp3
488
487
  },
489
488
  // Estilado de la ultima celda congelada
490
489
  "& .rdg-row .rdg-cell-frozen-last:after": {
@@ -670,6 +669,18 @@ const dataGridStyles = {
670
669
  alignItems: "center",
671
670
  justifyContent: "space-between",
672
671
  width: "100%"
672
+ }),
673
+ /**
674
+ * Estilos para el formatter de iconos
675
+ */
676
+ columnIconFormatter: ({ theme }) => ({
677
+ display: "flex",
678
+ alignItems: "center",
679
+ justifyContent: "center",
680
+ gap: theme.vars.size.baseSpacings.sp2,
681
+ minWidth: "max-content",
682
+ overflow: "visible",
683
+ flexWrap: "nowrap"
673
684
  })
674
685
  };
675
686
  export {
@@ -1,5 +1,6 @@
1
1
  import { ColumnIconFormatterProps } from './types';
2
2
  /**
3
3
  * Function to format an icon in a column of a DataGrid
4
+ * @template TRow - Tipo de datos de la fila
4
5
  */
5
- export declare function ColumnIconFormatter(props: ColumnIconFormatterProps): (rowData: any) => import("react/jsx-runtime").JSX.Element;
6
+ export declare function ColumnIconFormatter<TRow>(props: ColumnIconFormatterProps<TRow>): (rowData: TRow) => JSX.Element;
@@ -1,49 +1,13 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import React from "react";
3
- import { C as COLUMN_ICON_KEY_COMPONENT } from "./constants.js";
4
- import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
5
- import { I as IconStyled } from "../../../ObjectLogs/slots/ObjectLogsSlots.js";
1
+ import { r as renderMultipleIcons } from "./helpers/renderMultipleIcons.js";
2
+ import { r as renderIcon } from "./helpers/renderIcon.js";
6
3
  function ColumnIconFormatter(props) {
7
4
  const { getIconProps } = props;
8
5
  return (rowData) => {
9
- const {
10
- iconUrl,
11
- onClick,
12
- tooltip,
13
- dataTestId,
14
- Component,
15
- componentProps
16
- } = getIconProps(rowData);
17
- const iconStyle = onClick ? { style: { cursor: "pointer" } } : {};
18
- if (Component && Component !== React.Fragment) {
19
- return /* @__PURE__ */ jsx(
20
- Component,
21
- {
22
- ...componentProps,
23
- ...getPropDataTestId(COLUMN_ICON_KEY_COMPONENT, "container", dataTestId),
24
- children: /* @__PURE__ */ jsx(
25
- IconStyled,
26
- {
27
- src: iconUrl,
28
- onClick,
29
- tooltipContent: tooltip,
30
- instaceDataTestId: dataTestId,
31
- ...iconStyle
32
- }
33
- )
34
- }
35
- );
6
+ const iconProps = getIconProps(rowData);
7
+ if (Array.isArray(iconProps)) {
8
+ return renderMultipleIcons(iconProps);
36
9
  }
37
- return /* @__PURE__ */ jsx(
38
- IconStyled,
39
- {
40
- src: iconUrl,
41
- onClick,
42
- tooltipContent: tooltip,
43
- instaceDataTestId: dataTestId,
44
- ...iconStyle
45
- }
46
- );
10
+ return renderIcon(iconProps);
47
11
  };
48
12
  }
49
13
  export {
@@ -0,0 +1,8 @@
1
+ import { ColumnIconResponse } from '../types';
2
+ /**
3
+ * Helper que renderiza un único icono
4
+ * @param iconConfig - Configuración del icono
5
+ * @param key - Clave opcional para listas
6
+ * @returns Componente de icono renderizado
7
+ */
8
+ export declare function renderIcon(iconConfig: ColumnIconResponse, key?: number): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,58 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { C as COLUMN_ICON_KEY_COMPONENT } from "../constants.js";
4
+ import { g as getPropDataTestId } from "../../../../../test/getNameDataTestId.js";
5
+ import { I as IconClickeableStyled, a as IconStyled } from "../../../../ObjectLogs/slots/ObjectLogsSlots.js";
6
+ function renderIcon(iconConfig, key) {
7
+ const {
8
+ iconUrl,
9
+ onClick,
10
+ tooltip,
11
+ dataTestId,
12
+ Component,
13
+ componentProps,
14
+ color,
15
+ visible,
16
+ size
17
+ } = iconConfig;
18
+ if (visible === false) {
19
+ return /* @__PURE__ */ jsx(Fragment, { children: "-" });
20
+ }
21
+ const IconComponent = onClick ? IconClickeableStyled : IconStyled;
22
+ if (Component && Component !== React.Fragment) {
23
+ return /* @__PURE__ */ jsx(
24
+ Component,
25
+ {
26
+ ...componentProps,
27
+ ...getPropDataTestId(COLUMN_ICON_KEY_COMPONENT, "container", dataTestId),
28
+ children: /* @__PURE__ */ jsx(
29
+ IconComponent,
30
+ {
31
+ src: iconUrl,
32
+ ...onClick && { onClick },
33
+ tooltipContent: tooltip,
34
+ instaceDataTestId: dataTestId,
35
+ color,
36
+ size
37
+ }
38
+ )
39
+ },
40
+ key
41
+ );
42
+ }
43
+ return /* @__PURE__ */ jsx(
44
+ IconComponent,
45
+ {
46
+ src: iconUrl,
47
+ ...onClick && { onClick },
48
+ tooltipContent: tooltip,
49
+ instaceDataTestId: dataTestId,
50
+ color,
51
+ size
52
+ },
53
+ key
54
+ );
55
+ }
56
+ export {
57
+ renderIcon as r
58
+ };
@@ -0,0 +1,7 @@
1
+ import { ColumnIconResponse } from '../types';
2
+ /**
3
+ * Helper que renderiza múltiples iconos
4
+ * @param iconsConfig - Array de configuraciones de iconos
5
+ * @returns Componente contenedor con múltiples iconos
6
+ */
7
+ export declare function renderMultipleIcons(iconsConfig: ColumnIconResponse[]): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { a as ColumnIconFormatterStyled } from "../../../slots/DataGridSlot.js";
3
+ import { r as renderIcon } from "./renderIcon.js";
4
+ function renderMultipleIcons(iconsConfig) {
5
+ if (!iconsConfig || iconsConfig.length === 0) {
6
+ return /* @__PURE__ */ jsx(Fragment, { children: "-" });
7
+ }
8
+ const visibleIcons = iconsConfig.filter((icon) => icon.visible !== false);
9
+ if (visibleIcons.length === 0) {
10
+ return /* @__PURE__ */ jsx(Fragment, { children: "-" });
11
+ }
12
+ if (visibleIcons.length === 1) {
13
+ return renderIcon(visibleIcons[0]);
14
+ }
15
+ return /* @__PURE__ */ jsx(ColumnIconFormatterStyled, { children: visibleIcons.map((iconConfig, index) => renderIcon(iconConfig, index)) });
16
+ }
17
+ export {
18
+ renderMultipleIcons as r
19
+ };
@@ -1,11 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { DeepKeyOf } from '../../../../utils/types';
3
+ import { Theme } from '@mui/material';
4
+ export type IconColorDeep = DeepKeyOf<Theme['vars']['palette']> | string;
1
5
  export type ColumnIconResponse = {
2
6
  iconUrl: string;
3
7
  tooltip?: string;
4
8
  onClick?: () => void;
5
9
  Component?: React.ElementType;
6
10
  dataTestId?: string;
7
- componentProps?: React.ComponentPropsWithoutRef<any>;
11
+ componentProps?: React.ComponentPropsWithoutRef<React.ElementType>;
12
+ visible?: boolean;
13
+ color?: IconColorDeep;
14
+ size?: 'small' | 'medium';
8
15
  };
9
- export interface ColumnIconFormatterProps {
10
- getIconProps: (obRowProps: any) => ColumnIconResponse;
16
+ export interface ColumnIconFormatterProps<TRow> {
17
+ getIconProps: (obRowProps: TRow) => ColumnIconResponse | ColumnIconResponse[];
11
18
  }
@@ -3,6 +3,6 @@ import { ColumnIconFormatterProps } from './types';
3
3
  * Función helper que retorna
4
4
  * el formatter de la columna
5
5
  */
6
- export declare const useColumnIcon: (props: ColumnIconFormatterProps) => {
7
- formatter: (rowData: any) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const useColumnIcon: <TRow>(props: ColumnIconFormatterProps<TRow>) => {
7
+ formatter: (rowData: TRow) => JSX.Element;
8
8
  };
@@ -41,3 +41,6 @@ export declare enum ColumnsConfigSlots {
41
41
  export declare enum ControlNavigateSlots {
42
42
  controlNavigate = "controlNavigate"
43
43
  }
44
+ export declare enum ColumnIconFormatterSlots {
45
+ columnIconFormatter = "columnIconFormatter"
46
+ }
@@ -48,6 +48,10 @@ var ControlNavigateSlots = /* @__PURE__ */ ((ControlNavigateSlots2) => {
48
48
  ControlNavigateSlots2["controlNavigate"] = "controlNavigate";
49
49
  return ControlNavigateSlots2;
50
50
  })(ControlNavigateSlots || {});
51
+ var ColumnIconFormatterSlots = /* @__PURE__ */ ((ColumnIconFormatterSlots2) => {
52
+ ColumnIconFormatterSlots2["columnIconFormatter"] = "columnIconFormatter";
53
+ return ColumnIconFormatterSlots2;
54
+ })(ColumnIconFormatterSlots || {});
51
55
  export {
52
56
  ActionsSlots as A,
53
57
  ControlNavigateSlots as C,
@@ -55,5 +59,6 @@ export {
55
59
  RowsCountSlots as R,
56
60
  TextEditorSlots as T,
57
61
  ColumnsConfigSlots as a,
58
- TableSlots as b
62
+ TableSlots as b,
63
+ ColumnIconFormatterSlots as c
59
64
  };
@@ -62,3 +62,9 @@ export declare const InputTextEditorStyled: import('@emotion/styled').StyledComp
62
62
  * ****************
63
63
  */
64
64
  export declare const ControlNavigateStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
65
+ /**
66
+ * ****************
67
+ * Slots ColumnIconFormatter
68
+ * ****************
69
+ */
70
+ export declare const ColumnIconFormatterStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { MenuList, InputBase } from "@mui/material";
3
3
  import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
4
- import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, b as TableSlots, C as ControlNavigateSlots, R as RowsCountSlots, a as ColumnsConfigSlots } from "./DataGridEnum.js";
4
+ import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, b as TableSlots, C as ControlNavigateSlots, c as ColumnIconFormatterSlots, R as RowsCountSlots, a as ColumnsConfigSlots } from "./DataGridEnum.js";
5
5
  import { d as dataGridStyles } from "../Datagrid.styles.js";
6
6
  import { I as Icon } from "../../Icon/Icon.js";
7
7
  const DataGridRootStyled = styled("div", {
@@ -120,6 +120,10 @@ const ControlNavigateStyled = styled("div", {
120
120
  name: DATAGRID_PREFIX_NAME,
121
121
  slot: ControlNavigateSlots.controlNavigate
122
122
  })(dataGridStyles.controlNavigate);
123
+ const ColumnIconFormatterStyled = styled("div", {
124
+ name: DATAGRID_PREFIX_NAME,
125
+ slot: ColumnIconFormatterSlots.columnIconFormatter
126
+ })(dataGridStyles.columnIconFormatter);
123
127
  export {
124
128
  ActionsRootStyled as A,
125
129
  ButtonHeaderActionsStyled as B,
@@ -132,22 +136,23 @@ export {
132
136
  RowsCountRootStyled as R,
133
137
  TableWrapperDataGridStyled as T,
134
138
  WrapperSkeletonStyled as W,
135
- ControlNavigateStyled as a,
136
- ActionsConfigContainerStyled as b,
137
- ContainerLeftActionsStyled as c,
138
- ContainerRightActionsStyled as d,
139
- RowsCountLabelStyled as e,
140
- RowsCountValueStyled as f,
141
- ColumnsConfigWrapperStyled as g,
142
- ColumnsConfigDataGridStyled as h,
143
- ColumnsConfigSelColumnsStyled as i,
144
- ColumnsConfigActiosStyled as j,
145
- ContentModalSettingStyled as k,
146
- TableContainerStyled as l,
147
- NameColumnStyled as m,
148
- DraggableHeaderRootStyled as n,
149
- DraggableWrapperInputBaseStyled as o,
150
- IconSearchStyled as p,
151
- HeaderRenderClickStyled as q,
152
- InputTextEditorStyled as r
139
+ ColumnIconFormatterStyled as a,
140
+ ControlNavigateStyled as b,
141
+ ActionsConfigContainerStyled as c,
142
+ ContainerLeftActionsStyled as d,
143
+ ContainerRightActionsStyled as e,
144
+ RowsCountLabelStyled as f,
145
+ RowsCountValueStyled as g,
146
+ ColumnsConfigWrapperStyled as h,
147
+ ColumnsConfigDataGridStyled as i,
148
+ ColumnsConfigSelColumnsStyled as j,
149
+ ColumnsConfigActiosStyled as k,
150
+ ContentModalSettingStyled as l,
151
+ TableContainerStyled as m,
152
+ NameColumnStyled as n,
153
+ DraggableHeaderRootStyled as o,
154
+ DraggableWrapperInputBaseStyled as p,
155
+ IconSearchStyled as q,
156
+ HeaderRenderClickStyled as r,
157
+ InputTextEditorStyled as s
153
158
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useIsMobile } from "@m4l/graphics";
3
- import { a as ControlNavigateStyled } from "../../slots/DataGridSlot.js";
3
+ import { b as ControlNavigateStyled } from "../../slots/DataGridSlot.js";
4
4
  import { R as RowsCount } from "../HeaderActions/subcomponents/RowsCount/index.js";
5
5
  import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
6
6
  import { P as Pager } from "../../../Pager/Pager.js";
@@ -5,7 +5,7 @@ import { D as Density } from "./subcomponents/Density/index.js";
5
5
  import { u as useDataGrid } from "../../hooks/useDataGrid.js";
6
6
  import { useIsMobile } from "@m4l/graphics";
7
7
  import { M as MobileMenuActions } from "./subcomponents/MobileMenuActions/index.js";
8
- import { A as ActionsRootStyled, b as ActionsConfigContainerStyled, c as ContainerLeftActionsStyled, d as ContainerRightActionsStyled } from "../../slots/DataGridSlot.js";
8
+ import { A as ActionsRootStyled, c as ActionsConfigContainerStyled, d as ContainerLeftActionsStyled, e as ContainerRightActionsStyled } from "../../slots/DataGridSlot.js";
9
9
  import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
10
10
  function HeaderActions(props) {
11
11
  const {
@@ -42,7 +42,8 @@ function Density() {
42
42
  currentRowHeightVariant,
43
43
  setRowHeightVariant,
44
44
  host_static_assets,
45
- environment_assets
45
+ environment_assets,
46
+ getLabel
46
47
  ]);
47
48
  const theme = useTheme();
48
49
  const currenViewIcon = useMemo(() => {
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
3
3
  import { Skeleton } from "@mui/material";
4
4
  import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
5
- import { R as RowsCountRootStyled, e as RowsCountLabelStyled, f as RowsCountValueStyled } from "../../../../slots/DataGridSlot.js";
5
+ import { R as RowsCountRootStyled, f as RowsCountLabelStyled, g as RowsCountValueStyled } from "../../../../slots/DataGridSlot.js";
6
6
  function RowsCount() {
7
7
  const { rowsCount, size } = useDataGrid();
8
8
  const { getLabel } = useModuleDictionary();
@@ -4,7 +4,7 @@ import { useModuleDictionary, useEnvironment } from "@m4l/core";
4
4
  import DataGrid from "react-data-grid";
5
5
  import { I as IconButton } from "../../../../../../../mui_extended/IconButton/IconButton.js";
6
6
  import { p as pathIcons } from "../../../../../../icons.js";
7
- import { g as ColumnsConfigWrapperStyled, h as ColumnsConfigDataGridStyled, i as ColumnsConfigSelColumnsStyled, T as TableWrapperDataGridStyled, j as ColumnsConfigActiosStyled } from "../../../../../../slots/DataGridSlot.js";
7
+ import { h as ColumnsConfigWrapperStyled, i as ColumnsConfigDataGridStyled, j as ColumnsConfigSelColumnsStyled, T as TableWrapperDataGridStyled, k as ColumnsConfigActiosStyled } from "../../../../../../slots/DataGridSlot.js";
8
8
  import { D as DICTIONARY } from "../../../../../../dictionary.js";
9
9
  import { C as ColumnInteractiveCheckFormatter } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/formatter.js";
10
10
  function getRowsFromColumnsConfig(columnsConfig, columns) {
@@ -5,7 +5,7 @@ import { useRef, useCallback } from "react";
5
5
  import { u as useDataGrid } from "../../../../../hooks/useDataGrid.js";
6
6
  import { u as useModal } from "../../../../../../../hooks/useModal/index.js";
7
7
  import { C as ColumnsConfig } from "../../Settings/subcomponents/ColumnsConfig/index.js";
8
- import { k as ContentModalSettingStyled, D as DataGridRootStyled } from "../../../../../slots/DataGridSlot.js";
8
+ import { l as ContentModalSettingStyled, D as DataGridRootStyled } from "../../../../../slots/DataGridSlot.js";
9
9
  import { p as pathIcons } from "../../../../../icons.js";
10
10
  import { A as ActionsContainer } from "../../../../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
11
11
  import { W as WindowBase } from "../../../../../../WindowBase/WindowBase.js";
@@ -97,7 +97,8 @@ function useHeaderMenuActions(columnKey, finalColumns, defaultSortable) {
97
97
  externalSortSettings?.onChange({
98
98
  action: "add",
99
99
  columnKey,
100
- direction
100
+ direction,
101
+ label: column.name
101
102
  });
102
103
  },
103
104
  [columnKey, column, externalSortSettings]
@@ -17,7 +17,6 @@ function getComparator(columns, sortColumn) {
17
17
  return column.customSort;
18
18
  }
19
19
  switch (typeOrder) {
20
- //Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
21
20
  case "number":
22
21
  return (a, b) => {
23
22
  try {
@@ -26,7 +25,6 @@ function getComparator(columns, sortColumn) {
26
25
  return -1;
27
26
  }
28
27
  };
29
- //Por defecto retorna una función de ordenamiento de string
30
28
  default:
31
29
  return (a, b) => {
32
30
  try {
@@ -8,7 +8,7 @@ import { a as filterHeight } from "./subcomponents/SelectColumn.js";
8
8
  import { u as useSortColumnsRows } from "./hooks/useSortColumnsRows.js";
9
9
  import { u as useFilters } from "../../hooks/useFilters.js";
10
10
  import { u as useDataGrid } from "../../hooks/useDataGrid.js";
11
- import { l as TableContainerStyled, T as TableWrapperDataGridStyled } from "../../slots/DataGridSlot.js";
11
+ import { m as TableContainerStyled, T as TableWrapperDataGridStyled } from "../../slots/DataGridSlot.js";
12
12
  import { u as useHeaderMenuActions } from "./hooks/useHeaderMenuActions.js";
13
13
  import { H as HeaderRenderClick } from "./subcomponents/HeaderRenderClick/HeaderRenderClick.js";
14
14
  function Table(props) {
@@ -5,7 +5,7 @@ import { useDrag, useDrop } from "react-dnd";
5
5
  import { HeaderRenderer } from "react-data-grid";
6
6
  import { u as useFocusRef } from "../hooks/useFocusRef.js";
7
7
  import { u as useFilters } from "../../../hooks/useFilters.js";
8
- import { N as NameColumnIconStyled, m as NameColumnStyled, I as IconColumnStyled, n as DraggableHeaderRootStyled, B as ButtonHeaderActionsStyled, o as DraggableWrapperInputBaseStyled, p as IconSearchStyled, H as HeaderInputBaseStyled } from "../../../slots/DataGridSlot.js";
8
+ import { N as NameColumnIconStyled, n as NameColumnStyled, I as IconColumnStyled, o as DraggableHeaderRootStyled, B as ButtonHeaderActionsStyled, p as DraggableWrapperInputBaseStyled, q as IconSearchStyled, H as HeaderInputBaseStyled } from "../../../slots/DataGridSlot.js";
9
9
  import { p as pathIcons } from "../../../icons.js";
10
10
  import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
11
11
  import { I as Icon } from "../../../../Icon/Icon.js";
@@ -103,7 +103,19 @@ function DraggableHeaderRenderer(props) {
103
103
  if (!newColumn.withinHeaderRenderer) {
104
104
  const columnIcons = getColumnIcons();
105
105
  if (columnIcons) {
106
- newColumn.name = /* @__PURE__ */ jsxs(NameColumnIconStyled, { children: [
106
+ const getJustifyContent = () => {
107
+ switch (column.align) {
108
+ case "left":
109
+ return "flex-start";
110
+ case "center":
111
+ return "center";
112
+ case "right":
113
+ return "flex-end";
114
+ default:
115
+ return "flex-start";
116
+ }
117
+ };
118
+ newColumn.name = /* @__PURE__ */ jsxs(NameColumnIconStyled, { style: { justifyContent: getJustifyContent() }, children: [
107
119
  /* @__PURE__ */ jsx(NameColumnStyled, { children: newColumn.name }),
108
120
  /* @__PURE__ */ jsx(IconColumnStyled, { children: columnIcons })
109
121
  ] });
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useState, useMemo, useEffect, useCallback } from "react";
3
3
  import { useModuleDictionary } from "@m4l/core";
4
4
  import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
5
- import { M as MenuListStyled, q as HeaderRenderClickStyled } from "../../../../slots/DataGridSlot.js";
5
+ import { M as MenuListStyled, r as HeaderRenderClickStyled } from "../../../../slots/DataGridSlot.js";
6
6
  import { M as MenuDivider } from "../../../../../mui_extended/MenuDivider/MenuDivider.js";
7
7
  import { P as Popover } from "../../../../../mui_extended/Popover/Popover.js";
8
8
  import { D as DICTIONARY } from "../../../../dictionary.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { r as InputTextEditorStyled } from "../../../slots/DataGridSlot.js";
2
+ import { s as InputTextEditorStyled } from "../../../slots/DataGridSlot.js";
3
3
  function autoFocusAndSelect(input) {
4
4
  input?.focus();
5
5
  input?.select();
@@ -2,7 +2,7 @@ import { Maybe } from '@m4l/core';
2
2
  import { Theme } from '@mui/material/styles';
3
3
  import { Column, RowsChangeData, FormatterProps } from 'react-data-grid';
4
4
  import { MenuAction } from '../MenuActions/types';
5
- import { ActionsSlots, ColumnsConfigSlots, ControlNavigateSlots, DataGridSlots, RowsCountSlots, TableSlots, TextEditorSlots } from './slots/DataGridEnum';
5
+ import { ActionsSlots, ColumnIconFormatterSlots, ColumnsConfigSlots, ControlNavigateSlots, DataGridSlots, RowsCountSlots, TableSlots, TextEditorSlots } from './slots/DataGridEnum';
6
6
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
7
7
  import { DATAGRID_PREFIX_NAME } from './constants';
8
8
  import { IGridConfig } from './contexts/DataGridContext/types';
@@ -71,6 +71,7 @@ export type SortAction = 'add' | 'remove';
71
71
  export type SortChangeAdd = {
72
72
  action: 'add';
73
73
  columnKey: string;
74
+ label: string;
74
75
  direction: Lowercase<SortDirection>;
75
76
  };
76
77
  export type SortChangeRemove = {
@@ -164,5 +165,5 @@ export interface ActionsProps {
164
165
  rightActions?: React.ReactNode;
165
166
  }
166
167
  export type DataGridOwnerState<TRow, TSummaryRow, TKey extends RowKey = RowKey> = Pick<DataGridProps<TRow, TSummaryRow, TKey>, 'visibleCustomHeader'>;
167
- export type DataGridSlotsType = DataGridSlots | TextEditorSlots | ActionsSlots | RowsCountSlots | ColumnsConfigSlots | TableSlots | ControlNavigateSlots;
168
+ export type DataGridSlotsType = DataGridSlots | TextEditorSlots | ActionsSlots | RowsCountSlots | ColumnsConfigSlots | TableSlots | ControlNavigateSlots | ColumnIconFormatterSlots;
168
169
  export type DataGridStyles = OverridesStyleRules<DataGridSlotsType, typeof DATAGRID_PREFIX_NAME, Theme>;
@@ -56,11 +56,9 @@ const useNumberInput = (parameters) => {
56
56
  (event, field, fieldValue, reason) => {
57
57
  if (field === "value" && typeof fieldValue !== "string") {
58
58
  switch (reason) {
59
- // only a blur event will dispatch `numberInput:clamp`
60
59
  case "numberInput:inputChange":
61
60
  onChange?.(event, fieldValue);
62
61
  break;
63
- // only a blur event will dispatch `numberInput:clamp`
64
62
  case "numberInput:clamp":
65
63
  onChange?.(event, fieldValue);
66
64
  break;
@@ -41,7 +41,8 @@ const objectLogsStyles = {
41
41
  /**
42
42
  * Estilos para los iconos dentro de botones y otros elementos.
43
43
  */
44
- iconStyled: () => ({
44
+ iconStyled: {},
45
+ iconClickeableStyled: () => ({
45
46
  cursor: "pointer"
46
47
  }),
47
48
  /**
@@ -8,5 +8,6 @@ export declare enum ObjectLogsSlots {
8
8
  tooltipStyled = "tooltipStyled",
9
9
  iconButtonStyled = "iconButtonStyled",
10
10
  iconStyled = "iconStyled",
11
+ iconClickeableStyled = "iconClickeableStyled",
11
12
  reactJsonSlot = "reactJsonSlot"
12
13
  }
@@ -8,6 +8,7 @@ var ObjectLogsSlots = /* @__PURE__ */ ((ObjectLogsSlots2) => {
8
8
  ObjectLogsSlots2["tooltipStyled"] = "tooltipStyled";
9
9
  ObjectLogsSlots2["iconButtonStyled"] = "iconButtonStyled";
10
10
  ObjectLogsSlots2["iconStyled"] = "iconStyled";
11
+ ObjectLogsSlots2["iconClickeableStyled"] = "iconClickeableStyled";
11
12
  ObjectLogsSlots2["reactJsonSlot"] = "reactJsonSlot";
12
13
  return ObjectLogsSlots2;
13
14
  })(ObjectLogsSlots || {});
@@ -25,6 +25,9 @@ export declare const IconButtonStyled: import('@emotion/styled').StyledComponent
25
25
  export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
26
26
  ownerState?: (Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>) | undefined;
27
27
  }, {}, {}>;
28
+ export declare const IconClickeableStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
29
+ ownerState?: (Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>) | undefined;
30
+ }, {}, {}>;
28
31
  export declare const ReactJsonSlot: import('@emotion/styled').StyledComponent<Pick<import('@microlink/react-json-view').ReactJsonViewProps, keyof import('@microlink/react-json-view').ReactJsonViewProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
29
32
  ownerState?: (Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>) | undefined;
30
33
  }, {}, {}>;
@@ -45,6 +45,10 @@ const IconStyled = styled(Icon, {
45
45
  name: OBJECT_LOGS_KEY_COMPONENT,
46
46
  slot: ObjectLogsSlots.iconStyled
47
47
  })(objectLogsStyles?.iconStyled);
48
+ const IconClickeableStyled = styled(Icon, {
49
+ name: OBJECT_LOGS_KEY_COMPONENT,
50
+ slot: ObjectLogsSlots.iconClickeableStyled
51
+ })(objectLogsStyles?.iconClickeableStyled);
48
52
  styled(ReactJson, {
49
53
  name: OBJECT_LOGS_KEY_COMPONENT,
50
54
  slot: ObjectLogsSlots.reactJsonSlot
@@ -54,7 +58,8 @@ export {
54
58
  ContainerWrapperStyled as C,
55
59
  DetailDialogComponent as D,
56
60
  GridWrapperStyled as G,
57
- IconStyled as I,
61
+ IconClickeableStyled as I,
58
62
  StackStyled as S,
59
- WindowBaseStyled as W
63
+ WindowBaseStyled as W,
64
+ IconStyled as a
60
65
  };
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
441
441
  bounds: {
442
442
  left: MARGIN_GRIDLAYOUT,
443
443
  top: MARGIN_GRIDLAYOUT,
444
- right: -MARGIN_GRIDLAYOUT,
445
- bottom: -MARGIN_GRIDLAYOUT
444
+ right: -10,
445
+ bottom: -10
446
446
  }
447
447
  });
448
448
  }
@@ -6,7 +6,7 @@ import clsx from "clsx";
6
6
  import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
7
7
  import { B as BOOLEAN_FORMATTER_KEY_COMPONENT } from "./constants.js";
8
8
  import { g as getPropDataTestId } from "../../../test/getNameDataTestId.js";
9
- import { B as BooleanFormatterRootStyled, a as BooleanFormatterIconStyled, b as BooleanFormatterChipStyled } from "./slots/BooleanFormatterSlots.js";
9
+ import { B as BooleanFormatterRootStyled, a as BooleanFormatterIconStyled, b as BooleanFormatterIconCheckFalseStyled, c as BooleanFormatterChipStyled } from "./slots/BooleanFormatterSlots.js";
10
10
  import { B as BooleanFormatterSlots } from "./slots/BooleanFormatterEnum.js";
11
11
  function getFormatBoolean(presentationType, value = false, getLabel) {
12
12
  if (presentationType === "string_yes_no") {
@@ -18,6 +18,9 @@ function getFormatBoolean(presentationType, value = false, getLabel) {
18
18
  if (presentationType === "chip_active_inactive") {
19
19
  return value ? getLabel(LABEL_BOOLEAN_ACTIVE) : getLabel(LABEL_BOOLEAN_INACTIVE);
20
20
  }
21
+ if (presentationType === "chip_yes_no") {
22
+ return value ? getLabel(LABEL_BOOLEAN_YES) : getLabel(LABEL_BOOLEAN_NO);
23
+ }
21
24
  return "";
22
25
  }
23
26
  function BooleanFormatter(props) {
@@ -29,8 +32,9 @@ function BooleanFormatter(props) {
29
32
  const ownerState = { value };
30
33
  const memoComponent = useMemo(() => {
31
34
  if (presentationType === "check") {
35
+ const IconComponent = value ? BooleanFormatterIconStyled : BooleanFormatterIconCheckFalseStyled;
32
36
  return /* @__PURE__ */ jsx(
33
- BooleanFormatterIconStyled,
37
+ IconComponent,
34
38
  {
35
39
  ownerState,
36
40
  src: value ? srcCheckTrue : srcCheckFalse,
@@ -38,14 +42,13 @@ function BooleanFormatter(props) {
38
42
  }
39
43
  );
40
44
  }
41
- if (presentationType === "chip_active_inactive") {
45
+ if (presentationType === "chip_active_inactive" || presentationType === "chip_yes_no") {
42
46
  return /* @__PURE__ */ jsx(
43
47
  BooleanFormatterChipStyled,
44
48
  {
45
49
  label: getFormatBoolean(presentationType, value, getLabel),
46
50
  ownerState,
47
51
  className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT), className),
48
- opacity: true,
49
52
  color: value ? "primary" : "default",
50
53
  variant: "contained"
51
54
  }
@@ -13,7 +13,15 @@ const booleanFormatterStyles = {
13
13
  */
14
14
  icon: ({ theme }) => ({
15
15
  "& .M4LIcon-icon": {
16
- backgroundColor: theme.vars.palette.chips.default.contained.backgroundColorTone
16
+ backgroundColor: theme.vars.palette.text.primary
17
+ }
18
+ }),
19
+ /**
20
+ * Estilos para el icono de false
21
+ */
22
+ iconCheckFalse: ({ theme }) => ({
23
+ "& .M4LIcon-icon": {
24
+ backgroundColor: theme.vars.palette.text.secondary
17
25
  }
18
26
  }),
19
27
  chip: {}
@@ -1,5 +1,6 @@
1
1
  export declare enum BooleanFormatterSlots {
2
2
  icon = "icon",
3
3
  root = "root",
4
- chip = "chip"
4
+ chip = "chip",
5
+ iconCheckFalse = "iconCheckFalse"
5
6
  }
@@ -2,6 +2,7 @@ var BooleanFormatterSlots = /* @__PURE__ */ ((BooleanFormatterSlots2) => {
2
2
  BooleanFormatterSlots2["icon"] = "icon";
3
3
  BooleanFormatterSlots2["root"] = "root";
4
4
  BooleanFormatterSlots2["chip"] = "chip";
5
+ BooleanFormatterSlots2["iconCheckFalse"] = "iconCheckFalse";
5
6
  return BooleanFormatterSlots2;
6
7
  })(BooleanFormatterSlots || {});
7
8
  export {
@@ -1,6 +1,9 @@
1
1
  export declare const BooleanFormatterIconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').IconProps, keyof import('../../..').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
2
2
  ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
3
3
  }, {}, {}>;
4
+ export declare const BooleanFormatterIconCheckFalseStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').IconProps, keyof import('../../..').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
5
+ ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
6
+ }, {}, {}>;
4
7
  export declare const BooleanFormatterRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../mui_extended/Typography/types').TypographyProps, keyof import('../../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown> & {
5
8
  ownerState: Partial<import('..').BooleanFormatterOwnerState> & Record<string, unknown>;
6
9
  }, {}, {}>;
@@ -9,6 +9,10 @@ const BooleanFormatterIconStyled = styled(Icon, {
9
9
  name: BOOLEAN_FORMATTER_KEY_COMPONENT,
10
10
  slot: BooleanFormatterSlots.icon
11
11
  })(booleanFormatterStyles?.icon);
12
+ const BooleanFormatterIconCheckFalseStyled = styled(Icon, {
13
+ name: BOOLEAN_FORMATTER_KEY_COMPONENT,
14
+ slot: BooleanFormatterSlots.iconCheckFalse
15
+ })(booleanFormatterStyles?.iconCheckFalse);
12
16
  const BooleanFormatterRootStyled = styled(Typography, {
13
17
  name: BOOLEAN_FORMATTER_KEY_COMPONENT,
14
18
  slot: BooleanFormatterSlots.root
@@ -20,5 +24,6 @@ const BooleanFormatterChipStyled = styled(Chip, {
20
24
  export {
21
25
  BooleanFormatterRootStyled as B,
22
26
  BooleanFormatterIconStyled as a,
23
- BooleanFormatterChipStyled as b
27
+ BooleanFormatterIconCheckFalseStyled as b,
28
+ BooleanFormatterChipStyled as c
24
29
  };
@@ -8,7 +8,7 @@ import { Theme } from '@mui/material';
8
8
  * - `'string_true_false'`: Displays "True" for `true` and "False" for `false`.
9
9
  * - `'check'`: Displays an icon to represent the boolean value.
10
10
  */
11
- export type PresentationType = 'string_yes_no' | 'string_true_false' | 'check' | 'chip_active_inactive';
11
+ export type PresentationType = 'string_yes_no' | 'string_true_false' | 'check' | 'chip_active_inactive' | 'chip_yes_no';
12
12
  /**
13
13
  * Maps to the keys in `BooleanFormatterSlots`, defining slot-specific styling or customization.
14
14
  */
@@ -65,11 +65,6 @@ const RHFAutocompleteAsyncReducer = (onChangeFilterParms) => (state, action) =>
65
65
  ...state,
66
66
  isOpen: false
67
67
  };
68
- // case actionsType.SET_SELECTED_OPTIONS_TO_AUTOCOMPLETE:
69
- // return {
70
- // ...state,
71
- // selectedOptions: action.payload,
72
- // };
73
68
  default:
74
69
  return state;
75
70
  }
@@ -251,7 +251,7 @@ const useDynamicFilterAndSort = (props) => {
251
251
  name: sortApplied.columnKey,
252
252
  type: sort?.type || "string",
253
253
  urlIcon: sort?.urlIcon || "",
254
- label: sort?.label || sortApplied.columnKey
254
+ label: sortApplied.label
255
255
  },
256
256
  isSet: true,
257
257
  fixed: isFixed,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.62",
3
+ "version": "9.2.63",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {
@@ -19,6 +19,14 @@ export declare const DataGridWithEventChangeUserColumn: Story;
19
19
  * DataGrid con columns formatters
20
20
  */
21
21
  export declare const DatagridWithFormatters: Story;
22
+ /**
23
+ * DataGrid con columns with actions
24
+ */
25
+ export declare const DatagridWithActions: Story;
26
+ /**
27
+ * DataGrid con columnas con alineación
28
+ */
29
+ export declare const DatagridWithAlign: Story;
22
30
  /**
23
31
  * DataGrid sin pager
24
32
  */
@@ -1,3 +1,9 @@
1
1
  export declare const icons: {
2
2
  roundRefreshIcon: string;
3
+ roundDeleteIcon: string;
4
+ addIcon: string;
5
+ editIcon: string;
6
+ printIcon: string;
7
+ activeIcon: string;
8
+ inactiveIcon: string;
3
9
  };
@@ -1,12 +1,14 @@
1
1
  import { HeaderRendererProps } from 'react-data-grid';
2
2
  import { ChipStatusFormatterProps } from '../../../../src/components/formatters/ChipStatusFormatter/types';
3
3
  import { DeepKeyOf } from '../../../../src/utils/types';
4
+ import { ColumnAlign } from '../../../../src/components/DataGrid/types';
4
5
  export interface SeedProps {
5
6
  quantity: number;
6
7
  withBoolean?: boolean;
7
8
  withConcatenated?: boolean;
8
9
  withDate?: boolean;
9
10
  withIcon?: boolean;
11
+ withMultipleIcons?: boolean;
10
12
  withInteractiveCheck?: boolean;
11
13
  withNestedValue?: boolean;
12
14
  withPoints?: boolean;
@@ -15,6 +17,12 @@ export interface SeedProps {
15
17
  withSetCheck?: boolean;
16
18
  withCesar?: boolean;
17
19
  withChipStatus?: boolean;
20
+ withActions?: boolean;
21
+ withActionsUser?: boolean;
22
+ withBooleanStatus?: boolean;
23
+ withUserType?: boolean;
24
+ aligns?: Record<string, ColumnAlign>;
25
+ names?: Record<string, string>;
18
26
  }
19
27
  export type GetColumnsProps = Omit<SeedProps, 'quantity'>;
20
28
  export type ColumnType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
@@ -48,6 +56,10 @@ export interface RowType {
48
56
  label: string;
49
57
  currentStatus: ChipStatusFormatterProps['status'];
50
58
  };
59
+ userType?: {
60
+ label: string;
61
+ currentStatus: 'superadmin' | 'admin' | 'user';
62
+ };
51
63
  }
52
64
  interface RangesUncertainty {
53
65
  cmcMin: number;
@@ -1,4 +1,5 @@
1
- import { GetColumnsProps, RowType, Column } from './types';
1
+ import { GetColumnsProps, RowType } from './types';
2
+ import { Column } from 'react-data-grid';
2
3
  /**
3
4
  * ****************************************************************
4
5
  * Función que retorna las columnas para el DataGrid de Storybook
@@ -3,7 +3,7 @@ import { SeedProps } from './types';
3
3
  * Función que retorna el seed para el DataGrid de Storybook
4
4
  */
5
5
  export declare const useSeed: (props: SeedProps) => {
6
- columns: readonly import('./types').Column<import('./types').RowType, unknown>[];
6
+ columns: readonly import('react-data-grid').Column<import('./types').RowType, unknown>[];
7
7
  filters: import('../../../../src').FilterField[];
8
8
  sorts: import('../../../../src').SortField[];
9
9
  rows: import('./types').RowType[];