@m4l/components 1.0.0 → 1.0.2

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 (95) hide show
  1. package/components/AccountPopover/{index.efc74d5c.js → index.ec031003.js} +5 -3
  2. package/components/AppBar/{index.fc126a22.js → index.1499770b.js} +4 -4
  3. package/components/DragResizeWindow/{index.46b380e1.js → index.5e316291.js} +3 -3
  4. package/components/DynamicFilter/{index.d9168c12.js → index.05e15fb8.js} +28 -211
  5. package/components/FieldLabel/{index.f9cdcc27.js → index.400a46e0.js} +4 -4
  6. package/components/GridLayout/{index.bb3b7769.js → index.7156fbc9.js} +2 -2
  7. package/components/GridLayout/subcomponents/Griditem/{index.bb23f651.js → index.8946f18e.js} +4 -4
  8. package/components/GridLayout/subcomponents/Responsive/{index.b8a2a121.js → index.3c68f0cb.js} +2 -2
  9. package/components/GridLayout/subcomponents/SizeProvider/{index.094bc6b5.js → index.a5b2190d.js} +1 -1
  10. package/components/HamburgerMenu/{index.5997af31.js → index.d57bca4c.js} +3 -3
  11. package/components/HelperText/{index.be949cdf.js → index.651a9b4b.js} +1 -1
  12. package/components/Icon/index.2e8ec5a1.js +209 -0
  13. package/components/Image/index.0d32558e.js +168 -0
  14. package/components/LoadingError/{index.9f00c83c.js → index.d137be81.js} +5 -4
  15. package/components/MFLoader/{index.402c1acc.js → index.2038aa6c.js} +3 -3
  16. package/components/ModalDialog/{index.ea9189c3.js → index.85d30f10.js} +4 -4
  17. package/components/NavLink/{index.4e548cee.js → index.badec599.js} +2 -2
  18. package/components/NoItemSelected/{index.418c8316.js → index.008154ce.js} +2 -2
  19. package/components/ObjectLogs/{index.bfa7dad3.js → index.65a6b1bc.js} +8 -7
  20. package/components/PDFViewer/{index.bb2eca5a.js → index.9677b02a.js} +2 -2
  21. package/components/Page/index.7482cf60.js +98 -0
  22. package/components/PaperForm/{index.8121e3da.js → index.e04f9f1f.js} +2 -2
  23. package/components/Period/{index.5233694b.js → index.3d695534.js} +8 -103
  24. package/components/PrintingSystem/{index.fb176a93.js → index.89493ad6.js} +15 -14
  25. package/components/PrintingSystem/subcomponents/BodyNode/{index.c1d61038.js → index.fdd8cebb.js} +1 -1
  26. package/components/PrintingSystem/subcomponents/ChartNode/{index.18bd9bad.js → index.12293a60.js} +1 -1
  27. package/components/PrintingSystem/subcomponents/DividerNode/{index.67d9f1b4.js → index.7fdad1df.js} +1 -1
  28. package/components/PrintingSystem/subcomponents/FooterNode/{index.eaee152a.js → index.fcaf9b2f.js} +1 -1
  29. package/components/PrintingSystem/subcomponents/GridNode/{index.f5f63a2a.js → index.03148990.js} +1 -1
  30. package/components/PrintingSystem/subcomponents/HeaderNode/{index.7de4e411.js → index.691b5c38.js} +1 -1
  31. package/components/PrintingSystem/subcomponents/PaperNode/{index.f9ccf22b.js → index.3699b685.js} +1 -1
  32. package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.f2f2e903.js → index.bcc87da8.js} +1 -1
  33. package/components/PrintingSystem/subcomponents/SectionNode/{index.540a4b19.js → index.659f28e5.js} +1 -1
  34. package/components/PrintingSystem/subcomponents/TextBoxNode/{index.41e7fcb0.js → index.137ebb7a.js} +1 -1
  35. package/components/PropertyValue/{index.9572c347.js → index.e31d4282.js} +3 -3
  36. package/components/Resizeable/{index.1f0c1359.js → index.8c72e36a.js} +1 -1
  37. package/components/ScrollBar/{index.adf0eade.js → index.9bfcc74f.js} +1 -1
  38. package/components/SideBar/{index.629ba840.js → index.004a2de1.js} +7 -31
  39. package/components/SplitLayout/{index.74091a81.js → index.aed78a1f.js} +1 -1
  40. package/components/ToastContainer/{index.f9b507b9.js → index.586b1194.js} +3 -3
  41. package/components/areas/constants.630a4f42.js +293 -0
  42. package/components/areas/contexts/AreasContext/{index.bb316000.js → index.81b748ec.js} +4 -4
  43. package/components/areas/{dictionary.7e74022a.js → dictionary.19b25583.js} +26 -34
  44. package/components/areas/hooks/useAreas/{index.e24bd74d.js → index.b02d5bdc.js} +1 -1
  45. package/components/hook-form/HelperError/index.fd10c3ab.js +19 -0
  46. package/components/hook-form/RHFAutocompleteAsync/index.ea3ba7a7.js +160 -0
  47. package/components/hook-form/RHFCheckbox/index.9ac452cc.js +143 -0
  48. package/components/hook-form/RHFColorPicker/index.25e4e643.js +191 -0
  49. package/components/hook-form/RHFDateTime/index.31a0537d.js +190 -0
  50. package/components/hook-form/RHFMultiCheckbox/index.437e6ba3.js +34 -0
  51. package/components/hook-form/RHFPeriod/index.c8868100.js +105 -0
  52. package/components/hook-form/RHFRadioGroup/index.11c0add8.js +35 -0
  53. package/components/hook-form/RHFSelect/index.c6c60ecc.js +29 -0
  54. package/components/hook-form/RHFTextField/index.2ae1f130.js +326 -0
  55. package/components/{Image/index.36a3d440.js → hook-form/RHFUpload/index.9eeaee0f.js} +32 -232
  56. package/components/maps/components/GpsTools/index.ef751d28.js +251 -0
  57. package/components/maps/{index.8ec46ce4.js → index.ba1ccfad.js} +21 -555
  58. package/components/modal/{WindowBase.a3ac7adc.js → WindowBase.c1e879e4.js} +4 -3
  59. package/components/modal/{WindowConfirm.e35da619.js → WindowConfirm.1a123368.js} +6 -6
  60. package/components/modal/{index.a0e30c8b.js → index.7ca17f55.js} +1 -1
  61. package/components/mui_extended/Accordion/index.391679d1.js +143 -0
  62. package/components/mui_extended/Avatar/index.3ba36655.js +63 -0
  63. package/components/mui_extended/Badge/index.3465d7fb.js +31 -0
  64. package/components/mui_extended/BoxIcon/index.d61e7ac5.js +22 -0
  65. package/components/mui_extended/Breadcrumbs/index.4a44883c.js +87 -0
  66. package/components/mui_extended/Button/index.a7dc6ef0.js +289 -0
  67. package/components/mui_extended/CheckBox/index.c5c8721c.js +76 -0
  68. package/components/mui_extended/CircularProgress/index.967e70b7.js +8 -0
  69. package/components/mui_extended/IconButton/index.87f4726c.js +120 -0
  70. package/components/{LinearProgressIndeterminate/index.de9d447c.js → mui_extended/LinearProgress/index.52edc848.js} +11 -4
  71. package/components/mui_extended/LinkWithRoute/index.288c51f3.js +15 -0
  72. package/components/{Page/index.fdf04592.js → mui_extended/Pager/index.46aec921.js} +9 -98
  73. package/components/mui_extended/Popover/index.8e5ac765.js +1041 -0
  74. package/components/mui_extended/Stack/index.fe363ca5.js +31 -0
  75. package/components/{maps/components/GpsTools/index.75880ce0.js → mui_extended/Tab/index.ad88441e.js} +674 -239
  76. package/components/mui_extended/ToggleButton/index.38ca2330.js +18 -0
  77. package/components/mui_extended/ToggleIconButton/index.7fbece74.js +24 -0
  78. package/components/mui_extended/Tooltip/index.49bb5ee1.js +40 -0
  79. package/components/mui_extended/Typography/index.2a1c68f8.js +55 -0
  80. package/components/popups/PopupsProvider/{index.18669fb4.js → index.3b43e55f.js} +1 -1
  81. package/components/popups/PopupsViewer/{index.ba354267.js → index.fb3f0c48.js} +5 -4
  82. package/contexts/ModalContext/{index.cf02e6bd.js → index.82f61407.js} +1 -1
  83. package/contexts/RHFormContext/{index.dc955a09.js → index.e942a298.js} +1 -1
  84. package/hooks/useFormAddEdit/{index.f156a2cd.js → index.fa430551.js} +2 -2
  85. package/hooks/useModal/{index.ef54bcf2.js → index.9fe41bde.js} +3 -3
  86. package/index.js +266 -239
  87. package/package.json +1 -1
  88. package/{react-draggable.5331add7.js → react-draggable.2df3b71a.js} +1 -1
  89. package/{react-resizable.37bfb965.js → react-resizable.c60f3843.js} +2 -2
  90. package/utils/{index.9ee4c99a.js → index.0660ee9c.js} +9 -62
  91. package/{vendor.a1ce6777.js → vendor.3eadfa16.js} +746 -3011
  92. package/components/Icon/index.d5fed418.js +0 -420
  93. package/components/LanguagePopover/index.e6fa2336.js +0 -184
  94. package/components/areas/constants.5387d83e.js +0 -412
  95. package/hooks/useTab/index.bce8b99e.js +0 -12
@@ -1,26 +1,26 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import React__default, { forwardRef, useMemo, useState, useEffect, createContext, useCallback, useRef, createElement, useContext, useLayoutEffect, useImperativeHandle } from "react";
3
- import { useModuleSkeleton, useEnvironment, useModuleDictionary, useNetwork, getPropertyByString, evaluateWithContext, voidFunction } from "@m4l/core";
4
- import { u as useRowSelection, S as SelectCellFormatter, H as HeaderRenderer, D as DataGrid$1 } from "./react-data-grid.c5377916.js";
5
- import { a as IconButton, I as Icon, b as ArrowStyle, C as CheckboxIcon, c as CheckboxCheckedIcon, d as CheckboxIndeterminateIcon, e as ArrowIcon } from "./components/Icon/index.d5fed418.js";
6
- import { styled, useTheme as useTheme$1 } from "@mui/material/styles";
7
- import { useFormContext, useFormState, Controller, useWatch, useController } from "react-hook-form";
8
- import { H as HelperText } from "./components/HelperText/index.be949cdf.js";
9
- import { useDrag, useDrop, DndProvider } from "react-dnd";
10
- import { HTML5Backend } from "react-dnd-html5-backend";
11
- import { generateUtilityClasses, generateUtilityClass, Skeleton, Typography as Typography$1, Accordion as Accordion$1, AccordionSummary, AccordionDetails, styled as styled$1, Avatar as Avatar$1, Link, Box, Breadcrumbs as Breadcrumbs$1, Checkbox, CircularProgress as CircularProgress$1, Badge as Badge$1, LinearProgress as LinearProgress$1, Popover as Popover$1, IconButton as IconButton$1, useTheme, MenuItem, Stack as Stack$1, Tabs as Tabs$1, Tab as Tab$1, Tooltip as Tooltip$1, Autocomplete, Popper, TextField, Chip, FormGroup, FormControlLabel, InputAdornment, RadioGroup, Radio, FormHelperText, Dialog, InputBase, Grid } from "@mui/material";
12
- import { aL as AREAS_VIEWER_CLASS_NAME, aM as AREAS_ADMIN_CLASS_NAME, aN as componentName$2, T as TEST_PROP_ID, aO as COMPONENT_PREFIX$1, aP as componentName$3, aQ as componentName$4, aR as COMPONENT_CLASS_NAME, aS as componentName$5, aT as componentName$6, aU as componentName$7, aV as componentName$8, aW as componentName$9, aX as componentName$a, aY as componentName$b, aZ as componentName$c, a_ as componentName$d, a$ as RHFTAUTOCOMPLET_ROOT_TEST_ID, b0 as componentName$e, b1 as componentName$f, b2 as componentName$g, b3 as RHFTEXTFIELD_ROOT_TEST_ID, b4 as RHFTEXTFIELD_INPUT_TEST_ID, b5 as COMPONENT_CLASS_NAME$1, b6 as DATAGRID_SELECT_COLUMN_KEY, b7 as DATAGRID_ACTIONS_COLUMN_KEY, b8 as componentName$h, b9 as DATAGRID_PREFIX_NAME, ba as componentName$i, bb as componentName$j, bc as componentName$k } from "./components/areas/constants.5387d83e.js";
13
- import { unstable_composeClasses } from "@mui/base";
14
- import clsx from "clsx";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import React__default, { useState, useEffect, useMemo, forwardRef, useCallback, useRef, createElement, createContext, useContext, useImperativeHandle } from "react";
3
+ import { useEnvironment, useModuleDictionary, useModuleSkeleton, getPropertyByString, evaluateWithContext, voidFunction } from "@m4l/core";
4
+ import { S as SelectCellFormatter, D as DataGrid$1 } from "./react-data-grid.c5377916.js";
5
+ import { I as IconButton$1 } from "./components/mui_extended/IconButton/index.87f4726c.js";
6
+ import { styled } from "@mui/material/styles";
7
+ import { a as Table } from "./components/mui_extended/Tab/index.ad88441e.js";
8
+ import { a as Pager } from "./components/mui_extended/Pager/index.46aec921.js";
9
+ import { u as useModal, a as useModalSettings } from "./hooks/useModal/index.9fe41bde.js";
10
+ import { generateUtilityClasses, IconButton, generateUtilityClass, useTheme, MenuItem, Skeleton, Autocomplete, Popper, TextField, Chip, styled as styled$1, Dialog, Checkbox, Box, Grid } from "@mui/material";
11
+ import { P as Popover } from "./components/mui_extended/Popover/index.8e5ac765.js";
12
+ import { I as Icon, a as ArrowIcon } from "./components/Icon/index.2e8ec5a1.js";
15
13
  import { a as ICONS, I as ICONS$1 } from "./components/areas/icons.504ec098.js";
16
- import { g as getComponentUtilityClass, a as useUtilityClasses$a, b as getNameDataTestId, e as getNameAvatarDataTestId, f as getNameBadgeDataTestId, h as getNameDataTestId$2, j as getNameDataTestId$3, k as getNameCommonActionsDataTestId, m as getNameDataTestId$4, n as getNameDataTestId$5, o as getNameRHFDateTimeDataTestId, q as getNameDataTestId$6, r as getNameDataTestId$7, t as useOnClickOutside, v as isActive } from "./utils/index.9ee4c99a.js";
17
- import { b as Pager } from "./components/Page/index.fdf04592.js";
18
- import { u as useModal, a as useModalSettings } from "./hooks/useModal/index.ef54bcf2.js";
14
+ import clsx from "clsx";
15
+ import { unstable_composeClasses } from "@mui/base";
16
+ import { aj as AREAS_VIEWER_CLASS_NAME, ak as AREAS_ADMIN_CLASS_NAME, al as componentName$1, T as TEST_PROP_ID, am as componentName$2, an as RHFTAUTOCOMPLET_ROOT_TEST_ID, ao as COMPONENT_CLASS_NAME, ap as componentName$3, aq as DATAGRID_PREFIX_NAME, ar as componentName$4, as as componentName$5, at as componentName$6 } from "./components/areas/constants.630a4f42.js";
17
+ import { B as Badge } from "./components/mui_extended/Badge/index.3465d7fb.js";
19
18
  import { useResponsiveDesktop, useFormatter, useResponsiveContainerStore } from "@m4l/graphics";
20
- import { b as getAreasDictionary, c as DICCTIONARY, L as LABEL_BOOLEAN_YES, f as LABEL_BOOLEAN_NO, h as LABEL_BOOLEAN_TRUE, i as LABEL_BOOLEAN_FALSE, j as dictionary } from "./components/areas/dictionary.7e74022a.js";
19
+ import { b as getAreasDictionary, c as DICCTIONARY, L as LABEL_BOOLEAN_YES, h as LABEL_BOOLEAN_NO, i as LABEL_BOOLEAN_TRUE, j as LABEL_BOOLEAN_FALSE, k as dictionary } from "./components/areas/dictionary.19b25583.js";
21
20
  import { shallow } from "zustand/shallow";
22
21
  import { a as getNameDataTestId$1 } from "./test/getNameDataTestId.aee44365.js";
23
- import "./components/NavLink/index.4e548cee.js";
22
+ import { g as getComponentUtilityClass, a as getNameDataTestId, b as getNameCommonActionsDataTestId, e as useOnClickOutside, f as isActive } from "./utils/index.0660ee9c.js";
23
+ import "./components/NavLink/index.badec599.js";
24
24
  import "./components/ScrollToTop/index.e06f98f6.js";
25
25
  import "./components/animate/index.b8497385.js";
26
26
  import "./components/animate/MotionContainer/index.3032bd8f.js";
@@ -31,62 +31,80 @@ import "./components/animate/variants/fade.b561c0fc.js";
31
31
  import "./components/animate/variants/bounce.784aaaaa.js";
32
32
  import "./components/animate/variants/container.11f82b76.js";
33
33
  import "./components/animate/variants/transition.bd46b9ce.js";
34
- import { u as useAreasStore } from "./components/areas/hooks/useAreas/index.e24bd74d.js";
34
+ import { u as useAreasStore } from "./components/areas/hooks/useAreas/index.b02d5bdc.js";
35
35
  import * as Yup from "yup";
36
- import { R as RHFormProvider } from "./contexts/RHFormContext/index.dc955a09.js";
37
- import { F as FieldLabel } from "./components/FieldLabel/index.f9cdcc27.js";
38
- import MuiButton from "@mui/material/Button";
36
+ import { R as RHFormProvider } from "./contexts/RHFormContext/index.e942a298.js";
37
+ import { R as RHFTextField } from "./components/hook-form/RHFTextField/index.2ae1f130.js";
38
+ import { B as Button, L as LoadingButton } from "./components/mui_extended/Button/index.a7dc6ef0.js";
39
39
  import { A as ACTIONINTRO_TEST_ID } from "./test/index.6d4b98b9.js";
40
- import { S as ScrollBar } from "./components/ScrollBar/index.adf0eade.js";
40
+ import { T as Typography } from "./components/mui_extended/Typography/index.2a1c68f8.js";
41
+ import { S as ScrollBar } from "./components/ScrollBar/index.9bfcc74f.js";
41
42
  import TouchRipple from "@mui/material/ButtonBase/TouchRipple";
42
- import { L as LinearProgressIndeterminate } from "./components/LinearProgressIndeterminate/index.de9d447c.js";
43
- import { M as MFLoader } from "./components/MFLoader/index.402c1acc.js";
43
+ import { L as LinearProgressIndeterminate, a as LinearProgress } from "./components/mui_extended/LinearProgress/index.52edc848.js";
44
+ import { M as MFLoader } from "./components/MFLoader/index.2038aa6c.js";
44
45
  import { a as WindowToolsMFProvider } from "./components/areas/contexts/WindowToolsMFContext/index.69d95c15.js";
45
46
  import { a as DynamicMFParmsProvider } from "./components/areas/contexts/DynamicMFParmsContext/index.37d1d444.js";
46
- import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "./components/areas/contexts/AreasContext/index.bb316000.js";
47
- import { w as withSizeProvider } from "./components/GridLayout/subcomponents/SizeProvider/index.094bc6b5.js";
48
- import { R as Responsive } from "./components/GridLayout/subcomponents/Responsive/index.b8a2a121.js";
49
- import { Link as Link$1, useLocation } from "react-router-dom";
50
- import { L as LoadingError } from "./components/LoadingError/index.9f00c83c.js";
51
- import { c as cjs } from "./react-draggable.5331add7.js";
52
- import { R as ResizeableWindow } from "./components/Resizeable/index.1f0c1359.js";
47
+ import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "./components/areas/contexts/AreasContext/index.81b748ec.js";
48
+ import { w as withSizeProvider } from "./components/GridLayout/subcomponents/SizeProvider/index.a5b2190d.js";
49
+ import { R as Responsive } from "./components/GridLayout/subcomponents/Responsive/index.3c68f0cb.js";
50
+ import { useLocation } from "react-router-dom";
51
+ import { L as LoadingError } from "./components/LoadingError/index.d137be81.js";
52
+ import { c as cjs } from "./react-draggable.2df3b71a.js";
53
+ import { R as ResizeableWindow } from "./components/Resizeable/index.8c72e36a.js";
53
54
  import "./components/areas/hooks/useDynamicMFParameters/index.03ce6078.js";
54
55
  import { u as useWindowToolsMF } from "./components/areas/hooks/useWindowToolsMF/index.09801b66.js";
55
- import { I as Image } from "./components/Image/index.36a3d440.js";
56
- import debounce from "lodash/debounce";
57
- import { DateTimePicker } from "@mui/x-date-pickers";
58
- import "./components/Period/index.5233694b.js";
59
- import { SketchPicker } from "react-color";
60
- import { LoadingButton as LoadingButton$1 } from "@mui/lab";
61
- import { w as withToggle } from "./hocs/withToggle/index.548aeace.js";
56
+ import { useFormContext, useFormState, Controller } from "react-hook-form";
57
+ import { I as Image } from "./components/Image/index.0d32558e.js";
58
+ import { H as HelperText } from "./components/HelperText/index.651a9b4b.js";
59
+ import { F as FieldLabel } from "./components/FieldLabel/index.400a46e0.js";
60
+ import { C as CircularProgress } from "./components/mui_extended/CircularProgress/index.967e70b7.js";
61
+ import "./components/hook-form/RHFAutocompleteAsync/index.ea3ba7a7.js";
62
+ import "./components/hook-form/RHFDateTime/index.31a0537d.js";
63
+ import "./components/hook-form/RHFMultiCheckbox/index.437e6ba3.js";
64
+ import "./components/hook-form/RHFSelect/index.c6c60ecc.js";
65
+ import "./components/hook-form/RHFPeriod/index.c8868100.js";
66
+ import "./components/hook-form/RHFRadioGroup/index.11c0add8.js";
67
+ import "./components/hook-form/RHFColorPicker/index.25e4e643.js";
68
+ import "./components/hook-form/RHFCheckbox/index.9ac452cc.js";
69
+ import "./components/hook-form/RHFUpload/index.9eeaee0f.js";
70
+ import { A as Accordion } from "./components/mui_extended/Accordion/index.391679d1.js";
71
+ import "./components/mui_extended/Avatar/index.3ba36655.js";
72
+ import "./components/mui_extended/BoxIcon/index.d61e7ac5.js";
73
+ import "./components/mui_extended/Breadcrumbs/index.4a44883c.js";
74
+ import "./components/mui_extended/LinkWithRoute/index.288c51f3.js";
75
+ import "./components/mui_extended/CheckBox/index.c5c8721c.js";
76
+ import { S as Stack } from "./components/mui_extended/Stack/index.fe363ca5.js";
77
+ import "./components/mui_extended/Tooltip/index.49bb5ee1.js";
78
+ import "./components/mui_extended/ToggleButton/index.38ca2330.js";
79
+ import "./components/mui_extended/ToggleIconButton/index.7fbece74.js";
62
80
  import { W as WrapperComponent } from "./components/WrapperComponent/index.57964195.js";
63
- import "./components/DynamicFilter/index.d9168c12.js";
64
- import { W as WindowConfirm } from "./components/modal/WindowConfirm.e35da619.js";
65
- import "./components/DragResizeWindow/index.46b380e1.js";
66
- import "./components/GridLayout/index.bb3b7769.js";
67
- import "./components/PrintingSystem/index.fb176a93.js";
68
- import "./components/LanguagePopover/index.e6fa2336.js";
81
+ import "./components/Period/index.3d695534.js";
82
+ import "./components/DynamicFilter/index.05e15fb8.js";
83
+ import { W as WindowConfirm } from "./components/modal/WindowConfirm.1a123368.js";
84
+ import "./components/DragResizeWindow/index.5e316291.js";
85
+ import "./components/GridLayout/index.7156fbc9.js";
86
+ import "./components/PrintingSystem/index.89493ad6.js";
69
87
  import "./components/Loadable/index.e83cdb4e.js";
