@m4l/components 9.2.31 → 9.2.33
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/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +1 -0
- package/components/DynamicFilter/DynamicFilter.d.ts +3 -3
- package/components/DynamicFilter/store/DynamicFilterContext.js +3 -3
- package/components/ObjectLogs/ObjectLogs.d.ts +5 -0
- package/components/ObjectLogs/components/DetailFormatter/index.js +2 -3
- package/components/ObjectLogs/index.d.ts +1 -5
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +0 -3
- package/components/index.d.ts +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +14 -17
- package/index.js +1 -1
- package/package.json +1 -1
- /package/components/ObjectLogs/{index.js → ObjectLogs.js} +0 -0
package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js
CHANGED
|
@@ -39,6 +39,7 @@ const useModalSettings = () => {
|
|
|
39
39
|
{
|
|
40
40
|
title: getLabel("data_grid.settings_title"),
|
|
41
41
|
iconUrl: `${host_static_assets}/${environment_assets}/${pathIcons.configuration}`,
|
|
42
|
+
onClose: onCloseSettings,
|
|
42
43
|
children: /* @__PURE__ */ jsxs(ContentModalSettingStyled, { children: [
|
|
43
44
|
/* @__PURE__ */ jsx(DataGridRootStyled, { children: /* @__PURE__ */ jsx(TableContainerStyled, { children: /* @__PURE__ */ jsx(TableWrapperDataGridStyled, { children: /* @__PURE__ */ jsx(
|
|
44
45
|
ColumnsConfig,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DynamicFilterProps, DynamicFilterRef } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* DynamicFilter: Componente que renderiza filtros dinámicos para una lista de elementos.
|
|
4
|
+
* Permite filtrar datos junto con inputs, botón clear y refresh.
|
|
4
5
|
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*
|
|
6
|
+
* ### Dependecias:
|
|
7
|
+
* - **`useFlagsPresent:`** Hook que permite verificar si una lista de flags se encuentran presentes.
|
|
8
8
|
*/
|
|
9
9
|
export declare const DynamicFilter: import('react').ForwardRefExoticComponent<DynamicFilterProps & import('react').RefAttributes<DynamicFilterRef>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
3
|
-
import { useIsMobile, useFirstRender } from "@m4l/graphics";
|
|
4
2
|
import { createContext, forwardRef, useRef, useImperativeHandle, useEffect } from "react";
|
|
5
3
|
import { useStore } from "zustand";
|
|
6
4
|
import { shallow } from "zustand/shallow";
|
|
5
|
+
import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
6
|
+
import { useIsMobile, useFirstRender } from "@m4l/graphics";
|
|
7
7
|
import { A as ALL_FIELD } from "../constants.js";
|
|
8
|
-
import { f as formatToInitialFilters } from "../helpers/formatToInitialFilters.js";
|
|
9
8
|
import { f as formatToRawFilter } from "../helpers/formatToRowFilter.js";
|
|
9
|
+
import { f as formatToInitialFilters } from "../helpers/formatToInitialFilters.js";
|
|
10
10
|
import { c as createDynamicFilterStore } from "./DynamicFilterStore.js";
|
|
11
11
|
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
12
12
|
const DynamicFilterContext = createContext(null);
|
|
@@ -9,14 +9,13 @@ import { S as Stack } from "../../../mui_extended/Stack/Stack.js";
|
|
|
9
9
|
import { W as WindowBase } from "../../../WindowBase/WindowBase.js";
|
|
10
10
|
function DetailFormatter(props) {
|
|
11
11
|
const { log_id } = props;
|
|
12
|
-
const { openModal } = useModal();
|
|
12
|
+
const { openModal, closeModal } = useModal();
|
|
13
13
|
const { getLabel } = useModuleDictionary();
|
|
14
14
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
15
15
|
const isDesktop = !useIsMobile();
|
|
16
16
|
const onClickDetail = () => {
|
|
17
17
|
openModal({
|
|
18
|
-
|
|
19
|
-
window: /* @__PURE__ */ jsx(WindowBase, { title: getLabel("data_grid.settings_title"), children: /* @__PURE__ */ jsx(Stack, { direction: "column", flexGrow: 1, children: /* @__PURE__ */ jsx(DetailDialog, { log_id }) }) }),
|
|
18
|
+
window: /* @__PURE__ */ jsx(WindowBase, { onClose: closeModal, title: getLabel("data_grid.settings_title"), children: /* @__PURE__ */ jsx(Stack, { direction: "column", flexGrow: 1, children: /* @__PURE__ */ jsx(DetailDialog, { log_id }) }) }),
|
|
20
19
|
fullScreen: !isDesktop ? true : false
|
|
21
20
|
});
|
|
22
21
|
};
|
package/components/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export * from './MenuActions';
|
|
|
32
32
|
export * from './MFIsolationApp';
|
|
33
33
|
export * from './MFLoader';
|
|
34
34
|
export * from './NoItemSelected';
|
|
35
|
-
export * from './ObjectLogs';
|
|
35
|
+
export * from './ObjectLogs/ObjectLogs';
|
|
36
36
|
export * from './ObjectLogs/dictionary';
|
|
37
37
|
export * from './PaperForm/PaperForm';
|
|
38
38
|
export * from './PDFViewer';
|
|
@@ -53,23 +53,20 @@ const useDynamicFilterAndSort = (props) => {
|
|
|
53
53
|
const handleToggles = (key) => {
|
|
54
54
|
setTogglesLeftActions((prev) => ({ ...prev, [key]: !prev[key] }));
|
|
55
55
|
};
|
|
56
|
-
const handleChangeFilters = useCallback(
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
eventRefs.current
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
[onChangeFilterSort, prefixCookie, setCookie, setInvisibleBadge, sorts]
|
|
72
|
-
);
|
|
56
|
+
const handleChangeFilters = useCallback((filters, rawFilters) => {
|
|
57
|
+
setInvisibleBadge((prev) => ({ ...prev, filter: filters.length === 0 }));
|
|
58
|
+
if (eventRefs.current?.eventFilters?.filters && !deepEqual(eventRefs.current?.eventFilters?.filters, filters)) {
|
|
59
|
+
setCookie?.(prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_FILTERS}` : COOKIE_APPLIED_FILTERS, "window", filters);
|
|
60
|
+
}
|
|
61
|
+
eventRefs.current = {
|
|
62
|
+
...eventRefs.current,
|
|
63
|
+
eventFilters: { filters, rawFilters }
|
|
64
|
+
};
|
|
65
|
+
if (refOnChangeFilterSort.current > 0 || refOnChangeFilterSort.current === 0 && !sorts) {
|
|
66
|
+
onChangeFilterSort(eventRefs.current);
|
|
67
|
+
}
|
|
68
|
+
refOnChangeFilterSort.current++;
|
|
69
|
+
}, [onChangeFilterSort, prefixCookie, setCookie, setInvisibleBadge, sorts]);
|
|
73
70
|
const handleChangeSorts = useCallback((Sorts, rawSorts) => {
|
|
74
71
|
setInvisibleBadge((prev) => ({ ...prev, sort: Sorts.length === 0 }));
|
|
75
72
|
if (eventRefs.current?.eventSorts?.sorts && !deepEqual(eventRefs.current?.eventSorts?.sorts, Sorts)) {
|
package/index.js
CHANGED
|
@@ -160,7 +160,7 @@ import { M as M5 } from "./components/MFLoader/MFLoader.js";
|
|
|
160
160
|
import { g as g20 } from "./components/MFLoader/dictionary.js";
|
|
161
161
|
import { N as N3 } from "./components/NoItemSelected/NoItemSelected.js";
|
|
162
162
|
import { g as g21 } from "./components/NoItemSelected/dictionary.js";
|
|
163
|
-
import { O } from "./components/ObjectLogs/
|
|
163
|
+
import { O } from "./components/ObjectLogs/ObjectLogs.js";
|
|
164
164
|
import { d as d4, g as g22 } from "./components/ObjectLogs/dictionary.js";
|
|
165
165
|
import { P as P8 } from "./components/PaperForm/PaperForm.js";
|
|
166
166
|
import { P as P9 } from "./components/PDFViewer/PDFViewer.js";
|
package/package.json
CHANGED
|
File without changes
|