pushfeedback 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/feedback-button_2.cjs.entry.js +7 -5
- package/dist/collection/components/feedback-button/feedback-button.js +2 -3
- package/dist/collection/components/feedback-modal/feedback-modal.js +7 -6
- package/dist/components/feedback-button.js +1 -1
- package/dist/components/feedback-modal2.js +6 -4
- package/dist/esm/feedback-button_2.entry.js +7 -5
- package/dist/pushfeedback/{p-d937f207.entry.js → p-56eed605.entry.js} +2 -2
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ const FeedbackButton = class {
|
|
|
27
27
|
this.emailPlaceholder = 'Email address (optional)';
|
|
28
28
|
this.messagePlaceholder = 'Comments';
|
|
29
29
|
this.hideRating = false;
|
|
30
|
-
this.rating =
|
|
30
|
+
this.rating = undefined;
|
|
31
31
|
this.ratingMode = 'thumbs';
|
|
32
32
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
33
33
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -8156,7 +8156,7 @@ const FeedbackModal = class {
|
|
|
8156
8156
|
this.emailPlaceholder = 'Email address (optional)';
|
|
8157
8157
|
this.messagePlaceholder = 'Comments';
|
|
8158
8158
|
this.hideRating = false;
|
|
8159
|
-
this.rating =
|
|
8159
|
+
this.rating = undefined;
|
|
8160
8160
|
this.ratingMode = 'thumbs';
|
|
8161
8161
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
8162
8162
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -8173,9 +8173,11 @@ const FeedbackModal = class {
|
|
|
8173
8173
|
if (this.fetchData)
|
|
8174
8174
|
this.fetchProjectData();
|
|
8175
8175
|
this.formEmail = this.emailAddress;
|
|
8176
|
-
|
|
8176
|
+
if (this.rating) {
|
|
8177
|
+
this.selectedRating = this.rating;
|
|
8178
|
+
}
|
|
8177
8179
|
if (this.ratingMode == "thumbs" && this.rating == 0) {
|
|
8178
|
-
this.
|
|
8180
|
+
this.selectedRating = 5;
|
|
8179
8181
|
}
|
|
8180
8182
|
}
|
|
8181
8183
|
async fetchProjectData() {
|
|
@@ -8230,7 +8232,7 @@ const FeedbackModal = class {
|
|
|
8230
8232
|
return (index.h("div", { class: 'feedback-modal-wrapper' }, 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.showModal && (index.h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.showModal ? '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) => {
|
|
8231
8233
|
event.preventDefault();
|
|
8232
8234
|
this.handleRatingChange(1);
|
|
8233
|
-
} }, 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
|
|
8235
|
+
} }, 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) => {
|
|
8234
8236
|
event.preventDefault();
|
|
8235
8237
|
this.handleRatingChange(5);
|
|
8236
8238
|
} }, 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) => {
|
|
@@ -19,7 +19,7 @@ export class FeedbackButton {
|
|
|
19
19
|
this.emailPlaceholder = 'Email address (optional)';
|
|
20
20
|
this.messagePlaceholder = 'Comments';
|
|
21
21
|
this.hideRating = false;
|
|
22
|
-
this.rating =
|
|
22
|
+
this.rating = undefined;
|
|
23
23
|
this.ratingMode = 'thumbs';
|
|
24
24
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
25
25
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -451,8 +451,7 @@ export class FeedbackButton {
|
|
|
451
451
|
"text": ""
|
|
452
452
|
},
|
|
453
453
|
"attribute": "rating",
|
|
454
|
-
"reflect": false
|
|
455
|
-
"defaultValue": "0"
|
|
454
|
+
"reflect": false
|
|
456
455
|
},
|
|
457
456
|
"ratingMode": {
|
|
458
457
|
"type": "string",
|
|
@@ -200,7 +200,7 @@ export class FeedbackModal {
|
|
|
200
200
|
this.emailPlaceholder = 'Email address (optional)';
|
|
201
201
|
this.messagePlaceholder = 'Comments';
|
|
202
202
|
this.hideRating = false;
|
|
203
|
-
this.rating =
|
|
203
|
+
this.rating = undefined;
|
|
204
204
|
this.ratingMode = 'thumbs';
|
|
205
205
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
206
206
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -217,9 +217,11 @@ export class FeedbackModal {
|
|
|
217
217
|
if (this.fetchData)
|
|
218
218
|
this.fetchProjectData();
|
|
219
219
|
this.formEmail = this.emailAddress;
|
|
220
|
-
|
|
220
|
+
if (this.rating) {
|
|
221
|
+
this.selectedRating = this.rating;
|
|
222
|
+
}
|
|
221
223
|
if (this.ratingMode == "thumbs" && this.rating == 0) {
|
|
222
|
-
this.
|
|
224
|
+
this.selectedRating = 5;
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
async fetchProjectData() {
|
|
@@ -274,7 +276,7 @@ export class FeedbackModal {
|
|
|
274
276
|
return (h("div", { class: 'feedback-modal-wrapper' }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class: "feedback-overlay" })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.showModal ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : h("span", null, this.modalTitleError), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
275
277
|
event.preventDefault();
|
|
276
278
|
this.handleRatingChange(1);
|
|
277
|
-
} }, 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
|
|
279
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
278
280
|
event.preventDefault();
|
|
279
281
|
this.handleRatingChange(5);
|
|
280
282
|
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
@@ -617,8 +619,7 @@ export class FeedbackModal {
|
|
|
617
619
|
"text": ""
|
|
618
620
|
},
|
|
619
621
|
"attribute": "rating",
|
|
620
|
-
"reflect": false
|
|
621
|
-
"defaultValue": "0"
|
|
622
|
+
"reflect": false
|
|
622
623
|
},
|
|
623
624
|
"ratingMode": {
|
|
624
625
|
"type": "string",
|
|
@@ -26,7 +26,7 @@ const FeedbackButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
26
26
|
this.emailPlaceholder = 'Email address (optional)';
|
|
27
27
|
this.messagePlaceholder = 'Comments';
|
|
28
28
|
this.hideRating = false;
|
|
29
|
-
this.rating =
|
|
29
|
+
this.rating = undefined;
|
|
30
30
|
this.ratingMode = 'thumbs';
|
|
31
31
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
32
32
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -8048,7 +8048,7 @@ const FeedbackModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
8048
8048
|
this.emailPlaceholder = 'Email address (optional)';
|
|
8049
8049
|
this.messagePlaceholder = 'Comments';
|
|
8050
8050
|
this.hideRating = false;
|
|
8051
|
-
this.rating =
|
|
8051
|
+
this.rating = undefined;
|
|
8052
8052
|
this.ratingMode = 'thumbs';
|
|
8053
8053
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
8054
8054
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -8065,9 +8065,11 @@ const FeedbackModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
8065
8065
|
if (this.fetchData)
|
|
8066
8066
|
this.fetchProjectData();
|
|
8067
8067
|
this.formEmail = this.emailAddress;
|
|
8068
|
-
|
|
8068
|
+
if (this.rating) {
|
|
8069
|
+
this.selectedRating = this.rating;
|
|
8070
|
+
}
|
|
8069
8071
|
if (this.ratingMode == "thumbs" && this.rating == 0) {
|
|
8070
|
-
this.
|
|
8072
|
+
this.selectedRating = 5;
|
|
8071
8073
|
}
|
|
8072
8074
|
}
|
|
8073
8075
|
async fetchProjectData() {
|
|
@@ -8122,7 +8124,7 @@ const FeedbackModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
8122
8124
|
return (h("div", { class: 'feedback-modal-wrapper' }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class: "feedback-overlay" })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.showModal ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : h("span", null, this.modalTitleError), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
8123
8125
|
event.preventDefault();
|
|
8124
8126
|
this.handleRatingChange(1);
|
|
8125
|
-
} }, 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
|
|
8127
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
8126
8128
|
event.preventDefault();
|
|
8127
8129
|
this.handleRatingChange(5);
|
|
8128
8130
|
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
@@ -23,7 +23,7 @@ const FeedbackButton = class {
|
|
|
23
23
|
this.emailPlaceholder = 'Email address (optional)';
|
|
24
24
|
this.messagePlaceholder = 'Comments';
|
|
25
25
|
this.hideRating = false;
|
|
26
|
-
this.rating =
|
|
26
|
+
this.rating = undefined;
|
|
27
27
|
this.ratingMode = 'thumbs';
|
|
28
28
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
29
29
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -8152,7 +8152,7 @@ const FeedbackModal = class {
|
|
|
8152
8152
|
this.emailPlaceholder = 'Email address (optional)';
|
|
8153
8153
|
this.messagePlaceholder = 'Comments';
|
|
8154
8154
|
this.hideRating = false;
|
|
8155
|
-
this.rating =
|
|
8155
|
+
this.rating = undefined;
|
|
8156
8156
|
this.ratingMode = 'thumbs';
|
|
8157
8157
|
this.ratingPlaceholder = 'Was this page helpful?';
|
|
8158
8158
|
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
@@ -8169,9 +8169,11 @@ const FeedbackModal = class {
|
|
|
8169
8169
|
if (this.fetchData)
|
|
8170
8170
|
this.fetchProjectData();
|
|
8171
8171
|
this.formEmail = this.emailAddress;
|
|
8172
|
-
|
|
8172
|
+
if (this.rating) {
|
|
8173
|
+
this.selectedRating = this.rating;
|
|
8174
|
+
}
|
|
8173
8175
|
if (this.ratingMode == "thumbs" && this.rating == 0) {
|
|
8174
|
-
this.
|
|
8176
|
+
this.selectedRating = 5;
|
|
8175
8177
|
}
|
|
8176
8178
|
}
|
|
8177
8179
|
async fetchProjectData() {
|
|
@@ -8226,7 +8228,7 @@ const FeedbackModal = class {
|
|
|
8226
8228
|
return (h("div", { class: 'feedback-modal-wrapper' }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class: "feedback-overlay" })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.showModal ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : h("span", null, this.modalTitleError), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
8227
8229
|
event.preventDefault();
|
|
8228
8230
|
this.handleRatingChange(1);
|
|
8229
|
-
} }, 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
|
|
8231
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3" }))), h("button", { title: "No", class: `feedback-modal-rating-button ${this.selectedRating === 5 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
8230
8232
|
event.preventDefault();
|
|
8231
8233
|
this.handleRatingChange(5);
|
|
8232
8234
|
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17" })))))) : (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingStarsPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--stars" }, [1, 2, 3, 4, 5].map((rating) => (h("button", { key: rating, class: `feedback-modal-rating-button ${this.selectedRating >= rating ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|