@atlaskit/quick-search 8.2.2 → 8.2.4
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/QuickSearch.js +22 -25
- package/dist/cjs/components/ResultItem/ResultItem.js +5 -7
- package/dist/cjs/components/ResultItem/ResultItemGroup.js +5 -7
- package/dist/cjs/components/ResultItem/styled.js +5 -4
- package/dist/cjs/components/Results/ContainerResult.js +6 -9
- package/dist/cjs/components/Results/ObjectResult.js +6 -9
- package/dist/cjs/components/Results/PersonResult.js +7 -10
- package/dist/cjs/components/Results/ResultBase.js +9 -12
- package/dist/cjs/components/Search/Search.js +8 -11
- package/dist/cjs/components/decorateWithAnalyticsData.js +10 -13
- package/dist/es2019/components/ResultItem/styled.js +5 -4
- package/dist/es2019/components/decorateWithAnalyticsData.js +4 -4
- package/dist/esm/components/QuickSearch.js +22 -25
- package/dist/esm/components/ResultItem/ResultItem.js +5 -7
- package/dist/esm/components/ResultItem/ResultItemGroup.js +5 -7
- package/dist/esm/components/ResultItem/styled.js +5 -4
- package/dist/esm/components/Results/ContainerResult.js +6 -9
- package/dist/esm/components/Results/ObjectResult.js +6 -9
- package/dist/esm/components/Results/PersonResult.js +7 -10
- package/dist/esm/components/Results/ResultBase.js +9 -12
- package/dist/esm/components/Search/Search.js +8 -11
- package/dist/esm/components/decorateWithAnalyticsData.js +10 -13
- package/package.json +4 -4
- package/tsconfig.json +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -21,16 +20,14 @@ var SpinnerParent = styled.div({
|
|
|
21
20
|
marginTop: "var(--ds-space-150, 12px)"
|
|
22
21
|
});
|
|
23
22
|
var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
-
_inherits(Search, _React$PureComponent);
|
|
25
|
-
var _super = _createSuper(Search);
|
|
26
23
|
function Search() {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, Search);
|
|
29
26
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
27
|
args[_key] = arguments[_key];
|
|
31
28
|
}
|
|
32
|
-
_this =
|
|
33
|
-
_defineProperty(
|
|
29
|
+
_this = _callSuper(this, Search, [].concat(args));
|
|
30
|
+
_defineProperty(_this, "onInputKeyDown", function (event) {
|
|
34
31
|
var onKeyDown = _this.props.onKeyDown;
|
|
35
32
|
if (!controlKeys.includes(event.key)) {
|
|
36
33
|
return;
|
|
@@ -40,15 +37,16 @@ var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
40
37
|
}
|
|
41
38
|
event.stopPropagation();
|
|
42
39
|
});
|
|
43
|
-
_defineProperty(
|
|
40
|
+
_defineProperty(_this, "setInputRef", function (ref) {
|
|
44
41
|
_this.inputRef = ref;
|
|
45
42
|
});
|
|
46
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "renderInputControls", function () {
|
|
47
44
|
return _this.props.inputControls ? /*#__PURE__*/React.createElement(SearchInputControlsContainer, null, _this.props.inputControls) : null;
|
|
48
45
|
});
|
|
49
46
|
return _this;
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
_inherits(Search, _React$PureComponent);
|
|
49
|
+
return _createClass(Search, [{
|
|
52
50
|
key: "render",
|
|
53
51
|
value: function render() {
|
|
54
52
|
var _this$props = this.props,
|
|
@@ -82,7 +80,6 @@ var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
82
80
|
})))), this.renderInputControls()), children);
|
|
83
81
|
}
|
|
84
82
|
}]);
|
|
85
|
-
return Search;
|
|
86
83
|
}(React.PureComponent);
|
|
87
84
|
_defineProperty(Search, "defaultProps", {
|
|
88
85
|
isLoading: false,
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { AnalyticsDecorator } from '@atlaskit/analytics';
|
|
12
11
|
import isReactElement from './isReactElement';
|
|
13
12
|
import { QS_ANALYTICS_EV_SUBMIT } from './constants';
|
|
14
13
|
export default function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
15
|
-
var
|
|
16
|
-
return
|
|
17
|
-
_inherits(DecorateWithAnalyticsData, _React$Component);
|
|
18
|
-
var _super = _createSuper(DecorateWithAnalyticsData);
|
|
14
|
+
var _DecorateWithAnalyticsData;
|
|
15
|
+
return _DecorateWithAnalyticsData = /*#__PURE__*/function (_React$Component) {
|
|
19
16
|
function DecorateWithAnalyticsData() {
|
|
20
17
|
var _this;
|
|
21
18
|
_classCallCheck(this, DecorateWithAnalyticsData);
|
|
22
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23
20
|
args[_key] = arguments[_key];
|
|
24
21
|
}
|
|
25
|
-
_this =
|
|
26
|
-
_defineProperty(
|
|
22
|
+
_this = _callSuper(this, DecorateWithAnalyticsData, [].concat(args));
|
|
23
|
+
_defineProperty(_this, "countChildren", function () {
|
|
27
24
|
return React.Children.toArray(_this.props.children).reduce(function (total, group) {
|
|
28
25
|
return isReactElement(group) ? total + React.Children.count(group.props.children) : total;
|
|
29
26
|
}, 0);
|
|
30
27
|
});
|
|
31
28
|
return _this;
|
|
32
29
|
}
|
|
33
|
-
|
|
30
|
+
_inherits(DecorateWithAnalyticsData, _React$Component);
|
|
31
|
+
return _createClass(DecorateWithAnalyticsData, [{
|
|
34
32
|
key: "render",
|
|
35
33
|
value: function render() {
|
|
36
34
|
return /*#__PURE__*/React.createElement(AnalyticsDecorator, {
|
|
@@ -43,9 +41,8 @@ export default function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
|
43
41
|
}, /*#__PURE__*/React.createElement(WrappedQuickSearch, this.props));
|
|
44
42
|
}
|
|
45
43
|
}]);
|
|
46
|
-
|
|
47
|
-
}(React.Component), _defineProperty(_class, "defaultProps", {
|
|
44
|
+
}(React.Component), _defineProperty(_DecorateWithAnalyticsData, "defaultProps", {
|
|
48
45
|
children: [],
|
|
49
46
|
value: ''
|
|
50
|
-
}),
|
|
47
|
+
}), _DecorateWithAnalyticsData;
|
|
51
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/quick-search",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.4",
|
|
4
4
|
"description": "A quick-search component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/analytics": "^8.
|
|
32
|
-
"@atlaskit/avatar": "^21.
|
|
31
|
+
"@atlaskit/analytics": "^8.2.0",
|
|
32
|
+
"@atlaskit/avatar": "^21.17.0",
|
|
33
33
|
"@atlaskit/item": "^12.1.0",
|
|
34
34
|
"@atlaskit/spinner": "^16.3.0",
|
|
35
35
|
"@atlaskit/theme": "^14.0.0",
|
|
36
|
-
"@atlaskit/tokens": "^
|
|
36
|
+
"@atlaskit/tokens": "^3.0.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
38
38
|
"keycode": "^2.1.7"
|
|
39
39
|
},
|