quantum-component-library 1.4.46-qa → 1.4.47-dev.10

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.
Files changed (39) hide show
  1. package/README.md +115 -115
  2. package/dist/components/activity-list/index.d.ts +28 -2
  3. package/dist/components/activity-list/index.stories.d.ts +6 -0
  4. package/dist/components/parameter-edit-list/index.d.ts +2 -1
  5. package/dist/components/test-filter-panel/index.d.ts +5 -3
  6. package/dist/components/upsert-activity-form/index.d.ts +3 -1
  7. package/dist/components.cjs +1 -1
  8. package/dist/components.js +1338 -1281
  9. package/dist/generated/gql.d.ts +2 -2
  10. package/dist/generated/graphql.d.ts +38 -1
  11. package/dist/generated-graphql.cjs +1 -0
  12. package/dist/generated-graphql.js +68 -0
  13. package/dist/generated.cjs +1 -0
  14. package/dist/generated.js +73 -0
  15. package/dist/{graphql-KvyVlavd.cjs → graphql-C6M9oyU0.cjs} +16 -9
  16. package/dist/{graphql-CZIf58Fd.js → graphql-CvUc6Vdv.js} +30 -22
  17. package/dist/{graphql-vendor-CL0XsjHb.cjs → graphql-vendor-B-QTAQSb.cjs} +9 -9
  18. package/dist/{graphql-vendor-BWnD0b-j.js → graphql-vendor-B0NjgbDB.js} +2 -3
  19. package/dist/hooks.cjs +1 -1
  20. package/dist/hooks.js +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +118 -115
  23. package/dist/lib/services/action.d.ts +4 -0
  24. package/dist/lib/services/index.d.ts +1 -0
  25. package/dist/lib/services/rom.json.d.ts +223 -223
  26. package/dist/providers.cjs +1 -1
  27. package/dist/providers.js +3 -3
  28. package/dist/quantum-component-library.css +1 -1
  29. package/dist/{react-select-vendor-C_DuqfB7.js → react-select-vendor-BlY9Il4Q.js} +4 -5
  30. package/dist/{react-select-vendor-BPaBUHFp.cjs → react-select-vendor-D_Q2fL5j.cjs} +1 -1
  31. package/dist/services.cjs +1 -1
  32. package/dist/services.js +249 -212
  33. package/dist/types.cjs +1 -1
  34. package/dist/types.js +1 -1
  35. package/dist/utils.cjs +1 -1
  36. package/dist/utils.js +1 -1
  37. package/package.json +133 -123
  38. package/dist/generated-B5QGMyhw.cjs +0 -1
  39. package/dist/generated-esGwfMXj.js +0 -66
