@atlaskit/editor-plugin-engagement-platform 8.0.0 → 9.0.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +43 -33
  3. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-plugin-engagement-platform
2
2
 
3
+ ## 9.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5985f38f7104e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5985f38f7104e) -
8
+ Update README.md and 0-intro.tsx
9
+
10
+ ## 9.0.0
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 8.0.0
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -1,35 +1,43 @@
1
- # Editor Engagement Platform Plugin
1
+ # Editor Plugin Engagement Platform
2
2
 
3
- This plugin allows interaction with the Atlassian Engagement Platform within the editor. It provides
4
- functionalities to start and stop engagement messages, as well as to check the state of these
5
- messages.
3
+ Engagement platform plugin for @atlaskit/editor-core
6
4
 
7
5
  **Note:** This component is designed for internal Atlassian development.
8
6
  External contributors will be able to use this component but will not be able to submit issues.
9
7
 
10
- ## Features
8
+ ## Overview
11
9
 
12
- - **Start Message**: Start an engagement message with a given ID and optional variation ID.
13
- - **Stop Message**: Stop an engagement message with a given ID.
10
+ The Engagement Platform plugin provides integration with the Atlassian Engagement Platform within the editor. It enables control of external messages by allowing you to start and stop engagement messages, as well as check the state of these messages. The plugin requires a coordination client to manage message lifecycle and state.
14
11
 
15
- ## Installation
12
+ ## Key features
16
13
 
17
- **Internal use only**
18
-
19
- To install the plugin, use yarn:
14
+ - **Start message** - Start an engagement message with a given ID and optional variation ID
15
+ - **Stop message** - Stop an engagement message with a given ID
16
+ - **Message state tracking** - Check the active state of engagement messages
17
+ - **Promise-based API** - Prevent duplicate requests with integrated promise management
18
+ - **Coordination client integration** - Works with the Engagement Platform coordination client
20
19
 
21
- ```sh
22
- yarn add @atlassian/editor-plugin-engagement-platform
23
- ```
20
+ ## Install
21
+ ---
22
+ - **Install** - *yarn add @atlaskit/editor-plugin-engagement-platform*
23
+ - **npm** - [@atlaskit/editor-plugin-engagement-platform](https://www.npmjs.com/package/@atlaskit/editor-plugin-engagement-platform)
24
+ - **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-engagement-platform)
25
+ - **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-engagement-platform/dist/)
24
26
 
25
27
  ## Usage
26
-
28
+ ---
27
29
  **Internal use only**
28
30
 
31
+ @atlaskit/editor-plugin-engagement-platform is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
32
+
33
+ Direct use of this component is not supported.
34
+
35
+ ### Basic setup
36
+
29
37
  To use the plugin, import it and include it in your editor setup:
30
38
 
31
39
  ```typescript
32
- import { engagementPlatformPlugin } from '@atlassian/editor-plugin-engagement-platform';
40
+ import { engagementPlatformPlugin } from '@atlaskit/editor-plugin-engagement-platform';
33
41
 
34
42
  const coordinationClient = useCoordinationClient()
35
43
 
@@ -41,6 +49,8 @@ const { preset, editorApi } = usePreset(() => {
41
49
  }, [universalPreset, coordinationClient]);
42
50
  ```
43
51
 
52
+ ### Checking message state
53
+
44
54
  To get the current state of an engagement message, you can use the following code:
45
55
 
46
56
  ```typescript
@@ -50,34 +60,34 @@ function isMessageActive(messageId: string): boolean {
50
60
  }
51
61
  ```
52
62
 
53
- Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/editor/editor-plugin-engagement-platform).
63
+ ### Plugin configuration
64
+
65
+ The plugin requires a configuration object with the following structure:
66
+
67
+ ```typescript
68
+ interface EngagementPlatformPluginOptions {
69
+ coordinationClient: CoordinationClientType;
70
+ }
71
+ ```
54
72
 
55
- ## API
73
+ ### API
56
74
 
57
- ### `api.engagementPlatform.actions.startMessage(messageId: string, variationId?: string): Promise<boolean>`
75
+ #### `api.engagementPlatform.actions.startMessage(messageId: string, variationId?: string): Promise<boolean>`
58
76
 
59
77
  Starts an engagement message with the given ID and optional variation ID.
60
78
 
61
- ### `api.engagementPlatform.actions.stopMessage(messageId: string): Promise<boolean>`
79
+ **Warning:** You must call `stopMessage` when your message has finished being displayed to a user. If you do not call `stopMessage`, your message will prevent the user from seeing any other messages until the Expiry time for the message is reached.
80
+
81
+ #### `api.engagementPlatform.actions.stopMessage(messageId: string): Promise<boolean>`
62
82
 
63
83
  Stops an engagement message with the given ID.
64
84
 
65
85
  Please see [Atlaskit - Editor Engagement Platform Plugin](https://atlaskit.atlassian.com/packages/editor/editor-plugin-engagement-platform) for documentation and examples for this package.
66
86
 
67
- ## Configuration
68
-
69
- The plugin requires a configuration object with the following structure:
70
-
71
- ```typescript
72
- interface EngagementPlatformPluginOptions {
73
- coordinationClient: CoordinationClientType;
74
- }
75
- ```
76
-
77
87
  ## Support
78
-
88
+ ---
79
89
  For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
80
90
 
81
91
  ## License
82
-
83
- Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#Platform-License) for more licensing information.
92
+ ---
93
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-engagement-platform",
3
- "version": "8.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Engagement platform plugin for @atlaskit/editor-core“",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,12 +29,12 @@
29
29
  "sideEffects": false,
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/editor-plugin-analytics": "^7.0.0",
33
- "@atlaskit/editor-prosemirror": "^7.2.0",
32
+ "@atlaskit/editor-plugin-analytics": "^8.0.0",
33
+ "@atlaskit/editor-prosemirror": "^7.3.0",
34
34
  "@babel/runtime": "^7.0.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@atlaskit/editor-common": "^111.0.0",
37
+ "@atlaskit/editor-common": "^112.2.0",
38
38
  "react": "^18.2.0",
39
39
  "react-dom": "^18.2.0"
40
40
  },