@glycanage/web-components 1.1.0 → 1.2.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.
- package/dist/arthritis.wc.js +1 -1
- package/package.json +1 -1
package/dist/arthritis.wc.js
CHANGED
|
@@ -1 +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};
|
|
1
|
+
var G=Object.defineProperty,H=(e,t,i)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,c=(e,t,i)=>(H(e,typeof t!="symbol"?t+"":t,i),i);function $(){}function P(e){return e()}function z(){return Object.create(null)}function v(e){e.forEach(P)}function C(e){return typeof e=="function"}function T(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function J(e){return Object.keys(e).length===0}function D(e,t,i){e.insertBefore(t,i||null)}function x(e){e.parentNode&&e.parentNode.removeChild(e)}function L(e){return document.createElement(e)}function R(e,t,i){i==null?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function Y(e){return Array.from(e.childNodes)}function u(e,t,i,o){i==null?e.style.removeProperty(t):e.style.setProperty(t,i,o?"important":"")}function q(e){const t={};return e.childNodes.forEach(i=>{t[i.slot||"default"]=!0}),t}let w;function g(e){w=e}const p=[],N=[];let f=[];const M=[],I=Promise.resolve();let _=!1;function K(){_||(_=!0,I.then(y))}function k(e){f.push(e)}const A=new Set;let b=0;function y(){if(b!==0)return;const e=w;do{try{for(;b<p.length;){const t=p[b];b++,g(t),Q(t.$$)}}catch(t){throw p.length=0,b=0,t}for(g(null),p.length=0,b=0;N.length;)N.pop()();for(let t=0;t<f.length;t+=1){const i=f[t];A.has(i)||(A.add(i),i())}f.length=0}while(p.length);for(;M.length;)M.pop()();_=!1,A.clear(),g(e)}function Q(e){if(e.fragment!==null){e.update(),v(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(k)}}function U(e){const t=[],i=[];f.forEach(o=>e.indexOf(o)===-1?t.push(o):i.push(o)),i.forEach(o=>o()),f=t}const V=new Set;function W(e,t){e&&e.i&&(V.delete(e),e.i(t))}function X(e,t,i){const{fragment:o,after_update:r}=e.$$;o&&o.m(t,i),k(()=>{const s=e.$$.on_mount.map(P).filter(C);e.$$.on_destroy?e.$$.on_destroy.push(...s):v(s),e.$$.on_mount=[]}),r.forEach(k)}function Z(e,t){const i=e.$$;i.fragment!==null&&(U(i.after_update),v(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function tt(e,t){e.$$.dirty[0]===-1&&(p.push(e),K(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function et(e,t,i,o,r,s,a,l=[-1]){const d=w;g(e);const n=e.$$={fragment:null,ctx:[],props:s,update:$,not_equal:r,bound:z(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:z(),dirty:l,skip_bound:!1,root:t.target||d.$$.root};a&&a(n.root);let E=!1;if(n.ctx=i?i(e,t.props||{},(h,j,...O)=>{const B=O.length?O[0]:j;return n.ctx&&r(n.ctx[h],n.ctx[h]=B)&&(!n.skip_bound&&n.bound[h]&&n.bound[h](B),E&&tt(e,h)),j}):[],n.update(),E=!0,v(n.before_update),n.fragment=o?o(n.ctx):!1,t.target){if(t.hydrate){const h=Y(t.target);n.fragment&&n.fragment.l(h),h.forEach(x)}else n.fragment&&n.fragment.c();t.intro&&W(e.$$.fragment),X(e,t.target,t.anchor),y()}g(d)}let S;typeof HTMLElement=="function"&&(S=class extends HTMLElement{constructor(e,t,i){super(),c(this,"$$ctor"),c(this,"$$s"),c(this,"$$c"),c(this,"$$cn",!1),c(this,"$$d",{}),c(this,"$$r",!1),c(this,"$$p_d",{}),c(this,"$$l",{}),c(this,"$$l_u",new Map),this.$$ctor=e,this.$$s=t,i&&this.attachShadow({mode:"open"})}addEventListener(e,t,i){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,i)}removeEventListener(e,t,i){if(super.removeEventListener(e,t,i),this.$$c){const o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return()=>{let s;return{c:function(){s=L("slot"),r!=="default"&&R(s,"name",r)},m:function(a,l){D(a,s,l)},d:function(a){a&&x(s)}}}};if(await Promise.resolve(),!this.$$cn)return;const t={},i=q(this);for(const r of this.$$s)r in i&&(t[r]=[e(r)]);for(const r of this.attributes){const s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=m(s,r.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const r in this.$$p_d)if(this.$$d[r]=this.$$c.$$.ctx[this.$$c.$$.props[r]],this.$$p_d[r].reflect){const s=m(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const r in this.$$l)for(const s of this.$$l[r]){const a=this.$$c.$on(r,s);this.$$l_u.set(s,a)}this.$$l={}}}attributeChangedCallback(e,t,i){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=m(e,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 m(e,t,i,o){var r;const s=(r=i[e])==null?void 0:r.type;if(t=s==="Boolean"&&typeof t!="boolean"?t!=null:t,!o||!i[e])return t;if(o==="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 it(e,t,i,o,r,s){let a=class extends S{constructor(){super(e,i,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(d){var n;d=m(l,d,t),this.$$d[l]=d,(n=this.$$c)==null||n.$set({[l]:d})}})}),o.forEach(l=>{Object.defineProperty(a.prototype,l,{get(){var d;return(d=this.$$c)==null?void 0:d[l]}})}),s&&(a=s(a)),e.element=a,a}class ot{constructor(){c(this,"$$"),c(this,"$$set")}$destroy(){Z(this,1),this.$destroy=$}$on(t,i){if(!C(i))return $;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(i),()=>{const r=o.indexOf(i);r!==-1&&o.splice(r,1)}}$set(t){this.$$set&&!J(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const rt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(rt);function st(e){let t;return{c(){t=L("div"),t.innerHTML='<div style="width: 100%; height: 23%; display: flex;"><div style="width: 14%; height: 100%; margin-left: 2.5rem; font-size: 0.8rem; display: flex; align-items: start; justify-content: center; flex-direction: column;">Glycan<br/> <b>Mature</b></div> <div style="width: 86%; height: 100%; position: relative; margin-right: 1rem;"><div id="min" style="position: absolute; top: 34%; left: 1.6%; font-size: 0.7rem; color: #6B8678;"><b>0.081</b></div> <div id="max" style="position: absolute; top: 34%; right: 5.5%; font-size: 0.7rem; color: #6B8678;"><b>0.185</b></div> <div class="middleParent" style="position: absolute; width: 76%; height: 80%; left: 10%; top: 10%;"><div class="xAxis" style="position: absolute; left:0; top:49%; width: 100%; height: 2px; background-color: black; border-radius: 10px; z-index: 9999;"></div> <div class="yAxis" style="position: absolute; left:50%; width: 2px; height: 100%; background-color: black; border-radius: 10px;"></div> <div class="arthritisArea" style="position: absolute;width: 46%; left: 50.6%; top: 5%; height: 90%; background-color: #C8DBD0; border-radius: 0 6px 6px 0;"></div></div></div></div> <div style="width: 100%; height: 23%; display: flex;"><div style="width: 14%; height: 100%; margin-left: 2.5rem; font-size: 0.8rem; display: flex; align-items: start; justify-content: center; flex-direction: column;">Glycan<br/> <b>Median</b></div> <div style="width: 86%; height: 100%; position: relative; margin-right: 1rem;"><div id="min" style="position: absolute; top: 34%; left: 1.6%; font-size: 0.7rem; color: #6B8678;"><b>0.091</b></div> <div id="max" style="position: absolute; top: 34%; right: 5.5%; font-size: 0.7rem; color: #6B8678;"><b>0.216</b></div> <div class="middleParent" style="position: absolute; width: 76%; height: 80%; left: 10%; top: 10%;"><div class="xAxis" style="position: absolute; left:0; top:49%; width: 100%; height: 2px; background-color: black; border-radius: 10px; z-index: 9999;"></div> <div class="yAxis" style="position: absolute; left:50%; width: 2px; height: 100%; background-color: black; border-radius: 10px;"></div> <div class="arthritisArea" style="position: absolute; width: 46%; right: 50%; top: 5%; height: 90%; background-color: #C8DBD0; border-radius: 6px 0 0 6px;"></div></div></div></div> <div style="width: 100%; height: 23%; display: flex;"><div style="width: 14%; height: 100%; margin-left: 2.5rem; font-size: 0.8rem; display: flex; align-items: start; justify-content: center; flex-direction: column;">Glycan<br/> <b>Youth</b></div> <div style="width: 86%; height: 100%; position: relative; margin-right: 1rem;"><div id="min" style="position: absolute; top: 34%; left: 1.6%; font-size: 0.7rem; color: #6B8678;"><b>0.109</b></div> <div id="max" style="position: absolute; top: 34%; right: 5.5%; font-size: 0.7rem; color: #6B8678;"><b>0.175</b></div> <div class="middleParent" style="position: absolute; width: 76%; height: 80%; left: 10%; top: 10%;"><div class="xAxis" style="position: absolute; left:0; top:49%; width: 100%; height: 2px; background-color: black; border-radius: 10px; z-index: 9999;"></div> <div class="yAxis" style="position: absolute; left:50%; width: 2px; height: 100%; background-color: black; border-radius: 10px;"></div> <div class="arthritisArea" style="position: absolute; width: 46%; right: 50%; top: 5%; height: 90%; background-color: #C8DBD0; border-radius: 6px 0 0 6px;"></div></div></div></div> <div style="width: 100%; height: 11%; display: flex; align-items: center; justify-content: center; margin-top: 12px;"><div style="height: 12px; width: 12px; border-radius: 99px; background-color: #C8DBD0; border: 1px solid black; margin-right: 6px;"></div> <div>Rheumatoid arthritis</div> <div style="height: 12px; width: 12px; border-radius: 99px; background-color: #33664D; border: 1px solid black; margin: 0 6px 0 36px;"></div> <div>Your patient</div></div>',u(t,"background-color","#F0F6F5"),u(t,"width","530px"),u(t,"height","230px"),u(t,"border-radius","12px"),u(t,"display","flex"),u(t,"flex-direction","column"),u(t,"justify-content","center"),u(t,"border","2px solid #C8DBD0")},m(i,o){D(i,t,o)},p:$,i:$,o:$,d(i){i&&x(t)}}}function nt(e,t,i){let{language:o}=t,{report:r}=t;return e.$$set=s=>{"language"in s&&i(0,o=s.language),"report"in s&&i(1,r=s.report)},[o,r]}class F extends ot{constructor(t){super(),et(this,t,nt,st,T,{language:0,report:1})}get language(){return this.$$.ctx[0]}set language(t){this.$$set({language:t}),y()}get report(){return this.$$.ctx[1]}set report(t){this.$$set({report:t}),y()}}customElements.define("ga-arthritis",it(F,{language:{},report:{}},[],[],!0));export{F as default};
|