pushfeedback 0.1.37 → 0.1.39

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.
@@ -0,0 +1,2 @@
1
+ let e,n,t=!1,l=!1;const s={},o=e=>"object"==(e=typeof e)||"function"===e;function i(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,n,...t)=>{let l=null,s=null,i=!1,c=!1;const u=[],a=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!o(l))&&(l+=""),i&&c?u[u.length-1].t+=l:u.push(i?r(null,l):l),c=i)};if(a(t),n){n.key&&(s=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}const f=r(e,null);return f.l=n,u.length>0&&(f.o=u),f.i=s,f},r=(e,n)=>({u:0,h:e,t:n,p:null,o:null,l:null,i:null}),u={},a=e=>R(e).$,f=new WeakMap,d=e=>"sc-"+e.m,h=(e,n,t,l,s,i)=>{if(t!==l){let c=D(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,s=$(t),o=$(l);n.remove(...s.filter((e=>e&&!o.includes(e)))),n.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(c||"o"!==n[0]||"n"!==n[1]){const r=o(l);if((c||r&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[n]=l;else{const s=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==s||(e[n]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&i||s)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else n="-"===n[2]?n.slice(3):D(G,r)?r.slice(2):r[2]+n.slice(3),t&&J.rel(e,n,t,!1),l&&J.ael(e,n,l,!1)}},p=/\s/,$=e=>e?e.split(p):[],y=(e,n,t,l)=>{const o=11===n.p.nodeType&&n.p.host?n.p.host:n.p,i=e&&e.l||s,c=n.l||s;for(l in i)l in c||h(o,l,i[l],void 0,t,n.u);for(l in c)h(o,l,i[l],c[l],t,n.u)},m=(n,l,s)=>{const o=l.o[s];let i,c,r=0;if(null!==o.t)i=o.p=I.createTextNode(o.t);else{if(t||(t="svg"===o.h),i=o.p=I.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.h),t&&"foreignObject"===o.h&&(t=!1),y(null,o,t),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),o.o)for(r=0;r<o.o.length;++r)c=m(n,o,r),c&&i.appendChild(c);"svg"===o.h?t=!1:"foreignObject"===i.tagName&&(t=!0)}return i},b=(e,t,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=m(null,l,o),c&&(s[o].p=c,r.insertBefore(c,t)))},w=(e,n,t,l,s)=>{for(;n<=t;++n)(l=e[n])&&(s=l.p,S(l),s.remove())},v=(e,n)=>e.h===n.h&&e.i===n.i,g=(e,n)=>{const l=n.p=e.p,s=e.o,o=n.o,i=n.h,c=n.t;null===c?(t="svg"===i||"foreignObject"!==i&&t,"slot"===i||y(e,n,t),null!==s&&null!==o?((e,n,t,l)=>{let s,o,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],h=l.length-1,p=l[0],$=l[h];for(;i<=a&&c<=h;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==p)p=l[++c];else if(null==$)$=l[--h];else if(v(f,p))g(f,p),f=n[++i],p=l[++c];else if(v(d,$))g(d,$),d=n[--a],$=l[--h];else if(v(f,$))g(f,$),e.insertBefore(f.p,d.p.nextSibling),f=n[++i],$=l[--h];else if(v(d,p))g(d,p),e.insertBefore(d.p,f.p),d=n[--a],p=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].i&&n[u].i===p.i){r=u;break}r>=0?(o=n[r],o.h!==p.h?s=m(n&&n[c],t,r):(g(o,p),n[r]=void 0,s=o.p),p=l[++c]):(s=m(n&&n[c],t,c),p=l[++c]),s&&f.p.parentNode.insertBefore(s,f.p)}i>a?b(e,null==l[h+1]?null:l[h+1].p,t,l,c,h):c>h&&w(n,i,a)})(l,s,n,o):null!==o?(null!==e.t&&(l.textContent=""),b(l,null,n,o,0,o.length-1)):null!==s&&w(s,0,s.length-1),t&&"svg"===i&&(t=!1)):e.t!==c&&(l.data=c)},S=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(S)},j=(e,n)=>{n&&!e.v&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.v=n)))},k=(e,n)=>{if(e.u|=16,!(4&e.u))return j(e,e.g),le((()=>O(e,n)));e.u|=512},O=(e,n)=>{const t=e.S;let l;return n&&(l=P(t,"componentWillLoad")),E(l,(()=>C(e,t,n)))},C=async(e,n,t)=>{const l=e.$,s=l["s-rc"];t&&(e=>{const n=e.j,t=e.$,l=n.u,s=((e,n)=>{var t;let l=d(n);const s=B.get(l);if(e=11===e.nodeType?e:I,s)if("string"==typeof s){let n,o=f.get(e=e.head||e);if(o||f.set(e,o=new Set),!o.has(l)){{n=I.createElement("style"),n.innerHTML=s;const l=null!==(t=J.k)&&void 0!==t?t:i(I);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}o&&o.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);M(e,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const n=l["s-p"],t=()=>x(e);0===n.length?t():(Promise.all(n).then(t),e.u|=4,n.length=0)}},M=(t,l)=>{try{l=l.render(),t.u&=-17,t.u|=2,((t,l)=>{const s=t.$,o=t.j,i=t.O||r(null,null),a=(e=>e&&e.h===u)(l)?l:c(null,null,l);n=s.tagName,o.C&&(a.l=a.l||{},o.C.map((([e,n])=>a.l[n]=s[e]))),a.h=null,a.u|=4,t.O=a,a.p=i.p=s.shadowRoot||s,e=s["s-sc"],g(i,a)})(t,l)}catch(e){V(e,t.$)}return null},x=e=>{const n=e.$,t=e.S,l=e.g;64&e.u||(e.u|=64,N(n),P(t,"componentDidLoad"),e.M(n),l||L()),e.v&&(e.v(),e.v=void 0),512&e.u&&te((()=>k(e,!1))),e.u&=-517},L=()=>{N(I.documentElement),te((()=>(e=>{const n=J.ce("appload",{detail:{namespace:"pushfeedback"}});return e.dispatchEvent(n),n})(G)))},P=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){V(e)}},E=(e,n)=>e&&e.then?e.then(n):n(),N=e=>e.classList.add("hydrated"),T=(e,n,t)=>{if(n.L){const l=Object.entries(n.L),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(s,e,{get(){return((e,n)=>R(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const s=R(e),i=s.P.get(n),c=s.u,r=s.S;t=((e,n)=>null==e||o(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.L[n][0]),8&c&&void 0!==i||t===i||Number.isNaN(i)&&Number.isNaN(t)||(s.P.set(n,t),r&&2==(18&c)&&k(s,!1))})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,n,l){J.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,n])=>15&n[0])).map((([e,l])=>{const s=l[1]||e;return t.set(s,e),512&l[0]&&n.C.push([e,s]),s}))}}return e},W=e=>{P(e,"connectedCallback")},A=(e,n={})=>{var t;const l=[],s=n.exclude||[],o=G.customElements,c=I.head,r=c.querySelector("meta[charset]"),u=I.createElement("style"),a=[];let f,h=!0;Object.assign(J,n),J.N=new URL(n.resourcesUrl||"./",I.baseURI).href,e.map((e=>{e[1].map((n=>{const t={u:n[0],m:n[1],L:n[2],T:n[3]};t.L=n[2],t.C=[];const i=t.m,c=class extends HTMLElement{constructor(e){super(e),q(e=this,t),1&t.u&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),h?a.push(this):J.jmp((()=>(e=>{if(0==(1&J.u)){const n=R(e),t=n.j,l=()=>{};if(1&n.u)W(n.S);else{n.u|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){j(n,n.g=t);break}}t.L&&Object.entries(t.L).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,s)=>{if(0==(32&n.u)){{if(n.u|=32,(s=z(t)).then){const e=()=>{};s=await s,e()}s.isProxied||(T(s,t,2),s.isProxied=!0);const e=()=>{};n.u|=8;try{new s(n)}catch(e){V(e)}n.u&=-9,e(),W(n.S)}if(s.style){let e=s.style;const n=d(t);if(!B.has(n)){const l=()=>{};((e,n,t)=>{let l=B.get(e);Q&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,B.set(e,l)})(n,e,!!(1&t.u)),l()}}}const o=n.g,i=()=>k(n,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,n,t)}l()}})(this)))}disconnectedCallback(){J.jmp((()=>(()=>{0==(1&J.u)&&P(R(this).S,"disconnectedCallback")})()))}componentOnReady(){return R(this).W}};t.A=e[0],s.includes(i)||o.get(i)||(l.push(i),o.define(i,T(c,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=J.k)&&void 0!==t?t:i(I);null!=e&&u.setAttribute("nonce",e),c.insertBefore(u,r?r.nextSibling:c.firstChild)}h=!1,a.length?a.map((e=>e.connectedCallback())):J.jmp((()=>f=setTimeout(L,30)))},F=e=>J.k=e,H=new WeakMap,R=e=>H.get(e),U=(e,n)=>H.set(n.S=e,n),q=(e,n)=>{const t={u:0,$:e,j:n,P:new Map};return t.W=new Promise((e=>t.M=e)),e["s-p"]=[],e["s-rc"]=[],H.set(e,t)},D=(e,n)=>n in e,V=(e,n)=>(0,console.error)(e,n),_=new Map,z=e=>{const n=e.m.replace(/-/g,"_"),t=e.A,l=_.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(_.set(t,e),e[n])),V)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},B=new Map,G="undefined"!=typeof window?window:{},I=G.document||{head:{}},J={u:0,N:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},K=e=>Promise.resolve(e),Q=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),X=[],Y=[],Z=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&J.u?te(ne):J.raf(ne))},ee=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){V(e)}e.length=0},ne=()=>{ee(X),ee(Y),(l=X.length>0)&&J.raf(ne)},te=e=>K().then(e),le=Z(Y,!0);export{u as H,A as b,a as g,c as h,K as p,U as r,F as s}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-a0681be3.js";export{s as setNonce}from"./p-a0681be3.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-ea59cbec",[[1,"feedback-button",{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"],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"],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],formError:[32],formErrorStatus:[32],encodedScreenshot:[32],isPrivacyChecked:[32],whitelabel:[32],selectedRating:[32]}]]]],e)));
1
+ import{p as e,b as t}from"./p-9e531691.js";export{s as setNonce}from"./p-9e531691.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t([["p-56eed605",[[1,"feedback-button",{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],formError:[32],formErrorStatus:[32],encodedScreenshot:[32],isPrivacyChecked:[32],whitelabel:[32],selectedRating:[32]}]]]],e)));
@@ -1,39 +1,40 @@
1
- export declare class FeedbackButton {
2
- feedbackModal: any;
3
- el: HTMLElement;
4
- customFont: boolean;
5
- errorMessage: string;
6
- errorMessage403: string;
7
- errorMessage404: string;
8
- modalTitle: string;
9
- modalTitleSuccess: string;
10
- modalTitleError: string;
11
- modalPosition: string;
12
- sendButtonText: string;
13
- successMessage: string;
14
- project: string;
15
- screenshotButtonText: string;
16
- screenshotTopbarText: string;
17
- hideEmail: boolean;
18
- emailAddress: string;
19
- emailPlaceholder: string;
20
- messagePlaceholder: string;
21
- hideRating: boolean;
22
- ratingMode: string;
23
- ratingPlaceholder: string;
24
- ratingStarsPlaceholder: string;
25
- buttonStyle: string;
26
- buttonPosition: string;
27
- hideIcon: boolean;
28
- hideScreenshotButton: boolean;
29
- hidePrivacyPolicy: boolean;
30
- privacyPolicyText: string;
31
- fetchData: boolean;
32
- connectedCallback(): void;
33
- disconnectedCallback(): void;
34
- isSafariBrowser(): boolean;
35
- componentDidLoad(): void;
36
- loadInterFont(): void;
37
- showModal(): void;
38
- render(): any;
39
- }
1
+ export declare class FeedbackButton {
2
+ feedbackModal: any;
3
+ el: HTMLElement;
4
+ customFont: boolean;
5
+ errorMessage: string;
6
+ errorMessage403: string;
7
+ errorMessage404: string;
8
+ modalTitle: string;
9
+ modalTitleSuccess: string;
10
+ modalTitleError: string;
11
+ modalPosition: string;
12
+ sendButtonText: string;
13
+ successMessage: string;
14
+ project: string;
15
+ screenshotButtonText: string;
16
+ screenshotTopbarText: string;
17
+ hideEmail: boolean;
18
+ emailAddress: string;
19
+ emailPlaceholder: string;
20
+ messagePlaceholder: string;
21
+ hideRating: boolean;
22
+ rating: number;
23
+ ratingMode: string;
24
+ ratingPlaceholder: string;
25
+ ratingStarsPlaceholder: string;
26
+ buttonStyle: string;
27
+ buttonPosition: string;
28
+ hideIcon: boolean;
29
+ hideScreenshotButton: boolean;
30
+ hidePrivacyPolicy: boolean;
31
+ privacyPolicyText: string;
32
+ fetchData: boolean;
33
+ connectedCallback(): void;
34
+ disconnectedCallback(): void;
35
+ isSafariBrowser(): boolean;
36
+ componentDidLoad(): void;
37
+ loadInterFont(): void;
38
+ showModal(): void;
39
+ render(): any;
40
+ }
@@ -1,64 +1,65 @@
1
- export declare class FeedbackModal {
2
- scrollTimeout: any;
3
- sending: boolean;
4
- formMessage: string;
5
- formEmail: string;
6
- formSuccess: boolean;
7
- formError: boolean;
8
- formErrorStatus: number;
9
- encodedScreenshot: string;
10
- isPrivacyChecked: boolean;
11
- whitelabel: boolean;
12
- selectedRating: number;
13
- errorMessage: string;
14
- errorMessage403: string;
15
- errorMessage404: string;
16
- modalTitle: string;
17
- modalTitleSuccess: string;
18
- modalTitleError: string;
19
- modalPosition: string;
20
- sendButtonText: string;
21
- successMessage: string;
22
- project: string;
23
- screenshotButtonText: string;
24
- screenshotTopbarText: string;
25
- hideEmail: boolean;
26
- emailAddress: string;
27
- emailPlaceholder: string;
28
- messagePlaceholder: string;
29
- hideRating: boolean;
30
- ratingMode: string;
31
- ratingPlaceholder: string;
32
- ratingStarsPlaceholder: string;
33
- showModal: boolean;
34
- showScreenshotMode: boolean;
35
- showScreenshotTopBar: boolean;
36
- hasSelectedElement: boolean;
37
- hideScreenshotButton: boolean;
38
- hidePrivacyPolicy: boolean;
39
- privacyPolicyText: string;
40
- fetchData: boolean;
41
- modalContent: HTMLElement;
42
- screenshotModal: HTMLElement;
43
- elementSelected: HTMLElement;
44
- topSide: HTMLElement;
45
- leftSide: HTMLElement;
46
- bottomSide: HTMLElement;
47
- rightSide: HTMLElement;
48
- componentWillLoad(): void;
49
- fetchProjectData(): Promise<void>;
50
- onScrollDebounced: () => void;
51
- resetOverflow(): void;
52
- handleMessageInput(event: Event): void;
53
- handleEmailInput(event: Event): void;
54
- handleSubmit: (event: Event) => Promise<void>;
55
- close: () => void;
56
- openScreenShot: () => void;
57
- closeScreenShot: () => void;
58
- handleMouseOverScreenShot: (event: any) => void;
59
- captureScreenshot(): Promise<unknown>;
60
- handleMouseClickedSelectedElement: (event: any) => Promise<void>;
61
- handleCheckboxChange(event: any): void;
62
- handleRatingChange(newRating: number): void;
63
- render(): any;
64
- }
1
+ export declare class FeedbackModal {
2
+ scrollTimeout: any;
3
+ sending: boolean;
4
+ formMessage: string;
5
+ formEmail: string;
6
+ formSuccess: boolean;
7
+ formError: boolean;
8
+ formErrorStatus: number;
9
+ encodedScreenshot: string;
10
+ isPrivacyChecked: boolean;
11
+ whitelabel: boolean;
12
+ selectedRating: number;
13
+ errorMessage: string;
14
+ errorMessage403: string;
15
+ errorMessage404: string;
16
+ modalTitle: string;
17
+ modalTitleSuccess: string;
18
+ modalTitleError: string;
19
+ modalPosition: string;
20
+ sendButtonText: string;
21
+ successMessage: string;
22
+ project: string;
23
+ screenshotButtonText: string;
24
+ screenshotTopbarText: string;
25
+ hideEmail: boolean;
26
+ emailAddress: string;
27
+ emailPlaceholder: string;
28
+ messagePlaceholder: string;
29
+ hideRating: boolean;
30
+ rating: number;
31
+ ratingMode: string;
32
+ ratingPlaceholder: string;
33
+ ratingStarsPlaceholder: string;
34
+ showModal: boolean;
35
+ showScreenshotMode: boolean;
36
+ showScreenshotTopBar: boolean;
37
+ hasSelectedElement: boolean;
38
+ hideScreenshotButton: boolean;
39
+ hidePrivacyPolicy: boolean;
40
+ privacyPolicyText: string;
41
+ fetchData: boolean;
42
+ modalContent: HTMLElement;
43
+ screenshotModal: HTMLElement;
44
+ elementSelected: HTMLElement;
45
+ topSide: HTMLElement;
46
+ leftSide: HTMLElement;
47
+ bottomSide: HTMLElement;
48
+ rightSide: HTMLElement;
49
+ componentWillLoad(): void;
50
+ fetchProjectData(): Promise<void>;
51
+ onScrollDebounced: () => void;
52
+ resetOverflow(): void;
53
+ handleMessageInput(event: Event): void;
54
+ handleEmailInput(event: Event): void;
55
+ handleSubmit: (event: Event) => Promise<void>;
56
+ close: () => void;
57
+ openScreenShot: () => void;
58
+ closeScreenShot: () => void;
59
+ handleMouseOverScreenShot: (event: any) => void;
60
+ captureScreenshot(): Promise<unknown>;
61
+ handleMouseClickedSelectedElement: (event: any) => Promise<void>;
62
+ handleCheckboxChange(event: any): void;
63
+ handleRatingChange(newRating: number): void;
64
+ render(): any;
65
+ }
@@ -28,6 +28,7 @@ export namespace Components {
28
28
  "modalTitleSuccess": string;
29
29
  "privacyPolicyText": string;
30
30
  "project": string;
31
+ "rating": number;
31
32
  "ratingMode": string;
32
33
  "ratingPlaceholder": string;
33
34
  "ratingStarsPlaceholder": string;
@@ -55,6 +56,7 @@ export namespace Components {
55
56
  "modalTitleSuccess": string;
56
57
  "privacyPolicyText": string;
57
58
  "project": string;
59
+ "rating": number;
58
60
  "ratingMode": string;
59
61
  "ratingPlaceholder": string;
60
62
  "ratingStarsPlaceholder": string;
@@ -108,6 +110,7 @@ declare namespace LocalJSX {
108
110
  "modalTitleSuccess"?: string;
109
111
  "privacyPolicyText"?: string;
110
112
  "project"?: string;
113
+ "rating"?: number;
111
114
  "ratingMode"?: string;
112
115
  "ratingPlaceholder"?: string;
113
116
  "ratingStarsPlaceholder"?: string;
@@ -135,6 +138,7 @@ declare namespace LocalJSX {
135
138
  "modalTitleSuccess"?: string;
136
139
  "privacyPolicyText"?: string;
137
140
  "project"?: string;
141
+ "rating"?: number;
138
142
  "ratingMode"?: string;
139
143
  "ratingPlaceholder"?: string;
140
144
  "ratingStarsPlaceholder"?: string;
@@ -1 +1 @@
1
- export * from './components';
1
+ export * from './components';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "pushfeedback",
3
- "author": "David Garcia <hi@davidgarcia.dev>",
3
+ "author": "TechDocs Studio <hi@techdocs.studio>",
4
4
  "homepage": "https://pushfeedback.com/",
5
- "version": "0.1.37",
5
+ "version": "0.1.39",
6
6
  "description": "Feedback widget for websites.",
7
7
  "main": "dist/index.cjs.js",
8
8
  "module": "dist/index.js",
@@ -1,2 +0,0 @@
1
- let e,n,t=!1,l=!1;const s={},o=e=>"object"==(e=typeof e)||"function"===e;function i(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const c=(e,n,...t)=>{let l=null,s=null,i=!1,c=!1;const u=[],a=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!o(l))&&(l+=""),i&&c?u[u.length-1].t+=l:u.push(i?r(null,l):l),c=i)};if(a(t),n){n.key&&(s=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}const f=r(e,null);return f.l=n,u.length>0&&(f.o=u),f.i=s,f},r=(e,n)=>({u:0,h:e,t:n,$:null,o:null,l:null,i:null}),u={},a=e=>U(e).p,f=new WeakMap,d=e=>"sc-"+e.m,h=(e,n,t,l,s,i)=>{if(t!==l){let c=F(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,s=p(t),o=p(l);n.remove(...s.filter((e=>e&&!o.includes(e)))),n.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(c||"o"!==n[0]||"n"!==n[1]){const r=o(l);if((c||r&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[n]=l;else{const s=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==s||(e[n]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&i||s)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else n="-"===n[2]?n.slice(3):F(G,r)?r.slice(2):r[2]+n.slice(3),t&&J.rel(e,n,t,!1),l&&J.ael(e,n,l,!1)}},$=/\s/,p=e=>e?e.split($):[],y=(e,n,t,l)=>{const o=11===n.$.nodeType&&n.$.host?n.$.host:n.$,i=e&&e.l||s,c=n.l||s;for(l in i)l in c||h(o,l,i[l],void 0,t,n.u);for(l in c)h(o,l,i[l],c[l],t,n.u)},m=(n,l,s)=>{const o=l.o[s];let i,c,r=0;if(null!==o.t)i=o.$=I.createTextNode(o.t);else{if(t||(t="svg"===o.h),i=o.$=I.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.h),t&&"foreignObject"===o.h&&(t=!1),y(null,o,t),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),o.o)for(r=0;r<o.o.length;++r)c=m(n,o,r),c&&i.appendChild(c);"svg"===o.h?t=!1:"foreignObject"===i.tagName&&(t=!0)}return i},b=(e,t,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=m(null,l,o),c&&(s[o].$=c,r.insertBefore(c,t)))},w=(e,n,t,l,s)=>{for(;n<=t;++n)(l=e[n])&&(s=l.$,S(l),s.remove())},v=(e,n)=>e.h===n.h&&e.i===n.i,g=(e,n)=>{const l=n.$=e.$,s=e.o,o=n.o,i=n.h,c=n.t;null===c?(t="svg"===i||"foreignObject"!==i&&t,"slot"===i||y(e,n,t),null!==s&&null!==o?((e,n,t,l)=>{let s,o,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],h=l.length-1,$=l[0],p=l[h];for(;i<=a&&c<=h;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==$)$=l[++c];else if(null==p)p=l[--h];else if(v(f,$))g(f,$),f=n[++i],$=l[++c];else if(v(d,p))g(d,p),d=n[--a],p=l[--h];else if(v(f,p))g(f,p),e.insertBefore(f.$,d.$.nextSibling),f=n[++i],p=l[--h];else if(v(d,$))g(d,$),e.insertBefore(d.$,f.$),d=n[--a],$=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].i&&n[u].i===$.i){r=u;break}r>=0?(o=n[r],o.h!==$.h?s=m(n&&n[c],t,r):(g(o,$),n[r]=void 0,s=o.$),$=l[++c]):(s=m(n&&n[c],t,c),$=l[++c]),s&&f.$.parentNode.insertBefore(s,f.$)}i>a?b(e,null==l[h+1]?null:l[h+1].$,t,l,c,h):c>h&&w(n,i,a)})(l,s,n,o):null!==o?(null!==e.t&&(l.textContent=""),b(l,null,n,o,0,o.length-1)):null!==s&&w(s,0,s.length-1),t&&"svg"===i&&(t=!1)):e.t!==c&&(l.data=c)},S=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(S)},j=(e,n)=>{n&&!e.v&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.v=n)))},k=(e,n)=>{if(e.u|=16,!(4&e.u))return j(e,e.g),le((()=>O(e,n)));e.u|=512},O=(e,n)=>{const t=e.S;let l;return n&&(l=P(t,"componentWillLoad")),E(l,(()=>C(e,t,n)))},C=async(e,n,t)=>{const l=e.p,s=l["s-rc"];t&&(e=>{const n=e.j,t=e.p,l=n.u,s=((e,n)=>{var t;let l=d(n);const s=B.get(l);if(e=11===e.nodeType?e:I,s)if("string"==typeof s){let n,o=f.get(e=e.head||e);if(o||f.set(e,o=new Set),!o.has(l)){{n=I.createElement("style"),n.innerHTML=s;const l=null!==(t=J.k)&&void 0!==t?t:i(I);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}o&&o.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);M(e,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const n=l["s-p"],t=()=>x(e);0===n.length?t():(Promise.all(n).then(t),e.u|=4,n.length=0)}},M=(t,l)=>{try{l=l.render(),t.u&=-17,t.u|=2,((t,l)=>{const s=t.p,o=t.j,i=t.O||r(null,null),a=(e=>e&&e.h===u)(l)?l:c(null,null,l);n=s.tagName,o.C&&(a.l=a.l||{},o.C.map((([e,n])=>a.l[n]=s[e]))),a.h=null,a.u|=4,t.O=a,a.$=i.$=s.shadowRoot||s,e=s["s-sc"],g(i,a)})(t,l)}catch(e){V(e,t.p)}return null},x=e=>{const n=e.p,t=e.S,l=e.g;64&e.u||(e.u|=64,N(n),P(t,"componentDidLoad"),e.M(n),l||L()),e.v&&(e.v(),e.v=void 0),512&e.u&&te((()=>k(e,!1))),e.u&=-517},L=()=>{N(I.documentElement),te((()=>(e=>{const n=J.ce("appload",{detail:{namespace:"pushfeedback"}});return e.dispatchEvent(n),n})(G)))},P=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){V(e)}},E=(e,n)=>e&&e.then?e.then(n):n(),N=e=>e.classList.add("hydrated"),T=(e,n,t)=>{if(n.L){const l=Object.entries(n.L),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(s,e,{get(){return((e,n)=>U(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const s=U(e),i=s.P.get(n),c=s.u,r=s.S;t=((e,n)=>null==e||o(e)?e:4&n?"false"!==e&&(""===e||!!e):1&n?e+"":e)(t,l.L[n][0]),8&c&&void 0!==i||t===i||Number.isNaN(i)&&Number.isNaN(t)||(s.P.set(n,t),r&&2==(18&c)&&k(s,!1))})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,n,l){J.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},e.observedAttributes=l.filter((([e,n])=>15&n[0])).map((([e,l])=>{const s=l[1]||e;return t.set(s,e),512&l[0]&&n.C.push([e,s]),s}))}}return e},W=e=>{P(e,"connectedCallback")},A=(e,n={})=>{var t;const l=[],s=n.exclude||[],o=G.customElements,c=I.head,r=c.querySelector("meta[charset]"),u=I.createElement("style"),a=[];let f,h=!0;Object.assign(J,n),J.N=new URL(n.resourcesUrl||"./",I.baseURI).href,e.map((e=>{e[1].map((n=>{const t={u:n[0],m:n[1],L:n[2],T:n[3]};t.L=n[2],t.C=[];const i=t.m,c=class extends HTMLElement{constructor(e){super(e),D(e=this,t),1&t.u&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),h?a.push(this):J.jmp((()=>(e=>{if(0==(1&J.u)){const n=U(e),t=n.j,l=()=>{};if(1&n.u)W(n.S);else{n.u|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){j(n,n.g=t);break}}t.L&&Object.entries(t.L).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,s)=>{if(0==(32&n.u)){{if(n.u|=32,(s=z(t)).then){const e=()=>{};s=await s,e()}s.isProxied||(T(s,t,2),s.isProxied=!0);const e=()=>{};n.u|=8;try{new s(n)}catch(e){V(e)}n.u&=-9,e(),W(n.S)}if(s.style){let e=s.style;const n=d(t);if(!B.has(n)){const l=()=>{};((e,n,t)=>{let l=B.get(e);Q&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,B.set(e,l)})(n,e,!!(1&t.u)),l()}}}const o=n.g,i=()=>k(n,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,n,t)}l()}})(this)))}disconnectedCallback(){J.jmp((()=>(()=>{0==(1&J.u)&&P(U(this).S,"disconnectedCallback")})()))}componentOnReady(){return U(this).W}};t.A=e[0],s.includes(i)||o.get(i)||(l.push(i),o.define(i,T(c,t,1)))}))}));{u.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.setAttribute("data-styles","");const e=null!==(t=J.k)&&void 0!==t?t:i(I);null!=e&&u.setAttribute("nonce",e),c.insertBefore(u,r?r.nextSibling:c.firstChild)}h=!1,a.length?a.map((e=>e.connectedCallback())):J.jmp((()=>f=setTimeout(L,30)))},H=e=>J.k=e,R=new WeakMap,U=e=>R.get(e),q=(e,n)=>R.set(n.S=e,n),D=(e,n)=>{const t={u:0,p:e,j:n,P:new Map};return t.W=new Promise((e=>t.M=e)),e["s-p"]=[],e["s-rc"]=[],R.set(e,t)},F=(e,n)=>n in e,V=(e,n)=>(0,console.error)(e,n),_=new Map,z=e=>{const n=e.m.replace(/-/g,"_"),t=e.A,l=_.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(_.set(t,e),e[n])),V)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},B=new Map,G="undefined"!=typeof window?window:{},I=G.document||{head:{}},J={u:0,N:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},K=e=>Promise.resolve(e),Q=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),X=[],Y=[],Z=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&J.u?te(ne):J.raf(ne))},ee=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){V(e)}e.length=0},ne=()=>{ee(X),ee(Y),(l=X.length>0)&&J.raf(ne)},te=e=>K().then(e),le=Z(Y,!0);export{u as H,A as b,a as g,c as h,K as p,q as r,H as s}