@everymatrix/temporary-consents 1.31.2 → 1.32.4

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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +4 -3
  3. package/dist/cjs/index-51051de1.js +0 -1163
  4. package/dist/cjs/index.cjs.js +0 -2
  5. package/dist/cjs/loader.cjs.js +0 -21
  6. package/dist/cjs/temporary-consents.cjs.entry.js +0 -201
  7. package/dist/cjs/temporary-consents.cjs.js +0 -19
  8. package/dist/collection/collection-manifest.json +0 -12
  9. package/dist/collection/components/temporary-consents/temporary-consents.css +0 -58
  10. package/dist/collection/components/temporary-consents/temporary-consents.js +0 -296
  11. package/dist/collection/components/temporary-consents/temporary-consents.type.js +0 -1
  12. package/dist/collection/index.js +0 -1
  13. package/dist/collection/utils/locale.utils.js +0 -57
  14. package/dist/components/index.d.ts +0 -26
  15. package/dist/components/index.js +0 -1
  16. package/dist/components/temporary-consents.d.ts +0 -11
  17. package/dist/components/temporary-consents.js +0 -225
  18. package/dist/esm/index-0f95c245.js +0 -1138
  19. package/dist/esm/index.js +0 -1
  20. package/dist/esm/loader.js +0 -17
  21. package/dist/esm/polyfills/core-js.js +0 -11
  22. package/dist/esm/polyfills/css-shim.js +0 -1
  23. package/dist/esm/polyfills/dom.js +0 -79
  24. package/dist/esm/polyfills/es5-html-element.js +0 -1
  25. package/dist/esm/polyfills/index.js +0 -34
  26. package/dist/esm/polyfills/system.js +0 -6
  27. package/dist/esm/temporary-consents.entry.js +0 -197
  28. package/dist/esm/temporary-consents.js +0 -17
  29. package/dist/index.cjs.js +0 -1
  30. package/dist/index.js +0 -1
  31. package/dist/stencil.config.js +0 -22
  32. package/dist/temporary-consents/index.esm.js +0 -0
  33. package/dist/temporary-consents/p-0d997674.entry.js +0 -1
  34. package/dist/temporary-consents/p-c8fa79f6.js +0 -1
  35. package/dist/temporary-consents/temporary-consents.esm.js +0 -1
  36. package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/temporary-consents/.stencil/packages/temporary-consents/stencil.config.d.ts +0 -2
  37. package/dist/types/components/temporary-consents/temporary-consents.d.ts +0 -48
  38. package/dist/types/components/temporary-consents/temporary-consents.type.d.ts +0 -6
  39. package/dist/types/components.d.ts +0 -101
  40. package/dist/types/index.d.ts +0 -1
  41. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  42. package/dist/types/utils/locale.utils.d.ts +0 -6
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
@@ -1,197 +0,0 @@
1
- import { r as registerInstance, h } from './index-0f95c245.js';
2
-
3
- const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['en', 'hr'];
5
- let TRANSLATIONS = {
6
- en: {
7
- title: 'Participation conditions',
8
- description: 'Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.',
9
- declineButton: 'Decline and log out',
10
- acceptButton: 'Accept',
11
- loading: 'Please wait, loading...'
12
- },
13
- hr: {
14
- title: 'Uvjeti sudjelovanja',
15
- description: 'Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.',
16
- declineButton: 'Odbijte i odjavite se',
17
- acceptButton: 'Prihvatiti',
18
- loading: 'Molimo pričekajte, učitavanje...'
19
- },
20
- 'es-mx': {
21
- 'title': 'Condiciones de participación',
22
- 'description': 'Importante: Una verificación completa es requerida para poder utilizar nuestra oferta. Si no se verifica, no será posible hacer retiros y la cuenta para realizar apuestas será bloqueada.',
23
- 'declineButton': 'Declinar y salir',
24
- 'acceptButton': 'Aceptar',
25
- 'Loading': 'Espere por favor, Cargando...'
26
- },
27
- 'pt-br': {
28
- 'title': 'Condições de participação',
29
- 'description': 'Importante: É necessária uma verificação completa para poder utilizar a nossa oferta. Se não for verificado, os saques não serão possíveis e a conta de apostas será bloqueada.',
30
- 'declineButton': 'Recusar e sair',
31
- 'acceptButton': 'Aceitar',
32
- 'Loading': 'Espere, por favor, Carregando...'
33
- }
34
- };
35
- const getTranslations = (url) => {
36
- return new Promise((resolve) => {
37
- fetch(url)
38
- .then((res) => res.json())
39
- .then((data) => {
40
- Object.keys(data).forEach((item) => {
41
- for (let key in data[item]) {
42
- TRANSLATIONS[item][key] = data[item][key];
43
- }
44
- });
45
- resolve(true);
46
- });
47
- });
48
- };
49
- const translate = (key, customLang, values) => {
50
- const lang = customLang;
51
- let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
52
- if (values !== undefined) {
53
- for (const [key, value] of Object.entries(values.values)) {
54
- const regex = new RegExp(`{${key}}`, 'g');
55
- translation = translation.replace(regex, value);
56
- }
57
- }
58
- return translation;
59
- };
60
-
61
- const temporaryConsentsCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0}:host{display:block}.TemporaryConsents{max-width:500px;display:flex;gap:35px;flex-direction:column;box-shadow:0px 1px 5px 1px rgba(0, 0, 0, 0.1);padding:20px;font-family:sans-serif}.TemporaryConsentsTitle{text-align:left;font-family:inherit;color:#000;font-weight:400;font-size:18px;display:block;border-bottom:1px solid #000;padding-bottom:10px}.TemporaryConsentsText{font-family:inherit;font-weight:300;font-size:16px}.TemporaryConsentsButtonsWrapper{display:flex;justify-content:space-evenly;gap:50px}.TemporaryConsentsButton{font-family:inherit;font-weight:300;font-size:14px;border:none;padding:10px;min-width:150px;border-radius:4px}.TemporaryConsentsButtonDecline{background-color:transparent;border:1px solid #000}.TemporaryConsentsButtonAccept{color:white;background-color:#000}";
62
-
63
- const TemporaryConsents = class {
64
- constructor(hostRef) {
65
- registerInstance(this, hostRef);
66
- /**
67
- * Client custom styling via inline styles
68
- */
69
- this.clientStyling = '';
70
- /**
71
- * Client custom styling via url
72
- */
73
- this.clientStylingUrl = '';
74
- /**
75
- * Translation via url
76
- */
77
- this.translationUrl = '';
78
- this.stylingAppends = false;
79
- this.isLoading = false;
80
- this.setClientStyling = () => {
81
- let sheet = document.createElement('style');
82
- sheet.innerHTML = this.clientStyling;
83
- this.stylingContainer.prepend(sheet);
84
- };
85
- this.setClientStylingURL = () => {
86
- let url = new URL(this.clientStylingUrl);
87
- let cssFile = document.createElement('style');
88
- fetch(url.href)
89
- .then((res) => res.text())
90
- .then((data) => {
91
- cssFile.innerHTML = data;
92
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
93
- })
94
- .catch((err) => {
95
- console.log('error ', err);
96
- });
97
- };
98
- }
99
- componentWillLoad() {
100
- const promises = [];
101
- if (this.endpoint && this.userId) {
102
- const consentsPromise = this.getConsents().then((consents) => {
103
- this.temporaryAccountConsent = consents.consents.some((consent) => consent.tagCode == 'temporaryaccountconsent');
104
- });
105
- promises.push(consentsPromise);
106
- }
107
- if (this.translationUrl) {
108
- const translationPromise = getTranslations(this.translationUrl);
109
- promises.push(translationPromise);
110
- }
111
- return Promise.all(promises);
112
- }
113
- componentDidRender() {
114
- // start custom styling area
115
- if (!this.stylingAppends && this.stylingContainer) {
116
- if (this.clientStyling)
117
- this.setClientStyling();
118
- if (this.clientStylingUrl)
119
- this.setClientStylingURL();
120
- this.stylingAppends = true;
121
- }
122
- // end custom styling area
123
- }
124
- getConsents() {
125
- const url = new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
126
- const headers = new Headers();
127
- headers.append('X-SessionId', this.sessionId);
128
- headers.append('Accept', 'application/json');
129
- const options = {
130
- method: 'GET',
131
- headers
132
- };
133
- return new Promise((resolve, reject) => {
134
- this.isLoading = true;
135
- fetch(url.href, options)
136
- .then((res) => res.json())
137
- .then((consents) => {
138
- resolve(consents);
139
- }).catch((err) => {
140
- console.error(err);
141
- reject(err);
142
- }).finally(() => {
143
- this.isLoading = false;
144
- });
145
- });
146
- }
147
- setConsents() {
148
- const url = new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);
149
- const headers = new Headers();
150
- headers.append('X-SessionId', this.sessionId);
151
- headers.append('Accept', 'application/json');
152
- headers.append('Content-Type', 'application/json');
153
- const body = {
154
- consents: [{
155
- tagCode: 'temporaryaccountconsent',
156
- note: '',
157
- status: 1
158
- }]
159
- };
160
- const options = {
161
- method: 'POST',
162
- headers,
163
- body: JSON.stringify(body)
164
- };
165
- return new Promise((resolve, reject) => {
166
- this.isLoading = true;
167
- fetch(url.href, options)
168
- .then((res) => res.json())
169
- .then((res) => {
170
- resolve(res);
171
- }).catch((err) => {
172
- console.error(err);
173
- reject(err);
174
- }).finally(() => {
175
- this.isLoading = false;
176
- });
177
- });
178
- }
179
- handleDecline() {
180
- window.postMessage({ type: 'TemporaryConsentsDeclined' }, window.location.href);
181
- }
182
- handleAccept() {
183
- this.setConsents();
184
- window.postMessage({ type: 'TemporaryConsentsAccepted' }, window.location.href);
185
- }
186
- render() {
187
- if (this.temporaryAccountConsent) {
188
- if (this.isLoading) {
189
- return h("p", null, translate('loading', this.lang));
190
- }
191
- return h("div", { class: 'TemporaryConsents', ref: el => this.stylingContainer = el }, h("h2", { class: 'TemporaryConsentsTitle' }, " ", translate('title', this.lang), " "), h("p", { class: 'TemporaryConsentsText' }, " ", translate('description', this.lang, { values: { daysUntilLockout: this.daysUntilLockout } }), " "), h("div", { class: 'TemporaryConsentsButtonsWrapper' }, h("button", { class: 'TemporaryConsentsButton TemporaryConsentsButtonDecline', onClick: () => this.handleDecline() }, translate('declineButton', this.lang)), h("button", { class: 'TemporaryConsentsButton TemporaryConsentsButtonAccept', onClick: this.handleAccept }, translate('acceptButton', this.lang))));
192
- }
193
- }
194
- };
195
- TemporaryConsents.style = temporaryConsentsCss;
196
-
197
- export { TemporaryConsents as temporary_consents };
@@ -1,17 +0,0 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-0f95c245.js';
2
-
3
- /*
4
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
5
- */
6
- const patchBrowser = () => {
7
- const importMeta = import.meta.url;
8
- const opts = {};
9
- if (importMeta !== '') {
10
- opts.resourcesUrl = new URL('.', importMeta).href;
11
- }
12
- return promiseResolve(opts);
13
- };
14
-
15
- patchBrowser().then(options => {
16
- return bootstrapLazy([["temporary-consents",[[1,"temporary-consents",{"endpoint":[513],"userId":[513,"user-id"],"sessionId":[513,"session-id"],"daysUntilLockout":[513,"days-until-lockout"],"lang":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"stylingAppends":[32]}]]]], options);
17
- });
package/dist/index.cjs.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('./cjs/index.cjs.js');
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './esm/index.js';
@@ -1,22 +0,0 @@
1
- import { sass } from '@stencil/sass';
2
- export const config = {
3
- namespace: 'temporary-consents',
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
- };
File without changes
@@ -1 +0,0 @@
1
- import{r as t,h as e}from"./p-c8fa79f6.js";const o=["en","hr"];let n={en:{title:"Participation conditions",description:"Important: Full verification is required in order to be able to use our entire offer. If verification is not completed, it is not possible to withdraw and the betting account will be locked in {daysUntilLockout} days.",declineButton:"Decline and log out",acceptButton:"Accept",loading:"Please wait, loading..."},hr:{title:"Uvjeti sudjelovanja",description:"Važno: Potrebna je potpuna verifikacija kako biste mogli koristiti našu cjelokupnu ponudu. Ako potvrda nije dovršena, nije moguće podići i račun za klađenje bit će zaključan za {daysUntilLockout} dana.",declineButton:"Odbijte i odjavite se",acceptButton:"Prihvatiti",loading:"Molimo pričekajte, učitavanje..."},"es-mx":{title:"Condiciones de participación",description:"Importante: Una verificación completa es requerida para poder utilizar nuestra oferta. Si no se verifica, no será posible hacer retiros y la cuenta para realizar apuestas será bloqueada.",declineButton:"Declinar y salir",acceptButton:"Aceptar",Loading:"Espere por favor, Cargando..."},"pt-br":{title:"Condições de participação",description:"Importante: É necessária uma verificação completa para poder utilizar a nossa oferta. Se não for verificado, os saques não serão possíveis e a conta de apostas será bloqueada.",declineButton:"Recusar e sair",acceptButton:"Aceitar",Loading:"Espere, por favor, Carregando..."}};const i=(t,e,i)=>{const s=e;let a=n[void 0!==s&&o.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const o=new RegExp(`{${t}}`,"g");a=a.replace(o,e)}return a},s=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.isLoading=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}componentWillLoad(){const t=[];if(this.endpoint&&this.userId){const e=this.getConsents().then((t=>{this.temporaryAccountConsent=t.consents.some((t=>"temporaryaccountconsent"==t.tagCode))}));t.push(e)}if(this.translationUrl){const o=(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let o in e[t])n[t][o]=e[t][o]})),t(!0)}))})));t.push(o)}var e;return Promise.all(t)}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}getConsents(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;e.append("X-SessionId",this.sessionId),e.append("Accept","application/json");const o={method:"GET",headers:e};return new Promise(((e,n)=>{this.isLoading=!0,fetch(t.href,o).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{console.error(t),n(t)})).finally((()=>{this.isLoading=!1}))}))}setConsents(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;e.append("X-SessionId",this.sessionId),e.append("Accept","application/json"),e.append("Content-Type","application/json");const o={method:"POST",headers:e,body:JSON.stringify({consents:[{tagCode:"temporaryaccountconsent",note:"",status:1}]})};return new Promise(((e,n)=>{this.isLoading=!0,fetch(t.href,o).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{console.error(t),n(t)})).finally((()=>{this.isLoading=!1}))}))}handleDecline(){window.postMessage({type:"TemporaryConsentsDeclined"},window.location.href)}handleAccept(){this.setConsents(),window.postMessage({type:"TemporaryConsentsAccepted"},window.location.href)}render(){if(this.temporaryAccountConsent)return this.isLoading?e("p",null,i("loading",this.lang)):e("div",{class:"TemporaryConsents",ref:t=>this.stylingContainer=t},e("h2",{class:"TemporaryConsentsTitle"}," ",i("title",this.lang)," "),e("p",{class:"TemporaryConsentsText"}," ",i("description",this.lang,{values:{daysUntilLockout:this.daysUntilLockout}})," "),e("div",{class:"TemporaryConsentsButtonsWrapper"},e("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonDecline",onClick:()=>this.handleDecline()},i("declineButton",this.lang)),e("button",{class:"TemporaryConsentsButton TemporaryConsentsButtonAccept",onClick:this.handleAccept},i("acceptButton",this.lang))))}};s.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0}:host{display:block}.TemporaryConsents{max-width:500px;display:flex;gap:35px;flex-direction:column;box-shadow:0px 1px 5px 1px rgba(0, 0, 0, 0.1);padding:20px;font-family:sans-serif}.TemporaryConsentsTitle{text-align:left;font-family:inherit;color:#000;font-weight:400;font-size:18px;display:block;border-bottom:1px solid #000;padding-bottom:10px}.TemporaryConsentsText{font-family:inherit;font-weight:300;font-size:16px}.TemporaryConsentsButtonsWrapper{display:flex;justify-content:space-evenly;gap:50px}.TemporaryConsentsButton{font-family:inherit;font-weight:300;font-size:14px;border:none;padding:10px;min-width:150px;border-radius:4px}.TemporaryConsentsButtonDecline{background-color:transparent;border:1px solid #000}.TemporaryConsentsButtonAccept{color:white;background-color:#000}";export{s as temporary_consents}
@@ -1 +0,0 @@
1
- let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={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),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=new WeakMap,u=e=>"sc-"+e.o,a={},f=e=>"object"==(e=typeof e)||"function"===e,$=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const i=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?h(null,l):l),o=s)};if(i(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const c=h(e,null);return c.u=t,r.length>0&&(c.$=r),c},h=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),y={},d=(e,t,n,s,r,i)=>{if(n!==s){let c=H(e,t),u=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(c||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((c||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?c=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!c||4&i||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):H(l,u)?u.slice(2):u[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,p=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||a,r=t.u||a;for(l in o)l in r||d(s,l,o[l],void 0,n,t.t);for(l in r)d(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,i=n.$[l],c=0;if(null!==i.i)o=i.m=s.createTextNode(i.i);else if(o=i.m=s.createElement(i.h),b(null,i,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),i.$)for(c=0;c<i.$.length;++c)r=w(t,i,c),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let i,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=r;++o)s[o]&&(i=w(null,l,o),i&&(s[o].m=i,c.insertBefore(i,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,v(l),s.remove())},j=(e,t)=>e.h===t.h,M=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?(b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,i=t.length-1,c=t[0],u=t[i],a=l.length-1,f=l[0],$=l[a];for(;o<=i&&r<=a;)null==c?c=t[++o]:null==u?u=t[--i]:null==f?f=l[++r]:null==$?$=l[--a]:j(c,f)?(M(c,f),c=t[++o],f=l[++r]):j(u,$)?(M(u,$),u=t[--i],$=l[--a]):j(c,$)?(M(c,$),e.insertBefore(c.m,u.m.nextSibling),c=t[++o],$=l[--a]):j(u,f)?(M(u,f),e.insertBefore(u.m,c.m),u=t[--i],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&c.m.parentNode.insertBefore(s,c.m));o>i?S(e,null==l[a+1]?null:l[a+1].m,n,l,r,a):r>a&&g(t,o,i)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},v=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(v)},k=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},C=(e,t)=>{if(e.t|=16,!(4&e.t))return k(e,e.S),Y((()=>O(e,t)));e.t|=512},O=(e,t)=>{const n=e.g;let l;return t&&(l=N(n,"componentWillLoad")),R(l,(()=>P(e,n,t)))},P=async(e,t,n)=>{const l=e.j,o=l["s-rc"];n&&(e=>{const t=e.M,n=e.j,l=t.t,o=((e,t)=>{let n=u(t),l=B.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=c.get(e=e.head||e);o||c.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.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"]=o,n.classList.add(o+"-h"))})(e);x(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>E(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},x=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.j,o=n.M,r=n.v||h(null,null),i=(e=>e&&e.h===y)(l)?l:$(null,null,l);t=s.tagName,o.k&&(i.u=i.u||{},o.k.map((([e,t])=>i.u[t]=s[e]))),i.h=null,i.t|=4,n.v=i,i.m=r.m=s.shadowRoot||s,e=s["s-sc"],M(r,i)})(n,l)}catch(e){V(e,n.j)}return null},E=e=>{const t=e.j,n=e.S;N(e.g,"componentDidRender"),64&e.t||(e.t|=64,T(t),e.C(t),n||L()),e.p&&(e.p(),e.p=void 0),512&e.t&&X((()=>C(e,!1))),e.t&=-517},L=()=>{T(s.documentElement),X((()=>(e=>{const t=o.ce("appload",{detail:{namespace:"temporary-consents"}});return e.dispatchEvent(t),t})(l)))},N=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){V(e)}},R=(e,t)=>e&&e.then?e.then(t):t(),T=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>q(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=q(e),o=s.P.get(t),r=s.t,i=s.g;n=((e,t)=>null==e||f(e)?e:1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),i&&2==(18&r)&&C(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.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.k.push([e,s]),s}))}}return e},A=(e,t={})=>{const n=[],r=t.exclude||[],c=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),h=[];let y,d=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],L:t[3]};l.O=t[2],l.k=[];const s=l.o,a=class extends HTMLElement{constructor(e){super(e),F(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),d?h.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=q(e),n=t.M,l=()=>{};if(!(1&t.t)){t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(t,t.S=n);break}}n.O&&Object.entries(n.O).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||(W(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){V(e)}t.t&=-9,e()}if(s.style){let e=s.style;const t=u(n);if(!B.has(t)){const l=()=>{};((e,t,n)=>{let l=B.get(e);i&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,B.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.S,r=()=>C(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return q(this).N}};l.R=e[0],r.includes(s)||c.get(s)||(n.push(s),c.define(s,W(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),d=!1,h.length?h.map((e=>e.connectedCallback())):o.jmp((()=>y=setTimeout(L,30)))},U=new WeakMap,q=e=>U.get(e),D=(e,t)=>U.set(t.g=e,t),F=(e,t)=>{const n={t:0,j:e,M:t,P:new Map};return n.N=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],U.set(e,n)},H=(e,t)=>t in e,V=(e,t)=>(0,console.error)(e,t),_=new Map,z=e=>{const t=e.o.replace(/-/g,"_"),n=e.R,l=_.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(_.set(n,e),e[t])),V)},B=new Map,G=[],I=[],J=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?X(Q):o.raf(Q))},K=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){V(e)}e.length=0},Q=()=>{K(G),K(I),(n=G.length>0)&&o.raf(Q)},X=e=>r().then(e),Y=J(I,!0);export{A as b,$ as h,r as p,D as r}
@@ -1 +0,0 @@
1
- import{p as n,b as t}from"./p-c8fa79f6.js";(()=>{const t=import.meta.url,s={};return""!==t&&(s.resourcesUrl=new URL(".",t).href),n(s)})().then((n=>t([["p-0d997674",[[1,"temporary-consents",{endpoint:[513],userId:[513,"user-id"],sessionId:[513,"session-id"],daysUntilLockout:[513,"days-until-lockout"],lang:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],stylingAppends:[32]}]]]],n)));
@@ -1,2 +0,0 @@
1
- import { Config } from '../../../../../../../../../../../stencil-public-runtime';
2
- export declare const config: Config;
@@ -1,48 +0,0 @@
1
- import { Consent } from './temporary-consents.type';
2
- export declare class TemporaryConsents {
3
- /**
4
- * The NWA endpoint
5
- */
6
- endpoint: string;
7
- /**
8
- * The NWA user id
9
- */
10
- userId: string;
11
- /**
12
- * The NWA session for the logged in user
13
- */
14
- sessionId: string;
15
- /**
16
- * The language of the integrator
17
- */
18
- daysUntilLockout: string;
19
- /**
20
- * The language of the integrator
21
- */
22
- lang: string;
23
- /**
24
- * Client custom styling via inline styles
25
- */
26
- clientStyling: string;
27
- /**
28
- * Client custom styling via url
29
- */
30
- clientStylingUrl: string;
31
- /**
32
- * Translation via url
33
- */
34
- translationUrl: string;
35
- private stylingAppends;
36
- isLoading: boolean;
37
- temporaryAccountConsent: boolean;
38
- private stylingContainer;
39
- componentWillLoad(): Promise<any[]>;
40
- componentDidRender(): void;
41
- getConsents(): Promise<Consent>;
42
- setConsents(): Promise<any>;
43
- handleDecline(): void;
44
- handleAccept(): void;
45
- setClientStyling: () => void;
46
- setClientStylingURL: () => void;
47
- render(): any;
48
- }
@@ -1,6 +0,0 @@
1
- export interface Consent {
2
- userID?: number;
3
- tagCode: string;
4
- consentTypeId?: number;
5
- status: number;
6
- }
@@ -1,101 +0,0 @@
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
- export namespace Components {
9
- interface TemporaryConsents {
10
- /**
11
- * Client custom styling via inline styles
12
- */
13
- "clientStyling": string;
14
- /**
15
- * Client custom styling via url
16
- */
17
- "clientStylingUrl": string;
18
- /**
19
- * The language of the integrator
20
- */
21
- "daysUntilLockout": string;
22
- /**
23
- * The NWA endpoint
24
- */
25
- "endpoint": string;
26
- /**
27
- * The language of the integrator
28
- */
29
- "lang": string;
30
- /**
31
- * The NWA session for the logged in user
32
- */
33
- "sessionId": string;
34
- /**
35
- * Translation via url
36
- */
37
- "translationUrl": string;
38
- /**
39
- * The NWA user id
40
- */
41
- "userId": string;
42
- }
43
- }
44
- declare global {
45
- interface HTMLTemporaryConsentsElement extends Components.TemporaryConsents, HTMLStencilElement {
46
- }
47
- var HTMLTemporaryConsentsElement: {
48
- prototype: HTMLTemporaryConsentsElement;
49
- new (): HTMLTemporaryConsentsElement;
50
- };
51
- interface HTMLElementTagNameMap {
52
- "temporary-consents": HTMLTemporaryConsentsElement;
53
- }
54
- }
55
- declare namespace LocalJSX {
56
- interface TemporaryConsents {
57
- /**
58
- * Client custom styling via inline styles
59
- */
60
- "clientStyling"?: string;
61
- /**
62
- * Client custom styling via url
63
- */
64
- "clientStylingUrl"?: string;
65
- /**
66
- * The language of the integrator
67
- */
68
- "daysUntilLockout"?: string;
69
- /**
70
- * The NWA endpoint
71
- */
72
- "endpoint": string;
73
- /**
74
- * The language of the integrator
75
- */
76
- "lang"?: string;
77
- /**
78
- * The NWA session for the logged in user
79
- */
80
- "sessionId": string;
81
- /**
82
- * Translation via url
83
- */
84
- "translationUrl"?: string;
85
- /**
86
- * The NWA user id
87
- */
88
- "userId": string;
89
- }
90
- interface IntrinsicElements {
91
- "temporary-consents": TemporaryConsents;
92
- }
93
- }
94
- export { LocalJSX as JSX };
95
- declare module "@stencil/core" {
96
- export namespace JSX {
97
- interface IntrinsicElements {
98
- "temporary-consents": LocalJSX.TemporaryConsents & JSXBase.HTMLAttributes<HTMLTemporaryConsentsElement>;
99
- }
100
- }
101
- }
@@ -1 +0,0 @@
1
- export * from './components';