quantum-component-library 1.4.48 → 1.4.50-dev.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.
Files changed (49) hide show
  1. package/dist/components.cjs +1 -1
  2. package/dist/components.js +1645 -1355
  3. package/dist/{dnd-core-vendor-gqRN0Czq.cjs → dnd-core-vendor-BtUZf9Ev.cjs} +1 -1
  4. package/dist/{dnd-core-vendor-CEbjUoFs.js → dnd-core-vendor-DLG1XK6O.js} +2 -2
  5. package/dist/generated/gql.d.ts +12 -2
  6. package/dist/generated/graphql.d.ts +69 -10
  7. package/dist/generated-graphql.cjs +1 -1
  8. package/dist/generated-graphql.js +60 -57
  9. package/dist/generated.cjs +1 -1
  10. package/dist/generated.js +45 -43
  11. package/dist/graphql/fragments/reports.d.ts +2 -0
  12. package/dist/{graphql-_vGi4u4K.js → graphql-BIKiRJ8I.js} +35 -16
  13. package/dist/{graphql-Ce2MNCsk.cjs → graphql-BhVmuiCG.cjs} +33 -16
  14. package/dist/{graphql-vendor-AFHxLsy8.cjs → graphql-vendor-BYC3nhzS.cjs} +1 -1
  15. package/dist/{graphql-vendor-hJezYUeG.js → graphql-vendor-N74bYJtL.js} +1 -1
  16. package/dist/hooks.cjs +1 -1
  17. package/dist/hooks.js +126 -74
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.js +133 -131
  20. package/dist/lib/hooks/index.d.ts +1 -0
  21. package/dist/lib/hooks/use-all-part-parameters.d.ts +8 -0
  22. package/dist/lib/services/human.d.ts +2 -1
  23. package/dist/lib/types/parameters.d.ts +2 -0
  24. package/dist/{lodash-vendor-CF0pV_0E.cjs → lodash-vendor-C3e6C_PJ.cjs} +1 -1
  25. package/dist/{lodash-vendor-apNdTTav.js → lodash-vendor-l9HldpVa.js} +1 -1
  26. package/dist/{other-D9ROT7p0.js → other-DE6uy3y4.js} +3 -3
  27. package/dist/{other-DyoApG-9.cjs → other-q0es350N.cjs} +1 -1
  28. package/dist/providers.cjs +1 -1
  29. package/dist/providers.js +1 -1
  30. package/dist/quantum-component-library.css +1 -1
  31. package/dist/{react-dnd-vendor-BCrg2QCX.js → react-dnd-vendor-BDOGawvX.js} +2 -2
  32. package/dist/{react-dnd-vendor-PwwXhPmK.cjs → react-dnd-vendor-BGRUqrp9.cjs} +1 -1
  33. package/dist/{react-select-vendor-BxbsY5Z-.js → react-select-vendor-C3wpaSL1.js} +1 -1
  34. package/dist/{react-select-vendor-BeWvSe2q.cjs → react-select-vendor-CZ69mhgt.cjs} +1 -1
  35. package/dist/services-human-CGLf7B6Q.cjs +1 -0
  36. package/dist/{services-human-B98qxeuS.js → services-human-CI19qLdG.js} +165 -157
  37. package/dist/services.cjs +1 -1
  38. package/dist/services.js +29 -28
  39. package/dist/types.cjs +1 -1
  40. package/dist/types.js +53 -53
  41. package/dist/{utils-conversion-CWypeWsT.cjs → utils-conversion-sLq5wEdq.cjs} +1 -1
  42. package/dist/{utils-conversion-ChFbq8I2.js → utils-conversion-zKwO4dYF.js} +1 -1
  43. package/dist/{utils-parameters-BBFuBK2B.js → utils-parameters-DkefNhWo.js} +4 -4
  44. package/dist/utils.cjs +1 -1
  45. package/dist/utils.js +2 -2
  46. package/dist/{vendor-BOD7IxCS.js → vendor--D-cya0B.js} +1 -1
  47. package/dist/{vendor-IPtJZCbx.cjs → vendor-jpI6KZW2.cjs} +1 -1
  48. package/package.json +1 -1
  49. package/dist/services-human-CnvSTmoF.cjs +0 -1
package/dist/hooks.js CHANGED
@@ -1,93 +1,145 @@
1
- import { a as c } from "./graphql-vendor-hJezYUeG.js";
2
- import { useMemo as i, useContext as d } from "react";
3
- import { Client as p, fetchExchange as f } from "urql";
4
- import { e as b, l as h, f as m, h as g, i as L, j as x, k as P } from "./services-human-B98qxeuS.js";
5
- import { sensorLocationToLimbId as u, AngleDataSource as a } from "./types.js";
6
- import { UiLabelContext as v } from "./providers.js";
1
+ import { useMemo as u, useContext as L } from "react";
2
+ import { h as y, i as A, j as b, k as v, l as J, m as x, n as S, o as C } from "./services-human-CI19qLdG.js";
3
+ import { AngleDataSource as m, sensorLocationToLimbId as g } from "./types.js";
4
+ import "./lodash-vendor-l9HldpVa.js";
5
+ import "./moment-vendor-DMLRxgRE.js";
6
+ import { a as E } from "./graphql-vendor-N74bYJtL.js";
7
+ import { Client as q, fetchExchange as F } from "urql";
8
+ import { UiLabelContext as j } from "./providers.js";
7
9
  import "./react-jsx-runtime-vendor-OVHDjVDe.js";
