@blueconic/blueconic-react-native 1.2.0 → 2.0.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/BlueConicReactNative.podspec +23 -23
- package/CHANGELOG.md +88 -75
- package/LICENSE +3 -3
- package/README.md +484 -511
- package/android/build.gradle +38 -41
- package/android/gradle/wrapper/gradle-wrapper.properties +6 -6
- package/android/gradlew +172 -172
- package/android/local.properties +8 -8
- package/android/src/main/AndroidManifest.xml +5 -5
- package/android/src/main/java/com/blueconic/blueconicreactnative/BlueConicClientModule.java +870 -857
- package/android/src/main/java/com/blueconic/blueconicreactnative/BlueConicClientModuleHelper.java +17 -17
- package/android/src/main/java/com/blueconic/blueconicreactnative/BlueConicClientPackage.java +29 -29
- package/android/src/main/java/com/blueconic/blueconicreactnative/BlueConicInteraction.java +68 -68
- package/index.js +6 -6
- package/ios/BlueConicClient-Bridging-Header.h +6 -6
- package/ios/BlueConicClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
- package/ios/BlueConicClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/ios/BlueConicClient.xcodeproj/xcuserdata/youri.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/BlueConicClientModule.m +74 -72
- package/ios/BlueConicClientModule.swift +516 -506
- package/ios/BlueConicInteraction.swift +63 -63
- package/package.json +18 -18
- package/android/.idea/gradle.xml +0 -17
- package/android/.idea/misc.xml +0 -9
- package/android/.idea/modules/android.iml +0 -18
- package/android/.idea/modules.xml +0 -8
- package/android/.idea/vcs.xml +0 -6
- package/android/.idea/workspace.xml +0 -57
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import Foundation
|
|
2
|
-
import BlueConicClient
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
The BlueConicInteraction class is a custom BlueConic plugin that receives parameters from the BlueConic backend
|
|
6
|
-
and passes these on to the (iOS) Native Module
|
|
7
|
-
*/
|
|
8
|
-
public class BlueConicInteraction: BlueConicPlugin {
|
|
9
|
-
private var client: BlueConicClient?
|
|
10
|
-
private var context: InteractionContext?
|
|
11
|
-
private var properties: Dictionary<String, Any>?
|
|
12
|
-
private var interactionId: String?
|
|
13
|
-
private var positionId: String?
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
Called by the BlueConic SDK for iOS when a dialogue of this type is configured to be present on the current
|
|
17
|
-
screen.
|
|
18
|
-
- parameter client: The BlueConicClient
|
|
19
|
-
- parameter context: The InteractionContext of the interaction plugin
|
|
20
|
-
*/
|
|
21
|
-
public required convenience init(client: BlueConicClient, context: InteractionContext) {
|
|
22
|
-
self.init()
|
|
23
|
-
self.client = client
|
|
24
|
-
self.context = context
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
Called when the plugin is registered and active on the server. It retreives the configured parameters
|
|
29
|
-
and sends these to the Native Module.
|
|
30
|
-
*/
|
|
31
|
-
public func onLoad() {
|
|
32
|
-
guard let context = context,
|
|
33
|
-
let interactionId = context.getInteractionId() else {
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
var properties = [String: Any]()
|
|
37
|
-
|
|
38
|
-
properties["id"] = interactionId
|
|
39
|
-
properties["name"] = context.getInteractionName() ?? ""
|
|
40
|
-
properties["type"] = context.getInteractionTypeId() ?? ""
|
|
41
|
-
properties["pluginType"] = context.getPluginType() ?? ""
|
|
42
|
-
properties["dialogueId"] = context.getDialogueId() ?? ""
|
|
43
|
-
properties["dialogueName"] = context.getDialogueName() ?? ""
|
|
44
|
-
properties["positionId"] = context.getPositionIdentifier() ?? ""
|
|
45
|
-
properties["positionName"] = context.getPositionName() ?? ""
|
|
46
|
-
properties["parameters"] = context.getParameters()
|
|
47
|
-
|
|
48
|
-
self.properties = properties
|
|
49
|
-
|
|
50
|
-
if (self.properties != nil) {
|
|
51
|
-
BlueConicClientModule.publishDialogueEvent(properties, eventName: "onBlueConicPluginLoad")
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
Called when the interaction should close.
|
|
57
|
-
*/
|
|
58
|
-
public func onDestroy() {
|
|
59
|
-
if let properties = self.properties {
|
|
60
|
-
BlueConicClientModule.publishDialogueEvent(properties, eventName: "onBlueConicPluginDestroyed")
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
1
|
+
import Foundation
|
|
2
|
+
import BlueConicClient
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
The BlueConicInteraction class is a custom BlueConic plugin that receives parameters from the BlueConic backend
|
|
6
|
+
and passes these on to the (iOS) Native Module
|
|
7
|
+
*/
|
|
8
|
+
public class BlueConicInteraction: BlueConicPlugin {
|
|
9
|
+
private var client: BlueConicClient?
|
|
10
|
+
private var context: InteractionContext?
|
|
11
|
+
private var properties: Dictionary<String, Any>?
|
|
12
|
+
private var interactionId: String?
|
|
13
|
+
private var positionId: String?
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
Called by the BlueConic SDK for iOS when a dialogue of this type is configured to be present on the current
|
|
17
|
+
screen.
|
|
18
|
+
- parameter client: The BlueConicClient
|
|
19
|
+
- parameter context: The InteractionContext of the interaction plugin
|
|
20
|
+
*/
|
|
21
|
+
public required convenience init(client: BlueConicClient, context: InteractionContext) {
|
|
22
|
+
self.init()
|
|
23
|
+
self.client = client
|
|
24
|
+
self.context = context
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
Called when the plugin is registered and active on the server. It retreives the configured parameters
|
|
29
|
+
and sends these to the Native Module.
|
|
30
|
+
*/
|
|
31
|
+
public func onLoad() {
|
|
32
|
+
guard let context = context,
|
|
33
|
+
let interactionId = context.getInteractionId() else {
|
|
34
|
+
return
|
|
35
|
+
}
|
|
36
|
+
var properties = [String: Any]()
|
|
37
|
+
|
|
38
|
+
properties["id"] = interactionId
|
|
39
|
+
properties["name"] = context.getInteractionName() ?? ""
|
|
40
|
+
properties["type"] = context.getInteractionTypeId() ?? ""
|
|
41
|
+
properties["pluginType"] = context.getPluginType() ?? ""
|
|
42
|
+
properties["dialogueId"] = context.getDialogueId() ?? ""
|
|
43
|
+
properties["dialogueName"] = context.getDialogueName() ?? ""
|
|
44
|
+
properties["positionId"] = context.getPositionIdentifier() ?? ""
|
|
45
|
+
properties["positionName"] = context.getPositionName() ?? ""
|
|
46
|
+
properties["parameters"] = context.getParameters()
|
|
47
|
+
|
|
48
|
+
self.properties = properties
|
|
49
|
+
|
|
50
|
+
if (self.properties != nil) {
|
|
51
|
+
BlueConicClientModule.publishDialogueEvent(properties, eventName: "onBlueConicPluginLoad")
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
Called when the interaction should close.
|
|
57
|
+
*/
|
|
58
|
+
public func onDestroy() {
|
|
59
|
+
if let properties = self.properties {
|
|
60
|
+
BlueConicClientModule.publishDialogueEvent(properties, eventName: "onBlueConicPluginDestroyed")
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@blueconic/blueconic-react-native",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The BlueConicClient Framework provides the basis for communication with BlueConic.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [
|
|
10
|
-
"react-native",
|
|
11
|
-
"BlueConic"
|
|
12
|
-
],
|
|
13
|
-
"author": "BlueConic (info@blueconic.com)",
|
|
14
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
15
|
-
"peerDependencies": {
|
|
16
|
-
"react-native": "
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@blueconic/blueconic-react-native",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "The BlueConicClient Framework provides the basis for communication with BlueConic.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"react-native",
|
|
11
|
+
"BlueConic"
|
|
12
|
+
],
|
|
13
|
+
"author": "BlueConic (info@blueconic.com)",
|
|
14
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"react-native": "<1.0.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/android/.idea/gradle.xml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
4
|
-
<component name="GradleSettings">
|
|
5
|
-
<option name="linkedExternalProjectsSettings">
|
|
6
|
-
<GradleProjectSettings>
|
|
7
|
-
<option name="testRunner" value="PLATFORM" />
|
|
8
|
-
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
|
9
|
-
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
10
|
-
<option name="gradleHome" value="/usr/local/Cellar/gradle/6.5/libexec" />
|
|
11
|
-
<option name="gradleJvm" value="1.8 (2)" />
|
|
12
|
-
<option name="resolveModulePerSourceSet" value="false" />
|
|
13
|
-
<option name="useQualifiedModuleNames" value="true" />
|
|
14
|
-
</GradleProjectSettings>
|
|
15
|
-
</option>
|
|
16
|
-
</component>
|
|
17
|
-
</project>
|
package/android/.idea/misc.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
|
4
|
-
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="ProjectType">
|
|
7
|
-
<option name="id" value="Android" />
|
|
8
|
-
</component>
|
|
9
|
-
</project>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module external.linked.project.id=":" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="FacetManager">
|
|
4
|
-
<facet type="android-gradle" name="Android-Gradle">
|
|
5
|
-
<configuration>
|
|
6
|
-
<option name="GRADLE_PROJECT_PATH" value=":" />
|
|
7
|
-
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" />
|
|
8
|
-
<option name="LAST_KNOWN_AGP_VERSION" />
|
|
9
|
-
</configuration>
|
|
10
|
-
</facet>
|
|
11
|
-
</component>
|
|
12
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
13
|
-
<exclude-output />
|
|
14
|
-
<content url="file://$MODULE_DIR$/../.." />
|
|
15
|
-
<orderEntry type="inheritedJdk" />
|
|
16
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
17
|
-
</component>
|
|
18
|
-
</module>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/modules/android.iml" filepath="$PROJECT_DIR$/.idea/modules/android.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/android/.idea/vcs.xml
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="AutoImportSettings">
|
|
4
|
-
<option name="autoReloadType" value="NONE" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="13f53ae3-ea42-40ea-bf8f-a788615d4a0c" name="Default Changelist" comment="">
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/../../../app/TestReactNativeApp/App.js" beforeDir="false" afterPath="$PROJECT_DIR$/../../../app/TestReactNativeApp/App.js" afterDir="false" />
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/../../../app/TestReactNativeApp/android/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/../../../app/TestReactNativeApp/android/app/build.gradle" afterDir="false" />
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/../../../app/TestReactNativeApp/android/app/libs/blueconic-lib-2.5.0.aar" beforeDir="false" />
|
|
11
|
-
<change beforePath="$PROJECT_DIR$/../../../app/TestReactNativeApp/android/app/src/debug/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../../../app/TestReactNativeApp/android/app/src/debug/AndroidManifest.xml" afterDir="false" />
|
|
12
|
-
<change beforePath="$PROJECT_DIR$/src/main/java/com/blueconic/blueconicreactnative/BlueConicClientModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/blueconic/blueconicreactnative/BlueConicClientModule.java" afterDir="false" />
|
|
13
|
-
<change beforePath="$PROJECT_DIR$/src/main/java/com/blueconic/blueconicreactnative/BlueConicInteraction.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/blueconic/blueconicreactnative/BlueConicInteraction.java" afterDir="false" />
|
|
14
|
-
<change beforePath="$PROJECT_DIR$/../ios/BlueConicClientModule.swift" beforeDir="false" afterPath="$PROJECT_DIR$/../ios/BlueConicClientModule.swift" afterDir="false" />
|
|
15
|
-
<change beforePath="$PROJECT_DIR$/../ios/BlueConicInteraction.swift" beforeDir="false" afterPath="$PROJECT_DIR$/../ios/BlueConicInteraction.swift" afterDir="false" />
|
|
16
|
-
</list>
|
|
17
|
-
<option name="SHOW_DIALOG" value="false" />
|
|
18
|
-
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
19
|
-
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
20
|
-
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
21
|
-
</component>
|
|
22
|
-
<component name="Git.Settings">
|
|
23
|
-
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../../.." />
|
|
24
|
-
</component>
|
|
25
|
-
<component name="ProjectId" id="1tywmywf2t0rGUr2lrFga4ckzHC" />
|
|
26
|
-
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
|
27
|
-
<component name="ProjectViewState">
|
|
28
|
-
<option name="hideEmptyMiddlePackages" value="true" />
|
|
29
|
-
<option name="showLibraryContents" value="true" />
|
|
30
|
-
</component>
|
|
31
|
-
<component name="PropertiesComponent">
|
|
32
|
-
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
|
33
|
-
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
|
34
|
-
<property name="android.sdk.path" value="$USER_HOME$/Library/Android/sdk" />
|
|
35
|
-
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
|
36
|
-
<property name="settings.editor.selected.configurable" value="AndroidSdkUpdater" />
|
|
37
|
-
</component>
|
|
38
|
-
<component name="SvnConfiguration">
|
|
39
|
-
<configuration />
|
|
40
|
-
</component>
|
|
41
|
-
<component name="TaskManager">
|
|
42
|
-
<task active="true" id="Default" summary="Default task">
|
|
43
|
-
<changelist id="13f53ae3-ea42-40ea-bf8f-a788615d4a0c" name="Default Changelist" comment="" />
|
|
44
|
-
<created>1623754799165</created>
|
|
45
|
-
<option name="number" value="Default" />
|
|
46
|
-
<option name="presentableId" value="Default" />
|
|
47
|
-
<updated>1623754799165</updated>
|
|
48
|
-
</task>
|
|
49
|
-
<servers />
|
|
50
|
-
</component>
|
|
51
|
-
<component name="WindowStateProjectService">
|
|
52
|
-
<state x="588" y="280" width="615" height="490" key="find.popup" timestamp="1623762130393">
|
|
53
|
-
<screen x="0" y="25" width="1792" height="1033" />
|
|
54
|
-
</state>
|
|
55
|
-
<state x="588" y="280" width="615" height="490" key="find.popup/-1920.-284.1920.1055/0.25.1792.1033@0.25.1792.1033" timestamp="1623762130393" />
|
|
56
|
-
</component>
|
|
57
|
-
</project>
|