@koredev/kore-web-sdk 11.18.0-rc.f92a18a → 11.19.0-rc.b432c67
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/README.md +8 -4
- package/dist/esm/kore-web-sdk-chat.min.js +1 -1
- package/dist/esm/plugins/agent-desktop.js +1 -1
- package/dist/esm/plugins/proactive-web-campaign.js +1 -1
- package/dist/plugins/proactiveWebCampaign/proactiveWebCampaign.d.ts +56 -21
- package/dist/umd/kore-web-sdk-umd-chat.min.js +1 -1
- package/dist/umd/plugins/agent-desktop-umd.js +1 -1
- package/dist/umd/plugins/proactive-web-campaign.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ include the following script in your html file and configure bot configurations
|
|
|
71
71
|
|
|
72
72
|
```js
|
|
73
73
|
|
|
74
|
-
<script src="https://cdn.jsdelivr.net/npm/kore-web-sdk@11.
|
|
74
|
+
<script src="https://cdn.jsdelivr.net/npm/kore-web-sdk@11.19.0/dist/umd/kore-web-sdk-umd-chat.min.js"></script>
|
|
75
75
|
<script>
|
|
76
76
|
//chat window declaration
|
|
77
77
|
var chatConfig=KoreChatSDK.chatConfig;
|
|
@@ -125,9 +125,9 @@ In addition to the kore message templates, new custom templates can be intstalle
|
|
|
125
125
|
```bash
|
|
126
126
|
class customTemplateComponent{
|
|
127
127
|
renderMessage(msgData){
|
|
128
|
-
if(msgData?.message[0]?.component?.payload?.template_type==='custom_stock_template'){
|
|
129
|
-
return '<h2>My Template HTML</h2>';
|
|
130
|
-
}else{
|
|
128
|
+
if (msgData?.message[0]?.component?.payload?.template_type === 'custom_stock_template') {
|
|
129
|
+
return '<h2 data-kr-msg-id=' + msgData.messageId + ' data-time=' + msgData.createdOnTimemillis + '>My Template HTML</h2>';
|
|
130
|
+
} else {
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -137,6 +137,10 @@ chatWindowInstance.templateManager.installTemplate(new customTemplateComponent()
|
|
|
137
137
|
```
|
|
138
138
|
Other framework UI components like angular and react can also be injected with this
|
|
139
139
|
|
|
140
|
+
> [!NOTE]
|
|
141
|
+
> - Please add the following two attributes for parent div in the custom template html
|
|
142
|
+
> - `data-kr-msg-id` with value `msgData.messageId` and `data-time` with value `msgData.createdOnTimemillis`
|
|
143
|
+
|
|
140
144
|
## 💡 Plugins
|
|
141
145
|
|
|
142
146
|
Kore's chatwindow functionlity can be extended with the help of plugins.Newly created plugins can be installed with *installPlugin* method
|