70
- import "./components/maps/index.8ec46ce4.js";
71
- import "./components/maps/components/GpsTools/index.75880ce0.js";
72
- import "./components/ModalDialog/index.ea9189c3.js";
73
- import "./components/modal/WindowBase.a3ac7adc.js";
74
- import "./components/NoItemSelected/index.418c8316.js";
75
- import "./components/ObjectLogs/index.bfa7dad3.js";
76
- import "./components/PaperForm/index.8121e3da.js";
77
- import "./components/PDFViewer/index.bb2eca5a.js";
78
- import "./components/PropertyValue/index.9572c347.js";
79
- import "./components/SplitLayout/index.74091a81.js";
80
- import "./components/ToastContainer/index.f9b507b9.js";
81
- import "./components/SideBar/index.629ba840.js";
82
- import "./components/AppBar/index.fc126a22.js";
83
- import "./components/AccountPopover/index.efc74d5c.js";
84
- import "./components/popups/PopupsProvider/index.18669fb4.js";
85
- import "./components/popups/PopupsViewer/index.ba354267.js";
86
- import "./components/HamburgerMenu/index.5997af31.js";
87
- import "./contexts/ModalContext/index.cf02e6bd.js";
88
- import "./hooks/useFormAddEdit/index.f156a2cd.js";
89
- import "./hooks/useTab/index.bce8b99e.js";
88
+ import "./components/maps/index.ba1ccfad.js";
89
+ import "./components/maps/components/GpsTools/index.ef751d28.js";
90
+ import "./components/ModalDialog/index.85d30f10.js";
91
+ import "./components/modal/WindowBase.c1e879e4.js";
92
+ import "./components/NoItemSelected/index.008154ce.js";
93
+ import "./components/ObjectLogs/index.65a6b1bc.js";
94
+ import "./components/PaperForm/index.e04f9f1f.js";
95
+ import "./components/PDFViewer/index.9677b02a.js";
96
+ import "./components/Page/index.7482cf60.js";
97
+ import "./components/PropertyValue/index.e31d4282.js";
98
+ import "./components/SplitLayout/index.aed78a1f.js";
99
+ import "./components/ToastContainer/index.586b1194.js";
100
+ import "./components/SideBar/index.004a2de1.js";
101
+ import "./components/AppBar/index.1499770b.js";
102
+ import "./components/AccountPopover/index.ec031003.js";
103
+ import "./components/popups/PopupsProvider/index.3b43e55f.js";
104
+ import "./components/popups/PopupsViewer/index.fb3f0c48.js";
105
+ import "./components/HamburgerMenu/index.d57bca4c.js";
106
+ import "./contexts/ModalContext/index.82f61407.js";
107
+ import "./hooks/useFormAddEdit/index.fa430551.js";
90
108
  const areasViewerClasses = generateUtilityClasses(
91
109
  AREAS_VIEWER_CLASS_NAME,
92
110
  [
@@ -243,2237 +261,491 @@ const useAreasAdminUtilityClasses = (ownerState) => {
243
261
  };
244
262
  return unstable_composeClasses(slots, getComponentUtilityClass(AREAS_ADMIN_CLASS_NAME), {});
245
263
  };
246
- generateUtilityClasses(componentName$2, [
264
+ styled(IconButton)(() => ({}));
265
+ const LabelMemuItem = styled("div")(({ theme }) => ({
266
+ height: "22px",
267
+ overflow: "hidden",
268
+ wordBreak: "break-all",
269
+ marginLeft: theme.spacing(1.5),
270
+ display: "flex",
271
+ alignItems: "center"
272
+ }));
273
+ generateUtilityClasses(componentName$1, [
247
274
  "root",
248
- "endIcon",
249
- "labelIcon",
250
- "label",
251
- "content"
275
+ "itemDelete"
252
276
  ]);
253
- function getAccordionUtilityClass(slot) {
254
- return generateUtilityClass(componentName$2, slot);
277
+ function getMenuActionsUtilityClass(slot) {
278
+ return generateUtilityClass(componentName$1, slot);
255
279
  }
256
- const accordionUtilityClasses = () => {
280
+ const useMenuActionsUtilityClasses = () => {
257
281
  const slots = {
258
282
  root: ["root"],
259
- endIcon: ["endIcon"],
260
- labelIcon: ["labelIcon"],
261
- label: ["label"],
262
- content: ["content"]
283
+ itemDelete: ["itemDelete"]
263
284
  };
264
- const composedClasses = unstable_composeClasses(slots, getAccordionUtilityClass, {});
285
+ const composedClasses = unstable_composeClasses(slots, getMenuActionsUtilityClass, {});
265
286
  return {
266
287
  ...composedClasses
267
288
  };
268
289
  };
269
- styled("div")(({ theme }) => ({
270
- display: "flex",
271
- justifyContent: "space-between",
272
- alignItems: "center",
273
- borderRadius: theme.spacing(0.5),
274
- height: theme.spacing(4.5),
275
- minHeight: theme.spacing(4.5),
276
- backgroundColor: theme.vars.palette.background.header,
277
- paddingLeft: theme.spacing(2),
278
- paddingRight: theme.spacing(2),
279
- marginBottom: "0px"
280
- }));
281
- styled("div")(({ theme }) => ({
282
- display: "flex",
283
- justifyContent: "flex-start",
284
- alignItems: "center",
285
- gap: theme.spacing(2)
286
- }));
287
- const AccordionRoot = styled("div")(({ theme }) => ({
288
- ...theme.components?.M4LAccordion?.styleOverrides
289
- }));
290
- const WarpperTypography = styled("div")(({ theme }) => ({
291
- ...theme.components?.M4LTypography?.styleOverrides
292
- }));
293
- const SkeletonTypography = (props) => {
294
- const { skeletonWidth, skeletongHeight } = props;
295
- return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletongHeight });
296
- };
297
- function Typography(props) {
290
+ function MenuActions(props) {
298
291
  const {
299
- skeletonWidth = "100%",
300
- skeletongHeight = "18px",
301
- variant = "body",
292
+ menuActions,
293
+ endListElement,
294
+ menuActionSx,
302
295
  className,
296
+ iconButtonClassName = "",
297
+ objItem = {},
298
+ urlIcon,
299
+ toolTip = "",
300
+ marginTop = -1,
301
+ marginBottom,
302
+ marginLeft,
303
+ marginRight,
304
+ width = 200,
305
+ withBadge = false,
306
+ badgeContent,
307
+ arrowType = "right-top",
308
+ externalOpen = null,
309
+ externalClose,
303
310
  ...other
304
311
  } = props;
305
- const isSkeleton = useModuleSkeleton();
306
- const classes2 = useUtilityClasses$a();
307
- return /* @__PURE__ */ jsx(
308
- WarpperTypography,
309
- {
310
- className: clsx(classes2.root, className),
311
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
312
- children: !isSkeleton ? /* @__PURE__ */ jsx(Typography$1, { ...other, variant }) : /* @__PURE__ */ jsx(SkeletonTypography, { skeletonWidth, skeletongHeight })
313
- }
314
- );
315
- }
316
- function Accordion(props) {
317
- const {
318
- label,
319
- SKTWidht,
320
- SKTHeight,
321
- children,
322
- accordionProps,
323
- summaryProps,
324
- labelIcon,
325
- className,
326
- dataTestId = ""
327
- } = props;
328
312
  const { host_static_assets, environment_assets } = useEnvironment();
329
- const classes2 = accordionUtilityClasses();
330
- return /* @__PURE__ */ jsx(
331
- AccordionRoot,
332
- {
333
- className: clsx(classes2.root, className),
334
- ...process.env.NODE_ENV !== "production" ? {
335
- [TEST_PROP_ID]: getNameDataTestId$1(
336
- COMPONENT_PREFIX$1,
337
- "root",
338
- dataTestId
339
- )
340
- } : {},
341
- children: /* @__PURE__ */ jsxs(
342
- Accordion$1,
343
- {
344
- variant: "outlined",
345
- square: true,
346
- TransitionProps: { unmountOnExit: true },
347
- defaultExpanded: true,
348
- ...accordionProps,
349
- children: [
350
- /* @__PURE__ */ jsx(
351
- AccordionSummary,
352
- {
353
- "aria-controls": "expanded-content",
354
- disableTouchRipple: false,
355
- expandIcon: /* @__PURE__ */ jsx(
356
- IconButton,
357
- {
358
- "aria-label": "settings",
359
- src: `${host_static_assets}/${environment_assets}/frontend/components/accordion/assets/icons/expanded.svg`,
360
- className: classes2.endIcon
361
- }
362
- ),
363
- ...summaryProps,
364
- children: /* @__PURE__ */ jsxs(
365
- "div",
366
- {
367
- className: classes2.labelIcon,
368
- ...process.env.NODE_ENV !== "production" ? {
369
- [TEST_PROP_ID]: getNameDataTestId$1(
370
- COMPONENT_PREFIX$1,
371
- "labelIcon",
372
- dataTestId
373
- )
374
- } : {},
375
- children: [
376
- labelIcon && /* @__PURE__ */ jsx(Icon, { src: labelIcon }),
377
- /* @__PURE__ */ jsx(
378
- Typography,
379
- {
380
- className: classes2.label,
381
- variant: "subtitle",
382
- skeletonWidth: SKTWidht,
383
- skeletongHeight: SKTHeight,
384
- children: label
385
- }
386
- )
387
- ]
388
- }
389
- )
390
- }
391
- ),
392
- /* @__PURE__ */ jsx(AccordionDetails, { className: classes2.content, children })
393
- ]
394
- }
395
- )
396
- }
397
- );
398
- }
399
- const SkeletonAvatar = (props) => {
400
- const { className } = props;
401
- return /* @__PURE__ */ jsx(
402
- Skeleton,
403
- {
404
- variant: "circular",
405
- width: "32px",
406
- height: "32px",
407
- className,
408
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameAvatarDataTestId("skeleton") } : {}
313
+ const { getLabel } = useModuleDictionary();
314
+ const [open, setOpen] = useState(null);
315
+ const handleOpen = (event) => {
316
+ setOpen(event.currentTarget);
317
+ };
318
+ const theme = useTheme();
319
+ const classes = useMenuActionsUtilityClasses();
320
+ useEffect(() => {
321
+ let mounted = true;
322
+ if (mounted) {
323
+ setOpen(externalOpen);
409
324
  }
410
- );
411
- };
412
- generateUtilityClasses(componentName$3, [
413
- "root",
414
- "skeleton"
415
- ]);
416
- function getAvatarUtilityClass(slot) {
417
- return generateUtilityClass(componentName$3, slot);
418
- }
419
- const useAvatarUtilityClasses = () => {
420
- const slots = {
421
- root: ["root"],
422
- skeleton: ["skeleton"]
325
+ return function cleanUp() {
326
+ mounted = false;
327
+ };
328
+ }, [externalOpen]);
329
+ const urlFinalIcon = useMemo(() => {
330
+ if (urlIcon)
331
+ return urlIcon;
332
+ return `${host_static_assets}/${environment_assets}/frontend/components/menu_actions/assets/icons/${ICONS.MENU}`;
333
+ }, [urlIcon, host_static_assets, environment_assets]);
334
+ const handleClose = (e) => {
335
+ e.stopPropagation();
336
+ setOpen(null);
337
+ externalClose && externalClose(null);
423
338
  };
424
- const composedClasses = unstable_composeClasses(slots, getAvatarUtilityClass, {});
425
- return {
426
- ...composedClasses
339
+ const handleClick = (e, menuAction) => {
340
+ e.stopPropagation();
341
+ setOpen(null);
342
+ menuAction.onClick();
427
343
  };
428
- };
429
- const AvatarRoot = styled$1("div")(({ theme }) => ({
430
- ...theme.components?.M4LAvatar?.styleOverrides
431
- }));
432
- const Avatar = forwardRef(
433
- ({ color = "default", sx, className, ...other }, ref) => {
434
- const isSkeleton = useModuleSkeleton();
435
- const classes2 = useAvatarUtilityClasses();
436
- return /* @__PURE__ */ jsx(
437
- AvatarRoot,
438
- {
439
- className: clsx(classes2.root, className),
440
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameAvatarDataTestId("root") } : {},
441
- children: !isSkeleton ? /* @__PURE__ */ jsx(Avatar$1, { ref, ...other }) : /* @__PURE__ */ jsx(SkeletonAvatar, { className: classes2.skeleton })
442
- }
443
- );
444
- }
445
- );
446
- Avatar.displayName = "Avatar";
447
- function LinkItem({ link }) {
448
- const { href, name, icon, dictionaryField: dictionaryDescription } = link;
449
- const { getLabel } = useModuleDictionary();
450
- return /* @__PURE__ */ jsxs(
451
- Link,
344
+ const finalActions = useMemo(() => {
345
+ let ret;
346
+ if (typeof menuActions !== "function") {
347
+ ret = menuActions;
348
+ } else {
349
+ ret = menuActions(objItem);
350
+ }
351
+ return ret;
352
+ }, [menuActions, objItem]);
353
+ const IconButtonElement = /* @__PURE__ */ jsx(Fragment, { children: withBadge ? /* @__PURE__ */ jsx(Badge, { badgeContent, children: /* @__PURE__ */ jsx(
354
+ IconButton$1,
452
355
  {
453
- variant: "body2",
454
- component: Link$1,
455
- to: href || "#",
456
- sx: {
457
- lineHeight: 2,
458
- display: "flex",
459
- alignItems: "center",
460
- color: "text.primary",
461
- "& > div": { display: "inherit" }
462
- },
463
- children: [
464
- icon && /* @__PURE__ */ jsx(Box, { sx: { mr: 1, "& svg": { width: 20, height: 20 } }, children: icon }),
465
- dictionaryDescription !== void 0 && getLabel ? getLabel(dictionaryDescription) : name
466
- ]
467
- },
468
- name
469
- );
470
- }
471
- function Breadcrumbs(props) {
472
- const { links, activeLast = false, ...other } = props;
473
- const { getLabel } = useModuleDictionary();
474
- const currentLink = useMemo(() => {
475
- if (links.length === 0)
476
- return "";
477
- const { dictionaryField } = links[links.length - 1];
478
- return getLabel(dictionaryField);
479
- }, [getLabel, links]);
480
- const listDefault = useMemo(
481
- () => links.map((link) => /* @__PURE__ */ jsx(LinkItem, { link }, link.name)),
482
- [links]
483
- );
484
- const listActiveLast = useMemo(
485
- () => links.map(
486
- (link) => link.name !== currentLink ? /* @__PURE__ */ jsx(LinkItem, { link }, link.name) : /* @__PURE__ */ jsx(
487
- Typography$1,
488
- {
489
- variant: "body2",
490
- sx: {
491
- maxWidth: 260,
492
- overflow: "hidden",
493
- whiteSpace: "nowrap",
494
- color: "text.disabled",
495
- textOverflow: "ellipsis"
496
- },
497
- children: currentLink
498
- },
499
- link.name
500
- )
501
- ),
502
- [currentLink, links]
503
- );
504
- return /* @__PURE__ */ jsx(
505
- Breadcrumbs$1,
356
+ src: urlFinalIcon,
357
+ onClick: handleOpen,
358
+ tooltip: toolTip,
359
+ className: iconButtonClassName
360
+ }
361
+ ) }) : /* @__PURE__ */ jsx(
362
+ IconButton$1,
506
363
  {
507
- id: "MUIBreadcrumbs",
508
- separator: /* @__PURE__ */ jsx(
509
- Box,
510
- {
511
- component: "span",
512
- sx: {
513
- width: 4,
514
- height: 4,
515
- mx: 0.5,
516
- borderRadius: "50%",
517
- bgcolor: "text.disabled"
518
- }
519
- }
520
- ),
521
- ...other,
522
- children: activeLast ? listDefault : listActiveLast
364
+ src: urlFinalIcon,
365
+ onClick: handleOpen,
366
+ tooltip: toolTip,
367
+ className: iconButtonClassName
523
368
  }
524
- );
369
+ ) });
370
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
371
+ IconButtonElement,
372
+ /* @__PURE__ */ jsxs(
373
+ Popover,
374
+ {
375
+ id: "Popover",
376
+ open: Boolean(open),
377
+ anchorEl: open,
378
+ onClose: handleClose,
379
+ arrowType,
380
+ className: clsx(classes.root, className),
381
+ sx: {
382
+ marginTop,
383
+ marginBottom,
384
+ marginLeft,
385
+ marginRight,
386
+ width,
387
+ maxWidth: 300,
388
+ "& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
389
+ ...theme.components?.M4LMenuActions?.styleOverrides,
390
+ ...menuActionSx
391
+ },
392
+ ...other,
393
+ children: [
394
+ finalActions.map((menuAction, index) => /* @__PURE__ */ jsxs(
395
+ MenuItem,
396
+ {
397
+ dense: true,
398
+ onClick: (e) => {
399
+ handleClick(e, menuAction);
400
+ },
401
+ sx: { color: menuAction.color ?? "text.main" },
402
+ disabled: menuAction.disabled,
403
+ className: clsx(
404
+ menuAction?.className,
405
+ menuAction.variant === "delete" && classes.itemDelete
406
+ ),
407
+ children: [
408
+ menuAction.urlIcon ? /* @__PURE__ */ jsx(Icon, { src: menuAction.urlIcon }) : null,
409
+ /* @__PURE__ */ jsx(LabelMemuItem, { children: menuAction.label || menuAction.dictionaryId && getLabel(menuAction.dictionaryId) })
410
+ ]
411
+ },
412
+ `menu_action_${index}`
413
+ )),
414
+ endListElement ? endListElement : null
415
+ ]
416
+ }
417
+ )
418
+ ] });
525
419
  }
526
- const ButtonRoot = styled("div")(({ theme }) => ({
527
- ...theme.components?.M4LButton?.styleOverrides
420
+ const MemonizedMenuActions = React__default.memo(MenuActions);
421
+ const AutocompleteRoot = styled("div")(({ theme }) => ({
422
+ ...theme.components?.M4LRHFAutocomplete?.styleOverrides
528
423
  }));
529
- styled(Skeleton)(({ theme }) => ({
530
- borderRadius: theme.spacing(0.5)
424
+ const WrapperOption = styled("li")(({ theme }) => ({
425
+ "& .m4l_image": {
426
+ marginRight: theme.spacing(1.5)
427
+ }
531
428
  }));
532
- const buttonClasses = generateUtilityClasses(componentName$4, [
533
- "root",
534
- "skeleton",
535
- "sizeSmall",
536
- "sizeMedium",
537
- "variantOutlined",
538
- "variantContained",
539
- "variantText",
540
- "isDisabled",
541
- "colorError",
542
- "colorSuccess",
543
- "colorWarning",
544
- "togglePressed",
545
- "toggleNotPressed"
546
- ]);
547
- function getButtonUtilityClass(slot) {
548
- return generateUtilityClass(componentName$4, slot);
549
- }
550
- const useUtilityClasses$9 = (onwerState) => {
551
- const slots = {
552
- root: [
553
- "root",
554
- onwerState.size === "small" && "sizeSmall",
555
- onwerState.size === "medium" && "sizeMedium",
556
- onwerState.variant === "outlined" && "variantOutlined",
557
- onwerState.variant === "contained" && "variantContained",
558
- onwerState.variant === "text" && "variantText",
559
- onwerState.isDisabled && "isDisabled",
560
- onwerState.colorState === "error" && "colorError",
561
- onwerState.colorState === "success" && "colorSuccess",
562
- onwerState.colorState === "warning" && "colorWarning"
563
- ],
564
- skeleton: ["skeleton"]
565
- };
566
- const composedClasses = unstable_composeClasses(slots, getButtonUtilityClass, {});
567
- return {
568
- ...composedClasses
569
- };
570
- };
571
- const Button = (props) => {
572
- const {
573
- size = "small",
574
- variant = "contained",
575
- className,
576
- disabled,
577
- skeletonWidth = "100px",
578
- skeletonHeight = "28px",
579
- colorState,
580
- ...others
581
- } = props;
582
- const isSkeleton = useModuleSkeleton();
583
- const ownerState = {
584
- size,
585
- variant,
586
- isDisabled: disabled,
587
- colorState
429
+ function withRenderOption(getUrlImage, classes, imageWidth) {
430
+ return function RenderOption(optionProps, option) {
431
+ return /* @__PURE__ */ jsxs(
432
+ WrapperOption,
433
+ {
434
+ ...optionProps,
435
+ className: classes.withImage,
436
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("withImage") } : {},
437
+ children: [
438
+ /* @__PURE__ */ jsx(Image, { src: getUrlImage(option), width: imageWidth, height: "100%" }),
439
+ /* @__PURE__ */ jsx(Typography, { variant: "body", children: optionProps.key })
440
+ ]
441
+ }
442
+ );
588
443
  };
589
- const classes2 = useUtilityClasses$9(ownerState);
590
- return /* @__PURE__ */ jsx(ButtonRoot, { className: clsx(classes2.root, className), "data-testid": "ButtonRoot", children: !isSkeleton ? /* @__PURE__ */ jsx(MuiButton, { ...others, variant, size, disableRipple: true, disabled }) : /* @__PURE__ */ jsx(
591
- Skeleton,
592
- {
593
- className: classes2.skeleton,
594
- "data-testid": "MuiSkeleton",
595
- variant: "rectangular",
596
- width: skeletonWidth
597
- }
598
- ) });
599
- };
600
- generateUtilityClasses(COMPONENT_CLASS_NAME, [
601
- "root",
602
- "skeleton",
603
- "small",
604
- "medium",
605
- "stateDisabled"
606
- ]);
607
- function getRHFCheckboxUtilityClass$2(slot) {
608
- return generateUtilityClass(COMPONENT_CLASS_NAME, slot);
609
444
  }
610
- const useUtilityClasses$8 = (ownerState) => {
611
- const slots = {
612
- root: [
613
- "root",
614
- ownerState.size === "small" && "small",
615
- ownerState.size === "medium" && "medium",
616
- ownerState.disabled && "stateDisabled"
617
- ],
618
- skeleton: ["skeleton"]
619
- };
620
- const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass$2, {});
621
- return {
622
- ...composedClasses
623
- };
624
- };
625
- const SkeletonCheckBox = (props) => {
626
- const { classes: classes2 } = props;
627
- return /* @__PURE__ */ jsx("div", { className: classes2.skeleton, children: /* @__PURE__ */ jsx(Skeleton, { variant: "rounded", width: "18px", height: "18px" }) });
628
- };
629
- const CheckBoxRoot = styled$1("div")(({ theme }) => ({
630
- ...theme.components?.M4LCheckBox?.styleOverrides
631
- }));
632
- const CheckBox = forwardRef((props, ref) => {
633
- const {
634
- className,
635
- size = "small",
636
- disabled,
637
- label,
638
- mandatory,
639
- mandatoryMessage,
640
- helperMessage,
641
- htmlFor
642
- } = props;
643
- const isDesktop = useResponsiveDesktop();
644
- const isSkeleton = useModuleSkeleton();
645
- const ownerState = {
646
- size: !isDesktop ? "medium" : size,
647
- disabled
648
- };
649
- const classes2 = useUtilityClasses$8(ownerState);
650
- return /* @__PURE__ */ jsxs(CheckBoxRoot, { className: clsx(classes2.root, className), ref, children: [
651
- !isSkeleton ? /* @__PURE__ */ jsx(Checkbox, { id: htmlFor, ...props }) : /* @__PURE__ */ jsx(SkeletonCheckBox, { classes: classes2 }),
652
- label && /* @__PURE__ */ jsx(
653
- FieldLabel,
445
+ const SkeletonRHFAutocomplete = (props) => {
446
+ const { withImage, classes, hasLabel } = props;
447
+ return /* @__PURE__ */ jsxs("div", { className: classes.skeletonRoot, children: [
448
+ (hasLabel || hasLabel?.length === 0) && /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "30%", height: "16px" }),
449
+ /* @__PURE__ */ jsx(
450
+ "div",
654
451
  {
655
- label,
656
- mandatory,
657
- mandatoryMessage,
658
- helperMessage,
659
- htmlFor
452
+ className: classes.skeleton,
453
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("skeleton") } : {},
454
+ children: !withImage ? /* @__PURE__ */ jsxs(Fragment, { children: [
455
+ /* @__PURE__ */ jsx("div", { className: classes.skeletonContainerText, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "50%", height: "14px" }) }),
456
+ /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: 16, height: 16, sx: { minWidth: "16px" } })
457
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
458
+ /* @__PURE__ */ jsx(Skeleton, { variant: "circular" }),
459
+ /* @__PURE__ */ jsx("div", { className: classes.skeletonContainerText, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "50%", height: "14px" }) }),
460
+ /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: 16, height: 16, sx: { minWidth: "16px" } })
461
+ ] })
660
462
  }
661
463
  )
662
464
  ] });
663
- });
664
- const CircularProgress = (props) => {
665
- return /* @__PURE__ */ jsx(CircularProgress$1, { ...props });
666
- };
667
- const badgeClasses = generateUtilityClasses(componentName$5, [
668
- "root"
669
- ]);
670
- const BadgeRoot = styled("div")(({ theme }) => ({
671
- display: "flex",
672
- ...theme.components?.M4LBadge?.styleOverrides
673
- }));
674
- const Badge = (props) => {
675
- const { children, dataTestId = "", ...others } = props;
676
- return /* @__PURE__ */ jsx(
677
- BadgeRoot,
678
- {
679
- className: badgeClasses.root,
680
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameBadgeDataTestId("root", dataTestId) } : {},
681
- children: /* @__PURE__ */ jsx(Badge$1, { ...others, children })
682
- }
683
- );
684
- };
685
- const LinearProgress = (props) => {
686
- const { ...other } = props;
687
- return /* @__PURE__ */ jsx(LinearProgress$1, { ...other });
688
- };
689
- const LinkWithRoute = (props) => {
690
- const { to, children, skeletonWidth = "100%", skeletonHeight = "14px", ...other } = props;
691
- const isSkeleton = useModuleSkeleton();
692
- if (isSkeleton) {
693
- return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletonHeight });
694
- }
695
- return /* @__PURE__ */ jsx(Link, { component: Link$1, to, ...other, children });
696
465
  };
