@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.
- package/@types/types.d.ts +0 -11
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts +2 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.d.ts.map +1 -1
- package/components/CommonActions/components/ActionFormCancel/ActionFormCancel.js +30 -41
- package/components/CommonActions/components/ActionFormCancel/types.d.ts +2 -2
- package/components/CommonActions/index.d.ts +1 -0
- package/components/CommonActions/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts +3 -14
- package/components/DragResizeWindowRND/DragResizeWindowRND.d.ts.map +1 -1
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +105 -119
- package/components/DragResizeWindowRND/helpers/index.d.ts +1 -0
- package/components/DragResizeWindowRND/helpers/index.d.ts.map +1 -1
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts +15 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.d.ts.map +1 -0
- package/components/DragResizeWindowRND/helpers/resizeHandles.js +68 -0
- package/components/DragResizeWindowRND/types.d.ts +3 -1
- package/components/DragResizeWindowRND/types.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.js +49 -49
- package/components/WindowBase/WindowBase.styles.d.ts +1 -1
- package/components/WindowBase/WindowBase.styles.d.ts.map +1 -1
- package/components/WindowBase/WindowBase.styles.js +37 -12
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +19 -34
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts.map +1 -1
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +18 -18
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts +2 -5
- package/components/areas/components/AreasAdmin/AreasAdmin.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/AreasAdmin.js +24 -24
- package/components/areas/components/AreasAdmin/helper.d.ts +1 -4
- package/components/areas/components/AreasAdmin/helper.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts +2 -26
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +72 -71
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.d.ts +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/AreaChipMobile.js +17 -17
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -24
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts.map +1 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +58 -57
- package/components/areas/components/AreasAdmin/types.d.ts +9 -9
- package/components/areas/components/AreasViewer/AreasViewer.styles.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +174 -6
- package/components/areas/components/AreasViewer/constants.d.ts +12 -0
- package/components/areas/components/AreasViewer/constants.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/constants.js +5 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts +9 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerEnum.js +2 -2
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +27 -0
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/slots/AreasViewerSlots.js +62 -25
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts +1 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.js +4 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts +1 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +12 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts +78 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/helpers/panelRuntime.js +86 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts +33 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/useOverlayPanelResize.js +91 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePanelsByArea.js +45 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts +16 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/hooks/usePinnedPanelResize.js +105 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/AreaPanels.js +158 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts +15 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeInteractionLayer.js +19 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts +14 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelResizeRail.js +35 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts +7 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.d.ts.map +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/subcomponents/AreaPanels/subcomponents/PanelWindow.js +68 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts +61 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts +3 -6
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +45 -45
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts +1 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useHeaderActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useRightActions.js +68 -40
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +6 -11
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +77 -76
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts +3 -5
- package/components/areas/contexts/AreasContext/helpers/generateModuleCount.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts +20 -15
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +8 -7
- package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/index.js +51 -48
- package/components/areas/contexts/AreasContext/store.d.ts +2 -3
- package/components/areas/contexts/AreasContext/store.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/store.js +397 -290
- package/components/areas/contexts/AreasContext/types.d.ts +109 -85
- package/components/areas/contexts/AreasContext/types.d.ts.map +1 -1
- package/components/areas/dictionary.d.ts +3 -0
- package/components/areas/dictionary.d.ts.map +1 -1
- package/components/areas/dictionary.js +9 -6
- package/components/areas/hooks/useAreas/index.d.ts +2 -2
- package/components/areas/hooks/useAreas/index.js +4 -4
- package/components/areas/types.d.ts +173 -47
- package/components/areas/types.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts +2 -1
- package/components/areas/utils/useOnClickOutside/index.d.ts.map +1 -1
- package/components/areas/utils/useOnClickOutside/index.js +15 -0
- package/components/extended/index.d.ts +0 -1
- package/components/extended/index.d.ts.map +1 -1
- package/components/hook-form/index.d.ts +0 -1
- package/components/hook-form/index.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +5 -4
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts.map +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/index.d.ts.map +1 -1
- package/hooks/useWindowCloseGuard/index.d.ts +18 -0
- package/hooks/useWindowCloseGuard/index.d.ts.map +1 -0
- package/hooks/useWindowCloseGuard/index.js +56 -0
- package/index.js +664 -675
- package/package.json +7 -10
- package/test/mocks/dictionary-mock.d.ts +2 -0
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +0 -247
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +0 -297
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts +0 -82
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/constants.js +0 -149
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts +0 -11
- package/components/extended/ReactSimpleCodeEditor/dictionary.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/dictionary.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts +0 -59
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/highlighting.js +0 -1063
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts +0 -6
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/helpers/languageIcon.js +0 -7
- package/components/extended/ReactSimpleCodeEditor/index.d.ts +0 -4
- package/components/extended/ReactSimpleCodeEditor/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +0 -18
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +0 -4
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +0 -84
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +0 -63
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts +0 -3
- package/components/extended/ReactSimpleCodeEditor/slots/index.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts +0 -15
- package/components/extended/ReactSimpleCodeEditor/storybookRuntime.d.ts.map +0 -1
- package/components/extended/ReactSimpleCodeEditor/types.d.ts +0 -127
- package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts +0 -7
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.d.ts.map +0 -1
- package/components/hook-form/RHFCodeEditor/RHFCodeEditor.js +0 -6
- package/components/hook-form/RHFCodeEditor/index.d.ts +0 -3
- 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,
|
|
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
|
|
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
|
|
5
|
-
import
|
|
6
|
-
import { HeaderWindowBase as
|
|
7
|
-
import { EditionInfo as
|
|
8
|
-
import { WindowBaseStyled as
|
|
9
|
-
import { useComponentSize as
|
|
10
|
-
import { WindowBaseSlots as
|
|
11
|
-
const
|
|
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:
|
|
14
|
-
size:
|
|
15
|
-
selected:
|
|
13
|
+
children: u,
|
|
14
|
+
size: d = "medium",
|
|
15
|
+
selected: s = !1,
|
|
16
16
|
maximized: t,
|
|
17
|
-
variant:
|
|
18
|
-
version:
|
|
19
|
-
buildTime:
|
|
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:
|
|
27
|
-
emergeType:
|
|
28
|
-
collapsed:
|
|
29
|
-
draggable:
|
|
30
|
-
...
|
|
31
|
-
} =
|
|
32
|
-
selected:
|
|
33
|
-
variant: t ? "text" :
|
|
34
|
-
size:
|
|
35
|
-
emergeType:
|
|
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:
|
|
38
|
-
draggable:
|
|
37
|
+
collapsed: p,
|
|
38
|
+
draggable: f
|
|
39
39
|
};
|
|
40
|
-
return /* @__PURE__ */ e(
|
|
41
|
-
|
|
40
|
+
return /* @__PURE__ */ e(A, { defaultSize: c, children: /* @__PURE__ */ T(
|
|
41
|
+
E,
|
|
42
42
|
{
|
|
43
|
-
className:
|
|
44
|
-
...i(o,
|
|
45
|
-
ownerState:
|
|
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
|
-
|
|
49
|
+
N,
|
|
50
50
|
{
|
|
51
|
-
...i(o,
|
|
52
|
-
version:
|
|
53
|
-
buildTime:
|
|
54
|
-
size:
|
|
55
|
-
variant:
|
|
56
|
-
selected:
|
|
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:
|
|
58
|
+
collapsed: p,
|
|
59
59
|
onClose: B,
|
|
60
|
-
emergeType:
|
|
61
|
-
draggable:
|
|
62
|
-
...
|
|
60
|
+
emergeType: r,
|
|
61
|
+
draggable: f,
|
|
62
|
+
...z
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
|
|
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,
|
|
71
|
-
ownerState:
|
|
72
|
-
children:
|
|
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
|
-
|
|
81
|
+
J as WindowBase
|
|
82
82
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WindowBaseStyles } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
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,
|
|
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
|
|
2
|
-
import { getSizeStyles as
|
|
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
|
-
//
|
|
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" ?
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
17
|
-
* @returns El ID de la ventana actual.
|
|
15
|
+
* Read the current window id.
|
|
18
16
|
*/
|
|
19
17
|
getWindowId: () => string;
|
|
20
18
|
/**
|
|
21
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
31
|
+
* Start the shell progress indicator.
|
|
42
32
|
*/
|
|
43
33
|
startProgress: () => void;
|
|
44
34
|
/**
|
|
45
|
-
*
|
|
35
|
+
* Stop the shell progress indicator.
|
|
46
36
|
*/
|
|
47
37
|
stopProgress: () => void;
|
|
48
38
|
/**
|
|
49
|
-
*
|
|
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
|
-
*
|
|
43
|
+
* Close the current window.
|
|
55
44
|
*/
|
|
56
45
|
close: (useFnQueryClose?: boolean) => void;
|
|
57
46
|
/**
|
|
58
|
-
*
|
|
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:
|
|
49
|
+
setFnQueryClose: (fnQueryClose: WindowQueryCloseHandler) => void;
|
|
62
50
|
/**
|
|
63
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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,
|
|
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
|
|
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:
|
|
19
|
+
size: r,
|
|
20
20
|
selected: B,
|
|
21
21
|
maximized: _,
|
|
22
22
|
version: d,
|
|
23
23
|
buildTime: f,
|
|
24
24
|
variant: E,
|
|
25
|
-
actions:
|
|
25
|
+
actions: a = [],
|
|
26
26
|
collapsed: S,
|
|
27
|
-
emergeType:
|
|
27
|
+
emergeType: s,
|
|
28
28
|
draggable: g
|
|
29
|
-
} = N, { host_static_assets: l, environment_assets: c } = H(), { dateFormatter: h } = P(), [O, R] = b(() =>
|
|
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 =
|
|
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
|
-
}, [
|
|
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:
|
|
72
|
-
emergeType:
|
|
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__ */
|
|
79
|
-
/* @__PURE__ */ m(q, { size:
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
u && /* @__PURE__ */
|
|
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:
|
|
85
|
+
size: r,
|
|
86
86
|
ownerState: n
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
|
-
u && /* @__PURE__ */
|
|
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__ */
|
|
100
|
-
$.length > 0 && /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
*
|
|
4
|
-
*
|
|
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
|
|
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
|
|
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
|
|
7
|
+
import { ICONS as w } from "../../icons.js";
|
|
8
8
|
import { AreaChipMobile as B } from "./subcomponents/AreaChipMobile/AreaChipMobile.js";
|
|
9
|
-
import { useRef as
|
|
10
|
-
import { getAreasDictionary as
|
|
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
|
|
20
|
+
const _o = (_) => {
|
|
21
21
|
const {
|
|
22
|
-
color:
|
|
23
|
-
size:
|
|
22
|
+
color: p = "primary",
|
|
23
|
+
size: g = "medium",
|
|
24
24
|
className: R,
|
|
25
25
|
dataTestId: b,
|
|
26
26
|
...D
|
|
27
|
-
} =
|
|
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:
|
|
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
|
|
44
|
-
isMobile:
|
|
45
|
-
color:
|
|
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:
|
|
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:
|
|
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:
|
|
83
|
+
children: h ? /* @__PURE__ */ e(B, {}) : /* @__PURE__ */ I(y, { children: [
|
|
84
84
|
/* @__PURE__ */ e(
|
|
85
85
|
q,
|
|
86
86
|
{
|
|
87
|
-
"aria-label":
|
|
87
|
+
"aria-label": c(l(u.area_add_new)),
|
|
88
88
|
size: r,
|
|
89
89
|
variant: "contained",
|
|
90
|
-
ownerState:
|
|
91
|
-
src: `${
|
|
90
|
+
ownerState: d,
|
|
91
|
+
src: `${f}/${C}/frontend/components/areas/assets/icons/${w.ADD_AREA}`,
|
|
92
92
|
onClick: E,
|
|
93
|
-
tooltip:
|
|
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:
|
|
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
|
-
|
|
114
|
-
/* @__PURE__ */ e(X, { size: r, skeletonWidth: "80px", children:
|
|
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: `${
|
|
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
|
-
|
|
138
|
+
_o as AreasAdmin
|
|
139
139
|
};
|