pushfeedback 0.1.62 → 0.1.64

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.
@@ -11,39 +11,39 @@ const FeedbackButton = class {
11
11
  index.registerInstance(this, hostRef);
12
12
  this.feedbackSent = index.createEvent(this, "feedbackSent", 7);
13
13
  this.feedbackError = index.createEvent(this, "feedbackError", 7);
14
- this.sessionId = "";
14
+ this.buttonPosition = 'default';
15
+ this.buttonStyle = 'default';
16
+ this.hideIcon = false;
17
+ this.hideMobile = false;
18
+ this.sessionId = '';
19
+ this.submit = false;
15
20
  this.customFont = false;
16
- this.errorMessage = "Please try again later.";
17
- this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
18
- this.errorMessage404 = "We could not find the provided project id in PushFeedback.";
19
- this.modalTitle = 'Share your feedback';
20
- this.modalTitleSuccess = 'Thanks for your feedback!';
21
- this.modalTitleError = "Oops!";
22
- this.modalPosition = 'center';
23
- this.sendButtonText = 'Send';
24
- this.successMessage = "";
25
- this.project = '';
26
- this.screenshotButtonText = 'Add a screenshot';
27
- this.screenshotTopbarText = 'Select an element on this page';
28
- this.hideEmail = false;
29
21
  this.emailAddress = '';
30
- this.emailPlaceholder = 'Email address (optional)';
31
- this.messagePlaceholder = 'Comments';
22
+ this.fetchData = true;
23
+ this.hideEmail = false;
24
+ this.hidePrivacyPolicy = true;
32
25
  this.hideRating = false;
26
+ this.hideScreenshotButton = false;
27
+ this.modalPosition = 'center';
28
+ this.project = '';
33
29
  this.rating = undefined;
34
30
  this.ratingMode = 'thumbs';
35
- this.ratingPlaceholder = 'Was this page helpful?';
36
- this.ratingStarsPlaceholder = 'How would you rate this page?';
31
+ this.emailPlaceholder = 'Email address (optional)';
32
+ this.errorMessage = 'Please try again later.';
33
+ this.errorMessage403 = 'The request URL does not match the one defined in PushFeedback for this project.';
34
+ this.errorMessage404 = 'We could not find the provided project id in PushFeedback.';
37
35
  this.footerText = '';
38
- this.buttonStyle = 'default';
39
- this.buttonPosition = 'default';
40
- this.hideIcon = false;
41
- this.hideScreenshotButton = false;
42
- this.hidePrivacyPolicy = true;
43
- this.hideMobile = false;
36
+ this.messagePlaceholder = 'Comments';
37
+ this.modalTitle = 'Share your feedback';
38
+ this.modalTitleError = 'Oops!';
39
+ this.modalTitleSuccess = 'Thanks for your feedback!';
44
40
  this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
45
- this.fetchData = true;
46
- this.submit = false;
41
+ this.ratingPlaceholder = 'Was this page helpful?';
42
+ this.ratingStarsPlaceholder = 'How would you rate this page?';
43
+ this.screenshotButtonText = 'Add a screenshot';
44
+ this.screenshotTopbarText = 'Select an element on this page';
45
+ this.sendButtonText = 'Send';
46
+ this.successMessage = '';
47
47
  }
