@m4l/components 9.24.0-beta-feature-731-m4l-components-code-editor.8 → 9.24.1-beta-feature-731-code-editor.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/components/AppBar/AppBar.d.ts.map +1 -1
- package/components/AppBar/AppBar.js +36 -29
- package/components/AppBar/types.d.ts +2 -2
- package/components/AppBar/types.d.ts.map +1 -1
- package/components/GridLayout/subcomponents/GridItem/index.d.ts.map +1 -1
- package/components/GridLayout/subcomponents/GridItem/index.js +21 -20
- package/components/MFIsolationApp/MFIsolationApp.d.ts.map +1 -1
- package/components/MFIsolationApp/MFIsolationApp.js +91 -88
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.d.ts.map +1 -1
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.js +35 -24
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.d.ts +5 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.d.ts.map +1 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/ThemeSettingsHostToolsBridge.js +14 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.d.ts +2 -0
- package/components/MFIsolationApp/subcomponents/ThemeSettingsHostToolsBridge/index.d.ts.map +1 -0
- package/components/MFLoader/MFLoader.d.ts.map +1 -1
- package/components/MFLoader/MFLoader.js +39 -39
- package/components/MFLoader/types.d.ts +16 -0
- package/components/MFLoader/types.d.ts.map +1 -1
- package/components/SideBar/context/sideBarContext/index.d.ts.map +1 -1
- package/components/SideBar/context/sideBarContext/index.js +15 -14
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts +2 -1
- package/components/SideBar/hooks/useCollapse/useCollapse.d.ts.map +1 -1
- package/components/SideBar/hooks/useCollapse/useCollapse.js +9 -9
- package/components/SideBar/index.d.ts +1 -1
- package/components/SideBar/index.d.ts.map +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItemMain/NodeMenuItemMain.js +1 -1
- package/components/SideBar/types.d.ts +8 -1
- package/components/SideBar/types.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +66 -52
- package/components/areas/contexts/AreasContext/store.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/store.js +142 -141
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.js +372 -230
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/CodeEditor.styles.js +175 -116
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts +2 -1
- package/components/extended/ReactSimpleCodeEditor/constants.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/constants.js +18 -17
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts +1 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorEnum.js +1 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts +4 -0
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.d.ts.map +1 -1
- package/components/extended/ReactSimpleCodeEditor/slots/CodeEditorSlots.js +33 -27
- package/components/extended/ReactSimpleCodeEditor/types.d.ts +13 -0
- package/components/extended/ReactSimpleCodeEditor/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.d.ts +0 -10
- package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.d.ts.map +0 -1
- package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/MFIsolationThemeBridge.js +0 -19
- package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/index.d.ts +0 -2
- package/components/MFIsolationApp/subcomponents/MFIsolationThemeBridge/index.d.ts.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { createStore as
|
|
1
|
+
import { createStore as D } from "zustand";
|
|
2
2
|
import { devtools as N } from "zustand/middleware";
|
|
3
3
|
import { immer as b } from "zustand/middleware/immer";
|
|
4
|
-
import { getCookiesContainer as E, getDataFromResponse as R, getParmsFromValue as $, setColapsedLayoutBreakPoints as
|
|
5
|
-
import { createDynamicMFStore as
|
|
4
|
+
import { getCookiesContainer as E, getDataFromResponse as R, getParmsFromValue as $, setColapsedLayoutBreakPoints as w, COOKIE_BREAKPOINT_LAYOUTS as B, DEBOUCED_SAVE_TIME as H, DEFAULT_WINDOW as O, MARGIN_GRIDLAYOUT as y, COOKIE_WINDOWS as U, deleteLayoutFromBreakPoints as G, RESPONSIVE_ROW_HEIGHTS as K, PADDING_GRIDLAYOUT as F, NORMALIZED_COLS as z, addArea as S, DEFAULT_AREA as Q, getSelectedAreaIdFromCookies as V, COOKIE_WINDOW_SELECTED as Y, COOKIE_AREAS_ADMIN_CONTAINER_ID as T, COOKIE_AREAS_ADMIN_ID as x } from "./helpers/helper.js";
|
|
5
|
+
import { createDynamicMFStore as v } from "../../../WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
6
6
|
import j from "lodash-es/cloneDeep";
|
|
7
7
|
import q from "lodash-es/debounce";
|
|
8
8
|
import { generateModuleCount as L } from "./helpers/generateModuleCount.js";
|
|
9
9
|
import { AREAS_STORE_ID as Z } from "../../constants.js";
|
|
10
|
-
import { helperSelectLayout as
|
|
11
|
-
import { deleteCookie as
|
|
10
|
+
import { helperSelectLayout as C } from "./helpers/selectLayout.js";
|
|
11
|
+
import { deleteCookie as P, setCookie as I, getCookie as _ } from "../../../../helpers/cookies/cookies.js";
|
|
12
12
|
import { isEqualLayouts as J } from "../../../GridLayout/utils.js";
|
|
13
13
|
import { cloneLayouts as X, addLayoutItemToBreakPoints as g } from "../../../GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
14
14
|
const ee = (k, W) => {
|
|
15
|
-
const { enabled:
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
const
|
|
15
|
+
const { enabled: M = !1 } = W;
|
|
16
|
+
return M && process.env.NODE_ENV === "development" ? N(k, W) : k;
|
|
17
|
+
}, fe = (k, W = !1) => {
|
|
18
|
+
const M = {
|
|
19
19
|
currentAreaId: "",
|
|
20
20
|
currentModuleId: "",
|
|
21
21
|
areasIds: [],
|
|
@@ -24,10 +24,10 @@ const ee = (k, W) => {
|
|
|
24
24
|
windowsModalsIds: [],
|
|
25
25
|
...k
|
|
26
26
|
};
|
|
27
|
-
return
|
|
27
|
+
return D(
|
|
28
28
|
ee(
|
|
29
|
-
b((
|
|
30
|
-
...
|
|
29
|
+
b((n, a) => ({
|
|
30
|
+
...M,
|
|
31
31
|
areasActions: {
|
|
32
32
|
/**
|
|
33
33
|
* Initialize the Areas store.
|
|
@@ -36,12 +36,12 @@ const ee = (k, W) => {
|
|
|
36
36
|
if (a().ownerState?.status !== "init")
|
|
37
37
|
return;
|
|
38
38
|
if (!a().loadAreasFromNetwork) {
|
|
39
|
-
a().areasActions.addArea(),
|
|
39
|
+
a().areasActions.addArea(), n((r) => {
|
|
40
40
|
r.ownerState.status = "loaded";
|
|
41
41
|
});
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
n((r) => {
|
|
45
45
|
r.ownerState.status = "loading";
|
|
46
46
|
});
|
|
47
47
|
const e = _({
|
|
@@ -49,7 +49,7 @@ const ee = (k, W) => {
|
|
|
49
49
|
params: {
|
|
50
50
|
f: [
|
|
51
51
|
{ n: "container_id", o: "e", o1: T },
|
|
52
|
-
{ n: "id", o: "e", o1:
|
|
52
|
+
{ n: "id", o: "e", o1: x }
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
}), o = a().networkOperation({
|
|
@@ -59,14 +59,14 @@ const ee = (k, W) => {
|
|
|
59
59
|
toastSuccess: !1
|
|
60
60
|
});
|
|
61
61
|
let s;
|
|
62
|
-
Promise.allSettled([o, e]).then(([r,
|
|
62
|
+
Promise.allSettled([o, e]).then(([r, i]) => {
|
|
63
63
|
if (r?.status === "fulfilled") {
|
|
64
64
|
const t = r?.value?.data;
|
|
65
|
-
|
|
65
|
+
n((d) => {
|
|
66
66
|
if (t && Array.isArray(t) && t.length > 0)
|
|
67
67
|
for (let c = 0; c < t.length; c++) {
|
|
68
68
|
const l = {
|
|
69
|
-
...
|
|
69
|
+
...Q,
|
|
70
70
|
...t[c],
|
|
71
71
|
// API-backed areas should lazily load windows on first selection.
|
|
72
72
|
loadWindows: !0
|
|
@@ -77,9 +77,9 @@ const ee = (k, W) => {
|
|
|
77
77
|
S(d);
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
i.status === "fulfilled" && (s = V(i?.value));
|
|
81
81
|
}).finally(() => {
|
|
82
|
-
if (
|
|
82
|
+
if (n((r) => {
|
|
83
83
|
r.ownerState.status = "loaded";
|
|
84
84
|
}), a().areasIds.length > 0 && a().currentAreaId === "") {
|
|
85
85
|
const r = s && a().areasIds?.includes?.(s) ? s : a().areasIds[0];
|
|
@@ -92,7 +92,7 @@ const ee = (k, W) => {
|
|
|
92
92
|
*/
|
|
93
93
|
addArea: () => {
|
|
94
94
|
let e = "";
|
|
95
|
-
return
|
|
95
|
+
return n((o) => {
|
|
96
96
|
e = S(o);
|
|
97
97
|
}), a().areasActions.selectArea(e), e;
|
|
98
98
|
},
|
|
@@ -100,7 +100,7 @@ const ee = (k, W) => {
|
|
|
100
100
|
* editArea store
|
|
101
101
|
*/
|
|
102
102
|
editArea: (e, o) => {
|
|
103
|
-
|
|
103
|
+
n((s) => {
|
|
104
104
|
s.hashAreas[e] && (s.hashAreas[e].name = o, s.loadAreasFromNetwork && s.networkOperation({
|
|
105
105
|
method: "PATCH",
|
|
106
106
|
endPoint: `areas/${e}`,
|
|
@@ -115,15 +115,15 @@ const ee = (k, W) => {
|
|
|
115
115
|
*/
|
|
116
116
|
deleteArea: (e) => {
|
|
117
117
|
let o = "";
|
|
118
|
-
|
|
118
|
+
n((s) => {
|
|
119
119
|
if (!s.hashAreas[e] || s.areasIds.length < 2)
|
|
120
120
|
return;
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
121
|
+
const i = s.areasIds.indexOf(e);
|
|
122
|
+
if (i > -1) {
|
|
123
123
|
for (const d in s.hashWindows)
|
|
124
124
|
s.hashWindows[d].areaId === e && delete s.hashWindows[d];
|
|
125
125
|
const t = s.areasIds.findIndex((d) => d === e);
|
|
126
|
-
s.areasIds.splice(
|
|
126
|
+
s.areasIds.splice(i, 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",
|
|
@@ -131,7 +131,7 @@ const ee = (k, W) => {
|
|
|
131
131
|
parms: {},
|
|
132
132
|
toastSuccess: !1,
|
|
133
133
|
toastError: !1
|
|
134
|
-
}), s.loadCookiesFromNetwork &&
|
|
134
|
+
}), s.loadCookiesFromNetwork && P({
|
|
135
135
|
networkOperation: a().networkOperation,
|
|
136
136
|
data: { f: [{ n: "container_id", o: "c", o1: e }] }
|
|
137
137
|
}).catch(() => {
|
|
@@ -142,13 +142,13 @@ const ee = (k, W) => {
|
|
|
142
142
|
* selectArea store
|
|
143
143
|
*/
|
|
144
144
|
selectArea: (e) => {
|
|
145
|
-
|
|
145
|
+
n((o) => {
|
|
146
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) :
|
|
147
|
+
}), a().hashAreas[e].status === "init" && (a().hashAreas[e].loadWindows ? a().areaActions.loadWindowsFromApi(e) : n((o) => {
|
|
148
148
|
o.hashAreas[e].status = "loaded";
|
|
149
|
-
})), a().loadCookiesFromNetwork &&
|
|
149
|
+
})), a().loadCookiesFromNetwork && I({
|
|
150
150
|
networkOperation: a().networkOperation,
|
|
151
|
-
endPoint: `${T}/${
|
|
151
|
+
endPoint: `${T}/${x}`,
|
|
152
152
|
value: { selectedAreaId: e }
|
|
153
153
|
}).catch(() => {
|
|
154
154
|
});
|
|
@@ -157,7 +157,7 @@ const ee = (k, W) => {
|
|
|
157
157
|
* setHandlerGetLabel
|
|
158
158
|
*/
|
|
159
159
|
setHandlerGetLabel: (e) => {
|
|
160
|
-
|
|
160
|
+
n((o) => {
|
|
161
161
|
o.getLabel = e;
|
|
162
162
|
});
|
|
163
163
|
},
|
|
@@ -165,7 +165,7 @@ const ee = (k, W) => {
|
|
|
165
165
|
* setExternalState
|
|
166
166
|
*/
|
|
167
167
|
setExternalState: (e) => {
|
|
168
|
-
|
|
168
|
+
n((o) => {
|
|
169
169
|
o.ownerState = { ...o.ownerState, ...e };
|
|
170
170
|
});
|
|
171
171
|
}
|
|
@@ -199,7 +199,7 @@ const ee = (k, W) => {
|
|
|
199
199
|
*/
|
|
200
200
|
addLayout: (e, o, s) => {
|
|
201
201
|
let r = o;
|
|
202
|
-
const
|
|
202
|
+
const i = !1, t = L(
|
|
203
203
|
a().currentAreaId,
|
|
204
204
|
s.moduleId,
|
|
205
205
|
a().hashWindows
|
|
@@ -208,21 +208,21 @@ const ee = (k, W) => {
|
|
|
208
208
|
i: o,
|
|
209
209
|
isDraggable: !0,
|
|
210
210
|
isResizable: !0,
|
|
211
|
-
freeMove:
|
|
211
|
+
freeMove: i
|
|
212
212
|
};
|
|
213
|
-
|
|
213
|
+
n((c) => {
|
|
214
214
|
const l = c.hashAreas[e];
|
|
215
215
|
if (l) {
|
|
216
216
|
if (s.replaceMeId)
|
|
217
217
|
for (let m = 0; m < l.layoutItemsIds.length; m++) {
|
|
218
|
-
const h = l.layoutItemsIds[m],
|
|
219
|
-
if (
|
|
220
|
-
r = h,
|
|
218
|
+
const h = l.layoutItemsIds[m], p = c.hashWindows[h];
|
|
219
|
+
if (p.replaceMeId === s.replaceMeId) {
|
|
220
|
+
r = h, p.dynamicMFStore.getState().actions.changeData(s.dynamicParams), C(c, e, h, !0), w(l, h, !1), (l.maximizedId || l.currentBreakpoint === "xxs") && (l.maximizedId = h), a().popupsProviderMethods.setSelectedPopupId(e, void 0);
|
|
221
221
|
break;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
if (r === o) {
|
|
225
|
-
const m =
|
|
225
|
+
const m = v({
|
|
226
226
|
dynamicMFParameters: s.dynamicParams
|
|
227
227
|
});
|
|
228
228
|
c.hashWindows[o] = {
|
|
@@ -232,19 +232,19 @@ const ee = (k, W) => {
|
|
|
232
232
|
onClose: (h) => {
|
|
233
233
|
a().areaActions.closeLayout(e, h);
|
|
234
234
|
},
|
|
235
|
-
...
|
|
235
|
+
...O,
|
|
236
236
|
dynamicMFStore: m,
|
|
237
237
|
moduleCount: t
|
|
238
238
|
}, l.layoutItemsIds.push(o), l.maximizedId && (l.maximizedId = o), l.layouts = g(
|
|
239
239
|
l.layouts,
|
|
240
240
|
d,
|
|
241
|
-
|
|
241
|
+
z,
|
|
242
242
|
[y, y],
|
|
243
|
-
[
|
|
243
|
+
[F, F],
|
|
244
244
|
K,
|
|
245
245
|
l.containerHeight,
|
|
246
246
|
l.currentBreakpoint
|
|
247
|
-
), l.currentBreakpoint === "xxs" && (l.maximizedId = o),
|
|
247
|
+
), l.currentBreakpoint === "xxs" && (l.maximizedId = o), C(c, e, o, !0), a().popupsProviderMethods.setSelectedPopupId(e, void 0);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
}), a().areaActions.saveLayouts(e), a().areaActions.bouncedSaveBreakpointsLayouts(e);
|
|
@@ -253,16 +253,16 @@ const ee = (k, W) => {
|
|
|
253
253
|
* closeLayout
|
|
254
254
|
*/
|
|
255
255
|
closeLayout: (e, o) => {
|
|
256
|
-
|
|
256
|
+
n((s) => {
|
|
257
257
|
const r = s.hashAreas[e];
|
|
258
258
|
if (!r)
|
|
259
259
|
return;
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
const i = r.layoutItemsIds.indexOf(o);
|
|
261
|
+
i > -1 && r.layoutItemsIds.splice(i, 1), G(r, o), delete s.hashWindows[o], s.hashAreas[e].currentLayoutId === o && C(s, e, "");
|
|
262
262
|
}), a().areaActions.saveLayouts(e), a().hashAreas[e].maximizedId === o && a().areaActions.maximizeLayout(e);
|
|
263
263
|
for (let s = 0; s < a().hashAreas[e].layoutItemsIds.length; s++) {
|
|
264
|
-
const r = a().hashAreas[e].layoutItemsIds[s],
|
|
265
|
-
|
|
264
|
+
const r = a().hashAreas[e].layoutItemsIds[s], i = a().hashWindows[r];
|
|
265
|
+
i && i.parentId === o && a().areaActions.closeLayout(e, i.windowId);
|
|
266
266
|
}
|
|
267
267
|
a().popupsProviderMethods.closeAllPopupsByParentId(o);
|
|
268
268
|
},
|
|
@@ -277,8 +277,8 @@ const ee = (k, W) => {
|
|
|
277
277
|
if (!s)
|
|
278
278
|
return;
|
|
279
279
|
const r = {};
|
|
280
|
-
for (let
|
|
281
|
-
const t = s.layoutItemsIds[
|
|
280
|
+
for (let i = 0; i < s.layoutItemsIds.length; i++) {
|
|
281
|
+
const t = s.layoutItemsIds[i], d = a().hashWindows[t];
|
|
282
282
|
d?.emergeType === "layout" && d.winType === "microfrontend" && (r[t] = {
|
|
283
283
|
winType: d.winType,
|
|
284
284
|
emergeType: d.emergeType,
|
|
@@ -286,18 +286,19 @@ const ee = (k, W) => {
|
|
|
286
286
|
url_icon: d.iconUrl,
|
|
287
287
|
windowOptions: d.windowOptions,
|
|
288
288
|
moduleId: d.moduleId,
|
|
289
|
+
replaceMeId: d.replaceMeId,
|
|
289
290
|
windowId: d.windowId,
|
|
290
291
|
mfProps: d.mfProps,
|
|
291
292
|
moduleCount: d.moduleCount,
|
|
292
293
|
iconUrl: d.iconUrl
|
|
293
294
|
}, o++);
|
|
294
295
|
}
|
|
295
|
-
o > 0 ?
|
|
296
|
+
o > 0 ? I({
|
|
296
297
|
networkOperation: a().networkOperation,
|
|
297
298
|
endPoint: `${s.id}/${U}`,
|
|
298
299
|
value: r
|
|
299
300
|
}).catch(() => {
|
|
300
|
-
}) :
|
|
301
|
+
}) : P({
|
|
301
302
|
networkOperation: a().networkOperation,
|
|
302
303
|
data: { f: [{ n: "container_id", o: "c", o1: s.id }] }
|
|
303
304
|
}).catch(() => {
|
|
@@ -308,23 +309,23 @@ const ee = (k, W) => {
|
|
|
308
309
|
*/
|
|
309
310
|
addPopup: (e, o, s) => {
|
|
310
311
|
let r = o;
|
|
311
|
-
|
|
312
|
-
if (
|
|
312
|
+
n((i) => {
|
|
313
|
+
if (i.hashAreas[e]) {
|
|
313
314
|
if (s.replaceMeId) {
|
|
314
|
-
for (const d in
|
|
315
|
-
if (
|
|
316
|
-
const c =
|
|
315
|
+
for (const d in i.hashWindows)
|
|
316
|
+
if (i.hashWindows[d].replaceMeId === s.replaceMeId) {
|
|
317
|
+
const c = i.hashWindows[d];
|
|
317
318
|
r = d, c.dynamicMFStore.getState().actions.changeData(s.dynamicParams), a().popupsProviderMethods.bringPopupOnFront(d, !0);
|
|
318
319
|
break;
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
322
|
if (r === o) {
|
|
322
|
-
const d =
|
|
323
|
+
const d = v({
|
|
323
324
|
dynamicMFParameters: s.dynamicParams
|
|
324
325
|
});
|
|
325
|
-
|
|
326
|
+
i.hashWindows[o] = {
|
|
326
327
|
...s,
|
|
327
|
-
...
|
|
328
|
+
...O,
|
|
328
329
|
areaId: e,
|
|
329
330
|
windowId: o,
|
|
330
331
|
// Legacy behavior: popup close requests issued through Areas
|
|
@@ -336,7 +337,7 @@ const ee = (k, W) => {
|
|
|
336
337
|
},
|
|
337
338
|
dynamicMFStore: d
|
|
338
339
|
};
|
|
339
|
-
const { emergeType: c, popupProps: l, ...m } = s, h = s.parentId,
|
|
340
|
+
const { emergeType: c, popupProps: l, ...m } = s, h = s.parentId, p = (u, f, A) => {
|
|
340
341
|
h ? A === "select" && a().areaActions.selectLayout(u, h) : a().areaActions.selectLayout(u, "");
|
|
341
342
|
};
|
|
342
343
|
a().popupsProviderMethods.addPopup({
|
|
@@ -347,7 +348,7 @@ const ee = (k, W) => {
|
|
|
347
348
|
dynamicMFStore: d,
|
|
348
349
|
dynamicParams: s.dynamicParams,
|
|
349
350
|
onRemove: () => a().areaActions.closePopup(e, o),
|
|
350
|
-
onSelectedPopupIdChange:
|
|
351
|
+
onSelectedPopupIdChange: p,
|
|
351
352
|
allowHeightResizeContainer: !0,
|
|
352
353
|
allowWidthResizeContainer: !1,
|
|
353
354
|
bounds: {
|
|
@@ -365,25 +366,25 @@ const ee = (k, W) => {
|
|
|
365
366
|
* addPanel store
|
|
366
367
|
*/
|
|
367
368
|
addPanel: (e, o, s) => {
|
|
368
|
-
let r = o,
|
|
369
|
-
if (
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
369
|
+
let r = o, i;
|
|
370
|
+
if (n((h) => {
|
|
371
|
+
const p = h.hashAreas[e];
|
|
372
|
+
if (p) {
|
|
372
373
|
if (s.replaceMeId)
|
|
373
|
-
for (let u = 0; u <
|
|
374
|
-
const
|
|
374
|
+
for (let u = 0; u < p.panelItemsIds.length; u++) {
|
|
375
|
+
const f = p.panelItemsIds[u], A = h.hashWindows[f];
|
|
375
376
|
if (A?.replaceMeId === s.replaceMeId) {
|
|
376
|
-
r =
|
|
377
|
+
r = f, A.dynamicMFStore.getState().actions.changeData(s.dynamicParams);
|
|
377
378
|
break;
|
|
378
379
|
}
|
|
379
380
|
}
|
|
380
|
-
if (
|
|
381
|
-
const
|
|
382
|
-
return
|
|
383
|
-
}), !(
|
|
384
|
-
const u =
|
|
381
|
+
if (i = p.panelItemsIds.find((u) => {
|
|
382
|
+
const f = h.hashWindows[u];
|
|
383
|
+
return f?.emergeType === "panel" && f.panelProps.side === s.panelProps.side;
|
|
384
|
+
}), !(i && r === o) && r === o) {
|
|
385
|
+
const u = v({
|
|
385
386
|
dynamicMFParameters: s.dynamicParams
|
|
386
|
-
}),
|
|
387
|
+
}), f = L(
|
|
387
388
|
e,
|
|
388
389
|
s.moduleId,
|
|
389
390
|
h.hashWindows
|
|
@@ -395,15 +396,15 @@ const ee = (k, W) => {
|
|
|
395
396
|
onClose: (A) => {
|
|
396
397
|
a().areaActions.closePanel(e, A);
|
|
397
398
|
},
|
|
398
|
-
...
|
|
399
|
+
...O,
|
|
399
400
|
dynamicMFStore: u,
|
|
400
|
-
moduleCount:
|
|
401
|
-
},
|
|
401
|
+
moduleCount: f
|
|
402
|
+
}, p.panelItemsIds.push(o);
|
|
402
403
|
}
|
|
403
404
|
}
|
|
404
|
-
}), r !== o || !
|
|
405
|
+
}), r !== o || !i)
|
|
405
406
|
return;
|
|
406
|
-
const t =
|
|
407
|
+
const t = i, d = a().hashWindows[t];
|
|
407
408
|
if (!d || d.emergeType !== "panel")
|
|
408
409
|
return;
|
|
409
410
|
let c = !1;
|
|
@@ -436,7 +437,7 @@ const ee = (k, W) => {
|
|
|
436
437
|
* closePopup
|
|
437
438
|
*/
|
|
438
439
|
closePopup: (e, o) => {
|
|
439
|
-
|
|
440
|
+
n((s) => {
|
|
440
441
|
s.hashAreas[e] && delete s.hashWindows[o];
|
|
441
442
|
});
|
|
442
443
|
},
|
|
@@ -444,30 +445,30 @@ const ee = (k, W) => {
|
|
|
444
445
|
* closePanel
|
|
445
446
|
*/
|
|
446
447
|
closePanel: (e, o) => {
|
|
447
|
-
|
|
448
|
+
n((s) => {
|
|
448
449
|
const r = s.hashAreas[e];
|
|
449
450
|
if (!r)
|
|
450
451
|
return;
|
|
451
|
-
const
|
|
452
|
-
|
|
452
|
+
const i = r.panelItemsIds.indexOf(o);
|
|
453
|
+
i > -1 && r.panelItemsIds.splice(i, 1), delete s.hashWindows[o];
|
|
453
454
|
});
|
|
454
455
|
},
|
|
455
456
|
/**
|
|
456
457
|
* setPanelPinned
|
|
457
458
|
*/
|
|
458
459
|
setPanelPinned: (e, o, s) => {
|
|
459
|
-
|
|
460
|
-
const
|
|
461
|
-
!
|
|
460
|
+
n((r) => {
|
|
461
|
+
const i = r.hashAreas[e], t = r.hashWindows[o];
|
|
462
|
+
!i || t?.emergeType !== "panel" || (t.panelProps.pinned = s);
|
|
462
463
|
});
|
|
463
464
|
},
|
|
464
465
|
/**
|
|
465
466
|
* setPanelSize
|
|
466
467
|
*/
|
|
467
468
|
setPanelSize: (e, o, s) => {
|
|
468
|
-
|
|
469
|
-
const
|
|
470
|
-
if (!(!
|
|
469
|
+
n((r) => {
|
|
470
|
+
const i = r.hashAreas[e], t = r.hashWindows[o];
|
|
471
|
+
if (!(!i || t?.emergeType !== "panel")) {
|
|
471
472
|
if (t.panelProps.side === "left" || t.panelProps.side === "right") {
|
|
472
473
|
"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
474
|
return;
|
|
@@ -480,7 +481,7 @@ const ee = (k, W) => {
|
|
|
480
481
|
* closeWindowModal
|
|
481
482
|
*/
|
|
482
483
|
closeWindowModal: (e) => {
|
|
483
|
-
|
|
484
|
+
n((o) => {
|
|
484
485
|
const s = o.windowsModalsIds.findIndex((r) => r === e);
|
|
485
486
|
s > -1 && o.windowsModalsIds.splice(s, 1), delete o.hashWindows[e];
|
|
486
487
|
});
|
|
@@ -489,8 +490,8 @@ const ee = (k, W) => {
|
|
|
489
490
|
* addWindowModal
|
|
490
491
|
*/
|
|
491
492
|
addWindowModal: (e, o, s) => {
|
|
492
|
-
|
|
493
|
-
const
|
|
493
|
+
n((r) => {
|
|
494
|
+
const i = v({
|
|
494
495
|
dynamicMFParameters: s.dynamicParams
|
|
495
496
|
});
|
|
496
497
|
r.windowsModalsIds.push(o);
|
|
@@ -503,9 +504,9 @@ const ee = (k, W) => {
|
|
|
503
504
|
...s,
|
|
504
505
|
areaId: e,
|
|
505
506
|
windowId: o,
|
|
506
|
-
...
|
|
507
|
+
...O,
|
|
507
508
|
onClose: a().areaActions.closeWindowModal,
|
|
508
|
-
dynamicMFStore:
|
|
509
|
+
dynamicMFStore: i,
|
|
509
510
|
moduleCount: t
|
|
510
511
|
};
|
|
511
512
|
});
|
|
@@ -518,10 +519,10 @@ const ee = (k, W) => {
|
|
|
518
519
|
...a().hashAreas[e].layouts
|
|
519
520
|
}, s = {};
|
|
520
521
|
for (const r in o) {
|
|
521
|
-
const
|
|
522
|
-
o[r] =
|
|
522
|
+
const i = o[r];
|
|
523
|
+
o[r] = i.filter((t) => t.i === "none" ? !1 : a().hashAreas[e].layoutItemsIds.indexOf(t.i) > -1), o[r].length > 0 && (s[r] = o[r]);
|
|
523
524
|
}
|
|
524
|
-
Object.keys(s).length > 0 &&
|
|
525
|
+
Object.keys(s).length > 0 && I({
|
|
525
526
|
networkOperation: a().networkOperation,
|
|
526
527
|
endPoint: `${a().hashAreas[e].id}/${B}`,
|
|
527
528
|
value: s
|
|
@@ -538,7 +539,7 @@ const ee = (k, W) => {
|
|
|
538
539
|
* onBreakpointsLayoutsChange
|
|
539
540
|
*/
|
|
540
541
|
onBreakpointsLayoutsChange: (e, o, s) => {
|
|
541
|
-
J(a().hashAreas[e].layouts, s) || (
|
|
542
|
+
J(a().hashAreas[e].layouts, s) || (n((r) => {
|
|
542
543
|
r.hashAreas[e].layouts = X(s);
|
|
543
544
|
}), a().hashAreas[e].maximizedId || a().areaActions.bouncedSaveBreakpointsLayouts(e));
|
|
544
545
|
},
|
|
@@ -546,7 +547,7 @@ const ee = (k, W) => {
|
|
|
546
547
|
* containerChange
|
|
547
548
|
*/
|
|
548
549
|
onContainerChange: (e, o) => {
|
|
549
|
-
|
|
550
|
+
n((s) => {
|
|
550
551
|
s.hashAreas[e].containerHeight = o.containerHeight, s.hashAreas[e].currentBreakpoint = o.breakpoint;
|
|
551
552
|
});
|
|
552
553
|
},
|
|
@@ -554,31 +555,31 @@ const ee = (k, W) => {
|
|
|
554
555
|
* selectLayout
|
|
555
556
|
*/
|
|
556
557
|
selectLayout: (e, o) => {
|
|
557
|
-
a().hashAreas[e].currentLayoutId !== o &&
|
|
558
|
-
|
|
558
|
+
a().hashAreas[e].currentLayoutId !== o && n((s) => {
|
|
559
|
+
C(s, e, o);
|
|
559
560
|
});
|
|
560
561
|
},
|
|
561
562
|
/**
|
|
562
563
|
* unColapseLayoutItem
|
|
563
564
|
*/
|
|
564
565
|
unColapseLayoutItem: (e, o) => {
|
|
565
|
-
|
|
566
|
-
|
|
566
|
+
n((s) => {
|
|
567
|
+
w(s.hashAreas[e], o, !1);
|
|
567
568
|
});
|
|
568
569
|
},
|
|
569
570
|
/**
|
|
570
571
|
* colapseLayoutItem
|
|
571
572
|
*/
|
|
572
573
|
colapseLayoutItem: (e, o) => {
|
|
573
|
-
!a().hashAreas[e].maximizedId && a().hashWindows[o] &&
|
|
574
|
-
|
|
574
|
+
!a().hashAreas[e].maximizedId && a().hashWindows[o] && n((s) => {
|
|
575
|
+
w(s.hashAreas[e], o, !0);
|
|
575
576
|
});
|
|
576
577
|
},
|
|
577
578
|
/**
|
|
578
579
|
* minimizeLayout
|
|
579
580
|
*/
|
|
580
581
|
maximizeLayout: (e, o) => {
|
|
581
|
-
|
|
582
|
+
n((s) => {
|
|
582
583
|
const r = s.hashAreas[e];
|
|
583
584
|
r && (r.maximizedId = o);
|
|
584
585
|
}), o && a().areaActions.selectLayout(e, o);
|
|
@@ -587,7 +588,7 @@ const ee = (k, W) => {
|
|
|
587
588
|
* normalizeLayouts
|
|
588
589
|
*/
|
|
589
590
|
normalizeLayouts: (e) => {
|
|
590
|
-
|
|
591
|
+
n((o) => {
|
|
591
592
|
const s = o.hashAreas[e];
|
|
592
593
|
s && (s.maximizedId = void 0);
|
|
593
594
|
});
|
|
@@ -599,12 +600,12 @@ const ee = (k, W) => {
|
|
|
599
600
|
const o = a().hashAreas[e];
|
|
600
601
|
if (o && o.status === "init") {
|
|
601
602
|
if (!a().loadAreasFromNetwork || !a().loadCookiesFromNetwork || !o.loadWindows) {
|
|
602
|
-
|
|
603
|
+
n((s) => {
|
|
603
604
|
s.hashAreas[e].status = "loaded";
|
|
604
605
|
});
|
|
605
606
|
return;
|
|
606
607
|
}
|
|
607
|
-
|
|
608
|
+
n((s) => {
|
|
608
609
|
s.hashAreas[e].status = "loading";
|
|
609
610
|
}), _({
|
|
610
611
|
networkOperation: a().networkOperation,
|
|
@@ -612,19 +613,19 @@ const ee = (k, W) => {
|
|
|
612
613
|
}).then((s) => {
|
|
613
614
|
if (!a().hashAreas[e])
|
|
614
615
|
return;
|
|
615
|
-
const
|
|
616
|
-
|
|
616
|
+
const i = s.data;
|
|
617
|
+
n((t) => {
|
|
617
618
|
const d = t.hashAreas[e], { newBreakPointsLayouts: c, newHashLayoutItems: l } = R(
|
|
618
|
-
|
|
619
|
+
i,
|
|
619
620
|
t,
|
|
620
621
|
e
|
|
621
622
|
);
|
|
622
623
|
d.layouts = c, d.layoutItemsIds = l, d.status = "loaded";
|
|
623
|
-
const m = $(Y,
|
|
624
|
-
|
|
624
|
+
const m = $(Y, i) || { currentLayoutId: "" };
|
|
625
|
+
C(t, e, m?.currentLayoutId || "", !1);
|
|
625
626
|
});
|
|
626
627
|
}).catch((s) => {
|
|
627
|
-
|
|
628
|
+
n((r) => {
|
|
628
629
|
r.hashAreas[e].status = "loaded";
|
|
629
630
|
});
|
|
630
631
|
});
|
|
@@ -644,8 +645,8 @@ const ee = (k, W) => {
|
|
|
644
645
|
* setActions
|
|
645
646
|
*/
|
|
646
647
|
setActions: (e, o, s, r) => {
|
|
647
|
-
|
|
648
|
-
|
|
648
|
+
n((i) => {
|
|
649
|
+
i.hashWindows[e] && (i.hashWindows[e].moduleActions = j(o), i.hashWindows[e].version = s, i.hashWindows[e].buildTime = r);
|
|
649
650
|
});
|
|
650
651
|
},
|
|
651
652
|
/**
|
|
@@ -660,9 +661,9 @@ const ee = (k, W) => {
|
|
|
660
661
|
* setCookie
|
|
661
662
|
*/
|
|
662
663
|
setCookie: (e, o, s, r) => {
|
|
663
|
-
|
|
664
|
-
const t =
|
|
665
|
-
t && (a().loadCookiesFromNetwork &&
|
|
664
|
+
n((i) => {
|
|
665
|
+
const t = i.hashWindows[e];
|
|
666
|
+
t && (a().loadCookiesFromNetwork && I({
|
|
666
667
|
networkOperation: a().networkOperation,
|
|
667
668
|
endPoint: `${s === "module" ? t.moduleId : e}/${o}`,
|
|
668
669
|
value: r
|
|
@@ -680,15 +681,15 @@ const ee = (k, W) => {
|
|
|
680
681
|
r.fnQueryClose(s);
|
|
681
682
|
return;
|
|
682
683
|
}
|
|
683
|
-
const
|
|
684
|
-
|
|
684
|
+
const i = r.onClose;
|
|
685
|
+
i && i(r.windowId);
|
|
685
686
|
}
|
|
686
687
|
},
|
|
687
688
|
/**
|
|
688
689
|
* startProgress
|
|
689
690
|
*/
|
|
690
691
|
startProgress: (e) => {
|
|
691
|
-
|
|
692
|
+
n((o) => {
|
|
692
693
|
o.hashWindows[e] && (o.hashWindows[e].loading = !0);
|
|
693
694
|
});
|
|
694
695
|
},
|
|
@@ -696,7 +697,7 @@ const ee = (k, W) => {
|
|
|
696
697
|
* stopProgress
|
|
697
698
|
*/
|
|
698
699
|
stopProgress: (e) => {
|
|
699
|
-
|
|
700
|
+
n((o) => {
|
|
700
701
|
o.hashWindows[e] && (o.hashWindows[e].loading = !1);
|
|
701
702
|
});
|
|
702
703
|
},
|
|
@@ -707,12 +708,12 @@ const ee = (k, W) => {
|
|
|
707
708
|
const o = a().hashWindows[e];
|
|
708
709
|
if (o && o.status === "init") {
|
|
709
710
|
if (!a().loadCookiesFromNetwork) {
|
|
710
|
-
|
|
711
|
+
n((s) => {
|
|
711
712
|
s.hashWindows[e].status = "loaded";
|
|
712
713
|
});
|
|
713
714
|
return;
|
|
714
715
|
}
|
|
715
|
-
|
|
716
|
+
n((s) => {
|
|
716
717
|
s.hashWindows[e].status = "loading";
|
|
717
718
|
}), _({
|
|
718
719
|
networkOperation: a().networkOperation,
|
|
@@ -723,15 +724,15 @@ const ee = (k, W) => {
|
|
|
723
724
|
]
|
|
724
725
|
}
|
|
725
726
|
}).then((s) => {
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
|
|
727
|
+
n((r) => {
|
|
728
|
+
const i = r.hashWindows[e];
|
|
729
|
+
i && (i.cookies.moduleCookies = E(
|
|
729
730
|
s.data,
|
|
730
|
-
|
|
731
|
-
),
|
|
731
|
+
i.moduleId
|
|
732
|
+
), i.cookies.windowCookies = E(s.data, e), i.status = "loaded");
|
|
732
733
|
});
|
|
733
734
|
}).catch((s) => {
|
|
734
|
-
|
|
735
|
+
n((r) => {
|
|
735
736
|
r.hashWindows[e] && (r.hashWindows[e].status = "loaded");
|
|
736
737
|
});
|
|
737
738
|
});
|
|
@@ -747,7 +748,7 @@ const ee = (k, W) => {
|
|
|
747
748
|
return;
|
|
748
749
|
for (const s in o.cookies.windowCookies) {
|
|
749
750
|
const r = o.cookies.windowCookies[s];
|
|
750
|
-
|
|
751
|
+
I({
|
|
751
752
|
networkOperation: a().networkOperation,
|
|
752
753
|
endPoint: `${o.moduleId}/${s}`,
|
|
753
754
|
value: r
|
|
@@ -764,7 +765,7 @@ const ee = (k, W) => {
|
|
|
764
765
|
if (o) {
|
|
765
766
|
if (!a().loadCookiesFromNetwork)
|
|
766
767
|
return;
|
|
767
|
-
|
|
768
|
+
P({
|
|
768
769
|
networkOperation: a().networkOperation,
|
|
769
770
|
data: {
|
|
770
771
|
f: [
|
|
@@ -783,7 +784,7 @@ const ee = (k, W) => {
|
|
|
783
784
|
* setFnQueryClose
|
|
784
785
|
*/
|
|
785
786
|
setFnQueryClose: (e, o) => {
|
|
786
|
-
|
|
787
|
+
n((s) => {
|
|
787
788
|
s.hashWindows[e].fnQueryClose = o;
|
|
788
789
|
});
|
|
789
790
|
},
|
|
@@ -791,7 +792,7 @@ const ee = (k, W) => {
|
|
|
791
792
|
* setWindowTitle
|
|
792
793
|
*/
|
|
793
794
|
setWindowTitle: (e, o) => {
|
|
794
|
-
|
|
795
|
+
n((s) => {
|
|
795
796
|
s.hashWindows[e].title = o;
|
|
796
797
|
});
|
|
797
798
|
},
|
|
@@ -799,7 +800,7 @@ const ee = (k, W) => {
|
|
|
799
800
|
* setWindowSubtitle
|
|
800
801
|
*/
|
|
801
802
|
setWindowSubTitle: (e, o) => {
|
|
802
|
-
|
|
803
|
+
n((s) => {
|
|
803
804
|
s.hashWindows[e].subTitle = o;
|
|
804
805
|
});
|
|
805
806
|
},
|
|
@@ -807,7 +808,7 @@ const ee = (k, W) => {
|
|
|
807
808
|
* setWindowEditionInfo
|
|
808
809
|
*/
|
|
809
810
|
setWindowEditionInfo: (e, o) => {
|
|
810
|
-
|
|
811
|
+
n((s) => {
|
|
811
812
|
s.hashWindows[e].editionInfo = o;
|
|
812
813
|
});
|
|
813
814
|
}
|
|
@@ -818,5 +819,5 @@ const ee = (k, W) => {
|
|
|
818
819
|
);
|
|
819
820
|
};
|
|
820
821
|
export {
|
|
821
|
-
|
|
822
|
+
fe as createAreasStore
|
|
822
823
|
};
|