@m4l/components 9.2.65 → 9.3.1-B21072025-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 +15 -0
- package/components/DataGrid/Datagrid.styles.js +112 -9
- package/components/DataGrid/formatters/ColumnBooleanFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js +2 -3
- package/components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js +5 -4
- package/components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js +11 -4
- package/components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnDateFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnDateFormatter/formatter.js +13 -4
- package/components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +2 -2
- package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/types.d.ts +2 -2
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js +4 -3
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/formatter.js +13 -5
- package/components/DataGrid/formatters/ColumnPointsFormatter/useColumnPoints.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnPriceFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnPriceFormatter/formatter.js +11 -4
- package/components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.d.ts +2 -2
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js +1 -1
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.d.ts +2 -1
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js +15 -6
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.d.ts +1 -1
- package/components/DataGrid/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +4 -5
- package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +15 -6
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +13 -5
- package/components/DataGrid/subcomponents/Table/index.d.ts +3 -1
- package/components/DataGrid/subcomponents/Table/index.js +38 -9
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +10 -8
- package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +7 -7
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +15 -5
- package/components/DataGrid/types.d.ts +9 -4
- package/components/SettingsLayout/SettingsLayout.d.ts +5 -0
- package/components/SettingsLayout/SettingsLayout.js +50 -0
- package/components/SettingsLayout/SettingsLayout.styles.d.ts +2 -0
- package/components/SettingsLayout/SettingsLayout.styles.js +245 -0
- package/components/SettingsLayout/constants.d.ts +7 -0
- package/components/SettingsLayout/constants.js +10 -0
- package/components/SettingsLayout/dictionary.d.ts +56 -0
- package/components/SettingsLayout/dictionary.js +12 -0
- package/components/SettingsLayout/icons.d.ts +13 -0
- package/components/SettingsLayout/icons.js +16 -0
- package/components/SettingsLayout/index.d.ts +2 -0
- package/components/SettingsLayout/index.js +1 -0
- package/components/SettingsLayout/slots/SettingsLayoutEnum.d.ts +16 -0
- package/components/SettingsLayout/slots/SettingsLayoutEnum.js +20 -0
- package/components/SettingsLayout/slots/SettingsLayoutSlots.d.ts +44 -0
- package/components/SettingsLayout/slots/SettingsLayoutSlots.js +78 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/SettingColorPresets.d.ts +4 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/SettingColorPresets.js +34 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingColorPresets/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/SettingDirection.d.ts +4 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/SettingDirection.js +34 -0
- package/components/SettingsLayout/subcomponents/SettingDirection/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/SettingFullscreen.d.ts +4 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/SettingFullscreen.js +40 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingFullscreen/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingItem/SettingItem.d.ts +8 -0
- package/components/SettingsLayout/subcomponents/SettingItem/SettingItem.js +23 -0
- package/components/SettingsLayout/subcomponents/SettingItem/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingItem/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingItem/types.d.ts +5 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/SettingItemColor.d.ts +8 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/SettingItemColor.js +20 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingItemColor/types.d.ts +6 -0
- package/components/SettingsLayout/subcomponents/SettingMode/SettingMode.d.ts +4 -0
- package/components/SettingsLayout/subcomponents/SettingMode/SettingMode.js +34 -0
- package/components/SettingsLayout/subcomponents/SettingMode/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingMode/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/SettingsLayoutBase.d.ts +4 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/SettingsLayoutBase.js +76 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/index.d.ts +1 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/index.js +1 -0
- package/components/SettingsLayout/subcomponents/SettingsLayoutBase/types.d.ts +0 -0
- package/components/SettingsLayout/test/SettingsLayout.test.d.ts +1 -0
- package/components/SettingsLayout/types.d.ts +51 -0
- package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +1 -1
- package/components/index.d.ts +1 -0
- package/components/mui_extended/MenuItem/MenuItem.js +2 -1
- package/components/mui_extended/MenuItem/types.d.ts +4 -0
- package/index.js +4 -2
- package/package.json +4 -4
- package/storybook/components/DataGrid/DataGrid.stories.d.ts +4 -0
- package/storybook/components/DataGrid/helpers/types.d.ts +3 -2
- package/storybook/components/SettingsLayout/SettingsLayout.stories.d.ts +6 -0
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/SettingsLayoutsRender.d.ts +5 -0
- package/storybook/components/SettingsLayout/subcomponents/SettingsLayoutRender/index.d.ts +1 -0
- package/helpers/getFieldValueWithRow.js +0 -10
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useBase, useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { P as PATH_ICONS } from "../../icons.js";
|
|
4
|
+
import { S as SettingContainerStyled, a as SettingIconTitleStyled, b as SettingItemContentStyled } from "../../slots/SettingsLayoutSlots.js";
|
|
5
|
+
import { D as DICTIONARY } from "../../dictionary.js";
|
|
6
|
+
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
7
|
+
import { S as SettingItem } from "../SettingItem/SettingItem.js";
|
|
8
|
+
import { I as Icon } from "../../../Icon/Icon.js";
|
|
9
|
+
function SettingDirection() {
|
|
10
|
+
const { prefixPathIcon, onChangeDirection, themeUserSettings } = useBase();
|
|
11
|
+
const { themeDirection } = themeUserSettings;
|
|
12
|
+
const { getLabel } = useModuleDictionary();
|
|
13
|
+
return /* @__PURE__ */ jsxs(SettingContainerStyled, { children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(SettingIconTitleStyled, { children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Icon, { src: `${prefixPathIcon}/${PATH_ICONS.DIRECTION}` }),
|
|
16
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", children: getLabel(DICTIONARY.DIRECTION) })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ jsx(SettingItemContentStyled, { role: "group", "aria-label": "theme-direction-options", children: ["ltr", "rtl"].map((direction, index) => {
|
|
19
|
+
const isSelected = themeDirection === direction;
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
SettingItem,
|
|
22
|
+
{
|
|
23
|
+
iconUrl: direction === "ltr" ? `${prefixPathIcon}/${PATH_ICONS.ALIGN_LEFT}` : `${prefixPathIcon}/${PATH_ICONS.ALIGN_RIGHT}`,
|
|
24
|
+
selected: isSelected,
|
|
25
|
+
onChange: () => onChangeDirection(direction)
|
|
26
|
+
},
|
|
27
|
+
`${direction}-${index}`
|
|
28
|
+
);
|
|
29
|
+
}) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
SettingDirection as S
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SettingDirection';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Icon } from "@m4l/components";
|
|
4
|
+
import { useBase, useModuleDictionary } from "@m4l/core";
|
|
5
|
+
import { D as DICTIONARY } from "../../dictionary.js";
|
|
6
|
+
import { P as PATH_ICONS } from "../../icons.js";
|
|
7
|
+
import { c as SettingFullscreenStyled } from "../../slots/SettingsLayoutSlots.js";
|
|
8
|
+
const SettingFullscreen = () => {
|
|
9
|
+
const [fullscreen, setFullscreen] = useState(false);
|
|
10
|
+
const { prefixPathIcon } = useBase();
|
|
11
|
+
const { getLabel } = useModuleDictionary();
|
|
12
|
+
const toggleFullScreen = () => {
|
|
13
|
+
if (!document.fullscreenElement) {
|
|
14
|
+
document.documentElement.requestFullscreen();
|
|
15
|
+
setFullscreen(true);
|
|
16
|
+
} else if (document.exitFullscreen) {
|
|
17
|
+
document.exitFullscreen();
|
|
18
|
+
setFullscreen(false);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
SettingFullscreenStyled,
|
|
23
|
+
{
|
|
24
|
+
fullWidth: true,
|
|
25
|
+
variant: "outlined",
|
|
26
|
+
color: "default",
|
|
27
|
+
startIcon: /* @__PURE__ */ jsx(
|
|
28
|
+
Icon,
|
|
29
|
+
{
|
|
30
|
+
src: fullscreen ? `${prefixPathIcon}/${PATH_ICONS.FULLSCREEN_EXIT}` : `${prefixPathIcon}/${PATH_ICONS.FULLSCREEN}`
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
onClick: toggleFullScreen,
|
|
34
|
+
label: getLabel(fullscreen ? DICTIONARY.EXIT_FULLSCREEN : DICTIONARY.FULLSCREEN)
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
SettingFullscreen as S
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SettingFullscreen } from './SettingFullscreen';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SettingItemProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente para el item de configuración.
|
|
4
|
+
* Este componente se utiliza para mostrar un item de configuración en el componente SettingsLayout.
|
|
5
|
+
* @param props - Propiedades del componente.
|
|
6
|
+
* @returns Componente SettingItem.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SettingItem: (props: SettingItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { d as SettingItemStyled } from "../../slots/SettingsLayoutSlots.js";
|
|
3
|
+
import { I as Icon } from "../../../Icon/Icon.js";
|
|
4
|
+
const SettingItem = (props) => {
|
|
5
|
+
const { iconUrl, onChange, selected } = props;
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
SettingItemStyled,
|
|
8
|
+
{
|
|
9
|
+
...onChange ? {
|
|
10
|
+
onClick: onChange,
|
|
11
|
+
tabIndex: 0,
|
|
12
|
+
role: "radio",
|
|
13
|
+
"aria-label": "theme-mode-options",
|
|
14
|
+
"aria-checked": true
|
|
15
|
+
} : {},
|
|
16
|
+
ownerState: { selected, onChange: !!onChange },
|
|
17
|
+
children: /* @__PURE__ */ jsx(Icon, { src: iconUrl, color: selected ? "primary.enabled" : "text.secondary" })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
SettingItem as S
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SettingItem } from './SettingItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SettingItemColorProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente para el item de configuración.
|
|
4
|
+
* Este componente se utiliza para mostrar un item de configuración en el componente SettingsLayout.
|
|
5
|
+
* @param props - Propiedades del componente.
|
|
6
|
+
* @returns Componente SettingItem.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SettingItemColor: (props: SettingItemColorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { e as SettingItemColorStyled } from "../../slots/SettingsLayoutSlots.js";
|
|
3
|
+
const SettingItemColor = (props) => {
|
|
4
|
+
const { onChange, selected, color } = props;
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
SettingItemColorStyled,
|
|
7
|
+
{
|
|
8
|
+
...onChange ? {
|
|
9
|
+
onClick: onChange,
|
|
10
|
+
tabIndex: 0,
|
|
11
|
+
role: "radio",
|
|
12
|
+
"aria-checked": true
|
|
13
|
+
} : {},
|
|
14
|
+
ownerState: { selected, onChange: !!onChange, color }
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
SettingItemColor as S
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SettingItemColor } from './SettingItemColor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "@m4l/components";
|
|
3
|
+
import { useBase, useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { P as PATH_ICONS } from "../../icons.js";
|
|
5
|
+
import { D as DICTIONARY } from "../../dictionary.js";
|
|
6
|
+
import { S as SettingContainerStyled, a as SettingIconTitleStyled, b as SettingItemContentStyled } from "../../slots/SettingsLayoutSlots.js";
|
|
7
|
+
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
8
|
+
import { S as SettingItem } from "../SettingItem/SettingItem.js";
|
|
9
|
+
const SettingMode = () => {
|
|
10
|
+
const { prefixPathIcon, themeUserSettings, onChangeMode } = useBase();
|
|
11
|
+
const { themeMode } = themeUserSettings;
|
|
12
|
+
const { getLabel } = useModuleDictionary();
|
|
13
|
+
return /* @__PURE__ */ jsxs(SettingContainerStyled, { role: "group", "aria-label": "theme-mode-options", children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(SettingIconTitleStyled, { children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Icon, { src: `${prefixPathIcon}/${PATH_ICONS.MODE}` }),
|
|
16
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", children: getLabel(DICTIONARY.MODE) })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ jsx(SettingItemContentStyled, { children: ["light", "dark"].map((mode, index) => {
|
|
19
|
+
const isSelected = themeMode === mode;
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
SettingItem,
|
|
22
|
+
{
|
|
23
|
+
iconUrl: mode === "light" ? `${prefixPathIcon}/${PATH_ICONS.SUN}` : `${prefixPathIcon}/${PATH_ICONS.MOON}`,
|
|
24
|
+
selected: isSelected,
|
|
25
|
+
onChange: () => onChangeMode(mode)
|
|
26
|
+
},
|
|
27
|
+
`${mode}-${index}`
|
|
28
|
+
);
|
|
29
|
+
}) })
|
|
30
|
+
] });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
SettingMode as S
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SettingMode } from './SettingMode';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatePresence } from "framer-motion";
|
|
3
|
+
import { useBase, useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { P as PATH_ICONS } from "../../icons.js";
|
|
5
|
+
import { B as BackdropStyled, f as SettingsLayoutRootStyled, H as HeaderContainerStyled, T as TypographyStyled, g as HeaderActionsStyled, h as BodyContentStyled } from "../../slots/SettingsLayoutSlots.js";
|
|
6
|
+
import { S as SettingDirection } from "../SettingDirection/SettingDirection.js";
|
|
7
|
+
import { D as DICTIONARY } from "../../dictionary.js";
|
|
8
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/IconButton.js";
|
|
9
|
+
import { S as SettingMode } from "../SettingMode/SettingMode.js";
|
|
10
|
+
import { S as SettingColorPresets } from "../SettingColorPresets/SettingColorPresets.js";
|
|
11
|
+
import { S as SettingFullscreen } from "../SettingFullscreen/SettingFullscreen.js";
|
|
12
|
+
const SettingsLayoutBase = () => {
|
|
13
|
+
const {
|
|
14
|
+
onResetSetting,
|
|
15
|
+
handleOpen,
|
|
16
|
+
open,
|
|
17
|
+
themeUserSettings,
|
|
18
|
+
width,
|
|
19
|
+
classes,
|
|
20
|
+
prefixPathIcon
|
|
21
|
+
} = useBase();
|
|
22
|
+
const { themeDirection } = themeUserSettings;
|
|
23
|
+
const { getLabel } = useModuleDictionary();
|
|
24
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
BackdropStyled,
|
|
27
|
+
{
|
|
28
|
+
ownerState: {},
|
|
29
|
+
open,
|
|
30
|
+
onClick: () => handleOpen()
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(SettingsLayoutRootStyled, { role: "form", "aria-label": "settings-layout", ownerState: { themeDirection, width }, className: classes.root, children: [
|
|
34
|
+
/* @__PURE__ */ jsxs(HeaderContainerStyled, { ownerState: {}, className: classes.headerContainer, children: [
|
|
35
|
+
/* @__PURE__ */ jsx(
|
|
36
|
+
TypographyStyled,
|
|
37
|
+
{
|
|
38
|
+
ownerState: {},
|
|
39
|
+
variant: "subtitleDens",
|
|
40
|
+
ellipsis: true,
|
|
41
|
+
children: getLabel(DICTIONARY.MODULE_NAME)
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsxs(HeaderActionsStyled, { children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
IconButton,
|
|
47
|
+
{
|
|
48
|
+
src: `${prefixPathIcon}/${PATH_ICONS.REFRESH}`,
|
|
49
|
+
onClick: onResetSetting,
|
|
50
|
+
role: "button",
|
|
51
|
+
"aria-label": "reset-setting"
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
IconButton,
|
|
56
|
+
{
|
|
57
|
+
src: `${prefixPathIcon}/${PATH_ICONS.CLOSE}`,
|
|
58
|
+
onClick: () => handleOpen(),
|
|
59
|
+
role: "button",
|
|
60
|
+
"aria-label": "close-settings"
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs(BodyContentStyled, { ownerState: {}, children: [
|
|
66
|
+
/* @__PURE__ */ jsx(SettingMode, {}),
|
|
67
|
+
/* @__PURE__ */ jsx(SettingDirection, {}),
|
|
68
|
+
/* @__PURE__ */ jsx(SettingColorPresets, {}),
|
|
69
|
+
/* @__PURE__ */ jsx(SettingFullscreen, {})
|
|
70
|
+
] })
|
|
71
|
+
] }) })
|
|
72
|
+
] });
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
SettingsLayoutBase as S
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SettingsLayoutBase } from './SettingsLayoutBase';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { M4LOverridesStyleRules } from 'src/@types/augmentations';
|
|
2
|
+
import { SettingsLayoutSlots } from './slots/SettingsLayoutEnum';
|
|
3
|
+
import { SETTINGS_LAYOUT_CLASSES, SETTINGS_LAYOUT_COMPONENT_KEY } from './constants';
|
|
4
|
+
import { Theme } from '@mui/material';
|
|
5
|
+
import { Sizes, ThemeUserColor } from '@m4l/styles';
|
|
6
|
+
import { ThemeSettingsStateWithActions, ThemeSettingsStore } from '@m4l/graphics';
|
|
7
|
+
export interface SettingsLayoutProps extends Pick<ThemeSettingsStateWithActions['settingsActions'], 'onResetSetting' | 'handleOpen' | 'onChangeMode' | 'onChangeColor' | 'onChangeDirection' | 'onChangeLayout' | 'onToggleStretch'>, Pick<ThemeSettingsStore, 'open' | 'themeUserSettings' | 'presetsOptionsColorMain'> {
|
|
8
|
+
/**
|
|
9
|
+
* Propiedad que define el ancho del componente.
|
|
10
|
+
*/
|
|
11
|
+
width?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Medida de tamaño para el componente.
|
|
14
|
+
*/
|
|
15
|
+
size: Extract<Sizes, 'small' | 'medium'>;
|
|
16
|
+
/**
|
|
17
|
+
* Nombre de clase css.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Identificador usado para pruebas del componente.
|
|
22
|
+
*/
|
|
23
|
+
dataTestId?: string;
|
|
24
|
+
}
|
|
25
|
+
export type SettingsBaseProvider = Omit<SettingsLayoutProps, 'size' | 'className' | 'dataTestId'> & {
|
|
26
|
+
classes: Record<keyof typeof SETTINGS_LAYOUT_CLASSES, string>;
|
|
27
|
+
prefixPathIcon: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Tipo para las ranuras del componente.
|
|
31
|
+
* Este tipo se refiere a las claves dentro de `SettingsLayoutSlots`, que determinan los diferentes elementos
|
|
32
|
+
* estilizados dentro del componente, como el `root`, `backdrop`, etc.
|
|
33
|
+
*/
|
|
34
|
+
export type SettingsLayoutSlotsType = keyof typeof SettingsLayoutSlots;
|
|
35
|
+
/**
|
|
36
|
+
* Combinación de las propiedades del componente y su estado propietario.
|
|
37
|
+
* Este tipo se utiliza para describir el estado completo del componente , incluyendo
|
|
38
|
+
* las propiedades pasadas al componente y el estado calculado.
|
|
39
|
+
*/
|
|
40
|
+
export interface SettingsLayoutOwnerState extends Pick<SettingsLayoutProps['themeUserSettings'], 'themeDirection'> {
|
|
41
|
+
width: SettingsLayoutProps['width'];
|
|
42
|
+
size: SettingsLayoutProps['size'];
|
|
43
|
+
color?: ThemeUserColor;
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Tipos de estilos para el componente.
|
|
48
|
+
* Esta interfaz extiende las reglas de estilo personalizadas para las ranuras del componente (`SettingsLayoutSlots`)
|
|
49
|
+
* y permite su sobrescritura.
|
|
50
|
+
*/
|
|
51
|
+
export type SettingsLayoutstyles = M4LOverridesStyleRules<SettingsLayoutSlots, typeof SETTINGS_LAYOUT_COMPONENT_KEY, Theme>;
|
package/components/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ const MenuItem = (props) => {
|
|
|
20
20
|
checked = false,
|
|
21
21
|
checkable = false,
|
|
22
22
|
className,
|
|
23
|
+
dataTestId,
|
|
23
24
|
...other
|
|
24
25
|
} = props;
|
|
25
26
|
const { currentSize } = useComponentSize(size);
|
|
@@ -83,7 +84,7 @@ const MenuItem = (props) => {
|
|
|
83
84
|
disableRipple: true,
|
|
84
85
|
size: adjustedSize,
|
|
85
86
|
className: clsx(className, MENUITEM_CLASSES.root),
|
|
86
|
-
"data-testid": "MenuItemRoot",
|
|
87
|
+
"data-testid": dataTestId || "MenuItemRoot",
|
|
87
88
|
children: [
|
|
88
89
|
checkable && /* @__PURE__ */ jsx(
|
|
89
90
|
MenuItemIconCheckedStyled,
|
|
@@ -53,6 +53,10 @@ export interface MenuItemProps extends Omit<MUIMenuItemProps, 'size' | 'color'>
|
|
|
53
53
|
* indica si debe aparecer el icono de check
|
|
54
54
|
*/
|
|
55
55
|
checkable?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* ID para pruebas que se pasará como data-testid
|
|
58
|
+
*/
|
|
59
|
+
dataTestId?: string;
|
|
56
60
|
}
|
|
57
61
|
/**
|
|
58
62
|
* Estado del propietario del `MenuItem` utilizado para definir propiedades internas de estilo y comportamiento.
|
package/index.js
CHANGED
|
@@ -185,6 +185,7 @@ import { D as D10, a as a13, M as M7 } from "./components/WindowBase/contexts/Dy
|
|
|
185
185
|
import { W as W3 } from "./components/WindowConfirm/WindowConfirm.js";
|
|
186
186
|
import { a as a14, g as g27 } from "./components/ModalDialog/dictionary.js";
|
|
187
187
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
188
|
+
import { S as S9 } from "./components/SettingsLayout/SettingsLayout.js";
|
|
188
189
|
import { P as P13 } from "./components/Pager/Pager.js";
|
|
189
190
|
import { F as F2, R as R22, u as u16 } from "./components/hook-form/RHFormContext/index.js";
|
|
190
191
|
import { g as g28 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
@@ -200,7 +201,7 @@ import { u as u22 } from "./hooks/useInterval/index.js";
|
|
|
200
201
|
import { u as u23 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
201
202
|
import { u as u24 } from "./hooks/useFormReadyForUpdate/index.js";
|
|
202
203
|
import { u as u25 } from "./hooks/useStateRef/index.js";
|
|
203
|
-
import { S as
|
|
204
|
+
import { S as S10 } from "./hooks/useSvgColor/constants.js";
|
|
204
205
|
import { u as u26 } from "./hooks/useSvgColor/useSvgColor.js";
|
|
205
206
|
import { u as u27 } from "./hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js";
|
|
206
207
|
import { u as u28 } from "./hooks/useDataGridPersistence/useDataGridPersistence.js";
|
|
@@ -346,10 +347,11 @@ export {
|
|
|
346
347
|
R as Resizable,
|
|
347
348
|
R2 as ResizableBox,
|
|
348
349
|
R3 as Responsive,
|
|
349
|
-
|
|
350
|
+
S10 as SKELETON_SVG_ICON,
|
|
350
351
|
S7 as ScrollBar,
|
|
351
352
|
S as SectionCommercial,
|
|
352
353
|
S6 as SelectStyled,
|
|
354
|
+
S9 as SettingsLayout,
|
|
353
355
|
S8 as SideBar,
|
|
354
356
|
S4 as Skeleton,
|
|
355
357
|
S2 as SortCompareValues,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.1-B21072025-beta.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "M4L Components",
|
|
6
6
|
"lint-staged": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
12
12
|
"@hookform/resolvers": "2.9.11",
|
|
13
13
|
"@m4l/core": "^2.0.0",
|
|
14
|
-
"@m4l/graphics": "
|
|
15
|
-
"@m4l/styles": "
|
|
14
|
+
"@m4l/graphics": "7.1.3-B21072025-beta.1",
|
|
15
|
+
"@m4l/styles": "7.1.31-B21072025-beta.1",
|
|
16
16
|
"@microlink/react-json-view": "^1.23.3",
|
|
17
17
|
"@mui/lab": "5.0.0-alpha.173",
|
|
18
18
|
"@mui/material": "5.16.7",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react": "18.3.1",
|
|
35
35
|
"react-chartjs-2": "^5.2.0",
|
|
36
36
|
"react-color": "^2.19.3",
|
|
37
|
-
"react-data-grid": "7.0.0-beta.
|
|
37
|
+
"react-data-grid": "7.0.0-beta.47",
|
|
38
38
|
"react-dnd": "^16.0.1",
|
|
39
39
|
"react-dnd-html5-backend": "^16.0.1",
|
|
40
40
|
"react-dom": "18.3.1",
|
|
@@ -19,6 +19,10 @@ export declare const DataGridWithEventChangeUserColumn: Story;
|
|
|
19
19
|
* DataGrid con columns formatters
|
|
20
20
|
*/
|
|
21
21
|
export declare const DatagridWithFormatters: Story;
|
|
22
|
+
/**
|
|
23
|
+
* DataGrid con columns editors
|
|
24
|
+
*/
|
|
25
|
+
export declare const DatagridWithEditors: Story;
|
|
22
26
|
/**
|
|
23
27
|
* DataGrid con columns with actions
|
|
24
28
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RenderHeaderCellProps } from 'react-data-grid';
|
|
2
2
|
import { ChipStatusFormatterProps } from '../../../../src/components/formatters/ChipStatusFormatter/types';
|
|
3
3
|
import { DeepKeyOf } from '../../../../src/utils/types';
|
|
4
4
|
import { ColumnAlign } from '../../../../src/components/DataGrid/types';
|
|
@@ -21,6 +21,7 @@ export interface SeedProps {
|
|
|
21
21
|
withActionsUser?: boolean;
|
|
22
22
|
withBooleanStatus?: boolean;
|
|
23
23
|
withUserType?: boolean;
|
|
24
|
+
withEditors?: boolean;
|
|
24
25
|
aligns?: Record<string, ColumnAlign>;
|
|
25
26
|
names?: Record<string, string>;
|
|
26
27
|
}
|
|
@@ -74,7 +75,7 @@ export interface Column<TRow, TSummaryRow> {
|
|
|
74
75
|
type: ColumnType;
|
|
75
76
|
formatter?: (props: any) => JSX.Element;
|
|
76
77
|
width?: number;
|
|
77
|
-
withinHeaderRenderer?: React.FunctionComponent<
|
|
78
|
+
withinHeaderRenderer?: React.FunctionComponent<RenderHeaderCellProps<TRow, TSummaryRow>>;
|
|
78
79
|
customFilter?: (row: TRow, value: string) => boolean;
|
|
79
80
|
customSort?: (a: TRow, b: TRow) => number;
|
|
80
81
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SettingsLayout } from '../../../src/components/SettingsLayout/SettingsLayout';
|
|
3
|
+
declare const meta: Meta<typeof SettingsLayout>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SettingsLayout>;
|
|
6
|
+
export declare const Test: Story;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SettingsLayoutProps } from '../../../../../src/components/SettingsLayout/';
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper para el componente SettingsLayout encargado de aplicar estilos y props por defecto
|
|
4
|
+
*/
|
|
5
|
+
export declare const SettingsLayoutRender: (props: Partial<SettingsLayoutProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SettingsLayoutRender } from './SettingsLayoutsRender';
|