@digia-engage/core 2.2.0 → 2.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/DigiaEngageReactNative.podspec +1 -1
- package/android/build.gradle +1 -1
- package/lib/commonjs/DigiaAnchorView.js +42 -25
- package/lib/commonjs/DigiaAnchorView.js.map +1 -1
- package/lib/commonjs/DigiaProvider.js +38 -6
- package/lib/commonjs/DigiaProvider.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/DigiaAnchorView.js +42 -25
- package/lib/module/DigiaAnchorView.js.map +1 -1
- package/lib/module/DigiaProvider.js +38 -6
- package/lib/module/DigiaProvider.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/DigiaAnchorView.d.ts +17 -1
- package/lib/typescript/DigiaAnchorView.d.ts.map +1 -1
- package/lib/typescript/DigiaProvider.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/templateTypes.d.ts +2 -0
- package/lib/typescript/templateTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/DigiaAnchorView.tsx +74 -41
- package/src/DigiaProvider.tsx +36 -6
- package/src/index.ts +1 -0
- package/src/templateTypes.ts +2 -0
- package/android/.project +0 -28
- package/android/bin/.gradle/8.13/fileHashes/fileHashes.lock +0 -0
- package/android/bin/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/bin/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/bin/.project +0 -34
- package/android/bin/build/generated/source/buildConfig/debug/com/digia/engage/rn/BuildConfig.class +0 -0
- package/android/bin/build/generated/source/codegen/java/com/digia/engage/rn/NativeDigiaEngageSpec.class +0 -0
- package/android/bin/build.gradle +0 -97
- package/android/bin/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/bin/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/bin/gradle.properties +0 -2
- package/android/bin/gradlew +0 -185
- package/android/bin/gradlew.bat +0 -89
- package/android/bin/local.properties +0 -1
- package/android/bin/settings.gradle +0 -25
- package/android/bin/src/main/AndroidManifest.xml +0 -2
- package/android/bin/src/main/java/com/digia/engage/rn/DigiaAnchorViewManager.kt +0 -90
- package/android/bin/src/main/java/com/digia/engage/rn/DigiaModule.kt +0 -309
- package/android/bin/src/main/java/com/digia/engage/rn/DigiaPackage.kt +0 -70
- package/android/bin/src/main/java/com/digia/engage/rn/DigiaSlotViewManager.kt +0 -183
- package/android/bin/src/main/java/com/digia/engage/rn/DigiaViewManager.kt +0 -64
- package/android/local.properties +0 -1
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DigiaViewManager
|
|
3
|
-
*
|
|
4
|
-
* React Native ViewManager that exposes `DigiaHostView` (from the Digia Android SDK) as the native
|
|
5
|
-
* view behind the JS `<DigiaHostView>` component.
|
|
6
|
-
*
|
|
7
|
-
* The view hosts the `DigiaHost` composable which manages dialog and bottom-sheet overlays driven
|
|
8
|
-
* by Digia CEP plugins.
|
|
9
|
-
*/
|
|
10
|
-
package com.digia.engage.rn
|
|
11
|
-
|
|
12
|
-
import android.content.Context
|
|
13
|
-
import android.widget.FrameLayout
|
|
14
|
-
import androidx.lifecycle.LifecycleOwner
|
|
15
|
-
import androidx.lifecycle.ViewModelStoreOwner
|
|
16
|
-
import androidx.lifecycle.setViewTreeLifecycleOwner
|
|
17
|
-
import androidx.lifecycle.setViewTreeViewModelStoreOwner
|
|
18
|
-
import androidx.savedstate.SavedStateRegistryOwner
|
|
19
|
-
import androidx.savedstate.setViewTreeSavedStateRegistryOwner
|
|
20
|
-
import com.digia.engage.DigiaHostView
|
|
21
|
-
import com.facebook.react.uimanager.SimpleViewManager
|
|
22
|
-
import com.facebook.react.uimanager.ThemedReactContext
|
|
23
|
-
|
|
24
|
-
internal class DigiaViewManager : SimpleViewManager<DigiaHostView>() {
|
|
25
|
-
|
|
26
|
-
override fun getName(): String = VIEW_NAME
|
|
27
|
-
|
|
28
|
-
override fun createViewInstance(context: ThemedReactContext): DigiaHostView {
|
|
29
|
-
// Prefer the current Activity as the context provider so that the Compose
|
|
30
|
-
// runtime can access a proper LifecycleOwner / ViewModelStoreOwner.
|
|
31
|
-
val activityContext: Context = context.currentActivity ?: context
|
|
32
|
-
|
|
33
|
-
val view = DigiaHostView(activityContext)
|
|
34
|
-
|
|
35
|
-
// Explicitly wire the Android Architecture Component owners so that the
|
|
36
|
-
// Compose runtime (which uses ViewTree* APIs) works correctly regardless
|
|
37
|
-
// of React Native's internal view hierarchy wiring.
|
|
38
|
-
val activity = context.currentActivity
|
|
39
|
-
if (activity is LifecycleOwner) {
|
|
40
|
-
view.setViewTreeLifecycleOwner(activity)
|
|
41
|
-
}
|
|
42
|
-
if (activity is ViewModelStoreOwner) {
|
|
43
|
-
view.setViewTreeViewModelStoreOwner(activity)
|
|
44
|
-
}
|
|
45
|
-
if (activity is SavedStateRegistryOwner) {
|
|
46
|
-
view.setViewTreeSavedStateRegistryOwner(activity)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// React Native controls sizing via its layout system; fill whatever space
|
|
50
|
-
// the JS stylesheet allocates (typically StyleSheet.absoluteFill).
|
|
51
|
-
view.layoutParams =
|
|
52
|
-
FrameLayout.LayoutParams(
|
|
53
|
-
FrameLayout.LayoutParams.MATCH_PARENT,
|
|
54
|
-
FrameLayout.LayoutParams.MATCH_PARENT,
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
android.util.Log.d("DigiaHost", "[DigiaViewManager] RN-side NativeDigiaHostView instance created (id=${view.id})")
|
|
58
|
-
return view
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
companion object {
|
|
62
|
-
const val VIEW_NAME = "DigiaHostView"
|
|
63
|
-
}
|
|
64
|
-
}
|
package/android/local.properties
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sdk.dir=/Users/ram/Library/Android/sdk
|