react-native-mytatva-rn-sdk 1.2.30 → 1.2.32
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/android/src/main/java/com/mytatvarnsdk/CgmTrackyLibModule.kt +765 -639
- package/android/src/main/res/drawable/transparent_drawable.xml +6 -0
- package/android/src/main/res/layout/activity_help.xml +181 -181
- package/android/src/main/res/values/styles.xml +5 -5
- package/lib/commonjs/CGMConnect.js +13 -3
- package/lib/commonjs/CGMConnect.js.map +1 -1
- package/lib/commonjs/index.js +8 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/CGMConnect.js +12 -3
- package/lib/module/CGMConnect.js.map +1 -1
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/CGMConnect.d.ts +3 -2
- package/package.json +1 -1
- package/src/CGMConnect.ts +13 -3
- package/src/index.js +5 -3
|
@@ -1,188 +1,188 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
android:layout_width="match_parent"
|
|
6
|
-
android:layout_height="match_parent"
|
|
7
|
-
android:background="@android:color/white">
|
|
8
|
-
|
|
9
|
-
<androidx.appcompat.widget.AppCompatImageView
|
|
10
|
-
android:id="@+id/ivBack"
|
|
11
|
-
android:layout_width="wrap_content"
|
|
12
|
-
android:layout_height="wrap_content"
|
|
13
|
-
android:layout_margin="10dp"
|
|
14
|
-
android:rotation="180"
|
|
15
|
-
android:tint="#344054"
|
|
16
|
-
app:layout_constraintStart_toStartOf="parent"
|
|
17
|
-
app:layout_constraintTop_toTopOf="parent"
|
|
18
|
-
app:srcCompat="@drawable/ic_right_arrow" />
|
|
19
|
-
|
|
20
|
-
<TextView
|
|
21
|
-
android:id="@+id/tvBack"
|
|
22
|
-
android:layout_width="0dp"
|
|
23
|
-
android:layout_height="wrap_content"
|
|
24
|
-
android:layout_marginStart="10dp"
|
|
25
|
-
android:fontFamily="@font/roboto_regular"
|
|
26
|
-
android:gravity="center"
|
|
27
|
-
android:text="Back"
|
|
28
|
-
android:textColor="#344054"
|
|
29
|
-
android:textSize="15sp"
|
|
30
|
-
app:layout_constraintBottom_toBottomOf="@+id/ivBack"
|
|
31
|
-
app:layout_constraintStart_toEndOf="@+id/ivBack"
|
|
32
|
-
app:layout_constraintTop_toTopOf="@+id/ivBack" />
|
|
33
|
-
|
|
34
|
-
<View
|
|
35
|
-
android:id="@+id/divider"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
android:id="@+id/main"
|
|
36
5
|
android:layout_width="match_parent"
|
|
37
|
-
android:layout_height="
|
|
38
|
-
android:
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
android:background="@android:color/white">
|
|
8
|
+
|
|
9
|
+
<androidx.appcompat.widget.AppCompatImageView
|
|
10
|
+
android:id="@+id/ivBack"
|
|
11
|
+
android:layout_width="wrap_content"
|
|
12
|
+
android:layout_height="wrap_content"
|
|
13
|
+
android:layout_margin="10dp"
|
|
14
|
+
android:rotation="180"
|
|
15
|
+
android:tint="#344054"
|
|
16
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
17
|
+
app:layout_constraintTop_toTopOf="parent"
|
|
18
|
+
app:srcCompat="@drawable/ic_right_arrow" />
|
|
19
|
+
|
|
20
|
+
<TextView
|
|
21
|
+
android:id="@+id/tvBack"
|
|
22
|
+
android:layout_width="0dp"
|
|
23
|
+
android:layout_height="wrap_content"
|
|
24
|
+
android:layout_marginStart="10dp"
|
|
25
|
+
android:fontFamily="@font/roboto_regular"
|
|
26
|
+
android:gravity="center"
|
|
27
|
+
android:text="Back"
|
|
28
|
+
android:textColor="#344054"
|
|
29
|
+
android:textSize="15sp"
|
|
30
|
+
app:layout_constraintBottom_toBottomOf="@+id/ivBack"
|
|
31
|
+
app:layout_constraintStart_toEndOf="@+id/ivBack"
|
|
32
|
+
app:layout_constraintTop_toTopOf="@+id/ivBack" />
|
|
33
|
+
|
|
34
|
+
<View
|
|
35
|
+
android:id="@+id/divider"
|
|
36
|
+
android:layout_width="match_parent"
|
|
37
|
+
android:layout_height="2dp"
|
|
38
|
+
android:layout_marginTop="10dp"
|
|
39
|
+
android:background="#F2F4F7"
|
|
40
|
+
app:layout_constraintTop_toBottomOf="@+id/ivBack" />
|
|
41
|
+
|
|
42
|
+
<!-- Title -->
|
|
43
|
+
<TextView
|
|
44
|
+
android:id="@+id/tvTitle"
|
|
45
|
+
android:layout_width="wrap_content"
|
|
46
|
+
android:layout_height="wrap_content"
|
|
47
|
+
android:layout_marginStart="20dp"
|
|
48
|
+
android:layout_marginTop="16dp"
|
|
49
|
+
android:fontFamily="@font/playfairdisplay_bold"
|
|
50
|
+
android:text="Chat with our experts"
|
|
51
|
+
android:textColor="#101828"
|
|
52
|
+
android:textSize="28sp"
|
|
53
|
+
android:textStyle="bold"
|
|
54
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
55
|
+
app:layout_constraintTop_toBottomOf="@id/divider" />
|
|
56
|
+
|
|
57
|
+
<!-- Instructions Text -->
|
|
58
|
+
<TextView
|
|
59
|
+
android:id="@+id/tvInstructions"
|
|
60
|
+
android:layout_width="0dp"
|
|
61
|
+
android:layout_height="wrap_content"
|
|
62
|
+
android:layout_marginStart="24dp"
|
|
63
|
+
android:layout_marginTop="10dp"
|
|
64
|
+
android:layout_marginEnd="20dp"
|
|
65
|
+
android:fontFamily="@font/roboto_regular"
|
|
66
|
+
android:text="We are here to help. Let us know where you are facing any difficulty and chat with our expert team who will guide you in this journey"
|
|
67
|
+
android:textColor="#667085"
|
|
68
|
+
android:textSize="14sp"
|
|
69
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
70
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
71
|
+
app:layout_constraintTop_toBottomOf="@id/tvTitle" />
|
|
72
|
+
|
|
73
|
+
<TextView
|
|
74
|
+
android:id="@+id/tvQuestion"
|
|
75
|
+
android:layout_width="0dp"
|
|
76
|
+
android:layout_height="wrap_content"
|
|
77
|
+
android:layout_marginStart="24dp"
|
|
78
|
+
android:layout_marginTop="25dp"
|
|
79
|
+
android:layout_marginEnd="20dp"
|
|
80
|
+
android:fontFamily="@font/roboto_medium"
|
|
81
|
+
android:text="What do you want help with?"
|
|
82
|
+
android:textColor="#101828"
|
|
83
|
+
android:textSize="16sp"
|
|
84
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
85
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
86
|
+
app:layout_constraintTop_toBottomOf="@id/tvInstructions" />
|
|
87
|
+
|
|
88
|
+
<RadioGroup
|
|
89
|
+
android:id="@+id/helpOptionsGroup"
|
|
90
|
+
android:layout_width="match_parent"
|
|
91
|
+
android:layout_height="wrap_content"
|
|
92
|
+
android:layout_marginHorizontal="20dp"
|
|
93
|
+
android:layout_marginTop="10dp"
|
|
94
|
+
android:orientation="vertical"
|
|
95
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
96
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
97
|
+
app:layout_constraintTop_toBottomOf="@+id/tvQuestion">
|
|
98
|
+
|
|
99
|
+
<androidx.appcompat.widget.AppCompatRadioButton
|
|
100
|
+
android:id="@+id/radio_purchase"
|
|
101
|
+
style="@style/CustomRadioButton"
|
|
102
|
+
android:layout_width="wrap_content"
|
|
103
|
+
android:layout_height="wrap_content"
|
|
104
|
+
android:layout_marginBottom="12dp"
|
|
105
|
+
android:drawableStart="@drawable/custom_radio_icon_selector"
|
|
106
|
+
android:drawablePadding="10dp"
|
|
107
|
+
android:text="Purchasing New CGM" />
|
|
108
|
+
|
|
109
|
+
<androidx.appcompat.widget.AppCompatRadioButton
|
|
110
|
+
android:id="@+id/radio_connect"
|
|
111
|
+
style="@style/CustomRadioButton"
|
|
112
|
+
android:layout_width="wrap_content"
|
|
113
|
+
android:layout_height="wrap_content"
|
|
114
|
+
android:layout_marginBottom="12dp"
|
|
115
|
+
android:drawableStart="@drawable/custom_radio_icon_selector"
|
|
116
|
+
android:drawablePadding="10dp"
|
|
117
|
+
android:text="Connecting My CGM" />
|
|
118
|
+
|
|
119
|
+
<androidx.appcompat.widget.AppCompatRadioButton
|
|
120
|
+
android:id="@+id/radio_troubles"
|
|
121
|
+
style="@style/CustomRadioButton"
|
|
122
|
+
android:layout_width="wrap_content"
|
|
123
|
+
android:layout_height="wrap_content"
|
|
124
|
+
android:drawableStart="@drawable/custom_radio_icon_selector"
|
|
125
|
+
android:drawablePadding="10dp"
|
|
126
|
+
android:text="Having troubles after connection" />
|
|
127
|
+
</RadioGroup>
|
|
128
|
+
|
|
129
|
+
<androidx.constraintlayout.widget.ConstraintLayout
|
|
153
130
|
android:layout_width="match_parent"
|
|
154
|
-
android:layout_height="
|
|
155
|
-
android:background="@
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
131
|
+
android:layout_height="wrap_content"
|
|
132
|
+
android:background="@color/white"
|
|
133
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
134
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
135
|
+
app:layout_constraintStart_toStartOf="parent">
|
|
136
|
+
|
|
137
|
+
<androidx.cardview.widget.CardView
|
|
138
|
+
android:id="@+id/btnProceed"
|
|
139
|
+
android:layout_width="0dp"
|
|
140
|
+
android:layout_height="60dp"
|
|
141
|
+
android:layout_marginTop="10dp"
|
|
142
|
+
android:layout_marginBottom="10dp"
|
|
143
|
+
app:cardBackgroundColor="#2A805A"
|
|
144
|
+
app:cardCornerRadius="12dp"
|
|
145
|
+
app:cardElevation="0dp"
|
|
146
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
147
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
148
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
149
|
+
app:layout_constraintTop_toTopOf="parent"
|
|
150
|
+
app:layout_constraintWidth_percent="0.9">
|
|
151
|
+
|
|
152
|
+
<androidx.constraintlayout.widget.ConstraintLayout
|
|
153
|
+
android:layout_width="match_parent"
|
|
154
|
+
android:layout_height="50dp"
|
|
155
|
+
android:background="@drawable/bg_green_border_20">
|
|
156
|
+
|
|
157
|
+
<TextView
|
|
158
|
+
android:id="@+id/tvProceed"
|
|
159
|
+
android:layout_width="wrap_content"
|
|
160
|
+
android:layout_height="wrap_content"
|
|
161
|
+
android:layout_marginStart="8dp"
|
|
162
|
+
android:fontFamily="@font/roboto_semibold"
|
|
163
|
+
android:text="Proceed"
|
|
164
|
+
android:textColor="#ffffff"
|
|
165
|
+
android:textSize="16sp"
|
|
166
|
+
app:layout_constraintBottom_toBottomOf="@+id/ivProceedArrow"
|
|
167
|
+
app:layout_constraintEnd_toEndOf="parent"
|
|
168
|
+
app:layout_constraintStart_toEndOf="@+id/ivProceedArrow"
|
|
169
|
+
app:layout_constraintTop_toTopOf="@+id/ivProceedArrow" />
|
|
170
|
+
|
|
171
|
+
<ImageView
|
|
172
|
+
android:id="@+id/ivProceedArrow"
|
|
173
|
+
android:layout_width="20dp"
|
|
174
|
+
android:layout_height="20dp"
|
|
175
|
+
android:src="@drawable/ic_whatsapp_green"
|
|
176
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
177
|
+
app:layout_constraintEnd_toStartOf="@+id/tvProceed"
|
|
178
|
+
app:layout_constraintHorizontal_chainStyle="packed"
|
|
179
|
+
app:layout_constraintStart_toStartOf="parent"
|
|
180
|
+
app:layout_constraintTop_toTopOf="parent" />
|
|
181
|
+
|
|
182
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
183
|
+
</androidx.cardview.widget.CardView>
|
|
184
|
+
|
|
185
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
</style>
|
|
101
101
|
|
|
102
102
|
<style name="CustomRadioButton" parent="Widget.AppCompat.CompoundButton.RadioButton">
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
<item name="android:button">@drawable/transparent_drawable</item>
|
|
104
|
+
<item name="android:background">@drawable/radio_button_background</item>
|
|
105
|
+
<item name="android:padding">10dp</item>
|
|
106
|
+
<item name="android:fontFamily">@font/roboto_regular</item>
|
|
107
|
+
<item name="android:textColor">@color/radio_text_selector</item>
|
|
108
108
|
</style>
|
|
109
109
|
|
|
110
110
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.helpCGM = void 0;
|
|
7
7
|
exports.initializeCGMEventListener = initializeCGMEventListener;
|
|
8
|
-
exports.reconnectCGM = exports.observeTransmitterUnbindStatusHandler = exports.observeAllGlucoseDataHandler = void 0;
|
|
8
|
+
exports.reconnectCGM = exports.observeTransmitterUnbindStatusHandler = exports.observeResetLogoutHandler = exports.observeAllGlucoseDataHandler = void 0;
|
|
9
9
|
exports.removeCGMEventListener = removeCGMEventListener;
|
|
10
10
|
exports.stopCGM = exports.startCGM = void 0;
|
|
11
11
|
var _reactNative = require("react-native");
|
|
@@ -102,16 +102,26 @@ const helpCGM = async token => {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
exports.helpCGM = helpCGM;
|
|
105
|
-
const observeTransmitterUnbindStatusHandler = async token => {
|
|
105
|
+
const observeTransmitterUnbindStatusHandler = async (token, apiResponse) => {
|
|
106
106
|
console.log('observeTransmitterUnbindStatusHandler====');
|
|
107
107
|
try {
|
|
108
|
-
const result = await cgmLib.observeTransmitterUnbindStatus(token);
|
|
108
|
+
const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);
|
|
109
109
|
console.log(result);
|
|
110
110
|
} catch (error) {
|
|
111
111
|
console.error(error);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
exports.observeTransmitterUnbindStatusHandler = observeTransmitterUnbindStatusHandler;
|
|
115
|
+
const observeResetLogoutHandler = async () => {
|
|
116
|
+
console.log('observeResetLogoutHandler====');
|
|
117
|
+
try {
|
|
118
|
+
const result = await cgmLib.resetCgmState();
|
|
119
|
+
console.log(result);
|
|
120
|
+
} catch (error) {
|
|
121
|
+
console.error(error);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
exports.observeResetLogoutHandler = observeResetLogoutHandler;
|
|
115
125
|
const stopCGM = async () => {
|
|
116
126
|
// Implementation
|
|
117
127
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","eventSubscription","LINKING_ERROR","Platform","select","ios","default","cgmLib","NativeModules","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","NativeEventEmitter","remove","OS","DeviceEventEmitter","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","exports","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","observeTransmitterUnbindStatus","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler };"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GACtFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,MAAM,GAAGC,0BAAa,CAACC,YAAY,GACrCD,0BAAa,CAACC,YAAY,GAC1B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACV,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAIL,SAASW,0BAA0BA,CACjCC,QAAkC,EAClC;EACA,MAAMC,eAAe,GAAG,IAAIC,+BAAkB,CAACT,MAAM,CAAC;EACtD,IAAIN,iBAAiB,EAAE;IACrBA,iBAAiB,CAACgB,MAAM,CAAC,CAAC;EAC5B;EAEA,IAAId,qBAAQ,CAACe,EA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cb,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAACC,OAAA,CAAAO,OAAA,GAAAA,OAAA;AAEF,MAAME,qCAAqC,GAAG,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","eventSubscription","LINKING_ERROR","Platform","select","ios","default","cgmLib","NativeModules","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","NativeEventEmitter","remove","OS","DeviceEventEmitter","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","exports","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","apiResponse","observeTransmitterUnbindStatus","observeResetLogoutHandler","resetCgmState","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string, apiResponse: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeResetLogoutHandler = async () => {\n console.log('observeResetLogoutHandler====');\n try {\n const result = await cgmLib.resetCgmState();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GACtFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,MAAM,GAAGC,0BAAa,CAACC,YAAY,GACrCD,0BAAa,CAACC,YAAY,GAC1B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACV,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAIL,SAASW,0BAA0BA,CACjCC,QAAkC,EAClC;EACA,MAAMC,eAAe,GAAG,IAAIC,+BAAkB,CAACT,MAAM,CAAC;EACtD,IAAIN,iBAAiB,EAAE;IACrBA,iBAAiB,CAACgB,MAAM,CAAC,CAAC;EAC5B;EAEA,IAAId,qBAAQ,CAACe,EAAE,KAAK,SAAS,EAAE;IAC7BjB,iBAAiB,GAAGkB,+BAAkB,CAACC,WAAW,CAChD,gBAAgB,EACfC,SAAc,IAAK;MAClB,MAAM;QAAEC;MAAO,CAAC,GAAGD,SAAS;MAC5B,IAAIC,MAAM,KAAK,qBAAqB,EAAE;QACpCR,QAAQ,CAACO,SAAS,CAAC;MACrB,CAAC,MAAM;QACLP,QAAQ,CAACO,SAAS,CAAC;MACrB;IACF,CACF,CAAC;EACH,CAAC,MACI,IAAIlB,qBAAQ,CAACe,EAAE,KAAK,KAAK,IAAIH,eAAe,EAAE;IACjDd,iBAAiB,GAAGc,eAAe,CAACK,WAAW,CAC7C,gBAAgB,EACfC,SAAc,IAAK;MAClB,MA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,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAACC,OAAA,CAAAS,qCAAA,GAAAA,qCAAA;AAEF,MAAMG,yBAAyB,GAAG,MAAAA,CAAA,KAAY;EAC5CjB,OAAO,CAACC,GAAG,CAAC,+BAA+B,CAAC;EAC5C,IAAI;IACF,MAAMC,MAAM,GAAG,MAAMrB,MAAM,CAACqC,aAAa,CAAC,CAAC;IAC3ClB,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAACC,OAAA,CAAAY,yBAAA,GAAAA,yBAAA;AAIF,MAAME,OAAO,GAAG,MAAAA,CAAA,KAAY;EAC1B;AAAA,CACD;AAACd,OAAA,CAAAc,OAAA,GAAAA,OAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -22,6 +22,12 @@ Object.defineProperty(exports, "observeAllGlucoseDataHandler", {
|
|
|
22
22
|
return _CGMConnect.observeAllGlucoseDataHandler;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
+
Object.defineProperty(exports, "observeResetLogoutHandler", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _CGMConnect.observeResetLogoutHandler;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
25
31
|
Object.defineProperty(exports, "observeTransmitterUnbindStatusHandler", {
|
|
26
32
|
enumerable: true,
|
|
27
33
|
get: function () {
|
|
@@ -69,6 +75,7 @@ var _default = exports.default = {
|
|
|
69
75
|
observeAllGlucoseDataHandler: _CGMConnect.observeAllGlucoseDataHandler,
|
|
70
76
|
reconnectCGM: _CGMConnect.reconnectCGM,
|
|
71
77
|
helpCGM: _CGMConnect.helpCGM,
|
|
72
|
-
observeTransmitterUnbindStatusHandler: _CGMConnect.observeTransmitterUnbindStatusHandler
|
|
78
|
+
observeTransmitterUnbindStatusHandler: _CGMConnect.observeTransmitterUnbindStatusHandler,
|
|
79
|
+
observeResetLogoutHandler: _CGMConnect.observeResetLogoutHandler
|
|
73
80
|
};
|
|
74
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_MyTatvaRnSdkView","_interopRequireDefault","require","_MyTatvaRnSdkView2","_reactNative","_CGMConnect","e","__esModule","default","MyTatvaRnSdkView","exports","Platform","select","ios","MyTatvaRnSdkViewIOS","android","MyTatvaRnSdkViewAndroid","_default","startCGM","initializeCGMEventListener","removeCGMEventListener","observeAllGlucoseDataHandler","reconnectCGM","helpCGM","observeTransmitterUnbindStatusHandler"],"sources":["index.js"],"sourcesContent":["import MyTatvaRnSdkViewAndroid from './MyTatvaRnSdkView.android';\nimport MyTatvaRnSdkViewIOS from './MyTatvaRnSdkView.ios';\nimport { Platform } from 'react-native';\nimport { startCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler,
|
|
1
|
+
{"version":3,"names":["_MyTatvaRnSdkView","_interopRequireDefault","require","_MyTatvaRnSdkView2","_reactNative","_CGMConnect","e","__esModule","default","MyTatvaRnSdkView","exports","Platform","select","ios","MyTatvaRnSdkViewIOS","android","MyTatvaRnSdkViewAndroid","_default","startCGM","initializeCGMEventListener","removeCGMEventListener","observeAllGlucoseDataHandler","reconnectCGM","helpCGM","observeTransmitterUnbindStatusHandler","observeResetLogoutHandler"],"sources":["index.js"],"sourcesContent":["import MyTatvaRnSdkViewAndroid from './MyTatvaRnSdkView.android';\nimport MyTatvaRnSdkViewIOS from './MyTatvaRnSdkView.ios';\nimport { Platform } from 'react-native';\nimport { startCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler } from './CGMConnect';\n// ... other imports\n\n// Export the platform-specific component\nexport const MyTatvaRnSdkView = Platform.select({\n ios: MyTatvaRnSdkViewIOS,\n android: MyTatvaRnSdkViewAndroid,\n});\n\n// Export individual functions\nexport {\n startCGM,\n initializeCGMEventListener,\n removeCGMEventListener,\n observeAllGlucoseDataHandler,\n reconnectCGM,\n helpCGM,\n observeTransmitterUnbindStatusHandler,\n observeResetLogoutHandler\n // ... other functions\n};\n\n// Export a default object with everything\nexport default {\n MyTatvaRnSdkView,\n startCGM,\n initializeCGMEventListener,\n removeCGMEventListener,\n observeAllGlucoseDataHandler,\n reconnectCGM,\n helpCGM,\n observeTransmitterUnbindStatusHandler,\n observeResetLogoutHandler\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAmN,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AACnN;;AAEA;AACO,MAAMG,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,qBAAQ,CAACC,MAAM,CAAC;EAC9CC,GAAG,EAAEC,0BAAmB;EACxBC,OAAO,EAAEC;AACX,CAAC,CAAC;;AAEF;AAaA;AAAA,IAAAC,QAAA,GAAAP,OAAA,CAAAF,OAAA,GACe;EACbC,gBAAgB;EAChBS,QAAQ,EAARA,oBAAQ;EACRC,0BAA0B,EAA1BA,sCAA0B;EAC1BC,sBAAsB,EAAtBA,kCAAsB;EACtBC,4BAA4B,EAA5BA,wCAA4B;EAC5BC,YAAY,EAAZA,wBAAY;EACZC,OAAO,EAAPA,mBAAO;EACPC,qCAAqC,EAArCA,iDAAqC;EACrCC,yBAAyB,EAAzBA;AACF,CAAC","ignoreList":[]}
|
package/lib/module/CGMConnect.js
CHANGED
|
@@ -88,10 +88,19 @@ const helpCGM = async token => {
|
|
|
88
88
|
console.error(error);
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
const observeTransmitterUnbindStatusHandler = async token => {
|
|
91
|
+
const observeTransmitterUnbindStatusHandler = async (token, apiResponse) => {
|
|
92
92
|
console.log('observeTransmitterUnbindStatusHandler====');
|
|
93
93
|
try {
|
|
94
|
-
const result = await cgmLib.observeTransmitterUnbindStatus(token);
|
|
94
|
+
const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);
|
|
95
|
+
console.log(result);
|
|
96
|
+
} catch (error) {
|
|
97
|
+
console.error(error);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const observeResetLogoutHandler = async () => {
|
|
101
|
+
console.log('observeResetLogoutHandler====');
|
|
102
|
+
try {
|
|
103
|
+
const result = await cgmLib.resetCgmState();
|
|
95
104
|
console.log(result);
|
|
96
105
|
} catch (error) {
|
|
97
106
|
console.error(error);
|
|
@@ -100,5 +109,5 @@ const observeTransmitterUnbindStatusHandler = async token => {
|
|
|
100
109
|
const stopCGM = async () => {
|
|
101
110
|
// Implementation
|
|
102
111
|
};
|
|
103
|
-
export { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler };
|
|
112
|
+
export { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };
|
|
104
113
|
//# sourceMappingURL=CGMConnect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","eventSubscription","LINKING_ERROR","select","ios","default","cgmLib","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","remove","OS","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","observeTransmitterUnbindStatus","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler };"],"mappings":"AAAA,SAASA,kBAAkB,EAAuBC,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAKnH,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GACtFF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,MAAM,GAAGP,aAAa,CAACQ,YAAY,GACrCR,aAAa,CAACQ,YAAY,GAC1B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,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KAAa,IAAK;EACvCC,OAAO,CAACC,GAAG,CAAC,aAAa,CAAC;EAC1B,IAAI;IACF,MAAMC,MAAM,GAAG,MAAMlB,MAAM,CAAC4B,eAAe,CAAC,CAAC;IAC7CZ,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAED,MAAMS,qCAAqC,GAAG,
|
|
1
|
+
{"version":3,"names":["DeviceEventEmitter","NativeEventEmitter","NativeModules","Platform","eventSubscription","LINKING_ERROR","select","ios","default","cgmLib","CgmTrackyLib","Proxy","get","Error","initializeCGMEventListener","callback","iosEventEmitter","remove","OS","addListener","eventData","status","removeCGMEventListener","startCGM","token","console","log","result","startCgmTracky","error","reconnectCGM","reconnectCgmTracky","observeAllGlucoseDataHandler","observeAllGlucoseData","deviceStatus","observeDeviceStatus","helpCGM","openHelpSupport","observeTransmitterUnbindStatusHandler","apiResponse","observeTransmitterUnbindStatus","observeResetLogoutHandler","resetCgmState","stopCGM"],"sources":["CGMConnect.ts"],"sourcesContent":["import { DeviceEventEmitter, EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from \"react-native\";\n\n\n\n\nlet eventSubscription: EmitterSubscription | null = null;\n\nconst LINKING_ERROR =\n `The package 'react-native-mytatva-rn-sdk' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo Go\\n';\n\nconst cgmLib = NativeModules.CgmTrackyLib\n ? NativeModules.CgmTrackyLib\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\n\n\nfunction initializeCGMEventListener(\n callback: (eventData: any) => void\n) {\n const iosEventEmitter = new NativeEventEmitter(cgmLib);\n if (eventSubscription) {\n eventSubscription.remove();\n }\n\n if (Platform.OS === 'android') {\n eventSubscription = DeviceEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n } \n else if (Platform.OS === 'ios' && iosEventEmitter) {\n eventSubscription = iosEventEmitter.addListener(\n 'cgmDeviceEvent',\n (eventData: any) => {\n const { status } = eventData;\n if (status === 'WARM_PERIOD_STARTED') {\n callback(eventData);\n } else {\n callback(eventData);\n }\n }\n );\n }\n}\n\nfunction removeCGMEventListener() {\n if (eventSubscription) {\n eventSubscription.remove();\n eventSubscription = null;\n }\n}\n\n\n\nconst startCGM = async (token: string) => {\n console.log('token====startCGM', token);\n try {\n const result = await cgmLib.startCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n const reconnectCGM = async (token: string) => {\n console.log('reconnectCGM====');\n try {\n const result = await cgmLib.reconnectCgmTracky(token);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n };\n\n\n const observeAllGlucoseDataHandler = async (token: string) => {\n console.log('observeAllGlucoseDataHandler====');\n try {\n if(Platform.OS === 'android') { \n const result = await cgmLib.observeAllGlucoseData(token);\n const deviceStatus = await cgmLib.observeDeviceStatus(token);\n console.log(result);\n console.log(deviceStatus);\n }\n else if(Platform.OS === 'ios') {\n const result = await cgmLib.observeAllGlucoseData(token);\n console.log(result);\n }\n } catch (error) {\n console.log('error====', error);\n console.error(error);\n }\n };\n\n\nconst helpCGM = async (token: string) => {\n console.log('helpCGM====');\n try {\n const result = await cgmLib.openHelpSupport();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeTransmitterUnbindStatusHandler = async (token: string, apiResponse: string) => {\n console.log('observeTransmitterUnbindStatusHandler====');\n try {\n const result = await cgmLib.observeTransmitterUnbindStatus(token, apiResponse);\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\nconst observeResetLogoutHandler = async () => {\n console.log('observeResetLogoutHandler====');\n try {\n const result = await cgmLib.resetCgmState();\n console.log(result);\n } catch (error) {\n console.error(error);\n }\n};\n\n\n\nconst stopCGM = async () => {\n // Implementation\n};\n\nexport { startCGM, stopCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler };"],"mappings":"AAAA,SAASA,kBAAkB,EAAuBC,kBAAkB,EAAEC,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAKnH,IAAIC,iBAA6C,GAAG,IAAI;AAExD,MAAMC,aAAa,GACjB,sFAAsF,GACtFF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,MAAM,GAAGP,aAAa,CAACQ,YAAY,GACrCR,aAAa,CAACQ,YAAY,GAC1B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAIL,SAASS,0BAA0BA,CACjCC,QAAkC,EAClC;EACA,MAAMC,eAAe,GAAG,IAAIf,kBAAkB,CAACQ,MAAM,CAAC;EACtD,IAAIL,iBAAiB,EAAE;IACrBA,iBAAiB,CAACa,MAAM,CAAC,CAAC;EAC5B;EAEA,IAAId,QAAQ,CAACe,EAAE,KAAK,SAAS,EAAE;IAC7Bd,iBAAiB,GAAGJ,kBAAkB,CAACmB,WAAW,CAChD,gBAAgB,EACfC,SAAc,IAAK;MAClB,MAAM;QAAEC;MAAO,CAAC,GAAGD,SAAS;MAC5B,IAAIC,MAAM,KAAK,qBAAqB,EAAE;QACpCN,QAAQ,CAACK,SAAS,CAAC;MACrB,CAAC,MAAM;QACLL,QAAQ,CAACK,SAAS,CAAC;MACrB;IACF,CACF,CAAC;EACH,CAAC,MACI,IAAIjB,QAAQ,CAACe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AACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAED,MAAMY,yBAAyB,GAAG,MAAAA,CAAA,KAAY;EAC5ChB,OAAO,CAACC,GAAG,CAAC,+BAA+B,CAAC;EAC5C,IAAI;IACF,MAAMC,MAAM,GAAG,MAAMlB,MAAM,CAACiC,aAAa,CAAC,CAAC;IAC3CjB,OAAO,CAACC,GAAG,CAACC,MAAM,CAAC;EACrB,CAAC,CAAC,OAAOE,KAAK,EAAE;IACdJ,OAAO,CAACI,KAAK,CAACA,KAAK,CAAC;EACtB;AACF,CAAC;AAID,MAAMc,OAAO,GAAG,MAAAA,CAAA,KAAY;EAC1B;AAAA,CACD;AAED,SAASpB,QAAQ,EAAEoB,OAAO,EAAE7B,0BAA0B,EAAEQ,sBAAsB,EAAEU,4BAA4B,EAAEF,YAAY,EAAEM,OAAO,EAAEE,qCAAqC,EAAEG,yBAAyB","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import MyTatvaRnSdkViewAndroid from './MyTatvaRnSdkView.android';
|
|
2
2
|
import MyTatvaRnSdkViewIOS from './MyTatvaRnSdkView.ios';
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
|
-
import { startCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler,
|
|
4
|
+
import { startCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler } from './CGMConnect';
|
|
5
5
|
// ... other imports
|
|
6
6
|
|
|
7
7
|
// Export the platform-specific component
|
|
@@ -11,7 +11,7 @@ export const MyTatvaRnSdkView = Platform.select({
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
// Export individual functions
|
|
14
|
-
export { startCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler
|
|
14
|
+
export { startCGM, initializeCGMEventListener, removeCGMEventListener, observeAllGlucoseDataHandler, reconnectCGM, helpCGM, observeTransmitterUnbindStatusHandler, observeResetLogoutHandler
|
|
15
15
|
// ... other functions
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -24,6 +24,7 @@ export default {
|
|
|
24
24
|
observeAllGlucoseDataHandler,
|
|
25
25
|
reconnectCGM,
|
|
26
26
|
helpCGM,
|
|
27
|
-
observeTransmitterUnbindStatusHandler
|
|
27
|
+
observeTransmitterUnbindStatusHandler,
|
|
28
|
+
observeResetLogoutHandler
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=index.js.map
|