pushfeedback 0.1.57 → 0.1.58
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/cjs/feedback-button_2.cjs.entry.js +9303 -0
- package/dist/cjs/index-9a8f4784.js +1584 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/pushfeedback.cjs.js +23 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/feedback-button/feedback-button.css +75 -0
- package/dist/collection/components/feedback-button/feedback-button.js +786 -0
- package/dist/collection/components/feedback-modal/feedback-modal.css +440 -0
- package/dist/collection/components/feedback-modal/feedback-modal.js +975 -0
- package/dist/collection/index.js +1 -0
- package/dist/{pushfeedback/feedback-button.entry.js → components/feedback-button.js} +65 -8
- package/dist/components/feedback-modal.js +6 -0
- package/dist/{pushfeedback/feedback-modal.entry.js → components/feedback-modal2.js} +72 -44
- package/dist/components/index.js +3 -0
- package/dist/esm/feedback-button_2.entry.js +9298 -0
- package/dist/esm/index-f65e9124.js +1555 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/pushfeedback.js +18 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pushfeedback/index.esm.js +0 -1
- package/dist/pushfeedback/p-af2a1f7f.js +2 -0
- package/dist/pushfeedback/p-d87293f8.entry.js +22 -0
- package/dist/pushfeedback/pushfeedback.css +1 -112
- package/dist/pushfeedback/pushfeedback.esm.js +1 -148
- package/package.json +1 -1
- package/dist/pushfeedback/app-globals-0f993ce5.js +0 -3
- package/dist/pushfeedback/css-shim-b7d3d95f.js +0 -4
- package/dist/pushfeedback/dom-64053c71.js +0 -73
- package/dist/pushfeedback/index-36434da0.js +0 -3371
- package/dist/pushfeedback/shadow-css-98135883.js +0 -387
|
@@ -0,0 +1,975 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import html2canvas from 'html2canvas-pro';
|
|
3
|
+
export class FeedbackModal {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.onScrollDebounced = () => {
|
|
6
|
+
clearTimeout(this.scrollTimeout);
|
|
7
|
+
this.scrollTimeout = setTimeout(() => {
|
|
8
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-closing');
|
|
9
|
+
document.documentElement.style.top = "";
|
|
10
|
+
window.removeEventListener('scroll', this.onScrollDebounced);
|
|
11
|
+
}, 200);
|
|
12
|
+
};
|
|
13
|
+
this.handleSubmit = async (event) => {
|
|
14
|
+
event.preventDefault();
|
|
15
|
+
this.resetOverflow();
|
|
16
|
+
this.showScreenshotMode = false;
|
|
17
|
+
this.showScreenshotTopBar = false;
|
|
18
|
+
this.showModal = false;
|
|
19
|
+
this.sending = true;
|
|
20
|
+
try {
|
|
21
|
+
const body = {
|
|
22
|
+
url: window.location.href,
|
|
23
|
+
message: this.formMessage,
|
|
24
|
+
email: this.formEmail,
|
|
25
|
+
project: this.project,
|
|
26
|
+
screenshot: this.encodedScreenshot,
|
|
27
|
+
rating: this.selectedRating,
|
|
28
|
+
ratingMode: this.ratingMode,
|
|
29
|
+
verification: this.formVerification,
|
|
30
|
+
session: localStorage.getItem('pushfeedback_sessionid') || '',
|
|
31
|
+
};
|
|
32
|
+
const res = await fetch('https://app.pushfeedback.com/api/feedback/', {
|
|
33
|
+
method: 'POST',
|
|
34
|
+
body: JSON.stringify(body),
|
|
35
|
+
headers: {
|
|
36
|
+
'Content-Type': 'application/json'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
if (res.status === 201) {
|
|
40
|
+
const feedback_with_id = Object.assign(Object.assign({}, body), { id: await res.json() });
|
|
41
|
+
this.feedbackSent.emit({ feedback: feedback_with_id });
|
|
42
|
+
this.formSuccess = true;
|
|
43
|
+
this.formError = false;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const errorText = await res.text();
|
|
47
|
+
const response = {
|
|
48
|
+
status: res.status,
|
|
49
|
+
message: errorText,
|
|
50
|
+
};
|
|
51
|
+
this.feedbackError.emit({ error: response });
|
|
52
|
+
this.formSuccess = false;
|
|
53
|
+
this.formError = true;
|
|
54
|
+
this.formErrorStatus = res.status;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
const response = {
|
|
59
|
+
status: 500,
|
|
60
|
+
message: error,
|
|
61
|
+
};
|
|
62
|
+
this.feedbackError.emit({ error: response });
|
|
63
|
+
this.formSuccess = false;
|
|
64
|
+
this.formError = true;
|
|
65
|
+
this.formErrorStatus = 500;
|
|
66
|
+
}
|
|
67
|
+
finally {
|
|
68
|
+
this.sending = false;
|
|
69
|
+
this.showModal = true;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.close = () => {
|
|
73
|
+
this.isAnimating = false;
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
this.sending = false;
|
|
76
|
+
this.showModal = false;
|
|
77
|
+
this.showScreenshotMode = false;
|
|
78
|
+
this.showScreenshotTopBar = false;
|
|
79
|
+
this.hasSelectedElement = false;
|
|
80
|
+
this.encodedScreenshot = null;
|
|
81
|
+
this.formSuccess = false;
|
|
82
|
+
this.formError = false;
|
|
83
|
+
this.formErrorStatus = 500;
|
|
84
|
+
this.formMessage = '';
|
|
85
|
+
this.formEmail = '';
|
|
86
|
+
this.resetOverflow();
|
|
87
|
+
}, 200);
|
|
88
|
+
};
|
|
89
|
+
this.openScreenShot = () => {
|
|
90
|
+
this.hasSelectedElement = false;
|
|
91
|
+
this.showModal = false;
|
|
92
|
+
this.showScreenshotMode = true;
|
|
93
|
+
this.showScreenshotTopBar = true;
|
|
94
|
+
this.encodedScreenshot = null;
|
|
95
|
+
if (window.innerWidth > document.documentElement.clientWidth) {
|
|
96
|
+
document.documentElement.classList.add('feedback-modal-screenshot-open--scroll');
|
|
97
|
+
}
|
|
98
|
+
const scrollY = window.scrollY;
|
|
99
|
+
document.documentElement.style.top = `-${scrollY}px`;
|
|
100
|
+
window.scrollTo(0, parseInt(document.documentElement.style.top || '0') * -1);
|
|
101
|
+
document.documentElement.classList.add('feedback-modal-screenshot-open');
|
|
102
|
+
};
|
|
103
|
+
this.closeScreenShot = () => {
|
|
104
|
+
this.showModal = false;
|
|
105
|
+
this.showScreenshotMode = false;
|
|
106
|
+
this.showScreenshotTopBar = false;
|
|
107
|
+
this.hasSelectedElement = false;
|
|
108
|
+
this.encodedScreenshot = null;
|
|
109
|
+
this.resetOverflow();
|
|
110
|
+
};
|
|
111
|
+
this.handleMouseOverScreenShot = (event) => {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
if (this.hasSelectedElement)
|
|
114
|
+
return;
|
|
115
|
+
const borderOffset = 2;
|
|
116
|
+
this.screenshotModal.style.display = 'none';
|
|
117
|
+
const elementUnder = document.elementFromPoint(event.clientX, event.clientY);
|
|
118
|
+
const rect = elementUnder.getBoundingClientRect();
|
|
119
|
+
this.screenshotModal.style.display = '';
|
|
120
|
+
// Get the bounding box of the element selected
|
|
121
|
+
this.elementSelected.style.position = "absolute";
|
|
122
|
+
this.elementSelected.style.left = `${rect.left}px`;
|
|
123
|
+
this.elementSelected.style.top = `${rect.top}px`;
|
|
124
|
+
this.elementSelected.style.width = `${rect.width}px`;
|
|
125
|
+
this.elementSelected.style.height = `${rect.height}px`;
|
|
126
|
+
this.elementSelected.classList.add('feedback-modal-element-hover');
|
|
127
|
+
// Set the background color of nonselected areas
|
|
128
|
+
// Top
|
|
129
|
+
this.topSide.style.position = "absolute";
|
|
130
|
+
this.topSide.style.left = `${rect.left}px`;
|
|
131
|
+
this.topSide.style.top = '0px';
|
|
132
|
+
this.topSide.style.width = `${rect.width + borderOffset}px`;
|
|
133
|
+
this.topSide.style.height = `${rect.top}px`;
|
|
134
|
+
this.topSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
|
|
135
|
+
// Left
|
|
136
|
+
this.leftSide.style.position = "absolute";
|
|
137
|
+
this.leftSide.style.left = '0px';
|
|
138
|
+
this.leftSide.style.top = '0px';
|
|
139
|
+
this.leftSide.style.width = `${rect.left}px`;
|
|
140
|
+
this.leftSide.style.height = '100vh';
|
|
141
|
+
this.leftSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
|
|
142
|
+
// Bottom
|
|
143
|
+
this.bottomSide.style.position = "absolute";
|
|
144
|
+
this.bottomSide.style.left = `${rect.left}px`;
|
|
145
|
+
this.bottomSide.style.top = `${rect.bottom + borderOffset}px`;
|
|
146
|
+
this.bottomSide.style.width = `${rect.width + borderOffset}px`;
|
|
147
|
+
this.bottomSide.style.height = '100vh';
|
|
148
|
+
this.bottomSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
|
|
149
|
+
// Right
|
|
150
|
+
this.rightSide.style.position = "absolute";
|
|
151
|
+
this.rightSide.style.left = `${rect.right + borderOffset}px`;
|
|
152
|
+
;
|
|
153
|
+
this.rightSide.style.top = '0px';
|
|
154
|
+
this.rightSide.style.width = '100%';
|
|
155
|
+
this.rightSide.style.height = '100vh';
|
|
156
|
+
this.rightSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
|
|
157
|
+
// Restore the visibility of the screenshot-modal
|
|
158
|
+
this.screenshotModal.style.backgroundColor = 'transparent';
|
|
159
|
+
};
|
|
160
|
+
this.handleMouseClickedSelectedElement = async (event) => {
|
|
161
|
+
event.preventDefault();
|
|
162
|
+
if (!this.elementSelected) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
this.hasSelectedElement = true;
|
|
166
|
+
this.elementSelected.classList.add('feedback-modal-element-selected');
|
|
167
|
+
// Get the top position including the scroll offset
|
|
168
|
+
const rectTop = this.elementSelected.getBoundingClientRect().top;
|
|
169
|
+
const topWithScroll = rectTop + window.scrollY;
|
|
170
|
+
// Move the element with the scroll offset
|
|
171
|
+
this.elementSelected.style.top = `${topWithScroll}px`;
|
|
172
|
+
// Clone the selected element and append it to the body
|
|
173
|
+
const clonedElementSelected = this.elementSelected.cloneNode(true);
|
|
174
|
+
document.body.appendChild(clonedElementSelected);
|
|
175
|
+
// Reset the top position of the original element
|
|
176
|
+
this.elementSelected.style.top = `${rectTop}px`;
|
|
177
|
+
this.showScreenshotTopBar = false;
|
|
178
|
+
this.showModal = false;
|
|
179
|
+
try {
|
|
180
|
+
const dataUrl = await this.captureScreenshot();
|
|
181
|
+
console.log('Screenshot captured');
|
|
182
|
+
this.encodedScreenshot = dataUrl;
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
console.error('Failed to capture screenshot:', error);
|
|
186
|
+
this.hasSelectedElement = false;
|
|
187
|
+
}
|
|
188
|
+
finally {
|
|
189
|
+
// Remove the cloned element and show the modal again
|
|
190
|
+
document.body.removeChild(clonedElementSelected);
|
|
191
|
+
this.showModal = true;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
this.sending = false;
|
|
195
|
+
this.formMessage = '';
|
|
196
|
+
this.formEmail = '';
|
|
197
|
+
this.formSuccess = false;
|
|
198
|
+
this.formVerification = '';
|
|
199
|
+
this.formError = false;
|
|
200
|
+
this.formErrorStatus = 500;
|
|
201
|
+
this.encodedScreenshot = undefined;
|
|
202
|
+
this.isPrivacyChecked = false;
|
|
203
|
+
this.whitelabel = false;
|
|
204
|
+
this.selectedRating = 0;
|
|
205
|
+
this.overlayVisible = false;
|
|
206
|
+
this.isAnimating = false;
|
|
207
|
+
this.customFont = false;
|
|
208
|
+
this.errorMessage = "Please try again later.";
|
|
209
|
+
this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
|
|
210
|
+
this.errorMessage404 = "We could not find the provided project ID in PushFeedback.";
|
|
211
|
+
this.modalTitle = 'Share your feedback';
|
|
212
|
+
this.modalTitleSuccess = 'Thanks for your feedback!';
|
|
213
|
+
this.modalTitleError = "Oops!";
|
|
214
|
+
this.modalPosition = 'center';
|
|
215
|
+
this.sendButtonText = 'Send';
|
|
216
|
+
this.successMessage = "";
|
|
217
|
+
this.project = '';
|
|
218
|
+
this.screenshotButtonText = 'Add a screenshot';
|
|
219
|
+
this.screenshotTopbarText = 'Select an element on this page';
|
|
220
|
+
this.hideEmail = false;
|
|
221
|
+
this.emailAddress = '';
|
|
222
|
+
this.emailPlaceholder = 'Email address (optional)';
|
|
223
|
+
this.messagePlaceholder = 'Comments';
|
|
224
|
+
this.hideRating = false;
|
|
225
|
+
this.rating = undefined;
|
|
226
|
+
this.ratingMode = 'thumbs';
|
|
227
|
+
this.ratingPlaceholder = 'Was this page helpful?';
|
|
228
|
+
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
229
|
+
this.footerText = '';
|
|
230
|
+
this.showModal = false;
|
|
231
|
+
this.showScreenshotMode = false;
|
|
232
|
+
this.showScreenshotTopBar = false;
|
|
233
|
+
this.hasSelectedElement = false;
|
|
234
|
+
this.hideScreenshotButton = false;
|
|
235
|
+
this.hidePrivacyPolicy = true;
|
|
236
|
+
this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
|
|
237
|
+
this.fetchData = true;
|
|
238
|
+
}
|
|
239
|
+
componentWillLoad() {
|
|
240
|
+
if (this.fetchData)
|
|
241
|
+
this.fetchProjectData();
|
|
242
|
+
this.formEmail = this.emailAddress;
|
|
243
|
+
if (this.rating) {
|
|
244
|
+
this.selectedRating = this.rating;
|
|
245
|
+
}
|
|
246
|
+
if (this.ratingMode == "thumbs" && this.rating == 0) {
|
|
247
|
+
this.selectedRating = 5;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
async fetchProjectData() {
|
|
251
|
+
try {
|
|
252
|
+
const response = await fetch('https://app.pushfeedback.com/api/projects/' + this.project + '/');
|
|
253
|
+
const data = await response.json();
|
|
254
|
+
this.whitelabel = data.whitelabel;
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
console.log(error);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
resetOverflow() {
|
|
261
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-open');
|
|
262
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-open--scroll');
|
|
263
|
+
document.documentElement.classList.add('feedback-modal-screenshot-closing');
|
|
264
|
+
// Only restore scroll position if we previously modified it
|
|
265
|
+
if (document.documentElement.style.top) {
|
|
266
|
+
window.scrollTo(0, parseInt(document.documentElement.style.top || '0') * -1);
|
|
267
|
+
document.documentElement.style.top = '';
|
|
268
|
+
}
|
|
269
|
+
window.addEventListener('scroll', this.onScrollDebounced);
|
|
270
|
+
}
|
|
271
|
+
handleMessageInput(event) {
|
|
272
|
+
this.formMessage = event.target.value;
|
|
273
|
+
}
|
|
274
|
+
handleEmailInput(event) {
|
|
275
|
+
this.formEmail = event.target.value;
|
|
276
|
+
}
|
|
277
|
+
captureScreenshot() {
|
|
278
|
+
return new Promise((resolve, reject) => {
|
|
279
|
+
requestAnimationFrame(() => {
|
|
280
|
+
html2canvas(document.body, {
|
|
281
|
+
x: window.scrollX,
|
|
282
|
+
y: window.scrollY,
|
|
283
|
+
width: window.innerWidth,
|
|
284
|
+
height: window.innerHeight,
|
|
285
|
+
}).then(canvas => {
|
|
286
|
+
const dataUrl = canvas.toDataURL();
|
|
287
|
+
resolve(dataUrl);
|
|
288
|
+
})
|
|
289
|
+
.catch(error => {
|
|
290
|
+
console.error(error);
|
|
291
|
+
reject(error);
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
handleCheckboxChange(event) {
|
|
297
|
+
this.isPrivacyChecked = event.target.checked;
|
|
298
|
+
}
|
|
299
|
+
handleVerification(event) {
|
|
300
|
+
this.formVerification = event.target.value;
|
|
301
|
+
}
|
|
302
|
+
handleRatingChange(newRating) {
|
|
303
|
+
this.selectedRating = newRating;
|
|
304
|
+
}
|
|
305
|
+
render() {
|
|
306
|
+
return (h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}` })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : h("span", null, this.modalTitleError), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
307
|
+
event.preventDefault();
|
|
308
|
+
this.handleRatingChange(1);
|
|
309
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
310
|
+
event.preventDefault();
|
|
311
|
+
this.handleRatingChange(5);
|
|
312
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
313
|
+
event.preventDefault();
|
|
314
|
+
this.handleRatingChange(rating);
|
|
315
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), h("div", { class: "feedback-modal-text" }, h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (h("div", { class: "feedback-modal-email" }, h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail }))), h("div", { class: "feedback-verification" }, h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (h("div", { class: "feedback-modal-privacy" }, h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), h("span", { innerHTML: this.privacyPolicyText }))), h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? "feedback-modal-button--active" : ""}`, onClick: this.openScreenShot, disabled: this.sending }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" })), this.screenshotButtonText)), h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (h("div", { class: "feedback-modal-success" }, h("p", { class: "feedback-modal-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (h("p", { class: "feedback-modal-message" }, this.errorMessage)) : h("span", null)), h("div", { class: "feedback-modal-footer" }, h("div", { class: "feedback-logo", style: { display: this.whitelabel ? 'none' : 'block' } }, "Powered by ", h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com"), this.footerText && h("span", { class: "feedback-footer-text", innerHTML: this.footerText })))))));
|
|
316
|
+
}
|
|
317
|
+
componentDidRender() {
|
|
318
|
+
if (this.showModal) {
|
|
319
|
+
requestAnimationFrame(() => {
|
|
320
|
+
this.overlayVisible = true;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async openModal() {
|
|
325
|
+
this.showModal = true;
|
|
326
|
+
requestAnimationFrame(() => {
|
|
327
|
+
requestAnimationFrame(() => {
|
|
328
|
+
this.isAnimating = true;
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
static get is() { return "feedback-modal"; }
|
|
333
|
+
static get encapsulation() { return "shadow"; }
|
|
334
|
+
static get originalStyleUrls() {
|
|
335
|
+
return {
|
|
336
|
+
"$": ["feedback-modal.css"]
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
static get styleUrls() {
|
|
340
|
+
return {
|
|
341
|
+
"$": ["feedback-modal.css"]
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
static get properties() {
|
|
345
|
+
return {
|
|
346
|
+
"customFont": {
|
|
347
|
+
"type": "boolean",
|
|
348
|
+
"mutable": false,
|
|
349
|
+
"complexType": {
|
|
350
|
+
"original": "boolean",
|
|
351
|
+
"resolved": "boolean",
|
|
352
|
+
"references": {}
|
|
353
|
+
},
|
|
354
|
+
"required": false,
|
|
355
|
+
"optional": false,
|
|
356
|
+
"docs": {
|
|
357
|
+
"tags": [],
|
|
358
|
+
"text": ""
|
|
359
|
+
},
|
|
360
|
+
"attribute": "custom-font",
|
|
361
|
+
"reflect": false,
|
|
362
|
+
"defaultValue": "false"
|
|
363
|
+
},
|
|
364
|
+
"errorMessage": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"mutable": false,
|
|
367
|
+
"complexType": {
|
|
368
|
+
"original": "string",
|
|
369
|
+
"resolved": "string",
|
|
370
|
+
"references": {}
|
|
371
|
+
},
|
|
372
|
+
"required": false,
|
|
373
|
+
"optional": false,
|
|
374
|
+
"docs": {
|
|
375
|
+
"tags": [],
|
|
376
|
+
"text": ""
|
|
377
|
+
},
|
|
378
|
+
"attribute": "error-message",
|
|
379
|
+
"reflect": false,
|
|
380
|
+
"defaultValue": "\"Please try again later.\""
|
|
381
|
+
},
|
|
382
|
+
"errorMessage403": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"mutable": false,
|
|
385
|
+
"complexType": {
|
|
386
|
+
"original": "string",
|
|
387
|
+
"resolved": "string",
|
|
388
|
+
"references": {}
|
|
389
|
+
},
|
|
390
|
+
"required": false,
|
|
391
|
+
"optional": false,
|
|
392
|
+
"docs": {
|
|
393
|
+
"tags": [],
|
|
394
|
+
"text": ""
|
|
395
|
+
},
|
|
396
|
+
"attribute": "error-message-4-0-3",
|
|
397
|
+
"reflect": false,
|
|
398
|
+
"defaultValue": "\"The request URL does not match the one defined in PushFeedback for this project.\""
|
|
399
|
+
},
|
|
400
|
+
"errorMessage404": {
|
|
401
|
+
"type": "string",
|
|
402
|
+
"mutable": false,
|
|
403
|
+
"complexType": {
|
|
404
|
+
"original": "string",
|
|
405
|
+
"resolved": "string",
|
|
406
|
+
"references": {}
|
|
407
|
+
},
|
|
408
|
+
"required": false,
|
|
409
|
+
"optional": false,
|
|
410
|
+
"docs": {
|
|
411
|
+
"tags": [],
|
|
412
|
+
"text": ""
|
|
413
|
+
},
|
|
414
|
+
"attribute": "error-message-4-0-4",
|
|
415
|
+
"reflect": false,
|
|
416
|
+
"defaultValue": "\"We could not find the provided project ID in PushFeedback.\""
|
|
417
|
+
},
|
|
418
|
+
"modalTitle": {
|
|
419
|
+
"type": "string",
|
|
420
|
+
"mutable": false,
|
|
421
|
+
"complexType": {
|
|
422
|
+
"original": "string",
|
|
423
|
+
"resolved": "string",
|
|
424
|
+
"references": {}
|
|
425
|
+
},
|
|
426
|
+
"required": false,
|
|
427
|
+
"optional": false,
|
|
428
|
+
"docs": {
|
|
429
|
+
"tags": [],
|
|
430
|
+
"text": ""
|
|
431
|
+
},
|
|
432
|
+
"attribute": "modal-title",
|
|
433
|
+
"reflect": false,
|
|
434
|
+
"defaultValue": "'Share your feedback'"
|
|
435
|
+
},
|
|
436
|
+
"modalTitleSuccess": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"mutable": false,
|
|
439
|
+
"complexType": {
|
|
440
|
+
"original": "string",
|
|
441
|
+
"resolved": "string",
|
|
442
|
+
"references": {}
|
|
443
|
+
},
|
|
444
|
+
"required": false,
|
|
445
|
+
"optional": false,
|
|
446
|
+
"docs": {
|
|
447
|
+
"tags": [],
|
|
448
|
+
"text": ""
|
|
449
|
+
},
|
|
450
|
+
"attribute": "modal-title-success",
|
|
451
|
+
"reflect": false,
|
|
452
|
+
"defaultValue": "'Thanks for your feedback!'"
|
|
453
|
+
},
|
|
454
|
+
"modalTitleError": {
|
|
455
|
+
"type": "string",
|
|
456
|
+
"mutable": false,
|
|
457
|
+
"complexType": {
|
|
458
|
+
"original": "string",
|
|
459
|
+
"resolved": "string",
|
|
460
|
+
"references": {}
|
|
461
|
+
},
|
|
462
|
+
"required": false,
|
|
463
|
+
"optional": false,
|
|
464
|
+
"docs": {
|
|
465
|
+
"tags": [],
|
|
466
|
+
"text": ""
|
|
467
|
+
},
|
|
468
|
+
"attribute": "modal-title-error",
|
|
469
|
+
"reflect": false,
|
|
470
|
+
"defaultValue": "\"Oops!\""
|
|
471
|
+
},
|
|
472
|
+
"modalPosition": {
|
|
473
|
+
"type": "string",
|
|
474
|
+
"mutable": false,
|
|
475
|
+
"complexType": {
|
|
476
|
+
"original": "string",
|
|
477
|
+
"resolved": "string",
|
|
478
|
+
"references": {}
|
|
479
|
+
},
|
|
480
|
+
"required": false,
|
|
481
|
+
"optional": false,
|
|
482
|
+
"docs": {
|
|
483
|
+
"tags": [],
|
|
484
|
+
"text": ""
|
|
485
|
+
},
|
|
486
|
+
"attribute": "modal-position",
|
|
487
|
+
"reflect": false,
|
|
488
|
+
"defaultValue": "'center'"
|
|
489
|
+
},
|
|
490
|
+
"sendButtonText": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"mutable": false,
|
|
493
|
+
"complexType": {
|
|
494
|
+
"original": "string",
|
|
495
|
+
"resolved": "string",
|
|
496
|
+
"references": {}
|
|
497
|
+
},
|
|
498
|
+
"required": false,
|
|
499
|
+
"optional": false,
|
|
500
|
+
"docs": {
|
|
501
|
+
"tags": [],
|
|
502
|
+
"text": ""
|
|
503
|
+
},
|
|
504
|
+
"attribute": "send-button-text",
|
|
505
|
+
"reflect": false,
|
|
506
|
+
"defaultValue": "'Send'"
|
|
507
|
+
},
|
|
508
|
+
"successMessage": {
|
|
509
|
+
"type": "string",
|
|
510
|
+
"mutable": false,
|
|
511
|
+
"complexType": {
|
|
512
|
+
"original": "string",
|
|
513
|
+
"resolved": "string",
|
|
514
|
+
"references": {}
|
|
515
|
+
},
|
|
516
|
+
"required": false,
|
|
517
|
+
"optional": false,
|
|
518
|
+
"docs": {
|
|
519
|
+
"tags": [],
|
|
520
|
+
"text": ""
|
|
521
|
+
},
|
|
522
|
+
"attribute": "success-message",
|
|
523
|
+
"reflect": false,
|
|
524
|
+
"defaultValue": "\"\""
|
|
525
|
+
},
|
|
526
|
+
"project": {
|
|
527
|
+
"type": "string",
|
|
528
|
+
"mutable": false,
|
|
529
|
+
"complexType": {
|
|
530
|
+
"original": "string",
|
|
531
|
+
"resolved": "string",
|
|
532
|
+
"references": {}
|
|
533
|
+
},
|
|
534
|
+
"required": false,
|
|
535
|
+
"optional": false,
|
|
536
|
+
"docs": {
|
|
537
|
+
"tags": [],
|
|
538
|
+
"text": ""
|
|
539
|
+
},
|
|
540
|
+
"attribute": "project",
|
|
541
|
+
"reflect": false,
|
|
542
|
+
"defaultValue": "''"
|
|
543
|
+
},
|
|
544
|
+
"screenshotButtonText": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"mutable": false,
|
|
547
|
+
"complexType": {
|
|
548
|
+
"original": "string",
|
|
549
|
+
"resolved": "string",
|
|
550
|
+
"references": {}
|
|
551
|
+
},
|
|
552
|
+
"required": false,
|
|
553
|
+
"optional": false,
|
|
554
|
+
"docs": {
|
|
555
|
+
"tags": [],
|
|
556
|
+
"text": ""
|
|
557
|
+
},
|
|
558
|
+
"attribute": "screenshot-button-text",
|
|
559
|
+
"reflect": false,
|
|
560
|
+
"defaultValue": "'Add a screenshot'"
|
|
561
|
+
},
|
|
562
|
+
"screenshotTopbarText": {
|
|
563
|
+
"type": "string",
|
|
564
|
+
"mutable": false,
|
|
565
|
+
"complexType": {
|
|
566
|
+
"original": "string",
|
|
567
|
+
"resolved": "string",
|
|
568
|
+
"references": {}
|
|
569
|
+
},
|
|
570
|
+
"required": false,
|
|
571
|
+
"optional": false,
|
|
572
|
+
"docs": {
|
|
573
|
+
"tags": [],
|
|
574
|
+
"text": ""
|
|
575
|
+
},
|
|
576
|
+
"attribute": "screenshot-topbar-text",
|
|
577
|
+
"reflect": false,
|
|
578
|
+
"defaultValue": "'Select an element on this page'"
|
|
579
|
+
},
|
|
580
|
+
"hideEmail": {
|
|
581
|
+
"type": "boolean",
|
|
582
|
+
"mutable": false,
|
|
583
|
+
"complexType": {
|
|
584
|
+
"original": "boolean",
|
|
585
|
+
"resolved": "boolean",
|
|
586
|
+
"references": {}
|
|
587
|
+
},
|
|
588
|
+
"required": false,
|
|
589
|
+
"optional": false,
|
|
590
|
+
"docs": {
|
|
591
|
+
"tags": [],
|
|
592
|
+
"text": ""
|
|
593
|
+
},
|
|
594
|
+
"attribute": "hide-email",
|
|
595
|
+
"reflect": false,
|
|
596
|
+
"defaultValue": "false"
|
|
597
|
+
},
|
|
598
|
+
"emailAddress": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"mutable": false,
|
|
601
|
+
"complexType": {
|
|
602
|
+
"original": "string",
|
|
603
|
+
"resolved": "string",
|
|
604
|
+
"references": {}
|
|
605
|
+
},
|
|
606
|
+
"required": false,
|
|
607
|
+
"optional": false,
|
|
608
|
+
"docs": {
|
|
609
|
+
"tags": [],
|
|
610
|
+
"text": ""
|
|
611
|
+
},
|
|
612
|
+
"attribute": "email-address",
|
|
613
|
+
"reflect": false,
|
|
614
|
+
"defaultValue": "''"
|
|
615
|
+
},
|
|
616
|
+
"emailPlaceholder": {
|
|
617
|
+
"type": "string",
|
|
618
|
+
"mutable": false,
|
|
619
|
+
"complexType": {
|
|
620
|
+
"original": "string",
|
|
621
|
+
"resolved": "string",
|
|
622
|
+
"references": {}
|
|
623
|
+
},
|
|
624
|
+
"required": false,
|
|
625
|
+
"optional": false,
|
|
626
|
+
"docs": {
|
|
627
|
+
"tags": [],
|
|
628
|
+
"text": ""
|
|
629
|
+
},
|
|
630
|
+
"attribute": "email-placeholder",
|
|
631
|
+
"reflect": false,
|
|
632
|
+
"defaultValue": "'Email address (optional)'"
|
|
633
|
+
},
|
|
634
|
+
"messagePlaceholder": {
|
|
635
|
+
"type": "string",
|
|
636
|
+
"mutable": false,
|
|
637
|
+
"complexType": {
|
|
638
|
+
"original": "string",
|
|
639
|
+
"resolved": "string",
|
|
640
|
+
"references": {}
|
|
641
|
+
},
|
|
642
|
+
"required": false,
|
|
643
|
+
"optional": false,
|
|
644
|
+
"docs": {
|
|
645
|
+
"tags": [],
|
|
646
|
+
"text": ""
|
|
647
|
+
},
|
|
648
|
+
"attribute": "message-placeholder",
|
|
649
|
+
"reflect": false,
|
|
650
|
+
"defaultValue": "'Comments'"
|
|
651
|
+
},
|
|
652
|
+
"hideRating": {
|
|
653
|
+
"type": "boolean",
|
|
654
|
+
"mutable": false,
|
|
655
|
+
"complexType": {
|
|
656
|
+
"original": "boolean",
|
|
657
|
+
"resolved": "boolean",
|
|
658
|
+
"references": {}
|
|
659
|
+
},
|
|
660
|
+
"required": false,
|
|
661
|
+
"optional": false,
|
|
662
|
+
"docs": {
|
|
663
|
+
"tags": [],
|
|
664
|
+
"text": ""
|
|
665
|
+
},
|
|
666
|
+
"attribute": "hide-rating",
|
|
667
|
+
"reflect": false,
|
|
668
|
+
"defaultValue": "false"
|
|
669
|
+
},
|
|
670
|
+
"rating": {
|
|
671
|
+
"type": "number",
|
|
672
|
+
"mutable": false,
|
|
673
|
+
"complexType": {
|
|
674
|
+
"original": "number",
|
|
675
|
+
"resolved": "number",
|
|
676
|
+
"references": {}
|
|
677
|
+
},
|
|
678
|
+
"required": false,
|
|
679
|
+
"optional": false,
|
|
680
|
+
"docs": {
|
|
681
|
+
"tags": [],
|
|
682
|
+
"text": ""
|
|
683
|
+
},
|
|
684
|
+
"attribute": "rating",
|
|
685
|
+
"reflect": false
|
|
686
|
+
},
|
|
687
|
+
"ratingMode": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"mutable": false,
|
|
690
|
+
"complexType": {
|
|
691
|
+
"original": "string",
|
|
692
|
+
"resolved": "string",
|
|
693
|
+
"references": {}
|
|
694
|
+
},
|
|
695
|
+
"required": false,
|
|
696
|
+
"optional": false,
|
|
697
|
+
"docs": {
|
|
698
|
+
"tags": [],
|
|
699
|
+
"text": ""
|
|
700
|
+
},
|
|
701
|
+
"attribute": "rating-mode",
|
|
702
|
+
"reflect": false,
|
|
703
|
+
"defaultValue": "'thumbs'"
|
|
704
|
+
},
|
|
705
|
+
"ratingPlaceholder": {
|
|
706
|
+
"type": "string",
|
|
707
|
+
"mutable": false,
|
|
708
|
+
"complexType": {
|
|
709
|
+
"original": "string",
|
|
710
|
+
"resolved": "string",
|
|
711
|
+
"references": {}
|
|
712
|
+
},
|
|
713
|
+
"required": false,
|
|
714
|
+
"optional": false,
|
|
715
|
+
"docs": {
|
|
716
|
+
"tags": [],
|
|
717
|
+
"text": ""
|
|
718
|
+
},
|
|
719
|
+
"attribute": "rating-placeholder",
|
|
720
|
+
"reflect": false,
|
|
721
|
+
"defaultValue": "'Was this page helpful?'"
|
|
722
|
+
},
|
|
723
|
+
"ratingStarsPlaceholder": {
|
|
724
|
+
"type": "string",
|
|
725
|
+
"mutable": false,
|
|
726
|
+
"complexType": {
|
|
727
|
+
"original": "string",
|
|
728
|
+
"resolved": "string",
|
|
729
|
+
"references": {}
|
|
730
|
+
},
|
|
731
|
+
"required": false,
|
|
732
|
+
"optional": false,
|
|
733
|
+
"docs": {
|
|
734
|
+
"tags": [],
|
|
735
|
+
"text": ""
|
|
736
|
+
},
|
|
737
|
+
"attribute": "rating-stars-placeholder",
|
|
738
|
+
"reflect": false,
|
|
739
|
+
"defaultValue": "'How would you rate this page?'"
|
|
740
|
+
},
|
|
741
|
+
"footerText": {
|
|
742
|
+
"type": "string",
|
|
743
|
+
"mutable": false,
|
|
744
|
+
"complexType": {
|
|
745
|
+
"original": "string",
|
|
746
|
+
"resolved": "string",
|
|
747
|
+
"references": {}
|
|
748
|
+
},
|
|
749
|
+
"required": false,
|
|
750
|
+
"optional": false,
|
|
751
|
+
"docs": {
|
|
752
|
+
"tags": [],
|
|
753
|
+
"text": ""
|
|
754
|
+
},
|
|
755
|
+
"attribute": "footer-text",
|
|
756
|
+
"reflect": false,
|
|
757
|
+
"defaultValue": "''"
|
|
758
|
+
},
|
|
759
|
+
"showModal": {
|
|
760
|
+
"type": "boolean",
|
|
761
|
+
"mutable": true,
|
|
762
|
+
"complexType": {
|
|
763
|
+
"original": "boolean",
|
|
764
|
+
"resolved": "boolean",
|
|
765
|
+
"references": {}
|
|
766
|
+
},
|
|
767
|
+
"required": false,
|
|
768
|
+
"optional": false,
|
|
769
|
+
"docs": {
|
|
770
|
+
"tags": [],
|
|
771
|
+
"text": ""
|
|
772
|
+
},
|
|
773
|
+
"attribute": "show-modal",
|
|
774
|
+
"reflect": true,
|
|
775
|
+
"defaultValue": "false"
|
|
776
|
+
},
|
|
777
|
+
"showScreenshotMode": {
|
|
778
|
+
"type": "boolean",
|
|
779
|
+
"mutable": true,
|
|
780
|
+
"complexType": {
|
|
781
|
+
"original": "boolean",
|
|
782
|
+
"resolved": "boolean",
|
|
783
|
+
"references": {}
|
|
784
|
+
},
|
|
785
|
+
"required": false,
|
|
786
|
+
"optional": false,
|
|
787
|
+
"docs": {
|
|
788
|
+
"tags": [],
|
|
789
|
+
"text": ""
|
|
790
|
+
},
|
|
791
|
+
"attribute": "show-screenshot-mode",
|
|
792
|
+
"reflect": true,
|
|
793
|
+
"defaultValue": "false"
|
|
794
|
+
},
|
|
795
|
+
"showScreenshotTopBar": {
|
|
796
|
+
"type": "boolean",
|
|
797
|
+
"mutable": true,
|
|
798
|
+
"complexType": {
|
|
799
|
+
"original": "boolean",
|
|
800
|
+
"resolved": "boolean",
|
|
801
|
+
"references": {}
|
|
802
|
+
},
|
|
803
|
+
"required": false,
|
|
804
|
+
"optional": false,
|
|
805
|
+
"docs": {
|
|
806
|
+
"tags": [],
|
|
807
|
+
"text": ""
|
|
808
|
+
},
|
|
809
|
+
"attribute": "show-screenshot-top-bar",
|
|
810
|
+
"reflect": true,
|
|
811
|
+
"defaultValue": "false"
|
|
812
|
+
},
|
|
813
|
+
"hasSelectedElement": {
|
|
814
|
+
"type": "boolean",
|
|
815
|
+
"mutable": true,
|
|
816
|
+
"complexType": {
|
|
817
|
+
"original": "boolean",
|
|
818
|
+
"resolved": "boolean",
|
|
819
|
+
"references": {}
|
|
820
|
+
},
|
|
821
|
+
"required": false,
|
|
822
|
+
"optional": false,
|
|
823
|
+
"docs": {
|
|
824
|
+
"tags": [],
|
|
825
|
+
"text": ""
|
|
826
|
+
},
|
|
827
|
+
"attribute": "has-selected-element",
|
|
828
|
+
"reflect": true,
|
|
829
|
+
"defaultValue": "false"
|
|
830
|
+
},
|
|
831
|
+
"hideScreenshotButton": {
|
|
832
|
+
"type": "boolean",
|
|
833
|
+
"mutable": false,
|
|
834
|
+
"complexType": {
|
|
835
|
+
"original": "boolean",
|
|
836
|
+
"resolved": "boolean",
|
|
837
|
+
"references": {}
|
|
838
|
+
},
|
|
839
|
+
"required": false,
|
|
840
|
+
"optional": false,
|
|
841
|
+
"docs": {
|
|
842
|
+
"tags": [],
|
|
843
|
+
"text": ""
|
|
844
|
+
},
|
|
845
|
+
"attribute": "hide-screenshot-button",
|
|
846
|
+
"reflect": false,
|
|
847
|
+
"defaultValue": "false"
|
|
848
|
+
},
|
|
849
|
+
"hidePrivacyPolicy": {
|
|
850
|
+
"type": "boolean",
|
|
851
|
+
"mutable": false,
|
|
852
|
+
"complexType": {
|
|
853
|
+
"original": "boolean",
|
|
854
|
+
"resolved": "boolean",
|
|
855
|
+
"references": {}
|
|
856
|
+
},
|
|
857
|
+
"required": false,
|
|
858
|
+
"optional": false,
|
|
859
|
+
"docs": {
|
|
860
|
+
"tags": [],
|
|
861
|
+
"text": ""
|
|
862
|
+
},
|
|
863
|
+
"attribute": "hide-privacy-policy",
|
|
864
|
+
"reflect": false,
|
|
865
|
+
"defaultValue": "true"
|
|
866
|
+
},
|
|
867
|
+
"privacyPolicyText": {
|
|
868
|
+
"type": "string",
|
|
869
|
+
"mutable": false,
|
|
870
|
+
"complexType": {
|
|
871
|
+
"original": "string",
|
|
872
|
+
"resolved": "string",
|
|
873
|
+
"references": {}
|
|
874
|
+
},
|
|
875
|
+
"required": false,
|
|
876
|
+
"optional": false,
|
|
877
|
+
"docs": {
|
|
878
|
+
"tags": [],
|
|
879
|
+
"text": ""
|
|
880
|
+
},
|
|
881
|
+
"attribute": "privacy-policy-text",
|
|
882
|
+
"reflect": false,
|
|
883
|
+
"defaultValue": "\"I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.\""
|
|
884
|
+
},
|
|
885
|
+
"fetchData": {
|
|
886
|
+
"type": "boolean",
|
|
887
|
+
"mutable": false,
|
|
888
|
+
"complexType": {
|
|
889
|
+
"original": "boolean",
|
|
890
|
+
"resolved": "boolean",
|
|
891
|
+
"references": {}
|
|
892
|
+
},
|
|
893
|
+
"required": false,
|
|
894
|
+
"optional": false,
|
|
895
|
+
"docs": {
|
|
896
|
+
"tags": [],
|
|
897
|
+
"text": ""
|
|
898
|
+
},
|
|
899
|
+
"attribute": "fetch-data",
|
|
900
|
+
"reflect": false,
|
|
901
|
+
"defaultValue": "true"
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
static get states() {
|
|
906
|
+
return {
|
|
907
|
+
"sending": {},
|
|
908
|
+
"formMessage": {},
|
|
909
|
+
"formEmail": {},
|
|
910
|
+
"formSuccess": {},
|
|
911
|
+
"formVerification": {},
|
|
912
|
+
"formError": {},
|
|
913
|
+
"formErrorStatus": {},
|
|
914
|
+
"encodedScreenshot": {},
|
|
915
|
+
"isPrivacyChecked": {},
|
|
916
|
+
"whitelabel": {},
|
|
917
|
+
"selectedRating": {},
|
|
918
|
+
"overlayVisible": {},
|
|
919
|
+
"isAnimating": {}
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
static get events() {
|
|
923
|
+
return [{
|
|
924
|
+
"method": "feedbackSent",
|
|
925
|
+
"name": "feedbackSent",
|
|
926
|
+
"bubbles": true,
|
|
927
|
+
"cancelable": true,
|
|
928
|
+
"composed": true,
|
|
929
|
+
"docs": {
|
|
930
|
+
"tags": [],
|
|
931
|
+
"text": ""
|
|
932
|
+
},
|
|
933
|
+
"complexType": {
|
|
934
|
+
"original": "{ feedback: any }",
|
|
935
|
+
"resolved": "{ feedback: any; }",
|
|
936
|
+
"references": {}
|
|
937
|
+
}
|
|
938
|
+
}, {
|
|
939
|
+
"method": "feedbackError",
|
|
940
|
+
"name": "feedbackError",
|
|
941
|
+
"bubbles": true,
|
|
942
|
+
"cancelable": true,
|
|
943
|
+
"composed": true,
|
|
944
|
+
"docs": {
|
|
945
|
+
"tags": [],
|
|
946
|
+
"text": ""
|
|
947
|
+
},
|
|
948
|
+
"complexType": {
|
|
949
|
+
"original": "{ error: any }",
|
|
950
|
+
"resolved": "{ error: any; }",
|
|
951
|
+
"references": {}
|
|
952
|
+
}
|
|
953
|
+
}];
|
|
954
|
+
}
|
|
955
|
+
static get methods() {
|
|
956
|
+
return {
|
|
957
|
+
"openModal": {
|
|
958
|
+
"complexType": {
|
|
959
|
+
"signature": "() => Promise<void>",
|
|
960
|
+
"parameters": [],
|
|
961
|
+
"references": {
|
|
962
|
+
"Promise": {
|
|
963
|
+
"location": "global"
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"return": "Promise<void>"
|
|
967
|
+
},
|
|
968
|
+
"docs": {
|
|
969
|
+
"text": "",
|
|
970
|
+
"tags": []
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
}
|