pushfeedback 0.1.45 → 0.1.47

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