@m4l/components 9.2.60 → 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.
Files changed (207) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/Chip/Chip.js +9 -10
  3. package/components/Chip/ChipStyles.js +13 -2
  4. package/components/Chip/constants.d.ts +9 -0
  5. package/components/Chip/constants.js +6 -2
  6. package/components/Chip/slots/ChipEnum.d.ts +3 -0
  7. package/components/Chip/slots/ChipEnum.js +6 -1
  8. package/components/Chip/slots/ChipSlots.js +1 -1
  9. package/components/DataGrid/DataGrid.js +17 -3
  10. package/components/DataGrid/Datagrid.styles.js +80 -33
  11. package/components/DataGrid/constants.d.ts +2 -0
  12. package/components/DataGrid/constants.js +7 -3
  13. package/components/DataGrid/contexts/DataGridContext/index.js +77 -30
  14. package/components/DataGrid/contexts/DataGridContext/types.d.ts +5 -2
  15. package/components/DataGrid/dictionary.d.ts +8 -0
  16. package/components/DataGrid/dictionary.js +26 -17
  17. package/components/DataGrid/icons.d.ts +7 -0
  18. package/components/DataGrid/icons.js +8 -1
  19. package/components/DataGrid/slots/DataGridEnum.d.ts +7 -1
  20. package/components/DataGrid/slots/DataGridEnum.js +6 -0
  21. package/components/DataGrid/slots/DataGridSlot.d.ts +6 -0
  22. package/components/DataGrid/slots/DataGridSlot.js +35 -5
  23. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/Filter/index.js +9 -1
  24. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.d.ts +3 -1
  25. package/components/DataGrid/subcomponents/Table/hooks/getDragHeaderRenderer.js +9 -2
  26. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.d.ts +6 -0
  27. package/components/DataGrid/subcomponents/Table/hooks/useHeaderMenuActions.js +262 -0
  28. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.d.ts +6 -4
  29. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +35 -18
  30. package/components/DataGrid/subcomponents/Table/index.js +97 -34
  31. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -1
  32. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.d.ts +1 -0
  33. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +79 -4
  34. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.d.ts +5 -0
  35. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/HeaderRenderClick.js +146 -0
  36. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.d.ts +1 -0
  37. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/index.js +1 -0
  38. package/components/DataGrid/subcomponents/Table/subcomponents/HeaderRenderClick/types.d.ts +131 -0
  39. package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +1 -1
  40. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +1 -1
  41. package/components/DataGrid/tests/HeaderRenderClick.test.d.ts +1 -0
  42. package/components/DataGrid/tests/useHeaderMenuActions.test.d.ts +1 -0
  43. package/components/DataGrid/types.d.ts +53 -0
  44. package/components/DynamicFilter/DynamicFilter.styles.js +99 -90
  45. package/components/DynamicFilter/slots/SlotsEnum.d.ts +0 -3
  46. package/components/DynamicFilter/slots/SlotsEnum.js +0 -3
  47. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +0 -9
  48. package/components/DynamicFilter/slots/dynamicFilterSlots.js +3 -19
  49. package/components/DynamicFilter/store/DynamicFilterContext.js +67 -28
  50. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +2 -2
  51. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +2 -2
  52. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +2 -2
  53. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +2 -2
  54. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +2 -2
  55. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +2 -2
  56. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +1 -1
  57. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -0
  58. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -1
  59. package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +2 -0
  60. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +24 -18
  61. package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
  62. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +4 -1
  63. package/components/DynamicFilter/types.d.ts +3 -0
  64. package/components/DynamicSort/DynamicSort.js +10 -6
  65. package/components/DynamicSort/DynamicSort.styles.js +92 -90
  66. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +0 -9
  67. package/components/DynamicSort/slots/DynamicSortSlots.js +7 -23
  68. package/components/DynamicSort/slots/SlotsEnum.d.ts +1 -4
  69. package/components/DynamicSort/slots/SlotsEnum.js +1 -4
  70. package/components/DynamicSort/store/DynamicSortContext.js +96 -67
  71. package/components/DynamicSort/store/DynamicSortStore.js +53 -4
  72. package/components/DynamicSort/store/types.d.ts +11 -0
  73. package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +2 -2
  74. package/components/DynamicSort/subcomponents/InputSort/InputSort.js +2 -0
  75. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +22 -17
  76. package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
  77. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +2 -2
  78. package/components/DynamicSort/subcomponents/SortActions/useSortActions.d.ts +2 -0
  79. package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +2 -1
  80. package/components/DynamicSort/types.d.ts +4 -0
  81. package/components/LanguagePopover/LanguagePopover.js +7 -5
  82. package/components/LanguagePopover/LanguagePopover.styles.js +32 -4
  83. package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +9 -3
  84. package/components/LanguagePopover/slots/LanguagePopoverSlots.js +1 -3
  85. package/components/LanguagePopover/types.d.ts +6 -1
  86. package/components/PaperForm/styles.js +2 -1
  87. package/components/PropertyValue/PropertyValue.js +2 -1
  88. package/components/PropertyValue/PropertyValue.styles.js +7 -4
  89. package/components/PropertyValue/types.d.ts +4 -0
  90. package/components/SideBar/SideBar.js +4 -2
  91. package/components/SideBar/constants.d.ts +26 -2
  92. package/components/SideBar/constants.js +19 -7
  93. package/components/SideBar/context/sideBarContext/index.js +19 -5
  94. package/components/SideBar/context/sideBarContext/types.d.ts +22 -1
  95. package/components/SideBar/helpers/getMenuDataWithState/index.js +25 -8
  96. package/components/SideBar/hooks/useCollapse/index.d.ts +1 -0
  97. package/components/SideBar/hooks/useCollapse/index.js +1 -0
  98. package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +11 -0
  99. package/components/SideBar/hooks/useCollapse/useCollapse.js +23 -0
  100. package/components/SideBar/slots/SideBarEnum.d.ts +5 -5
  101. package/components/SideBar/slots/SideBarEnum.js +9 -11
  102. package/components/SideBar/slots/SideBarSlots.d.ts +9 -3
  103. package/components/SideBar/slots/SideBarSlots.js +36 -28
  104. package/components/SideBar/styles.js +2 -4
  105. package/components/SideBar/subcomponents/ContentComponent/index.js +39 -19
  106. package/components/SideBar/subcomponents/ContentComponent/style.js +171 -22
  107. package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.d.ts +2 -2
  108. package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/index.js +8 -15
  109. package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.js +2 -2
  110. package/components/SideBar/subcomponents/Promotion/types.d.ts +5 -0
  111. package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -1
  112. package/components/SideBar/subcomponents/SideBarDesktop/styles.js +10 -14
  113. package/components/SideBar/subcomponents/SideBarMobile/index.js +1 -1
  114. package/components/SideBar/subcomponents/TreeGroupItems/index.d.ts +5 -0
  115. package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/index.js +16 -18
  116. package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.js +5 -7
  117. package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.js +10 -7
  118. package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems/subcomponents/NodeMenuItem}/index.d.ts +3 -3
  119. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +69 -0
  120. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/types.d.ts +9 -0
  121. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.d.ts +5 -0
  122. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +56 -0
  123. package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/index.d.ts +1 -0
  124. package/components/SideBar/subcomponents/TreeGroupItems/types.d.ts +4 -0
  125. package/components/SideBar/types.d.ts +7 -3
  126. package/components/WindowBase/WindowBase.js +7 -1
  127. package/components/WindowBase/WindowBase.styles.js +50 -15
  128. package/components/WindowBase/constants.d.ts +1 -0
  129. package/components/WindowBase/constants.js +5 -1
  130. package/components/WindowBase/slots/WindowBaseEnum.d.ts +2 -1
  131. package/components/WindowBase/slots/WindowBaseEnum.js +1 -0
  132. package/components/WindowBase/slots/WindowBaseSlots.d.ts +3 -0
  133. package/components/WindowBase/slots/WindowBaseSlots.js +6 -1
  134. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +11 -5
  135. package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
  136. package/components/WindowBase/subcomponents/Header/useButtonActions.js +4 -2
  137. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.d.ts +1 -1
  138. package/components/WindowBase/subcomponents/MemoizedIconButton/MemoizedIconButton.js +1 -1
  139. package/components/WindowBase/subcomponents/MemoizedIconButton/types.d.ts +5 -0
  140. package/components/WindowBase/types.d.ts +16 -0
  141. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +13 -0
  142. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +26 -20
  143. package/components/areas/contexts/AreasContext/store.js +2 -2
  144. package/components/extended/React-Resizable/helpers.js +1 -1
  145. package/components/extended/React-resizable-panels/SplitLayout.js +6 -3
  146. package/components/extended/React-resizable-panels/SplitLayout.styles.js +78 -36
  147. package/components/extended/React-resizable-panels/constants.d.ts +6 -0
  148. package/components/extended/React-resizable-panels/constants.js +5 -1
  149. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.d.ts +2 -1
  150. package/components/extended/React-resizable-panels/slots/SplitLayoutEnum.js +1 -0
  151. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +3 -0
  152. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.js +7 -1
  153. package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +1 -1
  154. package/components/hook-form/RHFTextField/RHFTextField.js +1 -0
  155. package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.styles.js +3 -38
  156. package/components/hook-form/RHFormContext/index.d.ts +1 -1
  157. package/components/mui_extended/Accordion/styles.js +10 -2
  158. package/components/mui_extended/Button/Button.js +3 -1
  159. package/components/mui_extended/Button/ButtonStyles.js +6 -1
  160. package/components/mui_extended/Button/types.d.ts +1 -1
  161. package/components/mui_extended/CheckBox/CheckBox.styles.js +2 -1
  162. package/components/mui_extended/Divider/index.d.ts +1 -0
  163. package/components/mui_extended/Divider/index.js +1 -0
  164. package/components/mui_extended/NavLink/NavLink.js +3 -1
  165. package/components/mui_extended/NavLink/NavLink.styles.js +2 -1
  166. package/components/mui_extended/NavLink/types.d.ts +3 -1
  167. package/components/mui_extended/Tab/Tab.styles.js +2 -1
  168. package/components/mui_extended/TabContent/TabContent.styles.js +2 -8
  169. package/components/mui_extended/TextField/TextField.js +1 -1
  170. package/components/mui_extended/TextField/TextField.styles.js +20 -18
  171. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  172. package/components/mui_extended/index.d.ts +1 -0
  173. package/hooks/useDynamicFilterAndSort/styles.js +1 -1
  174. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +3 -0
  175. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +334 -88
  176. package/index.d.ts +1 -0
  177. package/index.js +23 -20
  178. package/package.json +4 -3
  179. package/storybook/components/DataGrid/DataGrid.stories.d.ts +22 -0
  180. package/storybook/components/DataGrid/MswHandles.d.ts +1 -0
  181. package/storybook/components/DataGrid/helpers/filterFieldsSeedData.d.ts +5 -0
  182. package/storybook/components/DataGrid/helpers/getRows.d.ts +4 -0
  183. package/storybook/components/DataGrid/helpers/getRowsWithBackendSimulation.d.ts +9 -0
  184. package/storybook/components/DataGrid/helpers/sortsSeedData.d.ts +5 -0
  185. package/storybook/components/DataGrid/helpers/types.d.ts +1 -0
  186. package/storybook/components/DataGrid/helpers/useSeed.d.ts +3 -0
  187. package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +2 -0
  188. package/storybook/components/DynamicFilter/DynamicFilter.stories.d.ts +27 -11
  189. package/storybook/components/DynamicSort/DynamicSort.stories.d.ts +26 -10
  190. package/storybook/components/SideBar/subcomponents/FooterPromotion/FooterPromotion.d.ts +4 -0
  191. package/storybook/components/SideBar/subcomponents/FooterPromotion/constants.d.ts +3 -0
  192. package/storybook/components/SideBar/subcomponents/FooterPromotion/index.d.ts +1 -0
  193. package/storybook/components/extended/mui/IconButton/IconButton.stories.d.ts +1 -0
  194. package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +1 -0
  195. package/utils/index.d.ts +1 -0
  196. package/components/SideBar/subcomponents/ContentGroups/index.d.ts +0 -5
  197. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/index.js +0 -63
  198. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.d.ts +0 -2
  199. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +0 -47
  200. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/types.d.ts +0 -7
  201. package/components/SideBar/subcomponents/ContentGroups/types.d.ts +0 -4
  202. package/components/SideBar/subcomponents/FooterSidebar/types.d.ts +0 -5
  203. package/components/SideBar/subcomponents/HeaderSidebar/index.js +0 -25
  204. /package/components/SideBar/subcomponents/{FooterSidebar → Promotion}/styles.d.ts +0 -0
  205. /package/components/SideBar/subcomponents/{ContentGroups → TreeGroupItems}/styles.d.ts +0 -0
  206. /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/index.d.ts +0 -0
  207. /package/components/SideBar/subcomponents/{ContentGroups/subcomponents/ContainerMenuItemsMain → TreeGroupItems}/subcomponents/ArrowIcon/types.d.ts +0 -0
