@m4l/components 9.1.119 → 9.1.121

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 (95) hide show
  1. package/.storybook/decorators/WithAppearanceContext/index.d.ts +0 -0
  2. package/.storybook/utils/getStylesColorsByMode.d.ts +4 -4
  3. package/components/Chip/Chip.js +8 -5
  4. package/components/Chip/ChipStyles.js +21 -18
  5. package/components/Chip/slots/ChipSlots.d.ts +5 -5
  6. package/components/Chip/types.d.ts +14 -7
  7. package/components/DataGrid/contexts/DataGridContext/index.js +3 -5
  8. package/components/DataGrid/contexts/DataGridContext/types.d.ts +1 -3
  9. package/components/DataGrid/contexts/FilterContext/index.d.ts +1 -1
  10. package/components/DataGrid/dictionary.d.ts +18 -0
  11. package/components/DataGrid/dictionary.js +19 -1
  12. package/components/DataGrid/formatters/ColumnBooleanFormatter/index.d.ts +1 -1
  13. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.js +1 -1
  14. package/components/DataGrid/formatters/ColumnDateFormatter/index.d.ts +1 -1
  15. package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +1 -1
  16. package/components/DataGrid/formatters/ColumnIconFormatter/index.js +1 -2
  17. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.js +1 -3
  18. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.d.ts +0 -3
  19. package/components/DataGrid/hooks/useDataGrid.d.ts +2 -1
  20. package/components/DataGrid/icons.d.ts +15 -0
  21. package/components/DataGrid/icons.js +18 -0
  22. package/components/DataGrid/index.d.ts +5 -1
  23. package/components/DataGrid/index.js +5 -10
  24. package/components/DataGrid/slots/DataGridEnum.d.ts +30 -0
  25. package/components/DataGrid/slots/DataGridEnum.js +44 -0
  26. package/components/DataGrid/slots/DataGridSlot.d.ts +48 -0
  27. package/components/DataGrid/slots/DataGridSlot.js +97 -0
  28. package/components/DataGrid/styles.d.ts +2 -1
  29. package/components/DataGrid/styles.js +479 -12
  30. package/components/DataGrid/subcomponents/Actions/index.d.ts +1 -1
  31. package/components/DataGrid/subcomponents/Actions/index.js +7 -7
  32. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +1 -1
  33. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.js +13 -12
  34. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.d.ts +1 -1
  35. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.js +5 -6
  36. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +1 -1
  37. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.js +14 -13
  38. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/index.js +7 -6
  39. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.d.ts +1 -1
  40. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.js +2 -4
  41. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +28 -27
  42. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +1 -2
  43. package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +11 -11
  44. package/components/DataGrid/subcomponents/Actions/types.d.ts +1 -1
  45. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +1 -1
  46. package/components/DataGrid/subcomponents/Table/index.d.ts +1 -1
  47. package/components/DataGrid/subcomponents/Table/index.js +5 -4
  48. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -2
  49. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +12 -43
  50. package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +2 -2
  51. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.d.ts +1 -1
  52. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.js +2 -4
  53. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +0 -1
  54. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +3 -28
  55. package/components/DataGrid/types.d.ts +6 -0
  56. package/components/Pager/subcomponents/CustomTablePagination/CustomTablePagination.js +10 -4
  57. package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.js +1 -1
  58. package/components/gclick/MyDevice/MyDevice.js +1 -1
  59. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +1 -1
  60. package/components/hook-form/RHFPeriod/subcomponents/Period/Period.js +0 -1
  61. package/components/hook-form/RHFSelect/RHFSelect.d.ts +1 -1
  62. package/components/hook-form/RHFSelect/RHFSelect.js +21 -3
  63. package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +1 -1
  64. package/components/hook-form/RHFSelect/types.d.ts +1 -1
  65. package/components/mui_extended/Select/Select.d.ts +1 -1
  66. package/components/mui_extended/Select/Select.js +195 -145
  67. package/components/mui_extended/Select/Select.styles.js +69 -81
  68. package/components/mui_extended/Select/constants.d.ts +1 -1
  69. package/components/mui_extended/Select/slots/SelectEnum.d.ts +1 -1
  70. package/components/mui_extended/Select/slots/SelectEnum.js +1 -1
  71. package/components/mui_extended/Select/slots/SelectSlots.d.ts +19 -11
  72. package/components/mui_extended/Select/slots/SelectSlots.js +7 -7
  73. package/components/mui_extended/Select/tests/Select.test.d.ts +1 -0
  74. package/components/mui_extended/Select/types.d.ts +26 -16
  75. package/mockServiceWorker.js +1 -1
  76. package/package.json +1 -1
  77. package/components/DataGrid/classes/constants.d.ts +0 -1
  78. package/components/DataGrid/classes/constants.js +0 -4
  79. package/components/DataGrid/classes/index.d.ts +0 -33
  80. package/components/DataGrid/classes/index.js +0 -71
  81. package/components/DataGrid/classes/types.d.ts +0 -30
  82. package/components/DataGrid/formatters/ColumnDateFormatter/styles.d.ts +0 -1
  83. package/components/DataGrid/subcomponents/Actions/styles.d.ts +0 -1
  84. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/types.d.ts +0 -2
  85. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/types.d.ts +0 -2
  86. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +0 -7
  87. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.js +0 -50
  88. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +0 -1
  89. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.js +0 -10
  90. package/storybook/components/Label/Label.stories.d.ts +0 -16
  91. package/storybook/components/formatters/CourseFormatter/CourseFormatter.stories.d.ts +0 -25
  92. package/storybook/components/formatters/CourseFormatter/constants.d.ts +0 -3
  93. package/storybook/components/formatters/CourseFormatter/types.d.ts +0 -3
  94. /package/components/DataGrid/subcomponents/Actions/subcomponents/{Settings/types.d.ts → types.d.ts} +0 -0
  95. /package/components/{mui_extended/Select/test/Select.test.d.ts → DataGrid/tests/DataGrid.test.d.ts} +0 -0
