pushfeedback 0.1.44 → 0.1.46
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 +1 -1
- package/dist/collection/components/feedback-button/feedback-button.js +1 -1
- package/dist/components/feedback-button.js +1 -1
- package/dist/esm/feedback-button_2.entry.js +1 -1
- package/dist/pushfeedback/{p-fb4e4a0c.entry.js → p-fa888cd3.entry.js} +1 -1
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/package.json +1 -1
|
@@ -118,7 +118,7 @@ const FeedbackButton = class {
|
|
|
118
118
|
this.feedbackModal.showModal = true;
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return (index.h(index.Host, null, index.h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, onClick: () => this.showModal() }, !this.hideIcon && (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))));
|
|
121
|
+
return (index.h(index.Host, null, index.h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, 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))));
|
|
122
122
|
}
|
|
123
123
|
get el() { return index.getElement(this); }
|
|
124
124
|
};
|
|
@@ -110,7 +110,7 @@ export class FeedbackButton {
|
|
|
110
110
|
this.feedbackModal.showModal = true;
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
|
-
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, onClick: () => this.showModal() }, !this.hideIcon && (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))));
|
|
113
|
+
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, 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))));
|
|
114
114
|
}
|
|
115
115
|
static get is() { return "feedback-button"; }
|
|
116
116
|
static get encapsulation() { return "shadow"; }
|
|
@@ -117,7 +117,7 @@ const FeedbackButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
117
117
|
this.feedbackModal.showModal = true;
|
|
118
118
|
}
|
|
119
119
|
render() {
|
|
120
|
-
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, onClick: () => this.showModal() }, !this.hideIcon && (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))));
|
|
120
|
+
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, 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))));
|
|
121
121
|
}
|
|
122
122
|
get el() { return this; }
|
|
123
123
|
static get style() { return feedbackButtonCss; }
|
|
@@ -114,7 +114,7 @@ const FeedbackButton = class {
|
|
|
114
114
|
this.feedbackModal.showModal = true;
|
|
115
115
|
}
|
|
116
116
|
render() {
|
|
117
|
-
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, onClick: () => this.showModal() }, !this.hideIcon && (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))));
|
|
117
|
+
return (h(Host, null, h("a", { class: `feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`, 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))));
|
|
118
118
|
}
|
|
119
119
|
get el() { return getElement(this); }
|
|
120
120
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as A,h as B,H as e,g as t}from"./p-90e8ba79.js";const r=class{constructor(B){A(this,B),this.sessionId="",this.customFont=!1,this.errorMessage="Please try again later.",this.errorMessage403="The request URL does not match the one defined in PushFeedback for this project.",this.errorMessage404="We could not find the provided project id in PushFeedback.",this.modalTitle="Share your feedback",this.modalTitleSuccess="Thanks for your feedback!",this.modalTitleError="Oops!",this.modalPosition="center",this.sendButtonText="Send",this.successMessage="",this.project="",this.screenshotButtonText="Add a screenshot",this.screenshotTopbarText="Select an element on this page",this.hideEmail=!1,this.emailAddress="",this.emailPlaceholder="Email address (optional)",this.messagePlaceholder="Comments",this.hideRating=!1,this.rating=void 0,this.ratingMode="thumbs",this.ratingPlaceholder="Was this page helpful?",this.ratingStarsPlaceholder="How would you rate this page?",this.buttonStyle="default",this.buttonPosition="default",this.hideIcon=!1,this.hideScreenshotButton=!1,this.hidePrivacyPolicy=!0,this.privacyPolicyText="I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.",this.fetchData=!0}componentWillLoad(){if(!this.sessionId){let A=localStorage.getItem("pushfeedback_sessionid");A||(A=this.generateRandomSessionId(),localStorage.setItem("pushfeedback_sessionid",A),this.sessionId=A)}}componentDidLoad(){if("center-right"===this.buttonPosition){const A=this.el.shadowRoot.querySelector(".feedback-button-content");let B=0;this.isSafariBrowser()&&(B=10),A.style.right=(A.offsetWidth+B)/2*-1+"px"}this.customFont||this.loadInterFont()}connectedCallback(){this.feedbackModal=document.createElement("feedback-modal"),["customFont","errorMessage","errorMessage403","errorMessage404","modalTitle","modalTitleSuccess","modalTitleError","modalPosition","sendButtonText","successMessage","project","screenshotButtonText","screenshotTopbarText","hideEmail","emailAddress","emailPlaceholder","messagePlaceholder","hideRating","rating","ratingMode","ratingPlaceholder","ratingStarsPlaceholder","hideScreenshotButton","hidePrivacyPolicy","privacyPolicyText","fetchData"].forEach((A=>{this.feedbackModal[A]=this[A]})),document.body.appendChild(this.feedbackModal)}disconnectedCallback(){document.body.removeChild(this.feedbackModal)}generateRandomSessionId(A=16){return Math.random().toString(36).substr(2,A)}isSafariBrowser(){return/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent)}loadInterFont(){const A=document.createElement("link");A.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",A.rel="stylesheet",document.head.appendChild(A)}showModal(){this.feedbackModal.showModal=!0}render(){return B(e,null,B("a",{class:`feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`,onClick:()=>this.showModal()},!this.hideIcon&&B("span",{class:"feedback-button-content-icon"},B("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"},B("path",{d:"M12 20h9"}),B("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"}))),B("slot",null)))}get el(){return t(this)}};r.style=".feedback-button-content{cursor:pointer;max-width:fit-content;z-index:var(--feedback-button-z-index)}.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-family:var(--feedback-font-family);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-family:var(--feedback-font-family);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}","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s,n,Q=(s=function(A){
|
|
1
|
+
import{r as A,h as B,H as e,g as t}from"./p-90e8ba79.js";const r=class{constructor(B){A(this,B),this.sessionId="",this.customFont=!1,this.errorMessage="Please try again later.",this.errorMessage403="The request URL does not match the one defined in PushFeedback for this project.",this.errorMessage404="We could not find the provided project id in PushFeedback.",this.modalTitle="Share your feedback",this.modalTitleSuccess="Thanks for your feedback!",this.modalTitleError="Oops!",this.modalPosition="center",this.sendButtonText="Send",this.successMessage="",this.project="",this.screenshotButtonText="Add a screenshot",this.screenshotTopbarText="Select an element on this page",this.hideEmail=!1,this.emailAddress="",this.emailPlaceholder="Email address (optional)",this.messagePlaceholder="Comments",this.hideRating=!1,this.rating=void 0,this.ratingMode="thumbs",this.ratingPlaceholder="Was this page helpful?",this.ratingStarsPlaceholder="How would you rate this page?",this.buttonStyle="default",this.buttonPosition="default",this.hideIcon=!1,this.hideScreenshotButton=!1,this.hidePrivacyPolicy=!0,this.privacyPolicyText="I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.",this.fetchData=!0}componentWillLoad(){if(!this.sessionId){let A=localStorage.getItem("pushfeedback_sessionid");A||(A=this.generateRandomSessionId(),localStorage.setItem("pushfeedback_sessionid",A),this.sessionId=A)}}componentDidLoad(){if("center-right"===this.buttonPosition){const A=this.el.shadowRoot.querySelector(".feedback-button-content");let B=0;this.isSafariBrowser()&&(B=10),A.style.right=(A.offsetWidth+B)/2*-1+"px"}this.customFont||this.loadInterFont()}connectedCallback(){this.feedbackModal=document.createElement("feedback-modal"),["customFont","errorMessage","errorMessage403","errorMessage404","modalTitle","modalTitleSuccess","modalTitleError","modalPosition","sendButtonText","successMessage","project","screenshotButtonText","screenshotTopbarText","hideEmail","emailAddress","emailPlaceholder","messagePlaceholder","hideRating","rating","ratingMode","ratingPlaceholder","ratingStarsPlaceholder","hideScreenshotButton","hidePrivacyPolicy","privacyPolicyText","fetchData"].forEach((A=>{this.feedbackModal[A]=this[A]})),document.body.appendChild(this.feedbackModal)}disconnectedCallback(){document.body.removeChild(this.feedbackModal)}generateRandomSessionId(A=16){return Math.random().toString(36).substr(2,A)}isSafariBrowser(){return/safari/i.test(navigator.userAgent)&&!/chrome/i.test(navigator.userAgent)}loadInterFont(){const A=document.createElement("link");A.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap",A.rel="stylesheet",document.head.appendChild(A)}showModal(){this.feedbackModal.showModal=!0}render(){return B(e,null,B("a",{class:`feedback-button-content feedback-button-content--${this.buttonStyle} feedback-button-content--${this.buttonPosition}`,onClick:()=>this.showModal()},!this.hideIcon&&"default"!=this.buttonStyle&&B("span",{class:"feedback-button-content-icon"},B("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"},B("path",{d:"M12 20h9"}),B("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"}))),B("slot",null)))}get el(){return t(this)}};r.style=".feedback-button-content{cursor:pointer;max-width:fit-content;z-index:var(--feedback-button-z-index)}.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-family:var(--feedback-font-family);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-family:var(--feedback-font-family);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}","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s,n,Q=(s=function(A){
|
|
2
2
|
/*!
|
|
3
3
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
4
4
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-90e8ba79.js";export{s as setNonce}from"./p-90e8ba79.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-
|
|
1
|
+
import{p as e,b as t}from"./p-90e8ba79.js";export{s as setNonce}from"./p-90e8ba79.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-fa888cd3",[[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",{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]}]]]],e)));
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "pushfeedback",
|
|
3
3
|
"author": "TechDocs Studio <hi@techdocs.studio>",
|
|
4
4
|
"homepage": "https://pushfeedback.com/",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.46",
|
|
6
6
|
"description": "Feedback widget for websites.",
|
|
7
7
|
"main": "dist/index.cjs.js",
|
|
8
8
|
"module": "dist/index.js",
|