466
+ const componentName = "M4LRHFAutocomplete";
697
467
  generateUtilityClasses(
698
- componentName$6,
468
+ componentName,
699
469
  [
700
470
  "root",
471
+ "withImage",
701
472
  "skeleton",
473
+ "label",
474
+ "popper",
475
+ "skeletonRoot",
476
+ "skeletonContainerText",
477
+ "iconDown",
478
+ "variantInfo",
479
+ "variantImage",
480
+ "isDisabled",
481
+ "imageWidthDefined",
482
+ "variantSuccess",
483
+ "variantWarning",
484
+ "variantError",
702
485
  "sizeSmall",
703
486
  "sizeMedium",
704
- "variantOutlined",
705
- "variantContained",
706
- "variantText",
707
- "isDisabled"
487
+ "isFocus",
488
+ "isTabSelected",
489
+ "chip"
708
490
  ]
709
491
  );
710
- function getLoadingButtonUtilityClass(slot) {
711
- return generateUtilityClass(componentName$6, slot);
492
+ function getRHFAutocompleteClassesUtilityClass(slot) {
493
+ return generateUtilityClass(componentName, slot);
712
494
  }
713
- const useUtilityClasses$7 = (onwerState) => {
495
+ const useUtilityClasses = (ownerState) => {
714
496
  const slots = {
715
497
  root: [
716
498
  "root",
717
- onwerState.size === "small" && "sizeSmall",
718
- onwerState.size === "medium" && "sizeMedium",
719
- onwerState.variant === "outlined" && "variantOutlined",
720
- onwerState.variant === "contained" && "variantContained",
721
- onwerState.variant === "text" && "variantText",
722
- onwerState.isDisabled && "isDisabled"
499
+ ownerState.size === "small" && "sizeSmall",
500
+ ownerState.size === "medium" && "sizeMedium",
501
+ ownerState.isFocus && "isFocus",
502
+ ownerState.isTabSelected && "isTabSelected",
503
+ ownerState.disabled && "isDisabled",
504
+ ownerState.semantics === "info" && "variantInfo",
505
+ ownerState.semantics === "success" && "variantSuccess",
506
+ ownerState.semantics === "warning" && "variantWarning",
507
+ ownerState.semantics === "error" && "variantError",
508
+ ownerState.imageWidthDefined && "imageWidthDefined",
509
+ ownerState.multiple && "multiple"
510
+ ],
511
+ withImage: ["withImage"],
512
+ skeleton: ["skeleton"],
513
+ label: ["label"],
514
+ popper: [
515
+ "popper",
516
+ ownerState.size === "small" && "sizeSmall",
517
+ ownerState.size === "medium" && "sizeMedium",
518
+ ownerState.imageWidthDefined && "imageWidthDefined"
723
519
  ],
724
- skeleton: ["skeleton"]
520
+ skeletonRoot: ["skeletonRoot"],
521
+ skeletonContainerText: ["SkeletonContainerText"],
522
+ iconDown: ["iconDown"],
523
+ chip: [
524
+ "chip",
525
+ ownerState.size === "small" && "sizeSmall",
526
+ ownerState.size === "medium" && "sizeMedium"
527
+ ]
725
528
  };
726
- const composedClasses = unstable_composeClasses(slots, getLoadingButtonUtilityClass, {});
529
+ const composedClasses = unstable_composeClasses(slots, getRHFAutocompleteClassesUtilityClass, {});
727
530
  return {
728
531
  ...composedClasses
729
532
  };
730
533
  };
731
- const LoadingButtonRoot = styled$1("div")(({ theme }) => ({
732
- ...theme.components?.M4LLoadingButton?.styleOverrides
733
- }));
734
- const LoadingButton = (props) => {
735
- const {
736
- children,
737
- skeletonWidth = "100%",
738
- size = "small",
739
- variant = "contained",
740
- disabled,
741
- className,
742
- ...other
743
- } = props;
744
- const isSkeleton = useModuleSkeleton();
745
- const ownerState = {
746
- size,
747
- variant,
748
- isDisabled: disabled
534
+ generateUtilityClasses(
535
+ componentName$2,
536
+ [
537
+ "root",
538
+ "skeleton",
539
+ "actionCancel",
540
+ "actionFormCancel",
541
+ "actionFormIntro",
542
+ "actionIntro",
543
+ "wrapperActions"
544
+ ]
545
+ );
546
+ const useCommonActionsUtilityClasses = () => {
547
+ const slots = {
548
+ root: ["root"],
549
+ skeleton: ["skeleton"],
550
+ actionCancel: ["actionCancel"],
551
+ actionFormCancel: ["actionFormCancel"],
552
+ actionFormIntro: ["actionFormIntro"],
553
+ actionIntro: ["actionIntro"],
554
+ wrapperActions: ["wrapperActions"]
749
555
  };
750
- const classes2 = useUtilityClasses$7(ownerState);
556
+ return unstable_composeClasses(slots, getComponentUtilityClass(componentName$2), {});
557
+ };
558
+ const WrapperStandarActions = styled("div")(({ theme }) => ({
559
+ ...theme.components?.M4LCommonActions?.styleOverrides
560
+ }));
561
+ const Actions$1 = forwardRef(function ActionsForwarded(props, ref) {
562
+ const { children, ...restProps } = props;
563
+ const classes = useCommonActionsUtilityClasses();
751
564
  return /* @__PURE__ */ jsx(
752
- LoadingButtonRoot,
565
+ WrapperStandarActions,
753
566
  {
754
- className: clsx(classes2.root, className),
755
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$2("root") } : {},
756
- children: !isSkeleton ? /* @__PURE__ */ jsx(LoadingButton$1, { ...other, variant, size, children: /* @__PURE__ */ jsx(Typography, { variant: "action", children }) }) : /* @__PURE__ */ jsx(
757
- Skeleton,
758
- {
759
- className: classes2.skeleton,
760
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$2("skeleton") } : {},
761
- variant: "rectangular",
762
- width: skeletonWidth
763
- }
764
- )
567
+ ...restProps,
568
+ ref,
569
+ className: clsx(classes.root, restProps?.className),
570
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameCommonActionsDataTestId("root") } : {},
571
+ children
765
572
  }
766
573
  );
574
+ });
575
+ const ActionCancel = (props) => {
576
+ const { getLabel } = useModuleDictionary();
577
+ const classes = useCommonActionsUtilityClasses();
578
+ return /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "inherit", ...props, className: classes.actionCancel, children: getLabel("common_actions.cancel") });
767
579
  };
