@tyrads.com/tyrads-sdk 2.0.0-beta.1 → 2.0.0-beta.2
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
CHANGED
@@ -81,13 +81,13 @@ android {
|
|
81
81
|
targetCompatibility JavaVersion.VERSION_1_8
|
82
82
|
}
|
83
83
|
|
84
|
-
buildFeatures {
|
85
|
-
|
86
|
-
}
|
84
|
+
// buildFeatures {
|
85
|
+
// compose true
|
86
|
+
// }
|
87
87
|
|
88
|
-
composeOptions {
|
89
|
-
|
90
|
-
}
|
88
|
+
// composeOptions {
|
89
|
+
// kotlinCompilerExtensionVersion '1.5.10'
|
90
|
+
// }
|
91
91
|
}
|
92
92
|
|
93
93
|
repositories {
|
@@ -103,14 +103,14 @@ dependencies {
|
|
103
103
|
//noinspection GradleDynamicVersion
|
104
104
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
105
105
|
|
106
|
-
implementation "androidx.activity:activity-compose:1.7.0"
|
107
|
-
implementation "androidx.compose.ui:ui:1.5.0"
|
108
|
-
implementation "androidx.compose.material:material:1.5.10"
|
109
|
-
implementation "androidx.compose.ui:ui-tooling-preview:1.5.10"
|
110
|
-
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
|
106
|
+
// implementation "androidx.activity:activity-compose:1.7.0"
|
107
|
+
// implementation "androidx.compose.ui:ui:1.5.0"
|
108
|
+
// implementation "androidx.compose.material:material:1.5.10"
|
109
|
+
// implementation "androidx.compose.ui:ui-tooling-preview:1.5.10"
|
110
|
+
// implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
|
111
111
|
|
112
112
|
implementation "com.facebook.react:react-native:+"
|
113
|
-
implementation 'com.google.code.gson:gson
|
113
|
+
implementation 'com.google.code.gson:gson:+'
|
114
114
|
|
115
115
|
implementation 'com.github.tyrads-com:tyrads-sdk-android:fd619c7f0c'
|
116
116
|
}
|
@@ -1,112 +1,112 @@
|
|
1
|
-
package com.tyradssdk
|
1
|
+
// package com.tyradssdk
|
2
2
|
|
3
|
-
import android.content.Context
|
4
|
-
import androidx.compose.runtime.Composable
|
5
|
-
import androidx.compose.ui.platform.ComposeView
|
6
|
-
import com.facebook.react.bridge.ReactContext
|
7
|
-
import com.facebook.react.uimanager.SimpleViewManager
|
8
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
9
|
-
import com.facebook.react.uimanager.annotations.ReactProp
|
10
|
-
import com.tyrads.sdk.Tyrads
|
11
|
-
import android.util.Log
|
12
|
-
import androidx.compose.foundation.background
|
13
|
-
import androidx.compose.foundation.layout.Box
|
14
|
-
import androidx.compose.foundation.layout.fillMaxSize
|
15
|
-
import androidx.compose.material.Text
|
16
|
-
import androidx.compose.ui.Alignment
|
17
|
-
import androidx.compose.ui.Modifier
|
18
|
-
import androidx.compose.ui.graphics.Color
|
19
|
-
import androidx.compose.runtime.LaunchedEffect
|
20
|
-
import android.os.Handler
|
21
|
-
import android.os.Looper
|
3
|
+
// import android.content.Context
|
4
|
+
// import androidx.compose.runtime.Composable
|
5
|
+
// import androidx.compose.ui.platform.ComposeView
|
6
|
+
// import com.facebook.react.bridge.ReactContext
|
7
|
+
// import com.facebook.react.uimanager.SimpleViewManager
|
8
|
+
// import com.facebook.react.uimanager.ThemedReactContext
|
9
|
+
// import com.facebook.react.uimanager.annotations.ReactProp
|
10
|
+
// import com.tyrads.sdk.Tyrads
|
11
|
+
// import android.util.Log
|
12
|
+
// import androidx.compose.foundation.background
|
13
|
+
// import androidx.compose.foundation.layout.Box
|
14
|
+
// import androidx.compose.foundation.layout.fillMaxSize
|
15
|
+
// import androidx.compose.material.Text
|
16
|
+
// import androidx.compose.ui.Alignment
|
17
|
+
// import androidx.compose.ui.Modifier
|
18
|
+
// import androidx.compose.ui.graphics.Color
|
19
|
+
// import androidx.compose.runtime.LaunchedEffect
|
20
|
+
// import android.os.Handler
|
21
|
+
// import android.os.Looper
|
22
22
|
|
23
|
-
class ComposeViewManager : SimpleViewManager<ComposeView>() {
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
// class ComposeViewManager : SimpleViewManager<ComposeView>() {
|
24
|
+
// override fun getName(): String {
|
25
|
+
// return "TyradsSdkComposeView"
|
26
|
+
// }
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
// override fun createViewInstance(reactContext: ThemedReactContext): ComposeView {
|
29
|
+
// Log.d("bmd", "ComposeView created")
|
30
30
|
|
31
|
-
|
31
|
+
// val composeView = ComposeView(reactContext)
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
// Handler(Looper.getMainLooper()).post {
|
34
|
+
// Log.d("bmd", "Running setContent inside createViewInstance")
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
36
|
+
// composeView.setContent {
|
37
|
+
// Box(
|
38
|
+
// modifier = Modifier
|
39
|
+
// .fillMaxSize()
|
40
|
+
// .background(Color.Yellow),
|
41
|
+
// contentAlignment = Alignment.Center
|
42
|
+
// ) {
|
43
|
+
// Text("Test Compose", color = Color.Black)
|
44
|
+
// }
|
45
|
+
// }
|
46
|
+
// }
|
47
47
|
|
48
|
-
|
49
|
-
|
48
|
+
// return composeView
|
49
|
+
// }
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
51
|
+
// @ReactProp(name = "showMore")
|
52
|
+
// fun setShowMore(view: ComposeView, showMore: Boolean) {
|
53
|
+
// view.post {
|
54
|
+
// view.setContent {
|
55
|
+
// TopPremiumOffersComposable(showMore = showMore)
|
56
|
+
// }
|
57
|
+
// }
|
58
|
+
// }
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
60
|
+
// @ReactProp(name = "showMyOffers")
|
61
|
+
// fun setShowMyOffers(view: ComposeView, showMyOffers: Boolean) {
|
62
|
+
// view.post{
|
63
|
+
// view.setContent {
|
64
|
+
// TopPremiumOffersComposable(showMyOffers = showMyOffers)
|
65
|
+
// }
|
66
|
+
// }
|
67
|
+
// }
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
69
|
+
// @ReactProp(name = "showMyOffersEmptyView")
|
70
|
+
// fun setShowMyOffersEmptyView(view: ComposeView, showMyOffersEmptyView: Boolean) {
|
71
|
+
// view.post{
|
72
|
+
// view.setContent {
|
73
|
+
// TopPremiumOffersComposable(showMyOffersEmptyView = showMyOffersEmptyView)
|
74
|
+
// }
|
75
|
+
// }
|
76
|
+
// }
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
78
|
+
// @ReactProp(name = "viewStyle")
|
79
|
+
// fun setViewStyle(view: ComposeView, viewStyle: Int) {
|
80
|
+
// view.post{
|
81
|
+
// view.setContent {
|
82
|
+
// TopPremiumOffersComposable(style = viewStyle)
|
83
|
+
// }
|
84
|
+
// }
|
85
|
+
// }
|
86
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
|
-
}
|
87
|
+
// @Composable
|
88
|
+
// private fun TopPremiumOffersComposable(
|
89
|
+
// showMore: Boolean = true,
|
90
|
+
// showMyOffers: Boolean = true,
|
91
|
+
// showMyOffersEmptyView: Boolean = false,
|
92
|
+
// style: Int = 2
|
93
|
+
// ) {
|
94
|
+
// LaunchedEffect(Unit){
|
95
|
+
// Log.d("bmd", "TopPremiumOffersComposable called")
|
96
|
+
// }
|
97
|
+
// Box(
|
98
|
+
// modifier = Modifier
|
99
|
+
// .fillMaxSize()
|
100
|
+
// .background(Color.Yellow),
|
101
|
+
// contentAlignment = Alignment.Center
|
102
|
+
// ) {
|
103
|
+
// Text("Test Compose", color = Color.Black)
|
104
|
+
// }
|
105
|
+
// // Tyrads.getInstance().TopPremiumOffers(
|
106
|
+
// // showMore = showMore,
|
107
|
+
// // showMyOffers = showMyOffers,
|
108
|
+
// // showMyOffersEmptyView = showMyOffersEmptyView,
|
109
|
+
// // style = style
|
110
|
+
// // )
|
111
|
+
// }
|
112
|
+
// }
|
@@ -13,6 +13,9 @@ class TyradsSdkPackage : ReactPackage {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
16
|
-
return
|
16
|
+
return emptyList()
|
17
17
|
}
|
18
|
+
// override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
19
|
+
// return listOf(ComposeViewManager())
|
20
|
+
// }
|
18
21
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tyrads.com/tyrads-sdk",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.2",
|
4
4
|
"description": "Tyrads SDK for React Native ",
|
5
5
|
"source": "./src/index.tsx",
|
6
6
|
"main": "./lib/commonjs/index.js",
|
@@ -190,7 +190,6 @@
|
|
190
190
|
"@react-native-async-storage/async-storage": "^2.1.2",
|
191
191
|
"axios": "^1.8.1",
|
192
192
|
"i18next": "^24.2.2",
|
193
|
-
"i18next-http-backend": "^3.0.2",
|
194
193
|
"numeral": "^2.0.6",
|
195
194
|
"react-i18next": "^15.4.1",
|
196
195
|
"react-native-text-ticker": "^1.14.0"
|