@m4l/components 9.3.19-BE101025-beta.2 → 9.3.19-BE171025-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/@types/types.d.ts +1 -1
  2. package/components/AccountPopover/AccountPopover.js +12 -13
  3. package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.d.ts +1 -1
  4. package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +7 -4
  5. package/components/AccountPopover/subcomponents/MenuPopover/types.d.ts +1 -1
  6. package/components/Chip/Chip.js +9 -7
  7. package/components/Chip/ChipStyles.js +4 -31
  8. package/components/Chip/helpers.d.ts +10 -0
  9. package/components/Chip/helpers.js +34 -0
  10. package/components/Chip/types.d.ts +6 -0
  11. package/components/DataGrid/subcomponents/HeaderActions/subcomponents/hooks/useModalSettings/index.js +1 -1
  12. package/components/DragResizeWindowRND/DragResizeWindowRND.js +14 -10
  13. package/components/DragResizeWindowRND/helpers/expandingParentContainer.d.ts +1 -1
  14. package/components/DragResizeWindowRND/helpers/expandingParentContainer.js +24 -19
  15. package/components/DragResizeWindowRND/helpers/getInitialSize.d.ts +3 -3
  16. package/components/DragResizeWindowRND/helpers/getInitialSize.js +18 -15
  17. package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.d.ts +1 -1
  18. package/components/DragResizeWindowRND/helpers/shrinkingParentContainer.js +17 -9
  19. package/components/DragResizeWindowRND/hooks/useRNDDimensionEffects.js +4 -1
  20. package/components/DragResizeWindowRND/index.d.ts +1 -0
  21. package/components/DragResizeWindowRND/types.d.ts +12 -2
  22. package/components/DynamicFilter/DynamicFilter.js +2 -1
  23. package/components/DynamicFilter/helpers/frontEndHelpers.d.ts +2 -2
  24. package/components/DynamicFilter/helpers/frontEndHelpers.js +31 -9
  25. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts +2 -1
  26. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +4 -2
  27. package/components/DynamicFilter/subcomponents/DynamicFilterBase/types.d.ts +3 -0
  28. package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +1 -1
  29. package/components/DynamicFilter/types.d.ts +4 -0
  30. package/components/DynamicSort/DynamicSort.js +2 -1
  31. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.d.ts +2 -1
  32. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +4 -2
  33. package/components/DynamicSort/subcomponents/DynamicSortBase/types.d.ts +3 -0
  34. package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.js +1 -1
  35. package/components/DynamicSort/types.d.ts +4 -0
  36. package/components/GridLayout/subcomponents/GridItem/index.js +2 -2
  37. package/components/Image/Image.js +4 -1
  38. package/components/MFLoader/MFLoader.js +8 -3
  39. package/components/MFLoader/styles.js +1 -1
  40. package/components/MFLoader/types.d.ts +10 -0
  41. package/components/ObjectLogs/hooks/useDetailFormatter.js +1 -1
  42. package/components/WindowBase/WindowBase.js +3 -3
  43. package/components/WindowBase/WindowBase.styles.js +36 -31
  44. package/components/WindowBase/constants.d.ts +1 -1
  45. package/components/WindowBase/constants.js +2 -2
  46. package/components/WindowBase/index.d.ts +1 -0
  47. package/components/WindowBase/subcomponents/Component/index.js +2 -2
  48. package/components/WindowBase/subcomponents/Component/types.d.ts +2 -0
  49. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +7 -7
  50. package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
  51. package/components/WindowBase/subcomponents/MicroFrontend/types.d.ts +4 -0
  52. package/components/WindowBase/types.d.ts +3 -3
  53. package/components/WindowConfirm/WindowConfirm.js +1 -1
  54. package/components/areas/components/AreasViewer/AreasViewer.styles.js +1 -1
  55. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +6 -2
  56. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +1 -0
  57. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +21 -3
  58. package/components/areas/index.d.ts +1 -1
  59. package/components/areas/types.d.ts +1 -1
  60. package/components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js +3 -34
  61. package/components/formatters/DistanceToNowFormatter/dictionary.d.ts +8 -0
  62. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.d.ts +13 -0
  63. package/components/formatters/DistanceToNowFormatter/hooks/useDistanceToNowFormatter.js +65 -0
  64. package/components/formatters/DistanceToNowFormatter/index.d.ts +1 -0
  65. package/components/formatters/DistanceToNowFormatter/types.d.ts +4 -1
  66. package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +5 -1
  67. package/components/hook-form/RHFAutocomplete/constants.d.ts +1 -0
  68. package/components/hook-form/RHFAutocomplete/constants.js +5 -1
  69. package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +3 -1
  70. package/components/hook-form/RHFAutocompleteAsync/types.d.ts +4 -0
  71. package/components/mui_extended/Button/ButtonStyles.js +15 -5
  72. package/components/mui_extended/ToggleIconButton/ToggleIconButton.js +6 -2
  73. package/components/mui_extended/ToggleIconButton/ToggleIconButton.styles.js +9 -0
  74. package/components/mui_extended/ToggleIconButton/types.d.ts +1 -0
  75. package/components/mui_extended/index.d.ts +1 -1
  76. package/components/popups/components/PopupsProvider/hooks/usePopups.d.ts +2 -2
  77. package/components/popups/components/PopupsProvider/hooks/usePopups.js +0 -1
  78. package/components/popups/components/PopupsViewer/PopupsViewer.js +4 -3
  79. package/components/popups/components/PopupsViewer/subcomponents/Popup/Popup.js +5 -2
  80. package/components/popups/components/PopupsViewer/subcomponents/Popup/types.d.ts +5 -0
  81. package/components/popups/components/PopupsViewer/types.d.ts +3 -0
  82. package/hooks/index.d.ts +1 -0
  83. package/hooks/useSizeContainer/index.d.ts +2 -1
  84. package/hooks/useSizeContainer/index.js +22 -13
  85. package/hooks/useSizeContainer/types.d.ts +6 -0
  86. package/hooks/useStateRef/index.d.ts +1 -1
  87. package/hooks/useStateRef/index.js +6 -6
  88. package/index.js +45 -38
  89. package/package.json +3 -4
  90. package/utils/deepShallow.d.ts +17 -0
  91. package/utils/deepShallow.js +76 -0
  92. package/utils/formatDistanceToNow/formatDistanteToNow.d.ts +2 -2
  93. package/utils/formatDistanceToNow/formatDistanteToNow.js +18 -2
  94. package/utils/formatDistanceToNow/types.d.ts +13 -0
  95. package/utils/index.d.ts +1 -0