@@ -1,10 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useEnvironment } from "@m4l/core";
2
+ import { useModuleDictionary, useEnvironment } from "@m4l/core";
3
3
  import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
4
4
  import { u as useFilters } from "../../../../hooks/useFilters.js";
5
5
  import { u as useModalSettings } from "../hooks/useModalSettings/index.js";
6
+ import { p as pathIcons } from "../../../../icons.js";
6
7
  import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
7
8
  const MobileMenuActions = () => {
9
+ const { getLabel } = useModuleDictionary();
8
10
  const { host_static_assets, environment_assets } = useEnvironment();
9
11
  const { currentRowHeightVariant, setRowHeightVariant } = useDataGrid();
10
12
  const { activeFilters, setActiveFilters } = useFilters();
@@ -15,44 +17,43 @@ const MobileMenuActions = () => {
15
17
  const menuActions = [
16
18
  {
17
19
  type: "menuItem",
18
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`,
20
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.compact}`,
19
21
  onClick: () => setRowHeightVariant("compact"),
20
22
  disabled: currentRowHeightVariant === "compact",
21
- label: "data_grid.density_compact"
23
+ label: getLabel("data_grid.density_compact")
22
24
  },
23
25
  {
24
26
  type: "menuItem",
25
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/standard.svg`,
27
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.standard}`,
26
28
  onClick: () => setRowHeightVariant("standard"),
27
29
  disabled: currentRowHeightVariant === "standard",
28
- label: "data_grid.density_standard"
30
+ label: getLabel("data_grid.density_standard")
29
31
  },
30
32
  {
31
33
  type: "menuItem",
32
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/confortable.svg`,
34
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.confortable}`,
33
35
  onClick: () => setRowHeightVariant("confortable"),
34
36
  disabled: currentRowHeightVariant === "confortable",
35
- label: "data_grid.density_confortable"
37
+ label: getLabel("data_grid.density_confortable")
36
38
  },
37
39
  {
38
40
  type: "menuItem",
39
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/filter.svg`,
41
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.filter}`,
40
42
  onClick: () => toggleIcon(),
41
- label: activeFilters ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show"
43
+ label: activeFilters ? getLabel("data_grid.tooltip_filter_hide") : getLabel("data_grid.tooltip_filter_show")
42
44
  },
43
45
  {
44
46
  type: "menuItem",
45
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/configuration.svg`,
47
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.configuration}`,
46
48
  onClick: () => modalSettings(),
47
- label: "data_grid.tooltip_settings"
49
+ label: getLabel("data_grid.tooltip_settings")
48
50
  }
49
51
  ];
50
52
  return /* @__PURE__ */ jsx(
51
53
  MenuActions,
52
54
  {
53
- urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/menu.svg`,
55
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.menu}`,
54
56
  arrowType: "no-arrow",
55
- marginTop: "12px",
56
57
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
57
58
  transformOrigin: { vertical: "top", horizontal: "right" },
58
59
  menuActions
@@ -2,16 +2,17 @@ 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, b as RowsCountLabelStyled, c as RowsCountValueStyled } from "../../../../slots/DataGridSlot.js";
5
6
  function RowsCount() {
6
- const { rowsCount, classes } = useDataGrid();
7
+ const { rowsCount } = useDataGrid();
7
8
  const { getLabel } = useModuleDictionary();
8
9
  const isSkeleton = useModuleSkeleton();
9
- return /* @__PURE__ */ jsx("div", { className: classes.rowsCount, children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
10
- /* @__PURE__ */ jsx("div", { className: classes.rowsCountLabel, children: getLabel("data_grid.rows") }),
11
- /* @__PURE__ */ jsx("div", { className: classes.rowsCountValue, children: rowsCount })
10
+ return /* @__PURE__ */ jsx(RowsCountRootStyled, { children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
11
+ /* @__PURE__ */ jsx(RowsCountLabelStyled, { children: getLabel("data_grid.rows") }),
12
+ /* @__PURE__ */ jsx(RowsCountValueStyled, { children: rowsCount })
12
13
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
13
- /* @__PURE__ */ jsx("div", { className: classes.rowsCountLabel, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "40px", height: "16px" }) }),
14
- /* @__PURE__ */ jsx("div", { className: classes.rowsCountValue, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "20px", height: "16px" }) })
14
+ /* @__PURE__ */ jsx(RowsCountLabelStyled, { children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "40px", height: "16px" }) }),
15
+ /* @__PURE__ */ jsx(RowsCountValueStyled, { children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "20px", height: "16px" }) })
15
16
  ] }) });
