@atlaskit/editor-plugin-engagement-platform 4.0.0 → 5.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-engagement-platform
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
14
+ Sorted type and interface props to improve Atlaskit docs
15
+ - Updated dependencies
16
+
3
17
  ## 4.0.0
4
18
 
5
19
  ### Major Changes
@@ -27,8 +27,8 @@ export type EngagementPlatformPlugin = NextEditorPlugin<'engagementPlatform', {
27
27
  */
28
28
  stopMessage: (messageId: string) => Promise<boolean>;
29
29
  };
30
- pluginConfiguration: EngagementPlatformPluginOptions;
31
30
  dependencies: [OptionalPlugin<AnalyticsPlugin>];
31
+ pluginConfiguration: EngagementPlatformPluginOptions;
32
32
  sharedState: EngagementPlatformPluginState;
33
33
  }>;
34
34
  /**
@@ -42,8 +42,6 @@ export interface CoordinationClient {
42
42
  stop(messageId: string): Promise<boolean>;
43
43
  }
44
44
  export type EngagementPlatformPluginOptions = {
45
- epComponents: EpComponents;
46
- epHooks: EpHooks;
47
45
  /**
48
46
  * Engagement Platform API client.
49
47
  *
@@ -59,6 +57,8 @@ export type EngagementPlatformPluginOptions = {
59
57
  * The client lives in the `@atlassiansox/engagekit-ts` package.
60
58
  */
61
59
  coordinationClient: CoordinationClient;
60
+ epComponents: EpComponents;
61
+ epHooks: EpHooks;
62
62
  };
63
63
  /**
64
64
  * @private
@@ -67,17 +67,17 @@ export type EngagementPlatformPluginOptions = {
67
67
  */
68
68
  export type EngagementPlatformPluginConfig = EngagementPlatformPluginOptions;
