@m4l/components 9.3.20 → 9.3.21-JAEBeta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/@types/types.d.ts +1 -1
  2. package/components/Chip/Chip.js +9 -7
  3. package/components/Chip/ChipStyles.js +4 -31
  4. package/components/Chip/helpers.d.ts +10 -0
  5. package/components/Chip/helpers.js +34 -0
  6. package/components/Chip/types.d.ts +6 -0
  7. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +1 -1
  8. package/components/DragResizeWindowRND/DragResizeWindowRND.js +14 -10
  9. package/components/DragResizeWindowRND/helpers/expandingParentContainer.d.ts +1 -1
  10. package/components/DragResizeWindowRND/helpers/expandingParentContainer.js +24 -19
  11. package/components/DragResizeWindowRND/helpers/getInitialSize.d.ts +3 -3
  12. package/components/DragResizeWindowRND/helpers/getInitialSize.js +18 -15
  13. package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.d.ts +1 -1
  14. package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.js +17 -9
  15. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +4 -1
  16. package/components/DragResizeWindowRND/index.d.ts +1 -0
  17. package/components/DragResizeWindowRND/types.d.ts +12 -2
  18. package/components/DynamicFilter/DynamicFilter.js +2 -1
  19. package/components/DynamicFilter/helpers/frontEndHelpers.d.ts +2 -2
  20. package/components/DynamicFilter/helpers/frontEndHelpers.js +31 -9
  21. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts +2 -1
  22. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +4 -2
  23. package/components/DynamicFilter/subcomponents/DynamicFilterBase/types.d.ts +3 -0
  24. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +1 -1
  25. package/components/DynamicFilter/types.d.ts +4 -0
  26. package/components/DynamicSort/DynamicSort.js +2 -1
  27. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.d.ts +2 -1
  28. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +4 -2
  29. package/components/DynamicSort/subcomponents/DynamicSortBase/types.d.ts +3 -0
  30. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +1 -1
  31. package/components/DynamicSort/types.d.ts +4 -0
  32. package/components/Image/Image.js +4 -1
  33. package/components/MFLoader/MFLoader.js +8 -3
  34. package/components/MFLoader/styles.js +1 -1
  35. package/components/MFLoader/types.d.ts +10 -0
  36. package/components/ObjectLogs/hooks/useDetailFormatter.js +1 -1
  37. package/components/WindowBase/WindowBase.js +3 -3
  38. package/components/WindowBase/WindowBase.styles.js +36 -31
  39. package/components/WindowBase/constants.d.ts +1 -1
  40. package/components/WindowBase/constants.js +2 -2
  41. package/components/WindowBase/index.d.ts +1 -0
  42. package/components/WindowBase/subcomponents/Component/index.js +2 -2
  43. package/components/WindowBase/subcomponents/Component/types.d.ts +2 -0
  44. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +7 -7
  45. package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
  46. package/components/WindowBase/subcomponents/MicroFrontend/types.d.ts +4 -0
  47. package/components/WindowBase/types.d.ts +3 -3
  48. package/components/WindowConfirm/WindowConfirm.js +1 -1
  49. package/components/areas/components/AreasViewer/AreasViewer.styles.js +1 -1
  50. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +6 -2
  51. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +1 -0
  52. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +21 -3
  53. package/components/areas/contexts/AreasContext/store.js +2 -2
  54. package/components/areas/index.d.ts +1 -1
  55. package/components/areas/types.d.ts +1 -1
  56. package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +3 -34
  57. package/components/formatters/DistanceToNowFormatter/dictionary.d.ts +8 -0
  58. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts +13 -0
  59. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.js +65 -0
  60. package/components/formatters/DistanceToNowFormatter/index.d.ts +1 -0
  61. package/components/formatters/DistanceToNowFormatter/types.d.ts +4 -1
  62. package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +5 -1
  63. package/components/hook-form/RHFAutocomplete/constants.d.ts +1 -0
  64. package/components/hook-form/RHFAutocomplete/constants.js +5 -1
  65. package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +3 -1
  66. package/components/hook-form/RHFAutocompleteAsync/types.d.ts +4 -0
  67. package/components/hook-form/RHFormContext/index.d.ts +1 -1
  68. package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +6 -2
  69. package/components/mui_extended/ToggleIconButton/ToggleIconButton.styles.js +9 -0
  70. package/components/mui_extended/ToggleIconButton/types.d.ts +1 -0
  71. package/components/mui_extended/index.d.ts +1 -1
  72. package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +2 -2
  73. package/components/popups/components/PopupsProvider/hooks/usePopups.js +0 -1
  74. package/components/popups/components/PopupsViewer/PopupsViewer.js +4 -3
  75. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +5 -2
  76. package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +5 -0
  77. package/components/popups/components/PopupsViewer/types.d.ts +3 -0
  78. package/hooks/index.d.ts +1 -0
  79. package/hooks/useSizeContainer/index.d.ts +2 -1
  80. package/hooks/useSizeContainer/index.js +22 -13
  81. package/hooks/useSizeContainer/types.d.ts +6 -0
  82. package/hooks/useStateRef/index.d.ts +1 -1
  83. package/hooks/useStateRef/index.js +6 -6
  84. package/index.js +45 -38
  85. package/package.json +1 -2
  86. package/utils/deepShallow.d.ts +17 -0
  87. package/utils/deepShallow.js +76 -0
  88. package/utils/formatDistanceToNow/formatDistanteToNow.d.ts +2 -2
  89. package/utils/formatDistanceToNow/formatDistanteToNow.js +18 -2
  90. package/utils/formatDistanceToNow/types.d.ts +13 -0
  91. package/utils/index.d.ts +1 -0