768
- const PopoverRoot = styled(Popover$1)(({ theme }) => ({
769
- ...theme.components?.M4LPopover?.styleOverrides
770
- }));
771
- generateUtilityClasses("M4LPopover", [
772
- "root",
773
- "arrowStyle",
774
- "noArrow",
775
- "topLeft",
776
- "topCenter",
777
- "topRight",
778
- "bottomLeft",
779
- "bottomCenter",
780
- "bottomRight",
781
- "leftTop",
782
- "leftCenter",
783
- "leftBottom",
784
- "rightTop",
785
- "rightCenter",
786
- "rightBottom"
787
- ]);
788
- function getPopoverClassesUtilityClass(slot) {
789
- return generateUtilityClass("M4LPopover", slot);
790
- }
791
- const useUtilityClasses$6 = (ownerState) => {
792
- const slots = {
793
- root: ["root"],
794
- arrowStyle: [
795
- "arrowStyle",
796
- ownerState.arrowType === "top-left" && "topLeft",
797
- ownerState.arrowType === "top-center" && "topCenter",
798
- ownerState.arrowType === "top-right" && "topRight",
799
- ownerState.arrowType === "bottom-left" && "bottomLeft",
800
- ownerState.arrowType === "bottom-center" && "bottomCenter",
801
- ownerState.arrowType === "bottom-right" && "bottomRight",
802
- ownerState.arrowType === "left-top" && "leftTop",
803
- ownerState.arrowType === "left-center" && "leftCenter",
804
- ownerState.arrowType === "left-bottom" && "leftBottom",
805
- ownerState.arrowType === "right-top" && "rightTop",
806
- ownerState.arrowType === "right-center" && "rightCenter",
807
- ownerState.arrowType === "right-bottom" && "rightBottom"
808
- ]
809
- };
810
- const composedClasses = unstable_composeClasses(slots, getPopoverClassesUtilityClass, {});
811
- return {
812
- ...composedClasses
813
- };
814
- };
815
- const Popover = (props) => {
816
- const { children, arrowType = "top-right", className, ...other } = props;
817
- const ownerState = {
818
- arrowType
819
- };
820
- const classes2 = useUtilityClasses$6(ownerState);
821
- return /* @__PURE__ */ jsxs(
822
- PopoverRoot,
580
+ const ActionIntro = (props) => {
581
+ const { getLabel } = useModuleDictionary();
582
+ const classes = useCommonActionsUtilityClasses();
583
+ return /* @__PURE__ */ jsx(
584
+ Button,
823
585
  {
824
- className: clsx(classes2.root, className),
825
- "data-testid": "PopoverRoot",
826
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
827
- transformOrigin: { vertical: "top", horizontal: "right" },
828
- transitionDuration: 0,
829
- PaperProps: {
830
- sx: {
831
- p: 1,
832
- overflow: "inherit"
833
- }
834
- },
835
- ...other,
836
- children: [
837
- /* @__PURE__ */ jsx(
838
- ArrowStyle,
839
- {
840
- className: classes2.arrowStyle,
841
- "data-testid": "ArrowStyle",
842
- arrowType
843
- }
844
- ),
845
- children
846
- ]
586
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: ACTIONINTRO_TEST_ID } : {},
587
+ variant: "contained",
588
+ type: "submit",
589
+ color: "primary",
590
+ className: classes.actionIntro,
591
+ ...props,
592
+ children: getLabel("common_actions.intro")
847
593
  }
848
594
  );
849
595
  };
850
- styled(IconButton$1)(() => ({}));
851
- const LabelMemuItem = styled("div")(({ theme }) => ({
852
- height: "22px",
853
- overflow: "hidden",
854
- wordBreak: "break-all",
855
- marginLeft: theme.spacing(1.5),
856
- display: "flex",
857
- alignItems: "center"
858
- }));
859
- generateUtilityClasses(componentName$7, [
860
- "root",
861
- "itemDelete"
862
- ]);
863
- function getMenuActionsUtilityClass(slot) {
864
- return generateUtilityClass(componentName$7, slot);
865
- }
866
- const useMenuActionsUtilityClasses = () => {
867
- const slots = {
868
- root: ["root"],
869
- itemDelete: ["itemDelete"]
870
- };
871
- const composedClasses = unstable_composeClasses(slots, getMenuActionsUtilityClass, {});
872
- return {
873
- ...composedClasses
874
- };
875
- };
876
- function MenuActions(props) {
877
- const {
878
- menuActions,
879
- endListElement,
880
- menuActionSx,
881
- className,
882
- iconButtonClassName = "",
883
- objItem = {},
884
- urlIcon,
885
- toolTip = "",
886
- marginTop = -1,
887
- marginBottom,
888
- marginLeft,
889
- marginRight,
890
- width = 200,
891
- withBadge = false,
892
- badgeContent,
893
- arrowType = "right-top",
894
- externalOpen = null,
895
- externalClose,
896
- ...other
897
- } = props;
898
- const { host_static_assets, environment_assets } = useEnvironment();
596
+ function ActionFormCancel() {
899
597
  const { getLabel } = useModuleDictionary();
900
- const [open, setOpen] = useState(null);
901
- const handleOpen = (event) => {
902
- setOpen(event.currentTarget);
903
- };
904
- const theme = useTheme();
905
- const classes2 = useMenuActionsUtilityClasses();
906
- useEffect(() => {
907
- let mounted = true;
908
- if (mounted) {
909
- setOpen(externalOpen);
910
- }
911
- return function cleanUp() {
912
- mounted = false;
913
- };
914
- }, [externalOpen]);
915
- const urlFinalIcon = useMemo(() => {
916
- if (urlIcon)
917
- return urlIcon;
918
- return `${host_static_assets}/${environment_assets}/frontend/components/menu_actions/assets/icons/${ICONS.MENU}`;
919
- }, [urlIcon, host_static_assets, environment_assets]);
920
- const handleClose = (e) => {
921
- e.stopPropagation();
922
- setOpen(null);
923
- externalClose && externalClose(null);
924
- };
925
- const handleClick = (e, menuAction) => {
926
- e.stopPropagation();
927
- setOpen(null);
928
- menuAction.onClick();
929
- };
930
- const finalActions = useMemo(() => {
931
- let ret;
932
- if (typeof menuActions !== "function") {
933
- ret = menuActions;
934
- } else {
935
- ret = menuActions(objItem);
936
- }
937
- return ret;
938
- }, [menuActions, objItem]);
939
- const IconButtonElement = /* @__PURE__ */ jsx(Fragment, { children: withBadge ? /* @__PURE__ */ jsx(Badge, { badgeContent, children: /* @__PURE__ */ jsx(
940
- IconButton,
941
- {
942
- src: urlFinalIcon,
943
- onClick: handleOpen,
944
- tooltip: toolTip,
945
- className: iconButtonClassName
946
- }
947
- ) }) : /* @__PURE__ */ jsx(
948
- IconButton,
949
- {
950
- src: urlFinalIcon,
951
- onClick: handleOpen,
952
- tooltip: toolTip,
953
- className: iconButtonClassName
954
- }
955
- ) });
956
- return /* @__PURE__ */ jsxs(Fragment, { children: [
957
- IconButtonElement,
958
- /* @__PURE__ */ jsxs(
959
- Popover,
960
- {
961
- id: "Popover",
962
- open: Boolean(open),
963
- anchorEl: open,
964
- onClose: handleClose,
965
- arrowType,
966
- className: clsx(classes2.root, className),
967
- sx: {
968
- marginTop,
969
- marginBottom,
970
- marginLeft,
971
- marginRight,
972
- width,
973
- maxWidth: 300,
974
- "& .MuiMenuItem-root": { px: 1, typography: "body2", borderRadius: 0.75 },
975
- ...theme.components?.M4LMenuActions?.styleOverrides,
976
- ...menuActionSx
977
- },
978
- ...other,
979
- children: [
980
- finalActions.map((menuAction, index) => /* @__PURE__ */ jsxs(
981
- MenuItem,
982
- {
983
- dense: true,
984
- onClick: (e) => {
985
- handleClick(e, menuAction);
986
- },
987
- sx: { color: menuAction.color ?? "text.main" },
988
- disabled: menuAction.disabled,
989
- className: clsx(
990
- menuAction?.className,
991
- menuAction.variant === "delete" && classes2.itemDelete
992
- ),
993
- children: [
994
- menuAction.urlIcon ? /* @__PURE__ */ jsx(Icon, { src: menuAction.urlIcon }) : null,
995
- /* @__PURE__ */ jsx(LabelMemuItem, { children: menuAction.label || menuAction.dictionaryId && getLabel(menuAction.dictionaryId) })
996
- ]
997
- },
998
- `menu_action_${index}`
999
- )),
1000
- endListElement ? endListElement : null
1001
- ]
1002
- }
1003
- )
1004
- ] });
1005
- }
1006
- const MemonizedMenuActions = React__default.memo(MenuActions);
1007
- generateUtilityClasses(componentName$8, [
1008
- "root"
1009
- ]);
1010
- function getStackUtilityClass(slot) {
1011
- return generateUtilityClass(componentName$8, slot);
1012
- }
1013
- const useStackUtilityClasses = () => {
1014
- const slots = {
1015
- root: ["root"]
1016
- };
1017
- const composedClasses = unstable_composeClasses(slots, getStackUtilityClass, {});
1018
- return {
1019
- ...composedClasses
1020
- };
1021
- };
1022
- const MUISTack = styled$1(Stack$1)(({ theme }) => ({
1023
- ...theme.components?.M4LStack?.styleOverrides
1024
- }));
1025
- const classes = useStackUtilityClasses();
1026
- const Stack = (props) => {
1027
- const { children, className, ...others } = props;
1028
- return /* @__PURE__ */ jsx(MUISTack, { ...others, className: clsx(classes.root, className), children });
1029
- };
1030
- generateUtilityClasses(componentName$9, [
1031
- "root"
1032
- ]);
1033
- function getTabsUtilityClass(slot) {
1034
- return generateUtilityClass(componentName$9, slot);
1035
- }
1036
- const useTabsUtilityClasses = () => {
1037
- const slots = {
1038
- root: ["root"]
1039
- };
1040
- const composedClasses = unstable_composeClasses(slots, getTabsUtilityClass, {});
1041
- return {
1042
- ...composedClasses
1043
- };
1044
- };
1045
- const MUITabs = styled$1(Tabs$1)(({ theme }) => ({
1046
- ...theme.components?.M4LTabs?.styleOverrides
1047
- }));
1048
- const Tabs = (props) => {
1049
- const { children, className, ...others } = props;
1050
- const classes2 = useTabsUtilityClasses();
1051
- return /* @__PURE__ */ jsx(MUITabs, { className: clsx(classes2.root, className), ...others, children });
1052
- };
1053
- generateUtilityClasses(componentName$a, [
1054
- "root"
1055
- ]);
1056
- function getTabContentUtilityClass(slot) {
1057
- return generateUtilityClass(componentName$a, slot);
1058
- }
1059
- const useTabContentUtilityClasses = () => {
1060
- const slots = {
1061
- root: ["root"]
1062
- };
1063
- const composedClasses = unstable_composeClasses(slots, getTabContentUtilityClass, {});
1064
- return {
1065
- ...composedClasses
1066
- };
1067
- };
1068
- const TabContentRoot = styled$1("div")(({ theme }) => ({
1069
- ...theme.components?.M4LTabContent?.styleOverrides
1070
- }));
1071
- const TabContent = (props) => {
1072
- const { children, className, ...others } = props;
1073
- const classes2 = useTabContentUtilityClasses();
1074
- return /* @__PURE__ */ jsx(TabContentRoot, { className: clsx(classes2.root, className), ...others, children });
1075
- };
1076
- const TabRoot = styled("div")(({ theme }) => ({
1077
- ...theme.components?.M4LTab?.styleOverrides
1078
- }));
1079
- const SKTTabWrapper = styled("div")(({ theme }) => ({
1080
- padding: theme.spacing(1.5, 2)
1081
- }));
1082
- generateUtilityClasses(componentName$b, [
1083
- "root",
1084
- "skeleton"
1085
- ]);
1086
- function getTabUtilityClass(slot) {
1087
- return generateUtilityClass(componentName$b, slot);
1088
- }
1089
- const tabUtilityClasses = () => {
1090
- const slots = {
1091
- root: ["root"],
1092
- skeleton: ["skeleton"]
1093
- };
1094
- const composedClasses = unstable_composeClasses(slots, getTabUtilityClass, {});
1095
- return {
1096
- ...composedClasses
1097
- };
1098
- };
1099
- const COMPONENT_PREFIX = "m4l-tab";
1100
- function Tab(props) {
1101
- const { SKTWidth, SKTHeight, className, dataTestId = "", ...other } = props;
1102
- const isSkeleton = useModuleSkeleton();
1103
- const classes2 = tabUtilityClasses();
1104
- return /* @__PURE__ */ jsx(
1105
- TabRoot,
1106
- {
1107
- className: clsx(classes2.root, className),
1108
- ...process.env.NODE_ENV !== "production" ? {
1109
- [TEST_PROP_ID]: getNameDataTestId$1(COMPONENT_PREFIX, "root", dataTestId)
1110
- } : {},
1111
- children: !isSkeleton ? /* @__PURE__ */ jsx(Tab$1, { ...other }) : /* @__PURE__ */ jsx(
1112
- SKTTabWrapper,
1113
- {
1114
- className: classes2.skeleton,
1115
- ...process.env.NODE_ENV !== "production" ? {
1116
- [TEST_PROP_ID]: getNameDataTestId$1(
1117
- COMPONENT_PREFIX,
1118
- "skeleton",
1119
- dataTestId
1120
- )
1121
- } : {},
1122
- children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: SKTWidth, height: SKTHeight })
1123
- }
1124
- )
1125
- }
1126
- );
1127
- }
1128
- const TabContext = createContext(null);
1129
- function TabProvider(props) {
1130
- const { children, initialValue } = props;
1131
- const [currentTab, setCurrentTab] = useState(initialValue);
1132
- const handleChange = (_event, newTab) => {
1133
- setCurrentTab(newTab);
1134
- };
1135
- return /* @__PURE__ */ jsx(
1136
- TabContext.Provider,
1137
- {
1138
- value: {
1139
- currentTab: currentTab.toString(),
1140
- handleChange
1141
- },
1142
- children
1143
- }
1144
- );
1145
- }
1146
- generateUtilityClasses(componentName$c, [
1147
- "root"
1148
- ]);
1149
- function getTooltipUtilityClass(slot) {
1150
- return generateUtilityClass(componentName$c, slot);
1151
- }
1152
- const tooltipUtilityClasses = () => {
1153
- const slots = {
1154
- root: ["root"]
1155
- };
1156
- const composedClasses = unstable_composeClasses(slots, getTooltipUtilityClass, {});
1157
- return {
1158
- ...composedClasses
1159
- };
1160
- };
1161
- const Tooltip = (props) => {
1162
- const { children, className, ...others } = props;
1163
- const classes2 = tooltipUtilityClasses();
1164
- const theme = useTheme();
1165
- const stylesoverrides = theme.components?.M4LTooltip?.styleOverrides;
1166
- return /* @__PURE__ */ jsx(
1167
- Tooltip$1,
1168
- {
1169
- PopperProps: {
1170
- sx: { ...stylesoverrides },
1171
- className: clsx(classes2.root, className)
1172
- },
1173
- ...others,
1174
- children
1175
- }
1176
- );
1177
- };
1178
- const ToggleAbleButton = ({ onToggle, isToggled, ...props }) => {
1179
- return /* @__PURE__ */ jsx(
1180
- Button,
1181
- {
1182
- onClick: onToggle,
1183
- ...props,
1184
- className: clsx(isToggled ? buttonClasses.togglePressed : buttonClasses.toggleNotPressed)
1185
- }
1186
- );
1187
- };
1188
- const ToggleButton = withToggle(ToggleAbleButton);
1189
- const AutocompleteRoot = styled("div")(({ theme }) => ({
1190
- ...theme.components?.M4LRHFAutocomplete?.styleOverrides
1191
- }));
1192
- const WrapperOption = styled("li")(({ theme }) => ({
1193
- "& .m4l_image": {
1194
- marginRight: theme.spacing(1.5)
1195
- }
1196
- }));
1197
- function withRenderOption(getUrlImage, classes2, imageWidth) {
1198
- return function RenderOption(optionProps, option) {
1199
- return /* @__PURE__ */ jsxs(
1200
- WrapperOption,
1201
- {
1202
- ...optionProps,
1203
- className: classes2.withImage,
1204
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$3("withImage") } : {},
1205
- children: [
1206
- /* @__PURE__ */ jsx(Image, { src: getUrlImage(option), width: imageWidth, height: "100%" }),
1207
- /* @__PURE__ */ jsx(Typography, { variant: "body", children: optionProps.key })
1208
- ]
1209
- }
1210
- );
1211
- };
1212
- }
1213
- const SkeletonRHFAutocomplete = (props) => {
1214
- const { withImage, classes: classes2, hasLabel } = props;
1215
- return /* @__PURE__ */ jsxs("div", { className: classes2.skeletonRoot, children: [
1216
- (hasLabel || hasLabel?.length === 0) && /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "30%", height: "16px" }),
1217
- /* @__PURE__ */ jsx(
1218
- "div",
1219
- {
1220
- className: classes2.skeleton,
1221
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$3("skeleton") } : {},
1222
- children: !withImage ? /* @__PURE__ */ jsxs(Fragment, { children: [
1223
- /* @__PURE__ */ jsx("div", { className: classes2.skeletonContainerText, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "50%", height: "14px" }) }),
1224
- /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: 16, height: 16, sx: { minWidth: "16px" } })
1225
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1226
- /* @__PURE__ */ jsx(Skeleton, { variant: "circular" }),
1227
- /* @__PURE__ */ jsx("div", { className: classes2.skeletonContainerText, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "50%", height: "14px" }) }),
1228
- /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: 16, height: 16, sx: { minWidth: "16px" } })
1229
- ] })
1230
- }
1231
- )
1232
- ] });
1233
- };
1234
- const componentName$1 = "M4LRHFAutocomplete";
1235
- generateUtilityClasses(
1236
- componentName$1,
1237
- [
1238
- "root",
1239
- "withImage",
1240
- "skeleton",
1241
- "label",
1242
- "popper",
1243
- "skeletonRoot",
1244
- "skeletonContainerText",
1245
- "iconDown",
1246
- "variantInfo",
1247
- "variantImage",
1248
- "isDisabled",
1249
- "imageWidthDefined",
1250
- "variantSuccess",
1251
- "variantWarning",
1252
- "variantError",
1253
- "sizeSmall",
1254
- "sizeMedium",
1255
- "isFocus",
1256
- "isTabSelected",
1257
- "chip"
1258
- ]
1259
- );
1260
- function getRHFAutocompleteClassesUtilityClass(slot) {
1261
- return generateUtilityClass(componentName$1, slot);
1262
- }
1263
- const useUtilityClasses$5 = (ownerState) => {
1264
- const slots = {
1265
- root: [
1266
- "root",
1267
- ownerState.size === "small" && "sizeSmall",
1268
- ownerState.size === "medium" && "sizeMedium",
1269
- ownerState.isFocus && "isFocus",
1270
- ownerState.isTabSelected && "isTabSelected",
1271
- ownerState.disabled && "isDisabled",
1272
- ownerState.semantics === "info" && "variantInfo",
1273
- ownerState.semantics === "success" && "variantSuccess",
1274
- ownerState.semantics === "warning" && "variantWarning",
1275
- ownerState.semantics === "error" && "variantError",
1276
- ownerState.imageWidthDefined && "imageWidthDefined",
1277
- ownerState.multiple && "multiple"
1278
- ],
1279
- withImage: ["withImage"],
1280
- skeleton: ["skeleton"],
1281
- label: ["label"],
1282
- popper: [
1283
- "popper",
1284
- ownerState.size === "small" && "sizeSmall",
1285
- ownerState.size === "medium" && "sizeMedium",
1286
- ownerState.imageWidthDefined && "imageWidthDefined"
1287
- ],
1288
- skeletonRoot: ["skeletonRoot"],
1289
- skeletonContainerText: ["SkeletonContainerText"],
1290
- iconDown: ["iconDown"],
1291
- chip: [
1292
- "chip",
1293
- ownerState.size === "small" && "sizeSmall",
1294
- ownerState.size === "medium" && "sizeMedium"
1295
- ]
1296
- };
1297
- const composedClasses = unstable_composeClasses(slots, getRHFAutocompleteClassesUtilityClass, {});
1298
- return {
1299
- ...composedClasses
1300
- };
1301
- };
1302
- generateUtilityClasses(
1303
- componentName$d,
1304
- [
1305
- "root",
1306
- "skeleton",
1307
- "actionCancel",
1308
- "actionFormCancel",
1309
- "actionFormIntro",
1310
- "actionIntro",
1311
- "wrapperActions"
1312
- ]
1313
- );
1314
- const useCommonActionsUtilityClasses = () => {
1315
- const slots = {
1316
- root: ["root"],
1317
- skeleton: ["skeleton"],
1318
- actionCancel: ["actionCancel"],
1319
- actionFormCancel: ["actionFormCancel"],
1320
- actionFormIntro: ["actionFormIntro"],
1321
- actionIntro: ["actionIntro"],
1322
- wrapperActions: ["wrapperActions"]
1323
- };
1324
- return unstable_composeClasses(slots, getComponentUtilityClass(componentName$d), {});
1325
- };
1326
- const WrapperStandarActions = styled("div")(({ theme }) => ({
1327
- ...theme.components?.M4LCommonActions?.styleOverrides
1328
- }));
1329
- const Actions$1 = forwardRef(function ActionsForwarded(props, ref) {
1330
- const { children, ...restProps } = props;
1331
- const classes2 = useCommonActionsUtilityClasses();
1332
- return /* @__PURE__ */ jsx(
1333
- WrapperStandarActions,
1334
- {
1335
- ...restProps,
1336
- ref,
1337
- className: clsx(classes2.root, restProps?.className),
1338
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameCommonActionsDataTestId("root") } : {},
1339
- children
1340
- }
1341
- );
1342
- });
1343
- const ActionCancel = (props) => {
1344
- const { getLabel } = useModuleDictionary();
1345
- const classes2 = useCommonActionsUtilityClasses();
1346
- return /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "inherit", ...props, className: classes2.actionCancel, children: getLabel("common_actions.cancel") });
1347
- };
1348
- const ActionIntro = (props) => {
1349
- const { getLabel } = useModuleDictionary();
1350
- const classes2 = useCommonActionsUtilityClasses();
1351
- return /* @__PURE__ */ jsx(
1352
- Button,
1353
- {
1354
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: ACTIONINTRO_TEST_ID } : {},
1355
- variant: "contained",
1356
- type: "submit",
1357
- color: "primary",
1358
- className: classes2.actionIntro,
1359
- ...props,
1360
- children: getLabel("common_actions.intro")
1361
- }
1362
- );
1363
- };
1364
- function ActionFormCancel() {
1365
- const { getLabel } = useModuleDictionary();
1366
- const { openModal } = useModal();
1367
- const { close: closeWindow, setFnQueryClose: setQueryClose } = useWindowToolsMF();
1368
- const { control } = useFormContext();
1369
- const { isDirty } = useFormState({
1370
- control
1371
- });
1372
- const onConfirmQuit = useCallback(() => {
1373
- closeWindow();
1374
- }, []);
1375
- const onClickCancel = useCallback(() => {
1376
- if (isDirty) {
1377
- openModal({
1378
- window: /* @__PURE__ */ jsx(
1379
- WindowConfirm,
1380
- {
1381
- variant: "warning",
1382
- title: getLabel("common_actions.confirm_quit_title"),
1383
- msg: getLabel("common_actions.confirm_quit_msg"),
1384
- onClickIntro: onConfirmQuit
1385
- }
1386
- ),
1387
- variant: "warning"
1388
- });
1389
- } else {
1390
- onConfirmQuit();
1391
- }
1392
- }, [getLabel, isDirty, openModal]);
1393
- useEffect(() => {
1394
- setQueryClose(onClickCancel);
1395
- }, [onClickCancel]);
1396
- const classes2 = useCommonActionsUtilityClasses();
1397
- return /* @__PURE__ */ jsx(
1398
- Button,
1399
- {
1400
- variant: "outlined",
1401
- color: "inherit",
1402
- onClick: onClickCancel,
1403
- className: classes2.actionFormCancel,
1404
- children: getLabel("common_actions.cancel")
1405
- }
1406
- );
1407
- }
1408
- function ActionFormIntro(props) {
1409
- const { getLabel } = useModuleDictionary();
1410
- const isSkeleton = useModuleSkeleton();
1411
- const { control } = useFormContext();
1412
- const { isSubmitting } = useFormState({
1413
- control
1414
- });
1415
- const classes2 = useCommonActionsUtilityClasses();
1416
- if (isSkeleton) {
1417
- return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: 57, height: 30 });
1418
- }
1419
- return /* @__PURE__ */ jsx(
1420
- LoadingButton,
1421
- {
1422
- variant: "contained",
1423
- type: "submit",
1424
- color: "primary",
1425
- loading: isSubmitting,
1426
- className: classes2.actionFormIntro,
1427
- ...props,
1428
- children: getLabel("common_actions.intro")
1429
- }
1430
- );
1431
- }
1432
- const useFormFocus = () => {
1433
- const [isFocus, setIsFocus] = useState(false);
1434
- const [isTabSelected, setIsTabSelected] = useState(false);
1435
- const handlerFocus = () => {
1436
- setIsFocus(true);
1437
- };
1438
- const handlerOnKeyUp = (event) => {
1439
- if (event.key === "Tab") {
1440
- setIsTabSelected(true);
1441
- }
1442
- };
1443
- const handlerOnBlur = () => {
1444
- setIsFocus(false);
1445
- setIsTabSelected(false);
1446
- };
1447
- return { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur };
1448
- };
1449
- function RHFAutocomplete(props) {
1450
- const {
1451
- name: nameRHF,
1452
- getOptionLabel,
1453
- isOptionEqualToValue,
1454
- label,
1455
- skeletonWidth = 100,
1456
- skeletonHeight = "18px",
1457
- options,
1458
- disabled,
1459
- getOptionUrlImage,
1460
- onOpen,
1461
- onClose,
1462
- loading,
1463
- variant,
1464
- helperMessage,
1465
- size = "small",
1466
- onChangeFilterParmsLocal,
1467
- imageWidth,
1468
- imageHeight,
1469
- mandatory,
1470
- mandatoryMessage,
1471
- multiple,
1472
- ...other
1473
- } = props;
1474
- const { getLabel } = useModuleDictionary();
1475
- const isSkeleton = useModuleSkeleton();
1476
- const withImage = useMemo(() => getOptionUrlImage !== void 0, [getOptionUrlImage]);
1477
- const { host_static_assets, environment_assets } = useEnvironment();
1478
- const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
1479
- const autocompleteRef = useRef(null);
1480
- const [open, setOpen] = useState(false);
1481
- const isDesktop = useResponsiveDesktop();
1482
- const onCloseLocal = (event, reason) => {
1483
- setOpen(false);
1484
- if (onClose)
1485
- onClose(event, reason);
1486
- };
1487
- const onOpenLocal = (event) => {
1488
- setOpen(true);
1489
- if (onOpen)
1490
- onOpen(event);
1491
- };
1492
- const getOptionLabelLocal = (option) => {
1493
- if (option === void 0 || option === null) {
1494
- return "";
1495
- }
1496
- return getOptionLabel(option);
1497
- };
1498
- const getOptionUrlImageLocal = (option) => {
1499
- if (option === void 0 || option === null || getOptionUrlImage === void 0) {
1500
- return "";
1501
- }
1502
- return getOptionUrlImage(option);
1503
- };
1504
- const isOptionEqualToValueLocal = (option, value) => {
1505
- if (value === void 0 || value === null || option === null) {
1506
- return false;
1507
- }
1508
- return isOptionEqualToValue(option, value);
1509
- };
1510
- const {
1511
- control,
1512
- formState: { errors }
1513
- } = useFormContext();
1514
- const [currentVariant, setCurrentVariant] = useState(
1515
- null
1516
- );
1517
- useEffect(() => {
1518
- if (errors[nameRHF]) {
1519
- setCurrentVariant("error");
1520
- } else if (variant) {
1521
- setCurrentVariant(variant);
1522
- } else {
1523
- setCurrentVariant(null);
1524
- }
1525
- }, [errors[nameRHF], variant, control]);
1526
- const ownerState = {
1527
- size: !isDesktop ? "medium" : size,
1528
- isFocus: !isSkeleton ? isFocus : false,
1529
- isTabSelected: !isSkeleton ? isTabSelected : false,
1530
- semantics: currentVariant,
1531
- disabled,
1532
- imageWidthDefined: Boolean(imageWidth),
1533
- multiple: Boolean(multiple)
1534
- };
1535
- const classes2 = useUtilityClasses$5(ownerState);
1536
- const theme = useTheme();
1537
- return /* @__PURE__ */ jsx(
1538
- AutocompleteRoot,
1539
- {
1540
- className: classes2.root,
1541
- tabIndex: 0,
1542
- onFocus: handlerFocus,
1543
- onBlur: handlerOnBlur,
1544
- onKeyUp: handlerOnKeyUp,
1545
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: `${RHFTAUTOCOMPLET_ROOT_TEST_ID}_${nameRHF}` } : {},
1546
- children: !isSkeleton ? /* @__PURE__ */ jsx(
1547
- Controller,
1548
- {
1549
- name: nameRHF,
1550
- control,
1551
- render: ({ field: { onChange, value }, fieldState: { error } }) => {
1552
- const [inputValue, setInputValue] = useState(getOptionLabelLocal(value));
1553
- useEffect(() => {
1554
- if (!open && value === null && inputValue !== "") {
1555
- setInputValue("");
1556
- }
1557
- if (!open && value !== null && options.length === 0) {
1558
- onChangeFilterParmsLocal?.(getOptionLabelLocal(value), "reset");
1559
- }
1560
- }, [value]);
1561
- const checkKeyDown = (e) => {
1562
- if (e.code === "Enter")
1563
- e.preventDefault();
1564
- };
1565
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1566
- label && /* @__PURE__ */ jsx(
1567
- FieldLabel,
1568
- {
1569
- className: classes2.label,
1570
- label,
1571
- mandatory,
1572
- mandatoryMessage,
1573
- helperMessage
1574
- }
1575
- ),
1576
- /* @__PURE__ */ jsx(
1577
- Autocomplete,
1578
- {
1579
- autoComplete: true,
1580
- disableClearable: true,
1581
- multiple,
1582
- onKeyDown: checkKeyDown,
1583
- size,
1584
- ref: autocompleteRef,
1585
- autoSelect: false,
1586
- options,
1587
- getOptionLabel: getOptionLabelLocal,
1588
- inputValue,
1589
- clearOnBlur: false,
1590
- PopperComponent: (popperProps) => {
1591
- return /* @__PURE__ */ jsx(
1592
- Popper,
1593
- {
1594
- ...popperProps,
1595
- className: classes2.popper,
1596
- placement: "bottom-start",
1597
- sx: {
1598
- ...theme.components?.M4LRHFAutocompletePopover?.styleOverrides
1599
- }
1600
- }
1601
- );
1602
- },
1603
- onInputChange: (_event, newValue, reason) => {
1604
- if (reason === "input") {
1605
- setInputValue(newValue);
1606
- if (onChangeFilterParmsLocal) {
1607
- onChangeFilterParmsLocal(newValue, reason);
1608
- }
1609
- } else {
1610
- onChange(null);
1611
- }
1612
- },
1613
- isOptionEqualToValue: isOptionEqualToValueLocal,
1614
- value: Array.isArray(value) ? value : multiple ? value ? [value] : [] : value || null,
1615
- onOpen: onOpenLocal,
1616
- onClose: onCloseLocal,
1617
- open,
1618
- onChange: (_e, newValue) => {
1619
- if (!multiple && !Array.isArray(newValue)) {
1620
- setInputValue(getOptionLabelLocal(newValue));
1621
- } else {
1622
- setInputValue("");
1623
- }
1624
- onChange(Array.isArray(newValue) ? [...newValue] : newValue);
1625
- },
1626
- filterOptions: onChangeFilterParmsLocal ? (x) => x : void 0,
1627
- loading,
1628
- loadingText: /* @__PURE__ */ jsx(Typography, { variant: "body", children: getLabel("rhf_autocomplete.loading_options") }),
1629
- disabled,
1630
- noOptionsText: getLabel("rhf_autocomplete.no_options"),
1631
- renderOption: withImage ? withRenderOption(getOptionUrlImageLocal, classes2, imageWidth) : void 0,
1632
- renderInput: (params) => {
1633
- return /* @__PURE__ */ jsx(
1634
- TextField,
1635
- {
1636
- ...params,
1637
- InputLabelProps: {
1638
- ...params.InputLabelProps,
1639
- shrink: true
1640
- },
1641
- fullWidth: true,
1642
- size,
1643
- SelectProps: { native: true },
1644
- InputProps: {
1645
- ...params.InputProps,
1646
- startAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
1647
- !multiple && withImage && value ? /* @__PURE__ */ jsx(
1648
- Image,
1649
- {
1650
- src: getOptionUrlImageLocal(value),
1651
- width: imageWidth,
1652
- height: "100%"
1653
- },
1654
- "ImageTextField"
1655
- ) : null,
1656
- params.InputProps.startAdornment
1657
- ] }),
1658
- endAdornment: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "inherit", size: 18 }) : /* @__PURE__ */ jsx(
1659
- IconButton,
1660
- {
1661
- className: classes2.iconDown,
1662
- src: `${host_static_assets}/${environment_assets}/frontend/components/RHFAutocompletarAsync/assets/icons/chevronDown.svg`,
1663
- onClick: (event) => onOpenLocal(event),
1664
- disabled,
1665
- size
1666
- }
1667
- )
1668
- },
1669
- autoComplete: "off",
1670
- error: !!error,
1671
- ...other
1672
- }
1673
- );
1674
- },
1675
- ...multiple ? {
1676
- renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => {
1677
- const { key, ...restTagProps } = getTagProps({
1678
- index
1679
- });
1680
- return /* @__PURE__ */ createElement(
1681
- Chip,
1682
- {
1683
- ...restTagProps,
1684
- key,
1685
- label: getOptionLabelLocal(option),
1686
- className: classes2.chip,
1687
- icon: withImage && option ? /* @__PURE__ */ jsx(
1688
- Image,
1689
- {
1690
- src: getOptionUrlImageLocal(option),
1691
- width: imageWidth,
1692
- height: imageHeight ?? "100%"
1693
- }
1694
- ) : void 0,
1695
- sx: {
1696
- ...theme.components?.M4LRHFAutocompleteChip?.styleOverrides
1697
- }
1698
- }
1699
- );
1700
- })
1701
- } : {}
1702
- }
1703
- ),
1704
- currentVariant === "error" ? /* @__PURE__ */ jsx(HelperText, { variant: currentVariant, message: error?.message }) : null
1705
- ] });
1706
- }
1707
- }
1708
- ) : /* @__PURE__ */ jsx(SkeletonRHFAutocomplete, { withImage, classes: classes2, hasLabel: label })
1709
- }
1710
- );
1711
- }
1712
- const colorPickerClasses = generateUtilityClasses(componentName$e, [
1713
- "root",
1714
- "popoverRoot",
1715
- "containerFieldColor",
1716
- "fieldColor",
1717
- "containerPicker",
1718
- "skeleton",
1719
- "sizeSmall",
1720
- "sizeMedium",
1721
- "isFocus",
1722
- "isTabSelected"
1723
- ]);
1724
- function getRHFColorPickerUtilityClass(slot) {
1725
- return generateUtilityClass(componentName$e, slot);
1726
- }
1727
- const useUtilityClasses$4 = (owmerState) => {
1728
- const slots = {
1729
- root: [
1730
- "root",
1731
- owmerState.isFocus && "isFocus",
1732
- owmerState.isTabSelected && "isTabSelected",
1733
- owmerState.size === "small" && "sizeSmall",
1734
- owmerState.size === "medium" && "sizeMedium"
1735
- ],
1736
- popoverRoot: ["popoverRoot"],
1737
- containerFieldColor: ["containerFieldColor"],
1738
- fieldColor: ["boxColor"],
1739
- containerPicker: ["containerPicker"],
1740
- skeleton: ["skeleton"]
1741
- };
1742
- const composedClasses = unstable_composeClasses(slots, getRHFColorPickerUtilityClass, {});
1743
- return {
1744
- ...composedClasses
1745
- };
1746
- };
1747
- const RHFColorPickerRoot = styled$1("div")(({ theme }) => ({
1748
- ...theme.components?.M4LRHFColorPicker?.styleOverrides
1749
- }));
1750
- const RHFColorPickerSkeleton = (props) => {
1751
- const { label } = props;
1752
- return /* @__PURE__ */ jsxs("div", { className: colorPickerClasses.skeleton, children: [
1753
- label && /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "30%", height: "14px" }),
1754
- /* @__PURE__ */ jsx(
1755
- Skeleton,
1756
- {
1757
- className: colorPickerClasses.skeleton,
1758
- variant: "rectangular",
1759
- width: 20,
1760
- height: 20
1761
- }
1762
- )
1763
- ] });
1764
- };
1765
- const RHFColorPicker = (props) => {
1766
- const { name, size = "small", label, mandatory, mandatoryMessage, helperMessage } = props;
1767
- const { control, setValue, trigger } = useFormContext();
1768
- const isSkeleton = useModuleSkeleton();
1769
- const { host_static_assets, environment_assets } = useEnvironment();
1770
- const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
1771
- const theme = useTheme$1();
1772
- const currentColor = useWatch({
1773
- name,
1774
- control
1775
- });
1776
- const isDesktop = useResponsiveDesktop();
1777
- const [tempColor, setTempColor] = useState(() => currentColor || "#ffffff");
1778
- const [anchorEl, setAnchorEl] = useState(null);
1779
- const { getLabel } = useModuleDictionary();
1780
- const handleColorChange = (color) => {
1781
- setTempColor(color.hex);
1782
- };
1783
- const handleApprove = () => {
1784
- setAnchorEl(null);
1785
- if (tempColor !== currentColor) {
1786
- setValue(name, tempColor);
1787
- trigger(name);
1788
- }
1789
- };
1790
- const ownerState = {
1791
- isFocus: !isSkeleton ? isFocus : false,
1792
- isTabSelected: !isSkeleton ? isTabSelected : false,
1793
- size: isDesktop ? size : "medium"
1794
- };
1795
- const classes2 = useUtilityClasses$4(ownerState);
1796
- return /* @__PURE__ */ jsx(
1797
- RHFColorPickerRoot,
1798
- {
1799
- className: classes2.root,
1800
- tabIndex: 0,
1801
- onFocus: handlerFocus,
1802
- onBlur: handlerOnBlur,
1803
- onKeyUp: handlerOnKeyUp,
1804
- children: !isSkeleton ? /* @__PURE__ */ jsx(
1805
- Controller,
1806
- {
1807
- name,
1808
- control,
1809
- defaultValue: "",
1810
- render: ({ field: { value }, fieldState: { error } }) => /* @__PURE__ */ jsxs(Fragment, { children: [
1811
- label && /* @__PURE__ */ jsx(
1812
- FieldLabel,
1813
- {
1814
- label,
1815
- mandatory,
1816
- mandatoryMessage,
1817
- helperMessage
1818
- }
1819
- ),
1820
- /* @__PURE__ */ jsxs(
1821
- "div",
1822
- {
1823
- role: "button",
1824
- tabIndex: 0,
1825
- className: classes2.containerFieldColor,
1826
- onClick: (event) => setAnchorEl(event.currentTarget),
1827
- children: [
1828
- /* @__PURE__ */ jsx(
1829
- "div",
1830
- {
1831
- className: classes2.fieldColor,
1832
- style: {
1833
- backgroundColor: value
1834
- }
1835
- }
1836
- ),
1837
- /* @__PURE__ */ jsx(
1838
- Icon,
1839
- {
1840
- src: `${host_static_assets}/${environment_assets}/frontend/components/rhfcolorpicker/assets/icons/chevron_right.svg`
1841
- }
1842
- )
1843
- ]
1844
- }
1845
- ),
1846
- error?.message && /* @__PURE__ */ jsx(HelperText, { variant: "error", message: error?.message + "" }),
1847
- /* @__PURE__ */ jsx(
1848
- Popover,
1849
- {
1850
- open: Boolean(anchorEl),
1851
- arrowType: "top-center",
1852
- className: classes2.popoverRoot,
1853
- anchorEl,
1854
- onClose: () => setAnchorEl(null),
1855
- anchorOrigin: {
1856
- vertical: "bottom",
1857
- horizontal: "center"
1858
- },
1859
- transformOrigin: {
1860
- vertical: "top",
1861
- horizontal: "center"
1862
- },
1863
- sx: {
1864
- mt: "12px",
1865
- ml: -1.25,
1866
- ...theme.components?.M4LRHFColorPickerPopoverRoot?.styleOverrides
1867
- },
1868
- children: /* @__PURE__ */ jsxs("div", { className: classes2.containerPicker, children: [
1869
- /* @__PURE__ */ jsx(SketchPicker, { color: tempColor, onChange: handleColorChange, disableAlpha: true }),
1870
- /* @__PURE__ */ jsx(Button, { variant: "contained", onClick: handleApprove, children: getLabel("rhfcolorpicker.accept") })
1871
- ] })
1872
- }
1873
- )
1874
- ] })
1875
- }
1876
- ) : /* @__PURE__ */ jsx(RHFColorPickerSkeleton, { label })
1877
- }
1878
- );
1879
- };
1880
- styled("div")(() => ({
1881
- display: "flex",
1882
- width: "100%",
1883
- flexDirection: "column"
1884
- }));
1885
- styled("div")(({ theme }) => ({
1886
- display: "flex",
1887
- justifyContent: "flex-end",
1888
- paddingRight: `${theme.spacing(2)}`,
1889
- [theme.breakpoints.down("md")]: {
1890
- justifyContent: "flex-start"
1891
- }
1892
- }));
1893
- styled("div")(({ theme }) => ({
1894
- width: "100%",
1895
- display: "grid",
1896
- gridTemplateColumns: "1fr auto",
1897
- gridGap: theme.spacing(2),
1898
- alignItems: "center",
1899
- height: `${theme.spacing(4.5)}`,
1900
- border: `1px solid ${theme.vars.palette.divider}`,
1901
- borderRadius: `${theme.spacing(1)}`,
1902
- padding: `0 ${theme.spacing(2)}`,
1903
- [theme.breakpoints.down("md")]: {
1904
- width: "100%"
1905
- }
1906
- }));
1907
- const RHFAutocompleteAsyncRoot = styled("div")(({ theme }) => ({
1908
- ...theme.components?.M4LRHFAutocompleteAsync?.styleOverrides
1909
- }));
1910
- const componentName = "M4LRHFAutocompleteAsync";
1911
- generateUtilityClasses(
1912
- componentName,
1913
- [
1914
- "root"
1915
- ]
1916
- );
1917
- function getRHFAutocompleteAsyncClassesUtilityClass(slot) {
1918
- return generateUtilityClass(componentName, slot);
1919
- }
1920
- const useUtilityClasses$3 = () => {
1921
- const slots = {
1922
- root: ["root"]
1923
- };
1924
- const composedClasses = unstable_composeClasses(slots, getRHFAutocompleteAsyncClassesUtilityClass, {});
1925
- return {
1926
- ...composedClasses
1927
- };
1928
- };
1929
- function RHFAutocompleteAsync(props) {
1930
- const {
1931
- name,
1932
- endPoint,
1933
- timeout = 5e3,
1934
- parms,
1935
- resultField = "data",
1936
- size,
1937
- isRemote = true,
1938
- onChangeFilterParms,
1939
- ...other
1940
- } = props;
1941
- const { networkOperation } = useNetwork();
1942
- const [options, setOptions] = useState([]);
1943
- const [open, setOpen] = useState(false);
1944
- const [loading, setIsloading] = useState(false);
1945
- const [canLoadOptions, setCanLoadOptions] = useState(true);
1946
- const [filterParms, setFilterParms] = useState({});
1947
- const debouncedFilter = useCallback(
1948
- debounce(
1949
- (newFilterParms) => {
1950
- setCanLoadOptions(true);
1951
- setFilterParms(newFilterParms);
1952
- },
1953
- 300
1954
- ),
1955
- []
1956
- );
1957
- const onChangeFilterParmsLocal = (newValue) => {
1958
- if (onChangeFilterParms) {
1959
- debouncedFilter(onChangeFilterParms(newValue));
1960
- }
1961
- };
1962
- useEffect(() => {
1963
- setCanLoadOptions(true);
1964
- }, [parms, endPoint]);
1965
- useEffect(() => {
1966
- if (!open || loading) {
1967
- return;
1968
- }
1969
- if (!canLoadOptions) {
1970
- return;
1971
- }
1972
- setIsloading(true);
1973
- setOptions([]);
1974
- setCanLoadOptions(false);
1975
- networkOperation({
1976
- method: "GET",
1977
- endPoint,
1978
- timeout,
1979
- parms: { ...parms, ...filterParms },
1980
- isRemote
1981
- }).then((response) => {
1982
- const valueMaybeArray = getPropertyByString(response, resultField);
1983
- const newOptions = Array.isArray(valueMaybeArray) ? valueMaybeArray : [];
1984
- setOptions(newOptions);
1985
- }).catch(() => {
1986
- setCanLoadOptions(true);
1987
- }).finally(() => {
1988
- setIsloading(false);
1989
- });
1990
- return () => {
1991
- };
1992
- }, [open, parms, filterParms, endPoint]);
1993
- const classes2 = useUtilityClasses$3();
1994
- return /* @__PURE__ */ jsx(
1995
- RHFAutocompleteAsyncRoot,
1996
- {
1997
- className: classes2.root,
1998
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$4("root") } : {},
1999
- children: /* @__PURE__ */ jsx(
2000
- RHFAutocomplete,
2001
- {
2002
- name,
2003
- loading,
2004
- options,
2005
- onChangeFilterParmsLocal: onChangeFilterParms ? onChangeFilterParmsLocal : void 0,
2006
- size,
2007
- onOpen: () => {
2008
- setOpen(true);
2009
- },
2010
- onClose: () => {
2011
- setOpen(false);
2012
- },
2013
- ...other
2014
- }
2015
- )
2016
- }
2017
- );
2018
- }
2019
- const RHFCheckboxRoot = styled("div")(({ theme }) => ({
2020
- ...theme.components?.M4LRHFCheckbox?.styleOverrides
2021
- }));
2022
- styled("div")(() => ({
2023
- display: "flex",
2024
- justifyContent: "center",
2025
- alignItems: "center",
2026
- padding: "8px"
2027
- }));
2028
- styled(Skeleton)(() => ({
2029
- width: "20px",
2030
- height: "20px",
2031
- borderRadius: "4px"
2032
- }));
2033
- const ContainerCheckTypography = styled("div")(() => ({
2034
- display: "flex",
2035
- alignItems: "center"
2036
- }));
2037
- generateUtilityClasses("M4LRHFCheckbox", [
2038
- "root",
2039
- "checkTypography",
2040
- "skeleton",
2041
- "small",
2042
- "medium",
2043
- "stateDisabled",
2044
- "stateError",
2045
- "isFocus",
2046
- "isTabSelected"
2047
- ]);
2048
- function getRHFCheckboxUtilityClass$1(slot) {
2049
- return generateUtilityClass("M4LRHFCheckbox", slot);
2050
- }
2051
- const useUtilityClasses$2 = (ownerState) => {
2052
- const slots = {
2053
- root: [
2054
- "root",
2055
- ownerState.isFocus && "isFocus",
2056
- ownerState.isTabSelected && "isTabSelected",
2057
- ownerState.sizeCheck === "small" && "small",
2058
- ownerState.sizeCheck === "medium" && "medium",
2059
- ownerState.disabled && "stateDisabled",
2060
- ownerState.error && "stateError"
2061
- ],
2062
- skeleton: ["skeleton"],
2063
- checkTypography: [
2064
- "checkTypography",
2065
- ownerState.sizeCheck === "small" ? "small" : "medium",
2066
- ownerState.disabled && "stateDisabled"
2067
- ]
2068
- };
2069
- const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass$1, {});
2070
- return {
2071
- ...composedClasses
2072
- };
2073
- };
2074
- function RHFCheckbox(props) {
2075
- const {
2076
- name,
2077
- sizeCheck = "small",
2078
- label,
2079
- disabled = false,
2080
- mandatory,
2081
- mandatoryMessage,
2082
- helperMessage
2083
- } = props;
2084
- const {
2085
- control,
2086
- formState: { errors }
2087
- } = useFormContext();
2088
- const isSkeleton = useModuleSkeleton();
2089
- const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
2090
- const isDesktop = useResponsiveDesktop();
2091
- const ownerState = {
2092
- isFocus: !isSkeleton ? isFocus : false,
2093
- isTabSelected: !isSkeleton ? isTabSelected : false,
2094
- sizeCheck: !isDesktop ? "medium" : sizeCheck,
2095
- disabled,
2096
- error: errors[name] ? true : false
2097
- };
2098
- const classes2 = useUtilityClasses$2(ownerState);
2099
- return /* @__PURE__ */ jsx(
2100
- RHFCheckboxRoot,
2101
- {
2102
- className: classes2.root,
2103
- onFocus: handlerFocus,
2104
- onBlur: handlerOnBlur,
2105
- onKeyUp: handlerOnKeyUp,
2106
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$5("root", name) } : {},
2107
- children: /* @__PURE__ */ jsx(
2108
- Controller,
2109
- {
2110
- name,
2111
- control,
2112
- render: ({ field: { onChange, value }, fieldState: { error } }) => {
2113
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2114
- /* @__PURE__ */ jsx(
2115
- ContainerCheckTypography,
2116
- {
2117
- className: classes2.checkTypography,
2118
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$5("checkTypography", name) } : {},
2119
- children: /* @__PURE__ */ jsx(
2120
- CheckBox,
2121
- {
2122
- size: sizeCheck,
2123
- onChange,
2124
- checked: value,
2125
- disabled: disabled ? true : false,
2126
- disableRipple: true,
2127
- label,
2128
- mandatory,
2129
- mandatoryMessage,
2130
- helperMessage,
2131
- htmlFor: name
2132
- }
2133
- )
2134
- }
2135
- ),
2136
- error?.message && /* @__PURE__ */ jsx(HelperText, { variant: "error", message: error?.message + "" })
2137
- ] });
2138
- }
2139
- }
2140
- )
2141
- }
2142
- );
2143
- }
2144
- const SkeletonRHFDateTime = (props) => {
2145
- const { skeletonWidth, skeletonHeight, className, label } = props;
2146
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2147
- label && /* @__PURE__ */ jsx(Skeleton, { variant: "text", height: "14px", width: "30%" }),
2148
- /* @__PURE__ */ jsxs("div", { className: className.skeleton, children: [
2149
- /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletonHeight }),
2150
- /* @__PURE__ */ jsx(Skeleton, { variant: "circular" })
2151
- ] })
2152
- ] });
2153
- };
2154
- generateUtilityClasses(componentName$f, [
2155
- "root",
2156
- "skeleton",
2157
- "small",
2158
- "medium",
2159
- "isFocus",
2160
- "isTabSelected",
2161
- "isDisabled",
2162
- "variantInfo",
2163
- "variantSuccess",
2164
- "variantWarning",
2165
- "variantError"
2166
- ]);
2167
- function getRHFCheckboxUtilityClass(slot) {
2168
- return generateUtilityClass(componentName$f, slot);
2169
- }
2170
- const useUtilityClasses$1 = (ownerState) => {
2171
- const slots = {
2172
- root: [
2173
- "root",
2174
- ownerState.size === "small" && "small",
2175
- ownerState.size === "medium" && "medium",
2176
- ownerState.isFocus && "isFocus",
2177
- ownerState.isTabSelected && "isTabSelected",
2178
- ownerState.disabled && "isDisabled",
2179
- ownerState.variant === "info" && "variantInfo",
2180
- ownerState.variant === "success" && "variantSuccess",
2181
- ownerState.variant === "warning" && "variantWarning",
2182
- ownerState.variant === "error" && "variantError"
2183
- ],
2184
- skeleton: ["skeleton"]
2185
- };
2186
- const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
2187
- return {
2188
- ...composedClasses
2189
- };
2190
- };
2191
- const RHFDateTimeRoot = styled$1("div")(({ theme }) => ({
2192
- ...theme.components?.M4LRHFDateTime?.styleOverrides
2193
- }));
2194
- function RHFDateTime(props) {
2195
- const {
2196
- name: nameRHF,
2197
- disabled,
2198
- size = "small",
2199
- variant,
2200
- skeletonWidth = "50%",
2201
- skeletonHeight = 14,
2202
- className,
2203
- label,
2204
- helperMessage,
2205
- mandatory,
2206
- mandatoryMessage
2207
- } = props;
2208
- const { host_static_assets, environment_assets } = useEnvironment();
2209
- const resourceIcon = () => {
2210
- return /* @__PURE__ */ jsx(
2211
- Icon,
2212
- {
2213
- src: `${host_static_assets}/${environment_assets}/frontend/components/rhfdate/ended_at.svg`
2214
- }
2215
- );
2216
- };
2217
- const [currentVariant, setCurrentVariant] = useState(void 0);
2218
- const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
2219
- const {
2220
- control,
2221
- formState: { errors }
2222
- } = useFormContext();
2223
- useEffect(() => {
2224
- if (errors[nameRHF]) {
2225
- setCurrentVariant("error");
2226
- } else if (variant) {
2227
- setCurrentVariant(variant);
2228
- } else {
2229
- setCurrentVariant(void 0);
2230
- }
2231
- }, [errors[nameRHF], variant, control]);
2232
- const isSkeleton = useModuleSkeleton();
2233
- const {
2234
- dateFormatter: { datetimeFormat }
2235
- } = useFormatter();
2236
- const isDesktop = useResponsiveDesktop();
2237
- const ownerState = {
2238
- isFocus: !isSkeleton ? isFocus : false,
2239
- isTabSelected: !isSkeleton ? isTabSelected : false,
2240
- disabled,
2241
- size: isDesktop ? size : "medium",
2242
- variant: currentVariant
2243
- };
2244
- const classes2 = useUtilityClasses$1(ownerState);
2245
- return /* @__PURE__ */ jsx(
2246
- RHFDateTimeRoot,
2247
- {
2248
- className: clsx(classes2.root, className),
2249
- tabIndex: 0,
2250
- onFocus: handlerFocus,
2251
- onBlur: handlerOnBlur,
2252
- onKeyUp: handlerOnKeyUp,
2253
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameRHFDateTimeDataTestId("root") } : {},
2254
- children: !isSkeleton ? /* @__PURE__ */ jsx(
2255
- Controller,
2256
- {
2257
- name: nameRHF,
2258
- control,
2259
- render: ({ field: { value, onChange, ref }, fieldState: { error } }) => {
2260
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2261
- label && /* @__PURE__ */ jsx(
2262
- FieldLabel,
2263
- {
2264
- label,
2265
- mandatory,
2266
- mandatoryMessage,
2267
- helperMessage
2268
- }
2269
- ),
2270
- /* @__PURE__ */ jsx(
2271
- DateTimePicker,
2272
- {
2273
- sx: {
2274
- "& .MuiTouchRipple-root": {
2275
- display: "none"
2276
- }
2277
- },
2278
- inputRef: ref,
2279
- ampm: true,
2280
- value,
2281
- onChange: (newValue) => {
2282
- onChange(newValue);
2283
- },
2284
- slots: {
2285
- openPickerIcon: resourceIcon
2286
- },
2287
- slotProps: {
2288
- textField: {
2289
- onFocus: handlerFocus,
2290
- onBlur: handlerOnBlur
2291
- },
2292
- field: { format: datetimeFormat }
2293
- }
2294
- }
2295
- ),
2296
- error?.message && /* @__PURE__ */ jsx(HelperText, { variant: "error", message: error?.message + "" })
2297
- ] });
598
+ const { openModal } = useModal();
599
+ const { close: closeWindow, setFnQueryClose: setQueryClose } = useWindowToolsMF();
600
+ const { control } = useFormContext();
601
+ const { isDirty } = useFormState({
602
+ control
603
+ });
604
+ const onConfirmQuit = useCallback(() => {
605
+ closeWindow();
606
+ }, []);
607
+ const onClickCancel = useCallback(() => {
608
+ if (isDirty) {
609
+ openModal({
610
+ window: /* @__PURE__ */ jsx(
611
+ WindowConfirm,
612
+ {
613
+ variant: "warning",
614
+ title: getLabel("common_actions.confirm_quit_title"),
615
+ msg: getLabel("common_actions.confirm_quit_msg"),
616
+ onClickIntro: onConfirmQuit
2298
617
  }
2299
- }
2300
- ) : /* @__PURE__ */ jsx(
2301
- SkeletonRHFDateTime,
2302
- {
2303
- skeletonWidth,
2304
- skeletonHeight,
2305
- className: classes2,
2306
- label
2307
- }
2308
- )
618
+ ),
619
+ variant: "warning"
620
+ });
621
+ } else {
622
+ onConfirmQuit();
2309
623
  }
2310
- );
2311
- }
2312
- function RHFMultiCheckbox({ name, options, ...other }) {
2313
- const { control } = useFormContext();
624
+ }, [getLabel, isDirty, openModal]);
625
+ useEffect(() => {
626
+ setQueryClose(onClickCancel);
627
+ }, [onClickCancel]);
628
+ const classes = useCommonActionsUtilityClasses();
2314
629
  return /* @__PURE__ */ jsx(
2315
- Controller,
630
+ Button,
2316
631
  {
2317
- name,
2318
- control,
2319
- render: ({ field }) => {
2320
- const onSelected = (option) => field.value.includes(option) ? field.value.filter((value) => value !== option) : [...field.value, option];
2321
- return /* @__PURE__ */ jsx(FormGroup, { children: options.map((option) => /* @__PURE__ */ jsx(
2322
- FormControlLabel,
2323
- {
2324
- control: /* @__PURE__ */ jsx(
2325
- Checkbox,
2326
- {
2327
- checked: field.value.includes(option),
2328
- onChange: () => field.onChange(onSelected(option))
2329
- }
2330
- ),
2331
- label: option,
2332
- ...other
2333
- },
2334
- option
2335
- )) });
2336
- }
632
+ variant: "outlined",
633
+ color: "inherit",
634
+ onClick: onClickCancel,
635
+ className: classes.actionFormCancel,
636
+ children: getLabel("common_actions.cancel")
2337
637
  }
2338
638
  );