@@ -8,77 +8,106 @@ import { f as formatToRowSort } from "../helpers/formatToRowSort.js";
8
8
  import { c as createDynamicSortStore } from "./DynamicSortStore.js";
9
9
  import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
10
10
  const DynamicSortContext = createContext(null);
11
- const DynamicSortProvider = forwardRef((props, ref) => {
12
- const {
13
- automatic = true,
14
- fields,
15
- initialAppliedSorts = [],
16
- onChangeSorts,
17
- dataTestId = "",
18
- size = "medium",
19
- storeId,
20
- storeDevtoolsEnabled,
21
- visibleRefresh = true,
22
- children
23
- } = props;
24
- const { currentSize } = useComponentSize(size);
25
- const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
26
- const { getLabel } = useModuleDictionary();
27
- const dynamicSortStoreRef = useRef();
28
- if (!dynamicSortStoreRef.current) {
29
- dynamicSortStoreRef.current = createDynamicSortStore({
11
+ const DynamicSortProvider = forwardRef(
12
+ (props, ref) => {
13
+ const {
14
+ automatic = true,
30
15
  fields,
31
- automatic,
32
- getLabel,
33
- dataTestId,
34
- size,
16
+ initialAppliedSorts = [],
17
+ onChangeSorts,
18
+ dataTestId = "",
19
+ size = "medium",
35
20
  storeId,
36
- visibleRefresh,
37
- ownerState: {
38
- isDirty: false,
39
- inEdition: false,
40
- isValid: true,
41
- isEmpty: true,
42
- size
43
- }
44
- }, storeDevtoolsEnabled);
45
- dynamicSortStoreRef.current.getState().actions.init(initialAppliedSorts);
46
- }
47
- const fireOnChangeSort = useStore(
48
- dynamicSortStoreRef.current,
49
- (state) => state.actions.fireOnChangeSorts,
50
- shallow
51
- );
52
- useImperativeHandle(ref, () => ({
53
- fireOnChangeSort
54
- }));
55
- const countOnChangeSortsApplyed = useStore(
56
- dynamicSortStoreRef.current,
57
- (state) => state.countOnChangeSortsApplyed,
58
- shallow
59
- );
60
- useEffect(() => {
61
- if (countOnChangeSortsApplyed === 0) {
62
- return;
63
- }
64
- const state = dynamicSortStoreRef.current?.getState();
65
- if (state) {
66
- onChangeSorts?.(
67
- formatToInitialSorts(state.appliedSorts),
68
- formatToRowSort(state.appliedSorts)
21
+ storeDevtoolsEnabled,
22
+ visibleRefresh = true,
23
+ children
24
+ } = props;
25
+ const { currentSize } = useComponentSize(size);
26
+ const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
27
+ const { getLabel } = useModuleDictionary();
28
+ const dynamicSortStoreRef = useRef();
29
+ if (!dynamicSortStoreRef.current) {
30
+ dynamicSortStoreRef.current = createDynamicSortStore(
31
+ {
32
+ fields,
33
+ automatic,
34
+ getLabel,
35
+ dataTestId,
36
+ size,
37
+ storeId,
38
+ visibleRefresh,
39
+ ownerState: {
40
+ isDirty: false,
41
+ inEdition: false,
42
+ isValid: true,
43
+ isEmpty: true,
44
+ size
45
+ }
46
+ },
47
+ storeDevtoolsEnabled
69
48
  );
49
+ dynamicSortStoreRef.current.getState().actions.init(initialAppliedSorts);
70
50
  }
71
- }, [countOnChangeSortsApplyed]);
72
- useEffect(() => {
73
- if (dynamicSortStoreRef.current?.getState().size !== adjustedSize) {
74
- dynamicSortStoreRef.current?.getState().actions.setSize(adjustedSize);
75
- }
76
- if (dynamicSortStoreRef.current?.getState().visibleRefresh !== visibleRefresh) {
77
- dynamicSortStoreRef.current?.getState().actions.setVisibleRefresh(visibleRefresh);
78
- }
79
- }, [adjustedSize, visibleRefresh]);
80
- return /* @__PURE__ */ jsx(DynamicSortContext.Provider, { value: dynamicSortStoreRef.current, children });
81
- });
51
+ const fireOnChangeSort = useStore(
52
+ dynamicSortStoreRef.current,
53
+ (state) => state.actions.fireOnChangeSorts,
54
+ shallow
55
+ );
56
+ const addExternalSort = useStore(
57
+ dynamicSortStoreRef.current,
58
+ (state) => state.actions.addExternalSort,
59
+ shallow
60
+ );
61
+ const removeExternalSort = useStore(
62
+ dynamicSortStoreRef.current,
63
+ (state) => state.actions.removeExternalSort,
64
+ shallow
65
+ );
66
+ const getNewId = useStore(
67
+ dynamicSortStoreRef.current,
68
+ (state) => state.actions.getNewId,
69
+ shallow
70
+ );
71
+ const getCurrentSorts = useStore(
72
+ dynamicSortStoreRef.current,
73
+ (state) => () => state.appliedSorts,
74
+ shallow
75
+ );
76
+ useImperativeHandle(ref, () => ({
77
+ fireOnChangeSort,
78
+ addExternalSort,
79
+ removeExternalSort,
80
+ getNewId,
81
+ getCurrentSorts
82
+ }));
83
+ const countOnChangeSortsApplyed = useStore(
84
+ dynamicSortStoreRef.current,
85
+ (state) => state.countOnChangeSortsApplyed,
86
+ shallow
87
+ );
88
+ useEffect(() => {
89
+ if (countOnChangeSortsApplyed === 0) {
90
+ return;
91
+ }
92
+ const state = dynamicSortStoreRef.current?.getState();
93
+ if (state) {
94
+ onChangeSorts?.(
95
+ formatToInitialSorts(state.appliedSorts),
96
+ formatToRowSort(state.appliedSorts)
97
+ );
98
+ }
99
+ }, [countOnChangeSortsApplyed]);
100
+ useEffect(() => {
101
+ if (dynamicSortStoreRef.current?.getState().size !== adjustedSize) {
102
+ dynamicSortStoreRef.current?.getState().actions.setSize(adjustedSize);
103
+ }
104
+ if (dynamicSortStoreRef.current?.getState().visibleRefresh !== visibleRefresh) {
105
+ dynamicSortStoreRef.current?.getState().actions.setVisibleRefresh(visibleRefresh);
106
+ }
107
+ }, [adjustedSize, visibleRefresh]);
108
+ return /* @__PURE__ */ jsx(DynamicSortContext.Provider, { value: dynamicSortStoreRef.current, children });
109
+ }
110
+ );
82
111
  export {
83
112
  DynamicSortProvider as D,
84
113
  DynamicSortContext as a
@@ -9,7 +9,9 @@ const updateAvailableFields = (state) => {
9
9
  let add;
10
10
  const field = state.fields[index];
11
11
  add = true;
12
- const fIndx = state.appliedSorts.findIndex((f) => f.field.name === field.name);
12
+ const fIndx = state.appliedSorts.findIndex(
13
+ (f) => f.field.name === field.name
14
+ );
13
15
  if (fIndx > -1) {
14
16
  add = false;
15
17
  }
@@ -100,7 +102,26 @@ const createDynamicSortStore = (initProps, storeDevtoolsEnabled = false) => {
100
102
  */
101
103
  removeSort: (id) => {
102
104
  set((state) => {
103
- const index_to_remove = state.appliedSorts.findIndex((f) => id === f.id && !f.fixed);
105
+ const index_to_remove = state.appliedSorts.findIndex(
106
+ (f) => id === f.id && !f.fixed
107
+ );
108
+ if (index_to_remove > -1) {
109
+ state.appliedSorts.splice(index_to_remove, 1);
110
+ updateAutomatic(state);
111
+ if (state.appliedSorts.length === 0) {
112
+ state.ownerState.isDirty = false;
113
+ }
114
+ }
115
+ });
116
+ },
117
+ /**
118
+ * Elimina un campo sort por el nombre de la columna
119
+ */
120
+ removeExternalSort: (columnName) => {
121
+ set((state) => {
122
+ const index_to_remove = state.appliedSorts.findIndex(
123
+ (f) => f.field.name === columnName && !f.fixed
124
+ );
104
125
  if (index_to_remove > -1) {
105
126
  state.appliedSorts.splice(index_to_remove, 1);
106
127
  updateAutomatic(state);
@@ -186,12 +207,37 @@ const createDynamicSortStore = (initProps, storeDevtoolsEnabled = false) => {
186
207
  updateAutomatic(state);
187
208
  });
188
209
  },
210
+ /**
211
+ * Agrega un nuevo campo/atributo por el cual se va aplicar el sort externo
212
+ */
213
+ addExternalSort: (newSort) => {
214
+ set((state) => {
215
+ const existingIndex = state.appliedSorts.findIndex(
216
+ (sort) => sort.field.name === newSort.field.name
217
+ );
218
+ if (existingIndex > -1) {
219
+ const existingSort = state.appliedSorts[existingIndex];
220
+ state.appliedSorts[existingIndex] = {
221
+ ...newSort,
222
+ id: existingSort.id
223
+ };
224
+ } else {
225
+ if (!state.automatic) {
226
+ state.ownerState.isDirty = true;
227
+ }
228
+ state.appliedSorts.push(newSort);
229
+ }
230
+ updateAutomatic(state);
231
+ });
232
+ },
189
233
  /**
190
234
  * Actualiza un sort existente
191
235
  */
192
236
  updateSort: (editSort) => {
193
237
  set((state) => {
194
- const index = state.appliedSorts.findIndex((ap) => ap.id === editSort.id);
238
+ const index = state.appliedSorts.findIndex(
239
+ (ap) => ap.id === editSort.id
240
+ );
195
241
  if (index > -1) {
196
242
  state.appliedSorts[index] = editSort;
197
243
  }
@@ -251,7 +297,10 @@ const createDynamicSortStore = (initProps, storeDevtoolsEnabled = false) => {
251
297
  }
252
298
  }
253
299
  })),
254
- { name: `${DYNAMIC_SORT_STORE_ID}: ${initProps.storeId}`, enabled: storeDevtoolsEnabled }
300
+ {
301
+ name: `${DYNAMIC_SORT_STORE_ID}: ${initProps.storeId}`,
302
+ enabled: storeDevtoolsEnabled
303
+ }
255
304
  )
256
305
  );
257
306
  };
@@ -98,6 +98,11 @@ export interface DynamicSortStateWithActions extends DynamicSortState {
98
98
  * @param id //identificador unico de un sort
99
99
  */
100
100
  removeSort: (id: number) => void;
101
+ /**
102
+ * remueve un sort externo por nombre de columna (para uso desde DataGrid)
103
+ * @param columnName nombre de la columna
104
+ */
105
+ removeExternalSort: (columnName: string) => void;
101
106
  /**
102
107
  *
103
108
  * @param anchorEl Elemento de donde va emerger el popup
@@ -136,6 +141,12 @@ export interface DynamicSortStateWithActions extends DynamicSortState {
136
141
  * @returns
137
142
  */
138
143
  addSort: (newSort: SortFieldApplied) => void;
144
+ /**
145
+ * Agrega un sort externo a los sorts aplicados (applyedFilters)
146
+ * @param newSort Sort a agregar
147
+ * @returns
148
+ */
149
+ addExternalSort: (newSort: SortFieldApplied) => void;
139
150
  /**
140
151
  * Modifica un sort que se encuentra en applyedFilters
141
152
  * @param sortToEdit sort a editar
@@ -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("div", { children: /* @__PURE__ */ jsx(
28
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
29
29
  RHFSelect,
30
30
  {
31
31
  size,
@@ -33,6 +33,8 @@ const InputSort = () => {
33
33
  value: inputData,
34
34
  placeholder: inputPlaceHolder,
35
35
  ownerState: { ...ownerState },
36
+ role: "searchbox",
37
+ "aria-label": "searchbox",
36
38
  ...inputHandlersProps
37
39
  }
38
40
  ),
@@ -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 PopoverHeaderStyled, g as PopoverHeaderTitleStyled, C as ContentSortStyled, h as PopoverContainerFieldsStyled, i as PopoverHeaderActionsStyled } from "../../slots/DynamicSortSlots.js";
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 { ownerState, size } = useDynamicSortBase();
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__ */ jsxs(
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
- /* @__PURE__ */ jsxs(PopoverHeaderStyled, { ownerState: { ...ownerState }, children: [
50
- field.urlIcon && /* @__PURE__ */ jsx(Icon, { src: field.urlIcon, size }),
51
- /* @__PURE__ */ jsx(PopoverHeaderTitleStyled, { variant: "paragraphDens", size, children: labelField })
52
- ] }),
53
- /* @__PURE__ */ jsxs(ContentSortStyled, { children: [
54
- /* @__PURE__ */ jsx(PopoverContainerFieldsStyled, { children: /* @__PURE__ */ jsx(DataTypeComponent, { formSort, statusLoad }) }),
55
- /* @__PURE__ */ jsxs(PopoverHeaderActionsStyled, { children: [
56
- /* @__PURE__ */ jsx(ActionCancel, { size, onClick: onClose }),
57
- /* @__PURE__ */ jsx(ActionIntro, { size })
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
  }
@@ -17,11 +17,11 @@ declare function usePopoverSort(): {
17
17
  sortFormValue: import('../../types').FormSortValueBase;
18
18
  formSort: FormSortFieldApplied;
19
19
  popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
20
- [x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
20
+ [x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
21
21
  }, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
22
- [x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
22
+ [x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
23
23
  }>, import('yup/lib/object').AssertsShape<{
24
- [x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
24
+ [x: string]: import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema</*elided*/ any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape</*elided*/ any>, import('yup/lib/object').AssertsShape</*elided*/ any>>, any>;
25
25
  }>> | undefined;
26
26
  statusLoad: "initial" | "reload_values_provider" | "ready";
27
27
  };
@@ -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 { j as ActionsStyled, k as ActionsClearButtonStyled, l as ActionsSubmitButtonStyled } from "../../slots/DynamicSortSlots.js";
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
  {
@@ -11,6 +11,8 @@ declare function useSortActions(): {
11
11
  sortButtonDictionaryTooltip: string;
12
12
  ownerState: {
13
13
  isValid: boolean;
14
+ isDirty: boolean;
15
+ inEdition: boolean;
14
16
  };
15
17
  };
16
18
  export default useSortActions;
@@ -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 {
@@ -175,4 +175,8 @@ export type DynamicSortSlotsType = keyof typeof DynamicSortSlots;
175
175
  export type DynamicSortStyles = M4LOverridesStyleRules<DynamicSortSlotsType, typeof DYNAMIC_SORT_KEY_COMPONENT, Theme>;
176
176
  export interface DynamicSortRef {
177
177
  fireOnChangeSort: () => void;
178
+ addExternalSort: (newSort: SortFieldApplied) => void;
179
+ removeExternalSort: (columnKey: string) => void;
180
+ getNewId: () => number;
181
+ getCurrentSorts: () => SortFieldApplied[];
178
182
  }
@@ -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, I as ImageStyled } from "./slots/LanguagePopoverSlots.js";
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 = "medium"
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
- size: adjustedSize,
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(ImageStyled, { src: currentLocale?.urlIcon, enableIntersectionObserver: false }),
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
- root: {},
3
- image: {
4
- height: "100%"
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
- export declare const ImageStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Image').ImageProps, keyof import('../../Image').ImageProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown>, {}, {}>;
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
- const ImageStyled = styled(Image, {
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 LanguagePopoverStyles = M4LOverridesStyleRules<keyof typeof Slots, typeof LANGUAGE_POPOVER_KEY_COMPONENT, Theme>;
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>;
@@ -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
  * ************************************************************