@m4l/components 0.2.32 → 0.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/export.d.ts +416 -413
- package/components/AccountPopover/{index.69cda48b.js → index.e0f283a2.js} +1 -1
- package/components/AppBar/{index.0cc0bd40.js → index.a93fc76c.js} +2 -2
- package/components/CommonActions/components/ActionCancel/{index.f00f026d.js → index.6a991836.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.08fe4e27.js → index.9801982c.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.b5a5c4b4.js → index.f7ee99e7.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.574967a0.js → index.7d321553.js} +2 -2
- package/components/CommonActions/components/Actions/{index.23bfc86b.js → index.5ebb95fe.js} +1 -1
- package/components/DataGrid/assets/icons/datagrid.svg +4 -4
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.cf410875.js → index.de8a24bb.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.00f9ed87.js → index.220dc8f0.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.4089f91b.js → index.fef17717.js} +1 -1
- package/components/DataGrid/{index.c283b50b.js → index.27810831.js} +3 -3
- package/components/DataGrid/subcomponents/Actions/{index.d945647f.js → index.810ec53e.js} +10 -10
- package/components/DragResizeWindow/{index.82cf6408.js → index.1091606d.js} +3 -3
- package/components/DynamicFilter/DynamicFilter.d.ts +2 -2
- package/components/DynamicFilter/classes/index.d.ts +1 -1
- package/components/DynamicFilter/classes/types.d.ts +1 -0
- package/components/DynamicFilter/constants.d.ts +2 -1
- package/components/DynamicFilter/contexts/DynamicFilterContext/helpers.d.ts +2 -3
- package/components/DynamicFilter/contexts/DynamicFilterContext/store.d.ts +3 -2
- package/components/DynamicFilter/dictionary.d.ts +4 -0
- package/components/DynamicFilter/{index.75c66024.js → index.781f1212.js} +189 -35
- package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/helpers.d.ts +51 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/SelectFilter/index.d.ts +5 -0
- package/components/DynamicFilter/subcomponents/fieldstypes/factory.d.ts +12 -4
- package/components/DynamicFilter/subcomponents/fieldstypes/validations.d.ts +8 -1
- package/components/DynamicFilter/types.d.ts +40 -19
- package/components/FieldLabel/{index.75e89ace.js → index.6127de0c.js} +2 -2
- package/components/GridLayout/{index.00740f82.js → index.cd9b0723.js} +2 -2
- package/components/GridLayout/subcomponents/Griditem/{index.3d479abb.js → index.9d65edbc.js} +3 -3
- package/components/GridLayout/subcomponents/Responsive/{index.733e8ba6.js → index.26128960.js} +1 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.247cc027.js → index.003027c6.js} +1 -1
- package/components/HamburgerMenu/{index.fb1a3aae.js → index.35df83ad.js} +2 -2
- package/components/Icon/{index.14670a00.js → index.d34ed400.js} +1 -1
- package/components/Image/{index.6aa1ae49.js → index.7ca22fd5.js} +2 -2
- package/components/LanguagePopover/{index.4149a8da.js → index.47796ed9.js} +2 -2
- package/components/LinearProgressIndeterminate/{index.6e5db737.js → index.7349e210.js} +1 -1
- package/components/LoadingError/{index.1ec78dd5.js → index.423d70c8.js} +3 -3
- package/components/MFLoader/{index.6037f834.js → index.9bf3be25.js} +1 -1
- package/components/ModalDialog/{index.f27b7c2d.js → index.17a7be82.js} +4 -4
- package/components/NoItemSelected/{index.54023226.js → index.16500ea3.js} +1 -1
- package/components/ObjectLogs/{index.32ddae31.js → index.c33d046a.js} +5 -5
- package/components/PDFViewer/{index.d185afd0.js → index.195bf4c3.js} +1 -1
- package/components/Page/{index.2c550c91.js → index.f4ce7c75.js} +1 -1
- package/components/PaperForm/{index.63dc4b29.js → index.243b20bd.js} +1 -1
- package/components/Period/{index.ddf8716c.js → index.0e647446.js} +2 -2
- package/components/PrintingSystem/{index.bcef9a6f.js → index.7aff86a4.js} +13 -13
- package/components/PrintingSystem/subcomponents/BodyNode/{index.14ecdd97.js → index.e7c04442.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.aa2b8706.js → index.7bfbe141.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.ce81726b.js → index.2e68dba0.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.7fc8c316.js → index.bb2a7dcb.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.88fcc856.js → index.53d82ef7.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.d3f4e000.js → index.3630fe0c.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.30cbab70.js → index.a7086296.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.05a3579e.js → index.633304a0.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.d6344807.js → index.40da2bf8.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.79d2e283.js → index.0c9719ce.js} +1 -1
- package/components/PropertyValue/{index.1dbf6ef8.js → index.1b45d87a.js} +2 -2
- package/components/Resizeable/{index.eba4fda9.js → index.e663ca86.js} +1 -1
- package/components/SideBar/{index.b1455bd0.js → index.31e9929f.js} +4 -4
- package/components/ToastContainer/{index.a33ebb52.js → index.3c3c05b2.js} +3 -3
- package/components/areas/components/AreasAdmin/{index.922cdb11.js → index.971a3f2d.js} +10 -10
- package/components/areas/components/AreasViewer/{index.f7126815.js → index.dfa954fe.js} +14 -14
- package/components/areas/contexts/AreasContext/{index.37be3e4e.js → index.732db5ce.js} +4 -4
- package/components/areas/hooks/useAreas/{index.e3971ffa.js → index.2b111188.js} +1 -1
- package/components/areas/types.d.ts +1 -1
- package/components/commercial/AppBarCommercial/{index.3e0ad6ef.js → index.d9adaa14.js} +1 -1
- package/components/commercial/TopBar/{index.7b22d97b.js → index.5fe97d82.js} +4 -4
- package/components/formatters/BooleanFormatter/{index.fb44d69d.js → index.96191097.js} +2 -2
- package/components/formatters/{index.05c4e1a4.js → index.3166cf12.js} +1 -1
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +2 -1
- package/components/hook-form/RHFAutocomplete/{index.3592430b.js → index.48f7b38f.js} +75 -42
- package/components/hook-form/RHFAutocomplete/types.d.ts +4 -2
- package/components/hook-form/RHFAutocompleteAsync/{index.dfbaece5.js → index.e5aa7194.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.251a36b5.js → index.2a9f91d2.js} +2 -2
- package/components/hook-form/RHFColorPicker/{index.e7d27ca0.js → index.b9ce28a2.js} +5 -5
- package/components/hook-form/RHFDateTime/{index.fc474c35.js → index.d4644a5b.js} +3 -3
- package/components/hook-form/RHFPeriod/{index.2bf650c4.js → index.2550b309.js} +3 -3
- package/components/hook-form/RHFTextField/{index.db56e769.js → index.01d225ef.js} +4 -4
- package/components/hook-form/RHFUpload/{index.9d4d4460.js → index.e4cdfb40.js} +2 -2
- package/components/maps/leaflet-geoman.d.ts +1633 -1633
- package/components/modal/{WindowBase.2e5506d7.js → WindowBase.1cb35b2d.js} +3 -3
- package/components/modal/{WindowConfirm.ce47a48a.js → WindowConfirm.8feb23c6.js} +6 -6
- package/components/mui_extended/Accordion/{index.f9042228.js → index.32ebf85f.js} +2 -2
- package/components/mui_extended/Button/{index.d5a031be.js → index.7265987f.js} +1 -1
- package/components/mui_extended/{CheckBox.0dcf39ae.js → CheckBox.4e2fa17c.js} +1 -1
- package/components/mui_extended/IconButton/{index.d8bdadaa.js → index.21215143.js} +1 -1
- package/components/mui_extended/MenuActions/{index.154d57f0.js → index.40352568.js} +2 -2
- package/components/mui_extended/Pager/{index.da7ea851.js → index.0d7d95be.js} +2 -2
- package/components/mui_extended/ToggleButton/{index.595ea955.js → index.aa37e2cb.js} +1 -1
- package/components/mui_extended/ToggleIconButton/ToggleIconButton.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/{index.c588d5e1.js → index.827d5856.js} +1 -1
- package/contexts/ModalContext/{index.3d48d675.js → index.365ae264.js} +1 -1
- package/hooks/useFormAddEdit/{index.07e5258d.js → index.7f3162c9.js} +2 -2
- package/hooks/useModal/{index.cb1d6a37.js → index.5a463055.js} +1 -1
- package/index.js +82 -82
- package/{node_modules.98455a76.js → node_modules.0fb6293f.js} +1 -1
- package/package.json +1 -1
- package/{react-draggable.6cf19cba.js → react-draggable.483e2eaa.js} +1 -1
- package/{react-resizable.0ebffd82.js → react-resizable.059cf55c.js} +2 -2
- package/{vendor.55925cb3.js → vendor.52f0234f.js} +65 -65
- package/vite-env.d.ts +3 -3
- /package/utils/{index.24b5284a.js → index.d2e8f376.js} +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { generateUtilityClasses, styled, Skeleton, Dialog } from "@mui/material";
|
|
2
|
-
import { r as react_resizable_css } from "../../../../react-resizable.
|
|
2
|
+
import { r as react_resizable_css } from "../../../../react-resizable.059cf55c.js";
|
|
3
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index.
|
|
4
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.d2e8f376.js";
|
|
5
5
|
import { a as AREAS_VIEWER_CLASS_NAME } from "../../constants.66529246.js";
|
|
6
6
|
import { shallow } from "zustand/shallow";
|
|
7
7
|
import React__default, { useMemo, useEffect } from "react";
|
|
8
8
|
import clsx from "clsx";
|
|
9
|
-
import { u as useAreasStore } from "../../hooks/useAreas/index.
|
|
9
|
+
import { u as useAreasStore } from "../../hooks/useAreas/index.2b111188.js";
|
|
10
10
|
import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
|
|
11
|
-
import { a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.
|
|
11
|
+
import { a as MemonizedMenuActions } from "../../../mui_extended/MenuActions/index.40352568.js";
|
|
12
12
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
14
14
|
import { I as ICONS } from "../../icons.8266ccc8.js";
|
|
15
15
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.08cfc4c9.js";
|
|
16
|
-
import { I as IconButton } from "../../../mui_extended/IconButton/index.
|
|
17
|
-
import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.
|
|
18
|
-
import { I as Icon } from "../../../Icon/index.
|
|
16
|
+
import { I as IconButton } from "../../../mui_extended/IconButton/index.21215143.js";
|
|
17
|
+
import { L as LinearProgressIndeterminate } from "../../../LinearProgressIndeterminate/index.7349e210.js";
|
|
18
|
+
import { I as Icon } from "../../../Icon/index.d34ed400.js";
|
|
19
19
|
import { T as Typography } from "../../../mui_extended/Typography/index.379dd374.js";
|
|
20
|
-
import { M as MFLoader } from "../../../MFLoader/index.
|
|
20
|
+
import { M as MFLoader } from "../../../MFLoader/index.9bf3be25.js";
|
|
21
21
|
import { W as WindowToolsMFProvider } from "../../contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
22
22
|
import { D as DynamicMFParmsProvider } from "../../contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
23
23
|
import { L as LinearProgress } from "../../../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
24
24
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
|
|
25
25
|
import { g as getNameDataTestId } from "../../../../test/getNameDataTestId.14875ec7.js";
|
|
26
|
-
import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.
|
|
27
|
-
import { w as withSizeProvider } from "../../../GridLayout/subcomponents/SizeProvider/index.
|
|
28
|
-
import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.
|
|
26
|
+
import { R as RESPONSIVE_COLAPSED_HEIGHTS, a as RESPONSIVE_ROW_HEIGHTS, M as MARGIN_GRIDLAYOUT, P as PADDING_GRIDLAYOUT } from "../../contexts/AreasContext/index.732db5ce.js";
|
|
27
|
+
import { w as withSizeProvider } from "../../../GridLayout/subcomponents/SizeProvider/index.003027c6.js";
|
|
28
|
+
import { R as Responsive } from "../../../GridLayout/subcomponents/Responsive/index.26128960.js";
|
|
29
29
|
import { useLocation } from "react-router-dom";
|
|
30
|
-
import { L as LoadingError } from "../../../LoadingError/index.
|
|
31
|
-
import { c as cjs } from "../../../../react-draggable.
|
|
32
|
-
import { R as ResizeableWindow } from "../../../Resizeable/index.
|
|
30
|
+
import { L as LoadingError } from "../../../LoadingError/index.423d70c8.js";
|
|
31
|
+
import { c as cjs } from "../../../../react-draggable.483e2eaa.js";
|
|
32
|
+
import { R as ResizeableWindow } from "../../../Resizeable/index.e663ca86.js";
|
|
33
33
|
const areasViewerClasses = generateUtilityClasses(AREAS_VIEWER_CLASS_NAME, [
|
|
34
34
|
"root",
|
|
35
35
|
"areaRoot",
|
|
@@ -5,13 +5,13 @@ import { useResponsiveDesktop, useFirstRender } from "@m4l/graphics";
|
|
|
5
5
|
import { useHostTools, useModuleDictionary, useNetwork, useModuleSkeleton, EmitEvents } from "@m4l/core";
|
|
6
6
|
import { devtools } from "zustand/middleware";
|
|
7
7
|
import { immer } from "zustand/middleware/immer";
|
|
8
|
-
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.
|
|
9
|
-
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.
|
|
8
|
+
import { u as useAreasViewerUtilityClasses } from "../../components/AreasViewer/index.dfa954fe.js";
|
|
9
|
+
import { u as useAreasAdminUtilityClasses } from "../../components/AreasAdmin/index.971a3f2d.js";
|
|
10
10
|
import { c as createDynamicMFStore } from "../DynamicMFParmsContext/index.1607c78e.js";
|
|
11
11
|
import { g as getAreasDictionary, D as DICCTIONARY } from "../../dictionary.08cfc4c9.js";
|
|
12
|
-
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/index.
|
|
12
|
+
import { a as addLayoutItemToBreakPointIfNoExists, b as addLayoutItemToBreakPoints, c as cloneLayouts } from "../../../GridLayout/subcomponents/Responsive/index.26128960.js";
|
|
13
13
|
import { debounce, cloneDeep } from "lodash";
|
|
14
|
-
import { A as isEqualLayouts } from "../../../GridLayout/index.
|
|
14
|
+
import { A as isEqualLayouts } from "../../../GridLayout/index.cd9b0723.js";
|
|
15
15
|
import { useNavigate } from "react-router-dom";
|
|
16
16
|
import { jsx } from "react/jsx-runtime";
|
|
17
17
|
const PADDING_GRIDLAYOUT = 11;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
2
|
import { useStore } from "zustand";
|
|
3
|
-
import { A as AreasContext } from "../../contexts/AreasContext/index.
|
|
3
|
+
import { A as AreasContext } from "../../contexts/AreasContext/index.732db5ce.js";
|
|
4
4
|
function useAreasStore(selector, equalityFn) {
|
|
5
5
|
const context = useContext(AreasContext);
|
|
6
6
|
if (!context)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { generateUtilityClasses, styled } from "@mui/material";
|
|
2
2
|
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { g as getComponentUtilityClass } from "../../../utils/index.
|
|
3
|
+
import { g as getComponentUtilityClass } from "../../../utils/index.d2e8f376.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const componentName = "M4LAppBarCommercial";
|
|
6
6
|
generateUtilityClasses(componentName, [
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
2
2
|
import { generateUtilityClasses, styled, useTheme, Box, Grid } from "@mui/material";
|
|
3
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
4
|
-
import { g as getComponentUtilityClass } from "../../../utils/index.
|
|
4
|
+
import { g as getComponentUtilityClass } from "../../../utils/index.d2e8f376.js";
|
|
5
5
|
import { createContext, useContext, useState } from "react";
|
|
6
6
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
7
|
import { useEnvironment } from "@m4l/core";
|
|
8
|
-
import { I as Icon } from "../../Icon/index.
|
|
8
|
+
import { I as Icon } from "../../Icon/index.d34ed400.js";
|
|
9
9
|
import clsx from "clsx";
|
|
10
10
|
import { g as getNameDataTestId } from "../../../test/getNameDataTestId.14875ec7.js";
|
|
11
|
-
import { A as Accordion } from "../../mui_extended/Accordion/index.
|
|
12
|
-
import { B as Button } from "../../mui_extended/Button/index.
|
|
11
|
+
import { A as Accordion } from "../../mui_extended/Accordion/index.32ebf85f.js";
|
|
12
|
+
import { B as Button } from "../../mui_extended/Button/index.7265987f.js";
|
|
13
13
|
import { P as Popover } from "../../mui_extended/Popover/index.d85de73b.js";
|
|
14
14
|
const componentName = "M4LTopBar";
|
|
15
15
|
const TopBarClasses = generateUtilityClasses(componentName, [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
|
-
import { I as Icon } from "../../Icon/index.
|
|
3
|
+
import { I as Icon } from "../../Icon/index.d34ed400.js";
|
|
4
4
|
import { W as WrapperComponent } from "../../WrapperComponent/index.5e872594.js";
|
|
5
|
-
import { F as FormatterRoot, f as formatterClasses } from "../index.
|
|
5
|
+
import { F as FormatterRoot, f as formatterClasses } from "../index.3166cf12.js";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
const BOOLEAN_FORMATTER_DICTIONARY_KEY = `boolean_formatter`;
|
|
@@ -3,7 +3,7 @@ import "@mui/base";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { W as WrapperComponent } from "../WrapperComponent/index.5e872594.js";
|
|
5
5
|
import { useModuleDictionary } from "@m4l/core";
|
|
6
|
-
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY } from "./BooleanFormatter/index.
|
|
6
|
+
import { a as BOOLEAN_FORMATTER_DICTIONARY_KEY } from "./BooleanFormatter/index.96191097.js";
|
|
7
7
|
const COMPONENT_CLASS_NAME = "M4LFormatter";
|
|
8
8
|
const formatterClasses = generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
9
9
|
"root",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useUtilityClasses } from
|
|
1
|
+
import { useUtilityClasses } from '.';
|
|
2
2
|
export interface RHFAutocompleteClassesType {
|
|
3
3
|
root: string;
|
|
4
4
|
withImage: string;
|
|
@@ -19,6 +19,7 @@ export interface RHFAutocompleteClassesType {
|
|
|
19
19
|
sizeMedium: string;
|
|
20
20
|
isFocus: string;
|
|
21
21
|
isTabSelected: string;
|
|
22
|
+
chip: string;
|
|
22
23
|
}
|
|
23
24
|
export declare type RHFAutocompleteClassesKey = keyof RHFAutocompleteClassesType;
|
|
24
25
|
export declare type Classes = ReturnType<typeof useUtilityClasses>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass, useTheme, Autocomplete, Popper, TextField,
|
|
4
|
-
import { I as Image } from "../../Image/index.
|
|
5
|
-
import { useMemo, useRef, useState, useEffect } from "react";
|
|
3
|
+
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass, useTheme, Autocomplete, Popper, TextField, Chip } from "@mui/material";
|
|
4
|
+
import { I as Image } from "../../Image/index.7ca22fd5.js";
|
|
5
|
+
import { useMemo, useRef, useState, useEffect, createElement } from "react";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
9
9
|
import { unstable_composeClasses } from "@mui/base";
|
|
10
10
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
11
11
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
12
|
-
import { u as useFormFocus } from "../../../vendor.
|
|
13
|
-
import { F as FieldLabel } from "../../FieldLabel/index.
|
|
14
|
-
import {
|
|
12
|
+
import { u as useFormFocus } from "../../../vendor.52f0234f.js";
|
|
13
|
+
import { F as FieldLabel } from "../../FieldLabel/index.6127de0c.js";
|
|
14
|
+
import { C as CircularProgress } from "../../mui_extended/CircularProgress/index.ad569afd.js";
|
|
15
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.21215143.js";
|
|
15
16
|
const AutocompleteRoot = styled("div")(({
|
|
16
17
|
theme
|
|
17
18
|
}) => ({
|
|
@@ -123,21 +124,23 @@ generateUtilityClasses(componentName, [
|
|
|
123
124
|
"sizeSmall",
|
|
124
125
|
"sizeMedium",
|
|
125
126
|
"isFocus",
|
|
126
|
-
"isTabSelected"
|
|
127
|
+
"isTabSelected",
|
|
128
|
+
"chip"
|
|
127
129
|
]);
|
|
128
130
|
function getRHFAutocompleteClassesUtilityClass(slot) {
|
|
129
131
|
return generateUtilityClass(componentName, slot);
|
|
130
132
|
}
|
|
131
133
|
const useUtilityClasses = (ownerState) => {
|
|
132
134
|
const slots = {
|
|
133
|
-
root: ["root", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.isFocus && "isFocus", ownerState.isTabSelected && "isTabSelected", ownerState.disabled && "isDisabled", ownerState.semantics === "info" && "variantInfo", ownerState.semantics === "success" && "variantSuccess", ownerState.semantics === "warning" && "variantWarning", ownerState.semantics === "error" && "variantError", ownerState.imageWidthDefined && "imageWidthDefined"],
|
|
135
|
+
root: ["root", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.isFocus && "isFocus", ownerState.isTabSelected && "isTabSelected", ownerState.disabled && "isDisabled", ownerState.semantics === "info" && "variantInfo", ownerState.semantics === "success" && "variantSuccess", ownerState.semantics === "warning" && "variantWarning", ownerState.semantics === "error" && "variantError", ownerState.imageWidthDefined && "imageWidthDefined", ownerState.multiple && "multiple"],
|
|
134
136
|
withImage: ["withImage"],
|
|
135
137
|
skeleton: ["skeleton"],
|
|
136
138
|
label: ["label"],
|
|
137
139
|
popper: ["popper", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium", ownerState.imageWidthDefined && "imageWidthDefined"],
|
|
138
140
|
skeletonRoot: ["skeletonRoot"],
|
|
139
141
|
skeletonContainerText: ["SkeletonContainerText"],
|
|
140
|
-
iconDown: ["iconDown"]
|
|
142
|
+
iconDown: ["iconDown"],
|
|
143
|
+
chip: ["chip", ownerState.size === "small" && "sizeSmall", ownerState.size === "medium" && "sizeMedium"]
|
|
141
144
|
};
|
|
142
145
|
const composedClasses = unstable_composeClasses(slots, getRHFAutocompleteClassesUtilityClass, {});
|
|
143
146
|
return {
|
|
@@ -163,17 +166,16 @@ function RHFAutocomplete(props) {
|
|
|
163
166
|
size = "small",
|
|
164
167
|
onChangeFilterParmsLocal,
|
|
165
168
|
imageWidth,
|
|
169
|
+
imageHeight,
|
|
166
170
|
mandatory,
|
|
167
171
|
mandatoryMessage,
|
|
172
|
+
multiple,
|
|
168
173
|
...other
|
|
169
174
|
} = props;
|
|
170
175
|
const {
|
|
171
176
|
getLabel
|
|
172
177
|
} = useModuleDictionary();
|
|
173
178
|
const isSkeleton = useModuleSkeleton();
|
|
174
|
-
console.log("RHFAutocomplete mandatory", mandatory);
|
|
175
|
-
console.log("RHFAutocomplete mandatoryMessage", mandatoryMessage);
|
|
176
|
-
console.log("RHFAutocomplete label", label);
|
|
177
179
|
const withImage = useMemo(() => getOptionUrlImage !== void 0, [getOptionUrlImage]);
|
|
178
180
|
const {
|
|
179
181
|
host_static_assets,
|
|
@@ -239,10 +241,10 @@ function RHFAutocomplete(props) {
|
|
|
239
241
|
isTabSelected: !isSkeleton ? isTabSelected : false,
|
|
240
242
|
semantics: currentVariant,
|
|
241
243
|
disabled,
|
|
242
|
-
imageWidthDefined: imageWidth
|
|
244
|
+
imageWidthDefined: Boolean(imageWidth),
|
|
245
|
+
multiple: Boolean(multiple)
|
|
243
246
|
};
|
|
244
247
|
const classes = useUtilityClasses(ownerState);
|
|
245
|
-
console.log("classes ***", classes);
|
|
246
248
|
const theme = useTheme();
|
|
247
249
|
return /* @__PURE__ */ jsx(AutocompleteRoot, {
|
|
248
250
|
className: classes.root,
|
|
@@ -270,8 +272,8 @@ function RHFAutocomplete(props) {
|
|
|
270
272
|
if (!open && value === null && inputValue !== "") {
|
|
271
273
|
setInputValue("");
|
|
272
274
|
}
|
|
273
|
-
if (!open && value !== null && options.length === 0
|
|
274
|
-
onChangeFilterParmsLocal(getOptionLabelLocal(value), "reset");
|
|
275
|
+
if (!open && value !== null && options.length === 0) {
|
|
276
|
+
onChangeFilterParmsLocal?.(getOptionLabelLocal(value), "reset");
|
|
275
277
|
}
|
|
276
278
|
}, [value]);
|
|
277
279
|
const checkKeyDown = (e) => {
|
|
@@ -286,8 +288,10 @@ function RHFAutocomplete(props) {
|
|
|
286
288
|
mandatoryMessage,
|
|
287
289
|
helperMessage
|
|
288
290
|
}), /* @__PURE__ */ jsx(Autocomplete, {
|
|
289
|
-
onKeyDown: checkKeyDown,
|
|
290
291
|
autoComplete: true,
|
|
292
|
+
disableClearable: true,
|
|
293
|
+
multiple,
|
|
294
|
+
onKeyDown: checkKeyDown,
|
|
291
295
|
size,
|
|
292
296
|
ref: autocompleteRef,
|
|
293
297
|
autoSelect: false,
|
|
@@ -295,9 +299,9 @@ function RHFAutocomplete(props) {
|
|
|
295
299
|
getOptionLabel: getOptionLabelLocal,
|
|
296
300
|
inputValue,
|
|
297
301
|
clearOnBlur: false,
|
|
298
|
-
PopperComponent: (
|
|
302
|
+
PopperComponent: (popperProps) => {
|
|
299
303
|
return /* @__PURE__ */ jsx(Popper, {
|
|
300
|
-
...
|
|
304
|
+
...popperProps,
|
|
301
305
|
className: classes.popper,
|
|
302
306
|
placement: "bottom-start",
|
|
303
307
|
placeholder: void 0,
|
|
@@ -316,18 +320,22 @@ function RHFAutocomplete(props) {
|
|
|
316
320
|
if (onChangeFilterParmsLocal) {
|
|
317
321
|
onChangeFilterParmsLocal(newValue, reason);
|
|
318
322
|
}
|
|
323
|
+
} else {
|
|
324
|
+
onChange(null);
|
|
319
325
|
}
|
|
320
|
-
onChange(null);
|
|
321
326
|
},
|
|
322
327
|
isOptionEqualToValue: isOptionEqualToValueLocal,
|
|
323
|
-
|
|
324
|
-
value: value || null,
|
|
328
|
+
value: Array.isArray(value) ? value : multiple ? value ? [value] : [] : value || null,
|
|
325
329
|
onOpen: onOpenLocal,
|
|
326
330
|
onClose: onCloseLocal,
|
|
327
331
|
open,
|
|
328
|
-
onChange: (_e,
|
|
329
|
-
|
|
330
|
-
|
|
332
|
+
onChange: (_e, newValue) => {
|
|
333
|
+
if (!multiple && !Array.isArray(newValue)) {
|
|
334
|
+
setInputValue(getOptionLabelLocal(newValue));
|
|
335
|
+
} else {
|
|
336
|
+
setInputValue("");
|
|
337
|
+
}
|
|
338
|
+
onChange(Array.isArray(newValue) ? [...newValue] : newValue);
|
|
331
339
|
},
|
|
332
340
|
filterOptions: onChangeFilterParmsLocal ? (x) => x : void 0,
|
|
333
341
|
loading,
|
|
@@ -342,6 +350,7 @@ function RHFAutocomplete(props) {
|
|
|
342
350
|
return /* @__PURE__ */ jsx(TextField, {
|
|
343
351
|
...params,
|
|
344
352
|
InputLabelProps: {
|
|
353
|
+
...params.InputLabelProps,
|
|
345
354
|
shrink: true
|
|
346
355
|
},
|
|
347
356
|
fullWidth: true,
|
|
@@ -351,29 +360,53 @@ function RHFAutocomplete(props) {
|
|
|
351
360
|
},
|
|
352
361
|
InputProps: {
|
|
353
362
|
...params.InputProps,
|
|
354
|
-
startAdornment:
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
363
|
+
startAdornment: /* @__PURE__ */ jsxs(Fragment, {
|
|
364
|
+
children: [!multiple && withImage && value ? /* @__PURE__ */ jsx(Image, {
|
|
365
|
+
src: getOptionUrlImageLocal(value),
|
|
366
|
+
width: imageWidth,
|
|
367
|
+
height: "100%"
|
|
368
|
+
}, "ImageTextField") : null, params.InputProps.startAdornment]
|
|
369
|
+
}),
|
|
370
|
+
endAdornment: loading ? /* @__PURE__ */ jsx(CircularProgress, {
|
|
371
|
+
color: "inherit",
|
|
372
|
+
size: 18
|
|
373
|
+
}) : /* @__PURE__ */ jsx(IconButton, {
|
|
374
|
+
className: classes.iconDown,
|
|
375
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/RHFAutocompletarAsync/assets/icons/chevronDown.svg`,
|
|
376
|
+
onClick: (event) => onOpenLocal(event),
|
|
377
|
+
disabled,
|
|
378
|
+
size
|
|
370
379
|
})
|
|
371
380
|
},
|
|
372
381
|
autoComplete: "off",
|
|
373
382
|
error: !!error,
|
|
374
383
|
...other
|
|
375
384
|
});
|
|
376
|
-
}
|
|
385
|
+
},
|
|
386
|
+
...multiple ? {
|
|
387
|
+
renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => {
|
|
388
|
+
const {
|
|
389
|
+
key,
|
|
390
|
+
...restTagProps
|
|
391
|
+
} = getTagProps({
|
|
392
|
+
index
|
|
393
|
+
});
|
|
394
|
+
return /* @__PURE__ */ createElement(Chip, {
|
|
395
|
+
...restTagProps,
|
|
396
|
+
key,
|
|
397
|
+
label: getOptionLabelLocal(option),
|
|
398
|
+
className: classes.chip,
|
|
399
|
+
icon: withImage && option ? /* @__PURE__ */ jsx(Image, {
|
|
400
|
+
src: getOptionUrlImageLocal(option),
|
|
401
|
+
width: imageWidth,
|
|
402
|
+
height: imageHeight ?? "100%"
|
|
403
|
+
}) : void 0,
|
|
404
|
+
sx: {
|
|
405
|
+
...theme.components?.M4LRHFAutocompleteChip?.styleOverrides
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
})
|
|
409
|
+
} : {}
|
|
377
410
|
}), currentVariant === "error" ? /* @__PURE__ */ jsx(HelperText, {
|
|
378
411
|
variant: currentVariant,
|
|
379
412
|
message: error?.message
|
|
@@ -9,8 +9,8 @@ export interface RHFAutocompleteProps<T> extends Omit<TextFieldProps, 'label' |
|
|
|
9
9
|
getOptionLabel: (option: T) => string;
|
|
10
10
|
getOptionUrlImage?: (option: T) => string;
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* El valor de tamaño en anchura que va a tener el elemento de imagen.
|
|
13
|
+
*/
|
|
14
14
|
imageWidth?: string | number;
|
|
15
15
|
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
16
16
|
skeletonWidth?: string | number;
|
|
@@ -23,6 +23,7 @@ export interface RHFAutocompleteProps<T> extends Omit<TextFieldProps, 'label' |
|
|
|
23
23
|
onClose?: (event: React.SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
24
24
|
onChangeFilterParmsLocal?: (newValue: string, reason: AutocompleteInputChangeReason) => void;
|
|
25
25
|
imageHeight?: string | number;
|
|
26
|
+
multiple?: boolean;
|
|
26
27
|
}
|
|
27
28
|
export interface OwnerState extends Pick<RHFAutocompleteProps<any>, 'size' | 'disabled'> {
|
|
28
29
|
isFocus: boolean;
|
|
@@ -30,4 +31,5 @@ export interface OwnerState extends Pick<RHFAutocompleteProps<any>, 'size' | 'di
|
|
|
30
31
|
semantics: RHFAutocompleteVariants | 'error' | null;
|
|
31
32
|
variant?: 'withImage';
|
|
32
33
|
imageWidthDefined: boolean;
|
|
34
|
+
multiple: boolean;
|
|
33
35
|
}
|
|
@@ -5,7 +5,7 @@ import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/mater
|
|
|
5
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.
|
|
8
|
+
import { R as RHFAutocomplete, g as getRHFAutocompleteComponentsDictionary } from "../RHFAutocomplete/index.48f7b38f.js";
|
|
9
9
|
styled("div")(() => ({
|
|
10
10
|
display: "flex",
|
|
11
11
|
width: "100%",
|
|
@@ -6,8 +6,8 @@ import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
|
6
6
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
7
7
|
import { useModuleSkeleton } from "@m4l/core";
|
|
8
8
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
|
-
import { u as useFormFocus } from "../../../vendor.
|
|
10
|
-
import { C as CheckBox } from "../../mui_extended/CheckBox.
|
|
9
|
+
import { u as useFormFocus } from "../../../vendor.52f0234f.js";
|
|
10
|
+
import { C as CheckBox } from "../../mui_extended/CheckBox.4e2fa17c.js";
|
|
11
11
|
const RHFCheckboxRoot = styled("div")(({
|
|
12
12
|
theme
|
|
13
13
|
}) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { useFormContext, useWatch, Controller } from "react-hook-form";
|
|
3
3
|
import { useModuleSkeleton, useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { S as SketchPicker } from "../../../node_modules.
|
|
4
|
+
import { S as SketchPicker } from "../../../node_modules.0fb6293f.js";
|
|
5
5
|
import "lodash-es/debounce";
|
|
6
6
|
import "lodash-es/each";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
@@ -10,11 +10,11 @@ import { generateUtilityClasses, generateUtilityClass, styled, Skeleton } from "
|
|
|
10
10
|
import { unstable_composeClasses } from "@mui/base";
|
|
11
11
|
import { useTheme } from "@mui/material/styles";
|
|
12
12
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
13
|
-
import { u as useFormFocus } from "../../../vendor.
|
|
14
|
-
import { F as FieldLabel } from "../../FieldLabel/index.
|
|
13
|
+
import { u as useFormFocus } from "../../../vendor.52f0234f.js";
|
|
14
|
+
import { F as FieldLabel } from "../../FieldLabel/index.6127de0c.js";
|
|
15
15
|
import { P as Popover } from "../../mui_extended/Popover/index.d85de73b.js";
|
|
16
|
-
import { I as Icon } from "../../Icon/index.
|
|
17
|
-
import { B as Button } from "../../mui_extended/Button/index.
|
|
16
|
+
import { I as Icon } from "../../Icon/index.d34ed400.js";
|
|
17
|
+
import { B as Button } from "../../mui_extended/Button/index.7265987f.js";
|
|
18
18
|
const componentName = "M4LRHFColorPicker";
|
|
19
19
|
const colorPickerClasses = generateUtilityClasses(componentName, [
|
|
20
20
|
"root",
|
|
@@ -9,9 +9,9 @@ import { unstable_composeClasses } from "@mui/base";
|
|
|
9
9
|
import clsx from "clsx";
|
|
10
10
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
11
11
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
12
|
-
import { u as useFormFocus } from "../../../vendor.
|
|
13
|
-
import { F as FieldLabel } from "../../FieldLabel/index.
|
|
14
|
-
import { I as Icon } from "../../Icon/index.
|
|
12
|
+
import { u as useFormFocus } from "../../../vendor.52f0234f.js";
|
|
13
|
+
import { F as FieldLabel } from "../../FieldLabel/index.6127de0c.js";
|
|
14
|
+
import { I as Icon } from "../../Icon/index.d34ed400.js";
|
|
15
15
|
const SkeletonRHFDateTime = (props) => {
|
|
16
16
|
const {
|
|
17
17
|
skeletonWidth,
|
|
@@ -4,9 +4,9 @@ import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import { useModuleSkeleton } from "@m4l/core";
|
|
6
6
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
|
-
import { u as useFormFocus } from "../../../vendor.
|
|
8
|
-
import { F as FieldLabel } from "../../FieldLabel/index.
|
|
9
|
-
import { P as Period } from "../../Period/index.
|
|
7
|
+
import { u as useFormFocus } from "../../../vendor.52f0234f.js";
|
|
8
|
+
import { F as FieldLabel } from "../../FieldLabel/index.6127de0c.js";
|
|
9
|
+
import { P as Period } from "../../Period/index.0e647446.js";
|
|
10
10
|
const RHFPeriodRoot = styled("div")(({
|
|
11
11
|
theme
|
|
12
12
|
}) => ({
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { styled, Skeleton, generateUtilityClasses, TextField, InputAdornment, generateUtilityClass } from "@mui/material";
|
|
3
3
|
import { forwardRef, useState, useEffect } from "react";
|
|
4
|
-
import { I as IconButton } from "../../mui_extended/IconButton/index.
|
|
4
|
+
import { I as IconButton } from "../../mui_extended/IconButton/index.21215143.js";
|
|
5
5
|
import { useFormContext, Controller } from "react-hook-form";
|
|
6
6
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { unstable_composeClasses } from "@mui/base";
|
|
9
|
-
import { g as getComponentUtilityClass } from "../../../utils/index.
|
|
9
|
+
import { g as getComponentUtilityClass } from "../../../utils/index.d2e8f376.js";
|
|
10
10
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
11
11
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
12
|
-
import { u as useFormFocus } from "../../../vendor.
|
|
13
|
-
import { F as FieldLabel } from "../../FieldLabel/index.
|
|
12
|
+
import { u as useFormFocus } from "../../../vendor.52f0234f.js";
|
|
13
|
+
import { F as FieldLabel } from "../../FieldLabel/index.6127de0c.js";
|
|
14
14
|
const SkeletonTextFieldRoot = styled("div")(() => ({
|
|
15
15
|
display: "flex",
|
|
16
16
|
flexDirection: "column",
|
|
@@ -2,14 +2,14 @@ import { useCallback } from "react";
|
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
3
|
import require$$0 from "lodash/isString";
|
|
4
4
|
import { useDropzone } from "react-dropzone";
|
|
5
|
-
import { I as Image } from "../../Image/index.
|
|
5
|
+
import { I as Image } from "../../Image/index.7ca22fd5.js";
|
|
6
6
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
7
7
|
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
8
8
|
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
9
9
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
10
10
|
import { unstable_composeClasses } from "@mui/base";
|
|
11
11
|
import { T as Typography } from "../../mui_extended/Typography/index.379dd374.js";
|
|
12
|
-
import { B as Button } from "../../mui_extended/Button/index.
|
|
12
|
+
import { B as Button } from "../../mui_extended/Button/index.7265987f.js";
|
|
13
13
|
import { H as HelperText } from "../../HelperText/index.7d2afdb3.js";
|
|
14
14
|
const UploadImageRoot = styled("div")(({
|
|
15
15
|
theme
|