pushfeedback 0.1.36 → 0.1.38
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 +8245 -1
- package/dist/cjs/index-a717311c.js +1551 -0
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/loader.cjs.js +22 -1
- package/dist/cjs/pushfeedback.cjs.js +23 -1
- package/dist/collection/components/feedback-button/feedback-button.js +640 -1
- package/dist/collection/components/feedback-modal/feedback-modal.js +837 -1
- package/dist/collection/index.js +1 -1
- package/dist/components/feedback-button.js +163 -1
- package/dist/components/feedback-modal.js +6 -1
- package/dist/components/feedback-modal2.js +8189 -1
- package/dist/components/index.js +3 -1
- package/dist/esm/feedback-button_2.entry.js +8240 -1
- package/dist/esm/index-37061d71.js +1523 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -1
- package/dist/esm/polyfills/core-js.js +11 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +79 -1
- package/dist/esm/polyfills/es5-html-element.js +1 -1
- package/dist/esm/polyfills/index.js +34 -1
- package/dist/esm/polyfills/system.js +6 -1
- package/dist/esm/pushfeedback.js +18 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/pushfeedback/p-9e531691.js +2 -0
- package/dist/pushfeedback/p-d937f207.entry.js +22 -0
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/dist/types/components/feedback-button/feedback-button.d.ts +40 -39
- package/dist/types/components/feedback-modal/feedback-modal.d.ts +65 -64
- package/dist/types/components.d.ts +4 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +5 -4
- package/dist/cjs/index-d64bfb06.js +0 -1
- package/dist/esm/index-b07fba3a.js +0 -1
- package/dist/pushfeedback/p-a0681be3.js +0 -1
- package/dist/pushfeedback/p-ea59cbec.entry.js +0 -1
package/dist/collection/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './components';
|
|
@@ -1 +1,163 @@
|
|
|
1
|
-
const _0x269984=_0x36c7;function _0x36c7(_0x2eb459,_0x109739){const _0x516d0a=_0x516d();return _0x36c7=function(_0x36c762,_0x1509c2){_0x36c762=_0x36c762-0x146;let _0x319722=_0x516d0a[_0x36c762];return _0x319722;},_0x36c7(_0x2eb459,_0x109739);}(function(_0x123701,_0x38963c){const _0xea6709=_0x36c7,_0x3204f4=_0x123701();while(!![]){try{const _0x1ff1bc=parseInt(_0xea6709(0x1cf))/0x1*(parseInt(_0xea6709(0x167))/0x2)+-parseInt(_0xea6709(0x1b5))/0x3+-parseInt(_0xea6709(0x18f))/0x4*(parseInt(_0xea6709(0x1c5))/0x5)+-parseInt(_0xea6709(0x182))/0x6+-parseInt(_0xea6709(0x1b9))/0x7*(-parseInt(_0xea6709(0x157))/0x8)+-parseInt(_0xea6709(0x1d1))/0x9+parseInt(_0xea6709(0x17b))/0xa*(parseInt(_0xea6709(0x16b))/0xb);if(_0x1ff1bc===_0x38963c)break;else _0x3204f4['push'](_0x3204f4['shift']());}catch(_0x1e78a5){_0x3204f4['push'](_0x3204f4['shift']());}}}(_0x516d,0x66850));function _0x516d(){const _0x166cd9=['screenshot-topbar-text','bPHzC','WXnkX','hideEmail','link','HTdPo','modal-title','fDtgA','Email\x20address\x20(optional)','hideIcon','Jlnbb','5744770pniDAf','privacyPolicyText','Please\x20try\x20again\x20later.','bRUzq','https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap','I\x20have\x20read\x20and\x20expressly\x20consent\x20to\x20the\x20terms\x20of\x20the\x20<a\x20href=\x27https://pushfeedback.com/privacy\x27>Privacy\x20Policy</a>.','feather\x20feather-edit-3','3833202bguoOn','componentDidLoad','M16.5\x203.5a2.121\x202.121\x200\x200\x201\x203\x203L7\x2019l-4\x201\x201-4L16.5\x203.5z','wDMUR','jAQHi','ZumGO','mSkUr','ASqJk','dHEiG','sTbKt','rel','disconnectedCallback','hideScreenshotButton','12mKOOaD','buttonStyle','YxpjN','fetch-data','loadInterFont','errorMessage404','ratingPlaceholder','svg','appendChild','RsnUs','WXOGT','querySelector','modal-title-success','xfNFu','light','vZvtv','Comments','LpasK','htADl','errorMessage','Cprrc','__registerHost','The\x20request\x20URL\x20does\x20not\x20match\x20the\x20one\x20defined\x20in\x20PushFeedback\x20for\x20this\x20project.','rating-mode','Thanks\x20for\x20your\x20feedback!','stylesheet','hidePrivacyPolicy','screenshotTopbarText','fetchData','ffbje','qtpjk','button-position','lzCVS','hideRating','http://www.w3.org/2000/svg','sendButtonText','emailPlaceholder','send-button-text','1956396VMIMNU','error-message-4-0-3','body','modalTitleSuccess','120827XizudH','test','undefined','right','xGSGX','modal-title-error','hide-email','feedback-button-content-icon','#0070F4','isSafariBrowser','project','feedbackModal','1035825ZKFkhU','ratingStarsPlaceholder','custom-font','none','errorMessage403','CslWs','feedback-modal','center','ShLny','nWKJi','7IkSoWP','buttonPosition','3081456hIQdrU','modalTitleError','forEach','emailAddress','dark','YaRkG','eyOvr','ratingMode','.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,\x2064,\x2067,\x200.3)\x200px\x201px\x202px\x200px,\x20rgba(60,\x2064,\x2067,\x200.15)\x200px\x202px\x206px\x202px;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\x2015px}.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,\x2064,\x2067,\x200.3)\x200px\x201px\x202px\x200px,\x20rgba(60,\x2064,\x2067,\x200.15)\x200px\x202px\x206px\x202px;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\x2015px}.feedback-button-content--bottom-right{bottom:10px;position:fixed;right:10px}.feedback-button-content--center-right{position:fixed;transform:rotate(-90deg)\x20translateY(-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\x20.feedback-button-content-icon{rotate:90deg}','connectedCallback','rating-stars-placeholder','cPxgE','NZIyY','userAgent','hide-screenshot-button','modalTitle','path','modalPosition','offsetWidth','#fff','Share\x20your\x20feedback','PPSjs','get','style','showModal','Add\x20a\x20screenshot','feedback-button','ttZZK','0\x200\x2024\x2024','PGZVx','wXfEG','default','tYyLD','success-message','rating-placeholder','modal-position','shadowRoot','hide-privacy-policy','head','slot','We\x20could\x20not\x20find\x20the\x20provided\x20project\x20id\x20in\x20PushFeedback.','createElement','customFont','successMessage','88fwqdrP','DSpGH','Select\x20an\x20element\x20on\x20this\x20page','tTiDe','feedback-button-content\x20feedback-button-content--','cORbY','hMYFM','CzZMs','screenshot-button-text','screenshotButtonText','ivnmt','messagePlaceholder','Oops!','ulNpL','QXEse','email-address','53434KoxLhk','center-right','LhADP','email-placeholder','44OKZcDx','EpfwC','zXMVm','define','GgcYN'];_0x516d=function(){return _0x166cd9;};return _0x516d();}import{proxyCustomElement,HTMLElement,h,Host}from'@stencil/core/internal/client';import{d as _0x39d9aa}from'./feedback-modal2.js';const feedbackButtonCss=_0x269984(0x1d9),FeedbackButton$1=proxyCustomElement(class extends HTMLElement{constructor(){const _0x42aa2b=_0x269984,_0x2278f8={'ttZZK':_0x42aa2b(0x17d),'PGZVx':_0x42aa2b(0x1a5),'ulNpL':_0x42aa2b(0x153),'WXOGT':_0x42aa2b(0x1e5),'xGSGX':_0x42aa2b(0x163),'vTIbB':_0x42aa2b(0x1cc),'ShLny':'Send','sTbKt':_0x42aa2b(0x1ea),'NZIyY':_0x42aa2b(0x178),'ivnmt':'thumbs','nJwzm':'Was\x20this\x20page\x20helpful?','qtpjk':_0x42aa2b(0x14a)};super(),this[_0x42aa2b(0x1a4)](),this['__attachShadow'](),this[_0x42aa2b(0x155)]=![],this['errorMessage']=_0x2278f8[_0x42aa2b(0x146)],this[_0x42aa2b(0x1c9)]=_0x2278f8[_0x42aa2b(0x148)],this[_0x42aa2b(0x194)]=_0x2278f8[_0x42aa2b(0x164)],this[_0x42aa2b(0x1e0)]=_0x2278f8[_0x42aa2b(0x199)],this[_0x42aa2b(0x1b8)]=_0x42aa2b(0x1a7),this[_0x42aa2b(0x1d2)]=_0x2278f8[_0x42aa2b(0x1bd)],this[_0x42aa2b(0x1e2)]=_0x2278f8['vTIbB'],this['sendButtonText']=_0x2278f8[_0x42aa2b(0x1cd)],this[_0x42aa2b(0x156)]='',this[_0x42aa2b(0x1c3)]='',this[_0x42aa2b(0x160)]=_0x2278f8[_0x42aa2b(0x18b)],this[_0x42aa2b(0x1aa)]=_0x42aa2b(0x159),this[_0x42aa2b(0x173)]=![],this['emailAddress']='',this[_0x42aa2b(0x1b3)]=_0x2278f8[_0x42aa2b(0x1dd)],this[_0x42aa2b(0x162)]=_0x42aa2b(0x19f),this['hideRating']=![],this[_0x42aa2b(0x1d8)]=_0x2278f8[_0x42aa2b(0x161)],this[_0x42aa2b(0x195)]=_0x2278f8['nJwzm'],this[_0x42aa2b(0x1c6)]='How\x20would\x20you\x20rate\x20this\x20page?',this[_0x42aa2b(0x190)]=_0x2278f8[_0x42aa2b(0x1ad)],this['buttonPosition']='default',this[_0x42aa2b(0x179)]=![],this[_0x42aa2b(0x18e)]=![],this[_0x42aa2b(0x1a9)]=!![],this['privacyPolicyText']=_0x42aa2b(0x180),this['fetchData']=!![];}[_0x269984(0x1da)](){const _0x507b7a=_0x269984,_0x1d79b0={'xqJiX':_0x507b7a(0x155),'RsnUs':_0x507b7a(0x1a2),'QXEse':'errorMessage403','WEKYz':_0x507b7a(0x194),'Jvnec':_0x507b7a(0x1e0),'ZumGO':_0x507b7a(0x1b8),'Jlnbb':_0x507b7a(0x1d2),'bPHzC':'modalPosition','dHEiG':'successMessage','HTdPo':_0x507b7a(0x160),'DSpGH':_0x507b7a(0x1aa),'YaRkG':_0x507b7a(0x173),'QroRZ':_0x507b7a(0x1b3),'ASqJk':_0x507b7a(0x162),'bRUzq':_0x507b7a(0x1d8),'Yetab':_0x507b7a(0x195),'HiOgz':_0x507b7a(0x1c6),'aqTMB':_0x507b7a(0x18e),'IjUMN':_0x507b7a(0x1a9),'lzCVS':_0x507b7a(0x17c),'jAQHi':_0x507b7a(0x1ab)};this['feedbackModal']=document[_0x507b7a(0x154)](_0x507b7a(0x1cb));const _0x5355bd=[_0x1d79b0['xqJiX'],_0x1d79b0[_0x507b7a(0x198)],_0x1d79b0[_0x507b7a(0x165)],_0x1d79b0['WEKYz'],_0x1d79b0['Jvnec'],_0x1d79b0[_0x507b7a(0x187)],_0x1d79b0[_0x507b7a(0x17a)],_0x1d79b0[_0x507b7a(0x171)],_0x507b7a(0x1b2),_0x1d79b0[_0x507b7a(0x18a)],'project',_0x1d79b0[_0x507b7a(0x175)],_0x1d79b0[_0x507b7a(0x158)],_0x1d79b0[_0x507b7a(0x1d6)],_0x507b7a(0x1d4),_0x1d79b0['QroRZ'],_0x1d79b0[_0x507b7a(0x189)],_0x507b7a(0x1b0),_0x1d79b0[_0x507b7a(0x17e)],_0x1d79b0['Yetab'],_0x1d79b0['HiOgz'],_0x1d79b0['aqTMB'],_0x1d79b0['IjUMN'],_0x1d79b0[_0x507b7a(0x1af)],_0x1d79b0[_0x507b7a(0x186)]];_0x5355bd['forEach'](_0x3842ac=>{const _0x4a2135=_0x507b7a;this[_0x4a2135(0x1c4)][_0x3842ac]=this[_0x3842ac];}),document[_0x507b7a(0x1b7)][_0x507b7a(0x197)](this[_0x507b7a(0x1c4)]);}[_0x269984(0x18d)](){const _0x22f39b=_0x269984;document[_0x22f39b(0x1b7)]['removeChild'](this['feedbackModal']);}[_0x269984(0x1c2)](){const _0x5e3f18=_0x269984,_0x1c497e=/safari/i[_0x5e3f18(0x1ba)](navigator[_0x5e3f18(0x1de)])&&!/chrome/i['test'](navigator['userAgent']);return _0x1c497e;}[_0x269984(0x183)](){const _0x5971ff=_0x269984,_0x391304={'Cprrc':function(_0x5bb62e,_0x250ffe){return _0x5bb62e===_0x250ffe;},'mSkUr':'.feedback-button-content','JelHf':function(_0x2f1463,_0x1b86ea){return _0x2f1463*_0x1b86ea;},'GgcYN':function(_0x13495b,_0x14e28b){return _0x13495b/_0x14e28b;},'wDMUR':function(_0x186809,_0x5df239){return _0x186809+_0x5df239;}};if(_0x391304[_0x5971ff(0x1a3)](this[_0x5971ff(0x1d0)],_0x5971ff(0x168))){const _0x4036a6=this['el'][_0x5971ff(0x14f)][_0x5971ff(0x19a)](_0x391304[_0x5971ff(0x188)]);let _0xfee3f6=0x0;this['isSafariBrowser']()&&(_0xfee3f6=0xa),_0x4036a6['style'][_0x5971ff(0x1bc)]=_0x391304['JelHf'](_0x391304[_0x5971ff(0x16f)](_0x391304[_0x5971ff(0x185)](_0x4036a6[_0x5971ff(0x1e3)],_0xfee3f6),0x2),-0x1)+'px';}!this['customFont']&&this[_0x5971ff(0x193)]();}[_0x269984(0x193)](){const _0xef3c8e=_0x269984,_0x5c05dc={'EunIk':_0xef3c8e(0x174),'TmYEp':_0xef3c8e(0x1a8)},_0x460158=document[_0xef3c8e(0x154)](_0x5c05dc['EunIk']);_0x460158['href']=_0xef3c8e(0x17f),_0x460158[_0xef3c8e(0x18c)]=_0x5c05dc['TmYEp'],document[_0xef3c8e(0x151)][_0xef3c8e(0x197)](_0x460158);}[_0x269984(0x1e9)](){const _0xc5abf8=_0x269984;this[_0xc5abf8(0x1c4)][_0xc5abf8(0x1e9)]=!![];}['render'](){const _0x1ef2e1=_0x269984,_0x26be7e={'KsrfO':_0x1ef2e1(0x1d5),'wXfEG':'span','htADl':function(_0x22321a,_0x30b5de,_0x17696d,_0x42061b,_0x335e69){return _0x22321a(_0x30b5de,_0x17696d,_0x42061b,_0x335e69);},'cPxgE':_0x1ef2e1(0x196),'YxpjN':_0x1ef2e1(0x1b1),'tTiDe':'none','tYyLD':_0x1ef2e1(0x1e4),'hMYFM':'round','LhADP':_0x1ef2e1(0x181),'LpasK':function(_0x48334d,_0x277e37,_0x5c3ef9){return _0x48334d(_0x277e37,_0x5c3ef9);},'fDtgA':'M12\x2020h9','eyOvr':_0x1ef2e1(0x1e1),'jGYSu':function(_0x5278fc,_0x4646d6){return _0x5278fc===_0x4646d6;},'CslWs':_0x1ef2e1(0x19d),'CzZMs':function(_0x2b1f26,_0x1be956,_0x2e3fe3,_0x30ee0c){return _0x2b1f26(_0x1be956,_0x2e3fe3,_0x30ee0c);},'zXMVm':function(_0x1e6e02,_0x3abd74,_0xbcef8f,_0xa6ddba,_0x1afc9e){return _0x1e6e02(_0x3abd74,_0xbcef8f,_0xa6ddba,_0x1afc9e);},'MJpUF':_0x1ef2e1(0x147),'cORbY':_0x1ef2e1(0x1c1),'MOsry':function(_0x309c72,_0x15ebb1,_0x40d04c){return _0x309c72(_0x15ebb1,_0x40d04c);},'Mnelg':_0x1ef2e1(0x184),'WXnkX':function(_0x2511b1,_0x255c57,_0x18fa15){return _0x2511b1(_0x255c57,_0x18fa15);},'nWKJi':_0x1ef2e1(0x152)};return h(Host,null,h('a',{'class':_0x1ef2e1(0x15b)+this[_0x1ef2e1(0x190)]+'\x20feedback-button-content--'+this[_0x1ef2e1(0x1d0)],'onClick':()=>this[_0x1ef2e1(0x1e9)]()},!this[_0x1ef2e1(0x179)]&&this['buttonStyle']===_0x26be7e['KsrfO']&&h(_0x26be7e[_0x1ef2e1(0x149)],{'class':_0x1ef2e1(0x1c0)},_0x26be7e[_0x1ef2e1(0x1a1)](h,_0x26be7e[_0x1ef2e1(0x1dc)],{'xmlns':_0x26be7e[_0x1ef2e1(0x191)],'width':'16','height':'16','viewBox':_0x1ef2e1(0x147),'fill':_0x26be7e[_0x1ef2e1(0x15a)],'stroke':_0x26be7e[_0x1ef2e1(0x14b)],'stroke-width':'2','stroke-linecap':_0x26be7e['hMYFM'],'stroke-linejoin':_0x26be7e['hMYFM'],'class':_0x26be7e[_0x1ef2e1(0x169)]},_0x26be7e[_0x1ef2e1(0x1a0)](h,_0x1ef2e1(0x1e1),{'d':_0x26be7e[_0x1ef2e1(0x177)]}),h(_0x26be7e[_0x1ef2e1(0x1d7)],{'d':_0x1ef2e1(0x184)}))),!this[_0x1ef2e1(0x179)]&&_0x26be7e['jGYSu'](this['buttonStyle'],_0x26be7e[_0x1ef2e1(0x1ca)])&&_0x26be7e[_0x1ef2e1(0x15e)](h,_0x26be7e[_0x1ef2e1(0x149)],{'class':'feedback-button-content-icon'},_0x26be7e[_0x1ef2e1(0x16d)](h,'svg',{'xmlns':_0x1ef2e1(0x1b1),'width':'16','height':'16','viewBox':_0x26be7e['MJpUF'],'fill':_0x1ef2e1(0x1c8),'stroke':_0x26be7e[_0x1ef2e1(0x15c)],'stroke-width':'2','stroke-linecap':_0x26be7e[_0x1ef2e1(0x15d)],'stroke-linejoin':_0x26be7e['hMYFM'],'class':_0x26be7e[_0x1ef2e1(0x169)]},_0x26be7e['MOsry'](h,_0x26be7e[_0x1ef2e1(0x1d7)],{'d':_0x26be7e[_0x1ef2e1(0x177)]}),_0x26be7e[_0x1ef2e1(0x1a0)](h,_0x26be7e[_0x1ef2e1(0x1d7)],{'d':_0x26be7e['Mnelg']}))),_0x26be7e[_0x1ef2e1(0x172)](h,_0x26be7e[_0x1ef2e1(0x1ce)],null)));}get['el'](){return this;}static get[_0x269984(0x1e8)](){return feedbackButtonCss;}},[0x1,_0x269984(0x1eb),{'customFont':[0x4,_0x269984(0x1c7)],'errorMessage':[0x1,'error-message'],'errorMessage403':[0x1,_0x269984(0x1b6)],'errorMessage404':[0x1,'error-message-4-0-4'],'modalTitle':[0x1,_0x269984(0x176)],'modalTitleSuccess':[0x1,_0x269984(0x19b)],'modalTitleError':[0x1,_0x269984(0x1be)],'modalPosition':[0x1,_0x269984(0x14e)],'sendButtonText':[0x1,_0x269984(0x1b4)],'successMessage':[0x1,_0x269984(0x14c)],'project':[0x1],'screenshotButtonText':[0x1,_0x269984(0x15f)],'screenshotTopbarText':[0x1,_0x269984(0x170)],'hideEmail':[0x4,_0x269984(0x1bf)],'emailAddress':[0x1,_0x269984(0x166)],'emailPlaceholder':[0x1,_0x269984(0x16a)],'messagePlaceholder':[0x1,'message-placeholder'],'hideRating':[0x4,'hide-rating'],'ratingMode':[0x1,_0x269984(0x1a6)],'ratingPlaceholder':[0x1,_0x269984(0x14d)],'ratingStarsPlaceholder':[0x1,_0x269984(0x1db)],'buttonStyle':[0x1,'button-style'],'buttonPosition':[0x1,_0x269984(0x1ae)],'hideIcon':[0x4,'hide-icon'],'hideScreenshotButton':[0x4,_0x269984(0x1df)],'hidePrivacyPolicy':[0x4,_0x269984(0x150)],'privacyPolicyText':[0x1,'privacy-policy-text'],'fetchData':[0x4,_0x269984(0x192)]}]);function defineCustomElement$1(){const _0xb18b6c=_0x269984,_0x57e7e8={'EpfwC':_0xb18b6c(0x1eb),'xfNFu':function(_0xe5ea54){return _0xe5ea54();},'PPSjs':function(_0x2ed0c9,_0x48e240){return _0x2ed0c9===_0x48e240;},'vZvtv':_0xb18b6c(0x1bb),'ffbje':'feedback-modal'};if(_0x57e7e8[_0xb18b6c(0x1e6)](typeof customElements,_0x57e7e8[_0xb18b6c(0x19e)]))return;const _0x5f28a9=[_0x57e7e8[_0xb18b6c(0x16c)],_0x57e7e8[_0xb18b6c(0x1ac)]];_0x5f28a9[_0xb18b6c(0x1d3)](_0x25672d=>{const _0x1f1fb6=_0xb18b6c;switch(_0x25672d){case _0x57e7e8['EpfwC']:!customElements['get'](_0x25672d)&&customElements[_0x1f1fb6(0x16e)](_0x25672d,FeedbackButton$1);break;case'feedback-modal':!customElements[_0x1f1fb6(0x1e7)](_0x25672d)&&_0x57e7e8[_0x1f1fb6(0x19c)](_0x39d9aa);break;}});}const FeedbackButton=FeedbackButton$1,defineCustomElement=defineCustomElement$1;export{FeedbackButton,defineCustomElement};
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './feedback-modal2.js';
|
|
3
|
+
|
|
4
|
+
const feedbackButtonCss = ".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}.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}";
|
|
5
|
+
|
|
6
|
+
const FeedbackButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.customFont = false;
|
|
12
|
+
this.errorMessage = "Please try again later.";
|
|
13
|
+
this.errorMessage403 = "The request URL does not match the one defined in PushFeedback for this project.";
|
|
14
|
+
this.errorMessage404 = "We could not find the provided project id in PushFeedback.";
|
|
15
|
+
this.modalTitle = 'Share your feedback';
|
|
16
|
+
this.modalTitleSuccess = 'Thanks for your feedback!';
|
|
17
|
+
this.modalTitleError = "Oops!";
|
|
18
|
+
this.modalPosition = 'center';
|
|
19
|
+
this.sendButtonText = 'Send';
|
|
20
|
+
this.successMessage = "";
|
|
21
|
+
this.project = '';
|
|
22
|
+
this.screenshotButtonText = 'Add a screenshot';
|
|
23
|
+
this.screenshotTopbarText = 'Select an element on this page';
|
|
24
|
+
this.hideEmail = false;
|
|
25
|
+
this.emailAddress = '';
|
|
26
|
+
this.emailPlaceholder = 'Email address (optional)';
|
|
27
|
+
this.messagePlaceholder = 'Comments';
|
|
28
|
+
this.hideRating = false;
|
|
29
|
+
this.rating = 0;
|
|
30
|
+
this.ratingMode = 'thumbs';
|
|
31
|
+
this.ratingPlaceholder = 'Was this page helpful?';
|
|
32
|
+
this.ratingStarsPlaceholder = 'How would you rate this page?';
|
|
33
|
+
this.buttonStyle = 'default';
|
|
34
|
+
this.buttonPosition = 'default';
|
|
35
|
+
this.hideIcon = false;
|
|
36
|
+
this.hideScreenshotButton = false;
|
|
37
|
+
this.hidePrivacyPolicy = true;
|
|
38
|
+
this.privacyPolicyText = "I have read and expressly consent to the terms of the <a href='https://pushfeedback.com/privacy'>Privacy Policy</a>.";
|
|
39
|
+
this.fetchData = true;
|
|
40
|
+
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
this.feedbackModal = document.createElement('feedback-modal');
|
|
43
|
+
const props = [
|
|
44
|
+
'customFont',
|
|
45
|
+
'errorMessage',
|
|
46
|
+
'errorMessage403',
|
|
47
|
+
'errorMessage404',
|
|
48
|
+
'modalTitle',
|
|
49
|
+
'modalTitleSuccess',
|
|
50
|
+
'modalTitleError',
|
|
51
|
+
'modalPosition',
|
|
52
|
+
'sendButtonText',
|
|
53
|
+
'successMessage',
|
|
54
|
+
'project',
|
|
55
|
+
'screenshotButtonText',
|
|
56
|
+
'screenshotTopbarText',
|
|
57
|
+
'hideEmail',
|
|
58
|
+
'emailAddress',
|
|
59
|
+
'emailPlaceholder',
|
|
60
|
+
'messagePlaceholder',
|
|
61
|
+
'hideRating',
|
|
62
|
+
'rating',
|
|
63
|
+
'ratingMode',
|
|
64
|
+
'ratingPlaceholder',
|
|
65
|
+
'ratingStarsPlaceholder',
|
|
66
|
+
'hideScreenshotButton',
|
|
67
|
+
'hidePrivacyPolicy',
|
|
68
|
+
'privacyPolicyText',
|
|
69
|
+
'fetchData'
|
|
70
|
+
];
|
|
71
|
+
props.forEach(prop => {
|
|
72
|
+
this.feedbackModal[prop] = this[prop];
|
|
73
|
+
});
|
|
74
|
+
document.body.appendChild(this.feedbackModal);
|
|
75
|
+
}
|
|
76
|
+
disconnectedCallback() {
|
|
77
|
+
document.body.removeChild(this.feedbackModal);
|
|
78
|
+
}
|
|
79
|
+
isSafariBrowser() {
|
|
80
|
+
const isSafari = /safari/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent);
|
|
81
|
+
return isSafari;
|
|
82
|
+
}
|
|
83
|
+
componentDidLoad() {
|
|
84
|
+
if (this.buttonPosition === 'center-right') {
|
|
85
|
+
const buttonContent = this.el.shadowRoot.querySelector('.feedback-button-content');
|
|
86
|
+
let adjustement = 0;
|
|
87
|
+
if (this.isSafariBrowser()) {
|
|
88
|
+
adjustement = 10;
|
|
89
|
+
}
|
|
90
|
+
buttonContent.style.right = `${(buttonContent.offsetWidth + adjustement) / 2 * -1}px`;
|
|
91
|
+
}
|
|
92
|
+
if (!this.customFont) {
|
|
93
|
+
this.loadInterFont();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
loadInterFont() {
|
|
97
|
+
const link = document.createElement('link');
|
|
98
|
+
link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap';
|
|
99
|
+
link.rel = 'stylesheet';
|
|
100
|
+
document.head.appendChild(link);
|
|
101
|
+
}
|
|
102
|
+
showModal() {
|
|
103
|
+
this.feedbackModal.showModal = true;
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
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 === 'dark' && (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: "feather feather-edit-3" }, 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" })))), !this.hideIcon && this.buttonStyle === 'light' && (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: "#0070F4", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "feather feather-edit-3" }, 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))));
|
|
107
|
+
}
|
|
108
|
+
get el() { return this; }
|
|
109
|
+
static get style() { return feedbackButtonCss; }
|
|
110
|
+
}, [1, "feedback-button", {
|
|
111
|
+
"customFont": [4, "custom-font"],
|
|
112
|
+
"errorMessage": [1, "error-message"],
|
|
113
|
+
"errorMessage403": [1, "error-message-4-0-3"],
|
|
114
|
+
"errorMessage404": [1, "error-message-4-0-4"],
|
|
115
|
+
"modalTitle": [1, "modal-title"],
|
|
116
|
+
"modalTitleSuccess": [1, "modal-title-success"],
|
|
117
|
+
"modalTitleError": [1, "modal-title-error"],
|
|
118
|
+
"modalPosition": [1, "modal-position"],
|
|
119
|
+
"sendButtonText": [1, "send-button-text"],
|
|
120
|
+
"successMessage": [1, "success-message"],
|
|
121
|
+
"project": [1],
|
|
122
|
+
"screenshotButtonText": [1, "screenshot-button-text"],
|
|
123
|
+
"screenshotTopbarText": [1, "screenshot-topbar-text"],
|
|
124
|
+
"hideEmail": [4, "hide-email"],
|
|
125
|
+
"emailAddress": [1, "email-address"],
|
|
126
|
+
"emailPlaceholder": [1, "email-placeholder"],
|
|
127
|
+
"messagePlaceholder": [1, "message-placeholder"],
|
|
128
|
+
"hideRating": [4, "hide-rating"],
|
|
129
|
+
"rating": [2],
|
|
130
|
+
"ratingMode": [1, "rating-mode"],
|
|
131
|
+
"ratingPlaceholder": [1, "rating-placeholder"],
|
|
132
|
+
"ratingStarsPlaceholder": [1, "rating-stars-placeholder"],
|
|
133
|
+
"buttonStyle": [1, "button-style"],
|
|
134
|
+
"buttonPosition": [1, "button-position"],
|
|
135
|
+
"hideIcon": [4, "hide-icon"],
|
|
136
|
+
"hideScreenshotButton": [4, "hide-screenshot-button"],
|
|
137
|
+
"hidePrivacyPolicy": [4, "hide-privacy-policy"],
|
|
138
|
+
"privacyPolicyText": [1, "privacy-policy-text"],
|
|
139
|
+
"fetchData": [4, "fetch-data"]
|
|
140
|
+
}]);
|
|
141
|
+
function defineCustomElement$1() {
|
|
142
|
+
if (typeof customElements === "undefined") {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const components = ["feedback-button", "feedback-modal"];
|
|
146
|
+
components.forEach(tagName => { switch (tagName) {
|
|
147
|
+
case "feedback-button":
|
|
148
|
+
if (!customElements.get(tagName)) {
|
|
149
|
+
customElements.define(tagName, FeedbackButton$1);
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case "feedback-modal":
|
|
153
|
+
if (!customElements.get(tagName)) {
|
|
154
|
+
defineCustomElement$2();
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
} });
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const FeedbackButton = FeedbackButton$1;
|
|
161
|
+
const defineCustomElement = defineCustomElement$1;
|
|
162
|
+
|
|
163
|
+
export { FeedbackButton, defineCustomElement };
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { F as FeedbackModal$1, d as defineCustomElement$1 } from './feedback-modal2.js';
|
|
2
|
+
|
|
3
|
+
const FeedbackModal = FeedbackModal$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { FeedbackModal, defineCustomElement };
|