@sency/react-native-smkit-ui 0.1.2 → 0.1.3

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.
@@ -65,6 +65,7 @@ android {
65
65
  buildTypes {
66
66
  release {
67
67
  minifyEnabled false
68
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
68
69
  }
69
70
  }
70
71
 
@@ -92,7 +93,9 @@ dependencies {
92
93
  implementation "com.facebook.react:react-native:+"
93
94
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
94
95
 
95
- compileOnly("com.sency.smkitui:smkitui:${SMKitUI_Version}")
96
+ compileOnly("com.sency.smkitui:smkitui:0.1.2") {
97
+ exclude group: 'com.facebook.fbjni', module: 'fbjni-java-only'
98
+ }
96
99
 
97
100
  // Moshi JSON library
98
101
  def moshi = "1.15.0"
@@ -60,7 +60,7 @@ class SmkitUiLibraryModule(reactContext: ReactApplicationContext) :
60
60
  }
61
61
 
62
62
  @ReactMethod
63
- fun startAssessment(type: String, promise: Promise) {
63
+ fun startAssessment(type: String, showSummary: Boolean, promise: Promise) {
64
64
  this.resultPromise = promise
65
65
  try {
66
66
  smKitUI?.startAssessment(listener = this)
@@ -24,20 +24,26 @@ internal fun SMKitWorkoutConfig.toWorkoutConfig(): WorkoutConfig = WorkoutConfig
24
24
  internal fun SMKitWorkout.toSMWorkout(): SMWorkout = SMWorkout(
25
25
  id = id ?: "",
26
26
  name = name ?: "",
27
- workoutIntro = Uri.parse(workoutIntro) ?: Uri.EMPTY,
28
- soundtrack = Uri.parse(soundtrack) ?: Uri.EMPTY,
27
+ workoutIntro = workoutIntro ?: "",
28
+ soundtrack = soundtrack ?: "",
29
29
  exercises = exercises.map(SMKitExercise::toSMExercise),
30
- workoutClosure = Uri.parse(workoutClosure) ?: Uri.EMPTY,
30
+ workoutClosure = workoutClosure ?: "",
31
+ getInFrame = "",
32
+ bodycalFinished = ""
31
33
  )
32
34
 
33
35
  private fun SMKitExercise.toSMExercise(): SMExercise = SMExercise(
34
- name = name ?: "",
35
- exerciseIntro = Uri.parse(exerciseIntro) ?: Uri.EMPTY,
36
+ prettyName = name ?: "",
37
+ exerciseIntro = exerciseIntro ?: "",
36
38
  totalSeconds = totalSeconds ?: 0,
37
39
  introSeconds = introSeconds ?: 0,
38
- videoInstruction = Uri.parse(videoInstruction) ?: Uri.EMPTY,
40
+ videoInstruction = videoInstruction ?:"",
39
41
  uiElements = uiElements ?: emptySet(),
40
42
  detector = detector ?: "",
41
43
  repBased = repBased ?: false,
42
- exerciseClosure = Uri.parse(exerciseClosure) ?: Uri.EMPTY,
44
+ exerciseClosure = exerciseClosure ?: "",
45
+ targetReps = 0,
46
+ targetTime = 0,
47
+ scoreFactor = 0.0,
48
+ passCriteria = null
43
49
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sency/react-native-smkit-ui",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "react-native-smkit-ui",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",