@m4l/components 0.1.70 → 0.1.72
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/export.d.ts +20 -0
- package/components/CommonActions/components/ActionCancel/{index.9d521b2a.js → index.07ba5a89.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.4756457f.js → index.9bdae569.js} +21 -19
- package/components/CommonActions/components/ActionFormIntro/{index.40321b1b.js → index.e077d11f.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.1ba5b02b.js → index.a454d0e4.js} +3 -3
- package/components/CommonActions/components/Actions/{index.154d7cb6.js → index.e190561b.js} +20 -18
- package/components/DataGrid/{index.2f4a0e64.js → index.549bd646.js} +22 -20
- package/components/DynamicFilter/{index.789ab474.js → index.c1a3e2f1.js} +48 -98
- package/components/HelperText/{index.a69e9509.js → index.4c27bfc1.js} +11 -10
- package/components/Icon/{index.caaed284.js → index.9839297c.js} +6 -4
- package/components/Icon/types.d.ts +1 -0
- package/components/Image/{index.82a6cd46.js → index.a88f6341.js} +3 -3
- package/components/LanguagePopover/{index.5af28b9e.js → index.84c51cd3.js} +11 -11
- package/components/ModalDialog/{index.cdfd1ae8.js → index.75ddf6de.js} +19 -5
- package/components/NavLink/{index.251fcf0d.js → index.e88494ef.js} +12 -11
- package/components/NoItemSelected/{index.3b9d16e3.js → index.c3b67da1.js} +1 -1
- package/components/ObjectLogs/{index.57ea68b3.js → index.88bcf75a.js} +17 -15
- package/components/PaperForm/{index.d2d492ea.js → index.b141d583.js} +1 -1
- package/components/Period/{index.fbf074d3.js → index.2ab4f2a1.js} +20 -18
- package/components/Resizeable/{index.aafda79e.js → index.086ff29e.js} +20 -6
- package/components/SideBar/{index.3bc6a634.js → index.90137dc5.js} +55 -40
- package/components/SideBar/subcomponents/ContentMobile/subcomponents/Drawer.d.ts +3 -0
- package/components/SideBar/subcomponents/ContentMobile/subcomponents/types.d.ts +8 -0
- package/components/areas/components/AreasAdmin/index.218451cf.js +289 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +4 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +2 -0
- package/components/areas/components/{index.359c2b18.js → AreasViewer/index.51ee3d38.js} +163 -197
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/helper.d.ts +3 -3
- package/components/areas/components/index.ae4cbf2e.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.de8b4e78.js → index.0b50676d.js} +102 -15
- package/components/areas/contexts/AreasContext/types.d.ts +8 -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 +2 -10
- package/components/areas/contexts/{index.771827bb.js → index.b0ce327e.js} +1 -1
- package/components/areas/contexts/index.d.ts +2 -1
- package/components/areas/dictionary.d.ts +2 -0
- package/components/areas/dictionary.e72db809.js +22 -0
- package/components/areas/hooks/index.0184c6f7.js +4 -0
- package/components/areas/hooks/{useArea/index.2adbe001.js → useAreas/index.e868e3d9.js} +1 -1
- package/components/areas/hooks/{index.ae8d8631.js → useWindowToolsMF/index.b7afaf88.js} +1 -3
- package/components/areas/icons.b36751f2.js +17 -0
- package/components/areas/icons.d.ts +2 -0
- package/components/areas/index.05b7b8e2.js +16 -0
- package/components/areas/types.d.ts +25 -3
- package/components/formatters/BooleanFormatter/{index.7eb0498c.js → index.e610de08.js} +1 -1
- package/components/formatters/{index.f6b9ed01.js → index.982e909b.js} +3 -2
- package/components/hook-form/RHFAutocomplete/{index.09c400c3.js → index.b185393e.js} +12 -11
- package/components/hook-form/RHFAutocompleteAsync/{index.e8acff04.js → index.7a569646.js} +2 -2
- package/components/hook-form/RHFCheckbox/{index.70310f35.js → index.7a9ea396.js} +3 -3
- package/components/hook-form/RHFDateTime/{index.7b815072.js → index.2fd1d56b.js} +10 -10
- package/components/hook-form/RHFPeriod/{index.3c7d393c.js → index.df3d3f69.js} +2 -2
- package/components/hook-form/RHFTextField/{index.d4c39859.js → index.e1b50c30.js} +7 -6
- package/components/hook-form/RHFUpload/{index.31044674.js → index.ec977af6.js} +1 -1
- package/components/modal/{WindowBase.6a40a945.js → WindowBase.e5ec6128.js} +11 -11
- package/components/modal/{WindowConfirm.e21763cb.js → WindowConfirm.b89712de.js} +17 -15
- package/components/modal/index.97752555.js +36 -0
- package/components/mui_extended/Accordion/{index.437bb3f8.js → index.d420b666.js} +2 -2
- package/components/mui_extended/Button/{index.f8ce9ccd.js → index.1cd0c4e4.js} +6 -4
- package/components/mui_extended/Button/types.d.ts +2 -0
- package/components/mui_extended/IconButton/{index.57824447.js → index.590049b4.js} +7 -3
- package/components/mui_extended/MenuActions/{index.37043326.js → index.f9eb6463.js} +3 -3
- package/components/mui_extended/Pager/{index.eeed3bd5.js → index.c058b933.js} +1 -1
- package/components/mui_extended/Popover/{index.226f247e.js → index.9f35d0eb.js} +1 -3
- package/components/mui_extended/Popover/types.d.ts +6 -2
- package/components/mui_extended/Typography/{index.b3c6e71c.js → index.1659d310.js} +1 -1
- package/components/mui_extended/index.ec312b5a.js +20 -0
- package/contexts/ModalContext/{index.8e3cd7a8.js → index.92e80136.js} +1 -1
- package/hooks/useModal/{index.d590f506.js → index.18a7cb8f.js} +1 -1
- package/index.js +88 -85
- package/package.json +3 -1
- package/{react-draggable.0d64c8b1.js → react-draggable.21aa9ee1.js} +1 -1
- package/{react-resizable.8307e056.js → react-resizable.e78d1cc8.js} +3 -3
- package/utils/{index.a2312a73.js → index.8608d16c.js} +1 -1
- package/{vendor.8edaef93.js → vendor.d194839d.js} +48 -47
- package/components/DynamicFilter/subcomponents/fieldstypes/BooleanFilter/styles.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/fieldstypes/DateTimeFilter/styles.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/fieldstypes/NumberFilter/styles.d.ts +0 -2
- package/components/DynamicFilter/subcomponents/fieldstypes/StringFilter/styles.d.ts +0 -2
- package/components/areas/index.8a58bcbf.js +0 -50
- package/components/modal/index.438777d9.js +0 -34
- package/components/mui_extended/index.dacbb059.js +0 -19
|
@@ -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.51ee3d38.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.218451cf.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,14 @@ 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
|
+
tosties: [],
|
|
30
|
+
toastyCount: 0
|
|
31
|
+
};
|
|
23
32
|
const DEFAULT_AREA = {
|
|
24
33
|
status: "init",
|
|
25
34
|
zPopUpIndex: 0,
|
|
@@ -36,7 +45,23 @@ const DEFAULT_AREA = {
|
|
|
36
45
|
};
|
|
37
46
|
const addArea = (state) => {
|
|
38
47
|
const areaId = `area_${new Date().getTime()}_${(Math.random() * 1e3).toFixed(0)}`;
|
|
39
|
-
const
|
|
48
|
+
const labelNewArea = state.getLabel(getAreasDictionary("label_new_area"));
|
|
49
|
+
let isFree;
|
|
50
|
+
let name = `${labelNewArea} 1`;
|
|
51
|
+
for (let indexNames = 1; indexNames <= state.areas.length + 1; indexNames++) {
|
|
52
|
+
name = `${labelNewArea} ${indexNames + state.areas.length}`;
|
|
53
|
+
isFree = true;
|
|
54
|
+
for (let index = 0; index < state.areas.length; index++) {
|
|
55
|
+
const area = state.areas[index];
|
|
56
|
+
if (area.name === name) {
|
|
57
|
+
isFree = false;
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (isFree) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
40
65
|
const newArea = {
|
|
41
66
|
id: areaId,
|
|
42
67
|
name,
|
|
@@ -195,6 +220,16 @@ function getCookiesContainer(data, containerId) {
|
|
|
195
220
|
}
|
|
196
221
|
return cookies;
|
|
197
222
|
}
|
|
223
|
+
const removeToasty = (state, toastyId) => {
|
|
224
|
+
const tosties = state.tosties;
|
|
225
|
+
for (let i = 0; i < tosties.length; i++) {
|
|
226
|
+
const findToasty = tosties[i];
|
|
227
|
+
if (findToasty.id === toastyId) {
|
|
228
|
+
state.tosties.splice(i, 1);
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
198
233
|
const createAreasStore = (initProps) => {
|
|
199
234
|
const startProps = {
|
|
200
235
|
viwerClasses: useAreasViewerUtilityClasses(initProps.ownerState),
|
|
@@ -260,6 +295,21 @@ const createAreasStore = (initProps) => {
|
|
|
260
295
|
}
|
|
261
296
|
}
|
|
262
297
|
},
|
|
298
|
+
editArea: (idArea, newName) => {
|
|
299
|
+
set((state) => {
|
|
300
|
+
const index = state.areas.findIndex((element) => element.id === idArea);
|
|
301
|
+
if (index > -1 && state.areas[index].name !== newName) {
|
|
302
|
+
state.areas[index].name = newName;
|
|
303
|
+
state.networkOperation({
|
|
304
|
+
method: "PATCH",
|
|
305
|
+
endPoint: `areas/${idArea}`,
|
|
306
|
+
data: { name: newName },
|
|
307
|
+
toastSuccess: false,
|
|
308
|
+
toastError: false
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
},
|
|
263
313
|
addArea: () => {
|
|
264
314
|
let newId = "";
|
|
265
315
|
set((state) => {
|
|
@@ -382,10 +432,7 @@ const createAreasStore = (initProps) => {
|
|
|
382
432
|
...newWindowModalProps,
|
|
383
433
|
areaId,
|
|
384
434
|
windowId,
|
|
385
|
-
|
|
386
|
-
moduleActions: [],
|
|
387
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
388
|
-
loading: false,
|
|
435
|
+
...DEFAULT_WINDOW,
|
|
389
436
|
onClose: get().areaActions.closeWindowModal,
|
|
390
437
|
dynamicMFStore
|
|
391
438
|
};
|
|
@@ -466,10 +513,7 @@ const createAreasStore = (initProps) => {
|
|
|
466
513
|
areaId,
|
|
467
514
|
onClose: (removePopUpId) => get().areaActions.closeWindowPopUp(areaId, removePopUpId),
|
|
468
515
|
zIndex: area.zPopUpIndex,
|
|
469
|
-
|
|
470
|
-
moduleActions: [],
|
|
471
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
472
|
-
loading: false,
|
|
516
|
+
...DEFAULT_WINDOW,
|
|
473
517
|
dynamicMFStore
|
|
474
518
|
};
|
|
475
519
|
state.hashWindows[windowId] = area.hashWindowsPopups[windowId];
|
|
@@ -525,10 +569,7 @@ const createAreasStore = (initProps) => {
|
|
|
525
569
|
onClose: (removeLayoutId) => {
|
|
526
570
|
get().areaActions.closeWindowLayout(areaId, removeLayoutId);
|
|
527
571
|
},
|
|
528
|
-
|
|
529
|
-
moduleActions: [],
|
|
530
|
-
cookies: { moduleCookies: {}, windowCookies: {} },
|
|
531
|
-
loading: false,
|
|
572
|
+
...DEFAULT_WINDOW,
|
|
532
573
|
dynamicMFStore
|
|
533
574
|
};
|
|
534
575
|
state.hashWindows[windowId] = area.hashWindowsLayouts[windowId];
|
|
@@ -909,6 +950,52 @@ const createAreasStore = (initProps) => {
|
|
|
909
950
|
toastError: false
|
|
910
951
|
});
|
|
911
952
|
}
|
|
953
|
+
},
|
|
954
|
+
toasty: (windowId, options) => {
|
|
955
|
+
const hW = get().hashWindows[windowId];
|
|
956
|
+
if (hW) {
|
|
957
|
+
if (options.replaceMeId) {
|
|
958
|
+
for (let index = 0; index < hW.tosties.length; index++) {
|
|
959
|
+
const t = hW.tosties[index];
|
|
960
|
+
if (options.replaceMeId === t.replaceMeId) {
|
|
961
|
+
const toastyId = t.id;
|
|
962
|
+
if (t.timer) {
|
|
963
|
+
clearTimeout(t.timer);
|
|
964
|
+
}
|
|
965
|
+
set((stateSetTimer) => {
|
|
966
|
+
stateSetTimer.hashWindows[windowId].tosties[index].timer = setTimeout(() => {
|
|
967
|
+
set((state) => {
|
|
968
|
+
removeToasty(
|
|
969
|
+
state.hashWindows[windowId],
|
|
970
|
+
toastyId
|
|
971
|
+
);
|
|
972
|
+
});
|
|
973
|
+
}, t.timeoutMs);
|
|
974
|
+
});
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
set((state) => {
|
|
980
|
+
const timeoutMs = options.timeoutMs || 1e4;
|
|
981
|
+
state.hashWindows[windowId].toastyCount++;
|
|
982
|
+
const toastyId = state.hashWindows[windowId].toastyCount;
|
|
983
|
+
const newToasty = {
|
|
984
|
+
id: state.hashWindows[windowId].toastyCount,
|
|
985
|
+
...options,
|
|
986
|
+
timeoutMs,
|
|
987
|
+
timer: setTimeout(() => {
|
|
988
|
+
set((stateRemoveToasty) => {
|
|
989
|
+
removeToasty(
|
|
990
|
+
stateRemoveToasty.hashWindows[windowId],
|
|
991
|
+
toastyId
|
|
992
|
+
);
|
|
993
|
+
});
|
|
994
|
+
}, timeoutMs)
|
|
995
|
+
};
|
|
996
|
+
state.hashWindows[windowId].tosties.push(newToasty);
|
|
997
|
+
});
|
|
998
|
+
}
|
|
912
999
|
}
|
|
913
1000
|
}
|
|
914
1001
|
})),
|
|
@@ -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;
|
|
@@ -131,6 +130,11 @@ export interface AreasStateWithActions extends AreasState {
|
|
|
131
130
|
* @returns id del ara de trabajo
|
|
132
131
|
*/
|
|
133
132
|
addArea: () => string;
|
|
133
|
+
/**
|
|
134
|
+
* @description Edita el nombre del área de trabajo y sincroniza los cambios en la API.
|
|
135
|
+
* @returns nombre del area de trabajo
|
|
136
|
+
*/
|
|
137
|
+
editArea: (idArea: string, newName: string) => void;
|
|
134
138
|
/**
|
|
135
139
|
*
|
|
136
140
|
* @param newAreaId Id de area a seleccionar
|
|
@@ -176,7 +180,7 @@ export interface AreasStateWithActions extends AreasState {
|
|
|
176
180
|
loadWindowsFromApi: (areaId: string) => void;
|
|
177
181
|
};
|
|
178
182
|
windowActions: {
|
|
179
|
-
setActions: (windowId: string, newActions:
|
|
183
|
+
setActions: (windowId: string, newActions: AreaWindowAction[], version?: string) => void;
|
|
180
184
|
getCookie: (windowId: string, id: string) => Record<string, any> | undefined;
|
|
181
185
|
getCookies: (windowId: string, type: CookieType) => Record<string, any>;
|
|
182
186
|
setCookie: (windowId: string, id: string, type: CookieType, cookie: Record<string, any>) => void;
|
|
@@ -185,6 +189,7 @@ export interface AreasStateWithActions extends AreasState {
|
|
|
185
189
|
loadCookiesFromApi: (windowId: string) => void;
|
|
186
190
|
saveModuleCookies: (windowId: string) => void;
|
|
187
191
|
resetModuleCookies: (windowId: string) => void;
|
|
192
|
+
toasty: (windowId: string, options: ToastyOptions) => void;
|
|
188
193
|
};
|
|
189
194
|
}
|
|
190
195
|
export declare type DefaultAreasStoreProps = Omit<AreasState, 'currentArea'>;
|
|
@@ -1,18 +1,10 @@
|
|
|
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 } 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;
|
|
18
10
|
close: () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./AreasContext/index.
|
|
1
|
+
import "./AreasContext/index.0b50676d.js";
|
|
2
2
|
import "./WindowToolsMFContext/index.8f3e2a04.js";
|
|
@@ -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';
|
|
@@ -5,6 +5,8 @@ export declare const DICCTIONARY: {
|
|
|
5
5
|
readonly label_new_area: "label_new_area";
|
|
6
6
|
readonly label_persist_module_cookies: "label_persist_module_cookies";
|
|
7
7
|
readonly label_reset_module_cookies: "label_reset_module_cookies";
|
|
8
|
+
readonly validation_edit_area: "validation_edit_area";
|
|
9
|
+
readonly label_edit_area: "label_edit_area";
|
|
8
10
|
};
|
|
9
11
|
export declare type TypeDictionary = typeof DICCTIONARY;
|
|
10
12
|
export declare const getAreasDictionary: (key: keyof TypeDictionary) => string;
|
|
@@ -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.0b50676d.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,17 @@
|
|
|
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
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
ICONS as I
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import "@m4l/core";
|
|
3
|
+
import "@mui/material";
|
|
4
|
+
import "../Icon/index.9839297c.js";
|
|
5
|
+
import "clsx";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "../mui_extended/IconButton/index.590049b4.js";
|
|
8
|
+
import "@m4l/graphics";
|
|
9
|
+
import "zustand";
|
|
10
|
+
import "./contexts/AreasContext/index.0b50676d.js";
|
|
11
|
+
import "./components/AreasAdmin/index.218451cf.js";
|
|
12
|
+
import "zustand/shallow";
|
|
13
|
+
import "../ScrollBar/index.bbe48f4d.js";
|
|
14
|
+
import "./components/AreasViewer/index.51ee3d38.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,27 @@ 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
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
35
|
+
replaceMeId?: string;
|
|
36
|
+
};
|
|
37
|
+
export interface ToastyOptions extends Pick<Toasty, 'message' | 'type' | 'replaceMeId'> {
|
|
38
|
+
timeoutMs?: number;
|
|
39
|
+
}
|
|
20
40
|
export declare type WindowState = {
|
|
21
41
|
status: WindowStatus;
|
|
22
42
|
dynamicMFStore: DynamicMFStore;
|
|
23
43
|
loading: boolean;
|
|
24
44
|
version?: string;
|
|
25
|
-
moduleActions:
|
|
45
|
+
moduleActions: AreaWindowAction[];
|
|
26
46
|
cookies: Cookies;
|
|
47
|
+
tosties: Toasty[];
|
|
48
|
+
toastyCount: number;
|
|
27
49
|
};
|
|
28
50
|
export interface WindowBaseProps {
|
|
29
51
|
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.9839297c.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,10 +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.9839297c.js";
|
|
6
6
|
import "@mui/material";
|
|
7
|
+
import "clsx";
|
|
7
8
|
import "@m4l/graphics";
|
|
8
|
-
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.e610de08.js";
|
|
9
10
|
function getFormatConcatenated(values, separator) {
|
|
10
11
|
const returnSymbol = "";
|
|
11
12
|
if (values === null)
|
|
@@ -1,26 +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.a88f6341.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.d194839d.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.1659d310.js";
|
|
9
|
+
import { H as HelperText } from "../../HelperText/index.4c27bfc1.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.
|
|
15
|
-
import "
|
|
13
|
+
import "../../Icon/index.9839297c.js";
|
|
14
|
+
import "../../mui_extended/IconButton/index.590049b4.js";
|
|
15
|
+
import "@m4l/graphics";
|
|
16
|
+
import "../../mui_extended/Accordion/index.d420b666.js";
|
|
16
17
|
import "../../mui_extended/Avatar/index.fe06afd7.js";
|
|
17
18
|
import "react-router-dom";
|
|
18
19
|
import "@mui/material/Button";
|
|
19
|
-
import "../../mui_extended/Button/index.
|
|
20
|
+
import "../../mui_extended/Button/index.1cd0c4e4.js";
|
|
20
21
|
import "@mui/lab";
|
|
21
|
-
import "../../mui_extended/Popover/index.
|
|
22
|
-
import "../../mui_extended/MenuActions/index.
|
|
23
|
-
import "../../mui_extended/Pager/index.
|
|
22
|
+
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
23
|
+
import "../../mui_extended/MenuActions/index.f9eb6463.js";
|
|
24
|
+
import "../../mui_extended/Pager/index.c058b933.js";
|
|
24
25
|
import "../../mui_extended/Tab/index.e0653a0a.js";
|
|
25
26
|
const AutocompleteRoot = styled("div")(({
|
|
26
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.d194839d.js";
|
|
8
|
+
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.b185393e.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.d194839d.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.4c27bfc1.js";
|
|
9
|
+
import { T as Typography } from "../../mui_extended/Typography/index.1659d310.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.9839297c.js";
|
|
10
|
+
import "../../mui_extended/IconButton/index.590049b4.js";
|
|
11
|
+
import "../../mui_extended/Accordion/index.d420b666.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.1cd0c4e4.js";
|
|
16
|
+
import "../../Image/index.a88f6341.js";
|
|
17
17
|
import "@mui/lab";
|
|
18
|
-
import { T as Typography } from "../../mui_extended/Typography/index.
|
|
19
|
-
import "../../mui_extended/Popover/index.
|
|
20
|
-
import "../../mui_extended/MenuActions/index.
|
|
21
|
-
import "../../mui_extended/Pager/index.
|
|
18
|
+
import { T as Typography } from "../../mui_extended/Typography/index.1659d310.js";
|
|
19
|
+
import "../../mui_extended/Popover/index.9f35d0eb.js";
|
|
20
|
+
import "../../mui_extended/MenuActions/index.f9eb6463.js";
|
|
21
|
+
import "../../mui_extended/Pager/index.c058b933.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.4c27bfc1.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.4c27bfc1.js";
|
|
4
|
+
import { P as Period } from "../../Period/index.2ab4f2a1.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
const Wrapper = styled("div")(({
|
|
7
7
|
theme
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { styled, Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
|
|
3
3
|
import { forwardRef, useState, useEffect } from "react";
|
|
4
|
-
import { I as IconButton } from "../../mui_extended/IconButton/index.
|
|
5
|
-
import { T as TEST_PROP_ID } from "../../../vendor.
|
|
4
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.590049b4.js";
|
|
5
|
+
import { T as TEST_PROP_ID } from "../../../vendor.d194839d.js";
|
|
6
6
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
7
|
-
import "../../Icon/index.
|
|
7
|
+
import "../../Icon/index.9839297c.js";
|
|
8
8
|
import "clsx";
|
|
9
|
+
import "@m4l/graphics";
|
|
9
10
|
import { useFormContext, Controller } from "react-hook-form";
|
|
10
11
|
import { styled as styled$1 } from "@mui/material/styles";
|
|
11
12
|
import { unstable_composeClasses } from "@mui/base";
|
|
12
|
-
import { g as getComponentUtilityClass } from "../../../utils/index.
|
|
13
|
-
import { T as Typography } from "../../mui_extended/Typography/index.
|
|
14
|
-
import { H as HelperText } from "../../HelperText/index.
|
|
13
|
+
import { g as getComponentUtilityClass } from "../../../utils/index.8608d16c.js";
|
|
14
|
+
import { T as Typography } from "../../mui_extended/Typography/index.1659d310.js";
|
|
15
|
+
import { H as HelperText } from "../../HelperText/index.4c27bfc1.js";
|
|
15
16
|
const SkeletonTextFieldRoot = styled("div")(() => ({
|
|
16
17
|
display: "flex",
|
|
17
18
|
flexDirection: "column",
|
|
@@ -4,7 +4,7 @@ import { useFormContext, Controller } from "react-hook-form";
|
|
|
4
4
|
import isString from "lodash/isString";
|
|
5
5
|
import { useDropzone } from "react-dropzone";
|
|
6
6
|
import { styled, alpha } from "@mui/material/styles";
|
|
7
|
-
import { I as Image } from "../../Image/index.
|
|
7
|
+
import { I as Image } from "../../Image/index.a88f6341.js";
|
|
8
8
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
9
9
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
10
10
|
const WrapperUploadImage = styled("div")(({
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { useEnvironment } from "@m4l/core";
|
|
2
2
|
import "react";
|
|
3
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
3
|
+
import { u as useModal } from "../../hooks/useModal/index.18a7cb8f.js";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
|
-
import { a as getThemeVariantColor } from "../../utils/index.
|
|
6
|
-
import { I as Icon } from "../Icon/index.
|
|
5
|
+
import { a as getThemeVariantColor } from "../../utils/index.8608d16c.js";
|
|
6
|
+
import { I as Icon } from "../Icon/index.9839297c.js";
|
|
7
7
|
import "@mui/material";
|
|
8
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
9
|
-
import "../mui_extended/Accordion/index.
|
|
8
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.590049b4.js";
|
|
9
|
+
import "../mui_extended/Accordion/index.d420b666.js";
|
|
10
10
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
11
11
|
import "../mui_extended/Avatar/index.fe06afd7.js";
|
|
12
12
|
import "react-router-dom";
|
|
13
13
|
import "@mui/material/Button";
|
|
14
|
-
import "../mui_extended/Button/index.
|
|
14
|
+
import "../mui_extended/Button/index.1cd0c4e4.js";
|
|
15
15
|
import "clsx";
|
|
16
|
-
import "../Image/index.
|
|
16
|
+
import "../Image/index.a88f6341.js";
|
|
17
17
|
import "@mui/lab";
|
|
18
|
-
import "../mui_extended/Typography/index.
|
|
19
|
-
import "../mui_extended/Popover/index.
|
|
20
|
-
import "../mui_extended/MenuActions/index.
|
|
21
|
-
import "../mui_extended/Pager/index.
|
|
18
|
+
import "../mui_extended/Typography/index.1659d310.js";
|
|
19
|
+
import "../mui_extended/Popover/index.9f35d0eb.js";
|
|
20
|
+
import "../mui_extended/MenuActions/index.f9eb6463.js";
|
|
21
|
+
import "../mui_extended/Pager/index.c058b933.js";
|
|
22
22
|
import "../mui_extended/Tab/index.e0653a0a.js";
|
|
23
23
|
const WrapperWindowBase = styled("div")(({ theme }) => ({
|
|
24
24
|
display: "flex",
|