@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.
@@ -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
- * ### Dependecias:
6
- *- **`useFlagsPresent:`** Hook que permite verificar si una lista de flags se encuentran presentes.
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);
@@ -0,0 +1,5 @@
1
+ import { LogsProps } from './types';
2
+ /**
3
+ * TODO: Documentar
4
+ */
5
+ export declare function ObjectLogs(props: LogsProps): import("react/jsx-runtime").JSX.Element;
@@ -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
- // onQueryClose: () => closeModal(),
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
  };
@@ -1,5 +1 @@
1
- import { LogsProps } from './types';
2
- /**
3
- * TODO: Documentar
4
- */
5
- export declare function ObjectLogs(props: LogsProps): import("react/jsx-runtime").JSX.Element;
1
+ export * from './ObjectLogs';
@@ -48,9 +48,6 @@ const RHFTextFieldPassword = (props) => {
48
48
  id: name,
49
49
  type: showPassword ? "text" : "password",
50
50
  size,
51
- mandatory,
52
- mandatoryMessage,
53
- helperMessage,
54
51
  error: !!error,
55
52
  disabled,
56
53
  inputProps: {
@@ -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
- (filters, rawFilters) => {
58
- setInvisibleBadge((prev) => ({ ...prev, filter: filters.length === 0 }));
59
- if (eventRefs.current?.eventFilters?.filters && !deepEqual(eventRefs.current?.eventFilters?.filters, filters)) {
60
- setCookie?.(prefixCookie ? `${prefixCookie}_${COOKIE_APPLIED_FILTERS}` : COOKIE_APPLIED_FILTERS, "window", filters);
61
- }
62
- eventRefs.current = {
63
- ...eventRefs.current,
64
- eventFilters: { filters, rawFilters }
65
- };
66
- if (refOnChangeFilterSort.current > 0 || refOnChangeFilterSort.current === 0 && !sorts) {
67
- onChangeFilterSort(eventRefs.current);
68
- }
69
- refOnChangeFilterSort.current++;
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/index.js";
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.2.31",
3
+ "version": "9.2.33",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0 --no-warn-ignored"