@atomic.io/action-cards-web-sdk-cdn-icons 25.2.1 → 25.2.3
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 +25 -13
- package/package.json +1 -1
- package/public/LICENSES.txt +1 -1
- package/public/iframe-manager.js +3 -3
- package/public/sdk.d.ts +8 -5
- package/public/sdk.js +3 -3
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[](https://codecov.io/github/atomic-app/action-cards-web-sdk)
|
|
2
2
|
|
|
3
|
-
# Web SDK - Current (
|
|
3
|
+
# Web SDK - Current (26.1.0)
|
|
4
4
|
|
|
5
5
|
## Introduction
|
|
6
6
|
|
|
7
7
|
The Atomic Web SDK allows you to integrate an Atomic stream container into your web app or site, presenting cards from a stream to your customers.
|
|
8
8
|
|
|
9
|
-
The current stable release is **
|
|
9
|
+
The current stable release is **26.1.0**.
|
|
10
10
|
|
|
11
11
|
### Browser support
|
|
12
12
|
|
|
@@ -18,10 +18,10 @@ We currently do not have a boilerplate app for the Web SDK. [Contact us](mailto:
|
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
20
20
|
|
|
21
|
-
The current version of the Atomic Web SDK is `
|
|
21
|
+
The current version of the Atomic Web SDK is `26.1.0`, and is hosted on our CDN at `https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js`.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
This variant is hosted on our CDN at `https://downloads.atomic.io/web-sdk/release/
|
|
23
|
+
he Web SDK also offers a bundle variant which does not include the font used for icons in action cards. Instead this font is fetched via CDN as required, allowing the size of your initial bundle loaded by the browser to be smaller. Both variations function identically in all other respects.
|
|
24
|
+
This variant is hosted on our CDN at `https://downloads.atomic.io/web-sdk/release/26.1.0/sdk-cdn-icons.js`.
|
|
25
25
|
|
|
26
26
|
To integrate it, add the script for your chosen variant as a source to your web page:
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ To integrate it, add the script for your chosen variant as a source to your web
|
|
|
29
29
|
<html>
|
|
30
30
|
...
|
|
31
31
|
<body>
|
|
32
|
-
<script src="https://downloads.atomic.io/web-sdk/release/
|
|
32
|
+
<script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
|
|
33
33
|
</body>
|
|
34
34
|
</html>
|
|
35
35
|
```
|
|
@@ -393,7 +393,7 @@ The code sample below shows how to use the `AtomicSDK.launch(config)` method, to
|
|
|
393
393
|
...
|
|
394
394
|
<body>
|
|
395
395
|
<!-- Installation -->
|
|
396
|
-
<script src="https://downloads.atomic.io/web-sdk/release/
|
|
396
|
+
<script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
|
|
397
397
|
|
|
398
398
|
<script>
|
|
399
399
|
AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
|
|
@@ -468,7 +468,7 @@ The iframe generated by the `singleCard` method can be styled just like any othe
|
|
|
468
468
|
...
|
|
469
469
|
<body>
|
|
470
470
|
<!--Installation-->
|
|
471
|
-
<script src="https://downloads.atomic.io/web-sdk/release/
|
|
471
|
+
<script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
|
|
472
472
|
|
|
473
473
|
<script>
|
|
474
474
|
AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
|
|
@@ -501,7 +501,7 @@ The iframe generated by the `embed` method can be styled just like any other DOM
|
|
|
501
501
|
...
|
|
502
502
|
<body>
|
|
503
503
|
<!--Installation-->
|
|
504
|
-
<script src="https://downloads.atomic.io/web-sdk/release/
|
|
504
|
+
<script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
|
|
505
505
|
|
|
506
506
|
<script>
|
|
507
507
|
AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
|
|
@@ -1845,10 +1845,10 @@ To use the SDK with your Cordova or Capacitor app:
|
|
|
1845
1845
|
|
|
1846
1846
|
1. Download the Atomic SDK from our CDN, and bundle it with your application. There are two files you need to download:
|
|
1847
1847
|
|
|
1848
|
-
- `https://downloads.atomic.io/web-sdk/release/
|
|
1849
|
-
- `https://downloads.atomic.io/web-sdk/release/
|
|
1848
|
+
- `https://downloads.atomic.io/web-sdk/release/26.1.0/iframe-manager.js`
|
|
1849
|
+
- `https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js`
|
|
1850
1850
|
|
|
1851
|
-
_Where `
|
|
1851
|
+
_Where `26.1.0` is the version number of the SDK you wish to use._
|
|
1852
1852
|
|
|
1853
1853
|
2. **(Cordova only)**: Modify the `Content-Security-Policy` meta tag in your Cordova app to allow the following URLs, after the `default-src` directive:
|
|
1854
1854
|
|
|
@@ -1933,9 +1933,21 @@ The following example sets the client app version to `Version 2.3.1`.
|
|
|
1933
1933
|
AtomicSDK.setClientAppVersion('Version 2.3.1')
|
|
1934
1934
|
```
|
|
1935
1935
|
|
|
1936
|
+
### Setting a custom user Id attribute
|
|
1937
|
+
|
|
1938
|
+
The SDK provides a method `AtomicSDK.setTokenUserIdAttribute` for determining a custom user Id attribute in your JWT if you are not using the standard `sub` attribute. This attribute must also be configured in the Atomic Workbench against the relevant SDK API key.
|
|
1939
|
+
|
|
1940
|
+
The attribute name has a maximum length of 128 characters and must be a string.
|
|
1941
|
+
|
|
1942
|
+
The following example sets the attribute to `my_custom_id`.
|
|
1943
|
+
|
|
1944
|
+
```js
|
|
1945
|
+
AtomicSDK.setTokenUserIdAttribute('my_custom_id')
|
|
1946
|
+
```
|
|
1947
|
+
|
|
1936
1948
|
## Third-party dependencies
|
|
1937
1949
|
|
|
1938
|
-
The Atomic Web SDK (as at the current release `
|
|
1950
|
+
The Atomic Web SDK (as at the current release `26.1.0`) uses the following third-party dependencies:
|
|
1939
1951
|
|
|
1940
1952
|
- Font Awesome Free `5.13.1`
|
|
1941
1953
|
- snarkdown `1.2.1`
|
package/package.json
CHANGED
package/public/LICENSES.txt
CHANGED