@atomic.io/action-cards-web-sdk-cdn-icons 24.2.1 → 24.3.0-beta1
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 +40 -25
- package/package.json +1 -1
- package/public/LICENSES.txt +1 -1
- package/public/iframe-manager.js +3 -3
- package/public/sdk.d.ts +130 -11
- package/public/sdk.js +3 -3
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ The Atomic Web SDK allows you to integrate an Atomic stream container into your
|
|
|
8
8
|
|
|
9
9
|
The current stable release is **24.2.1**.
|
|
10
10
|
|
|
11
|
+
The latest beta release is **24.3.0-beta1**.
|
|
12
|
+
|
|
11
13
|
### Browser support
|
|
12
14
|
|
|
13
15
|
The Atomic Web SDK supports the latest version of Chrome, Firefox, Edge (Chromium-based), Safari on macOS, Safari on iOS and Chrome on Android.
|
|
@@ -181,13 +183,13 @@ Some configuration options are common for all types of container, other options
|
|
|
181
183
|
|
|
182
184
|
#### Style and presentation
|
|
183
185
|
|
|
184
|
-
A selection of UI elements can be customized within stream containers (this customization does **not apply to single card views
|
|
186
|
+
A selection of UI elements can be customized within stream containers (this customization does **not apply to single card views**, with the exception of `toastConfig`). These are configured using the `enabledUiElements` property on a stream container configuration object:
|
|
185
187
|
|
|
186
188
|
- `cardListToast` - defaults to `true`. Set to `false` to turn off toast messages on the card list.
|
|
187
189
|
- `customToastContainer` - defaults to `false`. Set to `true` to use an [alternative toast message presentation](https://documentation.atomic.io/sdks/web#custom-toast-message-positioning) for standalone or launcher stream containers which allows you to reposition the toast message.
|
|
188
190
|
- `toastConfig` - an optional configuration object to customise the toast messages displayed by the SDK.
|
|
189
191
|
- `timeout`: optionally supply a number that sets how long the toast message should be displayed for in milliseconds.
|
|
190
|
-
- `toastMessages`: an optional object where you can set custom strings for the following properties: `submittedCard`, `dismissedCard`, `snoozedCard` & `
|
|
192
|
+
- `toastMessages`: an optional object where you can set custom strings for the following properties: `submittedCard`, `dismissedCard`, `snoozedCard`, `feedbackReceived` & `fileUploadFailed`. These will be displayed as the toast message for the respective card event.
|
|
191
193
|
- `cardListHeader` - defaults to `true`. Set to `false` to disable the display of the title at the top of the card list.
|
|
192
194
|
- `customContainerHeader` - can optionally supply a custom header to be displayed above the card feed when displaying a `launch` or `embed` type stream container.
|
|
193
195
|
- `scrollHeader`: an optional boolean to control whether the custom header scrolls with the card feed, defaults to `true`.
|
|
@@ -212,7 +214,8 @@ AtomicSDK.launch({
|
|
|
212
214
|
submittedCard: 'Custom submitted message',
|
|
213
215
|
dismissedCard: 'Custom dismissed message',
|
|
214
216
|
snoozedCard: 'Custom snoozed message',
|
|
215
|
-
feedbackReceived: 'Custom feedback message'
|
|
217
|
+
feedbackReceived: 'Custom feedback message',
|
|
218
|
+
fileUploadFailed: 'Custom file upload failed message'
|
|
216
219
|
}
|
|
217
220
|
},
|
|
218
221
|
cardListHeader: true,
|
|
@@ -270,6 +273,8 @@ You can customize the following strings used by the Web SDK, using the `customSt
|
|
|
270
273
|
- The error message shown when the user does not have an internet connection (`noInternetConnectionMessage`).
|
|
271
274
|
- The error message shown when the theme or card list cannot be loaded due to an API error (`dataLoadFailedMessage`).
|
|
272
275
|
- The title of the button allowing the user to retry the failed request for the card list or theme (`tryAgainTitle`).
|
|
276
|
+
- The text displayed on the card overlay while a file upload is in progress (`processingStateMessage`).
|
|
277
|
+
- The title of the button on the card overlay allowing the user to cancel file uploads that are currently in progress (`processingStateCancelButtonTitle`).
|
|
273
278
|
|
|
274
279
|
If you don't provide these custom strings, the SDK defaults will be used:
|
|
275
280
|
|
|
@@ -283,6 +288,8 @@ If you don't provide these custom strings, the SDK defaults will be used:
|
|
|
283
288
|
- `noInternetConnectionMessage`: "No internet connection"
|
|
284
289
|
- `dataLoadFailedMessage`: "Couldn't load data"
|
|
285
290
|
- `tryAgainTitle`: "Try again"
|
|
291
|
+
- `processingStateMessage`: "Sending, please wait..."
|
|
292
|
+
- `processingStateCancelButtonTitle`: "Cancel process"
|
|
286
293
|
|
|
287
294
|
The code snippet below shows how to customize some of these strings.
|
|
288
295
|
|
|
@@ -296,7 +303,12 @@ AtomicSDK.launch({
|
|
|
296
303
|
cardSnoozeTitle: 'Snooze',
|
|
297
304
|
votingUsefulTitle: 'Positive feedback',
|
|
298
305
|
votingNotUsefulTitle: 'Negative feedback',
|
|
299
|
-
votingFeedbackTitle: 'Tell us more'
|
|
306
|
+
votingFeedbackTitle: 'Tell us more',
|
|
307
|
+
noInternetConnectionMessage: 'No internet connection available',
|
|
308
|
+
dataLoadFailedMessage: 'Failed to load cards',
|
|
309
|
+
tryAgainTitle: 'Please try again',
|
|
310
|
+
processingStateMessage: 'File uploads in progress',
|
|
311
|
+
processingStateCancelButtonTitle: 'Cancel file upload'
|
|
300
312
|
}
|
|
301
313
|
});
|
|
302
314
|
```
|
|
@@ -1077,27 +1089,30 @@ AtomicSDK.observeSDKEvents(event => {
|
|
|
1077
1089
|
|
|
1078
1090
|
The actions that will trigger this callback include card & stream actions, the table below contains the full list of actions that the event observer may be called with and their corresponding event type.
|
|
1079
1091
|
|
|
1080
|
-
| Event name
|
|
1081
|
-
|
|
|
1082
|
-
| card-completed
|
|
1083
|
-
| card-dismissed
|
|
1084
|
-
| card-snoozed
|
|
1085
|
-
| card-feed-updated
|
|
1086
|
-
| card-displayed
|
|
1087
|
-
| card-voted-up
|
|
1088
|
-
| card-voted-down
|
|
1089
|
-
| runtime-vars-updated
|
|
1090
|
-
| stream-displayed
|
|
1091
|
-
| user-redirected
|
|
1092
|
-
| snooze-options-displayed
|
|
1093
|
-
| snooze-options-canceled
|
|
1094
|
-
| card-subview-displayed
|
|
1095
|
-
| card-subview-exited
|
|
1096
|
-
| video-played
|
|
1097
|
-
| video-completed
|
|
1098
|
-
| sdk-initialized
|
|
1099
|
-
| request-failed
|
|
1100
|
-
| notification-received
|
|
1092
|
+
| Event name | Event type | Description |
|
|
1093
|
+
| :-------------------------- | :------------------------------- | :--------------------------------------------------------------------------------------------------------- |
|
|
1094
|
+
| card-completed | SDKCardCompletedEvent | The user has completed a card |
|
|
1095
|
+
| card-dismissed | SDKCardDismissedEvent | The user has dismissed a card |
|
|
1096
|
+
| card-snoozed | SDKCardSnoozedEvent | The user has snoozed a card |
|
|
1097
|
+
| card-feed-updated | SDKFeedEvent | A stream container has had its card feed updated |
|
|
1098
|
+
| card-displayed | SDKCardDisplayedEvent | A card has been displayed to the user |
|
|
1099
|
+
| card-voted-up | SDKCardVotedUpEvent | The user provided positive feedback on a card |
|
|
1100
|
+
| card-voted-down | SDKCardVotedDownEvent | The user provided negative feedback on a card |
|
|
1101
|
+
| runtime-vars-updated | SDKRuntimeVarsUpdatedEvent | One or more runtime variables have been resolved |
|
|
1102
|
+
| stream-displayed | SDKStreamDisplayedEvent | A stream container has been displayed to the user |
|
|
1103
|
+
| user-redirected | SDKRedirectedEvent | The user is redirected by a URL or a custom payload |
|
|
1104
|
+
| snooze-options-displayed | SDKSnoozeOptionsDisplayedEvent | The snooze date/time selector has been displayed |
|
|
1105
|
+
| snooze-options-canceled | SDKSnoozeOptionsCanceledEvent | The user has exited the snooze date/time selector |
|
|
1106
|
+
| card-subview-displayed | SDKSubviewDisplayedEvent | A card subview has been opened |
|
|
1107
|
+
| card-subview-exited | SDKSubviewExitedEvent | A card subview has been exited |
|
|
1108
|
+
| video-played | SDKVideoPlayedEvent | The user has started playback of a video |
|
|
1109
|
+
| video-completed | SDKVideoCompletedEvent | The user has watched a video to completion |
|
|
1110
|
+
| sdk-initialized | SDKInitEvent | The SDK has been initialized and supplied with a valid auth token |
|
|
1111
|
+
| request-failed | SDKRequestFailedEvent | A request to the Atomic client API has failed or a WebSocket failure has caused a fallback to HTTP polling |
|
|
1112
|
+
| notification-received | SDKNotificationReceivedEvent | A push notification has been received |
|
|
1113
|
+
| user-file-uploads-started | SDKUserFileUploadsStartedEvent | A user has started the process of uploading files for a card |
|
|
1114
|
+
| user-file-uploads-completed | SDKUserFileUploadsCompletedEvent | A user has successfully completed the process of uploading files for a card |
|
|
1115
|
+
| user-file-uploads-failed | SDKUserFileUploadsFailedEvent | A user has completed the process of uploading files, with one or more uploads failing |
|
|
1101
1116
|
|
|
1102
1117
|
### Accessing properties for a particular event
|
|
1103
1118
|
|
package/package.json
CHANGED
package/public/LICENSES.txt
CHANGED