@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,36 +1,36 @@
|
|
|
1
|
-
import { createStore as
|
|
2
|
-
import { devtools as
|
|
3
|
-
import { immer as
|
|
4
|
-
import { getCookiesContainer as
|
|
5
|
-
import { createDynamicMFStore as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { generateModuleCount as
|
|
9
|
-
import { AREAS_STORE_ID as
|
|
10
|
-
import { helperSelectLayout as
|
|
11
|
-
import { deleteCookie as
|
|
12
|
-
import { isEqualLayouts as
|
|
13
|
-
import { cloneLayouts as
|
|
14
|
-
const
|
|
15
|
-
const { enabled:
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
const
|
|
1
|
+
import { createStore as x } from "zustand";
|
|
2
|
+
import { devtools as N } from "zustand/middleware";
|
|
3
|
+
import { immer as b } from "zustand/middleware/immer";
|
|
4
|
+
import { getCookiesContainer as E, getDataFromResponse as R, getParmsFromValue as $, setColapsedLayoutBreakPoints as F, COOKIE_BREAKPOINT_LAYOUTS as B, DEBOUCED_SAVE_TIME as H, DEFAULT_WINDOW as I, MARGIN_GRIDLAYOUT as y, COOKIE_WINDOWS as U, deleteLayoutFromBreakPoints as G, RESPONSIVE_ROW_HEIGHTS as K, PADDING_GRIDLAYOUT as P, NORMALIZED_COLS as Q, addArea as S, DEFAULT_AREA as z, getSelectedAreaIdFromCookies as V, COOKIE_WINDOW_SELECTED as Y, COOKIE_AREAS_ADMIN_CONTAINER_ID as T, COOKIE_AREAS_ADMIN_ID as D } from "./helpers/helper.js";
|
|
5
|
+
import { createDynamicMFStore as O } from "../../../WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
6
|
+
import j from "lodash-es/cloneDeep";
|
|
7
|
+
import q from "lodash-es/debounce";
|
|
8
|
+
import { generateModuleCount as L } from "./helpers/generateModuleCount.js";
|
|
9
|
+
import { AREAS_STORE_ID as Z } from "../../constants.js";
|
|
10
|
+
import { helperSelectLayout as v } from "./helpers/selectLayout.js";
|
|
11
|
+
import { deleteCookie as M, setCookie as C, getCookie as _ } from "../../../../helpers/cookies/cookies.js";
|
|
12
|
+
import { isEqualLayouts as J } from "../../../GridLayout/utils.js";
|
|
13
|
+
import { cloneLayouts as X, addLayoutItemToBreakPoints as g } from "../../../GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
14
|
+
const ee = (k, W) => {
|
|
15
|
+
const { enabled: w = !1 } = W;
|
|
16
|
+
return w && process.env.NODE_ENV === "development" ? N(k, W) : k;
|
|
17
|
+
}, pe = (k, W = !1) => {
|
|
18
|
+
const w = {
|
|
19
19
|
currentAreaId: "",
|
|
20
20
|
currentModuleId: "",
|
|
21
21
|
areasIds: [],
|
|
22
22
|
hashAreas: {},
|
|
23
23
|
hashWindows: {},
|
|
24
24
|
windowsModalsIds: [],
|
|
25
|
-
...
|
|
25
|
+
...k
|
|
26
26
|
};
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
...
|
|
27
|
+
return x(
|
|
28
|
+
ee(
|
|
29
|
+
b((i, a) => ({
|
|
30
|
+
...w,
|
|
31
31
|
areasActions: {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Initialize the Areas store.
|
|
34
34
|
*/
|
|
35
35
|
init: () => {
|
|
36
36
|
if (a().ownerState?.status !== "init")
|
|
@@ -44,40 +44,40 @@ const g = (f, k) => {
|
|
|
44
44
|
i((r) => {
|
|
45
45
|
r.ownerState.status = "loading";
|
|
46
46
|
});
|
|
47
|
-
const
|
|
47
|
+
const e = _({
|
|
48
48
|
networkOperation: a().networkOperation,
|
|
49
49
|
params: {
|
|
50
50
|
f: [
|
|
51
|
-
{ n: "container_id", o: "e", o1:
|
|
52
|
-
{ n: "id", o: "e", o1:
|
|
51
|
+
{ n: "container_id", o: "e", o1: T },
|
|
52
|
+
{ n: "id", o: "e", o1: D }
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
55
|
+
}), o = a().networkOperation({
|
|
56
56
|
method: "GET",
|
|
57
57
|
endPoint: "areas",
|
|
58
58
|
parms: {},
|
|
59
59
|
toastSuccess: !1
|
|
60
60
|
});
|
|
61
61
|
let s;
|
|
62
|
-
Promise.allSettled([
|
|
62
|
+
Promise.allSettled([o, e]).then(([r, n]) => {
|
|
63
63
|
if (r?.status === "fulfilled") {
|
|
64
64
|
const t = r?.value?.data;
|
|
65
65
|
i((d) => {
|
|
66
66
|
if (t && Array.isArray(t) && t.length > 0)
|
|
67
|
-
for (let
|
|
68
|
-
const
|
|
69
|
-
...
|
|
70
|
-
...t[
|
|
67
|
+
for (let c = 0; c < t.length; c++) {
|
|
68
|
+
const l = {
|
|
69
|
+
...z,
|
|
70
|
+
...t[c],
|
|
71
|
+
// API-backed areas should lazily load windows on first selection.
|
|
71
72
|
loadWindows: !0
|
|
72
|
-
//Se indica que si se carguen las ventas debido a que viene de la API
|
|
73
73
|
};
|
|
74
|
-
d.hashAreas[
|
|
74
|
+
d.hashAreas[l.id] = l, d.areasIds.push(l.id);
|
|
75
75
|
}
|
|
76
76
|
else
|
|
77
|
-
|
|
77
|
+
S(d);
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
n.status === "fulfilled" && (s =
|
|
80
|
+
n.status === "fulfilled" && (s = V(n?.value));
|
|
81
81
|
}).finally(() => {
|
|
82
82
|
if (i((r) => {
|
|
83
83
|
r.ownerState.status = "loaded";
|
|
@@ -88,23 +88,23 @@ const g = (f, k) => {
|
|
|
88
88
|
});
|
|
89
89
|
},
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Add a blank work area and select it.
|
|
92
92
|
*/
|
|
93
93
|
addArea: () => {
|
|
94
|
-
let
|
|
95
|
-
return i((
|
|
96
|
-
|
|
97
|
-
}), a().areasActions.selectArea(
|
|
94
|
+
let e = "";
|
|
95
|
+
return i((o) => {
|
|
96
|
+
e = S(o);
|
|
97
|
+
}), a().areasActions.selectArea(e), e;
|
|
98
98
|
},
|
|
99
99
|
/**
|
|
100
100
|
* editArea store
|
|
101
101
|
*/
|
|
102
|
-
editArea: (
|
|
102
|
+
editArea: (e, o) => {
|
|
103
103
|
i((s) => {
|
|
104
|
-
s.hashAreas[
|
|
104
|
+
s.hashAreas[e] && (s.hashAreas[e].name = o, s.loadAreasFromNetwork && s.networkOperation({
|
|
105
105
|
method: "PATCH",
|
|
106
|
-
endPoint: `areas/${
|
|
107
|
-
data: { name:
|
|
106
|
+
endPoint: `areas/${e}`,
|
|
107
|
+
data: { name: o },
|
|
108
108
|
toastSuccess: !1,
|
|
109
109
|
toastError: !1
|
|
110
110
|
}));
|
|
@@ -113,60 +113,60 @@ const g = (f, k) => {
|
|
|
113
113
|
/**
|
|
114
114
|
* deleteArea store
|
|
115
115
|
*/
|
|
116
|
-
deleteArea: (
|
|
117
|
-
let
|
|
116
|
+
deleteArea: (e) => {
|
|
117
|
+
let o = "";
|
|
118
118
|
i((s) => {
|
|
119
|
-
if (!s.hashAreas[
|
|
119
|
+
if (!s.hashAreas[e] || s.areasIds.length < 2)
|
|
120
120
|
return;
|
|
121
|
-
const n = s.areasIds.indexOf(
|
|
121
|
+
const n = s.areasIds.indexOf(e);
|
|
122
122
|
if (n > -1) {
|
|
123
123
|
for (const d in s.hashWindows)
|
|
124
|
-
s.hashWindows[d].areaId ===
|
|
125
|
-
const t = s.areasIds.findIndex((d) => d ===
|
|
126
|
-
s.areasIds.splice(n, 1), delete s.hashAreas[
|
|
124
|
+
s.hashWindows[d].areaId === e && delete s.hashWindows[d];
|
|
125
|
+
const t = s.areasIds.findIndex((d) => d === e);
|
|
126
|
+
s.areasIds.splice(n, 1), delete s.hashAreas[e], s.currentAreaId === e && (o = s.areasIds[t <= s.areasIds.length - 1 ? t : s.areasIds.length - 1]);
|
|
127
127
|
}
|
|
128
128
|
s.loadAreasFromNetwork && s.networkOperation({
|
|
129
129
|
method: "DELETE",
|
|
130
|
-
endPoint: `areas/${
|
|
130
|
+
endPoint: `areas/${e}`,
|
|
131
131
|
parms: {},
|
|
132
132
|
toastSuccess: !1,
|
|
133
133
|
toastError: !1
|
|
134
|
-
}), s.loadCookiesFromNetwork &&
|
|
134
|
+
}), s.loadCookiesFromNetwork && M({
|
|
135
135
|
networkOperation: a().networkOperation,
|
|
136
|
-
data: { f: [{ n: "container_id", o: "c", o1:
|
|
136
|
+
data: { f: [{ n: "container_id", o: "c", o1: e }] }
|
|
137
137
|
}).catch(() => {
|
|
138
138
|
});
|
|
139
|
-
}),
|
|
139
|
+
}), o && a().areasActions.selectArea(o);
|
|
140
140
|
},
|
|
141
141
|
/**
|
|
142
142
|
* selectArea store
|
|
143
143
|
*/
|
|
144
|
-
selectArea: (
|
|
145
|
-
i((
|
|
146
|
-
|
|
147
|
-
}), a().hashAreas[
|
|
148
|
-
|
|
149
|
-
})), a().loadCookiesFromNetwork &&
|
|
144
|
+
selectArea: (e) => {
|
|
145
|
+
i((o) => {
|
|
146
|
+
o.currentAreaId = e, o.hashAreas[e].currentLayoutId ? o.currentModuleId = o.hashWindows[o.hashAreas[e].currentLayoutId].moduleId : o.currentModuleId = "";
|
|
147
|
+
}), a().hashAreas[e].status === "init" && (a().hashAreas[e].loadWindows ? a().areaActions.loadWindowsFromApi(e) : i((o) => {
|
|
148
|
+
o.hashAreas[e].status = "loaded";
|
|
149
|
+
})), a().loadCookiesFromNetwork && C({
|
|
150
150
|
networkOperation: a().networkOperation,
|
|
151
|
-
endPoint: `${
|
|
152
|
-
value: { selectedAreaId:
|
|
151
|
+
endPoint: `${T}/${D}`,
|
|
152
|
+
value: { selectedAreaId: e }
|
|
153
153
|
}).catch(() => {
|
|
154
154
|
});
|
|
155
155
|
},
|
|
156
156
|
/**
|
|
157
157
|
* setHandlerGetLabel
|
|
158
158
|
*/
|
|
159
|
-
setHandlerGetLabel: (
|
|
160
|
-
i((
|
|
161
|
-
|
|
159
|
+
setHandlerGetLabel: (e) => {
|
|
160
|
+
i((o) => {
|
|
161
|
+
o.getLabel = e;
|
|
162
162
|
});
|
|
163
163
|
},
|
|
164
164
|
/**
|
|
165
165
|
* setExternalState
|
|
166
166
|
*/
|
|
167
|
-
setExternalState: (
|
|
168
|
-
i((
|
|
169
|
-
|
|
167
|
+
setExternalState: (e) => {
|
|
168
|
+
i((o) => {
|
|
169
|
+
o.ownerState = { ...o.ownerState, ...e };
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
},
|
|
@@ -174,131 +174,130 @@ const g = (f, k) => {
|
|
|
174
174
|
/**
|
|
175
175
|
* addWindow store
|
|
176
176
|
*/
|
|
177
|
-
addWindow: (
|
|
178
|
-
const
|
|
179
|
-
|
|
177
|
+
addWindow: (e) => {
|
|
178
|
+
const o = `${a().currentAreaId}_window_${(/* @__PURE__ */ new Date()).getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
|
|
179
|
+
e.emergeType === "layout" ? a().areaActions.addLayout(
|
|
180
180
|
a().currentAreaId,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
) :
|
|
181
|
+
o,
|
|
182
|
+
e
|
|
183
|
+
) : e.emergeType === "popup" ? a().areaActions.addPopup(
|
|
184
184
|
a().currentAreaId,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
) :
|
|
185
|
+
o,
|
|
186
|
+
e
|
|
187
|
+
) : e.emergeType === "panel" ? a().areaActions.addPanel(
|
|
188
188
|
a().currentAreaId,
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
o,
|
|
190
|
+
e
|
|
191
|
+
) : e.emergeType === "modal" && a().areaActions.addWindowModal(
|
|
192
|
+
a().currentAreaId,
|
|
193
|
+
o,
|
|
194
|
+
e
|
|
191
195
|
);
|
|
192
196
|
},
|
|
193
197
|
/**
|
|
194
198
|
* addLayout store
|
|
195
199
|
*/
|
|
196
|
-
addLayout: (
|
|
197
|
-
let r =
|
|
198
|
-
const n = !1, t =
|
|
200
|
+
addLayout: (e, o, s) => {
|
|
201
|
+
let r = o;
|
|
202
|
+
const n = !1, t = L(
|
|
199
203
|
a().currentAreaId,
|
|
200
204
|
s.moduleId,
|
|
201
205
|
a().hashWindows
|
|
202
206
|
), d = {
|
|
203
207
|
...s.layoutProps,
|
|
204
|
-
i:
|
|
208
|
+
i: o,
|
|
205
209
|
isDraggable: !0,
|
|
206
210
|
isResizable: !0,
|
|
207
211
|
freeMove: n
|
|
208
212
|
};
|
|
209
|
-
i((
|
|
210
|
-
const
|
|
211
|
-
if (
|
|
213
|
+
i((c) => {
|
|
214
|
+
const l = c.hashAreas[e];
|
|
215
|
+
if (l) {
|
|
212
216
|
if (s.replaceMeId)
|
|
213
|
-
for (let
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
r =
|
|
217
|
+
for (let m = 0; m < l.layoutItemsIds.length; m++) {
|
|
218
|
+
const h = l.layoutItemsIds[m], f = c.hashWindows[h];
|
|
219
|
+
if (f.replaceMeId === s.replaceMeId) {
|
|
220
|
+
r = h, f.dynamicMFStore.getState().actions.changeData(s.dynamicParams);
|
|
217
221
|
break;
|
|
218
222
|
}
|
|
219
223
|
}
|
|
220
|
-
if (r ===
|
|
221
|
-
const
|
|
224
|
+
if (r === o) {
|
|
225
|
+
const m = O({
|
|
222
226
|
dynamicMFParameters: s.dynamicParams
|
|
223
227
|
});
|
|
224
|
-
|
|
228
|
+
c.hashWindows[o] = {
|
|
225
229
|
...s,
|
|
226
|
-
areaId:
|
|
227
|
-
windowId:
|
|
228
|
-
onClose: (
|
|
229
|
-
a().areaActions.closeLayout(
|
|
230
|
+
areaId: e,
|
|
231
|
+
windowId: o,
|
|
232
|
+
onClose: (h) => {
|
|
233
|
+
a().areaActions.closeLayout(e, h);
|
|
230
234
|
},
|
|
231
|
-
...
|
|
232
|
-
dynamicMFStore:
|
|
235
|
+
...I,
|
|
236
|
+
dynamicMFStore: m,
|
|
233
237
|
moduleCount: t
|
|
234
|
-
},
|
|
235
|
-
|
|
238
|
+
}, l.layoutItemsIds.push(o), l.maximizedId && (l.maximizedId = o), l.layouts = g(
|
|
239
|
+
l.layouts,
|
|
236
240
|
d,
|
|
237
|
-
|
|
238
|
-
[
|
|
239
|
-
[
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
),
|
|
241
|
+
Q,
|
|
242
|
+
[y, y],
|
|
243
|
+
[P, P],
|
|
244
|
+
K,
|
|
245
|
+
l.containerHeight,
|
|
246
|
+
l.currentBreakpoint
|
|
247
|
+
), l.currentBreakpoint === "xxs" && (l.maximizedId = o), v(c, e, o, !0), a().popupsProviderMethods.setSelectedPopupId(e, void 0);
|
|
244
248
|
}
|
|
245
249
|
}
|
|
246
|
-
}), a().areaActions.saveLayouts(
|
|
250
|
+
}), a().areaActions.saveLayouts(e), a().areaActions.bouncedSaveBreakpointsLayouts(e);
|
|
247
251
|
},
|
|
248
252
|
/**
|
|
249
253
|
* closeLayout
|
|
250
254
|
*/
|
|
251
|
-
closeLayout: (
|
|
255
|
+
closeLayout: (e, o) => {
|
|
252
256
|
i((s) => {
|
|
253
|
-
const r = s.hashAreas[
|
|
257
|
+
const r = s.hashAreas[e];
|
|
254
258
|
if (!r)
|
|
255
259
|
return;
|
|
256
|
-
const n = r.layoutItemsIds.indexOf(
|
|
257
|
-
n > -1 && r.layoutItemsIds.splice(n, 1),
|
|
258
|
-
}), a().areaActions.saveLayouts(
|
|
259
|
-
for (let s = 0; s < a().hashAreas[
|
|
260
|
-
const r = a().hashAreas[
|
|
261
|
-
n && n.parentId ===
|
|
260
|
+
const n = r.layoutItemsIds.indexOf(o);
|
|
261
|
+
n > -1 && r.layoutItemsIds.splice(n, 1), G(r, o), delete s.hashWindows[o], s.hashAreas[e].currentLayoutId === o && v(s, e, "");
|
|
262
|
+
}), a().areaActions.saveLayouts(e), a().hashAreas[e].maximizedId === o && a().areaActions.maximizeLayout(e);
|
|
263
|
+
for (let s = 0; s < a().hashAreas[e].layoutItemsIds.length; s++) {
|
|
264
|
+
const r = a().hashAreas[e].layoutItemsIds[s], n = a().hashWindows[r];
|
|
265
|
+
n && n.parentId === o && a().areaActions.closeLayout(e, n.windowId);
|
|
262
266
|
}
|
|
263
|
-
a().popupsProviderMethods.closeAllPopupsByParentId(
|
|
267
|
+
a().popupsProviderMethods.closeAllPopupsByParentId(o);
|
|
264
268
|
},
|
|
265
269
|
/**
|
|
266
270
|
* saveLayouts
|
|
267
271
|
*/
|
|
268
|
-
saveLayouts: (
|
|
272
|
+
saveLayouts: (e) => {
|
|
269
273
|
if (!a().loadCookiesFromNetwork)
|
|
270
274
|
return;
|
|
271
|
-
let
|
|
272
|
-
const s = a().hashAreas[
|
|
275
|
+
let o = 0;
|
|
276
|
+
const s = a().hashAreas[e];
|
|
273
277
|
if (!s)
|
|
274
278
|
return;
|
|
275
279
|
const r = {};
|
|
276
280
|
for (let n = 0; n < s.layoutItemsIds.length; n++) {
|
|
277
|
-
const t = s.layoutItemsIds[n];
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}, h = {};
|
|
291
|
-
for (const c in l)
|
|
292
|
-
h[c] = d[c];
|
|
293
|
-
r[t] = h, e++;
|
|
294
|
-
}
|
|
281
|
+
const t = s.layoutItemsIds[n], d = a().hashWindows[t];
|
|
282
|
+
d?.emergeType === "layout" && d.winType === "microfrontend" && (r[t] = {
|
|
283
|
+
winType: d.winType,
|
|
284
|
+
emergeType: d.emergeType,
|
|
285
|
+
title: d.title,
|
|
286
|
+
url_icon: d.iconUrl,
|
|
287
|
+
windowOptions: d.windowOptions,
|
|
288
|
+
moduleId: d.moduleId,
|
|
289
|
+
windowId: d.windowId,
|
|
290
|
+
mfProps: d.mfProps,
|
|
291
|
+
moduleCount: d.moduleCount,
|
|
292
|
+
iconUrl: d.iconUrl
|
|
293
|
+
}, o++);
|
|
295
294
|
}
|
|
296
|
-
|
|
295
|
+
o > 0 ? C({
|
|
297
296
|
networkOperation: a().networkOperation,
|
|
298
|
-
endPoint: `${s.id}/${
|
|
297
|
+
endPoint: `${s.id}/${U}`,
|
|
299
298
|
value: r
|
|
300
299
|
}).catch(() => {
|
|
301
|
-
}) :
|
|
300
|
+
}) : M({
|
|
302
301
|
networkOperation: a().networkOperation,
|
|
303
302
|
data: { f: [{ n: "container_id", o: "c", o1: s.id }] }
|
|
304
303
|
}).catch(() => {
|
|
@@ -307,121 +306,229 @@ const g = (f, k) => {
|
|
|
307
306
|
/**
|
|
308
307
|
* addPopup store
|
|
309
308
|
*/
|
|
310
|
-
addPopup: (
|
|
311
|
-
let r =
|
|
309
|
+
addPopup: (e, o, s) => {
|
|
310
|
+
let r = o;
|
|
312
311
|
i((n) => {
|
|
313
|
-
if (n.hashAreas[
|
|
312
|
+
if (n.hashAreas[e]) {
|
|
314
313
|
if (s.replaceMeId) {
|
|
315
314
|
for (const d in n.hashWindows)
|
|
316
315
|
if (n.hashWindows[d].replaceMeId === s.replaceMeId) {
|
|
317
|
-
const
|
|
318
|
-
r = d,
|
|
316
|
+
const c = n.hashWindows[d];
|
|
317
|
+
r = d, c.dynamicMFStore.getState().actions.changeData(s.dynamicParams), a().popupsProviderMethods.bringPopupOnFront(d, !0);
|
|
319
318
|
break;
|
|
320
319
|
}
|
|
321
320
|
}
|
|
322
|
-
if (r ===
|
|
323
|
-
const d =
|
|
321
|
+
if (r === o) {
|
|
322
|
+
const d = O({
|
|
324
323
|
dynamicMFParameters: s.dynamicParams
|
|
325
324
|
});
|
|
326
|
-
n.hashWindows[
|
|
325
|
+
n.hashWindows[o] = {
|
|
327
326
|
...s,
|
|
328
|
-
...
|
|
329
|
-
areaId:
|
|
330
|
-
windowId:
|
|
331
|
-
|
|
332
|
-
|
|
327
|
+
...I,
|
|
328
|
+
areaId: e,
|
|
329
|
+
windowId: o,
|
|
330
|
+
// Legacy behavior: popup close requests issued through Areas
|
|
331
|
+
// still reuse the layout-style close path. This matches the
|
|
332
|
+
// previous contract, but teardown ownership and close-veto
|
|
333
|
+
// orchestration remain explicit follow-up debt.
|
|
334
|
+
onClose: (u) => {
|
|
335
|
+
a().areaActions.closeLayout(e, u);
|
|
333
336
|
},
|
|
334
337
|
dynamicMFStore: d
|
|
335
338
|
};
|
|
336
|
-
const { emergeType:
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
+
const { emergeType: c, popupProps: l, ...m } = s, h = s.parentId, f = (u, p, A) => {
|
|
340
|
+
h ? A === "select" && a().areaActions.selectLayout(u, h) : a().areaActions.selectLayout(u, "");
|
|
341
|
+
};
|
|
339
342
|
a().popupsProviderMethods.addPopup({
|
|
340
|
-
...
|
|
341
|
-
...
|
|
342
|
-
popupId:
|
|
343
|
-
groupId:
|
|
343
|
+
...m,
|
|
344
|
+
...l,
|
|
345
|
+
popupId: o,
|
|
346
|
+
groupId: e,
|
|
344
347
|
dynamicMFStore: d,
|
|
345
348
|
dynamicParams: s.dynamicParams,
|
|
346
|
-
onRemove: () => a().areaActions.closePopup(
|
|
347
|
-
|
|
348
|
-
*
|
|
349
|
-
*/
|
|
350
|
-
onSelectedPopupIdChange: u,
|
|
349
|
+
onRemove: () => a().areaActions.closePopup(e, o),
|
|
350
|
+
onSelectedPopupIdChange: f,
|
|
351
351
|
allowHeightResizeContainer: !0,
|
|
352
352
|
allowWidthResizeContainer: !1,
|
|
353
353
|
bounds: {
|
|
354
|
-
left:
|
|
355
|
-
top:
|
|
356
|
-
right: -
|
|
357
|
-
bottom: -
|
|
354
|
+
left: y,
|
|
355
|
+
top: y,
|
|
356
|
+
right: -y,
|
|
357
|
+
bottom: -y
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
});
|
|
363
363
|
},
|
|
364
|
+
/**
|
|
365
|
+
* addPanel store
|
|
366
|
+
*/
|
|
367
|
+
addPanel: (e, o, s) => {
|
|
368
|
+
let r = o, n;
|
|
369
|
+
if (i((h) => {
|
|
370
|
+
const f = h.hashAreas[e];
|
|
371
|
+
if (f) {
|
|
372
|
+
if (s.replaceMeId)
|
|
373
|
+
for (let u = 0; u < f.panelItemsIds.length; u++) {
|
|
374
|
+
const p = f.panelItemsIds[u], A = h.hashWindows[p];
|
|
375
|
+
if (A?.replaceMeId === s.replaceMeId) {
|
|
376
|
+
r = p, A.dynamicMFStore.getState().actions.changeData(s.dynamicParams);
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (n = f.panelItemsIds.find((u) => {
|
|
381
|
+
const p = h.hashWindows[u];
|
|
382
|
+
return p?.emergeType === "panel" && p.panelProps.side === s.panelProps.side;
|
|
383
|
+
}), !(n && r === o) && r === o) {
|
|
384
|
+
const u = O({
|
|
385
|
+
dynamicMFParameters: s.dynamicParams
|
|
386
|
+
}), p = L(
|
|
387
|
+
e,
|
|
388
|
+
s.moduleId,
|
|
389
|
+
h.hashWindows
|
|
390
|
+
);
|
|
391
|
+
h.hashWindows[o] = {
|
|
392
|
+
...s,
|
|
393
|
+
areaId: e,
|
|
394
|
+
windowId: o,
|
|
395
|
+
onClose: (A) => {
|
|
396
|
+
a().areaActions.closePanel(e, A);
|
|
397
|
+
},
|
|
398
|
+
...I,
|
|
399
|
+
dynamicMFStore: u,
|
|
400
|
+
moduleCount: p
|
|
401
|
+
}, f.panelItemsIds.push(o);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}), r !== o || !n)
|
|
405
|
+
return;
|
|
406
|
+
const t = n, d = a().hashWindows[t];
|
|
407
|
+
if (!d || d.emergeType !== "panel")
|
|
408
|
+
return;
|
|
409
|
+
let c = !1;
|
|
410
|
+
const l = () => {
|
|
411
|
+
c || (c = !0, a().areaActions.addPanel(e, o, s));
|
|
412
|
+
};
|
|
413
|
+
if (!d.fnQueryClose) {
|
|
414
|
+
a().windowActions.close(t, !1), l();
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const m = {
|
|
418
|
+
reason: "same-side-replace",
|
|
419
|
+
/**
|
|
420
|
+
* Close the occupied panel and mount the newest same-side intent
|
|
421
|
+
* once the guard explicitly approves the replacement.
|
|
422
|
+
*/
|
|
423
|
+
proceed() {
|
|
424
|
+
a().windowActions.close(t, !1), l();
|
|
425
|
+
},
|
|
426
|
+
cancel: () => {
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
a().windowActions.close(
|
|
430
|
+
t,
|
|
431
|
+
!0,
|
|
432
|
+
m
|
|
433
|
+
);
|
|
434
|
+
},
|
|
364
435
|
/**
|
|
365
436
|
* closePopup
|
|
366
437
|
*/
|
|
367
|
-
closePopup: (
|
|
438
|
+
closePopup: (e, o) => {
|
|
368
439
|
i((s) => {
|
|
369
|
-
s.hashAreas[
|
|
440
|
+
s.hashAreas[e] && delete s.hashWindows[o];
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
/**
|
|
444
|
+
* closePanel
|
|
445
|
+
*/
|
|
446
|
+
closePanel: (e, o) => {
|
|
447
|
+
i((s) => {
|
|
448
|
+
const r = s.hashAreas[e];
|
|
449
|
+
if (!r)
|
|
450
|
+
return;
|
|
451
|
+
const n = r.panelItemsIds.indexOf(o);
|
|
452
|
+
n > -1 && r.panelItemsIds.splice(n, 1), delete s.hashWindows[o];
|
|
453
|
+
});
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* setPanelPinned
|
|
457
|
+
*/
|
|
458
|
+
setPanelPinned: (e, o, s) => {
|
|
459
|
+
i((r) => {
|
|
460
|
+
const n = r.hashAreas[e], t = r.hashWindows[o];
|
|
461
|
+
!n || t?.emergeType !== "panel" || (t.panelProps.pinned = s);
|
|
462
|
+
});
|
|
463
|
+
},
|
|
464
|
+
/**
|
|
465
|
+
* setPanelSize
|
|
466
|
+
*/
|
|
467
|
+
setPanelSize: (e, o, s) => {
|
|
468
|
+
i((r) => {
|
|
469
|
+
const n = r.hashAreas[e], t = r.hashWindows[o];
|
|
470
|
+
if (!(!n || t?.emergeType !== "panel")) {
|
|
471
|
+
if (t.panelProps.side === "left" || t.panelProps.side === "right") {
|
|
472
|
+
"width" in s && s.width !== void 0 && (t.panelProps.width = s.width), "maxWidth" in s && s.maxWidth !== void 0 && (t.panelProps.maxWidth = s.maxWidth);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
"height" in s && s.height !== void 0 && (t.panelProps.height = s.height), "maxHeight" in s && s.maxHeight !== void 0 && (t.panelProps.maxHeight = s.maxHeight);
|
|
476
|
+
}
|
|
370
477
|
});
|
|
371
478
|
},
|
|
372
479
|
/**
|
|
373
480
|
* closeWindowModal
|
|
374
481
|
*/
|
|
375
|
-
closeWindowModal: (
|
|
376
|
-
i((
|
|
377
|
-
const s =
|
|
378
|
-
s > -1 &&
|
|
482
|
+
closeWindowModal: (e) => {
|
|
483
|
+
i((o) => {
|
|
484
|
+
const s = o.windowsModalsIds.findIndex((r) => r === e);
|
|
485
|
+
s > -1 && o.windowsModalsIds.splice(s, 1), delete o.hashWindows[e];
|
|
379
486
|
});
|
|
380
487
|
},
|
|
381
488
|
/**
|
|
382
489
|
* addWindowModal
|
|
383
490
|
*/
|
|
384
|
-
addWindowModal: (
|
|
491
|
+
addWindowModal: (e, o, s) => {
|
|
385
492
|
i((r) => {
|
|
386
|
-
const n =
|
|
493
|
+
const n = O({
|
|
387
494
|
dynamicMFParameters: s.dynamicParams
|
|
388
495
|
});
|
|
389
|
-
r.windowsModalsIds.push(
|
|
390
|
-
const t =
|
|
496
|
+
r.windowsModalsIds.push(o);
|
|
497
|
+
const t = L(
|
|
391
498
|
a().currentAreaId,
|
|
392
499
|
s.moduleId,
|
|
393
500
|
a().hashWindows
|
|
394
501
|
);
|
|
395
|
-
r.hashWindows[
|
|
502
|
+
r.hashWindows[o] = {
|
|
396
503
|
...s,
|
|
397
|
-
areaId:
|
|
398
|
-
windowId:
|
|
399
|
-
...
|
|
504
|
+
areaId: e,
|
|
505
|
+
windowId: o,
|
|
506
|
+
...I,
|
|
400
507
|
onClose: a().areaActions.closeWindowModal,
|
|
401
508
|
dynamicMFStore: n,
|
|
402
509
|
moduleCount: t
|
|
403
510
|
};
|
|
404
511
|
});
|
|
405
512
|
},
|
|
406
|
-
bouncedSaveBreakpointsLayouts:
|
|
407
|
-
(
|
|
513
|
+
bouncedSaveBreakpointsLayouts: q(
|
|
514
|
+
(e) => {
|
|
408
515
|
if (!a().loadCookiesFromNetwork)
|
|
409
516
|
return;
|
|
410
|
-
const
|
|
411
|
-
...a().hashAreas[
|
|
517
|
+
const o = {
|
|
518
|
+
...a().hashAreas[e].layouts
|
|
412
519
|
}, s = {};
|
|
413
|
-
for (const r in
|
|
414
|
-
const n =
|
|
415
|
-
|
|
520
|
+
for (const r in o) {
|
|
521
|
+
const n = o[r];
|
|
522
|
+
o[r] = n.filter((t) => t.i === "none" ? !1 : a().hashAreas[e].layoutItemsIds.indexOf(t.i) > -1), o[r].length > 0 && (s[r] = o[r]);
|
|
416
523
|
}
|
|
417
|
-
Object.keys(s).length > 0 &&
|
|
524
|
+
Object.keys(s).length > 0 && C({
|
|
418
525
|
networkOperation: a().networkOperation,
|
|
419
|
-
endPoint: `${a().hashAreas[
|
|
526
|
+
endPoint: `${a().hashAreas[e].id}/${B}`,
|
|
420
527
|
value: s
|
|
421
528
|
}).catch(() => {
|
|
422
529
|
});
|
|
423
530
|
},
|
|
424
|
-
|
|
531
|
+
H,
|
|
425
532
|
{
|
|
426
533
|
leading: !0,
|
|
427
534
|
trailing: !0
|
|
@@ -430,95 +537,95 @@ const g = (f, k) => {
|
|
|
430
537
|
/**
|
|
431
538
|
* onBreakpointsLayoutsChange
|
|
432
539
|
*/
|
|
433
|
-
onBreakpointsLayoutsChange: (
|
|
434
|
-
|
|
435
|
-
r.hashAreas[
|
|
436
|
-
}), a().hashAreas[
|
|
540
|
+
onBreakpointsLayoutsChange: (e, o, s) => {
|
|
541
|
+
J(a().hashAreas[e].layouts, s) || (i((r) => {
|
|
542
|
+
r.hashAreas[e].layouts = X(s);
|
|
543
|
+
}), a().hashAreas[e].maximizedId || a().areaActions.bouncedSaveBreakpointsLayouts(e));
|
|
437
544
|
},
|
|
438
545
|
/**
|
|
439
546
|
* containerChange
|
|
440
547
|
*/
|
|
441
|
-
onContainerChange: (
|
|
548
|
+
onContainerChange: (e, o) => {
|
|
442
549
|
i((s) => {
|
|
443
|
-
s.hashAreas[
|
|
550
|
+
s.hashAreas[e].containerHeight = o.containerHeight, s.hashAreas[e].currentBreakpoint = o.breakpoint;
|
|
444
551
|
});
|
|
445
552
|
},
|
|
446
553
|
/**
|
|
447
554
|
* selectLayout
|
|
448
555
|
*/
|
|
449
|
-
selectLayout: (
|
|
450
|
-
a().hashAreas[
|
|
451
|
-
|
|
556
|
+
selectLayout: (e, o) => {
|
|
557
|
+
a().hashAreas[e].currentLayoutId !== o && i((s) => {
|
|
558
|
+
v(s, e, o);
|
|
452
559
|
});
|
|
453
560
|
},
|
|
454
561
|
/**
|
|
455
562
|
* unColapseLayoutItem
|
|
456
563
|
*/
|
|
457
|
-
unColapseLayoutItem: (
|
|
564
|
+
unColapseLayoutItem: (e, o) => {
|
|
458
565
|
i((s) => {
|
|
459
|
-
|
|
566
|
+
F(s.hashAreas[e], o, !1);
|
|
460
567
|
});
|
|
461
568
|
},
|
|
462
569
|
/**
|
|
463
570
|
* colapseLayoutItem
|
|
464
571
|
*/
|
|
465
|
-
colapseLayoutItem: (
|
|
466
|
-
!a().hashAreas[
|
|
467
|
-
|
|
572
|
+
colapseLayoutItem: (e, o) => {
|
|
573
|
+
!a().hashAreas[e].maximizedId && a().hashWindows[o] && i((s) => {
|
|
574
|
+
F(s.hashAreas[e], o, !0);
|
|
468
575
|
});
|
|
469
576
|
},
|
|
470
577
|
/**
|
|
471
578
|
* minimizeLayout
|
|
472
579
|
*/
|
|
473
|
-
maximizeLayout: (
|
|
580
|
+
maximizeLayout: (e, o) => {
|
|
474
581
|
i((s) => {
|
|
475
|
-
const r = s.hashAreas[
|
|
476
|
-
r && (r.maximizedId =
|
|
477
|
-
}),
|
|
582
|
+
const r = s.hashAreas[e];
|
|
583
|
+
r && (r.maximizedId = o);
|
|
584
|
+
}), o && a().areaActions.selectLayout(e, o);
|
|
478
585
|
},
|
|
479
586
|
/**
|
|
480
587
|
* normalizeLayouts
|
|
481
588
|
*/
|
|
482
|
-
normalizeLayouts: (
|
|
483
|
-
i((
|
|
484
|
-
const s =
|
|
589
|
+
normalizeLayouts: (e) => {
|
|
590
|
+
i((o) => {
|
|
591
|
+
const s = o.hashAreas[e];
|
|
485
592
|
s && (s.maximizedId = void 0);
|
|
486
593
|
});
|
|
487
594
|
},
|
|
488
595
|
/**
|
|
489
596
|
* loadWindowsFromApi
|
|
490
597
|
*/
|
|
491
|
-
loadWindowsFromApi: (
|
|
492
|
-
const
|
|
493
|
-
if (
|
|
494
|
-
if (!a().loadAreasFromNetwork || !a().loadCookiesFromNetwork || !
|
|
598
|
+
loadWindowsFromApi: (e) => {
|
|
599
|
+
const o = a().hashAreas[e];
|
|
600
|
+
if (o && o.status === "init") {
|
|
601
|
+
if (!a().loadAreasFromNetwork || !a().loadCookiesFromNetwork || !o.loadWindows) {
|
|
495
602
|
i((s) => {
|
|
496
|
-
s.hashAreas[
|
|
603
|
+
s.hashAreas[e].status = "loaded";
|
|
497
604
|
});
|
|
498
605
|
return;
|
|
499
606
|
}
|
|
500
607
|
i((s) => {
|
|
501
|
-
s.hashAreas[
|
|
502
|
-
}),
|
|
608
|
+
s.hashAreas[e].status = "loading";
|
|
609
|
+
}), _({
|
|
503
610
|
networkOperation: a().networkOperation,
|
|
504
|
-
params: { f: [{ n: "container_id", o: "e", o1:
|
|
611
|
+
params: { f: [{ n: "container_id", o: "e", o1: e }] }
|
|
505
612
|
}).then((s) => {
|
|
506
|
-
if (!a().hashAreas[
|
|
613
|
+
if (!a().hashAreas[e])
|
|
507
614
|
return;
|
|
508
615
|
const n = s.data;
|
|
509
616
|
i((t) => {
|
|
510
|
-
const d = t.hashAreas[
|
|
617
|
+
const d = t.hashAreas[e], { newBreakPointsLayouts: c, newHashLayoutItems: l } = R(
|
|
511
618
|
n,
|
|
512
619
|
t,
|
|
513
|
-
|
|
620
|
+
e
|
|
514
621
|
);
|
|
515
|
-
d.layouts =
|
|
516
|
-
const
|
|
517
|
-
|
|
622
|
+
d.layouts = c, d.layoutItemsIds = l, d.status = "loaded";
|
|
623
|
+
const m = $(Y, n) || { currentLayoutId: "" };
|
|
624
|
+
v(t, e, m?.currentLayoutId || "", !1);
|
|
518
625
|
});
|
|
519
626
|
}).catch((s) => {
|
|
520
627
|
i((r) => {
|
|
521
|
-
r.hashAreas[
|
|
628
|
+
r.hashAreas[e].status = "loaded";
|
|
522
629
|
});
|
|
523
630
|
});
|
|
524
631
|
}
|
|
@@ -536,96 +643,96 @@ const g = (f, k) => {
|
|
|
536
643
|
/**
|
|
537
644
|
* setActions
|
|
538
645
|
*/
|
|
539
|
-
setActions: (
|
|
646
|
+
setActions: (e, o, s, r) => {
|
|
540
647
|
i((n) => {
|
|
541
|
-
n.hashWindows[
|
|
648
|
+
n.hashWindows[e] && (n.hashWindows[e].moduleActions = j(o), n.hashWindows[e].version = s, n.hashWindows[e].buildTime = r);
|
|
542
649
|
});
|
|
543
650
|
},
|
|
544
651
|
/**
|
|
545
652
|
* getCookie
|
|
546
653
|
*/
|
|
547
|
-
getCookie: (
|
|
654
|
+
getCookie: (e, o) => a().hashWindows[e] ? a().hashWindows[e].cookies.windowCookies[o] || a().hashWindows[e].cookies.moduleCookies[o] : {},
|
|
548
655
|
/**
|
|
549
656
|
* getCookies
|
|
550
657
|
*/
|
|
551
|
-
getCookies: (
|
|
658
|
+
getCookies: (e, o) => a().hashWindows[e] ? o === "window" ? a().hashWindows[e].cookies.windowCookies : a().hashWindows[e].cookies.moduleCookies : {},
|
|
552
659
|
/**
|
|
553
660
|
* setCookie
|
|
554
661
|
*/
|
|
555
|
-
setCookie: (
|
|
662
|
+
setCookie: (e, o, s, r) => {
|
|
556
663
|
i((n) => {
|
|
557
|
-
const t = n.hashWindows[
|
|
558
|
-
t && (a().loadCookiesFromNetwork &&
|
|
664
|
+
const t = n.hashWindows[e];
|
|
665
|
+
t && (a().loadCookiesFromNetwork && C({
|
|
559
666
|
networkOperation: a().networkOperation,
|
|
560
|
-
endPoint: `${s === "module" ? t.moduleId :
|
|
667
|
+
endPoint: `${s === "module" ? t.moduleId : e}/${o}`,
|
|
561
668
|
value: r
|
|
562
669
|
}).catch(() => {
|
|
563
|
-
}), s === "window" ? t.cookies.windowCookies[
|
|
670
|
+
}), s === "window" ? t.cookies.windowCookies[o] = r : t.cookies.moduleCookies[o] = r);
|
|
564
671
|
});
|
|
565
672
|
},
|
|
566
673
|
/**
|
|
567
674
|
* close window
|
|
568
675
|
*/
|
|
569
|
-
close: (
|
|
570
|
-
const
|
|
571
|
-
if (
|
|
572
|
-
if (
|
|
573
|
-
|
|
676
|
+
close: (e, o = !0, s) => {
|
|
677
|
+
const r = a().hashWindows[e];
|
|
678
|
+
if (r) {
|
|
679
|
+
if (r.fnQueryClose && o) {
|
|
680
|
+
r.fnQueryClose(s);
|
|
574
681
|
return;
|
|
575
682
|
}
|
|
576
|
-
const
|
|
577
|
-
|
|
683
|
+
const n = r.onClose;
|
|
684
|
+
n && n(r.windowId);
|
|
578
685
|
}
|
|
579
686
|
},
|
|
580
687
|
/**
|
|
581
688
|
* startProgress
|
|
582
689
|
*/
|
|
583
|
-
startProgress: (
|
|
584
|
-
i((
|
|
585
|
-
|
|
690
|
+
startProgress: (e) => {
|
|
691
|
+
i((o) => {
|
|
692
|
+
o.hashWindows[e] && (o.hashWindows[e].loading = !0);
|
|
586
693
|
});
|
|
587
694
|
},
|
|
588
695
|
/**
|
|
589
696
|
* stopProgress
|
|
590
697
|
*/
|
|
591
|
-
stopProgress: (
|
|
592
|
-
i((
|
|
593
|
-
|
|
698
|
+
stopProgress: (e) => {
|
|
699
|
+
i((o) => {
|
|
700
|
+
o.hashWindows[e] && (o.hashWindows[e].loading = !1);
|
|
594
701
|
});
|
|
595
702
|
},
|
|
596
703
|
/**
|
|
597
704
|
* loadCookiesFromApi
|
|
598
705
|
*/
|
|
599
|
-
loadCookiesFromApi: (
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
706
|
+
loadCookiesFromApi: (e) => {
|
|
707
|
+
const o = a().hashWindows[e];
|
|
708
|
+
if (o && o.status === "init") {
|
|
602
709
|
if (!a().loadCookiesFromNetwork) {
|
|
603
710
|
i((s) => {
|
|
604
|
-
s.hashWindows[
|
|
711
|
+
s.hashWindows[e].status = "loaded";
|
|
605
712
|
});
|
|
606
713
|
return;
|
|
607
714
|
}
|
|
608
715
|
i((s) => {
|
|
609
|
-
s.hashWindows[
|
|
610
|
-
}),
|
|
716
|
+
s.hashWindows[e].status = "loading";
|
|
717
|
+
}), _({
|
|
611
718
|
networkOperation: a().networkOperation,
|
|
612
719
|
params: {
|
|
613
720
|
f: [
|
|
614
|
-
{ n: "container_id", o: "e", o1:
|
|
615
|
-
{ n: "container_id", o: "e", o1:
|
|
721
|
+
{ n: "container_id", o: "e", o1: o.windowId },
|
|
722
|
+
{ n: "container_id", o: "e", o1: o.moduleId }
|
|
616
723
|
]
|
|
617
724
|
}
|
|
618
725
|
}).then((s) => {
|
|
619
726
|
i((r) => {
|
|
620
|
-
const n = r.hashWindows[
|
|
621
|
-
n && (n.cookies.moduleCookies =
|
|
727
|
+
const n = r.hashWindows[e];
|
|
728
|
+
n && (n.cookies.moduleCookies = E(
|
|
622
729
|
s.data,
|
|
623
730
|
n.moduleId
|
|
624
|
-
), n.cookies.windowCookies =
|
|
731
|
+
), n.cookies.windowCookies = E(s.data, e), n.status = "loaded");
|
|
625
732
|
});
|
|
626
733
|
}).catch((s) => {
|
|
627
734
|
i((r) => {
|
|
628
|
-
r.hashWindows[
|
|
735
|
+
r.hashWindows[e] && (r.hashWindows[e].status = "loaded");
|
|
629
736
|
});
|
|
630
737
|
});
|
|
631
738
|
}
|
|
@@ -633,16 +740,16 @@ const g = (f, k) => {
|
|
|
633
740
|
/**
|
|
634
741
|
* saveModuleCookies
|
|
635
742
|
*/
|
|
636
|
-
saveModuleCookies: (
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
743
|
+
saveModuleCookies: (e) => {
|
|
744
|
+
const o = a().hashWindows[e];
|
|
745
|
+
if (o) {
|
|
639
746
|
if (!a().loadCookiesFromNetwork)
|
|
640
747
|
return;
|
|
641
|
-
for (const s in
|
|
642
|
-
const r =
|
|
643
|
-
|
|
748
|
+
for (const s in o.cookies.windowCookies) {
|
|
749
|
+
const r = o.cookies.windowCookies[s];
|
|
750
|
+
C({
|
|
644
751
|
networkOperation: a().networkOperation,
|
|
645
|
-
endPoint: `${
|
|
752
|
+
endPoint: `${o.moduleId}/${s}`,
|
|
646
753
|
value: r
|
|
647
754
|
}).catch(() => {
|
|
648
755
|
});
|
|
@@ -652,19 +759,19 @@ const g = (f, k) => {
|
|
|
652
759
|
/**
|
|
653
760
|
* setModuleCookies
|
|
654
761
|
*/
|
|
655
|
-
resetModuleCookies: (
|
|
656
|
-
const
|
|
657
|
-
if (
|
|
762
|
+
resetModuleCookies: (e) => {
|
|
763
|
+
const o = a().hashWindows[e];
|
|
764
|
+
if (o) {
|
|
658
765
|
if (!a().loadCookiesFromNetwork)
|
|
659
766
|
return;
|
|
660
|
-
|
|
767
|
+
M({
|
|
661
768
|
networkOperation: a().networkOperation,
|
|
662
769
|
data: {
|
|
663
770
|
f: [
|
|
664
771
|
{
|
|
665
772
|
n: "id",
|
|
666
773
|
o: "c",
|
|
667
|
-
o1:
|
|
774
|
+
o1: o.moduleId
|
|
668
775
|
}
|
|
669
776
|
]
|
|
670
777
|
}
|
|
@@ -675,41 +782,41 @@ const g = (f, k) => {
|
|
|
675
782
|
/**
|
|
676
783
|
* setFnQueryClose
|
|
677
784
|
*/
|
|
678
|
-
setFnQueryClose: (
|
|
785
|
+
setFnQueryClose: (e, o) => {
|
|
679
786
|
i((s) => {
|
|
680
|
-
s.hashWindows[
|
|
787
|
+
s.hashWindows[e].fnQueryClose = o;
|
|
681
788
|
});
|
|
682
789
|
},
|
|
683
790
|
/**
|
|
684
791
|
* setWindowTitle
|
|
685
792
|
*/
|
|
686
|
-
setWindowTitle: (
|
|
793
|
+
setWindowTitle: (e, o) => {
|
|
687
794
|
i((s) => {
|
|
688
|
-
s.hashWindows[
|
|
795
|
+
s.hashWindows[e].title = o;
|
|
689
796
|
});
|
|
690
797
|
},
|
|
691
798
|
/**
|
|
692
799
|
* setWindowSubtitle
|
|
693
800
|
*/
|
|
694
|
-
setWindowSubTitle: (
|
|
801
|
+
setWindowSubTitle: (e, o) => {
|
|
695
802
|
i((s) => {
|
|
696
|
-
s.hashWindows[
|
|
803
|
+
s.hashWindows[e].subTitle = o;
|
|
697
804
|
});
|
|
698
805
|
},
|
|
699
806
|
/**
|
|
700
807
|
* setWindowEditionInfo
|
|
701
808
|
*/
|
|
702
|
-
setWindowEditionInfo: (
|
|
809
|
+
setWindowEditionInfo: (e, o) => {
|
|
703
810
|
i((s) => {
|
|
704
|
-
s.hashWindows[
|
|
811
|
+
s.hashWindows[e].editionInfo = o;
|
|
705
812
|
});
|
|
706
813
|
}
|
|
707
814
|
}
|
|
708
815
|
})),
|
|
709
|
-
{ name: `${
|
|
816
|
+
{ name: `${Z}: ${k.storeId}`, enabled: W }
|
|
710
817
|
)
|
|
711
818
|
);
|
|
712
819
|
};
|
|
713
820
|
export {
|
|
714
|
-
|
|
821
|
+
pe as createAreasStore
|
|
715
822
|
};
|