@m4l/components 9.2.61 → 9.2.62
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 +8 -0
- package/components/Chip/Chip.js +9 -10
- package/components/Chip/ChipStyles.js +13 -2
- package/components/Chip/constants.d.ts +9 -0
- package/components/Chip/constants.js +6 -2
- package/components/Chip/slots/ChipEnum.d.ts +3 -0
- package/components/Chip/slots/ChipEnum.js +6 -1
- package/components/Chip/slots/ChipSlots.js +1 -1
- package/components/DataGrid/Datagrid.styles.js +8 -13
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +99 -90
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
- package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
- package/components/DynamicFilter/store/DynamicFilterContext.js +6 -7
- package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +24 -18
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
- package/components/DynamicSort/DynamicSort.styles.js +92 -90
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
- package/components/DynamicSort/slots/DynamicSortSlots.js +7 -23
- package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
- package/components/DynamicSort/slots/SlotsEnum.js +1 -4
- package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
- package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +22 -17
- package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
- package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
- package/components/LanguagePopover/LanguagePopover.js +7 -5
- package/components/LanguagePopover/LanguagePopover.styles.js +32 -4
- package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
- package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
- package/components/LanguagePopover/types.d.ts +6 -1
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/PaperForm/styles.js +2 -1
- package/components/PropertyValue/PropertyValue.js +2 -1
- package/components/PropertyValue/PropertyValue.styles.js +7 -4
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/SideBar/SideBar.js +4 -2
- package/components/SideBar/constants.d.ts +26 -2
- package/components/SideBar/constants.js +19 -7
- package/components/SideBar/context/sideBarContext/index.js +19 -5
- package/components/SideBar/context/sideBarContext/types.d.ts +22 -1
- package/components/SideBar/helpers/getMenuDataWithState/index.js +25 -8
- package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
- package/components/SideBar/hooks/useCollapse/index.js +1 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
- package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
- package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
- package/components/SideBar/slots/SideBarEnum.js +9 -11
- package/components/SideBar/slots/SideBarSlots.d.ts +9 -3
- package/components/SideBar/slots/SideBarSlots.js +36 -28
- package/components/SideBar/styles.js +2 -4
- package/components/SideBar/subcomponents/ContentComponent/index.js +39 -19
- package/components/SideBar/subcomponents/ContentComponent/style.js +171 -22
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.d.ts +2 -2
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.js +8 -15
- package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.js +2 -2
- package/components/SideBar/subcomponents/Promotion/types.d.ts +5 -0
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/styles.js +10 -14
- package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
- package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/index.js +16 -18
- package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.js +5 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
- package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +69 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +9 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +56 -0
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
- package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
- package/components/SideBar/types.d.ts +7 -3
- package/components/WindowBase/WindowBase.js +7 -1
- package/components/WindowBase/WindowBase.styles.js +50 -15
- package/components/WindowBase/constants.d.ts +1 -0
- package/components/WindowBase/constants.js +5 -1
- package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
- package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
- package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
- package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +11 -5
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
- package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
- package/components/WindowBase/types.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +13 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +26 -20
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/extended/React-Resizable/helpers.js +1 -1
- package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
- package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
- package/components/extended/React-resizable-panels/constants.d.ts +6 -0
- package/components/extended/React-resizable-panels/constants.js +5 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
- package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
- package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +3 -38
- package/components/mui_extended/Accordion/styles.js +10 -2
- package/components/mui_extended/Button/Button.js +3 -1
- package/components/mui_extended/Button/ButtonStyles.js +6 -1
- package/components/mui_extended/Button/types.d.ts +1 -1
- package/components/mui_extended/Divider/index.d.ts +1 -0
- package/components/mui_extended/Divider/index.js +1 -0
- package/components/mui_extended/NavLink/NavLink.js +3 -1
- package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
- package/components/mui_extended/NavLink/types.d.ts +3 -1
- package/components/mui_extended/Tab/Tab.styles.js +2 -1
- package/components/mui_extended/TabContent/TabContent.styles.js +2 -8
- package/components/mui_extended/TextField/TextField.js +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +20 -18
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/mui_extended/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/styles.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +16 -13
- package/package.json +4 -3
- package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
- package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
- package/storybook/components/ObjectLogs/ObjectLogs.stories.d.ts +2 -2
- package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +3 -0
- package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
- package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
- package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
- package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
- package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
- /package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
- /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
|
@@ -4,7 +4,6 @@ import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../constants.js";
|
|
|
4
4
|
import { D as DynamicSortSlots } from "./SlotsEnum.js";
|
|
5
5
|
import { S as Skeleton } from "../../mui_extended/Skeleton/Skeleton.js";
|
|
6
6
|
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
7
|
-
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
8
7
|
import { A as ActionsContainer } from "../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
9
8
|
import { P as Popover } from "../../mui_extended/Popover/Popover.js";
|
|
10
9
|
const RootStyled = styled("div", {
|
|
@@ -55,29 +54,16 @@ const PopoverContainerFieldsStyled = styled("div", {
|
|
|
55
54
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
56
55
|
slot: DynamicSortSlots.popoverSortContainerFields
|
|
57
56
|
})(dynamicSortStyles?.popoverSortContainerFields);
|
|
58
|
-
const PopoverHeaderStyled = styled("div", {
|
|
59
|
-
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
60
|
-
slot: DynamicSortSlots.popoverSortHeader
|
|
61
|
-
})(dynamicSortStyles?.popoverSortHeader);
|
|
62
|
-
const ContentSortStyled = styled("div", {
|
|
63
|
-
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
64
|
-
slot: DynamicSortSlots.contentSort
|
|
65
|
-
})(dynamicSortStyles?.contentSort);
|
|
66
|
-
const PopoverHeaderTitleStyled = styled(Typography, {
|
|
67
|
-
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
68
|
-
slot: DynamicSortSlots.popoverSortHeaderTitle
|
|
69
|
-
})(dynamicSortStyles?.popoverSortHeaderTitle);
|
|
70
57
|
const PopoverHeaderActionsStyled = styled(ActionsContainer, {
|
|
71
58
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
72
59
|
slot: DynamicSortSlots.popoverSortActions
|
|
73
60
|
})(dynamicSortStyles?.popoverSortActions);
|
|
74
61
|
const InputSortInputSkeletonStyled = styled(Skeleton, {
|
|
75
62
|
name: DYNAMIC_SORT_KEY_COMPONENT,
|
|
76
|
-
slot: DynamicSortSlots.
|
|
77
|
-
})(dynamicSortStyles?.
|
|
63
|
+
slot: DynamicSortSlots.inputSortSkeleton
|
|
64
|
+
})(dynamicSortStyles?.inputSortSkeleton);
|
|
78
65
|
export {
|
|
79
66
|
AppliedSortsStyled as A,
|
|
80
|
-
ContentSortStyled as C,
|
|
81
67
|
InnerContainerStyled as I,
|
|
82
68
|
PopoverMenuStyled as P,
|
|
83
69
|
RootStyled as R,
|
|
@@ -86,11 +72,9 @@ export {
|
|
|
86
72
|
InputSortInputSkeletonStyled as c,
|
|
87
73
|
InputSortInputStyled as d,
|
|
88
74
|
PopoverStyled as e,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
ActionsClearButtonStyled as k,
|
|
95
|
-
ActionsSubmitButtonStyled as l
|
|
75
|
+
PopoverContainerFieldsStyled as f,
|
|
76
|
+
PopoverHeaderActionsStyled as g,
|
|
77
|
+
ActionsStyled as h,
|
|
78
|
+
ActionsClearButtonStyled as i,
|
|
79
|
+
ActionsSubmitButtonStyled as j
|
|
96
80
|
};
|
|
@@ -11,9 +11,6 @@ export declare enum DynamicSortSlots {
|
|
|
11
11
|
popoverMenu = "popoverMenu",
|
|
12
12
|
popoverSort = "popoverSort",
|
|
13
13
|
popoverSortContainerFields = "popoverSortContainerFields",
|
|
14
|
-
popoverSortHeader = "popoverSortHeader",
|
|
15
|
-
contentSort = "contentSort",
|
|
16
|
-
popoverSortHeaderTitle = "popoverSortHeaderTitle",
|
|
17
14
|
popoverSortActions = "popoverSortActions",
|
|
18
|
-
|
|
15
|
+
inputSortSkeleton = "inputSortSkeleton"
|
|
19
16
|
}
|
|
@@ -11,11 +11,8 @@ var DynamicSortSlots = /* @__PURE__ */ ((DynamicSortSlots2) => {
|
|
|
11
11
|
DynamicSortSlots2["popoverMenu"] = "popoverMenu";
|
|
12
12
|
DynamicSortSlots2["popoverSort"] = "popoverSort";
|
|
13
13
|
DynamicSortSlots2["popoverSortContainerFields"] = "popoverSortContainerFields";
|
|
14
|
-
DynamicSortSlots2["popoverSortHeader"] = "popoverSortHeader";
|
|
15
|
-
DynamicSortSlots2["contentSort"] = "contentSort";
|
|
16
|
-
DynamicSortSlots2["popoverSortHeaderTitle"] = "popoverSortHeaderTitle";
|
|
17
14
|
DynamicSortSlots2["popoverSortActions"] = "popoverSortActions";
|
|
18
|
-
DynamicSortSlots2["
|
|
15
|
+
DynamicSortSlots2["inputSortSkeleton"] = "inputSortSkeleton";
|
|
19
16
|
return DynamicSortSlots2;
|
|
20
17
|
})(DynamicSortSlots || {});
|
|
21
18
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { S as SORT_ICONS } from "../../../icons.js";
|
|
@@ -25,7 +25,7 @@ function StringSort() {
|
|
|
25
25
|
],
|
|
26
26
|
[getLabel, host_static_assets, environment_assets]
|
|
27
27
|
);
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
29
29
|
RHFSelect,
|
|
30
30
|
{
|
|
31
31
|
size,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { I as Icon } from "../../../Icon/Icon.js";
|
|
3
2
|
import { u as useDynamicSortBase } from "../DynamicSortBase/useDynamicSortBase.js";
|
|
4
3
|
import { D as DataTypeComponent } from "../FieldTypes/DataTypeComponent.js";
|
|
5
4
|
import { u as usePopoverSort } from "./usePopoverSort.js";
|
|
6
|
-
import { e as PopoverStyled, f as
|
|
5
|
+
import { e as PopoverStyled, f as PopoverContainerFieldsStyled, g as PopoverHeaderActionsStyled } from "../../slots/DynamicSortSlots.js";
|
|
7
6
|
import { R as RHFormProvider } from "../../../hook-form/RHFormContext/index.js";
|
|
7
|
+
import { W as WindowBase } from "../../../WindowBase/WindowBase.js";
|
|
8
8
|
import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
9
9
|
import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
10
10
|
function PopoverSort() {
|
|
@@ -22,7 +22,7 @@ function PopoverSort() {
|
|
|
22
22
|
statusLoad,
|
|
23
23
|
canRender
|
|
24
24
|
} = usePopoverSort();
|
|
25
|
-
const {
|
|
25
|
+
const { size } = useDynamicSortBase();
|
|
26
26
|
if (!canRender) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
@@ -38,26 +38,31 @@ function PopoverSort() {
|
|
|
38
38
|
anchorEl,
|
|
39
39
|
onKeyDown: handleKeyDownPopper,
|
|
40
40
|
onClose: handleClosePopover,
|
|
41
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ jsx(
|
|
42
42
|
RHFormProvider,
|
|
43
43
|
{
|
|
44
44
|
onSubmit,
|
|
45
45
|
values: sortFormValue,
|
|
46
46
|
validationSchema: popupValidationSchema,
|
|
47
47
|
statusLoad,
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
children: /* @__PURE__ */ jsxs(
|
|
49
|
+
WindowBase,
|
|
50
|
+
{
|
|
51
|
+
title: labelField,
|
|
52
|
+
iconUrl: field.urlIcon,
|
|
53
|
+
variant: "text",
|
|
54
|
+
type: "popup",
|
|
55
|
+
selected: true,
|
|
56
|
+
draggable: false,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsx(PopoverContainerFieldsStyled, { children: /* @__PURE__ */ jsx(DataTypeComponent, { formSort, statusLoad }) }),
|
|
59
|
+
/* @__PURE__ */ jsxs(PopoverHeaderActionsStyled, { children: [
|
|
60
|
+
/* @__PURE__ */ jsx(ActionCancel, { size, onClick: onClose }),
|
|
61
|
+
/* @__PURE__ */ jsx(ActionIntro, { size, "aria-label": "applySort" })
|
|
62
|
+
] })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
61
66
|
}
|
|
62
67
|
)
|
|
63
68
|
}
|
|
@@ -3,7 +3,7 @@ import { useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { g as getDynamicSortDictionary, D as DICCTIONARY } from "../../dictionary.js";
|
|
4
4
|
import { u as useDynamicSortBase } from "../DynamicSortBase/useDynamicSortBase.js";
|
|
5
5
|
import { u as useSortActions } from "./useSortActions.js";
|
|
6
|
-
import {
|
|
6
|
+
import { h as ActionsStyled, i as ActionsClearButtonStyled, j as ActionsSubmitButtonStyled } from "../../slots/DynamicSortSlots.js";
|
|
7
7
|
function SortActions() {
|
|
8
8
|
const {
|
|
9
9
|
sortIconUrl,
|
|
@@ -16,7 +16,7 @@ function SortActions() {
|
|
|
16
16
|
} = useSortActions();
|
|
17
17
|
const { size, visibleRefresh, ownerState: { isDirty } } = useDynamicSortBase();
|
|
18
18
|
const { getLabel } = useModuleDictionary();
|
|
19
|
-
return /* @__PURE__ */ jsxs(ActionsStyled, { ownerState: { isDirty: canShowRemoveAction, visibleRefresh }, children: [
|
|
19
|
+
return /* @__PURE__ */ jsxs(ActionsStyled, { ownerState: { ...ownerState, isDirty: canShowRemoveAction, visibleRefresh }, children: [
|
|
20
20
|
canShowRemoveAction && /* @__PURE__ */ jsx(
|
|
21
21
|
ActionsClearButtonStyled,
|
|
22
22
|
{
|
|
@@ -9,6 +9,7 @@ function useSortActions() {
|
|
|
9
9
|
const isValid = useDynamicSortStore((state) => state.ownerState?.isValid);
|
|
10
10
|
const isDirty = useDynamicSortStore((state) => state.ownerState?.isDirty);
|
|
11
11
|
const appliedSorts = useDynamicSortStore((state) => state.appliedSorts);
|
|
12
|
+
const inEdition = useDynamicSortStore((state) => state.ownerState?.inEdition);
|
|
12
13
|
const { hidePopoverSort, clearSorts, fireOnChangeSorts } = useDynamicSortStore(
|
|
13
14
|
(state) => state.actions
|
|
14
15
|
);
|
|
@@ -31,7 +32,7 @@ function useSortActions() {
|
|
|
31
32
|
onClickClearSorts,
|
|
32
33
|
onClickSort: fireOnChangeSorts,
|
|
33
34
|
sortButtonDictionaryTooltip,
|
|
34
|
-
ownerState: { isValid }
|
|
35
|
+
ownerState: { isValid, isDirty, inEdition }
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
@@ -5,17 +5,16 @@ import { useEnvironment, useNetwork } from "@m4l/core";
|
|
|
5
5
|
import { g 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
|
-
import { L as LanguagePopoverRootStyled, P as PaperStyled
|
|
8
|
+
import { L as LanguagePopoverRootStyled, P as PaperStyled } from "./slots/LanguagePopoverSlots.js";
|
|
9
9
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "./constants.js";
|
|
10
10
|
import { L as LanguagePopoverSlots } from "./slots/LanguagePopoverEnum.js";
|
|
11
11
|
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
12
12
|
function LanguagePopover(props) {
|
|
13
13
|
const {
|
|
14
14
|
disabled,
|
|
15
|
-
size
|
|
15
|
+
size
|
|
16
16
|
} = props;
|
|
17
17
|
const { currentSize } = useComponentSize(size);
|
|
18
|
-
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
19
18
|
const isFirstRender = useFirstRender();
|
|
20
19
|
const { currentLocale, onChangeLocale } = useLocales();
|
|
21
20
|
const { domain_token } = useEnvironment();
|
|
@@ -68,11 +67,14 @@ function LanguagePopover(props) {
|
|
|
68
67
|
return /* @__PURE__ */ jsx(
|
|
69
68
|
LanguagePopoverRootStyled,
|
|
70
69
|
{
|
|
71
|
-
|
|
70
|
+
ownerState: {
|
|
71
|
+
size: currentSize
|
|
72
|
+
},
|
|
73
|
+
size: currentSize,
|
|
72
74
|
className: classRoot,
|
|
73
75
|
...getPropDataTestId(LANGUAGE_POPOVER_KEY_COMPONENT, LanguagePopoverSlots.root),
|
|
74
76
|
disabled,
|
|
75
|
-
icon: /* @__PURE__ */ jsx(
|
|
77
|
+
icon: /* @__PURE__ */ jsx(Image, { src: currentLocale?.urlIcon, enableIntersectionObserver: false }),
|
|
76
78
|
menuActions: getMenuActionsOptions(),
|
|
77
79
|
onOpen: handleMenuOpenChange,
|
|
78
80
|
slots: {
|
|
@@ -1,8 +1,36 @@
|
|
|
1
|
+
import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
1
2
|
const languagePopoverStyles = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
3
|
+
/**
|
|
4
|
+
* Estilos del root
|
|
5
|
+
*/
|
|
6
|
+
root: ({ theme, ownerState }) => ({
|
|
7
|
+
"&": {
|
|
8
|
+
display: "flex",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
alignItems: "center",
|
|
11
|
+
...getSizeStyles(
|
|
12
|
+
theme,
|
|
13
|
+
ownerState?.size || "medium",
|
|
14
|
+
"action",
|
|
15
|
+
(size) => ({
|
|
16
|
+
width: size,
|
|
17
|
+
height: size
|
|
18
|
+
})
|
|
19
|
+
),
|
|
20
|
+
"& .MuiButtonBase-root .M4LImage-root": {
|
|
21
|
+
...getSizeStyles(
|
|
22
|
+
theme,
|
|
23
|
+
ownerState?.size || "medium",
|
|
24
|
+
"base",
|
|
25
|
+
(size) => ({
|
|
26
|
+
width: `${size}!important`,
|
|
27
|
+
height: `${size}!important`
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
image: {},
|
|
6
34
|
/**
|
|
7
35
|
* Estilos del paper
|
|
8
36
|
*/
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export declare const LanguagePopoverRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown
|
|
2
|
-
|
|
1
|
+
export declare const LanguagePopoverRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../MenuActions/types').MenuActionsProps, keyof import('../../MenuActions/types').MenuActionsProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, {}, {}>;
|
|
4
|
+
export declare const ImageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
3
7
|
export declare const PaperStyled: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').PaperOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
8
|
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown
|
|
9
|
+
}, "children" | "style" | "square" | "variant" | "className" | "classes" | "sx" | "elevation">, "children" | "ref" | "title" | "id" | "hidden" | "color" | "content" | "style" | "square" | "variant" | "translate" | "className" | "classes" | "sx" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "elevation"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
10
|
+
ownerState?: (Partial<import('..').LanguagePopoverOwnerState> & Record<string, unknown>) | undefined;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { I as Image } from "../../Image/Image.js";
|
|
3
2
|
import { M as MenuActions } from "../../MenuActions/MenuActions.js";
|
|
4
3
|
import { L as LANGUAGE_POPOVER_KEY_COMPONENT } from "../constants.js";
|
|
5
4
|
import { l as languagePopoverStyles } from "../LanguagePopover.styles.js";
|
|
@@ -9,7 +8,7 @@ const LanguagePopoverRootStyled = styled(MenuActions, {
|
|
|
9
8
|
name: LANGUAGE_POPOVER_KEY_COMPONENT,
|
|
10
9
|
slot: LanguagePopoverSlots.root
|
|
11
10
|
})(languagePopoverStyles.root);
|
|
12
|
-
|
|
11
|
+
styled("div", {
|
|
13
12
|
name: LANGUAGE_POPOVER_KEY_COMPONENT,
|
|
14
13
|
slot: LanguagePopoverSlots.image
|
|
15
14
|
})(languagePopoverStyles.image);
|
|
@@ -18,7 +17,6 @@ const PaperStyled = styled(Paper, {
|
|
|
18
17
|
slot: LanguagePopoverSlots.paper
|
|
19
18
|
})(languagePopoverStyles.paper);
|
|
20
19
|
export {
|
|
21
|
-
ImageStyled as I,
|
|
22
20
|
LanguagePopoverRootStyled as L,
|
|
23
21
|
PaperStyled as P
|
|
24
22
|
};
|
|
@@ -17,4 +17,9 @@ export interface LanguagePopoverProps {
|
|
|
17
17
|
*/
|
|
18
18
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
19
19
|
}
|
|
20
|
-
export type
|
|
20
|
+
export type LanguagePopoverSlotsType = keyof typeof Slots;
|
|
21
|
+
export interface LanguagePopoverOwnerState {
|
|
22
|
+
size: LanguagePopoverProps['size'];
|
|
23
|
+
image?: string;
|
|
24
|
+
}
|
|
25
|
+
export type LanguagePopoverStyles = M4LOverridesStyleRules<LanguagePopoverSlotsType, typeof LANGUAGE_POPOVER_KEY_COMPONENT, Theme>;
|
|
@@ -56,9 +56,11 @@ const useNumberInput = (parameters) => {
|
|
|
56
56
|
(event, field, fieldValue, reason) => {
|
|
57
57
|
if (field === "value" && typeof fieldValue !== "string") {
|
|
58
58
|
switch (reason) {
|
|
59
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
59
60
|
case "numberInput:inputChange":
|
|
60
61
|
onChange?.(event, fieldValue);
|
|
61
62
|
break;
|
|
63
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
62
64
|
case "numberInput:clamp":
|
|
63
65
|
onChange?.(event, fieldValue);
|
|
64
66
|
break;
|
|
@@ -13,7 +13,8 @@ const paperFormStyles = {
|
|
|
13
13
|
borderColor: theme.vars.palette.border.default,
|
|
14
14
|
overflow: "hidden",
|
|
15
15
|
width: "100%",
|
|
16
|
-
height: "auto"
|
|
16
|
+
height: "auto",
|
|
17
|
+
container: "container / inline-size"
|
|
17
18
|
}),
|
|
18
19
|
/**
|
|
19
20
|
* ************************************************************
|
|
@@ -9,7 +9,8 @@ const propertyValueStyles = {
|
|
|
9
9
|
minWidth: `${maxWidth}px`,
|
|
10
10
|
[`@container ${CONTAINER_QUERY_NAME} (max-width: ${maxWidth - 1}px)`]: {
|
|
11
11
|
minWidth: "100px",
|
|
12
|
-
maxWidth: "100%"
|
|
12
|
+
maxWidth: "100%",
|
|
13
|
+
width: "100%"
|
|
13
14
|
}
|
|
14
15
|
});
|
|
15
16
|
const semanticStylesMap = {
|
|
@@ -44,11 +45,11 @@ const propertyValueStyles = {
|
|
|
44
45
|
display: "flex",
|
|
45
46
|
flexDirection: ownerState?.isForm ? "column" : "row",
|
|
46
47
|
justifyContent: ownerState?.isForm ? "space-between" : "left",
|
|
47
|
-
alignItems: "
|
|
48
|
+
alignItems: "center",
|
|
48
49
|
gap: theme.vars.size.baseSpacings["sp1"],
|
|
49
50
|
width: ownerState?.semanticWidth ? "auto" : "200px",
|
|
50
51
|
overflow: "hidden",
|
|
51
|
-
color: theme.palette.text.primary,
|
|
52
|
+
color: theme.vars.palette.text.primary,
|
|
52
53
|
paddingTop: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
|
|
53
54
|
paddingBottom: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
|
|
54
55
|
borderBottom: !ownerState?.isForm ? `${theme.vars.palette.border.disabled} solid 1px` : "none",
|
|
@@ -61,6 +62,7 @@ const propertyValueStyles = {
|
|
|
61
62
|
...theme.generalSettings.isMobile && {
|
|
62
63
|
flexDirection: "column"
|
|
63
64
|
},
|
|
65
|
+
minHeight: theme.vars.size.baseSpacings.sp5,
|
|
64
66
|
...semanticStyle
|
|
65
67
|
};
|
|
66
68
|
},
|
|
@@ -71,7 +73,7 @@ const propertyValueStyles = {
|
|
|
71
73
|
display: "flex",
|
|
72
74
|
alignItems: "center",
|
|
73
75
|
fontSize: theme.typography.body2.fontSize,
|
|
74
|
-
color: theme.palette.text.primary,
|
|
76
|
+
color: theme.vars.palette.text.primary,
|
|
75
77
|
gap: theme.vars.size.baseSpacings["sp1"],
|
|
76
78
|
overflow: "hidden",
|
|
77
79
|
width: "100%"
|
|
@@ -83,6 +85,7 @@ const propertyValueStyles = {
|
|
|
83
85
|
width: "100%",
|
|
84
86
|
display: "flex",
|
|
85
87
|
justifyContent: "flex-start",
|
|
88
|
+
alignItems: "center",
|
|
86
89
|
overflow: "hidden",
|
|
87
90
|
height: ownerState?.valueHeight ? ownerState?.valueHeight : "auto",
|
|
88
91
|
...ownerState?.isForm && {
|
|
@@ -91,6 +91,10 @@ export interface PropertyVaLueOwnerState extends Pick<PropertyValueProps, 'disab
|
|
|
91
91
|
* Indica si el componente está en modo formulario.
|
|
92
92
|
*/
|
|
93
93
|
isForm: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Tamaño del componente.
|
|
96
|
+
*/
|
|
97
|
+
size?: PropertyValueProps['size'];
|
|
94
98
|
/**
|
|
95
99
|
* Propiedades adicionales para estilos o comportamientos personalizados.
|
|
96
100
|
*/
|
|
@@ -23,7 +23,8 @@ const SideBar = memo((props) => {
|
|
|
23
23
|
expandedWidth = "230px",
|
|
24
24
|
companyName,
|
|
25
25
|
companySlogan,
|
|
26
|
-
urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}
|
|
26
|
+
urlIconPrefix = `${host_static_assets}/${environment_assets}${PATH_ICONS}`,
|
|
27
|
+
promotion
|
|
27
28
|
} = props;
|
|
28
29
|
const menuDataWithState = useMemo(() => getMenuDataWithState({ menuData: menuData ?? getDataToSkeleton(), moduleSelectedId }), [menuData, moduleSelectedId]);
|
|
29
30
|
const isMobile = useIsMobile();
|
|
@@ -44,7 +45,8 @@ const SideBar = memo((props) => {
|
|
|
44
45
|
expandedWidth,
|
|
45
46
|
companyName,
|
|
46
47
|
companySlogan,
|
|
47
|
-
urlIconPrefix
|
|
48
|
+
urlIconPrefix,
|
|
49
|
+
promotion
|
|
48
50
|
},
|
|
49
51
|
children: !isMobile ? /* @__PURE__ */ jsx(SideBarDesktop, {}) : /* @__PURE__ */ jsx(SideBarMobile, {})
|
|
50
52
|
}
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
+
import { HeaderSidebarSlots, ContentGroupsSlots, SideBarDesktopSlots, SideBarFooterSlots, SideBarMobileSlots, ContentComponentSlots } from './slots/SideBarEnum';
|
|
1
2
|
export declare const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
|
|
2
3
|
export declare const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
3
4
|
export declare const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
|
-
export declare const ITEM_ACTIVE = "M4LItemActive";
|
|
5
|
-
export declare const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
|
|
6
5
|
export declare const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
7
6
|
export declare const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
8
7
|
export declare const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
8
|
+
export declare const ALL_SIDEBAR_SLOTS: {
|
|
9
|
+
contentComponentRoot: ContentComponentSlots.contentComponentRoot;
|
|
10
|
+
contentComponentHide: ContentComponentSlots.contentComponentHide;
|
|
11
|
+
containerTreeItemsAndPromotion: ContentComponentSlots.containerTreeItemsAndPromotion;
|
|
12
|
+
containerNodeMenuItem: ContentComponentSlots.containerNodeMenuItem;
|
|
13
|
+
containerNodeMenuItemMain: ContentComponentSlots.containerNodeMenuItemMain;
|
|
14
|
+
menuItemMain: ContentComponentSlots.menuItemMain;
|
|
15
|
+
containerFooter: SideBarFooterSlots.containerFooter;
|
|
16
|
+
containerHeaderSidebarRoot: HeaderSidebarSlots.containerHeaderSidebarRoot;
|
|
17
|
+
containerTitleSubtitle: HeaderSidebarSlots.containerTitleSubtitle;
|
|
18
|
+
containerTreeGroupItems: ContentGroupsSlots.containerTreeGroupItems;
|
|
19
|
+
containerContentGroups: ContentGroupsSlots.containerContentGroups;
|
|
20
|
+
containerContentTitle: ContentGroupsSlots.containerContentTitle;
|
|
21
|
+
containerContentNavItems: ContentGroupsSlots.containerContentNavItems;
|
|
22
|
+
containerContentItem: ContentGroupsSlots.containerContentItem;
|
|
23
|
+
containerArrowIconRoot: ContentGroupsSlots.containerArrowIconRoot;
|
|
24
|
+
containerSideBarMobile: SideBarMobileSlots.containerSideBarMobile;
|
|
25
|
+
containerDesktopRoot: SideBarDesktopSlots.containerDesktopRoot;
|
|
26
|
+
containerDesktopContent: SideBarDesktopSlots.containerDesktopContent;
|
|
27
|
+
containerBtnAnchored: SideBarDesktopSlots.containerBtnAnchored;
|
|
28
|
+
};
|
|
29
|
+
export declare const CLASS_NAME_IS_ROOT = "is-root";
|
|
30
|
+
export declare const CLASS_NAME_MENU_ACTIVE = "menu-active";
|
|
31
|
+
export declare const CLASS_NAME_ITEM_IN_TREE_ACTIVE = "item-in-tree-active";
|
|
32
|
+
export declare const CLASS_NAME_HAS_CHILDREN = "has-children";
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
+
import { C as ContentComponentSlots, S as SideBarFooterSlots, H as HeaderSidebarSlots, a as ContentGroupsSlots, b as SideBarMobileSlots, c as SideBarDesktopSlots } from "./slots/SideBarEnum.js";
|
|
1
2
|
const SIDEBAR_KEY_COMPONENT = "M4LSideBar";
|
|
2
3
|
const CONTAINER_BTN_ANCHORED = "M4LSideBarButtonAnchored";
|
|
3
|
-
const LIST_MENU_ITEM = "M4LListMenuItem";
|
|
4
|
-
const ITEM_ACTIVE = "M4LItemActive";
|
|
5
|
-
const ITEM_IN_TREE_ACTIVE = "M4LItemInTreeActive";
|
|
6
4
|
const PATH_ICONS = "/frontend/domain/microfrontends/";
|
|
7
5
|
const PATH_ARROW_DOWN_ICON = "frontend/components/sidebar/assets/icons/ChevronRight.svg";
|
|
8
6
|
const PATH_ARROW_RIGHT_ICON = "frontend/components/sidebar/assets/icons/arrow_right.svg";
|
|
7
|
+
const ALL_SIDEBAR_SLOTS = {
|
|
8
|
+
...SideBarDesktopSlots,
|
|
9
|
+
...SideBarMobileSlots,
|
|
10
|
+
...ContentGroupsSlots,
|
|
11
|
+
...HeaderSidebarSlots,
|
|
12
|
+
...SideBarFooterSlots,
|
|
13
|
+
...ContentComponentSlots
|
|
14
|
+
};
|
|
15
|
+
const CLASS_NAME_IS_ROOT = "is-root";
|
|
16
|
+
const CLASS_NAME_MENU_ACTIVE = "menu-active";
|
|
17
|
+
const CLASS_NAME_ITEM_IN_TREE_ACTIVE = "item-in-tree-active";
|
|
18
|
+
const CLASS_NAME_HAS_CHILDREN = "has-children";
|
|
9
19
|
export {
|
|
20
|
+
ALL_SIDEBAR_SLOTS as A,
|
|
10
21
|
CONTAINER_BTN_ANCHORED as C,
|
|
11
|
-
ITEM_ACTIVE as I,
|
|
12
|
-
LIST_MENU_ITEM as L,
|
|
13
22
|
PATH_ICONS as P,
|
|
14
23
|
SIDEBAR_KEY_COMPONENT as S,
|
|
15
24
|
PATH_ARROW_RIGHT_ICON as a,
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
CLASS_NAME_IS_ROOT as b,
|
|
26
|
+
CLASS_NAME_MENU_ACTIVE as c,
|
|
27
|
+
CLASS_NAME_ITEM_IN_TREE_ACTIVE as d,
|
|
28
|
+
CLASS_NAME_HAS_CHILDREN as e,
|
|
29
|
+
PATH_ARROW_DOWN_ICON as f
|
|
18
30
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext } from "react";
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, createContext } from "react";
|
|
3
|
+
import { g as getComponentClasses } from "../../../../utils/getComponentSlotRoot.js";
|
|
4
|
+
import { A as ALL_SIDEBAR_SLOTS, S as SIDEBAR_KEY_COMPONENT } from "../../constants.js";
|
|
5
|
+
const classes = getComponentClasses(SIDEBAR_KEY_COMPONENT, ALL_SIDEBAR_SLOTS);
|
|
3
6
|
const initialState = {
|
|
4
7
|
anchored: false,
|
|
5
8
|
visible: true,
|
|
@@ -14,11 +17,17 @@ const initialState = {
|
|
|
14
17
|
},
|
|
15
18
|
expandedWidth: "",
|
|
16
19
|
companyName: "",
|
|
17
|
-
companySlogan: ""
|
|
20
|
+
companySlogan: "",
|
|
21
|
+
classes,
|
|
22
|
+
promotion: /* @__PURE__ */ jsx(Fragment, {}),
|
|
23
|
+
isHover: false,
|
|
24
|
+
setIsHover: (_isHover) => {
|
|
25
|
+
}
|
|
18
26
|
};
|
|
19
27
|
const SideBarContext = createContext(initialState);
|
|
20
28
|
const SideBarProvider = (props) => {
|
|
21
29
|
const { value, children } = props;
|
|
30
|
+
const [isHover, setIsHover] = useState(false);
|
|
22
31
|
const {
|
|
23
32
|
anchored,
|
|
24
33
|
visible,
|
|
@@ -32,7 +41,8 @@ const SideBarProvider = (props) => {
|
|
|
32
41
|
moduleSelectedId,
|
|
33
42
|
companyName,
|
|
34
43
|
companySlogan,
|
|
35
|
-
urlIconPrefix
|
|
44
|
+
urlIconPrefix,
|
|
45
|
+
promotion
|
|
36
46
|
} = value;
|
|
37
47
|
return (
|
|
38
48
|
// Proporcionar el contexto con las propiedades desestructuradas
|
|
@@ -52,7 +62,11 @@ const SideBarProvider = (props) => {
|
|
|
52
62
|
expandedWidth,
|
|
53
63
|
companyName,
|
|
54
64
|
companySlogan,
|
|
55
|
-
urlIconPrefix
|
|
65
|
+
urlIconPrefix,
|
|
66
|
+
classes,
|
|
67
|
+
promotion,
|
|
68
|
+
isHover,
|
|
69
|
+
setIsHover
|
|
56
70
|
},
|
|
57
71
|
children
|
|
58
72
|
}
|