pushfeedback 0.1.70 → 0.1.71
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/canvas-editor_3.cjs.entry.js +1367 -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 +14 -0
- package/dist/collection/components/canvas-editor/canvas-editor.css +404 -0
- package/dist/collection/components/canvas-editor/canvas-editor.js +1282 -0
- package/dist/collection/components/feedback-button/feedback-button.css +81 -0
- package/dist/collection/components/feedback-button/feedback-button.js +1169 -0
- package/dist/collection/components/feedback-modal/feedback-modal.css +547 -0
- package/dist/collection/components/feedback-modal/feedback-modal.js +1257 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/canvas-editor.js +6 -0
- package/dist/{pushfeedback/canvas-editor.entry.js → components/canvas-editor2.js} +64 -7
- package/dist/{pushfeedback/feedback-button.entry.js → components/feedback-button.js} +90 -8
- package/dist/components/feedback-modal.js +6 -0
- package/dist/{pushfeedback/feedback-modal.entry.js → components/feedback-modal2.js} +97 -7
- package/dist/components/index.js +4 -0
- package/dist/esm/canvas-editor_3.entry.js +1361 -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-2c39091c.entry.js +1 -0
- package/dist/pushfeedback/p-af2a1f7f.js +2 -0
- package/dist/pushfeedback/pushfeedback.css +1 -146
- 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,1257 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class FeedbackModal {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.onScrollDebounced = () => {
|
|
5
|
+
clearTimeout(this.scrollTimeout);
|
|
6
|
+
this.scrollTimeout = setTimeout(() => {
|
|
7
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-closing');
|
|
8
|
+
document.documentElement.style.top = '';
|
|
9
|
+
window.removeEventListener('scroll', this.onScrollDebounced);
|
|
10
|
+
}, 200);
|
|
11
|
+
};
|
|
12
|
+
this.handleSubmit = async (event) => {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
if (this.isEmailRequired && !this.formEmail) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.resetOverflow();
|
|
18
|
+
this.showScreenshotMode = false;
|
|
19
|
+
this.showScreenshotTopBar = false;
|
|
20
|
+
this.showModal = false;
|
|
21
|
+
this.sending = true;
|
|
22
|
+
try {
|
|
23
|
+
const body = {
|
|
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
|
+
metadata: this.metadata,
|
|
32
|
+
verification: this.formVerification,
|
|
33
|
+
session: localStorage.getItem('pushfeedback_sessionid') || '',
|
|
34
|
+
};
|
|
35
|
+
const res = await fetch('https://app.pushfeedback.com/api/feedback/', {
|
|
36
|
+
method: 'POST',
|
|
37
|
+
body: JSON.stringify(body),
|
|
38
|
+
headers: {
|
|
39
|
+
'Content-Type': 'application/json',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
if (res.status === 201) {
|
|
43
|
+
const feedback_with_id = Object.assign(Object.assign({}, body), { id: await res.json() });
|
|
44
|
+
this.feedbackSent.emit({ feedback: feedback_with_id });
|
|
45
|
+
this.formSuccess = true;
|
|
46
|
+
this.formError = false;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const errorText = await res.text();
|
|
50
|
+
const response = {
|
|
51
|
+
status: res.status,
|
|
52
|
+
message: errorText,
|
|
53
|
+
};
|
|
54
|
+
this.feedbackError.emit({ error: response });
|
|
55
|
+
this.formSuccess = false;
|
|
56
|
+
this.formError = true;
|
|
57
|
+
this.formErrorStatus = res.status;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
const response = {
|
|
62
|
+
status: 500,
|
|
63
|
+
message: error,
|
|
64
|
+
};
|
|
65
|
+
this.feedbackError.emit({ error: response });
|
|
66
|
+
this.formSuccess = false;
|
|
67
|
+
this.formError = true;
|
|
68
|
+
this.formErrorStatus = 500;
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
this.sending = false;
|
|
72
|
+
this.showModal = true;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
this.close = () => {
|
|
76
|
+
this.isAnimating = false;
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
this.sending = false;
|
|
79
|
+
this.showModal = false;
|
|
80
|
+
this.showScreenshotMode = false;
|
|
81
|
+
this.showScreenshotTopBar = false;
|
|
82
|
+
this.hasSelectedElement = false;
|
|
83
|
+
this.encodedScreenshot = null;
|
|
84
|
+
// Remove highlight from ALL selected elements
|
|
85
|
+
document.querySelectorAll('.feedback-modal-element-selected').forEach(el => {
|
|
86
|
+
el.classList.remove('feedback-modal-element-selected');
|
|
87
|
+
});
|
|
88
|
+
// Reset form states
|
|
89
|
+
this.formSuccess = false;
|
|
90
|
+
this.formError = false;
|
|
91
|
+
this.formErrorStatus = 500;
|
|
92
|
+
this.formMessage = '';
|
|
93
|
+
this.formEmail = '';
|
|
94
|
+
this.resetOverflow();
|
|
95
|
+
}, 200);
|
|
96
|
+
};
|
|
97
|
+
// Handle screenshot events from canvas editor
|
|
98
|
+
this.handleScreenshotReady = (event) => {
|
|
99
|
+
this.encodedScreenshot = event.detail.screenshot;
|
|
100
|
+
this.showModal = true;
|
|
101
|
+
this.takingScreenshot = false;
|
|
102
|
+
this.showCanvasEditor = false;
|
|
103
|
+
this.autoStartCapture = false;
|
|
104
|
+
};
|
|
105
|
+
this.handleScreenshotCancelled = () => {
|
|
106
|
+
this.showModal = true;
|
|
107
|
+
this.takingScreenshot = false;
|
|
108
|
+
this.showCanvasEditor = false;
|
|
109
|
+
this.autoStartCapture = false;
|
|
110
|
+
};
|
|
111
|
+
this.handleScreenshotError = (event) => {
|
|
112
|
+
console.error('Screenshot error:', event.detail.error);
|
|
113
|
+
// Store error message to display in feedback modal
|
|
114
|
+
this.screenshotError = event.detail.error;
|
|
115
|
+
this.showScreenshotError = true;
|
|
116
|
+
// Close canvas editor and return to feedback modal
|
|
117
|
+
this.showModal = true;
|
|
118
|
+
this.takingScreenshot = false;
|
|
119
|
+
this.showCanvasEditor = false;
|
|
120
|
+
this.autoStartCapture = false;
|
|
121
|
+
// Auto-hide error after 8 seconds
|
|
122
|
+
setTimeout(() => {
|
|
123
|
+
this.showScreenshotError = false;
|
|
124
|
+
}, 8000);
|
|
125
|
+
};
|
|
126
|
+
// Trigger screenshot capture
|
|
127
|
+
this.openScreenShot = () => {
|
|
128
|
+
this.showModal = false;
|
|
129
|
+
this.takingScreenshot = true;
|
|
130
|
+
this.autoStartCapture = true; // Auto-start new screenshot
|
|
131
|
+
this.showCanvasEditor = true;
|
|
132
|
+
};
|
|
133
|
+
// Open canvas editor for existing screenshot
|
|
134
|
+
this.openCanvasEditor = (event) => {
|
|
135
|
+
if (event) {
|
|
136
|
+
event.stopPropagation();
|
|
137
|
+
}
|
|
138
|
+
this.showModal = false;
|
|
139
|
+
this.autoStartCapture = false; // Don't auto-start, just edit existing
|
|
140
|
+
this.showCanvasEditor = true;
|
|
141
|
+
};
|
|
142
|
+
this.sending = false;
|
|
143
|
+
this.formMessage = '';
|
|
144
|
+
this.formEmail = '';
|
|
145
|
+
this.formSuccess = false;
|
|
146
|
+
this.formVerification = '';
|
|
147
|
+
this.formError = false;
|
|
148
|
+
this.formErrorStatus = 500;
|
|
149
|
+
this.encodedScreenshot = undefined;
|
|
150
|
+
this.isPrivacyChecked = false;
|
|
151
|
+
this.whitelabel = false;
|
|
152
|
+
this.selectedRating = -1;
|
|
153
|
+
this.overlayVisible = false;
|
|
154
|
+
this.isAnimating = false;
|
|
155
|
+
this.takingScreenshot = false;
|
|
156
|
+
this.showScreenshotError = false;
|
|
157
|
+
this.screenshotError = '';
|
|
158
|
+
this.showCanvasEditor = false;
|
|
159
|
+
this.autoStartCapture = false;
|
|
160
|
+
this.customFont = false;
|
|
161
|
+
this.emailAddress = '';
|
|
162
|
+
this.hideEmail = false;
|
|
163
|
+
this.isEmailRequired = false;
|
|
164
|
+
this.ratingMode = 'thumbs';
|
|
165
|
+
this.hasSelectedElement = false;
|
|
166
|
+
this.hidePrivacyPolicy = true;
|
|
167
|
+
this.hideRating = false;
|
|
168
|
+
this.hideScreenshotButton = false;
|
|
169
|
+
this.project = '';
|
|
170
|
+
this.showScreenshotMode = false;
|
|
171
|
+
this.showScreenshotTopBar = false;
|
|
172
|
+
this.showModal = false;
|
|
173
|
+
this.rating = undefined;
|
|
174
|
+
this.metadata = undefined;
|
|
175
|
+
this.fetchData = true;
|
|
176
|
+
this.emailPlaceholder = 'Email address (optional)';
|
|
177
|
+
this.errorMessage = 'Please try again later.';
|
|
178
|
+
this.errorMessage403 = 'The request URL does not match the one defined in PushFeedback for this project.';
|
|
179
|
+
this.errorMessage404 = 'We could not find the provided project ID in PushFeedback.';
|
|
180
|
+
this.messagePlaceholder = 'Comments';
|
|
181
|
+
this.footerText = '';
|
|
182
|
+
this.modalPosition = 'center';
|
|
183
|
+
this.modalTitle = 'Share your feedback';
|
|
184
|
+
this.modalTitleError = 'Oops!';
|
|
185
|
+
this.modalTitleSuccess = 'Thanks for your feedback!';
|
|
186
|
+
this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
|
|
187
|
+
this.ratingPlaceholder = 'Was this page helpful?';
|
|
188
|
+
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
189
|
+
this.sendButtonText = 'Send';
|
|
190
|
+
this.screenshotAttachedText = 'Screenshot attached';
|
|
191
|
+
this.screenshotButtonText = 'Add a screenshot';
|
|
192
|
+
this.screenshotTakingText = 'Taking screenshot...';
|
|
193
|
+
this.screenshotTopbarText = 'Select an element on this page';
|
|
194
|
+
this.successMessage = '';
|
|
195
|
+
this.canvasEditorTitle = 'Edit screenshot';
|
|
196
|
+
this.canvasEditorCancelText = 'Cancel';
|
|
197
|
+
this.canvasEditorSaveText = 'Save';
|
|
198
|
+
this.editTextButtonText = 'Edit Text';
|
|
199
|
+
this.sizeLabelText = 'Size:';
|
|
200
|
+
this.borderLabelText = 'Border:';
|
|
201
|
+
this.editTextPromptText = 'Edit text:';
|
|
202
|
+
this.screenshotErrorGeneral = 'Failed to capture screenshot.';
|
|
203
|
+
this.screenshotErrorPermission = 'Permission denied. Please allow screen sharing to take screenshots.';
|
|
204
|
+
this.screenshotErrorNotSupported = 'Screen capture is not supported in this browser.';
|
|
205
|
+
this.screenshotErrorNotFound = 'No screen sources available for capture.';
|
|
206
|
+
this.screenshotErrorCancelled = 'Screenshot capture was cancelled.';
|
|
207
|
+
this.screenshotErrorBrowserNotSupported = 'Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari.';
|
|
208
|
+
this.screenshotErrorUnexpected = 'An unexpected error occurred. Please try again.';
|
|
209
|
+
}
|
|
210
|
+
componentWillLoad() {
|
|
211
|
+
if (this.fetchData)
|
|
212
|
+
this.fetchProjectData();
|
|
213
|
+
this.formEmail = this.emailAddress;
|
|
214
|
+
if (this.rating) {
|
|
215
|
+
this.selectedRating = this.rating;
|
|
216
|
+
}
|
|
217
|
+
if (this.ratingMode == 'thumbs' && this.rating == 0) {
|
|
218
|
+
this.selectedRating = 5;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async fetchProjectData() {
|
|
222
|
+
try {
|
|
223
|
+
const response = await fetch('https://app.pushfeedback.com/api/projects/' + this.project + '/');
|
|
224
|
+
const data = await response.json();
|
|
225
|
+
this.whitelabel = data.whitelabel;
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
console.log(error);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
resetOverflow() {
|
|
232
|
+
// Just clean up any stray classes, don't add/remove during screenshot
|
|
233
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-open');
|
|
234
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-open--scroll');
|
|
235
|
+
document.documentElement.classList.remove('feedback-modal-screenshot-closing');
|
|
236
|
+
}
|
|
237
|
+
handleMessageInput(event) {
|
|
238
|
+
this.formMessage = event.target.value;
|
|
239
|
+
}
|
|
240
|
+
handleEmailInput(event) {
|
|
241
|
+
this.formEmail = event.target.value;
|
|
242
|
+
}
|
|
243
|
+
handleCheckboxChange(event) {
|
|
244
|
+
this.isPrivacyChecked = event.target.checked;
|
|
245
|
+
}
|
|
246
|
+
handleVerification(event) {
|
|
247
|
+
this.formVerification = event.target.value;
|
|
248
|
+
}
|
|
249
|
+
handleRatingChange(newRating) {
|
|
250
|
+
this.selectedRating = newRating;
|
|
251
|
+
}
|
|
252
|
+
render() {
|
|
253
|
+
return (h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showCanvasEditor && (h("canvas-editor", { ref: (el) => this.canvasEditorRef = el, "canvas-editor-title": this.canvasEditorTitle, "canvas-editor-cancel-text": this.canvasEditorCancelText, "canvas-editor-save-text": this.canvasEditorSaveText, "screenshot-taking-text": this.screenshotTakingText, "screenshot-attached-text": this.screenshotAttachedText, "screenshot-button-text": this.screenshotButtonText, "auto-start-screenshot": this.autoStartCapture, "existing-screenshot": this.encodedScreenshot || '', "edit-text-button-text": this.editTextButtonText, "size-label-text": this.sizeLabelText, "border-label-text": this.borderLabelText, "edit-text-prompt-text": this.editTextPromptText, "screenshot-error-general": this.screenshotErrorGeneral, "screenshot-error-permission": this.screenshotErrorPermission, "screenshot-error-not-supported": this.screenshotErrorNotSupported, "screenshot-error-not-found": this.screenshotErrorNotFound, "screenshot-error-cancelled": this.screenshotErrorCancelled, "screenshot-error-browser-not-supported": this.screenshotErrorBrowserNotSupported, "screenshot-error-unexpected": this.screenshotErrorUnexpected, onScreenshotReady: this.handleScreenshotReady, onScreenshotCancelled: this.handleScreenshotCancelled, onScreenshotFailed: this.handleScreenshotError })), this.showScreenshotError && (h("div", { class: "screenshot-error-notification" }, h("div", { class: "screenshot-error-content" }, h("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { cx: "12", cy: "12", r: "10" }), h("line", { x1: "15", y1: "9", x2: "9", y2: "15" }), h("line", { x1: "9", y1: "9", x2: "15", y2: "15" })), h("span", null, this.screenshotError), h("button", { class: "error-close-btn", onClick: () => this.showScreenshotError = false, title: "Close" }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, 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
|
|
254
|
+
? 'feedback-modal-rating-button--selected'
|
|
255
|
+
: ''}`, onClick: (event) => {
|
|
256
|
+
event.preventDefault();
|
|
257
|
+
this.handleRatingChange(1);
|
|
258
|
+
} }, 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
|
|
259
|
+
? 'feedback-modal-rating-button--selected'
|
|
260
|
+
: ''}`, onClick: (event) => {
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
this.handleRatingChange(5);
|
|
263
|
+
} }, 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
|
|
264
|
+
? 'feedback-modal-rating-button--selected'
|
|
265
|
+
: ''}`, onClick: (event) => {
|
|
266
|
+
event.preventDefault();
|
|
267
|
+
this.handleRatingChange(rating);
|
|
268
|
+
} }, 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, required: this.isEmailRequired }))), 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 || this.takingScreenshot }, this.encodedScreenshot && (h("div", { class: "screenshot-preview", onClick: this.openCanvasEditor }, h("img", { src: this.encodedScreenshot, alt: "Screenshot Preview" }))), !this.encodedScreenshot && !this.takingScreenshot && (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.takingScreenshot && (h("div", { class: "screenshot-loading" }, h("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#666", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather-loader" }, h("line", { x1: "12", y1: "2", x2: "12", y2: "6" }), h("line", { x1: "12", y1: "18", x2: "12", y2: "22" }), h("line", { x1: "4.93", y1: "4.93", x2: "7.76", y2: "7.76" }), h("line", { x1: "16.24", y1: "16.24", x2: "19.07", y2: "19.07" }), h("line", { x1: "2", y1: "12", x2: "6", y2: "12" }), h("line", { x1: "18", y1: "12", x2: "22", y2: "12" }), h("line", { x1: "4.93", y1: "19.07", x2: "7.76", y2: "16.24" }), h("line", { x1: "16.24", y1: "7.76", x2: "19.07", y2: "4.93" })))), this.takingScreenshot ? this.screenshotTakingText :
|
|
269
|
+
this.encodedScreenshot ? this.screenshotAttachedText : 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("div", { class: "feedback-footer-text" }, h("span", { innerHTML: this.footerText }))))))));
|
|
270
|
+
}
|
|
271
|
+
componentDidRender() {
|
|
272
|
+
if (this.showModal) {
|
|
273
|
+
requestAnimationFrame(() => {
|
|
274
|
+
this.overlayVisible = true;
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
async openModal() {
|
|
279
|
+
this.showModal = true;
|
|
280
|
+
requestAnimationFrame(() => {
|
|
281
|
+
requestAnimationFrame(() => {
|
|
282
|
+
this.isAnimating = true;
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
static get is() { return "feedback-modal"; }
|
|
287
|
+
static get encapsulation() { return "shadow"; }
|
|
288
|
+
static get originalStyleUrls() {
|
|
289
|
+
return {
|
|
290
|
+
"$": ["feedback-modal.css"]
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
static get styleUrls() {
|
|
294
|
+
return {
|
|
295
|
+
"$": ["feedback-modal.css"]
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
static get properties() {
|
|
299
|
+
return {
|
|
300
|
+
"customFont": {
|
|
301
|
+
"type": "boolean",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "boolean",
|
|
305
|
+
"resolved": "boolean",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": ""
|
|
313
|
+
},
|
|
314
|
+
"attribute": "custom-font",
|
|
315
|
+
"reflect": false,
|
|
316
|
+
"defaultValue": "false"
|
|
317
|
+
},
|
|
318
|
+
"emailAddress": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"mutable": false,
|
|
321
|
+
"complexType": {
|
|
322
|
+
"original": "string",
|
|
323
|
+
"resolved": "string",
|
|
324
|
+
"references": {}
|
|
325
|
+
},
|
|
326
|
+
"required": false,
|
|
327
|
+
"optional": false,
|
|
328
|
+
"docs": {
|
|
329
|
+
"tags": [],
|
|
330
|
+
"text": ""
|
|
331
|
+
},
|
|
332
|
+
"attribute": "email-address",
|
|
333
|
+
"reflect": false,
|
|
334
|
+
"defaultValue": "''"
|
|
335
|
+
},
|
|
336
|
+
"hideEmail": {
|
|
337
|
+
"type": "boolean",
|
|
338
|
+
"mutable": false,
|
|
339
|
+
"complexType": {
|
|
340
|
+
"original": "boolean",
|
|
341
|
+
"resolved": "boolean",
|
|
342
|
+
"references": {}
|
|
343
|
+
},
|
|
344
|
+
"required": false,
|
|
345
|
+
"optional": false,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": ""
|
|
349
|
+
},
|
|
350
|
+
"attribute": "hide-email",
|
|
351
|
+
"reflect": false,
|
|
352
|
+
"defaultValue": "false"
|
|
353
|
+
},
|
|
354
|
+
"isEmailRequired": {
|
|
355
|
+
"type": "boolean",
|
|
356
|
+
"mutable": false,
|
|
357
|
+
"complexType": {
|
|
358
|
+
"original": "boolean",
|
|
359
|
+
"resolved": "boolean",
|
|
360
|
+
"references": {}
|
|
361
|
+
},
|
|
362
|
+
"required": false,
|
|
363
|
+
"optional": false,
|
|
364
|
+
"docs": {
|
|
365
|
+
"tags": [],
|
|
366
|
+
"text": ""
|
|
367
|
+
},
|
|
368
|
+
"attribute": "is-email-required",
|
|
369
|
+
"reflect": false,
|
|
370
|
+
"defaultValue": "false"
|
|
371
|
+
},
|
|
372
|
+
"ratingMode": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"mutable": false,
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "string",
|
|
377
|
+
"resolved": "string",
|
|
378
|
+
"references": {}
|
|
379
|
+
},
|
|
380
|
+
"required": false,
|
|
381
|
+
"optional": false,
|
|
382
|
+
"docs": {
|
|
383
|
+
"tags": [],
|
|
384
|
+
"text": ""
|
|
385
|
+
},
|
|
386
|
+
"attribute": "rating-mode",
|
|
387
|
+
"reflect": false,
|
|
388
|
+
"defaultValue": "'thumbs'"
|
|
389
|
+
},
|
|
390
|
+
"hasSelectedElement": {
|
|
391
|
+
"type": "boolean",
|
|
392
|
+
"mutable": true,
|
|
393
|
+
"complexType": {
|
|
394
|
+
"original": "boolean",
|
|
395
|
+
"resolved": "boolean",
|
|
396
|
+
"references": {}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": ""
|
|
403
|
+
},
|
|
404
|
+
"attribute": "has-selected-element",
|
|
405
|
+
"reflect": true,
|
|
406
|
+
"defaultValue": "false"
|
|
407
|
+
},
|
|
408
|
+
"hidePrivacyPolicy": {
|
|
409
|
+
"type": "boolean",
|
|
410
|
+
"mutable": false,
|
|
411
|
+
"complexType": {
|
|
412
|
+
"original": "boolean",
|
|
413
|
+
"resolved": "boolean",
|
|
414
|
+
"references": {}
|
|
415
|
+
},
|
|
416
|
+
"required": false,
|
|
417
|
+
"optional": false,
|
|
418
|
+
"docs": {
|
|
419
|
+
"tags": [],
|
|
420
|
+
"text": ""
|
|
421
|
+
},
|
|
422
|
+
"attribute": "hide-privacy-policy",
|
|
423
|
+
"reflect": false,
|
|
424
|
+
"defaultValue": "true"
|
|
425
|
+
},
|
|
426
|
+
"hideRating": {
|
|
427
|
+
"type": "boolean",
|
|
428
|
+
"mutable": false,
|
|
429
|
+
"complexType": {
|
|
430
|
+
"original": "boolean",
|
|
431
|
+
"resolved": "boolean",
|
|
432
|
+
"references": {}
|
|
433
|
+
},
|
|
434
|
+
"required": false,
|
|
435
|
+
"optional": false,
|
|
436
|
+
"docs": {
|
|
437
|
+
"tags": [],
|
|
438
|
+
"text": ""
|
|
439
|
+
},
|
|
440
|
+
"attribute": "hide-rating",
|
|
441
|
+
"reflect": false,
|
|
442
|
+
"defaultValue": "false"
|
|
443
|
+
},
|
|
444
|
+
"hideScreenshotButton": {
|
|
445
|
+
"type": "boolean",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "boolean",
|
|
449
|
+
"resolved": "boolean",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": false,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [],
|
|
456
|
+
"text": ""
|
|
457
|
+
},
|
|
458
|
+
"attribute": "hide-screenshot-button",
|
|
459
|
+
"reflect": false,
|
|
460
|
+
"defaultValue": "false"
|
|
461
|
+
},
|
|
462
|
+
"project": {
|
|
463
|
+
"type": "string",
|
|
464
|
+
"mutable": false,
|
|
465
|
+
"complexType": {
|
|
466
|
+
"original": "string",
|
|
467
|
+
"resolved": "string",
|
|
468
|
+
"references": {}
|
|
469
|
+
},
|
|
470
|
+
"required": false,
|
|
471
|
+
"optional": false,
|
|
472
|
+
"docs": {
|
|
473
|
+
"tags": [],
|
|
474
|
+
"text": ""
|
|
475
|
+
},
|
|
476
|
+
"attribute": "project",
|
|
477
|
+
"reflect": false,
|
|
478
|
+
"defaultValue": "''"
|
|
479
|
+
},
|
|
480
|
+
"showScreenshotMode": {
|
|
481
|
+
"type": "boolean",
|
|
482
|
+
"mutable": true,
|
|
483
|
+
"complexType": {
|
|
484
|
+
"original": "boolean",
|
|
485
|
+
"resolved": "boolean",
|
|
486
|
+
"references": {}
|
|
487
|
+
},
|
|
488
|
+
"required": false,
|
|
489
|
+
"optional": false,
|
|
490
|
+
"docs": {
|
|
491
|
+
"tags": [],
|
|
492
|
+
"text": ""
|
|
493
|
+
},
|
|
494
|
+
"attribute": "show-screenshot-mode",
|
|
495
|
+
"reflect": true,
|
|
496
|
+
"defaultValue": "false"
|
|
497
|
+
},
|
|
498
|
+
"showScreenshotTopBar": {
|
|
499
|
+
"type": "boolean",
|
|
500
|
+
"mutable": true,
|
|
501
|
+
"complexType": {
|
|
502
|
+
"original": "boolean",
|
|
503
|
+
"resolved": "boolean",
|
|
504
|
+
"references": {}
|
|
505
|
+
},
|
|
506
|
+
"required": false,
|
|
507
|
+
"optional": false,
|
|
508
|
+
"docs": {
|
|
509
|
+
"tags": [],
|
|
510
|
+
"text": ""
|
|
511
|
+
},
|
|
512
|
+
"attribute": "show-screenshot-top-bar",
|
|
513
|
+
"reflect": true,
|
|
514
|
+
"defaultValue": "false"
|
|
515
|
+
},
|
|
516
|
+
"showModal": {
|
|
517
|
+
"type": "boolean",
|
|
518
|
+
"mutable": true,
|
|
519
|
+
"complexType": {
|
|
520
|
+
"original": "boolean",
|
|
521
|
+
"resolved": "boolean",
|
|
522
|
+
"references": {}
|
|
523
|
+
},
|
|
524
|
+
"required": false,
|
|
525
|
+
"optional": false,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": ""
|
|
529
|
+
},
|
|
530
|
+
"attribute": "show-modal",
|
|
531
|
+
"reflect": true,
|
|
532
|
+
"defaultValue": "false"
|
|
533
|
+
},
|
|
534
|
+
"rating": {
|
|
535
|
+
"type": "number",
|
|
536
|
+
"mutable": false,
|
|
537
|
+
"complexType": {
|
|
538
|
+
"original": "number",
|
|
539
|
+
"resolved": "number",
|
|
540
|
+
"references": {}
|
|
541
|
+
},
|
|
542
|
+
"required": false,
|
|
543
|
+
"optional": false,
|
|
544
|
+
"docs": {
|
|
545
|
+
"tags": [],
|
|
546
|
+
"text": ""
|
|
547
|
+
},
|
|
548
|
+
"attribute": "rating",
|
|
549
|
+
"reflect": false
|
|
550
|
+
},
|
|
551
|
+
"metadata": {
|
|
552
|
+
"type": "string",
|
|
553
|
+
"mutable": false,
|
|
554
|
+
"complexType": {
|
|
555
|
+
"original": "''",
|
|
556
|
+
"resolved": "\"\"",
|
|
557
|
+
"references": {}
|
|
558
|
+
},
|
|
559
|
+
"required": false,
|
|
560
|
+
"optional": false,
|
|
561
|
+
"docs": {
|
|
562
|
+
"tags": [],
|
|
563
|
+
"text": ""
|
|
564
|
+
},
|
|
565
|
+
"attribute": "metadata",
|
|
566
|
+
"reflect": false
|
|
567
|
+
},
|
|
568
|
+
"fetchData": {
|
|
569
|
+
"type": "boolean",
|
|
570
|
+
"mutable": false,
|
|
571
|
+
"complexType": {
|
|
572
|
+
"original": "boolean",
|
|
573
|
+
"resolved": "boolean",
|
|
574
|
+
"references": {}
|
|
575
|
+
},
|
|
576
|
+
"required": false,
|
|
577
|
+
"optional": false,
|
|
578
|
+
"docs": {
|
|
579
|
+
"tags": [],
|
|
580
|
+
"text": ""
|
|
581
|
+
},
|
|
582
|
+
"attribute": "fetch-data",
|
|
583
|
+
"reflect": false,
|
|
584
|
+
"defaultValue": "true"
|
|
585
|
+
},
|
|
586
|
+
"emailPlaceholder": {
|
|
587
|
+
"type": "string",
|
|
588
|
+
"mutable": false,
|
|
589
|
+
"complexType": {
|
|
590
|
+
"original": "string",
|
|
591
|
+
"resolved": "string",
|
|
592
|
+
"references": {}
|
|
593
|
+
},
|
|
594
|
+
"required": false,
|
|
595
|
+
"optional": false,
|
|
596
|
+
"docs": {
|
|
597
|
+
"tags": [],
|
|
598
|
+
"text": ""
|
|
599
|
+
},
|
|
600
|
+
"attribute": "email-placeholder",
|
|
601
|
+
"reflect": false,
|
|
602
|
+
"defaultValue": "'Email address (optional)'"
|
|
603
|
+
},
|
|
604
|
+
"errorMessage": {
|
|
605
|
+
"type": "string",
|
|
606
|
+
"mutable": false,
|
|
607
|
+
"complexType": {
|
|
608
|
+
"original": "string",
|
|
609
|
+
"resolved": "string",
|
|
610
|
+
"references": {}
|
|
611
|
+
},
|
|
612
|
+
"required": false,
|
|
613
|
+
"optional": false,
|
|
614
|
+
"docs": {
|
|
615
|
+
"tags": [],
|
|
616
|
+
"text": ""
|
|
617
|
+
},
|
|
618
|
+
"attribute": "error-message",
|
|
619
|
+
"reflect": false,
|
|
620
|
+
"defaultValue": "'Please try again later.'"
|
|
621
|
+
},
|
|
622
|
+
"errorMessage403": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"mutable": false,
|
|
625
|
+
"complexType": {
|
|
626
|
+
"original": "string",
|
|
627
|
+
"resolved": "string",
|
|
628
|
+
"references": {}
|
|
629
|
+
},
|
|
630
|
+
"required": false,
|
|
631
|
+
"optional": false,
|
|
632
|
+
"docs": {
|
|
633
|
+
"tags": [],
|
|
634
|
+
"text": ""
|
|
635
|
+
},
|
|
636
|
+
"attribute": "error-message-4-0-3",
|
|
637
|
+
"reflect": false,
|
|
638
|
+
"defaultValue": "'The request URL does not match the one defined in PushFeedback for this project.'"
|
|
639
|
+
},
|
|
640
|
+
"errorMessage404": {
|
|
641
|
+
"type": "string",
|
|
642
|
+
"mutable": false,
|
|
643
|
+
"complexType": {
|
|
644
|
+
"original": "string",
|
|
645
|
+
"resolved": "string",
|
|
646
|
+
"references": {}
|
|
647
|
+
},
|
|
648
|
+
"required": false,
|
|
649
|
+
"optional": false,
|
|
650
|
+
"docs": {
|
|
651
|
+
"tags": [],
|
|
652
|
+
"text": ""
|
|
653
|
+
},
|
|
654
|
+
"attribute": "error-message-4-0-4",
|
|
655
|
+
"reflect": false,
|
|
656
|
+
"defaultValue": "'We could not find the provided project ID in PushFeedback.'"
|
|
657
|
+
},
|
|
658
|
+
"messagePlaceholder": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"mutable": false,
|
|
661
|
+
"complexType": {
|
|
662
|
+
"original": "string",
|
|
663
|
+
"resolved": "string",
|
|
664
|
+
"references": {}
|
|
665
|
+
},
|
|
666
|
+
"required": false,
|
|
667
|
+
"optional": false,
|
|
668
|
+
"docs": {
|
|
669
|
+
"tags": [],
|
|
670
|
+
"text": ""
|
|
671
|
+
},
|
|
672
|
+
"attribute": "message-placeholder",
|
|
673
|
+
"reflect": false,
|
|
674
|
+
"defaultValue": "'Comments'"
|
|
675
|
+
},
|
|
676
|
+
"footerText": {
|
|
677
|
+
"type": "string",
|
|
678
|
+
"mutable": false,
|
|
679
|
+
"complexType": {
|
|
680
|
+
"original": "string",
|
|
681
|
+
"resolved": "string",
|
|
682
|
+
"references": {}
|
|
683
|
+
},
|
|
684
|
+
"required": false,
|
|
685
|
+
"optional": false,
|
|
686
|
+
"docs": {
|
|
687
|
+
"tags": [],
|
|
688
|
+
"text": ""
|
|
689
|
+
},
|
|
690
|
+
"attribute": "footer-text",
|
|
691
|
+
"reflect": false,
|
|
692
|
+
"defaultValue": "''"
|
|
693
|
+
},
|
|
694
|
+
"modalPosition": {
|
|
695
|
+
"type": "string",
|
|
696
|
+
"mutable": false,
|
|
697
|
+
"complexType": {
|
|
698
|
+
"original": "string",
|
|
699
|
+
"resolved": "string",
|
|
700
|
+
"references": {}
|
|
701
|
+
},
|
|
702
|
+
"required": false,
|
|
703
|
+
"optional": false,
|
|
704
|
+
"docs": {
|
|
705
|
+
"tags": [],
|
|
706
|
+
"text": ""
|
|
707
|
+
},
|
|
708
|
+
"attribute": "modal-position",
|
|
709
|
+
"reflect": false,
|
|
710
|
+
"defaultValue": "'center'"
|
|
711
|
+
},
|
|
712
|
+
"modalTitle": {
|
|
713
|
+
"type": "string",
|
|
714
|
+
"mutable": false,
|
|
715
|
+
"complexType": {
|
|
716
|
+
"original": "string",
|
|
717
|
+
"resolved": "string",
|
|
718
|
+
"references": {}
|
|
719
|
+
},
|
|
720
|
+
"required": false,
|
|
721
|
+
"optional": false,
|
|
722
|
+
"docs": {
|
|
723
|
+
"tags": [],
|
|
724
|
+
"text": ""
|
|
725
|
+
},
|
|
726
|
+
"attribute": "modal-title",
|
|
727
|
+
"reflect": false,
|
|
728
|
+
"defaultValue": "'Share your feedback'"
|
|
729
|
+
},
|
|
730
|
+
"modalTitleError": {
|
|
731
|
+
"type": "string",
|
|
732
|
+
"mutable": false,
|
|
733
|
+
"complexType": {
|
|
734
|
+
"original": "string",
|
|
735
|
+
"resolved": "string",
|
|
736
|
+
"references": {}
|
|
737
|
+
},
|
|
738
|
+
"required": false,
|
|
739
|
+
"optional": false,
|
|
740
|
+
"docs": {
|
|
741
|
+
"tags": [],
|
|
742
|
+
"text": ""
|
|
743
|
+
},
|
|
744
|
+
"attribute": "modal-title-error",
|
|
745
|
+
"reflect": false,
|
|
746
|
+
"defaultValue": "'Oops!'"
|
|
747
|
+
},
|
|
748
|
+
"modalTitleSuccess": {
|
|
749
|
+
"type": "string",
|
|
750
|
+
"mutable": false,
|
|
751
|
+
"complexType": {
|
|
752
|
+
"original": "string",
|
|
753
|
+
"resolved": "string",
|
|
754
|
+
"references": {}
|
|
755
|
+
},
|
|
756
|
+
"required": false,
|
|
757
|
+
"optional": false,
|
|
758
|
+
"docs": {
|
|
759
|
+
"tags": [],
|
|
760
|
+
"text": ""
|
|
761
|
+
},
|
|
762
|
+
"attribute": "modal-title-success",
|
|
763
|
+
"reflect": false,
|
|
764
|
+
"defaultValue": "'Thanks for your feedback!'"
|
|
765
|
+
},
|
|
766
|
+
"privacyPolicyText": {
|
|
767
|
+
"type": "string",
|
|
768
|
+
"mutable": false,
|
|
769
|
+
"complexType": {
|
|
770
|
+
"original": "string",
|
|
771
|
+
"resolved": "string",
|
|
772
|
+
"references": {}
|
|
773
|
+
},
|
|
774
|
+
"required": false,
|
|
775
|
+
"optional": false,
|
|
776
|
+
"docs": {
|
|
777
|
+
"tags": [],
|
|
778
|
+
"text": ""
|
|
779
|
+
},
|
|
780
|
+
"attribute": "privacy-policy-text",
|
|
781
|
+
"reflect": false,
|
|
782
|
+
"defaultValue": "\"I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.\""
|
|
783
|
+
},
|
|
784
|
+
"ratingPlaceholder": {
|
|
785
|
+
"type": "string",
|
|
786
|
+
"mutable": false,
|
|
787
|
+
"complexType": {
|
|
788
|
+
"original": "string",
|
|
789
|
+
"resolved": "string",
|
|
790
|
+
"references": {}
|
|
791
|
+
},
|
|
792
|
+
"required": false,
|
|
793
|
+
"optional": false,
|
|
794
|
+
"docs": {
|
|
795
|
+
"tags": [],
|
|
796
|
+
"text": ""
|
|
797
|
+
},
|
|
798
|
+
"attribute": "rating-placeholder",
|
|
799
|
+
"reflect": false,
|
|
800
|
+
"defaultValue": "'Was this page helpful?'"
|
|
801
|
+
},
|
|
802
|
+
"ratingStarsPlaceholder": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"mutable": false,
|
|
805
|
+
"complexType": {
|
|
806
|
+
"original": "string",
|
|
807
|
+
"resolved": "string",
|
|
808
|
+
"references": {}
|
|
809
|
+
},
|
|
810
|
+
"required": false,
|
|
811
|
+
"optional": false,
|
|
812
|
+
"docs": {
|
|
813
|
+
"tags": [],
|
|
814
|
+
"text": ""
|
|
815
|
+
},
|
|
816
|
+
"attribute": "rating-stars-placeholder",
|
|
817
|
+
"reflect": false,
|
|
818
|
+
"defaultValue": "'How would you rate this page?'"
|
|
819
|
+
},
|
|
820
|
+
"sendButtonText": {
|
|
821
|
+
"type": "string",
|
|
822
|
+
"mutable": false,
|
|
823
|
+
"complexType": {
|
|
824
|
+
"original": "string",
|
|
825
|
+
"resolved": "string",
|
|
826
|
+
"references": {}
|
|
827
|
+
},
|
|
828
|
+
"required": false,
|
|
829
|
+
"optional": false,
|
|
830
|
+
"docs": {
|
|
831
|
+
"tags": [],
|
|
832
|
+
"text": ""
|
|
833
|
+
},
|
|
834
|
+
"attribute": "send-button-text",
|
|
835
|
+
"reflect": false,
|
|
836
|
+
"defaultValue": "'Send'"
|
|
837
|
+
},
|
|
838
|
+
"screenshotAttachedText": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"mutable": false,
|
|
841
|
+
"complexType": {
|
|
842
|
+
"original": "string",
|
|
843
|
+
"resolved": "string",
|
|
844
|
+
"references": {}
|
|
845
|
+
},
|
|
846
|
+
"required": false,
|
|
847
|
+
"optional": false,
|
|
848
|
+
"docs": {
|
|
849
|
+
"tags": [],
|
|
850
|
+
"text": ""
|
|
851
|
+
},
|
|
852
|
+
"attribute": "screenshot-attached-text",
|
|
853
|
+
"reflect": false,
|
|
854
|
+
"defaultValue": "'Screenshot attached'"
|
|
855
|
+
},
|
|
856
|
+
"screenshotButtonText": {
|
|
857
|
+
"type": "string",
|
|
858
|
+
"mutable": false,
|
|
859
|
+
"complexType": {
|
|
860
|
+
"original": "string",
|
|
861
|
+
"resolved": "string",
|
|
862
|
+
"references": {}
|
|
863
|
+
},
|
|
864
|
+
"required": false,
|
|
865
|
+
"optional": false,
|
|
866
|
+
"docs": {
|
|
867
|
+
"tags": [],
|
|
868
|
+
"text": ""
|
|
869
|
+
},
|
|
870
|
+
"attribute": "screenshot-button-text",
|
|
871
|
+
"reflect": false,
|
|
872
|
+
"defaultValue": "'Add a screenshot'"
|
|
873
|
+
},
|
|
874
|
+
"screenshotTakingText": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"mutable": false,
|
|
877
|
+
"complexType": {
|
|
878
|
+
"original": "string",
|
|
879
|
+
"resolved": "string",
|
|
880
|
+
"references": {}
|
|
881
|
+
},
|
|
882
|
+
"required": false,
|
|
883
|
+
"optional": false,
|
|
884
|
+
"docs": {
|
|
885
|
+
"tags": [],
|
|
886
|
+
"text": ""
|
|
887
|
+
},
|
|
888
|
+
"attribute": "screenshot-taking-text",
|
|
889
|
+
"reflect": false,
|
|
890
|
+
"defaultValue": "'Taking screenshot...'"
|
|
891
|
+
},
|
|
892
|
+
"screenshotTopbarText": {
|
|
893
|
+
"type": "string",
|
|
894
|
+
"mutable": false,
|
|
895
|
+
"complexType": {
|
|
896
|
+
"original": "string",
|
|
897
|
+
"resolved": "string",
|
|
898
|
+
"references": {}
|
|
899
|
+
},
|
|
900
|
+
"required": false,
|
|
901
|
+
"optional": false,
|
|
902
|
+
"docs": {
|
|
903
|
+
"tags": [],
|
|
904
|
+
"text": ""
|
|
905
|
+
},
|
|
906
|
+
"attribute": "screenshot-topbar-text",
|
|
907
|
+
"reflect": false,
|
|
908
|
+
"defaultValue": "'Select an element on this page'"
|
|
909
|
+
},
|
|
910
|
+
"successMessage": {
|
|
911
|
+
"type": "string",
|
|
912
|
+
"mutable": false,
|
|
913
|
+
"complexType": {
|
|
914
|
+
"original": "string",
|
|
915
|
+
"resolved": "string",
|
|
916
|
+
"references": {}
|
|
917
|
+
},
|
|
918
|
+
"required": false,
|
|
919
|
+
"optional": false,
|
|
920
|
+
"docs": {
|
|
921
|
+
"tags": [],
|
|
922
|
+
"text": ""
|
|
923
|
+
},
|
|
924
|
+
"attribute": "success-message",
|
|
925
|
+
"reflect": false,
|
|
926
|
+
"defaultValue": "''"
|
|
927
|
+
},
|
|
928
|
+
"canvasEditorTitle": {
|
|
929
|
+
"type": "string",
|
|
930
|
+
"mutable": false,
|
|
931
|
+
"complexType": {
|
|
932
|
+
"original": "string",
|
|
933
|
+
"resolved": "string",
|
|
934
|
+
"references": {}
|
|
935
|
+
},
|
|
936
|
+
"required": false,
|
|
937
|
+
"optional": false,
|
|
938
|
+
"docs": {
|
|
939
|
+
"tags": [],
|
|
940
|
+
"text": ""
|
|
941
|
+
},
|
|
942
|
+
"attribute": "canvas-editor-title",
|
|
943
|
+
"reflect": false,
|
|
944
|
+
"defaultValue": "'Edit screenshot'"
|
|
945
|
+
},
|
|
946
|
+
"canvasEditorCancelText": {
|
|
947
|
+
"type": "string",
|
|
948
|
+
"mutable": false,
|
|
949
|
+
"complexType": {
|
|
950
|
+
"original": "string",
|
|
951
|
+
"resolved": "string",
|
|
952
|
+
"references": {}
|
|
953
|
+
},
|
|
954
|
+
"required": false,
|
|
955
|
+
"optional": false,
|
|
956
|
+
"docs": {
|
|
957
|
+
"tags": [],
|
|
958
|
+
"text": ""
|
|
959
|
+
},
|
|
960
|
+
"attribute": "canvas-editor-cancel-text",
|
|
961
|
+
"reflect": false,
|
|
962
|
+
"defaultValue": "'Cancel'"
|
|
963
|
+
},
|
|
964
|
+
"canvasEditorSaveText": {
|
|
965
|
+
"type": "string",
|
|
966
|
+
"mutable": false,
|
|
967
|
+
"complexType": {
|
|
968
|
+
"original": "string",
|
|
969
|
+
"resolved": "string",
|
|
970
|
+
"references": {}
|
|
971
|
+
},
|
|
972
|
+
"required": false,
|
|
973
|
+
"optional": false,
|
|
974
|
+
"docs": {
|
|
975
|
+
"tags": [],
|
|
976
|
+
"text": ""
|
|
977
|
+
},
|
|
978
|
+
"attribute": "canvas-editor-save-text",
|
|
979
|
+
"reflect": false,
|
|
980
|
+
"defaultValue": "'Save'"
|
|
981
|
+
},
|
|
982
|
+
"editTextButtonText": {
|
|
983
|
+
"type": "string",
|
|
984
|
+
"mutable": false,
|
|
985
|
+
"complexType": {
|
|
986
|
+
"original": "string",
|
|
987
|
+
"resolved": "string",
|
|
988
|
+
"references": {}
|
|
989
|
+
},
|
|
990
|
+
"required": false,
|
|
991
|
+
"optional": false,
|
|
992
|
+
"docs": {
|
|
993
|
+
"tags": [],
|
|
994
|
+
"text": ""
|
|
995
|
+
},
|
|
996
|
+
"attribute": "edit-text-button-text",
|
|
997
|
+
"reflect": false,
|
|
998
|
+
"defaultValue": "'Edit Text'"
|
|
999
|
+
},
|
|
1000
|
+
"sizeLabelText": {
|
|
1001
|
+
"type": "string",
|
|
1002
|
+
"mutable": false,
|
|
1003
|
+
"complexType": {
|
|
1004
|
+
"original": "string",
|
|
1005
|
+
"resolved": "string",
|
|
1006
|
+
"references": {}
|
|
1007
|
+
},
|
|
1008
|
+
"required": false,
|
|
1009
|
+
"optional": false,
|
|
1010
|
+
"docs": {
|
|
1011
|
+
"tags": [],
|
|
1012
|
+
"text": ""
|
|
1013
|
+
},
|
|
1014
|
+
"attribute": "size-label-text",
|
|
1015
|
+
"reflect": false,
|
|
1016
|
+
"defaultValue": "'Size:'"
|
|
1017
|
+
},
|
|
1018
|
+
"borderLabelText": {
|
|
1019
|
+
"type": "string",
|
|
1020
|
+
"mutable": false,
|
|
1021
|
+
"complexType": {
|
|
1022
|
+
"original": "string",
|
|
1023
|
+
"resolved": "string",
|
|
1024
|
+
"references": {}
|
|
1025
|
+
},
|
|
1026
|
+
"required": false,
|
|
1027
|
+
"optional": false,
|
|
1028
|
+
"docs": {
|
|
1029
|
+
"tags": [],
|
|
1030
|
+
"text": ""
|
|
1031
|
+
},
|
|
1032
|
+
"attribute": "border-label-text",
|
|
1033
|
+
"reflect": false,
|
|
1034
|
+
"defaultValue": "'Border:'"
|
|
1035
|
+
},
|
|
1036
|
+
"editTextPromptText": {
|
|
1037
|
+
"type": "string",
|
|
1038
|
+
"mutable": false,
|
|
1039
|
+
"complexType": {
|
|
1040
|
+
"original": "string",
|
|
1041
|
+
"resolved": "string",
|
|
1042
|
+
"references": {}
|
|
1043
|
+
},
|
|
1044
|
+
"required": false,
|
|
1045
|
+
"optional": false,
|
|
1046
|
+
"docs": {
|
|
1047
|
+
"tags": [],
|
|
1048
|
+
"text": ""
|
|
1049
|
+
},
|
|
1050
|
+
"attribute": "edit-text-prompt-text",
|
|
1051
|
+
"reflect": false,
|
|
1052
|
+
"defaultValue": "'Edit text:'"
|
|
1053
|
+
},
|
|
1054
|
+
"screenshotErrorGeneral": {
|
|
1055
|
+
"type": "string",
|
|
1056
|
+
"mutable": false,
|
|
1057
|
+
"complexType": {
|
|
1058
|
+
"original": "string",
|
|
1059
|
+
"resolved": "string",
|
|
1060
|
+
"references": {}
|
|
1061
|
+
},
|
|
1062
|
+
"required": false,
|
|
1063
|
+
"optional": false,
|
|
1064
|
+
"docs": {
|
|
1065
|
+
"tags": [],
|
|
1066
|
+
"text": ""
|
|
1067
|
+
},
|
|
1068
|
+
"attribute": "screenshot-error-general",
|
|
1069
|
+
"reflect": false,
|
|
1070
|
+
"defaultValue": "'Failed to capture screenshot.'"
|
|
1071
|
+
},
|
|
1072
|
+
"screenshotErrorPermission": {
|
|
1073
|
+
"type": "string",
|
|
1074
|
+
"mutable": false,
|
|
1075
|
+
"complexType": {
|
|
1076
|
+
"original": "string",
|
|
1077
|
+
"resolved": "string",
|
|
1078
|
+
"references": {}
|
|
1079
|
+
},
|
|
1080
|
+
"required": false,
|
|
1081
|
+
"optional": false,
|
|
1082
|
+
"docs": {
|
|
1083
|
+
"tags": [],
|
|
1084
|
+
"text": ""
|
|
1085
|
+
},
|
|
1086
|
+
"attribute": "screenshot-error-permission",
|
|
1087
|
+
"reflect": false,
|
|
1088
|
+
"defaultValue": "'Permission denied. Please allow screen sharing to take screenshots.'"
|
|
1089
|
+
},
|
|
1090
|
+
"screenshotErrorNotSupported": {
|
|
1091
|
+
"type": "string",
|
|
1092
|
+
"mutable": false,
|
|
1093
|
+
"complexType": {
|
|
1094
|
+
"original": "string",
|
|
1095
|
+
"resolved": "string",
|
|
1096
|
+
"references": {}
|
|
1097
|
+
},
|
|
1098
|
+
"required": false,
|
|
1099
|
+
"optional": false,
|
|
1100
|
+
"docs": {
|
|
1101
|
+
"tags": [],
|
|
1102
|
+
"text": ""
|
|
1103
|
+
},
|
|
1104
|
+
"attribute": "screenshot-error-not-supported",
|
|
1105
|
+
"reflect": false,
|
|
1106
|
+
"defaultValue": "'Screen capture is not supported in this browser.'"
|
|
1107
|
+
},
|
|
1108
|
+
"screenshotErrorNotFound": {
|
|
1109
|
+
"type": "string",
|
|
1110
|
+
"mutable": false,
|
|
1111
|
+
"complexType": {
|
|
1112
|
+
"original": "string",
|
|
1113
|
+
"resolved": "string",
|
|
1114
|
+
"references": {}
|
|
1115
|
+
},
|
|
1116
|
+
"required": false,
|
|
1117
|
+
"optional": false,
|
|
1118
|
+
"docs": {
|
|
1119
|
+
"tags": [],
|
|
1120
|
+
"text": ""
|
|
1121
|
+
},
|
|
1122
|
+
"attribute": "screenshot-error-not-found",
|
|
1123
|
+
"reflect": false,
|
|
1124
|
+
"defaultValue": "'No screen sources available for capture.'"
|
|
1125
|
+
},
|
|
1126
|
+
"screenshotErrorCancelled": {
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"mutable": false,
|
|
1129
|
+
"complexType": {
|
|
1130
|
+
"original": "string",
|
|
1131
|
+
"resolved": "string",
|
|
1132
|
+
"references": {}
|
|
1133
|
+
},
|
|
1134
|
+
"required": false,
|
|
1135
|
+
"optional": false,
|
|
1136
|
+
"docs": {
|
|
1137
|
+
"tags": [],
|
|
1138
|
+
"text": ""
|
|
1139
|
+
},
|
|
1140
|
+
"attribute": "screenshot-error-cancelled",
|
|
1141
|
+
"reflect": false,
|
|
1142
|
+
"defaultValue": "'Screenshot capture was cancelled.'"
|
|
1143
|
+
},
|
|
1144
|
+
"screenshotErrorBrowserNotSupported": {
|
|
1145
|
+
"type": "string",
|
|
1146
|
+
"mutable": false,
|
|
1147
|
+
"complexType": {
|
|
1148
|
+
"original": "string",
|
|
1149
|
+
"resolved": "string",
|
|
1150
|
+
"references": {}
|
|
1151
|
+
},
|
|
1152
|
+
"required": false,
|
|
1153
|
+
"optional": false,
|
|
1154
|
+
"docs": {
|
|
1155
|
+
"tags": [],
|
|
1156
|
+
"text": ""
|
|
1157
|
+
},
|
|
1158
|
+
"attribute": "screenshot-error-browser-not-supported",
|
|
1159
|
+
"reflect": false,
|
|
1160
|
+
"defaultValue": "'Your browser does not support screen capture. Please use a browser like Chrome, Firefox, or Safari.'"
|
|
1161
|
+
},
|
|
1162
|
+
"screenshotErrorUnexpected": {
|
|
1163
|
+
"type": "string",
|
|
1164
|
+
"mutable": false,
|
|
1165
|
+
"complexType": {
|
|
1166
|
+
"original": "string",
|
|
1167
|
+
"resolved": "string",
|
|
1168
|
+
"references": {}
|
|
1169
|
+
},
|
|
1170
|
+
"required": false,
|
|
1171
|
+
"optional": false,
|
|
1172
|
+
"docs": {
|
|
1173
|
+
"tags": [],
|
|
1174
|
+
"text": ""
|
|
1175
|
+
},
|
|
1176
|
+
"attribute": "screenshot-error-unexpected",
|
|
1177
|
+
"reflect": false,
|
|
1178
|
+
"defaultValue": "'An unexpected error occurred. Please try again.'"
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
static get states() {
|
|
1183
|
+
return {
|
|
1184
|
+
"sending": {},
|
|
1185
|
+
"formMessage": {},
|
|
1186
|
+
"formEmail": {},
|
|
1187
|
+
"formSuccess": {},
|
|
1188
|
+
"formVerification": {},
|
|
1189
|
+
"formError": {},
|
|
1190
|
+
"formErrorStatus": {},
|
|
1191
|
+
"encodedScreenshot": {},
|
|
1192
|
+
"isPrivacyChecked": {},
|
|
1193
|
+
"whitelabel": {},
|
|
1194
|
+
"selectedRating": {},
|
|
1195
|
+
"overlayVisible": {},
|
|
1196
|
+
"isAnimating": {},
|
|
1197
|
+
"takingScreenshot": {},
|
|
1198
|
+
"showScreenshotError": {},
|
|
1199
|
+
"screenshotError": {},
|
|
1200
|
+
"showCanvasEditor": {},
|
|
1201
|
+
"autoStartCapture": {}
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
static get events() {
|
|
1205
|
+
return [{
|
|
1206
|
+
"method": "feedbackSent",
|
|
1207
|
+
"name": "feedbackSent",
|
|
1208
|
+
"bubbles": true,
|
|
1209
|
+
"cancelable": true,
|
|
1210
|
+
"composed": true,
|
|
1211
|
+
"docs": {
|
|
1212
|
+
"tags": [],
|
|
1213
|
+
"text": ""
|
|
1214
|
+
},
|
|
1215
|
+
"complexType": {
|
|
1216
|
+
"original": "{ feedback: any }",
|
|
1217
|
+
"resolved": "{ feedback: any; }",
|
|
1218
|
+
"references": {}
|
|
1219
|
+
}
|
|
1220
|
+
}, {
|
|
1221
|
+
"method": "feedbackError",
|
|
1222
|
+
"name": "feedbackError",
|
|
1223
|
+
"bubbles": true,
|
|
1224
|
+
"cancelable": true,
|
|
1225
|
+
"composed": true,
|
|
1226
|
+
"docs": {
|
|
1227
|
+
"tags": [],
|
|
1228
|
+
"text": ""
|
|
1229
|
+
},
|
|
1230
|
+
"complexType": {
|
|
1231
|
+
"original": "{ error: any }",
|
|
1232
|
+
"resolved": "{ error: any; }",
|
|
1233
|
+
"references": {}
|
|
1234
|
+
}
|
|
1235
|
+
}];
|
|
1236
|
+
}
|
|
1237
|
+
static get methods() {
|
|
1238
|
+
return {
|
|
1239
|
+
"openModal": {
|
|
1240
|
+
"complexType": {
|
|
1241
|
+
"signature": "() => Promise<void>",
|
|
1242
|
+
"parameters": [],
|
|
1243
|
+
"references": {
|
|
1244
|
+
"Promise": {
|
|
1245
|
+
"location": "global"
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
"return": "Promise<void>"
|
|
1249
|
+
},
|
|
1250
|
+
"docs": {
|
|
1251
|
+
"text": "",
|
|
1252
|
+
"tags": []
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
}
|