package/dist/types.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./services.cjs"),r=require("./generated-B5QGMyhw.cjs"),m=require("./lodash-vendor-CR237hSU.cjs"),p=require("./utils.cjs"),l=(e,t)=>t==="left"||t==="right"?{sagittal:e.sagittal}:t==="forward"||t==="backward"?{frontal:e.frontal}:null,S=(e,t,n)=>t==="sensor"?e?.sensor_angle??null:t==="pose"?(e?.pose_angle&&l(e.pose_angle,n))??null:e?.sensor_angle?l(e.sensor_angle)??null:(e?.pose_angle&&l(e.pose_angle,n))??null,k=(e,t)=>(t==="sensor"?e?.sensor_angle:t==="pose"?e?.pose_angle:e?.sensor_angle||e?.pose_angle)||null,R=["frontal","sagittal","transverse"],T=e=>"limbs"in e,v=(e,t)=>t==="y"&&(e==="LeftFoot"||e==="RightFoot"||e==="LeftShank"||e==="RightShank"),F=(e,t)=>{switch(e){case"Head":return"Head";case"UpperBack":return"UpperBack";case"CenterBack":return"CenterBack";case"LowerBack":return"LowerBack";case"Thigh":return t==="left"?"LeftThigh":"RightThigh";case"Shank":return t==="left"?"LeftShank":"RightShank";case"Foot":return t==="left"?"LeftFoot":"RightFoot";case"UpperArm":return t==="left"?"LeftUpperArm":"RightUpperArm";case"Forearm":return t==="left"?"LeftForearm":"RightForearm";case"Pelvis":return t==="left"?"LeftPelvis":"RightPelvis";case"Clavicle":return t==="left"?"LeftClavicle":"RightClavicle"}},A=e=>e.startsWith("Left")?"left":e.startsWith("Right")?"right":null,b=(e,t)=>{switch(e){case"Ankle":return t==="left"?"LeftAnkle":"RightAnkle";case"Knee":return t==="left"?"LeftKnee":"RightKnee";case"Hip":return t==="left"?"LeftHip":"RightHip";case"Shoulder":return t==="left"?"LeftShoulder":"RightShoulder";case"Elbow":return t==="left"?"LeftElbow":"RightElbow";case"Spine":return"TotalSpine";case"Neck":return"Neck"}},u=e=>{switch(e){case"LeftAnkle":case"RightAnkle":return"Ankle";case"LeftKnee":case"RightKnee":return"Knee";case"LeftHip":case"RightHip":return"Hip";case"LeftShoulder":case"RightShoulder":return"Shoulder";case"LeftElbow":case"RightElbow":return"Elbow";case"ChestSpine":case"NavalSpine":case"TotalSpine":return"Spine";case"Neck":return"Neck"}},h=e=>{switch(e){case"Head":return"Head";case"UpperBack":return"UpperBack";case"CenterBack":return"CenterBack";case"LowerBack":return"LowerBack";case"LeftThigh":case"RightThigh":return"Thigh";case"LeftShank":case"RightShank":return"Shank";case"LeftFoot":case"RightFoot":return"Foot";case"LeftUpperArm":case"RightUpperArm":return"UpperArm";case"LeftForearm":case"RightForearm":return"Forearm";case"LeftPelvis":case"RightPelvis":return"Pelvis";case"LeftClavicle":case"RightClavicle":return"Clavicle"}};var g=(e=>(e.Sensor="sensor",e.Pose="pose",e))(g||{});const U=e=>"joint"in e?u(e.joint):h(e.segment),w=["joint","limb","acceleration","angular_velocity"],B=["frontal","sagittal","transverse"],P=["x","y","z"],j=e=>{switch(`${e}`){case r.SensorLocation.Thorax:return"UpperBack";case r.SensorLocation.CenterBack:return"CenterBack";case r.SensorLocation.Pelvis:return"LowerBack";case r.SensorLocation.LeftThigh:return"LeftThigh";case r.SensorLocation.RightThigh:return"RightThigh";case r.SensorLocation.LeftShank:return"LeftShank";case r.SensorLocation.RightShank:return"RightShank";case r.SensorLocation.LeftFoot:return"LeftFoot";case r.SensorLocation.RightFoot:return"RightFoot";case r.SensorLocation.LeftUpperArm:return"LeftUpperArm";case r.SensorLocation.RightUpperArm:return"RightUpperArm";case r.SensorLocation.LeftForearm:return"LeftForearm";case r.SensorLocation.RightForearm:return"RightForearm";case r.SensorLocation.Head:return"Head"}return console.warn(`Unknown sensor location: ${e}`),null},N=e=>{switch(e){case r.SensorLocation.Thorax:return"Thorax";case r.SensorLocation.CenterBack:return"Center Back";case r.SensorLocation.Pelvis:return"Pelvis";case r.SensorLocation.LeftThigh:return"Left Thigh";case r.SensorLocation.RightThigh:return"Right Thigh";case r.SensorLocation.LeftShank:return"Left Shank";case r.SensorLocation.RightShank:return"Right Shank";case r.SensorLocation.LeftFoot:return"Left Foot";case r.SensorLocation.RightFoot:return"Right Foot";case r.SensorLocation.LeftUpperArm:return"Left Upper Arm";case r.SensorLocation.RightUpperArm:return"Right Upper Arm";case r.SensorLocation.LeftForearm:return"Left Forearm";case r.SensorLocation.RightForearm:return"Right Forearm";case r.SensorLocation.Head:return"Head"}return console.warn(`Unknown sensor location: ${e}`),"Unknown"},C=()=>{const e=[],t={add:(n,o,a,c,s=!1)=>{const f={unit:"Count",value:0};return o?e.push({desc:{name:n,hint:a||null},value:o,isLoading:s,suffix:c||void 0}):s&&e.push({desc:{name:n,hint:a||null},value:f,isLoading:s,suffix:c||void 0}),t},build:()=>e};return t},d=(e,t)=>({unit:e,value:t}),H=(e,t)=>{if(t!=null)return d(e,t)},L=e=>"joint"in e?e.joint:e.segment,O=e=>L(e).toString(),y=e=>"plane"in e?e.plane:e.axis,x=e=>"plane"in e?e.plane:e.axis,I=e=>"joint"in e?i.jointNames[e.joint]:i.limbNames[e.segment],E=e=>{if(!e)return"Loading...";if(!e.action)return e.name??"Unknown Action";const t=e.action.name??"Unknown Action",n=e.actionSide?`${e.actionSide}`:"";return`${t} ${n} (Trial ${e.name??"1"})`},K=e=>typeof e=="object"&&"SyncError"in e,_=(e,t)=>Object.values(e).some(n=>t.id in n&&Object.keys(n[t.id]).length>0),$=(e,t)=>Math.max(...Object.values(e).map(n=>t.id in n?Object.keys(n[t.id]).length:0)),q=(e,t,n)=>Object.values(e).some(o=>t.id in o&&n in o[t.id]),J=(e,t)=>e[t.kind]?.[t.value.id]?.[i.planeOrAxis(t)],M=(e,t,n)=>{const o=structuredClone(e);if(n===void 0){const a=i.planeOrAxis(t);t.kind in o&&t.value.id in o[t.kind]&&a in o[t.kind][t.value.id]&&delete o[t.kind][t.value.id][a]}else m.merge(o,{[t.kind]:{[t.value.id]:{[i.planeOrAxis(t)]:n}}});return o},W=e=>Object.entries(e).flatMap(([t,n])=>Object.entries(n).flatMap(([o,a])=>Object.entries(a).map(([c,s])=>({min:s.min,max:s.max,kind:p.safelyConvertEnum(s.kind),partDimension:c,partId:o,partKind:t})))),D=e=>e.reduce((t,n)=>({...t,[n.partKind]:{...t[n.partKind]||{},[n.partId]:{...t[n.partKind]?.[n.partId]||{},[n.partDimension]:{kind:n.kind,min:n.min,max:n.max}}}}),{joint:{},limb:{},acceleration:{}}),V=e=>Object.values(e).every(t=>Object.keys(t).length===0),z=(e,t)=>{if(e.kind!==t.kind)return!1;switch(e.kind){case"Zed":return e.id===t.id;case"Usb":return e.name===t.name;case"GoPro":return e.id===t.id}};exports.AngleDataSource=g;exports.analysisStatBuilder=C;exports.areThresholdsEmpty=V;exports.availablePlanes=R;exports.axes=P;exports.canBeVerticalForce=v;exports.dimensionName=x;exports.dimensionToLegacy=y;exports.getAnalysisName=E;exports.getAnalysisPartIdNoSide=U;exports.getJointIdNoSide=u;exports.getJointIdWithSide=b;exports.getLimbIdNoSide=h;exports.getLimbIdWithSide=F;exports.getPointSide=A;exports.isDeviceEqual=z;exports.isLimbTrackingFrame=T;exports.isSyncError=K;exports.jointAngle=S;exports.jointOrLimbHasThreshold=_;exports.jointOrLimbThresholdCount=$;exports.limbAngle=k;exports.mkUnit=d;exports.partAndPlaneHasThreshold=q;exports.partIdName=I;exports.partIdToJointLimbId=L;exports.partIdToString=O;exports.partKinds=w;exports.planes=B;exports.sensorLocationName=N;exports.sensorLocationToLimbId=j;exports.thresholdForPart=J;exports.thresholdFragmentsToThresholds=D;exports.thresholdsToInput=W;exports.tryMkUnit=H;exports.updateThreshold=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./services.cjs"),r=require("./generated-graphql.cjs"),p=require("./lodash-vendor-CR237hSU.cjs"),m=require("./utils.cjs"),l=(e,t)=>t==="left"||t==="right"?{sagittal:e.sagittal}:t==="forward"||t==="backward"?{frontal:e.frontal}:null,S=(e,t,n)=>t==="sensor"?e?.sensor_angle??null:t==="pose"?(e?.pose_angle&&l(e.pose_angle,n))??null:e?.sensor_angle?l(e.sensor_angle)??null:(e?.pose_angle&&l(e.pose_angle,n))??null,k=(e,t)=>(t==="sensor"?e?.sensor_angle:t==="pose"?e?.pose_angle:e?.sensor_angle||e?.pose_angle)||null,R=["frontal","sagittal","transverse"],T=e=>"limbs"in e,v=(e,t)=>t==="y"&&(e==="LeftFoot"||e==="RightFoot"||e==="LeftShank"||e==="RightShank"),F=(e,t)=>{switch(e){case"Head":return"Head";case"UpperBack":return"UpperBack";case"CenterBack":return"CenterBack";case"LowerBack":return"LowerBack";case"Thigh":return t==="left"?"LeftThigh":"RightThigh";case"Shank":return t==="left"?"LeftShank":"RightShank";case"Foot":return t==="left"?"LeftFoot":"RightFoot";case"UpperArm":return t==="left"?"LeftUpperArm":"RightUpperArm";case"Forearm":return t==="left"?"LeftForearm":"RightForearm";case"Pelvis":return t==="left"?"LeftPelvis":"RightPelvis";case"Clavicle":return t==="left"?"LeftClavicle":"RightClavicle"}},A=e=>e.startsWith("Left")?"left":e.startsWith("Right")?"right":null,b=(e,t)=>{switch(e){case"Ankle":return t==="left"?"LeftAnkle":"RightAnkle";case"Knee":return t==="left"?"LeftKnee":"RightKnee";case"Hip":return t==="left"?"LeftHip":"RightHip";case"Shoulder":return t==="left"?"LeftShoulder":"RightShoulder";case"Elbow":return t==="left"?"LeftElbow":"RightElbow";case"Spine":return"TotalSpine";case"Neck":return"Neck"}},h=e=>{switch(e){case"LeftAnkle":case"RightAnkle":return"Ankle";case"LeftKnee":case"RightKnee":return"Knee";case"LeftHip":case"RightHip":return"Hip";case"LeftShoulder":case"RightShoulder":return"Shoulder";case"LeftElbow":case"RightElbow":return"Elbow";case"ChestSpine":case"NavalSpine":case"TotalSpine":return"Spine";case"Neck":return"Neck"}},u=e=>{switch(e){case"Head":return"Head";case"UpperBack":return"UpperBack";case"CenterBack":return"CenterBack";case"LowerBack":return"LowerBack";case"LeftThigh":case"RightThigh":return"Thigh";case"LeftShank":case"RightShank":return"Shank";case"LeftFoot":case"RightFoot":return"Foot";case"LeftUpperArm":case"RightUpperArm":return"UpperArm";case"LeftForearm":case"RightForearm":return"Forearm";case"LeftPelvis":case"RightPelvis":return"Pelvis";case"LeftClavicle":case"RightClavicle":return"Clavicle"}};var g=(e=>(e.Sensor="sensor",e.Pose="pose",e))(g||{});const U=e=>"joint"in e?h(e.joint):u(e.segment),w=["joint","limb","acceleration","angular_velocity"],B=["frontal","sagittal","transverse"],P=["x","y","z"],j=e=>{switch(`${e}`){case r.SensorLocation.Thorax:return"UpperBack";case r.SensorLocation.CenterBack:return"CenterBack";case r.SensorLocation.Pelvis:return"LowerBack";case r.SensorLocation.LeftThigh:return"LeftThigh";case r.SensorLocation.RightThigh:return"RightThigh";case r.SensorLocation.LeftShank:return"LeftShank";case r.SensorLocation.RightShank:return"RightShank";case r.SensorLocation.LeftFoot:return"LeftFoot";case r.SensorLocation.RightFoot:return"RightFoot";case r.SensorLocation.LeftUpperArm:return"LeftUpperArm";case r.SensorLocation.RightUpperArm:return"RightUpperArm";case r.SensorLocation.LeftForearm:return"LeftForearm";case r.SensorLocation.RightForearm:return"RightForearm";case r.SensorLocation.Head:return"Head"}return console.warn(`Unknown sensor location: ${e}`),null},N=e=>{switch(e){case r.SensorLocation.Thorax:return"Thorax";case r.SensorLocation.CenterBack:return"Center Back";case r.SensorLocation.Pelvis:return"Pelvis";case r.SensorLocation.LeftThigh:return"Left Thigh";case r.SensorLocation.RightThigh:return"Right Thigh";case r.SensorLocation.LeftShank:return"Left Shank";case r.SensorLocation.RightShank:return"Right Shank";case r.SensorLocation.LeftFoot:return"Left Foot";case r.SensorLocation.RightFoot:return"Right Foot";case r.SensorLocation.LeftUpperArm:return"Left Upper Arm";case r.SensorLocation.RightUpperArm:return"Right Upper Arm";case r.SensorLocation.LeftForearm:return"Left Forearm";case r.SensorLocation.RightForearm:return"Right Forearm";case r.SensorLocation.Head:return"Head"}return console.warn(`Unknown sensor location: ${e}`),"Unknown"},C=()=>{const e=[],t={add:(n,o,a,c,s=!1)=>{const f={unit:"Count",value:0};return o?e.push({desc:{name:n,hint:a||null},value:o,isLoading:s,suffix:c||void 0}):s&&e.push({desc:{name:n,hint:a||null},value:f,isLoading:s,suffix:c||void 0}),t},build:()=>e};return t},d=(e,t)=>({unit:e,value:t}),H=(e,t)=>{if(t!=null)return d(e,t)},L=e=>"joint"in e?e.joint:e.segment,O=e=>L(e).toString(),y=e=>"plane"in e?e.plane:e.axis,x=e=>"plane"in e?e.plane:e.axis,I=e=>"joint"in e?i.jointNames[e.joint]:i.limbNames[e.segment],E=e=>{if(!e)return"Loading...";if(!e.action)return e.name??"Unknown Action";const t=e.action.name??"Unknown Action",n=e.actionSide?`${e.actionSide}`:"";return`${t} ${n} (Trial ${e.name??"1"})`},K=e=>typeof e=="object"&&"SyncError"in e,_=(e,t)=>Object.values(e).some(n=>t.id in n&&Object.keys(n[t.id]).length>0),q=(e,t)=>Math.max(...Object.values(e).map(n=>t.id in n?Object.keys(n[t.id]).length:0)),$=(e,t,n)=>Object.values(e).some(o=>t.id in o&&n in o[t.id]),J=(e,t)=>e[t.kind]?.[t.value.id]?.[i.planeOrAxis(t)],M=(e,t,n)=>{const o=structuredClone(e);if(n===void 0){const a=i.planeOrAxis(t);t.kind in o&&t.value.id in o[t.kind]&&a in o[t.kind][t.value.id]&&delete o[t.kind][t.value.id][a]}else p.merge(o,{[t.kind]:{[t.value.id]:{[i.planeOrAxis(t)]:n}}});return o},W=e=>Object.entries(e).flatMap(([t,n])=>Object.entries(n).flatMap(([o,a])=>Object.entries(a).map(([c,s])=>({min:s.min,max:s.max,kind:m.safelyConvertEnum(s.kind),partDimension:c,partId:o,partKind:t})))),D=e=>e.reduce((t,n)=>({...t,[n.partKind]:{...t[n.partKind]||{},[n.partId]:{...t[n.partKind]?.[n.partId]||{},[n.partDimension]:{kind:n.kind,min:n.min,max:n.max}}}}),{joint:{},limb:{},acceleration:{}}),V=e=>Object.values(e).every(t=>Object.keys(t).length===0),G=(e,t)=>{if(e.kind!==t.kind)return!1;switch(e.kind){case"Zed":return e.id===t.id;case"Usb":return e.name===t.name;case"GoPro":return e.id===t.id}};exports.AngleDataSource=g;exports.analysisStatBuilder=C;exports.areThresholdsEmpty=V;exports.availablePlanes=R;exports.axes=P;exports.canBeVerticalForce=v;exports.dimensionName=x;exports.dimensionToLegacy=y;exports.getAnalysisName=E;exports.getAnalysisPartIdNoSide=U;exports.getJointIdNoSide=h;exports.getJointIdWithSide=b;exports.getLimbIdNoSide=u;exports.getLimbIdWithSide=F;exports.getPointSide=A;exports.isDeviceEqual=G;exports.isLimbTrackingFrame=T;exports.isSyncError=K;exports.jointAngle=S;exports.jointOrLimbHasThreshold=_;exports.jointOrLimbThresholdCount=q;exports.limbAngle=k;exports.mkUnit=d;exports.partAndPlaneHasThreshold=$;exports.partIdName=I;exports.partIdToJointLimbId=L;exports.partIdToString=O;exports.partKinds=w;exports.planes=B;exports.sensorLocationName=N;exports.sensorLocationToLimbId=j;exports.thresholdForPart=J;exports.thresholdFragmentsToThresholds=D;exports.thresholdsToInput=W;exports.tryMkUnit=H;exports.updateThreshold=M;
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jointNames as h, limbNames as f, planeOrAxis as l } from "./services.js";
2
- import { S as n } from "./generated-esGwfMXj.js";
2
+ import { SensorLocation as n } from "./generated-graphql.js";
3
3
  import { m as g } from "./lodash-vendor-D4ZPCr77.js";
