@m4l/components 8.2.0-beta.devDaniel.MenuActionsBug → 8.2.0-beta.devDaniel.Tab

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 (76) hide show
  1. package/@types/export.d.ts +3 -3
  2. package/@types/types.d.ts +12 -1
  3. package/components/AccountPopover/classes/index.d.ts +1 -1
  4. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.js +3 -3
  5. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.js +10 -10
  6. package/components/SideBar/classes/index.d.ts +1 -1
  7. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.js +2 -2
  8. package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
  9. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.js +3 -3
  10. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/MainActions/index.js +3 -3
  11. package/components/extended/react-resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
  12. package/components/extended/react-resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
  13. package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.js +1 -1
  14. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  15. package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +2 -2
  16. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/index.js +1 -1
  17. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyTabs/index.js +1 -1
  18. package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.js +5 -5
  19. package/components/modal/classes/index.d.ts +2 -2
  20. package/components/mui_extended/MenuActions/MenuActions.d.ts +1 -8
  21. package/components/mui_extended/MenuActions/MenuActions.js +77 -55
  22. package/components/mui_extended/MenuActions/MenuActions.stories.d.ts +25 -0
  23. package/components/mui_extended/MenuActions/MenuActions.styles.d.ts +0 -4
  24. package/components/mui_extended/MenuActions/MenuActions.styles.js +38 -11
  25. package/components/mui_extended/MenuActions/constants.d.ts +0 -17
  26. package/components/mui_extended/MenuActions/constants.js +2 -6
  27. package/components/mui_extended/MenuActions/dictionary.d.ts +0 -15
  28. package/components/mui_extended/MenuActions/slots/MenuActionsEnum.d.ts +5 -8
  29. package/components/mui_extended/MenuActions/slots/MenuActionsEnum.js +4 -1
  30. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +16 -29
  31. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.js +33 -16
  32. package/components/mui_extended/MenuActions/types.d.ts +18 -80
  33. package/components/mui_extended/Pager/classes/index.d.ts +1 -1
  34. package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
  35. package/components/mui_extended/Tab/Slots/TabEnum.d.ts +9 -0
  36. package/components/mui_extended/Tab/Slots/TabEnum.js +9 -0
  37. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +26 -0
  38. package/components/mui_extended/Tab/Slots/TabSlots.js +24 -0
  39. package/components/mui_extended/Tab/Slots/index.d.ts +2 -0
  40. package/components/mui_extended/Tab/Tab.d.ts +5 -0
  41. package/components/mui_extended/Tab/Tab.js +67 -0
  42. package/components/mui_extended/Tab/Tab.styles.d.ts +5 -0
  43. package/components/mui_extended/Tab/Tab.styles.js +147 -0
  44. package/components/mui_extended/Tab/constants.d.ts +14 -0
  45. package/components/mui_extended/Tab/constants.js +10 -0
  46. package/components/mui_extended/Tab/index.d.ts +1 -5
  47. package/components/mui_extended/Tab/types.d.ts +53 -2
  48. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
  49. package/components/mui_extended/index.d.ts +1 -1
  50. package/index.js +1 -1
  51. package/package.json +1 -1
  52. package/storybook/components/extended/mui/Tab/stories/Tab.disable.stories.d.ts +36 -0
  53. package/storybook/components/extended/mui/Tab/stories/Tab.enable.stories.d.ts +36 -0
  54. package/storybook/components/extended/mui/Tab/stories/Tab.sizes.stories.d.ts +28 -0
  55. package/storybook/components/extended/mui/Tab/stories/Tab.skeleton.stories.d.ts +32 -0
  56. package/components/mui_extended/MenuActions/stories/MenuActions.default.stories.d.ts +0 -25
  57. package/components/mui_extended/MenuActions/stories/MenuActions.othersProps.stories.d.ts +0 -13
  58. package/components/mui_extended/MenuItem/MenuItem.js +0 -66
  59. package/components/mui_extended/MenuItem/MenuItem.styles.js +0 -111
  60. package/components/mui_extended/MenuItem/constants.js +0 -4
  61. package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +0 -9
  62. package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +0 -24
  63. package/components/mui_extended/MenuItem/types.js +0 -1
  64. package/components/mui_extended/Tab/classes/constants.d.ts +0 -1
  65. package/components/mui_extended/Tab/classes/constants.js +0 -4
  66. package/components/mui_extended/Tab/classes/index.d.ts +0 -10
  67. package/components/mui_extended/Tab/classes/index.js +0 -25
  68. package/components/mui_extended/Tab/classes/types.d.ts +0 -7
  69. package/components/mui_extended/Tab/constant.d.ts +0 -1
  70. package/components/mui_extended/Tab/constant.js +0 -4
  71. package/components/mui_extended/Tab/index.js +0 -40
  72. package/components/mui_extended/Tab/styles.d.ts +0 -2
  73. package/components/mui_extended/Tab/styles.js +0 -11
  74. package/components/mui_extended/Tab/tests/index.test.d.ts +0 -1
  75. package/components/mui_extended/Tab/tests/utils.d.ts +0 -2
  76. /package/components/mui_extended/{MenuItem → Tab/Slots}/index.js +0 -0
