@opencx/widget 5.0.0-beta.9 → 5.1.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/README.md +23 -13
- package/dist-embed/script.js +1059 -1
- package/package.json +7 -5
- package/dist-embed/Chart.impl-BOItNccb-D7XB6yyS.js +0 -68
- package/dist-embed/widget.js +0 -964
package/README.md
CHANGED
|
@@ -15,16 +15,26 @@ For all the available options, check [the documentation](https://docs.open.cx/wi
|
|
|
15
15
|
|
|
16
16
|
## Self-hosting
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
`dist-embed/script.js` is a self-contained classic script. Copy that single file
|
|
19
|
+
to your own server, as with v4. No sibling module or lazy chunks are required.
|
|
20
|
+
Apply your site's existing script CSP policy to the script tag.
|
|
21
|
+
|
|
22
|
+
Repeated script loads reuse the first loaded widget runtime and its React root.
|
|
23
|
+
Calling `initOpenScript` again updates its options. To switch widget versions,
|
|
24
|
+
reload the page.
|
|
25
|
+
|
|
26
|
+
## Opt into v5 runtime features
|
|
27
|
+
|
|
28
|
+
An unchanged configuration keeps classic send/poll delivery. To enable streaming
|
|
29
|
+
and personal service connections, declare both explicitly:
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
initOpenScript({
|
|
33
|
+
token: 'YOUR_WIDGET_TOKEN',
|
|
34
|
+
streaming: true,
|
|
35
|
+
capabilities: { connections: true },
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Streaming also requires backend support. Companion layout is selected separately
|
|
40
|
+
with `displayMode: 'companion'`; changing layout alone does not change delivery.
|