@m4l/components 9.17.1-beta-feature-731-m4l-components-code-editor.0 → 9.18.0

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 (170) hide show
  1. package/@types/types.d.ts +0 -11
  2. package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts +2 -1
  3. package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts.map +1 -1
  4. package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +30 -41
  5. package/components/CommonActions/components/ActionFormCancel/types.d.ts +2 -2
  6. package/components/CommonActions/index.d.ts +1 -0
  7. package/components/CommonActions/index.d.ts.map +1 -1
  8. package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +3 -14
  9. package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
  10. package/components/DragResizeWindowRND/DragResizeWindowRND.js +105 -119
  11. package/components/DragResizeWindowRND/helpers/index.d.ts +1 -0
  12. package/components/DragResizeWindowRND/helpers/index.d.ts.map +1 -1
  13. package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts +15 -0
  14. package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts.map +1 -0
  15. package/components/DragResizeWindowRND/helpers/resizeHandles.js +68 -0
  16. package/components/DragResizeWindowRND/types.d.ts +3 -1
  17. package/components/DragResizeWindowRND/types.d.ts.map +1 -1
  18. package/components/WindowBase/WindowBase.d.ts.map +1 -1
  19. package/components/WindowBase/WindowBase.js +49 -49
  20. package/components/WindowBase/WindowBase.styles.d.ts +1 -1
  21. package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
  22. package/components/WindowBase/WindowBase.styles.js +37 -12
  23. package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +19 -34
  24. package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts.map +1 -1
  25. package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +18 -18
  26. package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +2 -5
  27. package/components/areas/components/AreasAdmin/AreasAdmin.d.ts.map +1 -1
  28. package/components/areas/components/AreasAdmin/AreasAdmin.js +24 -24
  29. package/components/areas/components/AreasAdmin/helper.d.ts +1 -4
  30. package/components/areas/components/AreasAdmin/helper.d.ts.map +1 -1
  31. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts +2 -26
  32. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts.map +1 -1
  33. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +72 -71
  34. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.d.ts +1 -1
  35. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +17 -17
  36. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -24
  37. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts.map +1 -1
  38. package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +58 -57
  39. package/components/areas/components/AreasAdmin/types.d.ts +9 -9
  40. package/components/areas/components/AreasViewer/AreasViewer.styles.d.ts.map +1 -1
  41. package/components/areas/components/AreasViewer/AreasViewer.styles.js +174 -6
  42. package/components/areas/components/AreasViewer/constants.d.ts +12 -0
  43. package/components/areas/components/AreasViewer/constants.d.ts.map +1 -1
  44. package/components/areas/components/AreasViewer/constants.js +5 -2
  45. package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +9 -0
  46. package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts.map +1 -1
  47. package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +2 -2
  48. package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +27 -0
  49. package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts.map +1 -1
  50. package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +62 -25
  51. package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts +1 -4
  52. package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts.map +1 -1
  53. package/components/areas/components/AreasViewer/subcomponents/Area/Area.js +4 -4
  54. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts +1 -2
  55. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
  56. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts +1 -1
  57. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts.map +1 -1
  58. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +12 -11
  59. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts +78 -0
  60. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts.map +1 -0
  61. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.js +86 -0
  62. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts +33 -0
  63. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts.map +1 -0
  64. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.js +91 -0
  65. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts +6 -0
  66. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts.map +1 -0
  67. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.js +45 -0
  68. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts +16 -0
  69. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts.map +1 -0
  70. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.js +105 -0
  71. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts +6 -0
  72. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts.map +1 -0
  73. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.js +158 -0
  74. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts +15 -0
  75. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts.map +1 -0
  76. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.js +19 -0
  77. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts +14 -0
  78. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts.map +1 -0
  79. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.js +35 -0
  80. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts +7 -0
  81. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts.map +1 -0
  82. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.js +68 -0
  83. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts +61 -0
  84. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts.map +1 -1
  85. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +3 -6
  86. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts.map +1 -1
  87. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +45 -45
  88. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +1 -3
  89. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts.map +1 -1
  90. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +1 -1
  91. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts.map +1 -1
  92. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +68 -40
  93. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +6 -11
  94. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts.map +1 -1
  95. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +77 -76
  96. package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +3 -5
  97. package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts.map +1 -1
  98. package/components/areas/contexts/AreasContext/helpers/helper.d.ts +20 -15
  99. package/components/areas/contexts/AreasContext/helpers/helper.d.ts.map +1 -1
  100. package/components/areas/contexts/AreasContext/helpers/helper.js +8 -7
  101. package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
  102. package/components/areas/contexts/AreasContext/index.js +51 -48
  103. package/components/areas/contexts/AreasContext/store.d.ts +2 -3
  104. package/components/areas/contexts/AreasContext/store.d.ts.map +1 -1
  105. package/components/areas/contexts/AreasContext/store.js +397 -290
  106. package/components/areas/contexts/AreasContext/types.d.ts +109 -85
  107. package/components/areas/contexts/AreasContext/types.d.ts.map +1 -1
  108. package/components/areas/dictionary.d.ts +3 -0
  109. package/components/areas/dictionary.d.ts.map +1 -1
  110. package/components/areas/dictionary.js +9 -6
  111. package/components/areas/hooks/useAreas/index.d.ts +2 -2
  112. package/components/areas/hooks/useAreas/index.js +4 -4
  113. package/components/areas/types.d.ts +173 -47
  114. package/components/areas/types.d.ts.map +1 -1
  115. package/components/areas/utils/useOnClickOutside/index.d.ts +2 -1
  116. package/components/areas/utils/useOnClickOutside/index.d.ts.map +1 -1
  117. package/components/areas/utils/useOnClickOutside/index.js +15 -0
  118. package/components/extended/index.d.ts +0 -1
  119. package/components/extended/index.d.ts.map +1 -1
  120. package/components/hook-form/index.d.ts +0 -1
  121. package/components/hook-form/index.d.ts.map +1 -1
  122. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +5 -4
  123. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
  124. package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -2
  125. package/hooks/index.d.ts +1 -0
  126. package/hooks/index.d.ts.map +1 -1
  127. package/hooks/useWindowCloseGuard/index.d.ts +18 -0
  128. package/hooks/useWindowCloseGuard/index.d.ts.map +1 -0
  129. package/hooks/useWindowCloseGuard/index.js +56 -0
  130. package/index.js +664 -675
  131. package/package.json +7 -10
  132. package/test/mocks/dictionary-mock.d.ts +2 -0
  133. package/test/mocks/dictionary-mock.d.ts.map +1 -1
  134. package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +0 -6
  135. package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +0 -1
  136. package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +0 -247
  137. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +0 -3
  138. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +0 -1
  139. package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +0 -297
  140. package/components/extended/ReactSimpleCodeEditor/constants.d.ts +0 -82
  141. package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +0 -1
  142. package/components/extended/ReactSimpleCodeEditor/constants.js +0 -149
  143. package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +0 -11
  144. package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +0 -1
  145. package/components/extended/ReactSimpleCodeEditor/dictionary.js +0 -7
  146. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +0 -59
  147. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +0 -1
  148. package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +0 -1063
  149. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +0 -6
  150. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +0 -1
  151. package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +0 -7
  152. package/components/extended/ReactSimpleCodeEditor/index.d.ts +0 -4
  153. package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +0 -1
  154. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +0 -18
  155. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +0 -1
  156. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +0 -4
  157. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +0 -84
  158. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +0 -1
  159. package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +0 -63
  160. package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +0 -3
  161. package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +0 -1
  162. package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts +0 -15
  163. package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts.map +0 -1
  164. package/components/extended/ReactSimpleCodeEditor/types.d.ts +0 -127
  165. package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +0 -1
  166. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +0 -7
  167. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +0 -1
  168. package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +0 -6
  169. package/components/hook-form/RHFCodeEditor/index.d.ts +0 -3
  170. package/components/hook-form/RHFCodeEditor/index.d.ts.map +0 -1
