@glycanage/web-components 0.0.0-development → 1.1.0

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 @@
1
+ var I=Object.defineProperty,K=(e,t,n)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t,n)=>(K(e,typeof t!="symbol"?t+"":t,n),n);function w(){}function T(e){return e()}function D(){return Object.create(null)}function k(e){e.forEach(T)}function H(e){return typeof e=="function"}function Q(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function U(e){return Object.keys(e).length===0}function l(e,t){e.appendChild(t)}function J(e,t,n){e.insertBefore(t,n||null)}function P(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e){return document.createElement(e)}function q(e){return document.createTextNode(e)}function d(){return q(" ")}function V(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function W(e){return Array.from(e.childNodes)}function X(e,t){t=""+t,e.data!==t&&(e.data=t)}function C(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function Y(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let L;function E(e){L=e}const m=[],R=[];let g=[];const z=[],Z=Promise.resolve();let B=!1;function tt(){B||(B=!0,Z.then(O))}function S(e){g.push(e)}const M=new Set;let b=0;function O(){if(b!==0)return;const e=L;do{try{for(;b<m.length;){const t=m[b];b++,E(t),et(t.$$)}}catch(t){throw m.length=0,b=0,t}for(E(null),m.length=0,b=0;R.length;)R.pop()();for(let t=0;t<g.length;t+=1){const n=g[t];M.has(n)||(M.add(n),n())}g.length=0}while(m.length);for(;z.length;)z.pop()();B=!1,M.clear(),E(e)}function et(e){if(e.fragment!==null){e.update(),k(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(S)}}function nt(e){const t=[],n=[];g.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),g=t}const rt=new Set;function ot(e,t){e&&e.i&&(rt.delete(e),e.i(t))}function st(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),S(()=>{const s=e.$$.on_mount.map(T).filter(H);e.$$.on_destroy?e.$$.on_destroy.push(...s):k(s),e.$$.on_mount=[]}),o.forEach(S)}function it(e,t){const n=e.$$;n.fragment!==null&&(nt(n.after_update),k(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function $t(e,t){e.$$.dirty[0]===-1&&(m.push(e),tt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ct(e,t,n,r,o,s,c,$=[-1]){const u=L;E(e);const i=e.$$={fragment:null,ctx:[],props:s,update:w,not_equal:o,bound:D(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:D(),dirty:$,skip_bound:!1,root:t.target||u.$$.root};c&&c(i.root);let _=!1;if(i.ctx=n?n(e,t.props||{},(a,y,...f)=>{const x=f.length?f[0]:y;return i.ctx&&o(i.ctx[a],i.ctx[a]=x)&&(!i.skip_bound&&i.bound[a]&&i.bound[a](x),_&&$t(e,a)),y}):[],i.update(),_=!0,k(i.before_update),i.fragment=r?r(i.ctx):!1,t.target){if(t.hydrate){const a=W(t.target);i.fragment&&i.fragment.l(a),a.forEach(P)}else i.fragment&&i.fragment.c();t.intro&&ot(e.$$.fragment),st(e,t.target,t.anchor),O()}E(u)}let F;typeof HTMLElement=="function"&&(F=class extends HTMLElement{constructor(e,t,n){super(),h(this,"$$ctor"),h(this,"$$s"),h(this,"$$c"),h(this,"$$cn",!1),h(this,"$$d",{}),h(this,"$$r",!1),h(this,"$$p_d",{}),h(this,"$$l",{}),h(this,"$$l_u",new Map),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return()=>{let s;return{c:function(){s=p("slot"),o!=="default"&&V(s,"name",o)},m:function(c,$){J(c,s,$)},d:function(c){c&&P(s)}}}};if(await Promise.resolve(),!this.$$cn)return;const t={},n=Y(this);for(const o of this.$$s)o in n&&(t[o]=[e(o)]);for(const o of this.attributes){const s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=j(s,o.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const r=()=>{this.$$r=!0;for(const o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){const s=j(o,this.$$d[o],this.$$p_d,"toAttribute");s==null?this.removeAttribute(o):this.setAttribute(this.$$p_d[o].attribute||o,s)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const o in this.$$l)for(const s of this.$$l[o]){const c=this.$$c.$on(o,s);this.$$l_u.set(s,c)}this.$$l={}}}attributeChangedCallback(e,t,n){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=j(e,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function j(e,t,n,r){var o;const s=(o=n[e])==null?void 0:o.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(s){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(s){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ut(e,t,n,r,o,s){let c=class extends F{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map($=>(t[$].attribute||$).toLowerCase())}};return Object.keys(t).forEach($=>{Object.defineProperty(c.prototype,$,{get(){return this.$$c&&$ in this.$$c?this.$$c[$]:this.$$d[$]},set(u){var i;u=j($,u,t),this.$$d[$]=u,(i=this.$$c)==null||i.$set({[$]:u})}})}),r.forEach($=>{Object.defineProperty(c.prototype,$,{get(){var u;return(u=this.$$c)==null?void 0:u[$]}})}),s&&(c=s(c)),e.element=c,c}class lt{constructor(){h(this,"$$"),h(this,"$$set")}$destroy(){it(this,1),this.$destroy=w}$on(t,n){if(!H(n))return w;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!U(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const at="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(at);function ht(e){let t,n,r,o,s,c,$,u,i,_,a,y,f,x,A;return{c(){t=p("div"),n=p("span"),r=q(e[0]),o=d(),s=p("p"),s.textContent="lorem ipsum lorem ipsum lorem ipsum lorem ipsum",c=d(),$=p("p"),$.textContent="lorem ipsum lorem ipsum lorem ipsum lorem ipsum",u=d(),i=p("p"),i.textContent="lorem ipsum lorem ipsum lorem ipsum lorem ipsum",_=d(),a=p("p"),a.textContent="lorem ipsum lorem ipsum lorem ipsum lorem ipsum",y=d(),f=p("p"),f.textContent="lorem ipsum lorem ipsum lorem ipsum lorem ipsum",x=d(),A=p("p"),A.textContent="lorem ipsum lorem ipsum lorem ipsum lorem ipsum",C(t,"background-color","#CBDBD1"),C(t,"width","400px"),C(t,"height","210px"),C(t,"border-radius","12px")},m(v,N){J(v,t,N),l(t,n),l(n,r),l(t,o),l(t,s),l(t,c),l(t,$),l(t,u),l(t,i),l(t,_),l(t,a),l(t,y),l(t,f),l(t,x),l(t,A)},p(v,[N]){N&1&&X(r,v[0])},i:w,o:w,d(v){v&&P(t)}}}function pt(e,t,n){let{language:r}=t,{report:o}=t;return e.$$set=s=>{"language"in s&&n(1,r=s.language),"report"in s&&n(0,o=s.report)},[o,r]}class G extends lt{constructor(t){super(),ct(this,t,pt,ht,Q,{language:1,report:0})}get language(){return this.$$.ctx[1]}set language(t){this.$$set({language:t}),O()}get report(){return this.$$.ctx[0]}set report(t){this.$$set({report:t}),O()}}customElements.define("ga-arthritis",ut(G,{language:{},report:{}},[],[],!0));export{G as default};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- const t=()=>{import("./overlap-list.wc.js"),import("./language.interface.js")};export{t as default};
1
+ const t=()=>{import("./arthritis.wc.js"),import("./language.interface.js")};export{t as default};
package/dist/init.js CHANGED
@@ -1 +1 @@
1
- function i(){}export{i as init};
1
+ class e{getReport(i){return Promise.resolve(!0)}}function n(){window.GaWebComponentService=new e}export{n as init};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@glycanage/web-components",
3
3
  "description": "A collection of web-components",
4
- "version": "0.0.0-development",
4
+ "version": "1.1.0",
5
5
  "type": "module",
6
6
  "main": "dist/lib/@glycanage/web-components.js",
7
7
  "scripts": {
@@ -46,7 +46,7 @@
46
46
  ],
47
47
  "repository": {
48
48
  "type": "git",
49
- "url": "https://github.com/glycanage/web-components.git"
49
+ "url": "https://github.com/GlycanAge/ga-components.git"
50
50
  },
51
51
  "release": {
52
52
  "branches": [
@@ -1 +0,0 @@
1
- import{P as y,c as E,S as N,i as P,f as d,s as q,e as h,a as B,b as v,n as m,d as $,g as C,h as u,t as w,j as b,k as _,l as p,m as x}from"./svelte.js";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(y);function S(l,a,r){const t=l.slice();return t[3]=a[r],t}function j(l){let a,r,t=l[0][l[3].label]+"",n,s,e,g=l[0][l[3].overlap]+"",c,f;return{c(){a=u("div"),r=u("span"),n=w(t),s=b(),e=u("span"),c=w(g),f=b(),_(r,"class","label"),_(e,"class","overlap overlap-"+l[3].overlap)},m(o,i){v(o,a,i),p(a,r),p(r,n),p(a,s),p(a,e),p(e,c),p(a,f)},p(o,i){i&1&&t!==(t=o[0][o[3].label]+"")&&x(n,t),i&1&&g!==(g=o[0][o[3].overlap]+"")&&x(c,g)},d(o){o&&$(a)}}}function I(l){let a,r=h(l[1]),t=[];for(let n=0;n<r.length;n+=1)t[n]=j(S(l,r,n));return{c(){for(let n=0;n<t.length;n+=1)t[n].c();a=B()},m(n,s){for(let e=0;e<t.length;e+=1)t[e]&&t[e].m(n,s);v(n,a,s)},p(n,[s]){if(s&3){r=h(n[1]);let e;for(e=0;e<r.length;e+=1){const g=S(n,r,e);t[e]?t[e].p(g,s):(t[e]=j(g),t[e].c(),t[e].m(a.parentNode,a))}for(;e<t.length;e+=1)t[e].d(1);t.length=r.length}},i:m,o:m,d(n){n&&$(a),C(t,n)}}}function L(l,a,r){let{language:t}=a,{report:n}=a;const s=[];return l.$$set=e=>{"language"in e&&r(0,t=e.language),"report"in e&&r(2,n=e.report)},[t,s,n]}class k extends N{constructor(a){super(),P(this,a,L,I,q,{language:0,report:2})}get language(){return this.$$.ctx[0]}set language(a){this.$$set({language:a}),d()}get report(){return this.$$.ctx[2]}set report(a){this.$$set({report:a}),d()}}customElements.define("ga-overlap-list",E(k,{language:{},report:{}},[],[],!0));export{k as default};
package/dist/svelte.js DELETED
@@ -1 +0,0 @@
1
- var q=Object.defineProperty,R=(t,n,e)=>n in t?q(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,a=(t,n,e)=>(R(t,typeof n!="symbol"?n+"":n,e),e);function b(){}function P(t){return t()}function C(){return Object.create(null)}function m(t){t.forEach(P)}function L(t){return typeof t=="function"}function z(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}function D(t){return Object.keys(t).length===0}function F(t,n){t.appendChild(n)}function S(t,n,e){t.insertBefore(n,e||null)}function _(t){t.parentNode&&t.parentNode.removeChild(t)}function G(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}function B(t){return document.createElement(t)}function y(t){return document.createTextNode(t)}function I(){return y(" ")}function K(){return y("")}function M(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function Q(t){return Array.from(t.childNodes)}function U(t,n){n=""+n,t.data!==n&&(t.data=n)}function V(t){const n={};return t.childNodes.forEach(e=>{n[e.slot||"default"]=!0}),n}let v;function p(t){v=t}const l=[],T=[];let f=[];const H=[],W=Promise.resolve();let x=!1;function X(){x||(x=!0,W.then(w))}function E(t){f.push(t)}const k=new Set;let d=0;function w(){if(d!==0)return;const t=v;do{try{for(;d<l.length;){const n=l[d];d++,p(n),Y(n.$$)}}catch(n){throw l.length=0,d=0,n}for(p(null),l.length=0,d=0;T.length;)T.pop()();for(let n=0;n<f.length;n+=1){const e=f[n];k.has(e)||(k.add(e),e())}f.length=0}while(l.length);for(;H.length;)H.pop()();x=!1,k.clear(),p(t)}function Y(t){if(t.fragment!==null){t.update(),m(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(E)}}function Z(t){const n=[],e=[];f.forEach(r=>t.indexOf(r)===-1?n.push(r):e.push(r)),e.forEach(r=>r()),f=n}const tt=new Set;function nt(t,n){t&&t.i&&(tt.delete(t),t.i(n))}function et(t){return t?.length!==void 0?t:Array.from(t)}function st(t,n,e){const{fragment:r,after_update:s}=t.$$;r&&r.m(n,e),E(()=>{const o=t.$$.on_mount.map(P).filter(L);t.$$.on_destroy?t.$$.on_destroy.push(...o):m(o),t.$$.on_mount=[]}),s.forEach(E)}function rt(t,n){const e=t.$$;e.fragment!==null&&(Z(e.after_update),m(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function ot(t,n){t.$$.dirty[0]===-1&&(l.push(t),X(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function it(t,n,e,r,s,o,c,$=[-1]){const u=v;p(t);const i=t.$$={fragment:null,ctx:[],props:o,update:b,not_equal:s,bound:C(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(u?u.$$.context:[])),callbacks:C(),dirty:$,skip_bound:!1,root:n.target||u.$$.root};c&&c(i.root);let A=!1;if(i.ctx=e?e(t,n.props||{},(h,O,...j)=>{const N=j.length?j[0]:O;return i.ctx&&s(i.ctx[h],i.ctx[h]=N)&&(!i.skip_bound&&i.bound[h]&&i.bound[h](N),A&&ot(t,h)),O}):[],i.update(),A=!0,m(i.before_update),i.fragment=r?r(i.ctx):!1,n.target){if(n.hydrate){const h=Q(n.target);i.fragment&&i.fragment.l(h),h.forEach(_)}else i.fragment&&i.fragment.c();n.intro&&nt(t.$$.fragment),st(t,n.target,n.anchor),w()}p(u)}let J;typeof HTMLElement=="function"&&(J=class extends HTMLElement{constructor(t,n,e){super(),a(this,"$$ctor"),a(this,"$$s"),a(this,"$$c"),a(this,"$$cn",!1),a(this,"$$d",{}),a(this,"$$r",!1),a(this,"$$p_d",{}),a(this,"$$l",{}),a(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=n,e&&this.attachShadow({mode:"open"})}addEventListener(t,n,e){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const r=this.$$c.$on(t,n);this.$$l_u.set(n,r)}super.addEventListener(t,n,e)}removeEventListener(t,n,e){if(super.removeEventListener(t,n,e),this.$$c){const r=this.$$l_u.get(n);r&&(r(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let o;return{c:function(){o=B("slot"),s!=="default"&&M(o,"name",s)},m:function(c,$){S(c,o,$)},d:function(c){c&&_(o)}}}};if(await Promise.resolve(),!this.$$cn)return;const n={},e=V(this);for(const s of this.$$s)s in e&&(n[s]=[t(s)]);for(const s of this.attributes){const o=this.$$g_p(s.name);o in this.$$d||(this.$$d[o]=g(o,s.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const r=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const o=g(s,this.$$d[s],this.$$p_d,"toAttribute");o==null?this.removeAttribute(s):this.setAttribute(this.$$p_d[s].attribute||s,o)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const s in this.$$l)for(const o of this.$$l[s]){const c=this.$$c.$on(s,o);this.$$l_u.set(o,c)}this.$$l={}}}attributeChangedCallback(t,n,e){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=g(t,e,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function g(t,n,e,r){var s;const o=(s=e[t])==null?void 0:s.type;if(n=o==="Boolean"&&typeof n!="boolean"?n!=null:n,!r||!e[t])return n;if(r==="toAttribute")switch(o){case"Object":case"Array":return n==null?null:JSON.stringify(n);case"Boolean":return n?"":null;case"Number":return n??null;default:return n}else switch(o){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":return n;case"Number":return n!=null?+n:n;default:return n}}function $t(t,n,e,r,s,o){let c=class extends J{constructor(){super(t,e,s),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map($=>(n[$].attribute||$).toLowerCase())}};return Object.keys(n).forEach($=>{Object.defineProperty(c.prototype,$,{get(){return this.$$c&&$ in this.$$c?this.$$c[$]:this.$$d[$]},set(u){var i;u=g($,u,n),this.$$d[$]=u,(i=this.$$c)==null||i.$set({[$]:u})}})}),r.forEach($=>{Object.defineProperty(c.prototype,$,{get(){var u;return(u=this.$$c)==null?void 0:u[$]}})}),o&&(c=o(c)),t.element=c,c}class ct{constructor(){a(this,"$$"),a(this,"$$set")}$destroy(){rt(this,1),this.$destroy=b}$on(n,e){if(!L(e))return b;const r=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return r.push(e),()=>{const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}$set(n){this.$$set&&!D(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}const ut="4";export{ut as P,ct as S,K as a,S as b,$t as c,_ as d,et as e,w as f,G as g,B as h,it as i,I as j,M as k,F as l,U as m,b as n,z as s,y as t};