pushfeedback 0.0.8 → 0.0.9
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 +1049 -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 +529 -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 +1023 -1
- package/dist/components/index.js +3 -1
- package/dist/esm/feedback-button_2.entry.js +1044 -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-09647793.entry.js +1 -0
- package/dist/pushfeedback/p-38d135e1.js +2 -1
- package/dist/pushfeedback/pushfeedback.esm.js +1 -1
- package/package.json +2 -2
- package/dist/pushfeedback/p-9ac3c49b.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-d5ac8167.js');
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
const patchEsm = () => {
|
|
11
|
+
return index.promiseResolve();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const defineCustomElements = (win, options) => {
|
|
15
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
+
return patchEsm().then(() => {
|
|
17
|
+
return index.bootstrapLazy([["feedback-button_2.cjs",[[1,"feedback-button",{"modalTitle":[1,"modal-title"],"successModalTitle":[1,"success-modal-title"],"errorModalTitle":[1,"error-modal-title"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"project":[1],"screenshotButtonTooltipText":[1,"screenshot-button-tooltip-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"email":[1],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"]}],[1,"feedback-modal",{"modalTitle":[1,"modal-title"],"modalTitleSuccess":[1,"modal-title-success"],"modalTitleError":[1,"modal-title-error"],"modalTitleError403":[1,"modal-title-error-4-0-3"],"modalTitleError404":[1,"modal-title-error-4-0-4"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"project":[1],"screenshotButtonTooltipText":[1,"screenshot-button-tooltip-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"email":[1],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"showModal":[1540,"show-modal"],"showScreenshotMode":[1540,"show-screenshot-mode"],"hasSelectedElement":[1540,"has-selected-element"],"hideScreenshotButton":[4,"hide-screenshot-button"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32]}]]]], options);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.setNonce = index.setNonce;
|
|
22
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-d5ac8167.js');
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
const patchBrowser = () => {
|
|
11
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('pushfeedback.cjs.js', document.baseURI).href));
|
|
12
|
+
const opts = {};
|
|
13
|
+
if (importMeta !== '') {
|
|
14
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
15
|
+
}
|
|
16
|
+
return index.promiseResolve(opts);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
patchBrowser().then(options => {
|
|
20
|
+
return index.bootstrapLazy([["feedback-button_2.cjs",[[1,"feedback-button",{"modalTitle":[1,"modal-title"],"successModalTitle":[1,"success-modal-title"],"errorModalTitle":[1,"error-modal-title"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"project":[1],"screenshotButtonTooltipText":[1,"screenshot-button-tooltip-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"email":[1],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"buttonStyle":[1,"button-style"],"buttonPosition":[1,"button-position"],"hideIcon":[4,"hide-icon"],"hideScreenshotButton":[4,"hide-screenshot-button"]}],[1,"feedback-modal",{"modalTitle":[1,"modal-title"],"modalTitleSuccess":[1,"modal-title-success"],"modalTitleError":[1,"modal-title-error"],"modalTitleError403":[1,"modal-title-error-4-0-3"],"modalTitleError404":[1,"modal-title-error-4-0-4"],"modalPosition":[1,"modal-position"],"sendButtonText":[1,"send-button-text"],"project":[1],"screenshotButtonTooltipText":[1,"screenshot-button-tooltip-text"],"screenshotTopbarText":[1,"screenshot-topbar-text"],"email":[1],"emailPlaceholder":[1,"email-placeholder"],"messagePlaceholder":[1,"message-placeholder"],"showModal":[1540,"show-modal"],"showScreenshotMode":[1540,"show-screenshot-mode"],"hasSelectedElement":[1540,"has-selected-element"],"hideScreenshotButton":[4,"hide-screenshot-button"],"sending":[32],"formMessage":[32],"formEmail":[32],"formSuccess":[32],"formError":[32],"formErrorStatus":[32],"encodedScreenshot":[32]}]]]], options);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
exports.setNonce = index.setNonce;
|
|
@@ -1 +1,343 @@
|
|
|
1
|
-
function _0x5a2f(){const _0x7e78ff=['mMAby','oEJLi','ryjdL','quRWx','originalStyleUrls','center-right','style','2420opyNUp','slot','success-modal-title','CDgPy','feather\x20feather-repeat','fWlzc','atyiX','buttonPosition','1048NKJAkL','SGnnB','offsetWidth','aGjrE','\x27Send\x27','ylnsE','EcDpH','UFIyU','showModal','tFzGx','screenshotTopbarText','Oops!\x20We\x20didn\x27t\x20receive\x20your\x20feedback.\x20Please\x20try\x20again\x20later.','How\x20could\x20this\x20page\x20be\x20more\x20helpful?','aTRpk','button-style','TahTO','wPmVm','ENZbm','feedback-button.css','successModalTitle','errorModalTitle','dCWmI','screenshot-button-tooltip-text','forEach','hGivo','XvJmG','RcddG','\x27SELECT\x20AN\x20ELEMENT\x20ON\x20THE\x20PAGE\x27','polyline','feedbackModal','66303sXTGnK','nIiFj','split','DzYxQ','Hbfre','encapsulation','cMvjj','default','center','KyePs','querySelector','wrzyt','\x22Oops!\x20We\x20didn\x27t\x20receive\x20your\x20feedback.\x20Please\x20try\x20again\x20later.\x22','project','XYXVS','emailPlaceholder','dhhSP','bNKhv','woayK','buttonStyle','\x27default\x27','hide-icon','879954tFbXDO','wshcF','jUqiJ','span','YvzhK','Email\x20address\x20(optional)','CrwtD','disconnectedCallback','\x27How\x20could\x20this\x20page\x20be\x20more\x20helpful?\x27','hrsTN','mLYnO','529992YVWqqb','HiTJv','Send','LrxGH','0\x200\x2024\x2024','Share\x20your\x20feedback','styleUrls','M21\x2013v2a4\x204\x200\x200\x201-4\x204H3','Pviey','screenshotButtonTooltipText','modal-title','HAGQZ','round','shadow','feedback-button-content\x20feedback-button-content--','\x27Thanks\x20for\x20your\x20feedback!\x27','modalPosition','vkRJm','alDqK','jalXv','button-position','email','feedback-button','properties','ZCbxH','471jGYzdk','modalTitle','6|4|3|7|10|2|5|9|8|13|14|0|1|12|11','shadowRoot','elementRef','NmNYH','OSCST','hide-screenshot-button','light','svg','#fff','937685bYcAQC','581350gkuZMp','connectedCallback','M3\x2011V9a4\x204\x200\x200\x201\x204-4h14','NzDGw','messagePlaceholder','feedback-button-content-icon','false','sendButtonText','AOetr','VJCiG','65624nzwBfN','none','dSFxc','error-modal-title','removeChild','KAQZT','modal-position','body','hideScreenshotButton','.feedback-button-content','SEPxi','aphCW','Hzfxw','email-placeholder','hideIcon','path','createElement','string','boolean'];_0x5a2f=function(){return _0x7e78ff;};return _0x5a2f();}const _0x99c22a=_0x6a2c;(function(_0x477014,_0x264476){const _0x184974=_0x6a2c,_0x3f54b0=_0x477014();while(!![]){try{const _0x4e1918=-parseInt(_0x184974(0x135))/0x1+-parseInt(_0x184974(0x14f))/0x2*(parseInt(_0x184974(0x11f))/0x3)+-parseInt(_0x184974(0x106))/0x4+-parseInt(_0x184974(0x12a))/0x5+-parseInt(_0x184974(0xfb))/0x6+-parseInt(_0x184974(0x12b))/0x7+parseInt(_0x184974(0xc7))/0x8*(parseInt(_0x184974(0xe5))/0x9);if(_0x4e1918===_0x264476)break;else _0x3f54b0['push'](_0x3f54b0['shift']());}catch(_0x477a67){_0x3f54b0['push'](_0x3f54b0['shift']());}}}(_0x5a2f,0x26ffb));function _0x6a2c(_0x3c9dab,_0x14ecab){const _0x5a2fac=_0x5a2f();return _0x6a2c=function(_0x6a2c0e,_0x53bee5){_0x6a2c0e=_0x6a2c0e-0xc3;let _0x11db6b=_0x5a2fac[_0x6a2c0e];return _0x11db6b;},_0x6a2c(_0x3c9dab,_0x14ecab);}import{Host,h}from'@stencil/core';export class FeedbackButton{constructor(){const _0x2e8e29=_0x6a2c,_0x2c57be={'KyePs':_0x2e8e29(0x121),'hNJhi':_0x2e8e29(0xec),'aTRpk':_0x2e8e29(0xd2),'ZCbxH':'Take\x20a\x20Screenshot','dhhSP':_0x2e8e29(0x10b),'dCWmI':_0x2e8e29(0xed),'SGnnB':'SELECT\x20AN\x20ELEMENT\x20ON\x20THE\x20PAGE','VJCiG':_0x2e8e29(0x108),'mMAby':_0x2e8e29(0xd3)},_0x2258d9=_0x2c57be[_0x2e8e29(0xee)][_0x2e8e29(0xe7)]('|');let _0x1b3e7c=0x0;while(!![]){switch(_0x2258d9[_0x1b3e7c++]){case'0':this[_0x2e8e29(0xf8)]=_0x2c57be['hNJhi'];continue;case'1':this['buttonPosition']=_0x2c57be['hNJhi'];continue;case'2':this[_0x2e8e29(0xf2)]='';continue;case'3':this['errorModalTitle']=_0x2c57be[_0x2e8e29(0xd4)];continue;case'4':this[_0x2e8e29(0xda)]='Thanks\x20for\x20your\x20feedback!';continue;case'5':this[_0x2e8e29(0x10f)]=_0x2c57be[_0x2e8e29(0x11e)];continue;case'6':this['modalTitle']=_0x2c57be[_0x2e8e29(0xf5)];continue;case'7':this[_0x2e8e29(0x116)]=_0x2c57be[_0x2e8e29(0xdc)];continue;case'8':this['email']='';continue;case'9':this[_0x2e8e29(0xd1)]=_0x2c57be[_0x2e8e29(0xc8)];continue;case'10':this[_0x2e8e29(0x132)]=_0x2c57be[_0x2e8e29(0x134)];continue;case'11':this[_0x2e8e29(0x13d)]=![];continue;case'12':this['hideIcon']=![];continue;case'13':this['emailPlaceholder']=_0x2e8e29(0x100);continue;case'14':this['messagePlaceholder']=_0x2c57be[_0x2e8e29(0x148)];continue;}break;}}[_0x99c22a(0x12c)](){const _0x399f1b=_0x99c22a,_0x469776={'ovkTL':'feedback-modal','tFzGx':_0x399f1b(0xdb),'FqIbI':_0x399f1b(0x116),'aphCW':'sendButtonText','aGjrE':'project','ToZEc':'screenshotTopbarText','Pviey':_0x399f1b(0x11b),'fFXUq':_0x399f1b(0xf4),'wPmVm':_0x399f1b(0x12f),'wrzyt':_0x399f1b(0x13d)};this[_0x399f1b(0xe4)]=document[_0x399f1b(0x145)](_0x469776['ovkTL']);const _0x475dc7=[_0x399f1b(0x120),_0x399f1b(0xda),_0x469776[_0x399f1b(0xd0)],_0x469776['FqIbI'],_0x469776[_0x399f1b(0x140)],_0x469776[_0x399f1b(0xca)],_0x399f1b(0x10f),_0x469776['ToZEc'],_0x469776[_0x399f1b(0x10e)],_0x469776['fFXUq'],_0x469776[_0x399f1b(0xd7)],_0x469776[_0x399f1b(0xf0)]];_0x475dc7[_0x399f1b(0xde)](_0x36726f=>{const _0x346be9=_0x399f1b;this[_0x346be9(0xe4)][_0x36726f]=this[_0x36726f];}),document[_0x399f1b(0x13c)]['appendChild'](this[_0x399f1b(0xe4)]);}[_0x99c22a(0x102)](){const _0x345476=_0x99c22a;document[_0x345476(0x13c)][_0x345476(0x139)](this[_0x345476(0xe4)]);}['componentDidLoad'](){const _0x4d4fef=_0x99c22a,_0xe4fa83={'ZCpkK':_0x4d4fef(0x14d),'CDgPy':function(_0x26ec01,_0x3a86a5){return _0x26ec01*_0x3a86a5;},'noYLB':function(_0x1a2c68,_0x1d87f6){return _0x1a2c68/_0x1d87f6;}};if(this['buttonPosition']===_0xe4fa83['ZCpkK']){const _0x151f85=this['el'][_0x4d4fef(0x122)][_0x4d4fef(0xef)](_0x4d4fef(0x13e));_0x151f85[_0x4d4fef(0x14e)]['right']=_0xe4fa83[_0x4d4fef(0x152)](_0xe4fa83['noYLB'](_0x151f85[_0x4d4fef(0xc9)],0x2),-0x1)+'px';}}[_0x99c22a(0xcf)](){const _0x21aa0a=_0x99c22a;this[_0x21aa0a(0xe4)][_0x21aa0a(0xcf)]=!![];}['render'](){const _0x4e8cd4=_0x99c22a,_0x4f6133={'UFIyU':function(_0x21af29,_0x2cb646){return _0x21af29===_0x2cb646;},'hGivo':'dark','vlZdz':function(_0x1e692a,_0x5921e2,_0x315ea8,_0x5955af){return _0x1e692a(_0x5921e2,_0x315ea8,_0x5955af);},'KAQZT':_0x4e8cd4(0xfe),'quRWx':'feedback-button-content-icon','NzDGw':function(_0x5decf3,_0x4473ce,_0x3d86b4,_0xa86a3,_0x43fe8a,_0x350f97,_0x486d33){return _0x5decf3(_0x4473ce,_0x3d86b4,_0xa86a3,_0x43fe8a,_0x350f97,_0x486d33);},'MVSEA':'http://www.w3.org/2000/svg','jalXv':_0x4e8cd4(0x10a),'RcddG':_0x4e8cd4(0x136),'SEPxi':_0x4e8cd4(0x129),'wshcF':'round','OSCST':_0x4e8cd4(0xc3),'Hzfxw':function(_0x3e0a58,_0x2a34dc,_0x10ef0f){return _0x3e0a58(_0x2a34dc,_0x10ef0f);},'CrwtD':'17\x201\x2021\x205\x2017\x209','jaSmv':'path','HAGQZ':_0x4e8cd4(0x12d),'XvJmG':function(_0x78e83e,_0x3228c8,_0x5f2771){return _0x78e83e(_0x3228c8,_0x5f2771);},'jUqiJ':_0x4e8cd4(0xe3),'ulIct':'7\x2023\x203\x2019\x207\x2015','fWlzc':_0x4e8cd4(0x10d),'LrxGH':_0x4e8cd4(0x127),'YvzhK':_0x4e8cd4(0x128),'hrsTN':function(_0x35ab6b,_0x10a608,_0xe59948){return _0x35ab6b(_0x10a608,_0xe59948);},'dSFxc':function(_0x19b0fa,_0x4bc311,_0x2f4515){return _0x19b0fa(_0x4bc311,_0x2f4515);},'lvblW':function(_0x920510,_0x5e3536,_0x422da8){return _0x920510(_0x5e3536,_0x422da8);},'ryjdL':_0x4e8cd4(0x150)};return h(Host,null,h('a',{'class':_0x4e8cd4(0x114)+this[_0x4e8cd4(0xf8)]+'\x20feedback-button-content--'+this[_0x4e8cd4(0xc6)],'onClick':()=>this[_0x4e8cd4(0xcf)]()},!this[_0x4e8cd4(0x143)]&&_0x4f6133[_0x4e8cd4(0xce)](this['buttonStyle'],_0x4f6133[_0x4e8cd4(0xdf)])&&_0x4f6133['vlZdz'](h,_0x4f6133[_0x4e8cd4(0x13a)],{'class':_0x4f6133[_0x4e8cd4(0x14b)]},_0x4f6133[_0x4e8cd4(0x12e)](h,_0x4e8cd4(0x128),{'xmlns':_0x4f6133['MVSEA'],'width':'16','height':'16','viewBox':_0x4f6133[_0x4e8cd4(0x119)],'fill':_0x4f6133[_0x4e8cd4(0xe1)],'stroke':_0x4f6133[_0x4e8cd4(0x13f)],'stroke-width':'2','stroke-linecap':_0x4f6133[_0x4e8cd4(0xfc)],'stroke-linejoin':_0x4f6133['wshcF'],'class':_0x4f6133[_0x4e8cd4(0x125)]},_0x4f6133['Hzfxw'](h,'polyline',{'points':_0x4f6133[_0x4e8cd4(0x101)]}),_0x4f6133[_0x4e8cd4(0x141)](h,_0x4f6133['jaSmv'],{'d':_0x4f6133[_0x4e8cd4(0x111)]}),_0x4f6133[_0x4e8cd4(0xe0)](h,_0x4f6133['jUqiJ'],{'points':_0x4f6133['ulIct']}),_0x4f6133['XvJmG'](h,_0x4f6133['jaSmv'],{'d':_0x4f6133['fWlzc']}))),!this[_0x4e8cd4(0x143)]&&this[_0x4e8cd4(0xf8)]===_0x4f6133[_0x4e8cd4(0x109)]&&h(_0x4f6133[_0x4e8cd4(0x13a)],{'class':_0x4e8cd4(0x130)},_0x4f6133[_0x4e8cd4(0x12e)](h,_0x4f6133[_0x4e8cd4(0xff)],{'xmlns':_0x4f6133['MVSEA'],'width':'16','height':'16','viewBox':'0\x200\x2024\x2024','fill':_0x4e8cd4(0x136),'stroke':'#0070F4','stroke-width':'2','stroke-linecap':_0x4e8cd4(0x112),'stroke-linejoin':_0x4e8cd4(0x112),'class':_0x4f6133[_0x4e8cd4(0x125)]},_0x4f6133[_0x4e8cd4(0x104)](h,_0x4f6133[_0x4e8cd4(0xfd)],{'points':_0x4f6133['CrwtD']}),_0x4f6133[_0x4e8cd4(0x137)](h,_0x4f6133['jaSmv'],{'d':_0x4e8cd4(0x12d)}),h(_0x4e8cd4(0xe3),{'points':_0x4f6133['ulIct']}),h(_0x4e8cd4(0x144),{'d':_0x4f6133[_0x4e8cd4(0xc4)]}))),_0x4f6133['lvblW'](h,_0x4f6133[_0x4e8cd4(0x14a)],null)));}static get['is'](){const _0x29ed39=_0x99c22a,_0x2d6535={'ENZbm':_0x29ed39(0x11c)};return _0x2d6535[_0x29ed39(0xd8)];}static get[_0x99c22a(0xea)](){const _0x14c2d1=_0x99c22a,_0x409f19={'YBZPt':_0x14c2d1(0x113)};return _0x409f19['YBZPt'];}static get[_0x99c22a(0x14c)](){const _0x3b9551=_0x99c22a,_0x3edce7={'XnBwN':_0x3b9551(0xd9)};return{'$':[_0x3edce7['XnBwN']]};}static get[_0x99c22a(0x10c)](){const _0x4d42ed=_0x99c22a,_0x53bd64={'vkRJm':_0x4d42ed(0xd9)};return{'$':[_0x53bd64[_0x4d42ed(0x117)]]};}static get[_0x99c22a(0x11d)](){const _0xd3fe25=_0x99c22a,_0x588636={'HiTJv':_0xd3fe25(0x146),'XYXVS':'\x27Share\x20your\x20feedback\x27','NmNYH':_0xd3fe25(0x115),'XjNLv':_0xd3fe25(0x138),'Hbfre':_0xd3fe25(0x13b),'mLYnO':'\x27center\x27','WYngr':'send-button-text','TahTO':_0xd3fe25(0xcb),'woayK':_0xd3fe25(0xf2),'npnGe':_0xd3fe25(0xdd),'EcDpH':'\x27Take\x20a\x20Screenshot\x27','bNKhv':_0xd3fe25(0xe2),'alDqK':_0xd3fe25(0x11b),'PxSUk':_0xd3fe25(0x142),'DzYxQ':'\x27Email\x20address\x20(optional)\x27','SYXZr':'message-placeholder','ylnsE':_0xd3fe25(0xd5),'nIiFj':_0xd3fe25(0xf9),'cMvjj':_0xd3fe25(0x11a),'oEJLi':_0xd3fe25(0x147),'AOetr':_0xd3fe25(0xfa),'atyiX':_0xd3fe25(0x131),'pHeCt':_0xd3fe25(0x126)};return{'modalTitle':{'type':_0x588636[_0xd3fe25(0x107)],'mutable':![],'complexType':{'original':_0xd3fe25(0x146),'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0xd3fe25(0x110),'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xf3)]},'successModalTitle':{'type':_0x588636['HiTJv'],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0xd3fe25(0x151),'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0x124)]},'errorModalTitle':{'type':_0xd3fe25(0x146),'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':_0x588636['HiTJv'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636['XjNLv'],'reflect':![],'defaultValue':_0xd3fe25(0xf1)},'modalPosition':{'type':_0x588636[_0xd3fe25(0x107)],'mutable':![],'complexType':{'original':_0x588636['HiTJv'],'resolved':_0x588636['HiTJv'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636[_0xd3fe25(0xe9)],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0x105)]},'sendButtonText':{'type':_0x588636['HiTJv'],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':'string','references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636['WYngr'],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xd6)]},'project':{'type':_0x588636['HiTJv'],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636[_0xd3fe25(0xf7)],'reflect':![],'defaultValue':'\x27\x27'},'screenshotButtonTooltipText':{'type':'string','mutable':![],'complexType':{'original':'string','resolved':_0x588636['HiTJv'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636['npnGe'],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xcd)]},'screenshotTopbarText':{'type':_0xd3fe25(0x146),'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':'string','references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':'screenshot-topbar-text','reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xf6)]},'email':{'type':_0x588636[_0xd3fe25(0x107)],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636[_0xd3fe25(0x118)],'reflect':![],'defaultValue':'\x27\x27'},'emailPlaceholder':{'type':_0x588636[_0xd3fe25(0x107)],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636['PxSUk'],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xe8)]},'messagePlaceholder':{'type':_0x588636[_0xd3fe25(0x107)],'mutable':![],'complexType':{'original':_0x588636['HiTJv'],'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636['SYXZr'],'reflect':![],'defaultValue':_0xd3fe25(0x103)},'buttonStyle':{'type':_0x588636[_0xd3fe25(0x107)],'mutable':![],'complexType':{'original':_0xd3fe25(0x146),'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636[_0xd3fe25(0xcc)],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xe6)]},'buttonPosition':{'type':_0x588636['HiTJv'],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x107)],'resolved':_0x588636[_0xd3fe25(0x107)],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636[_0xd3fe25(0xeb)],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xe6)]},'hideIcon':{'type':_0x588636[_0xd3fe25(0x149)],'mutable':![],'complexType':{'original':_0x588636['oEJLi'],'resolved':_0x588636['oEJLi'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636[_0xd3fe25(0x133)],'reflect':![],'defaultValue':_0x588636[_0xd3fe25(0xc5)]},'hideScreenshotButton':{'type':_0x588636[_0xd3fe25(0x149)],'mutable':![],'complexType':{'original':_0x588636[_0xd3fe25(0x149)],'resolved':_0x588636['oEJLi'],'references':{}},'required':![],'optional':![],'docs':{'tags':[],'text':''},'attribute':_0x588636['pHeCt'],'reflect':![],'defaultValue':'false'}};}static get[_0x99c22a(0x123)](){return'el';}}
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class FeedbackButton {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.modalTitle = 'Share your feedback';
|
|
5
|
+
this.successModalTitle = 'Thanks for your feedback!';
|
|
6
|
+
this.errorModalTitle = "Oops! We didn't receive your feedback. Please try again later.";
|
|
7
|
+
this.modalPosition = 'center';
|
|
8
|
+
this.sendButtonText = 'Send';
|
|
9
|
+
this.project = '';
|
|
10
|
+
this.screenshotButtonTooltipText = 'Take a Screenshot';
|
|
11
|
+
this.screenshotTopbarText = 'SELECT AN ELEMENT ON THE PAGE';
|
|
12
|
+
this.email = '';
|
|
13
|
+
this.emailPlaceholder = 'Email address (optional)';
|
|
14
|
+
this.messagePlaceholder = 'How could this page be more helpful?';
|
|
15
|
+
this.buttonStyle = 'default';
|
|
16
|
+
this.buttonPosition = 'default';
|
|
17
|
+
this.hideIcon = false;
|
|
18
|
+
this.hideScreenshotButton = false;
|
|
19
|
+
}
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
this.feedbackModal = document.createElement('feedback-modal');
|
|
22
|
+
const props = [
|
|
23
|
+
'modalTitle',
|
|
24
|
+
'successModalTitle',
|
|
25
|
+
'errorModalTitle',
|
|
26
|
+
'modalPosition',
|
|
27
|
+
'sendButtonText',
|
|
28
|
+
'project',
|
|
29
|
+
'screenshotButtonTooltipText',
|
|
30
|
+
'screenshotTopbarText',
|
|
31
|
+
'email',
|
|
32
|
+
'emailPlaceholder',
|
|
33
|
+
'messagePlaceholder',
|
|
34
|
+
'hideScreenshotButton'
|
|
35
|
+
];
|
|
36
|
+
props.forEach(prop => {
|
|
37
|
+
this.feedbackModal[prop] = this[prop];
|
|
38
|
+
});
|
|
39
|
+
document.body.appendChild(this.feedbackModal);
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
document.body.removeChild(this.feedbackModal);
|
|
43
|
+
}
|
|
44
|
+
componentDidLoad() {
|
|
45
|
+
if (this.buttonPosition === 'center-right') {
|
|
46
|
+
const buttonContent = this.el.shadowRoot.querySelector('.feedback-button-content');
|
|
47
|
+
buttonContent.style.right = `${buttonContent.offsetWidth / 2 * -1}px`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
showModal() {
|
|
51
|
+
this.feedbackModal.showModal = true;
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
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))));
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "feedback-button"; }
|
|
57
|
+
static get encapsulation() { return "shadow"; }
|
|
58
|
+
static get originalStyleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["feedback-button.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get styleUrls() {
|
|
64
|
+
return {
|
|
65
|
+
"$": ["feedback-button.css"]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static get properties() {
|
|
69
|
+
return {
|
|
70
|
+
"modalTitle": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "string",
|
|
75
|
+
"resolved": "string",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"attribute": "modal-title",
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"defaultValue": "'Share your feedback'"
|
|
87
|
+
},
|
|
88
|
+
"successModalTitle": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "string",
|
|
93
|
+
"resolved": "string",
|
|
94
|
+
"references": {}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": false,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": ""
|
|
101
|
+
},
|
|
102
|
+
"attribute": "success-modal-title",
|
|
103
|
+
"reflect": false,
|
|
104
|
+
"defaultValue": "'Thanks for your feedback!'"
|
|
105
|
+
},
|
|
106
|
+
"errorModalTitle": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "string",
|
|
111
|
+
"resolved": "string",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": ""
|
|
119
|
+
},
|
|
120
|
+
"attribute": "error-modal-title",
|
|
121
|
+
"reflect": false,
|
|
122
|
+
"defaultValue": "\"Oops! We didn't receive your feedback. Please try again later.\""
|
|
123
|
+
},
|
|
124
|
+
"modalPosition": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "string",
|
|
129
|
+
"resolved": "string",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": ""
|
|
137
|
+
},
|
|
138
|
+
"attribute": "modal-position",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "'center'"
|
|
141
|
+
},
|
|
142
|
+
"sendButtonText": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"attribute": "send-button-text",
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"defaultValue": "'Send'"
|
|
159
|
+
},
|
|
160
|
+
"project": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "string",
|
|
165
|
+
"resolved": "string",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": ""
|
|
173
|
+
},
|
|
174
|
+
"attribute": "project",
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"defaultValue": "''"
|
|
177
|
+
},
|
|
178
|
+
"screenshotButtonTooltipText": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"mutable": false,
|
|
181
|
+
"complexType": {
|
|
182
|
+
"original": "string",
|
|
183
|
+
"resolved": "string",
|
|
184
|
+
"references": {}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": ""
|
|
191
|
+
},
|
|
192
|
+
"attribute": "screenshot-button-tooltip-text",
|
|
193
|
+
"reflect": false,
|
|
194
|
+
"defaultValue": "'Take a Screenshot'"
|
|
195
|
+
},
|
|
196
|
+
"screenshotTopbarText": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"mutable": false,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "string",
|
|
201
|
+
"resolved": "string",
|
|
202
|
+
"references": {}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": false,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
},
|
|
210
|
+
"attribute": "screenshot-topbar-text",
|
|
211
|
+
"reflect": false,
|
|
212
|
+
"defaultValue": "'SELECT AN ELEMENT ON THE PAGE'"
|
|
213
|
+
},
|
|
214
|
+
"email": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "string",
|
|
219
|
+
"resolved": "string",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": ""
|
|
227
|
+
},
|
|
228
|
+
"attribute": "email",
|
|
229
|
+
"reflect": false,
|
|
230
|
+
"defaultValue": "''"
|
|
231
|
+
},
|
|
232
|
+
"emailPlaceholder": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"mutable": false,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "string",
|
|
237
|
+
"resolved": "string",
|
|
238
|
+
"references": {}
|
|
239
|
+
},
|
|
240
|
+
"required": false,
|
|
241
|
+
"optional": false,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [],
|
|
244
|
+
"text": ""
|
|
245
|
+
},
|
|
246
|
+
"attribute": "email-placeholder",
|
|
247
|
+
"reflect": false,
|
|
248
|
+
"defaultValue": "'Email address (optional)'"
|
|
249
|
+
},
|
|
250
|
+
"messagePlaceholder": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "string",
|
|
255
|
+
"resolved": "string",
|
|
256
|
+
"references": {}
|
|
257
|
+
},
|
|
258
|
+
"required": false,
|
|
259
|
+
"optional": false,
|
|
260
|
+
"docs": {
|
|
261
|
+
"tags": [],
|
|
262
|
+
"text": ""
|
|
263
|
+
},
|
|
264
|
+
"attribute": "message-placeholder",
|
|
265
|
+
"reflect": false,
|
|
266
|
+
"defaultValue": "'How could this page be more helpful?'"
|
|
267
|
+
},
|
|
268
|
+
"buttonStyle": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "string",
|
|
273
|
+
"resolved": "string",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": ""
|
|
281
|
+
},
|
|
282
|
+
"attribute": "button-style",
|
|
283
|
+
"reflect": false,
|
|
284
|
+
"defaultValue": "'default'"
|
|
285
|
+
},
|
|
286
|
+
"buttonPosition": {
|
|
287
|
+
"type": "string",
|
|
288
|
+
"mutable": false,
|
|
289
|
+
"complexType": {
|
|
290
|
+
"original": "string",
|
|
291
|
+
"resolved": "string",
|
|
292
|
+
"references": {}
|
|
293
|
+
},
|
|
294
|
+
"required": false,
|
|
295
|
+
"optional": false,
|
|
296
|
+
"docs": {
|
|
297
|
+
"tags": [],
|
|
298
|
+
"text": ""
|
|
299
|
+
},
|
|
300
|
+
"attribute": "button-position",
|
|
301
|
+
"reflect": false,
|
|
302
|
+
"defaultValue": "'default'"
|
|
303
|
+
},
|
|
304
|
+
"hideIcon": {
|
|
305
|
+
"type": "boolean",
|
|
306
|
+
"mutable": false,
|
|
307
|
+
"complexType": {
|
|
308
|
+
"original": "boolean",
|
|
309
|
+
"resolved": "boolean",
|
|
310
|
+
"references": {}
|
|
311
|
+
},
|
|
312
|
+
"required": false,
|
|
313
|
+
"optional": false,
|
|
314
|
+
"docs": {
|
|
315
|
+
"tags": [],
|
|
316
|
+
"text": ""
|
|
317
|
+
},
|
|
318
|
+
"attribute": "hide-icon",
|
|
319
|
+
"reflect": false,
|
|
320
|
+
"defaultValue": "false"
|
|
321
|
+
},
|
|
322
|
+
"hideScreenshotButton": {
|
|
323
|
+
"type": "boolean",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "boolean",
|
|
327
|
+
"resolved": "boolean",
|
|
328
|
+
"references": {}
|
|
329
|
+
},
|
|
330
|
+
"required": false,
|
|
331
|
+
"optional": false,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": ""
|
|
335
|
+
},
|
|
336
|
+
"attribute": "hide-screenshot-button",
|
|
337
|
+
"reflect": false,
|
|
338
|
+
"defaultValue": "false"
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
static get elementRef() { return "el"; }
|
|
343
|
+
}
|