@atlaskit/editor-plugin-avatar-group 4.0.0 → 4.0.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-avatar-group
|
|
2
2
|
|
|
3
|
+
## 4.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#183109](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183109)
|
|
8
|
+
[`3fd4ff5c71ef7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3fd4ff5c71ef7) -
|
|
9
|
+
Migrate to useSharedPluginStateWithSelector
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
|
@@ -9,14 +9,21 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
11
|
var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
|
|
12
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _avatars = require("./avatars");
|
|
15
14
|
var _inviteToEdit = require("./invite-to-edit");
|
|
16
15
|
var useAvatarsWithPluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['collabEdit'], function (states) {
|
|
17
|
+
var _states$collabEditSta, _states$collabEditSta2, _states$collabEditSta3;
|
|
18
|
+
return {
|
|
19
|
+
sessionId: (_states$collabEditSta = states.collabEditState) === null || _states$collabEditSta === void 0 ? void 0 : _states$collabEditSta.sessionId,
|
|
20
|
+
activeParticipants: (_states$collabEditSta2 = states.collabEditState) === null || _states$collabEditSta2 === void 0 ? void 0 : _states$collabEditSta2.activeParticipants,
|
|
21
|
+
initialised: (_states$collabEditSta3 = states.collabEditState) === null || _states$collabEditSta3 === void 0 ? void 0 : _states$collabEditSta3.initialised
|
|
22
|
+
};
|
|
23
|
+
}),
|
|
24
|
+
sessionId = _useSharedPluginState.sessionId,
|
|
25
|
+
activeParticipants = _useSharedPluginState.activeParticipants,
|
|
26
|
+
initialised = _useSharedPluginState.initialised;
|
|
20
27
|
return {
|
|
21
28
|
sessionId: sessionId,
|
|
22
29
|
activeParticipants: activeParticipants,
|
|
@@ -24,8 +31,8 @@ var useAvatarsWithPluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)
|
|
|
24
31
|
collabEditState: undefined
|
|
25
32
|
};
|
|
26
33
|
}, function (api) {
|
|
27
|
-
var
|
|
28
|
-
collabEditState =
|
|
34
|
+
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['collabEdit']),
|
|
35
|
+
collabEditState = _useSharedPluginState2.collabEditState;
|
|
29
36
|
return {
|
|
30
37
|
activeParticipants: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.activeParticipants,
|
|
31
38
|
sessionId: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.sessionId,
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import messages from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { Avatars } from './avatars';
|
|
8
7
|
import { InviteToEditButton } from './invite-to-edit';
|
|
9
8
|
const useAvatarsWithPluginState = sharedPluginStateHookMigratorFactory(api => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const {
|
|
10
|
+
sessionId,
|
|
11
|
+
activeParticipants,
|
|
12
|
+
initialised
|
|
13
|
+
} = useSharedPluginStateWithSelector(api, ['collabEdit'], states => {
|
|
14
|
+
var _states$collabEditSta, _states$collabEditSta2, _states$collabEditSta3;
|
|
15
|
+
return {
|
|
16
|
+
sessionId: (_states$collabEditSta = states.collabEditState) === null || _states$collabEditSta === void 0 ? void 0 : _states$collabEditSta.sessionId,
|
|
17
|
+
activeParticipants: (_states$collabEditSta2 = states.collabEditState) === null || _states$collabEditSta2 === void 0 ? void 0 : _states$collabEditSta2.activeParticipants,
|
|
18
|
+
initialised: (_states$collabEditSta3 = states.collabEditState) === null || _states$collabEditSta3 === void 0 ? void 0 : _states$collabEditSta3.initialised
|
|
19
|
+
};
|
|
20
|
+
});
|
|
13
21
|
return {
|
|
14
22
|
sessionId,
|
|
15
23
|
activeParticipants,
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import messages from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { Avatars } from './avatars';
|
|
8
7
|
import { InviteToEditButton } from './invite-to-edit';
|
|
9
8
|
var useAvatarsWithPluginState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['collabEdit'], function (states) {
|
|
10
|
+
var _states$collabEditSta, _states$collabEditSta2, _states$collabEditSta3;
|
|
11
|
+
return {
|
|
12
|
+
sessionId: (_states$collabEditSta = states.collabEditState) === null || _states$collabEditSta === void 0 ? void 0 : _states$collabEditSta.sessionId,
|
|
13
|
+
activeParticipants: (_states$collabEditSta2 = states.collabEditState) === null || _states$collabEditSta2 === void 0 ? void 0 : _states$collabEditSta2.activeParticipants,
|
|
14
|
+
initialised: (_states$collabEditSta3 = states.collabEditState) === null || _states$collabEditSta3 === void 0 ? void 0 : _states$collabEditSta3.initialised
|
|
15
|
+
};
|
|
16
|
+
}),
|
|
17
|
+
sessionId = _useSharedPluginState.sessionId,
|
|
18
|
+
activeParticipants = _useSharedPluginState.activeParticipants,
|
|
19
|
+
initialised = _useSharedPluginState.initialised;
|
|
13
20
|
return {
|
|
14
21
|
sessionId: sessionId,
|
|
15
22
|
activeParticipants: activeParticipants,
|
|
@@ -17,8 +24,8 @@ var useAvatarsWithPluginState = sharedPluginStateHookMigratorFactory(function (a
|
|
|
17
24
|
collabEditState: undefined
|
|
18
25
|
};
|
|
19
26
|
}, function (api) {
|
|
20
|
-
var
|
|
21
|
-
collabEditState =
|
|
27
|
+
var _useSharedPluginState2 = useSharedPluginState(api, ['collabEdit']),
|
|
28
|
+
collabEditState = _useSharedPluginState2.collabEditState;
|
|
22
29
|
return {
|
|
23
30
|
activeParticipants: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.activeParticipants,
|
|
24
31
|
sessionId: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.sessionId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-avatar-group",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Avatar Group plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-primary-toolbar": "^4.0.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
44
44
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
45
|
-
"@atlaskit/icon": "^27.
|
|
45
|
+
"@atlaskit/icon": "^27.3.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/theme": "^18.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^9.1.0",
|
|
49
49
|
"@atlaskit/tokens": "^5.4.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^107.
|
|
56
|
+
"@atlaskit/editor-common": "^107.7.0",
|
|
57
57
|
"react": "^18.2.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|