@m4l/components 1.0.15 → 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 (68) hide show
  1. package/components/AccountPopover/{index.e29a3c5c.js → index.97a78be9.js} +1 -1
  2. package/components/AppBar/{index.4f4bb61f.js → index.47dbe6f1.js} +1 -1
  3. package/components/CommonActions/components/ActionFormCancel/{index.b325f1e2.js → index.ad1b361f.js} +1 -1
  4. package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.ff18b2a6.js → index.3e0b387f.js} +1 -1
  5. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.1487b238.js → index.f33eb24e.js} +1 -1
  6. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.2999445b.js → index.381342ab.js} +1 -1
  7. package/components/DataGrid/{index.4a2e0f22.js → index.804af87c.js} +2 -2
  8. package/components/DataGrid/subcomponents/Actions/{index.0a3db350.js → index.7421063b.js} +6 -6
  9. package/components/DragResizeWindow/{index.f23525c7.js → index.c957a1e6.js} +2 -2
  10. package/components/DynamicFilter/{dictionary.da8046c7.js → dictionary.3b52457e.js} +1 -1
  11. package/components/DynamicFilter/helpers/{index.a13deed7.js → index.32ea6e4a.js} +7 -2
  12. package/components/DynamicFilter/{index.952f8480.js → index.107ff9cd.js} +2 -2
  13. package/components/DynamicFilter/slots/{index.b55f3ebc.js → index.1590336a.js} +29 -29
  14. package/components/DynamicFilter/store/{index.370765c1.js → index.17676a1e.js} +1 -1
  15. package/components/DynamicFilter/subcomponents/AppliedFilterChip/index.99e063cc.js +60 -0
  16. package/components/DynamicFilter/subcomponents/AppliedFilters/index.883e90f5.js +26 -0
  17. package/components/DynamicFilter/subcomponents/DynamicFilterBase/index.909c1836.js +40 -0
  18. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.b718be41.js +56 -0
  19. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.d44591da.js +53 -0
  20. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.3e5853fd.js +55 -0
  21. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.740042db.js +48 -0
  22. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.636d6e6e.js +40 -0
  23. package/components/DynamicFilter/subcomponents/FieldTypes/index.339d175f.js +34 -0
  24. package/components/DynamicFilter/subcomponents/FilterActions/index.c549da68.js +88 -0
  25. package/components/DynamicFilter/subcomponents/InputFilter/index.ce036c20.js +168 -0
  26. package/components/DynamicFilter/subcomponents/PopoverFilter/index.3655469c.js +157 -0
  27. package/components/DynamicFilter/subcomponents/PopoverMenuFields/index.50fc58b0.js +63 -0
  28. package/components/FieldLabel/{index.31998491.js → index.e951e11f.js} +1 -1
  29. package/components/Icon/{index.7c470582.js → index.9615b1f6.js} +2 -2
  30. package/components/LoadingError/{index.42a55f4c.js → index.2cdebf59.js} +1 -1
  31. package/components/MFLoader/{index.aa7f5a2e.js → index.fb82993d.js} +1 -1
  32. package/components/ObjectLogs/{index.92ef4170.js → index.6bd7a872.js} +5 -5
  33. package/components/PaperForm/{index.c7495338.js → index.afbd86d1.js} +1 -1
  34. package/components/Period/{index.798f8392.js → index.a6ea5000.js} +1 -1
  35. package/components/PropertyValue/{index.2d2911e8.js → index.914a6cad.js} +2 -2
  36. package/components/SideBar/{index.6cfca08a.js → index.a25eaad8.js} +2 -2
  37. package/components/ToastContainer/{index.18d8fe7c.js → index.d2064c6b.js} +1 -1
  38. package/components/areas/components/AreasAdmin/{index.4b10abad.js → index.15bd47d9.js} +5 -5
  39. package/components/areas/components/AreasViewer/{index.7573f13c.js → index.316d5487.js} +7 -7
  40. package/components/areas/contexts/AreasContext/{index.11779442.js → index.765faaee.js} +2 -2
  41. package/components/areas/hooks/useAreas/{index.62f5aa0a.js → index.1b499976.js} +1 -1
  42. package/components/commercial/TopBar/{index.7c61f79e.js → index.c55da9c3.js} +2 -2
  43. package/components/commercial/{index.ecc02533.js → index.1248a029.js} +2 -2
  44. package/components/formatters/BooleanFormatter/{index.a9d5ac7d.js → index.117465b4.js} +2 -2
  45. package/components/formatters/{index.7b777849.js → index.a8f46cab.js} +1 -1
  46. package/components/hook-form/RHFAutocomplete/{index.e5e8baae.js → index.709756f6.js} +2 -2
  47. package/components/hook-form/RHFAutocompleteAsync/{index.5d539214.js → index.92180d10.js} +1 -1
  48. package/components/hook-form/RHFCheckbox/{index.63c87daa.js → index.8c3ed4a0.js} +1 -1
  49. package/components/hook-form/RHFColorPicker/{index.9d34e1f3.js → index.fe1a3466.js} +2 -2
  50. package/components/hook-form/RHFDateTime/{index.64804ca3.js → index.07030dcc.js} +2 -2
  51. package/components/hook-form/RHFPeriod/{index.15a61515.js → index.755de1db.js} +2 -2
  52. package/components/hook-form/RHFTextField/{index.d2af30c0.js → index.e1c51719.js} +2 -2
  53. package/components/maps/components/GpsTools/{index.6d2dab3c.js → index.a8ece5d5.js} +11 -11
  54. package/components/maps/components/Map/{index.2c31ea9e.js → index.e4045b3e.js} +8 -8
  55. package/components/modal/{WindowBase.6bf7201e.js → WindowBase.2f606ead.js} +2 -2
  56. package/components/modal/{WindowConfirm.ca443b26.js → WindowConfirm.6eea8ea6.js} +1 -1
  57. package/components/mui_extended/Accordion/{index.c51c5787.js → index.c4551873.js} +2 -2
  58. package/components/mui_extended/{CheckBox.511980a0.js → CheckBox.09cbd444.js} +1 -1
  59. package/components/mui_extended/IconButton/{index.31343834.js → index.47be7d35.js} +1 -1
  60. package/components/mui_extended/MenuActions/{index.520a26d8.js → index.ab55b9b7.js} +2 -2
  61. package/components/mui_extended/Pager/{index.225cd67f.js → index.a453d8b5.js} +2 -2
  62. package/components/mui_extended/ToggleIconButton/{index.27848408.js → index.61269519.js} +1 -1
  63. package/components/popups/PopupsProvider/{index.13be398e.js → index.88f09c2a.js} +1 -1
  64. package/components/popups/PopupsViewer/{index.31407dfb.js → index.e80c69c5.js} +4 -4
  65. package/hooks/useFormAddEdit/{index.ab256ea9.js → index.d718efd0.js} +1 -1
  66. package/index.js +65 -53
  67. package/package.json +1 -1
  68. package/components/DynamicFilter/subcomponents/index.e32811b5.js +0 -788