2339
639
  }
2340
- function RHFSelect({ name, children, ...other }) {
640
+ function ActionFormIntro(props) {
641
+ const { getLabel } = useModuleDictionary();
642
+ const isSkeleton = useModuleSkeleton();
2341
643
  const { control } = useFormContext();
644
+ const { isSubmitting } = useFormState({
645
+ control
646
+ });
647
+ const classes = useCommonActionsUtilityClasses();
648
+ if (isSkeleton) {
649
+ return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: 57, height: 30 });
650
+ }
2342
651
  return /* @__PURE__ */ jsx(
2343
- Controller,
652
+ LoadingButton,
2344
653
  {
2345
- name,
2346
- control,
2347
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
2348
- TextField,
2349
- {
2350
- ...field,
2351
- select: true,
2352
- fullWidth: true,
2353
- SelectProps: { native: true },
2354
- error: !!error,
2355
- helperText: error?.message,
2356
- ...other,
2357
- children
2358
- }
2359
- )
654
+ variant: "contained",
655
+ type: "submit",
656
+ color: "primary",
657
+ loading: isSubmitting,
658
+ className: classes.actionFormIntro,
659
+ ...props,
660
+ children: getLabel("common_actions.intro")
2360
661
  }
2361
662
  );
2362
663
  }
