pushfeedback 0.0.8 → 0.0.10
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 +8102 -1
- package/dist/cjs/index-d5ac8167.js +1469 -1
- 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 +343 -1
- package/dist/collection/components/feedback-modal/feedback-modal.js +520 -1
- package/dist/collection/index.js +1 -1
- package/dist/components/feedback-button.js +104 -1
- package/dist/components/feedback-modal.js +6 -1
- package/dist/components/feedback-modal2.js +8076 -1
- package/dist/components/index.js +3 -1
- package/dist/esm/feedback-button_2.entry.js +8097 -1
- package/dist/esm/index-74109694.js +1441 -1
- 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-38d135e1.js +2 -1
- package/dist/pushfeedback/p-ab8c350d.entry.js +22 -0
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/dist/types/components/feedback-modal/feedback-modal.d.ts +1 -1
- package/package.json +3 -3
- package/dist/pushfeedback/p-9ac3c49b.entry.js +0 -1
|
@@ -1 +1,104 @@
|
|
|
1
|
-
const _0x29d0c3=_0x6796;(function(_0xefb8e6,_0xbd0f86){const _0x4999df=_0x6796,_0x3c1395=_0xefb8e6();while(!![]){try{const _0x158178=-parseInt(_0x4999df(0x21e))/0x1*(parseInt(_0x4999df(0x1bc))/0x2)+-parseInt(_0x4999df(0x1fb))/0x3+-parseInt(_0x4999df(0x1de))/0x4*(parseInt(_0x4999df(0x1cc))/0x5)+-parseInt(_0x4999df(0x226))/0x6*(-parseInt(_0x4999df(0x1cf))/0x7)+parseInt(_0x4999df(0x21b))/0x8+parseInt(_0x4999df(0x1b5))/0x9*(parseInt(_0x4999df(0x1e1))/0xa)+parseInt(_0x4999df(0x220))/0xb;if(_0x158178===_0xbd0f86)break;else _0x3c1395['push'](_0x3c1395['shift']());}catch(_0x3313aa){_0x3c1395['push'](_0x3c1395['shift']());}}}(_0x3faa,0xb0db9));import{proxyCustomElement,HTMLElement,h,Host}from'@stencil/core/internal/client';function _0x6796(_0x38f729,_0x42a9ed){const _0x3faa14=_0x3faa();return _0x6796=function(_0x679650,_0x25f024){_0x679650=_0x679650-0x1b0;let _0x440ada=_0x3faa14[_0x679650];return _0x440ada;},_0x6796(_0x38f729,_0x42a9ed);}import{d as _0x217795}from'./feedback-modal2.js';const feedbackButtonCss=_0x29d0c3(0x1eb),FeedbackButton$1=proxyCustomElement(class extends HTMLElement{constructor(){const _0x418bc0=_0x29d0c3,_0x21856c={'HIzeL':'0|1|10|17|4|2|14|5|13|15|8|9|3|16|11|12|7|6','YGcRF':_0x418bc0(0x213),'ApQpV':_0x418bc0(0x1f0),'UcOxY':_0x418bc0(0x1e2),'fJXVg':_0x418bc0(0x1dc)},_0x3b1440=_0x21856c[_0x418bc0(0x205)][_0x418bc0(0x1df)]('|');let _0x2edb2f=0x0;while(!![]){switch(_0x3b1440[_0x2edb2f++]){case'0':super();continue;case'1':this[_0x418bc0(0x201)]();continue;case'2':this[_0x418bc0(0x1d7)]=_0x418bc0(0x22f);continue;case'3':this[_0x418bc0(0x1ba)]='Email\x20address\x20(optional)';continue;case'4':this[_0x418bc0(0x212)]=_0x21856c[_0x418bc0(0x1b2)];continue;case'5':this[_0x418bc0(0x20b)]=_0x418bc0(0x1b8);continue;case'6':this[_0x418bc0(0x1c1)]=![];continue;case'7':this['hideIcon']=![];continue;case'8':this[_0x418bc0(0x1d4)]='SELECT\x20AN\x20ELEMENT\x20ON\x20THE\x20PAGE';continue;case'9':this[_0x418bc0(0x1f3)]='';continue;case'10':this[_0x418bc0(0x1c0)]();continue;case'11':this[_0x418bc0(0x1b6)]=_0x418bc0(0x1fa);continue;case'12':this[_0x418bc0(0x1d6)]=_0x418bc0(0x1fa);continue;case'13':this[_0x418bc0(0x217)]='';continue;case'14':this[_0x418bc0(0x200)]=_0x418bc0(0x219);continue;case'15':this[_0x418bc0(0x1fc)]=_0x21856c[_0x418bc0(0x1b1)];continue;case'16':this['messagePlaceholder']=_0x21856c[_0x418bc0(0x21f)];continue;case'17':this['modalTitle']=_0x21856c[_0x418bc0(0x225)];continue;}break;}}[_0x29d0c3(0x1c6)](){const _0x5b96da=_0x29d0c3,_0x243208={'UFVTr':_0x5b96da(0x216),'CvImP':_0x5b96da(0x22d),'uIcEA':_0x5b96da(0x212),'pgdrf':_0x5b96da(0x1d7),'VEiVs':'modalPosition','UMRJv':_0x5b96da(0x20b),'cGCwt':'project','QNYvp':'screenshotTopbarText','CVRTV':_0x5b96da(0x1f3),'Oevqq':'emailPlaceholder','uKOyc':_0x5b96da(0x1d1)};this[_0x5b96da(0x20d)]=document[_0x5b96da(0x218)](_0x243208[_0x5b96da(0x1f2)]);const _0xb3e5cc=[_0x243208[_0x5b96da(0x22b)],_0x243208[_0x5b96da(0x22e)],_0x243208['pgdrf'],_0x243208['VEiVs'],_0x243208[_0x5b96da(0x1f9)],_0x243208['cGCwt'],'screenshotButtonTooltipText',_0x243208['QNYvp'],_0x243208[_0x5b96da(0x1e8)],_0x243208[_0x5b96da(0x1ca)],_0x243208[_0x5b96da(0x1ec)],_0x5b96da(0x1c1)];_0xb3e5cc[_0x5b96da(0x21a)](_0x3ca297=>{const _0x2bae69=_0x5b96da;this[_0x2bae69(0x20d)][_0x3ca297]=this[_0x3ca297];}),document['body'][_0x5b96da(0x1f7)](this[_0x5b96da(0x20d)]);}[_0x29d0c3(0x1e5)](){const _0x3ec6ad=_0x29d0c3;document[_0x3ec6ad(0x20e)]['removeChild'](this['feedbackModal']);}['componentDidLoad'](){const _0x5c7514=_0x29d0c3,_0x1bc2ce={'UQhLa':function(_0x3d603a,_0x2556a7){return _0x3d603a===_0x2556a7;},'IdDfb':'.feedback-button-content','Hnlft':function(_0x3544a8,_0x89d473){return _0x3544a8*_0x89d473;},'NvsvD':function(_0x614ff9,_0x3b68d8){return _0x614ff9/_0x3b68d8;}};if(_0x1bc2ce[_0x5c7514(0x1e0)](this['buttonPosition'],_0x5c7514(0x202))){const _0x56b31f=this['el'][_0x5c7514(0x222)][_0x5c7514(0x1d5)](_0x1bc2ce[_0x5c7514(0x1d3)]);_0x56b31f[_0x5c7514(0x1e6)][_0x5c7514(0x1ed)]=_0x1bc2ce[_0x5c7514(0x223)](_0x1bc2ce[_0x5c7514(0x227)](_0x56b31f[_0x5c7514(0x1e9)],0x2),-0x1)+'px';}}[_0x29d0c3(0x1ea)](){const _0x277066=_0x29d0c3;this['feedbackModal'][_0x277066(0x1ea)]=!![];}[_0x29d0c3(0x1db)](){const _0x505310=_0x29d0c3,_0x3921f3={'lpXLk':function(_0x45517c,_0x5028a7,_0x57ee77,_0xb0f136){return _0x45517c(_0x5028a7,_0x57ee77,_0xb0f136);},'lKXHy':function(_0x3cffc9,_0x3d47d3,_0x13c864,_0x1ea247,_0x287975,_0x1ca78e){return _0x3cffc9(_0x3d47d3,_0x13c864,_0x1ea247,_0x287975,_0x1ca78e);},'cNZza':function(_0xec87e1,_0x1fb1bb){return _0xec87e1===_0x1fb1bb;},'heGgC':_0x505310(0x224),'ZPGqb':_0x505310(0x1f5),'FxzqD':function(_0x46cf33,_0xb6badf,_0x1a7468,_0x3b8837,_0x320363,_0x2340f4,_0x2e328b){return _0x46cf33(_0xb6badf,_0x1a7468,_0x3b8837,_0x320363,_0x2340f4,_0x2e328b);},'Oiefx':'svg','qAGGZ':_0x505310(0x1e7),'uIoOs':_0x505310(0x204),'hcFMk':'#fff','RhtDu':_0x505310(0x1b0),'rbcoW':_0x505310(0x1d9),'hHZLz':function(_0x5e94c8,_0x2afa77,_0x417dde){return _0x5e94c8(_0x2afa77,_0x417dde);},'ptZKd':_0x505310(0x1fe),'AmmMT':_0x505310(0x211),'YoDmG':_0x505310(0x1bf),'ozyxf':'M3\x2011V9a4\x204\x200\x200\x201\x204-4h14','hlQdj':'7\x2023\x203\x2019\x207\x2015','wdLFr':_0x505310(0x1cd),'xCLtw':function(_0x1680e9,_0x533d9e){return _0x1680e9===_0x533d9e;},'leikI':_0x505310(0x203),'uWzMe':function(_0x32c3df,_0x54343c,_0x4bb636,_0x2f87db){return _0x32c3df(_0x54343c,_0x4bb636,_0x2f87db);},'alNhx':_0x505310(0x208),'QwGHW':'http://www.w3.org/2000/svg','SaEbw':_0x505310(0x230),'krdfU':function(_0x271048,_0x59f950,_0x4a2753){return _0x271048(_0x59f950,_0x4a2753);}};return _0x3921f3[_0x505310(0x1e3)](h,Host,null,_0x3921f3[_0x505310(0x21c)](h,'a',{'class':_0x505310(0x1f6)+this['buttonStyle']+_0x505310(0x228)+this[_0x505310(0x1d6)],'onClick':()=>this[_0x505310(0x1ea)]()},!this[_0x505310(0x1b7)]&&_0x3921f3[_0x505310(0x207)](this[_0x505310(0x1b6)],_0x3921f3[_0x505310(0x1c2)])&&h(_0x3921f3[_0x505310(0x1dd)],{'class':'feedback-button-content-icon'},_0x3921f3[_0x505310(0x20c)](h,_0x3921f3[_0x505310(0x1ce)],{'xmlns':_0x505310(0x214),'width':'16','height':'16','viewBox':_0x3921f3[_0x505310(0x210)],'fill':_0x3921f3[_0x505310(0x1f8)],'stroke':_0x3921f3[_0x505310(0x229)],'stroke-width':'2','stroke-linecap':_0x3921f3[_0x505310(0x1fd)],'stroke-linejoin':_0x505310(0x1b0),'class':_0x3921f3[_0x505310(0x1e4)]},_0x3921f3['hHZLz'](h,_0x3921f3[_0x505310(0x1b4)],{'points':_0x3921f3[_0x505310(0x1be)]}),_0x3921f3[_0x505310(0x1cb)](h,_0x3921f3['YoDmG'],{'d':_0x3921f3[_0x505310(0x206)]}),_0x3921f3[_0x505310(0x1cb)](h,_0x3921f3['ptZKd'],{'points':_0x3921f3[_0x505310(0x1c5)]}),_0x3921f3[_0x505310(0x1cb)](h,'path',{'d':_0x3921f3[_0x505310(0x22c)]}))),!this[_0x505310(0x1b7)]&&_0x3921f3[_0x505310(0x1bb)](this['buttonStyle'],_0x3921f3[_0x505310(0x1ef)])&&_0x3921f3['uWzMe'](h,_0x505310(0x1f5),{'class':_0x3921f3[_0x505310(0x1d2)]},h('svg',{'xmlns':_0x3921f3[_0x505310(0x1b3)],'width':'16','height':'16','viewBox':_0x3921f3[_0x505310(0x210)],'fill':_0x3921f3[_0x505310(0x1f8)],'stroke':_0x3921f3[_0x505310(0x1bd)],'stroke-width':'2','stroke-linecap':_0x3921f3[_0x505310(0x1fd)],'stroke-linejoin':_0x3921f3[_0x505310(0x1fd)],'class':_0x3921f3['rbcoW']},_0x3921f3[_0x505310(0x1cb)](h,_0x3921f3[_0x505310(0x1b4)],{'points':_0x3921f3[_0x505310(0x1be)]}),h(_0x3921f3[_0x505310(0x22a)],{'d':_0x3921f3['ozyxf']}),_0x3921f3['hHZLz'](h,_0x3921f3[_0x505310(0x1b4)],{'points':_0x3921f3['hlQdj']}),h(_0x3921f3[_0x505310(0x22a)],{'d':_0x3921f3[_0x505310(0x22c)]}))),_0x3921f3[_0x505310(0x1da)](h,_0x505310(0x1c9),null)));}get['el'](){return this;}static get[_0x29d0c3(0x1e6)](){return feedbackButtonCss;}},[0x1,_0x29d0c3(0x1c4),{'modalTitle':[0x1,_0x29d0c3(0x20f)],'successModalTitle':[0x1,'success-modal-title'],'errorModalTitle':[0x1,_0x29d0c3(0x1f1)],'modalPosition':[0x1,_0x29d0c3(0x21d)],'sendButtonText':[0x1,_0x29d0c3(0x215)],'project':[0x1],'screenshotButtonTooltipText':[0x1,_0x29d0c3(0x1d8)],'screenshotTopbarText':[0x1,'screenshot-topbar-text'],'email':[0x1],'emailPlaceholder':[0x1,_0x29d0c3(0x1c7)],'messagePlaceholder':[0x1,_0x29d0c3(0x1c8)],'buttonStyle':[0x1,_0x29d0c3(0x1d0)],'buttonPosition':[0x1,_0x29d0c3(0x1b9)],'hideIcon':[0x4,_0x29d0c3(0x1ee)],'hideScreenshotButton':[0x4,_0x29d0c3(0x1ff)]}]);function defineCustomElement$1(){const _0x2f8121=_0x29d0c3,_0x202301={'wFwDl':'feedback-button','SEFCh':_0x2f8121(0x216),'ZCMSM':function(_0x1f667a){return _0x1f667a();},'usSoc':function(_0x332595,_0x21b630){return _0x332595===_0x21b630;},'zPaIk':'undefined'};if(_0x202301['usSoc'](typeof customElements,_0x202301[_0x2f8121(0x209)]))return;const _0x5cac60=[_0x202301['wFwDl'],_0x202301[_0x2f8121(0x1f4)]];_0x5cac60[_0x2f8121(0x21a)](_0x12eb3e=>{const _0x57d11d=_0x2f8121;switch(_0x12eb3e){case _0x202301[_0x57d11d(0x20a)]:!customElements[_0x57d11d(0x231)](_0x12eb3e)&&customElements[_0x57d11d(0x1c3)](_0x12eb3e,FeedbackButton$1);break;case _0x202301[_0x57d11d(0x1f4)]:!customElements[_0x57d11d(0x231)](_0x12eb3e)&&_0x202301[_0x57d11d(0x221)](_0x217795);break;}});}function _0x3faa(){const _0x4a4b3d=['split','UQhLa','557110kwYAKq','How\x20could\x20this\x20page\x20be\x20more\x20helpful?','lpXLk','rbcoW','disconnectedCallback','style','0\x200\x2024\x2024','CVRTV','offsetWidth','showModal','.feedback-button-content{cursor:pointer;z-index:300}.feedback-button-content--light{align-items:center;background-color:var(--feedback-white-color);border-radius:20px;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;display:flex;font-family:var(--feedback-font-family);color:var(--feedback-primary-color);font-weight:bold;padding:8px\x2015px;font-size:var(--feedback-text-font-size)}.feedback-button-content--dark{align-items:center;background-color:var(--feedback-primary-color);border-radius:20px;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;display:flex;font-family:var(--feedback-font-family);color:var(--feedback-white-color);font-weight:bold;padding:8px\x2015px;font-size:16px}.feedback-button-content--bottom-right{position:fixed;bottom:10px;right:10px}.feedback-button-content--center-right{position:fixed;top:50%;transform:rotate(-90deg)\x20translateY(-50%)}.feedback-button-content--center-right.feedback-button-content--dark,.feedback-button-content--center-right.feedback-button-content--light{border-radius:4px;border-bottom-right-radius:0px;border-bottom-left-radius:0px}.feedback-button-content-icon{margin-right:5px;height:16px;width:16px}','uKOyc','right','hide-icon','leikI','Take\x20a\x20Screenshot','error-modal-title','UFVTr','email','SEFCh','span','feedback-button-content\x20feedback-button-content--','appendChild','uIoOs','UMRJv','default','4231530BBPAHI','screenshotButtonTooltipText','RhtDu','polyline','hide-screenshot-button','modalPosition','__registerHost','center-right','light','none','HIzeL','ozyxf','cNZza','feedback-button-content-icon','zPaIk','wFwDl','sendButtonText','FxzqD','feedbackModal','body','modal-title','qAGGZ','17\x201\x2021\x205\x2017\x209','successModalTitle','Thanks\x20for\x20your\x20feedback!','http://www.w3.org/2000/svg','send-button-text','feedback-modal','project','createElement','center','forEach','9246680QOTiaU','lKXHy','modal-position','11THtkCz','UcOxY','2324058zLSmmT','ZCMSM','shadowRoot','Hnlft','dark','fJXVg','5334870MHUrHe','NvsvD','\x20feedback-button-content--','hcFMk','YoDmG','CvImP','wdLFr','modalTitle','uIcEA','Oops!\x20We\x20didn\x27t\x20receive\x20your\x20feedback.\x20Please\x20try\x20again\x20later.','#0070F4','get','round','ApQpV','YGcRF','QwGHW','ptZKd','135Raymze','buttonStyle','hideIcon','Send','button-position','emailPlaceholder','xCLtw','4030KrkxiQ','SaEbw','AmmMT','path','__attachShadow','hideScreenshotButton','heGgC','define','feedback-button','hlQdj','connectedCallback','email-placeholder','message-placeholder','slot','Oevqq','hHZLz','45LXkzSi','M21\x2013v2a4\x204\x200\x200\x201-4\x204H3','Oiefx','7dEBnKb','button-style','messagePlaceholder','alNhx','IdDfb','screenshotTopbarText','querySelector','buttonPosition','errorModalTitle','screenshot-button-tooltip-text','feather\x20feather-repeat','krdfU','render','Share\x20your\x20feedback','ZPGqb','415484DrKyxK'];_0x3faa=function(){return _0x4a4b3d;};return _0x3faa();}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;z-index:300}.feedback-button-content--light{align-items:center;background-color:var(--feedback-white-color);border-radius:20px;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;display:flex;font-family:var(--feedback-font-family);color:var(--feedback-primary-color);font-weight:bold;padding:8px 15px;font-size:var(--feedback-text-font-size)}.feedback-button-content--dark{align-items:center;background-color:var(--feedback-primary-color);border-radius:20px;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;display:flex;font-family:var(--feedback-font-family);color:var(--feedback-white-color);font-weight:bold;padding:8px 15px;font-size:16px}.feedback-button-content--bottom-right{position:fixed;bottom:10px;right:10px}.feedback-button-content--center-right{position:fixed;top:50%;transform:rotate(-90deg) translateY(-50%)}.feedback-button-content--center-right.feedback-button-content--dark,.feedback-button-content--center-right.feedback-button-content--light{border-radius:4px;border-bottom-right-radius:0px;border-bottom-left-radius:0px}.feedback-button-content-icon{margin-right:5px;height:16px;width:16px}";
|
|
5
|
+
|
|
6
|
+
const FeedbackButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.__attachShadow();
|
|
11
|
+
this.modalTitle = 'Share your feedback';
|
|
12
|
+
this.successModalTitle = 'Thanks for your feedback!';
|
|
13
|
+
this.errorModalTitle = "Oops! We didn't receive your feedback. Please try again later.";
|
|
14
|
+
this.modalPosition = 'center';
|
|
15
|
+
this.sendButtonText = 'Send';
|
|
16
|
+
this.project = '';
|
|
17
|
+
this.screenshotButtonTooltipText = 'Take a Screenshot';
|
|
18
|
+
this.screenshotTopbarText = 'SELECT AN ELEMENT ON THE PAGE';
|
|
19
|
+
this.email = '';
|
|
20
|
+
this.emailPlaceholder = 'Email address (optional)';
|
|
21
|
+
this.messagePlaceholder = 'How could this page be more helpful?';
|
|
22
|
+
this.buttonStyle = 'default';
|
|
23
|
+
this.buttonPosition = 'default';
|
|
24
|
+
this.hideIcon = false;
|
|
25
|
+
this.hideScreenshotButton = false;
|
|
26
|
+
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
this.feedbackModal = document.createElement('feedback-modal');
|
|
29
|
+
const props = [
|
|
30
|
+
'modalTitle',
|
|
31
|
+
'successModalTitle',
|
|
32
|
+
'errorModalTitle',
|
|
33
|
+
'modalPosition',
|
|
34
|
+
'sendButtonText',
|
|
35
|
+
'project',
|
|
36
|
+
'screenshotButtonTooltipText',
|
|
37
|
+
'screenshotTopbarText',
|
|
38
|
+
'email',
|
|
39
|
+
'emailPlaceholder',
|
|
40
|
+
'messagePlaceholder',
|
|
41
|
+
'hideScreenshotButton'
|
|
42
|
+
];
|
|
43
|
+
props.forEach(prop => {
|
|
44
|
+
this.feedbackModal[prop] = this[prop];
|
|
45
|
+
});
|
|
46
|
+
document.body.appendChild(this.feedbackModal);
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
document.body.removeChild(this.feedbackModal);
|
|
50
|
+
}
|
|
51
|
+
componentDidLoad() {
|
|
52
|
+
if (this.buttonPosition === 'center-right') {
|
|
53
|
+
const buttonContent = this.el.shadowRoot.querySelector('.feedback-button-content');
|
|
54
|
+
buttonContent.style.right = `${buttonContent.offsetWidth / 2 * -1}px`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
showModal() {
|
|
58
|
+
this.feedbackModal.showModal = true;
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
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-repeat" }, h("polyline", { points: "17 1 21 5 17 9" }), h("path", { d: "M3 11V9a4 4 0 0 1 4-4h14" }), h("polyline", { points: "7 23 3 19 7 15" }), h("path", { d: "M21 13v2a4 4 0 0 1-4 4H3" })))), !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-repeat" }, h("polyline", { points: "17 1 21 5 17 9" }), h("path", { d: "M3 11V9a4 4 0 0 1 4-4h14" }), h("polyline", { points: "7 23 3 19 7 15" }), h("path", { d: "M21 13v2a4 4 0 0 1-4 4H3" })))), h("slot", null))));
|
|
62
|
+
}
|
|
63
|
+
get el() { return this; }
|
|
64
|
+
static get style() { return feedbackButtonCss; }
|
|
65
|
+
}, [1, "feedback-button", {
|
|
66
|
+
"modalTitle": [1, "modal-title"],
|
|
67
|
+
"successModalTitle": [1, "success-modal-title"],
|
|
68
|
+
"errorModalTitle": [1, "error-modal-title"],
|
|
69
|
+
"modalPosition": [1, "modal-position"],
|
|
70
|
+
"sendButtonText": [1, "send-button-text"],
|
|
71
|
+
"project": [1],
|
|
72
|
+
"screenshotButtonTooltipText": [1, "screenshot-button-tooltip-text"],
|
|
73
|
+
"screenshotTopbarText": [1, "screenshot-topbar-text"],
|
|
74
|
+
"email": [1],
|
|
75
|
+
"emailPlaceholder": [1, "email-placeholder"],
|
|
76
|
+
"messagePlaceholder": [1, "message-placeholder"],
|
|
77
|
+
"buttonStyle": [1, "button-style"],
|
|
78
|
+
"buttonPosition": [1, "button-position"],
|
|
79
|
+
"hideIcon": [4, "hide-icon"],
|
|
80
|
+
"hideScreenshotButton": [4, "hide-screenshot-button"]
|
|
81
|
+
}]);
|
|
82
|
+
function defineCustomElement$1() {
|
|
83
|
+
if (typeof customElements === "undefined") {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const components = ["feedback-button", "feedback-modal"];
|
|
87
|
+
components.forEach(tagName => { switch (tagName) {
|
|
88
|
+
case "feedback-button":
|
|
89
|
+
if (!customElements.get(tagName)) {
|
|
90
|
+
customElements.define(tagName, FeedbackButton$1);
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case "feedback-modal":
|
|
94
|
+
if (!customElements.get(tagName)) {
|
|
95
|
+
defineCustomElement$2();
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
} });
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const FeedbackButton = FeedbackButton$1;
|
|
102
|
+
const defineCustomElement = defineCustomElement$1;
|
|
103
|
+
|
|
104
|
+
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 };
|