@product7/product7-js 0.4.6 → 0.4.8
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/package.json
CHANGED
|
@@ -771,7 +771,7 @@ export const messengerComponentsStyles = `
|
|
|
771
771
|
.messenger-prechat-form {
|
|
772
772
|
display: flex;
|
|
773
773
|
flex-direction: column;
|
|
774
|
-
gap: var(--spacing-
|
|
774
|
+
gap: var(--spacing-2);
|
|
775
775
|
}
|
|
776
776
|
|
|
777
777
|
.messenger-prechat-field {
|
|
@@ -782,7 +782,7 @@ export const messengerComponentsStyles = `
|
|
|
782
782
|
|
|
783
783
|
.messenger-prechat-input {
|
|
784
784
|
width: 100%;
|
|
785
|
-
padding: var(--spacing-
|
|
785
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
786
786
|
border: 1px solid var(--msg-border);
|
|
787
787
|
border-radius: var(--radius-md);
|
|
788
788
|
font-size: var(--font-size-sm);
|
|
@@ -812,7 +812,7 @@ export const messengerComponentsStyles = `
|
|
|
812
812
|
align-items: center;
|
|
813
813
|
justify-content: center;
|
|
814
814
|
gap: var(--spacing-2);
|
|
815
|
-
padding: var(--spacing-
|
|
815
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
816
816
|
border-radius: var(--radius-md);
|
|
817
817
|
font-size: var(--font-size-sm);
|
|
818
818
|
font-weight: var(--font-weight-medium);
|
|
@@ -938,16 +938,16 @@ export class SurveyWidget extends BaseWidget {
|
|
|
938
938
|
};
|
|
939
939
|
|
|
940
940
|
try {
|
|
941
|
-
if (this.surveyOptions.onSubmit) {
|
|
942
|
-
this.surveyOptions.onSubmit(response);
|
|
943
|
-
}
|
|
944
|
-
|
|
945
941
|
const surveyId =
|
|
946
942
|
this.surveyOptions.surveyId || `local_${type}_${Date.now()}`;
|
|
947
943
|
await this.apiService.submitSurveyResponse(surveyId, responseData);
|
|
948
944
|
|
|
949
945
|
this.sdk.eventBus.emit('survey:submitted', { widget: this, response });
|
|
950
946
|
this._showThankYouScreen();
|
|
947
|
+
|
|
948
|
+
if (this.surveyOptions.onSubmit) {
|
|
949
|
+
this.surveyOptions.onSubmit(response);
|
|
950
|
+
}
|
|
951
951
|
} catch (error) {
|
|
952
952
|
console.error('[SurveyWidget] Failed to submit survey:', error);
|
|
953
953
|
this._showError('Something went wrong. Please try again.');
|