2363
- const SkeletonTextFieldRoot = styled("div")(() => ({
2364
- display: "flex",
2365
- flexDirection: "column",
2366
- width: "100%",
2367
- gap: "4px"
2368
- }));
2369
- const WrapperSkeletonRHFTextField = styled("div")(({ theme }) => ({
2370
- display: "flex",
2371
- width: "100%",
2372
- alignItems: "center",
2373
- justifyContent: "space-between",
2374
- border: `1px solid ${theme.vars.palette.divider}`,
2375
- padding: "12px 14px",
2376
- borderRadius: theme.spacing(1),
2377
- gap: "4px"
2378
- }));
2379
- const SkeletonTextField = (props) => {
2380
- const { skeletonWidth, skeletonHeight, ownerState, classes: classes2, hasLabel } = props;
2381
- const { type: variant } = ownerState;
2382
- return /* @__PURE__ */ jsxs(SkeletonTextFieldRoot, { children: [
2383
- (hasLabel || hasLabel?.length === 0) && /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "30%", height: "16px" }),
2384
- /* @__PURE__ */ jsx(
2385
- WrapperSkeletonRHFTextField,
2386
- {
2387
- className: classes2.skeleton,
2388
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$6("skeleton") } : {},
2389
- children: variant === "text" ? /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletonHeight }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2390
- /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletonHeight }),
2391
- /* @__PURE__ */ jsx(Skeleton, { variant: "circular", width: "16px", height: "16px" })
2392
- ] })
2393
- }
2394
- )
2395
- ] });
2396
- };
2397
- const RHFTextFieldRoot = styled("div")(({ theme }) => ({
2398
- ...theme.components?.M4LRHFTextField?.styleOverrides
2399
- }));
2400
- styled("div")(({ theme }) => ({
2401
- display: "flex",
2402
- width: "100%",
2403
- alignItems: "center",
2404
- border: `1px solid ${theme.vars.palette.divider}`,
2405
- padding: "12px 14px",
2406
- borderRadius: theme.spacing(1)
2407
- }));
2408
- generateUtilityClasses(
2409
- componentName$g,
2410
- [
2411
- "root",
2412
- "label",
2413
- "skeleton",
2414
- "variantText",
2415
- "variantPassword",
2416
- "variantInfo",
2417
- "isDisabled",
2418
- "variantSuccess",
2419
- "variantWarning",
2420
- "variantError",
2421
- "sizeSmall",
2422
- "sizeMedium",
2423
- "isFocus",
2424
- "isTabSelected"
2425
- ]
2426
- );
2427
- const getRHFTextFieldClassesByState = (ownerState) => {
2428
- const slots = {
2429
- root: [
2430
- "root",
2431
- ownerState.type === "password" ? "variantPassword" : "variantText",
2432
- ownerState.size === "small" && "sizeSmall",
2433
- ownerState.size === "medium" && "sizeMedium",
2434
- ownerState.isFocus && "isFocus",
2435
- ownerState.isTabSelected && "isTabSelected",
2436
- ownerState.disabled && "isDisabled",
2437
- ownerState.variant === "info" && "variantInfo",
2438
- ownerState.variant === "success" && "variantSuccess",
2439
- ownerState.variant === "warning" && "variantWarning",
2440
- ownerState.variant === "error" && "variantError"
2441
- ],
2442
- label: ["label"],
2443
- skeleton: ["skeleton"]
664
+ const useFormFocus = () => {
665
+ const [isFocus, setIsFocus] = useState(false);
666
+ const [isTabSelected, setIsTabSelected] = useState(false);
667
+ const handlerFocus = () => {
668
+ setIsFocus(true);
2444
669
  };
2445
- const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName$g), {});
2446
- return {
2447
- ...composedClasses
670
+ const handlerOnKeyUp = (event) => {
671
+ if (event.key === "Tab") {
672
+ setIsTabSelected(true);
673
+ }
2448
674
  };
675
+ const handlerOnBlur = () => {
676
+ setIsFocus(false);
677
+ setIsTabSelected(false);
678
+ };
679
+ return { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur };
2449
680
  };
2450
- const RHFTextField = forwardRef((props, ref) => {
681
+ function RHFAutocomplete(props) {
2451
682
  const {
2452
683
  name: nameRHF,
2453
- autoComplete = "off",
2454
- skeletonWidth = "100%",
2455
- skeletonHeight = "18px",
2456
- type,
684
+ getOptionLabel,
685
+ isOptionEqualToValue,
2457
686
  label,
2458
- size = "small",
2459
- startIcon,
2460
- endIcon,
2461
- variant,
2462
- helperMessage = "",
687
+ skeletonWidth = 100,
688
+ skeletonHeight = "18px",
689
+ options,
2463
690
  disabled,
691
+ getOptionUrlImage,
692
+ onOpen,
693
+ onClose,
694
+ loading,
695
+ variant,
696
+ helperMessage,
697
+ size = "small",
698
+ onChangeFilterParmsLocal,
699
+ imageWidth,
700
+ imageHeight,
2464
701
  mandatory,
2465
702
  mandatoryMessage,
2466
- helperText,
703
+ multiple,
2467
704
  ...other
2468
705
  } = props;
706
+ const { getLabel } = useModuleDictionary();
707
+ const isSkeleton = useModuleSkeleton();
708
+ const withImage = useMemo(() => getOptionUrlImage !== void 0, [getOptionUrlImage]);
709
+ const { host_static_assets, environment_assets } = useEnvironment();
710
+ const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
711
+ const autocompleteRef = useRef(null);
712
+ const [open, setOpen] = useState(false);
713
+ const isDesktop = useResponsiveDesktop();
714
+ const onCloseLocal = (event, reason) => {
715
+ setOpen(false);
716
+ if (onClose)
717
+ onClose(event, reason);
718
+ };
719
+ const onOpenLocal = (event) => {
720
+ setOpen(true);
721
+ if (onOpen)
722
+ onOpen(event);
723
+ };
724
+ const getOptionLabelLocal = (option) => {
725
+ if (option === void 0 || option === null) {
726
+ return "";
727
+ }
728
+ return getOptionLabel(option);
729
+ };
730
+ const getOptionUrlImageLocal = (option) => {
731
+ if (option === void 0 || option === null || getOptionUrlImage === void 0) {
732
+ return "";
733
+ }
734
+ return getOptionUrlImage(option);
735
+ };
736
+ const isOptionEqualToValueLocal = (option, value) => {
737
+ if (value === void 0 || value === null || option === null) {
738
+ return false;
739
+ }
740
+ return isOptionEqualToValue(option, value);
741
+ };
2469
742
  const {
2470
743
  control,
2471
744
  formState: { errors }
2472
745
  } = useFormContext();
2473
- const [currentVariant, setCurrentVariant] = useState(null);
2474
- const { isFocus, isTabSelected, handlerFocus, handlerOnKeyUp, handlerOnBlur } = useFormFocus();
2475
- const isDesktop = useResponsiveDesktop();
2476
- const isSkeleton = useModuleSkeleton();
746
+ const [currentVariant, setCurrentVariant] = useState(
747
+ null
748
+ );
2477
749
  useEffect(() => {
2478
750
  if (errors[nameRHF]) {
2479
751
  setCurrentVariant("error");
@@ -2484,43 +756,49 @@ const RHFTextField = forwardRef((props, ref) => {
2484
756
  }
2485
757
  }, [errors[nameRHF], variant, control]);
2486
758
  const ownerState = {
2487
- type: type === "password" ? "password" : "text",
2488
759
  size: !isDesktop ? "medium" : size,
2489
760
  isFocus: !isSkeleton ? isFocus : false,
2490
761
  isTabSelected: !isSkeleton ? isTabSelected : false,
2491
- variant: currentVariant,
2492
- disabled
762
+ semantics: currentVariant,
763
+ disabled,
764
+ imageWidthDefined: Boolean(imageWidth),
765
+ multiple: Boolean(multiple)
2493
766
  };
2494
- const classes2 = getRHFTextFieldClassesByState(ownerState);
767
+ const classes = useUtilityClasses(ownerState);
768
+ const theme = useTheme();
2495
769
  return /* @__PURE__ */ jsx(
2496
- RHFTextFieldRoot,
770
+ AutocompleteRoot,
2497
771
  {
2498
- className: classes2.root,
772
+ className: classes.root,
2499
773
  tabIndex: 0,
2500
774
  onFocus: handlerFocus,
2501
775
  onBlur: handlerOnBlur,
2502
776
  onKeyUp: handlerOnKeyUp,
2503
- role: "textbox",
2504
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: `${RHFTEXTFIELD_ROOT_TEST_ID}_${nameRHF}` } : {},
777
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: `${RHFTAUTOCOMPLET_ROOT_TEST_ID}_${nameRHF}` } : {},
2505
778
  children: !isSkeleton ? /* @__PURE__ */ jsx(
2506
779
  Controller,
2507
780
  {
2508
781
  name: nameRHF,
2509
782
  control,
2510
- render: ({ field: { onChange, value, name, ref: inputRef }, fieldState: { error } }) => {
2511
- const onInternalChange = (event) => {
2512
- if (type === "number") {
2513
- if (event.target.value) {
2514
- onChange(Number(event.target.value));
2515
- return;
2516
- }
783
+ render: ({ field: { onChange, value }, fieldState: { error } }) => {
784
+ const [inputValue, setInputValue] = useState(getOptionLabelLocal(value));
785
+ useEffect(() => {
786
+ if (!open && value === null && inputValue !== "") {
787
+ setInputValue("");
2517
788
  }
2518
- onChange(event);
789
+ if (!open && value !== null && options.length === 0) {
790
+ onChangeFilterParmsLocal?.(getOptionLabelLocal(value), "reset");
791
+ }
792
+ }, [value]);
793
+ const checkKeyDown = (e) => {
794
+ if (e.code === "Enter")
795
+ e.preventDefault();
2519
796
  };
2520
797
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2521
798
  label && /* @__PURE__ */ jsx(
2522
799
  FieldLabel,
2523
800
  {
801
+ className: classes.label,
2524
802
  label,
2525
803
  mandatory,
2526
804
  mandatoryMessage,
@@ -2528,158 +806,138 @@ const RHFTextField = forwardRef((props, ref) => {
2528
806
  }
2529
807
  ),
2530
808
  /* @__PURE__ */ jsx(
2531
- TextField,
809
+ Autocomplete,
2532
810
  {
2533
- variant: "outlined",
2534
- disabled,
2535
- ref,
2536
- inputRef,
2537
- InputLabelProps: { shrink: true },
2538
- autoComplete,
2539
- onChange: onInternalChange,
2540
- value: type === "number" ? isNaN(value) ? 0 : value : value || "",
2541
- name,
2542
- inputProps: {
2543
- ...process.env.NODE_ENV !== "production" ? {
2544
- [TEST_PROP_ID]: `${RHFTEXTFIELD_INPUT_TEST_ID}_${name}`
2545
- } : {}
811
+ autoComplete: true,
812
+ disableClearable: true,
813
+ multiple,
814
+ onKeyDown: checkKeyDown,
815
+ size,
816
+ ref: autocompleteRef,
817
+ autoSelect: false,
818
+ options,
819
+ getOptionLabel: getOptionLabelLocal,
820
+ inputValue,
821
+ clearOnBlur: false,
822
+ PopperComponent: (popperProps) => {
823
+ return /* @__PURE__ */ jsx(
824
+ Popper,
825
+ {
826
+ ...popperProps,
827
+ className: classes.popper,
828
+ placement: "bottom-start",
829
+ sx: {
830
+ ...theme.components?.M4LRHFAutocompletePopover?.styleOverrides
831
+ }
832
+ }
833
+ );
834
+ },
835
+ onInputChange: (_event, newValue, reason) => {
836
+ if (reason === "input") {
837
+ setInputValue(newValue);
838
+ if (onChangeFilterParmsLocal) {
839
+ onChangeFilterParmsLocal(newValue, reason);
840
+ }
841
+ } else {
842
+ onChange(null);
843
+ }
844
+ },
845
+ isOptionEqualToValue: isOptionEqualToValueLocal,
846
+ value: Array.isArray(value) ? value : multiple ? value ? [value] : [] : value || null,
847
+ onOpen: onOpenLocal,
848
+ onClose: onCloseLocal,
849
+ open,
850
+ onChange: (_e, newValue) => {
851
+ if (!multiple && !Array.isArray(newValue)) {
852
+ setInputValue(getOptionLabelLocal(newValue));
853
+ } else {
854
+ setInputValue("");
855
+ }
856
+ onChange(Array.isArray(newValue) ? [...newValue] : newValue);
2546
857
  },
2547
- fullWidth: true,
2548
- error: !!error,
2549
- type,
2550
- ...startIcon || endIcon ? {
2551
- InputProps: {
2552
- ...{
2553
- ...startIcon ? {
2554
- startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", children: startIcon })
2555
- } : {},
2556
- ...endIcon ? {
2557
- endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: endIcon })
2558
- } : {}
858
+ filterOptions: onChangeFilterParmsLocal ? (x) => x : void 0,
859
+ loading,
860
+ loadingText: /* @__PURE__ */ jsx(Typography, { variant: "body", children: getLabel("rhf_autocomplete.loading_options") }),
861
+ disabled,
862
+ noOptionsText: getLabel("rhf_autocomplete.no_options"),
863
+ renderOption: withImage ? withRenderOption(getOptionUrlImageLocal, classes, imageWidth) : void 0,
864
+ renderInput: (params) => {
865
+ return /* @__PURE__ */ jsx(
866
+ TextField,
867
+ {
868
+ ...params,
869
+ InputLabelProps: {
870
+ ...params.InputLabelProps,
871
+ shrink: true
872
+ },
873
+ fullWidth: true,
874
+ size,
875
+ SelectProps: { native: true },
876
+ InputProps: {
877
+ ...params.InputProps,
878
+ startAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
879
+ !multiple && withImage && value ? /* @__PURE__ */ jsx(
880
+ Image,
881
+ {
882
+ src: getOptionUrlImageLocal(value),
883
+ width: imageWidth,
884
+ height: "100%"
885
+ },
886
+ "ImageTextField"
887
+ ) : null,
888
+ params.InputProps.startAdornment
889
+ ] }),
890
+ endAdornment: loading ? /* @__PURE__ */ jsx(CircularProgress, { color: "inherit", size: 18 }) : /* @__PURE__ */ jsx(
891
+ IconButton$1,
892
+ {
893
+ className: classes.iconDown,
894
+ src: `${host_static_assets}/${environment_assets}/frontend/components/RHFAutocompletarAsync/assets/icons/chevronDown.svg`,
895
+ onClick: (event) => onOpenLocal(event),
896
+ disabled,
897
+ size
898
+ }
899
+ )
900
+ },
901
+ autoComplete: "off",
902
+ error: !!error,
903
+ ...other
2559
904
  }
2560
- }
2561
- } : {},
2562
- ...other
905
+ );
906
+ },
907
+ ...multiple ? {
908
+ renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => {
909
+ const { key, ...restTagProps } = getTagProps({
910
+ index
911
+ });
912
+ return /* @__PURE__ */ createElement(
913
+ Chip,
914
+ {
915
+ ...restTagProps,
916
+ key,
917
+ label: getOptionLabelLocal(option),
918
+ className: classes.chip,
919
+ icon: withImage && option ? /* @__PURE__ */ jsx(
920
+ Image,
921
+ {
922
+ src: getOptionUrlImageLocal(option),
923
+ width: imageWidth,
924
+ height: imageHeight ?? "100%"
925
+ }
926
+ ) : void 0,
927
+ sx: {
928
+ ...theme.components?.M4LRHFAutocompleteChip?.styleOverrides
929
+ }
930
+ }
931
+ );
932
+ })
933
+ } : {}
2563
934
  }
2564
935
  ),
2565
- currentVariant ? /* @__PURE__ */ jsx(
2566
- HelperText,
2567
- {
2568
- variant: currentVariant,
2569
- message: currentVariant !== "error" ? helperMessage : error?.message
2570
- }
2571
- ) : null
936
+ currentVariant === "error" ? /* @__PURE__ */ jsx(HelperText, { variant: currentVariant, message: error?.message }) : null
2572
937
  ] });
2573
938
  }
2574
939
  }
2575
- ) : /* @__PURE__ */ jsx(
2576
- SkeletonTextField,
2577
- {
2578
- classes: classes2,
2579
- skeletonWidth,
2580
- skeletonHeight,
2581
- ownerState,
2582
- hasLabel: label
2583
- }
2584
- )
2585
- }
2586
- );
2587
- });
2588
- RHFTextField.displayName = "RHFTextField";
2589
- const RHFTextFieldPasswordRoot = styled("div")(({ theme }) => ({
2590
- ...theme.components?.M4LRHFTextFieldPassword?.styleOverrides
2591
- }));
2592
- generateUtilityClasses(
2593
- "M4LRHFTextFieldPassword",
2594
- [
2595
- "root"
2596
- ]
2597
- );
2598
- function getRHFTextFieldPasswordUtilityClass(slot) {
2599
- return generateUtilityClass("M4LRHFTextFieldPassword", slot);
2600
- }
2601
- const useUtilityClasses = () => {
2602
- const slots = {
2603
- root: ["root"]
2604
- };
2605
- const composedClasses = unstable_composeClasses(slots, getRHFTextFieldPasswordUtilityClass, {});
2606
- return {
2607
- ...composedClasses
2608
- };
2609
- };
2610
- const RHFTextFieldPassword = (props) => {
2611
- const {
2612
- name,
2613
- label,
2614
- skeletonWidth,
2615
- skeletonHeight,
2616
- size,
2617
- mandatory,
2618
- mandatoryMessage,
2619
- helperMessage
2620
- } = props;
2621
- const [showPassword, setShowPassword] = useState(false);
2622
- const { host_static_assets, environment_assets } = useEnvironment();
2623
- const classes2 = useUtilityClasses();
2624
- return /* @__PURE__ */ jsx(
2625
- RHFTextFieldPasswordRoot,
2626
- {
2627
- className: classes2.root,
2628
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$7("root") } : {},
2629
- children: /* @__PURE__ */ jsx(
2630
- RHFTextField,
2631
- {
2632
- name,
2633
- label,
2634
- type: showPassword ? "text" : "password",
2635
- autoComplete: "on",
2636
- skeletonWidth,
2637
- skeletonHeight,
2638
- size,
2639
- mandatory,
2640
- mandatoryMessage,
2641
- helperMessage,
2642
- InputProps: {
2643
- endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
2644
- IconButton,
2645
- {
2646
- onClick: () => setShowPassword(!showPassword),
2647
- variant: "line",
2648
- src: showPassword ? `${host_static_assets}/${environment_assets}/frontend/domain/host/login/assets/icons/eye.svg` : `${host_static_assets}/${environment_assets}/frontend/domain/host/login/assets/icons/eye_off.svg`
2649
- }
2650
- ) })
2651
- }
2652
- }
2653
- )
2654
- }
2655
- );
2656
- };
2657
- function RHFRadioGroup({
2658
- name,
2659
- options,
2660
- getOptionLabel,
2661
- getOptionValue,
2662
- ...other
2663
- }) {
2664
- const { control } = useFormContext();
2665
- return /* @__PURE__ */ jsx(
2666
- Controller,
2667
- {
2668
- name,
2669
- control,
2670
- render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsxs("div", { children: [
2671
- /* @__PURE__ */ jsx(RadioGroup, { ...field, row: true, ...other, children: options.map((option) => /* @__PURE__ */ jsx(
2672
- FormControlLabel,
2673
- {
2674
- defaultValue: field.value,
2675
- value: getOptionValue(option),
2676
- control: /* @__PURE__ */ jsx(Radio, {}),
2677
- label: getOptionLabel(option)
2678
- },
2679
- getOptionValue(option)
2680
- )) }),
2681
- !!error && /* @__PURE__ */ jsx(FormHelperText, { error: true, sx: { px: 2 }, children: error.message })
2682
- ] })
940
+ ) : /* @__PURE__ */ jsx(SkeletonRHFAutocomplete, { withImage, classes, hasLabel: label })
2683
941
  }
2684
942
  );
2685
943
  }
@@ -2820,7 +1078,7 @@ const AreaChip = (props) => {
2820
1078
  /* @__PURE__ */ jsx("div", { className: areasAdminClasses.areaChipTitle, children: areaName }),
2821
1079
  isDesktop ? /* @__PURE__ */ jsxs("div", { className: areasAdminClasses.areaContainerChipEditButton, children: [
2822
1080
  /* @__PURE__ */ jsx(
2823
- IconButton,
1081
+ IconButton$1,
2824
1082
  {
2825
1083
  className: areasAdminClasses.areaChipEditButton,
2826
1084
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.EDIT_AREA}`,
@@ -2832,7 +1090,7 @@ const AreaChip = (props) => {
2832
1090
  }
2833
1091
  ),
2834
1092
  /* @__PURE__ */ jsx(
2835
- IconButton,
1093
+ IconButton$1,
2836
1094
  {
2837
1095
  className: areasAdminClasses.areaChipDeleteButton,
2838
1096
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.DELETE_AREA}`,
@@ -2887,7 +1145,7 @@ const AreaChip = (props) => {
2887
1145
  /* @__PURE__ */ jsxs(EditAreaHeader, { children: [
2888
1146
  /* @__PURE__ */ jsx(Typography, { children: getLabel(getAreasDictionary(DICCTIONARY.label_edit_area)) }),
2889
1147
  /* @__PURE__ */ jsx(
2890
- IconButton,
1148
+ IconButton$1,
2891
1149
  {
2892
1150
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.CLOSE}`,
2893
1151
  size: "small",
@@ -3022,7 +1280,7 @@ const ChipMobile = (props) => {
3022
1280
  ),
3023
1281
  isDesktop ? /* @__PURE__ */ jsxs("div", { className: areasAdminClasses.areaContainerChipEditButton, children: [
3024
1282
  /* @__PURE__ */ jsx(
3025
- IconButton,
1283
+ IconButton$1,
3026
1284
  {
3027
1285
  className: areasAdminClasses.areaChipEditButton,
3028
1286
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.EDIT_AREA}`,
@@ -3033,7 +1291,7 @@ const ChipMobile = (props) => {
3033
1291
  }
3034
1292
  ),
3035
1293
  /* @__PURE__ */ jsx(
3036
- IconButton,
1294
+ IconButton$1,
3037
1295
  {
3038
1296
  className: areasAdminClasses.areaChipDeleteButton,
3039
1297
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.DELETE_AREA}`,
@@ -3084,7 +1342,7 @@ const ChipMobile = (props) => {
3084
1342
  /* @__PURE__ */ jsxs(EditAreaHeader, { children: [
3085
1343
  /* @__PURE__ */ jsx(Typography, { children: getLabel(getAreasDictionary(DICCTIONARY.label_edit_area)) }),
3086
1344
  /* @__PURE__ */ jsx(
3087
- IconButton,
1345
+ IconButton$1,
3088
1346
  {
3089
1347
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.CLOSE}`,
3090
1348
  size: "small",
@@ -3307,7 +1565,7 @@ function AreasAdmin() {
3307
1565
  area
3308
1566
  )) }) }) : /* @__PURE__ */ jsx(AreaChipMobile, {}) }) }) }),