@@ -1,69 +1,70 @@
1
- import { useMemo as k, useEffect as V } from "react";
2
- import { shallow as i } from "zustand/shallow";
3
- import { useAreasStore as n } from "../../../../../../../hooks/useAreas/index.js";
4
- import { useHeaderActions as X } from "./useHeaderActions.js";
5
- import { usePopupsStore as Y } from "../../../../../../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
6
- import { useAuth as Z } from "@m4l/core";
7
- import _ from "../../../../../../../../ToastContainer/helpers/toaster.js";
8
- const se = (o, s) => {
1
+ import { useMemo as k, useEffect as R } from "react";
2
+ import { shallow as r } from "zustand/shallow";
3
+ import { useAreasStore as m } from "../../../../../../../hooks/useAreas/index.js";
4
+ import { useHeaderActions as V } from "./useHeaderActions.js";
5
+ import { usePopupsStore as X } from "../../../../../../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
6
+ import { useAuth as Y } from "@m4l/core";
7
+ import Z from "../../../../../../../../ToastContainer/helpers/toaster.js";
8
+ const se = (t, s) => {
9
9
  const [
10
- c,
10
+ n,
11
11
  b,
12
+ v,
12
13
  E,
13
14
  F,
14
- v,
15
+ d,
15
16
  M,
16
17
  U,
17
18
  L,
18
19
  Q,
20
+ u,
19
21
  x,
20
- m,
22
+ c,
21
23
  z,
22
- u,
23
- H
24
- ] = n((e) => {
25
- const t = e.hashWindows[o], r = s ? e.hashAreas[s]?.currentLayoutId === o : !1;
24
+ H,
25
+ j
26
+ ] = m((e) => {
27
+ const o = e.hashWindows[t], i = s ? e.hashAreas[s]?.currentLayoutId === t : !1;
26
28
  return [
27
- t?.emergeType,
28
- t?.moduleId,
29
- t?.winType,
30
- t?.title,
31
- t?.subTitle,
32
- t?.editionInfo,
33
- t?.iconUrl,
34
- t?.version,
35
- t?.buildTime,
36
- t?.moduleCount,
37
- r,
38
- t?.loading,
39
- t?.status,
40
- t?.dynamicMFStore
29
+ o?.emergeType,
30
+ o?.moduleId,
31
+ o?.winType,
32
+ o?.title,
33
+ o?.subTitle,
34
+ o?.editionInfo,
35
+ o?.iconUrl,
36
+ o?.version,
37
+ o?.buildTime,
38
+ o?.moduleCount,
39
+ i,
40
+ o?.loading,
41
+ o?.status,
42
+ o?.dynamicMFStore,
43
+ o?.winType === "microfrontend" ? o.mfProps : void 0,
44
+ o?.winType === "component" ? o.component : void 0
41
45
  ];
42
- }, i), j = n((e) => e.hashWindows[o]?.mfProps, i), { user: q } = Z(), B = n(
43
- (e) => e.hashWindows[o]?.component,
44
- i
45
- ), { setActions: l, getCookie: p, getCookies: f, setCookie: h, close: g, startProgress: a, stopProgress: A, setFnQueryClose: T, setWindowTitle: y, setWindowSubTitle: D, setWindowEditionInfo: G, loadCookiesFromApi: C } = n((e) => e.windowActions, i), { selectLayout: J } = n((e) => e.areaActions, i), { setSelectedPopupId: K } = Y((e) => e.popupsActions, i), N = () => {
46
- !m && c === "layout" && s && (J(s, o), K(s, void 0));
47
- }, O = k(
46
+ }, r), { user: q } = Y(), { setActions: l, getCookie: p, getCookies: f, setCookie: T, close: g, startProgress: A, stopProgress: h, setFnQueryClose: a, setWindowTitle: y, setWindowSubTitle: B, setWindowEditionInfo: D, loadCookiesFromApi: C } = m((e) => e.windowActions, r), { selectLayout: G } = m((e) => e.areaActions, r), { setSelectedPopupId: J } = X((e) => e.popupsActions, r), K = () => {
47
+ !u && n === "layout" && s && (G(s, t), J(s, void 0));
48
+ }, N = k(
48
49
  () => ({
49
- getWindowId: () => o,
50
+ getWindowId: () => t,
50
51
  /**
51
- * Actualizar las acciones de la ventana
52
+ * Update shell actions from the mounted content.
52
53
  */
53
- setActions: (e, t, r) => {
54
- l(o, e, t, r);
54
+ setActions: (e, o, i) => {
55
+ l(t, e, o, i);
55
56
  },
56
- getCookie: (e) => p(o, e),
57
- getCookies: (e) => f(o, e),
58
- setCookie: (e, t, r) => h(o, e, t, r),
59
- close: (e = !0) => g(o, e),
60
- startProgress: () => a(o),
61
- stopProgress: () => A(o),
62
- setFnQueryClose: (e) => T(o, e),
63
- toast: _(o),
64
- setWindowTitle: (e) => y(o, e),
65
- setWindowSubTitle: (e) => D(o, e),
66
- setWindowEditionInfo: (e) => G(o, e),
57
+ getCookie: (e) => p(t, e),
58
+ getCookies: (e) => f(t, e),
59
+ setCookie: (e, o, i) => T(t, e, o, i),
60
+ close: (e = !0) => g(t, e),
61
+ startProgress: () => A(t),
62
+ stopProgress: () => h(t),
63
+ setFnQueryClose: (e) => a(t, e),
64
+ toast: Z(t),
65
+ setWindowTitle: (e) => y(t, e),
66
+ setWindowSubTitle: (e) => B(t, e),
67
+ setWindowEditionInfo: (e) => D(t, e),
67
68
  hide: () => {
68
69
  throw new Error("hide not implemented");
69
70
  },
@@ -72,36 +73,36 @@ const se = (o, s) => {
72
73
  }
73
74
  }),
74
75
  // eslint-disable-next-line react-hooks/exhaustive-deps
75
- [o, l, p, f, h, g, a, A, T, y]
76
+ [t, l, p, f, T, g, A, h, a, y]
76
77
  );
77
- V(() => {
78
- u === "init" && C(o);
79
- }, [u, C, o]);
80
- const { leftActions: W, insideActions: P, rightActions: S } = X({
81
- windowId: o,
78
+ R(() => {
79
+ c === "init" && C(t);
80
+ }, [c, C, t]);
81
+ const { leftActions: W, insideActions: P, rightActions: S } = V({
82
+ windowId: t,
82
83
  areaId: s,
83
- emergeType: c
84
- }), R = k(() => [...W, ...P, ...S], [W, P, S]);
84
+ emergeType: n
85
+ }), O = k(() => [...W, ...P, ...S], [W, P, S]);
85
86
  return {
86
- emergeType: c,
87
+ emergeType: n,
87
88
  moduleId: b,
88
- winType: E,
89
- title: F,
90
- subTitle: v,
91
- editionInfo: M,
92
- iconUrl: U,
93
- version: L,
94
- buildTime: Q,
95
- moduleCount: x,
96
- selected: m,
97
- mfProps: j,
98
- component: B,
99
- loading: z,
100
- status: u,
101
- dynamicMFStore: H,
102
- windowTools: O,
103
- onTouch: N,
104
- memoizedActions: R,
89
+ winType: v,
90
+ title: E,
91
+ subTitle: F,
92
+ editionInfo: d,
93
+ iconUrl: M,
94
+ version: U,
95
+ buildTime: L,
96
+ moduleCount: Q,
97
+ selected: u,
98
+ mfProps: H,
99
+ component: j,
100
+ loading: x,
101
+ status: c,
102
+ dynamicMFStore: z,
103
+ windowTools: N,
104
+ onTouch: K,
105
+ memoizedActions: O,
105
106
  loggedUser: q
106
107
  };
107
108
  };
@@ -1,10 +1,8 @@
1
1
  import { AreaWindowProps } from '../../../types';
2
2
  /**
3
- * Función que genera un string con el número de módulos repetidos en una misma área.
4
- * Esta función recibe un hash de ventanas y evalúa cada ventana para contar cuántas veces se repite un módulo en una misma área
5
- * y genera un number que representa el 'moduleCount' de la ventana.
6
- * @param hashWindows
7
- * @returns number con el número de módulos repetidos en una mista area
3
+ * Compute the visible duplicate counter for one module inside a single area.
4
+ * The function walks the logical window registry, keeps only windows from the
5
+ * target area and module, and returns the first available positive counter.
8
6
  */
9
7
  export declare const generateModuleCount: (areaId: string, moduleId: string, hashWindows: Record<string, AreaWindowProps>) => number;
10
8
  //# sourceMappingURL=generateModuleCount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateModuleCount.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/helpers/generateModuleCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,EAAE,aAAa,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,WAiBjH,CAAC"}
1
+ {"version":3,"file":"generateModuleCount.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/helpers/generateModuleCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,UAAU,MAAM,EAAE,aAAa,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,WAejH,CAAC"}
@@ -42,47 +42,52 @@ export declare const RESPONSIVE_ROW_HEIGHTS: {
42
42
  export declare const DEFAULT_WINDOW: Pick<WindowState, 'status' | 'moduleActions' | 'cookies' | 'loading'>;
43
43
  export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | 'viewMode'>;
44
44
  /**
45
- * Función de apoyo que crea un área de trabajo,
46
- * El Id del area sale de concatenar la fecha actual con un número aleeatorio de 3 digitos
47
- * Cuuando se agrega un area queda seleccionada por defecto.
48
- * si "loadAreasFromNetwork" esta en true, agrega al backend el área de trabajo
49
- * @param state
50
- * @returns
45
+ * Create a new work area with the next available generated name.
46
+ * The id combines the current timestamp with a short random suffix, the new
47
+ * area becomes selected by default, and the backend is notified when network
48
+ * persistence is enabled.
51
49
  */
52
50
  export declare const addArea: (state: Draft<AreasStoreStateWithActions>) => string;
53
51
  /**
54
- * Actualiza la clases basado en owner state
55
- * @param state immer State
52
+ * Update utility classes from owner state.
53
+ * This remains commented because class generation moved elsewhere, but the
54
+ * note is kept as a reminder of the previous responsibility split.
56
55
  */
57
56
  /**
58
- * TODO: Documentar
57
+ * Return the currently selected area from the normalized registry.
58
+ * Throws when the store points to a missing area because callers expect the
59
+ * invariant to hold once the Areas provider is loaded.
59
60
  */
60
61
  export declare const getCurrentArea: (state: Draft<AreasStoreStateWithActions> | AreasStoreStateWithActions) => Area;
61
62
  /**
62
- * TODO: Documentar
63
+ * Extract and parse a cookie-like value by id from a network response payload.
64
+ * Returns `undefined` when the key is missing or the payload cannot be parsed.
63
65
  */
64
66
  export declare const getParmsFromValue: (key: string, data: []) => any;
65
67
  /**
66
- * TODO: Documentar
68
+ * Apply the collapsed flag for one layout across every breakpoint copy.
69
+ * On `xxs`, free-move items keep their current collapse state.
67
70
  */
68
71
  export declare function setColapsedLayoutBreakPoints(state: Draft<Area>, layoutId: string, colapsed: boolean): void;
69
72
  /**
70
- * TODO: Documentar
73
+ * Remove one layout item from every stored breakpoint representation.
71
74
  */
72
75
  export declare function deleteLayoutFromBreakPoints(state: Draft<Area>, layoutId?: string): void;
73
76
  /**
74
- * TODO: Documentar
77
+ * Rebuild persisted layout state from the Areas cookie payload.
78
+ * This restores the layout breakpoint map and the normalized layout-window ids
79
+ * for API-backed microfrontend layouts.
75
80
  */
76
81
  export declare function getDataFromResponse(data: any, state: Draft<AreasStoreStateWithActions>, areaId: string): {
77
82
  newBreakPointsLayouts: Layouts;
78
83
  newHashLayoutItems: string[];
79
84
  };
80
85
  /**
81
- * TODO: Documentar
86
+ * Collect cookie values belonging to one container id.
82
87
  */
83
88
  export declare function getCookiesContainer(data: any, containerId: string): Record<string, any>;
84
89
  /**
85
- * TODO: Documentar
90
+ * Read the selected area id from the Areas admin cookie payload, when present.
86
91
  */
87
92
  export declare function getSelectedAreaIdFromCookies(cookiesResponse: any): string | undefined;
88
93
  //# sourceMappingURL=helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/helpers/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAOnC,OAAO,KAAK,EAAE,IAAI,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAIvD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,+BAA+B,UAAU,CAAC;AACvD,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAC7C,eAAO,MAAM,yBAAyB,eAAe,CAAC;AACtD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,eAAO,MAAM,gBAAgB;;;;;;CAAkD,CAAC;AAChF,eAAO,MAAM,eAAe;;;;;;CAA6C,CAAC;AAC1E,eAAO,MAAM,eAAe;;;;;;CAA8C,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;;;CAA8C,CAAC;AAClF,eAAO,MAAM,cAAc,EAAE,IAAI,CAC/B,WAAW,EACX,QAAQ,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,CAOnD,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,UAAU,CAW/D,CAAC;AACF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,CAAC,0BAA0B,CAAC,WAsC/D,CAAC;AACF;;;GAGG;AAKH;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,CAAC,0BAA0B,CAAC,GAAG,0BAA0B,KACpE,IAOF,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,EAAE,MAAM,EAAE,QAWtD,CAAC;AACF;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,QAgBlB;AACD;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAYvF;AACD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,CAAC,0BAA0B,CAAC,EACxC,MAAM,EAAE,MAAM;;;EA0Ef;AACD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,uBAYjE;AACD;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,eAAe,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAKrF"}
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/helpers/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAOnC,OAAO,KAAK,EAAE,IAAI,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAIvD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,+BAA+B,UAAU,CAAC;AACvD,eAAO,MAAM,qBAAqB,UAAU,CAAC;AAC7C,eAAO,MAAM,yBAAyB,eAAe,CAAC;AACtD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,eAAO,MAAM,gBAAgB;;;;;;CAAkD,CAAC;AAChF,eAAO,MAAM,eAAe;;;;;;CAA6C,CAAC;AAC1E,eAAO,MAAM,eAAe;;;;;;CAA8C,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;;;CAA8C,CAAC;AAClF,eAAO,MAAM,cAAc,EAAE,IAAI,CAC/B,WAAW,EACX,QAAQ,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,CAOnD,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,UAAU,CAY/D,CAAC;AACF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,CAAC,0BAA0B,CAAC,WAsC/D,CAAC;AACF;;;;GAIG;AACH;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,CAAC,0BAA0B,CAAC,GAAG,0BAA0B,KACpE,IAOF,CAAC;AACF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,MAAM,EAAE,MAAM,EAAE,QAWtD,CAAC;AACF;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,QAgBlB;AACD;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAYvF;AACD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,CAAC,0BAA0B,CAAC,EACxC,MAAM,EAAE,MAAM;;;EA0Ef;AACD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,uBAYjE;AACD;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,eAAe,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAKrF"}
@@ -1,7 +1,7 @@
1
1
  import { createDynamicMFStore as y } from "../../../../WindowBase/contexts/DynamicMFParmsContext/store.js";
2
2
  import { getAreasDictionary as O, AREAS_DICCTIONARY as _ } from "../../../dictionary.js";
3
3
  import { addLayoutItemToBreakPointIfNoExists as E } from "../../../../GridLayout/subcomponents/Responsive/responsiveUtils.js";
4
- const d = 10, u = 10, h = 500, C = "areas", T = "admin", k = "layoutPros", w = "windows", L = "windowSelected", l = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 1 }, I = { lg: 64, md: 48, sm: 32, xs: 24, xxs: 1 }, x = { lg: [], md: [], sm: [], xs: [], xxs: [] }, p = { xxs: 32, xs: 32, sm: 32, md: 32, lg: 32 }, D = {
4
+ const d = 10, u = 10, h = 500, C = "areas", T = "admin", k = "layoutPros", w = "windows", L = "windowSelected", l = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 1 }, I = { lg: 64, md: 48, sm: 32, xs: 24, xxs: 1 }, p = { lg: [], md: [], sm: [], xs: [], xxs: [] }, x = { xxs: 32, xs: 32, sm: 32, md: 32, lg: 32 }, D = {
5
5
  status: "init",
6
6
  moduleActions: [],
7
7
  cookies: { moduleCookies: {}, windowCookies: {} },
@@ -9,10 +9,11 @@ const d = 10, u = 10, h = 500, C = "areas", T = "admin", k = "layoutPros", w = "
9
9
  }, S = {
10
10
  status: "init",
11
11
  zPopUpIndex: 0,
12
- layouts: x,
12
+ layouts: p,
13
13
  // colapsedItems: {},
14
14
  // windowsLayoutIds: [],
15
15
  layoutItemsIds: [],
16
+ panelItemsIds: [],
16
17
  currentLayoutId: "",
17
18
  breakpoints: l,
18
19
  cols: I,
@@ -78,8 +79,8 @@ function B(e, t, n) {
78
79
  if (r) {
79
80
  for (const s in r) {
80
81
  const c = r[s];
81
- if (c && c.moduleCount && // element['layoutProps'] && //Garantizar que venga con los LayoutProps de la venta
82
- c.mfProps && //Garantizar que venga con los mfProps de la venta
82
+ if (c && c.moduleCount && // element['layoutProps'] && // Ensure persisted layout props are present.
83
+ c.mfProps && // Ensure microfrontend launch props are still available.
83
84
  c.emergeType === "layout" && c.winType === "microfrontend") {
84
85
  a.push(s);
85
86
  const m = t.areaActions.closeLayout;
@@ -102,7 +103,7 @@ function B(e, t, n) {
102
103
  I,
103
104
  [u, u],
104
105
  [d, d],
105
- p
106
+ x
106
107
  );
107
108
  }
108
109
  }
@@ -139,12 +140,12 @@ export {
139
140
  L as COOKIE_WINDOW_SELECTED,
140
141
  h as DEBOUCED_SAVE_TIME,
141
142
  S as DEFAULT_AREA,
142
- x as DEFAULT_LAYOUTS,
143
+ p as DEFAULT_LAYOUTS,
143
144
  D as DEFAULT_WINDOW,
144
145
  u as MARGIN_GRIDLAYOUT,
145
146
  I as NORMALIZED_COLS,
146
147
  d as PADDING_GRIDLAYOUT,
147
- p as RESPONSIVE_ROW_HEIGHTS,
148
+ x as RESPONSIVE_ROW_HEIGHTS,
148
149
  R as addArea,
149
150
  b as deleteLayoutFromBreakPoints,
150
151
  M as getCookiesContainer,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD,QAAA,MAAM,YAAY;;;;;;;;UAAyC,CAAC;AAC5D;;GAEG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDA4G/C;AACD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD,QAAA,MAAM,YAAY;;;;;;;;UAAyC,CAAC;AAC5D;;GAEG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,oDAqH/C;AACD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
@@ -1,70 +1,73 @@
1
- import { jsx as H } from "@emotion/react/jsx-runtime";
2
- import { createContext as L, useRef as p, useCallback as W, useEffect as n } from "react";
1
+ import { jsx as W } from "@emotion/react/jsx-runtime";
2
+ import { createContext as x, useRef as d, useCallback as h, useEffect as o } from "react";
3
3
  import { useStore as a } from "zustand";
4
4
  import { shallow as u } from "zustand/shallow";
5
- import { useFirstRender as b } from "@m4l/graphics";
6
- import { useHostTools as x, useModuleDictionary as h, useNetwork as B, useFlagsStore as V, CommonFlags as j, EmitEvents as m } from "@m4l/core";
7
- import { createAreasStore as q } from "./store.js";
8
- import { usePopupsStore as z } from "../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
9
- const J = L(null);
10
- function te(f) {
5
+ import { useFirstRender as B } from "@m4l/graphics";
6
+ import { useHostTools as V, useModuleDictionary as j, useNetwork as q, useFlagsStore as z, CommonFlags as J, EmitEvents as S } from "@m4l/core";
7
+ import { createAreasStore as K } from "./store.js";
8
+ import { usePopupsStore as Q } from "../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
9
+ const U = x(null);
10
+ function se(A) {
11
11
  const {
12
- children: E,
13
- loadAreasFromNetwork: S,
14
- loadCookiesFromNetwork: A,
15
- onLoad: c,
16
- onSelectLayout: d,
17
- storeId: I,
18
- storeDevtoolsEnabled: _
19
- } = f, { events_add_listener: P, events_remove_listener: v } = x(), { getLabel: r } = h(), { networkOperation: F } = B(), M = b([r]), { addFlag: g } = V((e) => e.flagsActions), t = p(null), {
20
- addPopup: w,
21
- removePopup: k,
22
- closePopupsByGroupId: y,
12
+ children: I,
13
+ loadAreasFromNetwork: F,
14
+ loadCookiesFromNetwork: _,
15
+ onLoad: i,
16
+ onReady: c,
17
+ onSelectLayout: l,
18
+ storeId: P,
19
+ storeDevtoolsEnabled: k
20
+ } = A, { events_add_listener: v, events_remove_listener: y } = V(), { getLabel: s } = j(), { networkOperation: M } = q(), g = B([s]), { addFlag: w } = z((e) => e.flagsActions), r = d(null), {
21
+ addPopup: R,
22
+ removePopup: H,
23
+ closePopupsByGroupId: C,
23
24
  bringPopupOnFront: N,
24
25
  closeAllPopupsByParentId: O,
25
- setSelectedPopupId: R
26
- } = z(
26
+ setSelectedPopupId: T
27
+ } = Q(
27
28
  (e) => e.popupsActions,
28
29
  u
29
30
  );
30
- t.current || (t.current = q({
31
- storeId: I,
32
- getLabel: r,
33
- loadAreasFromNetwork: S,
34
- loadCookiesFromNetwork: A,
35
- networkOperation: F,
31
+ r.current || (r.current = K({
32
+ storeId: P,
33
+ getLabel: s,
34
+ loadAreasFromNetwork: F,
35
+ loadCookiesFromNetwork: _,
36
+ networkOperation: M,
36
37
  ownerState: {
37
38
  status: "init",
38
39
  readyForHooks: !1
39
40
  },
40
41
  popupsProviderMethods: {
41
- addPopup: w,
42
- removePopup: k,
43
- removePopupsByGroupId: y,
42
+ addPopup: R,
43
+ removePopup: H,
44
+ removePopupsByGroupId: C,
44
45
  bringPopupOnFront: N,
45
46
  closeAllPopupsByParentId: O,
46
- setSelectedPopupId: R
47
+ setSelectedPopupId: T
47
48
  }
48
- }, _), t.current?.getState().areasActions.init());
49
- const o = a(t.current, (e) => e.ownerState?.status, u), s = a(t.current, (e) => e.currentModuleId), i = p(""), { setHandlerGetLabel: T, setExternalState: C } = a(
50
- t.current,
49
+ }, k), r.current?.getState().areasActions.init());
50
+ const t = a(r.current, (e) => e.ownerState?.status, u), p = a(r.current, (e) => e.ownerState?.readyForHooks, u), n = a(r.current, (e) => e.currentModuleId), f = d(""), m = d(!1), { setHandlerGetLabel: b, setExternalState: D } = a(
51
+ r.current,
51
52
  (e) => e.areasActions,
52
53
  u
53
- ), l = W((e) => {
54
- const D = t.current?.getState().currentAreaId, G = t.current?.getState().areasIds;
55
- D && G && t.current?.getState().areaActions.addWindow(e);
54
+ ), E = h((e) => {
55
+ const G = r.current?.getState().currentAreaId, L = r.current?.getState().areasIds;
56
+ G && L && r.current?.getState().areaActions.addWindow(e);
56
57
  }, []);
57
- return n(() => {
58
- o === "loaded" && (c && c(), g(j.FLAG_AREAS_LOADED));
59
- }, [o]), n(() => {
60
- o === "loaded" && s !== i.current && (d && d(s), i.current = s);
61
- }, [s, o]), n(() => {
62
- M || T(r);
63
- }, [r]), n(() => (P(m.EMMIT_EVENT_HOST_EMERGE_WINDOW, l), C({ readyForHooks: !0 }), () => {
64
- v(m.EMMIT_EVENT_HOST_EMERGE_WINDOW, l);
65
- }), []), /* @__PURE__ */ H(J.Provider, { value: t.current, children: E });
58
+ return o(() => {
59
+ t === "loaded" && (i && i(), w(J.FLAG_AREAS_LOADED));
60
+ }, [t]), o(() => {
61
+ !m.current && t === "loaded" && p && (m.current = !0, c && c());
62
+ }, [c, p, t]), o(() => {
63
+ t === "loaded" && n !== f.current && (l && l(n), f.current = n);
64
+ }, [n, t]), o(() => {
65
+ g || b(s);
66
+ }, [s]), o(() => (v(S.EMMIT_EVENT_HOST_EMERGE_WINDOW, E), D({ readyForHooks: !0 }), () => {
67
+ y(S.EMMIT_EVENT_HOST_EMERGE_WINDOW, E);
68
+ }), []), /* @__PURE__ */ W(U.Provider, { value: r.current, children: I });
66
69
  }
67
70
  export {
68
- J as AreasContext,
69
- te as AreasProvider
71
+ U as AreasContext,
72
+ se as AreasProvider
70
73
  };
@@ -1,8 +1,7 @@
1
1
  import { AreasStoreStateWithActions, InitialAreasStoreProps } from './types';
2
2
  /**
3
- * Crea el Store, por defecto inicia en estado 'init'
4
- * @param initProps propiedades iniciales del store
5
- * @returns
3
+ * Create the Areas store. It starts in the `init` lifecycle state by default.
4
+ * @param initProps initial store properties
6
5
  */
7
6
  export declare const createAreasStore: (initProps: InitialAreasStoreProps, storeDevtoolsEnabled?: boolean) => Omit<Omit<import('zustand').StoreApi<AreasStoreStateWithActions>, "setState"> & {
8
7
  setState<A extends string | {
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAGV,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,SAAS,CAAC;AA6DjB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAC3B,WAAW,sBAAsB,EACjC,8BAA4B;;;;;;;;CAolC7B,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/store.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAGV,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAiEjB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAC3B,WAAW,sBAAsB,EACjC,8BAA4B;;;;;;;;CAkyC7B,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}