cordova-plugin-ymchat 2.13.0 → 2.15.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/package.json
CHANGED
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="cordova-plugin-ymchat" version="2.
|
|
2
|
+
<plugin id="cordova-plugin-ymchat" version="2.15.0"
|
|
3
3
|
xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
4
4
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
5
5
|
<name>ymchat</name>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<source url="https://github.com/CocoaPods/Specs.git" branch="master"/>
|
|
35
35
|
</config>
|
|
36
36
|
<pods use-frameworks="true">
|
|
37
|
-
<pod name="YMChat" spec="~> 1.
|
|
37
|
+
<pod name="YMChat" spec="~> 1.19" swift-version="5.0"/>
|
|
38
38
|
</pods>
|
|
39
39
|
</podspec>
|
|
40
40
|
<config-file parent="/*" target="config.xml">
|
package/src/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
ext.cdvCompileSdkVersion=
|
|
2
|
-
ext.cdvBuildToolsVersion="30.0.
|
|
1
|
+
ext.cdvCompileSdkVersion=34
|
|
2
|
+
ext.cdvBuildToolsVersion="30.0.3"
|
|
3
3
|
ext.cdvMinSdkVersion=23
|
|
4
|
-
ext.cdvTargetSdkVersion=
|
|
4
|
+
ext.cdvTargetSdkVersion=34
|
|
5
5
|
|
|
6
6
|
android {
|
|
7
7
|
lintOptions {
|
|
@@ -24,5 +24,5 @@ repositories {
|
|
|
24
24
|
dependencies {
|
|
25
25
|
implementation 'androidx.appcompat:appcompat:1.0.2'
|
|
26
26
|
implementation 'androidx.annotation:annotation:1.0.2'
|
|
27
|
-
implementation 'com.github.yellowmessenger:YMChatbot-Android:v2.
|
|
27
|
+
implementation 'com.github.yellowmessenger:YMChatbot-Android:v2.15.0'
|
|
28
28
|
}
|
|
@@ -119,6 +119,9 @@ public class YmChatCordova extends CordovaPlugin {
|
|
|
119
119
|
case "setThemeBotClickIcon":
|
|
120
120
|
setThemeBotClickIcon(args,callbackContext);
|
|
121
121
|
return true;
|
|
122
|
+
case "setChatContainerTheme":
|
|
123
|
+
setChatContainerTheme(args,callbackContext);
|
|
124
|
+
return true;
|
|
122
125
|
}
|
|
123
126
|
return false;
|
|
124
127
|
}
|
|
@@ -387,6 +390,15 @@ public class YmChatCordova extends CordovaPlugin {
|
|
|
387
390
|
}
|
|
388
391
|
}
|
|
389
392
|
|
|
393
|
+
public void setChatContainerTheme(JSONArray args, CallbackContext callbackContext) {
|
|
394
|
+
try {
|
|
395
|
+
String theme = args.getString(0);
|
|
396
|
+
ymChatService.setChatContainerTheme(theme, callbackContext);
|
|
397
|
+
} catch (Exception e) {
|
|
398
|
+
Utils.genericErrorHelper(e, callbackContext);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
390
402
|
private void revalidateToken(JSONArray args, CallbackContext callbackContext) {
|
|
391
403
|
try {
|
|
392
404
|
String token = args.getString(0);
|
|
@@ -245,6 +245,10 @@ public class YmChatService {
|
|
|
245
245
|
ymChat.config.theme.botClickIcon = iconUrl;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
+
public void setChatContainerTheme(String theme, CallbackContext callbackContext) {
|
|
249
|
+
ymChat.config.theme.chatBotTheme = theme;
|
|
250
|
+
}
|
|
251
|
+
|
|
248
252
|
public void revalidateToken(String token, boolean refreshSession, CallbackContext callbackContext) {
|
|
249
253
|
try {
|
|
250
254
|
ymChat.revalidateToken(token, refreshSession);
|
package/src/ios/ymchat.m
CHANGED
|
@@ -284,6 +284,13 @@
|
|
|
284
284
|
YMChat.shared.config.theme.botClickIcon = iconUrl;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
- (void)setChatContainerTheme:(CDVInvokedUrlCommand*)command
|
|
288
|
+
{
|
|
289
|
+
NSString* theme = [command.arguments objectAtIndex:0];
|
|
290
|
+
assert(YMChat.shared.config != nil);
|
|
291
|
+
YMChat.shared.config.theme.chatBotTheme = theme;
|
|
292
|
+
}
|
|
293
|
+
|
|
287
294
|
- (void)revalidateToken:(CDVInvokedUrlCommand*)command
|
|
288
295
|
{
|
|
289
296
|
NSString* token = [command.arguments objectAtIndex:0];
|
package/www/ymchat.js
CHANGED
|
@@ -95,6 +95,9 @@ const YmChatAPI = {
|
|
|
95
95
|
setThemeBotClickIcon: (iconUrl) => {
|
|
96
96
|
exec(null, null, "ymchat", "setThemeBotClickIcon", [iconUrl]);
|
|
97
97
|
},
|
|
98
|
+
setChatContainerTheme: (theme) => {
|
|
99
|
+
exec(null, null, "ymchat", "setChatContainerTheme", [theme]);
|
|
100
|
+
},
|
|
98
101
|
revalidateToken: (token, refreshSession) => {
|
|
99
102
|
exec(null, null, "ymchat", "revalidateToken", [token, refreshSession]);
|
|
100
103
|
},
|