@m4l/components 9.2.63-JT14072025.beta.1 → 9.2.64

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 (96) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/ContainerFlow/ContainerFlow.d.ts +7 -0
  3. package/components/ContainerFlow/ContainerFlow.js +25 -0
  4. package/components/ContainerFlow/ContainerFlow.styles.d.ts +2 -0
  5. package/components/ContainerFlow/ContainerFlow.styles.js +46 -0
  6. package/components/ContainerFlow/constants.d.ts +9 -0
  7. package/components/ContainerFlow/constants.js +21 -0
  8. package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.d.ts +7 -0
  9. package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.js +10 -0
  10. package/components/ContainerFlow/helpers/getSpacingValue/getSpacingValue.test.d.ts +1 -0
  11. package/components/ContainerFlow/index.d.ts +2 -0
  12. package/components/ContainerFlow/index.js +1 -0
  13. package/components/ContainerFlow/slots/ContainerFlowEnum.d.ts +4 -0
  14. package/components/ContainerFlow/slots/ContainerFlowEnum.js +8 -0
  15. package/components/ContainerFlow/slots/ContainerFlowSlots.d.ts +6 -0
  16. package/components/ContainerFlow/slots/ContainerFlowSlots.js +16 -0
  17. package/components/ContainerFlow/slots/index.d.ts +0 -0
  18. package/components/ContainerFlow/tests/ContainerFlow.test.d.ts +1 -0
  19. package/components/ContainerFlow/types.d.ts +41 -0
  20. package/components/DataGrid/Datagrid.styles.js +2 -22
  21. package/components/DataGrid/formatters/ColumnBooleanFormatter/formatter.d.ts +1 -2
  22. package/components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js +3 -2
  23. package/components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.d.ts +1 -1
  24. package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.d.ts +1 -2
  25. package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js +4 -5
  26. package/components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.d.ts +1 -1
  27. package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.d.ts +1 -2
  28. package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js +4 -11
  29. package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.d.ts +1 -1
  30. package/components/DataGrid/formatters/ColumnDateFormatter/formatter.d.ts +1 -2
  31. package/components/DataGrid/formatters/ColumnDateFormatter/formatter.js +4 -13
  32. package/components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.d.ts +1 -1
  33. package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +1 -2
  34. package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +2 -2
  35. package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +1 -1
  36. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/types.d.ts +2 -2
  37. package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.d.ts +1 -2
  38. package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js +3 -4
  39. package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +1 -1
  40. package/components/DataGrid/formatters/ColumnPointsFormatter/formatter.d.ts +1 -2
  41. package/components/DataGrid/formatters/ColumnPointsFormatter/formatter.js +5 -13
  42. package/components/DataGrid/formatters/ColumnPointsFormatter/useColumnPoints.d.ts +1 -1
  43. package/components/DataGrid/formatters/ColumnPriceFormatter/formatter.d.ts +1 -2
  44. package/components/DataGrid/formatters/ColumnPriceFormatter/formatter.js +4 -11
  45. package/components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.d.ts +1 -1
  46. package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.d.ts +2 -2
  47. package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js +1 -1
  48. package/components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.d.ts +1 -1
  49. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.d.ts +1 -2
  50. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js +6 -15
  51. package/components/DataGrid/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.d.ts +1 -1
  52. package/components/DataGrid/index.d.ts +1 -1
  53. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +5 -4
  54. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +2 -2
  55. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +2 -2
  56. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +6 -15
  57. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +7 -9
  58. package/components/DataGrid/subcomponents/Table/index.d.ts +1 -3
  59. package/components/DataGrid/subcomponents/Table/index.js +9 -39
  60. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
  61. package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.d.ts +2 -2
  62. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +2 -2
  63. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +8 -10
  64. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
  65. package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +7 -7
  66. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +3 -3
  67. package/components/DataGrid/types.d.ts +4 -5
  68. package/components/Image/Image.js +4 -2
  69. package/components/Image/image.styles.js +6 -3
  70. package/components/Image/types.d.ts +5 -0
  71. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
  72. package/components/PropertyValue/PropertyValue.styles.js +1 -1
  73. package/components/areas/contexts/AreasContext/store.js +2 -2
  74. package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
  75. package/components/index.d.ts +1 -0
  76. package/components/mui_extended/Accordion/styles.js +3 -5
  77. package/components/mui_extended/MenuItem/MenuItem.js +1 -2
  78. package/components/mui_extended/MenuItem/types.d.ts +0 -4
  79. package/components/mui_extended/TabContent/TabContent.styles.js +3 -0
  80. package/components/mui_extended/TabContent/constants.d.ts +1 -0
  81. package/components/mui_extended/TabContent/constants.js +2 -0
  82. package/components/mui_extended/Typography/Typography.js +3 -1
  83. package/components/mui_extended/Typography/types.d.ts +5 -0
  84. package/components/mui_extended/Typography/typography.styles.js +7 -1
  85. package/helpers/getFieldValueWithRow.js +10 -0
  86. package/index.js +32 -30
  87. package/package.json +2 -2
  88. package/storybook/components/ContainerFlow/ContainerFlow.stories.d.ts +32 -0
  89. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn/index.d.ts +5 -0
  90. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn1Wrappers/index.d.ts +5 -0
  91. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn2Wrappers/index.d.ts +5 -0
  92. package/storybook/components/ContainerFlow/subcomponents/RenderFlexColumn3Wrappers/index.d.ts +5 -0
  93. package/storybook/components/ContainerFlow/subcomponents/RenderFlexWrap/index.d.ts +5 -0
  94. package/storybook/components/ContainerFlow/subcomponents/RenderGridLayout/index.d.ts +5 -0
  95. package/storybook/components/ContainerFlow/wrapperItems/index.d.ts +10 -0
  96. package/storybook/components/DataGrid/helpers/types.d.ts +2 -2
