@m4l/components 1.0.14 → 1.0.16

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 (69) hide show
  1. package/components/AccountPopover/{index.404f01d4.js → index.97a78be9.js} +1 -1
  2. package/components/AppBar/{index.a153e334.js → index.47dbe6f1.js} +1 -1
  3. package/components/CommonActions/components/ActionFormCancel/{index.108b4887.js → index.ad1b361f.js} +1 -1
  4. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.aa98f7b6.js → index.3e0b387f.js} +1 -1
  5. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.59b04e57.js → index.f33eb24e.js} +1 -1
  6. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.7fc4c5f0.js → index.381342ab.js} +1 -1
  7. package/components/DataGrid/{index.d05b9542.js → index.804af87c.js} +2 -2
  8. package/components/DataGrid/subcomponents/Actions/{index.afc466b3.js → index.7421063b.js} +6 -6
  9. package/components/DragResizeWindow/{index.2b36dc1f.js → index.c957a1e6.js} +2 -2
  10. package/components/DynamicFilter/{dictionary.ce375e8f.js → dictionary.3b52457e.js} +1 -1
  11. package/components/DynamicFilter/helpers/{index.0eab89ef.js → index.32ea6e4a.js} +7 -2
  12. package/components/DynamicFilter/{index.ef6c3a4f.js → index.107ff9cd.js} +2 -2
  13. package/components/DynamicFilter/slots/constants.13968194.js +34 -0
  14. package/components/DynamicFilter/slots/{index.6f8fcccb.js → index.1590336a.js} +30 -61
  15. package/components/DynamicFilter/store/{index.6319d445.js → index.17676a1e.js} +1 -1
  16. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index.99e063cc.js +60 -0
  17. package/components/DynamicFilter/subcomponents/AppliedFilters/index.883e90f5.js +26 -0
  18. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index.909c1836.js +40 -0
  19. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.b718be41.js +56 -0
  20. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.d44591da.js +53 -0
  21. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.3e5853fd.js +55 -0
  22. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.740042db.js +48 -0
  23. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.636d6e6e.js +40 -0
  24. package/components/DynamicFilter/subcomponents/FieldTypes/index.339d175f.js +34 -0
  25. package/components/DynamicFilter/subcomponents/FilterActions/index.c549da68.js +88 -0
  26. package/components/DynamicFilter/subcomponents/InputFilter/index.ce036c20.js +168 -0
  27. package/components/DynamicFilter/subcomponents/PopoverFilter/index.3655469c.js +157 -0
  28. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index.50fc58b0.js +63 -0
  29. package/components/FieldLabel/{index.b220bfbb.js → index.e951e11f.js} +1 -1
  30. package/components/Icon/{index.717cf69c.js → index.9615b1f6.js} +2 -2
  31. package/components/LoadingError/{index.4cfeee6f.js → index.2cdebf59.js} +1 -1
  32. package/components/MFLoader/{index.46805ba6.js → index.fb82993d.js} +1 -1
  33. package/components/ObjectLogs/{index.86dd71c3.js → index.6bd7a872.js} +5 -5
  34. package/components/PaperForm/{index.7a73a394.js → index.afbd86d1.js} +1 -1
  35. package/components/Period/{index.0d3ea00c.js → index.a6ea5000.js} +1 -1
  36. package/components/PropertyValue/{index.d02bea18.js → index.914a6cad.js} +2 -2
  37. package/components/SideBar/{index.90321e9f.js → index.a25eaad8.js} +2 -2
  38. package/components/ToastContainer/{index.f5bff00f.js → index.d2064c6b.js} +1 -1
  39. package/components/areas/components/AreasAdmin/{index.8290b7ac.js → index.15bd47d9.js} +5 -5
  40. package/components/areas/components/AreasViewer/{index.c1b3b741.js → index.316d5487.js} +7 -7
  41. package/components/areas/contexts/AreasContext/{index.8a80127b.js → index.765faaee.js} +2 -2
  42. package/components/areas/hooks/useAreas/{index.16d6b5a7.js → index.1b499976.js} +1 -1
  43. package/components/commercial/TopBar/{index.9eb26752.js → index.c55da9c3.js} +2 -2
  44. package/components/commercial/{index.192900c0.js → index.1248a029.js} +2 -2
  45. package/components/formatters/BooleanFormatter/{index.790bdc9d.js → index.117465b4.js} +2 -2
  46. package/components/formatters/{index.0b95012a.js → index.a8f46cab.js} +1 -1
  47. package/components/hook-form/RHFAutocomplete/{index.4caa6e3d.js → index.709756f6.js} +2 -2
  48. package/components/hook-form/RHFAutocompleteAsync/{index.21fe8f74.js → index.92180d10.js} +1 -1
  49. package/components/hook-form/RHFCheckbox/{index.d6c22f91.js → index.8c3ed4a0.js} +1 -1
  50. package/components/hook-form/RHFColorPicker/{index.e7f1ddab.js → index.fe1a3466.js} +2 -2
  51. package/components/hook-form/RHFDateTime/{index.d3683024.js → index.07030dcc.js} +2 -2
  52. package/components/hook-form/RHFPeriod/{index.b871e169.js → index.755de1db.js} +2 -2
  53. package/components/hook-form/RHFTextField/{index.ea988842.js → index.e1c51719.js} +2 -2
  54. package/components/maps/components/GpsTools/{index.16d5fdbf.js → index.a8ece5d5.js} +11 -11
  55. package/components/maps/components/Map/{index.b259ecde.js → index.e4045b3e.js} +8 -8
  56. package/components/modal/{WindowBase.f6adf7bc.js → WindowBase.2f606ead.js} +2 -2
  57. package/components/modal/{WindowConfirm.3e0d2457.js → WindowConfirm.6eea8ea6.js} +1 -1
  58. package/components/mui_extended/Accordion/{index.59a7e7e8.js → index.c4551873.js} +2 -2
  59. package/components/mui_extended/{CheckBox.c2f296af.js → CheckBox.09cbd444.js} +1 -1
  60. package/components/mui_extended/IconButton/{index.7ff17cea.js → index.47be7d35.js} +1 -1
  61. package/components/mui_extended/MenuActions/{index.5b65b116.js → index.ab55b9b7.js} +2 -2
  62. package/components/mui_extended/Pager/{index.4231bc79.js → index.a453d8b5.js} +2 -2
  63. package/components/mui_extended/ToggleIconButton/{index.709e2a4b.js → index.61269519.js} +1 -1
  64. package/components/popups/PopupsProvider/{index.59c39aa5.js → index.88f09c2a.js} +1 -1
  65. package/components/popups/PopupsViewer/{index.a10114d0.js → index.e80c69c5.js} +4 -4
  66. package/hooks/useFormAddEdit/{index.e53d7d2c.js → index.d718efd0.js} +1 -1
  67. package/index.js +66 -53
  68. package/package.json +1 -1
  69. package/components/DynamicFilter/subcomponents/index.f5d4a81d.js +0 -787