@@ -3,19 +3,21 @@ import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
3
3
  import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
4
4
  import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../../constants.js";
5
5
  import { u as useDynamicFilterBase } from "./useDynamicFilterBase.js";
6
+ import clsx from "clsx";
6
7
  import { R as RootStyled, I as InnerContainerStyled } from "../../slots/dynamicFilterSlots.js";
7
8
  import { I as InputFilter } from "../InputFilter/InputFilter.js";
8
9
  import { A as AppliedFilters } from "../AppliedFilters/AppliedFilters.js";
9
10
  import { F as FilterActions } from "../FilterActions/FilterActions.js";
10
11
  import { P as PopoverFilter } from "../PopoverFilter/PopoverFilter.js";
11
12
  import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
12
- function DynamicFilterBase() {
13
+ function DynamicFilterBase(props) {
14
+ const { className } = props;
13
15
  const { ownerState, dataTestId } = useDynamicFilterBase();
14
16
  const classRoot = getComponentSlotRoot(DYNAMIC_FILTER_KEY_COMPONENT);
15
17
  return /* @__PURE__ */ jsx(
16
18
  RootStyled,
17
19
  {
18
- className: classRoot,
20
+ className: clsx(classRoot, className),
19
21
  ownerState: { ...ownerState },
20
22
  ...getPropDataTestId(DYNAMIC_FILTER_KEY_COMPONENT, DynamicFilterSlots.root, dataTestId),
21
23
  children: /* @__PURE__ */ jsxs(
@@ -0,0 +1,3 @@
1
+ export interface DynamicFilterBaseProps {
2
+ className?: string;
3
+ }
@@ -52,7 +52,7 @@ function PopoverFilter() {
52
52
  title: labelField,
53
53
  iconUrl: field.urlIcon,
54
54
  variant: "text",
55
- type: "popup",
55
+ emergeType: "popup",
56
56
  selected: true,
57
57
  draggable: false,
58
58
  children: [
@@ -273,6 +273,10 @@ rawFilters: Array<RawFilterFieldApply>) => void;
273
273
  * Propiedades que recibe el componente DynamicFilter
274
274
  */
275
275
  export interface DynamicFilterProps {
276
+ /**
277
+ * "className" clase css para el componente
278
+ */
279
+ className?: string;
276
280
  /**
277
281
  * "storeId" identificador del store
278
282
  */
@@ -5,13 +5,14 @@ import { D as DynamicSortProvider } from "./store/DynamicSortContext.js";
5
5
  import { D as DynamicSortBase } from "./subcomponents/DynamicSortBase/DynamicSortBase.js";
6
6
  const DynamicSort = forwardRef(
7
7
  (props, ref) => {
8
+ const { className, ...others } = props;
8
9
  const hasPresentFlags = useFlagsPresent([
9
10
  CommonFlags.FLAG_DICTIONARY_LOADED
10
11
  ]);
11
12
  if (!hasPresentFlags) {
12
13
  return null;
13
14
  }
14
- return /* @__PURE__ */ jsx(DynamicSortProvider, { ...props, ref, children: /* @__PURE__ */ jsx(DynamicSortBase, {}) });
15
+ return /* @__PURE__ */ jsx(DynamicSortProvider, { ...others, ref, children: /* @__PURE__ */ jsx(DynamicSortBase, { className }) });
15
16
  }
16
17
  );
17
18
  export {
@@ -1,5 +1,6 @@
1
+ import { DynamicSortBaseProps } from './types';
1
2
  /**
2
3
  * DynamicSortBase es un componente base que contiene los subcomponentes InputSort, AppliedSorts, SortActions y PopoverSort.
3
4
  */
4
- declare function DynamicSortBase(): import("react/jsx-runtime").JSX.Element;
5
+ declare function DynamicSortBase(props: DynamicSortBaseProps): import("react/jsx-runtime").JSX.Element;
5
6
  export default DynamicSortBase;
@@ -3,19 +3,21 @@ import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
3
3
  import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoot.js";
4
4
  import { D as DYNAMIC_SORT_KEY_COMPONENT } from "../../constants.js";
5
5
  import { u as useDynamicSortBase } from "./useDynamicSortBase.js";
6
+ import clsx from "clsx";
6
7
  import { R as RootStyled, I as InnerContainerStyled } from "../../slots/DynamicSortSlots.js";
7
8
  import { I as InputSort } from "../InputSort/InputSort.js";
8
9
  import { A as AppliedSorts } from "../AppliedSorts/AppliedSorts.js";
9
10
  import { S as SortActions } from "../SortActions/SortActions.js";
10
11
  import { P as PopoverSort } from "../PopoverSort/PopoverSort.js";
11
12
  import { D as DynamicSortSlots } from "../../slots/SlotsEnum.js";
12
- function DynamicSortBase() {
13
+ function DynamicSortBase(props) {
14
+ const { className } = props;
13
15
  const { ownerState, dataTestId } = useDynamicSortBase();
14
16
  const classRoot = getComponentSlotRoot(DYNAMIC_SORT_KEY_COMPONENT);
15
17
  return /* @__PURE__ */ jsx(
16
18
  RootStyled,
17
19
  {
18
- className: classRoot,
20
+ className: clsx(classRoot, className),
19
21
  ownerState: { ...ownerState },
20
22
  ...getPropDataTestId(DYNAMIC_SORT_KEY_COMPONENT, DynamicSortSlots.root, dataTestId),
21
23
  children: /* @__PURE__ */ jsxs(
@@ -0,0 +1,3 @@
1
+ export interface DynamicSortBaseProps {
2
+ className?: string;
3
+ }
@@ -51,7 +51,7 @@ function PopoverSort() {
51
51
  title: labelField,
52
52
  iconUrl: field.urlIcon,
53
53
  variant: "text",
54
- type: "popup",
54
+ emergeType: "popup",
55
55
  selected: true,
56
56
  draggable: false,
57
57
  children: [
@@ -106,6 +106,10 @@ rawSorts: Array<RawSortFieldApply>) => void;
106
106
  * Propiedades que recibe el componente DynamicSort
107
107
  */
108
108
  export interface DynamicSortProps {
109
+ /**
110
+ * "className" clase css para el componente
111
+ */
112
+ className?: string;
109
113
  /**
110
114
  * "storeId" identificador del store
111
115
  */
@@ -14,6 +14,8 @@ function Image(props) {
14
14
  dataTestId,
15
15
  className,
16
16
  cover,
17
+ width,
18
+ height,
17
19
  ...others
18
20
  } = props;
19
21
  const isSkeleton = useModuleSkeleton();
@@ -31,6 +33,7 @@ function Image(props) {
31
33
  ImgStyled,
32
34
  {
33
35
  ownerState: { ...ownerState },
36
+ style: { width, height },
34
37
  ...getPropDataTestId(IMAGE_KEY_COMPONENT, ImageSlots.root, dataTestId),
35
38
  ...others,
36
39
  className: clsx(IMAGE_CLASSES.root, className)
@@ -38,7 +41,7 @@ function Image(props) {
38
41
  ) })
39
42
  }
40
43
  );
41
- }, [dataTestId, enableIntersectionObserver, others, ownerState, threshold, className]);
44
+ }, [enableIntersectionObserver, threshold, ownerState, width, height, dataTestId, others, className]);
42
45
  return lazyLoadComponent;
43
46
  }
44
47
  export {
@@ -30,7 +30,7 @@ function getDivScritId(prefix, moduleId) {
30
30
  };
31
31
  }
32
32
  function MFLoader(props) {
33
- const { prefix, moduleId, cache = true, debugPort, dynamicMFStore, windowTools } = props;
33
+ const { prefix, moduleId, cache = true, debugPort, dynamicMFStore, windowTools, emergeType, loggedUser } = props;
34
34
  const { hostThemeOptions, fnComponentsOverrides } = useHostTheme();
35
35
  const { networkOperation } = useNetwork();
36
36
  const environment = useEnvironment();
@@ -64,6 +64,10 @@ function MFLoader(props) {
64
64
  }
65
65
  const renderMicroFrontend = useCallback(
66
66
  (newDScript) => {
67
+ const options = {
68
+ loggedUser,
69
+ emergeType
70
+ };
67
71
  try {
68
72
  window[`render_${prefix}_${newDScript.moduleId}`](
69
73
  newDScript.divContainerId,
@@ -74,13 +78,14 @@ function MFLoader(props) {
74
78
  axiosOperation,
75
79
  formatter,
76
80
  dynamicMFStore,
77
- windowTools
81
+ windowTools,
82
+ options
78
83
  );
79
84
  } catch (_e) {
80
85
  }
81
86
  },
82
87
  // eslint-disable-next-line react-hooks/exhaustive-deps
83
- [hostThemeOptions, currentLocale, formatter]
88
+ [hostThemeOptions, currentLocale, formatter, loggedUser]
84
89
  );
85
90
  const debouncedSetDivScript = useCallback(
86
91
  debounce(
@@ -2,10 +2,10 @@ import { styled } from "@mui/material";
2
2
  const MFLoaderRoot = styled("div")(() => ({
3
3
  width: "100%",
4
4
  height: "100%",
5
+ position: "relative",
5
6
  display: "flex",
6
7
  flexDirection: "column",
7
8
  alignItems: "center",
8
- overflow: "auto",
9
9
  "& .M4LMFLoader-containerLinearProgress": {
10
10
  width: "100%",
11
11
  height: "100%",
@@ -1,5 +1,7 @@
1
1
  import { DynamicMFStore } from '../WindowBase/contexts/DynamicMFParmsContext/store';
2
2
  import { WindowToolsMF } from '../WindowBase/contexts';
3
+ import { EmergeType } from '../areas/types';
4
+ import { AuthUserType } from '@m4l/core';
3
5
  /**
4
6
  * Propiedades base de un microfrontend.
5
7
  */
@@ -33,4 +35,12 @@ export interface MFLoaderProps extends MFBaseProps {
33
35
  * Herramientas de ventana para el microfrontend.
34
36
  */
35
37
  windowTools: WindowToolsMF;
38
+ /**
39
+ * Tipo de lanzamiento de la ventana, popup, layout, modal
40
+ */
41
+ emergeType?: EmergeType;
42
+ /**
43
+ * loggedUser: usuario logueado, para los microfrontends que necesitan el usuario logueado
44
+ */
45
+ loggedUser?: AuthUserType;
36
46
  }
@@ -33,7 +33,7 @@ const useDetailFormatter = (type) => {
33
33
  title: getLabel(`${DICTIONARY.LABEL_LOG_DETAIL}`),
34
34
  onClose: closeModal,
35
35
  variant: "outlined",
36
- type: "modal",
36
+ emergeType: "modal",
37
37
  children: /* @__PURE__ */ jsx(StackStyled, { direction: "column", flexGrow: 1, children: /* @__PURE__ */ jsx(DetailDialogComponent, { logId, type }) })
38
38
  }
39
39
  ),
@@ -25,7 +25,7 @@ const WindowBase = (props) => {
25
25
  windowId,
26
26
  onMouseDown,
27
27
  editionInfo,
28
- type = "layout",
28
+ emergeType = "layout",
29
29
  collapsed,
30
30
  draggable = true,
31
31
  ...other
@@ -36,7 +36,7 @@ const WindowBase = (props) => {
36
36
  selected,
37
37
  variant: computedVariant,
38
38
  size: currentSize,
39
- type,
39
+ emergeType,
40
40
  maximized,
41
41
  collapsed,
42
42
  draggable
@@ -61,7 +61,7 @@ const WindowBase = (props) => {
61
61
  maximized,
62
62
  collapsed,
63
63
  onClose,
64
- type,
64
+ emergeType,
65
65
  draggable,
66
66
  ...other
67
67
  }
@@ -16,7 +16,7 @@ const windowBaseStyles = {
16
16
  overflow: "hidden",
17
17
  ...ownerState?.variant === "outlined" && {
18
18
  ...ownerState?.selected ? {
19
- ...ownerState?.type === "layout" ? {
19
+ ...ownerState?.emergeType === "layout" ? {
20
20
  background: `linear-gradient(to bottom,
21
21
  ${theme.vars.palette.primary.opacityGradient1},
22
22
  ${theme.vars.palette.primary.opacityGradient2})`,
@@ -31,26 +31,26 @@ const windowBaseStyles = {
31
31
  boxShadow: `inset 0px 0px 0 1px ${theme.vars.palette?.border.main}`
32
32
  }
33
33
  } : {
34
- boxShadow: ownerState?.type === "layout" ? `inset 0px 0px 0 1px ${theme.vars.palette?.border.secondary}` : "unset"
34
+ boxShadow: ownerState?.emergeType === "layout" ? `inset 0px 0px 0 1px ${theme.vars.palette?.border.secondary}` : "unset"
35
35
  }
36
36
  },
37
- ...ownerState?.type === "popup" && {
37
+ ...ownerState?.emergeType === "popup" && {
38
38
  "&&&": {
39
39
  boxShadow: theme.vars.customShadows.z1,
40
40
  border: `1px solid ${theme.vars.palette?.border.secondary}`,
41
- borderRadius: theme.vars.size.borderRadius.r1,
41
+ borderRadius: theme.vars.size.borderRadius.r3,
42
42
  ...ownerState?.selected && {
43
43
  boxShadow: theme.vars.customShadows.z4,
44
- border: `1px solid ${theme.vars.palette?.border.main}`
44
+ border: `1px solid ${theme.vars.palette?.primary.activeOpacity}`
45
45
  }
46
46
  }
47
47
  },
48
- ...ownerState?.type === "layout" && {
48
+ ...ownerState?.emergeType === "layout" && {
49
49
  ...ownerState?.selected && !ownerState?.maximized ? {
50
50
  boxShadow: theme.vars.customShadows.primary
51
51
  } : {}
52
52
  },
53
- ...ownerState?.type === "modal" && {
53
+ ...ownerState?.emergeType === "modal" && {
54
54
  boxShadow: `${theme.vars.customShadows.z3}!important`
55
55
  }
56
56
  }
@@ -59,8 +59,8 @@ const windowBaseStyles = {
59
59
  /**
60
60
  * Styles for the content of the window base component.
61
61
  */
62
- contentWindowBase: ({ theme, ownerState }) => ({
63
- padding: ownerState?.type === "layout" ? theme.vars.size.baseSpacings.sp5 : theme.vars.size.baseSpacings.sp4,
62
+ contentWindowBase: ({ ownerState, theme }) => ({
63
+ padding: ownerState?.emergeType === "layout" ? theme.vars.size.baseSpacings.sp5 : theme.vars.size.baseSpacings.sp4,
64
64
  overflow: "auto",
65
65
  width: "100%",
66
66
  height: "100%",
@@ -69,6 +69,17 @@ const windowBaseStyles = {
69
69
  display: "none"
70
70
  }
71
71
  }),
72
+ /**
73
+ * Window component content Styles by emergeType
74
+ */
75
+ windowContainerComponent: () => ({
76
+ //Mover el estilado para adentro
77
+ position: "relative",
78
+ display: "flex",
79
+ width: "100%",
80
+ height: "100%",
81
+ overflow: "visible"
82
+ }),
72
83
  /**
73
84
  * Styles for the header of the window base component.
74
85
  */
@@ -76,14 +87,19 @@ const windowBaseStyles = {
76
87
  return {
77
88
  width: "100%",
78
89
  display: "flex",
79
- padding: ownerState?.type === "popup" || ownerState?.type === "modal" ? theme.vars.size.baseSpacings["sp0-5"] : theme.vars.size.baseSpacings.sp1,
90
+ padding: theme.vars.size.baseSpacings.sp1,
91
+ borderBottom: "1px solid #ffffff00",
92
+ ...(ownerState?.emergeType === "popup" || ownerState?.emergeType === "modal") && {
93
+ padding: `${theme.vars.size.baseSpacings["sp2-5"]} ${theme.vars.size.baseSpacings.sp2} 0 ${theme.vars.size.baseSpacings.sp2}`,
94
+ borderBottom: `unset`
95
+ },
80
96
  alignItems: "center",
81
97
  justifyContent: "space-between",
82
98
  flexShrink: 0,
83
99
  alignSelf: "stretch",
84
100
  cursor: ownerState?.draggable ? "all-scroll" : "default",
85
101
  position: "relative",
86
- ...ownerState?.type === "layout" || ownerState?.type === "modal" ? getSizeStyles(
102
+ ...ownerState?.emergeType === "layout" || ownerState?.emergeType === "modal" ? getSizeStyles(
87
103
  theme,
88
104
  ownerState?.size,
89
105
  "container",
@@ -101,8 +117,7 @@ const windowBaseStyles = {
101
117
  })
102
118
  )
103
119
  },
104
- borderBottom: "1px solid #ffffff00",
105
- ...ownerState?.selected && ownerState?.type === "layout" && ownerState?.variant === "outlined" && !ownerState?.maximized ? {
120
+ ...ownerState?.selected && ownerState?.emergeType === "layout" && ownerState?.variant === "outlined" && !ownerState?.maximized ? {
106
121
  background: `linear-gradient(to right, ${theme.vars.palette.primary.opacity}, #ffffff00);`,
107
122
  "&::before": {
108
123
  content: '""',
@@ -114,8 +129,7 @@ const windowBaseStyles = {
114
129
  background: `linear-gradient(to left, ${theme.vars.palette.primary.opacityGradient2}, #ffffff00);`
115
130
  }
116
131
  } : {
117
- background: "transparent",
118
- borderBottom: `1px solid ${theme.vars.palette.border.disabled}`
132
+ background: "transparent"
119
133
  }
120
134
  };
121
135
  },
@@ -138,7 +152,7 @@ const windowBaseStyles = {
138
152
  */
139
153
  headerTitleWindowBase: ({ theme, ownerState }) => ({
140
154
  minWidth: "30px",
141
- ...ownerState?.selected && ownerState?.type !== "modal" ? {
155
+ ...ownerState?.selected && ownerState?.emergeType !== "modal" ? {
142
156
  color: `${theme.vars.palette["primary"].semanticText} !important`
143
157
  } : {
144
158
  color: `${theme.vars.palette.text.secondary} !important`
@@ -180,7 +194,7 @@ const windowBaseStyles = {
180
194
  headerSubTitleWindowBase: ({ theme, ownerState }) => ({
181
195
  width: "auto !important",
182
196
  height: "auto !important",
183
- ...ownerState?.selected && ownerState?.type !== "modal" ? {
197
+ ...ownerState?.selected && ownerState?.emergeType !== "modal" ? {
184
198
  color: `${theme.vars.palette["primary"].semanticText} !important`
185
199
  } : {
186
200
  color: `${theme.vars.palette.text.secondary} !important`
@@ -196,7 +210,7 @@ const windowBaseStyles = {
196
210
  */
197
211
  headerIconWindowBase: ({ theme, ownerState }) => ({
198
212
  "& .M4LIcon-icon": {
199
- ...ownerState?.selected && ownerState?.type !== "modal" ? {
213
+ ...ownerState?.selected && ownerState?.emergeType !== "modal" ? {
200
214
  backgroundColor: `${theme.vars.palette["primary"].semanticText} !important`
201
215
  } : {
202
216
  backgroundColor: `${theme.vars.palette.text.secondary} !important`
@@ -228,7 +242,7 @@ const windowBaseStyles = {
228
242
  ),
229
243
  marginLeft: theme.vars.size.baseSpacings.sp1,
230
244
  marginRight: theme.vars.size.baseSpacings.sp1,
231
- marginBottom: ownerState?.type === "layout" ? "auto" : "unset"
245
+ marginBottom: ownerState?.emergeType === "layout" ? "auto" : "unset"
232
246
  },
233
247
  '& .window-actions[class*="M4LIconButton-styledMUIIconButton"]': {
234
248
  ...getSizeStyles(
@@ -242,7 +256,7 @@ const windowBaseStyles = {
242
256
  ),
243
257
  marginLeft: theme.vars.size.baseSpacings.sp1,
244
258
  marginRight: theme.vars.size.baseSpacings.sp1,
245
- marginBottom: ownerState?.type === "layout" ? "auto!important" : "unset!important",
259
+ marginBottom: ownerState?.emergeType === "layout" ? "auto!important" : "unset!important",
246
260
  "&.collapse-toggle": {
247
261
  ...ownerState?.maximized && {
248
262
  display: "none"
@@ -304,7 +318,7 @@ const windowBaseStyles = {
304
318
  */
305
319
  pointIcon: ({ theme, ownerState }) => ({
306
320
  "& .M4LIcon-icon": {
307
- ...ownerState?.selected && ownerState?.type !== "modal" && ownerState?.variant === "outlined" ? {
321
+ ...ownerState?.selected && ownerState?.emergeType !== "modal" && ownerState?.variant === "outlined" ? {
308
322
  backgroundColor: `${theme.vars.palette["primary"].semanticText} !important`
309
323
  } : {
310
324
  backgroundColor: `${theme.vars.palette.text.secondary} !important`
@@ -320,7 +334,7 @@ const windowBaseStyles = {
320
334
  * Styles for the menu actions of the window base component.
321
335
  */
322
336
  menuActionsWindowBase: ({ theme, ownerState }) => ({
323
- ...ownerState?.type === "layout" ? {
337
+ ...ownerState?.emergeType === "layout" ? {
324
338
  ...getSizeStyles(
325
339
  theme,
326
340
  ownerState?.size,
@@ -363,15 +377,6 @@ const windowBaseStyles = {
363
377
  maxWidth: "100%"
364
378
  }
365
379
  }),
366
- /**
367
- * Window component content Styles
368
- */
369
- windowContainerComponent: () => ({
370
- display: "flex",
371
- width: "100%",
372
- height: "100%",
373
- overflow: "auto"
374
- }),
375
380
  /**
376
381
  * Styles for the toast container of the window base component.
377
382
  */
@@ -1,2 +1,2 @@
1
1
  export declare const WINDOW_BASE_KEY_COMPONENT = "M4LWindowBase";
2
- export declare const WINDOW_BASE_CLASSES: Record<string, string>;
2
+ export declare const windowBaseClasses: Record<string, string>;
@@ -1,8 +1,8 @@
1
1
  import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
2
2
  import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
3
3
  const WINDOW_BASE_KEY_COMPONENT = "M4LWindowBase";
4
- const WINDOW_BASE_CLASSES = getComponentClasses(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots);
4
+ const windowBaseClasses = getComponentClasses(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots);
5
5
  export {
6
6
  WINDOW_BASE_KEY_COMPONENT as W,
7
- WINDOW_BASE_CLASSES as a
7
+ windowBaseClasses as w
8
8
  };
@@ -5,3 +5,4 @@ export * from './contexts/WindowToolsMFContext';
5
5
  export * from './contexts/DynamicMFParmsContext';
6
6
  export type { WindowToolsMFContextProps } from './contexts/WindowToolsMFContext/types';
7
7
  export type { ModuleAction, GroupActionMenuItem, ModuleActionGroup } from './types';
8
+ export type { JSX_REACT_NODE } from './types';
@@ -4,8 +4,8 @@ import { a as WindowContainerComponentStyled } from "../../slots/WindowBaseSlots
4
4
  import { a as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/WindowToolsMFContext.js";
5
5
  import { a as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/DynamicMFParmsContext.js";
6
6
  const WindowBaseComponent = (props) => {
7
- const { component, dynamicMFStore, windowTools, componentProps } = props;
8
- return /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(WindowContainerComponentStyled, { ownerState: {}, children: typeof component === "function" ? component(componentProps) : component }) }) });
7
+ const { component, dynamicMFStore, windowTools, componentProps, emergeType } = props;
8
+ return /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(WindowContainerComponentStyled, { ownerState: { emergeType }, children: typeof component === "function" ? component(componentProps) : component }) }) });
9
9
  };
10
10
  React.memo(WindowBaseComponent);
11
11
  export {
@@ -1,7 +1,9 @@
1
1
  import { WindowToolsMF } from '../../contexts';
2
2
  import { DynamicMFStore } from '../../contexts/DynamicMFParmsContext/store';
3
3
  import { JSX_REACT_NODE } from '../../../WindowBase/types';
4
+ import { EmergeType } from '../../../areas/types';
4
5
  export interface ComponentProps {
6
+ emergeType: EmergeType;
5
7
  windowTools: WindowToolsMF;
6
8
  dynamicMFStore: DynamicMFStore;
7
9
  component: JSX_REACT_NODE;
@@ -8,7 +8,7 @@ import { deepEqual } from "fast-equals";
8
8
  import { useFormatter } from "@m4l/graphics";
9
9
  import { u as useButtonActions } from "./useButtonActions.js";
10
10
  import { H as HeaderWindowComponentStyled, c as HeaderContentStyled, I as IconWindowStyled, d as ContainerTitleSubtitleStyled, e as TitleWindowStyled, P as PointIconStyled, S as SubtitleWindowStyled, f as IconsWrapperStyled, g as ContainerLeftActionsStyled, M as MenuActionsWindowsStyled } from "../../slots/WindowBaseSlots.js";
11
- import { a as WINDOW_BASE_CLASSES } from "../../constants.js";
11
+ import { w as windowBaseClasses } from "../../constants.js";
12
12
  import clsx from "clsx";
13
13
  const HeaderWindowBase = (props) => {
14
14
  const {
@@ -24,7 +24,7 @@ const HeaderWindowBase = (props) => {
24
24
  variant,
25
25
  actions = [],
26
26
  collapsed,
27
- type,
27
+ emergeType,
28
28
  draggable
29
29
  } = props;
30
30
  const { host_static_assets, environment_assets } = useEnvironment();
@@ -103,17 +103,17 @@ const HeaderWindowBase = (props) => {
103
103
  maximized,
104
104
  variant,
105
105
  size,
106
- type,
106
+ emergeType,
107
107
  collapsed,
108
108
  draggable
109
109
  };
110
110
  const IconButtonLeftActions = useButtonActions(leftActions);
111
111
  const IconButtonRightActions = useButtonActions(rightActions);
112
- return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: clsx(draggable && dragResizeWindowRNDClasses.draggableHandle, WINDOW_BASE_CLASSES.headerWindowComponent), ownerState, children: [
113
- /* @__PURE__ */ jsxs(HeaderContentStyled, { ownerState, children: [
112
+ return /* @__PURE__ */ jsxs(HeaderWindowComponentStyled, { className: clsx(draggable && dragResizeWindowRNDClasses.draggableHandle, windowBaseClasses.headerWindowComponent), ownerState, children: [
113
+ /* @__PURE__ */ jsxs(HeaderContentStyled, { ownerState, className: windowBaseClasses.headerContentWindowBase, children: [
114
114
  iconUrl && /* @__PURE__ */ jsx(IconWindowStyled, { size, ownerState, src: iconUrl, "aria-label": "main icon" }),
115
115
  /* @__PURE__ */ jsxs(ContainerTitleSubtitleStyled, { size, ownerState, children: [
116
- /* @__PURE__ */ jsx(TitleWindowStyled, { variant: type === "popup" || type === "modal" ? "body" : "captionDens", size, skeletonWidth: 100, ownerState, children: title }),
116
+ /* @__PURE__ */ jsx(TitleWindowStyled, { variant: emergeType === "popup" || emergeType === "modal" ? "body" : "captionDens", size, skeletonWidth: 100, ownerState, children: title }),
117
117
  subTitle && /* @__PURE__ */ jsx(
118
118
  PointIconStyled,
119
119
  {
@@ -122,7 +122,7 @@ const HeaderWindowBase = (props) => {
122
122
  ownerState
123
123
  }
124
124
  ),
125
- subTitle && /* @__PURE__ */ jsx(SubtitleWindowStyled, { variant: type === "popup" || type === "modal" ? "body" : "captionDens", size, skeletonWidth: 100, ownerState, children: subTitle })
125
+ subTitle && /* @__PURE__ */ jsx(SubtitleWindowStyled, { variant: emergeType === "popup" || emergeType === "modal" ? "body" : "captionDens", size, skeletonWidth: 100, ownerState, children: subTitle })
126
126
  ] })
127
127
  ] }),
128
128
  /* @__PURE__ */ jsxs(
@@ -32,7 +32,7 @@ import { WindowBaseAction, WindowBaseProps } from '../../types';
32
32
  * - `selected` modifies the visual appearance to indicate the selected state.
33
33
  * @see WindowBaseProps - General properties for the window base.
34
34
  */
35
- export type HeaderProps = Pick<WindowBaseProps, 'title' | 'subTitle' | 'iconUrl' | 'onClose' | 'version' | 'selected' | 'variant' | 'type' | 'buildTime' | 'maximized' | 'draggable'> & {
35
+ export type HeaderProps = Pick<WindowBaseProps, 'title' | 'subTitle' | 'iconUrl' | 'onClose' | 'version' | 'selected' | 'variant' | 'emergeType' | 'buildTime' | 'maximized' | 'draggable'> & {
36
36
  actions?: WindowBaseAction[];
37
37
  };
38
38
  /**
@@ -1,3 +1,5 @@
1
+ import { AuthUserType } from '@m4l/core';
2
+ import { EmergeType } from '../../../areas/types';
1
3
  import { MFBaseProps } from '../../../MFLoader/types';
2
4
  import { WindowToolsMF } from '../../contexts';
3
5
  import { DynamicMFStore } from '../../contexts/DynamicMFParmsContext/store';
@@ -5,4 +7,6 @@ export interface MicroFrontendProps extends MFBaseProps {
5
7
  moduleId: string;
6
8
  windowTools: WindowToolsMF;
7
9
  dynamicMFStore: DynamicMFStore;
10
+ emergeType: EmergeType;
11
+ loggedUser: AuthUserType;
8
12
  }
@@ -189,7 +189,7 @@ export interface WindowBaseProps {
189
189
  * - `'window'`: A window.
190
190
  * Default is `'window'` if not specified.
191
191
  */
192
- type?: EmergeType;
192
+ emergeType?: EmergeType;
193
193
  /**
194
194
  * Indicates if the window is draggable.
195
195
  */
@@ -210,13 +210,13 @@ export type WindowBaseType = keyof typeof WindowBaseSlots;
210
210
  * windowBaseVariant (optional) - Visual variant of the component (`'outlined'` or `'text'`).
211
211
  * windowBaseSize (optional) - Size of the component (`'small'` or `'medium'`).
212
212
  */
213
- export type WindowBaseOwnerState = Pick<WindowBaseProps, 'size'> & {
213
+ export type WindowBaseOwnerState = {
214
214
  selected?: WindowBaseProps['selected'];
215
215
  collapsed?: WindowBaseProps['collapsed'];
216
216
  maximized?: WindowBaseProps['maximized'];
217
217
  variant?: WindowBaseProps['variant'];
218
218
  size?: WindowBaseProps['size'];
219
- type?: WindowBaseProps['type'];
219
+ emergeType?: WindowBaseProps['emergeType'];
220
220
  draggable?: WindowBaseProps['draggable'];
221
221
  };
222
222
  /**
@@ -56,7 +56,7 @@ const WindowConfirm = (props) => {
56
56
  info: `${host_static_assets}/${environment_assets}/frontend/components/window_confirm/assets/icons/Info.svg`
57
57
  };
58
58
  const iconUrl = iconMap[variant] || iconMap.warning;
59
- return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsx(WindowBase, { iconUrl, variant: "outlined", title: getLabel("modal_dialog.label_window_confirm"), onClose: () => closeModal(), type: "modal", children: /* @__PURE__ */ jsx(
59
+ return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsx(WindowBase, { iconUrl, variant: "outlined", title: getLabel("modal_dialog.label_window_confirm"), onClose: () => closeModal(), emergeType: "modal", children: /* @__PURE__ */ jsx(
60
60
  WindowConfirmRootStyled,
61
61
  {
62
62
  className: clsx(getComponentSlotRoot(WINDOW_CONFIRM_KEY_COMPONENT)),
@@ -33,7 +33,7 @@ const areasViewerStyles = {
33
33
  flexDirection: "row",
34
34
  inset: 0,
35
35
  overflow: "hidden",
36
- justifyContent: "top",
36
+ justifyContent: "flex-start",
37
37
  alignItems: "flex-start",
38
38
  visibility: "hidden",
39
39
  ...ownerState?.selected && {