48
48
  componentWillLoad() {
49
49
  if (!this.sessionId) {
@@ -60,9 +60,9 @@ const FeedbackButton = class {
60
60
  const buttonContent = this.el.shadowRoot.querySelector('.feedback-button-content');
61
61
  let adjustement = 0;
62
62
  if (this.isSafariBrowser()) {
63
- adjustement = 10;
63
+ adjustement = 5;
64
64
  }
65
- buttonContent.style.right = `${(buttonContent.offsetWidth + adjustement) / 2 * -1}px`;
65
+ buttonContent.style.right = `${((buttonContent.offsetWidth + adjustement) / 2) * -1}px`;
66
66
  }
67
67
  if (!this.customFont) {
68
68
  this.loadInterFont();
@@ -72,34 +72,34 @@ const FeedbackButton = class {
72
72
  this.feedbackModal = document.createElement('feedback-modal');
73
73
  const props = [
74
74
  'customFont',
75
+ 'emailAddress',
76
+ 'fetchData',
77
+ 'hideEmail',
78
+ 'hidePrivacyPolicy',
79
+ 'hideRating',
80
+ 'hideScreenshotButton',
81
+ 'modalPosition',
82
+ 'project',
83
+ 'rating',
84
+ 'ratingMode',
85
+ 'emailPlaceholder',
75
86
  'errorMessage',
76
87
  'errorMessage403',
77
88
  'errorMessage404',
89
+ 'footerText',
90
+ 'messagePlaceholder',
78
91
  'modalTitle',
79
- 'modalTitleSuccess',
80
92
  'modalTitleError',
81
- 'modalPosition',
82
- 'sendButtonText',
83
- 'successMessage',
84
- 'project',
85
- 'screenshotButtonText',
86
- 'screenshotTopbarText',
87
- 'hideEmail',
88
- 'emailAddress',
89
- 'emailPlaceholder',
90
- 'messagePlaceholder',
91
- 'hideRating',
92
- 'rating',
93
- 'ratingMode',
93
+ 'modalTitleSuccess',
94
+ 'privacyPolicyText',
94
95
  'ratingPlaceholder',
95
96
  'ratingStarsPlaceholder',
96
- 'footerText',
97
- 'hideScreenshotButton',
98
- 'hidePrivacyPolicy',
99
- 'privacyPolicyText',
100
- 'fetchData',
97
+ 'screenshotButtonText',
98
+ 'screenshotTopbarText',
99
+ 'sendButtonText',
100
+ 'successMessage',
101
101
  ];
102
- props.forEach(prop => {
102
+ props.forEach((prop) => {
103
103
  this.feedbackModal[prop] = this[prop];
104
104
  });
105
105
  document.body.appendChild(this.feedbackModal);
@@ -135,15 +135,15 @@ const FeedbackButton = class {
135
135
  project: this.project,
136
136
  rating: this.rating || -1,
137
137
  ratingMode: this.ratingMode,
138
- message: "",
138
+ message: '',
139
139
  session: localStorage.getItem('pushfeedback_sessionid') || '',
140
140
  };
141
141
  const res = await fetch('https://app.pushfeedback.com/api/feedback/', {
142
142
  method: 'POST',
143
143
  body: JSON.stringify(body),
144
144
  headers: {
145
- 'Content-Type': 'application/json'
146
- }
145
+ 'Content-Type': 'application/json',
146
+ },
147
147
  });
148
148
  if (res.status === 201) {
149
149
  const feedback_with_id = Object.assign(Object.assign({}, body), { id: await res.json() });
@@ -8975,7 +8975,7 @@ const FeedbackModal = class {
8975
8975
  clearTimeout(this.scrollTimeout);
8976
8976
  this.scrollTimeout = setTimeout(() => {
8977
8977
  document.documentElement.classList.remove('feedback-modal-screenshot-closing');
8978
- document.documentElement.style.top = "";
8978
+ document.documentElement.style.top = '';
8979
8979
  window.removeEventListener('scroll', this.onScrollDebounced);
8980
8980
  }, 200);
8981
8981
  };
@@ -9002,8 +9002,8 @@ const FeedbackModal = class {
9002
9002
  method: 'POST',
9003
9003
  body: JSON.stringify(body),
9004
9004
  headers: {
9005
- 'Content-Type': 'application/json'
9006
- }
9005
+ 'Content-Type': 'application/json',
9006
+ },
9007
9007
  });
9008
9008
  if (res.status === 201) {
9009
9009
  const feedback_with_id = Object.assign(Object.assign({}, body), { id: await res.json() });
@@ -9087,7 +9087,7 @@ const FeedbackModal = class {
9087
9087
  const rect = elementUnder.getBoundingClientRect();
9088
9088
  this.screenshotModal.style.display = '';
9089
9089
  // Get the bounding box of the element selected
9090
- this.elementSelected.style.position = "absolute";
9090
+ this.elementSelected.style.position = 'absolute';
9091
9091
  this.elementSelected.style.left = `${rect.left}px`;
9092
9092
  this.elementSelected.style.top = `${rect.top}px`;
9093
9093
  this.elementSelected.style.width = `${rect.width}px`;
@@ -9095,33 +9095,33 @@ const FeedbackModal = class {
9095
9095
  this.elementSelected.classList.add('feedback-modal-element-hover');
9096
9096
  // Set the background color of nonselected areas
9097
9097
  // Top
9098
- this.topSide.style.position = "absolute";
9098
+ this.topSide.style.position = 'absolute';
9099
9099
  this.topSide.style.left = `${rect.left}px`;
9100
9100
  this.topSide.style.top = '0px';
9101
9101
  this.topSide.style.width = `${rect.width + borderOffset}px`;
9102
9102
  this.topSide.style.height = `${rect.top}px`;
9103
- this.topSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
9103
+ this.topSide.style.backgroundColor = 'rgba(0, 0, 0, 0.4)';
9104
9104
  // Left
9105
- this.leftSide.style.position = "absolute";
9105
+ this.leftSide.style.position = 'absolute';
9106
9106
  this.leftSide.style.left = '0px';
9107
9107
  this.leftSide.style.top = '0px';
9108
9108
  this.leftSide.style.width = `${rect.left}px`;
9109
9109
  this.leftSide.style.height = '100vh';
9110
- this.leftSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
9110
+ this.leftSide.style.backgroundColor = 'rgba(0, 0, 0, 0.4)';
9111
9111
  // Bottom
9112
- this.bottomSide.style.position = "absolute";
9112
+ this.bottomSide.style.position = 'absolute';
9113
9113
  this.bottomSide.style.left = `${rect.left}px`;
9114
9114
  this.bottomSide.style.top = `${rect.bottom + borderOffset}px`;
9115
9115
  this.bottomSide.style.width = `${rect.width + borderOffset}px`;
9116
9116
  this.bottomSide.style.height = '100vh';
9117
- this.bottomSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
9117
+ this.bottomSide.style.backgroundColor = 'rgba(0, 0, 0, 0.4)';
9118
9118
  // Right
9119
- this.rightSide.style.position = "absolute";
9119
+ this.rightSide.style.position = 'absolute';
9120
9120
  this.rightSide.style.left = `${rect.right + borderOffset}px`;
9121
9121
  this.rightSide.style.top = '0px';
9122
9122
  this.rightSide.style.width = '100%';
9123
9123
  this.rightSide.style.height = '100vh';
9124
- this.rightSide.style.backgroundColor = "rgba(0, 0, 0, 0.4)";
9124
+ this.rightSide.style.backgroundColor = 'rgba(0, 0, 0, 0.4)';
9125
9125
  // Restore the visibility of the screenshot-modal
9126
9126
  this.screenshotModal.style.backgroundColor = 'transparent';
9127
9127
  };
@@ -9173,36 +9173,36 @@ const FeedbackModal = class {
9173
9173
  this.overlayVisible = false;
9174
9174
  this.isAnimating = false;
9175
9175
  this.customFont = false;
9176
- this.errorMessage = "Please try again later.";
9177
- this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
9178
- this.errorMessage404 = "We could not find the provided project ID in PushFeedback.";
9179
- this.modalTitle = 'Share your feedback';
9180
- this.modalTitleSuccess = 'Thanks for your feedback!';
9181
- this.modalTitleError = "Oops!";
9182
- this.modalPosition = 'center';
9183
- this.sendButtonText = 'Send';
9184
- this.successMessage = "";
9185
- this.project = '';
9186
- this.screenshotButtonText = 'Add a screenshot';
9187
- this.screenshotTopbarText = 'Select an element on this page';
9188
- this.hideEmail = false;
9189
9176
  this.emailAddress = '';
9190
- this.emailPlaceholder = 'Email address (optional)';
9191
- this.messagePlaceholder = 'Comments';
9192
- this.hideRating = false;
9193
- this.rating = undefined;
9177
+ this.hideEmail = false;
9194
9178
  this.ratingMode = 'thumbs';
9195
- this.ratingPlaceholder = 'Was this page helpful?';
9196
- this.ratingStarsPlaceholder = 'How would you rate this page?';
9197
- this.footerText = '';
9198
- this.showModal = false;
9199
- this.showScreenshotMode = false;
9200
- this.showScreenshotTopBar = false;
9201
9179
  this.hasSelectedElement = false;
9202
- this.hideScreenshotButton = false;
9203
9180
  this.hidePrivacyPolicy = true;
9204
- this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
9181
+ this.hideRating = false;
9182
+ this.hideScreenshotButton = false;
9183
+ this.project = '';
9184
+ this.showScreenshotMode = false;
9185
+ this.showScreenshotTopBar = false;
9186
+ this.showModal = false;
9187
+ this.rating = undefined;
9205
9188
  this.fetchData = true;
9189
+ this.emailPlaceholder = 'Email address (optional)';
9190
+ this.errorMessage = 'Please try again later.';
9191
+ this.errorMessage403 = 'The request URL does not match the one defined in PushFeedback for this project.';
9192
+ this.errorMessage404 = 'We could not find the provided project ID in PushFeedback.';
9193
+ this.messagePlaceholder = 'Comments';
9194
+ this.footerText = '';
9195
+ this.modalPosition = 'center';
9196
+ this.modalTitle = 'Share your feedback';
9197
+ this.modalTitleError = 'Oops!';
9198
+ this.modalTitleSuccess = 'Thanks for your feedback!';
9199
+ this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
9200
+ this.ratingPlaceholder = 'Was this page helpful?';
9201
+ this.ratingStarsPlaceholder = 'How would you rate this page?';
9202
+ this.sendButtonText = 'Send';
9203
+ this.screenshotButtonText = 'Add a screenshot';
9204
+ this.screenshotTopbarText = 'Select an element on this page';
9205
+ this.successMessage = '';
9206
9206
  }
9207
9207
  componentWillLoad() {
9208
9208
  if (this.fetchData)
@@ -9211,7 +9211,7 @@ const FeedbackModal = class {
9211
9211
  if (this.rating) {
9212
9212
  this.selectedRating = this.rating;
9213
9213
  }
9214
- if (this.ratingMode == "thumbs" && this.rating == 0) {
9214
+ if (this.ratingMode == 'thumbs' && this.rating == 0) {
9215
9215
  this.selectedRating = 5;
9216
9216
  }
9217
9217
  }
@@ -9250,11 +9250,12 @@ const FeedbackModal = class {
9250
9250
  y: window.scrollY,
9251
9251
  width: window.innerWidth,
9252
9252
  height: window.innerHeight,
9253
- }).then(canvas => {
9253
+ })
9254
+ .then((canvas) => {
9254
9255
  const dataUrl = canvas.toDataURL();
9255
9256
  resolve(dataUrl);
9256
9257
  })
9257
- .catch(error => {
9258
+ .catch((error) => {
9258
9259
  console.error(error);
9259
9260
  reject(error);
9260
9261
  });
@@ -9271,16 +9272,22 @@ const FeedbackModal = class {
9271
9272
  this.selectedRating = newRating;
9272
9273
  }
9273
9274
  render() {
9274
- return (index.h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showScreenshotMode && (index.h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, index.h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), index.h("div", { class: "top-side", ref: el => (this.topSide = el) }), index.h("div", { class: "left-side", ref: el => (this.leftSide = el) }), index.h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), index.h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (index.h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, index.h("span", null, this.screenshotTopbarText), index.h("span", { class: "feedback-modal-screenshot-close" }, index.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" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (index.h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}` })), this.showModal && (index.h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, index.h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (index.h("span", null, this.modalTitle)) : this.formSuccess ? (index.h("span", null, this.modalTitleSuccess)) : index.h("span", null, this.modalTitleError), index.h("button", { class: "feedback-modal-close", onClick: this.close }, index.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" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), index.h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (index.h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (index.h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, index.h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
9275
+ return (index.h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showScreenshotMode && (index.h("div", { class: "feedback-modal-screenshot", ref: (el) => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, index.h("div", { class: "feedback-modal-screenshot-element-selected", ref: (el) => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), index.h("div", { class: "top-side", ref: (el) => (this.topSide = el) }), index.h("div", { class: "left-side", ref: (el) => (this.leftSide = el) }), index.h("div", { class: "bottom-side", ref: (el) => (this.bottomSide = el) }), index.h("div", { class: "right-side", ref: (el) => (this.rightSide = el) }), this.showScreenshotTopBar && (index.h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, index.h("span", null, this.screenshotTopbarText), index.h("span", { class: "feedback-modal-screenshot-close" }, index.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" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (index.h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}` })), this.showModal && (index.h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''}`, ref: (el) => (this.modalContent = el) }, index.h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (index.h("span", null, this.modalTitle)) : this.formSuccess ? (index.h("span", null, this.modalTitleSuccess)) : (index.h("span", null, this.modalTitleError)), index.h("button", { class: "feedback-modal-close", onClick: this.close }, index.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" }, index.h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), index.h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), index.h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (index.h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (index.h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, index.h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1
9276
+ ? 'feedback-modal-rating-button--selected'
9277
+ : ''}`, onClick: (event) => {
9275
9278
  event.preventDefault();
9276
9279
  this.handleRatingChange(1);
9277
- } }, index.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" }, index.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" }))), index.h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
9280
+ } }, index.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" }, index.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" }))), index.h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5
9281
+ ? 'feedback-modal-rating-button--selected'
9282
+ : ''}`, onClick: (event) => {
9278
9283
  event.preventDefault();
9279
9284
  this.handleRatingChange(5);
9280
- } }, index.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" }, index.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" })))))) : (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (index.h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
9285
+ } }, index.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" }, index.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" })))))) : (index.h("div", { class: "feedback-modal-rating-content" }, index.h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), index.h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (index.h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating
9286
+ ? 'feedback-modal-rating-button--selected'
9287
+ : ''}`, onClick: (event) => {
9281
9288
  event.preventDefault();
9282
9289
  this.handleRatingChange(rating);
9283
- } }, index.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" }, index.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" })))))))))), index.h("div", { class: "feedback-modal-text" }, index.h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (index.h("div", { class: "feedback-modal-email" }, index.h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail }))), index.h("div", { class: "feedback-verification" }, index.h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (index.h("div", { class: "feedback-modal-privacy" }, index.h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), index.h("span", { innerHTML: this.privacyPolicyText }))), index.h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (index.h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? "feedback-modal-button--active" : ""}`, onClick: this.openScreenShot, disabled: this.sending }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, index.h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" })), this.screenshotButtonText)), index.h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (index.h("div", { class: "feedback-modal-success" }, index.h("p", { class: "feedback-modal-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (index.h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (index.h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (index.h("p", { class: "feedback-modal-message" }, this.errorMessage)) : index.h("span", null)), index.h("div", { class: "feedback-modal-footer" }, index.h("div", { class: "feedback-logo", style: { display: this.whitelabel ? 'none' : 'block' } }, "Powered by ", index.h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")), this.footerText && index.h("div", { class: "feedback-footer-text" }, index.h("span", { innerHTML: this.footerText })))))));
9290
+ } }, index.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" }, index.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" })))))))))), index.h("div", { class: "feedback-modal-text" }, index.h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (index.h("div", { class: "feedback-modal-email" }, index.h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail }))), index.h("div", { class: "feedback-verification" }, index.h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (index.h("div", { class: "feedback-modal-privacy" }, index.h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), index.h("span", { innerHTML: this.privacyPolicyText }))), index.h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (index.h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? 'feedback-modal-button--active' : ''}`, onClick: this.openScreenShot, disabled: this.sending }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, index.h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" })), this.screenshotButtonText)), index.h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (index.h("div", { class: "feedback-modal-success" }, index.h("p", { class: "feedback-modal-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (index.h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (index.h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (index.h("p", { class: "feedback-modal-message" }, this.errorMessage)) : (index.h("span", null))), index.h("div", { class: "feedback-modal-footer" }, index.h("div", { class: "feedback-logo", style: { display: this.whitelabel ? 'none' : 'block' } }, "Powered by", ' ', index.h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")), this.footerText && (index.h("div", { class: "feedback-footer-text" }, index.h("span", { innerHTML: this.footerText }))))))));
9284
9291
  }
9285
9292
  componentDidRender() {
9286
9293
  if (this.showModal) {
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["feedback-button_2.cjs",[[1,"feedback-button",{"sessionId":[1537,"session-id"],"customFont":[4,"custom-font"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"modalTitle":[1,"modal-title"],"modalTitleSuccess":[1,"modal-title-success"],"modalTitleError":[1,"modal-title-error"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"],"project":[1],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"hideEmail":[4,"hide-email"],"emailAddress":[1,"email-address"],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"hideRating":[4,"hide-rating"],"rating":[2],"ratingMode":[1,"rating-mode"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"footerText":[1,"footer-text"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideMobile":[4,"hide-mobile"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"],"submit":[4]}],[1,"feedback-modal",{"customFont":[4,"custom-font"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"modalTitle":[1,"modal-title"],"modalTitleSuccess":[1,"modal-title-success"],"modalTitleError":[1,"modal-title-error"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"],"project":[1],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"hideEmail":[4,"hide-email"],"emailAddress":[1,"email-address"],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"hideRating":[4,"hide-rating"],"rating":[2],"ratingMode":[1,"rating-mode"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"footerText":[1,"footer-text"],"showModal":[1540,"show-modal"],"showScreenshotMode":[1540,"show-screenshot-mode"],"showScreenshotTopBar":[1540,"show-screenshot-top-bar"],"hasSelectedElement":[1540,"has-selected-element"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formVerification":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32],"isPrivacyChecked":[32],"whitelabel":[32],"selectedRating":[32],"overlayVisible":[32],"isAnimating":[32],"openModal":[64]}]]]], options);
17
+ return index.bootstrapLazy([["feedback-button_2.cjs",[[1,"feedback-button",{"buttonPosition":[1,"button-position"],"buttonStyle":[1,"button-style"],"hideIcon":[4,"hide-icon"],"hideMobile":[4,"hide-mobile"],"sessionId":[1537,"session-id"],"submit":[4],"customFont":[4,"custom-font"],"emailAddress":[1,"email-address"],"fetchData":[4,"fetch-data"],"hideEmail":[4,"hide-email"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideRating":[4,"hide-rating"],"hideScreenshotButton":[4,"hide-screenshot-button"],"modalPosition":[1,"modal-position"],"project":[1],"rating":[2],"ratingMode":[1,"rating-mode"],"emailPlaceholder":[1,"email-placeholder"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"footerText":[1,"footer-text"],"messagePlaceholder":[1,"message-placeholder"],"modalTitle":[1,"modal-title"],"modalTitleError":[1,"modal-title-error"],"modalTitleSuccess":[1,"modal-title-success"],"privacyPolicyText":[1,"privacy-policy-text"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"]}],[1,"feedback-modal",{"customFont":[4,"custom-font"],"emailAddress":[1,"email-address"],"hideEmail":[4,"hide-email"],"ratingMode":[1,"rating-mode"],"hasSelectedElement":[1540,"has-selected-element"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideRating":[4,"hide-rating"],"hideScreenshotButton":[4,"hide-screenshot-button"],"project":[1],"showScreenshotMode":[1540,"show-screenshot-mode"],"showScreenshotTopBar":[1540,"show-screenshot-top-bar"],"showModal":[1540,"show-modal"],"rating":[2],"fetchData":[4,"fetch-data"],"emailPlaceholder":[1,"email-placeholder"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"messagePlaceholder":[1,"message-placeholder"],"footerText":[1,"footer-text"],"modalPosition":[1,"modal-position"],"modalTitle":[1,"modal-title"],"modalTitleError":[1,"modal-title-error"],"modalTitleSuccess":[1,"modal-title-success"],"privacyPolicyText":[1,"privacy-policy-text"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"sendButtonText":[1,"send-button-text"],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"successMessage":[1,"success-message"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formVerification":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32],"isPrivacyChecked":[32],"whitelabel":[32],"selectedRating":[32],"overlayVisible":[32],"isAnimating":[32],"openModal":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["feedback-button_2.cjs",[[1,"feedback-button",{"sessionId":[1537,"session-id"],"customFont":[4,"custom-font"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"modalTitle":[1,"modal-title"],"modalTitleSuccess":[1,"modal-title-success"],"modalTitleError":[1,"modal-title-error"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"],"project":[1],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"hideEmail":[4,"hide-email"],"emailAddress":[1,"email-address"],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"hideRating":[4,"hide-rating"],"rating":[2],"ratingMode":[1,"rating-mode"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"footerText":[1,"footer-text"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideMobile":[4,"hide-mobile"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"],"submit":[4]}],[1,"feedback-modal",{"customFont":[4,"custom-font"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"modalTitle":[1,"modal-title"],"modalTitleSuccess":[1,"modal-title-success"],"modalTitleError":[1,"modal-title-error"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"],"project":[1],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"hideEmail":[4,"hide-email"],"emailAddress":[1,"email-address"],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"hideRating":[4,"hide-rating"],"rating":[2],"ratingMode":[1,"rating-mode"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"footerText":[1,"footer-text"],"showModal":[1540,"show-modal"],"showScreenshotMode":[1540,"show-screenshot-mode"],"showScreenshotTopBar":[1540,"show-screenshot-top-bar"],"hasSelectedElement":[1540,"has-selected-element"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formVerification":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32],"isPrivacyChecked":[32],"whitelabel":[32],"selectedRating":[32],"overlayVisible":[32],"isAnimating":[32],"openModal":[64]}]]]], options);
20
+ return index.bootstrapLazy([["feedback-button_2.cjs",[[1,"feedback-button",{"buttonPosition":[1,"button-position"],"buttonStyle":[1,"button-style"],"hideIcon":[4,"hide-icon"],"hideMobile":[4,"hide-mobile"],"sessionId":[1537,"session-id"],"submit":[4],"customFont":[4,"custom-font"],"emailAddress":[1,"email-address"],"fetchData":[4,"fetch-data"],"hideEmail":[4,"hide-email"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideRating":[4,"hide-rating"],"hideScreenshotButton":[4,"hide-screenshot-button"],"modalPosition":[1,"modal-position"],"project":[1],"rating":[2],"ratingMode":[1,"rating-mode"],"emailPlaceholder":[1,"email-placeholder"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"footerText":[1,"footer-text"],"messagePlaceholder":[1,"message-placeholder"],"modalTitle":[1,"modal-title"],"modalTitleError":[1,"modal-title-error"],"modalTitleSuccess":[1,"modal-title-success"],"privacyPolicyText":[1,"privacy-policy-text"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"sendButtonText":[1,"send-button-text"],"successMessage":[1,"success-message"]}],[1,"feedback-modal",{"customFont":[4,"custom-font"],"emailAddress":[1,"email-address"],"hideEmail":[4,"hide-email"],"ratingMode":[1,"rating-mode"],"hasSelectedElement":[1540,"has-selected-element"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"hideRating":[4,"hide-rating"],"hideScreenshotButton":[4,"hide-screenshot-button"],"project":[1],"showScreenshotMode":[1540,"show-screenshot-mode"],"showScreenshotTopBar":[1540,"show-screenshot-top-bar"],"showModal":[1540,"show-modal"],"rating":[2],"fetchData":[4,"fetch-data"],"emailPlaceholder":[1,"email-placeholder"],"errorMessage":[1,"error-message"],"errorMessage403":[1,"error-message-4-0-3"],"errorMessage404":[1,"error-message-4-0-4"],"messagePlaceholder":[1,"message-placeholder"],"footerText":[1,"footer-text"],"modalPosition":[1,"modal-position"],"modalTitle":[1,"modal-title"],"modalTitleError":[1,"modal-title-error"],"modalTitleSuccess":[1,"modal-title-success"],"privacyPolicyText":[1,"privacy-policy-text"],"ratingPlaceholder":[1,"rating-placeholder"],"ratingStarsPlaceholder":[1,"rating-stars-placeholder"],"sendButtonText":[1,"send-button-text"],"screenshotButtonText":[1,"screenshot-button-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"successMessage":[1,"success-message"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formVerification":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32],"isPrivacyChecked":[32],"whitelabel":[32],"selectedRating":[32],"overlayVisible":[32],"isAnimating":[32],"openModal":[64]}]]]], options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;