@@ -7,7 +7,7 @@ import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
7
7
  import { A as Avatar } from "../mui_extended/Avatar/index.fb9ad158.js";
8
8
  import { C as CircularProgress } from "../mui_extended/CircularProgress/index.967e70b7.js";
9
9
  import { P as Popover } from "../mui_extended/Popover/index.2348fc4f.js";
10
- import { I as Icon } from "../Icon/index.717cf69c.js";
10
+ import { I as Icon } from "../Icon/index.9615b1f6.js";
11
11
  import clsx from "clsx";
12
12
  const componentName = "M4LAccountPopover";
13
13
  generateUtilityClasses(
@@ -7,7 +7,7 @@ import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
7
7
  import { unstable_composeClasses } from "@mui/base";
8
8
  import { I as Image } from "../Image/index.19aa7ff5.js";
9
9
  import { T as Typography } from "../mui_extended/Typography/index.642798f1.js";
10
- import { I as IconButton } from "../mui_extended/IconButton/index.7ff17cea.js";
10
+ import { I as IconButton } from "../mui_extended/IconButton/index.47be7d35.js";
11
11
  const AppBarRoot = styled("header")(({ theme }) => ({
12
12
  ...theme.components?.M4LAppBar?.styleOverrides
13
13
  }));
@@ -6,7 +6,7 @@ import { useCallback, useEffect } from "react";
6
6
  import { u as useModal } from "../../../../hooks/useModal/index.2003c854.js";
7
7
  import { u as useCommonActionsUtilityClasses } from "../Actions/index.258bf919.js";
8
8
  import { u as useWindowToolsMF } from "../../../areas/hooks/useWindowToolsMF/index.2fbae9dc.js";
9
- import { W as WindowConfirm } from "../../../modal/WindowConfirm.3e0d2457.js";
9
+ import { W as WindowConfirm } from "../../../modal/WindowConfirm.6eea8ea6.js";
10
10
  function ActionFormCancel() {
11
11
  const { getLabel } = useModuleDictionary();
12
12
  const { openModal } = useModal();
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
- import { B as BooleanFormatter } from "../../../formatters/BooleanFormatter/index.790bdc9d.js";
3
+ import { B as BooleanFormatter } from "../../../formatters/BooleanFormatter/index.117465b4.js";
4
4
  function ColumnBooleanFormatter(props) {
5
5
  const { fieldValue, presentationType, Component } = props;
6
6
  return (obProps) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
- import { C as ConcatenatedFormatter } from "../../../formatters/index.0b95012a.js";
3
+ import { C as ConcatenatedFormatter } from "../../../formatters/index.a8f46cab.js";
4
4
  function ColumnConcatenatedValueFormatter(props) {
5
5
  const { fieldValue, fieldSeparator, Component } = props;
6
6
  return (obProps) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Checkbox } from "@mui/material";
3
- import { d as dataGridClasses } from "../../index.d05b9542.js";
3
+ import { d as dataGridClasses } from "../../index.804af87c.js";
4
4
  function ColumnInteractiveCheckFormatter(props) {
5
5
  const { row, onRowChange, column } = props;
6
6
  const handleChange = () => {
@@ -1,5 +1,5 @@
1
1
  import { g as getModalDialogComponentsDictionary } from "../ModalDialog/index.0dd5af28.js";
2
- import { g as getPagerComponentsDictionary } from "../mui_extended/Pager/index.4231bc79.js";
2
+ import { g as getPagerComponentsDictionary } from "../mui_extended/Pager/index.a453d8b5.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { styled } from "@mui/material/styles";
5
5
  import { forwardRef, createContext, useState, useMemo, useEffect, useCallback, useContext, useRef, useLayoutEffect } from "react";
@@ -9,7 +9,7 @@ import { HTML5Backend } from "react-dnd-html5-backend";
9
9
  import { SvgIcon, Checkbox, InputBase, styled as styled$1, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
10
10
  import { D as DATAGRID_SELECT_COLUMN_KEY, c as componentName, a as DATAGRID_PREFIX_NAME } from "./constants.e334cd50.js";
11
11
  import { voidFunction, useModuleDictionary, useModuleSkeleton, getPropertyByString } from "@m4l/core";
12
- import { A as ActionsColumn, a as Actions } from "./subcomponents/Actions/index.afc466b3.js";
12
+ import { A as ActionsColumn, a as Actions } from "./subcomponents/Actions/index.7421063b.js";
13
13
  import { unstable_composeClasses } from "@mui/base";
14
14
  import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
15
15
  import { g as getNameDataTestId } from "../../test/getNameDataTestId.0faeade8.js";
@@ -1,18 +1,18 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { M as MenuActions } from "../../../mui_extended/MenuActions/index.5b65b116.js";
3
- import { u as useDataGrid, a as useFilters, D as DataGridRoot, b as dictionary } from "../../index.d05b9542.js";
2
+ import { M as MenuActions } from "../../../mui_extended/MenuActions/index.ab55b9b7.js";
3
+ import { u as useDataGrid, a as useFilters, D as DataGridRoot, b as dictionary } from "../../index.804af87c.js";
4
4
  import { useTheme, Skeleton } from "@mui/material";
5
5
  import { b as DATAGRID_ACTIONS_COLUMN_KEY } from "../../constants.e334cd50.js";
6
- import { P as Pager } from "../../../mui_extended/Pager/index.4231bc79.js";
7
- import { I as IconButton } from "../../../mui_extended/IconButton/index.7ff17cea.js";
6
+ import { P as Pager } from "../../../mui_extended/Pager/index.a453d8b5.js";
7
+ import { I as IconButton } from "../../../mui_extended/IconButton/index.47be7d35.js";
8
8
  import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
9
9
  import { useIsMobile, useResponsiveContainerStore } from "@m4l/graphics";
10
10
  import { forwardRef, useRef, useState, useImperativeHandle, useMemo, useEffect, useCallback } from "react";
11
11
  import { D as DataGrid$1 } from "../../../../react-data-grid.c5377916.js";
12
12
  import { styled } from "@mui/material/styles";
13
- import { C as ColumnInteractiveCheckFormatter } from "../../formatters/ColumnInteractiveCheckFormatter/index.7fc4c5f0.js";
13
+ import { C as ColumnInteractiveCheckFormatter } from "../../formatters/ColumnInteractiveCheckFormatter/index.381342ab.js";
14
14
  import { u as useModal } from "../../../../hooks/useModal/index.2003c854.js";
15
- import { W as WindowBase } from "../../../modal/WindowBase.f6adf7bc.js";
15
+ import { W as WindowBase } from "../../../modal/WindowBase.2f606ead.js";
16
16
  import { A as Actions$1 } from "../../../CommonActions/components/Actions/index.258bf919.js";
17
17
  import { A as ActionCancel } from "../../../CommonActions/components/ActionCancel/index.609a78ca.js";
18
18
  import { A as ActionIntro } from "../../../CommonActions/components/ActionIntro/index.ebac0bc1.js";
@@ -3,9 +3,9 @@ import { forwardRef, useState, useRef, useImperativeHandle, useCallback, useEffe
3
3
  import { D as DraggableCore_1 } from "../../react-draggable.1c1ba224.js";
4
4
  import clsx from "clsx";
5
5
  import { styled, generateUtilityClasses } from "@mui/material";
6
- import { M as MAP_ZINDEX_OVER_MAP } from "../maps/components/Map/index.b259ecde.js";
6
+ import { M as MAP_ZINDEX_OVER_MAP } from "../maps/components/Map/index.e4045b3e.js";
7
7
  import "@mui/base";
8
- import { M as MAP_ZINDEX_OVER_MAP$1 } from "../popups/PopupsViewer/index.a10114d0.js";
8
+ import { M as MAP_ZINDEX_OVER_MAP$1 } from "../popups/PopupsViewer/index.e80c69c5.js";
9
9
  import { R as Resizable } from "../../react-resizable.a59c14f4.js";
10
10
  const WrapperWindowRoot = styled("div")`
11
11
  position: absolute;
@@ -1,5 +1,5 @@
1
1
  import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.258bf919.js";
2
- import { g as getRHFAutocompleteComponentsDictionary } from "../hook-form/RHFAutocomplete/index.4caa6e3d.js";
2
+ import { g as getRHFAutocompleteComponentsDictionary } from "../hook-form/RHFAutocomplete/index.709756f6.js";
3
3
  const DYNAMIC_FILTER_DICTIONARY_ID = "dynamic_filter";
4
4
  function getDynamicFilterComponentsDictionary() {
5
5
  return [DYNAMIC_FILTER_DICTIONARY_ID].concat(
@@ -1,8 +1,13 @@
1
1
  import * as Yup from "yup";
2
- import { g as getDynamicFilterDictionary, D as DICCTIONARY } from "../dictionary.ce375e8f.js";
2
+ import { g as getDynamicFilterDictionary, D as DICCTIONARY } from "../dictionary.3b52457e.js";
3
3
  import { B as BOOLEAN_OPERATORS, S as STRING_OPERATORS, D as DATE_TIME_OPERATORS, N as NUMBER_OPERATORS, a as SELECT_OPERATORS } from "../constants.1dddd09c.js";
4
- import { B as BooleanFilter, S as StringFilter, D as DateTimeFilter, N as NumberFilter, a as SelectFilter, f as fieldFactory } from "../subcomponents/index.f5d4a81d.js";
4
+ import { B as BooleanFilter } from "../subcomponents/FieldTypes/BooleanFilter/index.b718be41.js";
5
+ import { S as StringFilter } from "../subcomponents/FieldTypes/StringFilter/index.636d6e6e.js";
6
+ import { D as DateTimeFilter } from "../subcomponents/FieldTypes/DateTimeFilter/index.d44591da.js";
5
7
  import { i as isValidDate } from "../../../utils/index.14912462.js";
8
+ import { N as NumberFilter } from "../subcomponents/FieldTypes/NumberFilter/index.3e5853fd.js";
9
+ import { f as fieldFactory } from "../subcomponents/FieldTypes/index.339d175f.js";
10
+ import { S as SelectFilter } from "../subcomponents/FieldTypes/SelectFilter/index.740042db.js";
6
11
  class BooleanFilterHelpers {
7
12
  getComponent() {
8
13
  return BooleanFilter;
@@ -2,8 +2,8 @@ import { alpha } from "@mui/material";
2
2
  import { c as containerQuery } from "../../utils/index.14912462.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { useFlagsPresent, CommonFlags } from "@m4l/core";
5
- import { D as DynamicFilterProvider } from "./store/index.6319d445.js";
6
- import { b as DynamicFilterBase } from "./subcomponents/index.f5d4a81d.js";
5
+ import { D as DynamicFilterProvider } from "./store/index.17676a1e.js";
6
+ import { D as DynamicFilterBase } from "./subcomponents/DynamicFilterBase/index.909c1836.js";
7
7
  const CONTAINER_QUERY_NAME = "dynamic";
8
8
  const dynamicFilterStyles = {
9
9
  root: {
@@ -0,0 +1,34 @@
1
+ var DynamicFilterSlots = /* @__PURE__ */ ((DynamicFilterSlots2) => {
2
+ DynamicFilterSlots2["root"] = "root";
3
+ DynamicFilterSlots2["innerContainer"] = "innerContainer";
4
+ DynamicFilterSlots2["inputFilter"] = "inputFilter";
5
+ DynamicFilterSlots2["inputFilterInput"] = "inputFilterInput";
6
+ DynamicFilterSlots2["inputFilterIcon"] = "inputFilterIcon";
7
+ DynamicFilterSlots2["appliedFilters"] = "appliedFilters";
8
+ DynamicFilterSlots2["appliedFilterInnerContainer"] = "appliedFilterInnerContainer";
9
+ DynamicFilterSlots2["appliedFilterChip"] = "appliedFilterChip";
10
+ DynamicFilterSlots2["appliedFilterChipIcon"] = "appliedFilterChipIcon";
11
+ DynamicFilterSlots2["appliedFilterChipInfo"] = "appliedFilterChipInfo";
12
+ DynamicFilterSlots2["appliedFilterChipInfoFieldName"] = "appliedFilterChipInfoFieldName";
13
+ DynamicFilterSlots2["appliedFilterChipInfoOperator"] = "appliedFilterChipInfoOperator";
14
+ DynamicFilterSlots2["appliedFilterChipInfoOperands"] = "appliedFilterChipInfoOperands";
15
+ DynamicFilterSlots2["appliedFilterChipRemoveButton"] = "appliedFilterChipRemoveButton";
16
+ DynamicFilterSlots2["actions"] = "actions";
17
+ DynamicFilterSlots2["actionsSkeletonButton"] = "actionsSkeletonButton";
18
+ DynamicFilterSlots2["actionsClearButton"] = "actionsClearButton";
19
+ DynamicFilterSlots2["actionsSubmitButton"] = "actionsSubmitButton";
20
+ DynamicFilterSlots2["popoverMenu"] = "popoverMenu";
21
+ DynamicFilterSlots2["popoverMenuItem"] = "popoverMenuItem";
22
+ DynamicFilterSlots2["popoverMenuItemIcon"] = "popoverMenuItemIcon";
23
+ DynamicFilterSlots2["popoverMenuItemLabel"] = "popoverMenuItemLabel";
24
+ DynamicFilterSlots2["popoverFilter"] = "popoverFilter";
25
+ DynamicFilterSlots2["popoverFilterContainerFields"] = "popoverFilterContainerFields";
26
+ DynamicFilterSlots2["popoverFilterHeader"] = "popoverFilterHeader";
27
+ DynamicFilterSlots2["popoverFilterHeaderIcon"] = "popoverFilterHeaderIcon";
28
+ DynamicFilterSlots2["popoverFilterHeaderTitle"] = "popoverFilterHeaderTitle";
29
+ DynamicFilterSlots2["popoverFilterActions"] = "popoverFilterActions";
30
+ return DynamicFilterSlots2;
31
+ })(DynamicFilterSlots || {});
32
+ export {
33
+ DynamicFilterSlots as D
34
+ };
@@ -1,43 +1,13 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { b as DYNAMIC_FILTER_KEY_COMPONENT } from "../constants.1dddd09c.js";
3
- import { d as dynamicFilterStyles } from "../index.ef6c3a4f.js";
3
+ import { D as DynamicFilterSlots } from "./constants.13968194.js";
4
+ import { d as dynamicFilterStyles } from "../index.107ff9cd.js";
4
5
  import { MenuItem } from "@mui/material";
5
6
  import { A as Actions } from "../../CommonActions/components/Actions/index.258bf919.js";
6
- import { I as Icon } from "../../Icon/index.717cf69c.js";
7
- import { I as IconButton } from "../../mui_extended/IconButton/index.7ff17cea.js";
7
+ import { I as Icon } from "../../Icon/index.9615b1f6.js";
8
+ import { I as IconButton } from "../../mui_extended/IconButton/index.47be7d35.js";
8
9
  import { P as Popover } from "../../mui_extended/Popover/index.2348fc4f.js";
9
10
  import { T as Typography } from "../../mui_extended/Typography/index.642798f1.js";
10
- var DynamicFilterSlots = /* @__PURE__ */ ((DynamicFilterSlots2) => {
11
- DynamicFilterSlots2["root"] = "root";
12
- DynamicFilterSlots2["innerContainer"] = "innerContainer";
13
- DynamicFilterSlots2["inputFilter"] = "inputFilter";
14
- DynamicFilterSlots2["inputFilterInput"] = "inputFilterInput";
15
- DynamicFilterSlots2["inputFilterIcon"] = "inputFilterIcon";
16
- DynamicFilterSlots2["appliedFilters"] = "appliedFilters";
17
- DynamicFilterSlots2["appliedFilterInnerContainer"] = "appliedFilterInnerContainer";
18
- DynamicFilterSlots2["appliedFilterChip"] = "appliedFilterChip";
19
- DynamicFilterSlots2["appliedFilterChipIcon"] = "appliedFilterChipIcon";
20
- DynamicFilterSlots2["appliedFilterChipInfo"] = "appliedFilterChipInfo";
21
- DynamicFilterSlots2["appliedFilterChipInfoFieldName"] = "appliedFilterChipInfoFieldName";
22
- DynamicFilterSlots2["appliedFilterChipInfoOperator"] = "appliedFilterChipInfoOperator";
23
- DynamicFilterSlots2["appliedFilterChipInfoOperands"] = "appliedFilterChipInfoOperands";
24
- DynamicFilterSlots2["appliedFilterChipRemoveButton"] = "appliedFilterChipRemoveButton";
25
- DynamicFilterSlots2["actions"] = "actions";
26
- DynamicFilterSlots2["actionsSkeletonButton"] = "actionsSkeletonButton";
27
- DynamicFilterSlots2["actionsClearButton"] = "actionsClearButton";
28
- DynamicFilterSlots2["actionsSubmitButton"] = "actionsSubmitButton";
29
- DynamicFilterSlots2["popoverMenu"] = "popoverMenu";
30
- DynamicFilterSlots2["popoverMenuItem"] = "popoverMenuItem";
31
- DynamicFilterSlots2["popoverMenuItemIcon"] = "popoverMenuItemIcon";
32
- DynamicFilterSlots2["popoverMenuItemLabel"] = "popoverMenuItemLabel";
33
- DynamicFilterSlots2["popoverFilter"] = "popoverFilter";
34
- DynamicFilterSlots2["popoverFilterContainerFields"] = "popoverFilterContainerFields";
35
- DynamicFilterSlots2["popoverFilterHeader"] = "popoverFilterHeader";
36
- DynamicFilterSlots2["popoverFilterHeaderIcon"] = "popoverFilterHeaderIcon";
37
- DynamicFilterSlots2["popoverFilterHeaderTitle"] = "popoverFilterHeaderTitle";
38
- DynamicFilterSlots2["popoverFilterActions"] = "popoverFilterActions";
39
- return DynamicFilterSlots2;
40
- })(DynamicFilterSlots || {});
41
11
  const RootStyled = styled("div", { name: DYNAMIC_FILTER_KEY_COMPONENT, slot: DynamicFilterSlots.root })(
42
12
  dynamicFilterStyles?.root
43
13
  );
@@ -151,32 +121,31 @@ const PopoverHeaderActionsStyled = styled(Actions, {
151
121
  })(dynamicFilterStyles?.popoverFilterActions);
152
122
  export {
153
123
  AppliedFilterChipStyled as A,
154
- DynamicFilterSlots as D,
155
- InputFilterStyled as I,
156
- PopoverMenuStyled as P,
124
+ InnerContainerStyled as I,
125
+ PopoverStyled as P,
157
126
  RootStyled as R,
158
- PopoverMenuItemStyled as a,
159
- PopoverMenuItemIconStyled as b,
160
- PopoverMenuItemLabelStyled as c,
161
- InputFilterIconStyled as d,
162
- InputFilterInputStyled as e,
163
- AppliedFilterChipIconStyled as f,
164
- AppliedFilterChipInfoStyled as g,
165
- AppliedFilterChipInfoFieldNameStyled as h,
166
- AppliedFilterChipInfoOperatorStyled as i,
167
- AppliedFilterChipInfoOperandsStyled as j,
168
- AppliedFilterChipRemoveButtonStyled as k,
169
- AppliedFiltersStyled as l,
170
- AppliedFilterInnerContainerStyled as m,
171
- ActionsSkeletonButtonStyled as n,
172
- ActionsStyled as o,
173
- ActionsClearButtonStyled as p,
174
- ActionsSubmitButtonStyled as q,
175
- PopoverStyled as r,
176
- PopoverHeaderStyled as s,
177
- PopoverHeaderIconStyled as t,
178
- PopoverHeaderTitleStyled as u,
179
- PopoverContainerFieldsStyled as v,
180
- PopoverHeaderActionsStyled as w,
181
- InnerContainerStyled as x
127
+ AppliedFilterChipIconStyled as a,
128
+ AppliedFilterChipInfoStyled as b,
129
+ AppliedFilterChipInfoFieldNameStyled as c,
130
+ AppliedFilterChipInfoOperatorStyled as d,
131
+ AppliedFilterChipInfoOperandsStyled as e,
132
+ AppliedFilterChipRemoveButtonStyled as f,
133
+ AppliedFiltersStyled as g,
134
+ AppliedFilterInnerContainerStyled as h,
135
+ ActionsSkeletonButtonStyled as i,
136
+ ActionsStyled as j,
137
+ ActionsClearButtonStyled as k,
138
+ ActionsSubmitButtonStyled as l,
139
+ InputFilterStyled as m,
140
+ InputFilterIconStyled as n,
141
+ InputFilterInputStyled as o,
142
+ PopoverHeaderStyled as p,
143
+ PopoverHeaderIconStyled as q,
144
+ PopoverHeaderTitleStyled as r,
145
+ PopoverContainerFieldsStyled as s,
146
+ PopoverHeaderActionsStyled as t,
147
+ PopoverMenuStyled as u,
148
+ PopoverMenuItemStyled as v,
149
+ PopoverMenuItemIconStyled as w,
150
+ PopoverMenuItemLabelStyled as x
182
151
  };
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
6
6
  import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
7
7
  import { A as ALL_FIELD } from "../constants.1dddd09c.js";
8
- import { g as getPurgedInitialFiltersApplied, f as formatToInitialFilters, a as formatToRawFilter } from "../helpers/index.0eab89ef.js";
8
+ import { g as getPurgedInitialFiltersApplied, f as formatToInitialFilters, a as formatToRawFilter } from "../helpers/index.32ea6e4a.js";
9
9
  import { devtools } from "zustand/middleware";
10
10
  import { immer } from "zustand/middleware/immer";
11
11
  function useDynamicFilterStore(selector, equalityFn) {
@@ -0,0 +1,60 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { A as AppliedFilterChipStyled, a as AppliedFilterChipIconStyled, b as AppliedFilterChipInfoStyled, c as AppliedFilterChipInfoFieldNameStyled, d as AppliedFilterChipInfoOperatorStyled, e as AppliedFilterChipInfoOperandsStyled, f as AppliedFilterChipRemoveButtonStyled } from "../../slots/index.1590336a.js";
3
+ import { useMemo } from "react";
4
+ import { useEnvironment, useModuleDictionary } from "@m4l/core";
5
+ import { useFormatter } from "@m4l/graphics";
6
+ import { u as useDynamicFilterStore } from "../../store/index.17676a1e.js";
7
+ import { f as fieldFactory } from "../FieldTypes/index.339d175f.js";
8
+ function useAppliedFilterChip(filter) {
9
+ const { host_static_assets, environment_assets } = useEnvironment();
10
+ const { getLabel } = useModuleDictionary();
11
+ const formatters = useFormatter();
12
+ const { hidePopoverFilter, removeFilter, showPopoverFilterForEdit } = useDynamicFilterStore(
13
+ (state) => state.actions
14
+ );
15
+ const removeIconUrl = `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/clear.svg`;
16
+ const labels = useMemo(() => {
17
+ return fieldFactory(filter.field.type).getLabels(filter, getLabel, formatters, filter.field);
18
+ }, [filter, getLabel]);
19
+ function onDelete() {
20
+ hidePopoverFilter(false);
21
+ removeFilter(filter.id);
22
+ }
23
+ function onEditFilter(event) {
24
+ hidePopoverFilter(false);
25
+ const currentTarget = event.currentTarget;
26
+ setTimeout(() => showPopoverFilterForEdit(currentTarget, filter), 10);
27
+ }
28
+ return {
29
+ onDelete,
30
+ onEditFilter,
31
+ removeIconUrl,
32
+ iconFieldUrl: filter.field?.urlIcon,
33
+ labels
34
+ };
35
+ }
36
+ function AppliedFilterChip(props) {
37
+ const { fixed } = props;
38
+ const { onEditFilter, onDelete, iconFieldUrl, removeIconUrl, labels } = useAppliedFilterChip(props);
39
+ return /* @__PURE__ */ jsxs(AppliedFilterChipStyled, { ownerState: {}, children: [
40
+ iconFieldUrl && /* @__PURE__ */ jsx(AppliedFilterChipIconStyled, { onClick: onEditFilter, src: iconFieldUrl, ownerState: {} }),
41
+ /* @__PURE__ */ jsxs(AppliedFilterChipInfoStyled, { onClick: onEditFilter, ownerState: {}, children: [
42
+ /* @__PURE__ */ jsx(AppliedFilterChipInfoFieldNameStyled, { ownerState: {}, children: labels.labelField }),
43
+ /* @__PURE__ */ jsx(AppliedFilterChipInfoOperatorStyled, { ownerState: {}, children: labels.labelOperator }),
44
+ /* @__PURE__ */ jsx(AppliedFilterChipInfoOperandsStyled, { ownerState: {}, children: labels.labelOperands })
45
+ ] }),
46
+ !fixed && /* @__PURE__ */ jsx(
47
+ AppliedFilterChipRemoveButtonStyled,
48
+ {
49
+ src: removeIconUrl,
50
+ size: "small",
51
+ dictionaryTooltipId: "dynamic_filter.tooltip_clear_filter",
52
+ onClick: onDelete,
53
+ ownerState: {}
54
+ }
55
+ )
56
+ ] });
57
+ }
58
+ export {
59
+ AppliedFilterChip as A
60
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { S as ScrollBar } from "../../../ScrollBar/index.21bc5025.js";
3
+ import { g as AppliedFiltersStyled, h as AppliedFilterInnerContainerStyled } from "../../slots/index.1590336a.js";
4
+ import { u as useDynamicFilterStore } from "../../store/index.17676a1e.js";
5
+ import { A as AppliedFilterChip } from "../AppliedFilterChip/index.99e063cc.js";
6
+ function useAppliedFilters() {
7
+ const appliedFilter = useDynamicFilterStore((state) => state.appliedFilters);
8
+ const isSkeleton = useDynamicFilterStore((state) => state.ownerState.isSkeleton);
9
+ const appliedFiltersSorted = [...appliedFilter].sort(
10
+ (filterA, filterB) => filterA.isSet !== filterB.isSet ? Number(filterA.isSet) - Number(filterB.isSet) : filterB.id - filterA.id
11
+ );
12
+ return {
13
+ appliedFiltersSorted,
14
+ isSkeleton
15
+ };
16
+ }
17
+ function AppliedFilters() {
18
+ const { appliedFiltersSorted, isSkeleton } = useAppliedFilters();
19
+ if (isSkeleton) {
20
+ return /* @__PURE__ */ jsx(AppliedFiltersStyled, { ownerState: {} });
21
+ }
22
+ return /* @__PURE__ */ jsx(AppliedFiltersStyled, { ownerState: {}, children: /* @__PURE__ */ jsx(ScrollBar, { children: /* @__PURE__ */ jsx(AppliedFilterInnerContainerStyled, { ownerState: {}, children: appliedFiltersSorted?.map((filter) => /* @__PURE__ */ jsx(AppliedFilterChip, { ...filter }, filter.id)) }) }) });
23
+ }
24
+ export {
25
+ AppliedFilters as A
26
+ };
@@ -0,0 +1,40 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { u as useDynamicFilterStore } from "../../store/index.17676a1e.js";
3
+ import { R as RootStyled, I as InnerContainerStyled } from "../../slots/index.1590336a.js";
4
+ import { a as getPropDataTestId } from "../../../../test/getNameDataTestId.0faeade8.js";
5
+ import { D as DynamicFilterSlots } from "../../slots/constants.13968194.js";
6
+ import { I as InputFilter } from "../InputFilter/index.ce036c20.js";
7
+ import { A as AppliedFilters } from "../AppliedFilters/index.883e90f5.js";
8
+ import { F as FilterActions } from "../FilterActions/index.c549da68.js";
9
+ import { P as PopoverFilter } from "../PopoverFilter/index.3655469c.js";
10
+ function useDynamicFilterBase() {
11
+ const ownerState = useDynamicFilterStore((state) => state.ownerState);
12
+ const dataTestId = useDynamicFilterStore((state) => state.dataTestId);
13
+ return { ownerState, dataTestId };
14
+ }
15
+ function DynamicFilterBase() {
16
+ const { ownerState, dataTestId } = useDynamicFilterBase();
17
+ return /* @__PURE__ */ jsx(
18
+ RootStyled,
19
+ {
20
+ ownerState: { ...ownerState },
21
+ ...getPropDataTestId(dataTestId, DynamicFilterSlots.root),
22
+ children: /* @__PURE__ */ jsxs(
23
+ InnerContainerStyled,
24
+ {
25
+ ownerState: { ...ownerState },
26
+ ...getPropDataTestId(dataTestId, DynamicFilterSlots.innerContainer),
27
+ children: [
28
+ /* @__PURE__ */ jsx(InputFilter, {}),
29
+ /* @__PURE__ */ jsx(AppliedFilters, {}),
30
+ /* @__PURE__ */ jsx(FilterActions, {}),
31
+ /* @__PURE__ */ jsx(PopoverFilter, {})
32
+ ]
33
+ }
34
+ )
35
+ }
36
+ );
37
+ }
38
+ export {
39
+ DynamicFilterBase as D
40
+ };
@@ -0,0 +1,56 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { useModuleDictionary } from "@m4l/core";
4
+ import { B as BOOLEAN_OPERATORS } from "../../../constants.1dddd09c.js";
5
+ import { g as getDynamicFilterDictionary, D as DICCTIONARY } from "../../../dictionary.3b52457e.js";
6
+ import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/index.709756f6.js";
7
+ function BooleanFilter() {
8
+ const { getLabel } = useModuleDictionary();
9
+ const operators = useMemo(
10
+ () => BOOLEAN_OPERATORS.map((o) => ({
11
+ id: o,
12
+ label: getLabel(getDynamicFilterDictionary(`operator_${o}`))
13
+ })),
14
+ [getLabel]
15
+ );
16
+ const optionsYesNo = useMemo(
17
+ () => [
18
+ {
19
+ value: true,
20
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.operand_true))
21
+ },
22
+ {
23
+ value: false,
24
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.operand_false))
25
+ }
26
+ ],
27
+ [getLabel]
28
+ );
29
+ return /* @__PURE__ */ jsxs("div", { children: [
30
+ /* @__PURE__ */ jsx(
31
+ RHFAutocomplete,
32
+ {
33
+ name: "formValueOperator",
34
+ autoComplete: "off",
35
+ options: operators,
36
+ getOptionLabel: (option) => option.label,
37
+ isOptionEqualToValue: (option, value) => option.id === value.id,
38
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_boolean_operator))
39
+ }
40
+ ),
41
+ /* @__PURE__ */ jsx(
42
+ RHFAutocomplete,
43
+ {
44
+ name: "formValueOperand1",
45
+ autoComplete: "off",
46
+ options: optionsYesNo,
47
+ getOptionLabel: (option) => option.label,
48
+ isOptionEqualToValue: (option, value) => option.value === value.value,
49
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_boolean_operand1))
50
+ }
51
+ )
52
+ ] });
53
+ }
54
+ export {
55
+ BooleanFilter as B
56
+ };
@@ -0,0 +1,53 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { useFormContext, useWatch } from "react-hook-form";
4
+ import { useModuleDictionary } from "@m4l/core";
5
+ import { D as DATE_TIME_OPERATORS } from "../../../constants.1dddd09c.js";
6
+ import { g as getDynamicFilterDictionary, D as DICCTIONARY } from "../../../dictionary.3b52457e.js";
7
+ import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/index.709756f6.js";
8
+ import { R as RHFDateTime } from "../../../../hook-form/RHFDateTime/index.07030dcc.js";
9
+ function DateTimeFilter() {
10
+ const { getLabel } = useModuleDictionary();
11
+ const { control } = useFormContext();
12
+ const operator = useWatch({
13
+ control,
14
+ name: "formValueOperator"
15
+ });
16
+ const operators = useMemo(
17
+ () => DATE_TIME_OPERATORS.map((o) => ({
18
+ id: o,
19
+ label: getLabel(getDynamicFilterDictionary(`operator_${o}`))
20
+ })),
21
+ [getLabel]
22
+ );
23
+ return /* @__PURE__ */ jsxs("div", { children: [
24
+ /* @__PURE__ */ jsx(
25
+ RHFAutocomplete,
26
+ {
27
+ name: "formValueOperator",
28
+ autoComplete: "off",
29
+ options: operators,
30
+ getOptionLabel: (option) => option.label,
31
+ isOptionEqualToValue: (option, value) => option.id === value.id,
32
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operator_date_time))
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx(
36
+ RHFDateTime,
37
+ {
38
+ name: "formValueOperand1",
39
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operand1_date_time))
40
+ }
41
+ ),
42
+ operator && operator.id === "b" && /* @__PURE__ */ jsx(
43
+ RHFDateTime,
44
+ {
45
+ name: "formValueOperand2",
46
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operand2_date_time))
47
+ }
48
+ )
49
+ ] });
50
+ }
51
+ export {
52
+ DateTimeFilter as D
53
+ };
@@ -0,0 +1,55 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { useFormContext, useWatch } from "react-hook-form";
4
+ import { useModuleDictionary } from "@m4l/core";
5
+ import { g as getDynamicFilterDictionary, D as DICCTIONARY } from "../../../dictionary.3b52457e.js";
6
+ import { N as NUMBER_OPERATORS } from "../../../constants.1dddd09c.js";
7
+ import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/index.709756f6.js";
8
+ import { R as RHFTextField } from "../../../../hook-form/RHFTextField/index.e1c51719.js";
9
+ function NumberFilter() {
10
+ const { getLabel } = useModuleDictionary();
11
+ const { control } = useFormContext();
12
+ const operator = useWatch({
13
+ control,
14
+ name: "formValueOperator"
15
+ });
16
+ const operators = useMemo(
17
+ () => NUMBER_OPERATORS.map((o) => ({
18
+ id: o,
19
+ label: getLabel(getDynamicFilterDictionary(`operator_${o}`))
20
+ })),
21
+ [getLabel]
22
+ );
23
+ return /* @__PURE__ */ jsxs("div", { children: [
24
+ /* @__PURE__ */ jsx(
25
+ RHFAutocomplete,
26
+ {
27
+ name: "formValueOperator",
28
+ autoComplete: "off",
29
+ options: operators,
30
+ getOptionLabel: (option) => option.label,
31
+ isOptionEqualToValue: (option, value) => option.id === value.id,
32
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operator_number))
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx(
36
+ RHFTextField,
37
+ {
38
+ name: "formValueOperand1",
39
+ type: "number",
40
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operand1_number))
41
+ }
42
+ ),
43
+ operator && operator.id === "b" && /* @__PURE__ */ jsx(
44
+ RHFTextField,
45
+ {
46
+ name: "formValueOperand2",
47
+ type: "number",
48
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operand2_number))
49
+ }
50
+ )
51
+ ] });
52
+ }
53
+ export {
54
+ NumberFilter as N
55
+ };