@atlaskit/status 1.4.2 → 1.4.3
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 +6 -0
- package/dist/cjs/components/StatusPicker.js +26 -4
- package/dist/cjs/components/analytics.js +1 -1
- package/dist/es2019/components/StatusPicker.js +22 -4
- package/dist/es2019/components/analytics.js +1 -1
- package/dist/esm/components/StatusPicker.js +26 -4
- package/dist/esm/components/analytics.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/status
|
|
2
2
|
|
|
3
|
+
## 1.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42325](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42325) [`58f1fd91d09`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58f1fd91d09) - ED-20512 Set Focus on status input field when tab is pressed
|
|
8
|
+
|
|
3
9
|
## 1.4.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -49,13 +49,21 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleInputRef", function (ref) {
|
|
52
|
+
_this.inputRef = ref;
|
|
52
53
|
if (ref && _this.props.autoFocus) {
|
|
53
|
-
|
|
54
|
-
setTimeout(function () {
|
|
55
|
-
ref.focus();
|
|
56
|
-
}, 50);
|
|
54
|
+
_this.focusInput();
|
|
57
55
|
}
|
|
58
56
|
});
|
|
57
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusInput", function () {
|
|
58
|
+
if (!_this.inputRef) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// Defer to prevent editor scrolling to top
|
|
62
|
+
_this.autofocusTimeout = setTimeout(function () {
|
|
63
|
+
var _this$inputRef;
|
|
64
|
+
(_this$inputRef = _this.inputRef) === null || _this$inputRef === void 0 || _this$inputRef.focus();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
59
67
|
return _this;
|
|
60
68
|
}
|
|
61
69
|
(0, _createClass2.default)(Picker, [{
|
|
@@ -89,6 +97,20 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
|
|
|
89
97
|
selectedColor: selectedColor
|
|
90
98
|
}));
|
|
91
99
|
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "componentDidUpdate",
|
|
102
|
+
value: function componentDidUpdate() {
|
|
103
|
+
if (this.inputRef && this.props.autoFocus) {
|
|
104
|
+
this.focusInput();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "componentWillUnmount",
|
|
109
|
+
value: function componentWillUnmount() {
|
|
110
|
+
if (this.autofocusTimeout !== undefined) {
|
|
111
|
+
clearTimeout(this.autofocusTimeout);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
92
114
|
}]);
|
|
93
115
|
return Picker;
|
|
94
116
|
}(_react.PureComponent);
|
|
@@ -10,7 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
var ELEMENTS_CHANNEL = exports.ELEMENTS_CHANNEL = 'fabric-elements';
|
|
12
12
|
var packageName = "@atlaskit/status";
|
|
13
|
-
var packageVersion = "1.4.
|
|
13
|
+
var packageVersion = "1.4.3";
|
|
14
14
|
var createStatusAnalyticsAndFire = exports.createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
15
15
|
return function (payload) {
|
|
16
16
|
var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
|
|
@@ -24,13 +24,21 @@ class Picker extends PureComponent {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
_defineProperty(this, "handleInputRef", ref => {
|
|
27
|
+
this.inputRef = ref;
|
|
27
28
|
if (ref && this.props.autoFocus) {
|
|
28
|
-
|
|
29
|
-
setTimeout(() => {
|
|
30
|
-
ref.focus();
|
|
31
|
-
}, 50);
|
|
29
|
+
this.focusInput();
|
|
32
30
|
}
|
|
33
31
|
});
|
|
32
|
+
_defineProperty(this, "focusInput", () => {
|
|
33
|
+
if (!this.inputRef) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
// Defer to prevent editor scrolling to top
|
|
37
|
+
this.autofocusTimeout = setTimeout(() => {
|
|
38
|
+
var _this$inputRef;
|
|
39
|
+
(_this$inputRef = this.inputRef) === null || _this$inputRef === void 0 ? void 0 : _this$inputRef.focus();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
34
42
|
}
|
|
35
43
|
render() {
|
|
36
44
|
const {
|
|
@@ -62,6 +70,16 @@ class Picker extends PureComponent {
|
|
|
62
70
|
selectedColor: selectedColor
|
|
63
71
|
}));
|
|
64
72
|
}
|
|
73
|
+
componentDidUpdate() {
|
|
74
|
+
if (this.inputRef && this.props.autoFocus) {
|
|
75
|
+
this.focusInput();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
componentWillUnmount() {
|
|
79
|
+
if (this.autofocusTimeout !== undefined) {
|
|
80
|
+
clearTimeout(this.autofocusTimeout);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
65
83
|
}
|
|
66
84
|
_defineProperty(Picker, "defaultProps", {
|
|
67
85
|
autoFocus: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const ELEMENTS_CHANNEL = 'fabric-elements';
|
|
2
2
|
const packageName = "@atlaskit/status";
|
|
3
|
-
const packageVersion = "1.4.
|
|
3
|
+
const packageVersion = "1.4.3";
|
|
4
4
|
export const createStatusAnalyticsAndFire = createAnalyticsEvent => payload => {
|
|
5
5
|
const statusPayload = {
|
|
6
6
|
...payload,
|
|
@@ -39,13 +39,21 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
_defineProperty(_assertThisInitialized(_this), "handleInputRef", function (ref) {
|
|
42
|
+
_this.inputRef = ref;
|
|
42
43
|
if (ref && _this.props.autoFocus) {
|
|
43
|
-
|
|
44
|
-
setTimeout(function () {
|
|
45
|
-
ref.focus();
|
|
46
|
-
}, 50);
|
|
44
|
+
_this.focusInput();
|
|
47
45
|
}
|
|
48
46
|
});
|
|
47
|
+
_defineProperty(_assertThisInitialized(_this), "focusInput", function () {
|
|
48
|
+
if (!_this.inputRef) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
// Defer to prevent editor scrolling to top
|
|
52
|
+
_this.autofocusTimeout = setTimeout(function () {
|
|
53
|
+
var _this$inputRef;
|
|
54
|
+
(_this$inputRef = _this.inputRef) === null || _this$inputRef === void 0 || _this$inputRef.focus();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
49
57
|
return _this;
|
|
50
58
|
}
|
|
51
59
|
_createClass(Picker, [{
|
|
@@ -79,6 +87,20 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
|
|
|
79
87
|
selectedColor: selectedColor
|
|
80
88
|
}));
|
|
81
89
|
}
|
|
90
|
+
}, {
|
|
91
|
+
key: "componentDidUpdate",
|
|
92
|
+
value: function componentDidUpdate() {
|
|
93
|
+
if (this.inputRef && this.props.autoFocus) {
|
|
94
|
+
this.focusInput();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "componentWillUnmount",
|
|
99
|
+
value: function componentWillUnmount() {
|
|
100
|
+
if (this.autofocusTimeout !== undefined) {
|
|
101
|
+
clearTimeout(this.autofocusTimeout);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
82
104
|
}]);
|
|
83
105
|
return Picker;
|
|
84
106
|
}(PureComponent);
|
|
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
export var ELEMENTS_CHANNEL = 'fabric-elements';
|
|
5
5
|
var packageName = "@atlaskit/status";
|
|
6
|
-
var packageVersion = "1.4.
|
|
6
|
+
var packageVersion = "1.4.3";
|
|
7
7
|
export var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
|
|
8
8
|
return function (payload) {
|
|
9
9
|
var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/status",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Fabric Status React Components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/lozenge": "^11.4.0",
|
|
31
31
|
"@atlaskit/textfield": "^5.6.0",
|
|
32
32
|
"@atlaskit/theme": "^12.6.0",
|
|
33
|
-
"@atlaskit/tokens": "^1.
|
|
33
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0",
|
|
35
35
|
"@emotion/react": "^11.7.1"
|
|
36
36
|
},
|