@glycanage/web-components 1.0.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/svelte.js +0 -1
package/dist/arthritis.wc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as p,c,S as h,i as $,f as g,s as w,e as i,t as f,a as o,b as m,d as u,g as v,n as l,h as x}from"./svelte.js";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(p);function _(n){let e,s,a;return{c(){e=i("div"),s=i("span"),a=f(n[0]),o(e,"background-color","#CBDBD1"),o(e,"width","100%"),o(e,"height","100%"),o(e,"border-radius","12px")},m(t,r){m(t,e,r),u(e,s),u(s,a)},p(t,[r]){r&1&&v(a,t[0])},i:l,o:l,d(t){t&&x(e)}}}function b(n,e,s){let{language:a}=e,{report:t}=e;return n.$$set=r=>{"language"in r&&s(1,a=r.language),"report"in r&&s(0,t=r.report)},[t,a]}class d extends h{constructor(e){super(),$(this,e,b,_,w,{language:1,report:0})}get language(){return this.$$.ctx[1]}set language(e){this.$$set({language:e}),g()}get report(){return this.$$.ctx[0]}set report(e){this.$$set({report:e}),g()}}customElements.define("ga-arthritis",c(d,{language:{},report:{}},[],[],!0));export{d 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};
|
package/package.json
CHANGED
package/dist/svelte.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var H=Object.defineProperty,J=(t,e,n)=>e in t?H(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a=(t,e,n)=>(J(t,typeof e!="symbol"?e+"":e,n),n);function b(){}function P(t){return t()}function N(){return Object.create(null)}function m(t){t.forEach(P)}function C(t){return typeof t=="function"}function q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function R(t){return Object.keys(t).length===0}function z(t,e){t.appendChild(e)}function L(t,e,n){t.insertBefore(e,n||null)}function y(t){t.parentNode&&t.parentNode.removeChild(t)}function S(t){return document.createElement(t)}function D(t){return document.createTextNode(t)}function F(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function G(t){return Array.from(t.childNodes)}function I(t,e){e=""+e,t.data!==e&&(t.data=e)}function K(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function Q(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}let _;function p(t){_=t}const l=[],B=[];let f=[];const M=[],U=Promise.resolve();let v=!1;function V(){v||(v=!0,U.then(w))}function x(t){f.push(t)}const E=new Set;let d=0;function w(){if(d!==0)return;const t=_;do{try{for(;d<l.length;){const e=l[d];d++,p(e),W(e.$$)}}catch(e){throw l.length=0,d=0,e}for(p(null),l.length=0,d=0;B.length;)B.pop()();for(let e=0;e<f.length;e+=1){const n=f[e];E.has(n)||(E.add(n),n())}f.length=0}while(l.length);for(;M.length;)M.pop()();v=!1,E.clear(),p(t)}function W(t){if(t.fragment!==null){t.update(),m(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(x)}}function X(t){const e=[],n=[];f.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),f=e}const Y=new Set;function Z(t,e){t&&t.i&&(Y.delete(t),t.i(e))}function tt(t,e,n){const{fragment:r,after_update:s}=t.$$;r&&r.m(e,n),x(()=>{const o=t.$$.on_mount.map(P).filter(C);t.$$.on_destroy?t.$$.on_destroy.push(...o):m(o),t.$$.on_mount=[]}),s.forEach(x)}function et(t,e){const n=t.$$;n.fragment!==null&&(X(n.after_update),m(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function nt(t,e){t.$$.dirty[0]===-1&&(l.push(t),V(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function st(t,e,n,r,s,o,c,$=[-1]){const u=_;p(t);const i=t.$$={fragment:null,ctx:[],props:o,update:b,not_equal:s,bound:N(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:N(),dirty:$,skip_bound:!1,root:e.target||u.$$.root};c&&c(i.root);let k=!1;if(i.ctx=n?n(t,e.props||{},(h,O,...j)=>{const A=j.length?j[0]:O;return i.ctx&&s(i.ctx[h],i.ctx[h]=A)&&(!i.skip_bound&&i.bound[h]&&i.bound[h](A),k&&nt(t,h)),O}):[],i.update(),k=!0,m(i.before_update),i.fragment=r?r(i.ctx):!1,e.target){if(e.hydrate){const h=G(e.target);i.fragment&&i.fragment.l(h),h.forEach(y)}else i.fragment&&i.fragment.c();e.intro&&Z(t.$$.fragment),tt(t,e.target,e.anchor),w()}p(u)}let T;typeof HTMLElement=="function"&&(T=class extends HTMLElement{constructor(t,e,n){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=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let o;return{c:function(){o=S("slot"),s!=="default"&&F(o,"name",s)},m:function(c,$){L(c,o,$)},d:function(c){c&&y(o)}}}};if(await Promise.resolve(),!this.$$cn)return;const e={},n=Q(this);for(const s of this.$$s)s in n&&(e[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:e,$$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,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=g(t,n,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(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function g(t,e,n,r){var s;const o=(s=n[t])==null?void 0:s.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function rt(t,e,n,r,s,o){let c=class extends T{constructor(){super(t,n,s),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map($=>(e[$].attribute||$).toLowerCase())}};return Object.keys(e).forEach($=>{Object.defineProperty(c.prototype,$,{get(){return this.$$c&&$ in this.$$c?this.$$c[$]:this.$$d[$]},set(u){var i;u=g($,u,e),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 ot{constructor(){a(this,"$$"),a(this,"$$set")}$destroy(){et(this,1),this.$destroy=b}$on(e,n){if(!C(n))return b;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}$set(e){this.$$set&&!R(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const it="4";export{it as P,ot as S,K as a,L as b,rt as c,z as d,S as e,w as f,I as g,y as h,st as i,b as n,q as s,D as t};
|