@@ -1,10 +1,10 @@
1
- import { RawFilterFieldApply } from '../types';
1
+ import { FilterField, RawFilterFieldApply } from '../types';
2
2
  type ObjectData = Record<any, any>;
3
3
  /**
4
4
  * Función que verifica si el objectData cumple con todos los filtros de DynamicFilter
5
5
  * Para usar en el frontEnd, y no atraves de la API
6
6
  */
7
- export declare const getIsIfInDynamicFilter: (objectData: ObjectData, groupedFields: Record<string, RawFilterFieldApply[]>) => boolean;
7
+ export declare const getIsIfInDynamicFilter: (filterFields: Array<FilterField>, objectData: ObjectData, groupedFields: Record<string, RawFilterFieldApply[]>) => boolean;
8
8
  /**
9
9
  * getFilterGroupFieldsByName agrupa los campos por nombre, para procesarlos en una OR
10
10
  */
@@ -16,7 +16,7 @@ const isInBooleanFilter = (objectData, field) => {
16
16
  }
17
17
  return true;
18
18
  };
19
- const isInStringFilter = (objectData, field) => {
19
+ const isInStringFilter = (objectData, field, defaultUndefinedValue = true) => {
20
20
  const objectDataValue = getPropertyByString(objectData, field.n, void 0);
21
21
  if (typeof field.o1 !== "string") {
22
22
  return true;
@@ -31,19 +31,19 @@ const isInStringFilter = (objectData, field) => {
31
31
  return true;
32
32
  }
33
33
  } else if (field.o === "c") {
34
- if (objectDataValue.includes(field.o1)) {
34
+ if (objectDataValue.toLocaleLowerCase().includes(field.o1.toLocaleLowerCase())) {
35
35
  return true;
36
36
  }
37
37
  } else if (field.o === "nc") {
38
- if (!objectDataValue.includes(field.o1)) {
38
+ if (!objectDataValue.toLocaleLowerCase().includes(field.o1.toLocaleLowerCase())) {
39
39
  return true;
40
40
  }
41
41
  }
42
42
  return false;
43
43
  }
44
- return true;
44
+ return defaultUndefinedValue;
45
45
  };
46
- const isInNumberFilter = (objectData, field) => {
46
+ const isInNumberFilter = (objectData, field, defaultUndefinedValue = true) => {
47
47
  const objectDataValue = getPropertyByString(objectData, field.n, void 0);
48
48
  if (typeof field.o1 !== "number") {
49
49
  return true;
@@ -83,7 +83,7 @@ const isInNumberFilter = (objectData, field) => {
83
83
  }
84
84
  return false;
85
85
  }
86
- return true;
86
+ return defaultUndefinedValue;
87
87
  };
88
88
  const isInDateTimeFilter = (objectData, field) => {
89
89
  const objectDataValueString = getPropertyByString(objectData, field.n, void 0);
@@ -169,13 +169,34 @@ const isInSelectFilter = (objectData, field) => {
169
169
  }
170
170
  return false;
171
171
  };
172
- const getIsIfInDynamicFilter = (objectData, groupedFields) => {
172
+ const getIsIfInDynamicFilter = (filterFields, objectData, groupedFields) => {
173
173
  let InAllFilters = true;
174
174
  for (const fieldName of Object.keys(groupedFields)) {
175
175
  const fieldGroup = groupedFields[fieldName];
176
176
  let inFilter = false;
177
177
  fieldGroup.forEach((field) => {
178
- if (field.ft === "boolean") {
178
+ if (field.n === "all") {
179
+ filterFields.forEach((filterField) => {
180
+ const isNumber = !isNaN(Number(field.o1));
181
+ const artificialField = {
182
+ n: filterField.name,
183
+ o: "c",
184
+ o1: field.o1,
185
+ ft: filterField.type
186
+ };
187
+ if (filterField.type === "string") {
188
+ const isInString = isInStringFilter(objectData, artificialField, false);
189
+ inFilter = inFilter || isInString;
190
+ }
191
+ if (isNumber && filterField.type === "number") {
192
+ inFilter = inFilter || isInNumberFilter(objectData, {
193
+ ...artificialField,
194
+ o: "e",
195
+ o1: Number(field.o1)
196
+ }, false);
197
+ }
198
+ });
199
+ } else if (field.ft === "boolean") {
179
200
  inFilter = inFilter || isInBooleanFilter(objectData, field);
180
201
  } else if (field.ft === "string") {
181
202
  inFilter = inFilter || isInStringFilter(objectData, field);
@@ -199,13 +220,14 @@ const getIsIfInDynamicFilter = (objectData, groupedFields) => {
199
220
  return InAllFilters;
200
221
  };
201
222
  function getFilterGroupFieldsByName(fields) {
202
- return fields.reduce((acc, field) => {
223
+ const result = fields.reduce((acc, field) => {
203
224
  if (!acc[field.n]) {
204
225
  acc[field.n] = [];
205
226
  }
206
227
  acc[field.n].push(field);
207
228
  return acc;
208
229
  }, {});
230
+ return result;
209
231
  }
210
232
  export {
211
233
  getFilterGroupFieldsByName as a,
@@ -1,5 +1,6 @@
1
+ import { DynamicFilterBaseProps } from './types';
1
2
  /**
2
3
  * DynamicFilterBase: Componente base del DynamicFilter.
3
4
  */
4
- declare function DynamicFilterBase(): import("react/jsx-runtime").JSX.Element;
5
+ declare function DynamicFilterBase(props: DynamicFilterBaseProps): import("react/jsx-runtime").JSX.Element;
5
6
  export default DynamicFilterBase;
@@ -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
  */
@@ -253,8 +253,8 @@ function GridItem(props) {
253
253
  }
254
254
  let { w: newW, h: newH } = calcWH(
255
255
  getPositionParams(),
256
- size.width / transformScale,
257
- size.height / transformScale,
256
+ size.width,
257
+ size.height,
258
258
  refProps.current.x,
259
259
  refProps.current.y
260
260
  );
@@ -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<"wrapperWindowBase" | "contentWindowBase" | "headerContentWindowBase" | "headerTitleWindowBase" | "headerSubTitleWindowBase" | "pointIcon" | "containerTitleSubtitle" | "headerIconWindowBase" | "menuActionsWindowBase" | "iconsWrapperWindowBase" | "headerWindowComponent" | "linearProgressIndeterminate" | "contentEditionInfo" | "windowContainerComponent" | "toastContainer" | "containerLeftActions", string>;
2
+ export declare const windowBaseClasses: Record<"wrapperWindowBase" | "contentWindowBase" | "headerContentWindowBase" | "headerTitleWindowBase" | "headerSubTitleWindowBase" | "pointIcon" | "containerTitleSubtitle" | "headerIconWindowBase" | "menuActionsWindowBase" | "iconsWrapperWindowBase" | "headerWindowComponent" | "linearProgressIndeterminate" | "contentEditionInfo" | "windowContainerComponent" | "toastContainer" | "containerLeftActions", 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;