@m4l/components 9.2.61 → 9.2.62-B07072025beta.1
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/types.d.ts +8 -0
- package/components/AppBar/AppBar.js +12 -10
- package/components/AppBar/slots/AppBarEnum.d.ts +1 -5
- package/components/AppBar/slots/AppBarEnum.js +0 -4
- package/components/AppBar/slots/AppBarSlots.d.ts +4 -18
- package/components/AppBar/slots/AppBarSlots.js +3 -27
- package/components/AppBar/styles.js +0 -42
- package/components/AppBar/types.d.ts +8 -0
- package/components/Chip/Chip.js +9 -10
- package/components/Chip/ChipStyles.js +13 -2
- package/components/Chip/constants.d.ts +9 -0
- package/components/Chip/constants.js +6 -2
- package/components/Chip/slots/ChipEnum.d.ts +3 -0
- package/components/Chip/slots/ChipEnum.js +6 -1
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/Datagrid.styles.js +8 -13
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +99 -90
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
- package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
- package/components/DynamicFilter/store/DynamicFilterContext.js +6 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +24 -18
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
- package/components/DynamicSort/DynamicSort.styles.js +92 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
- package/components/DynamicSort/slots/DynamicSortSlots.js +7 -23
- package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
- package/components/DynamicSort/slots/SlotsEnum.js +1 -4
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +22 -17
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
- package/components/LanguagePopover/LanguagePopover.js +7 -5
- package/components/LanguagePopover/LanguagePopover.styles.js +32 -4
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
- package/components/LanguagePopover/types.d.ts +6 -1
- package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/PaperForm/styles.js +2 -1
- package/components/PropertyValue/PropertyValue.js +2 -1
- package/components/PropertyValue/PropertyValue.styles.js +7 -4
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/SideBar/SideBar.js +8 -2
- package/components/SideBar/constants.d.ts +26 -2
- package/components/SideBar/constants.js +20 -10
- package/components/SideBar/context/sideBarContext/index.js +17 -4
- package/components/SideBar/context/sideBarContext/types.d.ts +14 -1
- package/components/SideBar/helpers/getMenuDataWithState/index.js +25 -8
- package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
- package/components/SideBar/hooks/useCollapse/index.js +1 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
- package/components/SideBar/slots/SideBarEnum.d.ts +11 -11
- package/components/SideBar/slots/SideBarEnum.js +13 -15
- package/components/SideBar/slots/SideBarSlots.d.ts +15 -9
- package/components/SideBar/slots/SideBarSlots.js +50 -39
- package/components/SideBar/styles.js +4 -6
- package/components/SideBar/subcomponents/ContentComponent/index.js +13 -49
- package/components/SideBar/subcomponents/ContentComponent/style.js +148 -23
- package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/index.js +8 -15
- package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/styles.js +8 -2
- package/components/SideBar/subcomponents/FooterComponent/types.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +5 -0
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +37 -0
- package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +1 -0
- package/components/SideBar/subcomponents/HeaderComponent/index.js +1 -0
- package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/HeaderComponent/styles.js +43 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +4 -3
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +3 -35
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/index.js +51 -0
- package/components/SideBar/subcomponents/TreeGroupItems/styles.js +146 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +7 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +12 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +4 -0
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +70 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +10 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +61 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
- package/components/SideBar/types.d.ts +17 -8
- package/components/WindowBase/WindowBase.js +7 -1
- package/components/WindowBase/WindowBase.styles.js +50 -15
- package/components/WindowBase/constants.d.ts +1 -0
- package/components/WindowBase/constants.js +5 -1
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
- package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
- package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +11 -5
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
- package/components/WindowBase/types.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +13 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +26 -20
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/commercial/HamburgerMenu/HamburgerMenu.js +1 -2
- package/components/extended/React-Resizable/helpers.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
- package/components/extended/React-resizable-panels/constants.d.ts +6 -0
- package/components/extended/React-resizable-panels/constants.js +5 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +5 -4
- package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +3 -38
- package/components/mui_extended/Accordion/styles.js +10 -2
- package/components/mui_extended/Button/Button.js +3 -1
- package/components/mui_extended/Button/ButtonStyles.js +6 -1
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/Divider/index.d.ts +1 -0
- package/components/mui_extended/Divider/index.js +1 -0
- package/components/mui_extended/NavLink/NavLink.js +3 -1
- package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
- package/components/mui_extended/NavLink/types.d.ts +3 -1
- package/components/mui_extended/Tab/Tab.styles.js +2 -1
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -8
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +20 -18
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +16 -13
- package/package.json +5 -4
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
- package/storybook/components/ObjectLogs/ObjectLogs.stories.d.ts +2 -2
- package/storybook/components/SideBar/SideBar.stories.d.ts +5 -11
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/constants.d.ts +3 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +14 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +5 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +1 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +5 -0
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +1 -0
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/index.js +0 -52
- package/components/SideBar/subcomponents/ContentGroups/styles.js +0 -71
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
- package/components/SideBar/subcomponents/HeaderSidebar/index.d.ts +0 -6
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
- package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/HeaderSidebar/styles.js +0 -24
- package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +0 -5
- /package/components/SideBar/subcomponents/{FooterSidebar → FooterComponent}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export declare const LanguagePopoverRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown
|
|
2
|
-
|
|
1
|
+
export declare const LanguagePopoverRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, {}, {}>;
|
|
4
|
+
export declare const ImageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
3
7
|
export declare const PaperStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').PaperOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
8
|
ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "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" | "exportparts" | "part" | "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" | "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" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown
|
|
9
|
+
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "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" | "exportparts" | "part" | "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" | "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" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
10
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { I as Image } from "../../Image/Image.js";
|
|
3
2
|
import { M as MenuActions } from "../../MenuActions/MenuActions.js";
|
|
4
3
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "../constants.js";
|
|
5
4
|
import { l as languagePopoverStyles } from "../LanguagePopover.styles.js";
|
|
@@ -9,7 +8,7 @@ const LanguagePopoverRootStyled = styled(MenuActions, {
|
|
|
9
8
|
name: LANGUAGE_POPOVER_KEY_COMPONENT,
|
|
10
9
|
slot: LanguagePopoverSlots.root
|
|
11
10
|
})(languagePopoverStyles.root);
|
|
12
|
-
|
|
11
|
+
styled("div", {
|
|
13
12
|
name: LANGUAGE_POPOVER_KEY_COMPONENT,
|
|
14
13
|
slot: LanguagePopoverSlots.image
|
|
15
14
|
})(languagePopoverStyles.image);
|
|
@@ -18,7 +17,6 @@ const PaperStyled = styled(Paper, {
|
|
|
18
17
|
slot: LanguagePopoverSlots.paper
|
|
19
18
|
})(languagePopoverStyles.paper);
|
|
20
19
|
export {
|
|
21
|
-
ImageStyled as I,
|
|
22
20
|
LanguagePopoverRootStyled as L,
|
|
23
21
|
PaperStyled as P
|
|
24
22
|
};
|
|
@@ -17,4 +17,9 @@ export interface LanguagePopoverProps {
|
|
|
17
17
|
*/
|
|
18
18
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
19
19
|
}
|
|
20
|
-
export type
|
|
20
|
+
export type LanguagePopoverSlotsType = keyof typeof Slots;
|
|
21
|
+
export interface LanguagePopoverOwnerState {
|
|
22
|
+
size: LanguagePopoverProps['size'];
|
|
23
|
+
image?: string;
|
|
24
|
+
}
|
|
25
|
+
export type LanguagePopoverStyles = M4LOverridesStyleRules<LanguagePopoverSlotsType, typeof LANGUAGE_POPOVER_KEY_COMPONENT, Theme>;
|
|
@@ -3,8 +3,8 @@ import { L as LOADING_ERROR_KEY_COMPONENT } from "../constants.js";
|
|
|
3
3
|
import { L as LoadingErrorSlots } from "./LoadingErrorEnum.js";
|
|
4
4
|
import { l as loadingErrorStyles } from "../LoadingError.styles.js";
|
|
5
5
|
import { L as LinearProgressIndeterminate } from "../../LinearProgressIndeterminate/LinearProgressIndeterminate.js";
|
|
6
|
-
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
7
6
|
import { I as Image } from "../../Image/Image.js";
|
|
7
|
+
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
8
8
|
const LoadingErrorRootStyled = styled("div", {
|
|
9
9
|
name: LOADING_ERROR_KEY_COMPONENT,
|
|
10
10
|
slot: LoadingErrorSlots.root
|
|
@@ -56,9 +56,11 @@ const useNumberInput = (parameters) => {
|
|
|
56
56
|
(event, field, fieldValue, reason) => {
|
|
57
57
|
if (field === "value" && typeof fieldValue !== "string") {
|
|
58
58
|
switch (reason) {
|
|
59
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
59
60
|
case "numberInput:inputChange":
|
|
60
61
|
onChange?.(event, fieldValue);
|
|
61
62
|
break;
|
|
63
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
62
64
|
case "numberInput:clamp":
|
|
63
65
|
onChange?.(event, fieldValue);
|
|
64
66
|
break;
|
|
@@ -13,7 +13,8 @@ const paperFormStyles = {
|
|
|
13
13
|
borderColor: theme.vars.palette.border.default,
|
|
14
14
|
overflow: "hidden",
|
|
15
15
|
width: "100%",
|
|
16
|
-
height: "auto"
|
|
16
|
+
height: "auto",
|
|
17
|
+
container: "container / inline-size"
|
|
17
18
|
}),
|
|
18
19
|
/**
|
|
19
20
|
* ************************************************************
|
|
@@ -9,7 +9,8 @@ const propertyValueStyles = {
|
|
|
9
9
|
minWidth: `${maxWidth}px`,
|
|
10
10
|
[`@container ${CONTAINER_QUERY_NAME} (max-width: ${maxWidth - 1}px)`]: {
|
|
11
11
|
minWidth: "100px",
|
|
12
|
-
maxWidth: "100%"
|
|
12
|
+
maxWidth: "100%",
|
|
13
|
+
width: "100%"
|
|
13
14
|
}
|
|
14
15
|
});
|
|
15
16
|
const semanticStylesMap = {
|
|
@@ -44,11 +45,11 @@ const propertyValueStyles = {
|
|
|
44
45
|
display: "flex",
|
|
45
46
|
flexDirection: ownerState?.isForm ? "column" : "row",
|
|
46
47
|
justifyContent: ownerState?.isForm ? "space-between" : "left",
|
|
47
|
-
alignItems: "
|
|
48
|
+
alignItems: "center",
|
|
48
49
|
gap: theme.vars.size.baseSpacings["sp1"],
|
|
49
50
|
width: ownerState?.semanticWidth ? "auto" : "200px",
|
|
50
51
|
overflow: "hidden",
|
|
51
|
-
color: theme.palette.text.primary,
|
|
52
|
+
color: theme.vars.palette.text.primary,
|
|
52
53
|
paddingTop: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
|
|
53
54
|
paddingBottom: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
|
|
54
55
|
borderBottom: !ownerState?.isForm ? `${theme.vars.palette.border.disabled} solid 1px` : "none",
|
|
@@ -61,6 +62,7 @@ const propertyValueStyles = {
|
|
|
61
62
|
...theme.generalSettings.isMobile && {
|
|
62
63
|
flexDirection: "column"
|
|
63
64
|
},
|
|
65
|
+
minHeight: theme.vars.size.baseSpacings.sp5,
|
|
64
66
|
...semanticStyle
|
|
65
67
|
};
|
|
66
68
|
},
|
|
@@ -71,7 +73,7 @@ const propertyValueStyles = {
|
|
|
71
73
|
display: "flex",
|
|
72
74
|
alignItems: "center",
|
|
73
75
|
fontSize: theme.typography.body2.fontSize,
|
|
74
|
-
color: theme.palette.text.primary,
|
|
76
|
+
color: theme.vars.palette.text.primary,
|
|
75
77
|
gap: theme.vars.size.baseSpacings["sp1"],
|
|
76
78
|
overflow: "hidden",
|
|
77
79
|
width: "100%"
|
|
@@ -83,6 +85,7 @@ const propertyValueStyles = {
|
|
|
83
85
|
width: "100%",
|
|
84
86
|
display: "flex",
|
|
85
87
|
justifyContent: "flex-start",
|
|
88
|
+
alignItems: "center",
|
|
86
89
|
overflow: "hidden",
|
|
87
90
|
height: ownerState?.valueHeight ? ownerState?.valueHeight : "auto",
|
|
88
91
|
...ownerState?.isForm && {
|
|
@@ -91,6 +91,10 @@ export interface PropertyVaLueOwnerState extends Pick<PropertyValueProps, 'disab
|
|
|
91
91
|
* Indica si el componente está en modo formulario.
|
|
92
92
|
*/
|
|
93
93
|
isForm: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Tamaño del componente.
|
|
96
|
+
*/
|
|
97
|
+
size?: PropertyValueProps['size'];
|
|
94
98
|
/**
|
|
95
99
|
* Propiedades adicionales para estilos o comportamientos personalizados.
|
|
96
100
|
*/
|
|
@@ -23,7 +23,10 @@ const SideBar = memo((props) => {
|
|
|
23
23
|
expandedWidth = "230px",
|
|
24
24
|
companyName,
|
|
25
25
|
companySlogan,
|
|
26
|
-
urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}
|
|
26
|
+
urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}`,
|
|
27
|
+
headerComponent,
|
|
28
|
+
footerComponent,
|
|
29
|
+
variant = "host"
|
|
27
30
|
} = props;
|
|
28
31
|
const menuDataWithState = useMemo(() => getMenuDataWithState({ menuData: menuData ?? getDataToSkeleton(), moduleSelectedId }), [menuData, moduleSelectedId]);
|
|
29
32
|
const isMobile = useIsMobile();
|
|
@@ -44,7 +47,10 @@ const SideBar = memo((props) => {
|
|
|
44
47
|
expandedWidth,
|
|
45
48
|
companyName,
|
|
46
49
|
companySlogan,
|
|
47
|
-
urlIconPrefix
|
|
50
|
+
urlIconPrefix,
|
|
51
|
+
variant,
|
|
52
|
+
headerComponent,
|
|
53
|
+
footerComponent
|
|
48
54
|
},
|
|
49
55
|
children: !isMobile ? /* @__PURE__ */ jsx(SideBarDesktop, {}) : /* @__PURE__ */ jsx(SideBarMobile, {})
|
|
50
56
|
}
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
+
import { HeaderSidebarSlots, ContentGroupsSlots, SideBarDesktopSlots, SideBarFooterSlots, SideBarMobileSlots, ContentComponentSlots } from './slots/SideBarEnum';
|
|
1
2
|
export declare const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
|
|
2
3
|
export declare const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
3
4
|
export declare const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
|
-
export declare const ITEM_ACTIVE = "M4LItemActive";
|
|
5
|
-
export declare const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
|
|
6
5
|
export declare const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
7
6
|
export declare const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
8
7
|
export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
8
|
+
export declare const ALL_SIDEBAR_SLOTS: {
|
|
9
|
+
contentComponentRoot: ContentComponentSlots.contentComponentRoot;
|
|
10
|
+
containerTreeItemsHeaderFooter: ContentComponentSlots.containerTreeItemsHeaderFooter;
|
|
11
|
+
containerNodeMenuItem: ContentComponentSlots.containerNodeMenuItem;
|
|
12
|
+
containerNodeMenuItemMain: ContentComponentSlots.containerNodeMenuItemMain;
|
|
13
|
+
menuItemMain: ContentComponentSlots.menuItemMain;
|
|
14
|
+
containerFooter: SideBarFooterSlots.containerFooter;
|
|
15
|
+
headerContainerComponent: HeaderSidebarSlots.headerContainerComponent;
|
|
16
|
+
buttonAnchored: HeaderSidebarSlots.buttonAnchored;
|
|
17
|
+
containerTreeGroupItems: ContentGroupsSlots.containerTreeGroupItems;
|
|
18
|
+
containerContentGroups: ContentGroupsSlots.containerContentGroups;
|
|
19
|
+
containerContentTitle: ContentGroupsSlots.containerContentTitle;
|
|
20
|
+
containerContentNavItems: ContentGroupsSlots.containerContentNavItems;
|
|
21
|
+
containerContentItem: ContentGroupsSlots.containerContentItem;
|
|
22
|
+
containerArrowIconRoot: ContentGroupsSlots.containerArrowIconRoot;
|
|
23
|
+
containerAdornmentIcon: ContentGroupsSlots.containerAdornmentIcon;
|
|
24
|
+
backgroundAdornmentIcon: ContentGroupsSlots.backgroundAdornmentIcon;
|
|
25
|
+
containerSideBarMobile: SideBarMobileSlots.containerSideBarMobile;
|
|
26
|
+
containerDesktopRoot: SideBarDesktopSlots.containerDesktopRoot;
|
|
27
|
+
containerDesktopContent: SideBarDesktopSlots.containerDesktopContent;
|
|
28
|
+
};
|
|
29
|
+
export declare const CLASS_NAME_IS_ROOT = "is-root";
|
|
30
|
+
export declare const CLASS_NAME_MENU_ACTIVE = "menu-active";
|
|
31
|
+
export declare const CLASS_NAME_ITEM_IN_TREE_ACTIVE = "item-in-tree-active";
|
|
32
|
+
export declare const CLASS_NAME_HAS_CHILDREN = "has-children";
|
|
@@ -1,18 +1,28 @@
|
|
|
1
|
+
import { C as ContentComponentSlots, S as SideBarFooterSlots, H as HeaderSidebarSlots, a as ContentGroupsSlots, b as SideBarMobileSlots, c as SideBarDesktopSlots } from "./slots/SideBarEnum.js";
|
|
1
2
|
const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
|
|
2
|
-
const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
3
|
-
const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
|
-
const ITEM_ACTIVE = "M4LItemActive";
|
|
5
|
-
const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
|
|
6
3
|
const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
7
4
|
const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
8
5
|
const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
6
|
+
const ALL_SIDEBAR_SLOTS = {
|
|
7
|
+
...SideBarDesktopSlots,
|
|
8
|
+
...SideBarMobileSlots,
|
|
9
|
+
...ContentGroupsSlots,
|
|
10
|
+
...HeaderSidebarSlots,
|
|
11
|
+
...SideBarFooterSlots,
|
|
12
|
+
...ContentComponentSlots
|
|
13
|
+
};
|
|
14
|
+
const CLASS_NAME_IS_ROOT = "is-root";
|
|
15
|
+
const CLASS_NAME_MENU_ACTIVE = "menu-active";
|
|
16
|
+
const CLASS_NAME_ITEM_IN_TREE_ACTIVE = "item-in-tree-active";
|
|
17
|
+
const CLASS_NAME_HAS_CHILDREN = "has-children";
|
|
9
18
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
LIST_MENU_ITEM as L,
|
|
19
|
+
ALL_SIDEBAR_SLOTS as A,
|
|
20
|
+
CLASS_NAME_IS_ROOT as C,
|
|
13
21
|
PATH_ICONS as P,
|
|
14
22
|
SIDEBAR_KEY_COMPONENT as S,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
CLASS_NAME_MENU_ACTIVE as a,
|
|
24
|
+
CLASS_NAME_ITEM_IN_TREE_ACTIVE as b,
|
|
25
|
+
PATH_ARROW_RIGHT_ICON as c,
|
|
26
|
+
PATH_ARROW_DOWN_ICON as d,
|
|
27
|
+
CLASS_NAME_HAS_CHILDREN as e
|
|
18
28
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { createContext } from "react";
|
|
3
|
+
import { g as getComponentClasses } from "../../../../utils/getComponentSlotRoot.js";
|
|
4
|
+
import { A as ALL_SIDEBAR_SLOTS, S as SIDEBAR_KEY_COMPONENT } from "../../constants.js";
|
|
5
|
+
const classes = getComponentClasses(SIDEBAR_KEY_COMPONENT, ALL_SIDEBAR_SLOTS);
|
|
3
6
|
const initialState = {
|
|
4
7
|
anchored: false,
|
|
5
8
|
visible: true,
|
|
@@ -14,7 +17,10 @@ const initialState = {
|
|
|
14
17
|
},
|
|
15
18
|
expandedWidth: "",
|
|
16
19
|
companyName: "",
|
|
17
|
-
companySlogan: ""
|
|
20
|
+
companySlogan: "",
|
|
21
|
+
classes,
|
|
22
|
+
headerComponent: /* @__PURE__ */ jsx(Fragment, {}),
|
|
23
|
+
footerComponent: /* @__PURE__ */ jsx(Fragment, {})
|
|
18
24
|
};
|
|
19
25
|
const SideBarContext = createContext(initialState);
|
|
20
26
|
const SideBarProvider = (props) => {
|
|
@@ -32,7 +38,10 @@ const SideBarProvider = (props) => {
|
|
|
32
38
|
moduleSelectedId,
|
|
33
39
|
companyName,
|
|
34
40
|
companySlogan,
|
|
35
|
-
urlIconPrefix
|
|
41
|
+
urlIconPrefix,
|
|
42
|
+
headerComponent,
|
|
43
|
+
footerComponent,
|
|
44
|
+
variant
|
|
36
45
|
} = value;
|
|
37
46
|
return (
|
|
38
47
|
// Proporcionar el contexto con las propiedades desestructuradas
|
|
@@ -52,7 +61,11 @@ const SideBarProvider = (props) => {
|
|
|
52
61
|
expandedWidth,
|
|
53
62
|
companyName,
|
|
54
63
|
companySlogan,
|
|
55
|
-
urlIconPrefix
|
|
64
|
+
urlIconPrefix,
|
|
65
|
+
classes,
|
|
66
|
+
headerComponent,
|
|
67
|
+
footerComponent,
|
|
68
|
+
variant
|
|
56
69
|
},
|
|
57
70
|
children
|
|
58
71
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { IMenuDataWithState, SideBarProps } from '../../types';
|
|
3
|
+
import { ALL_SIDEBAR_SLOTS } from '../../constants';
|
|
3
4
|
/**
|
|
4
5
|
* Valor proporcionado por el proveedor del contexto Sidebar.
|
|
5
6
|
*/
|
|
@@ -9,13 +10,25 @@ export interface SideBarProviderValue extends SideBarProps {
|
|
|
9
10
|
*/
|
|
10
11
|
anchored: boolean;
|
|
11
12
|
menuData: Array<IMenuDataWithState>;
|
|
13
|
+
/**
|
|
14
|
+
* Las clases asociadas al proveedor del contexto Sidebar.
|
|
15
|
+
*/
|
|
16
|
+
classes: Record<keyof typeof ALL_SIDEBAR_SLOTS, string>;
|
|
17
|
+
/**
|
|
18
|
+
* Promoción del sidebar, se renderiza en el footer del sidebar
|
|
19
|
+
*/
|
|
20
|
+
footerComponent: SideBarProps['footerComponent'];
|
|
12
21
|
}
|
|
13
22
|
/**
|
|
14
23
|
* Propiedades para el proveedor del contexto Sidebar.
|
|
15
24
|
*/
|
|
16
25
|
export interface SideBarProviderProps {
|
|
17
26
|
/** value contendrá el valor que se proporcionará en el contexto*/
|
|
18
|
-
value: Omit<SideBarProviderValue, 'collapsed'>;
|
|
27
|
+
value: Omit<SideBarProviderValue, 'collapsed' | 'classes' | 'isHover' | 'setIsHover'>;
|
|
19
28
|
/** children contendrá los elementos secundarios que estarán dentro del ámbito del proveedor del contexto.*/
|
|
20
29
|
children: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Promoción del sidebar, se renderiza en el footer del sidebar
|
|
32
|
+
*/
|
|
33
|
+
promotion?: SideBarProps['footerComponent'];
|
|
21
34
|
}
|
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
const getMenuDataWithState = ({ menuData, moduleSelectedId, initialLevel = 0 }) => {
|
|
2
2
|
const newMenuDataItems = menuData.map((item) => {
|
|
3
3
|
if (!item.children && item.moduleId === moduleSelectedId) {
|
|
4
|
-
return { ...item, active: true, itemInTreeActive:
|
|
4
|
+
return { ...item, active: true, itemInTreeActive: false };
|
|
5
5
|
}
|
|
6
6
|
if (item.children) {
|
|
7
7
|
let childrenItem = getMenuDataWithState({ menuData: item.children, moduleSelectedId, initialLevel: initialLevel + 1 });
|
|
8
8
|
const indexTrue = childrenItem.findIndex((child) => child.active === true);
|
|
9
9
|
if (initialLevel === 0) {
|
|
10
|
-
return { ...item, children: childrenItem };
|
|
10
|
+
return { ...item, children: childrenItem, active: false, itemInTreeActive: false };
|
|
11
11
|
}
|
|
12
12
|
if (indexTrue !== -1) {
|
|
13
|
-
childrenItem = childrenItem.map((child, index) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
childrenItem = childrenItem.map((child, index) => {
|
|
14
|
+
if (child.active) {
|
|
15
|
+
return { ...child, itemInTreeActive: false };
|
|
16
|
+
}
|
|
17
|
+
if (!child.active && !(child.children?.length ?? 0 > 0)) {
|
|
18
|
+
return { ...child, itemInTreeActive: true, active: false };
|
|
19
|
+
}
|
|
20
|
+
if (index <= indexTrue) {
|
|
21
|
+
return {
|
|
22
|
+
...child,
|
|
23
|
+
itemInTreeActive: true,
|
|
24
|
+
active: false
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return { ...child, itemInTreeActive: false, active: false };
|
|
28
|
+
});
|
|
17
29
|
}
|
|
18
|
-
const status = indexTrue >= 0
|
|
19
|
-
return {
|
|
30
|
+
const status = indexTrue >= 0;
|
|
31
|
+
return {
|
|
32
|
+
...item,
|
|
33
|
+
children: childrenItem,
|
|
34
|
+
itemInTreeActive: status,
|
|
35
|
+
active: status && !!item.children
|
|
36
|
+
};
|
|
20
37
|
}
|
|
21
38
|
return { ...item, active: false, itemInTreeActive: false };
|
|
22
39
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useCollapse } from './useCollapse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IMenuDataWithState } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook para manejar el estado de colapso de un item del menu
|
|
4
|
+
* @param {IMenuDataWithState} item - Item del menu
|
|
5
|
+
* @returns {Object} - Objeto con el estado de colapso, el manejador de click y si el item tiene hijos
|
|
6
|
+
*/
|
|
7
|
+
export declare const useCollapse: (item: IMenuDataWithState, defaultOpen?: boolean) => {
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
handlerClick: () => void;
|
|
10
|
+
hasChildren: boolean | undefined;
|
|
11
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import { u as useSideBar } from "../useSideBar/index.js";
|
|
3
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
4
|
+
const useCollapse = (item, defaultOpen = false) => {
|
|
5
|
+
const { onMenuItemClick, onToggleVisible } = useSideBar();
|
|
6
|
+
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
7
|
+
const isMobile = useIsMobile();
|
|
8
|
+
const hasChildren = item.children && Array.isArray(item.children) && item.children.length > 0;
|
|
9
|
+
const handlerClick = () => {
|
|
10
|
+
onMenuItemClick(item);
|
|
11
|
+
setIsOpen(!isOpen);
|
|
12
|
+
if (isMobile && (!hasChildren || hasChildren === void 0)) {
|
|
13
|
+
onToggleVisible(true);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setIsOpen(defaultOpen);
|
|
18
|
+
}, [defaultOpen]);
|
|
19
|
+
return { isOpen, handlerClick, hasChildren };
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
useCollapse as u
|
|
23
|
+
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
export declare enum SideBarDesktopSlots {
|
|
2
2
|
containerDesktopRoot = "containerDesktopRoot",
|
|
3
|
-
containerDesktopContent = "containerDesktopContent"
|
|
4
|
-
containerBtnAnchored = "containerBtnAnchored"
|
|
3
|
+
containerDesktopContent = "containerDesktopContent"
|
|
5
4
|
}
|
|
6
5
|
export declare enum SideBarMobileSlots {
|
|
7
6
|
containerSideBarMobile = "containerSideBarMobile"
|
|
8
7
|
}
|
|
9
8
|
export declare enum ContentGroupsSlots {
|
|
10
|
-
|
|
9
|
+
containerTreeGroupItems = "containerTreeGroupItems",
|
|
11
10
|
containerContentGroups = "containerContentGroups",
|
|
12
11
|
containerContentTitle = "containerContentTitle",
|
|
13
12
|
containerContentNavItems = "containerContentNavItems",
|
|
14
13
|
containerContentItem = "containerContentItem",
|
|
15
|
-
containerArrowIconRoot = "containerArrowIconRoot"
|
|
14
|
+
containerArrowIconRoot = "containerArrowIconRoot",
|
|
15
|
+
containerAdornmentIcon = "containerAdornmentIcon",
|
|
16
|
+
backgroundAdornmentIcon = "backgroundAdornmentIcon"
|
|
16
17
|
}
|
|
17
18
|
export declare enum HeaderSidebarSlots {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
headerContainerComponent = "headerContainerComponent",
|
|
20
|
+
buttonAnchored = "buttonAnchored"
|
|
20
21
|
}
|
|
21
22
|
export declare enum SideBarFooterSlots {
|
|
22
23
|
containerFooter = "containerFooter"
|
|
23
24
|
}
|
|
24
25
|
export declare enum ContentComponentSlots {
|
|
25
26
|
contentComponentRoot = "contentComponentRoot",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
containerMenuItems = "containerMenuItems"
|
|
27
|
+
containerTreeItemsHeaderFooter = "containerTreeItemsHeaderFooter",
|
|
28
|
+
containerNodeMenuItem = "containerNodeMenuItem",
|
|
29
|
+
containerNodeMenuItemMain = "containerNodeMenuItemMain",
|
|
30
|
+
menuItemMain = "menuItemMain"
|
|
31
31
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
var SideBarDesktopSlots = /* @__PURE__ */ ((SideBarDesktopSlots2) => {
|
|
2
2
|
SideBarDesktopSlots2["containerDesktopRoot"] = "containerDesktopRoot";
|
|
3
3
|
SideBarDesktopSlots2["containerDesktopContent"] = "containerDesktopContent";
|
|
4
|
-
SideBarDesktopSlots2["containerBtnAnchored"] = "containerBtnAnchored";
|
|
5
4
|
return SideBarDesktopSlots2;
|
|
6
5
|
})(SideBarDesktopSlots || {});
|
|
7
6
|
var SideBarMobileSlots = /* @__PURE__ */ ((SideBarMobileSlots2) => {
|
|
@@ -9,17 +8,19 @@ var SideBarMobileSlots = /* @__PURE__ */ ((SideBarMobileSlots2) => {
|
|
|
9
8
|
return SideBarMobileSlots2;
|
|
10
9
|
})(SideBarMobileSlots || {});
|
|
11
10
|
var ContentGroupsSlots = /* @__PURE__ */ ((ContentGroupsSlots2) => {
|
|
12
|
-
ContentGroupsSlots2["
|
|
11
|
+
ContentGroupsSlots2["containerTreeGroupItems"] = "containerTreeGroupItems";
|
|
13
12
|
ContentGroupsSlots2["containerContentGroups"] = "containerContentGroups";
|
|
14
13
|
ContentGroupsSlots2["containerContentTitle"] = "containerContentTitle";
|
|
15
14
|
ContentGroupsSlots2["containerContentNavItems"] = "containerContentNavItems";
|
|
16
15
|
ContentGroupsSlots2["containerContentItem"] = "containerContentItem";
|
|
17
16
|
ContentGroupsSlots2["containerArrowIconRoot"] = "containerArrowIconRoot";
|
|
17
|
+
ContentGroupsSlots2["containerAdornmentIcon"] = "containerAdornmentIcon";
|
|
18
|
+
ContentGroupsSlots2["backgroundAdornmentIcon"] = "backgroundAdornmentIcon";
|
|
18
19
|
return ContentGroupsSlots2;
|
|
19
20
|
})(ContentGroupsSlots || {});
|
|
20
21
|
var HeaderSidebarSlots = /* @__PURE__ */ ((HeaderSidebarSlots2) => {
|
|
21
|
-
HeaderSidebarSlots2["
|
|
22
|
-
HeaderSidebarSlots2["
|
|
22
|
+
HeaderSidebarSlots2["headerContainerComponent"] = "headerContainerComponent";
|
|
23
|
+
HeaderSidebarSlots2["buttonAnchored"] = "buttonAnchored";
|
|
23
24
|
return HeaderSidebarSlots2;
|
|
24
25
|
})(HeaderSidebarSlots || {});
|
|
25
26
|
var SideBarFooterSlots = /* @__PURE__ */ ((SideBarFooterSlots2) => {
|
|
@@ -28,20 +29,17 @@ var SideBarFooterSlots = /* @__PURE__ */ ((SideBarFooterSlots2) => {
|
|
|
28
29
|
})(SideBarFooterSlots || {});
|
|
29
30
|
var ContentComponentSlots = /* @__PURE__ */ ((ContentComponentSlots2) => {
|
|
30
31
|
ContentComponentSlots2["contentComponentRoot"] = "contentComponentRoot";
|
|
31
|
-
ContentComponentSlots2["
|
|
32
|
-
ContentComponentSlots2["
|
|
32
|
+
ContentComponentSlots2["containerTreeItemsHeaderFooter"] = "containerTreeItemsHeaderFooter";
|
|
33
|
+
ContentComponentSlots2["containerNodeMenuItem"] = "containerNodeMenuItem";
|
|
34
|
+
ContentComponentSlots2["containerNodeMenuItemMain"] = "containerNodeMenuItemMain";
|
|
35
|
+
ContentComponentSlots2["menuItemMain"] = "menuItemMain";
|
|
33
36
|
return ContentComponentSlots2;
|
|
34
37
|
})(ContentComponentSlots || {});
|
|
35
|
-
var ContainerMenuItemsMainSlots = /* @__PURE__ */ ((ContainerMenuItemsMainSlots2) => {
|
|
36
|
-
ContainerMenuItemsMainSlots2["containerMenuItems"] = "containerMenuItems";
|
|
37
|
-
return ContainerMenuItemsMainSlots2;
|
|
38
|
-
})(ContainerMenuItemsMainSlots || {});
|
|
39
38
|
export {
|
|
40
39
|
ContentComponentSlots as C,
|
|
41
40
|
HeaderSidebarSlots as H,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
ContainerMenuItemsMainSlots as d
|
|
41
|
+
SideBarFooterSlots as S,
|
|
42
|
+
ContentGroupsSlots as a,
|
|
43
|
+
SideBarMobileSlots as b,
|
|
44
|
+
SideBarDesktopSlots as c
|
|
47
45
|
};
|