@@ -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.7c470582.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.31343834.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.ca443b26.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.a9d5ac7d.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.7b777849.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.4a2e0f22.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.225cd67f.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.0a3db350.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.520a26d8.js";
3
- import { u as useDataGrid, a as useFilters, D as DataGridRoot, b as dictionary } from "../../index.4a2e0f22.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.225cd67f.js";
7
- import { I as IconButton } from "../../../mui_extended/IconButton/index.31343834.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.2999445b.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.6bf7201e.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.2c31ea9e.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.31407dfb.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.e5e8baae.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.da8046c7.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.e32811b5.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.370765c1.js";
6
- import { b as DynamicFilterBase } from "./subcomponents/index.e32811b5.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: {
@@ -1,11 +1,11 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { b as DYNAMIC_FILTER_KEY_COMPONENT } from "../constants.1dddd09c.js";
3
3
  import { D as DynamicFilterSlots } from "./constants.13968194.js";
4
- import { d as dynamicFilterStyles } from "../index.952f8480.js";
4
+ import { d as dynamicFilterStyles } from "../index.107ff9cd.js";
5
5
  import { MenuItem } from "@mui/material";
6
6
  import { A as Actions } from "../../CommonActions/components/Actions/index.258bf919.js";
7
- import { I as Icon } from "../../Icon/index.7c470582.js";
8
- import { I as IconButton } from "../../mui_extended/IconButton/index.31343834.js";
7
+ import { I as Icon } from "../../Icon/index.9615b1f6.js";
8
+ import { I as IconButton } from "../../mui_extended/IconButton/index.47be7d35.js";
9
9
  import { P as Popover } from "../../mui_extended/Popover/index.2348fc4f.js";
10
10
  import { T as Typography } from "../../mui_extended/Typography/index.642798f1.js";
