@atlaskit/editor-plugin-avatar-group 3.1.6 → 3.1.7
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 +10 -0
- package/dist/cjs/ui/avatars.js +4 -6
- package/dist/es2019/ui/avatars.js +5 -7
- package/dist/esm/ui/avatars.js +4 -6
- package/package.json +4 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-avatar-group
|
|
2
2
|
|
|
3
|
+
## 3.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#153340](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153340)
|
|
8
|
+
[`c498fc22dd152`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c498fc22dd152) -
|
|
9
|
+
[ux] EDITOR-702: Audit participants usage, remove platform_editor_avatars_sort_error_fix FG and
|
|
10
|
+
add safe type-correct handling by default
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 3.1.6
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/ui/avatars.js
CHANGED
|
@@ -10,7 +10,6 @@ var _react2 = require("@emotion/react");
|
|
|
10
10
|
var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
|
|
11
11
|
var _analytics2 = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _styles = require("./styles");
|
|
15
14
|
var _toAvatar = _interopRequireDefault(require("./to-avatar"));
|
|
16
15
|
/**
|
|
@@ -45,11 +44,10 @@ var Avatars = exports.Avatars = /*#__PURE__*/_react.default.memo(function (props
|
|
|
45
44
|
var sessionId = props.sessionId,
|
|
46
45
|
featureFlags = props.featureFlags,
|
|
47
46
|
editorAPI = props.editorAPI;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
47
|
+
// .slice() turns ReadonlyArray<CollabParticipant> into a mutable CollabParticipant[]
|
|
48
|
+
var participants = (_props$participants = props.participants) === null || _props$participants === void 0 || (_props$participants = _props$participants.toArray()) === null || _props$participants === void 0 ? void 0 : _props$participants.slice();
|
|
49
|
+
if (!participants) {
|
|
50
|
+
return null;
|
|
53
51
|
}
|
|
54
52
|
var avatars = participants.sort(function (p) {
|
|
55
53
|
return p.sessionId === sessionId ? -1 : 1;
|
|
@@ -10,7 +10,6 @@ import { jsx } from '@emotion/react';
|
|
|
10
10
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
11
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { avatarContainerStyles } from './styles';
|
|
15
14
|
import toAvatar from './to-avatar';
|
|
16
15
|
export const scrollToCollabCursor = (editorAPI, participants, sessionId, index, editorAnalyticsAPI) => {
|
|
@@ -35,17 +34,16 @@ export const scrollToCollabCursor = (editorAPI, participants, sessionId, index,
|
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
36
|
export const Avatars = /*#__PURE__*/React.memo(props => {
|
|
38
|
-
var _props$participants;
|
|
37
|
+
var _props$participants, _props$participants$t;
|
|
39
38
|
const {
|
|
40
39
|
sessionId,
|
|
41
40
|
featureFlags,
|
|
42
41
|
editorAPI
|
|
43
42
|
} = props;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
43
|
+
// .slice() turns ReadonlyArray<CollabParticipant> into a mutable CollabParticipant[]
|
|
44
|
+
const participants = (_props$participants = props.participants) === null || _props$participants === void 0 ? void 0 : (_props$participants$t = _props$participants.toArray()) === null || _props$participants$t === void 0 ? void 0 : _props$participants$t.slice();
|
|
45
|
+
if (!participants) {
|
|
46
|
+
return null;
|
|
49
47
|
}
|
|
50
48
|
const avatars = participants.sort(p => p.sessionId === sessionId ? -1 : 1).map(participant => toAvatar(participant, editorAPI));
|
|
51
49
|
if (!avatars.length) {
|
package/dist/esm/ui/avatars.js
CHANGED
|
@@ -10,7 +10,6 @@ import { jsx } from '@emotion/react';
|
|
|
10
10
|
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
11
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { avatarContainerStyles } from './styles';
|
|
15
14
|
import toAvatar from './to-avatar';
|
|
16
15
|
export var scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
|
|
@@ -38,11 +37,10 @@ export var Avatars = /*#__PURE__*/React.memo(function (props) {
|
|
|
38
37
|
var sessionId = props.sessionId,
|
|
39
38
|
featureFlags = props.featureFlags,
|
|
40
39
|
editorAPI = props.editorAPI;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
40
|
+
// .slice() turns ReadonlyArray<CollabParticipant> into a mutable CollabParticipant[]
|
|
41
|
+
var participants = (_props$participants = props.participants) === null || _props$participants === void 0 || (_props$participants = _props$participants.toArray()) === null || _props$participants === void 0 ? void 0 : _props$participants.slice();
|
|
42
|
+
if (!participants) {
|
|
43
|
+
return null;
|
|
46
44
|
}
|
|
47
45
|
var avatars = participants.sort(function (p) {
|
|
48
46
|
return p.sessionId === sessionId ? -1 : 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-avatar-group",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
4
4
|
"description": "Avatar Group plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/avatar-group": "^12.0.0",
|
|
40
|
-
"@atlaskit/editor-common": "^105.
|
|
41
|
-
"@atlaskit/editor-plugin-analytics": "^2.
|
|
40
|
+
"@atlaskit/editor-common": "^105.2.0",
|
|
41
|
+
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
42
42
|
"@atlaskit/editor-plugin-collab-edit": "^3.6.0",
|
|
43
43
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
44
44
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/icon": "^26.0.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/theme": "^18.0.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^4.21.0",
|
|
51
51
|
"@atlaskit/tokens": "^4.8.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|
|
@@ -100,10 +100,5 @@
|
|
|
100
100
|
"no-unused-dependencies": {
|
|
101
101
|
"checkDevDependencies": true
|
|
102
102
|
}
|
|
103
|
-
},
|
|
104
|
-
"platform-feature-flags": {
|
|
105
|
-
"platform_editor_avatars_sort_error_fix": {
|
|
106
|
-
"type": "boolean"
|
|
107
|
-
}
|
|
108
103
|
}
|
|
109
104
|
}
|