3309
1567
  isDesktop ? /* @__PURE__ */ jsx(
3310
- IconButton,
1568
+ IconButton$1,
3311
1569
  {
3312
1570
  className: areasAdminClasses.areasAddButton,
3313
1571
  src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS$1.ADD_AREA}`,
@@ -3570,7 +1828,7 @@ function MainActions(props) {
3570
1828
  e.stopPropagation();
3571
1829
  };
3572
1830
  return /* @__PURE__ */ jsx(
3573
- IconButton,
1831
+ IconButton$1,
3574
1832
  {
3575
1833
  src: mainAction.urlIcon || "",
3576
1834
  className: clsx(mainAction.className, "m4l_draggableCancel"),
@@ -3671,7 +1929,7 @@ function Header(props) {
3671
1929
  }
3672
1930
  ),
3673
1931
  !colapsed && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(
3674
- IconButton,
1932
+ IconButton$1,
3675
1933
  {
3676
1934
  className: "m4l_draggableCancel",
3677
1935
  onClick: maxNormalize,
@@ -3685,7 +1943,7 @@ function Header(props) {
3685
1943
  }
3686
1944
  ),
3687
1945
  !maximizedId && (emergeType === "layout" || emergeType === "popup") && /* @__PURE__ */ jsx(
3688
- IconButton,
1946
+ IconButton$1,
3689
1947
  {
3690
1948
  className: "m4l_draggableCancel",
3691
1949
  onClick: colapedToggle,
@@ -3699,7 +1957,7 @@ function Header(props) {
3699
1957
  }
3700
1958
  ),
3701
1959
  onClose && /* @__PURE__ */ jsx(
3702
- IconButton,
1960
+ IconButton$1,
3703
1961
  {
3704
1962
  className: "m4l_draggableCancel",
3705
1963
  onPointerDown: onCloseLocal,
@@ -3836,7 +2094,7 @@ function Toasty(props) {
3836
2094
  ] }),
3837
2095
  /* @__PURE__ */ jsxs("div", { className: areasViewerClasses.windowToastyButtonsContainer, children: [
3838
2096
  /* @__PURE__ */ jsx(
3839
- IconButton,
2097
+ IconButton$1,
3840
2098
  {
3841
2099
  className: clsx(
3842
2100
  areasViewerClasses.windowToastyPin,
@@ -3849,7 +2107,7 @@ function Toasty(props) {
3849
2107
  }
3850
2108
  ),
3851
2109
  /* @__PURE__ */ jsx(
3852
- IconButton,
2110
+ IconButton$1,
3853
2111
  {
3854
2112
  className: areasViewerClasses.windowToastyClose,
3855
2113
  onClick: () => {
@@ -4105,7 +2363,7 @@ const PanelWindows = (props) => {
4105
2363
  maximizedId === kl.i && kl.emergeType !== "popup" || maximizedIdParent === kl.windowId && kl.moduleId === currentParam ? areasViewerClasses.selected : null
4106
2364
  ),
4107
2365
  children: /* @__PURE__ */ jsx(
4108
- IconButton,
2366
+ IconButton$1,
4109
2367
  {
4110
2368
  src: kl.url_icon,
4111
2369
  size: "small",
@@ -4263,7 +2521,7 @@ function AreasViewer() {
4263
2521
  })
4264
2522
  ] });
4265
2523
  }
4266
- const formatterClasses = generateUtilityClasses(COMPONENT_CLASS_NAME$1, [
2524
+ const formatterClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
4267
2525
  "root",
4268
2526
  "booleanFormatterIcon",
4269
2527
  "booleanFormatterCheck"
@@ -4445,25 +2703,6 @@ const DataGridRoot = styled("div")(({ theme }) => ({
4445
2703
  overflow: "hidden",
4446
2704
  ...theme.components?.M4LDataGrid?.styleOverrides
4447
2705
  }));
4448
- const CheckboxFormatter = forwardRef(
4449
- function CheckboxFormatter2({ onChange, checked, ...props }, _ref) {
4450
- function handleChange(e) {
4451
- onChange(e.target.checked, e.nativeEvent.shiftKey);
4452
- }
4453
- return /* @__PURE__ */ jsx(
4454
- Checkbox,
4455
- {
4456
- checked,
4457
- size: "small",
4458
- icon: /* @__PURE__ */ jsx(CheckboxIcon, {}),
4459
- checkedIcon: /* @__PURE__ */ jsx(CheckboxCheckedIcon, {}),
4460
- indeterminateIcon: /* @__PURE__ */ jsx(CheckboxIndeterminateIcon, {}),
4461
- onChange: handleChange,
4462
- ...props
4463
- }
4464
- );
4465
- }
4466
- );
4467
2706
  const DataGridContext = createContext(null);
4468
2707
  const getColumnConfigByKey = (key, storeColumnsConfig) => {
4469
2708
  let indexFind = -1;
@@ -4566,7 +2805,7 @@ function DataGridProvider(props) {
4566
2805
  checkedRows,
4567
2806
  onCheckedRowsChange,
4568
2807
  rowKeyGetter,
4569
- classes: classes2
2808
+ classes
4570
2809
  } = props;
4571
2810
  const [columnsWidths, setColumnsWidths] = useState(
4572
2811
  /* @__PURE__ */ new Map()
@@ -4675,7 +2914,7 @@ function DataGridProvider(props) {
4675
2914
  onChangeColumnWidth,
4676
2915
  setRowsCount: setRowFilterCountInternal,
4677
2916
  rowActionsGetter,
4678
- classes: classes2,
2917
+ classes,
4679
2918
  setRowHeightVariant: setCurrentRowHeightInternal,
4680
2919
  onCheckedRowsChange,
4681
2920
  rowKeyGetter
@@ -4690,87 +2929,6 @@ function useDataGrid() {
4690
2929
  throw new Error("useDataGrid context must be use inside DataGridContext");
4691
2930
  return context;
4692
2931
  }
4693
- const filterColumnClassName = "filter-cell";
4694
- const filterHeight = 35;
4695
- function SelectGroupFormatter(props) {
4696
- const [isRowSelected, onRowSelectionChange] = useRowSelection();
4697
- const onChange = (checked) => {
4698
- onRowSelectionChange({ row: props.row, checked, isShiftClick: false });
4699
- };
4700
- const cellFormater = SelectCellFormatter({
4701
- value: isRowSelected,
4702
- isCellSelected: props.isCellSelected,
4703
- onChange,
4704
- "aria-label": "Select Group"
4705
- });
4706
- return cellFormater;
4707
- }
4708
- function SelectFormatter(props) {
4709
- const { checkedRows, onCheckedRowsChange, rowKeyGetter } = useDataGrid();
4710
- const onChange = (checked, _isShiftClick) => {
4711
- const newCheckedRows = new Set(checkedRows);
4712
- if (checked) {
4713
- newCheckedRows.add(rowKeyGetter(props.row));
4714
- } else {
4715
- newCheckedRows.delete(rowKeyGetter(props.row));
4716
- }
4717
- onCheckedRowsChange && onCheckedRowsChange(newCheckedRows);
4718
- };
4719
- return /* @__PURE__ */ jsx(
4720
- SelectCellFormatter,
4721
- {
4722
- value: checkedRows?.has(rowKeyGetter(props.row)) || false,
4723
- isCellSelected: props.isCellSelected,
4724
- onChange,
4725
- "aria-label": "Select"
4726
- }
4727
- );
4728
- }
4729
- const SelectColumnHeaderRenderer = (props) => {
4730
- const { rows, rowKeyGetter, onCheckedRowsChange, checkedRows } = useDataGrid();
4731
- const onAllRowsCheckedChange = (checked) => {
4732
- if (!onCheckedRowsChange)
4733
- return;
4734
- if (checked) {
4735
- onCheckedRowsChange(new Set(rows.map((r) => rowKeyGetter(r))));
4736
- } else {
4737
- onCheckedRowsChange(/* @__PURE__ */ new Set());
4738
- }
4739
- };
4740
- const allRowsChecked = rows.length === checkedRows?.size;
4741
- return SelectCellFormatter({
4742
- "aria-label": "Select All",
4743
- isCellSelected: props.isCellSelected,
4744
- value: allRowsChecked,
4745
- onChange: onAllRowsCheckedChange
4746
- });
4747
- };
4748
- const SelectColumn = {
4749
- key: DATAGRID_SELECT_COLUMN_KEY,
4750
- name: "",
4751
- width: 32,
4752
- minWidth: 32,
4753
- isDraggable: false,
4754
- resizable: false,
4755
- sortable: false,
4756
- frozen: true,
4757
- type: "boolean",
4758
- headerRenderer: SelectColumnHeaderRenderer,
4759
- formatter: SelectFormatter,
4760
- groupFormatter: SelectGroupFormatter
4761
- };
4762
- function useFocusRef(isSelected) {
4763
- const ref = useRef(null);
4764
- useLayoutEffect(() => {
4765
- if (!isSelected)
4766
- return;
4767
- ref.current?.focus({ preventScroll: true });
4768
- }, [isSelected]);
4769
- return {
4770
- ref,
4771
- tabIndex: isSelected ? 0 : -1
4772
- };
4773
- }
4774
2932
  const initialState = {
4775
2933
  activeFilters: false,
4776
2934
  setActiveFilters: voidFunction
@@ -4812,399 +2970,18 @@ function FilterProvider({ children, initialActiveFilters }) {
4812
2970
  );
4813
2971
  }
4814
2972
  const useFilters = () => useContext(FilterContext);
4815
- function DraggableHeaderRenderer(props) {
4816
- const { onColumnsReorder, column, isCellSelected, ...others } = props;
4817
- const { ref, tabIndex } = useFocusRef(isCellSelected);
4818
- const { getLabel } = useModuleDictionary();
4819
- const { activeFilters, filters, onChangeFilter } = useFilters();
4820
- const [filter, setFilter] = useState(filters?.get(column.key) || "");
4821
- const [{ isDragging }, drag] = useDrag({
4822
- type: "COLUMN_DRAG",
4823
- item: { key: column.key },
4824
- collect: (monitor) => ({
4825
- isDragging: monitor.isDragging()
4826
- })
4827
- });
4828
- const [{ isOver }, drop] = useDrop({
4829
- accept: "COLUMN_DRAG",
4830
- drop({ key }) {
4831
- onColumnsReorder(key, column.key);
4832
- },
4833
- collect: (monitor) => ({
4834
- isOver: monitor.isOver(),
4835
- canDrop: monitor.canDrop()
4836
- })
4837
- });
4838
- const handleChange = (e) => {
4839
- if (activeFilters) {
4840
- if (onChangeFilter)
4841
- onChangeFilter(column, e.target.value);
4842
- }
4843
- setFilter(e.target.value);
4844
- };
4845
- useEffect(() => {
4846
- if (!activeFilters)
4847
- setFilter("");
4848
- }, [activeFilters]);
4849
- const newColumn = { ...column };
4850
- if (newColumn.withinHeaderRenderer) {
4851
- newColumn.name = newColumn.withinHeaderRenderer(props);
4852
- }
4853
- return /* @__PURE__ */ jsxs(
4854
- "div",
4855
- {
4856
- ref: (newRef) => {
4857
- drag(newRef);
4858
- drop(newRef);
4859
- },
4860
- style: {
4861
- opacity: isDragging ? 0.5 : 1,
4862
- backgroundColor: isOver ? "#ececec" : void 0,
4863
- cursor: "move",
4864
- display: "flex",
4865
- flexDirection: "column",
4866
- lineHeight: "1",
4867
- height: "100%",
4868
- justifyContent: "center",
4869
- textAlign: "center"
4870
- },
4871
- children: [
4872
- /* @__PURE__ */ jsx(HeaderRenderer, { column: newColumn, isCellSelected, ...others }),
4873
- activeFilters && (column?.withFilter === void 0 || column.withFilter === true) && /* @__PURE__ */ jsx(
4874
- "div",
4875
- {
4876
- className: "filter_cell_div",
4877
- style: {
4878
- borderTop: "1px solid var(--rdg-border-color)",
4879
- width: "100%",
4880
- display: "flex",
4881
- alignItems: "center",
4882
- height: `${filterHeight}px`
4883
- },
4884
- children: /* @__PURE__ */ jsx(
4885
- InputBase,
4886
- {
4887
- inputRef: ref,
4888
- placeholder: getLabel("data_grid.filter_holder"),
4889
- style: {
4890
- width: "100%",
4891
- paddingBottom: "2px",
4892
- border: "1px solid var(--rdg-border-color)"
4893
- },
4894
- tabIndex,
4895
- type: "text",
4896
- onChange: handleChange,
4897
- value: filter
4898
- }
4899
- )
4900
- }
4901
- )
4902
- ]
4903
- }
4904
- );
4905
- }
4906
- const getDragHeaderRenderer = (handleColumnsReorder) => {
4907
- function HeaderRenderer2(props) {
4908
- return /* @__PURE__ */ jsx(DraggableHeaderRenderer, { ...props, onColumnsReorder: handleColumnsReorder });
4909
- }
4910
- return HeaderRenderer2;
4911
- };
4912
- function ActionsFormatter(props) {
4913
- const { rowActionsGetter, classes: classes2 } = useDataGrid();
4914
- const theme = useTheme();
4915
- if (rowActionsGetter === void 0) {
4916
- return /* @__PURE__ */ jsx(Fragment, {});
4917
- }
4918
- return /* @__PURE__ */ jsx(
4919
- MenuActions,
4920
- {
4921
- arrowType: "top-left",
4922
- objItem: props.row,
4923
- menuActions: rowActionsGetter,
4924
- className: classes2.actionsFormatter,
4925
- menuActionSx: theme.components?.M4LDataGridActionsFormatter?.styleOverrides,
4926
- marginTop: 1,
4927
- marginLeft: "-11px",
4928
- anchorOrigin: { vertical: "bottom", horizontal: "left" },
4929
- transformOrigin: { vertical: "top", horizontal: "left" }
4930
- }
4931
- );
4932
- }
4933
- const ActionsColumn = {
4934
- key: DATAGRID_ACTIONS_COLUMN_KEY,
4935
- name: getActionLabel(),
4936
- width: 32,
4937
- minWidth: 32,
4938
- isDraggable: false,
4939
- withFilter: false,
4940
- resizable: true,
4941
- sortable: false,
4942
- frozen: true,
4943
- type: "custom",
4944
- formatter: ActionsFormatter
4945
- };
4946
- function getActionLabel() {
4947
- return "";
4948
- }
4949
- const WrapperSkeleton = styled$1("div")(() => ({
4950
- display: "flex",
4951
- width: "100%",
4952
- height: "100%",
4953
- alignItems: "center"
4954
- }));
4955
- function SkeletonFormatter() {
4956
- const { classes: classes2 } = useDataGrid();
4957
- return /* @__PURE__ */ jsx(WrapperSkeleton, { className: classes2.skeletonFormatter, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "100%", height: "12px" }) });
4958
- }
4959
- function getComparator(columns, sortColumn) {
4960
- const column = columns.find((d) => d.key === sortColumn);
4961
- let typeOrder = "string";
4962
- if (column) {
4963
- typeOrder = column.type || "string";
4964
- }
4965
- switch (typeOrder) {
4966
- case "number":
4967
- return (a, b) => {
4968
- try {
4969
- return Number(a[sortColumn]) - Number(b[sortColumn]);
4970
- } catch (error) {
4971
- return -1;
4972
- }
4973
- };
4974
- default:
4975
- return (a, b) => {
4976
- try {
4977
- return a[sortColumn].toString().localeCompare(b[sortColumn].toString());
4978
- } catch (error) {
4979
- return -1;
4980
- }
4981
- };
4982
- }
4983
- }
4984
- const getColumIndex = (key, columnsConfig) => columnsConfig.findIndex((columnConfig) => columnConfig.key === key);
4985
- const getInOrderColumns = (columns, hasCheckedRows, columnsConfig, columnsWidths, rowActionsGetter) => {
4986
- let filteredSortedColumns = columns.filter((column) => {
4987
- const columnConfigIndex = getColumIndex(column.key, columnsConfig);
4988
- const visible = columnConfigIndex > -1 ? columnsConfig[columnConfigIndex].visible : true;
4989
- return !column.hidden && visible;
4990
- }).sort(
4991
- (a, b) => getColumIndex(a.key, columnsConfig) - getColumIndex(b.key, columnsConfig)
4992
- ).map((columnSorted) => {
4993
- const columnConfigIndex = getColumIndex(columnSorted.key, columnsConfig);
4994
- return {
4995
- ...columnSorted,
4996
- frozen: columnConfigIndex > -1 ? columnsConfig[columnConfigIndex].frozen : true,
4997
- width: typeof columnsWidths.get(columnSorted.key) === "number" ? columnsWidths.get(columnSorted.key) : columnSorted.width
4998
- };
4999
- }).sort((a, b) => {
5000
- const order = (a.frozen === void 0 || a.frozen === false) === (b.frozen === void 0 || b.frozen === false) ? 0 : a.frozen ? -1 : 1;
5001
- return order;
5002
- });
5003
- if (rowActionsGetter) {
5004
- filteredSortedColumns = [ActionsColumn, ...filteredSortedColumns];
5005
- }
5006
- if (hasCheckedRows) {
5007
- filteredSortedColumns = [SelectColumn, ...filteredSortedColumns];
5008
- }
5009
- return filteredSortedColumns;
5010
- };
5011
- const getAligByType = (columnType) => {
5012
- switch (columnType) {
5013
- case "string":
5014
- return "left";
5015
- case "date":
5016
- case "boolean":
5017
- case "custom":
5018
- return "center";
5019
- case "number":
5020
- return "right";
5021
- }
5022
- return "left";
5023
- };
5024
- const useSortColumnsRows = (sourceColumns, sourceRows) => {
5025
- const {
5026
- columnsConfig,
5027
- columnsWidths,
5028
- onChangeColumnsOrder,
5029
- rowActionsGetter,
5030
- checkedRows,
5031
- onCheckedRowsChange
5032
- } = useDataGrid();
5033
- const [columns, setColumns] = useState(() => []);
5034
- const [sortColumns, setSortColumns] = useState([]);
5035
- const isSkeleton = useModuleSkeleton();
5036
- const { activeFilters, filters } = useFilters();
5037
- const findKeyInColumns = (key, cols) => {
5038
- const index = cols.findIndex((column) => key === column.key && column.hidden === false);
5039
- return index !== -1;
5040
- };
5041
- useEffect(() => {
5042
- setColumns(
5043
- getInOrderColumns(
5044
- sourceColumns,
5045
- !!checkedRows && !!onCheckedRowsChange,
5046
- columnsConfig,
5047
- columnsWidths,
5048
- rowActionsGetter
5049
- )
5050
- );
5051
- const finalSortedColumns = sortColumns.filter(
5052
- (sortColumn) => findKeyInColumns(sortColumn.columnKey, sourceColumns)
5053
- );
5054
- if (JSON.stringify(finalSortedColumns) !== JSON.stringify(sortColumns)) {
5055
- setSortColumns(finalSortedColumns);
5056
- }
5057
- }, [sourceColumns, columnsConfig, rowActionsGetter]);
5058
- const finalColumns = useMemo(() => {
5059
- const DragAndDropHeaderRenderer = getDragHeaderRenderer(onChangeColumnsOrder);
5060
- return columns.map((c) => {
5061
- const newColumn = {
5062
- ...c,
5063
- cellClass: c.align !== void 0 ? `rdg-cell-align-${c.align}` : `rdg-cell-align-${getAligByType(c.type)}`
5064
- };
5065
- if (newColumn.key === DATAGRID_SELECT_COLUMN_KEY || newColumn.isDraggable !== void 0 && newColumn.isDraggable === false) {
5066
- return newColumn;
5067
- }
5068
- if (isSkeleton) {
5069
- newColumn.headerRenderer = SkeletonFormatter;
5070
- newColumn.formatter = SkeletonFormatter;
5071
- }
5072
- if (newColumn.headerRenderer) {
5073
- newColumn.withinHeaderRenderer = newColumn.headerRenderer;
5074
- }
5075
- if ((newColumn?.withFilter === void 0 || newColumn.withFilter === true) && activeFilters) {
5076
- newColumn.headerCellClass = filterColumnClassName;
5077
- }
5078
- newColumn.headerRenderer = DragAndDropHeaderRenderer;
5079
- return newColumn;
5080
- });
5081
- }, [isSkeleton, columns, activeFilters, onChangeColumnsOrder]);
5082
- const finalRows = useMemo(() => {
5083
- const nextRows = sourceRows.filter((r) => {
5084
- if (!filters || filters.size === 0)
5085
- return true;
5086
- const iterator = filters.entries();
5087
- let valReturn = true;
5088
- for (let i = 0; i < filters.size; i++) {
5089
- const entry = iterator.next().value;
5090
- const columnKey = entry[0];
5091
- const columnFilter = entry[1];
5092
- let valCell;
5093
- const valueMaybeString = getPropertyByString(r, columnKey);
5094
- let fixedValue;
5095
- if (typeof valueMaybeString === "string") {
5096
- fixedValue = valueMaybeString;
5097
- } else {
5098
- fixedValue = "";
5099
- }
5100
- try {
5101
- if (columnFilter.customFilter) {
5102
- valReturn = valReturn && columnFilter.customFilter(r, columnFilter.value);
5103
- } else {
5104
- valCell = fixedValue;
5105
- valReturn = valReturn && valCell.includes(columnFilter.value);
5106
- }
5107
- } catch (error) {
5108
- continue;
5109
- }
5110
- if (!valReturn)
5111
- break;
5112
- }
5113
- return valReturn;
5114
- });
5115
- if (sortColumns.length === 0) {
5116
- return nextRows;
5117
- }
5118
- nextRows.sort((a, b) => {
5119
- for (const sort of sortColumns) {
5120
- const comparator = getComparator(columns, sort.columnKey);
5121
- const compResult = comparator(a, b);
5122
- if (compResult !== 0) {
5123
- return sort.direction === "ASC" ? compResult : -compResult;
5124
- }
5125
- }
5126
- return 0;
5127
- });
5128
- return nextRows;
5129
- }, [sourceRows, sortColumns, filters]);
5130
- return { finalColumns, sortColumns, setSortColumns, finalRows };
5131
- };
5132
- function Table(props) {
5133
- const { columns, rows, onRowsChange, rowKeyGetter, selectedRows, onSelectedRowsChange } = props;
5134
- const { finalColumns, sortColumns, setSortColumns, finalRows } = useSortColumnsRows(
5135
- columns,
5136
- rows
5137
- );
5138
- const { activeFilters } = useFilters();
5139
- const { onChangeColumnWidth, setRowsCount, currentRowHeight, currentRowHeaderHeight, classes: classes2 } = useDataGrid();
5140
- const ref_data_grid = useRef(null);
5141
- const onRowClick = (row) => {
5142
- if (selectedRows && onSelectedRowsChange) {
5143
- if (selectedRows.entries().next().value) {
5144
- if (selectedRows.entries().next().value[1] === rowKeyGetter(row)) {
5145
- return;
5146
- }
5147
- }
5148
- const mySet = /* @__PURE__ */ new Set([rowKeyGetter(row)]);
5149
- onSelectedRowsChange(mySet);
5150
- }
5151
- };
5152
- useEffect(() => {
5153
- let columnIndice = 0;
5154
- for (const column of finalColumns) {
5155
- const index = sortColumns.findIndex((sortColumn) => column.key === sortColumn.columnKey);
5156
- if (index !== -1) {
5157
- ref_data_grid.current?.element?.querySelector(`[role="columnheader"][aria-colindex="${columnIndice + 1}"]`)?.setAttribute("aria-columnsort", `${sortColumns[index].direction}`);
5158
- } else {
5159
- ref_data_grid.current?.element?.querySelector(`[role="columnheader"][aria-colindex="${columnIndice + 1}"]`)?.removeAttribute("aria-columnsort");
5160
- }
5161
- columnIndice++;
5162
- }
5163
- }, [sortColumns, finalColumns]);
5164
- useEffect(() => {
5165
- setRowsCount(finalRows.length);
5166
- }, [finalRows]);
5167
- const onColumnResize = (idx, width) => {
5168
- onChangeColumnWidth(finalColumns[idx].key, width);
5169
- };
5170
- const onChangeSort = (newSortColumns) => {
5171
- setSortColumns(newSortColumns);
5172
- };
5173
- return /* @__PURE__ */ jsx("div", { className: classes2.tableContaniner, id: "WrapperTable", children: /* @__PURE__ */ jsx("div", { className: classes2.wrapperDataGridCss, children: /* @__PURE__ */ jsx(DndProvider, { backend: HTML5Backend, context: window, children: /* @__PURE__ */ jsx(
5174
- DataGrid$1,
5175
- {
5176
- className: "fill-grid rdg-light",
5177
- ref: ref_data_grid,
5178
- headerRowHeight: activeFilters ? currentRowHeaderHeight + filterHeight : currentRowHeaderHeight,
5179
- columns: finalColumns,
5180
- sortColumns,
5181
- onSortColumnsChange: onChangeSort,
5182
- onColumnResize,
5183
- rows: finalRows,
5184
- onRowsChange,
5185
- selectedRows,
5186
- onSelectedRowsChange,
5187
- onRowClick,
5188
- rowHeight: currentRowHeight,
5189
- rowKeyGetter,
5190
- cellNavigationMode: "LOOP_OVER_ROW",
5191
- components: { checkboxFormatter: CheckboxFormatter },
5192
- defaultColumnOptions: { resizable: true, sortable: true }
5193
- }
5194
- ) }) }) });
5195
- }
5196
2973
  function Filter() {
5197
2974
  const { activeFilters, setActiveFilters } = useFilters();
5198
2975
  const { host_static_assets, environment_assets } = useEnvironment();
5199
- const { classes: classes2 } = useDataGrid();
2976
+ const { classes } = useDataGrid();
5200
2977
  const toggleIcon = () => {
5201
2978
  setActiveFilters(!activeFilters);
5202
2979
  };
5203
2980
  return /* @__PURE__ */ jsx(
5204
- IconButton,
2981
+ IconButton$1,
5205
2982
  {
5206
2983
  dictionaryTooltipId: activeFilters ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show",
5207
- className: classes2.actionFilter,
2984
+ className: classes.actionFilter,
5208
2985
  onClick: toggleIcon,
5209
2986
  "aria-label": "filter",
5210
2987
  src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/filter.svg`
@@ -5326,7 +3103,7 @@ function ColumnPriceFormatter(props) {
5326
3103
  return /* @__PURE__ */ jsx(PriceFormatter, { obProps, ...props });
5327
3104
  };
5328
3105
  }
