@m4l/components 9.3.19-BE101025-beta.2 → 9.3.19-BE241025-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/@types/types.d.ts +1 -1
- package/components/AccountPopover/AccountPopover.js +12 -13
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.d.ts +1 -1
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +7 -4
- package/components/AccountPopover/subcomponents/MenuPopover/types.d.ts +1 -1
- package/components/Chip/Chip.js +9 -7
- package/components/Chip/ChipStyles.js +4 -31
- package/components/Chip/helpers.d.ts +10 -0
- package/components/Chip/helpers.js +34 -0
- package/components/Chip/types.d.ts +6 -0
- package/components/DataGrid/DataGrid.js +9 -4
- package/components/DataGrid/Datagrid.styles.js +270 -0
- package/components/DataGrid/constants.js +2 -2
- package/components/DataGrid/contexts/DataGridContext/index.js +322 -112
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +63 -4
- package/components/DataGrid/dictionary.d.ts +5 -0
- package/components/DataGrid/dictionary.js +6 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js +2 -2
- package/components/DataGrid/hooks/useModalCardDetail.d.ts +6 -0
- package/components/DataGrid/hooks/useModalCardDetail.js +74 -0
- package/components/DataGrid/hooks/useProcessedColumns.d.ts +50 -0
- package/components/DataGrid/hooks/useProcessedColumns.js +44 -0
- package/components/DataGrid/icons.d.ts +7 -0
- package/components/DataGrid/icons.js +5 -1
- package/components/DataGrid/index.d.ts +1 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +22 -1
- package/components/DataGrid/slots/DataGridEnum.js +21 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +24 -0
- package/components/DataGrid/slots/DataGridSlot.js +123 -21
- package/components/DataGrid/subcomponents/Cards/hooks/useCardContent.d.ts +9 -0
- package/components/DataGrid/subcomponents/Cards/hooks/useCardContent.js +91 -0
- package/components/DataGrid/subcomponents/Cards/index.d.ts +5 -0
- package/components/DataGrid/subcomponents/Cards/index.js +40 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardDetails/index.d.ts +8 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardDetails/index.js +79 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.d.ts +7 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.js +98 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.d.ts +6 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.js +71 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/IntersectCard/index.d.ts +20 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/IntersectCard/index.js +46 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/LazyLoadCard/index.d.ts +17 -0
- package/components/DataGrid/subcomponents/Cards/subcomponents/LazyLoadCard/index.js +34 -0
- package/components/DataGrid/subcomponents/Cards/types.d.ts +118 -0
- package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.d.ts +7 -0
- package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.js +43 -0
- package/components/DataGrid/subcomponents/CheckboxCellAdapter/types.d.ts +7 -0
- package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/index.js +5 -3
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/RowsCount/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/index.js +11 -2
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfigCards/index.d.ts +2 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfigCards/index.js +304 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfigCards/types.d.ts +31 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/ViewMode/index.d.ts +4 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/ViewMode/index.js +125 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +3 -3
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettingsCards/index.d.ts +7 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettingsCards/index.js +74 -0
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettingsCards/types.d.ts +4 -0
- package/components/DataGrid/subcomponents/RenderContent/index.d.ts +5 -0
- package/components/DataGrid/subcomponents/RenderContent/index.js +11 -0
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +2 -2
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +1 -1
- package/components/DataGrid/subcomponents/Table/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.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/tests/components/CardDetails.test.d.ts +1 -0
- package/components/DataGrid/tests/components/CardHeader.test.d.ts +1 -0
- package/components/DataGrid/tests/components/CardRow.test.d.ts +1 -0
- package/components/DataGrid/tests/components/Cards.test.d.ts +1 -0
- package/components/DataGrid/tests/components/CheckboxCellAdapter.test.d.ts +1 -0
- package/components/DataGrid/tests/components/ColumnsConfigCards.test.d.ts +1 -0
- package/components/DataGrid/tests/components/IntersectCard.test.d.ts +1 -0
- package/components/DataGrid/tests/components/ViewMode.test.d.ts +1 -0
- package/components/DataGrid/tests/helpers/types.d.ts +1 -0
- package/components/DataGrid/tests/helpers/useCardsViewConfig.d.ts +24 -0
- package/components/DataGrid/tests/helpers/useCustomCardExample.d.ts +7 -0
- package/components/DataGrid/tests/hooks/useCardContent.test.d.ts +1 -0
- package/components/DataGrid/tests/hooks/useModalDetail.test.d.ts +1 -0
- package/components/DataGrid/tests/hooks/useModalSettingsCards.test.d.ts +1 -0
- package/components/DataGrid/tests/hooks/useProcessedColumns.test.d.ts +1 -0
- package/components/DataGrid/types.d.ts +87 -5
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +14 -10
- package/components/DragResizeWindowRND/helpers/expandingParentContainer.d.ts +1 -1
- package/components/DragResizeWindowRND/helpers/expandingParentContainer.js +24 -19
- package/components/DragResizeWindowRND/helpers/getInitialSize.d.ts +3 -3
- package/components/DragResizeWindowRND/helpers/getInitialSize.js +18 -15
- package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.d.ts +1 -1
- package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.js +17 -9
- package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +4 -1
- package/components/DragResizeWindowRND/index.d.ts +1 -0
- package/components/DragResizeWindowRND/types.d.ts +12 -2
- package/components/DynamicFilter/DynamicFilter.js +2 -1
- package/components/DynamicFilter/helpers/formatToInitialFilters.js +3 -3
- package/components/DynamicFilter/helpers/frontEndHelpers.d.ts +2 -2
- package/components/DynamicFilter/helpers/frontEndHelpers.js +31 -9
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts +2 -1
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +4 -2
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/types.d.ts +3 -0
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.js +11 -3
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +16 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.js +11 -8
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.js +21 -8
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.js +18 -8
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.js +5 -3
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +1 -1
- package/components/DynamicFilter/types.d.ts +4 -0
- package/components/DynamicSort/DynamicSort.js +2 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.d.ts +2 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +4 -2
- package/components/DynamicSort/subcomponents/DynamicSortBase/types.d.ts +3 -0
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +1 -1
- package/components/DynamicSort/types.d.ts +4 -0
- package/components/EditLabel/hooks/useEditLabel.d.ts +1 -0
- package/components/GridLayout/subcomponents/GridItem/index.js +2 -2
- package/components/Image/Image.js +4 -1
- package/components/LanguagePopover/LanguagePopover.js +2 -0
- package/components/MFIsolationApp/MFIsolationApp.js +1 -4
- package/components/MFIsolationApp/subcomponents/AppBarSettings/AppBarSettings.js +1 -1
- package/components/MFIsolationAppStorybook/MFIsolationAppStorybook.js +4 -20
- package/components/MFIsolationAppStorybook/types.d.ts +0 -4
- package/components/MFLoader/MFLoader.js +8 -3
- package/components/MFLoader/styles.js +1 -1
- package/components/MFLoader/types.d.ts +10 -0
- package/components/MenuActions/MenuActions.js +105 -55
- package/components/ObjectLogs/hooks/useDetailFormatter.js +1 -1
- package/components/WindowBase/WindowBase.js +3 -3
- package/components/WindowBase/WindowBase.styles.js +36 -31
- package/components/WindowBase/constants.d.ts +1 -1
- package/components/WindowBase/constants.js +2 -2
- package/components/WindowBase/index.d.ts +1 -0
- package/components/WindowBase/subcomponents/Component/index.js +2 -2
- package/components/WindowBase/subcomponents/Component/types.d.ts +2 -0
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +7 -7
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/MicroFrontend/types.d.ts +4 -0
- package/components/WindowBase/types.d.ts +3 -3
- package/components/WindowConfirm/WindowConfirm.js +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +6 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +21 -3
- package/components/areas/index.d.ts +1 -1
- package/components/areas/types.d.ts +1 -1
- package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +3 -34
- package/components/formatters/DistanceToNowFormatter/dictionary.d.ts +8 -0
- package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts +13 -0
- package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.js +65 -0
- package/components/formatters/DistanceToNowFormatter/index.d.ts +1 -0
- package/components/formatters/DistanceToNowFormatter/types.d.ts +4 -1
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +8 -4
- package/components/hook-form/RHFAutocomplete/constants.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/constants.js +5 -1
- package/components/hook-form/RHFAutocomplete/types.d.ts +2 -2
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +6 -4
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +4 -0
- package/components/mui_extended/Autocomplete/Autocomplete.d.ts +4 -8
- package/components/mui_extended/Autocomplete/Autocomplete.js +11 -11
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +7 -3
- package/components/mui_extended/Autocomplete/RenderAdornment/RenderAdornment.d.ts +6 -0
- package/components/mui_extended/Autocomplete/RenderAdornment/RenderAdornment.js +45 -0
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +2 -1
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.d.ts +4 -12
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.js +72 -23
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.d.ts +0 -2
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +0 -13
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +4 -17
- package/components/mui_extended/Autocomplete/renderOptions/index.js +42 -5
- package/components/mui_extended/Autocomplete/renderOptions/types.d.ts +7 -0
- package/components/mui_extended/Autocomplete/types.d.ts +10 -3
- package/components/mui_extended/Button/ButtonStyles.js +15 -5
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +6 -2
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.styles.js +9 -0
- package/components/mui_extended/ToggleIconButton/types.d.ts +1 -0
- package/components/mui_extended/index.d.ts +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +2 -2
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +0 -1
- package/components/popups/components/PopupsViewer/PopupsViewer.js +4 -3
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +5 -2
- package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +5 -0
- package/components/popups/components/PopupsViewer/types.d.ts +3 -0
- package/contexts/AppearanceComponentContext/AppearanceComponentContext.js +4 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useDataGridPersistence/helpers.d.ts +2 -2
- package/hooks/useDataGridPersistence/useDataGridPersistence.d.ts +2 -2
- package/hooks/useDataGridPersistence/useDataGridPersistence.js +5 -0
- package/hooks/useSizeContainer/index.d.ts +2 -1
- package/hooks/useSizeContainer/index.js +22 -13
- package/hooks/useSizeContainer/types.d.ts +6 -0
- package/hooks/useStateRef/index.d.ts +1 -1
- package/hooks/useStateRef/index.js +6 -6
- package/index.js +53 -46
- package/package.json +3 -4
- package/utils/deepShallow.d.ts +17 -0
- package/utils/deepShallow.js +76 -0
- package/utils/formatDistanceToNow/formatDistanteToNow.d.ts +2 -2
- package/utils/formatDistanceToNow/formatDistanteToNow.js +18 -2
- package/utils/formatDistanceToNow/types.d.ts +13 -0
- package/utils/index.d.ts +1 -0
- package/components/MFIsolationAppStorybook/icons.js +0 -6
- package/components/MFIsolationAppStorybook/subcomponents/AppBarSettings/AppBarSettings.d.ts +0 -4
- package/components/MFIsolationAppStorybook/subcomponents/AppBarSettings/AppBarSettings.js +0 -21
- package/components/MFIsolationAppStorybook/subcomponents/AppBarSettings/index.d.ts +0 -1
- package/components/MFIsolationAppStorybook/subcomponents/AppBarSettings/index.js +0 -1
package/@types/types.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
TextFieldOwnerState,
|
|
39
39
|
TextFieldSlotsType,
|
|
40
40
|
} from '../components/mui_extended/TextField/types';
|
|
41
|
-
type Theme = Omit<MuiTheme, 'components'>;
|
|
41
|
+
// type Theme = Omit<MuiTheme, 'components'>;
|
|
42
42
|
import {
|
|
43
43
|
TooltipOwnerState,
|
|
44
44
|
TooltipSlotsType,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useNetwork } from "@m4l/core";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
3
|
+
import { useState, useEffect, useCallback } from "react";
|
|
4
4
|
import { M as MenuPopover } from "./subcomponents/MenuPopover/MenuPopover.js";
|
|
5
5
|
import { A as ACCOUNT_KEY_POPOVER } from "./constants.js";
|
|
6
6
|
import { I as IconButtonRootStyled, A as AvatarStyled } from "./slots/AccountPopoverSlots.js";
|
|
7
7
|
import { M as MyAvatar } from "./subcomponents/MyAvatar/MyAvatar.js";
|
|
8
|
-
import { u as useStateRef } from "../../hooks/useStateRef/index.js";
|
|
9
8
|
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
10
9
|
import { A as AccountPopoverSlots } from "./slots/AccountPopoverEnum.js";
|
|
11
10
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
@@ -20,7 +19,7 @@ const AccountPopover = (props) => {
|
|
|
20
19
|
} = props;
|
|
21
20
|
const { avatarUrl, firstName = "firstname", lastName = "lastname" } = userData || {};
|
|
22
21
|
const [asyncState, setAsyncState] = useState("unLoad");
|
|
23
|
-
const [
|
|
22
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
24
23
|
const [menuData, setMenuData] = useState([]);
|
|
25
24
|
const { networkOperation } = useNetwork();
|
|
26
25
|
const { currentSize } = useComponentSize(size);
|
|
@@ -50,13 +49,13 @@ const AccountPopover = (props) => {
|
|
|
50
49
|
return function cleanUp() {
|
|
51
50
|
mounted = false;
|
|
52
51
|
};
|
|
53
|
-
}, [
|
|
54
|
-
const handleClose = () => {
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
const handleOpen = (event) => {
|
|
58
|
-
|
|
59
|
-
};
|
|
52
|
+
}, [anchorEl]);
|
|
53
|
+
const handleClose = useCallback(() => {
|
|
54
|
+
setAnchorEl(null);
|
|
55
|
+
}, [setAnchorEl]);
|
|
56
|
+
const handleOpen = useCallback((event) => {
|
|
57
|
+
setAnchorEl(event.currentTarget);
|
|
58
|
+
}, [setAnchorEl]);
|
|
60
59
|
const classes = getComponentClasses(ACCOUNT_KEY_POPOVER, AccountPopoverSlots);
|
|
61
60
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
62
61
|
/* @__PURE__ */ jsx(
|
|
@@ -66,11 +65,11 @@ const AccountPopover = (props) => {
|
|
|
66
65
|
icon: /* @__PURE__ */ jsx(MyAvatar, { size: currentSize, avatarUrl, firstName, lastName, slotAvatar: AvatarStyled }),
|
|
67
66
|
src: "",
|
|
68
67
|
onClick: handleOpen,
|
|
69
|
-
selected:
|
|
68
|
+
selected: anchorEl ? true : false,
|
|
70
69
|
className: classes.iconButtonRoot
|
|
71
70
|
}
|
|
72
71
|
),
|
|
73
|
-
/* @__PURE__ */ jsx(
|
|
72
|
+
!!anchorEl && /* @__PURE__ */ jsx(
|
|
74
73
|
MenuPopover,
|
|
75
74
|
{
|
|
76
75
|
size: currentSize,
|
|
@@ -81,7 +80,7 @@ const AccountPopover = (props) => {
|
|
|
81
80
|
handleLogOut,
|
|
82
81
|
userData,
|
|
83
82
|
settingsHandleOpen,
|
|
84
|
-
|
|
83
|
+
anchorEl,
|
|
85
84
|
handleClose
|
|
86
85
|
}
|
|
87
86
|
)
|
|
@@ -4,4 +4,4 @@ import { MenuPopoverProps } from './types';
|
|
|
4
4
|
* Se debe refactorizar el componente PopOver para recibir la propr de size.
|
|
5
5
|
* @param props
|
|
6
6
|
*/
|
|
7
|
-
export declare const MenuPopover: (props: MenuPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const MenuPopover: (props: MenuPopoverProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -10,7 +10,7 @@ const MenuPopover = (props) => {
|
|
|
10
10
|
const {
|
|
11
11
|
version,
|
|
12
12
|
handleClose,
|
|
13
|
-
|
|
13
|
+
anchorEl,
|
|
14
14
|
userData,
|
|
15
15
|
settingsHandleOpen,
|
|
16
16
|
handleLogOut,
|
|
@@ -29,19 +29,22 @@ const MenuPopover = (props) => {
|
|
|
29
29
|
handleClose();
|
|
30
30
|
};
|
|
31
31
|
const handleClickSetting = () => {
|
|
32
|
-
settingsHandleOpen();
|
|
33
32
|
handleClose();
|
|
33
|
+
settingsHandleOpen();
|
|
34
34
|
};
|
|
35
35
|
const handleLogout = () => {
|
|
36
36
|
handleLogOut();
|
|
37
37
|
handleClose();
|
|
38
38
|
};
|
|
39
|
+
if (!anchorEl) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
39
42
|
return /* @__PURE__ */ jsxs(
|
|
40
43
|
PopoverStyled,
|
|
41
44
|
{
|
|
42
45
|
size,
|
|
43
|
-
open: Boolean(
|
|
44
|
-
anchorEl
|
|
46
|
+
open: Boolean(anchorEl),
|
|
47
|
+
anchorEl,
|
|
45
48
|
onClose: handleClose,
|
|
46
49
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
47
50
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
@@ -5,6 +5,6 @@ import { AccountPopoverProps, AsyncTypes, RightMenuData } from '../../types';
|
|
|
5
5
|
export interface MenuPopoverProps extends AccountPopoverProps {
|
|
6
6
|
data: Array<RightMenuData> | [];
|
|
7
7
|
asyncState: AsyncTypes;
|
|
8
|
-
|
|
8
|
+
anchorEl: HTMLElement | null;
|
|
9
9
|
handleClose: () => void;
|
|
10
10
|
}
|
package/components/Chip/Chip.js
CHANGED
|
@@ -23,6 +23,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
23
23
|
className,
|
|
24
24
|
dataTestId,
|
|
25
25
|
disabledDeleteButton,
|
|
26
|
+
ellipsis = false,
|
|
26
27
|
...others
|
|
27
28
|
} = props;
|
|
28
29
|
const { currentSize } = useComponentSize(size);
|
|
@@ -34,8 +35,9 @@ const Chip = forwardRef((props, ref) => {
|
|
|
34
35
|
variant,
|
|
35
36
|
color,
|
|
36
37
|
opacity,
|
|
37
|
-
externalColor
|
|
38
|
-
|
|
38
|
+
externalColor,
|
|
39
|
+
ellipsis
|
|
40
|
+
}), [onClick, currentSize, variant, color, opacity, externalColor, ellipsis]);
|
|
39
41
|
const renderIcon = useMemo(() => (icon, instaceDataTestId) => {
|
|
40
42
|
if (!icon) {
|
|
41
43
|
return null;
|
|
@@ -46,7 +48,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
46
48
|
return /* @__PURE__ */ jsx(
|
|
47
49
|
IconStyled,
|
|
48
50
|
{
|
|
49
|
-
ownerState
|
|
51
|
+
ownerState,
|
|
50
52
|
src: icon,
|
|
51
53
|
size: currentSize,
|
|
52
54
|
instaceDataTestId
|
|
@@ -60,7 +62,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
60
62
|
{
|
|
61
63
|
"data-testid": "SkeletonButton",
|
|
62
64
|
width: skeletonWidth,
|
|
63
|
-
ownerState
|
|
65
|
+
ownerState
|
|
64
66
|
}
|
|
65
67
|
);
|
|
66
68
|
}
|
|
@@ -75,7 +77,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
75
77
|
role: "button-chip",
|
|
76
78
|
size: currentSize,
|
|
77
79
|
onClick,
|
|
78
|
-
ownerState
|
|
80
|
+
ownerState,
|
|
79
81
|
className: clsx(className, CHIP_CLASSES.root),
|
|
80
82
|
ref,
|
|
81
83
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: dataTestId } : {},
|
|
@@ -83,7 +85,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
83
85
|
...others,
|
|
84
86
|
children: [
|
|
85
87
|
renderIcon(startIcon, "ChipStartIcon"),
|
|
86
|
-
/* @__PURE__ */ jsx(TextChipStyled, { size: currentSize, ownerState: { ...ownerState }, color, children: label }),
|
|
88
|
+
/* @__PURE__ */ jsx(TextChipStyled, { size: currentSize, ownerState: { ...ownerState }, color, ellipsis, children: label }),
|
|
87
89
|
renderIcon(endIcon, "ChipEndIcon"),
|
|
88
90
|
onDeleted && /* @__PURE__ */ jsx(
|
|
89
91
|
IconButtonStyled,
|
|
@@ -91,7 +93,7 @@ const Chip = forwardRef((props, ref) => {
|
|
|
91
93
|
...iconButtonProps,
|
|
92
94
|
src: iconClose,
|
|
93
95
|
size: currentSize,
|
|
94
|
-
ownerState
|
|
96
|
+
ownerState,
|
|
95
97
|
onClick: handleDelete,
|
|
96
98
|
disabled: disabledDeleteButton,
|
|
97
99
|
className: CHIP_CLASSES.closeIcon
|
|
@@ -1,35 +1,5 @@
|
|
|
1
1
|
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
|
-
import {
|
|
3
|
-
const getExternalColor = (externalColor) => {
|
|
4
|
-
try {
|
|
5
|
-
return {
|
|
6
|
-
color: externalColor.color,
|
|
7
|
-
backgroundColor: lighten(externalColor.backgroundColor, 0.5),
|
|
8
|
-
backgroundHover: lighten(externalColor.backgroundColor, 0.3),
|
|
9
|
-
backgroundActive: lighten(externalColor.backgroundColor, 0.7),
|
|
10
|
-
colorTone: lighten(externalColor.color, 1),
|
|
11
|
-
backgroundColorTone: externalColor.backgroundColor,
|
|
12
|
-
backgroundHoverTone: lighten(externalColor.backgroundColor, 0.2),
|
|
13
|
-
backgroundActiveTone: darken(externalColor.backgroundColor, 0.2)
|
|
14
|
-
};
|
|
15
|
-
} catch (_error) {
|
|
16
|
-
return {
|
|
17
|
-
color: "",
|
|
18
|
-
backgroundColor: "",
|
|
19
|
-
backgroundHover: "",
|
|
20
|
-
backgroundActive: "",
|
|
21
|
-
colorTone: "",
|
|
22
|
-
backgroundColorTone: "",
|
|
23
|
-
backgroundHoverTone: "",
|
|
24
|
-
backgroundActiveTone: ""
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const getColors = (theme, ownerState) => {
|
|
29
|
-
const finalPalette = ownerState?.externalColor ? getExternalColor(ownerState?.externalColor) : theme.vars.palette.chips[ownerState?.color ?? "default"][ownerState?.variant || "contained"];
|
|
30
|
-
const color = ownerState?.opacity ? finalPalette.color : finalPalette.colorTone;
|
|
31
|
-
return { color, finalPalette };
|
|
32
|
-
};
|
|
2
|
+
import { g as getColors } from "./helpers.js";
|
|
33
3
|
const chipStyles = {
|
|
34
4
|
/**
|
|
35
5
|
* Styles for the root element of the chip.
|
|
@@ -46,6 +16,9 @@ const chipStyles = {
|
|
|
46
16
|
borderRadius: theme.vars.size.borderRadius["r1-5"],
|
|
47
17
|
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
48
18
|
width: "max-content",
|
|
19
|
+
...ownerState?.ellipsis && {
|
|
20
|
+
maxWidth: "100%"
|
|
21
|
+
},
|
|
49
22
|
cursor: "pointer",
|
|
50
23
|
color,
|
|
51
24
|
backgroundColor: !(ownerState?.variant === "outlined") ? bgColor : "transparent",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChipColor } from '@m4l/styles';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
3
|
+
import { ChipOwnerState } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Obtiene los colores del chip
|
|
6
|
+
*/
|
|
7
|
+
export declare const getColors: (theme: Theme, ownerState: ChipOwnerState) => {
|
|
8
|
+
color: string;
|
|
9
|
+
finalPalette: ChipColor;
|
|
10
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { darken, lighten } from "@mui/material/styles";
|
|
2
|
+
const getExternalColor = (externalColor) => {
|
|
3
|
+
try {
|
|
4
|
+
return {
|
|
5
|
+
color: externalColor.color,
|
|
6
|
+
backgroundColor: lighten(externalColor.backgroundColor, 0.5),
|
|
7
|
+
backgroundHover: lighten(externalColor.backgroundColor, 0.3),
|
|
8
|
+
backgroundActive: lighten(externalColor.backgroundColor, 0.7),
|
|
9
|
+
colorTone: lighten(externalColor.color, 1),
|
|
10
|
+
backgroundColorTone: externalColor.backgroundColor,
|
|
11
|
+
backgroundHoverTone: lighten(externalColor.backgroundColor, 0.2),
|
|
12
|
+
backgroundActiveTone: darken(externalColor.backgroundColor, 0.2)
|
|
13
|
+
};
|
|
14
|
+
} catch (_error) {
|
|
15
|
+
return {
|
|
16
|
+
color: "",
|
|
17
|
+
backgroundColor: "",
|
|
18
|
+
backgroundHover: "",
|
|
19
|
+
backgroundActive: "",
|
|
20
|
+
colorTone: "",
|
|
21
|
+
backgroundColorTone: "",
|
|
22
|
+
backgroundHoverTone: "",
|
|
23
|
+
backgroundActiveTone: ""
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const getColors = (theme, ownerState) => {
|
|
28
|
+
const finalPalette = ownerState?.externalColor ? getExternalColor(ownerState?.externalColor) : theme.vars.palette.chips[ownerState?.color ?? "default"][ownerState?.variant || "contained"];
|
|
29
|
+
const color = ownerState?.opacity ? finalPalette.color : finalPalette.colorTone;
|
|
30
|
+
return { color, finalPalette };
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
getColors as g
|
|
34
|
+
};
|
|
@@ -78,12 +78,18 @@ export interface ChipProps {
|
|
|
78
78
|
* If the `Chip` delete button is disabled.
|
|
79
79
|
*/
|
|
80
80
|
disabledDeleteButton?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* If the `Chip` is ellipsis.
|
|
83
|
+
*/
|
|
84
|
+
ellipsis?: boolean;
|
|
81
85
|
}
|
|
82
86
|
/**
|
|
83
87
|
* Owner state of the `Chip` used to define internal style and behavior properties.
|
|
84
88
|
*/
|
|
85
89
|
export interface ChipOwnerState extends Pick<ChipProps, 'variant' | 'externalColor' | 'opacity' | 'size' | 'color'> {
|
|
86
90
|
interactive: boolean;
|
|
91
|
+
ellipsis: boolean;
|
|
92
|
+
[key: string]: unknown;
|
|
87
93
|
}
|
|
88
94
|
/**
|
|
89
95
|
* Defines the types of Slots available for the `Chip`.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { T as Table } from "./subcomponents/Table/index.js";
|
|
3
2
|
import { H as HeaderActions } from "./subcomponents/HeaderActions/index.js";
|
|
4
3
|
import { F as FilterProvider } from "./contexts/FilterContext/index.js";
|
|
5
4
|
import { D as DataGridProvider } from "./contexts/DataGridContext/index.js";
|
|
@@ -12,6 +11,7 @@ import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
|
12
11
|
import { useRef } from "react";
|
|
13
12
|
import { C as ControlNavigate } from "./subcomponents/ControlNavigate/ControlNavigate.js";
|
|
14
13
|
import { useModuleSkeleton } from "@m4l/core";
|
|
14
|
+
import { R as RenderContent } from "./subcomponents/RenderContent/index.js";
|
|
15
15
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
16
16
|
function DataGrid(props) {
|
|
17
17
|
const {
|
|
@@ -37,7 +37,9 @@ function DataGrid(props) {
|
|
|
37
37
|
onChangeUserColumns,
|
|
38
38
|
size,
|
|
39
39
|
externalSortSettings,
|
|
40
|
-
externalFilterSettings
|
|
40
|
+
externalFilterSettings,
|
|
41
|
+
defaultViewMode,
|
|
42
|
+
cardsViewConfig
|
|
41
43
|
} = props;
|
|
42
44
|
const {
|
|
43
45
|
withSettings,
|
|
@@ -91,6 +93,8 @@ function DataGrid(props) {
|
|
|
91
93
|
size: currentSize,
|
|
92
94
|
externalSortSettings,
|
|
93
95
|
externalFilterSettings,
|
|
96
|
+
defaultViewMode,
|
|
97
|
+
cardsViewConfig,
|
|
94
98
|
children: /* @__PURE__ */ jsxs(FilterProvider, { initialActiveFilters: false, children: [
|
|
95
99
|
withActions && actionsProps && /* @__PURE__ */ jsx(
|
|
96
100
|
HeaderActions,
|
|
@@ -108,7 +112,7 @@ function DataGrid(props) {
|
|
|
108
112
|
),
|
|
109
113
|
CustomHeader ? /* @__PURE__ */ jsx(CustomHeaderStyled, { ownerState, children: CustomHeader }) : null,
|
|
110
114
|
/* @__PURE__ */ jsx(
|
|
111
|
-
|
|
115
|
+
RenderContent,
|
|
112
116
|
{
|
|
113
117
|
id,
|
|
114
118
|
withActions,
|
|
@@ -117,7 +121,8 @@ function DataGrid(props) {
|
|
|
117
121
|
selectedRows,
|
|
118
122
|
onSelectedRowsChange,
|
|
119
123
|
rowKeyGetter,
|
|
120
|
-
onRowsChange
|
|
124
|
+
onRowsChange,
|
|
125
|
+
cardsViewConfig
|
|
121
126
|
}
|
|
122
127
|
),
|
|
123
128
|
withPager && /* @__PURE__ */ jsx(
|
|
@@ -639,6 +639,276 @@ const dataGridStyles = {
|
|
|
639
639
|
}
|
|
640
640
|
};
|
|
641
641
|
},
|
|
642
|
+
/**
|
|
643
|
+
* Estilos para el wrapper del CheckboxCellAdapter
|
|
644
|
+
* Aplica los mismos estilos que los checkboxes dentro de celdas rdg
|
|
645
|
+
*/
|
|
646
|
+
checkboxCellWrapper: ({ theme, ownerState }) => ({
|
|
647
|
+
"& .checkbox-checked": {
|
|
648
|
+
"& path:first-of-type": {
|
|
649
|
+
fill: theme.vars.palette.primary.main
|
|
650
|
+
},
|
|
651
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "base", (size) => ({
|
|
652
|
+
minHeight: size,
|
|
653
|
+
height: size
|
|
654
|
+
}))
|
|
655
|
+
},
|
|
656
|
+
"& .checkbox-unChecked": {
|
|
657
|
+
"& path": {
|
|
658
|
+
fill: theme.vars.palette.text.primary
|
|
659
|
+
},
|
|
660
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "base", (size) => ({
|
|
661
|
+
minHeight: size,
|
|
662
|
+
height: size
|
|
663
|
+
}))
|
|
664
|
+
},
|
|
665
|
+
"& .MuiCheckbox-root": {
|
|
666
|
+
"& > svg": {
|
|
667
|
+
color: theme.vars.palette.text.secondary
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}),
|
|
671
|
+
/**
|
|
672
|
+
* Contenedor de los cards
|
|
673
|
+
*/
|
|
674
|
+
containerToggleCards: ({ theme }) => ({
|
|
675
|
+
display: "grid",
|
|
676
|
+
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
677
|
+
gap: theme.vars.size.baseSpacings.sp3,
|
|
678
|
+
padding: theme.vars.size.baseSpacings.sp3
|
|
679
|
+
}),
|
|
680
|
+
/**
|
|
681
|
+
* Botón de toggle de cards
|
|
682
|
+
*/
|
|
683
|
+
cardToggleCardButton: ({ theme, ownerState }) => ({
|
|
684
|
+
display: "flex",
|
|
685
|
+
flexDirection: "column",
|
|
686
|
+
alignItems: "center",
|
|
687
|
+
cursor: "pointer",
|
|
688
|
+
height: theme.vars.size.baseSpacings.sp14,
|
|
689
|
+
width: theme.vars.size.baseSpacings.sp14,
|
|
690
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
691
|
+
borderColor: ownerState?.isActive ? theme.vars.palette.primary.toneOpacity : theme.vars.palette.border.disabled
|
|
692
|
+
}),
|
|
693
|
+
/**
|
|
694
|
+
* Texto del botón de toggle de cards
|
|
695
|
+
*/
|
|
696
|
+
textToggleCardButton: ({ theme, ownerState }) => ({
|
|
697
|
+
"&.M4LTypography-root": {
|
|
698
|
+
color: ownerState?.isActive ? theme.vars.palette.primary.semanticText : theme.vars.palette.text.secondary,
|
|
699
|
+
cursor: "pointer"
|
|
700
|
+
}
|
|
701
|
+
}),
|
|
702
|
+
/**
|
|
703
|
+
* Contenedor de los cards
|
|
704
|
+
*/
|
|
705
|
+
cardsContainer: () => ({
|
|
706
|
+
height: "auto",
|
|
707
|
+
overflow: "auto"
|
|
708
|
+
}),
|
|
709
|
+
/**
|
|
710
|
+
* Card de la vista cards
|
|
711
|
+
*/
|
|
712
|
+
card: ({ theme, ownerState }) => ({
|
|
713
|
+
display: "flex",
|
|
714
|
+
flexDirection: "column",
|
|
715
|
+
alignItems: "start",
|
|
716
|
+
minWidth: "280px",
|
|
717
|
+
maxWidth: "580px",
|
|
718
|
+
cursor: "pointer",
|
|
719
|
+
// Si está checked (pero no selected), border de checked
|
|
720
|
+
...ownerState?.checked && !ownerState?.selected && {
|
|
721
|
+
borderColor: theme.vars.palette.primary.activeOpacity
|
|
722
|
+
},
|
|
723
|
+
// Si está selected, usar el color original del Card (primary.enabled)
|
|
724
|
+
// Este tiene prioridad sobre checked
|
|
725
|
+
...ownerState?.selected && {
|
|
726
|
+
borderColor: theme.vars.palette.primary.selected
|
|
727
|
+
}
|
|
728
|
+
}),
|
|
729
|
+
/**
|
|
730
|
+
* Header de la card con checkbox y acciones
|
|
731
|
+
*/
|
|
732
|
+
cardHeader: ({ theme, ownerState }) => ({
|
|
733
|
+
display: "flex",
|
|
734
|
+
justifyContent: ownerState?.hasCheckedRows ? "space-between" : "flex-end",
|
|
735
|
+
alignItems: "center",
|
|
736
|
+
width: "100%",
|
|
737
|
+
height: "24px",
|
|
738
|
+
gap: theme.vars.size.baseSpacings.sp2
|
|
739
|
+
}),
|
|
740
|
+
/**
|
|
741
|
+
* Lado izquierdo del header (checkbox)
|
|
742
|
+
*/
|
|
743
|
+
cardHeaderLeft: () => ({
|
|
744
|
+
display: "flex",
|
|
745
|
+
alignItems: "center"
|
|
746
|
+
}),
|
|
747
|
+
/**
|
|
748
|
+
* Lado derecho del header (botones de acción)
|
|
749
|
+
*/
|
|
750
|
+
cardHeaderRight: ({ theme }) => ({
|
|
751
|
+
display: "flex",
|
|
752
|
+
alignItems: "center",
|
|
753
|
+
gap: theme.vars.size.baseSpacings.sp1
|
|
754
|
+
}),
|
|
755
|
+
/**
|
|
756
|
+
* Contenedor de las columnas de la card
|
|
757
|
+
*/
|
|
758
|
+
containerLabelValueColumn: ({ theme, ownerState }) => ({
|
|
759
|
+
display: "flex",
|
|
760
|
+
flexDirection: ownerState?.hasActions ? "row" : "column",
|
|
761
|
+
justifyContent: ownerState?.hasActions ? "space-between" : "flex-start",
|
|
762
|
+
alignItems: ownerState?.hasActions ? "center" : "start",
|
|
763
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
764
|
+
width: ownerState?.hasActions ? "100%" : "auto"
|
|
765
|
+
}),
|
|
766
|
+
/**
|
|
767
|
+
* Contenedor del contenido de la columna
|
|
768
|
+
*/
|
|
769
|
+
contentWrapperColumn: ({ theme, ownerState }) => ({
|
|
770
|
+
flex: ownerState?.hasActions ? 1 : "none",
|
|
771
|
+
display: "flex",
|
|
772
|
+
flexDirection: "column",
|
|
773
|
+
alignItems: "start",
|
|
774
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
775
|
+
}),
|
|
776
|
+
/**
|
|
777
|
+
* Contenedor del detalle de la card
|
|
778
|
+
*/
|
|
779
|
+
cardDetailContainer: ({ theme }) => ({
|
|
780
|
+
display: "flex",
|
|
781
|
+
flexDirection: "column",
|
|
782
|
+
gap: theme.vars.size.baseSpacings.sp3,
|
|
783
|
+
padding: theme.vars.size.baseSpacings.sp3,
|
|
784
|
+
height: "100%",
|
|
785
|
+
overflow: "auto"
|
|
786
|
+
}),
|
|
787
|
+
/**
|
|
788
|
+
* Etiqueta de la columna
|
|
789
|
+
*/
|
|
790
|
+
labelHeaderColumn: () => ({}),
|
|
791
|
+
/**
|
|
792
|
+
* Valor de la columna
|
|
793
|
+
*/
|
|
794
|
+
valueColumn: () => ({}),
|
|
795
|
+
/**
|
|
796
|
+
* Contenedor del editor en la card
|
|
797
|
+
*/
|
|
798
|
+
editorCellWrapper: ({ theme, ownerState }) => ({
|
|
799
|
+
overflow: "clip",
|
|
800
|
+
outline: "none",
|
|
801
|
+
color: theme.vars.palette.text.primary,
|
|
802
|
+
paddingBlock: 0,
|
|
803
|
+
alignContent: "center",
|
|
804
|
+
backgroundColor: "inherit",
|
|
805
|
+
whiteSpace: "nowrap",
|
|
806
|
+
textOverflow: "ellipsis",
|
|
807
|
+
inlineSize: "100%",
|
|
808
|
+
alignSelf: "stretch",
|
|
809
|
+
boxSizing: "border-box",
|
|
810
|
+
...getTypographyStyles(
|
|
811
|
+
theme.generalSettings.isMobile,
|
|
812
|
+
ownerState?.size || "medium",
|
|
813
|
+
"body"
|
|
814
|
+
),
|
|
815
|
+
...getSizeStyles(theme, ownerState?.size || "medium", "base", (size) => ({
|
|
816
|
+
minHeight: size,
|
|
817
|
+
height: 24,
|
|
818
|
+
lineHeight: `${size} !important`
|
|
819
|
+
})),
|
|
820
|
+
"& input": {
|
|
821
|
+
width: "100%",
|
|
822
|
+
textAlign: "inherit",
|
|
823
|
+
color: theme.vars.palette.text.secondary,
|
|
824
|
+
padding: `${theme.vars.size.baseSpacings.sp0} ${theme.vars.size.baseSpacings.sp2}`,
|
|
825
|
+
border: theme.vars.size.baseSpacings.sp0,
|
|
826
|
+
borderTop: "0.5px solid",
|
|
827
|
+
borderBottom: theme.vars.size.borderStroke.container,
|
|
828
|
+
borderLeft: "0.5px solid",
|
|
829
|
+
borderRight: "0.5px solid",
|
|
830
|
+
borderColor: "transparent",
|
|
831
|
+
...theme.colorSchemes.finalTheme.typography.body,
|
|
832
|
+
"&:focus": {
|
|
833
|
+
borderTop: "0.5px solid",
|
|
834
|
+
borderBottom: theme.vars.size.borderStroke.container,
|
|
835
|
+
borderLeft: "0.5px solid",
|
|
836
|
+
borderRight: "0.5px solid",
|
|
837
|
+
borderColor: `${theme.vars.palette.primary.focusVisible} !important`,
|
|
838
|
+
outline: "none",
|
|
839
|
+
boxShadow: "none"
|
|
840
|
+
},
|
|
841
|
+
"&:hover": {
|
|
842
|
+
borderTop: "0.5px solid",
|
|
843
|
+
borderBottom: theme.vars.size.borderStroke.container,
|
|
844
|
+
borderLeft: "0.5px solid",
|
|
845
|
+
borderRight: "0.5px solid",
|
|
846
|
+
borderColor: "transparent",
|
|
847
|
+
outline: "none"
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}),
|
|
851
|
+
/**
|
|
852
|
+
* Header de la card personalizada (avatar + nombre + email)
|
|
853
|
+
*/
|
|
854
|
+
customCardHeader: ({ theme }) => ({
|
|
855
|
+
display: "flex",
|
|
856
|
+
gap: theme.vars.size.baseSpacings.sp4,
|
|
857
|
+
alignItems: "center",
|
|
858
|
+
marginBottom: theme.vars.size.baseSpacings.sp2
|
|
859
|
+
}),
|
|
860
|
+
/**
|
|
861
|
+
* Avatar con iniciales
|
|
862
|
+
*/
|
|
863
|
+
customCardAvatar: ({ theme }) => ({
|
|
864
|
+
width: "32px",
|
|
865
|
+
height: "32px",
|
|
866
|
+
borderRadius: theme.vars.size.borderRadius.r3,
|
|
867
|
+
border: theme.vars.size.borderStroke.container,
|
|
868
|
+
borderColor: theme.vars.palette.primary.toneOpacity,
|
|
869
|
+
display: "flex",
|
|
870
|
+
alignItems: "center",
|
|
871
|
+
justifyContent: "center",
|
|
872
|
+
flexShrink: 0
|
|
873
|
+
}),
|
|
874
|
+
/**
|
|
875
|
+
* Contenedor del nombre y email
|
|
876
|
+
*/
|
|
877
|
+
customCardNameEmail: ({ theme }) => ({
|
|
878
|
+
display: "flex",
|
|
879
|
+
flexDirection: "column",
|
|
880
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
881
|
+
}),
|
|
882
|
+
/**
|
|
883
|
+
* Campo con icono (reutilizable para phone, IP, etc)
|
|
884
|
+
*/
|
|
885
|
+
customCardFieldWithIcon: ({ theme }) => ({
|
|
886
|
+
display: "flex",
|
|
887
|
+
alignItems: "center",
|
|
888
|
+
gap: theme.vars.size.baseSpacings.sp3
|
|
889
|
+
}),
|
|
890
|
+
/**
|
|
891
|
+
* Contenedor del contenido del campo (label + valor)
|
|
892
|
+
*/
|
|
893
|
+
customCardFieldContent: ({ theme }) => ({
|
|
894
|
+
display: "flex",
|
|
895
|
+
flexDirection: "column",
|
|
896
|
+
gap: theme.vars.size.baseSpacings["sp0-5"]
|
|
897
|
+
}),
|
|
898
|
+
/**
|
|
899
|
+
* Contenedor del icono con border
|
|
900
|
+
*/
|
|
901
|
+
customCardIconContainer: ({ theme }) => ({
|
|
902
|
+
width: "24px",
|
|
903
|
+
height: "24px",
|
|
904
|
+
display: "flex",
|
|
905
|
+
alignItems: "center",
|
|
906
|
+
justifyContent: "center",
|
|
907
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
908
|
+
border: theme.vars.size.borderStroke.container,
|
|
909
|
+
borderColor: theme.vars.palette.primary.toneOpacity,
|
|
910
|
+
flexShrink: 0
|
|
911
|
+
}),
|
|
642
912
|
/**
|
|
643
913
|
* Estilos para el header del componente
|
|
644
914
|
*/
|
|
@@ -35,7 +35,7 @@ export {
|
|
|
35
35
|
DATAGRID_ROW_HEADER_HEIGHTS as b,
|
|
36
36
|
DATAGRID_ID_DICTIONARY as c,
|
|
37
37
|
DATAGRID_SELECT_COLUMN_KEY as d,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
DATAGRID_ACTIONS_COLUMN_KEY as e,
|
|
39
|
+
DATAGRID_SEMANTIC_WIDTHS as f,
|
|
40
40
|
DATAGRID_HEADER_RENDER_CLICK_KEY as g
|
|
41
41
|
};
|