4
4
  import { safelyConvertEnum as p } from "./utils.js";
5
5
  const c = (e, t) => t === "left" || t === "right" ? {
package/dist/utils.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./tailwind-vendor-C0M23-WD.cjs"),p=require("./services.cjs"),i=require("./moment-vendor-1cRqq0AH.cjs"),d=require("./generated-B5QGMyhw.cjs"),$=t=>t*39.3700787402,M=t=>t/39.3700787402,l=t=>t*2.20462262185,f=t=>t/2.20462262185,c=(t,n=!1)=>t==null?null:n?t*180/Math.PI:Math.round(t*(180/Math.PI)),P=t=>t==null?null:t*(Math.PI/180),S=t=>i.hooks.duration(t,"ms").humanize({ss:1}),F=(t,n=!1,s=!0)=>{const r=i.hooks.duration(t,"ms"),e=s?r.minutes().toString().padStart(2,"0"):r.minutes().toString(),o=r.seconds().toString().padStart(2,"0"),m=Math.round(r.milliseconds()).toString().padStart(3,"0");return n?`${e}:${o}.${m}`:`${e}:${o}`},k=(t,n=!1)=>{const s=i.hooks.duration(t,"seconds"),e=(s.minutes()+s.hours()*60).toString().padStart(2,"0"),o=s.seconds().toString().padStart(2,"0");if(n){const m=Math.round(s.milliseconds()).toString().padStart(3,"0");return`${e}:${o}.${m}`}return`${e}:${o}`},h=t=>{const n=i.hooks.duration(t,"ms"),s=n.hours(),r=n.minutes(),e=n.seconds(),o=n.milliseconds();return r<1?`${e}.${Math.floor(o/100)} seconds`:s<1?`${r} minutes`:`${s} hours`},b=t=>{const n=i.hooks.duration(t,"ms"),s=n.hours().toString().padStart(2,"0"),r=n.minutes().toString().padStart(2,"0"),e=n.seconds().toString().padStart(2,"0");return`${s}:${r}:${e}`},y=t=>{const n=i.hooks.duration(t,"seconds"),s=n.hours().toString().padStart(2,"0"),r=n.minutes().toString().padStart(2,"0"),e=n.seconds().toString().padStart(2,"0");return`${s}:${r}:${e}`},I=(t,n=!1)=>{const[s,r,e]=t.split(":").map(Number),o=n?999:0;return i.hooks.duration({hours:s,minutes:r,seconds:e,milliseconds:o}).asMilliseconds()},a=(t,n)=>{const s=new Intl.NumberFormat("en-US",{maximumFractionDigits:2});switch(t){case"Milliseconds":return h(n);case"DeltaMilliseconds":return S(n);case"Meters":return`${s.format(n)}m`;case"MetersPerSecond":return`${s.format(n)}m/s`;case"MetersPerSecondSq":return`${s.format(n)}m/s²`;case"Kg":return`${Math.round(l(n))}lbs`;case"Rad":return`${s.format(c(n)??0)}°`;case"RadPerSecond":return`${s.format(c(n)??0)}°/s`;case"RadPerSecondSq":return`${s.format(c(n)??0)}°/s²`;case"Frame":return`${s.format(n)}`;case"Percent":return new Intl.NumberFormat("en-US",{style:"percent"}).format(n);case"Count":return Math.round(n).toString();case"Centimeters":return`${s.format(n)}cm`;case"PassFail":return n>0?"Pass":"Fail";default:return n.toFixed(2)}},D=t=>a(t.unit,t.value),K=t=>t,R=t=>{const n=s=>p.getParameterAngleDirectionName(s,t);switch(t.partKind){case"joint":return s=>`${a("Rad",Math.abs(s))} ${n(s)}`;case"segment":return s=>`${a("Rad",Math.abs(s))} ${n(s)}`;case"acceleration":return s=>`${a("MetersPerSecondSq",s)} ${n(s)}`;case"angular_velocity":return s=>`${a("RadPerSecond",s)} ${n(s)}`;default:return s=>s.toString()}},q=t=>{const n=new Map;return((...s)=>{const r=JSON.stringify(s);if(n.has(r))return n.get(r);const e=t(...s);return n.set(r,e),e})},T=t=>({partId:"segment"in t.id?t.id.segment:t.id.joint,partKind:"segment"in t.id?"limb":"joint",partDimension:t.plane,min:t.min,max:t.max,kind:t.kind}),x=t=>t.map(T),g=t=>({id:t.partKind==="limb"?{segment:t.partId}:{joint:t.partId},plane:t.partDimension,min:t.min,max:t.max,kind:t.kind===d.ThresholdKind.Limit?d.ThresholdKind.Limit:d.ThresholdKind.Target}),U=t=>t.map(g),j=t=>t.split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "),A=(t,n)=>n===1?t:`${t}s`;function w(...t){return u.twMerge(u.clsx(t))}exports.capitalizeAll=j;exports.cn=w;exports.degToRad=P;exports.getFormatterForParameter=R;exports.getUnitFormatted=D;exports.getUnitValueFormatted=a;exports.hourMinSecStrToMs=I;exports.inchesToMeters=M;exports.kgToPounds=l;exports.memo=q;exports.metersToInches=$;exports.msToDurationStr=S;exports.msToHourMinSecStr=b;exports.msToPrettyStr=h;exports.msToTimestampStr=F;exports.parameterToThreshold=T;exports.parametersToThresholds=x;exports.pluralize=A;exports.poundsToKg=f;exports.radToDeg=c;exports.sToTimestampStr=k;exports.safelyConvertEnum=K;exports.secondsToTimestampStr=y;exports.thresholdToParameter=g;exports.thresholdsToParameters=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./tailwind-vendor-C0M23-WD.cjs"),p=require("./services.cjs"),i=require("./moment-vendor-1cRqq0AH.cjs"),d=require("./generated-graphql.cjs"),$=t=>t*39.3700787402,M=t=>t/39.3700787402,l=t=>t*2.20462262185,f=t=>t/2.20462262185,c=(t,n=!1)=>t==null?null:n?t*180/Math.PI:Math.round(t*(180/Math.PI)),P=t=>t==null?null:t*(Math.PI/180),S=t=>i.hooks.duration(t,"ms").humanize({ss:1}),F=(t,n=!1,s=!0)=>{const r=i.hooks.duration(t,"ms"),e=s?r.minutes().toString().padStart(2,"0"):r.minutes().toString(),o=r.seconds().toString().padStart(2,"0"),m=Math.round(r.milliseconds()).toString().padStart(3,"0");return n?`${e}:${o}.${m}`:`${e}:${o}`},k=(t,n=!1)=>{const s=i.hooks.duration(t,"seconds"),e=(s.minutes()+s.hours()*60).toString().padStart(2,"0"),o=s.seconds().toString().padStart(2,"0");if(n){const m=Math.round(s.milliseconds()).toString().padStart(3,"0");return`${e}:${o}.${m}`}return`${e}:${o}`},h=t=>{const n=i.hooks.duration(t,"ms"),s=n.hours(),r=n.minutes(),e=n.seconds(),o=n.milliseconds();return r<1?`${e}.${Math.floor(o/100)} seconds`:s<1?`${r} minutes`:`${s} hours`},b=t=>{const n=i.hooks.duration(t,"ms"),s=n.hours().toString().padStart(2,"0"),r=n.minutes().toString().padStart(2,"0"),e=n.seconds().toString().padStart(2,"0");return`${s}:${r}:${e}`},y=t=>{const n=i.hooks.duration(t,"seconds"),s=n.hours().toString().padStart(2,"0"),r=n.minutes().toString().padStart(2,"0"),e=n.seconds().toString().padStart(2,"0");return`${s}:${r}:${e}`},I=(t,n=!1)=>{const[s,r,e]=t.split(":").map(Number),o=n?999:0;return i.hooks.duration({hours:s,minutes:r,seconds:e,milliseconds:o}).asMilliseconds()},a=(t,n)=>{const s=new Intl.NumberFormat("en-US",{maximumFractionDigits:2});switch(t){case"Milliseconds":return h(n);case"DeltaMilliseconds":return S(n);case"Meters":return`${s.format(n)}m`;case"MetersPerSecond":return`${s.format(n)}m/s`;case"MetersPerSecondSq":return`${s.format(n)}m/s²`;case"Kg":return`${Math.round(l(n))}lbs`;case"Rad":return`${s.format(c(n)??0)}°`;case"RadPerSecond":return`${s.format(c(n)??0)}°/s`;case"RadPerSecondSq":return`${s.format(c(n)??0)}°/s²`;case"Frame":return`${s.format(n)}`;case"Percent":return new Intl.NumberFormat("en-US",{style:"percent"}).format(n);case"Count":return Math.round(n).toString();case"Centimeters":return`${s.format(n)}cm`;case"PassFail":return n>0?"Pass":"Fail";default:return n.toFixed(2)}},D=t=>a(t.unit,t.value),K=t=>t,q=t=>{const n=s=>p.getParameterAngleDirectionName(s,t);switch(t.partKind){case"joint":return s=>`${a("Rad",Math.abs(s))} ${n(s)}`;case"segment":return s=>`${a("Rad",Math.abs(s))} ${n(s)}`;case"acceleration":return s=>`${a("MetersPerSecondSq",s)} ${n(s)}`;case"angular_velocity":return s=>`${a("RadPerSecond",s)} ${n(s)}`;default:return s=>s.toString()}},R=t=>{const n=new Map;return((...s)=>{const r=JSON.stringify(s);if(n.has(r))return n.get(r);const e=t(...s);return n.set(r,e),e})},T=t=>({partId:"segment"in t.id?t.id.segment:t.id.joint,partKind:"segment"in t.id?"limb":"joint",partDimension:t.plane,min:t.min,max:t.max,kind:t.kind}),x=t=>t.map(T),g=t=>({id:t.partKind==="limb"?{segment:t.partId}:{joint:t.partId},plane:t.partDimension,min:t.min,max:t.max,kind:t.kind===d.ThresholdKind.Limit?d.ThresholdKind.Limit:d.ThresholdKind.Target}),U=t=>t.map(g),j=t=>t.split(" ").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "),A=(t,n)=>n===1?t:`${t}s`;function w(...t){return u.twMerge(u.clsx(t))}exports.capitalizeAll=j;exports.cn=w;exports.degToRad=P;exports.getFormatterForParameter=q;exports.getUnitFormatted=D;exports.getUnitValueFormatted=a;exports.hourMinSecStrToMs=I;exports.inchesToMeters=M;exports.kgToPounds=l;exports.memo=R;exports.metersToInches=$;exports.msToDurationStr=S;exports.msToHourMinSecStr=b;exports.msToPrettyStr=h;exports.msToTimestampStr=F;exports.parameterToThreshold=T;exports.parametersToThresholds=x;exports.pluralize=A;exports.poundsToKg=f;exports.radToDeg=c;exports.sToTimestampStr=k;exports.safelyConvertEnum=K;exports.secondsToTimestampStr=y;exports.thresholdToParameter=g;exports.thresholdsToParameters=U;
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as d, c as S } from "./tailwind-vendor-B4y94WzT.js";
2
2
  import { getParameterAngleDirectionName as l } from "./services.js";