11
11
  const RootStyled = styled("div", { name: DYNAMIC_FILTER_KEY_COMPONENT, slot: DynamicFilterSlots.root })(
@@ -121,31 +121,31 @@ const PopoverHeaderActionsStyled = styled(Actions, {
121
121
  })(dynamicFilterStyles?.popoverFilterActions);
122
122
  export {
123
123
  AppliedFilterChipStyled as A,
124
- InputFilterStyled as I,
125
- PopoverMenuStyled as P,
124
+ InnerContainerStyled as I,
125
+ PopoverStyled as P,
126
126
  RootStyled as R,
127
- PopoverMenuItemStyled as a,
128
- PopoverMenuItemIconStyled as b,
129
- PopoverMenuItemLabelStyled as c,
130
- InputFilterIconStyled as d,
131
- InputFilterInputStyled as e,
132
- AppliedFilterChipIconStyled as f,
133
- AppliedFilterChipInfoStyled as g,
134
- AppliedFilterChipInfoFieldNameStyled as h,
135
- AppliedFilterChipInfoOperatorStyled as i,
136
- AppliedFilterChipInfoOperandsStyled as j,
137
- AppliedFilterChipRemoveButtonStyled as k,
138
- AppliedFiltersStyled as l,
139
- AppliedFilterInnerContainerStyled as m,
140
- ActionsSkeletonButtonStyled as n,
141
- ActionsStyled as o,
142
- ActionsClearButtonStyled as p,
143
- ActionsSubmitButtonStyled as q,
144
- PopoverStyled as r,
145
- PopoverHeaderStyled as s,
146
- PopoverHeaderIconStyled as t,
147
- PopoverHeaderTitleStyled as u,
148
- PopoverContainerFieldsStyled as v,
149
- PopoverHeaderActionsStyled as w,
150
- 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
151
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.a13deed7.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
+ };
@@ -0,0 +1,48 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { useModuleDictionary } from "@m4l/core";
4
+ import { a as SELECT_OPERATORS } from "../../../constants.1dddd09c.js";
5
+ import { g as getDynamicFilterDictionary, D as DICCTIONARY } from "../../../dictionary.3b52457e.js";
6
+ import { u as useDynamicFilterStore } from "../../../store/index.17676a1e.js";
7
+ import { R as RHFAutocomplete } from "../../../../hook-form/RHFAutocomplete/index.709756f6.js";
8
+ import { R as RHFAutocompleteAsync } from "../../../../hook-form/RHFAutocompleteAsync/index.92180d10.js";
9
+ function SelectFilter() {
10
+ const { getLabel } = useModuleDictionary();
11
+ const field = useDynamicFilterStore((state) => state.popoverFilterData?.field);
12
+ if (!field?.selectOptions?.endPoint) {
13
+ throw new Error("El filtro tipo Select requiere la configuraci\xF3n del Endpoint");
14
+ }
15
+ const autocompleteProps = field?.selectOptions;
16
+ const operators = useMemo(
17
+ () => SELECT_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_select_operator))
33
+ }
34
+ ),
35
+ /* @__PURE__ */ jsx(
36
+ RHFAutocompleteAsync,
37
+ {
38
+ ...autocompleteProps,
39
+ name: "formValueOperandsArray",
40
+ autoComplete: "off",
41
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_select_operands_array))
42
+ }
43
+ )
44
+ ] });
45
+ }
46
+ export {
47
+ SelectFilter as S
48
+ };
@@ -0,0 +1,40 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { useModuleDictionary } from "@m4l/core";
4
+ import { S as STRING_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
+ import { R as RHFTextField } from "../../../../hook-form/RHFTextField/index.e1c51719.js";
8
+ function StringFilter() {
9
+ const { getLabel } = useModuleDictionary();
10
+ const operators = useMemo(
11
+ () => STRING_OPERATORS.map((o) => ({
12
+ id: o,
13
+ label: getLabel(getDynamicFilterDictionary(`operator_${o}`))
14
+ })),
15
+ [getLabel]
16
+ );
17
+ return /* @__PURE__ */ jsxs("div", { children: [
18
+ /* @__PURE__ */ jsx(
19
+ RHFAutocomplete,
20
+ {
21
+ name: "formValueOperator",
22
+ autoComplete: "off",
23
+ options: operators,
24
+ getOptionLabel: (option) => option.label,
25
+ isOptionEqualToValue: (option, value) => option.id === value.id,
26
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operator_string))
27
+ }
28
+ ),
29
+ /* @__PURE__ */ jsx(
30
+ RHFTextField,
31
+ {
32
+ name: "formValueOperand1",
33
+ label: getLabel(getDynamicFilterDictionary(DICCTIONARY.label_operand1_string))
34
+ }
35
+ )
36
+ ] });
37
+ }
38
+ export {
39
+ StringFilter as S
40
+ };