@atomic.io/action-cards-web-sdk-cdn-icons 25.3.0 → 25.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 CHANGED
@@ -1,12 +1,12 @@
1
1
  [![codecov](https://codecov.io/github/atomic-app/action-cards-web-sdk/branch/master/graph/badge.svg?token=BNXNRL8ASJ)](https://codecov.io/github/atomic-app/action-cards-web-sdk)
2
2
 
3
- # Web SDK - Current (25.3.0)
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 **25.3.0**.
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 `25.3.0`, and is hosted on our CDN at `https://downloads.atomic.io/web-sdk/release/25.3.0/sdk.js`.
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
23
  The 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/25.3.0/sdk-cdn-icons.js`.
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/25.3.0/sdk.js"></script>
32
+ <script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
33
33
  </body>
34
34
  </html>
35
35
  ```
@@ -395,7 +395,7 @@ The code sample below shows how to use the `AtomicSDK.launch(config)` method, to
395
395
  ...
396
396
  <body>
397
397
  <!-- Installation -->
398
- <script src="https://downloads.atomic.io/web-sdk/release/25.3.0/sdk.js"></script>
398
+ <script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
399
399
 
400
400
  <script>
401
401
  AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
@@ -470,7 +470,7 @@ The iframe generated by the `singleCard` method can be styled just like any othe
470
470
  ...
471
471
  <body>
472
472
  <!--Installation-->
473
- <script src="https://downloads.atomic.io/web-sdk/release/25.3.0/sdk.js"></script>
473
+ <script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
474
474
 
475
475
  <script>
476
476
  AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
@@ -503,7 +503,7 @@ The iframe generated by the `embed` method can be styled just like any other DOM
503
503
  ...
504
504
  <body>
505
505
  <!--Installation-->
506
- <script src="https://downloads.atomic.io/web-sdk/release/25.3.0/sdk.js"></script>
506
+ <script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
507
507
 
508
508
  <script>
509
509
  AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
@@ -582,7 +582,7 @@ The following illustrates initializing a modal stream container with example con
582
582
  ...
583
583
  <body>
584
584
  <!--Installation-->
585
- <script src="https://downloads.atomic.io/web-sdk/release/25.3.0/sdk.js"></script>
585
+ <script src="https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js"></script>
586
586
 
587
587
  <script>
588
588
  AtomicSDK.initialise('<apiHost>', '<apiKey>', '<environmentId>')
@@ -958,19 +958,34 @@ instance.streamFilters.addCardCreatedFilter().greaterThan('2020-02-15T00:00:00.0
958
958
  instance.streamFilters.apply()
959
959
  ```
960
960
 
961
+ This example shows how you can filter on an attribute within the payload of a submit button on the top-level of a card. This example assumes the submit button is always the first item in the card button group.
962
+
963
+ ```js
964
+ const instance = AtomicSDK.launch({
965
+ ...
966
+ })
967
+
968
+ instance
969
+ .addCardContentFilter('actions.0.attributes.values.targetPage')
970
+ .isIncludedIn(window.location.pathname)
971
+ instance.streamFilters.apply()
972
+ ```
973
+
961
974
  ### Filter values
962
975
 
963
976
  The filter value is used to filter cards in a stream container. The table below summarises the different card attributes that can be filtered on, as well as the permitted data type for that filter and the filter operators that can be applied to it.
964
977
 
965
- | Card attribute | Description | Filter function | Value type | Permitted operators |
966
- | -------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
967
- | Priority | Card priority defined in Workbench, Card -> Delivery | `streamFilters.addCardPriorityFilter()` | number between 1 & 10 inclusive | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between` |
968
- | Card template ID | The template ID of a card, see below for how to get it | `streamFilters.addCardTemplateIdFilter()` | string | `equals`<br/>`notEqualTo`<br/>`in`<br/>`notIn` |
969
- | Card template name | The template name of a card | `streamFilters.addCardTemplateNameFilter()` | string | `equals`<br/>`notEqualTo`<br/>`in`<br/>`notIn` |
970
- | Card template created date | The date time when a card template is created | `streamFilters.addCardCreatedFilter()` | ISO date string | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo` |
971
- | Custom variable | The default value for variables defined for a card in Workbench, Card -> Variables | `streamFilters.addVariableFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between` |
972
- | Payload variable | The value for variables as defined in API event payload | `streamFilters.addPayloadVariableFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between` |
973
- | Payload metadata | The value for metadata as defined in API event payload | `streamFilters.addPayloadMetadataFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between` |
978
+ | Card attribute | Description | Filter function | Value type | Permitted operators |
979
+ | -------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
980
+ | Priority | Card priority defined in Workbench, Card -> Delivery | `streamFilters.addCardPriorityFilter()` | number between 1 & 10 inclusive | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between` |
981
+ | Card template ID | The template ID of a card, see below for how to get it | `streamFilters.addCardTemplateIdFilter()` | string | `equals`<br/>`notEqualTo`<br/>`in`<br/>`notIn`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
982
+ | Card template name | The template name of a card | `streamFilters.addCardTemplateNameFilter()` | string | `equals`<br/>`notEqualTo`<br/>`in`<br/>`notIn`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
983
+ | Card template created date | The date time when a card template is created | `streamFilters.addCardCreatedFilter()` | ISO date string | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo` |
984
+ | Custom variable | The default value for variables defined for a card in Workbench, Card -> Variables | `streamFilters.addVariableFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
985
+ | Payload variable | The value for variables as defined in API event payload | `streamFilters.addPayloadVariableFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
986
+ | Payload metadata | The value for metadata as defined in API event payload | `streamFilters.addPayloadMetadataFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
987
+ | Top-level card content | The value for content in the top-level of the card | `streamFilters.addCardContentFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
988
+ | Subview card content | The value for content in a card subview | `streamFilters.addSubviewContentFilter()` | multiple | `equals`<br/>`notEqualTo`<br/>`greaterThan`<br/>`greaterThanOrEqualTo`<br/>`lessThan`<br/>`lessThanOrEqualTo`<br/>`in`<br/>`notIn`<br/>`between`<br/>`includes`<br/>`excludes`<br/>`isIncludedIn`<br/>`isExcludedFrom` |
974
989
 
975
990
  **Note:** It's important to specify the right value type when referencing custom variables for filter value. There are five types of variables in the Workbench, currently four are supported: String, Number, Date and Boolean.<br />
976
991
 
@@ -1979,10 +1994,10 @@ To use the SDK with your Cordova or Capacitor app:
1979
1994
 
1980
1995
  1. Download the Atomic SDK from our CDN, and bundle it with your application. There are two files you need to download:
1981
1996
 
1982
- - `https://downloads.atomic.io/web-sdk/release/25.3.0/iframe-manager.js`
1983
- - `https://downloads.atomic.io/web-sdk/release/25.3.0/sdk.js`
1997
+ - `https://downloads.atomic.io/web-sdk/release/26.1.0/iframe-manager.js`
1998
+ - `https://downloads.atomic.io/web-sdk/release/26.1.0/sdk.js`
1984
1999
 
1985
- _Where `25.3.0` is the version number of the SDK you wish to use._
2000
+ _Where `26.1.0` is the version number of the SDK you wish to use._
1986
2001
 
1987
2002
  2. **(Cordova only)**: Modify the `Content-Security-Policy` meta tag in your Cordova app to allow the following URLs, after the `default-src` directive:
1988
2003
 
@@ -2081,7 +2096,7 @@ AtomicSDK.setTokenUserIdAttribute('my_custom_id')
2081
2096
 
2082
2097
  ## Third-party dependencies
2083
2098
 
2084
- The Atomic Web SDK (as at the current release `25.3.0`) uses the following third-party dependencies:
2099
+ The Atomic Web SDK (as at the current release `26.1.0`) uses the following third-party dependencies:
2085
2100
 
2086
2101
  - Font Awesome Free `5.13.1`
2087
2102
  - snarkdown `1.2.1`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic.io/action-cards-web-sdk-cdn-icons",
3
- "version": "25.3.0",
3
+ "version": "25.3.2",
4
4
  "description": "The Atomic Web SDK",
5
5
  "main": "public/sdk.js",
6
6
  "typings": "public/sdk.d.ts",
@@ -1,4 +1,4 @@
1
- The Atomic Web SDK (25.3.0) uses the following open sources libraries:
1
+ The Atomic Web SDK (25.3.2) uses the following open sources libraries:
2
2
 
3
3
  -----------------------
4
4