cordova-plugin-ymchat 1.4.0 → 1.5.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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "java.configuration.updateBuildConfiguration": "automatic"
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-ymchat",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Cordova plugin to integrate yellow.ai chatbot",
5
5
  "cordova": {
6
6
  "id": "cordova-plugin-ymchat",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version='1.0' encoding='utf-8'?>
2
- <plugin id="cordova-plugin-ymchat" version="1.3.0"
2
+ <plugin id="cordova-plugin-ymchat" version="1.5.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>
@@ -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:v1.8.+'
27
+ implementation 'com.github.yellowmessenger:YMChatbot-Android:v1.9.+'
28
28
  }
@@ -59,11 +59,11 @@ public class YmChatCordova extends CordovaPlugin {
59
59
  case "setVersion":
60
60
  setVersion(args,callbackContext);
61
61
  return true;
62
- case "setStatusBarColour":
63
- setStatusBarColour(args,callbackContext);
62
+ case "setStatusBarColor":
63
+ setStatusBarColor(args,callbackContext);
64
64
  return true;
65
- case "setCloseButtonColour":
66
- setCloseButtonColour(args,callbackContext);
65
+ case "setCloseButtonColor":
66
+ setCloseButtonColor(args,callbackContext);
67
67
  return true;
68
68
  case "setCustomLoaderURL":
69
69
  setCustomLoaderURL(args, callbackContext);
@@ -72,19 +72,19 @@ public class YmChatCordova extends CordovaPlugin {
72
72
  return false;
73
73
  }
74
74
 
75
- private void setCloseButtonColour(JSONArray args, CallbackContext callbackContext) {
75
+ private void setCloseButtonColor(JSONArray args, CallbackContext callbackContext) {
76
76
  try {
77
- String colour = args.getString(0);
78
- ymChatService.setCloseButtonColour(colour, callbackContext);
77
+ String color = args.getString(0);
78
+ ymChatService.setCloseButtonColor(color, callbackContext);
79
79
  } catch (Exception e) {
80
80
  Utils.genericErrorHelper(e, callbackContext);
81
81
  }
82
82
  }
83
83
 
84
- private void setStatusBarColour(JSONArray args, CallbackContext callbackContext) {
84
+ private void setStatusBarColor(JSONArray args, CallbackContext callbackContext) {
85
85
  try {
86
- String colour = args.getString(0);
87
- ymChatService.setStatusBarColour(colour, callbackContext);
86
+ String color = args.getString(0);
87
+ ymChatService.setStatusBarColor(color, callbackContext);
88
88
  } catch (Exception e) {
89
89
  Utils.genericErrorHelper(e, callbackContext);
90
90
  }
@@ -133,11 +133,11 @@ public class YmChatService {
133
133
  ymChat.config.customLoaderUrl = url;
134
134
  }
135
135
 
136
- public void setCloseButtonColour(String colour, CallbackContext callbackContext) {
137
- ymChat.config.closeButtonColorHex = colour;
136
+ public void setCloseButtonColor(String color, CallbackContext callbackContext) {
137
+ ymChat.config.closeButtonColorFromHex = color;
138
138
  }
139
139
 
140
- public void setStatusBarColour(String colour, CallbackContext callbackContext) {
141
- ymChat.config.statusBarColorFromHex = colour;
140
+ public void setStatusBarColor(String color, CallbackContext callbackContext) {
141
+ ymChat.config.statusBarColorFromHex = color;
142
142
  }
143
143
  }
package/src/ios/ymchat.m CHANGED
@@ -137,18 +137,18 @@
137
137
  YMChat.shared.config.customLoaderUrl = url;
138
138
  }
139
139
 
140
- - (void)setStatusBarColour:(CDVInvokedUrlCommand*)command
140
+ - (void)setStatusBarColor:(CDVInvokedUrlCommand*)command
141
141
  {
142
- NSString* colour = [command.arguments objectAtIndex:0];
142
+ NSString* color = [command.arguments objectAtIndex:0];
143
143
  assert(YMChat.shared.config != nil);
144
- YMChat.shared.config.statusBarColor = [self getColorFromHexString:colour];
144
+ YMChat.shared.config.statusBarColor = [self getColorFromHexString:color];
145
145
  }
146
146
 
147
- - (void)setCloseButtonColour:(CDVInvokedUrlCommand*)command
147
+ - (void)setCloseButtonColor:(CDVInvokedUrlCommand*)command
148
148
  {
149
- NSString* colour = [command.arguments objectAtIndex:0];
149
+ NSString* color = [command.arguments objectAtIndex:0];
150
150
  assert(YMChat.shared.config != nil);
151
- YMChat.shared.config.closeButtonColor = [self getColorFromHexString:colour];
151
+ YMChat.shared.config.closeButtonColor = [self getColorFromHexString:color];
152
152
  }
153
153
 
154
154
  - (UIColor *)getColorFromHexString:(NSString *)hexString {
package/www/ymchat.js CHANGED
@@ -44,11 +44,11 @@ const YmChatAPI = {
44
44
  setCustomLoaderURL: (url) => {
45
45
  exec(null, null, "ymchat", "setCustomLoaderURL", [url]);
46
46
  },
47
- setStatusBarColour: (colour) => {
48
- exec(null, null, "ymchat", "setStatusBarColour", [colour]);
47
+ setStatusBarColor: (color) => {
48
+ exec(null, null, "ymchat", "setStatusBarColor", [color]);
49
49
  },
50
- setCloseButtonColour: (colour) => {
51
- exec(null, null, "ymchat", "setCloseButtonColour", [colour]);
50
+ setCloseButtonColor: (color) => {
51
+ exec(null, null, "ymchat", "setCloseButtonColor", [color]);
52
52
  }
53
53
  };
54
54