@m4l/components 9.2.62-B10072025beta.1 → 9.2.62-JT08072025.beta.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/components/AppBar/AppBar.js +10 -12
- package/components/AppBar/constants.d.ts +1 -1
- package/components/AppBar/constants.js +1 -1
- package/components/AppBar/slots/AppBarEnum.d.ts +5 -1
- package/components/AppBar/slots/AppBarEnum.js +4 -0
- package/components/AppBar/slots/AppBarSlots.d.ts +18 -4
- package/components/AppBar/slots/AppBarSlots.js +27 -3
- package/components/AppBar/styles.js +42 -0
- package/components/AppBar/types.d.ts +0 -8
- package/components/DataGrid/Datagrid.styles.js +12 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +6 -42
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.d.ts +8 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderIcon.js +58 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.d.ts +7 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/helpers/renderMultipleIcons.js +19 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +10 -3
- package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +2 -2
- package/components/DataGrid/slots/DataGridEnum.d.ts +3 -0
- package/components/DataGrid/slots/DataGridEnum.js +6 -1
- package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
- package/components/DataGrid/slots/DataGridSlot.js +24 -19
- package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Density/index.js +2 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/RowsCount/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +2 -1
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
- package/components/DataGrid/subcomponents/Table/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
- package/components/DataGrid/types.d.ts +3 -2
- package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
- package/components/ObjectLogs/ObjectLogs.styles.js +2 -1
- package/components/ObjectLogs/slots/ObjectLogsEnum.d.ts +1 -0
- package/components/ObjectLogs/slots/ObjectLogsEnum.js +1 -0
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +3 -0
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +7 -2
- package/components/SideBar/SideBar.js +2 -6
- package/components/SideBar/constants.d.ts +6 -7
- package/components/SideBar/constants.js +7 -7
- package/components/SideBar/context/sideBarContext/index.js +10 -9
- package/components/SideBar/context/sideBarContext/types.d.ts +10 -2
- package/components/SideBar/slots/SideBarEnum.d.ts +7 -7
- package/components/SideBar/slots/SideBarEnum.js +5 -5
- package/components/SideBar/slots/SideBarSlots.d.ts +9 -9
- package/components/SideBar/slots/SideBarSlots.js +28 -31
- package/components/SideBar/styles.js +3 -3
- package/components/SideBar/subcomponents/ContentComponent/index.js +68 -12
- package/components/SideBar/subcomponents/ContentComponent/style.js +103 -122
- package/components/SideBar/subcomponents/HeaderSidebar/index.d.ts +6 -0
- package/components/SideBar/subcomponents/HeaderSidebar/styles.d.ts +2 -0
- package/components/SideBar/subcomponents/HeaderSidebar/styles.js +24 -0
- package/components/SideBar/subcomponents/HeaderSidebar/types.d.ts +5 -0
- package/components/SideBar/subcomponents/{FooterComponent → Promotion}/index.d.ts +1 -1
- package/components/SideBar/subcomponents/{FooterComponent → Promotion}/index.js +4 -4
- package/components/SideBar/subcomponents/{FooterComponent → Promotion}/styles.js +2 -8
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +3 -4
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +32 -4
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.js +3 -4
- package/components/SideBar/subcomponents/TreeGroupItems/styles.js +2 -90
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +4 -6
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +0 -1
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +3 -8
- package/components/SideBar/types.d.ts +7 -12
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/commercial/HamburgerMenu/HamburgerMenu.js +2 -1
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +7 -4
- package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +9 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.d.ts +2 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterEnum.js +1 -0
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.d.ts +3 -0
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +6 -1
- package/components/formatters/BooleanFormatter/types.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
- package/components/hook-form/RHFPeriod/subcomponents/Period/dictionary.js +4 -5
- package/components/mui_extended/MenuItem/MenuItem.js +1 -1
- package/components/mui_extended/TabContent/TabContent.js +2 -2
- package/components/mui_extended/TabContent/TabContent.styles.js +1 -1
- package/components/mui_extended/TabContent/types.d.ts +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +1 -1
- package/package.json +3 -3
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/icons.d.ts +6 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +9 -0
- package/storybook/components/SideBar/SideBar.stories.d.ts +11 -5
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
- package/utils/getSizeStyles/getSizeStyles.d.ts +1 -1
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.d.ts +0 -5
- package/components/SideBar/subcomponents/HeaderComponent/HeaderComponent.js +0 -37
- package/components/SideBar/subcomponents/HeaderComponent/index.d.ts +0 -1
- package/components/SideBar/subcomponents/HeaderComponent/index.js +0 -1
- package/components/SideBar/subcomponents/HeaderComponent/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/HeaderComponent/styles.js +0 -44
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.d.ts +0 -7
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/AdormentIcon.js +0 -12
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/AdormentIcon/types.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/FooterComponentHost.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentHost/index.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.d.ts +0 -4
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/FooterComponentMicrofrontend.stories.d.ts +0 -14
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/FooterComponentMicrofrontend/index.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/HeaderComponentHost.d.ts +0 -5
- package/storybook/components/SideBar/subcomponents/HeaderComponentHost/constants.d.ts +0 -1
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/HeaderComponentMicrofrontend.d.ts +0 -5
- package/storybook/components/SideBar/subcomponents/HeaderComponentMicrofrontend/constants.d.ts +0 -1
- /package/components/SideBar/subcomponents/{FooterComponent → Promotion}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{FooterComponent → Promotion}/types.d.ts +0 -0
- /package/storybook/components/SideBar/subcomponents/{FooterComponentHost → FooterPromotion}/constants.d.ts +0 -0
|
@@ -3,11 +3,11 @@ import { useIsMobile } from "@m4l/graphics";
|
|
|
3
3
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
|
|
5
5
|
import { g as getNameDataTestId } from "./tests/utils.js";
|
|
6
|
-
import { A as AppBarRootStyled, M as MenuIconButtonStyled,
|
|
6
|
+
import { A as AppBarRootStyled, C as ContainerIsotypeNameStyled, a as ContentIsotypeStyled, I as ImageIsotypeStyled, b as CompanyNameStyled, D as DividerStyled, M as MenuIconButtonStyled, c as ContentStyled } from "./slots/AppBarSlots.js";
|
|
7
7
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
8
8
|
import { P as PATH_IMG_HAMBURGUER, A as APP_BAR_KEY } from "./constants.js";
|
|
9
9
|
const AppBar = (props) => {
|
|
10
|
-
const { onToggleVisible,
|
|
10
|
+
const { onToggleVisible, children, companyLogo, companyName, dataTestid, size } = props;
|
|
11
11
|
const isMobile = useIsMobile();
|
|
12
12
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
13
13
|
const { getLabel } = useModuleDictionary();
|
|
@@ -22,6 +22,13 @@ const AppBar = (props) => {
|
|
|
22
22
|
className: classRoot,
|
|
23
23
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(dataTestid) } : {},
|
|
24
24
|
children: [
|
|
25
|
+
!isMobile ? /* @__PURE__ */ jsxs(ContainerIsotypeNameStyled, { children: [
|
|
26
|
+
/* @__PURE__ */ jsxs(ContentIsotypeStyled, { children: [
|
|
27
|
+
companyLogo && /* @__PURE__ */ jsx(ImageIsotypeStyled, { alt: "logo", src: companyLogo, size }),
|
|
28
|
+
/* @__PURE__ */ jsx(CompanyNameStyled, { variant: "bodyDens", skeletonWidth: "100px", size, children: companyName })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsx(DividerStyled, { orientation: "vertical", flexItem: true })
|
|
31
|
+
] }) : null,
|
|
25
32
|
isMobile ? /* @__PURE__ */ jsx(
|
|
26
33
|
MenuIconButtonStyled,
|
|
27
34
|
{
|
|
@@ -30,16 +37,7 @@ const AppBar = (props) => {
|
|
|
30
37
|
src: `${host_static_assets}/${environment_assets}/${PATH_IMG_HAMBURGUER}`,
|
|
31
38
|
onClick: onToggleVisible
|
|
32
39
|
}
|
|
33
|
-
) :
|
|
34
|
-
MenuIconButtonStyled,
|
|
35
|
-
{
|
|
36
|
-
src: `${host_static_assets}/${environment_assets}/${PATH_IMG_HAMBURGUER}`,
|
|
37
|
-
onClick: onToggleAnchored,
|
|
38
|
-
rotationAngle: sidebarAnchored ? 0 : 180,
|
|
39
|
-
variant: "contained",
|
|
40
|
-
role: "anchored-button"
|
|
41
|
-
}
|
|
42
|
-
),
|
|
40
|
+
) : null,
|
|
43
41
|
/* @__PURE__ */ jsx(
|
|
44
42
|
ContentStyled,
|
|
45
43
|
{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const APP_BAR_KEY = "M4LAppBar";
|
|
2
|
-
export declare const PATH_IMG_HAMBURGUER = "frontend/components/
|
|
2
|
+
export declare const PATH_IMG_HAMBURGUER = "frontend/components/settings/assets/icons/options.svg";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const APP_BAR_KEY = "M4LAppBar";
|
|
2
|
-
const PATH_IMG_HAMBURGUER = "frontend/components/
|
|
2
|
+
const PATH_IMG_HAMBURGUER = "frontend/components/settings/assets/icons/options.svg";
|
|
3
3
|
export {
|
|
4
4
|
APP_BAR_KEY as A,
|
|
5
5
|
PATH_IMG_HAMBURGUER as P
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare enum AppBarSlots {
|
|
2
2
|
appBarRoot = "appBarRoot",
|
|
3
3
|
containerIsotypeName = "containerIsotypeName",
|
|
4
|
+
imageIsotype = "imageIsotype",
|
|
5
|
+
companyName = "companyName",
|
|
4
6
|
menuIconButton = "menuIconButton",
|
|
5
|
-
content = "content"
|
|
7
|
+
content = "content",
|
|
8
|
+
contentIsoType = "contentIsoType",
|
|
9
|
+
divider = "divider"
|
|
6
10
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
var AppBarSlots = /* @__PURE__ */ ((AppBarSlots2) => {
|
|
2
2
|
AppBarSlots2["appBarRoot"] = "appBarRoot";
|
|
3
3
|
AppBarSlots2["containerIsotypeName"] = "containerIsotypeName";
|
|
4
|
+
AppBarSlots2["imageIsotype"] = "imageIsotype";
|
|
5
|
+
AppBarSlots2["companyName"] = "companyName";
|
|
4
6
|
AppBarSlots2["menuIconButton"] = "menuIconButton";
|
|
5
7
|
AppBarSlots2["content"] = "content";
|
|
8
|
+
AppBarSlots2["contentIsoType"] = "contentIsoType";
|
|
9
|
+
AppBarSlots2["divider"] = "divider";
|
|
6
10
|
return AppBarSlots2;
|
|
7
11
|
})(AppBarSlots || {});
|
|
8
12
|
export {
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
export declare const AppBarRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material
|
|
1
|
+
export declare const AppBarRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
2
|
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
3
3
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, keyof import('react').HTMLAttributes<HTMLElement> | keyof import('react').ClassAttributes<HTMLElement>>, {}>;
|
|
4
|
-
export declare const ContainerIsotypeNameStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material
|
|
4
|
+
export declare const ContainerIsotypeNameStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
5
|
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
6
6
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const ImageIsotypeStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Image').ImageProps, keyof import('../../Image').ImageProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
8
|
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
9
9
|
}, {}, {}>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const CompanyNameStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
11
|
+
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
export declare const MenuIconButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "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" | "instaceDataTestId" | "placement" | "rotationAngle" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeProps" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
14
|
+
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export declare const ContentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
11
17
|
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
12
18
|
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
19
|
+
export declare const ContentIsotypeStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
20
|
+
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
21
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
22
|
+
export declare const DividerStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').DividerOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
|
|
23
|
+
ref?: ((instance: HTMLHRElement | 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<HTMLHRElement> | null | undefined;
|
|
24
|
+
}, "children" | "light" | "style" | "absolute" | "variant" | "textAlign" | "className" | "classes" | "sx" | "orientation" | "flexItem">, "children" | "ref" | "title" | "id" | "light" | "hidden" | "color" | "content" | "style" | "absolute" | "variant" | "textAlign" | "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" | "orientation" | "flexItem"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
25
|
+
ownerState?: (Partial<import('../types').AppBarOwnerState> & Record<string, unknown>) | undefined;
|
|
26
|
+
}, {}, {}>;
|
|
@@ -2,15 +2,26 @@ import { styled } from "@mui/material/styles";
|
|
|
2
2
|
import { A as APP_BAR_KEY } from "../constants.js";
|
|
3
3
|
import { A as AppBarSlots } from "./AppBarEnum.js";
|
|
4
4
|
import { a as appBarStyles } from "../styles.js";
|
|
5
|
+
import { Divider } from "@mui/material";
|
|
6
|
+
import { I as Image } from "../../Image/Image.js";
|
|
7
|
+
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
5
8
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
6
9
|
const AppBarRootStyled = styled("header", {
|
|
7
10
|
name: APP_BAR_KEY,
|
|
8
11
|
slot: AppBarSlots.appBarRoot
|
|
9
12
|
})(appBarStyles?.appBarRoot);
|
|
10
|
-
styled("div", {
|
|
13
|
+
const ContainerIsotypeNameStyled = styled("div", {
|
|
11
14
|
name: APP_BAR_KEY,
|
|
12
15
|
slot: AppBarSlots.containerIsotypeName
|
|
13
16
|
})(appBarStyles?.containerIsotypeName);
|
|
17
|
+
const ImageIsotypeStyled = styled(Image, {
|
|
18
|
+
name: APP_BAR_KEY,
|
|
19
|
+
slot: AppBarSlots.imageIsotype
|
|
20
|
+
})(appBarStyles?.imageIsotype);
|
|
21
|
+
const CompanyNameStyled = styled(Typography, {
|
|
22
|
+
name: APP_BAR_KEY,
|
|
23
|
+
slot: AppBarSlots.companyName
|
|
24
|
+
})(appBarStyles?.companyName);
|
|
14
25
|
const MenuIconButtonStyled = styled(IconButton, {
|
|
15
26
|
name: APP_BAR_KEY,
|
|
16
27
|
slot: AppBarSlots.menuIconButton
|
|
@@ -19,8 +30,21 @@ const ContentStyled = styled("div", {
|
|
|
19
30
|
name: APP_BAR_KEY,
|
|
20
31
|
slot: AppBarSlots.content
|
|
21
32
|
})(appBarStyles?.content);
|
|
33
|
+
const ContentIsotypeStyled = styled("div", {
|
|
34
|
+
name: APP_BAR_KEY,
|
|
35
|
+
slot: AppBarSlots.contentIsoType
|
|
36
|
+
})(appBarStyles?.contentIsoType);
|
|
37
|
+
const DividerStyled = styled(Divider, {
|
|
38
|
+
name: APP_BAR_KEY,
|
|
39
|
+
slot: AppBarSlots.divider
|
|
40
|
+
})(appBarStyles?.divider);
|
|
22
41
|
export {
|
|
23
42
|
AppBarRootStyled as A,
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
ContainerIsotypeNameStyled as C,
|
|
44
|
+
DividerStyled as D,
|
|
45
|
+
ImageIsotypeStyled as I,
|
|
46
|
+
MenuIconButtonStyled as M,
|
|
47
|
+
ContentIsotypeStyled as a,
|
|
48
|
+
CompanyNameStyled as b,
|
|
49
|
+
ContentStyled as c
|
|
26
50
|
};
|
|
@@ -35,6 +35,26 @@ const appBarStyles = {
|
|
|
35
35
|
width: "204px",
|
|
36
36
|
minWidth: "204px"
|
|
37
37
|
}),
|
|
38
|
+
/**
|
|
39
|
+
* ****************************************************
|
|
40
|
+
* Estilos para la imagen del logotipo de la empresa.
|
|
41
|
+
* ****************************************************
|
|
42
|
+
*/
|
|
43
|
+
imageIsotype: ({ theme }) => ({
|
|
44
|
+
width: `${theme.vars.size.baseSpacings.sp6} !important`,
|
|
45
|
+
height: `${theme.vars.size.baseSpacings.sp6} !important`,
|
|
46
|
+
border: `1px solid ${theme.vars.palette.border.default}`
|
|
47
|
+
}),
|
|
48
|
+
/**
|
|
49
|
+
* ****************************************************
|
|
50
|
+
* Estilos para el nombre de la empresa.
|
|
51
|
+
* ****************************************************
|
|
52
|
+
*/
|
|
53
|
+
companyName: ({ theme }) => ({
|
|
54
|
+
display: "grid",
|
|
55
|
+
placeContent: "center",
|
|
56
|
+
color: theme.vars.palette.text.primary
|
|
57
|
+
}),
|
|
38
58
|
/**
|
|
39
59
|
* ****************************************************
|
|
40
60
|
* Estilos para el botón de menú de la barra de app
|
|
@@ -59,6 +79,28 @@ const appBarStyles = {
|
|
|
59
79
|
flex: "1",
|
|
60
80
|
height: theme.vars.size.baseSpacings.sp12,
|
|
61
81
|
overflow: "auto"
|
|
82
|
+
}),
|
|
83
|
+
/**
|
|
84
|
+
* **************************************************************
|
|
85
|
+
* Estilos para el contenedor del contenido del logotipo y nombre
|
|
86
|
+
* **************************************************************
|
|
87
|
+
*/
|
|
88
|
+
contentIsoType: ({ theme }) => ({
|
|
89
|
+
display: "flex",
|
|
90
|
+
flexDirection: "row",
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
gap: theme.vars.size.baseSpacings.sp3,
|
|
93
|
+
height: theme.vars.size.baseSpacings.sp6
|
|
94
|
+
}),
|
|
95
|
+
/**
|
|
96
|
+
* **************************************************************
|
|
97
|
+
* Estilos para el divisor entre el logotipo y el contenido
|
|
98
|
+
* **************************************************************
|
|
99
|
+
*/
|
|
100
|
+
divider: ({ theme, ownerState }) => ({
|
|
101
|
+
height: "100%",
|
|
102
|
+
borderColor: theme.vars.palette.border.secondary,
|
|
103
|
+
borderRightWidth: ownerState?.isMobile ? "thin" : "none"
|
|
62
104
|
})
|
|
63
105
|
};
|
|
64
106
|
export {
|
|
@@ -25,18 +25,10 @@ export interface AppBarProps {
|
|
|
25
25
|
* Opción de aparición de la barra de aplicaciones.
|
|
26
26
|
*/
|
|
27
27
|
variant?: 'standard';
|
|
28
|
-
/**
|
|
29
|
-
* Indica si la barra lateral está anclada.
|
|
30
|
-
*/
|
|
31
|
-
sidebarAnchored: boolean;
|
|
32
28
|
/**
|
|
33
29
|
* Función que activa la visualización del menú de la aplicación en la vista móvil.
|
|
34
30
|
*/
|
|
35
31
|
onToggleVisible: () => void;
|
|
36
|
-
/**
|
|
37
|
-
* Función que activa la visualización del menú de la aplicación en la vista móvil.
|
|
38
|
-
*/
|
|
39
|
-
onToggleAnchored: () => void;
|
|
40
32
|
/**
|
|
41
33
|
* Elementos secundarios de la barra de aplicaciones.
|
|
42
34
|
*/
|
|
@@ -670,6 +670,18 @@ const dataGridStyles = {
|
|
|
670
670
|
alignItems: "center",
|
|
671
671
|
justifyContent: "space-between",
|
|
672
672
|
width: "100%"
|
|
673
|
+
}),
|
|
674
|
+
/**
|
|
675
|
+
* Estilos para el formatter de iconos
|
|
676
|
+
*/
|
|
677
|
+
columnIconFormatter: ({ theme }) => ({
|
|
678
|
+
display: "flex",
|
|
679
|
+
alignItems: "center",
|
|
680
|
+
justifyContent: "center",
|
|
681
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
682
|
+
minWidth: "max-content",
|
|
683
|
+
overflow: "visible",
|
|
684
|
+
flexWrap: "nowrap"
|
|
673
685
|
})
|
|
674
686
|
};
|
|
675
687
|
export {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColumnIconFormatterProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Function to format an icon in a column of a DataGrid
|
|
4
|
+
* @template TRow - Tipo de datos de la fila
|
|
4
5
|
*/
|
|
5
|
-
export declare function ColumnIconFormatter(props: ColumnIconFormatterProps): (rowData:
|
|
6
|
+
export declare function ColumnIconFormatter<TRow>(props: ColumnIconFormatterProps<TRow>): (rowData: TRow) => JSX.Element;
|
|
@@ -1,49 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { C as COLUMN_ICON_KEY_COMPONENT } from "./constants.js";
|
|
4
|
-
import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
5
|
-
import { I as IconStyled } from "../../../ObjectLogs/slots/ObjectLogsSlots.js";
|
|
1
|
+
import { r as renderMultipleIcons } from "./helpers/renderMultipleIcons.js";
|
|
2
|
+
import { r as renderIcon } from "./helpers/renderIcon.js";
|
|
6
3
|
function ColumnIconFormatter(props) {
|
|
7
4
|
const { getIconProps } = props;
|
|
8
5
|
return (rowData) => {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tooltip,
|
|
13
|
-
dataTestId,
|
|
14
|
-
Component,
|
|
15
|
-
componentProps
|
|
16
|
-
} = getIconProps(rowData);
|
|
17
|
-
const iconStyle = onClick ? { style: { cursor: "pointer" } } : {};
|
|
18
|
-
if (Component && Component !== React.Fragment) {
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
Component,
|
|
21
|
-
{
|
|
22
|
-
...componentProps,
|
|
23
|
-
...getPropDataTestId(COLUMN_ICON_KEY_COMPONENT, "container", dataTestId),
|
|
24
|
-
children: /* @__PURE__ */ jsx(
|
|
25
|
-
IconStyled,
|
|
26
|
-
{
|
|
27
|
-
src: iconUrl,
|
|
28
|
-
onClick,
|
|
29
|
-
tooltipContent: tooltip,
|
|
30
|
-
instaceDataTestId: dataTestId,
|
|
31
|
-
...iconStyle
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
);
|
|
6
|
+
const iconProps = getIconProps(rowData);
|
|
7
|
+
if (Array.isArray(iconProps)) {
|
|
8
|
+
return renderMultipleIcons(iconProps);
|
|
36
9
|
}
|
|
37
|
-
return
|
|
38
|
-
IconStyled,
|
|
39
|
-
{
|
|
40
|
-
src: iconUrl,
|
|
41
|
-
onClick,
|
|
42
|
-
tooltipContent: tooltip,
|
|
43
|
-
instaceDataTestId: dataTestId,
|
|
44
|
-
...iconStyle
|
|
45
|
-
}
|
|
46
|
-
);
|
|
10
|
+
return renderIcon(iconProps);
|
|
47
11
|
};
|
|
48
12
|
}
|
|
49
13
|
export {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColumnIconResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Helper que renderiza un único icono
|
|
4
|
+
* @param iconConfig - Configuración del icono
|
|
5
|
+
* @param key - Clave opcional para listas
|
|
6
|
+
* @returns Componente de icono renderizado
|
|
7
|
+
*/
|
|
8
|
+
export declare function renderIcon(iconConfig: ColumnIconResponse, key?: number): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { C as COLUMN_ICON_KEY_COMPONENT } from "../constants.js";
|
|
4
|
+
import { g as getPropDataTestId } from "../../../../../test/getNameDataTestId.js";
|
|
5
|
+
import { I as IconClickeableStyled, a as IconStyled } from "../../../../ObjectLogs/slots/ObjectLogsSlots.js";
|
|
6
|
+
function renderIcon(iconConfig, key) {
|
|
7
|
+
const {
|
|
8
|
+
iconUrl,
|
|
9
|
+
onClick,
|
|
10
|
+
tooltip,
|
|
11
|
+
dataTestId,
|
|
12
|
+
Component,
|
|
13
|
+
componentProps,
|
|
14
|
+
color,
|
|
15
|
+
visible,
|
|
16
|
+
size
|
|
17
|
+
} = iconConfig;
|
|
18
|
+
if (visible === false) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "-" });
|
|
20
|
+
}
|
|
21
|
+
const IconComponent = onClick ? IconClickeableStyled : IconStyled;
|
|
22
|
+
if (Component && Component !== React.Fragment) {
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
Component,
|
|
25
|
+
{
|
|
26
|
+
...componentProps,
|
|
27
|
+
...getPropDataTestId(COLUMN_ICON_KEY_COMPONENT, "container", dataTestId),
|
|
28
|
+
children: /* @__PURE__ */ jsx(
|
|
29
|
+
IconComponent,
|
|
30
|
+
{
|
|
31
|
+
src: iconUrl,
|
|
32
|
+
...onClick && { onClick },
|
|
33
|
+
tooltipContent: tooltip,
|
|
34
|
+
instaceDataTestId: dataTestId,
|
|
35
|
+
color,
|
|
36
|
+
size
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
key
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
IconComponent,
|
|
45
|
+
{
|
|
46
|
+
src: iconUrl,
|
|
47
|
+
...onClick && { onClick },
|
|
48
|
+
tooltipContent: tooltip,
|
|
49
|
+
instaceDataTestId: dataTestId,
|
|
50
|
+
color,
|
|
51
|
+
size
|
|
52
|
+
},
|
|
53
|
+
key
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
renderIcon as r
|
|
58
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColumnIconResponse } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Helper que renderiza múltiples iconos
|
|
4
|
+
* @param iconsConfig - Array de configuraciones de iconos
|
|
5
|
+
* @returns Componente contenedor con múltiples iconos
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderMultipleIcons(iconsConfig: ColumnIconResponse[]): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { a as ColumnIconFormatterStyled } from "../../../slots/DataGridSlot.js";
|
|
3
|
+
import { r as renderIcon } from "./renderIcon.js";
|
|
4
|
+
function renderMultipleIcons(iconsConfig) {
|
|
5
|
+
if (!iconsConfig || iconsConfig.length === 0) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "-" });
|
|
7
|
+
}
|
|
8
|
+
const visibleIcons = iconsConfig.filter((icon) => icon.visible !== false);
|
|
9
|
+
if (visibleIcons.length === 0) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Fragment, { children: "-" });
|
|
11
|
+
}
|
|
12
|
+
if (visibleIcons.length === 1) {
|
|
13
|
+
return renderIcon(visibleIcons[0]);
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(ColumnIconFormatterStyled, { children: visibleIcons.map((iconConfig, index) => renderIcon(iconConfig, index)) });
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
renderMultipleIcons as r
|
|
19
|
+
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DeepKeyOf } from '../../../../utils/types';
|
|
3
|
+
import { Theme } from '@mui/material';
|
|
4
|
+
export type IconColorDeep = DeepKeyOf<Theme['vars']['palette']> | string;
|
|
1
5
|
export type ColumnIconResponse = {
|
|
2
6
|
iconUrl: string;
|
|
3
7
|
tooltip?: string;
|
|
4
8
|
onClick?: () => void;
|
|
5
9
|
Component?: React.ElementType;
|
|
6
10
|
dataTestId?: string;
|
|
7
|
-
componentProps?: React.ComponentPropsWithoutRef<
|
|
11
|
+
componentProps?: React.ComponentPropsWithoutRef<React.ElementType>;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
color?: IconColorDeep;
|
|
14
|
+
size?: 'small' | 'medium';
|
|
8
15
|
};
|
|
9
|
-
export interface ColumnIconFormatterProps {
|
|
10
|
-
getIconProps: (obRowProps:
|
|
16
|
+
export interface ColumnIconFormatterProps<TRow> {
|
|
17
|
+
getIconProps: (obRowProps: TRow) => ColumnIconResponse | ColumnIconResponse[];
|
|
11
18
|
}
|
|
@@ -3,6 +3,6 @@ import { ColumnIconFormatterProps } from './types';
|
|
|
3
3
|
* Función helper que retorna
|
|
4
4
|
* el formatter de la columna
|
|
5
5
|
*/
|
|
6
|
-
export declare const useColumnIcon: (props: ColumnIconFormatterProps) => {
|
|
7
|
-
formatter: (rowData:
|
|
6
|
+
export declare const useColumnIcon: <TRow>(props: ColumnIconFormatterProps<TRow>) => {
|
|
7
|
+
formatter: (rowData: TRow) => JSX.Element;
|
|
8
8
|
};
|
|
@@ -48,6 +48,10 @@ var ControlNavigateSlots = /* @__PURE__ */ ((ControlNavigateSlots2) => {
|
|
|
48
48
|
ControlNavigateSlots2["controlNavigate"] = "controlNavigate";
|
|
49
49
|
return ControlNavigateSlots2;
|
|
50
50
|
})(ControlNavigateSlots || {});
|
|
51
|
+
var ColumnIconFormatterSlots = /* @__PURE__ */ ((ColumnIconFormatterSlots2) => {
|
|
52
|
+
ColumnIconFormatterSlots2["columnIconFormatter"] = "columnIconFormatter";
|
|
53
|
+
return ColumnIconFormatterSlots2;
|
|
54
|
+
})(ColumnIconFormatterSlots || {});
|
|
51
55
|
export {
|
|
52
56
|
ActionsSlots as A,
|
|
53
57
|
ControlNavigateSlots as C,
|
|
@@ -55,5 +59,6 @@ export {
|
|
|
55
59
|
RowsCountSlots as R,
|
|
56
60
|
TextEditorSlots as T,
|
|
57
61
|
ColumnsConfigSlots as a,
|
|
58
|
-
TableSlots as b
|
|
62
|
+
TableSlots as b,
|
|
63
|
+
ColumnIconFormatterSlots as c
|
|
59
64
|
};
|
|
@@ -62,3 +62,9 @@ export declare const InputTextEditorStyled: import('@emotion/styled').StyledComp
|
|
|
62
62
|
* ****************
|
|
63
63
|
*/
|
|
64
64
|
export declare const ControlNavigateStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
65
|
+
/**
|
|
66
|
+
* ****************
|
|
67
|
+
* Slots ColumnIconFormatter
|
|
68
|
+
* ****************
|
|
69
|
+
*/
|
|
70
|
+
export declare const ColumnIconFormatterStyled: import('@emotion/styled').StyledComponent<any, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { MenuList, InputBase } from "@mui/material";
|
|
3
3
|
import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
|
|
4
|
-
import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, b as TableSlots, C as ControlNavigateSlots, R as RowsCountSlots, a as ColumnsConfigSlots } from "./DataGridEnum.js";
|
|
4
|
+
import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, b as TableSlots, C as ControlNavigateSlots, c as ColumnIconFormatterSlots, R as RowsCountSlots, a as ColumnsConfigSlots } from "./DataGridEnum.js";
|
|
5
5
|
import { d as dataGridStyles } from "../Datagrid.styles.js";
|
|
6
6
|
import { I as Icon } from "../../Icon/Icon.js";
|
|
7
7
|
const DataGridRootStyled = styled("div", {
|
|
@@ -120,6 +120,10 @@ const ControlNavigateStyled = styled("div", {
|
|
|
120
120
|
name: DATAGRID_PREFIX_NAME,
|
|
121
121
|
slot: ControlNavigateSlots.controlNavigate
|
|
122
122
|
})(dataGridStyles.controlNavigate);
|
|
123
|
+
const ColumnIconFormatterStyled = styled("div", {
|
|
124
|
+
name: DATAGRID_PREFIX_NAME,
|
|
125
|
+
slot: ColumnIconFormatterSlots.columnIconFormatter
|
|
126
|
+
})(dataGridStyles.columnIconFormatter);
|
|
123
127
|
export {
|
|
124
128
|
ActionsRootStyled as A,
|
|
125
129
|
ButtonHeaderActionsStyled as B,
|
|
@@ -132,22 +136,23 @@ export {
|
|
|
132
136
|
RowsCountRootStyled as R,
|
|
133
137
|
TableWrapperDataGridStyled as T,
|
|
134
138
|
WrapperSkeletonStyled as W,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
139
|
+
ColumnIconFormatterStyled as a,
|
|
140
|
+
ControlNavigateStyled as b,
|
|
141
|
+
ActionsConfigContainerStyled as c,
|
|
142
|
+
ContainerLeftActionsStyled as d,
|
|
143
|
+
ContainerRightActionsStyled as e,
|
|
144
|
+
RowsCountLabelStyled as f,
|
|
145
|
+
RowsCountValueStyled as g,
|
|
146
|
+
ColumnsConfigWrapperStyled as h,
|
|
147
|
+
ColumnsConfigDataGridStyled as i,
|
|
148
|
+
ColumnsConfigSelColumnsStyled as j,
|
|
149
|
+
ColumnsConfigActiosStyled as k,
|
|
150
|
+
ContentModalSettingStyled as l,
|
|
151
|
+
TableContainerStyled as m,
|
|
152
|
+
NameColumnStyled as n,
|
|
153
|
+
DraggableHeaderRootStyled as o,
|
|
154
|
+
DraggableWrapperInputBaseStyled as p,
|
|
155
|
+
IconSearchStyled as q,
|
|
156
|
+
HeaderRenderClickStyled as r,
|
|
157
|
+
InputTextEditorStyled as s
|
|
153
158
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useIsMobile } from "@m4l/graphics";
|
|
3
|
-
import {
|
|
3
|
+
import { b as ControlNavigateStyled } from "../../slots/DataGridSlot.js";
|
|
4
4
|
import { R as RowsCount } from "../HeaderActions/subcomponents/RowsCount/index.js";
|
|
5
5
|
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
6
6
|
import { P as Pager } from "../../../Pager/Pager.js";
|