69
69
  export type EpComponents = {
70
- EngagementSpotlight: ComponentType<{
71
- engagementId: string;
70
+ Coordination: ComponentType<{
71
+ children: JSX.Element;
72
+ client: CoordinationClient;
73
+ fallback: ReactNode;
74
+ messageId: string;
72
75
  }>;
73
76
  EngagementInlineDialog: ComponentType<PropsWithChildren<{
74
77
  engagementId: string;
75
78
  }>>;
76
- Coordination: ComponentType<{
77
- client: CoordinationClient;
78
- messageId: string;
79
- fallback: ReactNode;
80
- children: JSX.Element;
79
+ EngagementSpotlight: ComponentType<{
80
+ engagementId: string;
81
81
  }>;
82
82
  };
83
83
  export type EpHooks = {
@@ -1,5 +1,9 @@
1
1
  import type { CoordinationClient, EpComponents, EpHooks } from '../../engagementPlatformPluginType';
2
2
  export interface EngagementPlatformPmPluginState {
3
+ /** Engagement Platform coordination client */
4
+ coordinationClient: CoordinationClient;
5
+ epComponents: EpComponents;
6
+ epHooks: EpHooks;
3
7
  /**
4
8
  * State of Engagement Platform messages in the Editor.
5
9
  *
@@ -24,28 +28,24 @@ export interface EngagementPlatformPmPluginState {
24
28
  stopMessagePromises: {
25
29
  [messageId: string]: Promise<boolean>;
26
30
  };
27
- /** Engagement Platform coordination client */
28
- coordinationClient: CoordinationClient;
29
- epComponents: EpComponents;
30
- epHooks: EpHooks;
31
31
  }
32
32
  /** Command to EP plugin, that set state of a message with given ID. */
33
33
  export interface SetMessageStateCommand {
34
- type: 'setMessageState';
35
34
  messageId: string;
36
35
  state: boolean;
36
+ type: 'setMessageState';
37
37
  }
38
38
  /** Command to EP plugin, that set promise for starting a message with given ID. */
39
39
  export interface SetStartMessagePromiseCommand {
40
- type: 'setStartMessagePromise';
41
40
  messageId: string;
42
41
  promise: Promise<boolean> | undefined;
42
+ type: 'setStartMessagePromise';
43
43
  }
44
44
  /** Command to EP plugin, that set promise for stopping a message with given ID. */
45
45
  export interface SetStopMessagePromiseCommand {
46
- type: 'setStopMessagePromise';
47
46
  messageId: string;
48
47
  promise: Promise<boolean> | undefined;
48
+ type: 'setStopMessagePromise';
49
49
  }
50
50
  /** Commands that can be applied to the Engagement Platform plugin state. */
51
51
  export type EngagementPlatformPmPluginCommand = SetMessageStateCommand | SetStartMessagePromiseCommand | SetStopMessagePromiseCommand;
@@ -27,10 +27,10 @@ export type EngagementPlatformPlugin = NextEditorPlugin<'engagementPlatform', {
27
27
  */
28
28
  stopMessage: (messageId: string) => Promise<boolean>;
29
29
  };
30
- pluginConfiguration: EngagementPlatformPluginOptions;
31
30
  dependencies: [
32
31
  OptionalPlugin<AnalyticsPlugin>
33
32
  ];
33
+ pluginConfiguration: EngagementPlatformPluginOptions;
34
34
  sharedState: EngagementPlatformPluginState;
35
35
  }>;
36
36
  /**
@@ -44,8 +44,6 @@ export interface CoordinationClient {
44
44
  stop(messageId: string): Promise<boolean>;
45
45
  }
46
46
  export type EngagementPlatformPluginOptions = {
47
- epComponents: EpComponents;
48
- epHooks: EpHooks;
49
47
  /**
50
48
  * Engagement Platform API client.
51
49
  *
@@ -61,6 +59,8 @@ export type EngagementPlatformPluginOptions = {
61
59
  * The client lives in the `@atlassiansox/engagekit-ts` package.
62
60
  */
63
61
  coordinationClient: CoordinationClient;
62
+ epComponents: EpComponents;
63
+ epHooks: EpHooks;
64
64
  };
65
65
  /**
66
66
  * @private
@@ -69,17 +69,17 @@ export type EngagementPlatformPluginOptions = {
69
69
  */
70
70
  export type EngagementPlatformPluginConfig = EngagementPlatformPluginOptions;
71
71
  export type EpComponents = {
72
- EngagementSpotlight: ComponentType<{
73
- engagementId: string;
72
+ Coordination: ComponentType<{
73
+ children: JSX.Element;
74
+ client: CoordinationClient;
75
+ fallback: ReactNode;
76
+ messageId: string;
74
77
  }>;
75
78
  EngagementInlineDialog: ComponentType<PropsWithChildren<{
76
79
  engagementId: string;
77
80
  }>>;
78
- Coordination: ComponentType<{
79
- client: CoordinationClient;
80
- messageId: string;
81
- fallback: ReactNode;
82
- children: JSX.Element;
81
+ EngagementSpotlight: ComponentType<{
82
+ engagementId: string;
83
83
  }>;
84
84
  };
85
85
  export type EpHooks = {
@@ -1,5 +1,9 @@
1
1
  import type { CoordinationClient, EpComponents, EpHooks } from '../../engagementPlatformPluginType';
2
2
  export interface EngagementPlatformPmPluginState {
3
+ /** Engagement Platform coordination client */
4
+ coordinationClient: CoordinationClient;
5
+ epComponents: EpComponents;
6
+ epHooks: EpHooks;
3
7
  /**
4
8
  * State of Engagement Platform messages in the Editor.
5
9
  *
@@ -24,28 +28,24 @@ export interface EngagementPlatformPmPluginState {
24
28
  stopMessagePromises: {
25
29
  [messageId: string]: Promise<boolean>;
26
30
  };
27
- /** Engagement Platform coordination client */
28
- coordinationClient: CoordinationClient;
29
- epComponents: EpComponents;
30
- epHooks: EpHooks;
31
31
  }
32
32
  /** Command to EP plugin, that set state of a message with given ID. */
33
33
  export interface SetMessageStateCommand {
34
- type: 'setMessageState';
35
34
  messageId: string;
36
35
  state: boolean;
36
+ type: 'setMessageState';
37
37
  }
38
38
  /** Command to EP plugin, that set promise for starting a message with given ID. */
39
39
  export interface SetStartMessagePromiseCommand {
40
- type: 'setStartMessagePromise';
41
40
  messageId: string;
42
41
  promise: Promise<boolean> | undefined;
42
+ type: 'setStartMessagePromise';
43
43
  }
44
44
  /** Command to EP plugin, that set promise for stopping a message with given ID. */
45
45
  export interface SetStopMessagePromiseCommand {
46
- type: 'setStopMessagePromise';
47
46
  messageId: string;
48
47
  promise: Promise<boolean> | undefined;
48
+ type: 'setStopMessagePromise';
49
49
  }
50
50
  /** Commands that can be applied to the Engagement Platform plugin state. */
51
51
  export type EngagementPlatformPmPluginCommand = SetMessageStateCommand | SetStartMessagePromiseCommand | SetStopMessagePromiseCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-engagement-platform",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Engagement platform plugin for @atlaskit/editor-core“",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,16 +28,13 @@
28
28
  },
29
29
  "sideEffects": false,
30
30
  "atlaskit:src": "src/index.ts",
31
- "af:exports": {
32
- ".": "./src/index.ts"
33
- },
34
31
  "dependencies": {
35
- "@atlaskit/editor-plugin-analytics": "^3.0.0",
32
+ "@atlaskit/editor-plugin-analytics": "^4.0.0",
36
33
  "@atlaskit/editor-prosemirror": "7.0.0",
37
34
  "@babel/runtime": "^7.0.0"
38
35
  },
39
36
  "peerDependencies": {
40
- "@atlaskit/editor-common": "^107.6.0",
37
+ "@atlaskit/editor-common": "^108.0.0",
41
38
  "react": "^18.2.0",
42
39
  "react-dom": "^18.2.0"
43
40
  },