pushfeedback 0.1.49 → 0.1.52
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 +42 -18
- package/dist/cjs/{index-b181563b.js → index-9a8f4784.js} +19 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pushfeedback.cjs.js +2 -2
- package/dist/collection/components/feedback-button/feedback-button.js +1 -1
- package/dist/collection/components/feedback-modal/feedback-modal.css +50 -4
- package/dist/collection/components/feedback-modal/feedback-modal.js +62 -16
- package/dist/components/feedback-button.js +1 -1
- package/dist/components/feedback-modal2.js +44 -17
- package/dist/esm/feedback-button_2.entry.js +42 -18
- package/dist/esm/{index-f58727eb.js → index-f65e9124.js} +19 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pushfeedback.js +3 -3
- package/dist/pushfeedback/{p-9641858f.entry.js → p-8a5b3561.entry.js} +2 -2
- package/dist/pushfeedback/p-af2a1f7f.js +2 -0
- package/dist/pushfeedback/pushfeedback.css +1 -1
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/dist/types/components/feedback-modal/feedback-modal.d.ts +4 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +1 -1
- package/dist/pushfeedback/p-6204856a.js +0 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9a8f4784.js');
|
|
6
6
|
|
|
7
7
|
const feedbackButtonCss = ".feedback-button-content{cursor:pointer;max-width:fit-content;z-index:var(--feedback-button-z-index);font-family:var(--feedback-font-family)}.feedback-button-content--custom-font{font-family:inherit}.feedback-button-content--light{align-items:center;background-color:var(--feedback-button-light-bg-color);border-radius:var(--feedback-button-border-radius);box-shadow:rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;box-sizing:border-box;color:var(--feedback-button-light-text-color);display:flex;font-size:var(--feedback-button-text-font-size);font-weight:var(--feedback-button-text-font-weight);padding:8px 15px}.feedback-button-content--dark{align-items:center;background-color:var(--feedback-button-dark-bg-color);border-radius:var(--feedback-button-border-radius);box-shadow:rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;box-sizing:border-box;color:var(--feedback-button-dark-text-color);display:flex;font-weight:var(--feedback-button-text-font-weight);font-size:var(--feedback-button-text-font-size);padding:8px 15px}.icon-edit{stroke:var(--feedback-button-light-text-color)}.feedback-button-content--dark .icon-edit{stroke:var(--feedback-button-dark-text-color)}.feedback-button-content--bottom-right{bottom:10px;position:fixed;right:10px}.feedback-button-content--center-right{position:fixed;transform:rotate(-90deg) translateY(-50%);top:50%}.feedback-button-content--center-right.feedback-button-content--dark,.feedback-button-content--center-right.feedback-button-content--light{border-radius:4px;border-bottom-left-radius:0px;border-bottom-right-radius:0px}.feedback-button-content-icon{height:16px;margin-right:5px;width:16px}.feedback-button-content--center-right .feedback-button-content-icon{rotate:90deg}";
|
|
8
8
|
|
|
@@ -115,7 +115,7 @@ const FeedbackButton = class {
|
|
|
115
115
|
document.head.appendChild(link);
|
|
116
116
|
}
|
|
117
117
|
showModal() {
|
|
118
|
-
this.feedbackModal.
|
|
118
|
+
this.feedbackModal.openModal();
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
121
|
return (index.h(index.Host, null, index.h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont ? 'feedback-button-content--custom-font' : ''}`, onClick: () => this.showModal() }, !this.hideIcon && this.buttonStyle != 'default' && (index.h("span", { class: "feedback-button-content-icon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "icon-edit" }, index.h("path", { d: "M12 20h9" }), index.h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), index.h("slot", null))));
|
|
@@ -7968,7 +7968,7 @@ var html2canvas = createCommonjsModule(function (module, exports) {
|
|
|
7968
7968
|
//# sourceMappingURL=html2canvas.js.map
|
|
7969
7969
|
});
|
|
7970
7970
|
|
|
7971
|
-
const feedbackModalCss = ".text-center{flex-grow:1;text-align:center}.feedback-modal-wrapper *{font-family:var(--feedback-font-family)}.feedback-modal-wrapper--custom-font *{font-family:inherit}.feedback-modal-wrapper{position:absolute;z-index:var(--feedback-modal-modal-wrapper-z-index)}.feedback-overlay{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal{display:inline-block;position:relative}.feedback-modal-content{background-color:var(--feedback-modal-content-bg-color);border-color:1px solid var(--feedback-modal-header-text-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-content-text-color);display:flex;flex-direction:column;left:50%;max-width:90%;padding:20px;position:fixed;top:50%;transform:translate(-50%, -50%);width:100%;z-index:var(--feedback-modal-content-z-index)}.feedback-modal-header{align-items:center;color:var(--feedback-modal-header-text-color);display:flex;font-size:var(--feedback-header-font-size);font-weight:var(--feedback-modal-header-font-weight);justify-content:space-between;margin-bottom:20px}.feedback-modal-rating-buttons{width:100%;margin-bottom:20px}.feedback-modal-rating-button{padding:0;background-color:transparent;border:transparent;margin-right:5px;cursor:pointer}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button{border:1px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);font-size:var(--feedback-modal-button-font-size);font-weight:500;margin-right:10px;justify-content:center;padding:5px 10px}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected{background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-selected-color)}.feedback-modal-rating-buttons svg{stroke:var(--feedback-modal-rating-button-color);cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button--selected svg{fill:var(--feedback-modal-rating-button-stars-selected-color);stroke:var(--feedback-modal-rating-button-stars-selected-color)}.feedback-modal-text textarea{background-color:var(--feedback-modal-input-bg-color);border:1px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:100px;min-height:100px;padding:10px;resize:vertical;width:100%}.feedback-modal-email input{background-color:var(--feedback-modal-input-bg-color);border:1px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:40px;padding:10px;width:100%;margin-bottom:20px}.feedback-modal-privacy{font-size:var(--feedback-modal-input-font-size);margin-bottom:20px}.feedback-modal-text textarea:focus,.feedback-modal-email input:focus{border:1px solid var(--feedback-modal-input-border-color-focused);outline:none}.feedback-modal-buttons{display:flex;flex-direction:column}.feedback-modal-buttons .feedback-modal-button{margin-bottom:20px}.feedback-modal-button{align-items:center;background-color:transparent;border:1px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);cursor:pointer;display:flex;font-size:var(--feedback-modal-button-font-size);font-weight:500;justify-content:center;min-height:40px;padding:5px 10px}.feedback-modal-button svg{margin-right:6px}.feedback-modal-button path{fill:var(--feedback-modal-button-icon-color)}.feedback-modal-button:hover path,.feedback-modal-button--active path{fill:var(--feedback-modal-button-icon-color-active)}.feedback-modal-button--submit{background-color:var(--feedback-modal-button-submit-bg-color);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-submit-text-color)}.feedback-modal-button:hover,.feedback-modal-button--active{background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-button--submit:hover{background-color:var(--feedback-modal-button-submit-bg-color-hover);border:1px solid var(--feedback-modal-button-submit-border-color-hover);color:var(--feedback-modal-button-submit-text-color-hover)}.feedback-modal-input-heading{display:block;font-size:14px;font-weight:300;padding-bottom:10px}.feedback-modal-footer{font-size:12px;text-align:center}.feedback-modal-footer a{color:var(--feedback-modal-footer-link);font-weight:500;text-decoration:none}.feedback-logo{align-items:center;display:flex;justify-content:center;margin-top:5px}.feedback-logo a{margin-left:3px}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:50%;cursor:pointer;height:22px;margin-left:auto;padding:0;width:22px}.feedback-modal-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-screenshot-header-text-color);cursor:pointer;display:flex;left:50%;top:20px;transform:translateX(-50%);padding:10px;position:fixed;width:max-content;z-index:var(--feedback-modal-screenshot-header-z-index)}.feedback-modal-screenshot-close{height:24px;padding-left:10px;width:24px}.feedback-modal-screenshot-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-message{font-size:var(--feedback-modal-message-font-size);margin-top:0}.feedback-modal-element-hover{background-color:transparent;cursor:pointer;border:1px solid var(--feedback-modal-element-hover-border-color)}.feedback-modal-element-selected{background-color:transparent;border:1px solid var(--feedback-modal-element-selected-border-color)}@media screen and (min-width: 768px){.feedback-modal-content{max-width:
|
|
7971
|
+
const feedbackModalCss = ".text-center{flex-grow:1;text-align:center}.feedback-modal-wrapper *{font-family:var(--feedback-font-family)}.feedback-modal-wrapper--custom-font *{font-family:inherit}.feedback-modal-wrapper{position:absolute;z-index:var(--feedback-modal-modal-wrapper-z-index)}.feedback-overlay{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;opacity:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index);transition:opacity 0.2s ease-out}.feedback-overlay--visible{opacity:1}.feedback-modal{display:inline-block;position:relative}.feedback-modal-content{background-color:var(--feedback-modal-content-bg-color);border-color:1px solid var(--feedback-modal-header-text-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-content-text-color);display:flex;flex-direction:column;left:50%;max-width:90%;padding:20px;position:fixed;top:50%;transform:translate(-50%, -50%) scale(0.95);opacity:0;width:100%;z-index:var(--feedback-modal-content-z-index);transition:transform 0.2s ease-out, opacity 0.2s ease-out}.feedback-modal-content--open{transform:translate(-50%, -50%) scale(1);opacity:1}.feedback-modal-header{align-items:center;color:var(--feedback-modal-header-text-color);display:flex;font-size:var(--feedback-header-font-size);font-weight:var(--feedback-modal-header-font-weight);justify-content:space-between;margin-bottom:20px}.feedback-modal-rating-buttons{width:100%;margin-bottom:20px}.feedback-modal-rating-button{padding:0;background-color:transparent;border:transparent;margin-right:5px;cursor:pointer}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button{border:1px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);font-size:var(--feedback-modal-button-font-size);font-weight:500;margin-right:10px;justify-content:center;padding:5px 10px}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected{background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button:hover svg,.feedback-modal-rating-buttons--thumbs .feedback-modal-rating-button--selected svg{stroke:var(--feedback-modal-rating-button-selected-color)}.feedback-modal-rating-buttons svg{stroke:var(--feedback-modal-rating-button-color);cursor:pointer}.feedback-modal-rating-buttons--stars .feedback-modal-rating-button--selected svg{fill:var(--feedback-modal-rating-button-stars-selected-color);stroke:var(--feedback-modal-rating-button-stars-selected-color)}.feedback-modal-text textarea{background-color:var(--feedback-modal-input-bg-color);border:1px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:100px;min-height:100px;padding:10px;resize:vertical;width:100%}.feedback-modal-email input{background-color:var(--feedback-modal-input-bg-color);border:1px solid var(--feedback-modal-input-border-color);border-radius:var(--feedback-modal-input-border-radius);box-sizing:border-box;color:var(--feedback-modal-input-text-color);font-size:var(--feedback-modal-input-font-size);margin-bottom:20px;height:40px;padding:10px;width:100%;margin-bottom:20px}.feedback-modal-privacy{font-size:var(--feedback-modal-input-font-size);margin-bottom:20px}.feedback-modal-text textarea:focus,.feedback-modal-email input:focus{border:1px solid var(--feedback-modal-input-border-color-focused);outline:none}.feedback-modal-buttons{display:flex;flex-direction:column}.feedback-modal-buttons .feedback-modal-button{margin-bottom:20px}.feedback-modal-button{align-items:center;background-color:transparent;border:1px solid var(--feedback-modal-button-border-color);border-radius:var(--feedback-modal-button-border-radius);color:var(--feedback-modal-button-text-color);cursor:pointer;display:flex;font-size:var(--feedback-modal-button-font-size);font-weight:500;justify-content:center;min-height:40px;padding:5px 10px}.feedback-modal-button svg{margin-right:6px}.feedback-modal-button path{fill:var(--feedback-modal-button-icon-color)}.feedback-modal-button:hover path,.feedback-modal-button--active path{fill:var(--feedback-modal-button-icon-color-active)}.feedback-modal-button--submit{background-color:var(--feedback-modal-button-submit-bg-color);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-submit-text-color)}.feedback-modal-button:hover,.feedback-modal-button--active{background-color:var(--feedback-modal-button-bg-color-active);border:1px solid var(--feedback-modal-button-border-color-active);color:var(--feedback-modal-button-text-color-active)}.feedback-modal-button--submit:hover{background-color:var(--feedback-modal-button-submit-bg-color-hover);border:1px solid var(--feedback-modal-button-submit-border-color-hover);color:var(--feedback-modal-button-submit-text-color-hover)}.feedback-modal-input-heading{display:block;font-size:14px;font-weight:300;padding-bottom:10px}.feedback-modal-footer{font-size:12px;text-align:center}.feedback-modal-footer a{color:var(--feedback-modal-footer-link);font-weight:500;text-decoration:none}.feedback-logo{align-items:center;display:flex;justify-content:center;margin-top:5px}.feedback-logo a{margin-left:3px}.feedback-modal-close{background-color:var(--feedback-modal-close-bg-color);border:0;border-radius:50%;cursor:pointer;height:22px;margin-left:auto;padding:0;width:22px}.feedback-modal-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-screenshot{background-color:var(--feedback-modal-screenshot-bg-color);height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--feedback-modal-screnshot-z-index)}.feedback-modal-screenshot-header{align-items:center;background-color:var(--feedback-modal-screenshot-header-bg-color);border-radius:var(--feedback-modal-content-border-radius);box-shadow:0px 1px 2px 0px rgba(60, 64, 67, .30), 0px 2px 6px 2px rgba(60, 64, 67, .15);box-sizing:border-box;color:var(--feedback-modal-screenshot-header-text-color);cursor:pointer;display:flex;left:50%;top:20px;transform:translateX(-50%);padding:10px;position:fixed;width:max-content;z-index:var(--feedback-modal-screenshot-header-z-index)}.feedback-modal-screenshot-close{height:24px;padding-left:10px;width:24px}.feedback-modal-screenshot-close svg{stroke:var(--feedback-modal-close-color)}.feedback-modal-message{font-size:var(--feedback-modal-message-font-size);margin-top:0}.feedback-modal-element-hover{background-color:transparent;cursor:pointer;border:1px solid var(--feedback-modal-element-hover-border-color)}.feedback-modal-element-selected{background-color:transparent;border:1px solid var(--feedback-modal-element-selected-border-color)}@media screen and (min-width: 768px){.feedback-modal-content{max-width:var(--feedback-modal-content-max-width)}.feedback-modal-content.feedback-modal-content--bottom-right{bottom:var(--feedback-modal-content-position-bottom);left:initial;right:var(--feedback-modal-content-position-right);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--bottom-left{bottom:var(--feedback-modal-content-position-bottom);left:var(--feedback-modal-content-position-left);top:initial;transform:initial}.feedback-modal-content.feedback-modal-content--top-right{right:var(--feedback-modal-content-position-right);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--top-left{left:var(--feedback-modal-content-position-left);top:var(--feedback-modal-content-position-top);transform:initial}.feedback-modal-content.feedback-modal-content--center-left{left:5px;right:auto;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--center-right{left:auto;right:5px;top:50%;transform:translateY(-50%)}.feedback-modal-content.feedback-modal-content--sidebar-left.feedback-modal-content--open,.feedback-modal-content.feedback-modal-content--sidebar-right.feedback-modal-content--open{transform:translateX(0)}.feedback-modal-content.feedback-modal-content--sidebar-left{max-width:var(--feedback-modal-content-sidebar-max-width);left:0;right:auto;height:100vh;top:0;transform:translateX(-100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-content.feedback-modal-content--sidebar-right{max-width:var(--feedback-modal-content-sidebar-max-width);left:auto;right:0;height:100vh;top:0;transform:translateX(100%);transition:transform 0.5s ease-in-out;border-radius:0}.feedback-modal-text textarea{height:150px;min-height:150px}.feedback-modal-content.feedback-modal-content--bottom-right{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--bottom-left{transform:translateY(20px)}.feedback-modal-content.feedback-modal-content--bottom-left.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-right{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-right.feedback-modal-content--open{transform:translateY(0)}.feedback-modal-content.feedback-modal-content--top-left{transform:translateY(-20px)}.feedback-modal-content.feedback-modal-content--top-left.feedback-modal-content--open{transform:translateY(0)}}";
|
|
7972
7972
|
|
|
7973
7973
|
const FeedbackModal = class {
|
|
7974
7974
|
constructor(hostRef) {
|
|
@@ -8043,18 +8043,21 @@ const FeedbackModal = class {
|
|
|
8043
8043
|
}
|
|
8044
8044
|
};
|
|
8045
8045
|
this.close = () => {
|
|
8046
|
-
this.
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8046
|
+
this.isAnimating = false;
|
|
8047
|
+
setTimeout(() => {
|
|
8048
|
+
this.sending = false;
|
|
8049
|
+
this.showModal = false;
|
|
8050
|
+
this.showScreenshotMode = false;
|
|
8051
|
+
this.showScreenshotTopBar = false;
|
|
8052
|
+
this.hasSelectedElement = false;
|
|
8053
|
+
this.encodedScreenshot = null;
|
|
8054
|
+
this.formSuccess = false;
|
|
8055
|
+
this.formError = false;
|
|
8056
|
+
this.formErrorStatus = 500;
|
|
8057
|
+
this.formMessage = '';
|
|
8058
|
+
this.formEmail = '';
|
|
8059
|
+
this.resetOverflow();
|
|
8060
|
+
}, 200);
|
|
8058
8061
|
};
|
|
8059
8062
|
this.openScreenShot = () => {
|
|
8060
8063
|
this.hasSelectedElement = false;
|
|
@@ -8171,6 +8174,8 @@ const FeedbackModal = class {
|
|
|
8171
8174
|
this.isPrivacyChecked = false;
|
|
8172
8175
|
this.whitelabel = false;
|
|
8173
8176
|
this.selectedRating = 0;
|
|
8177
|
+
this.overlayVisible = false;
|
|
8178
|
+
this.isAnimating = false;
|
|
8174
8179
|
this.customFont = false;
|
|
8175
8180
|
this.errorMessage = "Please try again later.";
|
|
8176
8181
|
this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
|
|
@@ -8227,7 +8232,11 @@ const FeedbackModal = class {
|
|
|
8227
8232
|
document.documentElement.classList.remove('feedback-modal-screenshot-open');
|
|
8228
8233
|
document.documentElement.classList.remove('feedback-modal-screenshot-open--scroll');
|
|
8229
8234
|
document.documentElement.classList.add('feedback-modal-screenshot-closing');
|
|
8230
|
-
|
|
8235
|
+
// Only restore scroll position if we previously modified it
|
|
8236
|
+
if (document.documentElement.style.top) {
|
|
8237
|
+
window.scrollTo(0, parseInt(document.documentElement.style.top || '0') * -1);
|
|
8238
|
+
document.documentElement.style.top = '';
|
|
8239
|
+
}
|
|
8231
8240
|
window.addEventListener('scroll', this.onScrollDebounced);
|
|
8232
8241
|
}
|
|
8233
8242
|
handleMessageInput(event) {
|
|
@@ -8265,7 +8274,7 @@ const FeedbackModal = class {
|
|
|
8265
8274
|
this.selectedRating = newRating;
|
|
8266
8275
|
}
|
|
8267
8276
|
render() {
|
|
8268
|
-
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:
|
|
8277
|
+
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) => {
|
|
8269
8278
|
event.preventDefault();
|
|
8270
8279
|
this.handleRatingChange(1);
|
|
8271
8280
|
} }, 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) => {
|
|
@@ -8274,7 +8283,22 @@ const FeedbackModal = class {
|
|
|
8274
8283
|
} }, 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) => {
|
|
8275
8284
|
event.preventDefault();
|
|
8276
8285
|
this.handleRatingChange(rating);
|
|
8277
|
-
} }, 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("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", style: { display: this.whitelabel ? 'none' : 'block' } }, index.h("div", { class: "feedback-logo" }, "Powered by ", index.h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")))))));
|
|
8286
|
+
} }, 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", style: { display: this.whitelabel ? 'none' : 'block' } }, index.h("div", { class: "feedback-logo" }, "Powered by ", index.h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")))))));
|
|
8287
|
+
}
|
|
8288
|
+
componentDidRender() {
|
|
8289
|
+
if (this.showModal) {
|
|
8290
|
+
requestAnimationFrame(() => {
|
|
8291
|
+
this.overlayVisible = true;
|
|
8292
|
+
});
|
|
8293
|
+
}
|
|
8294
|
+
}
|
|
8295
|
+
async openModal() {
|
|
8296
|
+
this.showModal = true;
|
|
8297
|
+
requestAnimationFrame(() => {
|
|
8298
|
+
requestAnimationFrame(() => {
|
|
8299
|
+
this.isAnimating = true;
|
|
8300
|
+
});
|
|
8301
|
+
});
|
|
8278
8302
|
}
|
|
8279
8303
|
};
|
|
8280
8304
|
FeedbackModal.style = feedbackModalCss;
|
|
@@ -1027,6 +1027,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1027
1027
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1028
1028
|
const instance = hostRef.$lazyInstance$ ;
|
|
1029
1029
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1030
|
+
{
|
|
1031
|
+
safeCall(instance, 'componentDidRender');
|
|
1032
|
+
}
|
|
1030
1033
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1031
1034
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1032
1035
|
{
|
|
@@ -1047,6 +1050,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1047
1050
|
else {
|
|
1048
1051
|
endPostUpdate();
|
|
1049
1052
|
}
|
|
1053
|
+
{
|
|
1054
|
+
hostRef.$onInstanceResolve$(elm);
|
|
1055
|
+
}
|
|
1050
1056
|
// load events fire from bottom to top
|
|
1051
1057
|
// the deepest elements load first then bubbles up
|
|
1052
1058
|
{
|
|
@@ -1145,6 +1151,16 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1145
1151
|
enumerable: true,
|
|
1146
1152
|
});
|
|
1147
1153
|
}
|
|
1154
|
+
else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
1155
|
+
memberFlags & 64 /* MEMBER_FLAGS.Method */) {
|
|
1156
|
+
// proxyComponent - method
|
|
1157
|
+
Object.defineProperty(prototype, memberName, {
|
|
1158
|
+
value(...args) {
|
|
1159
|
+
const ref = getHostRef(this);
|
|
1160
|
+
return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));
|
|
1161
|
+
},
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1148
1164
|
});
|
|
1149
1165
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1150
1166
|
const attrNameToPropName = new Map();
|
|
@@ -1459,6 +1475,9 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1459
1475
|
$cmpMeta$: cmpMeta,
|
|
1460
1476
|
$instanceValues$: new Map(),
|
|
1461
1477
|
};
|
|
1478
|
+
{
|
|
1479
|
+
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
1480
|
+
}
|
|
1462
1481
|
{
|
|
1463
1482
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1464
1483
|
elm['s-p'] = [];
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9a8f4784.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -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"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"]}],[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"],"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]}]]]], options);
|
|
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"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"]}],[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"],"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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-9a8f4784.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -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"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"]}],[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"],"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]}]]]], 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"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"],"hidePrivacyPolicy":[4,"hide-privacy-policy"],"privacyPolicyText":[1,"privacy-policy-text"],"fetchData":[4,"fetch-data"]}],[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"],"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);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -107,7 +107,7 @@ export class FeedbackButton {
|
|
|
107
107
|
document.head.appendChild(link);
|
|
108
108
|
}
|
|
109
109
|
showModal() {
|
|
110
|
-
this.feedbackModal.
|
|
110
|
+
this.feedbackModal.openModal();
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
113
|
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont ? 'feedback-button-content--custom-font' : ''}`, onClick: () => this.showModal() }, !this.hideIcon && this.buttonStyle != 'default' && (h("span", { class: "feedback-button-content-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "icon-edit" }, h("path", { d: "M12 20h9" }), h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), h("slot", null))));
|
|
@@ -21,10 +21,16 @@
|
|
|
21
21
|
background-color: var(--feedback-modal-screenshot-bg-color);
|
|
22
22
|
height: 100%;
|
|
23
23
|
left: 0;
|
|
24
|
+
opacity: 0;
|
|
24
25
|
position: fixed;
|
|
25
26
|
top: 0;
|
|
26
27
|
width: 100%;
|
|
27
28
|
z-index: var(--feedback-modal-screnshot-z-index);
|
|
29
|
+
transition: opacity 0.2s ease-out;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.feedback-overlay--visible {
|
|
33
|
+
opacity: 1;
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
.feedback-modal {
|
|
@@ -46,9 +52,16 @@
|
|
|
46
52
|
padding: 20px;
|
|
47
53
|
position: fixed;
|
|
48
54
|
top: 50%;
|
|
49
|
-
transform: translate(-50%, -50%);
|
|
55
|
+
transform: translate(-50%, -50%) scale(0.95);
|
|
56
|
+
opacity: 0;
|
|
50
57
|
width: 100%;
|
|
51
58
|
z-index: var(--feedback-modal-content-z-index);
|
|
59
|
+
transition: transform 0.2s ease-out, opacity 0.2s ease-out;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.feedback-modal-content--open {
|
|
63
|
+
transform: translate(-50%, -50%) scale(1);
|
|
64
|
+
opacity: 1;
|
|
52
65
|
}
|
|
53
66
|
|
|
54
67
|
.feedback-modal-header {
|
|
@@ -310,7 +323,7 @@
|
|
|
310
323
|
@media screen and (min-width: 768px) {
|
|
311
324
|
|
|
312
325
|
.feedback-modal-content {
|
|
313
|
-
max-width:
|
|
326
|
+
max-width: var(--feedback-modal-content-max-width);
|
|
314
327
|
}
|
|
315
328
|
|
|
316
329
|
.feedback-modal-content.feedback-modal-content--bottom-right {
|
|
@@ -361,7 +374,7 @@
|
|
|
361
374
|
}
|
|
362
375
|
|
|
363
376
|
.feedback-modal-content.feedback-modal-content--sidebar-left {
|
|
364
|
-
max-width:
|
|
377
|
+
max-width: var(--feedback-modal-content-sidebar-max-width);
|
|
365
378
|
left: 0;
|
|
366
379
|
right: auto;
|
|
367
380
|
height: 100vh;
|
|
@@ -372,7 +385,7 @@
|
|
|
372
385
|
}
|
|
373
386
|
|
|
374
387
|
.feedback-modal-content.feedback-modal-content--sidebar-right {
|
|
375
|
-
max-width:
|
|
388
|
+
max-width: var(--feedback-modal-content-sidebar-max-width);
|
|
376
389
|
left: auto;
|
|
377
390
|
right: 0;
|
|
378
391
|
height: 100vh;
|
|
@@ -386,4 +399,37 @@
|
|
|
386
399
|
height: 150px;
|
|
387
400
|
min-height: 150px;
|
|
388
401
|
}
|
|
402
|
+
|
|
403
|
+
/* Animations */
|
|
404
|
+
.feedback-modal-content.feedback-modal-content--bottom-right {
|
|
405
|
+
transform: translateY(20px);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.feedback-modal-content.feedback-modal-content--bottom-right.feedback-modal-content--open {
|
|
409
|
+
transform: translateY(0);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.feedback-modal-content.feedback-modal-content--bottom-left {
|
|
413
|
+
transform: translateY(20px);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.feedback-modal-content.feedback-modal-content--bottom-left.feedback-modal-content--open {
|
|
417
|
+
transform: translateY(0);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.feedback-modal-content.feedback-modal-content--top-right {
|
|
421
|
+
transform: translateY(-20px);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.feedback-modal-content.feedback-modal-content--top-right.feedback-modal-content--open {
|
|
425
|
+
transform: translateY(0);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.feedback-modal-content.feedback-modal-content--top-left {
|
|
429
|
+
transform: translateY(-20px);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.feedback-modal-content.feedback-modal-content--top-left.feedback-modal-content--open {
|
|
433
|
+
transform: translateY(0);
|
|
434
|
+
}
|
|
389
435
|
}
|
|
@@ -70,18 +70,21 @@ export class FeedbackModal {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
this.close = () => {
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
this.isAnimating = false;
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
this.sending = false;
|
|
76
|
+
this.showModal = false;
|
|
77
|
+
this.showScreenshotMode = false;
|
|
78
|
+
this.showScreenshotTopBar = false;
|
|
79
|
+
this.hasSelectedElement = false;
|
|
80
|
+
this.encodedScreenshot = null;
|
|
81
|
+
this.formSuccess = false;
|
|
82
|
+
this.formError = false;
|
|
83
|
+
this.formErrorStatus = 500;
|
|
84
|
+
this.formMessage = '';
|
|
85
|
+
this.formEmail = '';
|
|
86
|
+
this.resetOverflow();
|
|
87
|
+
}, 200);
|
|
85
88
|
};
|
|
86
89
|
this.openScreenShot = () => {
|
|
87
90
|
this.hasSelectedElement = false;
|
|
@@ -199,6 +202,8 @@ export class FeedbackModal {
|
|
|
199
202
|
this.isPrivacyChecked = false;
|
|
200
203
|
this.whitelabel = false;
|
|
201
204
|
this.selectedRating = 0;
|
|
205
|
+
this.overlayVisible = false;
|
|
206
|
+
this.isAnimating = false;
|
|
202
207
|
this.customFont = false;
|
|
203
208
|
this.errorMessage = "Please try again later.";
|
|
204
209
|
this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
|
|
@@ -255,7 +260,11 @@ export class FeedbackModal {
|
|
|
255
260
|
document.documentElement.classList.remove('feedback-modal-screenshot-open');
|
|
256
261
|
document.documentElement.classList.remove('feedback-modal-screenshot-open--scroll');
|
|
257
262
|
document.documentElement.classList.add('feedback-modal-screenshot-closing');
|
|
258
|
-
|
|
263
|
+
// Only restore scroll position if we previously modified it
|
|
264
|
+
if (document.documentElement.style.top) {
|
|
265
|
+
window.scrollTo(0, parseInt(document.documentElement.style.top || '0') * -1);
|
|
266
|
+
document.documentElement.style.top = '';
|
|
267
|
+
}
|
|
259
268
|
window.addEventListener('scroll', this.onScrollDebounced);
|
|
260
269
|
}
|
|
261
270
|
handleMessageInput(event) {
|
|
@@ -293,7 +302,7 @@ export class FeedbackModal {
|
|
|
293
302
|
this.selectedRating = newRating;
|
|
294
303
|
}
|
|
295
304
|
render() {
|
|
296
|
-
return (h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class:
|
|
305
|
+
return (h("div", { class: `feedback-modal-wrapper ${this.customFont ? 'feedback-modal-wrapper--custom-font' : ''}` }, this.showScreenshotMode && (h("div", { class: "feedback-modal-screenshot", ref: el => (this.screenshotModal = el), onMouseMove: this.handleMouseOverScreenShot }, h("div", { class: "feedback-modal-screenshot-element-selected", ref: el => (this.elementSelected = el), onClick: this.handleMouseClickedSelectedElement }), h("div", { class: "top-side", ref: el => (this.topSide = el) }), h("div", { class: "left-side", ref: el => (this.leftSide = el) }), h("div", { class: "bottom-side", ref: el => (this.bottomSide = el) }), h("div", { class: "right-side", ref: el => (this.rightSide = el) }), this.showScreenshotTopBar && (h("div", { class: "feedback-modal-screenshot-header", onClick: this.closeScreenShot }, h("span", null, this.screenshotTopbarText), h("span", { class: "feedback-modal-screenshot-close" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))), this.showModal && (h("div", { class: `feedback-overlay ${this.isAnimating ? 'feedback-overlay--visible' : ''}` })), this.showModal && (h("div", { class: `feedback-modal-content feedback-modal-content--${this.modalPosition} ${this.isAnimating ? 'feedback-modal-content--open' : ''}`, ref: el => (this.modalContent = el) }, h("div", { class: "feedback-modal-header" }, !this.formSuccess && !this.formError ? (h("span", null, this.modalTitle)) : this.formSuccess ? (h("span", null, this.modalTitleSuccess)) : h("span", null, this.modalTitleError), h("button", { class: "feedback-modal-close", onClick: this.close }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "#191919", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-x" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { class: "feedback-modal-body" }, !this.formSuccess && !this.formError ? (h("form", { onSubmit: this.handleSubmit }, !this.hideRating && (h("div", { class: "feedback-modal-rating" }, this.ratingMode === 'thumbs' ? (h("div", { class: "feedback-modal-rating-content" }, h("span", { class: "feedback-modal-input-heading" }, this.ratingPlaceholder), h("div", { class: "feedback-modal-rating-buttons feedback-modal-rating-buttons--thumbs" }, h("button", { title: "Yes", class: `feedback-modal-rating-button ${this.selectedRating === 1 ? 'feedback-modal-rating-button--selected' : ''}`, onClick: (event) => {
|
|
297
306
|
event.preventDefault();
|
|
298
307
|
this.handleRatingChange(1);
|
|
299
308
|
} }, 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) => {
|
|
@@ -302,7 +311,22 @@ export class FeedbackModal {
|
|
|
302
311
|
} }, 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) => {
|
|
303
312
|
event.preventDefault();
|
|
304
313
|
this.handleRatingChange(rating);
|
|
305
|
-
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), h("div", { class: "feedback-modal-text" }, h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (h("div", { class: "feedback-modal-email" }, h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail }))), h("div", { class: "feedback-verification" }, h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (h("div", { class: "feedback-modal-privacy" }, h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), h("span", { innerHTML: this.privacyPolicyText }))), h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? "feedback-modal-button--active" : ""}`, onClick: this.openScreenShot, disabled: this.sending }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" })), this.screenshotButtonText)), h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (h("p", { class: "feedback-modal-message" }, this.successMessage)) : this.formError && this.formErrorStatus == 404 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (h("p", { class: "feedback-modal-message" }, this.errorMessage)) : h("span", null)), h("div", { class: "feedback-modal-footer", style: { display: this.whitelabel ? 'none' : 'block' } }, h("div", { class: "feedback-logo" }, "Powered by ", h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")))))));
|
|
314
|
+
} }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", stroke: "#5F6368", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })))))))))), h("div", { class: "feedback-modal-text" }, h("textarea", { placeholder: this.messagePlaceholder, value: this.formMessage, onInput: (event) => this.handleMessageInput(event) })), !this.hideEmail && (h("div", { class: "feedback-modal-email" }, h("input", { placeholder: this.emailPlaceholder, type: "email", onInput: (event) => this.handleEmailInput(event), value: this.formEmail }))), h("div", { class: "feedback-verification" }, h("input", { type: "text", name: "verification", style: { display: 'none' }, onInput: (event) => this.handleVerification(event), value: this.formVerification })), !this.hidePrivacyPolicy && (h("div", { class: "feedback-modal-privacy" }, h("input", { type: "checkbox", id: "privacyPolicy", onChange: (ev) => this.handleCheckboxChange(ev), required: true }), h("span", { innerHTML: this.privacyPolicyText }))), h("div", { class: `feedback-modal-buttons ${this.hideScreenshotButton ? 'single' : ''}` }, !this.hideScreenshotButton && (h("button", { type: "button", class: `feedback-modal-button feedback-modal-button--screenshot ${this.encodedScreenshot ? "feedback-modal-button--active" : ""}`, onClick: this.openScreenShot, disabled: this.sending }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "0 -960 960 960", width: "24" }, h("path", { d: "M680-80v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-200v-200h80v120h120v80H200Zm0-360v-200h200v80H280v120h-80Zm480 0v-120H560v-80h200v200h-80Z" })), this.screenshotButtonText)), h("button", { class: "feedback-modal-button feedback-modal-button--submit", type: "submit", disabled: this.sending }, this.sendButtonText)))) : this.formSuccess && !this.formError ? (h("div", { class: "feedback-modal-success" }, h("p", { class: "feedback-modal-message" }, this.successMessage))) : this.formError && this.formErrorStatus == 404 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage404)) : this.formError && this.formErrorStatus == 403 ? (h("p", { class: "feedback-modal-message" }, this.errorMessage403)) : this.formError ? (h("p", { class: "feedback-modal-message" }, this.errorMessage)) : h("span", null)), h("div", { class: "feedback-modal-footer", style: { display: this.whitelabel ? 'none' : 'block' } }, h("div", { class: "feedback-logo" }, "Powered by ", h("a", { target: "_blank", href: "https://pushfeedback.com" }, "PushFeedback.com")))))));
|
|
315
|
+
}
|
|
316
|
+
componentDidRender() {
|
|
317
|
+
if (this.showModal) {
|
|
318
|
+
requestAnimationFrame(() => {
|
|
319
|
+
this.overlayVisible = true;
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
async openModal() {
|
|
324
|
+
this.showModal = true;
|
|
325
|
+
requestAnimationFrame(() => {
|
|
326
|
+
requestAnimationFrame(() => {
|
|
327
|
+
this.isAnimating = true;
|
|
328
|
+
});
|
|
329
|
+
});
|
|
306
330
|
}
|
|
307
331
|
static get is() { return "feedback-modal"; }
|
|
308
332
|
static get encapsulation() { return "shadow"; }
|
|
@@ -871,7 +895,9 @@ export class FeedbackModal {
|
|
|
871
895
|
"encodedScreenshot": {},
|
|
872
896
|
"isPrivacyChecked": {},
|
|
873
897
|
"whitelabel": {},
|
|
874
|
-
"selectedRating": {}
|
|
898
|
+
"selectedRating": {},
|
|
899
|
+
"overlayVisible": {},
|
|
900
|
+
"isAnimating": {}
|
|
875
901
|
};
|
|
876
902
|
}
|
|
877
903
|
static get events() {
|
|
@@ -907,4 +933,24 @@ export class FeedbackModal {
|
|
|
907
933
|
}
|
|
908
934
|
}];
|
|
909
935
|
}
|
|
936
|
+
static get methods() {
|
|
937
|
+
return {
|
|
938
|
+
"openModal": {
|
|
939
|
+
"complexType": {
|
|
940
|
+
"signature": "() => Promise<void>",
|
|
941
|
+
"parameters": [],
|
|
942
|
+
"references": {
|
|
943
|
+
"Promise": {
|
|
944
|
+
"location": "global"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"return": "Promise<void>"
|
|
948
|
+
},
|
|
949
|
+
"docs": {
|
|
950
|
+
"text": "",
|
|
951
|
+
"tags": []
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
}
|
|
910
956
|
}
|
|
@@ -114,7 +114,7 @@ const FeedbackButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
114
114
|
document.head.appendChild(link);
|
|
115
115
|
}
|
|
116
116
|
showModal() {
|
|
117
|
-
this.feedbackModal.
|
|
117
|
+
this.feedbackModal.openModal();
|
|
118
118
|
}
|
|
119
119
|
render() {
|
|
120
120
|
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition} ${this.customFont ? 'feedback-button-content--custom-font' : ''}`, onClick: () => this.showModal() }, !this.hideIcon && this.buttonStyle != 'default' && (h("span", { class: "feedback-button-content-icon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#fff", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "icon-edit" }, h("path", { d: "M12 20h9" }), h("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })))), h("slot", null))));
|