quantum-component-library 1.4.67 → 1.4.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs +1 -1
- package/dist/components.js +656 -662
- package/dist/generated/gql.d.ts +2 -2
- package/dist/generated/graphql.d.ts +29 -0
- package/dist/generated-graphql.cjs +1 -1
- package/dist/generated-graphql.js +68 -66
- package/dist/generated.cjs +1 -1
- package/dist/generated.js +5 -5
- package/dist/{graphql-kPu5QxaL.cjs → graphql-BEhru2G1.cjs} +1 -0
- package/dist/{graphql-DAkuEEbq.js → graphql-DFQnN0la.js} +5 -4
- package/dist/hooks.cjs +8 -8
- package/dist/hooks.js +136 -118
- package/dist/index.cjs +1 -1
- package/dist/index.js +138 -137
- package/dist/lib/hooks/use-graphql-client.d.ts +20 -0
- package/dist/lib/hooks/use-graphql-client.test.d.ts +1 -0
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +1 -1
- package/package.json +6 -3
package/dist/index.js
CHANGED
|
@@ -1,149 +1,150 @@
|
|
|
1
1
|
import "./other-CPHWCRXi.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 {
|
|
4
|
-
import { QuantumLibraryProvider as
|
|
5
|
-
import { g as
|
|
6
|
-
import { n as
|
|
7
|
-
import { reportKindName as
|
|
8
|
-
import { AngleDataSource as
|
|
9
|
-
import { c as
|
|
10
|
-
import { d as
|
|
11
|
-
import { m as
|
|
12
|
-
import { p as
|
|
13
|
-
import { c as
|
|
3
|
+
import { refreshSession as p, useAllPartParameters as b, useGraphqlClient as c, useJointsForLimbIds as A, useJointsForSensorLocations as T, useLimbsForSensorLocations as u, usePartOptionsForJoints as P, usePartOptionsForLimbs as S, usePartOptionsForSensorLocations as h, useUiLabelContext as L } from "./hooks.js";
|
|
4
|
+
import { QuantumLibraryProvider as F, UiLabelContext as N, UiLabelProvider as J } from "./providers.js";
|
|
5
|
+
import { g as f, m as x, a as I } from "./services-action-CfZFwhy-.js";
|
|
6
|
+
import { n as k, j as E, m as U, u as M, t as C, U as O, s as R, w as j, v as H, J as W, O as z, i as B, l as K, h as q, k as V, Q as w, P as G, x as Q, b as X, a as Y, T as Z, R as _, d as $, W as ee, V as ae, e as te, L as se, K as oe, y as ie, c as re, g as ne, S as me, f as le, M as ge, N as de, D as pe, G as be, F as ce, E as Ae, q as Te, r as ue, p as Pe, o as Se, B as he, C as Le, H as ye, z as Fe, A as Ne, I as Je } from "./services-human-D5IllQkM.js";
|
|
7
|
+
import { reportKindName as fe } from "./services.js";
|
|
8
|
+
import { AngleDataSource as Ie, analysisStatBuilder as De, areThresholdsEmpty as ke, availablePlanes as Ee, axes as Ue, canBeVerticalForce as Me, dimensionName as Ce, dimensionToLegacy as Oe, getAnalysisName as Re, getAnalysisPartIdNoSide as je, getJointIdNoSide as He, getJointIdWithSide as We, getLimbIdNoSide as ze, getLimbIdWithSide as Be, getPointSide as Ke, isDeviceEqual as qe, isLimbTrackingFrame as Ve, isSyncError as we, jointAngle as Ge, jointOrLimbHasThreshold as Qe, jointOrLimbThresholdCount as Xe, limbAngle as Ye, mkUnit as Ze, partAndPlaneHasThreshold as _e, partIdName as $e, partIdToJointLimbId as ea, partIdToString as aa, partKinds as ta, planes as sa, sensorLocationName as oa, sensorLocationToLimbId as ia, thresholdForPart as ra, thresholdFragmentsToThresholds as na, thresholdsToInput as ma, tryMkUnit as la, updateThreshold as ga } from "./types.js";
|
|
9
|
+
import { c as pa } from "./utils-cn-CgdSr4hO.js";
|
|
10
|
+
import { d as ca, n as Aa, j as Ta, g as ua, h as Pa, i as Sa, k as ha, m as La, a as ya, e as Fa, c as Na, b as Ja, p as va, r as fa, s as xa, l as Ia, f as Da } from "./utils-conversion-BQfLNP0g.js";
|
|
11
|
+
import { m as Ea } from "./utils-memo-DtXdOqCT.js";
|
|
12
|
+
import { p as Ma, a as Ca, t as Oa, b as Ra } from "./utils-parameters-DkefNhWo.js";
|
|
13
|
+
import { c as Ha, p as Wa } from "./utils-text-CN3zLiZ7.js";
|
|
14
14
|
export {
|
|
15
15
|
s as ActivityList,
|
|
16
|
-
|
|
16
|
+
Ie as AngleDataSource,
|
|
17
17
|
o as CopyActivityForm,
|
|
18
18
|
i as CopyModuleForm,
|
|
19
19
|
r as ModuleForm,
|
|
20
20
|
n as ParameterEditList,
|
|
21
21
|
m as ParameterEditSelect,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
F as QuantumLibraryProvider,
|
|
23
|
+
N as UiLabelContext,
|
|
24
|
+
J as UiLabelProvider,
|
|
25
25
|
l as UpsertActivityForm,
|
|
26
26
|
g as UpsertModuleForm,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
xa as
|
|
130
|
-
Ia as
|
|
131
|
-
|
|
132
|
-
oa as
|
|
133
|
-
ia as
|
|
134
|
-
ra as
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
la as
|
|
140
|
-
|
|
141
|
-
b as
|
|
142
|
-
c as
|
|
143
|
-
A as
|
|
144
|
-
T as
|
|
145
|
-
u as
|
|
146
|
-
P as
|
|
147
|
-
S as
|
|
148
|
-
h as
|
|
27
|
+
De as analysisStatBuilder,
|
|
28
|
+
ke as areThresholdsEmpty,
|
|
29
|
+
Ee as availablePlanes,
|
|
30
|
+
Ue as axes,
|
|
31
|
+
Me as canBeVerticalForce,
|
|
32
|
+
Ha as capitalizeAll,
|
|
33
|
+
pa as cn,
|
|
34
|
+
ca as degToRad,
|
|
35
|
+
Ce as dimensionName,
|
|
36
|
+
Oe as dimensionToLegacy,
|
|
37
|
+
f as getActivityKindFromActivityType,
|
|
38
|
+
k as getAllAvailableJoints,
|
|
39
|
+
E as getAllAvailableLimbs,
|
|
40
|
+
U as getAllAvailablePoseJoints,
|
|
41
|
+
M as getAllAvailablePoseLimbs,
|
|
42
|
+
C as getAllAvailableSensorJoints,
|
|
43
|
+
Re as getAnalysisName,
|
|
44
|
+
je as getAnalysisPartIdNoSide,
|
|
45
|
+
O as getAngleDirectionNames,
|
|
46
|
+
R as getAvailableLimbsForLimbIds,
|
|
47
|
+
j as getAvailablePoseJointsForLimbIds,
|
|
48
|
+
H as getAvailableSensorJointsForLimbIds,
|
|
49
|
+
W as getAxis,
|
|
50
|
+
z as getDefaultAngleSource,
|
|
51
|
+
B as getDefaultJointRange,
|
|
52
|
+
K as getDefaultLimbRange,
|
|
53
|
+
q as getEnabledJointPlanes,
|
|
54
|
+
V as getEnabledSegmentPlanes,
|
|
55
|
+
Aa as getFormatterForParameter,
|
|
56
|
+
w as getHumanBodyAngle,
|
|
57
|
+
G as getIsDefaultAngleAllowed,
|
|
58
|
+
Q as getJointAngleDirectionAbbr,
|
|
59
|
+
X as getJointAngleDirectionName,
|
|
60
|
+
He as getJointIdNoSide,
|
|
61
|
+
We as getJointIdWithSide,
|
|
62
|
+
Y as getJointNameWithPlane,
|
|
63
|
+
Z as getJointOrSegmentNameWithPlane,
|
|
64
|
+
_ as getJointPlaneName,
|
|
65
|
+
ze as getLimbIdNoSide,
|
|
66
|
+
Be as getLimbIdWithSide,
|
|
67
|
+
$ as getNormativeJointRange,
|
|
68
|
+
ee as getParameterAngleDirectionName,
|
|
69
|
+
ae as getParameterDirectionNames,
|
|
70
|
+
te as getPartName,
|
|
71
|
+
se as getPartNameNoSide,
|
|
72
|
+
oe as getPlane,
|
|
73
|
+
Ke as getPointSide,
|
|
74
|
+
ie as getSegmentAngleDirectionAbbr,
|
|
75
|
+
re as getSegmentAngleDirectionName,
|
|
76
|
+
ne as getSegmentNameWithPlane,
|
|
77
|
+
me as getSegmentXyzName,
|
|
78
|
+
le as getSuggestedSensorLocations,
|
|
79
|
+
ge as getTypicalRom,
|
|
80
|
+
de as getTypicalRomSize,
|
|
81
|
+
Ta as getUnitFormatted,
|
|
82
|
+
ua as getUnitValueFormatted,
|
|
83
|
+
Pa as hourMinSecStrToMs,
|
|
84
|
+
Sa as inchesToMeters,
|
|
85
|
+
pe as isAxis,
|
|
86
|
+
qe as isDeviceEqual,
|
|
87
|
+
be as isJoint,
|
|
88
|
+
ce as isLimb,
|
|
89
|
+
Ve as isLimbTrackingFrame,
|
|
90
|
+
Ae as isPlane,
|
|
91
|
+
we as isSyncError,
|
|
92
|
+
Ge as jointAngle,
|
|
93
|
+
Te as jointNames,
|
|
94
|
+
Qe as jointOrLimbHasThreshold,
|
|
95
|
+
Xe as jointOrLimbThresholdCount,
|
|
96
|
+
ue as jointsUsedByLimbs,
|
|
97
|
+
ha as kgToPounds,
|
|
98
|
+
Ye as limbAngle,
|
|
99
|
+
Pe as limbNames,
|
|
100
|
+
Se as limbsRequiredForJoints,
|
|
101
|
+
x as mapActivityTypeEnumToLabel,
|
|
102
|
+
I as mapSessionTypeEnumToLabel,
|
|
103
|
+
Ea as memo,
|
|
104
|
+
La as metersToInches,
|
|
105
|
+
he as mkAccelerationPart,
|
|
106
|
+
Le as mkAngularVelocityPart,
|
|
107
|
+
ye as mkHumanPart,
|
|
108
|
+
Fe as mkJointPart,
|
|
109
|
+
Ne as mkLimbPart,
|
|
110
|
+
Ze as mkUnit,
|
|
111
|
+
ya as msToDurationStr,
|
|
112
|
+
Fa as msToHourMinSecStr,
|
|
113
|
+
Na as msToPrettyStr,
|
|
114
|
+
Ja as msToTimestampStr,
|
|
115
|
+
Ma as parameterToThreshold,
|
|
116
|
+
Ca as parametersToThresholds,
|
|
117
|
+
_e as partAndPlaneHasThreshold,
|
|
118
|
+
$e as partIdName,
|
|
119
|
+
ea as partIdToJointLimbId,
|
|
120
|
+
aa as partIdToString,
|
|
121
|
+
ta as partKinds,
|
|
122
|
+
Je as planeOrAxis,
|
|
123
|
+
sa as planes,
|
|
124
|
+
Wa as pluralize,
|
|
125
|
+
va as poundsToKg,
|
|
126
|
+
fa as radToDeg,
|
|
127
|
+
p as refreshSession,
|
|
128
|
+
fe as reportKindName,
|
|
129
|
+
xa as sToTimestampStr,
|
|
130
|
+
Ia as safelyConvertEnum,
|
|
131
|
+
Da as secondsToTimestampStr,
|
|
132
|
+
oa as sensorLocationName,
|
|
133
|
+
ia as sensorLocationToLimbId,
|
|
134
|
+
ra as thresholdForPart,
|
|
135
|
+
na as thresholdFragmentsToThresholds,
|
|
136
|
+
Oa as thresholdToParameter,
|
|
137
|
+
ma as thresholdsToInput,
|
|
138
|
+
Ra as thresholdsToParameters,
|
|
139
|
+
la as tryMkUnit,
|
|
140
|
+
ga as updateThreshold,
|
|
141
|
+
b as useAllPartParameters,
|
|
142
|
+
c as useGraphqlClient,
|
|
143
|
+
A as useJointsForLimbIds,
|
|
144
|
+
T as useJointsForSensorLocations,
|
|
145
|
+
u as useLimbsForSensorLocations,
|
|
146
|
+
P as usePartOptionsForJoints,
|
|
147
|
+
S as usePartOptionsForLimbs,
|
|
148
|
+
h as usePartOptionsForSensorLocations,
|
|
149
|
+
L as useUiLabelContext
|
|
149
150
|
};
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import { Client } from 'urql';
|
|
2
|
+
/**
|
|
3
|
+
* Exchanges the stored refresh token for a fresh pair.
|
|
4
|
+
*
|
|
5
|
+
* Two failures are deliberately treated differently. A rejection from the
|
|
6
|
+
* server means the session is gone and the user must sign in again. Anything
|
|
7
|
+
* else — a dropped connection, a thrown fetch — leaves the session alone: the
|
|
8
|
+
* token was never spent, and the API honours a retry of it for 60 seconds.
|
|
9
|
+
*
|
|
10
|
+
* The retry on rejection covers the two-tab case. Tabs share one session, so
|
|
11
|
+
* whichever tab refreshes first leaves the other holding a token the server has
|
|
12
|
+
* moved past; once the grace window closes, that tab's replay looks like theft
|
|
13
|
+
* and takes the session down for both. Re-reading storage before giving up lets
|
|
14
|
+
* the losing tab pick up the token the winner already stored.
|
|
15
|
+
*/
|
|
16
|
+
export declare const refreshSession: ({ mutate, getRefreshToken, onSessionRefreshed, onAuthError, }: {
|
|
17
|
+
mutate: (query: string, variables: object) => Promise<any>;
|
|
18
|
+
getRefreshToken: () => string | null;
|
|
19
|
+
onSessionRefreshed: (accessToken: string, refreshToken?: string) => void;
|
|
20
|
+
onAuthError: () => void;
|
|
21
|
+
}) => Promise<void>;
|
|
2
22
|
export declare const useGraphqlClient: ({ url, getAuthToken, getRefreshToken, onSessionRefreshed, onAuthError, }: {
|
|
3
23
|
url: string;
|
|
4
24
|
getAuthToken: () => string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/providers.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react-jsx-runtime-vendor-Dszzpdy0.cjs"),u=require("./graphql-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react-jsx-runtime-vendor-Dszzpdy0.cjs"),u=require("./graphql-BEhru2G1.cjs"),c=require("react"),x=require("urql"),v=require("@chakra-ui/react"),E=require("./hooks.cjs"),d=require("./generated.cjs"),b=c.createContext(void 0),g=({children:i})=>{const[{data:t,fetching:e}]=x.useQuery({query:u.GET_METADATA_BY_KEY,variables:{key:"ui_label"}}),r=c.useCallback(s=>{if(e)return"Loading...";const a=d.getFragmentData(u.METADATA_GROUP_FRAGMENT,t?.getMetadataByKey);return a?d.getFragmentData(u.METADATA_ITEM_FRAGMENT,a.data).find(m=>m.value===s)?.label??"":""},[t,e]),o=c.useMemo(()=>({getLabel:r,isLoading:e}),[r,e]);return n.jsxRuntimeExports.jsx(b.Provider,{value:o,children:i})},q=({children:i,url:t,getAuthToken:e,getRefreshToken:r,onSessionRefreshed:o,onAuthError:s,chakraProviderProps:a})=>{const l=E.useGraphqlClient({url:t,getAuthToken:e,getRefreshToken:r,onSessionRefreshed:o,onAuthError:s});return n.jsxRuntimeExports.jsx(x.Provider,{value:l,children:n.jsxRuntimeExports.jsx(v.ChakraProvider,{...a,children:n.jsxRuntimeExports.jsx(g,{children:i})})})};exports.QuantumLibraryProvider=q;exports.UiLabelContext=b;exports.UiLabelProvider=g;
|
package/dist/providers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as o } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
|
|
2
|
-
import { G as d, M as c, a as f } from "./graphql-
|
|
2
|
+
import { G as d, M as c, a as f } from "./graphql-DFQnN0la.js";
|
|
3
3
|
import { createContext as p, useCallback as A, useMemo as v } from "react";
|
|
4
4
|
import { useQuery as x, Provider as T } from "urql";
|
|
5
5
|
import { ChakraProvider as E } from "@chakra-ui/react";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quantum-component-library",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
"codegen:qa": "graphql-codegen --config codegen.qa.yml",
|
|
79
79
|
"codegen:prod": "graphql-codegen --config codegen.prod.yml",
|
|
80
80
|
"storybook": "storybook dev -p 6006",
|
|
81
|
-
"build-storybook": "storybook build"
|
|
81
|
+
"build-storybook": "storybook build",
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"test:watch": "vitest"
|
|
82
84
|
},
|
|
83
85
|
"dependencies": {
|
|
84
86
|
"@chakra-ui/react": "^2.10.9",
|
|
@@ -128,6 +130,7 @@
|
|
|
128
130
|
"typescript-eslint": "^8.39.1",
|
|
129
131
|
"vite": "^7.1.2",
|
|
130
132
|
"vite-plugin-dts": "^4.5.4",
|
|
131
|
-
"vite-plugin-graphql-codegen": "^3.6.3"
|
|
133
|
+
"vite-plugin-graphql-codegen": "^3.6.3",
|
|
134
|
+
"vitest": "^4.1.10"
|
|
132
135
|
}
|
|
133
136
|
}
|