@m4l/components 9.2.59 → 9.2.60
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/.storybook/decorators/WithAppearanceContext/WithAppearanceContext.d.ts +1 -1
- package/.storybook/decorators/WithWindowsToolsAndParmsMFContexts/WithWindowsToolsAndParmsMFContexts.d.ts +5 -0
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +4 -0
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/WindowBase/contexts/WindowToolsMFContext/types.d.ts +10 -0
- package/components/WindowBase/hooks/useDynamicMFParameters/index.js +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +4 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/hooks/useWindow.js +8 -5
- package/components/areas/contexts/AreasContext/store.js +16 -0
- package/components/areas/contexts/AreasContext/types.d.ts +2 -0
- package/components/areas/hooks/index.d.ts +0 -1
- package/components/areas/types.d.ts +4 -0
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +5 -0
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/components/popups/components/PopupsProvider/hooks/usePopups.js +2 -1
- package/index.js +59 -61
- package/package.json +14 -14
- package/.storybook/decorators/WithWindowsToolsContext/WithContextWindowTools.d.ts +0 -5
- package/components/areas/hooks/useSetWindowsTitle/index.d.ts +0 -1
- package/components/areas/hooks/useSetWindowsTitle/index.js +0 -1
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.d.ts +0 -6
- package/components/areas/hooks/useSetWindowsTitle/useSetWindowsTitle.js +0 -31
- package/storybook/components/WindowBase/subcomponents/WithContextWindowToolsProvider.d.ts +0 -5
- package/storybook/components/commonActions/components/ActionFormCancel/WindowToolsMFProvider.d.ts +0 -5
|
@@ -2,5 +2,5 @@ import { StoryFn } from '@storybook/react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Decorador que agrega el contexto de apariencia al story.
|
|
4
4
|
*/
|
|
5
|
-
declare const WithAppearanceContext: (Story: StoryFn) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const WithAppearanceContext: (Story: StoryFn) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default WithAppearanceContext;
|
|
@@ -7,6 +7,10 @@ export interface BaseConfigColumn {
|
|
|
7
7
|
visible: boolean;
|
|
8
8
|
index: number;
|
|
9
9
|
frozen: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated internamente el componente usa el name de columns.
|
|
12
|
+
*/
|
|
13
|
+
name?: string;
|
|
10
14
|
}
|
|
11
15
|
export interface IConfigColumn extends BaseConfigColumn {
|
|
12
16
|
hidden: boolean;
|
|
@@ -17,6 +17,7 @@ function getComparator(columns, sortColumn) {
|
|
|
17
17
|
return column.customSort;
|
|
18
18
|
}
|
|
19
19
|
switch (typeOrder) {
|
|
20
|
+
//Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
|
|
20
21
|
case "number":
|
|
21
22
|
return (a, b) => {
|
|
22
23
|
try {
|
|
@@ -25,6 +26,7 @@ function getComparator(columns, sortColumn) {
|
|
|
25
26
|
return -1;
|
|
26
27
|
}
|
|
27
28
|
};
|
|
29
|
+
//Por defecto retorna una función de ordenamiento de string
|
|
28
30
|
default:
|
|
29
31
|
return (a, b) => {
|
|
30
32
|
try {
|
|
@@ -17,11 +17,11 @@ declare function usePopoverFilter(): {
|
|
|
17
17
|
filterFormValue: FormFilterValue;
|
|
18
18
|
formFilter: FormFilterFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -17,11 +17,11 @@ declare function usePopoverSort(): {
|
|
|
17
17
|
sortFormValue: import('../../types').FormSortValueBase;
|
|
18
18
|
formSort: FormSortFieldApplied;
|
|
19
19
|
popupValidationSchema: import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ObjectSchema<{
|
|
20
|
-
[x: string]: import('yup').ObjectSchema
|
|
20
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
21
21
|
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
22
|
-
[x: string]: import('yup').ObjectSchema
|
|
22
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
23
23
|
}>, import('yup/lib/object').AssertsShape<{
|
|
24
|
-
[x: string]: import('yup').ObjectSchema
|
|
24
|
+
[x: string]: import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>> | import('yup').BaseSchema<any, import('yup/lib/object').AnyObject, any> | import('yup').ArraySchema<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown> | import('yup/lib/Lazy').default<import('yup').BaseSchema<unknown, import('yup/lib/object').AnyObject, unknown>, import('yup/lib/object').AnyObject>, import('yup/lib/types').AnyObject, unknown[] | undefined, unknown[] | undefined> | import('yup/lib/Lazy').default<import('yup').ObjectSchema<any, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<any>, import('yup/lib/object').AssertsShape<any>>, any>;
|
|
25
25
|
}>> | undefined;
|
|
26
26
|
statusLoad: "initial" | "reload_values_provider" | "ready";
|
|
27
27
|
};
|
|
@@ -56,9 +56,11 @@ const useNumberInput = (parameters) => {
|
|
|
56
56
|
(event, field, fieldValue, reason) => {
|
|
57
57
|
if (field === "value" && typeof fieldValue !== "string") {
|
|
58
58
|
switch (reason) {
|
|
59
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
59
60
|
case "numberInput:inputChange":
|
|
60
61
|
onChange?.(event, fieldValue);
|
|
61
62
|
break;
|
|
63
|
+
// only a blur event will dispatch `numberInput:clamp`
|
|
62
64
|
case "numberInput:clamp":
|
|
63
65
|
onChange?.(event, fieldValue);
|
|
64
66
|
break;
|
|
@@ -64,6 +64,16 @@ export interface WindowToolsMF {
|
|
|
64
64
|
* @param {string} title Titulo que se visulizará en la ventana del módulo
|
|
65
65
|
*/
|
|
66
66
|
setWindowTitle: (title: string) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Método para setear el subtitulo de la ventana y que pueda cambiar de idioma
|
|
69
|
+
* @param {string} subtitle Subtitulo que se visulizará en la ventana del módulo
|
|
70
|
+
*/
|
|
71
|
+
setWindowSubTitle: (subtitle: string) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Método para setear la información de edición de la ventana y que pueda cambiar de idioma
|
|
74
|
+
* @param {string} editionInfo Información de edición que se visulizará en la ventana del módulo
|
|
75
|
+
*/
|
|
76
|
+
setWindowEditionInfo: (editionInfo: string) => void;
|
|
67
77
|
}
|
|
68
78
|
/**
|
|
69
79
|
* Props del componente WindowToolsMFProvider que incluyen las herramientas de ventana proporcionadas por la interfaz WindowToolsMF.
|
|
@@ -16,6 +16,6 @@ function useDynamicMFParametersStore(selector, equalityFn) {
|
|
|
16
16
|
return useStore(store, selector, equalityFn);
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
useDynamicMFParametersStore as a,
|
|
20
|
+
useDynamicMFParameters as u
|
|
21
21
|
};
|
package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js
CHANGED
|
@@ -16,6 +16,8 @@ const Window = (props) => {
|
|
|
16
16
|
moduleId,
|
|
17
17
|
winType,
|
|
18
18
|
title,
|
|
19
|
+
subTitle,
|
|
20
|
+
editionInfo,
|
|
19
21
|
iconUrl,
|
|
20
22
|
version,
|
|
21
23
|
buildTime,
|
|
@@ -41,6 +43,8 @@ const Window = (props) => {
|
|
|
41
43
|
WindowBaseStyled,
|
|
42
44
|
{
|
|
43
45
|
title: `${title}${moduleCount ? `:${moduleCount}` : ""}`,
|
|
46
|
+
subTitle,
|
|
47
|
+
editionInfo,
|
|
44
48
|
iconUrl,
|
|
45
49
|
isLoading: loading,
|
|
46
50
|
onClose: () => windowTools.close(),
|
|
@@ -14,6 +14,8 @@ export declare const useWindow: (windowId: string, areaId?: string) => {
|
|
|
14
14
|
moduleId: string;
|
|
15
15
|
winType: "component" | "microfrontend";
|
|
16
16
|
title: string;
|
|
17
|
+
subTitle: string | undefined;
|
|
18
|
+
editionInfo: string | undefined;
|
|
17
19
|
iconUrl: string;
|
|
18
20
|
version: string | undefined;
|
|
19
21
|
buildTime: string | undefined;
|
|
@@ -5,7 +5,7 @@ import { u as useHeaderActions } from "./useHeaderActions.js";
|
|
|
5
5
|
import { u as usePopupsStore } from "../../../../../../../../popups/components/PopupsProvider/hooks/usePopupsStore.js";
|
|
6
6
|
import { c as createToaster } from "../../../../../../../../ToastContainer/helpers/toaster.js";
|
|
7
7
|
const useWindow = (windowId, areaId) => {
|
|
8
|
-
const [emergeType, moduleId, winType, title, iconUrl, version, buildTime, moduleCount, selected, loading, status, dynamicMFStore] = useAreasStore((state) => {
|
|
8
|
+
const [emergeType, moduleId, winType, title, subTitle, editionInfo, iconUrl, version, buildTime, moduleCount, selected, loading, status, dynamicMFStore] = useAreasStore((state) => {
|
|
9
9
|
const window = state.hashWindows[windowId];
|
|
10
10
|
const selected2 = areaId ? state.hashAreas[areaId]?.currentLayoutId === windowId : false;
|
|
11
11
|
return [
|
|
@@ -13,6 +13,8 @@ const useWindow = (windowId, areaId) => {
|
|
|
13
13
|
window?.moduleId,
|
|
14
14
|
window?.winType,
|
|
15
15
|
window?.title,
|
|
16
|
+
window?.subTitle,
|
|
17
|
+
window?.editionInfo,
|
|
16
18
|
window?.iconUrl,
|
|
17
19
|
window?.version,
|
|
18
20
|
window?.buildTime,
|
|
@@ -28,7 +30,7 @@ const useWindow = (windowId, areaId) => {
|
|
|
28
30
|
(state) => state.hashWindows[windowId]?.component,
|
|
29
31
|
shallow
|
|
30
32
|
);
|
|
31
|
-
const { setActions, getCookie, getCookies, setCookie, close, startProgress, stopProgress, setFnQueryClose, setWindowTitle, loadCookiesFromApi } = useAreasStore((state) => state.windowActions, shallow);
|
|
33
|
+
const { setActions, getCookie, getCookies, setCookie, close, startProgress, stopProgress, setFnQueryClose, setWindowTitle, setWindowSubTitle, setWindowEditionInfo, loadCookiesFromApi } = useAreasStore((state) => state.windowActions, shallow);
|
|
32
34
|
const { selectLayout } = useAreasStore((state) => state.areaActions, shallow);
|
|
33
35
|
const { setSelectedPopupId } = usePopupsStore((state) => state.popupsActions, shallow);
|
|
34
36
|
const onTouch = () => {
|
|
@@ -55,9 +57,8 @@ const useWindow = (windowId, areaId) => {
|
|
|
55
57
|
setFnQueryClose: (fnQueryClose) => setFnQueryClose(windowId, fnQueryClose),
|
|
56
58
|
toast: createToaster(windowId),
|
|
57
59
|
setWindowTitle: (newTitle) => setWindowTitle(windowId, newTitle),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
60
|
+
setWindowSubTitle: (newSubtitle) => setWindowSubTitle(windowId, newSubtitle),
|
|
61
|
+
setWindowEditionInfo: (newEditionInfo) => setWindowEditionInfo(windowId, newEditionInfo),
|
|
61
62
|
hide: () => {
|
|
62
63
|
throw new Error("hide not implemented");
|
|
63
64
|
},
|
|
@@ -84,6 +85,8 @@ const useWindow = (windowId, areaId) => {
|
|
|
84
85
|
moduleId,
|
|
85
86
|
winType,
|
|
86
87
|
title,
|
|
88
|
+
subTitle,
|
|
89
|
+
editionInfo,
|
|
87
90
|
iconUrl,
|
|
88
91
|
version,
|
|
89
92
|
buildTime,
|
|
@@ -841,6 +841,22 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
841
841
|
set((state) => {
|
|
842
842
|
state.hashWindows[windowId].title = title;
|
|
843
843
|
});
|
|
844
|
+
},
|
|
845
|
+
/**
|
|
846
|
+
* setWindowSubtitle
|
|
847
|
+
*/
|
|
848
|
+
setWindowSubTitle: (windowId, subTitle) => {
|
|
849
|
+
set((state) => {
|
|
850
|
+
state.hashWindows[windowId].subTitle = subTitle;
|
|
851
|
+
});
|
|
852
|
+
},
|
|
853
|
+
/**
|
|
854
|
+
* setWindowEditionInfo
|
|
855
|
+
*/
|
|
856
|
+
setWindowEditionInfo: (windowId, editionInfo) => {
|
|
857
|
+
set((state) => {
|
|
858
|
+
state.hashWindows[windowId].editionInfo = editionInfo;
|
|
859
|
+
});
|
|
844
860
|
}
|
|
845
861
|
}
|
|
846
862
|
})),
|
|
@@ -293,6 +293,8 @@ export interface AreasStoreStateWithActions extends AreasStoreState {
|
|
|
293
293
|
resetModuleCookies: (windowId: string) => void;
|
|
294
294
|
setFnQueryClose: (windowId: string, fnQueryClose: () => void) => void;
|
|
295
295
|
setWindowTitle: (windowId: string, title: string) => void;
|
|
296
|
+
setWindowSubTitle: (windowId: string, subTitle: string) => void;
|
|
297
|
+
setWindowEditionInfo: (windowId: string, editionInfo: string) => void;
|
|
296
298
|
};
|
|
297
299
|
}
|
|
298
300
|
export type DefaultAreasStoreProps = Omit<AreasStoreState, 'currentArea'>;
|
|
@@ -99,6 +99,10 @@ export interface EmmitNewWindowBase {
|
|
|
99
99
|
* Subtítulo de la ventana.
|
|
100
100
|
*/
|
|
101
101
|
subTitle?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Información de edición de la ventana.
|
|
104
|
+
*/
|
|
105
|
+
editionInfo?: string;
|
|
102
106
|
/**
|
|
103
107
|
* Opciones de la ventana. Son acciones que permiten persistir las cookies de la ventana a nivel de módulo, para que aunque se cierre esta,
|
|
104
108
|
* Cuando se abra de nuevo venga con las cookies guardadas.
|
|
@@ -65,6 +65,11 @@ const RHFAutocompleteAsyncReducer = (onChangeFilterParms) => (state, action) =>
|
|
|
65
65
|
...state,
|
|
66
66
|
isOpen: false
|
|
67
67
|
};
|
|
68
|
+
// case actionsType.SET_SELECTED_OPTIONS_TO_AUTOCOMPLETE:
|
|
69
|
+
// return {
|
|
70
|
+
// ...state,
|
|
71
|
+
// selectedOptions: action.payload,
|
|
72
|
+
// };
|
|
68
73
|
default:
|
|
69
74
|
return state;
|
|
70
75
|
}
|
|
@@ -3,7 +3,7 @@ import { CustomFormArguments, FormProviderCustomProps, FormProviderProps } from
|
|
|
3
3
|
/**
|
|
4
4
|
* TODO: Documentar
|
|
5
5
|
*/
|
|
6
|
-
export declare function useCustomForm({ validationSchema, values, statusLoad }: CustomFormArguments): import('react-hook-form').UseFormReturn<FieldValues, any,
|
|
6
|
+
export declare function useCustomForm({ validationSchema, values, statusLoad }: CustomFormArguments): import('react-hook-form').UseFormReturn<FieldValues, any, undefined>;
|
|
7
7
|
/**
|
|
8
8
|
* TODO: Documentar
|
|
9
9
|
*/
|
|
@@ -80,7 +80,8 @@ const usePopups = (popupId) => {
|
|
|
80
80
|
setFnQueryClose: (fnQueryClose) => setFnQueryClose(popupId, fnQueryClose),
|
|
81
81
|
toast: createToaster(popupId),
|
|
82
82
|
setWindowTitle: (newTitle) => update(popupId, { title: newTitle }),
|
|
83
|
-
|
|
83
|
+
setWindowSubTitle: (newSubtitle) => update(popupId, { subTitle: newSubtitle }),
|
|
84
|
+
setWindowEditionInfo: (newEditionInfo) => update(popupId, { editionInfo: newEditionInfo }),
|
|
84
85
|
hide: () => hide(popupId),
|
|
85
86
|
show: () => {
|
|
86
87
|
show(popupId);
|
package/index.js
CHANGED
|
@@ -15,8 +15,7 @@ import { g as g2 } from "./components/AppBar/dictionary.js";
|
|
|
15
15
|
import { A as A4 } from "./components/areas/components/AreasAdmin/AreasAdmin.js";
|
|
16
16
|
import { A as A5 } from "./components/areas/components/AreasViewer/AreasViewer.js";
|
|
17
17
|
import { a as a2, A as A6 } from "./components/areas/contexts/AreasContext/index.js";
|
|
18
|
-
import { u } from "./components/areas/hooks/
|
|
19
|
-
import { u as u2 } from "./components/areas/hooks/useAreas/index.js";
|
|
18
|
+
import { u } from "./components/areas/hooks/useAreas/index.js";
|
|
20
19
|
import { A as A7, a as a3, L as L2, b as b2, g as g3 } from "./components/areas/dictionary.js";
|
|
21
20
|
import { B } from "./components/BaseModule/BaseModule.js";
|
|
22
21
|
import { C } from "./components/Chip/Chip.js";
|
|
@@ -36,26 +35,26 @@ import { N, T as T2 } from "./components/DataGrid/subcomponents/editors/TextEdit
|
|
|
36
35
|
import { g as g6 } from "./components/DataGrid/utils/getDataGridRowsFromSet.js";
|
|
37
36
|
import { b as b3, a as a4, d as d2 } from "./components/DataGrid/constants.js";
|
|
38
37
|
import { C as C2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js";
|
|
39
|
-
import { u as
|
|
38
|
+
import { u as u2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.js";
|
|
40
39
|
import { C as C3 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js";
|
|
41
|
-
import { u as
|
|
40
|
+
import { u as u3 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/useColumnConcatenatedValues.js";
|
|
42
41
|
import { C as C4 } from "./components/DataGrid/formatters/ColumnDateFormatter/formatter.js";
|
|
43
|
-
import { u as
|
|
42
|
+
import { u as u4 } from "./components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.js";
|
|
44
43
|
import { C as C5 } from "./components/DataGrid/formatters/ColumnIconFormatter/formatter.js";
|
|
45
44
|
import { C as C6 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
46
|
-
import { u as
|
|
45
|
+
import { u as u5 } from "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/useColumnInteractiveCheck.js";
|
|
47
46
|
import { C as C7 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js";
|
|
48
|
-
import { u as
|
|
47
|
+
import { u as u6 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js";
|
|
49
48
|
import { C as C8 } from "./components/DataGrid/formatters/ColumnPointsFormatter/formatter.js";
|
|
50
|
-
import { u as
|
|
49
|
+
import { u as u7 } from "./components/DataGrid/formatters/ColumnPointsFormatter/useColumnPoints.js";
|
|
51
50
|
import { C as C9 } from "./components/DataGrid/formatters/ColumnPriceFormatter/formatter.js";
|
|
52
|
-
import { u as
|
|
51
|
+
import { u as u8 } from "./components/DataGrid/formatters/ColumnPriceFormatter/useColumnPrice.js";
|
|
53
52
|
import { C as C10 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/formatter.js";
|
|
54
|
-
import { u as
|
|
53
|
+
import { u as u9 } from "./components/DataGrid/formatters/ColumnSetCheckFormatter/useColumnSetCheck.js";
|
|
55
54
|
import { C as C11 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/formatter.js";
|
|
56
|
-
import { u as
|
|
55
|
+
import { u as u10 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/useColumnUncertainty.js";
|
|
57
56
|
import { C as C12 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js";
|
|
58
|
-
import { u as
|
|
57
|
+
import { u as u11 } from "./components/DataGrid/formatters/ColumnChipStatusFormatter/useColumnChipStatus.js";
|
|
59
58
|
import { D as D3 } from "./components/DragResizeWindowRND/DragResizeWindowRND.js";
|
|
60
59
|
import { d as d3 } from "./components/DragResizeWindowRND/classes/index.js";
|
|
61
60
|
import { g as g7 } from "./components/DynamicFilter/dictionary.js";
|
|
@@ -112,7 +111,7 @@ import { D as D7, g as g12 } from "./components/formatters/DateFormatter/DateFor
|
|
|
112
111
|
import { U, g as g13 } from "./components/formatters/UncertaintyFormatter/UncertaintyFormatter.js";
|
|
113
112
|
import { P as P3, g as g14 } from "./components/formatters/PointsFormatter/PointsFormatter.js";
|
|
114
113
|
import { C as C15, g as g15 } from "./components/formatters/ConcatenatedFormatter/ConcatenatedFormatter.js";
|
|
115
|
-
import { P as P4, u as
|
|
114
|
+
import { P as P4, u as u12 } from "./components/formatters/PeriodFormatter/PeriodFormatter.js";
|
|
116
115
|
import { P as P5, g as g16 } from "./components/formatters/PriceFormatter/PriceFormatter.js";
|
|
117
116
|
import { C as C16 } from "./components/formatters/ChipStatusFormatter/ChipStatusFormatter.js";
|
|
118
117
|
import { g as g17 } from "./components/formatters/DistanceToNowFormatter/dictionary.js";
|
|
@@ -166,7 +165,7 @@ import { g as g26 } from "./components/ObjectLogs/dictionary.js";
|
|
|
166
165
|
import { O } from "./components/ObjectLogs/ObjectLogs.js";
|
|
167
166
|
import { P as P7 } from "./components/PaperForm/PaperForm.js";
|
|
168
167
|
import { P as P8 } from "./components/PDFViewer/PDFViewer.js";
|
|
169
|
-
import { u as
|
|
168
|
+
import { u as u13 } from "./components/popups/components/PopupsProvider/hooks/usePopupsStore.js";
|
|
170
169
|
import { a as a10, P as P9 } from "./components/popups/components/PopupsProvider/contexts/PopupsContext/PopupsContext.js";
|
|
171
170
|
import { P as P10 } from "./components/popups/components/PopupsViewer/PopupsViewer.js";
|
|
172
171
|
import { P as P11 } from "./components/PrintingSystem/PrintingSystem.js";
|
|
@@ -176,8 +175,8 @@ import { S as S8 } from "./components/SideBar/SideBar.js";
|
|
|
176
175
|
import { T as T18 } from "./components/ToastContainer/ToastContainer.js";
|
|
177
176
|
import { T as T19 } from "./components/ToastContainer/subcomponents/ToastMessage/ToastMessage.js";
|
|
178
177
|
import { W } from "./components/WindowBase/WindowBase.js";
|
|
179
|
-
import { u as
|
|
180
|
-
import {
|
|
178
|
+
import { u as u14 } from "./components/WindowBase/hooks/useWindowToolsMF/index.js";
|
|
179
|
+
import { u as u15, a as a11 } from "./components/WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
181
180
|
import { M as M6, W as W2, a as a12 } from "./components/WindowBase/contexts/WindowToolsMFContext/WindowToolsMFContext.js";
|
|
182
181
|
import { c as c3 } from "./components/WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
183
182
|
import { D as D9, a as a13, M as M7 } from "./components/WindowBase/contexts/DynamicMFParmsContext/DynamicMFParmsContext.js";
|
|
@@ -185,25 +184,25 @@ import { W as W3 } from "./components/WindowConfirm/WindowConfirm.js";
|
|
|
185
184
|
import { a as a14, g as g27 } from "./components/ModalDialog/dictionary.js";
|
|
186
185
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
187
186
|
import { P as P13 } from "./components/Pager/Pager.js";
|
|
188
|
-
import { F as F2, R as R22, u as
|
|
187
|
+
import { F as F2, R as R22, u as u16 } from "./components/hook-form/RHFormContext/index.js";
|
|
189
188
|
import { g as g28 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
190
|
-
import { u as
|
|
189
|
+
import { u as u17 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
191
190
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
192
191
|
import { a as a15, M as M9 } from "./contexts/ModalContext/index.js";
|
|
193
|
-
import { u as
|
|
194
|
-
import { u as
|
|
195
|
-
import { u as
|
|
192
|
+
import { u as u18 } from "./hooks/useFormAddEdit/index.js";
|
|
193
|
+
import { u as u19 } from "./hooks/useModal/index.js";
|
|
194
|
+
import { u as u20 } from "./hooks/useTab/index.js";
|
|
196
195
|
import { g as g29 } from "./hooks/useFormAddEdit/dictionary.js";
|
|
197
|
-
import { u as
|
|
198
|
-
import { u as
|
|
199
|
-
import { u as
|
|
200
|
-
import { u as
|
|
201
|
-
import { u as
|
|
196
|
+
import { u as u21 } from "./hooks/useFormFocus/index.js";
|
|
197
|
+
import { u as u22 } from "./hooks/useInterval/index.js";
|
|
198
|
+
import { u as u23 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
199
|
+
import { u as u24 } from "./hooks/useFormReadyForUpdate/index.js";
|
|
200
|
+
import { u as u25 } from "./hooks/useStateRef/index.js";
|
|
202
201
|
import { S as S9 } from "./hooks/useSvgColor/constants.js";
|
|
203
|
-
import { u as
|
|
204
|
-
import { u as
|
|
205
|
-
import { u as
|
|
206
|
-
import { u as
|
|
202
|
+
import { u as u26 } from "./hooks/useSvgColor/useSvgColor.js";
|
|
203
|
+
import { u as u27 } from "./hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js";
|
|
204
|
+
import { u as u28 } from "./hooks/useDataGridPersistence/useDataGridPersistence.js";
|
|
205
|
+
import { u as u29 } from "./hooks/usePopoverContainer/usePopoverContainer.js";
|
|
207
206
|
import { c as c4 } from "./utils/capitalizeFirstLetter.js";
|
|
208
207
|
import { i as i2 } from "./utils/isValidDate.js";
|
|
209
208
|
import { g as g30 } from "./utils/getComponentUtilityClass.js";
|
|
@@ -436,37 +435,36 @@ export {
|
|
|
436
435
|
r as rhfPeriodStyles,
|
|
437
436
|
t as toggleButtonStyles,
|
|
438
437
|
t2 as toggleIconButtonStyles,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
u26 as
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
u15 as useWindowToolsMF,
|
|
438
|
+
u17 as useAppearanceComponentStore,
|
|
439
|
+
u as useAreasStore,
|
|
440
|
+
u2 as useColumnBoolean,
|
|
441
|
+
u11 as useColumnChipStatus,
|
|
442
|
+
u3 as useColumnConcatenatedValue,
|
|
443
|
+
u4 as useColumnDate,
|
|
444
|
+
u5 as useColumnInteractiveCheck,
|
|
445
|
+
u6 as useColumnNestedValue,
|
|
446
|
+
u7 as useColumnPoints,
|
|
447
|
+
u8 as useColumnPrice,
|
|
448
|
+
u9 as useColumnSetCheck,
|
|
449
|
+
u10 as useColumnUncertanity,
|
|
450
|
+
u23 as useComponentSize,
|
|
451
|
+
u16 as useCustomForm,
|
|
452
|
+
u28 as useDataGridPersistence,
|
|
453
|
+
u27 as useDynamicFilterAndSort,
|
|
454
|
+
u15 as useDynamicMFParameters,
|
|
455
|
+
a11 as useDynamicMFParametersStore,
|
|
456
|
+
u18 as useFormAddEdit,
|
|
457
|
+
u21 as useFormFocus,
|
|
458
|
+
u24 as useFormReadyForUpdate,
|
|
459
|
+
u12 as useFormatPeriod,
|
|
460
|
+
u22 as useInterval,
|
|
461
|
+
u19 as useModal,
|
|
462
|
+
u29 as usePopoverContainer,
|
|
463
|
+
u13 as usePopupsStore,
|
|
464
|
+
u25 as useStateRef,
|
|
465
|
+
u26 as useSvgColor,
|
|
466
|
+
u20 as useTab,
|
|
467
|
+
u14 as useWindowToolsMF,
|
|
470
468
|
v2 as varBounce,
|
|
471
469
|
v3 as varContainer,
|
|
472
470
|
v as varFade,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.60",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "M4L Components",
|
|
6
6
|
"lint-staged": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@geoman-io/leaflet-geoman-free": "^2.14.2",
|
|
11
11
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
12
|
-
"@hookform/resolvers": "
|
|
12
|
+
"@hookform/resolvers": "2.9.11",
|
|
13
13
|
"@m4l/core": "^2.0.0",
|
|
14
14
|
"@m4l/graphics": "^7.0.0",
|
|
15
15
|
"@m4l/styles": "^7.0.0",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"leaflet.markercluster": "^1.5.3",
|
|
32
32
|
"nprogress": "^0.2.0",
|
|
33
33
|
"qrcode.react": "^3.1.0",
|
|
34
|
-
"react": "
|
|
34
|
+
"react": "18.3.1",
|
|
35
35
|
"react-chartjs-2": "^5.2.0",
|
|
36
36
|
"react-color": "^2.19.3",
|
|
37
37
|
"react-data-grid": "7.0.0-beta.13",
|
|
38
38
|
"react-dnd": "^16.0.1",
|
|
39
39
|
"react-dnd-html5-backend": "^16.0.1",
|
|
40
|
-
"react-dom": "
|
|
40
|
+
"react-dom": "18.3.1",
|
|
41
41
|
"react-draggable": "^4.4.5",
|
|
42
42
|
"react-dropzone": "^14.2.2",
|
|
43
43
|
"react-helmet-async": "^2.0.5",
|
|
@@ -54,25 +54,25 @@
|
|
|
54
54
|
"react-window": "^1.8.11",
|
|
55
55
|
"simplebar-react": "3.2.6",
|
|
56
56
|
"storybook-multilevel-sort": "^2.0.1",
|
|
57
|
-
"yup": "
|
|
57
|
+
"yup": "0.32.11",
|
|
58
58
|
"zustand": "4.3.6"
|
|
59
59
|
},
|
|
60
60
|
"resolutions": {
|
|
61
|
-
"react": "
|
|
62
|
-
"@types/react": "
|
|
63
|
-
"@types/react-dom": "
|
|
64
|
-
"react-dom": "
|
|
61
|
+
"react": "18.3.1",
|
|
62
|
+
"@types/react": "18.3.23",
|
|
63
|
+
"@types/react-dom": "18.3.7",
|
|
64
|
+
"react-dom": "18.3.1",
|
|
65
65
|
"storybook": "^8.3.4",
|
|
66
66
|
"attr-accept": "2.2.2",
|
|
67
67
|
"@vitejs/plugin-react": "4.3.4"
|
|
68
68
|
},
|
|
69
69
|
"overrides": {
|
|
70
70
|
"glob": "^10.4.5",
|
|
71
|
-
"eslint": "
|
|
72
|
-
"react": "
|
|
73
|
-
"@types/react": "
|
|
74
|
-
"@types/react-dom": "
|
|
75
|
-
"react-dom": "
|
|
71
|
+
"eslint": "9.28.0",
|
|
72
|
+
"react": "18.3.1",
|
|
73
|
+
"@types/react": "18.3.23",
|
|
74
|
+
"@types/react-dom": "18.3.7",
|
|
75
|
+
"react-dom": "18.3.1",
|
|
76
76
|
"attr-accept": "2.2.2"
|
|
77
77
|
},
|
|
78
78
|
"files": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useSetWindowsTitle';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
import { shallow } from "zustand/shallow";
|
|
3
|
-
import { useFlagsPresent, CommonFlags, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { u as useWindowToolsMF } from "../../../WindowBase/hooks/useWindowToolsMF/index.js";
|
|
5
|
-
import { u as useDynamicMFParametersStore } from "../../../WindowBase/hooks/useDynamicMFParameters/index.js";
|
|
6
|
-
const titleLabels = {
|
|
7
|
-
moduleName: "module_name",
|
|
8
|
-
moduleNameAdd: "module_name_add",
|
|
9
|
-
moduleNameEdit: "module_name_edit"
|
|
10
|
-
};
|
|
11
|
-
function useSetWindowsTitle({
|
|
12
|
-
isAddEditModule = false
|
|
13
|
-
} = {}) {
|
|
14
|
-
const isFlagPresent = useFlagsPresent([CommonFlags.FLAG_DICTIONARY_LOADED]);
|
|
15
|
-
const { getLabel } = useModuleDictionary();
|
|
16
|
-
const { setWindowTitle } = useWindowToolsMF();
|
|
17
|
-
const id = useDynamicMFParametersStore(
|
|
18
|
-
// objectId or id puede ser el nombre del parametro del con el Id que se está editando en los modulos add/edit
|
|
19
|
-
(state) => state.dynamicMFParameters?.objectId || state.dynamicMFParameters?.id,
|
|
20
|
-
shallow
|
|
21
|
-
);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
if (isFlagPresent) {
|
|
24
|
-
const labelKey = isAddEditModule ? id ? titleLabels.moduleNameEdit : titleLabels.moduleNameAdd : titleLabels.moduleName;
|
|
25
|
-
setWindowTitle(getLabel(labelKey));
|
|
26
|
-
}
|
|
27
|
-
}, [getLabel, isFlagPresent]);
|
|
28
|
-
}
|
|
29
|
-
export {
|
|
30
|
-
useSetWindowsTitle as u
|
|
31
|
-
};
|