@m4l/components 0.2.16 → 0.2.18

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.
Files changed (36) hide show
  1. package/components/DataGrid/constants.e334cd50.js +10 -0
  2. package/components/DataGrid/formatters/ColumnBooleanFormatter/index.6924642b.js +27 -0
  3. package/components/DataGrid/formatters/{columnBooleanFormatter → ColumnBooleanFormatter}/index.d.ts +1 -1
  4. package/components/DataGrid/formatters/{columnBooleanFormatter → ColumnBooleanFormatter}/types.d.ts +1 -1
  5. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.17a5c379.js +30 -0
  6. package/components/DataGrid/formatters/{columnConcatenatedValueFormatter → ColumnConcatenatedValueFormatter}/index.d.ts +1 -1
  7. package/components/DataGrid/formatters/ColumnDateFormatter/index.704db1ca.js +27 -0
  8. package/components/DataGrid/formatters/{columnDateFormatter → ColumnDateFormatter}/index.d.ts +1 -1
  9. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.60ddc1d2.js +26 -0
  10. package/components/DataGrid/formatters/{columnNestedValueFormatter/index.b63f7246.js → ColumnNestedValueFormatter/index.925387d2.js} +2 -2
  11. package/components/DataGrid/formatters/{columnNestedValueFormatter → ColumnNestedValueFormatter}/index.d.ts +1 -1
  12. package/components/DataGrid/formatters/{columnPointsFormatter → ColumnPointsFormatter}/index.d.ts +1 -1
  13. package/components/DataGrid/formatters/{columnPointsFormatter/index.a19b7b90.js → ColumnPointsFormatter/index.f3d6036f.js} +2 -2
  14. package/components/DataGrid/formatters/{columnPriceFormatter → ColumnPriceFormatter}/index.d.ts +1 -1
  15. package/components/DataGrid/formatters/{columnPriceFormatter/index.e612fda3.js → ColumnPriceFormatter/index.d717405e.js} +2 -2
  16. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.eb406256.js +34 -0
  17. package/components/DataGrid/formatters/{columnUncertaintyFormatter/index.cae2057a.js → ColumnUncertaintyFormatter/index.084ce3ef.js} +2 -2
  18. package/components/DataGrid/formatters/{columnUncertaintyFormatter → ColumnUncertaintyFormatter}/index.d.ts +1 -1
  19. package/components/DataGrid/formatters/index.2c2f0ae4.js +1 -0
  20. package/components/DataGrid/formatters/index.d.ts +8 -8
  21. package/components/DataGrid/{index.e5b552a2.js → index.37ce6054.js} +8 -134
  22. package/components/DataGrid/subcomponents/Actions/{index.2f58e034.js → index.a39b31d8.js} +3 -1
  23. package/components/DataGrid/types.d.ts +1 -1
  24. package/components/DragResizeWindow/{index.b5206081.js → index.cb3d34e7.js} +2 -2
  25. package/components/ObjectLogs/{index.f2b5f7d9.js → index.ad5284ce.js} +1 -1
  26. package/components/PopupsProvider/{index.c9400f03.js → index.81460070.js} +1 -1
  27. package/components/maps/components/GpsTools/{index.03998a42.js → index.dfa96cdf.js} +12 -6
  28. package/components/maps/components/Map/{index.b79ceae4.js → index.040c05a5.js} +3 -2
  29. package/index.js +32 -26
  30. package/package.json +1 -1
  31. /package/components/DataGrid/formatters/{columnConcatenatedValueFormatter → ColumnConcatenatedValueFormatter}/types.d.ts +0 -0
  32. /package/components/DataGrid/formatters/{columnDateFormatter → ColumnDateFormatter}/types.d.ts +0 -0
  33. /package/components/DataGrid/formatters/{columnNestedValueFormatter → ColumnNestedValueFormatter}/types.d.ts +0 -0
  34. /package/components/DataGrid/formatters/{columnPointsFormatter → ColumnPointsFormatter}/types.d.ts +0 -0
  35. /package/components/DataGrid/formatters/{columnPriceFormatter → ColumnPriceFormatter}/types.d.ts +0 -0
  36. /package/components/DataGrid/formatters/{columnUncertaintyFormatter → ColumnUncertaintyFormatter}/types.d.ts +0 -0
@@ -0,0 +1,10 @@
1
+ const DATAGRID_PREFIX_NAME = "M4LDataGrid";
2
+ const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
3
+ const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
4
+ const componentName = "M4LDataGrid";
5
+ export {
6
+ DATAGRID_SELECT_COLUMN_KEY as D,
7
+ DATAGRID_PREFIX_NAME as a,
8
+ DATAGRID_ACTIONS_COLUMN_KEY as b,
9
+ componentName as c
10
+ };
@@ -0,0 +1,27 @@
1
+ import { getPropertyByString } from "@m4l/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { B as BooleanFormatter } from "../../../formatters/BooleanFormatter/index.b21353a5.js";
4
+ function ColumnBooleanFormatter(props) {
5
+ const {
6
+ fieldValue,
7
+ presentationType,
8
+ Component
9
+ } = props;
10
+ return (obProps) => {
11
+ const valueMaybeString = getPropertyByString(obProps, fieldValue);
12
+ let fixedValue;
13
+ if (typeof valueMaybeString === "boolean") {
14
+ fixedValue = valueMaybeString;
15
+ } else {
16
+ fixedValue = void 0;
17
+ }
18
+ return /* @__PURE__ */ jsx(BooleanFormatter, {
19
+ presentationType,
20
+ value: fixedValue,
21
+ Component
22
+ });
23
+ };
24
+ }
25
+ export {
26
+ ColumnBooleanFormatter as C
27
+ };
@@ -1,2 +1,2 @@
1
1
  import { ColumnBooleanFormatterProps } from './types';