3
3
  import { h as i } from "./moment-vendor-DMLRxgRE.js";
4
- import { T as m } from "./generated-esGwfMXj.js";
4
+ import { ThresholdKind as m } from "./generated-graphql.js";
5
5
  const I = (t) => t * 39.3700787402, b = (t) => t / 39.3700787402, $ = (t) => t * 2.20462262185, x = (t) => t / 2.20462262185, u = (t, n = !1) => t == null ? null : n ? t * 180 / Math.PI : Math.round(t * (180 / Math.PI)), k = (t) => t == null ? null : t * (Math.PI / 180), p = (t) => i.duration(t, "ms").humanize({ ss: 1 }), D = (t, n = !1, s = !0) => {
6
6
  const r = i.duration(t, "ms"), o = s ? r.minutes().toString().padStart(2, "0") : r.minutes().toString(), e = r.seconds().toString().padStart(2, "0"), a = Math.round(r.milliseconds()).toString().padStart(3, "0");
7
7
  return n ? `${o}:${e}.${a}` : `${o}:${e}`;
package/package.json CHANGED
@@ -1,123 +1,133 @@
1
- {
2
- "name": "quantum-component-library",
3
- "version": "1.4.46-qa",
4
- "type": "module",
5
- "types": "./dist/index.d.ts",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
8
- "files": [
9
- "dist"
10
- ],
11
- "exports": {
12
- ".": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.js",
15
- "require": "./dist/index.cjs"
16
- },
17
- "./components": {
18
- "types": "./dist/components/index.d.ts",
19
- "import": "./dist/components.js",
20
- "require": "./dist/components.cjs"
21
- },
22
- "./hooks": {
23
- "types": "./dist/lib/hooks/index.d.ts",
24
- "import": "./dist/hooks.js",
25
- "require": "./dist/hooks.cjs"
26
- },
27
- "./types": {
28
- "types": "./dist/lib/types/index.d.ts",
29
- "import": "./dist/types.js",
30
- "require": "./dist/types.cjs"
31
- },
32
- "./utils": {
33
- "types": "./dist/lib/utils/index.d.ts",
34
- "import": "./dist/utils.js",
35
- "require": "./dist/utils.cjs"
36
- },
37
- "./services": {
38
- "types": "./dist/lib/services/index.d.ts",
39
- "import": "./dist/services.js",
40
- "require": "./dist/services.cjs"
41
- },
42
- "./providers": {
43
- "types": "./dist/lib/providers/index.d.ts",
44
- "import": "./dist/providers.js",
45
- "require": "./dist/providers.cjs"
46
- },
47
- "./dist/index.css": {
48
- "import": "./dist/quantum-component-library.css",
49
- "require": "./dist/quantum-component-library.css"
50
- }
51
- },
52
- "scripts": {
53
- "dev": "vite",
54
- "copy:admin": "copyfiles package.json ../admin/node_modules/quantum-component-library",
55
- "copy:client": "copyfiles package.json ../client/ui/node_modules/quantum-component-library",
56
- "build": "tsc -b && vite build",
57
- "lint": "eslint .",
58
- "preview": "vite preview",
59
- "build:qa": "tsc -b && vite build --mode publish-qa",
60
- "build:prod": "tsc -b && vite build --mode publish-prod",
61
- "build:admin": "tsc -b && vite build --mode admin && npm run copy:admin",
62
- "build:client": "tsc -b && vite build --mode client && npm run copy:client",
63
- "build:admin-qa": "tsc -b && vite build --mode admin-qa && npm run copy:admin",
64
- "build:admin-prod": "tsc -b && vite build --mode admin-prod && npm run copy:admin",
65
- "build:client-qa": "tsc -b && vite build --mode client-qa && npm run copy:client",
66
- "build:client-prod": "tsc -b && vite build --mode client-prod && npm run copy:client",
67
- "codegen": "graphql-codegen --config codegen.yml",
68
- "codegen:qa": "graphql-codegen --config codegen.qa.yml",
69
- "codegen:prod": "graphql-codegen --config codegen.prod.yml",
70
- "storybook": "storybook dev -p 6006",
71
- "build-storybook": "storybook build"
72
- },
73
- "dependencies": {
74
- "@chakra-ui/react": "^2.10.9",
75
- "@emotion/react": "^11.14.0",
76
- "@emotion/styled": "^11.14.0",
77
- "@leeoniya/ufuzzy": "^1.0.19",
78
- "@tailwindcss/vite": "^4.1.12",
79
- "@urql/exchange-auth": "^2.2.0",
80
- "@urql/exchange-graphcache": "^7.2.2",
81
- "ajv": "^8.17.1",
82
- "chakra-react-select": "^4.10.1",
83
- "class-variance-authority": "^0.7.1",
84
- "clsx": "^2.1.1",
85
- "framer-motion": "^12.23.12",
86
- "graphql": "^16.11.0",
87
- "hoist-non-react-statics": "^3.3.2",
88
- "lucide-react": "^0.541.0",
89
- "moment": "^2.30.1",
90
- "react": "^19.1.1",
91
- "react-dnd": "^16.0.1",
92
- "react-dnd-html5-backend": "^16.0.1",
93
- "react-dom": "^19.1.1",
94
- "react-icons": "^5.5.0",
95
- "tailwind-merge": "^3.3.1",
96
- "tailwindcss": "^4.1.12",
97
- "urql": "4.2.1"
98
- },
99
- "devDependencies": {
100
- "@eslint/js": "^9.33.0",
101
- "@graphql-codegen/cli": "^6.0.0",
102
- "@graphql-codegen/introspection": "^4.0.3",
103
- "@storybook/react-vite": "^9.1.4",
104
- "@types/hoist-non-react-statics": "^3.3.7",
105
- "@types/node": "^24.3.0",
106
- "@types/react": "^19.1.10",
107
- "@types/react-dom": "^19.1.7",
108
- "@vitejs/plugin-react": "^5.0.0",
109
- "copyfiles": "^2.1.0",
110
- "eslint": "^9.33.0",
111
- "eslint-plugin-react-hooks": "^5.2.0",
112
- "eslint-plugin-react-refresh": "^0.4.20",
113
- "eslint-plugin-storybook": "^9.1.4",
114
- "globals": "^16.3.0",
115
- "storybook": "^9.1.4",
116
- "tw-animate-css": "^1.3.7",
117
- "typescript": "~5.8.3",
118
- "typescript-eslint": "^8.39.1",
119
- "vite": "^7.1.2",
120
- "vite-plugin-dts": "^4.5.4",
121
- "vite-plugin-graphql-codegen": "^3.6.3"
122
- }
123
- }
1
+ {
2
+ "name": "quantum-component-library",
3
+ "version": "1.4.47-dev.10",
4
+ "type": "module",
5
+ "types": "./dist/index.d.ts",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "require": "./dist/index.cjs"
16
+ },
17
+ "./components": {
18
+ "types": "./dist/components/index.d.ts",
19
+ "import": "./dist/components.js",
20
+ "require": "./dist/components.cjs"
21
+ },
22
+ "./hooks": {
23
+ "types": "./dist/lib/hooks/index.d.ts",
24
+ "import": "./dist/hooks.js",
25
+ "require": "./dist/hooks.cjs"
26
+ },
27
+ "./types": {
28
+ "types": "./dist/lib/types/index.d.ts",
29
+ "import": "./dist/types.js",
30
+ "require": "./dist/types.cjs"
31
+ },
32
+ "./utils": {
33
+ "types": "./dist/lib/utils/index.d.ts",
34
+ "import": "./dist/utils.js",
35
+ "require": "./dist/utils.cjs"
36
+ },
37
+ "./services": {
38
+ "types": "./dist/lib/services/index.d.ts",
39
+ "import": "./dist/services.js",
40
+ "require": "./dist/services.cjs"
41
+ },
42
+ "./providers": {
43
+ "types": "./dist/lib/providers/index.d.ts",
44
+ "import": "./dist/providers.js",
45
+ "require": "./dist/providers.cjs"
46
+ },
47
+ "./generated": {
48
+ "types": "./dist/generated/index.d.ts",
49
+ "import": "./dist/generated.js",
50
+ "require": "./dist/generated.cjs"
51
+ },
52
+ "./generated-graphql": {
53
+ "types": "./dist/generated/graphql.d.ts",
54
+ "import": "./dist/generated-graphql.js",
55
+ "require": "./dist/generated-graphql.cjs"
56
+ },
57
+ "./dist/index.css": {
58
+ "import": "./dist/quantum-component-library.css",
59
+ "require": "./dist/quantum-component-library.css"
60
+ }
61
+ },
62
+ "scripts": {
63
+ "dev": "vite",
64
+ "copy:admin": "copyfiles package.json ../admin/node_modules/quantum-component-library",
65
+ "copy:client": "copyfiles package.json ../client/ui/node_modules/quantum-component-library",
66
+ "build": "tsc -b && vite build",
67
+ "lint": "eslint .",
68
+ "preview": "vite preview",
69
+ "build:qa": "tsc -b && vite build --mode publish-qa",
70
+ "build:prod": "tsc -b && vite build --mode publish-prod",
71
+ "build:admin": "tsc -b && vite build --mode admin && npm run copy:admin",
72
+ "build:client": "tsc -b && vite build --mode client && npm run copy:client",
73
+ "build:admin-qa": "tsc -b && vite build --mode admin-qa && npm run copy:admin",
74
+ "build:admin-prod": "tsc -b && vite build --mode admin-prod && npm run copy:admin",
75
+ "build:client-qa": "tsc -b && vite build --mode client-qa && npm run copy:client",
76
+ "build:client-prod": "tsc -b && vite build --mode client-prod && npm run copy:client",
77
+ "codegen": "graphql-codegen --config codegen.yml",
78
+ "codegen:qa": "graphql-codegen --config codegen.qa.yml",
79
+ "codegen:prod": "graphql-codegen --config codegen.prod.yml",
80
+ "storybook": "storybook dev -p 6006",
81
+ "build-storybook": "storybook build"
82
+ },
83
+ "dependencies": {
84
+ "@chakra-ui/react": "^2.10.9",
85
+ "@emotion/react": "^11.14.0",
86
+ "@emotion/styled": "^11.14.0",
87
+ "@leeoniya/ufuzzy": "^1.0.19",
88
+ "@tailwindcss/vite": "^4.1.12",
89
+ "@urql/exchange-auth": "^2.2.0",
90
+ "@urql/exchange-graphcache": "^7.2.2",
91
+ "ajv": "^8.17.1",
92
+ "chakra-react-select": "^4.10.1",
93
+ "class-variance-authority": "^0.7.1",
94
+ "clsx": "^2.1.1",
95
+ "framer-motion": "^12.23.12",
96
+ "graphql": "^16.11.0",
97
+ "hoist-non-react-statics": "^3.3.2",
98
+ "lucide-react": "^0.541.0",
99
+ "moment": "^2.30.1",
100
+ "react": "^19.1.1",
101
+ "react-dnd": "^16.0.1",
102
+ "react-dnd-html5-backend": "^16.0.1",
103
+ "react-dom": "^19.1.1",
104
+ "react-icons": "^5.5.0",
105
+ "tailwind-merge": "^3.3.1",
106
+ "tailwindcss": "^4.1.12",
107
+ "urql": "4.2.1"
108
+ },
109
+ "devDependencies": {
110
+ "@eslint/js": "^9.33.0",
111
+ "@graphql-codegen/cli": "^6.0.0",
112
+ "@graphql-codegen/introspection": "^4.0.3",
113
+ "@storybook/react-vite": "^9.1.4",
114
+ "@types/hoist-non-react-statics": "^3.3.7",
115
+ "@types/node": "^24.3.0",
116
+ "@types/react": "^19.1.10",
117
+ "@types/react-dom": "^19.1.7",
118
+ "@vitejs/plugin-react": "^5.0.0",
119
+ "copyfiles": "^2.1.0",
120
+ "eslint": "^9.33.0",
121
+ "eslint-plugin-react-hooks": "^5.2.0",
122
+ "eslint-plugin-react-refresh": "^0.4.20",
123
+ "eslint-plugin-storybook": "^9.1.4",
124
+ "globals": "^16.3.0",
125
+ "storybook": "^9.1.4",
126
+ "tw-animate-css": "^1.3.7",
127
+ "typescript": "~5.8.3",
128
+ "typescript-eslint": "^8.39.1",
129
+ "vite": "^7.1.2",
130
+ "vite-plugin-dts": "^4.5.4",
131
+ "vite-plugin-graphql-codegen": "^3.6.3"
132
+ }
133
+ }