@m4l/components 9.3.28 → 9.3.30-JA.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/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/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/index.d.ts +1 -0
- 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/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.d.ts +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.d.ts +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/FieldTypeInterface.d.ts +3 -4
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.d.ts +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.d.ts +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.d.ts +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.d.ts +3 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +1 -1
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +1 -7
- package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +1 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +1 -1
- package/components/DynamicSort/subcomponents/FieldTypes/FieldTypeInterface.d.ts +2 -3
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.d.ts +3 -2
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.js +3 -2
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +1 -1
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +1 -7
- 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/AreasAdmin/subcomponents/AreaChip/AreaChip.js +4 -3
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +4 -3
- package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +1 -1
- package/components/areas/contexts/AreasContext/store.js +2 -2
- 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/hook-form/RHFormProvider/RHFormProvider.d.ts +31 -0
- package/components/hook-form/RHFormProvider/RHFormProvider.js +93 -0
- package/components/hook-form/RHFormProvider/index.d.ts +4 -0
- package/components/hook-form/RHFormProvider/index.js +1 -0
- package/components/hook-form/RHFormProvider/schema.d.ts +17 -0
- package/components/hook-form/RHFormProvider/schema.js +29 -0
- package/components/hook-form/RHFormProvider/types.d.ts +129 -0
- package/components/hook-form/RHFormProvider/types.js +8 -0
- package/components/hook-form/index.d.ts +1 -0
- 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/contexts/index.d.ts +3 -3
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.d.ts +3 -3
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.js +3 -3
- package/helpers/getStepsAndValidationSchema/types.d.ts +5 -4
- package/hooks/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +1 -1
- package/hooks/useFormAddEdit/index.d.ts +1 -1
- package/hooks/useWatchTyped/index.d.ts +1 -0
- package/hooks/useWatchTyped/index.js +1 -0
- package/hooks/useWatchTyped/types.d.ts +11 -0
- package/hooks/useWatchTyped/useTypedWatch.d.ts +9 -0
- package/hooks/useWatchTyped/useTypedWatch.js +30 -0
- package/index.js +94 -77
- package/package.json +2 -2
- package/test/getNameDataTestId.js +2 -2
- package/components/hook-form/RHFormContext/index.d.ts +0 -120
- package/components/hook-form/RHFormContext/index.js +0 -91
- package/components/hook-form/RHFormContext/types.d.ts +0 -83
- package/hooks/useFormReadyForUpdate/types.d.ts +0 -8
- /package/components/hook-form/{RHFormContext → RHFormProvider}/classes/constants.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/classes/constants.js +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/classes/index.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/classes/index.js +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/classes/types.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/dictionary.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/dictionary.js +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/styles.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/styles.js +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/subcomponents/FormActions/index.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/subcomponents/FormActions/skeleton.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/subcomponents/FormActions/styles.d.ts +0 -0
- /package/components/hook-form/{RHFormContext → RHFormProvider}/subcomponents/FormActions/types.d.ts +0 -0
|
@@ -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";
|
|
@@ -12,8 +12,9 @@ import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../dic
|
|
|
12
12
|
import { A as AREAS_ADMIN_KEY_COMPONENT } from "../../constants.js";
|
|
13
13
|
import { g as getComponentClasses } from "../../../../../../utils/getComponentSlotRoot.js";
|
|
14
14
|
import { u as useComponentSize } from "../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
15
|
+
import { c as createValidationSchema, a as createValidationFullObject, b as createValidationPartialObject } from "../../../../../hook-form/RHFormProvider/schema.js";
|
|
15
16
|
import { A as AreasAdminSlots } from "../../slots/AreasAdminEnum.js";
|
|
16
|
-
import { R as RHFormProvider } from "../../../../../hook-form/
|
|
17
|
+
import { R as RHFormProvider } from "../../../../../hook-form/RHFormProvider/RHFormProvider.js";
|
|
17
18
|
import { T as Typography } from "../../../../../mui_extended/Typography/Typography.js";
|
|
18
19
|
import { R as RHFTextField } from "../../../../../hook-form/RHFTextField/RHFTextField.js";
|
|
19
20
|
import { A as ActionsContainer } from "../../../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
@@ -56,11 +57,11 @@ const AreaChip = (props) => {
|
|
|
56
57
|
inputEditArea: areaName
|
|
57
58
|
};
|
|
58
59
|
const validationSchema = useMemo(
|
|
59
|
-
() =>
|
|
60
|
+
() => createValidationSchema(createValidationFullObject(createValidationPartialObject({
|
|
60
61
|
inputEditArea: Yup.string().required(
|
|
61
62
|
getLabel(getAreasDictionary(AREAS_DICCTIONARY.validation_edit_area))
|
|
62
63
|
)
|
|
63
|
-
}),
|
|
64
|
+
}))),
|
|
64
65
|
[getLabel]
|
|
65
66
|
);
|
|
66
67
|
const handlerOnClick = (e) => {
|
|
@@ -9,9 +9,10 @@ import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../../../
|
|
|
9
9
|
import { I as ICONS } from "../../../../../../icons.js";
|
|
10
10
|
import { C as ChipActionsMobile } from "../../../AreaChip/subcomponents/ChipActionsMobile/ChipActionsMobile.js";
|
|
11
11
|
import { l as ChipMobileRootStyled, m as ChipMobileContentStyled, N as NameChipMobileStyled, n as EditAreaChipMobileContainerStyled } from "../../../../slots/AreasAdminSlots.js";
|
|
12
|
-
import { R as RHFormProvider } from "../../../../../../../hook-form/
|
|
12
|
+
import { R as RHFormProvider } from "../../../../../../../hook-form/RHFormProvider/RHFormProvider.js";
|
|
13
13
|
import { T as Typography } from "../../../../../../../mui_extended/Typography/Typography.js";
|
|
14
14
|
import { A as ActionsContainer } from "../../../../../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
15
|
+
import { c as createValidationSchema, a as createValidationFullObject, b as createValidationPartialObject } from "../../../../../../../hook-form/RHFormProvider/schema.js";
|
|
15
16
|
import { M as MenuActions } from "../../../../../../../MenuActions/MenuActions.js";
|
|
16
17
|
import { P as Popover } from "../../../../../../../mui_extended/Popover/Popover.js";
|
|
17
18
|
import { R as RHFTextField } from "../../../../../../../hook-form/RHFTextField/RHFTextField.js";
|
|
@@ -44,11 +45,11 @@ const ChipMobile = (props) => {
|
|
|
44
45
|
inputEditArea: areaName
|
|
45
46
|
};
|
|
46
47
|
const validationSchema = useMemo(
|
|
47
|
-
() =>
|
|
48
|
+
() => createValidationSchema(createValidationFullObject(createValidationPartialObject({
|
|
48
49
|
inputEditArea: Yup.string().required(
|
|
49
50
|
getLabel(getAreasDictionary(AREAS_DICCTIONARY.validation_edit_area))
|
|
50
51
|
)
|
|
51
|
-
}),
|
|
52
|
+
}))),
|
|
52
53
|
[getLabel]
|
|
53
54
|
);
|
|
54
55
|
const handlerOnClick = (e) => {
|
|
@@ -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";
|
|
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
441
441
|
bounds: {
|
|
442
442
|
left: MARGIN_GRIDLAYOUT,
|
|
443
443
|
top: MARGIN_GRIDLAYOUT,
|
|
444
|
-
right: -
|
|
445
|
-
bottom: -
|
|
444
|
+
right: -10,
|
|
445
|
+
bottom: -10
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const colorFormatterStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Estilo base del componente ColorFormatter
|
|
4
|
+
*/
|
|
5
|
+
root: () => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
justifyContent: "center",
|
|
9
|
+
width: "100%",
|
|
10
|
+
height: "100%"
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
colorFormatterStyles as c
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COLOR_FORMATTER_KEY_COMPONENT = "ColorFormatter";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Componente raíz estilizado para el ColorFormatter
|
|
3
|
+
*/
|
|
4
|
+
export declare const ColorFormatterRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { c as colorFormatterStyles } from "../ColorFormatter.styles.js";
|
|
3
|
+
import { C as COLOR_FORMATTER_KEY_COMPONENT } from "../constants.js";
|
|
4
|
+
import { C as ColorFormatterSlots } from "./ColorFormatterEnum.js";
|
|
5
|
+
const ColorFormatterRootStyled = styled("div", {
|
|
6
|
+
name: COLOR_FORMATTER_KEY_COMPONENT,
|
|
7
|
+
slot: ColorFormatterSlots.root
|
|
8
|
+
})(colorFormatterStyles?.root);
|
|
9
|
+
export {
|
|
10
|
+
ColorFormatterRootStyled as C
|
|
11
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
2
|
+
import { Theme } from '@mui/material';
|
|
3
|
+
import { Sizes } from '@m4l/styles';
|
|
4
|
+
import { COLOR_FORMATTER_KEY_COMPONENT } from './constants';
|
|
5
|
+
import { ColorFormatterSlots } from './slots/ColorFormatterEnum';
|
|
6
|
+
/**
|
|
7
|
+
* Props para el componente ColorFormatter.
|
|
8
|
+
*/
|
|
9
|
+
export interface ColorFormatterProps {
|
|
10
|
+
value?: string | null;
|
|
11
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Props del estado del componente ColorFormatter.
|
|
17
|
+
*/
|
|
18
|
+
export interface ColorFormatterOwnerState {
|
|
19
|
+
value?: string | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props para estilizar el componente ColorFormatter.
|
|
23
|
+
*/
|
|
24
|
+
export type ColorFormatterStyles = OverridesStyleRules<ColorFormatterSlots, typeof COLOR_FORMATTER_KEY_COMPONENT, Theme>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React, { useMemo } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
5
5
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
6
6
|
import { C as ConcatenatedFormatterRootStyled } from "./slots/ConcatenatedFormatterSlots.js";
|
|
7
7
|
import { C as CONTATENATED_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
@@ -5,7 +5,7 @@ import { D as DateFormatterRootStyled } from "./slots/DateFormatterSlots.js";
|
|
|
5
5
|
import { D as DateFormatterSlots } from "./slots/DateFormatterEnum.js";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
8
|
-
import {
|
|
8
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
9
9
|
import { D as DATE_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
10
10
|
function getFormatDate(presentationType, value, dateFormatter, format) {
|
|
11
11
|
let finalFormat = format || dateFormatter.datetimeFormat;
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { R as RootStyled } from "./slots/DistanceToNowFormatterSlots.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
6
6
|
import { C as COMPONET_KEY_COMPONENT } from "./constants.js";
|
|
7
7
|
import { D as DistanceToNowFormatterSlots } from "./slots/slots.js";
|
|
8
8
|
import { u as useDistanceToNowFormatter } from "./hooks/useDistanceToNowFormatter.js";
|
|
@@ -4,7 +4,7 @@ import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
|
4
4
|
import { P as PERIOD_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
5
5
|
import clsx from "clsx";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
7
|
-
import {
|
|
7
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
8
8
|
import { d as dictionary } from "./dictionary.js";
|
|
9
9
|
import { P as PeriodFormatterRootStyled, a as PeriodFormatterSkeletonStyled } from "./slots/PeriodFormatterSlots.js";
|
|
10
10
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
@@ -3,7 +3,7 @@ import { getPropertyByString } from "@m4l/core";
|
|
|
3
3
|
import React, { useMemo } from "react";
|
|
4
4
|
import { P as PointsFormatterRootStyled } from "./slots/ointsFormatterSlots.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 { P as POINTS_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
9
9
|
import { P as PointsFormatterSlots } from "./slots/PointsFormatterEnum.js";
|
|
@@ -4,7 +4,7 @@ import { clsx } from "clsx";
|
|
|
4
4
|
import { getPropertyByString } from "@m4l/core";
|
|
5
5
|
import { useFormatter } from "@m4l/graphics";
|
|
6
6
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
7
|
-
import {
|
|
7
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
8
8
|
import { P as PriceFormatterRootStyled } from "./slots/PriceFormatterSlots.js";
|
|
9
9
|
import { P as PRICE_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
10
10
|
import { P as PriceFormatterSlots } from "./slots/PriceFormatterEnum.js";
|
|
@@ -3,7 +3,7 @@ import React, { useMemo } from "react";
|
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { getPropertyByString } from "@m4l/core";
|
|
5
5
|
import { U as UncertaintyFormatterRootStyled } from "./slots/UncertaintyFormatterSlots.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
7
7
|
import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.js";
|
|
8
8
|
import { U as UNCERTAINTY_FORMATTER_KEY_COMPONENT } from "./constants.js";
|
|
9
9
|
import { U as UncertaintyFormatterSlots } from "./slots/UncertaintyFormatterEnum.js";
|
|
@@ -9,3 +9,4 @@ export { PriceFormatter, getFormatPrice, } from './PriceFormatter/PriceFormatter
|
|
|
9
9
|
export * from './DistanceToNowFormatter';
|
|
10
10
|
export type { UncertaintyRange } from './UncertaintyFormatter/types';
|
|
11
11
|
export { TagsFormatter } from './TagsFormatter';
|
|
12
|
+
export { ColorFormatter } from './ColorFormatter';
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { useModuleSkeleton } from "@m4l/core";
|
|
5
|
-
import {
|
|
5
|
+
import { a as getPropDataTestId } from "../../../test/getNameDataTestId.js";
|
|
6
6
|
import { g as getComponentClasses } from "../../../utils/getComponentSlotRoot.js";
|
|
7
7
|
import { R as RHFCOLOR_PICKER_KEY_COMPONENT } from "./constants.js";
|
|
8
8
|
import { R as RHFColorPickerSlots } from "./slots/RHFColorPickerEnum.js";
|
|
9
|
-
import { R as RootStyled } from "./slots/RHFColorPickerSlots.js";
|
|
10
9
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
11
|
-
import {
|
|
12
|
-
import { C as
|
|
13
|
-
import { H as HelperError } from "../../HelperError/HelperError.js";
|
|
10
|
+
import { R as RootStyled } from "./slots/RHFColorPickerSlots.js";
|
|
11
|
+
import { C as ColorPickerField } from "./subcomponents/ColorPickerField/ColorPickerField.js";
|
|
14
12
|
const RHFColorPicker = (props) => {
|
|
15
13
|
const {
|
|
16
14
|
name,
|
|
@@ -35,7 +33,11 @@ const RHFColorPicker = (props) => {
|
|
|
35
33
|
{
|
|
36
34
|
className: clsx(className, classes.root),
|
|
37
35
|
role: isSkeleton ? "presentation" : void 0,
|
|
38
|
-
...getPropDataTestId(
|
|
36
|
+
...getPropDataTestId(
|
|
37
|
+
RHFCOLOR_PICKER_KEY_COMPONENT,
|
|
38
|
+
RHFColorPickerSlots.root,
|
|
39
|
+
instaceDataTestId
|
|
40
|
+
),
|
|
39
41
|
ownerState: { ownerState },
|
|
40
42
|
children: /* @__PURE__ */ jsx(
|
|
41
43
|
Controller,
|
|
@@ -43,35 +45,25 @@ const RHFColorPicker = (props) => {
|
|
|
43
45
|
name,
|
|
44
46
|
control,
|
|
45
47
|
defaultValue: "",
|
|
46
|
-
render: ({ field: { value, onChange }, fieldState: { error } }) => /* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
error?.message && /* @__PURE__ */ jsx(
|
|
68
|
-
HelperError,
|
|
69
|
-
{
|
|
70
|
-
size,
|
|
71
|
-
message: error?.message + ""
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
] })
|
|
48
|
+
render: ({ field: { value, onChange }, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
49
|
+
ColorPickerField,
|
|
50
|
+
{
|
|
51
|
+
value,
|
|
52
|
+
onChange,
|
|
53
|
+
error,
|
|
54
|
+
size,
|
|
55
|
+
label,
|
|
56
|
+
mandatory,
|
|
57
|
+
mandatoryMessage,
|
|
58
|
+
helperMessage,
|
|
59
|
+
disabled,
|
|
60
|
+
isSkeleton,
|
|
61
|
+
className,
|
|
62
|
+
instaceDataTestId,
|
|
63
|
+
currentSize,
|
|
64
|
+
classes
|
|
65
|
+
}
|
|
66
|
+
)
|
|
75
67
|
}
|
|
76
68
|
)
|
|
77
69
|
}
|