@threedddplus/logoeditor 0.0.112-5 → 0.0.113
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/dist/LogoEditor.d.ts +3 -2
- package/dist/logoeditor.cjs.development.js +14 -22
- package/dist/logoeditor.cjs.development.js.map +1 -1
- package/dist/logoeditor.cjs.production.min.js +1 -1
- package/dist/logoeditor.cjs.production.min.js.map +1 -1
- package/dist/logoeditor.esm.js +14 -22
- package/dist/logoeditor.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/logoeditor.esm.js
CHANGED
@@ -14790,41 +14790,31 @@ var LogoEditor = function LogoEditor(_ref) {
|
|
14790
14790
|
defaultColorList = _ref.defaultColorList,
|
14791
14791
|
logoData = _ref.logoData,
|
14792
14792
|
customerId = _ref.customerId,
|
14793
|
-
onSaveLogo = _ref.onSaveLogo
|
14793
|
+
onSaveLogo = _ref.onSaveLogo,
|
14794
|
+
onClose = _ref.onClose;
|
14794
14795
|
var _use3dddPlus = use3dddPlus(function (state) {
|
14795
14796
|
return [state.setSelectedStepper, state.loading, state.myLogoHandler];
|
14796
14797
|
}),
|
14797
14798
|
setSelectedStepper = _use3dddPlus[0],
|
14798
14799
|
loading = _use3dddPlus[1],
|
14799
14800
|
myLogoHandler = _use3dddPlus[2];
|
14800
|
-
|
14801
|
-
|
14802
|
-
|
14803
|
-
|
14804
|
-
fontFamilies = _React$useState[0],
|
14805
|
-
setFontFamilies = _React$useState[1];
|
14806
|
-
React.useEffect(function () {
|
14801
|
+
var _useState = useState([]),
|
14802
|
+
fontFamilies = _useState[0],
|
14803
|
+
setFontFamilies = _useState[1];
|
14804
|
+
useEffect(function () {
|
14807
14805
|
setSelectedStepper(stepperId);
|
14808
|
-
if (stepperId
|
14806
|
+
if (stepperId === undefined) {
|
14809
14807
|
myLogoHandler(logoData);
|
14810
14808
|
}
|
14811
|
-
}, [stepperId]);
|
14812
|
-
React.useEffect(function () {
|
14813
14809
|
use3dddPlus.setState({
|
14814
14810
|
customUploadLogoColorList: customLogoColorList
|
14815
14811
|
});
|
14816
|
-
}, [customLogoColorList]);
|
14817
|
-
React.useEffect(function () {
|
14818
14812
|
use3dddPlus.setState({
|
14819
14813
|
defaultColorList: defaultColorList
|
14820
14814
|
});
|
14821
|
-
}, [defaultColorList]);
|
14822
|
-
React.useEffect(function () {
|
14823
14815
|
use3dddPlus.setState({
|
14824
14816
|
customerId: customerId
|
14825
14817
|
});
|
14826
|
-
}, [customerId]);
|
14827
|
-
React.useEffect(function () {
|
14828
14818
|
fetch('https://storage.googleapis.com/3ddplusgcp/richardson-customizer/fonts/fontFamilies.json').then(function (response) {
|
14829
14819
|
return response.json();
|
14830
14820
|
}).then(function (data) {
|
@@ -14832,12 +14822,13 @@ var LogoEditor = function LogoEditor(_ref) {
|
|
14832
14822
|
})["catch"](function (error) {
|
14833
14823
|
return console.error('Error fetching font families:', error);
|
14834
14824
|
});
|
14835
|
-
}, []);
|
14825
|
+
}, [stepperId, customLogoColorList, defaultColorList, customerId, logoData, myLogoHandler, setSelectedStepper]);
|
14836
14826
|
return React.createElement(Modal, {
|
14837
14827
|
backdropStyle: "z-[7]",
|
14838
|
-
contentStyle:
|
14828
|
+
contentStyle: "top-0 bottom-0 !m-[auto] z-[7] w-[80%] p-0",
|
14829
|
+
crossOnClick: onClose
|
14839
14830
|
}, React.createElement("div", {
|
14840
|
-
className: "
|
14831
|
+
className: "flex flex-col md:flex-row w-full h-[88vh]"
|
14841
14832
|
}, React.createElement(ToastContainer, {
|
14842
14833
|
position: "top-center",
|
14843
14834
|
autoClose: 3000,
|
@@ -14850,14 +14841,15 @@ var LogoEditor = function LogoEditor(_ref) {
|
|
14850
14841
|
pauseOnHover: true,
|
14851
14842
|
theme: "colored",
|
14852
14843
|
transition: Bounce
|
14853
|
-
}), fontFamilies.map(function (font) {
|
14844
|
+
}), fontFamilies.map(function (font, index) {
|
14854
14845
|
return React.createElement(FontLoader, {
|
14846
|
+
key: index,
|
14855
14847
|
fontPath: font
|
14856
14848
|
});
|
14857
14849
|
}), loading && React.createElement(Loader, null), React.createElement("div", {
|
14858
14850
|
className: "w-[10%] h-[100%]"
|
14859
14851
|
}, React.createElement(LeftMenu, null)), React.createElement("div", {
|
14860
|
-
className: "flex h-full w-[90%]"
|
14852
|
+
className: "flex h-full w-[90%] flex-1"
|
14861
14853
|
}, React.createElement(MiddleMenu, {
|
14862
14854
|
onApply: onApply,
|
14863
14855
|
onSaveLogo: onSaveLogo
|