@atlaskit/editor-plugin-status 8.1.18 → 8.1.20
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/ui/statusPicker.js +10 -6
- package/dist/es2019/ui/statusPicker.js +10 -6
- package/dist/esm/ui/statusPicker.js +10 -6
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-status
|
|
2
2
|
|
|
3
|
+
## 8.1.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d2f1426fe5b85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2f1426fe5b85) -
|
|
8
|
+
[ux] ENGHEALTH-46817 Add feature gated a11y eslint fixes across editor packages
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 8.1.19
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 8.1.18
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
18
|
+
var _browserApis = require("@atlaskit/browser-apis");
|
|
18
19
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
20
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
21
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
@@ -23,6 +24,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
23
24
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
25
|
var _picker = require("@atlaskit/status/picker");
|
|
25
26
|
var _colors = require("@atlaskit/theme/colors");
|
|
27
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
26
28
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
27
29
|
var _actions = require("../pm-plugins/actions");
|
|
28
30
|
var _analytics = require("./analytics");
|
|
@@ -79,12 +81,13 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
79
81
|
_this.props.onEnter(_this.state);
|
|
80
82
|
});
|
|
81
83
|
(0, _defineProperty2.default)(_this, "handleTabPress", function (event) {
|
|
84
|
+
var _getDocument, _document;
|
|
82
85
|
var colorButtons = event.currentTarget.querySelectorAll('button');
|
|
83
86
|
var inputField = event.currentTarget.querySelector('input');
|
|
84
|
-
var
|
|
87
|
+
var activeElement = (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? (_getDocument = (0, _browserApis.getDocument)()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement : (_document = document) === null || _document === void 0 ? void 0 : _document.activeElement;
|
|
88
|
+
var isInputFocussed = activeElement === inputField;
|
|
85
89
|
var isButtonFocussed = Array.from(colorButtons).some(function (buttonElement) {
|
|
86
|
-
|
|
87
|
-
return ((_document = document) === null || _document === void 0 ? void 0 : _document.activeElement) === buttonElement;
|
|
90
|
+
return activeElement === buttonElement;
|
|
88
91
|
});
|
|
89
92
|
if (event !== null && event !== void 0 && event.shiftKey) {
|
|
90
93
|
/* shift + tab */
|
|
@@ -108,8 +111,9 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
108
111
|
}
|
|
109
112
|
});
|
|
110
113
|
(0, _defineProperty2.default)(_this, "handleArrow", function (event, closingMethod) {
|
|
111
|
-
var _document2;
|
|
112
|
-
|
|
114
|
+
var _getDocument2, _document2;
|
|
115
|
+
var activeElement = (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? (_getDocument2 = (0, _browserApis.getDocument)()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.activeElement : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.activeElement;
|
|
116
|
+
if (activeElement === _this.popupBodyWrapper.current) {
|
|
113
117
|
var _this$popupBodyWrappe;
|
|
114
118
|
event.preventDefault();
|
|
115
119
|
(_this$popupBodyWrappe = _this.popupBodyWrapper) === null || _this$popupBodyWrappe === void 0 || (_this$popupBodyWrappe = _this$popupBodyWrappe.current) === null || _this$popupBodyWrappe === void 0 || _this$popupBodyWrappe.blur();
|
|
@@ -302,7 +306,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
302
306
|
userIntent: "statusPickerOpen"
|
|
303
307
|
}, (0, _react2.jsx)("div", {
|
|
304
308
|
css: pickerContainerStyles,
|
|
305
|
-
|
|
309
|
+
role: "none",
|
|
306
310
|
ref: this.setRef(setOutsideClickTargetRef),
|
|
307
311
|
onClick: this.handlePopupClick,
|
|
308
312
|
onKeyDown: this.onKeyDown
|
|
@@ -10,6 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
13
|
+
import { getDocument } from '@atlaskit/browser-apis';
|
|
13
14
|
import { statusMessages as messages } from '@atlaskit/editor-common/messages';
|
|
14
15
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
15
16
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
@@ -18,6 +19,7 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
18
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
20
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
20
21
|
import { N0 } from '@atlaskit/theme/colors';
|
|
22
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
23
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
22
24
|
import { DEFAULT_STATUS } from '../pm-plugins/actions';
|
|
23
25
|
import { analyticsState, createStatusAnalyticsAndFire } from './analytics';
|
|
@@ -67,12 +69,13 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
67
69
|
this.props.onEnter(this.state);
|
|
68
70
|
});
|
|
69
71
|
_defineProperty(this, "handleTabPress", event => {
|
|
72
|
+
var _getDocument, _document;
|
|
70
73
|
const colorButtons = event.currentTarget.querySelectorAll('button');
|
|
71
74
|
const inputField = event.currentTarget.querySelector('input');
|
|
72
|
-
const
|
|
75
|
+
const activeElement = expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement : (_document = document) === null || _document === void 0 ? void 0 : _document.activeElement;
|
|
76
|
+
const isInputFocussed = activeElement === inputField;
|
|
73
77
|
const isButtonFocussed = Array.from(colorButtons).some(buttonElement => {
|
|
74
|
-
|
|
75
|
-
return ((_document = document) === null || _document === void 0 ? void 0 : _document.activeElement) === buttonElement;
|
|
78
|
+
return activeElement === buttonElement;
|
|
76
79
|
});
|
|
77
80
|
if (event !== null && event !== void 0 && event.shiftKey) {
|
|
78
81
|
/* shift + tab */
|
|
@@ -96,8 +99,9 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
96
99
|
}
|
|
97
100
|
});
|
|
98
101
|
_defineProperty(this, "handleArrow", (event, closingMethod) => {
|
|
99
|
-
var _document2;
|
|
100
|
-
|
|
102
|
+
var _getDocument2, _document2;
|
|
103
|
+
const activeElement = expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? (_getDocument2 = getDocument()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.activeElement : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.activeElement;
|
|
104
|
+
if (activeElement === this.popupBodyWrapper.current) {
|
|
101
105
|
var _this$popupBodyWrappe, _this$popupBodyWrappe2;
|
|
102
106
|
event.preventDefault();
|
|
103
107
|
(_this$popupBodyWrappe = this.popupBodyWrapper) === null || _this$popupBodyWrappe === void 0 ? void 0 : (_this$popupBodyWrappe2 = _this$popupBodyWrappe.current) === null || _this$popupBodyWrappe2 === void 0 ? void 0 : _this$popupBodyWrappe2.blur();
|
|
@@ -277,7 +281,7 @@ class StatusPickerWithIntl extends React.Component {
|
|
|
277
281
|
userIntent: "statusPickerOpen"
|
|
278
282
|
}, jsx("div", {
|
|
279
283
|
css: pickerContainerStyles,
|
|
280
|
-
|
|
284
|
+
role: "none",
|
|
281
285
|
ref: this.setRef(setOutsideClickTargetRef),
|
|
282
286
|
onClick: this.handlePopupClick,
|
|
283
287
|
onKeyDown: this.onKeyDown
|
|
@@ -17,6 +17,7 @@ import React from 'react';
|
|
|
17
17
|
import { css, jsx } from '@emotion/react';
|
|
18
18
|
import { injectIntl } from 'react-intl-next';
|
|
19
19
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
20
|
+
import { getDocument } from '@atlaskit/browser-apis';
|
|
20
21
|
import { statusMessages as messages } from '@atlaskit/editor-common/messages';
|
|
21
22
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
22
23
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
@@ -25,6 +26,7 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
25
26
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
27
|
import { StatusPicker as AkStatusPicker } from '@atlaskit/status/picker';
|
|
27
28
|
import { N0 } from '@atlaskit/theme/colors';
|
|
29
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
28
30
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
29
31
|
import { DEFAULT_STATUS } from '../pm-plugins/actions';
|
|
30
32
|
import { analyticsState, createStatusAnalyticsAndFire } from './analytics';
|
|
@@ -76,12 +78,13 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
76
78
|
_this.props.onEnter(_this.state);
|
|
77
79
|
});
|
|
78
80
|
_defineProperty(_this, "handleTabPress", function (event) {
|
|
81
|
+
var _getDocument, _document;
|
|
79
82
|
var colorButtons = event.currentTarget.querySelectorAll('button');
|
|
80
83
|
var inputField = event.currentTarget.querySelector('input');
|
|
81
|
-
var
|
|
84
|
+
var activeElement = expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement : (_document = document) === null || _document === void 0 ? void 0 : _document.activeElement;
|
|
85
|
+
var isInputFocussed = activeElement === inputField;
|
|
82
86
|
var isButtonFocussed = Array.from(colorButtons).some(function (buttonElement) {
|
|
83
|
-
|
|
84
|
-
return ((_document = document) === null || _document === void 0 ? void 0 : _document.activeElement) === buttonElement;
|
|
87
|
+
return activeElement === buttonElement;
|
|
85
88
|
});
|
|
86
89
|
if (event !== null && event !== void 0 && event.shiftKey) {
|
|
87
90
|
/* shift + tab */
|
|
@@ -105,8 +108,9 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
105
108
|
}
|
|
106
109
|
});
|
|
107
110
|
_defineProperty(_this, "handleArrow", function (event, closingMethod) {
|
|
108
|
-
var _document2;
|
|
109
|
-
|
|
111
|
+
var _getDocument2, _document2;
|
|
112
|
+
var activeElement = expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true) ? (_getDocument2 = getDocument()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.activeElement : (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.activeElement;
|
|
113
|
+
if (activeElement === _this.popupBodyWrapper.current) {
|
|
110
114
|
var _this$popupBodyWrappe;
|
|
111
115
|
event.preventDefault();
|
|
112
116
|
(_this$popupBodyWrappe = _this.popupBodyWrapper) === null || _this$popupBodyWrappe === void 0 || (_this$popupBodyWrappe = _this$popupBodyWrappe.current) === null || _this$popupBodyWrappe === void 0 || _this$popupBodyWrappe.blur();
|
|
@@ -299,7 +303,7 @@ var StatusPickerWithIntl = /*#__PURE__*/function (_React$Component) {
|
|
|
299
303
|
userIntent: "statusPickerOpen"
|
|
300
304
|
}, jsx("div", {
|
|
301
305
|
css: pickerContainerStyles,
|
|
302
|
-
|
|
306
|
+
role: "none",
|
|
303
307
|
ref: this.setRef(setOutsideClickTargetRef),
|
|
304
308
|
onClick: this.handlePopupClick,
|
|
305
309
|
onKeyDown: this.onKeyDown
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-status",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.20",
|
|
4
4
|
"description": "Status plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
33
33
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
34
|
+
"@atlaskit/browser-apis": "^0.0.1",
|
|
34
35
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
35
36
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
36
37
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
@@ -38,14 +39,14 @@
|
|
|
38
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
39
40
|
"@atlaskit/status": "^3.1.0",
|
|
40
41
|
"@atlaskit/theme": "^21.0.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^29.3.0",
|
|
42
43
|
"@atlaskit/tokens": "^11.0.0",
|
|
43
44
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
44
45
|
"@babel/runtime": "^7.0.0",
|
|
45
46
|
"@emotion/react": "^11.7.1"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
48
|
-
"@atlaskit/editor-common": "^111.
|
|
49
|
+
"@atlaskit/editor-common": "^111.18.0",
|
|
49
50
|
"react": "^18.2.0",
|
|
50
51
|
"react-dom": "^18.2.0",
|
|
51
52
|
"react-intl-next": "npm:react-intl@^5.18.1"
|