@2uinc/frontend-component-xpert-chatbot 1.3.1-alpha.1 → 1.3.2
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 +0 -28
- package/package.json +1 -1
package/README.md
CHANGED
@@ -118,39 +118,11 @@ A CDN deployment occurs after the NPM deployment for clients that don't have Rea
|
|
118
118
|
|
119
119
|
</head>
|
120
120
|
<body>
|
121
|
-
<div id="xpert-chatbot-container"></div>
|
122
|
-
...
|
123
121
|
<script defer src="https://chatbot-frontend.prod.ai.2u.com/@latest/index.min.js"></script>
|
124
122
|
</body>
|
125
123
|
```
|
126
124
|
|
127
|
-
For environments that don't support script type "importmap" (ie Google Tag Manager), manual creation of the script tag will be required:
|
128
125
|
|
129
|
-
```
|
130
|
-
<script>
|
131
|
-
var scriptElement = document.createElement('script');
|
132
|
-
scriptElement.type = "importmap";
|
133
|
-
var importMap = {
|
134
|
-
"imports": {
|
135
|
-
"react": "https://cdn.jsdelivr.net/npm/react@17.0.2/+esm",
|
136
|
-
"react-dom": "https://cdn.jsdelivr.net/npm/react-dom@17.0.2/+esm"
|
137
|
-
}
|
138
|
-
};
|
139
|
-
var importMapString = JSON.stringify(importMap);
|
140
|
-
var importMapElement = document.createTextNode(importMapString);
|
141
|
-
scriptElement.appendChild(importMapElement);
|
142
|
-
document.head.appendChild(scriptElement);
|
143
|
-
</script>
|
144
|
-
|
145
|
-
<link rel="stylesheet" href="https://chatbot-frontend.prod.ai.2u.com/@latest/index.min.css" />
|
146
|
-
|
147
|
-
<script>
|
148
|
-
var scriptElement = document.createElement('script');
|
149
|
-
scriptElement.setAttribute('type', "module");
|
150
|
-
scriptElement.setAttribute('src', "https://chatbot-frontend.prod.ai.2u.com/@latest/index.min.js");
|
151
|
-
document.body.appendChild(scriptElement);
|
152
|
-
</script>
|
153
|
-
```
|
154
126
|
|
155
127
|
## Beta releases
|
156
128
|
|