@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 +1 @@
1
- {"version":3,"file":"WindowBase.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/WindowBase/WindowBase.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,eAAe,EAAE,MAAM,SAAS,CAAC;AAShE;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qDA6EhD,CAAC"}
1
+ {"version":3,"file":"WindowBase.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/WindowBase/WindowBase.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,eAAe,EAAE,MAAM,SAAS,CAAC;AAShE;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qDAkFhD,CAAC"}
@@ -1,75 +1,75 @@
1
- import { jsx as e, jsxs as z } from "@emotion/react/jsx-runtime";
1
+ import { jsx as e, jsxs as T } from "@emotion/react/jsx-runtime";
2
2
  import { getPropDataTestId as i } from "../../test/getNameDataTestId.js";
3
3
  import { WINDOW_BASE_KEY_COMPONENT as o } from "./constants.js";
4
- import { getComponentSlotRoot as T } from "../../utils/getComponentSlotRoot.js";
5
- import N from "clsx";
6
- import { HeaderWindowBase as v } from "./subcomponents/Header/HeaderWindowBase.js";
7
- import { EditionInfo as E } from "./subcomponents/EditionInfo/EditionInfo.js";
8
- import { WindowBaseStyled as P, ToastContainerStyled as D, ContentWindowStyled as O, LinearProgressIndeterminateStyled as _ } from "./slots/WindowBaseSlots.js";
9
- import { useComponentSize as b, AppearanceComponentProvider as j } from "@m4l/graphics";
10
- import { WindowBaseSlots as r } from "./slots/WindowBaseEnum.js";
11
- const G = (u) => {
4
+ import { getComponentSlotRoot as b } from "../../utils/getComponentSlotRoot.js";
5
+ import v from "clsx";
6
+ import { HeaderWindowBase as N } from "./subcomponents/Header/HeaderWindowBase.js";
7
+ import { EditionInfo as D } from "./subcomponents/EditionInfo/EditionInfo.js";
8
+ import { WindowBaseStyled as E, ToastContainerStyled as P, ContentWindowStyled as O, LinearProgressIndeterminateStyled as _ } from "./slots/WindowBaseSlots.js";
9
+ import { useComponentSize as j, AppearanceComponentProvider as A } from "@m4l/graphics";
10
+ import { WindowBaseSlots as a } from "./slots/WindowBaseEnum.js";
11
+ const J = (w) => {
12
12
  const {
13
- children: S,
14
- size: a = "medium",
15
- selected: d = !1,
13
+ children: u,
14
+ size: d = "medium",
15
+ selected: s = !1,
16
16
  maximized: t,
17
- variant: s = "outlined",
18
- version: W,
19
- buildTime: g,
17
+ variant: m = "outlined",
18
+ version: S,
19
+ buildTime: W,
20
20
  dataTestId: n,
21
21
  onClose: B,
22
22
  className: C,
23
23
  isLoading: I,
24
24
  windowId: x,
25
25
  onMouseDown: h,
26
- editionInfo: m,
27
- emergeType: p = "layout",
28
- collapsed: l,
29
- draggable: c = !0,
30
- ...y
31
- } = u, { currentSize: f } = b(a), w = {
32
- selected: d,
33
- variant: t ? "text" : s,
34
- size: f,
35
- emergeType: p,
26
+ editionInfo: l,
27
+ emergeType: r = "layout",
28
+ collapsed: p,
29
+ draggable: y,
30
+ ...z
31
+ } = w, { currentSize: c } = j(d), f = y ?? r !== "panel", g = {
32
+ selected: s,
33
+ variant: t ? "text" : m,
34
+ size: c,
35
+ emergeType: r,
36
36
  maximized: t,
37
- collapsed: l,
38
- draggable: c
37
+ collapsed: p,
38
+ draggable: f
39
39
  };
40
- return /* @__PURE__ */ e(j, { defaultSize: f, children: /* @__PURE__ */ z(
41
- P,
40
+ return /* @__PURE__ */ e(A, { defaultSize: c, children: /* @__PURE__ */ T(
41
+ E,
42
42
  {
43
- className: N(T(o), C),
44
- ...i(o, r.wrapperWindowBase, n),
45
- ownerState: w,
43
+ className: v(b(o), C),
44
+ ...i(o, a.wrapperWindowBase, n),
45
+ ownerState: g,
46
46
  onMouseDown: h,
47
47
  children: [
48
48
  /* @__PURE__ */ e(
49
- v,
49
+ N,
50
50
  {
51
- ...i(o, r.headerContentWindowBase, n),
52
- version: W,
53
- buildTime: g,
54
- size: a,
55
- variant: s,
56
- selected: d,
51
+ ...i(o, a.headerContentWindowBase, n),
52
+ version: S,
53
+ buildTime: W,
54
+ size: d,
55
+ variant: m,
56
+ selected: s,
57
57
  maximized: t,
58
- collapsed: l,
58
+ collapsed: p,
59
59
  onClose: B,
60
- emergeType: p,
61
- draggable: c,
62
- ...y
60
+ emergeType: r,
61
+ draggable: f,
62
+ ...z
63
63
  }
64
64
  ),
65
- /* @__PURE__ */ e(D, { fixed: !1, position: "top-right", containerId: x }),
66
- m && /* @__PURE__ */ e(E, { editionInfo: m }),
65
+ /* @__PURE__ */ e(P, { fixed: !1, position: "top-right", containerId: x }),
66
+ l && /* @__PURE__ */ e(D, { editionInfo: l }),
67
67
  /* @__PURE__ */ e(
68
68
  O,
69
69
  {
70
- ...i(o, r.contentWindowBase, n),
71
- ownerState: w,
72
- children: S
70
+ ...i(o, a.contentWindowBase, n),
71
+ ownerState: g,
72
+ children: u
73
73
  }
74
74
  ),
75
75
  I && /* @__PURE__ */ e(_, {})
@@ -78,5 +78,5 @@ const G = (u) => {
78
78
  ) });
79
79
  };
80
80
  export {
81
- G as WindowBase
81
+ J as WindowBase
82
82
  };
@@ -1,6 +1,6 @@
1
1
  import { WindowBaseStyles } from './types';
2
2
  /**
3
- * Calcula la altura del header de la ventana base.
3
+ * Define the shared visual styles for the WindowBase shell.
4
4
  */
5
5
  export declare const windowBaseStyles: WindowBaseStyles;
6
6
  //# sourceMappingURL=WindowBase.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WindowBase.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/WindowBase/WindowBase.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBA0a9B,CAAC"}
1
+ {"version":3,"file":"WindowBase.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/WindowBase/WindowBase.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAqc9B,CAAC"}
@@ -1,5 +1,5 @@
1
- import { getTypographyStyles as r } from "../../utils/getTypographyStyles.js";
2
- import { getSizeStyles as e } from "../../utils/getSizeStyles/getSizeStyles.js";
1
+ import { getTypographyStyles as e } from "../../utils/getTypographyStyles.js";
2
+ import { getSizeStyles as r } from "../../utils/getSizeStyles/getSizeStyles.js";
3
3
  const t = {
4
4
  /**
5
5
  * Styles for the window base wrapper component.
@@ -45,6 +45,17 @@ const t = {
45
45
  }
46
46
  }
47
47
  },
48
+ ...o?.emergeType === "panel" && {
49
+ "&&&": {
50
+ // boxShadow: theme.vars.customShadows.z1,
51
+ // border: `1px solid ${theme.vars.palette?.border.secondary}`,
52
+ borderRadius: a.vars.size.borderRadius.r0
53
+ // ...(ownerState?.selected && {
54
+ // boxShadow: theme.vars.customShadows.z4,
55
+ // border: `1px solid ${theme.vars.palette?.primary.activeOpacity}`,
56
+ // }),
57
+ }
58
+ },
48
59
  ...o?.emergeType === "layout" && {
49
60
  ...o?.selected && !o?.maximized ? {
50
61
  boxShadow: a.vars.customShadows.primary
@@ -73,7 +84,7 @@ const t = {
73
84
  * Window component content Styles by emergeType
74
85
  */
75
86
  windowContainerComponent: () => ({
76
- //Mover el estilado para adentro
87
+ // Keep the shell container styling local to WindowBase.
77
88
  position: "relative",
78
89
  display: "flex",
79
90
  width: "100%",
@@ -88,7 +99,7 @@ const t = {
88
99
  display: "flex",
89
100
  padding: a.vars.size.baseSpacings.sp1,
90
101
  marginTop: 1,
91
- ...(o?.emergeType === "popup" || o?.emergeType === "modal") && {
102
+ ...(o?.emergeType === "popup" || o?.emergeType === "modal" || o?.emergeType === "panel") && {
92
103
  padding: `${a.vars.size.baseSpacings["sp2-5"]} ${a.vars.size.baseSpacings.sp2} 0 ${a.vars.size.baseSpacings.sp2}`
93
104
  },
94
105
  alignItems: "center",
@@ -97,7 +108,7 @@ const t = {
97
108
  alignSelf: "stretch",
98
109
  cursor: o?.draggable ? "all-scroll" : "default",
99
110
  position: "relative",
100
- ...o?.emergeType === "layout" || o?.emergeType === "modal" ? e(
111
+ ...o?.emergeType === "layout" || o?.emergeType === "modal" ? r(
101
112
  a,
102
113
  o?.size || "medium",
103
114
  "container",
@@ -105,7 +116,7 @@ const t = {
105
116
  minHeight: i
106
117
  })
107
118
  ) : {
108
- ...e(
119
+ ...r(
109
120
  a,
110
121
  o?.size || "medium",
111
122
  "action",
@@ -161,7 +172,7 @@ const t = {
161
172
  cursor: o?.draggable ? "all-scroll" : "default",
162
173
  ...o?.maximized && {
163
174
  "&&&": {
164
- ...r(
175
+ ...e(
165
176
  a.generalSettings.isMobile,
166
177
  o?.size || "small",
167
178
  "paragraphDens"
@@ -227,7 +238,7 @@ const t = {
227
238
  gap: a.vars.size.baseSpacings["sp0-5"],
228
239
  // override the default styles of the icon button
229
240
  "& .window-actions.MuiSkeleton-root": {
230
- ...e(
241
+ ...r(
231
242
  a,
232
243
  o?.size || "medium",
233
244
  "base",
@@ -241,7 +252,7 @@ const t = {
241
252
  marginBottom: o?.emergeType === "layout" ? "auto" : "unset"
242
253
  },
243
254
  '& .window-actions[class*="M4LIconButton-styledMUIIconButton"]': {
244
- ...e(
255
+ ...r(
245
256
  a,
246
257
  o?.size || "medium",
247
258
  "base",
@@ -287,6 +298,20 @@ const t = {
287
298
  }
288
299
  }
289
300
  },
301
+ "&.pin-toggle": {
302
+ "&:hover": {
303
+ backgroundColor: `${a.vars.palette.chips.info.contained.backgroundColor} !important`,
304
+ "& .M4LIcon-icon": {
305
+ backgroundColor: `${a.vars.palette.chips.info.contained.backgroundColorTone} !important`
306
+ }
307
+ },
308
+ "&:active": {
309
+ backgroundColor: `${a.vars.palette.chips.info.contained.backgroundHover} !important`,
310
+ "& .M4LIcon-icon": {
311
+ backgroundColor: `${a.vars.palette.chips.info.contained.backgroundColorTone} !important`
312
+ }
313
+ }
314
+ },
290
315
  "&.close-button": {
291
316
  "&:hover": {
292
317
  backgroundColor: `${a.vars.palette.chips.error.contained.backgroundColor} !important`,
@@ -320,7 +345,7 @@ const t = {
320
345
  backgroundColor: `${a.vars.palette.text.secondary} !important`
321
346
  }
322
347
  },
323
- ...e(
348
+ ...r(
324
349
  a,
325
350
  o?.size || "medium",
326
351
  "base"
@@ -331,7 +356,7 @@ const t = {
331
356
  */
332
357
  menuActionsWindowBase: ({ theme: a, ownerState: o }) => ({
333
358
  ...o?.emergeType === "layout" ? {
334
- ...e(
359
+ ...r(
335
360
  a,
336
361
  o?.size || "medium",
337
362
  "action"
@@ -390,7 +415,7 @@ const t = {
390
415
  gap: a.vars.size.baseSpacings.sp1,
391
416
  alignItems: "center",
392
417
  "& .M4LIconButton-styledMUIIconButton": {
393
- ...e(a, o?.size || "medium", "case", (i) => ({
418
+ ...r(a, o?.size || "medium", "case", (i) => ({
394
419
  width: `${i}!important`,
395
420
  height: `${i}!important`
396
421
  }))
@@ -1,88 +1,73 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Toaster } from '@m4l/core';
3
- import { CookieType } from '../../../areas/types';
3
+ import { CookieType, WindowQueryCloseHandler } from '../../../areas/types';
4
4
  import { ModuleAction } from '../../types';
5
5
  /**
6
- * Interfaz que define un conjunto de herramientas relacionadas con la ventana que pueden ser proporcionadas por el contexto WindowToolsMF.
6
+ * Window-scoped tools exposed through the WindowToolsMF context.
7
7
  */
8
+ export type { WindowQueryCloseRequest } from '../../../areas/types';
8
9
  export interface WindowToolsMF {
9
10
  /**
10
- * Método para obtener una cookie específica por su ID.
11
- * @param id El ID de la cookie que se desea obtener.
12
- * @returns La cookie correspondiente si se encuentra, de lo contrario, undefined.
11
+ * Read one cookie by id.
13
12
  */
14
13
  getCookie: (id: string) => Record<string, any> | undefined;
15
14
  /**
16
- * Método para obtener el ID de la ventana actual.
17
- * @returns El ID de la ventana actual.
15
+ * Read the current window id.
18
16
  */
19
17
  getWindowId: () => string;
20
18
  /**
21
- * Método para obtener todas las cookies de un tipo específico.
22
- * @param type El tipo de cookie del cual se desean obtener todas las cookies.
23
- * @returns Un objeto que contiene todas las cookies del tipo especificado.
19
+ * Read all cookies for one scope.
24
20
  */
25
21
  getCookies: (type: CookieType) => Record<string, any>;
26
22
  /**
27
- * Método para establecer las acciones de ventana para el área actual.
28
- * @param newActions Las nuevas acciones de ventana que se desean establecer.
29
- * @param version (Opcional) La versión de las acciones de ventana.
30
- * @param buildTime (Opcional) El buildTime del Microfrontend.
23
+ * Replace the shell actions exposed by the mounted content.
31
24
  */
32
25
  setActions: (newActions: ModuleAction[], version?: string, buildTime?: string) => void;
33
26
  /**
34
- * Método para establecer una cookie específica.
35
- * @param id El ID de la cookie que se desea establecer.
36
- * @param type El tipo de cookie que se desea establecer.
37
- * @param cookie El contenido de la cookie que se desea establecer.
27
+ * Persist one cookie in the requested scope.
38
28
  */
39
29
  setCookie: (id: string, type: CookieType, cookie: Record<string, any> | Array<any>) => void;
40
30
  /**
41
- * Método para iniciar el indicador de progreso.
31
+ * Start the shell progress indicator.
42
32
  */
43
33
  startProgress: () => void;
44
34
  /**
45
- * Método para detener el indicador de progreso.
35
+ * Stop the shell progress indicator.
46
36
  */
47
37
  stopProgress: () => void;
48
38
  /**
49
- * Método para mostrar una notificación toast.
50
- * @param options Las opciones de configuración para la notificación toast.
39
+ * Create toasts scoped to the current window.
51
40
  */
52
41
  toast: Toaster;
53
42
  /**
54
- * Método para cerrar la ventana actual.
43
+ * Close the current window.
55
44
  */
56
45
  close: (useFnQueryClose?: boolean) => void;
57
46
  /**
58
- * Método para establecer la función de consulta de cierre de la ventana.
59
- * @param fnQueryClose La función de consulta de cierre de la ventana que se desea establecer.
47
+ * Replace the default close flow with a guarded close handler.
60
48
  */
61
- setFnQueryClose: (fnQueryClose: () => void) => void;
49
+ setFnQueryClose: (fnQueryClose: WindowQueryCloseHandler) => void;
62
50
  /**
63
- * Método para setear el titulo de la ventana y que pueda cambiar de idioma
64
- * @param {string} title Titulo que se visulizará en la ventana del módulo
51
+ * Update the window title.
65
52
  */
66
53
  setWindowTitle: (title: string) => void;
67
54
  /**
68
- * Método para setear el subtitulo de la ventana y que pueda cambiar de idioma
69
- * @param {string} subtitle Subtitulo que se visulizará en la ventana del módulo
55
+ * Update the window subtitle.
70
56
  */
71
57
  setWindowSubTitle: (subtitle: string) => void;
72
58
  /**
73
- * Método para setear la información de edición de la ventana y que pueda cambiar de idioma
74
- * @param {string} editionInfo Información de edición que se visulizará en la ventana del módulo
59
+ * Update the edit-context label shown by the shell.
75
60
  */
76
61
  setWindowEditionInfo: (editionInfo: string) => void;
77
62
  }
78
63
  /**
79
- * Props del componente WindowToolsMFProvider que incluyen las herramientas de ventana proporcionadas por la interfaz WindowToolsMF.
64
+ * Props accepted by the WindowToolsMF provider component.
80
65
  */
81
66
  export interface WindowToolsMFProviderProps extends WindowToolsMF {
82
67
  children: ReactNode;
83
68
  }
84
69
  /**
85
- * Props del contexto WindowToolsMF, excluyendo la prop children.
70
+ * WindowToolsMF context value without the React children prop.
86
71
  */
87
72
  export type WindowToolsMFContextProps = Omit<WindowToolsMFProviderProps, 'children'>;
88
73
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/WindowBase/contexts/WindowToolsMFContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAC3D;;;OAGG;IACH,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtD;;;;;OAKG;IACH,UAAU,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvF;;;;;OAKG;IACH,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IAC5F;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;;OAGG;IACH,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IACpD;;;OAGG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C;;;OAGG;IACH,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AACD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/WindowBase/contexts/WindowToolsMFContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C;;GAEG;AACH,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAC3D;;OAEG;IACH,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtD;;OAEG;IACH,UAAU,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACvF;;OAEG;IACH,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IAC5F;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,eAAe,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACjE;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AACD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsxs as m, jsx as s } from "@emotion/react/jsx-runtime";
1
+ import { jsxs as m, jsx as i } from "@emotion/react/jsx-runtime";
2
2
  import { useEnvironment as H } from "@m4l/core";
3
3
  import { useState as b, useEffect as F, useMemo as M } from "react";
4
4
  import { ICONS as p } from "../../icons.js";
@@ -16,24 +16,24 @@ const ue = (N) => {
16
16
  subTitle: u,
17
17
  onClose: y,
18
18
  iconUrl: C,
19
- size: i,
19
+ size: r,
20
20
  selected: B,
21
21
  maximized: _,
22
22
  version: d,
23
23
  buildTime: f,
24
24
  variant: E,
25
- actions: r = [],
25
+ actions: a = [],
26
26
  collapsed: S,
27
- emergeType: a,
27
+ emergeType: s,
28
28
  draggable: g
29
- } = N, { host_static_assets: l, environment_assets: c } = H(), { dateFormatter: h } = P(), [O, R] = b(() => r.filter((t) => t.place === "left")), [x, z] = b(() => r.filter((t) => t.place === "right")), [I, v] = b(() => r.filter((t) => t.place === "inside"));
29
+ } = N, { host_static_assets: l, environment_assets: c } = H(), { dateFormatter: h } = P(), [O, R] = b(() => a.filter((t) => t.place === "left")), [x, z] = b(() => a.filter((t) => t.place === "right")), [I, v] = b(() => a.filter((t) => t.place === "inside"));
30
30
  F(() => {
31
- const t = r.reduce(
31
+ const t = a.reduce(
32
32
  (e, o) => (e[o.place]?.push(o), e),
33
33
  { left: [], right: [], inside: [] }
34
34
  );
35
35
  R((e) => w(e, t.left) ? e : t.left), z((e) => w(e, t.right) ? e : t.right), v((e) => w(e, t.inside) ? e : t.inside);
36
- }, [r]);
36
+ }, [a]);
37
37
  const $ = M(() => {
38
38
  const t = [
39
39
  ...I.map((e) => e.type === "groupActions" ? e.actions.map((o) => ({
@@ -68,25 +68,25 @@ const ue = (N) => {
68
68
  selected: B,
69
69
  maximized: _,
70
70
  variant: E,
71
- size: i,
72
- emergeType: a,
71
+ size: r,
72
+ emergeType: s,
73
73
  collapsed: S,
74
74
  draggable: g
75
75
  }, D = W(O), L = W(x);
76
76
  return /* @__PURE__ */ m(U, { className: Z(g && A.draggableHandle, k.headerWindowComponent), ownerState: n, children: [
77
77
  /* @__PURE__ */ m(j, { ownerState: n, className: k.headerContentWindowBase, children: [
78
- C && /* @__PURE__ */ s(V, { size: i, ownerState: n, src: C, "aria-label": "main icon" }),
79
- /* @__PURE__ */ m(q, { size: i, ownerState: n, children: [
80
- /* @__PURE__ */ s(K, { variant: a === "popup" || a === "modal" ? "bodyStandard" : "captionDens", size: i, skeletonWidth: 100, ownerState: n, children: T }),
81
- u && /* @__PURE__ */ s(
78
+ C && /* @__PURE__ */ i(V, { size: r, ownerState: n, src: C, "aria-label": "main icon" }),
79
+ /* @__PURE__ */ m(q, { size: r, ownerState: n, children: [
80
+ /* @__PURE__ */ i(K, { variant: s === "popup" || s === "modal" || s === "panel" ? "bodyStandard" : "captionDens", size: r, skeletonWidth: 100, ownerState: n, children: T }),
81
+ u && /* @__PURE__ */ i(
82
82
  G,
83
83
  {
84
84
  src: `${l}/${c}/frontend/components/window_base/assets/icons/${p.POINT}`,
85
- size: i,
85
+ size: r,
86
86
  ownerState: n
87
87
  }
88
88
  ),
89
- u && /* @__PURE__ */ s(J, { variant: a === "popup" || a === "modal" ? "bodyStandard" : "captionDens", size: i, skeletonWidth: 100, ownerState: n, children: u })
89
+ u && /* @__PURE__ */ i(J, { variant: s === "popup" || s === "modal" || s === "panel" ? "bodyStandard" : "captionDens", size: r, skeletonWidth: 100, ownerState: n, children: u })
90
90
  ] })
91
91
  ] }),
92
92
  /* @__PURE__ */ m(
@@ -96,8 +96,8 @@ const ue = (N) => {
96
96
  className: A.draggableCancel,
97
97
  ownerState: n,
98
98
  children: [
99
- /* @__PURE__ */ s(X, { ownerState: { collapsed: S }, children: D }),
100
- $.length > 0 && /* @__PURE__ */ s(
99
+ /* @__PURE__ */ i(X, { ownerState: { collapsed: S }, children: D }),
100
+ $.length > 0 && /* @__PURE__ */ i(
101
101
  Y,
102
102
  {
103
103
  type: "menuItem",
@@ -112,7 +112,7 @@ const ue = (N) => {
112
112
  }
113
113
  ),
114
114
  L,
115
- y && /* @__PURE__ */ s(
115
+ y && /* @__PURE__ */ i(
116
116
  ee,
117
117
  {
118
118
  icon: `${l}/${c}/frontend/components/window_base/assets/icons/${p.CLOSE}`,
@@ -1,10 +1,7 @@
1
1
  import { AreasAdminProps } from './types';
2
2
  /**
3
- * AreasAdmin
4
- * Componente para administrar áreas.
5
- * Este componente permite al usuario administrar las áreas disponibles,
6
- * seleccionar un área específica y agregar nuevas áreas.
7
- * Utiliza hooks como useAreasStore, useEnvironment, useModuleDictionary.
3
+ * Render the Areas admin control surface used to switch, create, and manage work areas.
4
+ * It also exposes the maximized-layout selector when the current area has more than one layout window.
8
5
  */
9
6
  export declare const AreasAdmin: (props: AreasAdminProps) => import("@emotion/react/jsx-runtime").JSX.Element | null;
10
7
  //# sourceMappingURL=AreasAdmin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AreasAdmin.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/components/AreasAdmin/AreasAdmin.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAwB,eAAe,EAAE,MAAM,SAAS,CAAC;AAShE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4DAmLhD,CAAC"}
1
+ {"version":3,"file":"AreasAdmin.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/components/AreasAdmin/AreasAdmin.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAwB,eAAe,EAAE,MAAM,SAAS,CAAC;AAShE;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,4DAoLhD,CAAC"}
@@ -1,13 +1,13 @@
1
- import { jsx as e, jsxs as f, Fragment as C } from "@emotion/react/jsx-runtime";
1
+ import { jsx as e, jsxs as I, Fragment as y } from "@emotion/react/jsx-runtime";
2
2
  import { useAreasStore as n } from "../../hooks/useAreas/index.js";
3
3
  import { useEnvironment as L, useModuleDictionary as P } from "@m4l/core";
4
4
  import j from "clsx";
5
5
  import { AreaChip as Y } from "./subcomponents/AreaChip/AreaChip.js";
6
6
  import { shallow as s } from "zustand/shallow";
7
- import { ICONS as I } from "../../icons.js";
7
+ import { ICONS as w } from "../../icons.js";
8
8
  import { AreaChipMobile as B } from "./subcomponents/AreaChipMobile/AreaChipMobile.js";
9
- import { useRef as y } from "react";
10
- import { getAreasDictionary as z, AREAS_DICCTIONARY as w } from "../../dictionary.js";
9
+ import { useRef as z } from "react";
10
+ import { getAreasDictionary as l, AREAS_DICCTIONARY as u } from "../../dictionary.js";
11
11
  import { AreasAdminRootStyled as F, AreasAdminContentStyled as G, AreasContainerChipIconStyled as K, AreasContainerContentChipsStyled as U, IconButtonAddAreaStyled as q, AreaContentChipStyled as H, ContainerAdminWindowsStyled as J } from "./slots/AreasAdminSlots.js";
12
12
  import { useIsMobile as Q } from "@m4l/graphics";
13
13
  import { useComponentSize as V } from "../../../../hooks/useComponentSize/index.js";
@@ -17,14 +17,14 @@ import { getComponentSlotRoot as Z } from "../../../../utils/getComponentSlotRoo
17
17
  import { getPropDataTestId as oo } from "../../../../test/getNameDataTestId.js";
18
18
  import { MenuActions as eo } from "../../../MenuActions/MenuActions.js";
19
19
  import { AreasAdminSlots as ro } from "./slots/AreasAdminEnum.js";
20
- const go = (g) => {
20
+ const _o = (_) => {
21
21
  const {
22
- color: l = "primary",
23
- size: _ = "medium",
22
+ color: p = "primary",
23
+ size: g = "medium",
24
24
  className: R,
25
25
  dataTestId: b,
26
26
  ...D
27
- } = g, d = Q(), { currentSize: r } = V(_), N = n((o) => o.areasIds ?? [], s), a = n((o) => o.currentAreaId, s), $ = n((o) => o.ownerState?.status), x = n((o) => o.areasIds.length), { addArea: E } = n((o) => o.areasActions, s), { maximizeLayout: O } = n((o) => o.areaActions), u = n(
27
+ } = _, h = Q(), { currentSize: r } = V(g), N = n((o) => o.areasIds ?? [], s), a = n((o) => o.currentAreaId, s), $ = n((o) => o.ownerState?.status), x = n((o) => o.areasIds.length), { addArea: E } = n((o) => o.areasActions, s), { maximizeLayout: O } = n((o) => o.areaActions), A = n(
28
28
  (o) => o.hashAreas[a] ? o.hashAreas[a].maximizedId : !1,
29
29
  s
30
30
  ), m = n(
@@ -37,12 +37,12 @@ const go = (g) => {
37
37
  };
38
38
  }) ?? [],
39
39
  s
40
- ), T = n((o) => m.reduce((t, i) => (t[i.i] = o.hashWindows[i.i]?.moduleCount, t), {}), s), { host_static_assets: p, environment_assets: h } = L(), { getLabel: A } = P(), v = y(null), M = y(null);
40
+ ), T = n((o) => m.reduce((t, i) => (t[i.i] = o.hashWindows[i.i]?.moduleCount, t), {}), s), { host_static_assets: f, environment_assets: C } = L(), { getLabel: c } = P(), v = z(null), M = z(null);
41
41
  if ($ !== "loaded")
42
42
  return null;
43
- const c = {
44
- isMobile: d,
45
- color: l,
43
+ const d = {
44
+ isMobile: h,
45
+ color: p,
46
46
  size: r
47
47
  }, k = (o) => {
48
48
  O(a, o);
@@ -54,7 +54,7 @@ const go = (g) => {
54
54
  label: `${o.title}${t ? `:${t}` : ""}`,
55
55
  urlIcon: o.url_icon,
56
56
  checkable: !0,
57
- checked: u === o.i
57
+ checked: A === o.i
58
58
  };
59
59
  });
60
60
  return /* @__PURE__ */ e(
@@ -63,7 +63,7 @@ const go = (g) => {
63
63
  className: j(Z(S), R),
64
64
  ...oo(S, ro.root, b),
65
65
  role: "areas-admin-role",
66
- ownerState: c,
66
+ ownerState: d,
67
67
  ref: M,
68
68
  ...D,
69
69
  children: /* @__PURE__ */ e(
@@ -80,17 +80,17 @@ const go = (g) => {
80
80
  U,
81
81
  {
82
82
  size: r,
83
- children: d ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ f(C, { children: [
83
+ children: h ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ I(y, { children: [
84
84
  /* @__PURE__ */ e(
85
85
  q,
86
86
  {
87
- "aria-label": "Agregar área",
87
+ "aria-label": c(l(u.area_add_new)),
88
88
  size: r,
89
89
  variant: "contained",
90
- ownerState: c,
91
- src: `${p}/${h}/frontend/components/areas/assets/icons/${I.ADD_AREA}`,
90
+ ownerState: d,
91
+ src: `${f}/${C}/frontend/components/areas/assets/icons/${w.ADD_AREA}`,
92
92
  onClick: E,
93
- tooltip: A(z(w.area_add_new))
93
+ tooltip: c(l(u.area_add_new))
94
94
  }
95
95
  ),
96
96
  /* @__PURE__ */ e(
@@ -101,7 +101,7 @@ const go = (g) => {
101
101
  Y,
102
102
  {
103
103
  size: r,
104
- color: l,
104
+ color: p,
105
105
  areaId: o,
106
106
  selected: o === a,
107
107
  disabled: x === 1
@@ -110,13 +110,13 @@ const go = (g) => {
110
110
  ))
111
111
  }
112
112
  ),
113
- u && m.length > 1 && /* @__PURE__ */ e(C, { children: /* @__PURE__ */ f(J, { size: r, ownerState: c, children: [
114
- /* @__PURE__ */ e(X, { size: r, skeletonWidth: "80px", children: A(z(w.label_window)) }),
113
+ A && m.length > 1 && /* @__PURE__ */ e(y, { children: /* @__PURE__ */ I(J, { size: r, ownerState: d, children: [
114
+ /* @__PURE__ */ e(X, { size: r, skeletonWidth: "80px", children: c(l(u.label_window)) }),
115
115
  /* @__PURE__ */ e(
116
116
  eo,
117
117
  {
118
118
  size: r,
119
- icon: `${p}/${h}/frontend/components/areas_admin/assets/icons/${I.PENDING_ORDER}`,
119
+ icon: `${f}/${C}/frontend/components/areas_admin/assets/icons/${w.PENDING_ORDER}`,
120
120
  arrowType: "no-arrow",
121
121
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
122
122
  transformOrigin: { vertical: "top", horizontal: "left" },
@@ -135,5 +135,5 @@ const go = (g) => {
135
135
  );
136
136
  };
137
137
  export {
138
- go as AreasAdmin
138
+ _o as AreasAdmin
139
139
  };