package/@types/types.d.ts CHANGED
@@ -149,6 +149,7 @@ import { ScrollBarOwnerState, ScrollBarSlotsType } from '../components/ScrollBar
149
149
  import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
150
150
  import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectLogs/types';
151
151
  import { LanguagePopoverOwnerState, LanguagePopoverSlotsType } from '../components/LanguagePopover/types';
152
+ import { ContainerFlowOwnerState, ContainerFlowSlotsType } from '../components/ContainerFlow/types';
152
153
  declare module '@mui/material/styles' {
153
154
  // Define the slots in the theme
154
155
  interface ComponentNameToClassKey {
@@ -228,6 +229,7 @@ declare module '@mui/material/styles' {
228
229
  M4LSplitLayout: SplitLayoutOwnerState;
229
230
  M4LObjectLogs: ObjectLogsSlotsType;
230
231
  M4LLanguagePopover: LanguagePopoverSlotsType;
232
+ M4LContainerFlow: ContainerFlowSlotsType;
231
233
  }
232
234
  interface ComponentsPropsList {
233
235
  // Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
@@ -307,6 +309,7 @@ declare module '@mui/material/styles' {
307
309
  M4LSplitLayout: Partial<SplitLayoutOwnerState>;
308
310
  M4LObjectLogs: Partial<ObjectLogsOwnerState>;
309
311
  M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
312
+ M4LContainerFlow: Partial<ContainerFlowOwnerState>;
310
313
  }
311
314
  interface Components {
312
315
  M4LDynamicFilter?: {
@@ -699,5 +702,10 @@ declare module '@mui/material/styles' {
699
702
  styleOverrides?: ComponentsOverrides<Theme>['M4LLanguagePopover'];
700
703
  variants?: ComponentsVariants['M4LLanguagePopover'];
701
704
  };
705
+ M4LContainerFlow?: {
706
+ defaultProps?: ComponentsPropsList['M4LContainerFlow'];
707
+ styleOverrides?: ComponentsOverrides<Theme>['M4LContainerFlow'];
708
+ variants?: ComponentsVariants['M4LContainerFlow'];
709
+ };
702
710
  }
703
711
  }
@@ -0,0 +1,7 @@
1
+ import { ContainerFlowProps } from './types';
2
+ /**
3
+ * Componente que permite renderizar un contenedor de items en forma de flujo.
4
+ * @param props - Propiedades del componente.
5
+ * @returns Un componente de tipo div con los estilos del contenedor de items.
6
+ */
7
+ export declare const ContainerFlow: (props: ContainerFlowProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { C as CONTAINER_FLOW_CLASSES } from "./constants.js";
3
+ import { C as ContainerFlowWrapperItemStyled, a as ContainerFlowRootStyled } from "./slots/ContainerFlowSlots.js";
4
+ import clsx from "clsx";
5
+ const ContainerFlow = (props) => {
6
+ const { variant = "column-flex", size, children, minWidth, className, gap = "standard" } = props;
7
+ const isColumnFlex = variant === "column-flex";
8
+ const ownerState = {
9
+ variant,
10
+ size,
11
+ minWidth,
12
+ gap
13
+ };
14
+ const childrenArray = Array.isArray(children) ? children : children ? [children] : [];
15
+ let itemsToRender;
16
+ if (!isColumnFlex && children) {
17
+ itemsToRender = children;
18
+ } else if (childrenArray.length > 0) {
19
+ itemsToRender = childrenArray.map((child, index) => /* @__PURE__ */ jsx(ContainerFlowWrapperItemStyled, { role: "listitem", ownerState: { variant, size }, className: CONTAINER_FLOW_CLASSES.wrapperItem, children: child }, index));
20
+ }
21
+ return /* @__PURE__ */ jsx(ContainerFlowRootStyled, { role: "list", ownerState, className: clsx(CONTAINER_FLOW_CLASSES.root, className), children: itemsToRender });
22
+ };
23
+ export {
24
+ ContainerFlow as C
25
+ };
@@ -0,0 +1,2 @@
1
+ import { ContainerFlowStyles } from './types';
2
+ export declare const containerFlowStyles: ContainerFlowStyles;
@@ -0,0 +1,46 @@
1
+ import { g as getSpacingValue } from "./helpers/getSpacingValue/getSpacingValue.js";
2
+ import { a as CONTAINER_FLOW_MIN_WIDTH_VALUES, b as CONTAINER_QUERY_NAME } from "./constants.js";
3
+ const containerFlowStyles = {
4
+ /**
5
+ * Estilos para el contenedor raíz del componente.
6
+ */
7
+ root: ({ ownerState }) => ({
8
+ width: "100%",
9
+ height: "100%",
10
+ gap: getSpacingValue(ownerState?.gap ?? "standard"),
11
+ containerName: CONTAINER_QUERY_NAME,
12
+ containerType: "inline-size",
13
+ ...ownerState?.variant === "grid-layout" && {
14
+ display: "grid",
15
+ gridTemplateColumns: `repeat(auto-fill, minmax(${ownerState.minWidth ?? 200}px, 1fr))`,
16
+ height: "fit-content"
17
+ },
18
+ ...(ownerState?.variant === "column-flex" || ownerState?.variant === "flex-wrap") && {
19
+ display: "flex",
20
+ flexDirection: "row",
21
+ flexWrap: "wrap",
22
+ height: "fit-content",
23
+ "& > .M4LContainerFlow-wrapperItem": {
24
+ minWidth: ownerState?.minWidth ?? CONTAINER_FLOW_MIN_WIDTH_VALUES,
25
+ flex: 1
26
+ },
27
+ [`@container ${CONTAINER_QUERY_NAME} (max-width: ${ownerState?.minWidth ? ownerState?.minWidth - 1 : 200 - 1}px)`]: {
28
+ "& > .M4LContainerFlow-wrapperItem": {
29
+ minWidth: "100%",
30
+ maxWidth: "100%"
31
+ }
32
+ }
33
+ }
34
+ }),
35
+ /**
36
+ * Estilos para el contenedor de los items del componente.
37
+ */
38
+ wrapperItem: () => ({
39
+ display: "flex",
40
+ flexDirection: "row",
41
+ flexWrap: "wrap"
42
+ })
43
+ };
44
+ export {
45
+ containerFlowStyles as c
46
+ };
@@ -0,0 +1,9 @@
1
+ export declare const CONTAINER_FLOW_KEY_COMPONENT = "M4LContainerFlow";
2
+ export declare const CONTAINER_FLOW_CLASSES: Record<string, string>;
3
+ export declare const CONTAINER_FLOW_GAP_VALUES: {
4
+ compact: number;
5
+ standard: number;
6
+ comfortable: number;
7
+ };
8
+ export declare const CONTAINER_QUERY_NAME = "container";
9
+ export declare const CONTAINER_FLOW_MIN_WIDTH_VALUES = 280;
@@ -0,0 +1,21 @@
1
+ import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
2
+ import { C as ContainerFlowSlots } from "./slots/ContainerFlowEnum.js";
3
+ const CONTAINER_FLOW_KEY_COMPONENT = "M4LContainerFlow";
4
+ const CONTAINER_FLOW_CLASSES = getComponentClasses(
5
+ CONTAINER_FLOW_KEY_COMPONENT,
6
+ ContainerFlowSlots
7
+ );
8
+ const CONTAINER_FLOW_GAP_VALUES = {
9
+ compact: 8,
10
+ standard: 16,
11
+ comfortable: 24
12
+ };
13
+ const CONTAINER_QUERY_NAME = "container";
14
+ const CONTAINER_FLOW_MIN_WIDTH_VALUES = 280;
15
+ export {
16
+ CONTAINER_FLOW_CLASSES as C,
17
+ CONTAINER_FLOW_MIN_WIDTH_VALUES as a,
18
+ CONTAINER_QUERY_NAME as b,
19
+ CONTAINER_FLOW_GAP_VALUES as c,
20
+ CONTAINER_FLOW_KEY_COMPONENT as d
21
+ };
@@ -0,0 +1,7 @@
1
+ import { SemanticSpacings } from '../../types';
2
+ /**
3
+ * Función que retorna el valor del gap en función del tipo de gap recibido.
4
+ * @param gap - El gap a convertir.
5
+ * @returns El valor del gap en función del tipo de gap recibido.
6
+ */
7
+ export declare const getSpacingValue: (gap: SemanticSpacings | number) => number;
@@ -0,0 +1,10 @@
1
+ import { c as CONTAINER_FLOW_GAP_VALUES } from "../../constants.js";
2
+ const getSpacingValue = (gap) => {
3
+ if (typeof gap === "number") {
4
+ return gap;
5
+ }
6
+ return CONTAINER_FLOW_GAP_VALUES[gap];
7
+ };
8
+ export {
9
+ getSpacingValue as g
10
+ };
@@ -0,0 +1,2 @@
1
+ export { ContainerFlow } from './ContainerFlow';
2
+ export type { ContainerFlowProps } from './types';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ export declare enum ContainerFlowSlots {
2
+ root = "root",
3
+ wrapperItem = "wrapperItem"
4
+ }
@@ -0,0 +1,8 @@
1
+ var ContainerFlowSlots = /* @__PURE__ */ ((ContainerFlowSlots2) => {
2
+ ContainerFlowSlots2["root"] = "root";
3
+ ContainerFlowSlots2["wrapperItem"] = "wrapperItem";
4
+ return ContainerFlowSlots2;
5
+ })(ContainerFlowSlots || {});
6
+ export {
7
+ ContainerFlowSlots as C
8
+ };
@@ -0,0 +1,6 @@
1
+ export declare const ContainerFlowRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
2
+ ownerState?: (Partial<import('../types').ContainerFlowOwnerState> & Record<string, unknown>) | undefined;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
+ export declare const ContainerFlowWrapperItemStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
5
+ ownerState?: (Partial<import('../types').ContainerFlowOwnerState> & Record<string, unknown>) | undefined;
6
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
@@ -0,0 +1,16 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { d as CONTAINER_FLOW_KEY_COMPONENT } from "../constants.js";
3
+ import { C as ContainerFlowSlots } from "./ContainerFlowEnum.js";
4
+ import { c as containerFlowStyles } from "../ContainerFlow.styles.js";
5
+ const ContainerFlowRootStyled = styled("div", {
6
+ name: CONTAINER_FLOW_KEY_COMPONENT,
7
+ slot: ContainerFlowSlots.root
8
+ })(containerFlowStyles?.root);
9
+ const ContainerFlowWrapperItemStyled = styled("div", {
10
+ name: CONTAINER_FLOW_KEY_COMPONENT,
11
+ slot: ContainerFlowSlots.wrapperItem
12
+ })(containerFlowStyles?.wrapperItem);
13
+ export {
14
+ ContainerFlowWrapperItemStyled as C,
15
+ ContainerFlowRootStyled as a
16
+ };
File without changes
@@ -0,0 +1,41 @@
1
+ import { Sizes } from '@m4l/styles';
2
+ import { ContainerFlowSlots } from './slots/ContainerFlowEnum';
3
+ import { CONTAINER_FLOW_KEY_COMPONENT } from './constants';
4
+ import { Theme } from '@mui/material';
5
+ import { M4LOverridesStyleRules } from '../../@types/augmentations';
6
+ export type ContainerFlowVariant = 'flex-wrap' | 'column-flex' | 'grid-layout';
7
+ export type SemanticSpacings = 'compact' | 'comfortable' | 'standard';
8
+ export type ContainerFlowProps = {
9
+ /**
10
+ * Variante del contenedor de items.
11
+ */
12
+ variant: ContainerFlowVariant;
13
+ /**
14
+ * Items del contenedor de items.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Tamaño del contenedor de items.
19
+ */
20
+ size?: Extract<Sizes, 'small' | 'medium'>;
21
+ /**
22
+ * Ancho mínimo de los items del contenedor de items.
23
+ */
24
+ minWidth?: number;
25
+ /**
26
+ * Clase del contenedor de items.
27
+ */
28
+ className?: string;
29
+ /**
30
+ * Espacio entre los items del contenedor de items.
31
+ */
32
+ gap?: SemanticSpacings | number;
33
+ };
34
+ export type ContainerFlowSlotsType = keyof typeof ContainerFlowSlots;
35
+ export type ContainerFlowOwnerState = {
36
+ variant: ContainerFlowProps['variant'];
37
+ size: ContainerFlowProps['size'];
38
+ minWidth: ContainerFlowProps['minWidth'];
39
+ gap: ContainerFlowProps['gap'];
40
+ };
41
+ export type ContainerFlowStyles = M4LOverridesStyleRules<ContainerFlowSlots, typeof CONTAINER_FLOW_KEY_COMPONENT, Theme>;
@@ -335,7 +335,6 @@ const dataGridStyles = {
335
335
  alignItems: "center",
336
336
  textOverflow: "inline",
337
337
  gridTemplateColumns: "auto",
338
- padding: "0 8px",
339
338
  ...getTypographyStyles(
340
339
  theme.generalSettings.isMobile,
341
340
  ownerState?.size || "medium",
@@ -401,11 +400,6 @@ const dataGridStyles = {
401
400
  },
402
401
  "& .m4l_icon": {
403
402
  height: "100%"
404
- },
405
- '&[role="columnheader"]': {
406
- '&[aria-colindex="1"]': {
407
- borderTopLeftRadius: theme.vars.size.baseSpacings.sp2
408
- }
409
403
  }
410
404
  },
411
405
  '& .rdg-cell[role="columnheader"] .rdg-header-sort-name': {
@@ -582,7 +576,6 @@ const dataGridStyles = {
582
576
  alignItems: "center",
583
577
  backgroundColor: theme.vars.palette.default.enabled,
584
578
  padding: theme.vars.size.baseSpacings.sp1,
585
- marginBottom: theme.vars.size.baseSpacings.sp2,
586
579
  gap: theme.vars.size.baseSpacings.sp1,
587
580
  borderRadius: theme.vars.size.borderRadius.r1,
588
581
  ...getSizeStyles(theme, ownerState?.size || "medium", "action", (size) => ({
@@ -671,24 +664,11 @@ const dataGridStyles = {
671
664
  /**
672
665
  * Estilos para el contenedor del boton de acciones del header
673
666
  */
674
- buttonHeaderActions: ({ theme }) => ({
667
+ buttonHeaderActions: () => ({
675
668
  display: "flex",
676
669
  alignItems: "center",
677
670
  justifyContent: "space-between",
678
- width: "100%",
679
- cursor: "pointer",
680
- height: "100%",
681
- "> span": {
682
- display: "flex",
683
- alignItems: "center",
684
- justifyContent: "space-between",
685
- width: "100%",
686
- "& svg": {
687
- width: "8px",
688
- height: "8px",
689
- color: theme.vars.palette.chips.default.contained.backgroundColorTone
690
- }
691
- }
671
+ width: "100%"
692
672
  }),
693
673
  /**
694
674
  * Estilos para el formatter de iconos
@@ -1,6 +1,5 @@
1
1
  import { ColumnBooleanFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Función para formatear un booleano en una columna de un DataGrid
5
4
  */
6
- export declare function ColumnBooleanFormatter<TRow>(props: ColumnBooleanFormatterProps<TRow>): (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare function ColumnBooleanFormatter<TRow>(props: ColumnBooleanFormatterProps<TRow>): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
3
  import React from "react";
4
+ import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
4
5
  import { B as BooleanFormatter } from "../../../formatters/BooleanFormatter/BooleanFormatter.js";
5
6
  function ColumnBooleanFormatter(props) {
6
7
  const { fieldValue, presentationType, Component = React.Fragment } = props;
7
- return (renderProps) => {
8
- const valueMaybeString = getPropertyByString(renderProps.row, fieldValue);
8
+ return (obProps) => {
9
+ const valueMaybeString = getPropertyByString(obProps, getFieldValueWithRow(fieldValue));
9
10
  let fixedValue;
10
11
  if (typeof valueMaybeString === "boolean") {
11
12
  fixedValue = valueMaybeString;
@@ -3,7 +3,7 @@ import { ColumnBooleanFormatterProps } from './types';
3
3
  * Hook function that return the formatter, filter and customSort for a boolean column
4
4
  */
5
5
  export declare const useColumnBoolean: <TRow>(props: ColumnBooleanFormatterProps<TRow>) => {
6
- formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
6
+ formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
7
7
  customFilter: (row: TRow, value: string) => boolean;
8
8
  customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
9
9
  };
@@ -1,8 +1,7 @@
1
1
  import { ColumnChipStatusFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Formatter para mostrar un chip de estado en una columna de un DataGrid
5
4
  * @param props - Propiedades del formatter
6
5
  * @returns Componente ChipStatusFormatter
7
6
  */
8
- export declare const ColumnChipStatusFormatter: <TRow>(props: ColumnChipStatusFormatterProps<TRow>) => (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const ColumnChipStatusFormatter: (props: ColumnChipStatusFormatterProps<any>) => (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,14 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
+ import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
3
4
  import { C as ChipStatusFormatterColumnWrapperStyled } from "../../../formatters/ChipStatusFormatter/slots/ChipStatusFormatterSlots.js";
4
5
  import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
5
6
  import { C as ChipStatusFormatter } from "../../../formatters/ChipStatusFormatter/ChipStatusFormatter.js";
6
7
  const ColumnChipStatusFormatter = (props) => {
7
8
  const { fieldStatus, fieldLabel, statusesColors, fallbackColor } = props;
8
- return (renderProps) => {
9
- const cleanFieldStatus = fieldStatus.toString().startsWith("row.") ? fieldStatus.toString().substring(4) : fieldStatus.toString();
10
- const cleanFieldLabel = typeof fieldLabel === "string" && fieldLabel.startsWith("row.") ? fieldLabel.substring(4) : fieldLabel;
11
- const status = getNullGuard(getPropertyByString(renderProps.row, cleanFieldStatus));
12
- const label = typeof cleanFieldLabel === "string" ? getNullGuard(getPropertyByString(renderProps.row, cleanFieldLabel)) : typeof fieldLabel === "function" ? fieldLabel(renderProps.row, status) : "";
9
+ return (obProps) => {
10
+ const status = getNullGuard(getPropertyByString(obProps, getFieldValueWithRow(fieldStatus.toString())));
11
+ const label = typeof fieldLabel === "string" ? getNullGuard(getPropertyByString(obProps, getFieldValueWithRow(fieldLabel))) : fieldLabel(obProps.row, status);
13
12
  return /* @__PURE__ */ jsx(
14
13
  ChipStatusFormatter,
15
14
  {
@@ -3,7 +3,7 @@ import { ColumnChipStatusFormatterProps } from './types';
3
3
  * Funcion helper que retorna el formatter, filter y customSort de la columna concatenada.
4
4
  */
5
5
  export declare const useColumnChipStatus: <TRow>(props: ColumnChipStatusFormatterProps<TRow>) => {
6
- formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
6
+ formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
7
7
  customFilter: (row: TRow, value: string | number) => boolean;
8
8
  customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
9
9
  };
@@ -1,6 +1,5 @@
1
1
  import { ColumnConcatenatedValuesFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Function to DataGrid that concatenates an array of strings
5
4
  */
6
- export declare function ColumnConcatenatedValuesFormatter<TRow>(props: ColumnConcatenatedValuesFormatterProps<TRow>): (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare function ColumnConcatenatedValuesFormatter<TRow>(props: ColumnConcatenatedValuesFormatterProps<TRow>): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
3
  import React from "react";
4
+ import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
4
5
  import { C as ConcatenatedFormatter } from "../../../formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
5
6
  function ColumnConcatenatedValuesFormatter(props) {
6
7
  const { fieldValue, fieldSeparator, Component = React.Fragment } = props;
7
- return (renderProps) => {
8
- const rowData = renderProps.row;
8
+ return (obProps) => {
9
9
  const values = fieldValue.map((element) => {
10
- const valueMaybeString = getPropertyByString(rowData, element);
10
+ const valueMaybeString = getPropertyByString(obProps, getFieldValueWithRow(element));
11
11
  let fixedValue;
12
12
  if (typeof valueMaybeString === "string" || typeof valueMaybeString === "number") {
13
13
  fixedValue = valueMaybeString.toString();
@@ -16,14 +16,7 @@ function ColumnConcatenatedValuesFormatter(props) {
16
16
  }
17
17
  return fixedValue;
18
18
  });
19
- return /* @__PURE__ */ jsx(
20
- ConcatenatedFormatter,
21
- {
22
- values,
23
- separator: fieldSeparator,
24
- Component
25
- }
26
- );
19
+ return /* @__PURE__ */ jsx(ConcatenatedFormatter, { values, separator: fieldSeparator, Component });
27
20
  };
28
21
  }
29
22
  export {
@@ -3,7 +3,7 @@ import { ColumnConcatenatedValuesFormatterProps } from './types';
3
3
  * Funcion helper que retorna el formatter, filter y customSort de la columna concatenada.
4
4
  */
5
5
  export declare const useColumnConcatenatedValues: <TRow>(props: ColumnConcatenatedValuesFormatterProps<TRow>) => {
6
- formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
6
+ formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
7
7
  customFilter: (row: TRow, value: string) => boolean;
8
8
  customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
9
9
  };
@@ -1,6 +1,5 @@
1
1
  import { ColumnDateFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Function to format a date in a column of a DataGrid
5
4
  */
6
- export declare function ColumnDateFormatter<TRow>(props: ColumnDateFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare function ColumnDateFormatter<TRow>(props: ColumnDateFormatterProps<TRow>): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,28 +1,19 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
3
  import React from "react";
4
+ import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
4
5
  import { D as DateFormatter } from "../../../formatters/DateFormatter/DateFormatter.js";
5
6
  function ColumnDateFormatter(props) {
6
7
  const { fieldValue, presentationType, Component = React.Fragment } = props;
7
- return (formatterProps) => {
8
- const valueMaybeDateStringNumber = getPropertyByString(
9
- formatterProps.row,
10
- fieldValue
11
- );
8
+ return (obProps) => {
9
+ const valueMaybeDateStringNumber = getPropertyByString(obProps, getFieldValueWithRow(fieldValue));
12
10
  let fixedValue;
13
11
  if (typeof valueMaybeDateStringNumber === "string" || typeof valueMaybeDateStringNumber === "number" || valueMaybeDateStringNumber instanceof Date) {
14
12
  fixedValue = valueMaybeDateStringNumber;
15
13
  } else {
16
14
  fixedValue = "";
17
15
  }
18
- return /* @__PURE__ */ jsx(
19
- DateFormatter,
20
- {
21
- presentationType,
22
- value: fixedValue,
23
- Component
24
- }
25
- );
16
+ return /* @__PURE__ */ jsx(DateFormatter, { presentationType, value: fixedValue, Component });
26
17
  };
27
18
  }
28
19
  export {
@@ -8,7 +8,7 @@ export declare const useCustomDateFilter: <TRow>(props: ColumnDateFormatterProps
8
8
  * customFilter and customSort of a date column
9
9
  */
10
10
  export declare const useColumnDate: <TRow>(props: ColumnDateFormatterProps<TRow>) => {
11
- formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
11
+ formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
12
12
  customFilter: (row: TRow, value: string) => boolean;
13
13
  customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
14
14
  };
@@ -1,7 +1,6 @@
1
1
  import { ColumnIconFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Function to format an icon in a column of a DataGrid
5
4
  * @template TRow - Tipo de datos de la fila
6
5
  */
7
- export declare function ColumnIconFormatter<TRow>(props: ColumnIconFormatterProps<TRow>): (renderProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
6
+ export declare function ColumnIconFormatter<TRow>(props: ColumnIconFormatterProps<TRow>): (rowData: TRow) => JSX.Element;
@@ -2,8 +2,8 @@ import { r as renderMultipleIcons } from "./helpers/renderMultipleIcons.js";
2
2
  import { r as renderIcon } from "./helpers/renderIcon.js";
3
3
  function ColumnIconFormatter(props) {
4
4
  const { getIconProps } = props;
5
- return (renderProps) => {
6
- const iconProps = getIconProps(renderProps.row);
5
+ return (rowData) => {
6
+ const iconProps = getIconProps(rowData);
7
7
  if (Array.isArray(iconProps)) {
8
8
  return renderMultipleIcons(iconProps);
9
9
  }
@@ -4,5 +4,5 @@ import { ColumnIconFormatterProps } from './types';
4
4
  * el formatter de la columna
5
5
  */
6
6
  export declare const useColumnIcon: <TRow>(props: ColumnIconFormatterProps<TRow>) => {
7
- formatter: (renderProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
7
+ formatter: (rowData: TRow) => JSX.Element;
8
8
  };
@@ -1,2 +1,2 @@
1
- import { RenderCellProps } from 'react-data-grid';
2
- export type ColumnInteractiveCheckFormatterProps<Row> = RenderCellProps<Row>;
1
+ import { FormatterProps as RDGFormatterProps } from 'react-data-grid';
2
+ export type ColumnInteractiveCheckFormatterProps<Row> = RDGFormatterProps<Row>;
@@ -1,6 +1,5 @@
1
1
  import { ColumnNestedValueFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Function to format a nested value in a column of a DataGrid
5
4
  */
6
- export declare function ColumnNestedValueFormatter<TRow>(props: ColumnNestedValueFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare function ColumnNestedValueFormatter<TRow>(props: ColumnNestedValueFormatterProps<TRow>): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
3
  import React from "react";
4
+ import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
4
5
  import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
5
6
  function ColumnNestedValueFormatter(props) {
6
7
  const { fieldValue, Component = React.Fragment } = props;
7
- return (formatterProps) => {
8
- const property = getNullGuard(
9
- getPropertyByString(formatterProps.row, fieldValue)
10
- );
8
+ return (obProps) => {
9
+ const property = getNullGuard(getPropertyByString(obProps, getFieldValueWithRow(fieldValue)));
11
10
  const value = typeof property === "object" ? JSON.stringify(property) : property;
12
11
  return /* @__PURE__ */ jsx(Component, { children: value });
13
12
  };
@@ -4,7 +4,7 @@ import { ColumnNestedValueFormatterProps } from './types';
4
4
  * of the column for ColumnNestedValueFormatter.
5
5
  */
6
6
  export declare const useColumnNestedValue: <TRow>(props: ColumnNestedValueFormatterProps<TRow>) => {
7
- formatter: (formatterProps: import('react-data-grid').RenderCellProps<TRow, unknown>) => import("react/jsx-runtime").JSX.Element;
7
+ formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
8
8
  customFilter: (row: TRow, value: string) => any;
9
9
  customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
10
10
  };
@@ -1,6 +1,5 @@
1
1
  import { ColumnPointsFormatterProps } from './types';
2
- import { RenderCellProps } from 'react-data-grid';
3
2
  /**
4
3
  * Formatter for column points in DataGrid
5
4
  */
6
- export declare function ColumnPointsFormatter<TRow>(props: ColumnPointsFormatterProps<TRow>): (formatterProps: RenderCellProps<TRow>) => import("react/jsx-runtime").JSX.Element;
5
+ export declare function ColumnPointsFormatter<TRow>(props: ColumnPointsFormatterProps<TRow>): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,13 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { P as PointsFormatter } from "../../../formatters/PointsFormatter/PointsFormatter.js";
4
+ import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
4
5
  function ColumnPointsFormatter(props) {
5
6
  const { Component = React.Fragment } = props;
6
- const fieldValue = props.fieldValue;
7
- const fieldUnit = props.fieldUnit;
8
- return (formatterProps) => {
9
- return /* @__PURE__ */ jsx(
10
- PointsFormatter,
11
- {
12
- obProps: formatterProps.row,
13
- ...props,
14
- fieldValue,
15
- fieldUnit,
16
- Component
17
- }
18
- );
7
+ const fieldValue = getFieldValueWithRow(props.fieldValue);
8
+ const fieldUnit = getFieldValueWithRow(props.fieldUnit);
9
+ return (obProps) => {
10
+ return /* @__PURE__ */ jsx(PointsFormatter, { obProps, ...props, fieldValue, fieldUnit, Component });
19
11
  };
20
12
  }
21
13
  export {