@everymatrix/nuts-inbox-widget 0.0.1
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/index-305bcf58.js +1349 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/nuts-inbox-widget.cjs.js +19 -0
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +39985 -0
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.css +15 -0
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +450 -0
- package/dist/collection/components/nuts-notification/nuts-notification.css +147 -0
- package/dist/collection/components/nuts-notification/nuts-notification.js +426 -0
- package/dist/collection/components/nuts-popover/nuts-popover.css +75 -0
- package/dist/collection/components/nuts-popover/nuts-popover.js +265 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/types/nuts-inbox-widget.types.js +47 -0
- package/dist/collection/utils/utils.js +0 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/nuts-inbox-widget.d.ts +11 -0
- package/dist/components/nuts-inbox-widget.js +4216 -0
- package/dist/components/nuts-notification.d.ts +11 -0
- package/dist/components/nuts-notification.js +6 -0
- package/dist/components/nuts-notification2.js +35762 -0
- package/dist/components/nuts-popover.d.ts +11 -0
- package/dist/components/nuts-popover.js +6 -0
- package/dist/components/nuts-popover2.js +119 -0
- package/dist/esm/index-4e49d940.js +1322 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/nuts-inbox-widget.js +17 -0
- package/dist/esm/nuts-inbox-widget_3.entry.js +39979 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/nuts-inbox-widget/index.esm.js +0 -0
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -0
- package/dist/nuts-inbox-widget/p-2f19681b.entry.js +1 -0
- package/dist/nuts-inbox-widget/p-d5a07a94.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-stencil/packages/nuts-inbox-widget/.stencil/packages/nuts-inbox-widget/stencil.config.d.ts +2 -0
- package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +70 -0
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +38 -0
- package/dist/types/components/nuts-popover/nuts-popover.d.ts +29 -0
- package/dist/types/components.d.ts +225 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/types/nuts-inbox-widget.types.d.ts +98 -0
- package/dist/types/utils/utils.d.ts +0 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),u=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),r=a(t,s),c=h(n);i.ael(o,l,r,c),(t.o=t.o||[]).push((()=>i.rel(o,l,r,c)))}))},a=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){X(e)}},f=(e,t)=>8&t?s:e,h=e=>0!=(2&e),$=new WeakMap,d=e=>"sc-"+e.h,y={},b=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!b(l))&&(l+=""),o&&i?r[r.length-1].$+=l:r.push(o?m(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=m(e,null);return u.p=t,r.length>0&&(u.m=r),u.g=s,u},m=(e,t)=>({t:0,v:e,$:t,S:null,m:null,p:null,g:null}),w={},g=(e,t,n,l,o,r)=>{if(n!==l){let c=Q(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,s=S(n),o=S(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=b(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&r||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):Q(s,u)?u.slice(2):u[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},v=/\s/,S=e=>e?e.split(v):[],j=(e,t,n,l)=>{const s=11===t.S.nodeType&&t.S.host?t.S.host:t.S,o=e&&e.p||y,i=t.p||y;for(l in o)l in i||g(s,l,o[l],void 0,n,t.t);for(l in i)g(s,l,o[l],i[l],n,t.t)},k=(t,l,s)=>{let i,r,c=l.m[s],u=0;if(null!==c.$)i=c.S=o.createTextNode(c.$);else{if(n||(n="svg"===c.v),i=c.S=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.v),n&&"foreignObject"===c.v&&(n=!1),j(null,c,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),c.m)for(u=0;u<c.m.length;++u)r=k(t,c,u),r&&i.appendChild(r);"svg"===c.v?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},O=(e,n,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=k(null,l,o),r&&(s[o].S=r,c.insertBefore(r,n)))},M=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.S,P(l),s.remove())},C=(e,t)=>e.v===t.v&&e.g===t.g,x=(e,t)=>{const l=t.S=e.S,s=e.m,o=t.m,i=t.v,r=t.$;null===r?(n="svg"===i||"foreignObject"!==i&&n,j(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,r=0,c=0,u=0,a=t.length-1,f=t[0],h=t[a],$=l.length-1,d=l[0],y=l[$];for(;i<=a&&r<=$;)if(null==f)f=t[++i];else if(null==h)h=t[--a];else if(null==d)d=l[++r];else if(null==y)y=l[--$];else if(C(f,d))x(f,d),f=t[++i],d=l[++r];else if(C(h,y))x(h,y),h=t[--a],y=l[--$];else if(C(f,y))x(f,y),e.insertBefore(f.S,h.S.nextSibling),f=t[++i],y=l[--$];else if(C(h,d))x(h,d),e.insertBefore(h.S,f.S),h=t[--a],d=l[++r];else{for(c=-1,u=i;u<=a;++u)if(t[u]&&null!==t[u].g&&t[u].g===d.g){c=u;break}c>=0?(o=t[c],o.v!==d.v?s=k(t&&t[r],n,c):(x(o,d),t[c]=void 0,s=o.S),d=l[++r]):(s=k(t&&t[r],n,r),d=l[++r]),s&&f.S.parentNode.insertBefore(s,f.S)}i>a?O(e,null==l[$+1]?null:l[$+1].S,n,l,r,$):r>$&&M(t,i,a)})(l,s,t,o):null!==o?(null!==e.$&&(l.textContent=""),O(l,null,t,o,0,o.length-1)):null!==s&&M(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.$!==r&&(l.data=r)},P=e=>{e.p&&e.p.ref&&e.p.ref(null),e.m&&e.m.map(P)},E=e=>I(e).j,N=(e,t,n)=>{const l=E(e);return{emit:e=>T(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},T=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},A=(e,t)=>{t&&!e.k&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.k=t)))},F=(e,t)=>{if(e.t|=16,!(4&e.t))return A(e,e.O),re((()=>L(e,t)));e.t|=512},L=(e,t)=>{const n=e.i;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>H(n,e,t))),e.u=null)),V(void 0,(()=>R(e,n,t)))},R=async(e,t,n)=>{const l=e.j,s=l["s-rc"];n&&(e=>{const t=e.M,n=e.j,l=t.t,s=((e,t)=>{let n=d(t),l=ee.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=$.get(e=e.head||e);s||$.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);U(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>W(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},U=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.M,i=n.C||m(null,null),r=(e=>e&&e.v===w)(l)?l:p(null,null,l);t=s.tagName,o.P&&(r.p=r.p||{},o.P.map((([e,t])=>r.p[t]=s[e]))),r.v=null,r.t|=4,n.C=r,r.S=i.S=s.shadowRoot||s,e=s["s-sc"],x(i,r)})(n,l)}catch(e){X(e,n.j)}return null},W=e=>{const t=e.j,n=e.O;64&e.t||(e.t|=64,_(t),e.N(t),n||q()),e.k&&(e.k(),e.k=void 0),512&e.t&&ie((()=>F(e,!1))),e.t&=-517},q=()=>{_(o.documentElement),ie((()=>T(s,"appload",{detail:{namespace:"nuts-inbox-widget"}})))},H=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){X(e)}},V=(e,t)=>e&&e.then?e.then(t):t(),_=e=>e.classList.add("hydrated"),z=(e,t,n)=>{if(t.T){e.watchers&&(t.A=e.watchers);const l=Object.entries(t.T),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>I(this).F.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=I(e),o=s.j,i=s.F.get(t),r=s.t,c=s.i;if(n=((e,t)=>null==e||b(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.T[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.F.set(t,n),c)){if(l.A&&128&r){const e=l.A[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){X(e,o)}}))}2==(18&r)&&F(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},B=e=>{H(e,"connectedCallback")},D=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let y,b=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],h:t[1],T:t[2],L:t[3]};s.T=t[2],s.L=t[3],s.P=[],s.A={};const o=s.h,a=class extends HTMLElement{constructor(e){super(e),K(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),b?$.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=I(e),n=t.M,l=()=>{};if(1&t.t)u(e,t,n.L),B(t.i);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){A(t,t.O=n);break}}n.T&&Object.entries(n.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=Z(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.A=s.watchers,z(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){X(e)}t.t&=-9,t.t|=128,e(),B(t.i)}if(s.style){let e=s.style;const t=d(n);if(!ee.has(t)){const l=()=>{};((e,t,n)=>{let l=ee.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ee.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.O,i=()=>F(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=I(this);e.o&&(e.o.map((e=>e())),e.o=void 0)}})()))}componentOnReady(){return I(this).R}};s.U=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,z(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),b=!1,$.length?$.map((e=>e.connectedCallback())):i.jmp((()=>y=setTimeout(q,30)))},G=new WeakMap,I=e=>G.get(e),J=(e,t)=>G.set(t.i=e,t),K=(e,t)=>{const n={t:0,j:e,M:t,F:new Map};return n.R=new Promise((e=>n.N=e)),e["s-p"]=[],e["s-rc"]=[],u(e,n,t.L),G.set(e,n)},Q=(e,t)=>t in e,X=(e,t)=>(0,console.error)(e,t),Y=new Map,Z=e=>{const t=e.h.replace(/-/g,"_"),n=e.U,l=Y.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(Y.set(n,e),e[t])),X)},ee=new Map,te=[],ne=[],le=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?ie(oe):i.raf(oe))},se=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){X(e)}e.length=0},oe=()=>{se(te),se(ne),(l=te.length>0)&&i.raf(oe)},ie=e=>r().then(e),re=le(ne,!0);export{D as b,N as c,E as g,p as h,r as p,J as r}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { sass } from '@stencil/sass';
|
|
2
|
+
export const config = {
|
|
3
|
+
namespace: 'nuts-inbox-widget',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
plugins: [sass()],
|
|
6
|
+
outputTargets: [
|
|
7
|
+
{
|
|
8
|
+
type: 'dist',
|
|
9
|
+
esmLoaderPath: '../loader',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
type: 'dist-custom-elements',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: 'docs-readme',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: 'www',
|
|
19
|
+
serviceWorker: null, // disable service workers
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { Notifications } from '../../types/nuts-inbox-widget.types';
|
|
3
|
+
export declare class NutsInboxWidget {
|
|
4
|
+
/**
|
|
5
|
+
* HTTP Endpoint URL for NuTS
|
|
6
|
+
*/
|
|
7
|
+
backendUrl: string;
|
|
8
|
+
/**
|
|
9
|
+
* Socket Endpoint URL for NuTS
|
|
10
|
+
*/
|
|
11
|
+
socketUrl: string;
|
|
12
|
+
/**
|
|
13
|
+
* The ID of the user
|
|
14
|
+
*/
|
|
15
|
+
userId: string;
|
|
16
|
+
/**
|
|
17
|
+
* The sessionID of the user
|
|
18
|
+
*/
|
|
19
|
+
sessionId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The operatorID on which we can find the user
|
|
22
|
+
*/
|
|
23
|
+
operatorId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The deviceID from which the user access the website
|
|
26
|
+
*/
|
|
27
|
+
deviceId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Language of the widget
|
|
30
|
+
*/
|
|
31
|
+
language: string;
|
|
32
|
+
/**
|
|
33
|
+
* Environment on which the widget is used (possible values: `stage`, `prod`)
|
|
34
|
+
*/
|
|
35
|
+
environment: string;
|
|
36
|
+
/**
|
|
37
|
+
* Novu application identifier
|
|
38
|
+
*/
|
|
39
|
+
applicationIdentifier: string;
|
|
40
|
+
/**
|
|
41
|
+
* Client custom styling via inline styles
|
|
42
|
+
*/
|
|
43
|
+
clientStyling: string;
|
|
44
|
+
/**
|
|
45
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
46
|
+
*/
|
|
47
|
+
clientStylingUrl: string;
|
|
48
|
+
private stylingContainer;
|
|
49
|
+
private isLoading;
|
|
50
|
+
private popoverVisible;
|
|
51
|
+
private unseenCount;
|
|
52
|
+
private ntsEndpoint;
|
|
53
|
+
private socketRef;
|
|
54
|
+
private token;
|
|
55
|
+
notificationFeed: EventEmitter<Notifications[]>;
|
|
56
|
+
newNotification: EventEmitter<any>;
|
|
57
|
+
paramChangeHandler(newValue: string, oldValue: string): void;
|
|
58
|
+
initializeHandler(newValue: string, oldValue: string): void;
|
|
59
|
+
clickOutsideHandle(): void;
|
|
60
|
+
callSS(): void;
|
|
61
|
+
setupSocket(): void;
|
|
62
|
+
getUnseenCounter(): void;
|
|
63
|
+
initializeSession(): Promise<void>;
|
|
64
|
+
togglePopover(): void;
|
|
65
|
+
setClientStyling: () => void;
|
|
66
|
+
setClientStylingURL: () => void;
|
|
67
|
+
connectedCallback(): Promise<void>;
|
|
68
|
+
renderBellIcon(): HTMLElement;
|
|
69
|
+
render(): any;
|
|
70
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class NutsNotification {
|
|
3
|
+
badge: string;
|
|
4
|
+
content: string;
|
|
5
|
+
date: string;
|
|
6
|
+
showSettings: boolean;
|
|
7
|
+
read: boolean;
|
|
8
|
+
seen: boolean;
|
|
9
|
+
language: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
messageId: string;
|
|
12
|
+
operatorId: string;
|
|
13
|
+
token: string;
|
|
14
|
+
backendUrl: string;
|
|
15
|
+
/**
|
|
16
|
+
* Client custom styling via inline styles
|
|
17
|
+
*/
|
|
18
|
+
clientStyling: string;
|
|
19
|
+
/**
|
|
20
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
21
|
+
*/
|
|
22
|
+
clientStylingUrl: string;
|
|
23
|
+
showSettingsModal: boolean;
|
|
24
|
+
messageSeen: boolean;
|
|
25
|
+
messageRead: boolean;
|
|
26
|
+
private stylingContainer;
|
|
27
|
+
messageDeteled: EventEmitter<any>;
|
|
28
|
+
settingsOpened: EventEmitter<any>;
|
|
29
|
+
allNotificationsReadHandler(): void;
|
|
30
|
+
settingsOpenedHandler(event: CustomEvent<any>): void;
|
|
31
|
+
connectedCallback(): void;
|
|
32
|
+
deleteMessage(messageId: string): void;
|
|
33
|
+
markAsRead(messageId: string): void;
|
|
34
|
+
toggleSettingsModal(): void;
|
|
35
|
+
setClientStyling: () => void;
|
|
36
|
+
setClientStylingURL: () => void;
|
|
37
|
+
render(): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class NutsPopover {
|
|
3
|
+
language: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
operatorId: string;
|
|
6
|
+
token: string;
|
|
7
|
+
backendUrl: string;
|
|
8
|
+
unseenCount: number;
|
|
9
|
+
/**
|
|
10
|
+
* Client custom styling via inline styles
|
|
11
|
+
*/
|
|
12
|
+
clientStyling: string;
|
|
13
|
+
/**
|
|
14
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
15
|
+
*/
|
|
16
|
+
clientStylingUrl: string;
|
|
17
|
+
private notifications;
|
|
18
|
+
private isLoading;
|
|
19
|
+
private stylingContainer;
|
|
20
|
+
allNotificationsRead: EventEmitter<any>;
|
|
21
|
+
messageDeteledHandler(event: CustomEvent<any>): void;
|
|
22
|
+
newNotificationHandler(event: CustomEvent<any>): void;
|
|
23
|
+
getNotifications(): void;
|
|
24
|
+
markAllAsRead(): void;
|
|
25
|
+
setClientStyling: () => void;
|
|
26
|
+
setClientStylingURL: () => void;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
render(): any;
|
|
29
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { Notifications } from "./types/nuts-inbox-widget.types";
|
|
9
|
+
export namespace Components {
|
|
10
|
+
interface NutsInboxWidget {
|
|
11
|
+
/**
|
|
12
|
+
* Novu application identifier
|
|
13
|
+
*/
|
|
14
|
+
"applicationIdentifier": string;
|
|
15
|
+
/**
|
|
16
|
+
* HTTP Endpoint URL for NuTS
|
|
17
|
+
*/
|
|
18
|
+
"backendUrl": string;
|
|
19
|
+
/**
|
|
20
|
+
* Client custom styling via inline styles
|
|
21
|
+
*/
|
|
22
|
+
"clientStyling": string;
|
|
23
|
+
/**
|
|
24
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
25
|
+
*/
|
|
26
|
+
"clientStylingUrl": string;
|
|
27
|
+
/**
|
|
28
|
+
* The deviceID from which the user access the website
|
|
29
|
+
*/
|
|
30
|
+
"deviceId"?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Environment on which the widget is used (possible values: `stage`, `prod`)
|
|
33
|
+
*/
|
|
34
|
+
"environment": string;
|
|
35
|
+
/**
|
|
36
|
+
* Language of the widget
|
|
37
|
+
*/
|
|
38
|
+
"language": string;
|
|
39
|
+
/**
|
|
40
|
+
* The operatorID on which we can find the user
|
|
41
|
+
*/
|
|
42
|
+
"operatorId": string;
|
|
43
|
+
/**
|
|
44
|
+
* The sessionID of the user
|
|
45
|
+
*/
|
|
46
|
+
"sessionId": string;
|
|
47
|
+
/**
|
|
48
|
+
* Socket Endpoint URL for NuTS
|
|
49
|
+
*/
|
|
50
|
+
"socketUrl": string;
|
|
51
|
+
/**
|
|
52
|
+
* The ID of the user
|
|
53
|
+
*/
|
|
54
|
+
"userId": string;
|
|
55
|
+
}
|
|
56
|
+
interface NutsNotification {
|
|
57
|
+
"backendUrl": string;
|
|
58
|
+
"badge": string;
|
|
59
|
+
/**
|
|
60
|
+
* Client custom styling via inline styles
|
|
61
|
+
*/
|
|
62
|
+
"clientStyling": string;
|
|
63
|
+
/**
|
|
64
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
65
|
+
*/
|
|
66
|
+
"clientStylingUrl": string;
|
|
67
|
+
"content": string;
|
|
68
|
+
"date": string;
|
|
69
|
+
"language": string;
|
|
70
|
+
"messageId": string;
|
|
71
|
+
"operatorId": string;
|
|
72
|
+
"read": boolean;
|
|
73
|
+
"seen": boolean;
|
|
74
|
+
"showSettings": boolean;
|
|
75
|
+
"token": string;
|
|
76
|
+
"userId": string;
|
|
77
|
+
}
|
|
78
|
+
interface NutsPopover {
|
|
79
|
+
"backendUrl": string;
|
|
80
|
+
/**
|
|
81
|
+
* Client custom styling via inline styles
|
|
82
|
+
*/
|
|
83
|
+
"clientStyling": string;
|
|
84
|
+
/**
|
|
85
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
86
|
+
*/
|
|
87
|
+
"clientStylingUrl": string;
|
|
88
|
+
"language": string;
|
|
89
|
+
"operatorId": string;
|
|
90
|
+
"token": string;
|
|
91
|
+
"unseenCount": number;
|
|
92
|
+
"userId": string;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
declare global {
|
|
96
|
+
interface HTMLNutsInboxWidgetElement extends Components.NutsInboxWidget, HTMLStencilElement {
|
|
97
|
+
}
|
|
98
|
+
var HTMLNutsInboxWidgetElement: {
|
|
99
|
+
prototype: HTMLNutsInboxWidgetElement;
|
|
100
|
+
new (): HTMLNutsInboxWidgetElement;
|
|
101
|
+
};
|
|
102
|
+
interface HTMLNutsNotificationElement extends Components.NutsNotification, HTMLStencilElement {
|
|
103
|
+
}
|
|
104
|
+
var HTMLNutsNotificationElement: {
|
|
105
|
+
prototype: HTMLNutsNotificationElement;
|
|
106
|
+
new (): HTMLNutsNotificationElement;
|
|
107
|
+
};
|
|
108
|
+
interface HTMLNutsPopoverElement extends Components.NutsPopover, HTMLStencilElement {
|
|
109
|
+
}
|
|
110
|
+
var HTMLNutsPopoverElement: {
|
|
111
|
+
prototype: HTMLNutsPopoverElement;
|
|
112
|
+
new (): HTMLNutsPopoverElement;
|
|
113
|
+
};
|
|
114
|
+
interface HTMLElementTagNameMap {
|
|
115
|
+
"nuts-inbox-widget": HTMLNutsInboxWidgetElement;
|
|
116
|
+
"nuts-notification": HTMLNutsNotificationElement;
|
|
117
|
+
"nuts-popover": HTMLNutsPopoverElement;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
declare namespace LocalJSX {
|
|
121
|
+
interface NutsInboxWidget {
|
|
122
|
+
/**
|
|
123
|
+
* Novu application identifier
|
|
124
|
+
*/
|
|
125
|
+
"applicationIdentifier": string;
|
|
126
|
+
/**
|
|
127
|
+
* HTTP Endpoint URL for NuTS
|
|
128
|
+
*/
|
|
129
|
+
"backendUrl": string;
|
|
130
|
+
/**
|
|
131
|
+
* Client custom styling via inline styles
|
|
132
|
+
*/
|
|
133
|
+
"clientStyling"?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
136
|
+
*/
|
|
137
|
+
"clientStylingUrl"?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The deviceID from which the user access the website
|
|
140
|
+
*/
|
|
141
|
+
"deviceId"?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Environment on which the widget is used (possible values: `stage`, `prod`)
|
|
144
|
+
*/
|
|
145
|
+
"environment"?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Language of the widget
|
|
148
|
+
*/
|
|
149
|
+
"language"?: string;
|
|
150
|
+
"onNewNotification"?: (event: CustomEvent<any>) => void;
|
|
151
|
+
"onNotificationFeed"?: (event: CustomEvent<Notifications[]>) => void;
|
|
152
|
+
/**
|
|
153
|
+
* The operatorID on which we can find the user
|
|
154
|
+
*/
|
|
155
|
+
"operatorId": string;
|
|
156
|
+
/**
|
|
157
|
+
* The sessionID of the user
|
|
158
|
+
*/
|
|
159
|
+
"sessionId": string;
|
|
160
|
+
/**
|
|
161
|
+
* Socket Endpoint URL for NuTS
|
|
162
|
+
*/
|
|
163
|
+
"socketUrl": string;
|
|
164
|
+
/**
|
|
165
|
+
* The ID of the user
|
|
166
|
+
*/
|
|
167
|
+
"userId": string;
|
|
168
|
+
}
|
|
169
|
+
interface NutsNotification {
|
|
170
|
+
"backendUrl"?: string;
|
|
171
|
+
"badge"?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Client custom styling via inline styles
|
|
174
|
+
*/
|
|
175
|
+
"clientStyling"?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
178
|
+
*/
|
|
179
|
+
"clientStylingUrl"?: string;
|
|
180
|
+
"content"?: string;
|
|
181
|
+
"date"?: string;
|
|
182
|
+
"language"?: string;
|
|
183
|
+
"messageId"?: string;
|
|
184
|
+
"onMessageDeleted"?: (event: CustomEvent<any>) => void;
|
|
185
|
+
"onSettingsOpened"?: (event: CustomEvent<any>) => void;
|
|
186
|
+
"operatorId"?: string;
|
|
187
|
+
"read"?: boolean;
|
|
188
|
+
"seen"?: boolean;
|
|
189
|
+
"showSettings"?: boolean;
|
|
190
|
+
"token"?: string;
|
|
191
|
+
"userId"?: string;
|
|
192
|
+
}
|
|
193
|
+
interface NutsPopover {
|
|
194
|
+
"backendUrl"?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Client custom styling via inline styles
|
|
197
|
+
*/
|
|
198
|
+
"clientStyling"?: string;
|
|
199
|
+
/**
|
|
200
|
+
* Custom styling url for the novu iFrame, formatted as a JSON object according to the documentation: https://docs.novu.co/notification-center/custom-styling/
|
|
201
|
+
*/
|
|
202
|
+
"clientStylingUrl"?: string;
|
|
203
|
+
"language"?: string;
|
|
204
|
+
"onAllNotificationsRead"?: (event: CustomEvent<any>) => void;
|
|
205
|
+
"operatorId"?: string;
|
|
206
|
+
"token"?: string;
|
|
207
|
+
"unseenCount"?: number;
|
|
208
|
+
"userId"?: string;
|
|
209
|
+
}
|
|
210
|
+
interface IntrinsicElements {
|
|
211
|
+
"nuts-inbox-widget": NutsInboxWidget;
|
|
212
|
+
"nuts-notification": NutsNotification;
|
|
213
|
+
"nuts-popover": NutsPopover;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
export { LocalJSX as JSX };
|
|
217
|
+
declare module "@stencil/core" {
|
|
218
|
+
export namespace JSX {
|
|
219
|
+
interface IntrinsicElements {
|
|
220
|
+
"nuts-inbox-widget": LocalJSX.NutsInboxWidget & JSXBase.HTMLAttributes<HTMLNutsInboxWidgetElement>;
|
|
221
|
+
"nuts-notification": LocalJSX.NutsNotification & JSXBase.HTMLAttributes<HTMLNutsNotificationElement>;
|
|
222
|
+
"nuts-popover": LocalJSX.NutsPopover & JSXBase.HTMLAttributes<HTMLNutsPopoverElement>;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|