2
- export declare function columnBooleanFormatter(props: ColumnBooleanFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export declare function ColumnBooleanFormatter(props: ColumnBooleanFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { PresentationType } from '../../../../components/formatters/BooleanFormatter/types';
2
+ import { PresentationType } from '../../../formatters/BooleanFormatter/types';
3
3
  export interface ColumnBooleanFormatterProps {
4
4
  Component?: React.ElementType;
5
5
  presentationType: PresentationType;
@@ -0,0 +1,30 @@
1
+ import { getPropertyByString } from "@m4l/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { C as ConcatenatedFormatter } from "../../../formatters/index.7b216229.js";
4
+ function ColumnConcatenatedValuesFormatter(props) {
5
+ const {
6
+ fieldValue,
7
+ fieldSeparator,
8
+ Component
9
+ } = props;
10
+ return (obProps) => {
11
+ const values = fieldValue.map((element) => {
12
+ const valueMaybeString = getPropertyByString(obProps, element);
13
+ let fixedValue;
14
+ if (typeof valueMaybeString === "string" || typeof valueMaybeString === "number") {
15
+ fixedValue = valueMaybeString;
16
+ } else {
17
+ fixedValue = "";
18
+ }
19
+ return fixedValue;
20
+ });
21
+ return /* @__PURE__ */ jsx(ConcatenatedFormatter, {
22
+ values,
23
+ separator: fieldSeparator,
24
+ Component
25
+ });
26
+ };
27
+ }
28
+ export {
29
+ ColumnConcatenatedValuesFormatter as C
30
+ };
@@ -4,4 +4,4 @@ import { ColumnConcatenatedValuesFormatterProps } from './types';
4
4
  * @param props
5
5
  * @returns
6
6
  */
7
- export declare function columnConcatenatedValuesFormatter(props: ColumnConcatenatedValuesFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
7
+ export declare function ColumnConcatenatedValuesFormatter(props: ColumnConcatenatedValuesFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { getPropertyByString } from "@m4l/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { D as DateFormatter } from "../../../formatters/DateFormatter/index.578a9f53.js";
4
+ function ColumnDateFormatter(props) {
5
+ const {
6
+ fieldValue,
7
+ presentationType,
8
+ Component
9
+ } = props;
10
+ return (obProps) => {
11
+ const valueMaybeDateStringNumber = getPropertyByString(obProps, fieldValue);
12
+ let fixedValue;
13
+ if (typeof valueMaybeDateStringNumber === "string" || typeof valueMaybeDateStringNumber === "number" || valueMaybeDateStringNumber instanceof Date) {
14
+ fixedValue = valueMaybeDateStringNumber;
15
+ } else {
16
+ fixedValue = "";
17
+ }
18
+ return /* @__PURE__ */ jsx(DateFormatter, {
19
+ presentationType,
20
+ value: fixedValue,
21
+ Component
22
+ });
23
+ };
24
+ }
25
+ export {
26
+ ColumnDateFormatter as C
27
+ };
@@ -1,2 +1,2 @@
1
1
  import type { ColumnDateFormatterProps } from './types';
2
- export declare function columnDateFormatter(props: ColumnDateFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export declare function ColumnDateFormatter(props: ColumnDateFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { Checkbox } from "@mui/material";
2
+ import { d as dataGridClasses } from "../../index.37ce6054.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function ColumnInteractiveCheckFormatterColumn(props) {
5
+ const {
6
+ row,
7
+ onRowChange,
8
+ column
9
+ } = props;
10
+ const handleChange = () => {
11
+ const newRow = {
12
+ ...row
13
+ };
14
+ newRow[column.key] = !row[column.key];
15
+ onRowChange(newRow);
16
+ };
17
+ return /* @__PURE__ */ jsx(Checkbox, {
18
+ size: "small",
19
+ checked: row[column.key] || false,
20
+ onChange: handleChange,
21
+ className: dataGridClasses.formatterColumn
22
+ });
23
+ }
24
+ export {
25
+ ColumnInteractiveCheckFormatterColumn as C
26
+ };
@@ -1,7 +1,7 @@
1
1
  import { getPropertyByString } from "@m4l/core";
2
2
  import { W as WrapperComponent } from "../../../WrapperComponent/index.5e872594.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
- function columnNestedValueFormatter(props) {
4
+ function ColumnNestedValueFormatter(props) {
5
5
  const {
6
6
  fieldValue,
7
7
  Component = WrapperComponent
@@ -15,5 +15,5 @@ function columnNestedValueFormatter(props) {
15
15
  };
16
16
  }
17
17
  export {
18
- columnNestedValueFormatter as c
18
+ ColumnNestedValueFormatter as C
19
19
  };
@@ -1,2 +1,2 @@
1
1
  import { ColumnNestedValueFormatterProps } from './types';
2
- export declare function columnNestedValueFormatter(props: ColumnNestedValueFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export declare function ColumnNestedValueFormatter(props: ColumnNestedValueFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { ColumnPointsFormatterProps } from './types';
2
- export declare function columnPointsFormatter(props: ColumnPointsFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export declare function ColumnPointsFormatter(props: ColumnPointsFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { P as PointsFormatter } from "../../../formatters/PointsFormatter/index.5c94c5e8.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- function columnPointsFormatter(props) {
3
+ function ColumnPointsFormatter(props) {
4
4
  return (obProps) => {
5
5
  return /* @__PURE__ */ jsx(PointsFormatter, {
6
6
  obProps,
@@ -9,5 +9,5 @@ function columnPointsFormatter(props) {
9
9
  };
10
10
  }
11
11
  export {
12
- columnPointsFormatter as c
12
+ ColumnPointsFormatter as C
13
13
  };
@@ -1,2 +1,2 @@
1
1
  import { ColumnPriceFormatterProps } from './types';
2
- export declare function columnPriceFormatter(props: ColumnPriceFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export declare function ColumnPriceFormatter(props: ColumnPriceFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { P as PriceFormatter } from "../../../formatters/PriceFormatter/index.83cbe7be.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- function columnPriceFormatter(props) {
3
+ function ColumnPriceFormatter(props) {
4
4
  return (obProps) => {
5
5
  return /* @__PURE__ */ jsx(PriceFormatter, {
6
6
  obProps,
@@ -9,5 +9,5 @@ function columnPriceFormatter(props) {
9
9
  };
10
10
  }
11
11
  export {
12
- columnPriceFormatter as c
12
+ ColumnPriceFormatter as C
13
13
  };
@@ -0,0 +1,34 @@
1
+ import { S as SelectCellFormatter } from "../../../../react-data-grid.c5377916.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ function ColumnSetCheckFormatter(parameters) {
4
+ const {
5
+ field,
6
+ rowKeyGetter,
7
+ useHook
8
+ } = parameters;
9
+ const formatter = (props) => {
10
+ const {
11
+ row
12
+ } = props;
13
+ const [checkedRows, setCheckedRows] = useHook(field);
14
+ const onChange = (checked, _isShiftClick) => {
15
+ const newCheckedRows = new Set(checkedRows);
16
+ if (checked) {
17
+ newCheckedRows.add(rowKeyGetter(props.row));
18
+ } else {
19
+ newCheckedRows.delete(rowKeyGetter(props.row));
20
+ }
21
+ setCheckedRows(newCheckedRows);
22
+ };
23
+ return /* @__PURE__ */ jsx(SelectCellFormatter, {
24
+ value: checkedRows.has(rowKeyGetter(row)) || false,
25
+ isCellSelected: props.isCellSelected,
26
+ onChange,
27
+ "aria-label": "Select"
28
+ });
29
+ };
30
+ return formatter;
31
+ }
32
+ export {
33
+ ColumnSetCheckFormatter as C
34
+ };
@@ -1,6 +1,6 @@
1
1
  import { U as UncertaintyFormatter } from "../../../formatters/UncertaintyFormatter/index.08e1b79f.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- function columnUncertaintyFormatter(props) {
3
+ function ColumnUncertaintyFormatter(props) {
4
4
  return (obProps) => {
5
5
  return /* @__PURE__ */ jsx(UncertaintyFormatter, {
6
6
  obProps,
@@ -9,5 +9,5 @@ function columnUncertaintyFormatter(props) {
9
9
  };
10
10
  }
11
11
  export {
12
- columnUncertaintyFormatter as c
12
+ ColumnUncertaintyFormatter as C
13
13
  };
@@ -1,2 +1,2 @@
1
1
  import { ColumnUncertaintyFormatterProps } from './types';
2
- export declare function columnUncertaintyFormatter(props: ColumnUncertaintyFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
2
+ export declare function ColumnUncertaintyFormatter(props: ColumnUncertaintyFormatterProps): (obProps: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
- export { columnUncertaintyFormatter } from './columnUncertaintyFormatter';
2
- export { columnPointsFormatter } from './columnPointsFormatter';
3
- export { columnNestedValueFormatter } from './columnNestedValueFormatter';
4
- export { columnBooleanFormatter } from './columnBooleanFormatter';
5
- export { columnDateFormatter } from './columnDateFormatter';
6
- export { columnConcatenatedValuesFormatter } from './columnConcatenatedValueFormatter';
7
- export { columnPriceFormatter } from './columnPriceFormatter';
8
- export type { ColumnUncertaintyFormatterProps } from './columnUncertaintyFormatter/types';
1
+ export { ColumnUncertaintyFormatter } from './ColumnUncertaintyFormatter';
2
+ export { ColumnPointsFormatter } from './ColumnPointsFormatter';
3
+ export { ColumnNestedValueFormatter } from './ColumnNestedValueFormatter';
4
+ export { ColumnBooleanFormatter } from './ColumnBooleanFormatter';
5
+ export { ColumnDateFormatter } from './ColumnDateFormatter';
6
+ export { ColumnConcatenatedValuesFormatter } from './ColumnConcatenatedValueFormatter';
7
+ export { ColumnPriceFormatter } from './ColumnPriceFormatter';
8
+ export type { ColumnUncertaintyFormatterProps } from './ColumnUncertaintyFormatter/types';
@@ -1,5 +1,3 @@
1
- import { SvgIcon, Checkbox, InputBase, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
1
  import { g as getModalDialogComponentsDictionary } from "../ModalDialog/index.690c82a4.js";
4
2
  import { g as getPagerComponentsDictionary } from "../mui_extended/Pager/index.fa5f5ded.js";
5
3
  import { styled } from "@mui/material/styles";
@@ -7,14 +5,14 @@ import { forwardRef, createContext, useState, useMemo, useEffect, useCallback, u
7
5
  import { u as useRowSelection, S as SelectCellFormatter, H as HeaderRenderer, D as DataGrid$1 } from "../../react-data-grid.c5377916.js";
8
6
  import { useDrag, useDrop, DndProvider } from "react-dnd";
9
7
  import { HTML5Backend } from "react-dnd-html5-backend";
8
+ import { SvgIcon, Checkbox, InputBase, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { D as DATAGRID_SELECT_COLUMN_KEY, c as componentName, a as DATAGRID_PREFIX_NAME } from "./constants.e334cd50.js";
10
11
  import { voidFunction, useModuleDictionary, useModuleSkeleton, getPropertyByString } from "@m4l/core";
11
- import { A as ActionsColumn, a as Actions } from "./subcomponents/Actions/index.2f58e034.js";
12
+ import { A as ActionsColumn, a as Actions } from "./subcomponents/Actions/index.a39b31d8.js";
12
13
  import { unstable_composeClasses } from "@mui/base";
13
14
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
14
15
  import { g as getNameDataTestId } from "../../test/getNameDataTestId.14875ec7.js";
15
- import { B as BooleanFormatter } from "../formatters/BooleanFormatter/index.b21353a5.js";
16
- import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
17
- import { C as ConcatenatedFormatter } from "../formatters/index.7b216229.js";
18
16
  const DataGridRoot = styled("div")(({
19
17
  theme
20
18
  }) => ({
@@ -272,9 +270,6 @@ function useDataGrid() {
272
270
  throw new Error("useDataGrid context must be use inside DataGridContext");
273
271
  return context;
274
272
  }
275
- const DATAGRID_PREFIX_NAME = "M4LDataGrid";
276
- const DATAGRID_SELECT_COLUMN_KEY = "M4LDataGrid-CheckedColumn";
277
- const DATAGRID_ACTIONS_COLUMN_KEY = "M4LDataGrid-ActionsColumn";
278
273
  const filterColumnClassName = "filter-cell";
279
274
  const filterHeight = 35;
280
275
  function SelectGroupFormatter(props) {
@@ -817,7 +812,6 @@ function Table(props) {
817
812
  })
818
813
  });
819
814
  }
820
- const componentName = "M4LDataGrid";
821
815
  const dataGridClasses = generateUtilityClasses(componentName, [
822
816
  "root",
823
817
  "actions",
@@ -878,26 +872,6 @@ const dataGridUtilityClasses = (ownerState) => {
878
872
  ...composedClasses
879
873
  };
880
874
  };
881
- function ColumnInteractiveCheckFormatterColumn(props) {
882
- const {
883
- row,
884
- onRowChange,
885
- column
886
- } = props;
887
- const handleChange = () => {
888
- const newRow = {
889
- ...row
890
- };
891
- newRow[column.key] = !row[column.key];
892
- onRowChange(newRow);
893
- };
894
- return /* @__PURE__ */ jsx(Checkbox, {
895
- size: "small",
896
- checked: row[column.key] || false,
897
- onChange: handleChange,
898
- className: dataGridClasses.formatterColumn
899
- });
900
- }
901
875
  function getDataGridComponentsDictionary() {
902
876
  return ["data_grid"].concat(getPagerComponentsDictionary()).concat(getModalDialogComponentsDictionary());
903
877
  }
@@ -971,72 +945,6 @@ function DataGrid(props) {
971
945
  })
972
946
  });
973
947
  }
974
- function columnBooleanFormatter(props) {
975
- const {
976
- fieldValue,
977
- presentationType,
978
- Component
979
- } = props;
980
- return (obProps) => {
981
- const valueMaybeString = getPropertyByString(obProps, fieldValue);
982
- let fixedValue;
983
- if (typeof valueMaybeString === "boolean") {
984
- fixedValue = valueMaybeString;
985
- } else {
986
- fixedValue = void 0;
987
- }
988
- return /* @__PURE__ */ jsx(BooleanFormatter, {
989
- presentationType,
990
- value: fixedValue,
991
- Component
992
- });
993
- };
994
- }
995
- function columnDateFormatter(props) {
996
- const {
997
- fieldValue,
998
- presentationType,
999
- Component
1000
- } = props;
1001
- return (obProps) => {
1002
- const valueMaybeDateStringNumber = getPropertyByString(obProps, fieldValue);
1003
- let fixedValue;
1004
- if (typeof valueMaybeDateStringNumber === "string" || typeof valueMaybeDateStringNumber === "number" || valueMaybeDateStringNumber instanceof Date) {
1005
- fixedValue = valueMaybeDateStringNumber;
1006
- } else {
1007
- fixedValue = "";
1008
- }
1009
- return /* @__PURE__ */ jsx(DateFormatter, {
1010
- presentationType,
1011
- value: fixedValue,
1012
- Component
1013
- });
1014
- };
1015
- }
1016
- function columnConcatenatedValuesFormatter(props) {
1017
- const {
1018
- fieldValue,
1019
- fieldSeparator,
1020
- Component
1021
- } = props;
1022
- return (obProps) => {
1023
- const values = fieldValue.map((element) => {
1024
- const valueMaybeString = getPropertyByString(obProps, element);
1025
- let fixedValue;
1026
- if (typeof valueMaybeString === "string" || typeof valueMaybeString === "number") {
1027
- fixedValue = valueMaybeString;
1028
- } else {
1029
- fixedValue = "";
1030
- }
1031
- return fixedValue;
1032
- });
1033
- return /* @__PURE__ */ jsx(ConcatenatedFormatter, {
1034
- values,
1035
- separator: fieldSeparator,
1036
- Component
1037
- });
1038
- };
1039
- }
1040
948
  const getDataGridRowsFromSet = (set, rows, rowKeyGetter) => {
1041
949
  const rowsFinded = [];
1042
950
  if (set) {
@@ -1054,47 +962,13 @@ const getDataGridRowsFromSet = (set, rows, rowKeyGetter) => {
1054
962
  }
1055
963
  return rowsFinded;
1056
964
  };
1057
- function ColumnSetCheckFormatter(parameters) {
1058
- const {
1059
- field,
1060
- rowKeyGetter,
1061
- useHook
1062
- } = parameters;
1063
- const formatter = (props) => {
1064
- const {
1065
- row
1066
- } = props;
1067
- const [checkedRows, setCheckedRows] = useHook(field);
1068
- const onChange = (checked, _isShiftClick) => {
1069
- const newCheckedRows = new Set(checkedRows);
1070
- if (checked) {
1071
- newCheckedRows.add(rowKeyGetter(props.row));
1072
- } else {
1073
- newCheckedRows.delete(rowKeyGetter(props.row));
1074
- }
1075
- setCheckedRows(newCheckedRows);
1076
- };
1077
- return /* @__PURE__ */ jsx(SelectCellFormatter, {
1078
- value: checkedRows.has(rowKeyGetter(row)) || false,
1079
- isCellSelected: props.isCellSelected,
1080
- onChange,
1081
- "aria-label": "Select"
1082
- });
1083
- };
1084
- return formatter;
1085
- }
1086
965
  export {
1087
- ColumnInteractiveCheckFormatterColumn as C,
1088
- DATAGRID_ACTIONS_COLUMN_KEY as D,
966
+ DataGridRoot as D,
1089
967
  useFilters as a,
1090
- DataGridRoot as b,
968
+ dictionary as b,
1091
969
  DataGrid as c,
1092
- dictionary as d,
1093
- ColumnSetCheckFormatter as e,
1094
- columnDateFormatter as f,
970
+ dataGridClasses as d,
971
+ getDataGridRowsFromSet as e,
1095
972
  getDataGridComponentsDictionary as g,
1096
- getDataGridRowsFromSet as h,
1097
- columnBooleanFormatter as i,
1098
- columnConcatenatedValuesFormatter as j,
1099
973
  useDataGrid as u
1100
974
  };
@@ -1,6 +1,7 @@
1
1
  import { M as MenuActions } from "../../../mui_extended/MenuActions/index.62359120.js";
2
- import { D as DATAGRID_ACTIONS_COLUMN_KEY, u as useDataGrid, a as useFilters, C as ColumnInteractiveCheckFormatterColumn, b as DataGridRoot, d as dictionary } from "../../index.e5b552a2.js";
2
+ import { u as useDataGrid, a as useFilters, D as DataGridRoot, b as dictionary } from "../../index.37ce6054.js";
3
3
  import { useTheme, Skeleton } from "@mui/material";
4
+ import { b as DATAGRID_ACTIONS_COLUMN_KEY } from "../../constants.e334cd50.js";
4
5
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
5
6
  import { P as Pager } from "../../../mui_extended/Pager/index.fa5f5ded.js";
6
7
  import { I as IconButton } from "../../../mui_extended/IconButton/index.a719445f.js";
@@ -8,6 +9,7 @@ import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/cor
8
9
  import { forwardRef, useRef, useState, useImperativeHandle, useMemo, useEffect, useCallback } from "react";
9
10
  import { D as DataGrid$1 } from "../../../../react-data-grid.c5377916.js";
10
11
  import { styled } from "@mui/material/styles";
12
+ import { C as ColumnInteractiveCheckFormatterColumn } from "../../formatters/ColumnInteractiveCheckFormatter/index.60ddc1d2.js";
11
13
  import { u as useModal } from "../../../../hooks/useModal/index.1c88654a.js";
12
14
  import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.106c5327.js";
13
15
  import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.bd2a14b2.js";
@@ -4,7 +4,7 @@ import type { Column, RowsChangeData, FormatterProps } from 'react-data-grid';
4
4
  import type { MenuAction } from '../mui_extended/MenuActions/types';
5
5
  import { ActionsProps } from './subcomponents/Actions/types';
6
6
  export declare type GridFormatterPropss<T, SR> = FormatterProps<T, SR>;
7
- export type { columnUncertaintyFormatter, columnPointsFormatter, columnNestedValueFormatter, } from './formatters';
7
+ export type { ColumnUncertaintyFormatter as columnUncertaintyFormatter, ColumnPointsFormatter as columnPointsFormatter, ColumnNestedValueFormatter as columnNestedValueFormatter, } from './formatters';
8
8
  export declare type ColumnType = 'string' | 'date' | 'number' | 'boolean' | 'custom';
9
9
  export declare type ColumnAlign = 'left' | 'center' | 'right';
10
10
  export declare interface GridRow {
@@ -2,10 +2,10 @@ import React__default, { useState, useRef, useCallback, useEffect, useMemo } fro
2
2
  import { D as DraggableCore_1 } from "../../react-draggable.312ab17d.js";
3
3
  import clsx from "clsx";
4
4
  import { styled } from "@mui/material/styles";
5
- import { M as MAP_ZINDEX_OVER_MAP } from "../maps/components/Map/index.b79ceae4.js";
5
+ import { M as MAP_ZINDEX_OVER_MAP } from "../maps/components/Map/index.040c05a5.js";
6
6
  import { generateUtilityClasses } from "@mui/material";
7
7
  import "@mui/base";
8
- import { M as MAP_ZINDEX_OVER_MAP$1 } from "../PopupsProvider/index.c9400f03.js";
8
+ import { M as MAP_ZINDEX_OVER_MAP$1 } from "../PopupsProvider/index.81460070.js";
9
9
  import { R as Resizable } from "../../react-resizable.f2c58a4c.js";
10
10
  import { jsx } from "react/jsx-runtime";
11
11
  const DraggeableWindowRoot = styled("div")`
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect, useCallback, useMemo } from "react";
2
2
  import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
3
3
  import { styled } from "@mui/material/styles";
4
- import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.e5b552a2.js";
4
+ import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.37ce6054.js";
5
5
  import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
6
6
  import { Tooltip, IconButton } from "@mui/material";
7
7
  import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
@@ -11,7 +11,7 @@ import { cloneDeep } from "lodash";
11
11
  import clsx from "clsx";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  import { styled } from "@mui/material/styles";
14
- import { D as DragResizeWindow, d as draggableWindowClasses } from "../DragResizeWindow/index.b5206081.js";
14
+ import { D as DragResizeWindow, d as draggableWindowClasses } from "../DragResizeWindow/index.cb3d34e7.js";
15
15
  import { useMap } from "react-leaflet";
16
16
  import { u as useSizeContainer } from "../../hooks/useSizeContainer/index.62b4e0c4.js";
17
17
  const COMPONENT_CLASS_NAME = "M4LPopupsProvider";
@@ -7,14 +7,16 @@ import { devtools } from "zustand/middleware";
7
7
  import { immer } from "zustand/middleware/immer";
8
8
  import { enableMapSet } from "immer";
9
9
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
10
- import { D as DICCTIONARY, u as useMapStore, m as mapClasses, a as MAP_ZINDEX_DEFAULT, C as CommonFeatureRender, M as MAP_ZINDEX_OVER_MAP, b as useDisableZoomEvents } from "../Map/index.b79ceae4.js";
10
+ import { D as DICCTIONARY, u as useMapStore, m as mapClasses, a as MAP_ZINDEX_DEFAULT, C as CommonFeatureRender, M as MAP_ZINDEX_OVER_MAP, b as useDisableZoomEvents } from "../Map/index.040c05a5.js";
11
11
  import { D as DynamicFilter } from "../../../DynamicFilter/index.73258cb8.js";
12
- import { e as ColumnSetCheckFormatter, f as columnDateFormatter, c as DataGrid } from "../../../DataGrid/index.e5b552a2.js";
12
+ import { C as ColumnSetCheckFormatter } from "../../../DataGrid/formatters/ColumnSetCheckFormatter/index.eb406256.js";
13
+ import { C as ColumnDateFormatter } from "../../../DataGrid/formatters/ColumnDateFormatter/index.704db1ca.js";
13
14
  import { u as useModal } from "../../../../hooks/useModal/index.1c88654a.js";
14
15
  import { W as WindowConfirm } from "../../../modal/WindowConfirm.ec73ba4f.js";
15
16
  import { generateUtilityClasses } from "@mui/material";
16
17
  import "@mui/base";
17
18
  import { S as Stack } from "../../../mui_extended/Stack/index.0e53197c.js";
19
+ import { c as DataGrid } from "../../../DataGrid/index.37ce6054.js";
18
20
  import { B as Button } from "../../../mui_extended/Button/index.5c68764a.js";
19
21
  import { useFormContext, useWatch } from "react-hook-form";
20
22
  import { H as HelperError } from "../../../hook-form/HelperError/index.66bbcac3.js";
@@ -348,7 +350,7 @@ function useColumns(props) {
348
350
  key: "created_at",
349
351
  name: getLabel(DICCTIONARY.LABEL_CREATED_AT),
350
352
  type: "date",
351
- formatter: columnDateFormatter({
353
+ formatter: ColumnDateFormatter({
352
354
  presentationType: "datetime",
353
355
  fieldValue: "row.created_at"
354
356
  })
@@ -356,7 +358,7 @@ function useColumns(props) {
356
358
  key: "updated_at",
357
359
  name: getLabel(DICCTIONARY.LABEL_UPDATED_AT),
358
360
  type: "date",
359
- formatter: columnDateFormatter({
361
+ formatter: ColumnDateFormatter({
360
362
  presentationType: "datetime",
361
363
  fieldValue: "row.updated_at"
362
364
  })
@@ -1842,8 +1844,12 @@ function useMeasure() {
1842
1844
  }, []);
1843
1845
  return { statusEdition, magnitudFactor, value };
1844
1846
  }
1845
- console.log("NODE_ENV", { "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true });
1846
- const DevTool = { "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true }?.NODE_ENV === "development" ? require("@hookform/devtools").DevTool : () => null;
1847
+ let DevTool;
1848
+ try {
1849
+ DevTool = require("@hookform/devtools").DevTool;
1850
+ } catch (error) {
1851
+ DevTool = () => null;
1852
+ }
1847
1853
  function MeasureData() {
1848
1854
  const {
1849
1855
  getLabel
@@ -9,9 +9,10 @@ import "leaflet.markercluster";
9
9
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
10
10
  import { cloneDeep, throttle } from "lodash";
11
11
  import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
12
- import { e as ColumnSetCheckFormatter, c as DataGrid } from "../../../DataGrid/index.e5b552a2.js";
12
+ import { C as ColumnSetCheckFormatter } from "../../../DataGrid/formatters/ColumnSetCheckFormatter/index.eb406256.js";
13
13
  import { u as useStateRef } from "../../../../hooks/useStateRef/index.538edb89.js";
14
- import { u as usePopupsStore, P as PopupsProvider } from "../../../PopupsProvider/index.c9400f03.js";
14
+ import { c as DataGrid } from "../../../DataGrid/index.37ce6054.js";
15
+ import { u as usePopupsStore, P as PopupsProvider } from "../../../PopupsProvider/index.81460070.js";
15
16
  import { T as ToggleButton } from "../../../mui_extended/ToggleButton/index.5aa6ea58.js";
16
17
  import { createStore, useStore } from "zustand";
17
18
  import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { L } from "./assets/Logo/index.228dcb5a.js";
2
- import { c, i, j, f, h, g } from "./components/DataGrid/index.e5b552a2.js";
2
+ import { c, e, g } from "./components/DataGrid/index.37ce6054.js";
3
3
  import { N, T } from "./components/DataGrid/subcomponents/editors/TextEditor/index.91380a55.js";
4
4
  import { N as N2 } from "./components/NavLink/index.b75c91e1.js";
5
5
  import { S } from "./components/ScrollToTop/index.e06f98f6.js";
@@ -58,20 +58,23 @@ import { U, g as g8 } from "./components/formatters/UncertaintyFormatter/index.0
58
58
  import { P as P5, g as g9 } from "./components/formatters/PointsFormatter/index.5c94c5e8.js";
59
59
  import { C as C3, P as P6, g as g10, a as a7, b as b5 } from "./components/formatters/index.7b216229.js";
60
60
  import { P as P7, g as g11 } from "./components/formatters/PriceFormatter/index.83cbe7be.js";
61
- import { c as c5 } from "./components/DataGrid/formatters/columnUncertaintyFormatter/index.cae2057a.js";
62
- import { c as c6 } from "./components/DataGrid/formatters/columnPointsFormatter/index.a19b7b90.js";
63
- import { c as c7 } from "./components/DataGrid/formatters/columnNestedValueFormatter/index.b63f7246.js";
64
- import { c as c8 } from "./components/DataGrid/formatters/columnPriceFormatter/index.e612fda3.js";
61
+ import { C as C4 } from "./components/DataGrid/formatters/ColumnUncertaintyFormatter/index.084ce3ef.js";
62
+ import { C as C5 } from "./components/DataGrid/formatters/ColumnPointsFormatter/index.f3d6036f.js";
63
+ import { C as C6 } from "./components/DataGrid/formatters/ColumnNestedValueFormatter/index.925387d2.js";
64
+ import { C as C7 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/index.6924642b.js";
65
+ import { C as C8 } from "./components/DataGrid/formatters/ColumnDateFormatter/index.704db1ca.js";
66
+ import { C as C9 } from "./components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.17a5c379.js";
67
+ import { C as C10 } from "./components/DataGrid/formatters/ColumnPriceFormatter/index.d717405e.js";
65
68
  import { D as D4, g as g12 } from "./components/DynamicFilter/index.73258cb8.js";
66
- import { H, e } from "./components/HelperText/index.7d2afdb3.js";
69
+ import { H, e as e2 } from "./components/HelperText/index.7d2afdb3.js";
67
70
  import { A as A8, d as d3, g as g13 } from "./components/CommonActions/components/Actions/index.8368ac0f.js";
68
71
  import { A as A9 } from "./components/CommonActions/components/ActionCancel/index.106c5327.js";
69
72
  import { A as A10 } from "./components/CommonActions/components/ActionIntro/index.bd2a14b2.js";
70
73
  import { A as A11 } from "./components/CommonActions/components/ActionFormCancel/index.6d00f737.js";
71
74
  import { A as A12 } from "./components/CommonActions/components/ActionFormIntro/index.9ee7df17.js";
72
- import { D as D5, d as d4 } from "./components/DragResizeWindow/index.b5206081.js";
75
+ import { D as D5, d as d4 } from "./components/DragResizeWindow/index.cb3d34e7.js";
73
76
  import { G, w, A as A13 } from "./components/GridLayout/index.4d26c328.js";
74
- import { R as R12, a as a8, b as b6, c as c9 } from "./components/GridLayout/subcomponents/Responsive/index.3839890b.js";
77
+ import { R as R12, a as a8, b as b6, c as c5 } from "./components/GridLayout/subcomponents/Responsive/index.3839890b.js";
75
78
  import { w as w2 } from "./components/GridLayout/subcomponents/SizeProvider/index.a751962f.js";
76
79
  import { P as P8 } from "./components/PrintingSystem/index.9dc25af9.js";
77
80
  import { I as I4 } from "./components/Icon/index.282c5b58.js";
@@ -79,8 +82,8 @@ import { L as L7 } from "./components/LanguagePopover/index.5e1d85a9.js";
79
82
  import { L as L8 } from "./components/LinearProgressIndeterminate/index.2d53ade4.js";
80
83
  import { I as I5 } from "./components/Image/index.8915f577.js";
81
84
  import { L as L9 } from "./components/Loadable/index.e994fc3e.js";
82
- import { c as c10, e as e2, d as d5, f as f2, u as u3 } from "./components/maps/components/Map/index.b79ceae4.js";
83
- import { G as G2, u as u4 } from "./components/maps/components/GpsTools/index.03998a42.js";
85
+ import { c as c6, e as e3, d as d5, f, u as u3 } from "./components/maps/components/Map/index.040c05a5.js";
86
+ import { G as G2, u as u4 } from "./components/maps/components/GpsTools/index.dfa96cdf.js";
84
87
  import { M as M5, d as d6, g as g14 } from "./components/ModalDialog/index.690c82a4.js";
85
88
  import { g as g15 } from "./components/modal/index.61389369.js";
86
89
  import { W as W2 } from "./components/modal/WindowConfirm.ec73ba4f.js";
@@ -88,7 +91,7 @@ import { W as W3 } from "./components/modal/WindowBase.779aa7a5.js";
88
91
  import { L as L10, g as g16 } from "./components/LoadingError/index.d95e6efb.js";
89
92
  import { M as M6, g as g17 } from "./components/MFLoader/index.cc563716.js";
90
93
  import { N as N3, d as d7, g as g18 } from "./components/NoItemSelected/index.5246b204.js";
91
- import { O, d as d8, g as g19 } from "./components/ObjectLogs/index.f2b5f7d9.js";
94
+ import { O, d as d8, g as g19 } from "./components/ObjectLogs/index.ad5284ce.js";
92
95
  import { P as P9 } from "./components/PaperForm/index.30f68f0f.js";
93
96
  import { P as P10 } from "./components/PDFViewer/index.51e4f1b2.js";
94
97
  import { H as H2 } from "./components/Page/index.f4aedd2d.js";
@@ -114,8 +117,10 @@ import "./react-data-grid.c5377916.js";
114
117
  import "clsx";
115
118
  import "react-dnd";
116
119
  import "react-dnd-html5-backend";
120
+ import "./components/DataGrid/constants.e334cd50.js";
117
121
  import "@m4l/core";
118
- import "./components/DataGrid/subcomponents/Actions/index.2f58e034.js";
122
+ import "./components/DataGrid/subcomponents/Actions/index.a39b31d8.js";
123
+ import "./components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.60ddc1d2.js";
119
124
  import "@m4l/graphics";
120
125
  import "@mui/base";
121
126
  import "./test/constants_no_mock.86c553a9.js";
@@ -159,7 +164,7 @@ import "@mui/material/Button";
159
164
  import "@mui/lab";
160
165
  import "./hocs/withToggle/index.e44eb0da.js";
161
166
  import "./components/WrapperComponent/index.5e872594.js";
162
- import "./components/PopupsProvider/index.c9400f03.js";
167
+ import "./components/PopupsProvider/index.81460070.js";
163
168
  import "react-leaflet";
164
169
  import "./hooks/useSizeContainer/index.62b4e0c4.js";
165
170
  import "./components/GridLayout/subcomponents/Griditem/index.25e9f332.js";
@@ -180,6 +185,7 @@ import "leaflet/dist/leaflet.css";
180
185
  import "leaflet";
181
186
  import "@react-leaflet/core";
182
187
  import "leaflet.markercluster";
188
+ import "./components/DataGrid/formatters/ColumnSetCheckFormatter/index.eb406256.js";
183
189
  import "./hooks/useStateRef/index.538edb89.js";
184
190
  import "leaflet-polylinedecorator";
185
191
  import "immer";
@@ -216,6 +222,13 @@ export {
216
222
  B4 as Button,
217
223
  C2 as CheckBox,
218
224
  C as CircularProgress,
225
+ C7 as ColumnBooleanFormatter,
226
+ C9 as ColumnConcatenatedValuesFormatter,
227
+ C8 as ColumnDateFormatter,
228
+ C6 as ColumnNestedValueFormatter,
229
+ C5 as ColumnPointsFormatter,
230
+ C10 as ColumnPriceFormatter,
231
+ C4 as ColumnUncertaintyFormatter,
219
232
  C3 as ConcatenatedFormatter,
220
233
  D2 as DICCTIONARY,
221
234
  c as DataGrid,
@@ -244,10 +257,10 @@ export {
244
257
  L2 as LoadingScreen,
245
258
  L as Logo,
246
259
  M6 as MFLoader,
247
- c10 as Map,
248
- e2 as MapContext,
260
+ c6 as Map,
261
+ e3 as MapContext,
249
262
  d5 as MapProvider,
250
- f2 as MarkerFeatureRender,
263
+ f as MarkerFeatureRender,
251
264
  M3 as MemonizedDynamicMFParmsProvider,
252
265
  M4 as MenuActions,
253
266
  M7 as ModalContext,
@@ -312,27 +325,20 @@ export {
312
325
  W as WindowToolsMFProvider,
313
326
  a8 as addLayoutItemToBreakPointIfNoExists,
314
327
  b6 as addLayoutItemToBreakPoints,
315
- c9 as cloneLayouts,
316
- i as columnBooleanFormatter,
317
- j as columnConcatenatedValuesFormatter,
318
- f as columnDateFormatter,
319
- c7 as columnNestedValueFormatter,
320
- c6 as columnPointsFormatter,
321
- c8 as columnPriceFormatter,
322
- c5 as columnUncertaintyFormatter,
328
+ c5 as cloneLayouts,
323
329
  c2 as createDynamicMFStore,
324
330
  d3 as defaultCommonActionsDictionary,
325
331
  d6 as defaultModalDialogDictionary,
326
332
  d7 as defaultNoItemSelectedDictionary,
327
333
  d8 as defaultObjectLogDictionary,
328
334
  d4 as draggableWindowClasses,
329
- e as errorLabelClasses,
335
+ e2 as errorLabelClasses,
330
336
  g21 as getAccountPopoverDictionary,
331
337
  g20 as getAppBarDictionary,
332
338
  a4 as getAreasComponentsDictionary,
333
339
  g2 as getAreasDictionary,
334
340
  g13 as getCommonActionsDictionary,
335
- h as getDataGridRowsFromSet,
341
+ e as getDataGridRowsFromSet,
336
342
  g12 as getDynamicFilterComponentsDictionary,
337
343
  g22 as getFormComponentsDictionary,
338
344
  g10 as getFormatConcatenated,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "license": "UNLICENSED",
5
5
  "dependencies": {
6
6
  "@emotion/react": "^11.9.0",