@atlaskit/editor-plugin-avatar-group 4.1.8 → 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-avatar-group
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.1.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`aee77103aa32b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aee77103aa32b) -
|
|
14
|
+
Cleanup platform_editor_usesharedpluginstateselector
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.1.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,11 +9,18 @@ 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 _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _avatars = require("./avatars");
|
|
14
13
|
var _inviteToEdit = require("./invite-to-edit");
|
|
15
|
-
var
|
|
16
|
-
var
|
|
14
|
+
var AvatarsWithPluginState = function AvatarsWithPluginState(props) {
|
|
15
|
+
var title = props.intl.formatMessage(_messages.default.inviteToEditButtonTitle);
|
|
16
|
+
var selected = props.isInviteToEditButtonSelected,
|
|
17
|
+
onClick = props.inviteToEditHandler,
|
|
18
|
+
Component = props.inviteToEditComponent,
|
|
19
|
+
editorView = props.editorView,
|
|
20
|
+
featureFlags = props.featureFlags,
|
|
21
|
+
editorAnalyticsAPI = props.editorAnalyticsAPI,
|
|
22
|
+
editorAPI = props.editorAPI;
|
|
23
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['collabEdit'], function (states) {
|
|
17
24
|
var _states$collabEditSta, _states$collabEditSta2, _states$collabEditSta3;
|
|
18
25
|
return {
|
|
19
26
|
sessionId: (_states$collabEditSta = states.collabEditState) === null || _states$collabEditSta === void 0 ? void 0 : _states$collabEditSta.sessionId,
|
|
@@ -24,40 +31,7 @@ var useAvatarsWithPluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)
|
|
|
24
31
|
sessionId = _useSharedPluginState.sessionId,
|
|
25
32
|
activeParticipants = _useSharedPluginState.activeParticipants,
|
|
26
33
|
initialised = _useSharedPluginState.initialised;
|
|
27
|
-
|
|
28
|
-
sessionId: sessionId,
|
|
29
|
-
activeParticipants: activeParticipants,
|
|
30
|
-
isInitialised: !!initialised,
|
|
31
|
-
collabEditState: undefined
|
|
32
|
-
};
|
|
33
|
-
}, function (api) {
|
|
34
|
-
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(api, ['collabEdit']),
|
|
35
|
-
collabEditState = _useSharedPluginState2.collabEditState;
|
|
36
|
-
return {
|
|
37
|
-
activeParticipants: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.activeParticipants,
|
|
38
|
-
sessionId: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.sessionId,
|
|
39
|
-
isInitialised: !!(collabEditState !== null && collabEditState !== void 0 && collabEditState.initialised),
|
|
40
|
-
collabEditState: collabEditState
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
var AvatarsWithPluginState = function AvatarsWithPluginState(props) {
|
|
44
|
-
var title = props.intl.formatMessage(_messages.default.inviteToEditButtonTitle);
|
|
45
|
-
var selected = props.isInviteToEditButtonSelected,
|
|
46
|
-
onClick = props.inviteToEditHandler,
|
|
47
|
-
Component = props.inviteToEditComponent,
|
|
48
|
-
editorView = props.editorView,
|
|
49
|
-
featureFlags = props.featureFlags,
|
|
50
|
-
editorAnalyticsAPI = props.editorAnalyticsAPI,
|
|
51
|
-
editorAPI = props.editorAPI;
|
|
52
|
-
var _useAvatarsWithPlugin = useAvatarsWithPluginState(editorAPI),
|
|
53
|
-
sessionId = _useAvatarsWithPlugin.sessionId,
|
|
54
|
-
activeParticipants = _useAvatarsWithPlugin.activeParticipants,
|
|
55
|
-
isInitialised = _useAvatarsWithPlugin.isInitialised,
|
|
56
|
-
collabEditState = _useAvatarsWithPlugin.collabEditState;
|
|
57
|
-
if (!collabEditState && (0, _expValEquals.expValEquals)('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
if (!isInitialised && (0, _expValEquals.expValEquals)('platform_editor_usesharedpluginstatewithselector', 'isEnabled', true)) {
|
|
34
|
+
if (!initialised) {
|
|
61
35
|
return null;
|
|
62
36
|
}
|
|
63
37
|
return /*#__PURE__*/_react.default.createElement(_avatars.Avatars, {
|
|
@@ -1,40 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import {
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import messages from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { Avatars } from './avatars';
|
|
7
6
|
import { InviteToEditButton } from './invite-to-edit';
|
|
8
|
-
const useAvatarsWithPluginState = sharedPluginStateHookMigratorFactory(api => {
|
|
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
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
sessionId,
|
|
23
|
-
activeParticipants,
|
|
24
|
-
isInitialised: !!initialised,
|
|
25
|
-
collabEditState: undefined
|
|
26
|
-
};
|
|
27
|
-
}, api => {
|
|
28
|
-
const {
|
|
29
|
-
collabEditState
|
|
30
|
-
} = useSharedPluginState(api, ['collabEdit']);
|
|
31
|
-
return {
|
|
32
|
-
activeParticipants: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.activeParticipants,
|
|
33
|
-
sessionId: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.sessionId,
|
|
34
|
-
isInitialised: !!(collabEditState !== null && collabEditState !== void 0 && collabEditState.initialised),
|
|
35
|
-
collabEditState
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
7
|
const AvatarsWithPluginState = props => {
|
|
39
8
|
const title = props.intl.formatMessage(messages.inviteToEditButtonTitle);
|
|
40
9
|
const {
|
|
@@ -49,13 +18,16 @@ const AvatarsWithPluginState = props => {
|
|
|
49
18
|
const {
|
|
50
19
|
sessionId,
|
|
51
20
|
activeParticipants,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
21
|
+
initialised
|
|
22
|
+
} = useSharedPluginStateWithSelector(editorAPI, ['collabEdit'], states => {
|
|
23
|
+
var _states$collabEditSta, _states$collabEditSta2, _states$collabEditSta3;
|
|
24
|
+
return {
|
|
25
|
+
sessionId: (_states$collabEditSta = states.collabEditState) === null || _states$collabEditSta === void 0 ? void 0 : _states$collabEditSta.sessionId,
|
|
26
|
+
activeParticipants: (_states$collabEditSta2 = states.collabEditState) === null || _states$collabEditSta2 === void 0 ? void 0 : _states$collabEditSta2.activeParticipants,
|
|
27
|
+
initialised: (_states$collabEditSta3 = states.collabEditState) === null || _states$collabEditSta3 === void 0 ? void 0 : _states$collabEditSta3.initialised
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
if (!initialised) {
|
|
59
31
|
return null;
|
|
60
32
|
}
|
|
61
33
|
return /*#__PURE__*/React.createElement(Avatars, {
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
|
-
import {
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
4
4
|
import messages from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { Avatars } from './avatars';
|
|
7
6
|
import { InviteToEditButton } from './invite-to-edit';
|
|
8
|
-
var
|
|
9
|
-
var
|
|
7
|
+
var AvatarsWithPluginState = function AvatarsWithPluginState(props) {
|
|
8
|
+
var title = props.intl.formatMessage(messages.inviteToEditButtonTitle);
|
|
9
|
+
var selected = props.isInviteToEditButtonSelected,
|
|
10
|
+
onClick = props.inviteToEditHandler,
|
|
11
|
+
Component = props.inviteToEditComponent,
|
|
12
|
+
editorView = props.editorView,
|
|
13
|
+
featureFlags = props.featureFlags,
|
|
14
|
+
editorAnalyticsAPI = props.editorAnalyticsAPI,
|
|
15
|
+
editorAPI = props.editorAPI;
|
|
16
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(editorAPI, ['collabEdit'], function (states) {
|
|
10
17
|
var _states$collabEditSta, _states$collabEditSta2, _states$collabEditSta3;
|
|
11
18
|
return {
|
|
12
19
|
sessionId: (_states$collabEditSta = states.collabEditState) === null || _states$collabEditSta === void 0 ? void 0 : _states$collabEditSta.sessionId,
|
|
@@ -17,40 +24,7 @@ var useAvatarsWithPluginState = sharedPluginStateHookMigratorFactory(function (a
|
|
|
17
24
|
sessionId = _useSharedPluginState.sessionId,
|
|
18
25
|
activeParticipants = _useSharedPluginState.activeParticipants,
|
|
19
26
|
initialised = _useSharedPluginState.initialised;
|
|
20
|
-
|
|
21
|
-
sessionId: sessionId,
|
|
22
|
-
activeParticipants: activeParticipants,
|
|
23
|
-
isInitialised: !!initialised,
|
|
24
|
-
collabEditState: undefined
|
|
25
|
-
};
|
|
26
|
-
}, function (api) {
|
|
27
|
-
var _useSharedPluginState2 = useSharedPluginState(api, ['collabEdit']),
|
|
28
|
-
collabEditState = _useSharedPluginState2.collabEditState;
|
|
29
|
-
return {
|
|
30
|
-
activeParticipants: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.activeParticipants,
|
|
31
|
-
sessionId: collabEditState === null || collabEditState === void 0 ? void 0 : collabEditState.sessionId,
|
|
32
|
-
isInitialised: !!(collabEditState !== null && collabEditState !== void 0 && collabEditState.initialised),
|
|
33
|
-
collabEditState: collabEditState
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
var AvatarsWithPluginState = function AvatarsWithPluginState(props) {
|
|
37
|
-
var title = props.intl.formatMessage(messages.inviteToEditButtonTitle);
|
|
38
|
-
var selected = props.isInviteToEditButtonSelected,
|
|
39
|
-
onClick = props.inviteToEditHandler,
|
|
40
|
-
Component = props.inviteToEditComponent,
|
|
41
|
-
editorView = props.editorView,
|
|
42
|
-
featureFlags = props.featureFlags,
|
|
43
|
-
editorAnalyticsAPI = props.editorAnalyticsAPI,
|
|
44
|
-
editorAPI = props.editorAPI;
|
|
45
|
-
var _useAvatarsWithPlugin = useAvatarsWithPluginState(editorAPI),
|
|
46
|
-
sessionId = _useAvatarsWithPlugin.sessionId,
|
|
47
|
-
activeParticipants = _useAvatarsWithPlugin.activeParticipants,
|
|
48
|
-
isInitialised = _useAvatarsWithPlugin.isInitialised,
|
|
49
|
-
collabEditState = _useAvatarsWithPlugin.collabEditState;
|
|
50
|
-
if (!collabEditState && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', false)) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
if (!isInitialised && expValEquals('platform_editor_usesharedpluginstatewithselector', 'isEnabled', true)) {
|
|
27
|
+
if (!initialised) {
|
|
54
28
|
return null;
|
|
55
29
|
}
|
|
56
30
|
return /*#__PURE__*/React.createElement(Avatars, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-avatar-group",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Avatar Group plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,21 +31,18 @@
|
|
|
31
31
|
"*.compiled.css"
|
|
32
32
|
],
|
|
33
33
|
"atlaskit:src": "src/index.ts",
|
|
34
|
-
"af:exports": {
|
|
35
|
-
".": "./src/index.ts"
|
|
36
|
-
},
|
|
37
34
|
"dependencies": {
|
|
38
35
|
"@atlaskit/avatar-group": "^12.2.0",
|
|
39
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
40
|
-
"@atlaskit/editor-plugin-collab-edit": "^
|
|
41
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
42
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^4.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-collab-edit": "^5.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-feature-flags": "^3.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^5.0.0",
|
|
43
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
44
41
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
45
42
|
"@atlaskit/icon": "^28.1.0",
|
|
46
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
44
|
"@atlaskit/theme": "^20.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^12.0.0",
|
|
49
46
|
"@atlaskit/tokens": "^6.1.0",
|
|
50
47
|
"@babel/runtime": "^7.0.0",
|
|
51
48
|
"@emotion/react": "^11.7.1",
|
|
@@ -53,7 +50,7 @@
|
|
|
53
50
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
54
51
|
},
|
|
55
52
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^
|
|
53
|
+
"@atlaskit/editor-common": "^108.0.0",
|
|
57
54
|
"react": "^18.2.0"
|
|
58
55
|
},
|
|
59
56
|
"techstack": {
|