@glycanage/web-components 1.209.0 → 1.210.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
+ import{c as D,S as M,i as W,f as A,s as H,e as E,b as I,n as F,p as z,g as k,q as O,u as $,k as P,o as V,A as Z}from"./index2.js";import{g as j}from"./globals.js";import{i as q}from"./index3.js";import{s as J}from"./helpers.js";const{document:K}=j;function Q(a){let e,r,l;return{c(){e=E("div"),r=I(),l=E("link"),F(e,"width","100%"),F(e,"height","100%"),F(e,"position","relative"),z(l,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),z(l,"rel","stylesheet")},m(o,m){k(o,e,m),a[5](e),k(o,r,m),O(K.head,l)},p:$,i:$,o:$,d(o){o&&(P(e),P(r)),a[5](null),P(l)}}}const h="#008F8C",U="rgba(0,143,140,0.35)";function X(a,e,r){let l,{type:o}=e,{lang:m}=e,{service:u=window.GaReportService}=e,G=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],g,T,v=0,c=0,i={},w="",p=0,x;const f=G.find(t=>t.name===o);function N(){x&&(i=q(x,null,{devicePixelRatio:4,renderer:"svg"}));const t=x.getBoundingClientRect();var y={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"#FFFFFF",grid:{top:36,left:64,right:32,bottom:52},dataset:[{source:T.data.map(d=>[d.x,d.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Chronological age",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[18,0,0,0]},nameLocation:"middle",axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!0,color:"#7A8794",fontSize:10,opacity:1,formatter(d){return d===0||d===100?"":d}},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},yAxis:{min:0,max:.6,name:"Biological age",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[0,0,28,0]},nameLocation:"middle",nameRotate:90,axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},series:[{type:"scatter",tooltip:{},symbolSize:5,itemStyle:{color:U,opacity:1,borderWidth:1}},{name:"Result",type:"scatter",data:[{x:p,y:c}],itemStyle:{color:h},symbolSize:8}],graphic:[],legend:{show:!1}};i.setOption(y),y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",p),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",p),y2:i.convertToPixel("yAxis",c)},style:{stroke:h,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",c),x2:i.convertToPixel("xAxis",p),y2:i.convertToPixel("yAxis",c)},style:{stroke:h,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",p),cy:i.convertToPixel("yAxis",c),r:4},style:{fill:h,stroke:"#FFFFFF",lineWidth:1.5},z:15});const C=i.convertToPixel("xAxis",p),L=i.convertToPixel("yAxis",c),s=document.createElementNS("http://www.w3.org/2000/svg","svg"),n=document.createElement("div");s.setAttribute("width","80"),s.setAttribute("height","28"),s.setAttribute("viewBox","0 0 71 32"),s.setAttribute("fill","none"),s.setAttribute("xmlns","http://www.w3.org/2000/svg");const S=document.createElementNS("http://www.w3.org/2000/svg","path");S.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),S.setAttribute("fill",h);const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),b.setAttribute("fill",h),s.appendChild(S),s.appendChild(b),s.style.position="absolute",s.style.left=`${t.left+C+2}px`,s.style.top=`${t.top+L-14}px`,s.style.zIndex="8",n.innerText=l,n.style.position="absolute",n.style.left=`${t.left+C+20}px`,n.style.top=`${t.top+L-8}px`,n.style.font="bold 11px sans-serif",n.style.color="white",n.style.zIndex="999",n.style.fontFamily="Sen",n.style.paddingLeft="4px",document.body.appendChild(n),document.body.appendChild(s),i.setOption(y)}V(async()=>{g=await u.getReport(),w=g.sex,T=await u.getScatterData(o,w),await u.getLineData(o,w),p=Number(g.chronologicalage),f&&(r(4,v=Number(g[f.csvPerc])),c=Number(g[f.csvScore])),N()});function R(t){Z[t?"unshift":"push"](()=>{x=t,r(0,x)})}return a.$$set=t=>{"type"in t&&r(1,o=t.type),"lang"in t&&r(2,m=t.lang),"service"in t&&r(3,u=t.service)},a.$$.update=()=>{a.$$.dirty&16&&(l=(()=>{const t=Math.round(v||0),y=J(t,"english");return`${t}${y} pct`})())},[x,o,m,u,v,R]}class B extends M{constructor(e){super(),W(this,e,X,Q,H,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),A()}get lang(){return this.$$.ctx[2]}set lang(e){this.$$set({lang:e}),A()}get service(){return this.$$.ctx[3]}set service(e){this.$$set({service:e}),A()}}customElements.define("ga-biological-age-rank-scatter",D(B,{type:{},lang:{},service:{}},[],[],!1));export{B as default};
@@ -0,0 +1 @@
1
+ import{c as D,S as W,i as I,f as P,s as H,e as E,b as O,n as T,p as z,g as G,q as V,u as N,k as C,o as Z,A as q}from"./index2.js";import{g as j}from"./globals.js";import{i as J}from"./index3.js";const{document:K}=j;function Q(m){let t,r,x;return{c(){t=E("div"),r=O(),x=E("link"),T(t,"width","100%"),T(t,"height","100%"),T(t,"position","relative"),z(x,"href","https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap"),z(x,"rel","stylesheet")},m(l,v){G(l,t,v),m[5](t),G(l,r,v),V(K.head,x)},p:N,i:N,o:N,d(l){l&&(C(t),C(r)),m[5](null),C(x)}}}const g="#008F8C",U="rgba(0,143,140,0.35)";function Y(m,t,r){let x,{type:l}=t,{lang:v}=t,{service:w=window.GaReportService}=t,B=[{name:"mature",csvPerc:"G0percentile",csvScore:"G0yourscore"},{name:"youth",csvPerc:"G2percentile",csvScore:"G2yourscore"},{name:"shield",csvPerc:"Spercentile",csvScore:"Syourscore"},{name:"lifestyle",csvPerc:"Bpercentile",csvScore:"Byourscore"},{name:"median",csvPerc:"G1percentile",csvScore:"G1yourscore"}],p,L,s=0,a=null,i={},S="",u=0,d;const F=B.find(e=>e.name===l);function R(){d&&(i=J(d,null,{devicePixelRatio:4,renderer:"svg"}));const e=d.getBoundingClientRect();var y={textStyle:{fontFamily:"Sen, sans serif"},animation:!1,backgroundColor:"#FFFFFF",grid:{top:36,left:64,right:32,bottom:52},dataset:[{source:L.data.map(h=>[h.x,h.y])}],tooltip:{show:!1},xAxis:{min:0,max:100,interval:20,name:"Chronological age",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[18,0,0,0]},nameLocation:"middle",axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!0,color:"#7A8794",fontSize:10,opacity:1,formatter(h){return h===0||h===100?"":h}},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},yAxis:{min:0,max:.6,name:"Index score",nameTextStyle:{color:"#4F5B67",opacity:.9,fontSize:10,padding:[0,0,28,0]},nameLocation:"middle",nameRotate:90,axisLine:{show:!0,lineStyle:{color:"#E0E3E6",width:1},symbol:["none","none"]},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!0,lineStyle:{color:"#F0F2F4"}}},series:[{type:"scatter",tooltip:{},symbolSize:5,itemStyle:{color:U,opacity:1,borderWidth:1}},{name:"Result",type:"scatter",data:a!==null&&Number.isFinite(s)&&s>0?[{x:u,y:s}]:[],itemStyle:{color:g},symbolSize:8}],graphic:[],legend:{show:!1}};i.setOption(y);const o=a!==null&&Number.isFinite(s)&&s>0;o&&(y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",u),y1:i.convertToPixel("yAxis",0),x2:i.convertToPixel("xAxis",u),y2:i.convertToPixel("yAxis",s)},style:{stroke:g,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({type:"line",shape:{x1:i.convertToPixel("xAxis",0),y1:i.convertToPixel("yAxis",s),x2:i.convertToPixel("xAxis",u),y2:i.convertToPixel("yAxis",s)},style:{stroke:g,lineDash:[8,8],lineWidth:2},z:8}),y.graphic.push({name:"Measured result",type:"circle",shape:{cx:i.convertToPixel("xAxis",u),cy:i.convertToPixel("yAxis",s),r:4},style:{fill:g,stroke:"#FFFFFF",lineWidth:1.5},z:15}));const b=o?i.convertToPixel("xAxis",u):0,f=o?i.convertToPixel("yAxis",s):0,n=document.createElementNS("http://www.w3.org/2000/svg","svg"),c=document.createElement("div");n.setAttribute("width","80"),n.setAttribute("height","28"),n.setAttribute("viewBox","0 0 71 32"),n.setAttribute("fill","none"),n.setAttribute("xmlns","http://www.w3.org/2000/svg");const A=document.createElementNS("http://www.w3.org/2000/svg","path");A.setAttribute("d","M7 4C7 1.79086 8.79086 0 11 0H67C69.2091 0 71 1.79086 71 4V28C71 30.2091 69.2091 32 67 32H11C8.79086 32 7 30.2091 7 28V4Z"),A.setAttribute("fill",g);const $=document.createElementNS("http://www.w3.org/2000/svg","path");$.setAttribute("d","M1.13333 17.6C0.0666666 16.8 0.0666666 15.2 1.13333 14.4L7 10L7 22L1.13333 17.6Z"),$.setAttribute("fill",g),n.appendChild(A),n.appendChild($),n.style.position="absolute",n.style.left=o?`${e.left+b+2}px`:"-9999px",n.style.top=o?`${e.top+f-14}px`:"-9999px",n.style.zIndex="8",c.innerText=x,c.style.position="absolute",c.style.left=o?`${e.left+b+20}px`:"-9999px",c.style.top=o?`${e.top+f-8}px`:"-9999px",c.style.font="bold 11px sans-serif",c.style.color="white",c.style.zIndex="999",c.style.fontFamily="Sen",c.style.paddingLeft="4px",document.body.appendChild(c),document.body.appendChild(n),i.setOption(y)}Z(async()=>{p=await w.getReport(),S=p.sex,L=await w.getScatterData(l,S),await w.getLineData(l,S),u=Number(p.chronologicalage),F&&(Number(p[F.csvPerc]),s=Number(p[F.csvScore]));const e=Number(p?.G0yourscore??0),y=Number(p?.G2yourscore??0);if(Number.isFinite(e)&&e!==0&&Number.isFinite(y)){const o=y/e;if(Number.isFinite(o)&&o>0){r(4,a=o);const b=0,f=.6;s=Math.min(Math.max(o,b),f)}else r(4,a=null)}else r(4,a=null);R()});function M(e){q[e?"unshift":"push"](()=>{d=e,r(0,d)})}return m.$$set=e=>{"type"in e&&r(1,l=e.type),"lang"in e&&r(2,v=e.lang),"service"in e&&r(3,w=e.service)},m.$$.update=()=>{m.$$.dirty&16&&(x=a!==null&&Number.isFinite(a)&&a>0?a.toFixed(3):"N/A")},[d,l,v,w,a,M]}class k extends W{constructor(t){super(),I(this,t,Y,Q,H,{type:1,lang:2,service:3})}get type(){return this.$$.ctx[1]}set type(t){this.$$set({type:t}),P()}get lang(){return this.$$.ctx[2]}set lang(t){this.$$set({lang:t}),P()}get service(){return this.$$.ctx[3]}set service(t){this.$$set({service:t}),P()}}customElements.define("ga-immune-resilience-index-scatter",D(k,{type:{},lang:{},service:{}},[],[],!1));export{k as default};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./results-overview-custom.wc.js"),import("./results-overview-custom-clinical.wc.js"),import("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./single-overview-custom-clinical.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-custom-clinical.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./results-overview-three-clp-ch.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-three-clp-ch.wc.js"),import("./insights-overview-custom.wc.js"),import("./insights-overview-custom-clinical.wc.js"),import("./insights-overview-three-client.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./action-steps-three-clp.wc.js"),import("./action-steps-three-clp-ch.wc.js"),import("./action-steps-three-client.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./scatter-plot-custom.wc.js"),import("./scatter-plot-custom-clinical.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./insights-overview-clp-ch.wc.js"),import("./main-result-clp.wc.js"),import("./main-result-clp-ch.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-clp-new-ch.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./arrow-graph-clp-ch.wc.js"),import("./overlap-title-clp.wc.js"),import("./overlap-title-clp-ch.wc.js"),import("./scatter-plot-clp.wc.js"),import("./scatter-plot-clp-ch.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js"),import("./over-time-indexes-clp-ch.wc.js"),import("./biological-age-rank.wc.js"),import("./immune-resilience-index.wc.js")};export{t as default};
1
+ const t=()=>{import("./arthritis.wc.js"),import("./colitis.wc.js"),import("./crohn.wc.js"),import("./lupus.wc.js"),import("./diabetes.wc.js"),import("./myocardial.wc.js"),import("./menopause.wc.js"),import("./hypertension.wc.js"),import("./chronic.wc.js"),import("./dyslipidemia.wc.js"),import("./atherosclerosis.wc.js"),import("./coronary.wc.js"),import("./copd.wc.js"),import("./hypertension-risk.wc.js"),import("./pre-hypertension.wc.js"),import("./language.interface.js"),import("./colorectal.wc.js"),import("./endometrial.wc.js"),import("./ovarian.wc.js"),import("./age-graph.wc.js"),import("./index-graph.wc.js"),import("./median-graph.wc.js"),import("./median-graph-japanese.wc.js"),import("./index-graph-japanese.wc.js"),import("./results-overview.wc.js"),import("./results-overview-custom.wc.js"),import("./results-overview-custom-clinical.wc.js"),import("./single-overview.wc.js"),import("./single-overview-custom.wc.js"),import("./single-overview-custom-clinical.wc.js"),import("./main-result.wc.js"),import("./main-result-custom.wc.js"),import("./main-result-custom-clinical.wc.js"),import("./main-result-three.wc.js"),import("./main-result-three-client.wc.js"),import("./results-overview-three.wc.js"),import("./results-overview-three-clp-ch.wc.js"),import("./insights-overview.wc.js"),import("./insights-overview-three.wc.js"),import("./insights-overview-three-clp.wc.js"),import("./insights-overview-three-clp-ch.wc.js"),import("./insights-overview-custom.wc.js"),import("./insights-overview-custom-clinical.wc.js"),import("./insights-overview-three-client.wc.js"),import("./insights-overview-latest.wc.js"),import("./action-steps-three.wc.js"),import("./action-steps-three-clp.wc.js"),import("./action-steps-three-clp-ch.wc.js"),import("./action-steps-three-client.wc.js"),import("./arrow-graph.wc.js"),import("./arrow-graph-three.wc.js"),import("./overlap-title.wc.js"),import("./overlap-title-three.wc.js"),import("./scatter-plot.wc.js"),import("./scatter-plot-custom.wc.js"),import("./scatter-plot-custom-clinical.wc.js"),import("./results-overview-clp.wc.js"),import("./insights-overview-clp.wc.js"),import("./insights-overview-clp-ch.wc.js"),import("./main-result-clp.wc.js"),import("./main-result-clp-ch.wc.js"),import("./single-overview-clp.wc.js"),import("./single-overview-clp-new.wc.js"),import("./single-overview-clp-new-ch.wc.js"),import("./single-overview-three.wc.js"),import("./arrow-graph-clp.wc.js"),import("./arrow-graph-clp-ch.wc.js"),import("./overlap-title-clp.wc.js"),import("./overlap-title-clp-ch.wc.js"),import("./scatter-plot-clp.wc.js"),import("./scatter-plot-clp-ch.wc.js"),import("./over-time.wc.js"),import("./over-time-clp.wc.js"),import("./over-time-indexes.wc.js"),import("./over-time-indexes-clp-ch.wc.js"),import("./biological-age-rank.wc.js"),import("./immune-resilience-index.wc.js"),import("./biological-age-rank-scatter.wc.js"),import("./immune-resilience-index-scatter.wc.js")};export{t as default};
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": "1.209.0",
4
+ "version": "1.210.0",
5
5
  "type": "module",
6
6
  "main": "dist/lib/@glycanage/web-components.js",
7
7
  "scripts": {