@atlaskit/emoji 70.10.6 → 70.10.8
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 +14 -0
- package/dist/cjs/components/common/AddEmoji.js +9 -1
- package/dist/cjs/components/common/EmojiActions.js +8 -1
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/common/AddEmoji.js +10 -2
- package/dist/es2019/components/common/EmojiActions.js +8 -1
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/common/AddEmoji.js +10 -2
- package/dist/esm/components/common/EmojiActions.js +8 -1
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 70.10.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`13de78223addf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13de78223addf) -
|
|
8
|
+
Add a feature-gated fix to keep the emoji picker open when opening custom emoji upload from picker
|
|
9
|
+
actions.
|
|
10
|
+
|
|
11
|
+
## 70.10.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 70.10.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ require("./AddEmoji.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _reactIntl = require("react-intl");
|
|
15
16
|
var _i18n = require("../i18n");
|
|
16
17
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
@@ -24,12 +25,19 @@ var addCustomEmoji = null;
|
|
|
24
25
|
var AddOwnEmoji = exports.AddOwnEmoji = function AddOwnEmoji(props) {
|
|
25
26
|
var onOpenUpload = props.onOpenUpload,
|
|
26
27
|
uploadEnabled = props.uploadEnabled;
|
|
28
|
+
var handleOpenUpload = (0, _react.useCallback)(function (event) {
|
|
29
|
+
if ((0, _platformFeatureFlags.fg)('platform_emoji_keep_picker_open_on_upload')) {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
}
|
|
33
|
+
onOpenUpload();
|
|
34
|
+
}, [onOpenUpload]);
|
|
27
35
|
return /*#__PURE__*/React.createElement(_react.Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
28
36
|
"data-testid": uploadEmojiTestId,
|
|
29
37
|
className: (0, _runtime.ax)(["_1wpz1h6o _19pkutpp _2hwxutpp _otyrutpp _18u0utpp"])
|
|
30
38
|
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _i18n.messages.addEmojiLabel, function (label) {
|
|
31
39
|
return /*#__PURE__*/React.createElement(_new.default, {
|
|
32
|
-
onClick:
|
|
40
|
+
onClick: handleOpenUpload,
|
|
33
41
|
tabIndex: 0,
|
|
34
42
|
id: "add-custom-emoji"
|
|
35
43
|
}, label);
|
|
@@ -45,12 +45,19 @@ var uploadEmojiTestId = exports.uploadEmojiTestId = 'upload-emoji';
|
|
|
45
45
|
var AddOwnEmoji = exports.AddOwnEmoji = function AddOwnEmoji(props) {
|
|
46
46
|
var onOpenUpload = props.onOpenUpload,
|
|
47
47
|
uploadEnabled = props.uploadEnabled;
|
|
48
|
+
var handleOpenUpload = (0, _react.useCallback)(function (event) {
|
|
49
|
+
if ((0, _platformFeatureFlags.fg)('platform_emoji_keep_picker_open_on_upload')) {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
event.stopPropagation();
|
|
52
|
+
}
|
|
53
|
+
onOpenUpload();
|
|
54
|
+
}, [onOpenUpload]);
|
|
48
55
|
return /*#__PURE__*/React.createElement(_react.Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
49
56
|
"data-testid": uploadEmojiTestId,
|
|
50
57
|
className: (0, _runtime.ax)(["_1wpz1h6o _18u019bv _otyr19bv"])
|
|
51
58
|
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _i18n.messages.addCustomEmojiLabel, function (label) {
|
|
52
59
|
return /*#__PURE__*/React.createElement(_standardButton.default, {
|
|
53
|
-
onClick:
|
|
60
|
+
onClick: handleOpenUpload,
|
|
54
61
|
iconBefore: /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
55
62
|
xcss: styles.icon
|
|
56
63
|
}, /*#__PURE__*/React.createElement(_add.default, {
|
|
@@ -20,7 +20,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
20
20
|
actionSubjectId: actionSubjectId,
|
|
21
21
|
attributes: _objectSpread({
|
|
22
22
|
packageName: "@atlaskit/emoji",
|
|
23
|
-
packageVersion: "70.10.
|
|
23
|
+
packageVersion: "70.10.7"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import "./AddEmoji.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { Fragment } from 'react';
|
|
5
|
+
import { Fragment, useCallback } from 'react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { FormattedMessage } from 'react-intl';
|
|
7
8
|
import { messages } from '../i18n';
|
|
8
9
|
import Button from '@atlaskit/button/new';
|
|
@@ -17,11 +18,18 @@ export const AddOwnEmoji = props => {
|
|
|
17
18
|
onOpenUpload,
|
|
18
19
|
uploadEnabled
|
|
19
20
|
} = props;
|
|
21
|
+
const handleOpenUpload = useCallback(event => {
|
|
22
|
+
if (fg('platform_emoji_keep_picker_open_on_upload')) {
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
}
|
|
26
|
+
onOpenUpload();
|
|
27
|
+
}, [onOpenUpload]);
|
|
20
28
|
return /*#__PURE__*/React.createElement(Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
21
29
|
"data-testid": uploadEmojiTestId,
|
|
22
30
|
className: ax(["_1wpz1h6o _19pkutpp _2hwxutpp _otyrutpp _18u0utpp"])
|
|
23
31
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.addEmojiLabel, label => /*#__PURE__*/React.createElement(Button, {
|
|
24
|
-
onClick:
|
|
32
|
+
onClick: handleOpenUpload,
|
|
25
33
|
tabIndex: 0,
|
|
26
34
|
id: "add-custom-emoji"
|
|
27
35
|
}, label))));
|
|
@@ -37,11 +37,18 @@ export const AddOwnEmoji = props => {
|
|
|
37
37
|
onOpenUpload,
|
|
38
38
|
uploadEnabled
|
|
39
39
|
} = props;
|
|
40
|
+
const handleOpenUpload = useCallback(event => {
|
|
41
|
+
if (fg('platform_emoji_keep_picker_open_on_upload')) {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
}
|
|
45
|
+
onOpenUpload();
|
|
46
|
+
}, [onOpenUpload]);
|
|
40
47
|
return /*#__PURE__*/React.createElement(Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
41
48
|
"data-testid": uploadEmojiTestId,
|
|
42
49
|
className: ax(["_1wpz1h6o _18u019bv _otyr19bv"])
|
|
43
50
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel, label => /*#__PURE__*/React.createElement(AkButton, {
|
|
44
|
-
onClick:
|
|
51
|
+
onClick: handleOpenUpload,
|
|
45
52
|
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
46
53
|
xcss: styles.icon
|
|
47
54
|
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import "./AddEmoji.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { Fragment } from 'react';
|
|
5
|
+
import { Fragment, useCallback } from 'react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { FormattedMessage } from 'react-intl';
|
|
7
8
|
import { messages } from '../i18n';
|
|
8
9
|
import Button from '@atlaskit/button/new';
|
|
@@ -15,12 +16,19 @@ var addCustomEmoji = null;
|
|
|
15
16
|
export var AddOwnEmoji = function AddOwnEmoji(props) {
|
|
16
17
|
var onOpenUpload = props.onOpenUpload,
|
|
17
18
|
uploadEnabled = props.uploadEnabled;
|
|
19
|
+
var handleOpenUpload = useCallback(function (event) {
|
|
20
|
+
if (fg('platform_emoji_keep_picker_open_on_upload')) {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
}
|
|
24
|
+
onOpenUpload();
|
|
25
|
+
}, [onOpenUpload]);
|
|
18
26
|
return /*#__PURE__*/React.createElement(Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
19
27
|
"data-testid": uploadEmojiTestId,
|
|
20
28
|
className: ax(["_1wpz1h6o _19pkutpp _2hwxutpp _otyrutpp _18u0utpp"])
|
|
21
29
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.addEmojiLabel, function (label) {
|
|
22
30
|
return /*#__PURE__*/React.createElement(Button, {
|
|
23
|
-
onClick:
|
|
31
|
+
onClick: handleOpenUpload,
|
|
24
32
|
tabIndex: 0,
|
|
25
33
|
id: "add-custom-emoji"
|
|
26
34
|
}, label);
|
|
@@ -36,12 +36,19 @@ export var uploadEmojiTestId = 'upload-emoji';
|
|
|
36
36
|
export var AddOwnEmoji = function AddOwnEmoji(props) {
|
|
37
37
|
var onOpenUpload = props.onOpenUpload,
|
|
38
38
|
uploadEnabled = props.uploadEnabled;
|
|
39
|
+
var handleOpenUpload = useCallback(function (event) {
|
|
40
|
+
if (fg('platform_emoji_keep_picker_open_on_upload')) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
}
|
|
44
|
+
onOpenUpload();
|
|
45
|
+
}, [onOpenUpload]);
|
|
39
46
|
return /*#__PURE__*/React.createElement(Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
40
47
|
"data-testid": uploadEmojiTestId,
|
|
41
48
|
className: ax(["_1wpz1h6o _18u019bv _otyr19bv"])
|
|
42
49
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel, function (label) {
|
|
43
50
|
return /*#__PURE__*/React.createElement(AkButton, {
|
|
44
|
-
onClick:
|
|
51
|
+
onClick: handleOpenUpload,
|
|
45
52
|
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
46
53
|
xcss: styles.icon
|
|
47
54
|
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
14
14
|
actionSubjectId: actionSubjectId,
|
|
15
15
|
attributes: _objectSpread({
|
|
16
16
|
packageName: "@atlaskit/emoji",
|
|
17
|
-
packageVersion: "70.10.
|
|
17
|
+
packageVersion: "70.10.7"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "70.10.
|
|
3
|
+
"version": "70.10.8",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/css": "^0.19.0",
|
|
45
45
|
"@atlaskit/form": "^15.5.0",
|
|
46
46
|
"@atlaskit/heading": "^5.4.0",
|
|
47
|
-
"@atlaskit/icon": "^35.
|
|
47
|
+
"@atlaskit/icon": "^35.1.0",
|
|
48
48
|
"@atlaskit/media-client": "^36.3.0",
|
|
49
49
|
"@atlaskit/media-client-react": "^5.1.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/primitives": "^19.0.0",
|
|
53
53
|
"@atlaskit/spinner": "^19.1.0",
|
|
54
54
|
"@atlaskit/textfield": "^8.3.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^83.0.0",
|
|
56
56
|
"@atlaskit/tokens": "^13.0.0",
|
|
57
57
|
"@atlaskit/tooltip": "^22.3.0",
|
|
58
58
|
"@atlaskit/ufo": "^0.5.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@atlaskit/elements-test-helpers": "workspace:^",
|
|
81
81
|
"@atlaskit/media-core": "^37.1.0",
|
|
82
82
|
"@atlaskit/ssr": "workspace:^",
|
|
83
|
-
"@atlaskit/theme": "^
|
|
83
|
+
"@atlaskit/theme": "^25.0.0",
|
|
84
84
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
85
85
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
86
86
|
"@emotion/jest": "^11.8.0",
|
|
@@ -147,6 +147,9 @@
|
|
|
147
147
|
"platform_emoji_picker_refresh": {
|
|
148
148
|
"type": "boolean"
|
|
149
149
|
},
|
|
150
|
+
"platform_emoji_keep_picker_open_on_upload": {
|
|
151
|
+
"type": "boolean"
|
|
152
|
+
},
|
|
150
153
|
"use-elements-stargate-emoji-path": {
|
|
151
154
|
"type": "boolean"
|
|
152
155
|
},
|