@@ -158,9 +158,6 @@ declare module '@mui/material/styles' {
158
158
  M4LAccordion?: {
159
159
  styleOverrides?: ComponentsOverrides<Theme>['M4LAccordion'];
160
160
  };
161
- M4LTab?: {
162
- styleOverrides?: ComponentsOverrides<Theme>['M4LTab'];
163
- };
164
161
  M4LRHFormProvider?: {
165
162
  styleOverrides?: ComponentsOverrides<Theme>['M4LRHFormProvider'];
166
163
  };
@@ -220,6 +217,9 @@ declare module '@mui/material/styles' {
220
217
  M4LTabContent?: {
221
218
  styleOverrides?: ComponentsOverrides<Theme>['M4LTabContent'];
222
219
  };
220
+ M4LMenuActions?: {
221
+ styleOverrides?: ComponentsOverrides<Theme>['M4LMenuActions'];
222
+ };
223
223
  M4LPrintingSystem?: {
224
224
  styleOverrides?: ComponentsOverrides<Theme>['M4LPrintingSystem'];
225
225
  };
package/@types/types.d.ts CHANGED
@@ -52,6 +52,8 @@ import type {
52
52
  } from '../components/mui_extended/MenuItem/types';
53
53
 
54
54
  import { SelectOwnerState, SelectSlotsType } from '../components/mui_extended/Select/types';
55
+ import { TabOwnerState, TabSlotsType } from '../components/mui_extended/Tab/types';
56
+
55
57
 
56
58
  declare module '@mui/material/styles' {
57
59
  // Define the slots in the theme
@@ -76,6 +78,8 @@ declare module '@mui/material/styles' {
76
78
  M4LSkeleton: SkeletonSlotsType;
77
79
  M4LSelect: SelectSlotsType;
78
80
  M4LTypography: TypographySlotsType;
81
+ M4LTab: TabSlotsType;
82
+
79
83
  }
80
84
 
81
85
  interface ComponentsPropsList {
@@ -100,6 +104,8 @@ declare module '@mui/material/styles' {
100
104
  M4LSkeleton: Partial<SkeletonOwnerState>;
101
105
  M4LSelect: Partial<SelectOwnerState>;
102
106
  M4LTypography: Partial<TypographyOwnerState>;
107
+ M4LTab: Partial<TabOwnerState>;
108
+
103
109
  }
104
110
 
105
111
  interface Components {
@@ -182,6 +188,7 @@ declare module '@mui/material/styles' {
182
188
  defaultProps?: ComponentsPropsList['M4LControlIncrement'];
183
189
  styleOverrides?: ComponentsOverrides<Theme>['M4LControlIncrement'];
184
190
  variants?: ComponentsVariants['M4LControlIncrement'];
191
+ }
185
192
  M4LMenuItem?: {
186
193
  defaultProps?: ComponentsPropsList['M4LMenuItem'];
187
194
  styleOverrides?: ComponentsOverrides<Theme>['M4LMenuItem'];
@@ -202,6 +209,10 @@ declare module '@mui/material/styles' {
202
209
  styleOverrides?: ComponentsOverrides<Theme>['M4LTypography'];
203
210
  variants?: ComponentsVariants['M4LTypography'];
204
211
  };
212
+ M4LTab?: {
213
+ defaultProps?: ComponentsPropsList['M4LTab'];
214
+ styleOverrides?: ComponentsOverrides<Theme>['M4LTab'];
215
+ variants?: ComponentsVariants['M4LTab'];
216
+ };
205
217
  }
206
- }
207
218
  }
@@ -12,9 +12,9 @@ export declare function getAccountPopoverClassesUtilityClass(slot: string): stri
12
12
  */
13
13
  export declare const useAccountPopoverUtilityClasses: () => {
14
14
  root: string;
15
- popover: string;
16
15
  menuItem: string;
17
16
  containerProgress: string;
17
+ popover: string;
18
18
  containerUserName: string;
19
19
  containerUserEmail: string;
20
20
  containerUserInfo: string;
@@ -17,19 +17,19 @@ function Density() {
17
17
  urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`,
18
18
  onClick: () => setRowHeightVariant("compact"),
19
19
  disabled: currentRowHeightVariant === "compact",
20
- label: "data_grid.density_compact"
20
+ dictionaryField: "data_grid.density_compact"
21
21
  },
22
22
  {
23
23
  urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/standard.svg`,
24
24
  onClick: () => setRowHeightVariant("standard"),
25
25
  disabled: currentRowHeightVariant === "standard",
26
- label: "data_grid.density_standard"
26
+ dictionaryField: "data_grid.density_standard"
27
27
  },
28
28
  {
29
29
  urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/confortable.svg`,
30
30
  onClick: () => setRowHeightVariant("confortable"),
31
31
  disabled: currentRowHeightVariant === "confortable",
32
- label: "data_grid.density_confortable"
32
+ dictionaryField: "data_grid.density_confortable"
33
33
  }
34
34
  ];
35
35
  }, [
@@ -14,32 +14,32 @@ const MobileMenuActions = () => {
14
14
  };
15
15
  const menuActions = [
16
16
  {
17
- icon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`,
17
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`,
18
18
  onClick: () => setRowHeightVariant("compact"),
19
19
  disabled: currentRowHeightVariant === "compact",
20
- label: "data_grid.density_compact"
20
+ dictionaryId: "data_grid.density_compact"
21
21
  },
22
22
  {
23
- icon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/standard.svg`,
23
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/standard.svg`,
24
24
  onClick: () => setRowHeightVariant("standard"),
25
25
  disabled: currentRowHeightVariant === "standard",
26
- label: "data_grid.density_standard"
26
+ dictionaryId: "data_grid.density_standard"
27
27
  },
28
28
  {
29
- icon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/confortable.svg`,
29
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/confortable.svg`,
30
30
  onClick: () => setRowHeightVariant("confortable"),
31
31
  disabled: currentRowHeightVariant === "confortable",
32
- label: "data_grid.density_confortable"
32
+ dictionaryId: "data_grid.density_confortable"
33
33
  },
34
34
  {
35
- icon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/filter.svg`,
35
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/filter.svg`,
36
36
  onClick: () => toggleIcon(),
37
- label: activeFilters ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show"
37
+ dictionaryId: activeFilters ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show"
38
38
  },
39
39
  {
40
- icon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/configuration.svg`,
40
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/configuration.svg`,
41
41
  onClick: () => modalSettings(),
42
- label: "data_grid.tooltip_settings"
42
+ dictionaryId: "data_grid.tooltip_settings"
43
43
  }
44
44
  ];
45
45
  return /* @__PURE__ */ jsx(
@@ -8,7 +8,6 @@ export declare const getSideBarClassesByState: (ownerState: SideBarState) => {
8
8
  skeleton: string;
9
9
  root: string;
10
10
  footer: string;
11
- popover: string;
12
11
  contentDesktop: string;
13
12
  contentMobile: string;
14
13
  collapseButton: string;
@@ -36,6 +35,7 @@ export declare const getSideBarClassesByState: (ownerState: SideBarState) => {
36
35
  containerContentGroupsFooter: string;
37
36
  contentGroupsLine: string;
38
37
  drawer: string;
38
+ popover: string;
39
39
  wrapperLogoFooter: string;
40
40
  subItemActive: string;
41
41
  itemMainActive: string;
@@ -14,14 +14,14 @@ const ChipActionsMobile = (props) => {
14
14
  const { getLabel } = useModuleDictionary();
15
15
  const menuActions = [
16
16
  {
17
- icon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
17
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.EDIT_AREA}`,
18
18
  onClick: handlerOpenPopoverEditArea,
19
19
  label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.label_edit_area))
20
20
  }
21
21
  ];
22
22
  if (listAreas.length > 1) {
23
23
  menuActions.push({
24
- icon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
24
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.DELETE_AREA}`,
25
25
  /**
26
26
  * OnClick
27
27
  */
@@ -8,5 +8,5 @@ export declare const areasViewerClasses: AreasViewerClasses;
8
8
  * @updatedAt 2024-10-22 19:27:23 - automatic
9
9
  * @updatedUser Bruce Escobar - automatic
10
10
  */
11
- export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "windowContent" | "areaRoot" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowRootContainer" | "windowLinearProgressRoot" | "windowLinearProgressBar" | "windowPopupRoot" | "windowModalRoot" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "panelWindowsSeparator" | "loaderContainer" | "containerComponent" | "selectedWindow" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider", string>;
11
+ export declare const useAreasViewerUtilityClasses: (ownerState: OwnerState) => Record<"root" | "areaRoot" | "areaGridLayoutPanelContainer" | "areaGridLayout" | "areaGridLayoutPopupsContainer" | "areasWindowPopUpList" | "windowRoot" | "windowHeader" | "windowHeaderTitle" | "windowHeaderMainActions" | "windowHeaderCancelHandle" | "windowContent" | "windowRootContainer" | "windowLinearProgressRoot" | "windowLinearProgressBar" | "windowPopupRoot" | "windowModalRoot" | "panelWindowsRoot" | "panelWindowsButtonContainer" | "panelWindowsSeparator" | "loaderContainer" | "containerComponent" | "selectedWindow" | "areasLoadingErrorRoot" | "areasLoadingErrorLoading" | "areasLoadingError" | "areasLoadingErrorIcon" | "areasLoadingErrorTitle" | "areasLoadingErrorDescription" | "areasLoadingErrorDivider", string>;
12
12
  export type ViwerClasses = ReturnType<typeof useAreasViewerUtilityClasses>;
@@ -26,7 +26,7 @@ function getMenuActions(options) {
26
26
  }
27
27
  if (windowOptions.allowPersistCookies) {
28
28
  const saveCookiesAction = {
29
- icon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.SAVE_COOKIES}`,
29
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.SAVE_COOKIES}`,
30
30
  onClick: () => saveModuleCookies(windowId),
31
31
  disabled: false,
32
32
  visibility: "normal",
@@ -36,7 +36,7 @@ function getMenuActions(options) {
36
36
  };
37
37
  menuActions.push(saveCookiesAction);
38
38
  const resetCookiesAction = {
39
- icon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.RESET_COOKIES}`,
39
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.RESET_COOKIES}`,
40
40
  onClick: () => resetModuleCookies(windowId),
41
41
  disabled: false,
42
42
  visibility: "normal",
@@ -48,7 +48,7 @@ function getMenuActions(options) {
48
48
  }
49
49
  if (version) {
50
50
  const versionAction = {
51
- icon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.VERSION}`,
51
+ urlIcon: `${urlPrefix}/frontend/components/areas/assets/icons/${ICONS.VERSION}`,
52
52
  onClick: () => {
53
53
  },
54
54
  disabled: true,
@@ -20,15 +20,15 @@ function MainActions(props) {
20
20
  return getMainActions(isDesktop, moduleActions);
21
21
  }, [moduleActions, isDesktop]);