5329
- const dataGridClasses = generateUtilityClasses(componentName$h, [
3106
+ const dataGridClasses = generateUtilityClasses(componentName$3, [
5330
3107
  "root",
5331
3108
  "actions",
5332
3109
  "withPager",
@@ -5353,7 +3130,7 @@ const dataGridClasses = generateUtilityClasses(componentName$h, [
5353
3130
  "withActions"
5354
3131
  ]);
5355
3132
  function getDataGridUtilityClass(slot) {
5356
- return generateUtilityClass(componentName$h, slot);
3133
+ return generateUtilityClass(componentName$3, slot);
5357
3134
  }
5358
3135
  const dataGridUtilityClasses = (ownerState) => {
5359
3136
  const slots = {
@@ -5449,7 +3226,7 @@ function getRowsFromColumnsConfig(columnsConfig) {
5449
3226
  }
5450
3227
  const ColumnsConfig = forwardRef((props, ref) => {
5451
3228
  const refdata_grid = useRef(null);
5452
- const { onCloseSettings, columnsConfig, onChangeColumnsConfig, classes: classes2 } = props;
3229
+ const { onCloseSettings, columnsConfig, onChangeColumnsConfig, classes } = props;
5453
3230
  const { getLabel } = useModuleDictionary();
5454
3231
  const [isInit, setIsInit] = useState(true);
5455
3232
  const [rows, setRows] = useState(getRowsFromColumnsConfig(columnsConfig));
@@ -5597,12 +3374,12 @@ const ColumnsConfig = forwardRef((props, ref) => {
5597
3374
  const mySet = /* @__PURE__ */ new Set([row.key]);
5598
3375
  setSelRows(mySet);
5599
3376
  };
5600
- return /* @__PURE__ */ jsxs(WrapperColumnsConfig, { ref: divRef, className: classes2.columnsConfigContainer, children: [
5601
- /* @__PURE__ */ jsx(DivSelColumns, { className: classes2.columnsLabelSetColumns, children: getLabel("data_grid.settings_sel_columns") }),
5602
- /* @__PURE__ */ jsx(WrapperDataGrid, { className: classes2.columnsConfigContent, children: /* @__PURE__ */ jsx("div", { className: classes2.wrapperDataGridCss, children: /* @__PURE__ */ jsx(
3377
+ return /* @__PURE__ */ jsxs(WrapperColumnsConfig, { ref: divRef, className: classes.columnsConfigContainer, children: [
3378
+ /* @__PURE__ */ jsx(DivSelColumns, { className: classes.columnsLabelSetColumns, children: getLabel("data_grid.settings_sel_columns") }),
3379
+ /* @__PURE__ */ jsx(WrapperDataGrid, { className: classes.columnsConfigContent, children: /* @__PURE__ */ jsx("div", { className: classes.wrapperDataGridCss, children: /* @__PURE__ */ jsx(
5603
3380
  DataGrid$1,
5604
3381
  {
5605
- className: classes2.columnsConfigGrid,
3382
+ className: classes.columnsConfigGrid,
5606
3383
  ref: refdata_grid,
5607
3384
  columns: columnsdata_grid,
5608
3385
  rows,
@@ -5615,9 +3392,9 @@ const ColumnsConfig = forwardRef((props, ref) => {
5615
3392
  defaultColumnOptions: { resizable: true, sortable: true }
5616
3393
  }
5617
3394
  ) }) }),
5618
- /* @__PURE__ */ jsxs(ColumnActions, { className: classes2.columnsConfigActions, children: [
3395
+ /* @__PURE__ */ jsxs(ColumnActions, { className: classes.columnsConfigActions, children: [
5619
3396
  /* @__PURE__ */ jsx(
5620
- IconButton,
3397
+ IconButton$1,
5621
3398
  {
5622
3399
  tooltip: getLabel("data_grid.settings_move_first"),
5623
3400
  onClick: handleMoveFirst,
@@ -5627,7 +3404,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
5627
3404
  }
5628
3405
  ),
5629
3406
  /* @__PURE__ */ jsx(
5630
- IconButton,
3407
+ IconButton$1,
5631
3408
  {
5632
3409
  tooltip: getLabel("data_grid.settings_move_up"),
5633
3410
  dictionaryTooltipId: "data_grid.settings_move_up",
@@ -5638,7 +3415,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
5638
3415
  }
5639
3416
  ),
5640
3417
  /* @__PURE__ */ jsx(
5641
- IconButton,
3418
+ IconButton$1,
5642
3419
  {
5643
3420
  tooltip: getLabel("data_grid.settings_move_last"),
5644
3421
  onClick: handleMoveLast,
@@ -5648,7 +3425,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
5648
3425
  }
5649
3426
  ),
5650
3427
  /* @__PURE__ */ jsx(
5651
- IconButton,
3428
+ IconButton$1,
5652
3429
  {
5653
3430
  tooltip: getLabel("data_grid.settings_move_down"),
5654
3431
  onClick: () => handleMoveUpDownd(1),
@@ -5658,7 +3435,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
5658
3435
  }
5659
3436
  ),
5660
3437
  /* @__PURE__ */ jsx(
5661
- IconButton,
3438
+ IconButton$1,
5662
3439
  {
5663
3440
  tooltip: getLabel("data_grid.settings_visible_all"),
5664
3441
  onClick: checkAll,
@@ -5667,7 +3444,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
5667
3444
  }
5668
3445
  ),
5669
3446
  /* @__PURE__ */ jsx(
5670
- IconButton,
3447
+ IconButton$1,
5671
3448
  {
5672
3449
  tooltip: getLabel("data_grid.settings_no_visible_all"),
5673
3450
  onClick: unCheckAll,
@@ -5676,7 +3453,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
5676
3453
  }
5677
3454
  ),
5678
3455
  /* @__PURE__ */ jsx(
5679
- IconButton,
3456
+ IconButton$1,
5680
3457
  {
5681
3458
  tooltip: getLabel("data_grid.settings_restore"),
5682
3459
  onClick: restoreAll,
@@ -5690,12 +3467,12 @@ const ColumnsConfig = forwardRef((props, ref) => {
5690
3467
  ColumnsConfig.displayName = "ColumnsConfig";
5691
3468
  function Settings() {
5692
3469
  const { host_static_assets, environment_assets } = useEnvironment();
5693
- const { classes: classes2 } = useDataGrid();
3470
+ const { classes } = useDataGrid();
5694
3471
  const modalSettings = useModalSettings();
5695
3472
  return /* @__PURE__ */ jsx(
5696
- IconButton,
3473
+ IconButton$1,
5697
3474
  {
5698
- className: classes2.actionSettings,
3475
+ className: classes.actionSettings,
5699
3476
  dictionaryTooltipId: "data_grid.tooltip_settings",
5700
3477
  onClick: modalSettings,
5701
3478
  "aria-label": "settings",
@@ -5704,20 +3481,20 @@ function Settings() {
5704
3481
  );
5705
3482
  }
5706
3483
  function RowsCount() {
5707
- const { rowsCount, classes: classes2 } = useDataGrid();
3484
+ const { rowsCount, classes } = useDataGrid();
5708
3485
  const { getLabel } = useModuleDictionary();
5709
3486
  const isSkeleton = useModuleSkeleton();
5710
- return /* @__PURE__ */ jsx("div", { className: classes2.rowsCount, children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
5711
- /* @__PURE__ */ jsx("div", { className: classes2.rowsCountLabel, children: getLabel("data_grid.rows") }),
5712
- /* @__PURE__ */ jsx("div", { className: classes2.rowsCountValue, children: rowsCount })
3487
+ return /* @__PURE__ */ jsx("div", { className: classes.rowsCount, children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, { children: [
3488
+ /* @__PURE__ */ jsx("div", { className: classes.rowsCountLabel, children: getLabel("data_grid.rows") }),
3489
+ /* @__PURE__ */ jsx("div", { className: classes.rowsCountValue, children: rowsCount })
5713
3490
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5714
- /* @__PURE__ */ jsx("div", { className: classes2.rowsCountLabel, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "40px", height: "16px" }) }),
5715
- /* @__PURE__ */ jsx("div", { className: classes2.rowsCountValue, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "20px", height: "16px" }) })
3491
+ /* @__PURE__ */ jsx("div", { className: classes.rowsCountLabel, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "40px", height: "16px" }) }),
3492
+ /* @__PURE__ */ jsx("div", { className: classes.rowsCountValue, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: "20px", height: "16px" }) })
5716
3493
  ] }) });
5717
3494
  }
5718
3495
  function Density() {
5719
3496
  const { host_static_assets, environment_assets } = useEnvironment();
5720
- const { rowHeights, currentRowHeightVariant, setRowHeightVariant, classes: classes2 } = useDataGrid();
3497
+ const { rowHeights, currentRowHeightVariant, setRowHeightVariant, classes } = useDataGrid();
5721
3498
  const { getLabel } = useModuleDictionary();
5722
3499
  const menuActions = useMemo(() => {
5723
3500
  if (typeof rowHeights === "number") {
@@ -5767,7 +3544,7 @@ function Density() {
5767
3544
  MenuActions,
5768
3545
  {
5769
3546
  arrowType: "right-top",
5770
- className: classes2.actionDensityPopover,
3547
+ className: classes.actionDensityPopover,
5771
3548
  menuActionSx: theme.components?.M4LDataGridDensityPopover?.styleOverrides,
5772
3549
  anchorOrigin: { vertical: "top", horizontal: "left" },
5773
3550
  transformOrigin: { vertical: "top", horizontal: "right" },
@@ -5829,7 +3606,7 @@ const MobileMenuActions = () => {
5829
3606
  };
5830
3607
  function Actions(props) {
5831
3608
  const isXs = useResponsiveContainerStore((state) => state.isXs, shallow);
5832
- const { rowHeights, classes: classes2 } = useDataGrid();
3609
+ const { rowHeights, classes } = useDataGrid();
5833
3610
  const isSkeleton = useModuleSkeleton();
5834
3611
  const { getLabel } = useModuleDictionary();
5835
3612
  const {
@@ -5840,7 +3617,7 @@ function Actions(props) {
5840
3617
  settingsProps,
5841
3618
  withLocalFilters
5842
3619
  } = props;
5843
- return /* @__PURE__ */ jsxs("div", { className: classes2.actions, children: [
3620
+ return /* @__PURE__ */ jsxs("div", { className: classes.actions, children: [
5844
3621
  withRowsCount && !isXs && /* @__PURE__ */ jsx(RowsCount, {}),
5845
3622
  withPager && pagerOptions && /* @__PURE__ */ jsx(
5846
3623
  Pager,
@@ -5853,7 +3630,7 @@ function Actions(props) {
5853
3630
  labelOf: getLabel(dictionary.LABEL_OF)
5854
3631
  }
5855
3632
  ),
5856
- isXs ? /* @__PURE__ */ jsx(MobileMenuActions, {}) : /* @__PURE__ */ jsxs("div", { className: classes2.actionsConfigContainer, children: [
3633
+ isXs ? /* @__PURE__ */ jsx(MobileMenuActions, {}) : /* @__PURE__ */ jsxs("div", { className: classes.actionsConfigContainer, children: [
5857
3634
  typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}),
5858
3635
  withLocalFilters && /* @__PURE__ */ jsx(Filter, {}),
5859
3636
  withSettings && /* @__PURE__ */ jsx(Settings, { ...settingsProps })
@@ -5886,11 +3663,11 @@ function DataGrid(props) {
5886
3663
  actionsProps,
5887
3664
  withActions
5888
3665
  };
5889
- const classes2 = dataGridUtilityClasses(ownerState);
3666
+ const classes = dataGridUtilityClasses(ownerState);
5890
3667
  return /* @__PURE__ */ jsx(
5891
3668
  DataGridRoot,
5892
3669
  {
5893
- className: classes2.root,
3670
+ className: classes.root,
5894
3671
  ...process.env.NODE_ENV !== "production" ? {
5895
3672
  [TEST_PROP_COLUMNS]: JSON.stringify(columns),
5896
3673
  [TEST_PROP_ID]: getNameDataTestId$1(DATAGRID_PREFIX_NAME, "root", dataTestId)
@@ -5909,7 +3686,7 @@ function DataGrid(props) {
5909
3686
  onCheckedRowsChange,
5910
3687
  rowKeyGetter,
5911
3688
  rows,
5912
- classes: classes2,
3689
+ classes,
5913
3690
  children: /* @__PURE__ */ jsxs(FilterProvider, { initialActiveFilters: false, children: [
5914
3691
  withActions && actionsProps && /* @__PURE__ */ jsx(
5915
3692
  Actions,
@@ -6006,21 +3783,8 @@ function NumberEditor({
6006
3783
  }
6007
3784
  );
6008
3785
  }
6009
- function HelperError(props) {
6010
- const { name } = props;
6011
- const { control } = useFormContext();
6012
- const { fieldState } = useController({
6013
- name,
6014
- control,
6015
- rules: { required: true }
6016
- });
6017
- if (fieldState?.error?.message) {
6018
- return /* @__PURE__ */ jsx(HelperText, { variant: "error", message: fieldState?.error?.message });
6019
- }
6020
- return null;
6021
- }
6022
3786
  generateUtilityClasses(
6023
- componentName$i,
3787
+ componentName$4,
6024
3788
  [
6025
3789
  "root"
6026
3790
  ]
@@ -6029,17 +3793,17 @@ const useAppBarComercialUtilityClasses$1 = () => {
6029
3793
  const slots = {
6030
3794
  root: ["root"]
6031
3795
  };
6032
- return unstable_composeClasses(slots, getComponentUtilityClass(componentName$i), {});
3796
+ return unstable_composeClasses(slots, getComponentUtilityClass(componentName$4), {});
6033
3797
  };
6034
3798
  const AppBarComercialRoot = styled$1("div")(({ theme }) => ({
6035
3799
  ...theme.components?.M4LAppBarCommercial?.styleOverrides
6036
3800
  }));
6037
3801
  const AppBarComercial = (props) => {
6038
3802
  const { children } = props;
6039
- const classes2 = useAppBarComercialUtilityClasses$1();
6040
- return /* @__PURE__ */ jsx(AppBarComercialRoot, { className: classes2.root, children });
3803
+ const classes = useAppBarComercialUtilityClasses$1();
3804
+ return /* @__PURE__ */ jsx(AppBarComercialRoot, { className: classes.root, children });
6041
3805
  };
6042
- const TopBarClasses = generateUtilityClasses(componentName$j, [
3806
+ const TopBarClasses = generateUtilityClasses(componentName$5, [
6043
3807
  "root",
6044
3808
  "ContainerImageComercial",
6045
3809
  "SimplebarComercial",
@@ -6061,7 +3825,7 @@ function getTopBarClassesUtilityClass() {
6061
3825
  ContainerAccordionCase1: ["ContainerAccordionCase1"],
6062
3826
  IconAndButton: ["IconAndButton"]
6063
3827
  };
6064
- const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName$j), {});
3828
+ const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName$5), {});
6065
3829
  return {
6066
3830
  ...composedClasses
6067
3831
  };
@@ -6074,11 +3838,11 @@ const initialstate = {
6074
3838
  const TopBarContext = createContext(initialstate);
6075
3839
  const TopBarProvider = (props) => {
6076
3840
  const { children, value } = props;
6077
- const { dataMenu: DataMenu, classes: classes2, dataTestId } = value;
3841
+ const { dataMenu: DataMenu, classes, dataTestId } = value;
6078
3842
  return /* @__PURE__ */ jsx(
6079
3843
  TopBarContext.Provider,
6080
3844
  {
6081
- value: { dataMenu: DataMenu, classes: classes2, dataTestId },
3845
+ value: { dataMenu: DataMenu, classes, dataTestId },
6082
3846
  children
6083
3847
  }
6084
3848
  );
@@ -6087,7 +3851,7 @@ const useTopBar = () => useContext(TopBarContext);
6087
3851
  const useTopBar$1 = useTopBar;
6088
3852
  const NavItemRoot = (props) => {
6089
3853
  const theme = useTheme();
6090
- const { classes: classes2, dataTestId } = useTopBar$1();
3854
+ const { classes, dataTestId } = useTopBar$1();
6091
3855
  const { itemRootData } = props;
6092
3856
  const { title, children, module_id } = itemRootData;
6093
3857
  const [anchorEl, setAnchorEl] = useState(null);
@@ -6105,10 +3869,10 @@ const NavItemRoot = (props) => {
6105
3869
  "div",
6106
3870
  {
6107
3871
  className: clsx(
6108
- classes2.ItemSelect,
3872
+ classes.ItemSelect,
6109
3873
  item.path === window.location.pathname ? TopBarClasses.IsActive : null
6110
3874
  ),
6111
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$j, "ItemSelect", dataTestId) } : {},
3875
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$5, "ItemSelect", dataTestId) } : {},
6112
3876
  children: /* @__PURE__ */ jsx(Button, { variant: "text", href: item.path, fullWidth: true, children: item.title })
6113
3877
  }
6114
3878
  ) }, index));
@@ -6141,10 +3905,10 @@ const NavItemRoot = (props) => {
6141
3905
  return /* @__PURE__ */ jsxs(
6142
3906
  "div",
6143
3907
  {
6144
- className: classes2.ContainerAccordionCase1,
3908
+ className: classes.ContainerAccordionCase1,
6145
3909
  ...process.env.NODE_ENV !== "production" ? {
6146
3910
  [TEST_PROP_ID]: getNameDataTestId$1(
6147
- componentName$j,
3911
+ componentName$5,
6148
3912
  "ContainerAccordionCase1",
6149
3913
  dataTestId
6150
3914
  )
@@ -6169,8 +3933,8 @@ const NavItemRoot = (props) => {
6169
3933
  return /* @__PURE__ */ jsxs(
6170
3934
  "div",
6171
3935
  {
6172
- className: classes2.ContainerAccordion,
6173
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$j, "ContainerAccordion", dataTestId) } : {},
3936
+ className: classes.ContainerAccordion,
3937
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$5, "ContainerAccordion", dataTestId) } : {},
6174
3938
  children: [
6175
3939
  /* @__PURE__ */ jsx(
6176
3940
  Button,
@@ -6195,21 +3959,21 @@ const NavItemRoot = (props) => {
6195
3959
  Box,
6196
3960
  {
6197
3961
  className: clsx(
6198
- classes2.ItemRoot,
3962
+ classes.ItemRoot,
6199
3963
  isActive(itemRootData) || openedPopoverId === itemRootData.module_id ? TopBarClasses.IsActive : null
6200
3964
  ),
6201
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$j, "ItemRoot", dataTestId) } : {},
3965
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$5, "ItemRoot", dataTestId) } : {},
6202
3966
  children: render()
6203
3967
  }
6204
3968
  );
6205
3969
  };
6206
3970
  const ConteinItem = () => {
6207
- const { dataMenu: DataMenu, classes: classes2, dataTestId } = useTopBar$1();
3971
+ const { dataMenu: DataMenu, classes, dataTestId } = useTopBar$1();
6208
3972
  return /* @__PURE__ */ jsx(
6209
3973
  "div",
6210
3974
  {
6211
- className: classes2.SimplebarComercial,
6212
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$j, "SimplebarComercial", dataTestId) } : {},
3975
+ className: classes.SimplebarComercial,
3976
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$5, "SimplebarComercial", dataTestId) } : {},
6213
3977
  children: DataMenu.map((group) => /* @__PURE__ */ jsx(NavItemRoot, { itemRootData: group }, group.module_id))
6214
3978
  }
6215
3979
  );
@@ -6219,18 +3983,18 @@ const TopBarRoot = styled$1("header")(({ theme }) => ({
6219
3983
  }));
6220
3984
  const TopBar = (props) => {
6221
3985
  const { dataMenu: DataMenu, dataTestId } = props;
6222
- const classes2 = getTopBarClassesUtilityClass();
3986
+ const classes = getTopBarClassesUtilityClass();
6223
3987
  return /* @__PURE__ */ jsx(
6224
3988
  TopBarRoot,
6225
3989
  {
6226
- className: classes2.root,
6227
- ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$j, "root", dataTestId) } : {},
6228
- children: /* @__PURE__ */ jsx(TopBarProvider, { value: { dataMenu: DataMenu, classes: classes2, dataTestId }, children: /* @__PURE__ */ jsx(ConteinItem, {}) })
3990
+ className: classes.root,
3991
+ ...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1(componentName$5, "root", dataTestId) } : {},
3992
+ children: /* @__PURE__ */ jsx(TopBarProvider, { value: { dataMenu: DataMenu, classes, dataTestId }, children: /* @__PURE__ */ jsx(ConteinItem, {}) })
6229
3993
  }
6230
3994
  );
6231
3995
  };
6232
3996
  generateUtilityClasses(
6233
- componentName$k,
3997
+ componentName$6,
6234
3998
  [
6235
3999
  "root",
6236
4000
  "fullWidth",
@@ -6247,7 +4011,7 @@ const useAppBarComercialUtilityClasses = (ownerState) => {
6247
4011
  ownerState.columnReverse && "columnReverse"
6248
4012
  ]
6249
4013
  };
6250
- return unstable_composeClasses(slots, getComponentUtilityClass(componentName$k), {});
4014
+ return unstable_composeClasses(slots, getComponentUtilityClass(componentName$6), {});
6251
4015
  };
6252
4016
  const SectionCommercialRoot = styled$1(Stack)(({ theme }) => ({
6253
4017
  ...theme.components?.M4LSectionCommercial?.styleOverrides
@@ -6265,11 +4029,11 @@ const SectionCommercial = (props) => {
6265
4029
  contentWith,
6266
4030
  columnReverse
6267
4031
  };
6268
- const classes2 = useAppBarComercialUtilityClasses(ownerState);
4032
+ const classes = useAppBarComercialUtilityClasses(ownerState);
6269
4033
  return /* @__PURE__ */ jsx(
6270
4034
  SectionCommercialRoot,
6271
4035
  {
6272
- className: classes2.root,
4036
+ className: classes.root,
6273
4037
  paddingY,
6274
4038
  ...others,
6275
4039
  ...contentWith === "boxed" ? { paddingX } : null,
@@ -6278,75 +4042,46 @@ const SectionCommercial = (props) => {
6278
4042
  );
6279
4043
  };
6280
4044
  export {
6281
- getUncertaintyFormat as $,
6282
- Avatar as A,
6283
- Button as B,
6284
- CircularProgress as C,
4045
+ Actions$1 as A,
4046
+ BooleanFormatter as B,
4047
+ ColumnSetCheckFormatter as C,
6285
4048
  DateFormatter as D,
6286
- AreasViewer as E,
6287
- RHFMultiCheckbox as F,
6288
- RHFSelect as G,
6289
- HelperError as H,
6290
- RHFRadioGroup as I,
6291
- RHFCheckbox as J,
6292
- RHFTextFieldPassword as K,
6293
- LinearProgress as L,
6294
- Accordion as M,
4049
+ ColumnPriceFormatter as E,
4050
+ ColumnInteractiveCheckFormatter as F,
4051
+ ActionFormCancel as G,
4052
+ AppBarComercial as H,
4053
+ TopBar as I,
4054
+ MenuActions as M,
6295
4055
  NumberEditor as N,
6296
- Breadcrumbs as O,
6297
- Popover as P,
6298
- Badge as Q,
4056
+ PointsFormatter as P,
6299
4057
  RHFAutocomplete as R,
6300
- Stack as S,
6301
- Typography as T,
6302
- LinkWithRoute as U,
6303
- LoadingButton as V,
6304
- MenuActions as W,
6305
- ToggleButton as X,
6306
- BooleanFormatter as Y,
6307
- getFormatDate as Z,
6308
- UncertaintyFormatter as _,
6309
- RHFTextField as a,
6310
- PointsFormatter as a0,
6311
- getFormatPoints as a1,
6312
- getFormatConcatenated as a2,
6313
- ConcatenatedFormatter as a3,
6314
- PriceFormatter as a4,
6315
- getFormatPrice as a5,
6316
- ColumnUncertaintyFormatter as a6,
6317
- ColumnPointsFormatter as a7,
6318
- ColumnNestedValueFormatter as a8,
6319
- ColumnBooleanFormatter as a9,
6320
- ColumnConcatenatedValueFormatter as aa,
6321
- ColumnPriceFormatter as ab,
6322
- ColumnInteractiveCheckFormatter as ac,
6323
- ActionFormCancel as ad,
6324
- AppBarComercial as ae,
6325
- TopBar as af,
6326
- SectionCommercial as ag,
6327
- RHFDateTime as b,
6328
- RHFAutocompleteAsync as c,
6329
- Actions$1 as d,
6330
- ActionCancel as e,
6331
- ActionIntro as f,
6332
- DataGrid as g,
6333
- useAreasViewerUtilityClasses as h,
6334
- useAreasAdminUtilityClasses as i,
6335
- ColumnDateFormatter as j,
6336
- ActionFormIntro as k,
6337
- RHFColorPicker as l,
6338
- Tabs as m,
6339
- Tab as n,
6340
- Tooltip as o,
6341
- TabContent as p,
6342
- TabProvider as q,
6343
- ColumnSetCheckFormatter as r,
6344
- CheckBox as s,
6345
- useDataGrid as t,
6346
- useFormFocus as u,
6347
- DataGridRoot as v,
6348
- ColumnsConfig as w,
6349
- TabContext as x,
6350
- TextEditor as y,
6351
- AreasAdmin as z
4058
+ SectionCommercial as S,
4059
+ TextEditor as T,
4060
+ UncertaintyFormatter as U,
4061
+ DataGrid as a,
4062
+ useAreasAdminUtilityClasses as b,
4063
+ useFormFocus as c,
4064
+ ActionCancel as d,
4065
+ ActionIntro as e,
4066
+ useDataGrid as f,
4067
+ useFilters as g,
4068
+ ColumnDateFormatter as h,
4069
+ ActionFormIntro as i,
4070
+ DataGridRoot as j,
4071
+ ColumnsConfig as k,
4072
+ AreasAdmin as l,
4073
+ AreasViewer as m,
4074
+ getFormatDate as n,
4075
+ getUncertaintyFormat as o,
4076
+ getFormatPoints as p,
4077
+ getFormatConcatenated as q,
4078
+ ConcatenatedFormatter as r,
4079
+ PriceFormatter as s,
4080
+ getFormatPrice as t,
4081
+ useAreasViewerUtilityClasses as u,
4082
+ ColumnUncertaintyFormatter as v,
4083
+ ColumnPointsFormatter as w,
4084
+ ColumnNestedValueFormatter as x,
4085
+ ColumnBooleanFormatter as y,
4086
+ ColumnConcatenatedValueFormatter as z
6352
4087
  };