Mercurial > repos > fubar > jbrowse2
annotate x/static/js/2885.8a30e856.chunk.js @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
rev | line source |
---|---|
125
49f3d3878413
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff
changeset
|
1 "use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[2885],{92885:(e,n,t)=>{t.r(n),t.d(n,{default:()=>k,getRatingUtilityClass:()=>w,ratingClasses:()=>V});var o=t(7552),i=t(93878),l=t(93801),a=t(25649),s=t(70799),r=t(93876),c=t(91527),u=t(15622),d=t(89456),p=t(77259),v=t(51584),m=t(74893),y=t(69500);const h=(0,m.A)((0,y.jsx)("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),g=(0,m.A)((0,y.jsx)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");var A=t(51148),b=t(60129),f=t(4785),x=t(36674),F=t(33761),S=t(85693);function w(e){return(0,S.Ay)("MuiRating",e)}const V=(0,F.A)("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]);function C(e,n){if(null==e)return e;const t=Math.round(e/n)*n;return Number(t.toFixed(function(e){const n=e.toString().split(".")[1];return n?n.length:0}(n)))}const R=(0,A.Ay)("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[{[`& .${V.visuallyHidden}`]:n.visuallyHidden},n.root,n[`size${(0,u.A)(t.size)}`],t.readOnly&&n.readOnly]}})((0,b.A)((({theme:e})=>({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${V.focusVisible} .${V.iconActive}`]:{outline:"1px solid #999"},[`& .${V.visuallyHidden}`]:a.A,variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(30)}},{props:({ownerState:e})=>e.readOnly,style:{pointerEvents:"none"}}]})))),j=(0,A.Ay)("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},n)=>[n.label,e.emptyValueFocused&&n.labelEmptyValueActive]})({cursor:"inherit",variants:[{props:({ownerState:e})=>e.emptyValueFocused,style:{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"}}]}),M=(0,A.Ay)("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.icon,t.iconEmpty&&n.iconEmpty,t.iconFilled&&n.iconFilled,t.iconHover&&n.iconHover,t.iconFocus&&n.iconFocus,t.iconActive&&n.iconActive]}})((0,b.A)((({theme:e})=>({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none",variants:[{props:({ownerState:e})=>e.iconActive,style:{transform:"scale(1.2)"}},{props:({ownerState:e})=>e.iconEmpty,style:{color:(e.vars||e).palette.action.disabled}}]})))),z=(0,A.Ay)("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>(0,x.A)(e)&&"iconActive"!==e,overridesResolver:(e,n)=>{const{iconActive:t}=e;return[n.decimal,t&&n.iconActive]}})({position:"relative",variants:[{props:({iconActive:e})=>e,style:{transform:"scale(1.2)"}}]});function L(e){const{value:n,...t}=e;return(0,y.jsx)("span",{...t})}function H(e){const{classes:n,disabled:t,emptyIcon:l,focus:a,getLabelText:s,highlightSelectedOnly:r,hover:c,icon:u,IconContainerComponent:p,isActive:v,itemValue:m,labelProps:h,name:g,onBlur:A,onChange:b,onClick:f,onFocus:x,readOnly:F,ownerState:S,ratingValue:w,ratingValueRounded:V}=e,C=r?m===w:m<=w,R=m<=c,z=m<=a,L=m===V,H=(0,d.A)(),E=(0,y.jsx)(M,{as:p,value:m,className:(0,i.A)(n.icon,C?n.iconFilled:n.iconEmpty,R&&n.iconHover,z&&n.iconFocus,v&&n.iconActive),ownerState:{...S,iconEmpty:!C,iconFilled:C,iconHover:R,iconFocus:z,iconActive:v},children:l&&!C?l:u});return F?(0,y.jsx)("span",{...h,children:E}):(0,y.jsxs)(o.Fragment,{children:[(0,y.jsxs)(j,{ownerState:{...S,emptyValueFocused:void 0},htmlFor:H,...h,children:[E,(0,y.jsx)("span",{className:n.visuallyHidden,children:s(m)})]}),(0,y.jsx)("input",{className:n.visuallyHidden,onFocus:x,onBlur:A,onChange:b,onClick:f,disabled:t,value:m,id:H,type:"radio",name:g,checked:L})]})}const E=(0,y.jsx)(h,{fontSize:"inherit"}),O=(0,y.jsx)(g,{fontSize:"inherit"});function T(e){return`${e||"0"} Star${1!==e?"s":""}`}const k=o.forwardRef((function(e,n){const t=(0,f.b)({name:"MuiRating",props:e}),{className:a,defaultValue:m=null,disabled:h=!1,emptyIcon:g=O,emptyLabelText:A="Empty",getLabelText:b=T,highlightSelectedOnly:x=!1,icon:F=E,IconContainerComponent:S=L,max:V=5,name:M,onChange:k,onChangeActive:I,onMouseLeave:N,onMouseMove:$,precision:B=1,readOnly:_=!1,size:P="medium",value:X,...D}=t,U=(0,d.A)(M),[W,Y]=(0,p.A)({controlled:X,default:m,name:"Rating"}),q=C(W,B),G=(0,r.I)(),[{hover:J,focus:K},Q]=o.useState({hover:-1,focus:-1});let Z=q;-1!==J&&(Z=J),-1!==K&&(Z=K);const[ee,ne]=o.useState(!1),te=o.useRef(),oe=(0,v.A)(te,n),ie=e=>{let n=""===e.target.value?null:parseFloat(e.target.value);-1!==J&&(n=J),Y(n),k&&k(e,n)},le=e=>{0===e.clientX&&0===e.clientY||(Q({hover:-1,focus:-1}),Y(null),k&&parseFloat(e.target.value)===q&&k(e,null))},ae=e=>{(0,c.A)(e.target)&&ne(!0);const n=parseFloat(e.target.value);Q((e=>({hover:e.hover,focus:n})))},se=e=>{-1===J&&((0,c.A)(e.target)||ne(!1),Q((e=>({hover:e.hover,focus:-1}))))},[re,ce]=o.useState(!1),ue={...t,defaultValue:m,disabled:h,emptyIcon:g,emptyLabelText:A,emptyValueFocused:re,focusVisible:ee,getLabelText:b,icon:F,IconContainerComponent:S,max:V,precision:B,readOnly:_,size:P},de=(e=>{const{classes:n,size:t,readOnly:o,disabled:i,emptyValueFocused:l,focusVisible:a}=e,r={root:["root",`size${(0,u.A)(t)}`,i&&"disabled",a&&"focusVisible",o&&"readOnly"],label:["label","pristine"],labelEmptyValue:[l&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return(0,s.A)(r,w,n)})(ue);return(0,y.jsxs)(R,{ref:oe,onMouseMove:e=>{$&&$(e);const n=te.current,{right:t,left:o,width:i}=n.getBoundingClientRect();let a;a=G?(t-e.clientX)/i:(e.clientX-o)/i;let s=C(V*a+B/2,B);s=(0,l.A)(s,B,V),Q((e=>e.hover===s&&e.focus===s?e:{hover:s,focus:s})),ne(!1),I&&J!==s&&I(e,s)},onMouseLeave:e=>{N&&N(e),Q({hover:-1,focus:-1}),I&&-1!==J&&I(e,-1)},className:(0,i.A)(de.root,a,_&&"MuiRating-readOnly"),ownerState:ue,role:_?"img":null,"aria-label":_?b(Z):null,...D,children:[Array.from(new Array(V)).map(((e,n)=>{const t=n+1,o={classes:de,disabled:h,emptyIcon:g,focus:K,getLabelText:b,highlightSelectedOnly:x,hover:J,icon:F,IconContainerComponent:S,name:U,onBlur:se,onChange:ie,onClick:le,onFocus:ae,ratingValue:Z,ratingValueRounded:q,readOnly:_,ownerState:ue},l=t===Math.ceil(Z)&&(-1!==J||-1!==K);if(B<1){const e=Array.from(new Array(1/B));return(0,y.jsx)(z,{className:(0,i.A)(de.decimal,l&&de.iconActive),ownerState:ue,iconActive:l,children:e.map(((n,i)=>{const l=C(t-1+(i+1)*B,B);return(0,y.jsx)(H,{...o,isActive:!1,itemValue:l,labelProps:{style:e.length-1===i?{}:{width:l===Z?(i+1)*B*100+"%":"0%",overflow:"hidden",position:"absolute"}}},l)}))},t)}return(0,y.jsx)(H,{...o,isActive:l,itemValue:t},t)})),!_&&!h&&(0,y.jsxs)(j,{className:(0,i.A)(de.label,de.labelEmptyValue),ownerState:ue,children:[(0,y.jsx)("input",{className:de.visuallyHidden,value:"",id:`${U}-empty`,type:"radio",name:U,checked:null==q,onFocus:()=>ce(!0),onBlur:()=>ce(!1),onChange:ie}),(0,y.jsx)("span",{className:de.visuallyHidden,children:A})]})]})}))}}]); |
49f3d3878413
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff
changeset
|
2 //# sourceMappingURL=2885.8a30e856.chunk.js.map |