22
22
  return /* @__PURE__ */ jsx("div", { className: areasViewerClasses.windowHeaderMainActions, children: mainActions.map((mainAction) => {
23
- const tooltip = mainAction.label !== void 0 ? mainAction.label : getLabel(mainAction.label || "");
23
+ const tooltip = mainAction.label !== void 0 ? mainAction.label : getLabel(mainAction.dictionaryId || "");
24
24
  const onClick = (e) => {
25
- mainAction.onClick && mainAction.onClick(e);
25
+ mainAction.onClick(e);
26
26
  e.stopPropagation();
27
27
  };
28
28
  return /* @__PURE__ */ jsx(
29
29
  IconButton,
30
30
  {
31
- src: mainAction.icon || "",
31
+ src: mainAction.urlIcon || "",
32
32
  className: clsx(mainAction.className, "m4l_draggableCancel"),
33
33
  onClick,
34
34
  "aria-label": mainAction.label,
@@ -1,4 +1,4 @@
1
1
  import { Resizable } from 'react-resizable';
2
- export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableProps, "children" | "width" | "height" | "className" | "onResize" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "resizeHandles" | "transformScale" | "axis"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
2
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableProps, "children" | "width" | "height" | "className" | "onResize" | "axis" | "resizeHandles" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
3
3
  ref?: import('react').Ref<Resizable> | undefined;
4
4
  }>;
@@ -1,4 +1,4 @@
1
1
  import { ResizableBox } from 'react-resizable';
2
- export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableBoxProps, "children" | "style" | "width" | "height" | "className" | "onResize" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "resizeHandles" | "transformScale" | "axis"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
2
+ export declare const RootStyled: import('@emotion/styled').StyledComponent<Pick<import('react-resizable').ResizableBoxProps, "children" | "style" | "width" | "height" | "className" | "onResize" | "axis" | "resizeHandles" | "handle" | "handleSize" | "lockAspectRatio" | "minConstraints" | "maxConstraints" | "onResizeStop" | "onResizeStart" | "draggableOpts" | "transformScale"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, {}, {
3
3
  ref?: import('react').Ref<ResizableBox> | undefined;
4
4
  }>;
@@ -14,9 +14,9 @@ import { w as withRenderOption } from "../RenderOption/index.js";
14
14
  import { S as SkeletonRHFAutocomplete } from "../Skeleton/index.js";
15
15
  import { L as Label } from "../../../../Label/Label.js";
16
16
  import { T as Typography } from "../../../../mui_extended/Typography/Typography.js";
17
+ import { I as Image } from "../../../../Image/Image.js";
17
18
  import { I as IconButton } from "../../../../mui_extended/IconButton/IconButton.js";
18
19
  import { H as HelperError } from "../../../../HelperError/HelperError.js";
19
- import { I as Image } from "../../../../Image/Image.js";
20
20
  function ComponentTypeImage(props) {
21
21
  const {
22
22
  name: nameRHF,
@@ -6,7 +6,7 @@ export declare const LabelStyled: import('@emotion/styled').StyledComponent<Pick
6
6
  }, {}, {}>;
7
7
  export declare const TextFieldStyled: import('@emotion/styled').StyledComponent<Pick<{
8
8
  variant?: import('@mui/material').TextFieldVariants | undefined;
9
- } & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').OutlinedTextFieldProps | import('@mui/material').StandardTextFieldProps, "variant">, "children" | "value" | "ref" | "title" | "component" | "size" | "name" | "error" | "select" | "rows" | "id" | "type" | "hidden" | "color" | "content" | "style" | "disabled" | "variant" | "margin" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "label" | "key" | "autoComplete" | "placeholder" | "required" | "fullWidth" | "maxRows" | "focused" | "hiddenLabel" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "inputProps" | "inputRef" | "multiline" | "minRows" | "SelectProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
9
+ } & Omit<import('@mui/material').FilledTextFieldProps | import('@mui/material').OutlinedTextFieldProps | import('@mui/material').StandardTextFieldProps, "variant">, "children" | "value" | "ref" | "title" | "component" | "size" | "name" | "error" | "select" | "rows" | "id" | "type" | "hidden" | "color" | "content" | "style" | "disabled" | "variant" | "margin" | "translate" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "label" | "key" | "autoComplete" | "placeholder" | "required" | "fullWidth" | "inputProps" | "inputRef" | "SelectProps" | "multiline" | "maxRows" | "minRows" | "hiddenLabel" | "focused" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
10
10
  ownerState: Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown>;
11
11
  }, {}, {}>;
12
12
  export declare const SkeletonTextFieldRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('..').RHFTextFieldOwnerState> & Record<string, unknown> & {
@@ -23,8 +23,8 @@ function useRowActionsGetter() {
23
23
  (row) => {
24
24
  const conditionalItems = [];
25
25
  conditionalItems.push({
26
- icon: urlIconDelete,
27
- label: MAP_DICCTIONARY.ROW_ACTION_LAYER_DELETE,
26
+ urlIcon: urlIconDelete,
27
+ dictionaryId: MAP_DICCTIONARY.ROW_ACTION_LAYER_DELETE,
28
28
  onClick: () => {
29
29
  onDelete(row);
30
30
  },
@@ -7,7 +7,7 @@ import "@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css";
7
7
  import "@geoman-io/leaflet-geoman-free";
8
8
  import clsx from "clsx";
9
9
  import { D as DivTabGpsToolsRoot } from "../../styles.js";
10
- import { T as Tab } from "../../../../../mui_extended/Tab/index.js";
10
+ import { T as Tab } from "../../../../../mui_extended/Tab/Tab.js";
11
11
  import { G as GeofencesList } from "./subcomponents/GeofencesList/index.js";
12
12
  import { u as useLayers } from "../../hooks/useLayers/index.js";
13
13
  import { M as MAP_GPSTOOLS_DICCTIONARY } from "../../dictionary.js";
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { useModuleDictionary, useEnvironment } from "@m4l/core";
4
4
  import clsx from "clsx";
5
- import { T as Tab } from "../../../../../../../../../mui_extended/Tab/index.js";
5
+ import { T as Tab } from "../../../../../../../../../mui_extended/Tab/Tab.js";
6
6
  import { G as GeneralData } from "../GeneralData/index.js";
7
7
  import { C as ConfigData } from "../ConfigData/index.js";
8
8
  import { S as StyleData } from "../StyleData/index.js";
@@ -79,8 +79,8 @@ function useRowActionsGetter(props) {
79
79
  (row) => {
80
80
  const conditionalItems = [];
81
81
  conditionalItems.push({
82
- icon: urlIconEdit,
83
- label: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_EDIT,
82
+ urlIcon: urlIconEdit,
83
+ dictionaryId: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_EDIT,
84
84
  onClick: () => {
85
85
  goEdit(row.id, row.name);
86
86
  },
@@ -89,12 +89,12 @@ function useRowActionsGetter(props) {
89
89
  disabled: !row.authUserOptions.edit
90
90
  });
91
91
  conditionalItems.push({
92
- icon: urlIconDelete,
93
- label: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_DELETE,
92
+ urlIcon: urlIconDelete,
93
+ dictionaryId: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_DELETE,
94
94
  onClick: () => {
95
95
  onDelete(row);
96
96
  },
97
- error: true,
97
+ variant: "delete",
98
98
  // Solo se habilita si intenta editarse a él mismo, o si tiene permisos pero está en un nivel superior al usuario a editar
99
99
  // disabled: !(itsMe || (hasPrivilege(PRIVILEGE_EDIT) && (loggedUserType > row.user_type.id)))
100
100
  disabled: !row.authUserOptions.edit
@@ -7,6 +7,8 @@ export declare function getModalUtilityClass(slot: string): string;
7
7
  */
8
8
  export declare const modalUtilityClasses: (ownerState: OwnerStateWindowConfim) => {
9
9
  root: string;
10
+ resizeHandle: string;
11
+ windowContent: string;
10
12
  windowBaseRoot: string;
11
13
  containerWindow: string;
12
14
  headerContainer: string;
@@ -19,6 +21,4 @@ export declare const modalUtilityClasses: (ownerState: OwnerStateWindowConfim) =
19
21
  messageContainer: string;
20
22
  illustration: string;
21
23
  windowConfirm: string;
22
- resizeHandle: string;
23
- windowContent: string;
24
24
  };
@@ -1,15 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { MenuActionsProps } from './types';
3
3
  /**
4
- * Componente `MenuActions`:
5
- * Un componente interactivo que despliega un menú con diferentes acciones,
6
- * accesible a través de un botón con ícono. Ofrece soporte para mostrar acciones personalizadas
7
- * y estilos configurables.
4
+ * TODO: Documentar
8
5
  */
9
6
  export declare function MenuActions(props: MenuActionsProps): import("react/jsx-runtime").JSX.Element;
10
- /**
11
- * Componente `MemonizedMenuActions`:
12
- * Una versión memorizada del componente `MenuActions` para mejorar el rendimiento.
13
- */
14
7
  export declare const MemonizedMenuActions: React.MemoExoticComponent<typeof MenuActions>;
15
8
  export default MenuActions;
@@ -1,11 +1,10 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import React, { useRef, useState, useMemo } from "react";
3
- import { useEnvironment, useModuleDictionary } from "@m4l/core";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import React, { useState, useEffect, useMemo } from "react";
4
3
  import { useTheme } from "@mui/material/styles";
5
- import { I as ICON_PATH, a as ICONS, M as MENU_ACTIONS_, b as MENU_ACTIONS_EMPTY } from "./constants.js";
4
+ import { useEnvironment, useModuleDictionary } from "@m4l/core";
5
+ import { I as ICON_PATH, a as ICONS } from "./constants.js";
6
6
  import { g as getMenuActionsDictionary, D as DICTIONARY } from "./dictionary.js";
7
- import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
8
- import { R as RootStyled, I as IconButtonStyled, P as PopoverStyled, M as MenuItemStyled } from "./slots/MenuActionsSlots.js";
7
+ import { R as RootStyled, M as MenuItemStyled, I as IconButtonUrlStyled, L as LabelMenuItemStyled, a as LabelEmptyStyled, B as BadgeStyled, b as IconButtonStyled } from "./slots/MenuActionsSlots.js";
9
8
  function MenuActions(props) {
10
9
  const {
11
10
  menuActions,
@@ -15,40 +14,48 @@ function MenuActions(props) {
15
14
  objItem = {},
16
15
  urlIcon,
17
16
  toolTip = "",
18
- marginTop,
17
+ marginTop = -1,
19
18
  marginBottom,
20
19
  marginLeft,
21
20
  marginRight,
22
21
  width = 200,
22
+ withBadge = false,
23
23
  badgeContent,
24
24
  arrowType = "right-top",
25
25
  externalOpen = null,
26
26
  externalClose,
27
- sizes = "medium",
28
27
  ...other
29
28
  } = props;
30
- const { currentSize } = useComponentSize(sizes);
31
- const rootRef = useRef(null);
32
- const OwnerState = {
33
- iconSize: currentSize
34
- };
35
29
  const { host_static_assets, environment_assets } = useEnvironment();
36
30
  const { getLabel } = useModuleDictionary();
37
- const [open, setOpen] = useState(false);
38
- const handleOpenClose = () => {
39
- setOpen(() => !open);
31
+ const [open, setOpen] = useState(null);
32
+ const handleOpen = (event) => {
33
+ setOpen(event.currentTarget);
40
34
  };
41
35
  const theme = useTheme();
36
+ useEffect(() => {
37
+ let mounted = true;
38
+ if (mounted) {
39
+ setOpen(externalOpen);
40
+ }
41
+ return function cleanUp() {
42
+ mounted = false;
43
+ };
44
+ }, [externalOpen]);
42
45
  const urlFinalIcon = useMemo(() => {
43
46
  if (urlIcon) {
44
47
  return urlIcon;
45
48
  }
46
49
  return `${host_static_assets}/${environment_assets}/${ICON_PATH}/${ICONS.MENU}`;
47
50
  }, [urlIcon, host_static_assets, environment_assets]);
48
- const handleClick = (e, menuAction) => {
51
+ const handleClose = (e) => {
52
+ e.stopPropagation();
53
+ setOpen(null);
54
+ externalClose && externalClose(null);
55
+ };
56
+ const handleClick = (e, _menuAction) => {
49
57
  e.stopPropagation();
50
- menuAction.onClick && menuAction.onClick(e);
51
- setOpen(false);
58
+ setOpen(null);
52
59
  };
53
60
  const finalActions = useMemo(() => {
54
61
  let ret;
@@ -59,26 +66,35 @@ function MenuActions(props) {
59
66
  }
60
67
  return ret;
61
68
  }, [menuActions, objItem]);
62
- return /* @__PURE__ */ jsxs(RootStyled, { ownerState: { OwnerState }, ref: rootRef, children: [
63
- /* @__PURE__ */ jsx(
64
- IconButtonStyled,
65
- {
66
- ownerState: { OwnerState },
67
- size: sizes,
68
- src: urlFinalIcon,
69
- onClick: () => handleOpenClose(),
70
- tooltip: toolTip,
71
- className: iconButtonClassName
72
- }
73
- ),
69
+ const IconButtonElement = /* @__PURE__ */ jsx(Fragment, { children: withBadge ? /* @__PURE__ */ jsx(BadgeStyled, { ownerState: {}, badgeContent, children: /* @__PURE__ */ jsx(
70
+ IconButtonStyled,
71
+ {
72
+ ownerState: {},
73
+ src: urlFinalIcon,
74
+ onClick: handleOpen,
75
+ tooltip: toolTip,
76
+ className: iconButtonClassName
77
+ }
78
+ ) }) : /* @__PURE__ */ jsx(
79
+ IconButtonStyled,
80
+ {
81
+ ownerState: {},
82
+ src: urlFinalIcon,
83
+ onClick: handleOpen,
84
+ tooltip: toolTip,
85
+ className: iconButtonClassName
86
+ }
87
+ ) });
88
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
89
+ IconButtonElement,
74
90
  /* @__PURE__ */ jsxs(
75
- PopoverStyled,
91
+ RootStyled,
76
92
  {
77
- ownerState: { OwnerState },
93
+ ownerState: {},
78
94
  id: "Popover",
79
- open,
80
- anchorEl: externalOpen ?? rootRef.current,
81
- onClose: () => handleOpenClose(),
95
+ open: Boolean(open),
96
+ anchorEl: open,
97
+ onClose: handleClose,
82
98
  arrowType,
83
99
  sx: {
84
100
  marginTop,
@@ -86,31 +102,37 @@ function MenuActions(props) {
86
102
  marginLeft,
87
103
  marginRight,
88
104
  width,
105
+ maxWidth: 300,
106
+ "& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
89
107
  ...theme.components?.M4LMenuActions?.styleOverrides || {},
90
108
  ...menuActionSx
91
109
  },
92
110
  ...other,
93
111
  children: [
94
- finalActions.length > 0 ? finalActions.map((menuAction, index) => /* @__PURE__ */ jsx(
95
- MenuItemStyled,
96
- {
97
- ownerState: { OwnerState },
98
- size: sizes,
99
- onClick: (e) => {
100
- handleClick(e, menuAction);
112
+ finalActions.map(
113
+ (menuAction, index) => menuAction.label || menuAction.dictionaryId ? /* @__PURE__ */ jsxs(
114
+ MenuItemStyled,
115
+ {
116
+ dense: true,
117
+ onClick: (e) => {
118
+ handleClick(e);
119
+ },
120
+ sx: { color: menuAction.color ?? "text.main" },
121
+ disabled: menuAction.disabled,
122
+ ownerState: { variant: menuAction.variant, color: menuAction.color },
123
+ children: [
124
+ menuAction.urlIcon ? /* @__PURE__ */ jsx(
125
+ IconButtonUrlStyled,
126
+ {
127
+ ownerState: { variant: menuAction.variant },
128
+ src: menuAction.urlIcon
129
+ }
130
+ ) : null,
131
+ /* @__PURE__ */ jsx(LabelMenuItemStyled, { ownerState: {}, children: menuAction.label || menuAction.dictionaryId && getLabel(menuAction.dictionaryId) })
132
+ ]
101
133
  },
102
- ...menuAction
103
- },
104
- `${MENU_ACTIONS_}${index}`
105
- )) : /* @__PURE__ */ jsx(
106
- MenuItemStyled,
107
- {
108
- ownerState: { OwnerState },
109
- size: sizes,
110
- disabled: true,
111
- label: getLabel(getMenuActionsDictionary(DICTIONARY.no_actions_label))
112
- },
113
- MENU_ACTIONS_EMPTY
134
+ `menu_action_${index}`
135
+ ) : /* @__PURE__ */ jsx(LabelEmptyStyled, { ownerState: {}, children: getLabel(getMenuActionsDictionary(DICTIONARY.no_actions_label)) }, `menu_action_${index}`)
114
136
  ),
115
137
  endListElement ? endListElement : null
116
138
  ]
@@ -0,0 +1,25 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { MenuActions } from './index';
3
+ declare const meta: Meta<typeof MenuActions>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof MenuActions>;
6
+ /**
7
+ * Base MenuActions component
8
+ */
9
+ export declare const Base: Story;
10
+ /**
11
+ * MenuActions in skeleton mode
12
+ */
13
+ export declare const WithSkeleton: Story;
14
+ /**
15
+ * MenuActions with Badge content
16
+ */
17
+ export declare const WithBadge: Story;
18
+ /**
19
+ * MenuActions with end ListElement
20
+ */
21
+ export declare const WithEndListElement: Story;
22
+ /**
23
+ * MenuActions empty state
24
+ */
25
+ export declare const Empty: Story;
@@ -1,6 +1,2 @@
1
1
  import { MenuActionsStyles } from '../MenuActions/types';
2
- /**
3
- * `menuActionsStyles`:
4
- * Objeto que define los estilos personalizados para los diferentes componentes dentro de `MenuActions`.
5
- */
6
2
  export declare const menuActionsStyles: MenuActionsStyles;