@m4l/components 9.3.28 → 9.3.29-JT19112025.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/Color/Color.js +32 -131
- package/components/Color/Color.styles.js +6 -124
- package/components/Color/slots/ColorEnum.d.ts +1 -3
- package/components/Color/slots/ColorEnum.js +1 -3
- package/components/Color/slots/ColorSlots.d.ts +3 -18
- package/components/Color/slots/ColorSlots.js +6 -19
- package/components/Color/types.d.ts +6 -7
- package/components/DataGrid/DataGrid.js +1 -1
- package/components/DataGrid/Datagrid.styles.js +111 -39
- package/components/DataGrid/dictionary.d.ts +1 -0
- package/components/DataGrid/dictionary.js +2 -1
- package/components/DataGrid/formatters/ColumnColorFormatter/formatter.d.ts +6 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/formatter.js +19 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/index.d.ts +3 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/index.js +1 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/tests/ColumnColorFormatter.test.d.ts +1 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/tests/useColumnColor.test.d.ts +1 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/types.d.ts +12 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/types.js +1 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/useColumnColor.d.ts +14 -0
- package/components/DataGrid/formatters/ColumnColorFormatter/useColumnColor.js +22 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/tests/ColumnTagsFormatter.test.d.ts +1 -0
- package/components/DataGrid/formatters/ColumnTagsFormatter/tests/useColumnTags.test.d.ts +1 -0
- package/components/DataGrid/formatters/index.d.ts +1 -0
- package/components/DataGrid/icons.d.ts +1 -0
- package/components/DataGrid/icons.js +2 -1
- package/components/DataGrid/slots/DataGridEnum.d.ts +4 -1
- package/components/DataGrid/slots/DataGridEnum.js +3 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +3 -0
- package/components/DataGrid/slots/DataGridSlot.js +48 -33
- package/components/DataGrid/subcomponents/Cards/hooks/useCardContent.js +28 -1
- package/components/DataGrid/subcomponents/Cards/index.js +1 -1
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardDetails/index.js +34 -8
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardHeader/index.js +1 -1
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Cards/subcomponents/CardRow/index.js +1 -1
- package/components/DataGrid/subcomponents/CheckboxCellAdapter/index.js +1 -1
- package/components/DataGrid/subcomponents/ControlNavigate/ControlNavigate.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/index.js +2 -2
- 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/Settings/subcomponents/ColumnsConfigCards/index.js +1 -1
- package/components/DataGrid/subcomponents/HeaderActions/subcomponents/ViewMode/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/index.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.js +1 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.js +39 -14
- 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/helpers/generators.d.ts +26 -0
- package/components/DataGrid/tests/helpers/types.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
- package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +1 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +1 -1
- package/components/Icon/Icon.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
- package/components/ImageText/ImageText.js +1 -1
- package/components/LanguagePopover/LanguagePopover.js +1 -1
- package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.js +1 -1
- package/components/LoadingError/LoadingError.js +1 -1
- package/components/NumberInput/NumberInput.js +1 -1
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +1 -1
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +1 -1
- package/components/PDFViewer/PDFViewer.js +1 -1
- package/components/PrintingSystem/PrintingSystem.js +1 -1
- package/components/PropertyValue/PropertyValue.js +1 -1
- package/components/ToastContainer/ToastContainer.js +1 -1
- package/components/WindowBase/WindowBase.js +1 -1
- package/components/WindowConfirm/WindowConfirm.js +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +1 -1
- package/components/commercial/TopBar/TopBar.js +1 -1
- package/components/commercial/TopBar/component/ConteinItem/index.js +1 -1
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.js +1 -1
- package/components/extended/React-Spinners/PropagateLoaderSpinner/PropagateLoaderSpinner.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +1 -1
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
- package/components/formatters/ColorFormatter/ColorFormatter.d.ts +18 -0
- package/components/formatters/ColorFormatter/ColorFormatter.js +35 -0
- package/components/formatters/ColorFormatter/ColorFormatter.styles.d.ts +2 -0
- package/components/formatters/ColorFormatter/ColorFormatter.styles.js +15 -0
- package/components/formatters/ColorFormatter/constants.d.ts +1 -0
- package/components/formatters/ColorFormatter/constants.js +4 -0
- package/components/formatters/ColorFormatter/index.d.ts +3 -0
- package/components/formatters/ColorFormatter/index.js +1 -0
- package/components/formatters/ColorFormatter/slots/ColorFormatterEnum.d.ts +3 -0
- package/components/formatters/ColorFormatter/slots/ColorFormatterEnum.js +7 -0
- package/components/formatters/ColorFormatter/slots/ColorFormatterSlots.d.ts +4 -0
- package/components/formatters/ColorFormatter/slots/ColorFormatterSlots.js +11 -0
- package/components/formatters/ColorFormatter/types.d.ts +24 -0
- package/components/formatters/ColorFormatter/types.js +1 -0
- package/components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js +1 -1
- package/components/formatters/DateFormatter/DateFormatter.js +1 -1
- package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +1 -1
- package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
- package/components/formatters/PointsFormatter/PointsFormatter.js +1 -1
- package/components/formatters/PriceFormatter/PriceFormatter.js +1 -1
- package/components/formatters/UncertaintyFormatter/UncertaintyFormatter.js +1 -1
- package/components/formatters/index.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/RFHColorPicker.js +28 -36
- package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +156 -0
- package/components/hook-form/RHFColorPicker/hooks/useColorPicker/index.d.ts +2 -0
- package/components/hook-form/RHFColorPicker/hooks/useColorPicker/types.d.ts +9 -0
- package/components/hook-form/RHFColorPicker/hooks/useColorPicker/useColorPicker.d.ts +41 -0
- package/components/hook-form/RHFColorPicker/hooks/useColorPicker/useColorPicker.js +50 -0
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerEnum.d.ts +4 -1
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerEnum.js +3 -0
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.d.ts +21 -0
- package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.js +19 -1
- package/components/hook-form/RHFColorPicker/slots/index.js +1 -0
- package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/ColorPickerField.d.ts +33 -0
- package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/ColorPickerField.js +147 -0
- package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/index.d.ts +2 -0
- package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/index.js +1 -0
- package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/types.d.ts +20 -0
- package/components/hook-form/RHFColorPicker/subcomponents/ColorPickerField/types.js +1 -0
- package/components/hook-form/RHFDateTime/RHFDateTime.js +1 -1
- package/components/hook-form/RHFNumberInput/RHFNumberInput.js +1 -1
- package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
- package/components/hook-form/RHFSelect/RHFSelect.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/UploadImage.js +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +1 -1
- package/components/mui_extended/Accordion/Accordion.js +1 -1
- package/components/mui_extended/Avatar/Avatar.js +1 -1
- package/components/mui_extended/Avatar/subcomponents/SkeletonAvatar/index.js +1 -1
- package/components/mui_extended/Badge/Badge.js +1 -1
- package/components/mui_extended/CircularProgress/CircularProgress.js +1 -1
- package/components/mui_extended/DateTimePicker/DateTimePicker.js +1 -1
- package/components/mui_extended/Dialog/Dialog.js +1 -1
- package/components/mui_extended/ImageButton/ImageButton.js +1 -1
- package/components/mui_extended/MenuDivider/MenuDivider.js +1 -1
- package/components/mui_extended/NavLink/NavLink.js +1 -1
- package/components/mui_extended/Popover/Popover.js +1 -1
- package/components/mui_extended/Select/Select.js +1 -1
- package/components/mui_extended/Stack/Stack.js +1 -1
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/ToggleButton/ToggleButton.js +1 -1
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +1 -1
- package/components/mui_extended/Typography/Typography.js +1 -1
- package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +1 -1
- package/index.js +58 -52
- package/package.json +2 -2
- package/test/getNameDataTestId.js +2 -2
- package/components/DataGrid/formatters/ColumnIconFormatter/constants.d.ts +0 -4
|
@@ -3,7 +3,7 @@ import { forwardRef, useContext } from "react";
|
|
|
3
3
|
import { SelectCellFormatter } from "react-data-grid";
|
|
4
4
|
import { C as CheckboxFormatter } from "../Table/subcomponents/CheckboxFormatter.js";
|
|
5
5
|
import { a as DataGridContext } from "../../contexts/DataGridContext/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { m as CheckboxCellWrapperStyled } from "../../slots/DataGridSlot.js";
|
|
7
7
|
const CheckboxCellAdapter = forwardRef(function CheckboxCellAdapter2(props, ref) {
|
|
8
8
|
const {
|
|
9
9
|
value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useIsMobile } from "@m4l/graphics";
|
|
3
|
-
import {
|
|
3
|
+
import { n 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";
|
|
@@ -6,7 +6,7 @@ import { V as ViewMode } from "./subcomponents/ViewMode/index.js";
|
|
|
6
6
|
import { u as useDataGrid } from "../../hooks/useDataGrid.js";
|
|
7
7
|
import { useIsMobile } from "@m4l/graphics";
|
|
8
8
|
import { M as MobileMenuActions } from "./subcomponents/MobileMenuActions/index.js";
|
|
9
|
-
import { A as ActionsRootStyled,
|
|
9
|
+
import { A as ActionsRootStyled, o as ActionsConfigContainerStyled, p as ContainerLeftActionsStyled, q as ContainerRightActionsStyled } from "../../slots/DataGridSlot.js";
|
|
10
10
|
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
11
11
|
function HeaderActions(props) {
|
|
12
12
|
const {
|
|
@@ -29,7 +29,7 @@ function HeaderActions(props) {
|
|
|
29
29
|
] }) : /* @__PURE__ */ jsxs(ActionsConfigContainerStyled, { ownerState: { withPager }, children: [
|
|
30
30
|
/* @__PURE__ */ jsxs(ContainerLeftActionsStyled, { children: [
|
|
31
31
|
leftActions,
|
|
32
|
-
typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}),
|
|
32
|
+
typeof rowHeights !== "number" && viewMode !== "cards" && /* @__PURE__ */ jsx(Density, {}),
|
|
33
33
|
withLocalFilters && /* @__PURE__ */ jsx(Filter, {}),
|
|
34
34
|
withSettings && !(viewMode === "cards" && cardsViewConfig?.customRender) && /* @__PURE__ */ jsx(Settings, { ...settingsProps, columns }),
|
|
35
35
|
cardsViewConfig !== void 0 && /* @__PURE__ */ jsx(ViewMode, {})
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton } from "@mui/material";
|
|
4
4
|
import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
|
|
5
|
-
import { R as RowsCountRootStyled,
|
|
5
|
+
import { R as RowsCountRootStyled, r as RowsCountLabelStyled, s as RowsCountValueStyled } from "../../../../slots/DataGridSlot.js";
|
|
6
6
|
function RowsCount() {
|
|
7
7
|
const { rowsCount, size } = useDataGrid();
|
|
8
8
|
const { getLabel } = useModuleDictionary();
|
|
@@ -4,7 +4,7 @@ import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
|
4
4
|
import DataGrid from "react-data-grid";
|
|
5
5
|
import { I as IconButton } from "../../../../../../../mui_extended/IconButton/IconButton.js";
|
|
6
6
|
import { p as pathIcons } from "../../../../../../icons.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as ColumnsConfigWrapperStyled, u as ColumnsConfigDataGridStyled, v as ColumnsConfigSelColumnsStyled, T as TableWrapperDataGridStyled, w as ColumnsConfigActiosStyled } from "../../../../../../slots/DataGridSlot.js";
|
|
8
8
|
import { D as DICTIONARY } from "../../../../../../dictionary.js";
|
|
9
9
|
import { C as ColumnInteractiveCheckFormatter } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
10
10
|
function getRowsFromColumnsConfig(columnsConfig, columns) {
|
|
@@ -4,7 +4,7 @@ import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
|
4
4
|
import DataGrid from "react-data-grid";
|
|
5
5
|
import { I as IconButton } from "../../../../../../../mui_extended/IconButton/IconButton.js";
|
|
6
6
|
import { p as pathIcons } from "../../../../../../icons.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as ColumnsConfigWrapperStyled, u as ColumnsConfigDataGridStyled, v as ColumnsConfigSelColumnsStyled, T as TableWrapperDataGridStyled, w as ColumnsConfigActiosStyled } from "../../../../../../slots/DataGridSlot.js";
|
|
8
8
|
import { D as DICTIONARY } from "../../../../../../dictionary.js";
|
|
9
9
|
import { C as ColumnInteractiveCheckFormatter } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
10
10
|
function getRowsFromColumnsConfigCards(columnsConfigCards, columns) {
|
|
@@ -6,7 +6,7 @@ import { I as IconButton } from "../../../../../mui_extended/IconButton/IconButt
|
|
|
6
6
|
import { P as Popover } from "../../../../../mui_extended/Popover/Popover.js";
|
|
7
7
|
import { p as pathIcons } from "../../../../icons.js";
|
|
8
8
|
import { D as DICTIONARY } from "../../../../dictionary.js";
|
|
9
|
-
import {
|
|
9
|
+
import { x as ContainerToggleCardsStyled, y as CardToggleButtonStyled, z as TextToggleCardButtonStyled } from "../../../../slots/DataGridSlot.js";
|
|
10
10
|
import { I as Icon } from "../../../../../Icon/Icon.js";
|
|
11
11
|
function ViewMode() {
|
|
12
12
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -8,7 +8,7 @@ import { a as filterHeight } from "./subcomponents/SelectColumn.js";
|
|
|
8
8
|
import { u as useSortColumnsRows } from "./hooks/useSortColumnsRows.js";
|
|
9
9
|
import { u as useFilters } from "../../hooks/useFilters.js";
|
|
10
10
|
import { u as useDataGrid } from "../../hooks/useDataGrid.js";
|
|
11
|
-
import {
|
|
11
|
+
import { B as TableContainerStyled, T as TableWrapperDataGridStyled } from "../../slots/DataGridSlot.js";
|
|
12
12
|
import { u as useHeaderMenuActions } from "./hooks/useHeaderMenuActions.js";
|
|
13
13
|
import { H as HeaderRenderClick } from "./subcomponents/HeaderRenderClick/HeaderRenderClick.js";
|
|
14
14
|
function Table(props) {
|
|
@@ -12,6 +12,7 @@ const CheckboxFormatter = forwardRef(function CheckboxFormatter2({ onChange, che
|
|
|
12
12
|
checked,
|
|
13
13
|
size: "small",
|
|
14
14
|
icon: /* @__PURE__ */ jsx(CheckboxIcon, {}),
|
|
15
|
+
disableRipple: true,
|
|
15
16
|
checkedIcon: /* @__PURE__ */ jsx(CheckboxCheckedIcon, {}),
|
|
16
17
|
indeterminateIcon: /* @__PURE__ */ jsx(CheckboxIndeterminateIcon, {}),
|
|
17
18
|
onChange: handleChange,
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEnvironment } from "@m4l/core";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import { I as Icon } from "../../../../Icon/Icon.js";
|
|
3
5
|
function CheckboxIcon(props) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
7
|
+
const uncheckedIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/unchecked.svg`;
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
Icon,
|
|
10
|
+
{
|
|
11
|
+
src: uncheckedIconUrl,
|
|
12
|
+
size: "small",
|
|
13
|
+
color: "text.primary",
|
|
14
|
+
className: "checkbox-unChecked",
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
8
18
|
}
|
|
9
19
|
function CheckboxCheckedIcon(props) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
21
|
+
const checkedIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/checked.svg`;
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Icon,
|
|
24
|
+
{
|
|
25
|
+
src: checkedIconUrl,
|
|
26
|
+
size: "small",
|
|
27
|
+
color: "primary.enabled",
|
|
28
|
+
className: "checkbox-checked",
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
17
32
|
}
|
|
18
33
|
function CheckboxIndeterminateIcon(props) {
|
|
19
|
-
|
|
34
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
35
|
+
const indeterminateIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/check_box/assets/icons/indeterminate.svg`;
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
Icon,
|
|
38
|
+
{
|
|
39
|
+
src: indeterminateIconUrl,
|
|
40
|
+
size: "small",
|
|
41
|
+
color: "primary.enabled",
|
|
42
|
+
...props
|
|
43
|
+
}
|
|
44
|
+
);
|
|
20
45
|
}
|
|
21
46
|
export {
|
|
22
47
|
CheckboxIndeterminateIcon as C,
|
|
@@ -5,7 +5,7 @@ import { useDrag, useDrop } from "react-dnd";
|
|
|
5
5
|
import { renderHeaderCell } from "react-data-grid";
|
|
6
6
|
import { u as useFocusRef } from "../hooks/useFocusRef.js";
|
|
7
7
|
import { u as useFilters } from "../../../hooks/useFilters.js";
|
|
8
|
-
import { N as NameColumnIconStyled,
|
|
8
|
+
import { N as NameColumnIconStyled, F as NameColumnStyled, G as IconColumnStyled, H as DraggableHeaderRootStyled, J as ButtonHeaderActionsStyled, K as DraggableWrapperInputBaseStyled, M as IconSearchStyled, O as HeaderInputBaseStyled } from "../../../slots/DataGridSlot.js";
|
|
9
9
|
import { p as pathIcons } from "../../../icons.js";
|
|
10
10
|
import { u as useDataGrid } from "../../../hooks/useDataGrid.js";
|
|
11
11
|
import { I as Icon } from "../../../../Icon/Icon.js";
|
package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useMemo, useEffect, useCallback } from "react";
|
|
3
3
|
import { useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import { M as MenuItem } from "../../../../../mui_extended/MenuItem/MenuItem.js";
|
|
5
|
-
import {
|
|
5
|
+
import { P as MenuListStyled, Q as HeaderRenderClickStyled } from "../../../../slots/DataGridSlot.js";
|
|
6
6
|
import { M as MenuDivider } from "../../../../../mui_extended/MenuDivider/MenuDivider.js";
|
|
7
7
|
import { P as Popover } from "../../../../../mui_extended/Popover/Popover.js";
|
|
8
8
|
import { D as DICTIONARY } from "../../../../dictionary.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { S as InputTextEditorStyled } from "../../../slots/DataGridSlot.js";
|
|
3
3
|
function autoFocusAndSelect(input) {
|
|
4
4
|
input?.focus();
|
|
5
5
|
input?.select();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generadores de datos aleatorios para el DataGrid
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Función para generar un estado aleatorio
|
|
6
|
+
*/
|
|
7
|
+
export declare const getStatus: (index: number) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Función para generar un tipo de usuario aleatorio
|
|
10
|
+
*/
|
|
11
|
+
export declare const getUserType: (index: number) => "superadmin" | "admin" | "user";
|
|
12
|
+
/**
|
|
13
|
+
* Función para obtener código de carácter desde el índice
|
|
14
|
+
*/
|
|
15
|
+
export declare const getCharCode: (index: number) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Función para generar un color aleatorio en formato hexadecimal
|
|
18
|
+
*/
|
|
19
|
+
export declare const getRandomColor: (index: number) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Función para generar tags aleatorios
|
|
22
|
+
*/
|
|
23
|
+
export declare const getTags: (index: number) => {
|
|
24
|
+
label: string;
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
}[];
|
|
@@ -28,6 +28,7 @@ export interface SeedProps {
|
|
|
28
28
|
aligns?: Record<string, ColumnAlign>;
|
|
29
29
|
names?: Record<string, string>;
|
|
30
30
|
visibleColumns?: string[];
|
|
31
|
+
withColor?: boolean;
|
|
31
32
|
}
|
|
32
33
|
export type GetColumnsProps = Omit<SeedProps, 'quantity'>;
|
|
33
34
|
export type ColumnType = 'string' | 'number' | 'boolean' | 'date' | 'custom';
|
|
@@ -67,6 +68,7 @@ export interface RowType {
|
|
|
67
68
|
label: string;
|
|
68
69
|
currentStatus: 'superadmin' | 'admin' | 'user';
|
|
69
70
|
};
|
|
71
|
+
color?: string;
|
|
70
72
|
}
|
|
71
73
|
interface RangesUncertainty {
|
|
72
74
|
cmcMin: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
3
3
|
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
4
4
|
import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../../constants.js";
|
|
5
5
|
import { u as useDynamicFilterBase } from "./useDynamicFilterBase.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
3
3
|
import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../../constants.js";
|
|
4
4
|
import { D as DynamicSortSlots } from "../../slots/SlotsEnum.js";
|
|
5
5
|
import { u as useDynamicSortBase } from "../DynamicSortBase/useDynamicSortBase.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
3
3
|
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
4
4
|
import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../../constants.js";
|
|
5
5
|
import { u as useDynamicSortBase } from "./useDynamicSortBase.js";
|
package/components/Icon/Icon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import {
|
|
4
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
5
5
|
import { I as ICON_PREFIX, a as ICON_KEY_COMPONENT } from "./constants.js";
|
|
6
6
|
import { g as getComponentClasses, a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
@@ -4,7 +4,7 @@ import { useModuleSkeleton } from "@m4l/core";
|
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { L as LazyLoadComponent } from "./subcomponents/LazyLoadComponent/index.js";
|
|
6
6
|
import { D as DivContainerSkeletonStyled, I as ImgSkeleton, a as ImgStyled } from "./slots/ImageSlots.js";
|
|
7
|
-
import {
|
|
7
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
8
8
|
import { s as svgDataUriSkeleton, I as IMAGE_CLASSES, a as IMAGE_KEY_COMPONENT } from "./constant.js";
|
|
9
9
|
import { I as ImageSlots } from "./slots/ImageEnum.js";
|
|
10
10
|
function Image(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useState, useRef, useImperativeHandle, useEffect } from "react";
|
|
3
3
|
import { b as IntersectComponentStyled } from "../../slots/ImageSlots.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
5
5
|
import { a as IMAGE_KEY_COMPONENT } from "../../constant.js";
|
|
6
6
|
import { I as ImageSlots } from "../../slots/ImageEnum.js";
|
|
7
7
|
const checkIntersections = (entries) => {
|
|
@@ -4,7 +4,7 @@ import { I as ImageTextContainerRoot, a as ImageContainerStyled, b as ImgStyled,
|
|
|
4
4
|
import { I as IMG_ALT, a as IMAGE_TEXT_CLASSES, b as IMAGE_TEXT_KEY_COMPONENT } from "./constants.js";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { useRef } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
8
8
|
import { u as useIsVisible } from "../../hooks/useIsVisible/useIsVisible.js";
|
|
9
9
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
10
10
|
const ImageText = (props) => {
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { useFirstRender, useLocales } from "@m4l/graphics";
|
|
4
4
|
import { useEnvironment, useNetwork } from "@m4l/core";
|
|
5
|
-
import {
|
|
5
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { I as Image } from "../Image/Image.js";
|
|
8
8
|
import { L as LanguagePopoverRootStyled, P as PaperStyled } from "./slots/LanguagePopoverSlots.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
5
5
|
import { L as LINEAR_PROGRESS_INDETERMINATE_KEY_COMPONENT } from "./constants.js";
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { L as LoadingErrorRootStyled, a as LoadingErrorStyled, b as LinearProgressIndeterminateStyled, c as LoadingErrorContainerStyled, d as LoadingErrorContentStyled, e as LoadingErrorImageStyled, f as LoadingErrorTextContainerStyled, g as LoadingErrorTitleDescriptionStyled, h as LoadingErrorDividerStyled, i as LoadingErrorButtonContainerStyled, j as LoadingErrorRecommendationTextStyled } from "./slots/LoadingErrorSlots.js";
|
|
4
4
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { L as LOADING_ERROR_KEY_COMPONENT } from "./constants.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { d as dictionary } from "./dictionary.js";
|
|
@@ -3,7 +3,7 @@ import clsx from "clsx";
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
5
5
|
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
7
7
|
import { u as useNumberInput } from "./hooks/useNumberInput/useNumberInput.js";
|
|
8
8
|
import { S as SkeletonStyled, R as RootStyled, I as InputStyled, C as ContainButtonsAdornmentStyled, a as ContainerButtonsStyled, b as IncrementButtonStyled, D as DecrementButtonStyled } from "./slots/NumberInputSlots.js";
|
|
9
9
|
import { N as NUMBER_INPUT_KEY_COMPONENT } from "./constants.js";
|
|
@@ -6,7 +6,7 @@ import { C as ContainerWrapperStyled, G as GridWrapperStyled } from "../../slots
|
|
|
6
6
|
import { usePaginate } from "@m4l/graphics";
|
|
7
7
|
import { u as useObjectLogsColumns } from "../../hooks/useObjectLogsColumns.js";
|
|
8
8
|
import { a as OBJECT_LOGS_M4L_END_POINT, O as OBJECT_LOGS_KEY_COMPONENT } from "../../constants.js";
|
|
9
|
-
import {
|
|
9
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
10
10
|
import { u as useFilterAndSort } from "../../hooks/useFilterAndSort.js";
|
|
11
11
|
import { O as ObjectLogsSlots } from "../../slots/ObjectLogsEnum.js";
|
|
12
12
|
function ObjectLogsByM4L(props) {
|
|
@@ -6,7 +6,7 @@ import { C as ContainerWrapperStyled, G as GridWrapperStyled } from "../../slots
|
|
|
6
6
|
import { useRows } from "@m4l/graphics";
|
|
7
7
|
import { u as useObjectLogsColumns } from "../../hooks/useObjectLogsColumns.js";
|
|
8
8
|
import { b as OBJECT_LOGS_OTHERS_END_POINT, O as OBJECT_LOGS_KEY_COMPONENT } from "../../constants.js";
|
|
9
|
-
import {
|
|
9
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
10
10
|
import { u as useFilterAndSort } from "../../hooks/useFilterAndSort.js";
|
|
11
11
|
import { O as ObjectLogsSlots } from "../../slots/ObjectLogsEnum.js";
|
|
12
12
|
function ObjectLogsByOthers(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
4
4
|
import { P as PDFViewerRootStyled, a as PreviewPDFStyled } from "./slots/PDFViewerSlots.js";
|
|
5
5
|
import { P as PDFViewerSlots } from "./slots/PDFViewerEnum.js";
|
|
6
6
|
import { P as PDF_VIEWER_KEY_COMPONENT } from "./constants.js";
|
|
@@ -7,7 +7,7 @@ import { P as PrintingSystemRootStyled } from "./slots/PrintingSystemSlots.js";
|
|
|
7
7
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
8
8
|
import { P as PRINTING_SYSTEM_KEY_COMPONENT } from "./constants.js";
|
|
9
9
|
import { P as PrintingSystemSlots } from "./slots/PrintingSystemEnum.js";
|
|
10
|
-
import {
|
|
10
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
11
11
|
import clsx from "clsx";
|
|
12
12
|
const PrintingSystem = forwardRef((props, ref) => {
|
|
13
13
|
const { templateData: nodeRoot, sourceData, size = "medium", variant = "body", className, dataTestId } = props;
|
|
@@ -3,7 +3,7 @@ import React, { useId } from "react";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.js";
|
|
5
5
|
import { T as TEST_PROPS_DATA, C as COMPONENT_PREFIX, P as PROPERTY_VALUE_KEY_COMPONENT } from "./constants.js";
|
|
6
|
-
import {
|
|
6
|
+
import { g as getNameDataTestId, a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
7
7
|
import { P as PropertyValueRootStyled, N as NameStyled, V as ValueStyled } from "./slots/PropertyValueSlots.js";
|
|
8
8
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
9
9
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ToastContainer as ToastContainer$1 } from "react-toastify";
|
|
3
3
|
import { D as DEFAULT_CLOSE_TIME, T as TOAST_KEY_COMPONENT } from "./constants.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
5
5
|
import { ModuleSkeletonProvider } from "@m4l/core";
|
|
6
6
|
import { R as RootStyled } from "./slots/toastContainerSlots.js";
|
|
7
7
|
import { T as ToastContainerSlots } from "./slots/ToastContainerEnum.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
3
3
|
import { A as AppearanceComponentProvider } from "../../contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
5
5
|
import { W as WINDOW_BASE_KEY_COMPONENT } from "./constants.js";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import clsx from "clsx";
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { u as useModal } from "../../hooks/useModal/index.js";
|
|
3
3
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
4
|
import { A as AppearanceComponentProvider } from "../../contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { W as WINDOW_CONFIRM_KEY_COMPONENT } from "./constants.js";
|
|
7
7
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
8
8
|
import clsx from "clsx";
|
|
@@ -12,7 +12,7 @@ import { A as AreasAdminRootStyled, a as AreasAdminContentStyled, b as AreasCont
|
|
|
12
12
|
import { useIsMobile } from "@m4l/graphics";
|
|
13
13
|
import { A as AREAS_ADMIN_KEY_COMPONENT } from "./constants.js";
|
|
14
14
|
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
15
|
-
import {
|
|
15
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
16
16
|
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
17
17
|
import { T as Typography } from "../../../mui_extended/Typography/Typography.js";
|
|
18
18
|
import { M as MenuActions } from "../../../MenuActions/MenuActions.js";
|
|
@@ -4,7 +4,7 @@ import { u as useAreasStore } from "../../hooks/useAreas/index.js";
|
|
|
4
4
|
import { A as AreaMemonizedWindowModal } from "./subcomponents/Area/subcomponents/WindowModal/WindowModal.js";
|
|
5
5
|
import { shallow } from "zustand/shallow";
|
|
6
6
|
import { L as LoadingError } from "../../../LoadingError/LoadingError.js";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getNameDataTestId, a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
8
8
|
import { A as AREAS_VIEWER_CLASS_NAME } from "../../constants.js";
|
|
9
9
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
10
10
|
import { A as AreasViewerRootStyled } from "./slots/AreasViewerSlots.js";
|
package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js
CHANGED
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { M as MemonizedWindowBaseMicroFrontend } from "../../../../../../../WindowBase/subcomponents/MicroFrontend/MicroFrontend.js";
|
|
4
4
|
import { W as WindowBaseComponent } from "../../../../../../../WindowBase/subcomponents/Component/index.js";
|
|
5
5
|
import { T as TEST_PROP_ID } from "../../../../../../../../test/constants_no_mock.js";
|
|
6
|
-
import {
|
|
6
|
+
import { g as getNameDataTestId } from "../../../../../../../../test/getNameDataTestId.js";
|
|
7
7
|
import { A as AREAS_VIEWER_CLASS_NAME } from "../../../../../../constants.js";
|
|
8
8
|
import { u as useWindow } from "./hooks/useWindow.js";
|
|
9
9
|
import { W as WindowBaseStyled } from "../../../../slots/AreasViewerSlots.js";
|
|
@@ -4,7 +4,7 @@ import { g as getTopBarClassesUtilityClass } from "./classes/index.js";
|
|
|
4
4
|
import { C as ConteinItem } from "./component/ConteinItem/index.js";
|
|
5
5
|
import { T as TopBarProvider } from "./context/index.js";
|
|
6
6
|
import { T as TopBarRoot } from "./style.js";
|
|
7
|
-
import {
|
|
7
|
+
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.js";
|
|
8
8
|
import { c as componentName } from "./classes/constants.js";
|
|
9
9
|
const TopBar = (props) => {
|
|
10
10
|
const { dataMenu: DataMenu, dataTestId } = props;
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { u as useTopBar } from "../../hook/topBarContext/index.js";
|
|
3
3
|
import { N as NavItemRoot } from "./subcomponets/NavItem/index.js";
|
|
4
4
|
import { T as TEST_PROP_ID } from "../../../../../test/constants_no_mock.js";
|
|
5
|
-
import {
|
|
5
|
+
import { g as getNameDataTestId } from "../../../../../test/getNameDataTestId.js";
|
|
6
6
|
import { c as componentName } from "../../classes/constants.js";
|
|
7
7
|
const ConteinItem = () => {
|
|
8
8
|
const { dataMenu: DataMenu, classes, dataTestId } = useTopBar();
|
|
@@ -7,7 +7,7 @@ import clsx from "clsx";
|
|
|
7
7
|
import { i as isActive } from "../../../../utils/isActive/index.js";
|
|
8
8
|
import { T as TopBarClasses } from "../../../../classes/index.js";
|
|
9
9
|
import { T as TEST_PROP_ID } from "../../../../../../../test/constants_no_mock.js";
|
|
10
|
-
import {
|
|
10
|
+
import { g as getNameDataTestId } from "../../../../../../../test/getNameDataTestId.js";
|
|
11
11
|
import { c as componentName } from "../../../../classes/constants.js";
|
|
12
12
|
import { A as Accordion } from "../../../../../../mui_extended/Accordion/Accordion.js";
|
|
13
13
|
import { B as Button } from "../../../../../../mui_extended/Button/Button.js";
|
|
@@ -3,7 +3,7 @@ import { useTheme } from "@mui/material";
|
|
|
3
3
|
import { P as PropagateLoaderSpinnerStyled, L as LoaderStyled } from "./slots/PropagateLoaderSpinnerSlots.js";
|
|
4
4
|
import { P as PROPAGATE_LOADER_SPINNER_KEY_COMPONENT } from "./constants.js";
|
|
5
5
|
import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
7
7
|
import clsx from "clsx";
|
|
8
8
|
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
9
9
|
import { P as PropagateLoaderSpinnerSlots } from "./slots/PropagateLoaderSpinnerEnum.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
4
4
|
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
5
5
|
import { S as SPLIT_LAYOUT_KEY_COMPONENT, a as SPLIT_LAYOUT_ICONS } from "./constants.js";
|
|
6
6
|
import { S as SplitLayoutSlots } from "./slots/SplitLayoutEnum.js";
|
|
@@ -5,7 +5,7 @@ import { L as LABEL_BOOLEAN_YES, a as LABEL_BOOLEAN_NO, b as LABEL_BOOLEAN_TRUE,
|
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { B as BOOLEAN_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
8
|
-
import {
|
|
8
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
9
9
|
import { B as BooleanFormatterRootStyled, a as BooleanFormatterIconStyled, b as BooleanFormatterIconCheckFalseStyled, c as BooleanFormatterChipStyled } from "./slots/BooleanFormatterSlots.js";
|
|
10
10
|
import { B as BooleanFormatterSlots } from "./slots/BooleanFormatterEnum.js";
|
|
11
11
|
function getFormatBoolean(presentationType, value = false, getLabel) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ColorFormatterProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* ColorFormatter
|
|
4
|
+
* Componente para formatear y mostrar colores en diferentes contextos (tablas, listas, etc.)
|
|
5
|
+
* @param {ColorFormatterProps} props - Las propiedades del componente.
|
|
6
|
+
* @param {string} [props.value] - El valor del color en formato hexadecimal
|
|
7
|
+
* @param {string} [props.size] - Tamaño del componente ('small' | 'medium')
|
|
8
|
+
* @param {string} [props.dataTestId] - ID para pruebas
|
|
9
|
+
* @param {string} [props.className] - Clases CSS personalizadas
|
|
10
|
+
* @example
|
|
11
|
+
* <ColorFormatter value="#FF0000" />
|
|
12
|
+
* // Renderiza un cuadrado con el color rojo
|
|
13
|
+
*
|
|
14
|
+
* <ColorFormatter value={null} />
|
|
15
|
+
* // Renderiza el ícono "out_of" cuando no hay valor
|
|
16
|
+
* @returns JSX.Element
|
|
17
|
+
*/
|
|
18
|
+
export declare function ColorFormatter(props: ColorFormatterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { C as ColorFormatterRootStyled } from "./slots/ColorFormatterSlots.js";
|
|
5
|
+
import { C as ColorFormatterSlots } from "./slots/ColorFormatterEnum.js";
|
|
6
|
+
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
7
|
+
import { C as COLOR_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
8
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
9
|
+
import { C as Color } from "../../Color/Color.js";
|
|
10
|
+
function ColorFormatter(props) {
|
|
11
|
+
const { value, dataTestId, className, size = "medium" } = props;
|
|
12
|
+
const ownerState = { value };
|
|
13
|
+
const colorComponent = useMemo(() => {
|
|
14
|
+
return /* @__PURE__ */ jsx(Color, { value, size });
|
|
15
|
+
}, [value, size]);
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
ColorFormatterRootStyled,
|
|
18
|
+
{
|
|
19
|
+
className: clsx(
|
|
20
|
+
getComponentSlotRoot(COLOR_FORMATTER_KEY_COMPONENT),
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...getPropDataTestId(
|
|
24
|
+
COLOR_FORMATTER_KEY_COMPONENT,
|
|
25
|
+
ColorFormatterSlots.root,
|
|
26
|
+
dataTestId
|
|
27
|
+
),
|
|
28
|
+
ownerState,
|
|
29
|
+
children: colorComponent
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
ColorFormatter as C
|
|
35
|
+
};
|