@sency/react-native-smkit-ui 0.2.9 → 0.3.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/android/build.gradle +1 -1
- package/android/src/main/java/com/smkituilibrary/SmkitUiLibraryModule.kt +4 -4
- package/android/src/main/java/com/smkituilibrary/mapper/SMMapper.kt +1 -5
- package/android/src/main/java/com/smkituilibrary/model/SMKitExercise.kt +1 -2
- package/package.json +1 -1
- package/react-native-smkit-ui.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -93,7 +93,7 @@ dependencies {
|
|
|
93
93
|
implementation "com.facebook.react:react-native:+"
|
|
94
94
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
95
95
|
|
|
96
|
-
implementation("com.sency.smkitui:smkitui:0.2.
|
|
96
|
+
implementation("com.sency.smkitui:smkitui:0.2.8") {
|
|
97
97
|
exclude group: 'com.facebook.fbjni', module: 'fbjni-java-only'
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -160,22 +160,22 @@ class SmkitUiLibraryModule(reactContext: ReactApplicationContext) :
|
|
|
160
160
|
|
|
161
161
|
@ReactMethod
|
|
162
162
|
fun setEndExercisePreferences(prefs: String, promise: Promise) {
|
|
163
|
-
val
|
|
163
|
+
val pr = when(prefs) {
|
|
164
164
|
"Default" -> EndExercisePreference.Default
|
|
165
165
|
else -> EndExercisePreference.TargetBased
|
|
166
166
|
}
|
|
167
|
-
smKitUI?.setEndExercisePreferences(
|
|
167
|
+
smKitUI?.setEndExercisePreferences(pr)
|
|
168
168
|
promise.resolve("")
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
@ReactMethod
|
|
173
173
|
fun setCounterPreferences(prefs: String, promise: Promise) {
|
|
174
|
-
val
|
|
174
|
+
val pr = when(prefs) {
|
|
175
175
|
"Default" -> CounterPreference.Default
|
|
176
176
|
else -> CounterPreference.PerfectOnly
|
|
177
177
|
}
|
|
178
|
-
smKitUI?.setCounterPreferences(
|
|
178
|
+
smKitUI?.setCounterPreferences(pr)
|
|
179
179
|
promise.resolve("")
|
|
180
180
|
}
|
|
181
181
|
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
package com.smkituilibrary.mapper
|
|
2
2
|
|
|
3
3
|
import com.sency.smkitui.data.entity.ScoringParams
|
|
4
|
-
import com.sency.smkitui.data.entity.UiElement
|
|
5
4
|
import com.sency.smkitui.model.ExerciseData
|
|
6
5
|
import com.sency.smkitui.model.SMExercise
|
|
7
6
|
import com.sency.smkitui.model.SMWorkout
|
|
8
|
-
import com.sency.smkitui.model.ScoringParamsData
|
|
9
|
-
import com.sency.smkitui.model.UserData
|
|
10
7
|
import com.sency.smkitui.model.WorkoutSummaryData
|
|
11
8
|
import com.sency.smkitui.model.workoutConfig.BodyZone
|
|
12
9
|
import com.sency.smkitui.model.workoutConfig.DifficultyLevel
|
|
13
10
|
import com.sency.smkitui.model.workoutConfig.SMLanguage
|
|
14
11
|
import com.sency.smkitui.model.workoutConfig.WorkoutConfig
|
|
15
|
-
import com.sency.smkitui.model.workoutConfig.WorkoutConfigModel
|
|
16
12
|
import com.sency.smkitui.model.workoutConfig.WorkoutDuration
|
|
17
13
|
import com.smkituilibrary.model.SMKitExercise
|
|
18
14
|
import com.smkituilibrary.model.SMKitScoringParams
|
|
@@ -52,7 +48,7 @@ private fun SMKitExercise.toSMExercise(): SMExercise = SMExercise(
|
|
|
52
48
|
uiElements = uiElements ?: emptySet(),
|
|
53
49
|
detector = detector ?: "",
|
|
54
50
|
exerciseClosure = exerciseClosure ?: "",
|
|
55
|
-
|
|
51
|
+
closureFailedSound = closureFailedSound ?: "",
|
|
56
52
|
scoringParams = scoringParams?.toParams(),
|
|
57
53
|
summaryTitle = summaryTitle ?: "",
|
|
58
54
|
summarySubTitle = summarySubTitle ?: "",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
package com.smkituilibrary.model
|
|
2
2
|
|
|
3
3
|
import androidx.annotation.Keep
|
|
4
|
-
import com.sency.smkitui.data.entity.ScoringParams
|
|
5
4
|
import com.sency.smkitui.data.entity.UiElement
|
|
6
5
|
|
|
7
6
|
@Keep
|
|
@@ -16,7 +15,7 @@ internal data class SMKitExercise(
|
|
|
16
15
|
val prettyName: String? = null,
|
|
17
16
|
val exerciseIntro: String? = null,
|
|
18
17
|
val exerciseClosure: String? = null,
|
|
19
|
-
val
|
|
18
|
+
val closureFailedSound: String? = null,
|
|
20
19
|
val summaryTitle: String? = null,
|
|
21
20
|
val summarySubTitle: String? = null,
|
|
22
21
|
val summaryTitleMainMetric: String? = null,
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.source = { :git => "https://github.com/sency-ai/smkit-ui-react-native-demo.git", :tag => "#{s.version}" }
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
-
s.dependency "SMKitUI" ,'0.3.
|
|
18
|
+
s.dependency "SMKitUI" ,'0.3.5'
|
|
19
19
|
|
|
20
20
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
21
21
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|