@m4l/components 0.1.71 → 0.1.73
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/CommonActions/components/ActionCancel/{index.ff90f2c0.js → index.583dd385.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.392a17c0.js → index.673cb6bc.js} +19 -18
- package/components/CommonActions/components/ActionFormIntro/{index.f88d8849.js → index.ca18700c.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.e31ab7e9.js → index.41d66b77.js} +3 -3
- package/components/CommonActions/components/Actions/{index.6b7d480a.js → index.665b1d56.js} +18 -17
- package/components/DataGrid/{index.77ae9b4c.js → index.860f4d1c.js} +20 -19
- package/components/DynamicFilter/{index.b2ba5167.js → index.09d83f9d.js} +31 -30
- package/components/HelperText/{index.d7b1b21a.js → index.581ddb8f.js} +8 -8
- package/components/Icon/{index.6f2a5618.js → index.4eeb3de9.js} +2 -2
- package/components/Image/{index.1e3b7ff6.js → index.52c84d9f.js} +1 -1
- package/components/LanguagePopover/{index.310e9a3a.js → index.f7ee5a9c.js} +9 -9
- package/components/ModalDialog/{index.598f9a86.js → index.1e6150f6.js} +7 -7
- package/components/NavLink/{index.ac3778af.js → index.5f3e2493.js} +9 -9
- package/components/NoItemSelected/{index.3809e3d1.js → index.b51f007c.js} +1 -1
- package/components/ObjectLogs/{index.949d3595.js → index.26644722.js} +16 -15
- package/components/PaperForm/{index.cf8af08b.js → index.be12afa3.js} +1 -1
- package/components/Period/{index.53ea0562.js → index.f24d7084.js} +18 -17
- package/components/Resizeable/{index.ff4ce7a4.js → index.949b18ff.js} +1 -1
- package/components/SideBar/{index.4daafbab.js → index.e716e9e0.js} +6 -6
- package/components/areas/components/AreasAdmin/index.b26ee1b2.js +289 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +14 -2
- package/components/areas/components/{index.31f39977.js → AreasViewer/index.d33b4a7d.js} +204 -305
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +3 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Toasties/index.d.ts +6 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Toasties/subcomponents/Toasty/index.d.ts +7 -0
- package/components/areas/components/index.b2ee7610.js +14 -0
- package/components/areas/constants.66529246.js +6 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +6 -4
- package/components/areas/contexts/AreasContext/{index.e14d6799.js → index.9c35425b.js} +132 -21
- package/components/areas/contexts/AreasContext/types.d.ts +5 -3
- package/components/areas/contexts/DynamicMFParmsContext/store.d.ts +1 -1
- package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +1 -1
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +3 -10
- package/components/areas/contexts/index.d.ts +2 -1
- package/components/areas/contexts/{index.5ba05323.js → index.d2f1c19a.js} +1 -1
- package/components/areas/dictionary.e72db809.js +22 -0
- package/components/areas/hooks/index.0184c6f7.js +4 -0
- package/components/areas/hooks/{useArea/index.c135e0cf.js → useAreas/index.6540b5ab.js} +1 -1
- package/components/areas/hooks/{index.ae8d8631.js → useWindowToolsMF/index.b7afaf88.js} +1 -3
- package/components/areas/icons.3ec589d3.js +19 -0
- package/components/areas/icons.d.ts +2 -0
- package/components/areas/index.8ed127ca.js +16 -0
- package/components/areas/index.d.ts +1 -0
- package/components/areas/types.d.ts +28 -3
- package/components/formatters/BooleanFormatter/{index.99c7fe49.js → index.87ca7bb3.js} +1 -1
- package/components/formatters/{index.1a92006b.js → index.83c50bdb.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.c4ba070a.js → index.743b5558.js} +10 -10
- package/components/hook-form/RHFAutocompleteAsync/{index.a63f3704.js → index.5be9ea91.js} +2 -2
- package/components/hook-form/RHFCheckbox/{index.9055f88d.js → index.77758da5.js} +3 -3
- package/components/hook-form/RHFDateTime/{index.2cb94a66.js → index.d554d467.js} +9 -9
- package/components/hook-form/RHFPeriod/{index.14dcf762.js → index.02253c2d.js} +2 -2
- package/components/hook-form/RHFTextField/{index.7ce2b16e.js → index.5066b599.js} +6 -6
- package/components/hook-form/RHFUpload/{index.c57a43f8.js → index.6ecf3230.js} +1 -1
- package/components/modal/{WindowBase.32d35d71.js → WindowBase.e59ef8a1.js} +10 -10
- package/components/modal/{WindowConfirm.70bcbb69.js → WindowConfirm.a9e351fa.js} +16 -15
- package/components/modal/index.2e83c400.js +36 -0
- package/components/mui_extended/Accordion/{index.44e96bb8.js → index.9c36b7a5.js} +2 -2
- package/components/mui_extended/Button/{index.ec6525e0.js → index.1cb53ba2.js} +3 -3
- package/components/mui_extended/IconButton/{index.7aab3e04.js → index.89428485.js} +1 -1
- package/components/mui_extended/MenuActions/{index.bff47c06.js → index.d426f50b.js} +2 -2
- package/components/mui_extended/Pager/{index.907d5801.js → index.2c081f2c.js} +1 -1
- package/components/mui_extended/Typography/{index.d5e0f69f.js → index.1ff05abe.js} +1 -1
- package/components/mui_extended/{index.1f766f93.js → index.bc3da862.js} +8 -8
- package/contexts/ModalContext/{index.fca184e2.js → index.ca4ffa64.js} +1 -1
- package/hooks/useModal/{index.9b244379.js → index.97628a64.js} +1 -1
- package/index.js +84 -81
- package/package.json +4 -4
- package/{react-draggable.29f78f6d.js → react-draggable.64706389.js} +1 -1
- package/{react-resizable.baf54eb2.js → react-resizable.67e38975.js} +2 -2
- package/utils/{index.ee16888d.js → index.94b9dc32.js} +1 -1
- package/{vendor.619c3533.js → vendor.fcb620ee.js} +45 -44
- package/components/areas/index.bd29b1db.js +0 -56
- package/components/modal/index.ef3aa9ac.js +0 -35
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WritableDraft } from 'immer/dist/internal';
|
|
2
|
-
import { Layouts } from 'react-grid-layout';
|
|
3
|
-
import { Area, AreasStateWithActions } from './types';
|
|
4
|
-
import { WinLayout } from './types';
|
|
5
|
-
import { HashWindowsByLayouts } from '../../types';
|
|
2
|
+
import type { Layouts } from 'react-grid-layout';
|
|
3
|
+
import type { Area, AreasStateWithActions } from './types';
|
|
4
|
+
import type { WinLayout } from './types';
|
|
5
|
+
import type { HashWindowsByLayouts, WindowState, WindowStateProps } from '../../types';
|
|
6
6
|
export declare const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
7
7
|
export declare const CONTAINER_PADDING_GRIDLAYOUT = 3;
|
|
8
8
|
export declare const MARGIN_GRIDLAYOUT = 5;
|
|
@@ -31,6 +31,7 @@ export declare const MAXIMIZED_COLS: {
|
|
|
31
31
|
xs: number;
|
|
32
32
|
xxs: number;
|
|
33
33
|
};
|
|
34
|
+
export declare const DEFAULT_WINDOW: Pick<WindowState, 'status' | 'moduleActions' | 'cookies' | 'loading' | 'toasties' | 'toastyCount' | 'hashToasties'>;
|
|
34
35
|
export declare const DEFAULT_AREA: Omit<Area, 'id' | 'name' | 'loadWindows' | 'viewMode'>;
|
|
35
36
|
/**
|
|
36
37
|
* @description Función de apoyo que crea un área de trabajo,
|
|
@@ -57,3 +58,4 @@ export declare function getDataFromResponse(data: any, state: WritableDraft<Area
|
|
|
57
58
|
newHashWindowLayouts: HashWindowsByLayouts;
|
|
58
59
|
};
|
|
59
60
|
export declare function getCookiesContainer(data: any, containerId: string): Record<string, any>;
|
|
61
|
+
export declare const verifyRemoveToasty: (state: WritableDraft<WindowStateProps>, toastyId: number, forceRemove?: boolean | undefined) => void;
|
|
@@ -5,9 +5,10 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
5
5
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, EmitEvents } from "@m4l/core";
|
|
6
6
|
import { devtools } from "zustand/middleware";
|
|
7
7
|
import { immer } from "zustand/middleware/immer";
|
|
8
|
-
import { u as useAreasViewerUtilityClasses, a as
|
|
9
|
-
import {
|
|
8
|
+
import { u as useAreasViewerUtilityClasses, a as areasViewerClasses } from "../../components/AreasViewer/index.d33b4a7d.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.b26ee1b2.js";
|
|
10
10
|
import { c as createDynamicMFStore } from "../DynamicMFParmsContext/index.1607c78e.js";
|
|
11
|
+
import { g as getAreasDictionary } from "../../dictionary.e72db809.js";
|
|
11
12
|
import { debounce, cloneDeep } from "lodash";
|
|
12
13
|
import { jsx } from "react/jsx-runtime";
|
|
13
14
|
const ROW_HEIGTH_GRIDLAYOUT = 20;
|
|
@@ -20,6 +21,15 @@ const COOKIE_WINDOWS = "windows";
|
|
|
20
21
|
const BREAKPOINT_SIZES = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 };
|
|
21
22
|
const NORMALIZED_COLS = { lg: 24, md: 20, sm: 12, xs: 8, xxs: 1 };
|
|
22
23
|
const MAXIMIZED_COLS = { lg: 24, md: 20, sm: 12, xs: 8, xxs: 1 };
|
|
24
|
+
const DEFAULT_WINDOW = {
|
|
25
|
+
status: "init",
|
|
26
|
+
moduleActions: [],
|
|
27
|
+
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
28
|
+
loading: false,
|
|
29
|
+
toasties: [],
|
|
30
|
+
hashToasties: {},
|
|
31
|
+
toastyCount: 0
|
|
32
|
+
};
|
|
23
33
|
const DEFAULT_AREA = {
|
|
24
34
|
status: "init",
|
|
25
35
|
zPopUpIndex: 0,
|
|
@@ -36,7 +46,23 @@ const DEFAULT_AREA = {
|
|
|
36
46
|
};
|
|
37
47
|
const addArea = (state) => {
|
|
38
48
|
const areaId = `area_${new Date().getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
|
|
39
|
-
const
|
|
49
|
+
const labelNewArea = state.getLabel(getAreasDictionary("label_new_area"));
|
|
50
|
+
let isFree;
|
|
51
|
+
let name = `${labelNewArea} 1`;
|
|
52
|
+
for (let indexNames = 1; indexNames <= state.areas.length + 1; indexNames++) {
|
|
53
|
+
name = `${labelNewArea} ${indexNames + state.areas.length}`;
|
|
54
|
+
isFree = true;
|
|
55
|
+
for (let index = 0; index < state.areas.length; index++) {
|
|
56
|
+
const area = state.areas[index];
|
|
57
|
+
if (area.name === name) {
|
|
58
|
+
isFree = false;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (isFree) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
40
66
|
const newArea = {
|
|
41
67
|
id: areaId,
|
|
42
68
|
name,
|
|
@@ -157,6 +183,7 @@ function getDataFromResponse(data, state, areaId) {
|
|
|
157
183
|
newWindowsLayouts.push(element["layoutProps"]);
|
|
158
184
|
const onClose = state.areaActions.closeWindowLayout;
|
|
159
185
|
newHashWindowLayouts[key] = {
|
|
186
|
+
...DEFAULT_WINDOW,
|
|
160
187
|
...element,
|
|
161
188
|
windowId: key,
|
|
162
189
|
emergeType: "layout",
|
|
@@ -165,11 +192,7 @@ function getDataFromResponse(data, state, areaId) {
|
|
|
165
192
|
dynamicMFParameters: element.dynamicParams,
|
|
166
193
|
windowId: key
|
|
167
194
|
}),
|
|
168
|
-
onClose: () => onClose(areaId, key)
|
|
169
|
-
status: "init",
|
|
170
|
-
moduleActions: [],
|
|
171
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
172
|
-
loading: false
|
|
195
|
+
onClose: () => onClose(areaId, key)
|
|
173
196
|
};
|
|
174
197
|
state.hashWindows[key] = newHashWindowLayouts[key];
|
|
175
198
|
}
|
|
@@ -195,6 +218,24 @@ function getCookiesContainer(data, containerId) {
|
|
|
195
218
|
}
|
|
196
219
|
return cookies;
|
|
197
220
|
}
|
|
221
|
+
const verifyRemoveToasty = (state, toastyId, forceRemove) => {
|
|
222
|
+
const tfy = state.hashToasties[toastyId];
|
|
223
|
+
if (tfy) {
|
|
224
|
+
tfy.percentExecuted = (1 - (tfy.timeStart + tfy.timeoutMs - new Date().getTime()) / tfy.timeoutMs) * 100;
|
|
225
|
+
console.log("verifyRemoveToasty", tfy.percentExecuted);
|
|
226
|
+
if (tfy.percentExecuted >= 100 || forceRemove) {
|
|
227
|
+
const tosties = state.toasties;
|
|
228
|
+
for (let i = 0; i < tosties.length; i++) {
|
|
229
|
+
const findToasty = tosties[i];
|
|
230
|
+
if (findToasty.id === toastyId) {
|
|
231
|
+
state.toasties.splice(i, 1);
|
|
232
|
+
delete state.hashToasties[toastyId];
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
198
239
|
const createAreasStore = (initProps) => {
|
|
199
240
|
const startProps = {
|
|
200
241
|
viwerClasses: useAreasViewerUtilityClasses(initProps.ownerState),
|
|
@@ -262,7 +303,7 @@ const createAreasStore = (initProps) => {
|
|
|
262
303
|
},
|
|
263
304
|
editArea: (idArea, newName) => {
|
|
264
305
|
set((state) => {
|
|
265
|
-
|
|
306
|
+
const index = state.areas.findIndex((element) => element.id === idArea);
|
|
266
307
|
if (index > -1 && state.areas[index].name !== newName) {
|
|
267
308
|
state.areas[index].name = newName;
|
|
268
309
|
state.networkOperation({
|
|
@@ -397,10 +438,7 @@ const createAreasStore = (initProps) => {
|
|
|
397
438
|
...newWindowModalProps,
|
|
398
439
|
areaId,
|
|
399
440
|
windowId,
|
|
400
|
-
|
|
401
|
-
moduleActions: [],
|
|
402
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
403
|
-
loading: false,
|
|
441
|
+
...DEFAULT_WINDOW,
|
|
404
442
|
onClose: get().areaActions.closeWindowModal,
|
|
405
443
|
dynamicMFStore
|
|
406
444
|
};
|
|
@@ -481,10 +519,7 @@ const createAreasStore = (initProps) => {
|
|
|
481
519
|
areaId,
|
|
482
520
|
onClose: (removePopUpId) => get().areaActions.closeWindowPopUp(areaId, removePopUpId),
|
|
483
521
|
zIndex: area.zPopUpIndex,
|
|
484
|
-
|
|
485
|
-
moduleActions: [],
|
|
486
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
487
|
-
loading: false,
|
|
522
|
+
...DEFAULT_WINDOW,
|
|
488
523
|
dynamicMFStore
|
|
489
524
|
};
|
|
490
525
|
state.hashWindows[windowId] = area.hashWindowsPopups[windowId];
|
|
@@ -540,10 +575,7 @@ const createAreasStore = (initProps) => {
|
|
|
540
575
|
onClose: (removeLayoutId) => {
|
|
541
576
|
get().areaActions.closeWindowLayout(areaId, removeLayoutId);
|
|
542
577
|
},
|
|
543
|
-
|
|
544
|
-
moduleActions: [],
|
|
545
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
546
|
-
loading: false,
|
|
578
|
+
...DEFAULT_WINDOW,
|
|
547
579
|
dynamicMFStore
|
|
548
580
|
};
|
|
549
581
|
state.hashWindows[windowId] = area.hashWindowsLayouts[windowId];
|
|
@@ -924,6 +956,85 @@ const createAreasStore = (initProps) => {
|
|
|
924
956
|
toastError: false
|
|
925
957
|
});
|
|
926
958
|
}
|
|
959
|
+
},
|
|
960
|
+
toasty: (windowId, options) => {
|
|
961
|
+
const hW = get().hashWindows[windowId];
|
|
962
|
+
if (hW) {
|
|
963
|
+
if (options.replaceMeId) {
|
|
964
|
+
for (const key in hW.hashToasties) {
|
|
965
|
+
const t = hW.hashToasties[key];
|
|
966
|
+
if (options.replaceMeId === t.replaceMeId) {
|
|
967
|
+
const toastyId = t.id;
|
|
968
|
+
if (t.timer) {
|
|
969
|
+
clearTimeout(t.timer);
|
|
970
|
+
}
|
|
971
|
+
set((state2) => {
|
|
972
|
+
const hw2 = state2.hashWindows[windowId].hashToasties[toastyId];
|
|
973
|
+
hw2.timeStart = new Date().getTime();
|
|
974
|
+
hw2.percentExecuted = 0;
|
|
975
|
+
hw2.timer = setInterval(() => {
|
|
976
|
+
set((state3) => {
|
|
977
|
+
verifyRemoveToasty(
|
|
978
|
+
state3.hashWindows[windowId],
|
|
979
|
+
toastyId
|
|
980
|
+
);
|
|
981
|
+
});
|
|
982
|
+
}, 1e3);
|
|
983
|
+
});
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
set((state) => {
|
|
989
|
+
const timeoutMs = options.timeoutMs || 1e4;
|
|
990
|
+
state.hashWindows[windowId].toastyCount++;
|
|
991
|
+
const toastyId = state.hashWindows[windowId].toastyCount;
|
|
992
|
+
const newToasty = {
|
|
993
|
+
id: state.hashWindows[windowId].toastyCount,
|
|
994
|
+
...options,
|
|
995
|
+
timeoutMs,
|
|
996
|
+
timeStart: new Date().getTime(),
|
|
997
|
+
percentExecuted: 0,
|
|
998
|
+
timer: setInterval(() => {
|
|
999
|
+
set((stateRemoveToasty) => {
|
|
1000
|
+
verifyRemoveToasty(
|
|
1001
|
+
stateRemoveToasty.hashWindows[windowId],
|
|
1002
|
+
toastyId
|
|
1003
|
+
);
|
|
1004
|
+
});
|
|
1005
|
+
}, 1e3)
|
|
1006
|
+
};
|
|
1007
|
+
state.hashWindows[windowId].hashToasties[toastyId] = newToasty;
|
|
1008
|
+
state.hashWindows[windowId].toasties.push(newToasty);
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
closeToasty: (windowId, toastyId) => {
|
|
1013
|
+
set((state) => {
|
|
1014
|
+
verifyRemoveToasty(state.hashWindows[windowId], toastyId, true);
|
|
1015
|
+
});
|
|
1016
|
+
},
|
|
1017
|
+
pinToasty: (windowId, toastyId) => {
|
|
1018
|
+
set((state) => {
|
|
1019
|
+
const t = state.hashWindows[windowId].hashToasties[toastyId];
|
|
1020
|
+
if (t) {
|
|
1021
|
+
if (t.timer) {
|
|
1022
|
+
clearInterval(t.timer);
|
|
1023
|
+
t.timer = void 0;
|
|
1024
|
+
} else {
|
|
1025
|
+
t.timeStart = new Date().getTime();
|
|
1026
|
+
t.percentExecuted = 0;
|
|
1027
|
+
t.timer = setInterval(() => {
|
|
1028
|
+
set((state2) => {
|
|
1029
|
+
verifyRemoveToasty(
|
|
1030
|
+
state2.hashWindows[windowId],
|
|
1031
|
+
toastyId
|
|
1032
|
+
);
|
|
1033
|
+
});
|
|
1034
|
+
}, 1e3);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
});
|
|
927
1038
|
}
|
|
928
1039
|
}
|
|
929
1040
|
})),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { GetLabelType, NetworkProps } from '@m4l/core';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { CookieType, HashWindowsByLayouts, HashWindowsByModals, HashWindowsByPopups, ModalStateProps, NewLayoutProps, NewModalProps, NewPopUpProps, NewWindowProps, WinType, WindowStateProps } from '../../types';
|
|
3
|
+
import { CookieType, HashWindowsByLayouts, HashWindowsByModals, HashWindowsByPopups, ModalStateProps, AreaWindowAction, NewLayoutProps, NewModalProps, NewPopUpProps, NewWindowProps, ToastyOptions, WinType, WindowStateProps } from '../../types';
|
|
4
4
|
import { ViwerClasses } from '../../components/AreasViewer/classes';
|
|
5
5
|
import { AdminClasses } from '../../components/AreasAdmin/classes';
|
|
6
6
|
import { Layout, Layouts } from 'react-grid-layout';
|
|
7
|
-
import { ModuleAction } from '../..';
|
|
8
7
|
import { DebouncedFunc } from 'lodash';
|
|
9
8
|
export declare type WinLayout = Layout & {
|
|
10
9
|
winType: WinType;
|
|
@@ -181,7 +180,7 @@ export interface AreasStateWithActions extends AreasState {
|
|
|
181
180
|
loadWindowsFromApi: (areaId: string) => void;
|
|
182
181
|
};
|
|
183
182
|
windowActions: {
|
|
184
|
-
setActions: (windowId: string, newActions:
|
|
183
|
+
setActions: (windowId: string, newActions: AreaWindowAction[], version?: string) => void;
|
|
185
184
|
getCookie: (windowId: string, id: string) => Record<string, any> | undefined;
|
|
186
185
|
getCookies: (windowId: string, type: CookieType) => Record<string, any>;
|
|
187
186
|
setCookie: (windowId: string, id: string, type: CookieType, cookie: Record<string, any>) => void;
|
|
@@ -190,6 +189,9 @@ export interface AreasStateWithActions extends AreasState {
|
|
|
190
189
|
loadCookiesFromApi: (windowId: string) => void;
|
|
191
190
|
saveModuleCookies: (windowId: string) => void;
|
|
192
191
|
resetModuleCookies: (windowId: string) => void;
|
|
192
|
+
toasty: (windowId: string, options: ToastyOptions) => void;
|
|
193
|
+
closeToasty: (windowId: string, toastyId: number) => void;
|
|
194
|
+
pinToasty: (windowId: string, toastyId: number) => void;
|
|
193
195
|
};
|
|
194
196
|
}
|
|
195
197
|
export declare type DefaultAreasStoreProps = Omit<AreasState, 'currentArea'>;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { CookieType } from '../../types';
|
|
3
|
-
import { MenuAction } from '../../../mui_extended';
|
|
4
|
-
export declare type WindowActionType = 'main' | 'allways' | 'normal';
|
|
5
|
-
export interface ModuleAction extends MenuAction {
|
|
6
|
-
visibility: WindowActionType;
|
|
7
|
-
key: string;
|
|
8
|
-
tag?: any;
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
2
|
+
import type { CookieType, AreaWindowAction, ToastyOptions } from '../../types';
|
|
11
3
|
export interface WindowToolsMF {
|
|
12
4
|
getCookie: (id: string) => Record<string, any> | undefined;
|
|
13
5
|
getWindowId: () => string;
|
|
14
6
|
getCookies: (type: CookieType) => Record<string, any>;
|
|
15
|
-
setActions: (newActions:
|
|
7
|
+
setActions: (newActions: AreaWindowAction[], version?: string) => void;
|
|
16
8
|
setCookie: (id: string, type: CookieType, cookie: Record<string, any>) => void;
|
|
17
9
|
setLoading: (isLoading: boolean) => void;
|
|
10
|
+
toasty: (options: ToastyOptions) => void;
|
|
18
11
|
close: () => void;
|
|
19
12
|
}
|
|
20
13
|
export interface WindowToolsMFProviderProps extends WindowToolsMF {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './AreasContext';
|
|
2
2
|
export type { DynamicMFParameters } from './DynamicMFParmsContext/types';
|
|
3
3
|
export type { DynamicMFStore } from './DynamicMFParmsContext/store';
|
|
4
|
+
export type { WindowToolsMF } from './WindowToolsMFContext/types';
|
|
5
|
+
export type { AreaWindowAction as ModuleAction } from '../types';
|
|
4
6
|
export { WindowToolsMFProvider, WindowToolsMFContext } from './WindowToolsMFContext';
|
|
5
|
-
export type { WindowToolsMF, ModuleAction } from './WindowToolsMFContext/types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./AreasContext/index.
|
|
1
|
+
import "./AreasContext/index.9c35425b.js";
|
|
2
2
|
import "./WindowToolsMFContext/index.8f3e2a04.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const AREAS_DICTIONARY_ID = "areas";
|
|
2
|
+
function getAreasComponentsDictionary() {
|
|
3
|
+
return [AREAS_DICTIONARY_ID];
|
|
4
|
+
}
|
|
5
|
+
const LABEL_FILTER_BUTTON = "filter_tooltip";
|
|
6
|
+
const DICCTIONARY = {
|
|
7
|
+
label_new_area: "label_new_area",
|
|
8
|
+
label_persist_module_cookies: "label_persist_module_cookies",
|
|
9
|
+
label_reset_module_cookies: "label_reset_module_cookies",
|
|
10
|
+
validation_edit_area: "validation_edit_area",
|
|
11
|
+
label_edit_area: "label_edit_area"
|
|
12
|
+
};
|
|
13
|
+
const getAreasDictionary = (key) => {
|
|
14
|
+
return `${AREAS_DICTIONARY_ID}.${key}`;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
AREAS_DICTIONARY_ID as A,
|
|
18
|
+
DICCTIONARY as D,
|
|
19
|
+
LABEL_FILTER_BUTTON as L,
|
|
20
|
+
getAreasComponentsDictionary as a,
|
|
21
|
+
getAreasDictionary as g
|
|
22
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
2
|
import { useStore } from "zustand";
|
|
3
|
-
import { A as AreasContext } from "../../contexts/AreasContext/index.
|
|
3
|
+
import { A as AreasContext } from "../../contexts/AreasContext/index.9c35425b.js";
|
|
4
4
|
function useAreasStore(selector, equalityFn) {
|
|
5
5
|
const context = useContext(AreasContext);
|
|
6
6
|
if (!context)
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { a as WindowToolsMFContext } from "
|
|
3
|
-
import "zustand";
|
|
4
|
-
import "../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
2
|
+
import { a as WindowToolsMFContext } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
5
3
|
const useWindowToolsMF = () => {
|
|
6
4
|
const context = useContext(WindowToolsMFContext);
|
|
7
5
|
if (!context)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const ICONS = {
|
|
2
|
+
CLOSE: "close.svg",
|
|
3
|
+
MAXIMIZE: "maximize.svg",
|
|
4
|
+
NORMALIZE: "normalize.svg",
|
|
5
|
+
RESET_COOKIES: "reset_cookies.svg",
|
|
6
|
+
SAVE_COOKIES: "save_cookies.svg",
|
|
7
|
+
DELETE_AREA: "delete_area.svg",
|
|
8
|
+
ADD_AREA: "add_area.svg",
|
|
9
|
+
LAYERS: "layers.svg",
|
|
10
|
+
EDIT_AREA: "edit.svg",
|
|
11
|
+
CHECK: "checkmarkInCircle.svg",
|
|
12
|
+
RESIZE: "controlSize.svg",
|
|
13
|
+
VERSION: "version.svg",
|
|
14
|
+
TOASTY_CLOSE: "close.svg",
|
|
15
|
+
TOASTY_PIN: "pin.svg"
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
ICONS as I
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import "@m4l/core";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import "../Icon/index.4eeb3de9.js";
|
|
5
|
+
import "clsx";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "../mui_extended/IconButton/index.89428485.js";
|
|
8
|
+
import "@m4l/graphics";
|
|
9
|
+
import "zustand";
|
|
10
|
+
import "./contexts/AreasContext/index.9c35425b.js";
|
|
11
|
+
import "./components/AreasAdmin/index.b26ee1b2.js";
|
|
12
|
+
import "zustand/shallow";
|
|
13
|
+
import "../ScrollBar/index.bbe48f4d.js";
|
|
14
|
+
import "./components/AreasViewer/index.d33b4a7d.js";
|
|
15
|
+
import "./contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
16
|
+
import "./contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { DynamicMFParameters } from './contexts/DynamicMFParmsContext/types';
|
|
2
|
+
import type { DynamicMFParameters } from './contexts/DynamicMFParmsContext/types';
|
|
3
3
|
import type { Layout } from 'react-grid-layout';
|
|
4
|
-
import { DynamicMFStore
|
|
4
|
+
import type { DynamicMFStore } from './contexts/DynamicMFParmsContext/store';
|
|
5
|
+
import type { MenuAction } from '../mui_extended';
|
|
6
|
+
export declare type WindowActionType = 'main' | 'allways' | 'normal';
|
|
7
|
+
export interface AreaWindowAction extends MenuAction {
|
|
8
|
+
visibility: WindowActionType;
|
|
9
|
+
key: string;
|
|
10
|
+
tag?: any;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
5
13
|
export declare type WinType = 'microfrontend' | 'component';
|
|
6
14
|
export declare type EmergeType = 'layout' | 'popup' | 'modal';
|
|
7
15
|
export declare type OpenType = 'normal' | 'maximized';
|
|
@@ -17,13 +25,30 @@ export declare type Cookies = {
|
|
|
17
25
|
windowCookies: Record<string, any>;
|
|
18
26
|
};
|
|
19
27
|
export declare type WindowStatus = 'init' | 'loading' | 'loaded' | 'error';
|
|
28
|
+
export declare type ToastyType = 'success' | 'info' | 'warning' | 'error';
|
|
29
|
+
export declare type Toasty = {
|
|
30
|
+
id: number;
|
|
31
|
+
timeoutMs: number;
|
|
32
|
+
type: ToastyType;
|
|
33
|
+
message: string;
|
|
34
|
+
timeStart: number;
|
|
35
|
+
percentExecuted: number;
|
|
36
|
+
timer?: ReturnType<typeof setInterval>;
|
|
37
|
+
replaceMeId?: string;
|
|
38
|
+
};
|
|
39
|
+
export interface ToastyOptions extends Pick<Toasty, 'message' | 'type' | 'replaceMeId'> {
|
|
40
|
+
timeoutMs?: number;
|
|
41
|
+
}
|
|
20
42
|
export declare type WindowState = {
|
|
21
43
|
status: WindowStatus;
|
|
22
44
|
dynamicMFStore: DynamicMFStore;
|
|
23
45
|
loading: boolean;
|
|
24
46
|
version?: string;
|
|
25
|
-
moduleActions:
|
|
47
|
+
moduleActions: AreaWindowAction[];
|
|
26
48
|
cookies: Cookies;
|
|
49
|
+
toasties: Toasty[];
|
|
50
|
+
hashToasties: Record<number, Toasty>;
|
|
51
|
+
toastyCount: number;
|
|
27
52
|
};
|
|
28
53
|
export interface WindowBaseProps {
|
|
29
54
|
winType: WinType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
|
-
import { I as Icon } from "../../Icon/index.
|
|
3
|
+
import { I as Icon } from "../../Icon/index.4eeb3de9.js";
|
|
4
4
|
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
const BOOLEAN_FORMATTER_DICTIONARY_KEY = `boolean_formatter`;
|
|
@@ -2,11 +2,11 @@ import { W as WrapperComponent } from "../WrapperComponent/index.5e872594.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../Icon/index.
|
|
5
|
+
import "../Icon/index.4eeb3de9.js";
|
|
6
6
|
import "@mui/material";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
|
-
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY, b as BOOLEAN_FORMATTER_DICTIONARY_LABELS } from "./BooleanFormatter/index.
|
|
9
|
+
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY, b as BOOLEAN_FORMATTER_DICTIONARY_LABELS } from "./BooleanFormatter/index.87ca7bb3.js";
|
|
10
10
|
function getFormatConcatenated(values, separator) {
|
|
11
11
|
const returnSymbol = "";
|
|
12
12
|
if (values === null)
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import { styled as styled$1, Skeleton, generateUtilityClasses, generateUtilityClass, Autocomplete, Popper, TextField, CircularProgress } from "@mui/material";
|
|
4
|
-
import { I as Image } from "../../Image/index.
|
|
4
|
+
import { I as Image } from "../../Image/index.52c84d9f.js";
|
|
5
5
|
import { useMemo, useState, useEffect } from "react";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../../vendor.
|
|
6
|
+
import { T as TEST_PROP_ID } from "../../../vendor.fcb620ee.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
|
-
import { T as Typography } from "../../mui_extended/Typography/index.
|
|
9
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
8
|
+
import { T as Typography } from "../../mui_extended/Typography/index.1ff05abe.js";
|
|
9
|
+
import { H as HelperText } from "../../HelperText/index.581ddb8f.js";
|
|
10
10
|
import { styled } from "@mui/material/styles";
|
|
11
11
|
import { unstable_composeClasses } from "@mui/base";
|
|
12
12
|
import "clsx";
|
|
13
|
-
import "../../Icon/index.
|
|
14
|
-
import "../../mui_extended/IconButton/index.
|
|
13
|
+
import "../../Icon/index.4eeb3de9.js";
|
|
14
|
+
import "../../mui_extended/IconButton/index.89428485.js";
|
|
15
15
|
import "@m4l/graphics";
|
|
16
|
-
import "../../mui_extended/Accordion/index.
|
|
16
|
+
import "../../mui_extended/Accordion/index.9c36b7a5.js";
|
|
17
17
|
import "../../mui_extended/Avatar/index.fe06afd7.js";
|
|
18
18
|
import "react-router-dom";
|
|
19
19
|
import "@mui/material/Button";
|
|
20
|
-
import "../../mui_extended/Button/index.
|
|
20
|
+
import "../../mui_extended/Button/index.1cb53ba2.js";
|
|
21
21
|
import "@mui/lab";
|
|
22
22
|
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
23
|
-
import "../../mui_extended/MenuActions/index.
|
|
24
|
-
import "../../mui_extended/Pager/index.
|
|
23
|
+
import "../../mui_extended/MenuActions/index.d426f50b.js";
|
|
24
|
+
import "../../mui_extended/Pager/index.2c081f2c.js";
|
|
25
25
|
import "../../mui_extended/Tab/index.e0653a0a.js";
|
|
26
26
|
const AutocompleteRoot = styled("div")(({
|
|
27
27
|
theme
|
|
@@ -4,8 +4,8 @@ import debounce from "lodash/debounce";
|
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
5
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
-
import { T as TEST_PROP_ID } from "../../../vendor.
|
|
8
|
-
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.
|
|
7
|
+
import { T as TEST_PROP_ID } from "../../../vendor.fcb620ee.js";
|
|
8
|
+
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.743b5558.js";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
styled("div")(() => ({
|
|
11
11
|
display: "flex",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useFormContext, Controller } from "react-hook-form";
|
|
2
2
|
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass, Checkbox } from "@mui/material";
|
|
3
3
|
import { useModuleSkeleton } from "@m4l/core";
|
|
4
|
-
import { T as TEST_PROP_ID } from "../../../vendor.
|
|
4
|
+
import { T as TEST_PROP_ID } from "../../../vendor.fcb620ee.js";
|
|
5
5
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import { styled as styled$1 } from "@mui/material/styles";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
9
|
-
import { T as Typography } from "../../mui_extended/Typography/index.
|
|
8
|
+
import { H as HelperText } from "../../HelperText/index.581ddb8f.js";
|
|
9
|
+
import { T as Typography } from "../../mui_extended/Typography/index.1ff05abe.js";
|
|
10
10
|
const WrapperSkeletonCheckBox = styled("div")(() => ({
|
|
11
11
|
display: "flex",
|
|
12
12
|
justifyContent: "center",
|
|
@@ -6,21 +6,21 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
6
6
|
import { useFormatter } from "@m4l/graphics";
|
|
7
7
|
import { useState, useEffect } from "react";
|
|
8
8
|
import clsx from "clsx";
|
|
9
|
-
import "../../Icon/index.
|
|
10
|
-
import "../../mui_extended/IconButton/index.
|
|
11
|
-
import "../../mui_extended/Accordion/index.
|
|
9
|
+
import "../../Icon/index.4eeb3de9.js";
|
|
10
|
+
import "../../mui_extended/IconButton/index.89428485.js";
|
|
11
|
+
import "../../mui_extended/Accordion/index.9c36b7a5.js";
|
|
12
12
|
import "../../mui_extended/Avatar/index.fe06afd7.js";
|
|
13
13
|
import "react-router-dom";
|
|
14
14
|
import "@mui/material/Button";
|
|
15
|
-
import "../../mui_extended/Button/index.
|
|
16
|
-
import "../../Image/index.
|
|
15
|
+
import "../../mui_extended/Button/index.1cb53ba2.js";
|
|
16
|
+
import "../../Image/index.52c84d9f.js";
|
|
17
17
|
import "@mui/lab";
|
|
18
|
-
import { T as Typography } from "../../mui_extended/Typography/index.
|
|
18
|
+
import { T as Typography } from "../../mui_extended/Typography/index.1ff05abe.js";
|
|
19
19
|
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
20
|
-
import "../../mui_extended/MenuActions/index.
|
|
21
|
-
import "../../mui_extended/Pager/index.
|
|
20
|
+
import "../../mui_extended/MenuActions/index.d426f50b.js";
|
|
21
|
+
import "../../mui_extended/Pager/index.2c081f2c.js";
|
|
22
22
|
import "../../mui_extended/Tab/index.e0653a0a.js";
|
|
23
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
23
|
+
import { H as HelperText } from "../../HelperText/index.581ddb8f.js";
|
|
24
24
|
import { styled } from "@mui/material/styles";
|
|
25
25
|
import { unstable_composeClasses } from "@mui/base";
|
|
26
26
|
const SKTRHFWrapperTextField = styled("div")(({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
4
|
-
import { P as Period } from "../../Period/index.
|
|
3
|
+
import { H as HelperText } from "../../HelperText/index.581ddb8f.js";
|
|
4
|
+
import { P as Period } from "../../Period/index.f24d7084.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
const Wrapper = styled("div")(({
|
|
7
7
|
theme
|