8
- import "./graphql-_vGi4u4K.js";
9
- const A = ({
10
+ import "./graphql-BIKiRJ8I.js";
11
+ const f = (e, s) => u(
12
+ () => e.flatMap(
13
+ (o) => y(o, s).map((n) => ({
14
+ id: { joint: o },
15
+ plane: n,
16
+ ...A(o, n),
17
+ sensorOnly: s === m.Sensor
18
+ }))
19
+ ),
20
+ [e, s]
21
+ ), p = (e, s) => {
22
+ const t = u(() => {
23
+ const n = b();
24
+ return e.filter((l) => n.some((i) => i.id === l));
25
+ }, [e]);
26
+ return u(
27
+ () => t.flatMap(
28
+ (n) => v(n, s).map((l) => ({
29
+ id: { segment: n },
30
+ plane: l,
31
+ ...J(n, l),
32
+ sensorOnly: s === m.Sensor
33
+ }))
34
+ ),
35
+ [t, s]
36
+ );
37
+ }, K = () => {
38
+ const e = b(), s = x(), t = p(
39
+ e.map((i) => i.id),
40
+ m.Pose
41
+ ), o = f(
42
+ s.map((i) => i.id),
43
+ m.Pose
44
+ ), n = p(
45
+ e.map((i) => i.id),
46
+ m.Sensor
47
+ ), l = f(
48
+ s.map((i) => i.id),
49
+ m.Sensor
50
+ );
51
+ return u(() => {
52
+ const i = [
53
+ ...o,
54
+ ...t,
55
+ ...l,
56
+ ...n
57
+ ], d = /* @__PURE__ */ new Map();
58
+ return i.forEach((r) => {
59
+ const c = "joint" in r.id ? `joint:${r.id.joint}:${r.plane}` : `segment:${r.id.segment}:${r.plane}`;
60
+ if (!d.has(c))
61
+ d.set(c, r);
62
+ else {
63
+ const a = d.get(c);
64
+ if (a.sensorOnly === !1 && r.sensorOnly === !0)
65
+ return;
66
+ a.sensorOnly === !0 && r.sensorOnly === !1 && d.set(c, { ...r, sensorOnly: !1 });
67
+ }
68
+ }), Array.from(d.values()).map((r) => {
69
+ const c = i.some((a) => {
70
+ const h = "joint" in r.id && "joint" in a.id ? r.id.joint === a.id.joint : "segment" in r.id && "segment" in a.id ? r.id.segment === a.id.segment : !1, O = a.plane === r.plane, P = a.sensorOnly === !1;
71
+ return h && O && P;
72
+ });
73
+ return {
74
+ ...r,
75
+ sensorOnly: !c
76
+ };
77
+ });
78
+ }, [
79
+ o,
80
+ t,
81
+ l,
82
+ n
83
+ ]);
84
+ }, w = ({
10
85
  url: e,
11
- getAuthToken: r
12
- }) => new p({
86
+ getAuthToken: s
87
+ }) => new q({
13
88
  url: e,
14
89
  requestPolicy: "cache-and-network",
15
90
  exchanges: [
16
- c((s) => {
17
- const n = r();
91
+ E((t) => {
92
+ const o = s();
18
93
  return Promise.resolve({
19
- addAuthToOperation(t) {
20
- return n ? s.appendHeaders(t, {
21
- Authorization: `Bearer ${n}`
22
- }) : t;
94
+ addAuthToOperation(n) {
95
+ return o ? t.appendHeaders(n, {
96
+ Authorization: `Bearer ${o}`
97
+ }) : n;
23
98
  },
24
- didAuthError: (t) => /unauthorized/gi.test(t?.message),
99
+ didAuthError: (n) => /unauthorized/gi.test(n?.message),
25
100
  refreshAuth: () => Promise.resolve()
26
101
  });
27
102
  }),
28
- f
103
+ F
29
104
  ]
30
- }), k = ({
105
+ }), Q = ({
31
106
  url: e,
32
- getAuthToken: r
33
- }) => i(
34
- () => A({ url: e, getAuthToken: r }),
35
- [e, r]
36
- ), C = (e) => {
37
- const r = b();
38
- return i(() => r.filter((s) => s.id === "NavalSpine" || s.id === "ChestSpine" ? !1 : h[s.id].every((t) => e.includes(t))), [e, r]);
39
- }, J = (e) => {
40
- const r = i(() => e.map(u).filter((n) => !!n), [e]);
41
- return C(r);
42
- }, F = (e) => i(() => {
43
- const s = m(), n = e.map(u);
44
- return s.filter((t) => n.includes(t.id));
45
- }, [e]), S = (e, r) => i(
46
- () => e.flatMap(
47
- (n) => g(n, r).map((t) => ({
48
- id: { joint: n },
49
- plane: t,
50
- ...L(n, t)
51
- }))
52
- ),
53
- [e, r]
54
- ), E = (e, r) => {
55
- const s = i(() => {
56
- const t = m();
57
- return e.filter((o) => t.some((l) => l.id === o));
58
- }, [e]);
59
- return i(
60
- () => s.flatMap(
61
- (t) => x(t, r).map((o) => ({
62
- id: { segment: t },
63
- plane: o,
64
- ...P(t, o)
65
- }))
66
- ),
67
- [s, r]
68
- );
69
- }, y = (e) => {
70
- const r = F(e), s = J(e), n = S(
71
- s.map((o) => o.id),
72
- a.Sensor
73
- ), t = E(
74
- r.map((o) => o.id),
75
- a.Sensor
107
+ getAuthToken: s
108
+ }) => u(
109
+ () => w({ url: e, getAuthToken: s }),
110
+ [e, s]
111
+ ), I = (e) => {
112
+ const s = S();
113
+ return u(() => s.filter((t) => t.id === "NavalSpine" || t.id === "ChestSpine" ? !1 : C[t.id].every((n) => e.includes(n))), [e, s]);
114
+ }, $ = (e) => {
115
+ const s = u(() => e.map(g).filter((o) => !!o), [e]);
116
+ return I(s);
117
+ }, M = (e) => u(() => {
118
+ const t = b(), o = e.map(g);
119
+ return t.filter((n) => o.includes(n.id));
120
+ }, [e]), V = (e) => {
121
+ const s = M(e), t = $(e), o = f(
122
+ t.map((l) => l.id),
123
+ m.Sensor
124
+ ), n = p(
125
+ s.map((l) => l.id),
126
+ m.Sensor
76
127
  );
77
- return [...n, ...t];
78
- }, z = () => {
79
- const e = d(v);
128
+ return [...o, ...n];
129
+ }, W = () => {
130
+ const e = L(j);
80
131
  if (e === void 0)
81
132
  throw new Error("useUiLabelContext must be used within a UiLabelProvider");
82
133
  return e;
83
134
  };
84
135
  export {
85
- k as useGraphqlClient,
86
- C as useJointsForLimbIds,
87
- J as useJointsForSensorLocations,
88
- F as useLimbsForSensorLocations,
89
- S as usePartOptionsForJoints,
90
- E as usePartOptionsForLimbs,
91
- y as usePartOptionsForSensorLocations,
92
- z as useUiLabelContext
136
+ K as useAllPartParameters,
137
+ Q as useGraphqlClient,
138
+ I as useJointsForLimbIds,
139
+ $ as useJointsForSensorLocations,
140
+ M as useLimbsForSensorLocations,
141
+ f as usePartOptionsForJoints,
142
+ p as usePartOptionsForLimbs,
143
+ V as usePartOptionsForSensorLocations,
144
+ W as useUiLabelContext
93
145
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./other-DyoApG-9.cjs");const o=require("./components.cjs"),a=require("./hooks.cjs"),n=require("./providers.cjs"),s=require("./services-action-DBOzfgMl.cjs"),e=require("./services-human-CnvSTmoF.cjs"),t=require("./types.cjs"),m=require("./utils-cn-FIKrq5Mb.cjs"),i=require("./utils-conversion-CWypeWsT.cjs"),g=require("./utils-memo-BJJP2KfI.cjs"),r=require("./utils-parameters-dwKmz1VU.cjs"),l=require("./utils-text-lORqO4uI.cjs");exports.ActivityList=o.ActivityList;exports.CopyActivityForm=o.CopyActivityForm;exports.CopyModuleForm=o.CopyModuleForm;exports.ModuleForm=o.ModuleForm;exports.ParameterEditList=o.ParameterEditList;exports.ParameterEditSelect=o.ParameterEditSelect;exports.UpsertActivityForm=o.UpsertActivityForm;exports.UpsertModuleForm=o.UpsertModuleForm;exports.useGraphqlClient=a.useGraphqlClient;exports.useJointsForLimbIds=a.useJointsForLimbIds;exports.useJointsForSensorLocations=a.useJointsForSensorLocations;exports.useLimbsForSensorLocations=a.useLimbsForSensorLocations;exports.usePartOptionsForJoints=a.usePartOptionsForJoints;exports.usePartOptionsForLimbs=a.usePartOptionsForLimbs;exports.usePartOptionsForSensorLocations=a.usePartOptionsForSensorLocations;exports.useUiLabelContext=a.useUiLabelContext;exports.QuantumLibraryProvider=n.QuantumLibraryProvider;exports.UiLabelContext=n.UiLabelContext;exports.UiLabelProvider=n.UiLabelProvider;exports.getActivityKindFromActivityType=s.getActivityKindFromActivityType;exports.mapActivityTypeEnumToLabel=s.mapActivityTypeEnumToLabel;exports.mapSessionTypeEnumToLabel=s.mapSessionTypeEnumToLabel;exports.getAllAvailableJoints=e.getAllAvailableJoints;exports.getAllAvailableLimbs=e.getAllAvailableLimbs;exports.getAllAvailablePoseJoints=e.getAllAvailablePoseJoints;exports.getAllAvailablePoseLimbs=e.getAllAvailablePoseLimbs;exports.getAllAvailableSensorJoints=e.getAllAvailableSensorJoints;exports.getAngleDirectionNames=e.getAngleDirectionNames;exports.getAvailableLimbsForLimbIds=e.getAvailableLimbsForLimbIds;exports.getAvailablePoseJointsForLimbIds=e.getAvailablePoseJointsForLimbIds;exports.getAvailableSensorJointsForLimbIds=e.getAvailableSensorJointsForLimbIds;exports.getAxis=e.getAxis;exports.getDefaultAngleSource=e.getDefaultAngleSource;exports.getDefaultJointRange=e.getDefaultJointRange;exports.getDefaultLimbRange=e.getDefaultLimbRange;exports.getEnabledJointPlanes=e.getEnabledJointPlanes;exports.getEnabledSegmentPlanes=e.getEnabledSegmentPlanes;exports.getHumanBodyAngle=e.getHumanBodyAngle;exports.getIsDefaultAngleAllowed=e.getIsDefaultAngleAllowed;exports.getJointAngleDirectionAbbr=e.getJointAngleDirectionAbbr;exports.getJointAngleDirectionName=e.getJointAngleDirectionName;exports.getJointNameWithPlane=e.getJointNameWithPlane;exports.getJointOrSegmentNameWithPlane=e.getJointOrSegmentNameWithPlane;exports.getJointPlaneName=e.getJointPlaneName;exports.getNormativeJointRange=e.getNormativeJointRange;exports.getParameterAngleDirectionName=e.getParameterAngleDirectionName;exports.getParameterDirectionNames=e.getParameterDirectionNames;exports.getPartName=e.getPartName;exports.getPartNameNoSide=e.getPartNameNoSide;exports.getPlane=e.getPlane;exports.getSegmentAngleDirectionAbbr=e.getSegmentAngleDirectionAbbr;exports.getSegmentAngleDirectionName=e.getSegmentAngleDirectionName;exports.getSegmentNameWithPlane=e.getSegmentNameWithPlane;exports.getSegmentXyzName=e.getSegmentXyzName;exports.getTypicalRom=e.getTypicalRom;exports.getTypicalRomSize=e.getTypicalRomSize;exports.isAxis=e.isAxis;exports.isJoint=e.isJoint;exports.isLimb=e.isLimb;exports.isPlane=e.isPlane;exports.jointNames=e.jointNames;exports.jointsUsedByLimbs=e.jointsUsedByLimbs;exports.limbNames=e.limbNames;exports.limbsRequiredForJoints=e.limbsRequiredForJoints;exports.mkAccelerationPart=e.mkAccelerationPart;exports.mkAngularVelocityPart=e.mkAngularVelocityPart;exports.mkHumanPart=e.mkHumanPart;exports.mkJointPart=e.mkJointPart;exports.mkLimbPart=e.mkLimbPart;exports.planeOrAxis=e.planeOrAxis;exports.AngleDataSource=t.AngleDataSource;exports.analysisStatBuilder=t.analysisStatBuilder;exports.areThresholdsEmpty=t.areThresholdsEmpty;exports.availablePlanes=t.availablePlanes;exports.axes=t.axes;exports.canBeVerticalForce=t.canBeVerticalForce;exports.dimensionName=t.dimensionName;exports.dimensionToLegacy=t.dimensionToLegacy;exports.getAnalysisName=t.getAnalysisName;exports.getAnalysisPartIdNoSide=t.getAnalysisPartIdNoSide;exports.getJointIdNoSide=t.getJointIdNoSide;exports.getJointIdWithSide=t.getJointIdWithSide;exports.getLimbIdNoSide=t.getLimbIdNoSide;exports.getLimbIdWithSide=t.getLimbIdWithSide;exports.getPointSide=t.getPointSide;exports.isDeviceEqual=t.isDeviceEqual;exports.isLimbTrackingFrame=t.isLimbTrackingFrame;exports.isSyncError=t.isSyncError;exports.jointAngle=t.jointAngle;exports.jointOrLimbHasThreshold=t.jointOrLimbHasThreshold;exports.jointOrLimbThresholdCount=t.jointOrLimbThresholdCount;exports.limbAngle=t.limbAngle;exports.mkUnit=t.mkUnit;exports.partAndPlaneHasThreshold=t.partAndPlaneHasThreshold;exports.partIdName=t.partIdName;exports.partIdToJointLimbId=t.partIdToJointLimbId;exports.partIdToString=t.partIdToString;exports.partKinds=t.partKinds;exports.planes=t.planes;exports.sensorLocationName=t.sensorLocationName;exports.sensorLocationToLimbId=t.sensorLocationToLimbId;exports.thresholdForPart=t.thresholdForPart;exports.thresholdFragmentsToThresholds=t.thresholdFragmentsToThresholds;exports.thresholdsToInput=t.thresholdsToInput;exports.tryMkUnit=t.tryMkUnit;exports.updateThreshold=t.updateThreshold;exports.cn=m.cn;exports.degToRad=i.degToRad;exports.getFormatterForParameter=i.getFormatterForParameter;exports.getUnitFormatted=i.getUnitFormatted;exports.getUnitValueFormatted=i.getUnitValueFormatted;exports.hourMinSecStrToMs=i.hourMinSecStrToMs;exports.inchesToMeters=i.inchesToMeters;exports.kgToPounds=i.kgToPounds;exports.metersToInches=i.metersToInches;exports.msToDurationStr=i.msToDurationStr;exports.msToHourMinSecStr=i.msToHourMinSecStr;exports.msToPrettyStr=i.msToPrettyStr;exports.msToTimestampStr=i.msToTimestampStr;exports.poundsToKg=i.poundsToKg;exports.radToDeg=i.radToDeg;exports.sToTimestampStr=i.sToTimestampStr;exports.safelyConvertEnum=i.safelyConvertEnum;exports.secondsToTimestampStr=i.secondsToTimestampStr;exports.memo=g.memo;exports.parameterToThreshold=r.parameterToThreshold;exports.parametersToThresholds=r.parametersToThresholds;exports.thresholdToParameter=r.thresholdToParameter;exports.thresholdsToParameters=r.thresholdsToParameters;exports.capitalizeAll=l.capitalizeAll;exports.pluralize=l.pluralize;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./other-q0es350N.cjs");const a=require("./components.cjs"),o=require("./hooks.cjs"),s=require("./providers.cjs"),n=require("./services-action-DBOzfgMl.cjs"),e=require("./services-human-CGLf7B6Q.cjs"),t=require("./types.cjs"),m=require("./utils-cn-FIKrq5Mb.cjs"),i=require("./utils-conversion-sLq5wEdq.cjs"),g=require("./utils-memo-BJJP2KfI.cjs"),r=require("./utils-parameters-dwKmz1VU.cjs"),l=require("./utils-text-lORqO4uI.cjs");exports.ActivityList=a.ActivityList;exports.CopyActivityForm=a.CopyActivityForm;exports.CopyModuleForm=a.CopyModuleForm;exports.ModuleForm=a.ModuleForm;exports.ParameterEditList=a.ParameterEditList;exports.ParameterEditSelect=a.ParameterEditSelect;exports.UpsertActivityForm=a.UpsertActivityForm;exports.UpsertModuleForm=a.UpsertModuleForm;exports.useAllPartParameters=o.useAllPartParameters;exports.useGraphqlClient=o.useGraphqlClient;exports.useJointsForLimbIds=o.useJointsForLimbIds;exports.useJointsForSensorLocations=o.useJointsForSensorLocations;exports.useLimbsForSensorLocations=o.useLimbsForSensorLocations;exports.usePartOptionsForJoints=o.usePartOptionsForJoints;exports.usePartOptionsForLimbs=o.usePartOptionsForLimbs;exports.usePartOptionsForSensorLocations=o.usePartOptionsForSensorLocations;exports.useUiLabelContext=o.useUiLabelContext;exports.QuantumLibraryProvider=s.QuantumLibraryProvider;exports.UiLabelContext=s.UiLabelContext;exports.UiLabelProvider=s.UiLabelProvider;exports.getActivityKindFromActivityType=n.getActivityKindFromActivityType;exports.mapActivityTypeEnumToLabel=n.mapActivityTypeEnumToLabel;exports.mapSessionTypeEnumToLabel=n.mapSessionTypeEnumToLabel;exports.getAllAvailableJoints=e.getAllAvailableJoints;exports.getAllAvailableLimbs=e.getAllAvailableLimbs;exports.getAllAvailablePoseJoints=e.getAllAvailablePoseJoints;exports.getAllAvailablePoseLimbs=e.getAllAvailablePoseLimbs;exports.getAllAvailableSensorJoints=e.getAllAvailableSensorJoints;exports.getAngleDirectionNames=e.getAngleDirectionNames;exports.getAvailableLimbsForLimbIds=e.getAvailableLimbsForLimbIds;exports.getAvailablePoseJointsForLimbIds=e.getAvailablePoseJointsForLimbIds;exports.getAvailableSensorJointsForLimbIds=e.getAvailableSensorJointsForLimbIds;exports.getAxis=e.getAxis;exports.getDefaultAngleSource=e.getDefaultAngleSource;exports.getDefaultJointRange=e.getDefaultJointRange;exports.getDefaultLimbRange=e.getDefaultLimbRange;exports.getEnabledJointPlanes=e.getEnabledJointPlanes;exports.getEnabledSegmentPlanes=e.getEnabledSegmentPlanes;exports.getHumanBodyAngle=e.getHumanBodyAngle;exports.getIsDefaultAngleAllowed=e.getIsDefaultAngleAllowed;exports.getJointAngleDirectionAbbr=e.getJointAngleDirectionAbbr;exports.getJointAngleDirectionName=e.getJointAngleDirectionName;exports.getJointNameWithPlane=e.getJointNameWithPlane;exports.getJointOrSegmentNameWithPlane=e.getJointOrSegmentNameWithPlane;exports.getJointPlaneName=e.getJointPlaneName;exports.getNormativeJointRange=e.getNormativeJointRange;exports.getParameterAngleDirectionName=e.getParameterAngleDirectionName;exports.getParameterDirectionNames=e.getParameterDirectionNames;exports.getPartName=e.getPartName;exports.getPartNameNoSide=e.getPartNameNoSide;exports.getPlane=e.getPlane;exports.getSegmentAngleDirectionAbbr=e.getSegmentAngleDirectionAbbr;exports.getSegmentAngleDirectionName=e.getSegmentAngleDirectionName;exports.getSegmentNameWithPlane=e.getSegmentNameWithPlane;exports.getSegmentXyzName=e.getSegmentXyzName;exports.getSuggestedSensorLocations=e.getSuggestedSensorLocations;exports.getTypicalRom=e.getTypicalRom;exports.getTypicalRomSize=e.getTypicalRomSize;exports.isAxis=e.isAxis;exports.isJoint=e.isJoint;exports.isLimb=e.isLimb;exports.isPlane=e.isPlane;exports.jointNames=e.jointNames;exports.jointsUsedByLimbs=e.jointsUsedByLimbs;exports.limbNames=e.limbNames;exports.limbsRequiredForJoints=e.limbsRequiredForJoints;exports.mkAccelerationPart=e.mkAccelerationPart;exports.mkAngularVelocityPart=e.mkAngularVelocityPart;exports.mkHumanPart=e.mkHumanPart;exports.mkJointPart=e.mkJointPart;exports.mkLimbPart=e.mkLimbPart;exports.planeOrAxis=e.planeOrAxis;exports.AngleDataSource=t.AngleDataSource;exports.analysisStatBuilder=t.analysisStatBuilder;exports.areThresholdsEmpty=t.areThresholdsEmpty;exports.availablePlanes=t.availablePlanes;exports.axes=t.axes;exports.canBeVerticalForce=t.canBeVerticalForce;exports.dimensionName=t.dimensionName;exports.dimensionToLegacy=t.dimensionToLegacy;exports.getAnalysisName=t.getAnalysisName;exports.getAnalysisPartIdNoSide=t.getAnalysisPartIdNoSide;exports.getJointIdNoSide=t.getJointIdNoSide;exports.getJointIdWithSide=t.getJointIdWithSide;exports.getLimbIdNoSide=t.getLimbIdNoSide;exports.getLimbIdWithSide=t.getLimbIdWithSide;exports.getPointSide=t.getPointSide;exports.isDeviceEqual=t.isDeviceEqual;exports.isLimbTrackingFrame=t.isLimbTrackingFrame;exports.isSyncError=t.isSyncError;exports.jointAngle=t.jointAngle;exports.jointOrLimbHasThreshold=t.jointOrLimbHasThreshold;exports.jointOrLimbThresholdCount=t.jointOrLimbThresholdCount;exports.limbAngle=t.limbAngle;exports.mkUnit=t.mkUnit;exports.partAndPlaneHasThreshold=t.partAndPlaneHasThreshold;exports.partIdName=t.partIdName;exports.partIdToJointLimbId=t.partIdToJointLimbId;exports.partIdToString=t.partIdToString;exports.partKinds=t.partKinds;exports.planes=t.planes;exports.sensorLocationName=t.sensorLocationName;exports.sensorLocationToLimbId=t.sensorLocationToLimbId;exports.thresholdForPart=t.thresholdForPart;exports.thresholdFragmentsToThresholds=t.thresholdFragmentsToThresholds;exports.thresholdsToInput=t.thresholdsToInput;exports.tryMkUnit=t.tryMkUnit;exports.updateThreshold=t.updateThreshold;exports.cn=m.cn;exports.degToRad=i.degToRad;exports.getFormatterForParameter=i.getFormatterForParameter;exports.getUnitFormatted=i.getUnitFormatted;exports.getUnitValueFormatted=i.getUnitValueFormatted;exports.hourMinSecStrToMs=i.hourMinSecStrToMs;exports.inchesToMeters=i.inchesToMeters;exports.kgToPounds=i.kgToPounds;exports.metersToInches=i.metersToInches;exports.msToDurationStr=i.msToDurationStr;exports.msToHourMinSecStr=i.msToHourMinSecStr;exports.msToPrettyStr=i.msToPrettyStr;exports.msToTimestampStr=i.msToTimestampStr;exports.poundsToKg=i.poundsToKg;exports.radToDeg=i.radToDeg;exports.sToTimestampStr=i.sToTimestampStr;exports.safelyConvertEnum=i.safelyConvertEnum;exports.secondsToTimestampStr=i.secondsToTimestampStr;exports.memo=g.memo;exports.parameterToThreshold=r.parameterToThreshold;exports.parametersToThresholds=r.parametersToThresholds;exports.thresholdToParameter=r.thresholdToParameter;exports.thresholdsToParameters=r.thresholdsToParameters;exports.capitalizeAll=l.capitalizeAll;exports.pluralize=l.pluralize;
package/dist/index.js CHANGED
@@ -1,145 +1,147 @@
1
- import "./other-D9ROT7p0.js";
1
+ import "./other-DE6uy3y4.js";
2
2
  import { ActivityList as s, CopyActivityForm as o, CopyModuleForm as i, ModuleForm as r, ParameterEditList as n, ParameterEditSelect as m, UpsertActivityForm as l, UpsertModuleForm as g } from "./components.js";
3
- import { useGraphqlClient as p, useJointsForLimbIds as b, useJointsForSensorLocations as c, useLimbsForSensorLocations as A, usePartOptionsForJoints as T, usePartOptionsForLimbs as u, usePartOptionsForSensorLocations as P, useUiLabelContext as h } from "./hooks.js";
4
- import { QuantumLibraryProvider as L, UiLabelContext as y, UiLabelProvider as F } from "./providers.js";
5
- import { g as J, m as v, a as f } from "./services-action-CfZFwhy-.js";
6
- import { e as I, f as D, r as k, s as E, q as U, T as M, p as C, u as O, t as R, H as j, N as H, i as z, k as B, h as W, j as q, P as K, O as V, v as w, b as G, a as Q, S as X, Q as Y, d as Z, V as _, U as $, J as ee, K as ae, I as te, w as se, c as oe, g as ie, R as re, L as ne, M as me, B as le, E as ge, D as de, C as pe, n as be, o as ce, m as Ae, l as Te, z as ue, A as Pe, F as he, x as Se, y as Le, G as ye } from "./services-human-B98qxeuS.js";
7
- import { AngleDataSource as Ne, analysisStatBuilder as Je, areThresholdsEmpty as ve, availablePlanes as fe, axes as xe, canBeVerticalForce as Ie, dimensionName as De, dimensionToLegacy as ke, getAnalysisName as Ee, getAnalysisPartIdNoSide as Ue, getJointIdNoSide as Me, getJointIdWithSide as Ce, getLimbIdNoSide as Oe, getLimbIdWithSide as Re, getPointSide as je, isDeviceEqual as He, isLimbTrackingFrame as ze, isSyncError as Be, jointAngle as We, jointOrLimbHasThreshold as qe, jointOrLimbThresholdCount as Ke, limbAngle as Ve, mkUnit as we, partAndPlaneHasThreshold as Ge, partIdName as Qe, partIdToJointLimbId as Xe, partIdToString as Ye, partKinds as Ze, planes as _e, sensorLocationName as $e, sensorLocationToLimbId as ea, thresholdForPart as aa, thresholdFragmentsToThresholds as ta, thresholdsToInput as sa, tryMkUnit as oa, updateThreshold as ia } from "./types.js";
8
- import { c as na } from "./utils-cn-CgdSr4hO.js";
9
- import { d as la, n as ga, j as da, g as pa, h as ba, i as ca, k as Aa, m as Ta, a as ua, e as Pa, c as ha, b as Sa, p as La, r as ya, s as Fa, l as Na, f as Ja } from "./utils-conversion-ChFbq8I2.js";
10
- import { m as fa } from "./utils-memo-DtXdOqCT.js";
11
- import { a as Ia, p as Da, b as ka, t as Ea } from "./utils-parameters-BBFuBK2B.js";
12
- import { c as Ma, p as Ca } from "./utils-text-CN3zLiZ7.js";
3
+ import { useAllPartParameters as p, useGraphqlClient as b, useJointsForLimbIds as c, useJointsForSensorLocations as A, useLimbsForSensorLocations as T, usePartOptionsForJoints as u, usePartOptionsForLimbs as P, usePartOptionsForSensorLocations as S, useUiLabelContext as h } from "./hooks.js";
4
+ import { QuantumLibraryProvider as y, UiLabelContext as F, UiLabelProvider as N } from "./providers.js";
5
+ import { g as v, m as f, a as x } from "./services-action-CfZFwhy-.js";
6
+ import { n as D, j as k, m as E, u as U, t as M, U as C, s as O, w as R, v as j, J as H, O as W, i as z, l as B, h as q, k as K, Q as V, P as w, x as G, b as Q, a as X, T as Y, R as Z, d as _, W as $, V as ee, e as ae, L as te, K as se, y as oe, c as ie, g as re, S as ne, f as me, M as le, N as ge, D as de, G as pe, F as be, E as ce, q as Ae, r as Te, p as ue, o as Pe, B as Se, C as he, H as Le, z as ye, A as Fe, I as Ne } from "./services-human-CI19qLdG.js";
7
+ import { AngleDataSource as ve, analysisStatBuilder as fe, areThresholdsEmpty as xe, availablePlanes as Ie, axes as De, canBeVerticalForce as ke, dimensionName as Ee, dimensionToLegacy as Ue, getAnalysisName as Me, getAnalysisPartIdNoSide as Ce, getJointIdNoSide as Oe, getJointIdWithSide as Re, getLimbIdNoSide as je, getLimbIdWithSide as He, getPointSide as We, isDeviceEqual as ze, isLimbTrackingFrame as Be, isSyncError as qe, jointAngle as Ke, jointOrLimbHasThreshold as Ve, jointOrLimbThresholdCount as we, limbAngle as Ge, mkUnit as Qe, partAndPlaneHasThreshold as Xe, partIdName as Ye, partIdToJointLimbId as Ze, partIdToString as _e, partKinds as $e, planes as ea, sensorLocationName as aa, sensorLocationToLimbId as ta, thresholdForPart as sa, thresholdFragmentsToThresholds as oa, thresholdsToInput as ia, tryMkUnit as ra, updateThreshold as na } from "./types.js";
8
+ import { c as la } from "./utils-cn-CgdSr4hO.js";
9
+ import { d as da, n as pa, j as ba, g as ca, h as Aa, i as Ta, k as ua, m as Pa, a as Sa, e as ha, c as La, b as ya, p as Fa, r as Na, s as Ja, l as va, f as fa } from "./utils-conversion-zKwO4dYF.js";
10
+ import { m as Ia } from "./utils-memo-DtXdOqCT.js";
11
+ import { p as ka, a as Ea, t as Ua, b as Ma } from "./utils-parameters-DkefNhWo.js";
12
+ import { c as Oa, p as Ra } from "./utils-text-CN3zLiZ7.js";
13
13
  export {
14
14
  s as ActivityList,
15
- Ne as AngleDataSource,
15
+ ve as AngleDataSource,
16
16
  o as CopyActivityForm,
17
17
  i as CopyModuleForm,
18
18
  r as ModuleForm,
19
19
  n as ParameterEditList,
20
20
  m as ParameterEditSelect,
21
- L as QuantumLibraryProvider,
22
- y as UiLabelContext,
23
- F as UiLabelProvider,
21
+ y as QuantumLibraryProvider,
22
+ F as UiLabelContext,
23
+ N as UiLabelProvider,
24
24
  l as UpsertActivityForm,
25
25
  g as UpsertModuleForm,
26
- Je as analysisStatBuilder,
27
- ve as areThresholdsEmpty,
28
- fe as availablePlanes,
29
- xe as axes,
30
- Ie as canBeVerticalForce,
31
- Ma as capitalizeAll,
32
- na as cn,
33
- la as degToRad,
34
- De as dimensionName,
35
- ke as dimensionToLegacy,
36
- J as getActivityKindFromActivityType,
37
- I as getAllAvailableJoints,
38
- D as getAllAvailableLimbs,
39
- k as getAllAvailablePoseJoints,
40
- E as getAllAvailablePoseLimbs,
41
- U as getAllAvailableSensorJoints,
42
- Ee as getAnalysisName,
43
- Ue as getAnalysisPartIdNoSide,
44
- M as getAngleDirectionNames,
45
- C as getAvailableLimbsForLimbIds,
46
- O as getAvailablePoseJointsForLimbIds,
47
- R as getAvailableSensorJointsForLimbIds,
48
- j as getAxis,
49
- H as getDefaultAngleSource,
26
+ fe as analysisStatBuilder,
27
+ xe as areThresholdsEmpty,
28
+ Ie as availablePlanes,
29
+ De as axes,
30
+ ke as canBeVerticalForce,
31
+ Oa as capitalizeAll,
32
+ la as cn,
33
+ da as degToRad,
34
+ Ee as dimensionName,
35
+ Ue as dimensionToLegacy,
36
+ v as getActivityKindFromActivityType,
37
+ D as getAllAvailableJoints,
38
+ k as getAllAvailableLimbs,
39
+ E as getAllAvailablePoseJoints,
40
+ U as getAllAvailablePoseLimbs,
41
+ M as getAllAvailableSensorJoints,
42
+ Me as getAnalysisName,
43
+ Ce as getAnalysisPartIdNoSide,
44
+ C as getAngleDirectionNames,
45
+ O as getAvailableLimbsForLimbIds,
46
+ R as getAvailablePoseJointsForLimbIds,
47
+ j as getAvailableSensorJointsForLimbIds,
48
+ H as getAxis,
49
+ W as getDefaultAngleSource,
50
50
  z as getDefaultJointRange,
51
51
  B as getDefaultLimbRange,
52
- W as getEnabledJointPlanes,
53
- q as getEnabledSegmentPlanes,
54
- ga as getFormatterForParameter,
55
- K as getHumanBodyAngle,
56
- V as getIsDefaultAngleAllowed,
57
- w as getJointAngleDirectionAbbr,
58
- G as getJointAngleDirectionName,
59
- Me as getJointIdNoSide,
60
- Ce as getJointIdWithSide,
61
- Q as getJointNameWithPlane,
62
- X as getJointOrSegmentNameWithPlane,
63
- Y as getJointPlaneName,
64
- Oe as getLimbIdNoSide,
65
- Re as getLimbIdWithSide,
66
- Z as getNormativeJointRange,
67
- _ as getParameterAngleDirectionName,
68
- $ as getParameterDirectionNames,
69
- ee as getPartName,
70
- ae as getPartNameNoSide,
71
- te as getPlane,
72
- je as getPointSide,
73
- se as getSegmentAngleDirectionAbbr,
74
- oe as getSegmentAngleDirectionName,
75
- ie as getSegmentNameWithPlane,
76
- re as getSegmentXyzName,
77
- ne as getTypicalRom,
78
- me as getTypicalRomSize,
79
- da as getUnitFormatted,
80
- pa as getUnitValueFormatted,
81
- ba as hourMinSecStrToMs,
82
- ca as inchesToMeters,
83
- le as isAxis,
84
- He as isDeviceEqual,
85
- ge as isJoint,
86
- de as isLimb,
87
- ze as isLimbTrackingFrame,
88
- pe as isPlane,
89
- Be as isSyncError,
90
- We as jointAngle,
91
- be as jointNames,
92
- qe as jointOrLimbHasThreshold,
93
- Ke as jointOrLimbThresholdCount,
94
- ce as jointsUsedByLimbs,
95
- Aa as kgToPounds,
96
- Ve as limbAngle,
97
- Ae as limbNames,
98
- Te as limbsRequiredForJoints,
99
- v as mapActivityTypeEnumToLabel,
100
- f as mapSessionTypeEnumToLabel,
101
- fa as memo,
102
- Ta as metersToInches,
103
- ue as mkAccelerationPart,
104
- Pe as mkAngularVelocityPart,
105
- he as mkHumanPart,
106
- Se as mkJointPart,
107
- Le as mkLimbPart,
108
- we as mkUnit,
109
- ua as msToDurationStr,
110
- Pa as msToHourMinSecStr,
111
- ha as msToPrettyStr,
112
- Sa as msToTimestampStr,
113
- Ia as parameterToThreshold,
114
- Da as parametersToThresholds,
115
- Ge as partAndPlaneHasThreshold,
116
- Qe as partIdName,
117
- Xe as partIdToJointLimbId,
118
- Ye as partIdToString,
119
- Ze as partKinds,
120
- ye as planeOrAxis,
121
- _e as planes,
122
- Ca as pluralize,
123
- La as poundsToKg,
124
- ya as radToDeg,
125
- Fa as sToTimestampStr,
126
- Na as safelyConvertEnum,
127
- Ja as secondsToTimestampStr,
128
- $e as sensorLocationName,
129
- ea as sensorLocationToLimbId,
130
- aa as thresholdForPart,
131
- ta as thresholdFragmentsToThresholds,
132
- ka as thresholdToParameter,
133
- sa as thresholdsToInput,
134
- Ea as thresholdsToParameters,
135
- oa as tryMkUnit,
136
- ia as updateThreshold,
137
- p as useGraphqlClient,
138
- b as useJointsForLimbIds,
139
- c as useJointsForSensorLocations,
140
- A as useLimbsForSensorLocations,
141
- T as usePartOptionsForJoints,
142
- u as usePartOptionsForLimbs,
143
- P as usePartOptionsForSensorLocations,
52
+ q as getEnabledJointPlanes,
53
+ K as getEnabledSegmentPlanes,
54
+ pa as getFormatterForParameter,
55
+ V as getHumanBodyAngle,
56
+ w as getIsDefaultAngleAllowed,
57
+ G as getJointAngleDirectionAbbr,
58
+ Q as getJointAngleDirectionName,
59
+ Oe as getJointIdNoSide,
60
+ Re as getJointIdWithSide,
61
+ X as getJointNameWithPlane,
62
+ Y as getJointOrSegmentNameWithPlane,
63
+ Z as getJointPlaneName,
64
+ je as getLimbIdNoSide,
65
+ He as getLimbIdWithSide,
66
+ _ as getNormativeJointRange,
67
+ $ as getParameterAngleDirectionName,
68
+ ee as getParameterDirectionNames,
69
+ ae as getPartName,
70
+ te as getPartNameNoSide,
71
+ se as getPlane,
72
+ We as getPointSide,
73
+ oe as getSegmentAngleDirectionAbbr,
74
+ ie as getSegmentAngleDirectionName,
75
+ re as getSegmentNameWithPlane,
76
+ ne as getSegmentXyzName,
77
+ me as getSuggestedSensorLocations,
78
+ le as getTypicalRom,
79
+ ge as getTypicalRomSize,
80
+ ba as getUnitFormatted,
81
+ ca as getUnitValueFormatted,
82
+ Aa as hourMinSecStrToMs,
83
+ Ta as inchesToMeters,
84
+ de as isAxis,
85
+ ze as isDeviceEqual,
86
+ pe as isJoint,
87
+ be as isLimb,
88
+ Be as isLimbTrackingFrame,
89
+ ce as isPlane,
90
+ qe as isSyncError,
91
+ Ke as jointAngle,
92
+ Ae as jointNames,
93
+ Ve as jointOrLimbHasThreshold,
94
+ we as jointOrLimbThresholdCount,
95
+ Te as jointsUsedByLimbs,
96
+ ua as kgToPounds,
97
+ Ge as limbAngle,
98
+ ue as limbNames,
99
+ Pe as limbsRequiredForJoints,
100
+ f as mapActivityTypeEnumToLabel,
101
+ x as mapSessionTypeEnumToLabel,
102
+ Ia as memo,
103
+ Pa as metersToInches,
104
+ Se as mkAccelerationPart,
105
+ he as mkAngularVelocityPart,
106
+ Le as mkHumanPart,
107
+ ye as mkJointPart,
108
+ Fe as mkLimbPart,
109
+ Qe as mkUnit,
110
+ Sa as msToDurationStr,
111
+ ha as msToHourMinSecStr,
112
+ La as msToPrettyStr,
113
+ ya as msToTimestampStr,
114
+ ka as parameterToThreshold,
115
+ Ea as parametersToThresholds,
116
+ Xe as partAndPlaneHasThreshold,
117
+ Ye as partIdName,
118
+ Ze as partIdToJointLimbId,
119
+ _e as partIdToString,
120
+ $e as partKinds,
121
+ Ne as planeOrAxis,
122
+ ea as planes,
123
+ Ra as pluralize,
124
+ Fa as poundsToKg,
125
+ Na as radToDeg,
126
+ Ja as sToTimestampStr,
127
+ va as safelyConvertEnum,
128
+ fa as secondsToTimestampStr,
129
+ aa as sensorLocationName,
130
+ ta as sensorLocationToLimbId,
131
+ sa as thresholdForPart,
132
+ oa as thresholdFragmentsToThresholds,
133
+ Ua as thresholdToParameter,
134
+ ia as thresholdsToInput,
135
+ Ma as thresholdsToParameters,
136
+ ra as tryMkUnit,
137
+ na as updateThreshold,
138
+ p as useAllPartParameters,
139
+ b as useGraphqlClient,
140
+ c as useJointsForLimbIds,
141
+ A as useJointsForSensorLocations,
142
+ T as useLimbsForSensorLocations,
143
+ u as usePartOptionsForJoints,
144
+ P as usePartOptionsForLimbs,
145
+ S as usePartOptionsForSensorLocations,
144
146
  h as useUiLabelContext
145
147
  };
@@ -1,3 +1,4 @@
1
+ export * from './use-all-part-parameters';
1
2
  export * from './use-graphql-client';
2
3
  export * from './use-joints-for-limb-ids';
3
4
  export * from './use-joints-for-sensor-locations';
@@ -0,0 +1,8 @@
1
+ export declare const useAllPartParameters: () => {
2
+ sensorOnly: boolean;
3
+ id: import('../types').AnalysisPartId;
4
+ min: number;
5
+ max: number;
6
+ plane: import('../types').AnglePlane;
7
+ oldId?: string | undefined;
8
+ }[];
@@ -1,6 +1,6 @@
1
1
  import { AngleDataSource, AnglePlane, HumanBodyJointId, HumanBodyLimbId, IAvailableJoint, IAvailableHumanLimb as IAvailableLimb, IHumanBody } from '../types/human';
2
2
  import { HumanPart, XYZ } from '../types/human-part';
3
- import { Parameter } from '../../generated/graphql';
3
+ import { Parameter, SensorLocation } from '../../generated/graphql';
4
4
  export declare const limbNames: Record<HumanBodyLimbId, string>;
5
5
  export declare const jointNames: Record<HumanBodyJointId, string>;
6
6
  export declare const jointsUsedByLimbs: Record<HumanBodyLimbId, HumanBodyJointId[]>;
@@ -67,3 +67,4 @@ export declare const getParameterDirectionNames: (parameter: Pick<Parameter, "pa
67
67
  readonly negative: string | null;
68
68
  };
69
69
  export declare const getParameterAngleDirectionName: (value: number, parameter: Pick<Parameter, "partKind" | "partId" | "partDimension">, abbreviate?: boolean) => string | null;
70
+ export declare const getSuggestedSensorLocations: (jointOrSegmentIds: (HumanBodyJointId | HumanBodyLimbId)[]) => SensorLocation[];
@@ -7,4 +7,6 @@ export type PartParameter = {
7
7
  min: number;
8
8
  max: number;
9
9
  kind: ThresholdKind;
10
+ sensorOnly?: boolean;
11
+ oldId?: string;
10
12
  };