@m4l/components 8.1.0 → 8.2.0-beta.devDaniel.MenuActionsBug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/export.d.ts +0 -3
- package/components/AccountPopover/classes/index.d.ts +1 -1
- package/components/CommonActions/classes/index.d.ts +1 -1
- package/components/ControlIncrement/slots/ControltrolIncrementSlots.d.ts +1 -1
- package/components/DataGrid/classes/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.js +3 -3
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.js +10 -10
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/Label/slots/LabelSlots.d.ts +1 -1
- package/components/PaperForm/classes/index.d.ts +1 -1
- package/components/Period/classes/index.d.ts +1 -1
- package/components/SideBar/classes/index.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/styles.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/index.js +2 -2
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.js +3 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/MainActions/index.js +3 -3
- package/components/extended/react-resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
- package/components/extended/react-resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/ComponentTypeImage/index.js +1 -1
- package/components/hook-form/RHFCheckbox/classes/index.d.ts +1 -1
- package/components/hook-form/RHFCheckbox/styles.d.ts +1 -1
- package/components/hook-form/RHFColorPicker/classes/index.d.ts +1 -1
- package/components/hook-form/RHFDateTime/classes/index.d.ts +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/classes/index.d.ts +1 -1
- package/components/maps/components/Map/classes/index.d.ts +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopLeftTools/subcomponents/PopoverToolButton/subcomponentes/LayersTool/hooks/useRowActionsGetter.js +2 -2
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/hooks/useRowActionsGetter.js +5 -5
- package/components/modal/classes/index.d.ts +2 -2
- package/components/mui_extended/Accordion/classes/index.d.ts +1 -1
- package/components/mui_extended/Avatar/classes/index.d.ts +1 -1
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- package/components/mui_extended/Button/classes/index.d.ts +1 -1
- package/components/mui_extended/Button/styles.d.ts +1 -1
- package/components/mui_extended/CheckBox/classes/index.d.ts +1 -1
- package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
- package/components/mui_extended/LoadingButton/classes/index.d.ts +1 -1
- package/components/mui_extended/MenuActions/MenuActions.d.ts +8 -1
- package/components/mui_extended/MenuActions/MenuActions.js +55 -77
- package/components/mui_extended/MenuActions/MenuActions.styles.d.ts +4 -0
- package/components/mui_extended/MenuActions/MenuActions.styles.js +11 -38
- package/components/mui_extended/MenuActions/constants.d.ts +17 -0
- package/components/mui_extended/MenuActions/constants.js +6 -2
- package/components/mui_extended/MenuActions/dictionary.d.ts +15 -0
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum.d.ts +8 -5
- package/components/mui_extended/MenuActions/slots/MenuActionsEnum.js +1 -4
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +29 -16
- package/components/mui_extended/MenuActions/slots/MenuActionsSlots.js +16 -33
- package/components/mui_extended/MenuActions/stories/MenuActions.default.stories.d.ts +25 -0
- package/components/mui_extended/MenuActions/stories/MenuActions.othersProps.stories.d.ts +13 -0
- package/components/mui_extended/MenuActions/types.d.ts +80 -18
- package/components/mui_extended/MenuItem/MenuItem.js +66 -0
- package/components/mui_extended/MenuItem/MenuItem.styles.js +111 -0
- package/components/mui_extended/MenuItem/constants.js +4 -0
- package/components/mui_extended/MenuItem/index.js +1 -0
- package/components/mui_extended/MenuItem/slots/MenuItemEnum.js +9 -0
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +24 -0
- package/components/mui_extended/MenuItem/types.js +1 -0
- package/components/mui_extended/Pager/classes/index.d.ts +2 -2
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Tab/classes/index.d.ts +1 -1
- package/components/mui_extended/Tabs/styles.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +2 -2
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/package.json +1 -1
- package/test/mocks.d.ts +7 -7
- package/utils/index.d.ts +1 -1
- package/components/mui_extended/MenuActions/MenuActions.stories.d.ts +0 -25
|
@@ -6,8 +6,8 @@ export declare function getRHFUploadImagebUtilityClass(slot: string): string;
|
|
|
6
6
|
* TODO: Documentar
|
|
7
7
|
*/
|
|
8
8
|
export declare const RHFUploadImageUtilityClasses: (ownerState: OwnerState) => {
|
|
9
|
-
root: string;
|
|
10
9
|
skeleton: string;
|
|
10
|
+
root: string;
|
|
11
11
|
dropZoneStyle: string;
|
|
12
12
|
containerFileImage: string;
|
|
13
13
|
placeHolder: string;
|
|
@@ -4,5 +4,5 @@ export declare const mapClasses: MapClasses;
|
|
|
4
4
|
/**
|
|
5
5
|
* TODO: Documentar
|
|
6
6
|
*/
|
|
7
|
-
export declare const useMapUtilityClasses: (_ownerState: OwnerState) => Record<"
|
|
7
|
+
export declare const useMapUtilityClasses: (_ownerState: OwnerState) => Record<"active" | "disabled" | "root" | "topLeftToolsRoot" | "topRigthToolsRoot" | "zoomButtons" | "markerLayerRoot" | "markerLayerIcon" | "markerLayerLabel" | "featureLabel" | "meaureToolRoot" | "measureToolFormValue" | "measureToolFormValueDistance" | "measureToolFormValueSymbol" | "measureToolLabel" | "meausureToolLabelDistance" | "meausureToolLabelSymbol" | "measureMarkerRoot" | "measureMarkerContainer" | "measureMarkerContainerRhomb" | "measureMarkerContainerSlot" | "measureMarkerContainerSlotNumber" | "measureLabelMarkerRoot" | "measureLabelMarkerContainer" | "measureLabelMarkerDistance" | "measureLabelMarkerRemove" | "mapSourcesPopoverRoot" | "mapSourcesRoot" | "mapSourcesOption" | "mapSourcesOptionIconLabel" | "mapSourcesOptionRoadOptions" | "mapSourcesOptionRoadOptionsCheck" | "layersPopoverRoot" | "markerLayerLabelInner", string>;
|
|
8
8
|
export type Classes = ReturnType<typeof useMapUtilityClasses>;
|
|
@@ -23,8 +23,8 @@ function useRowActionsGetter() {
|
|
|
23
23
|
(row) => {
|
|
24
24
|
const conditionalItems = [];
|
|
25
25
|
conditionalItems.push({
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
icon: urlIconDelete,
|
|
27
|
+
label: MAP_DICCTIONARY.ROW_ACTION_LAYER_DELETE,
|
|
28
28
|
onClick: () => {
|
|
29
29
|
onDelete(row);
|
|
30
30
|
},
|
|
@@ -79,8 +79,8 @@ function useRowActionsGetter(props) {
|
|
|
79
79
|
(row) => {
|
|
80
80
|
const conditionalItems = [];
|
|
81
81
|
conditionalItems.push({
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
icon: urlIconEdit,
|
|
83
|
+
label: 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
|
-
|
|
93
|
-
|
|
92
|
+
icon: urlIconDelete,
|
|
93
|
+
label: MAP_GPSTOOLS_DICCTIONARY.ROW_ACTION_GEO_DELETE,
|
|
94
94
|
onClick: () => {
|
|
95
95
|
onDelete(row);
|
|
96
96
|
},
|
|
97
|
-
|
|
97
|
+
error: true,
|
|
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,8 +7,6 @@ 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;
|
|
12
10
|
windowBaseRoot: string;
|
|
13
11
|
containerWindow: string;
|
|
14
12
|
headerContainer: string;
|
|
@@ -21,4 +19,6 @@ export declare const modalUtilityClasses: (ownerState: OwnerStateWindowConfim) =
|
|
|
21
19
|
messageContainer: string;
|
|
22
20
|
illustration: string;
|
|
23
21
|
windowConfirm: string;
|
|
22
|
+
resizeHandle: string;
|
|
23
|
+
windowContent: string;
|
|
24
24
|
};
|
|
@@ -5,8 +5,8 @@ export declare function getAccordionUtilityClass(slot: string): string;
|
|
|
5
5
|
* TODO: Documentar
|
|
6
6
|
*/
|
|
7
7
|
export declare const accordionUtilityClasses: () => {
|
|
8
|
-
root: string;
|
|
9
8
|
content: string;
|
|
9
|
+
root: string;
|
|
10
10
|
label: string;
|
|
11
11
|
labelIcon: string;
|
|
12
12
|
endIcon: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const BadgeRootStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').BadgeOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
2
2
|
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
3
|
-
}, "children" | "color" | "
|
|
3
|
+
}, "children" | "components" | "color" | "style" | "variant" | "sx" | "classes" | "className" | "componentsProps" | "slotProps" | "slots" | "badgeContent" | "anchorOrigin" | "invisible" | "max" | "overlap" | "showZero">, "children" | "ref" | "title" | "id" | "components" | "hidden" | "color" | "content" | "style" | "variant" | "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" | "componentsProps" | "slotProps" | "slots" | "key" | "badgeContent" | "anchorOrigin" | "invisible" | "max" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').BadgeOwnerState> & Record<string, unknown> & {
|
|
4
4
|
ownerState: Partial<import('../types').BadgeOwnerState> & Record<string, unknown>;
|
|
5
5
|
}, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const ButtonRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
2
|
export declare const SKTButton: import('@emotion/styled').StyledComponent<import('@mui/material').SkeletonOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
4
|
-
}, "children" | "
|
|
4
|
+
}, "children" | "style" | "variant" | "width" | "height" | "animation" | "sx" | "classes" | "className"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const StyledMUIIconButton: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').IconButtonOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
2
2
|
ref?: ((instance: HTMLButtonElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLButtonElement> | null | undefined;
|
|
3
|
-
}, "
|
|
3
|
+
}, "children" | "size" | "action" | "color" | "style" | "disabled" | "sx" | "classes" | "className" | "tabIndex" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "children" | "value" | "ref" | "title" | "size" | "name" | "id" | "type" | "action" | "hidden" | "color" | "content" | "style" | "disabled" | "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" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "form" | "key" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').IconButtonOwnerState> & Record<string, unknown> & {
|
|
4
4
|
ownerState: Partial<import('../types').IconButtonOwnerState> & Record<string, unknown>;
|
|
5
5
|
}, {}, {}>;
|
|
6
6
|
export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../Icon').IconProps, keyof import('../../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').IconButtonOwnerState> & Record<string, unknown> & {
|
|
@@ -8,7 +8,7 @@ export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<
|
|
|
8
8
|
}, {}, {}>;
|
|
9
9
|
export declare const BadgeStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').BadgeOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
10
|
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
11
|
-
}, "children" | "color" | "
|
|
11
|
+
}, "children" | "components" | "color" | "style" | "variant" | "sx" | "classes" | "className" | "componentsProps" | "slotProps" | "slots" | "badgeContent" | "anchorOrigin" | "invisible" | "max" | "overlap" | "showZero">, "children" | "ref" | "title" | "id" | "components" | "hidden" | "color" | "content" | "style" | "variant" | "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" | "componentsProps" | "slotProps" | "slots" | "key" | "badgeContent" | "anchorOrigin" | "invisible" | "max" | "overlap" | "showZero"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').IconButtonOwnerState> & Record<string, unknown> & {
|
|
12
12
|
ownerState: Partial<import('../types').IconButtonOwnerState> & Record<string, unknown>;
|
|
13
13
|
}, {}, {}>;
|
|
14
14
|
export declare const TooltipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Tooltip').TooltipProps, keyof import('../../Tooltip').TooltipProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').IconButtonOwnerState> & Record<string, unknown> & {
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { MenuActionsProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
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.
|
|
5
8
|
*/
|
|
6
9
|
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
|
+
*/
|
|
7
14
|
export declare const MemonizedMenuActions: React.MemoExoticComponent<typeof MenuActions>;
|
|
8
15
|
export default MenuActions;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import React, {
|
|
3
|
-
import { useTheme } from "@mui/material/styles";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useRef, useState, useMemo } from "react";
|
|
4
3
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
5
|
-
import {
|
|
4
|
+
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";
|
|
6
6
|
import { g as getMenuActionsDictionary, D as DICTIONARY } from "./dictionary.js";
|
|
7
|
-
import {
|
|
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";
|
|
8
9
|
function MenuActions(props) {
|
|
9
10
|
const {
|
|
10
11
|
menuActions,
|
|
@@ -14,48 +15,40 @@ function MenuActions(props) {
|
|
|
14
15
|
objItem = {},
|
|
15
16
|
urlIcon,
|
|
16
17
|
toolTip = "",
|
|
17
|
-
marginTop
|
|
18
|
+
marginTop,
|
|
18
19
|
marginBottom,
|
|
19
20
|
marginLeft,
|
|
20
21
|
marginRight,
|
|
21
22
|
width = 200,
|
|
22
|
-
withBadge = false,
|
|
23
23
|
badgeContent,
|
|
24
24
|
arrowType = "right-top",
|
|
25
25
|
externalOpen = null,
|
|
26
26
|
externalClose,
|
|
27
|
+
sizes = "medium",
|
|
27
28
|
...other
|
|
28
29
|
} = props;
|
|
30
|
+
const { currentSize } = useComponentSize(sizes);
|
|
31
|
+
const rootRef = useRef(null);
|
|
32
|
+
const OwnerState = {
|
|
33
|
+
iconSize: currentSize
|
|
34
|
+
};
|
|
29
35
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
30
36
|
const { getLabel } = useModuleDictionary();
|
|
31
|
-
const [open, setOpen] = useState(
|
|
32
|
-
const
|
|
33
|
-
setOpen(
|
|
37
|
+
const [open, setOpen] = useState(false);
|
|
38
|
+
const handleOpenClose = () => {
|
|
39
|
+
setOpen(() => !open);
|
|
34
40
|
};
|
|
35
41
|
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]);
|
|
45
42
|
const urlFinalIcon = useMemo(() => {
|
|
46
43
|
if (urlIcon) {
|
|
47
44
|
return urlIcon;
|
|
48
45
|
}
|
|
49
46
|
return `${host_static_assets}/${environment_assets}/${ICON_PATH}/${ICONS.MENU}`;
|
|
50
47
|
}, [urlIcon, host_static_assets, environment_assets]);
|
|
51
|
-
const
|
|
52
|
-
e.stopPropagation();
|
|
53
|
-
setOpen(null);
|
|
54
|
-
externalClose && externalClose(null);
|
|
55
|
-
};
|
|
56
|
-
const handleClick = (e, _menuAction) => {
|
|
48
|
+
const handleClick = (e, menuAction) => {
|
|
57
49
|
e.stopPropagation();
|
|
58
|
-
|
|
50
|
+
menuAction.onClick && menuAction.onClick(e);
|
|
51
|
+
setOpen(false);
|
|
59
52
|
};
|
|
60
53
|
const finalActions = useMemo(() => {
|
|
61
54
|
let ret;
|
|
@@ -66,35 +59,26 @@ function MenuActions(props) {
|
|
|
66
59
|
}
|
|
67
60
|
return ret;
|
|
68
61
|
}, [menuActions, objItem]);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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,
|
|
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
|
+
),
|
|
90
74
|
/* @__PURE__ */ jsxs(
|
|
91
|
-
|
|
75
|
+
PopoverStyled,
|
|
92
76
|
{
|
|
93
|
-
ownerState: {},
|
|
77
|
+
ownerState: { OwnerState },
|
|
94
78
|
id: "Popover",
|
|
95
|
-
open
|
|
96
|
-
anchorEl:
|
|
97
|
-
onClose:
|
|
79
|
+
open,
|
|
80
|
+
anchorEl: externalOpen ?? rootRef.current,
|
|
81
|
+
onClose: () => handleOpenClose(),
|
|
98
82
|
arrowType,
|
|
99
83
|
sx: {
|
|
100
84
|
marginTop,
|
|
@@ -102,37 +86,31 @@ function MenuActions(props) {
|
|
|
102
86
|
marginLeft,
|
|
103
87
|
marginRight,
|
|
104
88
|
width,
|
|
105
|
-
maxWidth: 300,
|
|
106
|
-
"& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
|
|
107
89
|
...theme.components?.M4LMenuActions?.styleOverrides || {},
|
|
108
90
|
...menuActionSx
|
|
109
91
|
},
|
|
110
92
|
...other,
|
|
111
93
|
children: [
|
|
112
|
-
finalActions.map(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
]
|
|
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);
|
|
133
101
|
},
|
|
134
|
-
|
|
135
|
-
|
|
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
|
|
136
114
|
),
|
|
137
115
|
endListElement ? endListElement : null
|
|
138
116
|
]
|
|
@@ -1,49 +1,22 @@
|
|
|
1
|
-
const CONTAINER_QUERY_NAME = "menuActions";
|
|
2
1
|
const menuActionsStyles = {
|
|
3
2
|
/**
|
|
4
|
-
*
|
|
3
|
+
* Estilos para el contenedor raíz del menú.
|
|
5
4
|
*/
|
|
6
|
-
root: (
|
|
7
|
-
|
|
8
|
-
"& .MuiPaper-root": {
|
|
9
|
-
display: "flex",
|
|
10
|
-
flexDirection: "column",
|
|
11
|
-
background: theme.palette.background.default,
|
|
12
|
-
gap: "8px",
|
|
13
|
-
maxWidth: 300
|
|
14
|
-
}
|
|
5
|
+
root: () => ({
|
|
6
|
+
width: "fit-content"
|
|
15
7
|
}),
|
|
16
|
-
|
|
8
|
+
/***
|
|
9
|
+
* Estilos para el Popover
|
|
10
|
+
*/
|
|
11
|
+
popover: {},
|
|
17
12
|
/**
|
|
18
|
-
*
|
|
13
|
+
* Estilos para el `IconButton` utilizado para abrir el menú.
|
|
19
14
|
*/
|
|
20
|
-
|
|
21
|
-
display: "flex",
|
|
22
|
-
justifyContent: "center",
|
|
23
|
-
minHeight: "24px",
|
|
24
|
-
minWidth: "24px",
|
|
25
|
-
padding: "0",
|
|
26
|
-
gap: "0px",
|
|
27
|
-
...ownerState.variant === "delete" ? {
|
|
28
|
-
color: theme.palette.error.main
|
|
29
|
-
} : {}
|
|
30
|
-
}),
|
|
31
|
-
menuItemLabel: {},
|
|
15
|
+
iconButton: {},
|
|
32
16
|
/**
|
|
33
|
-
*
|
|
17
|
+
* Estilos para los `menuItems` del menú.
|
|
34
18
|
*/
|
|
35
|
-
|
|
36
|
-
"&.M4LIcon-root": {
|
|
37
|
-
minHeight: "24px",
|
|
38
|
-
minWidth: "24px",
|
|
39
|
-
"& > .M4LIcon-icon": {
|
|
40
|
-
backgroundColor: ownerState.variant === "delete" ? theme.palette.error.main : ""
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
labelEmpty: () => ({
|
|
45
|
-
zIndex: 1
|
|
46
|
-
})
|
|
19
|
+
menuItem: {}
|
|
47
20
|
};
|
|
48
21
|
export {
|
|
49
22
|
menuActionsStyles as m
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ruta donde se encuentran los íconos en los assets.
|
|
3
|
+
*/
|
|
1
4
|
export declare const ICON_PATH = "frontend/components/menu_actions/assets/icons";
|
|
5
|
+
/**
|
|
6
|
+
* Íconos utilizados en el menú por defecto.
|
|
7
|
+
*/
|
|
2
8
|
export declare const ICONS: {
|
|
3
9
|
MENU: string;
|
|
4
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Nombre clave del componente `MenuActions` dentro de la aplicación.
|
|
13
|
+
*/
|
|
5
14
|
export declare const MENU_ACTIONS_KEY_COMPONENT = "M4LMenuActions";
|
|
15
|
+
/**
|
|
16
|
+
* Constante que define la clave cuando un ítem del menú está vacío.
|
|
17
|
+
*/
|
|
18
|
+
export declare const MENU_ACTIONS_EMPTY = "menu_action_empty";
|
|
19
|
+
/**
|
|
20
|
+
* Prefijo de la clave que se utiliza cuando un ítem del menú está cargando en React.
|
|
21
|
+
*/
|
|
22
|
+
export declare const MENU_ACTIONS_ = "menu_action_";
|
|
@@ -3,8 +3,12 @@ const ICONS = {
|
|
|
3
3
|
MENU: "menu.svg"
|
|
4
4
|
};
|
|
5
5
|
const MENU_ACTIONS_KEY_COMPONENT = "M4LMenuActions";
|
|
6
|
+
const MENU_ACTIONS_EMPTY = "menu_action_empty";
|
|
7
|
+
const MENU_ACTIONS_ = "menu_action_";
|
|
6
8
|
export {
|
|
7
9
|
ICON_PATH as I,
|
|
8
|
-
|
|
9
|
-
ICONS as a
|
|
10
|
+
MENU_ACTIONS_ as M,
|
|
11
|
+
ICONS as a,
|
|
12
|
+
MENU_ACTIONS_EMPTY as b,
|
|
13
|
+
MENU_ACTIONS_KEY_COMPONENT as c
|
|
10
14
|
};
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identificador clave utilizado para el diccionario de `MenuActions`.
|
|
3
|
+
*/
|
|
1
4
|
export declare const MENU_ACTIONS_DICTIONARY_ID = "menu_actions";
|
|
5
|
+
/**
|
|
6
|
+
* Devuelve un array que contiene el identificador del diccionario de `MenuActions`.
|
|
7
|
+
*/
|
|
2
8
|
export declare function getMenuActionsComponentsDictionary(): string[];
|
|
9
|
+
/**
|
|
10
|
+
* Diccionario de claves para las etiquetas y textos utilizados en el componente `MenuActions`.
|
|
11
|
+
*/
|
|
3
12
|
export declare const DICTIONARY: {
|
|
4
13
|
readonly no_actions_label: "no_actions_label";
|
|
5
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Tipo que representa las claves del diccionario de `MenuActions`.
|
|
17
|
+
*/
|
|
6
18
|
export type TypeDictionary = typeof DICTIONARY;
|
|
19
|
+
/**
|
|
20
|
+
* Función que obtiene el valor completo de una clave del diccionario de `MenuActions` utilizando su identificador.
|
|
21
|
+
*/
|
|
7
22
|
export declare const getMenuActionsDictionary: (key: keyof TypeDictionary) => string;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum `MenuActionsSlots`
|
|
3
|
+
*
|
|
4
|
+
* Define los nombres de los slots de estilo para el componente `MenuActions`. Estos slots se utilizan para
|
|
5
|
+
* aplicar estilos específicos y crear clases CSS únicas para los distintos elementos del componente.
|
|
6
|
+
*/
|
|
1
7
|
export declare enum MenuActionsSlots {
|
|
2
8
|
root = "root",
|
|
3
|
-
|
|
9
|
+
popover = "popover",
|
|
4
10
|
iconButton = "iconButton",
|
|
5
|
-
menuItem = "menuItem"
|
|
6
|
-
menuItemIcon = "menuItemIcon",
|
|
7
|
-
menuItemLabel = "menuItemLabel",
|
|
8
|
-
labelEmpty = "labelEmpty"
|
|
11
|
+
menuItem = "menuItem"
|
|
9
12
|
}
|