@salesgenterp/ui-components 0.4.217 → 0.4.218
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/index.js +26 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +26 -19
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8220,7 +8220,8 @@ var RenderTawk = function RenderTawk(_ref) {
|
|
|
8220
8220
|
|
|
8221
8221
|
var _templateObject$w, _templateObject2$m;
|
|
8222
8222
|
var ContactUsForm = function ContactUsForm(_ref) {
|
|
8223
|
-
var
|
|
8223
|
+
var apiEndPoint = _ref.apiEndPoint,
|
|
8224
|
+
primaryColor = _ref.primaryColor,
|
|
8224
8225
|
secondaryColor = _ref.secondaryColor,
|
|
8225
8226
|
fontColor = _ref.fontColor,
|
|
8226
8227
|
googleReCaptchaKey = _ref.googleReCaptchaKey,
|
|
@@ -8239,25 +8240,31 @@ var ContactUsForm = function ContactUsForm(_ref) {
|
|
|
8239
8240
|
reset = _useForm.reset;
|
|
8240
8241
|
var update = function update(formData) {
|
|
8241
8242
|
try {
|
|
8242
|
-
var _temp2 = function _temp2() {
|
|
8243
|
-
setIsLoading(false);
|
|
8244
|
-
};
|
|
8245
8243
|
if (!isCaptchaVerified) return Promise.resolve(alert('Please Mark the captcha to continue'));
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8244
|
+
var _temp3 = function () {
|
|
8245
|
+
if (apiEndPoint) {
|
|
8246
|
+
var _temp2 = function _temp2() {
|
|
8247
|
+
setIsLoading(false);
|
|
8248
|
+
};
|
|
8249
|
+
setIsLoading(true);
|
|
8250
|
+
var _temp = _catch(function () {
|
|
8251
|
+
return Promise.resolve(API$1({
|
|
8252
|
+
apiEndPoint: apiEndPoint === null || apiEndPoint === void 0 ? void 0 : apiEndPoint.replace('/api', '/services/pdf'),
|
|
8253
|
+
method: 'POST',
|
|
8254
|
+
url: "/email/customer/contact-us",
|
|
8255
|
+
body: _extends({}, formData, {
|
|
8256
|
+
logoUrl: logoUrl
|
|
8257
|
+
}),
|
|
8258
|
+
errorMessage: 'Error in contact us form.',
|
|
8259
|
+
successMessage: 'Your message is sent successfully. We will contact you soon.'
|
|
8260
|
+
})).then(function () {
|
|
8261
|
+
reset();
|
|
8262
|
+
});
|
|
8263
|
+
}, function () {});
|
|
8264
|
+
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
8265
|
+
}
|
|
8266
|
+
}();
|
|
8267
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
8261
8268
|
} catch (e) {
|
|
8262
8269
|
return Promise.reject(e);
|
|
8263
8270
|
}
|