@bruit/component
Advanced tools
Comparing version 0.7.7-3 to 0.7.7-4
@@ -45,2 +45,5 @@ import { BrtFieldType } from '@bruit/types/dist/enums/brt-field-type'; | ||
} | ||
waitRendering() { | ||
return new Promise(resolve => setTimeout(resolve)); | ||
} | ||
newFeedback(bruitIoConfig, data, dataFn) { | ||
@@ -63,16 +66,12 @@ let preparePromise; | ||
this.closeModal(); | ||
setTimeout(() => { | ||
return feedback.send(dataFromModal, data, dataFn); | ||
}); | ||
return this.waitRendering().then(() => feedback.send(dataFromModal, data, dataFn)); | ||
} | ||
else { | ||
this.setSubmitButtonState(SubmitButtonState.LOADING); | ||
return setTimeout(() => { | ||
feedback.send(dataFromModal, data, dataFn).then(() => { | ||
this.setSubmitButtonState(SubmitButtonState.CHECKED); | ||
return new Promise(resolve => { | ||
setTimeout(() => resolve(), this._bruitIoConfig.durationBeforeClosing); | ||
}); | ||
return this.waitRendering().then(() => feedback.send(dataFromModal, data, dataFn).then(() => { | ||
this.setSubmitButtonState(SubmitButtonState.CHECKED); | ||
return new Promise(resolve => { | ||
setTimeout(() => resolve(), this._bruitIoConfig.durationBeforeClosing); | ||
}); | ||
}); | ||
})); | ||
} | ||
@@ -79,0 +78,0 @@ }) |
@@ -48,2 +48,3 @@ import '../../stencil.core'; | ||
componentWillLoad(): void; | ||
waitRendering(): Promise<{}>; | ||
/** | ||
@@ -50,0 +51,0 @@ * called on click on component |
{ | ||
"name": "@bruit/component", | ||
"version": "0.7.7-3", | ||
"version": "0.7.7-4", | ||
"description": "send your feedbacks with bruit.io", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2426309
20257