@m4l/components 0.2.20 → 0.2.21
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.
|
@@ -2,7 +2,7 @@ import React__default, { useState, useRef, useCallback, useEffect, useMemo } fro
|
|
|
2
2
|
import { D as DraggableCore_1 } from "../../react-draggable.38b6012b.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
|
-
import { M as MAP_ZINDEX_OVER_MAP } from "../../vendor.
|
|
5
|
+
import { M as MAP_ZINDEX_OVER_MAP } from "../../vendor.daffbfe5.js";
|
|
6
6
|
import { generateUtilityClasses } from "@mui/material";
|
|
7
7
|
import "@mui/base";
|
|
8
8
|
import { M as MAP_ZINDEX_OVER_MAP$1 } from "../PopupsProvider/index.3d5ad0ee.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { useFormContext, Controller } from "react-hook-form";
|
|
2
|
+
import { useFormContext, useWatch, Controller } from "react-hook-form";
|
|
3
3
|
import { useModuleSkeleton, useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
4
4
|
import { S as SketchPicker } from "../../../node_modules.448153f1.js";
|
|
5
5
|
import "lodash-es/debounce";
|
|
@@ -55,8 +55,7 @@ const RHFColorPicker = (props) => {
|
|
|
55
55
|
} = props;
|
|
56
56
|
const {
|
|
57
57
|
control,
|
|
58
|
-
setValue
|
|
59
|
-
getValues
|
|
58
|
+
setValue
|
|
60
59
|
} = useFormContext();
|
|
61
60
|
const isSkeleton = useModuleSkeleton();
|
|
62
61
|
const {
|
|
@@ -64,13 +63,17 @@ const RHFColorPicker = (props) => {
|
|
|
64
63
|
environment_assets
|
|
65
64
|
} = useEnvironment();
|
|
66
65
|
const theme = useTheme();
|
|
67
|
-
const currentColor =
|
|
66
|
+
const currentColor = useWatch({
|
|
67
|
+
name,
|
|
68
|
+
control
|
|
69
|
+
});
|
|
68
70
|
const [tempColor, setTempColor] = useState(() => currentColor || "#ffffff");
|
|
69
71
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
70
72
|
const {
|
|
71
73
|
getLabel
|
|
72
74
|
} = useModuleDictionary();
|
|
73
75
|
const handleColorChange = (color) => {
|
|
76
|
+
console.log("react color pick", color.hex);
|
|
74
77
|
setTempColor(color.hex);
|
|
75
78
|
};
|
|
76
79
|
const handleApprove = () => {
|
package/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { u } from "./components/areas/hooks/useDynamicMFParameters/index.e52c539
|
|
|
21
21
|
import { u as u2 } from "./components/areas/hooks/useWindowToolsMF/index.b7afaf88.js";
|
|
22
22
|
import { A as A5, D as D2, L as L3, a as a4, g as g2 } from "./components/areas/dictionary.08cfc4c9.js";
|
|
23
23
|
import { R, g as g3 } from "./components/hook-form/RHFAutocomplete/index.d05ae217.js";
|
|
24
|
-
import { R as R2 } from "./components/hook-form/RHFColorPicker/index.
|
|
24
|
+
import { R as R2 } from "./components/hook-form/RHFColorPicker/index.c069ef4d.js";
|
|
25
25
|
import { R as R3, g as g4 } from "./components/hook-form/RHFAutocompleteAsync/index.699b8aaf.js";
|
|
26
26
|
import { R as R4 } from "./components/hook-form/RHFDateTime/index.97bd36d7.js";
|
|
27
27
|
import { R as R5 } from "./components/hook-form/RHFMultiCheckbox/index.2680b3b6.js";
|
|
@@ -74,7 +74,7 @@ import { A as A9 } from "./components/CommonActions/components/ActionCancel/inde
|
|
|
74
74
|
import { A as A10 } from "./components/CommonActions/components/ActionIntro/index.64498081.js";
|
|
75
75
|
import { A as A11 } from "./components/CommonActions/components/ActionFormCancel/index.6fd990b7.js";
|
|
76
76
|
import { A as A12 } from "./components/CommonActions/components/ActionFormIntro/index.798cb977.js";
|
|
77
|
-
import { D as D5, d as d4 } from "./components/DragResizeWindow/index.
|
|
77
|
+
import { D as D5, d as d4 } from "./components/DragResizeWindow/index.7c402375.js";
|
|
78
78
|
import { G, w, A as A13 } from "./components/GridLayout/index.88b62a5d.js";
|
|
79
79
|
import { R as R12, a as a8, b as b6, c as c5 } from "./components/GridLayout/subcomponents/Responsive/index.dfed4e68.js";
|
|
80
80
|
import { w as w2 } from "./components/GridLayout/subcomponents/SizeProvider/index.6b5de802.js";
|
|
@@ -163,7 +163,7 @@ import "@mui/material/Button";
|
|
|
163
163
|
import "@mui/lab";
|
|
164
164
|
import "./hocs/withToggle/index.e44eb0da.js";
|
|
165
165
|
import "./components/WrapperComponent/index.5e872594.js";
|
|
166
|
-
import "./vendor.
|
|
166
|
+
import "./vendor.daffbfe5.js";
|
|
167
167
|
import "./components/PopupsProvider/index.3d5ad0ee.js";
|
|
168
168
|
import "./components/GridLayout/subcomponents/Griditem/index.5256b153.js";
|
|
169
169
|
import "fast-equals";
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ import "./components/areas/hooks/useDynamicMFParameters/index.e52c5392.js";
|
|
|
21
21
|
import "./components/areas/hooks/useWindowToolsMF/index.b7afaf88.js";
|
|
22
22
|
import "./components/areas/dictionary.08cfc4c9.js";
|
|
23
23
|
import "./components/hook-form/RHFAutocomplete/index.d05ae217.js";
|
|
24
|
-
import "./components/hook-form/RHFColorPicker/index.
|
|
24
|
+
import "./components/hook-form/RHFColorPicker/index.c069ef4d.js";
|
|
25
25
|
import "./components/hook-form/RHFAutocompleteAsync/index.699b8aaf.js";
|
|
26
26
|
import "./components/hook-form/RHFDateTime/index.97bd36d7.js";
|
|
27
27
|
import "./components/hook-form/RHFMultiCheckbox/index.2680b3b6.js";
|
|
@@ -74,7 +74,7 @@ import "./components/CommonActions/components/ActionCancel/index.bd595785.js";
|
|
|
74
74
|
import "./components/CommonActions/components/ActionIntro/index.64498081.js";
|
|
75
75
|
import "./components/CommonActions/components/ActionFormCancel/index.6fd990b7.js";
|
|
76
76
|
import "./components/CommonActions/components/ActionFormIntro/index.798cb977.js";
|
|
77
|
-
import "./components/DragResizeWindow/index.
|
|
77
|
+
import "./components/DragResizeWindow/index.7c402375.js";
|
|
78
78
|
import "./components/GridLayout/index.88b62a5d.js";
|
|
79
79
|
import "./components/GridLayout/subcomponents/Responsive/index.dfed4e68.js";
|
|
80
80
|
import "./components/GridLayout/subcomponents/SizeProvider/index.6b5de802.js";
|