16
17
  }
17
18
  export {
@@ -1,4 +1,4 @@
1
1
  /**
2
- * TODO: Documentar
2
+ * Componente que renderiza el icono de configuración en el DataGrid
3
3
  */
4
4
  export declare function Settings(): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,18 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { I as IconButton } from "../../../../../mui_extended/IconButton/IconButton.js";
3
- import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
4
3
  import { useEnvironment } from "@m4l/core";
5
4
  import { u as useModalSettings } from "../hooks/useModalSettings/index.js";
5
+ import { p as pathIcons } from "../../../../icons.js";
6
6
  function Settings() {
7
7
  const { host_static_assets, environment_assets } = useEnvironment();
8
- const { classes } = useDataGrid();
9
8
  const modalSettings = useModalSettings();
10
9
  return /* @__PURE__ */ jsx(
11
10
  IconButton,
12
11
  {
13
- className: classes.actionSettings,
14
12
  dictionaryTooltipId: "data_grid.tooltip_settings",
15
13
  onClick: modalSettings,
16
14
  "aria-label": "settings",
17
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/configuration.svg`
15
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.configuration}`
18
16
  }
19
17
  );
20
18
  }
@@ -3,7 +3,9 @@ import { forwardRef, useRef, useState, useImperativeHandle, useMemo, useEffect }
3
3
  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
- import { W as WrapperColumnsConfig, D as DivSelColumns, a as WrapperDataGrid, C as ColumnActions } from "./styles.js";
6
+ import { p as pathIcons } from "../../../../../../icons.js";
7
+ import { C as ColumnsConfigWrapperStyled, d as ColumnsConfigSelColumnsStyled, e as ColumnsConfigDataGridStyled, T as TableWrapperDataGridStyled, f as ColumnsConfigActiosStyled } from "../../../../../../slots/DataGridSlot.js";
8
+ import { d as dictionary } from "../../../../../../dictionary.js";
7
9
  import { C as ColumnInteractiveCheckFormatter } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/index.js";
8
10
  function getRowsFromColumnsConfig(columnsConfig) {
9
11
  return columnsConfig.filter((column) => !column.hidden).map(
@@ -20,7 +22,7 @@ function getRowsFromColumnsConfig(columnsConfig) {
20
22
  }
21
23
  const ColumnsConfig = forwardRef((props, ref) => {
22
24
  const refdata_grid = useRef(null);
23
- const { onCloseSettings, columnsConfig, onChangeColumnsConfig, classes } = props;
25
+ const { onCloseSettings, columnsConfig, onChangeColumnsConfig, rowHeight } = props;
24
26
  const { getLabel } = useModuleDictionary();
25
27
  const [isInit, setIsInit] = useState(true);
26
28
  const [rows, setRows] = useState(getRowsFromColumnsConfig(columnsConfig));
@@ -35,21 +37,21 @@ const ColumnsConfig = forwardRef((props, ref) => {
35
37
  () => [
36
38
  {
37
39
  key: "name",
38
- name: getLabel("data_grid.settings_column_name"),
39
- width: 200,
40
+ name: getLabel(dictionary.SETTINGS_COLUMN_NAME),
41
+ width: 220,
40
42
  resizable: true,
41
43
  type: "string"
42
44
  },
43
45
  {
44
46
  key: "originalIndex",
45
- name: getLabel("data_grid.settings_column_position"),
47
+ name: getLabel(dictionary.SETTINGS_COLUMN_POSITION),
46
48
  width: 50,
47
49
  type: "number",
48
50
  cellClass: "rdg-cell-align-center"
49
51
  },
50
52
  {
51
53
  key: "visible",
52
- name: getLabel("data_grid.settings_column_visible"),
54
+ name: getLabel(dictionary.SETTINGS_COLUMN_VISIBLE),
53
55
  width: 80,
54
56
  type: "boolean",
55
57
  formatter: ColumnInteractiveCheckFormatter,
@@ -57,7 +59,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
57
59
  },
58
60
  {
59
61
  key: "frozen",
60
- name: getLabel("data_grid.settings_column_frozen"),
62
+ name: getLabel(dictionary.SETTINGS_COLUMNS_FROZEN),
61
63
  width: 80,
62
64
  type: "boolean",
63
65
  formatter: ColumnInteractiveCheckFormatter,
@@ -135,7 +137,6 @@ const ColumnsConfig = forwardRef((props, ref) => {
135
137
  return {
136
138
  visible: rows[rowIndexFinded].visible,
137
139
  frozen: rows[rowIndexFinded].frozen
138
- // index: rowIndexFinded,
139
140
  };
140
141
  }
141
142
  return void 0;
@@ -174,13 +175,13 @@ const ColumnsConfig = forwardRef((props, ref) => {
174
175
  const mySet = /* @__PURE__ */ new Set([row.key]);
175
176
  setSelRows(mySet);
176
177
  };
177
- return /* @__PURE__ */ jsxs(WrapperColumnsConfig, { ref: divRef, className: classes.columnsConfigContainer, children: [
178
- /* @__PURE__ */ jsx(DivSelColumns, { className: classes.columnsLabelSetColumns, children: getLabel("data_grid.settings_sel_columns") }),
179
- /* @__PURE__ */ jsx(WrapperDataGrid, { className: classes.columnsConfigContent, children: /* @__PURE__ */ jsx("div", { className: classes.wrapperDataGridCss, children: /* @__PURE__ */ jsx(
178
+ return /* @__PURE__ */ jsxs(ColumnsConfigWrapperStyled, { ref: divRef, children: [
179
+ /* @__PURE__ */ jsx(ColumnsConfigSelColumnsStyled, { children: getLabel(dictionary.SETTINGS_SEL_COLUMNS) }),
180
+ /* @__PURE__ */ jsx(ColumnsConfigDataGridStyled, { children: /* @__PURE__ */ jsx(TableWrapperDataGridStyled, { children: /* @__PURE__ */ jsx(
180
181
  DataGrid,
181
182
  {
182
- className: classes.columnsConfigGrid,
183
183
  ref: refdata_grid,
184
+ rowHeight,
184
185
  columns: columnsdata_grid,
185
186
  rows,
186
187
  onRowsChange: onInternalRowsChange,
@@ -192,73 +193,73 @@ const ColumnsConfig = forwardRef((props, ref) => {
192
193
  defaultColumnOptions: { resizable: true, sortable: true }
193
194
  }
194
195
  ) }) }),
195
- /* @__PURE__ */ jsxs(ColumnActions, { className: classes.columnsConfigActions, children: [
196
+ /* @__PURE__ */ jsxs(ColumnsConfigActiosStyled, { children: [
196
197
  /* @__PURE__ */ jsx(
197
198
  IconButton,
198
199
  {
199
- tooltip: getLabel("data_grid.settings_move_first"),
200
+ tooltip: getLabel(dictionary.SETTINGS_MOVE_FIRST),
200
201
  onClick: handleMoveFirst,
201
202
  "aria-label": "move first place",
202
203
  disabled: rowSelectedIndex < 1,
203
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/move_first_place.svg`
204
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.moveFirstPlace}`
204
205
  }
205
206
  ),
206
207
  /* @__PURE__ */ jsx(
207
208
  IconButton,
208
209
  {
209
- tooltip: getLabel("data_grid.settings_move_up"),
210
+ tooltip: getLabel(dictionary.SETTINGS_MOVE_UP),
210
211
  dictionaryTooltipId: "data_grid.settings_move_up",
211
212
  onClick: () => handleMoveUpDownd(-1),
212
213
  "aria-label": "move up place",
213
214
  disabled: rowSelectedIndex < 1,
214
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/move_up_place.svg`
215
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.moveUpPlace}`
215
216
  }
216
217
  ),
217
218
  /* @__PURE__ */ jsx(
218
219
  IconButton,
219
220
  {
220
- tooltip: getLabel("data_grid.settings_move_last"),
221
+ tooltip: getLabel(dictionary.SETTINGS_MOVE_LAST),
221
222
  onClick: handleMoveLast,
222
223
  "aria-label": "move last place",
223
224
  disabled: !!(rowSelectedIndex === rows.length - 1 || rowSelectedIndex === -1),
224
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/move_last_place.svg`
225
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.moveLastPlace}`
225
226
  }
226
227
  ),
227
228
  /* @__PURE__ */ jsx(
228
229
  IconButton,
229
230
  {
230
- tooltip: getLabel("data_grid.settings_move_down"),
231
+ tooltip: getLabel(dictionary.SETTINGS_MOVE_DOWN),
231
232
  onClick: () => handleMoveUpDownd(1),
232
233
  "aria-label": "move down place",
233
234
  disabled: !!(rowSelectedIndex === rows.length - 1 || rowSelectedIndex === -1),
234
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/move_down_place.svg`
235
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.moveDownPlace}`
235
236
  }
236
237
  ),
237
238
  /* @__PURE__ */ jsx(
238
239
  IconButton,
239
240
  {
240
- tooltip: getLabel("data_grid.settings_visible_all"),
241
+ tooltip: getLabel(dictionary.SETTINGS_VISIBLE_ALL),
241
242
  onClick: checkAll,
242
243
  "aria-label": "check visible all",
243
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/check_all.svg`
244
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.checkAll}`
244
245
  }
245
246
  ),
246
247
  /* @__PURE__ */ jsx(
247
248
  IconButton,
248
249
  {
249
- tooltip: getLabel("data_grid.settings_no_visible_all"),
250
+ tooltip: getLabel(dictionary.SETTINGS_NO_VISIBLE_ALL),
250
251
  onClick: unCheckAll,
251
252
  "aria-label": "un check all",
252
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/uncheck_all.svg`
253
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.uncheckAll}`
253
254
  }
254
255
  ),
255
256
  /* @__PURE__ */ jsx(
256
257
  IconButton,
257
258
  {
258
- tooltip: getLabel("data_grid.settings_restore"),
259
+ tooltip: getLabel(dictionary.SETTINGS_RESTORE),
259
260
  onClick: restoreAll,
260
261
  "aria-label": "Restore columns",
261
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/restore_columns.svg`
262
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.restoreColumns}`
262
263
  }
263
264
  )
264
265
  ] })
@@ -1,4 +1,3 @@
1
- import { Classes } from '../../../../../../classes/types';
2
1
  import { IConfigColumn } from '../../../../../../contexts/DataGridContext/types';
3
2
  export interface Row {
4
3
  key: string;
@@ -19,7 +18,7 @@ export interface ConfigProps {
19
18
  onCloseSettings: () => void;
20
19
  columnsConfig: IConfigColumn[];
21
20
  onChangeColumnsConfig: (newColumnsConfig: IConfigColumn[]) => void;
22
- classes: Classes;
21
+ rowHeight: number;
23
22
  }
24
23
  export interface CheckFormatterProps {
25
24
  key: string;
@@ -1,22 +1,22 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useModuleDictionary, useEnvironment } from "@m4l/core";
3
3
  import { useIsMobile } from "@m4l/graphics";
4
4
  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
- import { D as DataGridRoot } from "../../../../../styles.js";
8
7
  import { C as ColumnsConfig } from "../../Settings/subcomponents/ColumnsConfig/index.js";
8
+ import { g as ContentModalSettingStyled, D as DataGridRootStyled, h as TableContainerStyled, T as TableWrapperDataGridStyled } from "../../../../../slots/DataGridSlot.js";
9
+ import { p as pathIcons } from "../../../../../icons.js";
9
10
  import { A as ActionsContainer } from "../../../../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
10
11
  import { W as WindowBase } from "../../../../../../WindowBase/WindowBase.js";
11
12
  import { A as ActionCancel } from "../../../../../../CommonActions/components/ActionCancel/ActionCancel.js";
12
13
  import { A as ActionIntro } from "../../../../../../CommonActions/components/ActionIntro/ActionIntro.js";
13
14
  const useModalSettings = () => {
14
15
  const { openModal, closeModal } = useModal();
15
- const { columnsConfig, onChangeColumnsConfig } = useDataGrid();
16
+ const { columnsConfig, onChangeColumnsConfig, currentRowHeight } = useDataGrid();
16
17
  const { getLabel } = useModuleDictionary();
17
18
  const { host_static_assets, environment_assets } = useEnvironment();
18
19
  const isMobile = useIsMobile();
19
- const { classes } = useDataGrid();
20
20
  const ref = useRef(null);
21
21
  const onCloseSettings = useCallback(() => {
22
22
  closeModal();
@@ -31,27 +31,27 @@ const useModalSettings = () => {
31
31
  initialWidth: 500,
32
32
  initialHeight: 680,
33
33
  fullScreen: isMobile,
34
- window: /* @__PURE__ */ jsxs(
34
+ window: /* @__PURE__ */ jsx(
35
35
  WindowBase,
36
36
  {
37
37
  title: getLabel("data_grid.settings_title"),
38
- iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/configuration.svg`,
39
- children: [
40
- /* @__PURE__ */ jsx(DataGridRoot, { className: classes.root, children: /* @__PURE__ */ jsx("div", { className: classes.tableContaniner, style: { inset: "0" }, children: /* @__PURE__ */ jsx("div", { className: classes.wrapperDataGridCss, children: /* @__PURE__ */ jsx(
38
+ iconUrl: `${host_static_assets}/${environment_assets}/${pathIcons.configuration}`,
39
+ children: /* @__PURE__ */ jsxs(ContentModalSettingStyled, { children: [
40
+ /* @__PURE__ */ jsx(DataGridRootStyled, { children: /* @__PURE__ */ jsx(TableContainerStyled, { children: /* @__PURE__ */ jsx(TableWrapperDataGridStyled, { children: /* @__PURE__ */ jsx(
41
41
  ColumnsConfig,
42
42
  {
43
43
  ref,
44
+ rowHeight: currentRowHeight,
44
45
  columnsConfig,
45
46
  onChangeColumnsConfig,
46
- onCloseSettings,
47
- classes
47
+ onCloseSettings
48
48
  }
49
49
  ) }) }) }),
50
50
  /* @__PURE__ */ jsxs(ActionsContainer, { children: [
51
51
  /* @__PURE__ */ jsx(ActionCancel, { onClick: closeModal }),
52
52
  /* @__PURE__ */ jsx(ActionIntro, { onClick: onClickIntro })
53
53
  ] })
54
- ]
54
+ ] })
55
55
  }
56
56
  )
57
57
  });
@@ -1,5 +1,5 @@
1
1
  import { PagerProps } from '../../../Pager/types';
2
- import { SettingsProps } from './subcomponents/Settings/types';
2
+ import { SettingsProps } from './subcomponents/types';
3
3
  export interface ActionsProps {
4
4
  withSettings?: boolean;
5
5
  settingsProps?: SettingsProps;
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect, useMemo } from "react";
2
2
  import { g as getDragHeaderRenderer } from "./getDragHeaderRenderer.js";
3
3
  import { A as ActionsColumn } from "../subcomponents/ActionsColumn.js";
4
- import { f as filterColumnClassName, S as SelectColumn } from "../subcomponents/SelectColumn.js";
4
+ import { a as filterColumnClassName, S as SelectColumn } from "../subcomponents/SelectColumn.js";
5
5
  import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
6
6
  import { u as useFilters } from "../../../hooks/useFilters.js";
7
7
  import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
@@ -1,5 +1,5 @@
1
1
  import { GridProps, RowKey } from '../../types';
2
2
  /**
3
- * TODO: Documentar
3
+ * Componente que renderiza la tabla con las filas y columnas
4
4
  */
5
5
  export declare function Table<TRow, TSummaryRow, TKey extends RowKey = RowKey>(props: GridProps<TRow, TSummaryRow, TKey>): import("react/jsx-runtime").JSX.Element;
@@ -4,10 +4,11 @@ import DataGrid from "react-data-grid";
4
4
  import { DndProvider } from "react-dnd";
5
5
  import { HTML5Backend } from "react-dnd-html5-backend";
6
6
  import { C as CheckboxFormatter } from "./subcomponents/CheckboxFormatter.js";
7
- import { a as filterHeight } from "./subcomponents/SelectColumn.js";
7
+ import { f 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 { h as TableContainerStyled, T as TableWrapperDataGridStyled } from "../../slots/DataGridSlot.js";
11
12
  function Table(props) {
12
13
  const { columns, rows, onRowsChange, rowKeyGetter, selectedRows, onSelectedRowsChange } = props;
13
14
  const { finalColumns, sortColumns, setSortColumns, finalRows } = useSortColumnsRows(
@@ -15,7 +16,7 @@ function Table(props) {
15
16
  rows
16
17
  );
17
18
  const { activeFilters } = useFilters();
18
- const { onChangeColumnWidth, setRowsCount, currentRowHeight, currentRowHeaderHeight, classes } = useDataGrid();
19
+ const { onChangeColumnWidth, setRowsCount, currentRowHeight, currentRowHeaderHeight } = useDataGrid();
19
20
  const ref_data_grid = useRef(null);
20
21
  const onRowClick = (row) => {
21
22
  if (selectedRows && onSelectedRowsChange) {
@@ -49,10 +50,10 @@ function Table(props) {
49
50
  const onChangeSort = (newSortColumns) => {
50
51
  setSortColumns(newSortColumns);
51
52
  };
52
- return /* @__PURE__ */ jsx("div", { className: classes.tableContaniner, id: "WrapperTable", children: /* @__PURE__ */ jsx("div", { className: classes.wrapperDataGridCss, children: /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsx(
53
+ return /* @__PURE__ */ jsx(TableContainerStyled, { id: "WrapperTable", children: /* @__PURE__ */ jsx(TableWrapperDataGridStyled, { children: /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsx(
53
54
  DataGrid,
54
55
  {
55
- className: "fill-grid rdg-light",
56
+ className: "rdg-light",
56
57
  ref: ref_data_grid,
57
58
  headerRowHeight: activeFilters ? currentRowHeaderHeight + filterHeight : currentRowHeaderHeight,
58
59
  columns: finalColumns,
@@ -4,7 +4,7 @@ import { useTheme } from "@mui/material";
4
4
  import { b as DATAGRID_ACTIONS_COLUMN_KEY } from "../../../constants.js";
5
5
  import { M as MenuActions } from "../../../../MenuActions/MenuActions.js";
6
6
  function ActionsFormatter(props) {
7
- const { rowActionsGetter, classes } = useDataGrid();
7
+ const { rowActionsGetter } = useDataGrid();
8
8
  const theme = useTheme();
9
9
  if (rowActionsGetter === void 0) {
10
10
  return /* @__PURE__ */ jsx(Fragment, {});
@@ -15,7 +15,6 @@ function ActionsFormatter(props) {
15
15
  arrowType: "top-left",
16
16
  objItem: props.row,
17
17
  menuActions: rowActionsGetter,
18
- className: classes.actionsFormatter,
19
18
  menuActionSx: theme.components?.M4LDataGridActionsFormatter?.styleOverrides,
20
19
  marginTop: 1,
21
20
  marginLeft: "-11px",
@@ -1,12 +1,11 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { useModuleDictionary } from "@m4l/core";
4
- import { InputBase } from "@mui/material";
5
4
  import { useDrag, useDrop } from "react-dnd";
6
5
  import { HeaderRenderer } from "react-data-grid";
7
- import { a as filterHeight } from "./SelectColumn.js";
8
6
  import { u as useFocusRef } from "../hooks/useFocusRef.js";
9
7
  import { u as useFilters } from "../../../hooks/useFilters.js";
8
+ import { i as DraggableHeaderRootStyled, j as DraggableWrapperInputBaseStyled, H as HeaderInputBaseStyled } from "../../../slots/DataGridSlot.js";
10
9
  function DraggableHeaderRenderer(props) {
11
10
  const { onColumnsReorder, column, isCellSelected, ...others } = props;
12
11
  const { ref, tabIndex } = useFocusRef(isCellSelected);
@@ -51,7 +50,7 @@ function DraggableHeaderRenderer(props) {
51
50
  newColumn.name = newColumn.withinHeaderRenderer(props);
52
51
  }
53
52
  return /* @__PURE__ */ jsxs(
54
- "div",
53
+ DraggableHeaderRootStyled,
55
54
  {
56
55
  ref: (newRef) => {
57
56
  drag(newRef);
@@ -59,51 +58,21 @@ function DraggableHeaderRenderer(props) {
59
58
  },
60
59
  style: {
61
60
  opacity: isDragging ? 0.5 : 1,
62
- backgroundColor: isOver ? "#ececec" : void 0,
63
- cursor: "move",
64
- display: "flex",
65
- flexDirection: "column",
66
- lineHeight: "1",
67
- // activeFilters && column.withFilter ? '30px' : '60px',
68
- height: "100%",
69
- justifyContent: "center",
70
- textAlign: "center"
71
- // alignItems: 'center',
72
- // justifyContent: 'space-evenly'
61
+ backgroundColor: isOver ? "#ececec" : void 0
73
62
  },
74
63
  children: [
75
64
  /* @__PURE__ */ jsx(HeaderRenderer, { column: newColumn, isCellSelected, ...others }),
76
- activeFilters && (column?.withFilter === void 0 || column.withFilter === true) && /* @__PURE__ */ jsx(
77
- "div",
65
+ activeFilters && (column?.withFilter === void 0 || column.withFilter === true) && /* @__PURE__ */ jsx(DraggableWrapperInputBaseStyled, { children: /* @__PURE__ */ jsx(
66
+ HeaderInputBaseStyled,
78
67
  {
79
- className: "filter_cell_div",
80
- style: {
81
- borderTop: "1px solid var(--rdg-border-color)",
82
- width: "100%",
83
- display: "flex",
84
- alignItems: "center",
85
- // flexGrow: 1,
86
- height: `${filterHeight}px`
87
- // paddingLeft: '2px', paddingRight: '2px'
88
- },
89
- children: /* @__PURE__ */ jsx(
90
- InputBase,
91
- {
92
- inputRef: ref,
93
- placeholder: getLabel("data_grid.filter_holder"),
94
- style: {
95
- width: "100%",
96
- paddingBottom: "2px",
97
- border: "1px solid var(--rdg-border-color)"
98
- },
99
- tabIndex,
100
- type: "text",
101
- onChange: handleChange,
102
- value: filter
103
- }
104
- )
68
+ inputRef: ref,
69
+ placeholder: getLabel("data_grid.filter_holder"),
70
+ tabIndex,
71
+ type: "text",
72
+ onChange: handleChange,
73
+ value: filter
105
74
  }
106
- )
75
+ ) })
107
76
  ]
108
77
  }
109
78
  );
@@ -74,6 +74,6 @@ const SelectColumn = {
74
74
  };
75
75
  export {
76
76
  SelectColumn as S,
77
- filterHeight as a,
78
- filterColumnClassName as f
77
+ filterColumnClassName as a,
78
+ filterHeight as f
79
79
  };
@@ -1,4 +1,4 @@
1
1
  /**
2
- * TODO: Documentar
2
+ * Componente que renderiza el skeleton de los formatters
3
3
  */
4
4
  export declare function SkeletonFormatter(): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Skeleton } from "@mui/material";
3
- import { W as WrapperSkeleton } from "./styles.js";
4
- import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
3
+ import { W as WrapperSkeletonStyled } from "../../../../slots/DataGridSlot.js";
5
4
  function SkeletonFormatter() {
6
- const { classes } = useDataGrid();
7
- return /* @__PURE__ */ jsx(WrapperSkeleton, { className: classes.skeletonFormatter, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "100%", height: "12px" }) });
5
+ return /* @__PURE__ */ jsx(WrapperSkeletonStyled, { children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "100%", height: "12px" }) });
8
6
  }
9
7
  export {
10
8
  SkeletonFormatter as S
@@ -1,5 +1,4 @@
1
1
  import { EditorProps } from 'react-data-grid';
2
- export declare const Input: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
3
2
  /**
4
3
  * TODO: Documentar
5
4
  */
@@ -1,28 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { styled } from "@mui/material";
3
- const Input = styled("input")(() => ({
4
- appearance: "none",
5
- boxSizing: "border-box",
6
- inlineSize: "100%",
7
- blockSize: "100%",
8
- paddingBlock: "0",
9
- /* padding-inline: 6px; */
10
- /* border: 2px solid #ccc; */
11
- verticalAlign: "top",
12
- textAlign: "right",
13
- color: "var(--rdg-color)",
14
- backgroundColor: "var(--rdg-background-color)",
15
- fontFamily: "inherit",
16
- // fontSize: 'var(--rdg-font-size)',
17
- "&:focus": {
18
- // borderColor: 'var(--rdg-selection-color)',
19
- outline: "none"
20
- },
21
- "&::placeholder": {
22
- color: "#999",
23
- opacity: "1"
24
- }
25
- }));
2
+ import { I as InputTextEditorStyled } from "../../../slots/DataGridSlot.js";
26
3
  function autoFocusAndSelect(input) {
27
4
  input?.focus();
28
5
  input?.select();
@@ -34,9 +11,8 @@ function TextEditor({
34
11
  onClose
35
12
  }) {
36
13
  return /* @__PURE__ */ jsx(
37
- Input,
14
+ InputTextEditorStyled,
38
15
  {
39
- className: "rdg-text-editor",
40
16
  ref: autoFocusAndSelect,
41
17
  value: row[column.key],
42
18
  onChange: (event) => onRowChange({ ...row, [column.key]: event.target.value }),
@@ -59,9 +35,8 @@ function NumberEditor({
59
35
  }
60
36
  };
61
37
  return /* @__PURE__ */ jsx(
62
- Input,
38
+ InputTextEditorStyled,
63
39
  {
64
- className: "rdg-text-editor",
65
40
  ref: autoFocusAndSelect,
66
41
  type: "number",
67
42
  value: row[column.key],