@adminide-stack/yantra-mobile 12.0.136 → 12.0.137-alpha.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.
- package/lib/features/apps/AppsCatalog.js +3 -3
- package/lib/features/apps/AppsCatalog.js.map +1 -1
- package/lib/features/apps/appLabelText.js +9 -0
- package/lib/features/apps/appLabelText.js.map +1 -0
- package/lib/features/devices/readings.js.map +1 -1
- package/lib/features/devices/session.js +2 -22
- package/lib/features/devices/session.js.map +1 -1
- package/lib/features/dictate/DictateExperience.js +48 -25
- package/lib/features/dictate/DictateExperience.js.map +1 -1
- package/lib/features/dictate/backgroundRecording.js +15 -0
- package/lib/features/dictate/backgroundRecording.js.map +1 -0
- package/lib/features/dictate/components/DictationList.js.map +1 -1
- package/lib/features/dictate/components/NoteView.js +3 -1
- package/lib/features/dictate/components/NoteView.js.map +1 -1
- package/lib/features/dictate/components/RecordPanel.js +33 -4
- package/lib/features/dictate/components/RecordPanel.js.map +1 -1
- package/lib/features/dictate/dictateClient.js +7 -2
- package/lib/features/dictate/dictateClient.js.map +1 -1
- package/lib/features/dictate/dictationStore.js.map +1 -1
- package/lib/features/dictate/useDictationRecorder.js +48 -14
- package/lib/features/dictate/useDictationRecorder.js.map +1 -1
- package/lib/screens/Devices/index.js +3 -205
- package/lib/screens/Devices/index.js.map +1 -1
- package/lib/screens/DictateNative/index.js.map +1 -1
- package/package.json +4 -4
- package/lib/features/devices/bodyComposition.js +0 -116
- package/lib/features/devices/bodyComposition.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import React__default,{useState,useMemo,useCallback,useEffect,useRef}from'react';import {BackHandler,StyleSheet,View,Pressable,ActivityIndicator,ScrollView,Linking,Alert,Animated,Easing,Platform}from'react-native';import {Ionicons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {mobileColors,mobileTokens}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {deviceKind,DEVICE_KINDS}from'../../features/devices/catalog.js';import {useDevices,useDeviceSession,platformWriter,deviceStore}from'../../features/devices/devices.js';import {describeReading}from'../../features/devices/readings.js';import {
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import React__default,{useState,useMemo,useCallback,useEffect,useRef}from'react';import {BackHandler,StyleSheet,View,Pressable,ActivityIndicator,ScrollView,Linking,Alert,Animated,Easing,Platform}from'react-native';import {Ionicons}from'@expo/vector-icons';import {Text}from'@admin-layout/gluestack-ui-mobile';import {useNavigation,useRoute,CommonActions}from'@react-navigation/native';import {useSafeAreaInsets,SafeAreaView}from'react-native-safe-area-context';import {mobileColors,mobileTokens}from'../../theme/mobileTokens.js';import {useAppTheme}from'../../theme/AppThemeProvider.js';import {deviceKind,DEVICE_KINDS}from'../../features/devices/catalog.js';import {useDevices,useDeviceSession,platformWriter,deviceStore}from'../../features/devices/devices.js';import {describeReading}from'../../features/devices/readings.js';import {useHealthSync}from'../../features/health/healthSync.js';var __defProp = Object.defineProperty;
|
|
2
2
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
3
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
4
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -305,53 +305,6 @@ const styles = StyleSheet.create({
|
|
|
305
305
|
fontSize: 14,
|
|
306
306
|
marginTop: 2
|
|
307
307
|
},
|
|
308
|
-
measureBox: {
|
|
309
|
-
alignItems: "center",
|
|
310
|
-
paddingVertical: 24,
|
|
311
|
-
gap: 6
|
|
312
|
-
},
|
|
313
|
-
measureRing: {
|
|
314
|
-
position: "absolute",
|
|
315
|
-
top: 24,
|
|
316
|
-
width: 176,
|
|
317
|
-
height: 176,
|
|
318
|
-
borderRadius: 88,
|
|
319
|
-
borderWidth: 2
|
|
320
|
-
},
|
|
321
|
-
measureCore: {
|
|
322
|
-
width: 176,
|
|
323
|
-
height: 176,
|
|
324
|
-
borderRadius: 88,
|
|
325
|
-
alignItems: "center",
|
|
326
|
-
justifyContent: "center",
|
|
327
|
-
marginBottom: 12
|
|
328
|
-
},
|
|
329
|
-
measureWeight: {
|
|
330
|
-
fontSize: 44,
|
|
331
|
-
fontWeight: "700"
|
|
332
|
-
},
|
|
333
|
-
measureUnit: {
|
|
334
|
-
fontSize: 18,
|
|
335
|
-
fontWeight: "600"
|
|
336
|
-
},
|
|
337
|
-
compositionGrid: {
|
|
338
|
-
flexDirection: "row",
|
|
339
|
-
flexWrap: "wrap",
|
|
340
|
-
marginTop: 10,
|
|
341
|
-
rowGap: 10
|
|
342
|
-
},
|
|
343
|
-
compositionItem: {
|
|
344
|
-
width: "33.33%",
|
|
345
|
-
paddingRight: 8
|
|
346
|
-
},
|
|
347
|
-
compositionLabel: {
|
|
348
|
-
fontSize: 12
|
|
349
|
-
},
|
|
350
|
-
compositionValue: {
|
|
351
|
-
fontSize: 15,
|
|
352
|
-
fontWeight: "600",
|
|
353
|
-
marginTop: 1
|
|
354
|
-
},
|
|
355
308
|
savedLine: {
|
|
356
309
|
flexDirection: "row",
|
|
357
310
|
alignItems: "center",
|
|
@@ -614,15 +567,7 @@ function ReadingsCard({
|
|
|
614
567
|
}], children: whenLabel(r.at, now) }),
|
|
615
568
|
r.kind === "blood-pressure" && ((_a = r.problems) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(Text, { style: [styles.readingNote, {
|
|
616
569
|
color: colors.warningText
|
|
617
|
-
}], children: r.problems.join(" ") }) : null
|
|
618
|
-
r.kind === "body" && r.composition ? /* @__PURE__ */ jsx(View, { style: styles.compositionGrid, children: compositionRows(r.composition, units).map((m) => /* @__PURE__ */ jsxs(View, { style: styles.compositionItem, children: [
|
|
619
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.compositionLabel, {
|
|
620
|
-
color: colors.textMuted
|
|
621
|
-
}], children: m.label }),
|
|
622
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.compositionValue, {
|
|
623
|
-
color: colors.text
|
|
624
|
-
}], children: m.value })
|
|
625
|
-
] }, m.label)) }) : null
|
|
570
|
+
}], children: r.problems.join(" ") }) : null
|
|
626
571
|
] })
|
|
627
572
|
] }, r.id);
|
|
628
573
|
}) })
|
|
@@ -827,151 +772,10 @@ function PickKind({
|
|
|
827
772
|
] }, k.id)) })
|
|
828
773
|
] });
|
|
829
774
|
}
|
|
830
|
-
function formatWeight(kg, units) {
|
|
831
|
-
if (kg === void 0) return "--";
|
|
832
|
-
const v = units === "imperial" ? kg / 0.45359237 : kg;
|
|
833
|
-
return (Math.round(v * 10) / 10).toFixed(1);
|
|
834
|
-
}
|
|
835
|
-
function ScaleMeasuring({
|
|
836
|
-
colors,
|
|
837
|
-
live,
|
|
838
|
-
units
|
|
839
|
-
}) {
|
|
840
|
-
const pulse = useRef(new Animated.Value(0)).current;
|
|
841
|
-
useEffect(() => {
|
|
842
|
-
const loop = Animated.loop(Animated.timing(pulse, {
|
|
843
|
-
toValue: 1,
|
|
844
|
-
duration: 1400,
|
|
845
|
-
easing: Easing.out(Easing.ease),
|
|
846
|
-
useNativeDriver: true
|
|
847
|
-
}));
|
|
848
|
-
loop.start();
|
|
849
|
-
return () => loop.stop();
|
|
850
|
-
}, [pulse]);
|
|
851
|
-
const ringScale = pulse.interpolate({
|
|
852
|
-
inputRange: [0, 1],
|
|
853
|
-
outputRange: [0.9, 1.5]
|
|
854
|
-
});
|
|
855
|
-
const ringOpacity = pulse.interpolate({
|
|
856
|
-
inputRange: [0, 1],
|
|
857
|
-
outputRange: [0.5, 0]
|
|
858
|
-
});
|
|
859
|
-
const unitLabel = units === "imperial" ? "lb" : "kg";
|
|
860
|
-
return /* @__PURE__ */ jsxs(View, { style: styles.measureBox, children: [
|
|
861
|
-
/* @__PURE__ */ jsx(Animated.View, { style: [styles.measureRing, {
|
|
862
|
-
borderColor: colors.primary,
|
|
863
|
-
opacity: ringOpacity,
|
|
864
|
-
transform: [{
|
|
865
|
-
scale: ringScale
|
|
866
|
-
}]
|
|
867
|
-
}], accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" }),
|
|
868
|
-
/* @__PURE__ */ jsx(View, { style: [styles.measureCore, {
|
|
869
|
-
backgroundColor: colors.primarySoft
|
|
870
|
-
}], children: /* @__PURE__ */ jsxs(Text, { style: [styles.measureWeight, {
|
|
871
|
-
color: colors.text
|
|
872
|
-
}], accessibilityLabel: `${formatWeight(live.weightKg, units)} ${unitLabel}`, children: [
|
|
873
|
-
formatWeight(live.weightKg, units),
|
|
874
|
-
/* @__PURE__ */ jsxs(Text, { style: [styles.measureUnit, {
|
|
875
|
-
color: colors.textMuted
|
|
876
|
-
}], children: [
|
|
877
|
-
" ",
|
|
878
|
-
unitLabel
|
|
879
|
-
] })
|
|
880
|
-
] }) }),
|
|
881
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.statusTitle, {
|
|
882
|
-
color: colors.text
|
|
883
|
-
}], children: "Measuring" }),
|
|
884
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.statusBody, {
|
|
885
|
-
color: colors.textMuted
|
|
886
|
-
}], children: "Stand still, barefoot, until it settles." })
|
|
887
|
-
] });
|
|
888
|
-
}
|
|
889
|
-
function BrandLive({
|
|
890
|
-
kind,
|
|
891
|
-
colors,
|
|
892
|
-
live,
|
|
893
|
-
units
|
|
894
|
-
}) {
|
|
895
|
-
var _a, _b, _c;
|
|
896
|
-
const items = [];
|
|
897
|
-
const round1 = (n) => Math.round(n * 10) / 10;
|
|
898
|
-
if (kind === "kitchen-scale") items.push({
|
|
899
|
-
label: "Weight",
|
|
900
|
-
value: `${Math.round((_a = live.grams) != null ? _a : 0)} g`
|
|
901
|
-
});
|
|
902
|
-
if (kind === "tape") {
|
|
903
|
-
const cm = (_b = live.lengthCm) != null ? _b : 0;
|
|
904
|
-
items.push({
|
|
905
|
-
label: live.bodyPart ? live.bodyPart.replace(/_/g, " ") : "Length",
|
|
906
|
-
value: units === "imperial" ? `${round1(cm / 2.54)} in` : `${round1(cm)} cm`
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
if (kind === "jump-rope") {
|
|
910
|
-
items.push({
|
|
911
|
-
label: "Jumps",
|
|
912
|
-
value: String((_c = live.jumps) != null ? _c : 0)
|
|
913
|
-
});
|
|
914
|
-
if (live.elapsedS !== void 0) items.push({
|
|
915
|
-
label: "Time",
|
|
916
|
-
value: clockOf(live.elapsedS)
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
if (kind === "treadmill") {
|
|
920
|
-
if (live.speedKmh !== void 0) items.push({
|
|
921
|
-
label: "Speed",
|
|
922
|
-
value: `${round1(live.speedKmh)} km/h`
|
|
923
|
-
});
|
|
924
|
-
if (live.distanceM !== void 0) items.push({
|
|
925
|
-
label: "Distance",
|
|
926
|
-
value: `${round1(live.distanceM / 1e3)} km`
|
|
927
|
-
});
|
|
928
|
-
if (live.kcal !== void 0) items.push({
|
|
929
|
-
label: "Calories",
|
|
930
|
-
value: `${Math.round(live.kcal)} kcal`
|
|
931
|
-
});
|
|
932
|
-
if (live.elapsedS !== void 0) items.push({
|
|
933
|
-
label: "Time",
|
|
934
|
-
value: clockOf(live.elapsedS)
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
if (kind === "ring") {
|
|
938
|
-
if (live.bpm !== void 0) items.push({
|
|
939
|
-
label: "Heart rate",
|
|
940
|
-
value: `${live.bpm} bpm`
|
|
941
|
-
});
|
|
942
|
-
if (live.spo2 !== void 0) items.push({
|
|
943
|
-
label: "Blood oxygen",
|
|
944
|
-
value: `${live.spo2}%`
|
|
945
|
-
});
|
|
946
|
-
if (live.skinTempC !== void 0) items.push({
|
|
947
|
-
label: "Skin temp",
|
|
948
|
-
value: `${round1(live.skinTempC)} \xB0C`
|
|
949
|
-
});
|
|
950
|
-
if (live.steps !== void 0) items.push({
|
|
951
|
-
label: "Steps",
|
|
952
|
-
value: String(live.steps)
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
if (live.battery !== void 0) items.push({
|
|
956
|
-
label: "Battery",
|
|
957
|
-
value: `${live.battery}%`
|
|
958
|
-
});
|
|
959
|
-
return /* @__PURE__ */ jsx(View, { style: [styles.card, styles.livePanel, {
|
|
960
|
-
backgroundColor: colors.surface
|
|
961
|
-
}], children: /* @__PURE__ */ jsx(View, { style: styles.compositionGrid, children: items.map((m) => /* @__PURE__ */ jsxs(View, { style: styles.compositionItem, children: [
|
|
962
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.compositionLabel, {
|
|
963
|
-
color: colors.textMuted
|
|
964
|
-
}], children: m.label }),
|
|
965
|
-
/* @__PURE__ */ jsx(Text, { style: [styles.compositionValue, {
|
|
966
|
-
color: colors.text
|
|
967
|
-
}], children: m.value })
|
|
968
|
-
] }, m.label)) }) });
|
|
969
|
-
}
|
|
970
775
|
function LivePanel({
|
|
971
776
|
kind,
|
|
972
777
|
colors,
|
|
973
778
|
live,
|
|
974
|
-
units,
|
|
975
779
|
recording,
|
|
976
780
|
connected,
|
|
977
781
|
onStart,
|
|
@@ -980,12 +784,6 @@ function LivePanel({
|
|
|
980
784
|
}) {
|
|
981
785
|
var _a, _b, _c, _d, _e;
|
|
982
786
|
const [type, setType] = useState("run");
|
|
983
|
-
if (kind === "scale") {
|
|
984
|
-
return /* @__PURE__ */ jsx(ScaleMeasuring, { colors, live, units });
|
|
985
|
-
}
|
|
986
|
-
if (kind === "kitchen-scale" || kind === "tape" || kind === "jump-rope" || kind === "treadmill" || kind === "ring") {
|
|
987
|
-
return /* @__PURE__ */ jsx(BrandLive, { kind, colors, live, units });
|
|
988
|
-
}
|
|
989
787
|
const [, tick] = useState(0);
|
|
990
788
|
useEffect(() => {
|
|
991
789
|
if (!recording) return void 0;
|
|
@@ -1145,7 +943,7 @@ function Measure({
|
|
|
1145
943
|
"."
|
|
1146
944
|
] })
|
|
1147
945
|
] }) : null,
|
|
1148
|
-
(state.step === "connected" || state.step === "ended") && live ? /* @__PURE__ */ jsx(LivePanel, { kind, colors, live,
|
|
946
|
+
(state.step === "connected" || state.step === "ended") && live ? /* @__PURE__ */ jsx(LivePanel, { kind, colors, live, recording, connected: state.step === "connected", onStart: (type) => session == null ? void 0 : session.startRecording(type), onStop: () => {
|
|
1149
947
|
void (session == null ? void 0 : session.stopRecording());
|
|
1150
948
|
}, onSave: () => {
|
|
1151
949
|
void (session == null ? void 0 : session.saveLive());
|