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