@atlaskit/quick-search 8.0.9 → 8.0.12
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 +18 -0
- package/dist/cjs/components/QuickSearch.js +2 -2
- package/dist/cjs/components/ResultItem/styled.js +1 -1
- package/dist/cjs/components/Results/ContainerResult.js +3 -1
- package/dist/cjs/components/Results/ObjectResult.js +3 -1
- package/dist/cjs/components/Results/PersonResult.js +3 -1
- package/dist/cjs/components/Results/ResultBase.js +4 -3
- package/dist/cjs/components/Search/styled.js +2 -2
- package/dist/cjs/components/decorateWithAnalyticsData.js +3 -3
- package/dist/cjs/index.js +15 -15
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Results/ResultBase.js +1 -1
- package/dist/es2019/components/Search/styled.js +1 -2
- package/dist/es2019/components/decorateWithAnalyticsData.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/QuickSearch.js +2 -2
- package/dist/esm/components/Results/ContainerResult.js +2 -1
- package/dist/esm/components/Results/ObjectResult.js +2 -1
- package/dist/esm/components/Results/PersonResult.js +2 -1
- package/dist/esm/components/Results/ResultBase.js +4 -3
- package/dist/esm/components/Search/styled.js +1 -1
- package/dist/esm/components/decorateWithAnalyticsData.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/components/ResultItem/styled.d.ts +7 -7
- package/dist/types/components/Search/styled.d.ts +8 -8
- package/dist/types/components/context.d.ts +2 -2
- package/package.json +8 -8
- package/report.api.md +302 -0
- package/tsconfig.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/quick-search
|
|
2
2
|
|
|
3
|
+
## 8.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
8
|
+
|
|
9
|
+
## 8.0.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 8.0.10
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
20
|
+
|
|
3
21
|
## 8.0.9
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -35,9 +35,9 @@ var _decorateWithAnalyticsData = _interopRequireDefault(require("./decorateWithA
|
|
|
35
35
|
|
|
36
36
|
var _constants = require("./constants");
|
|
37
37
|
|
|
38
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
38
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39
39
|
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
40
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41
41
|
|
|
42
42
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
43
43
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.ResultItemTextAfter = exports.
|
|
8
|
+
exports.ResultItemTextAfter = exports.ResultItemSubText = exports.ResultItemIcon = exports.ResultItemGroupTitle = exports.ResultItemGroupHeader = exports.ResultItemCaption = exports.ResultItemAfterWrapper = exports.ResultItemAfter = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -31,6 +31,8 @@ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
|
31
31
|
|
|
32
32
|
var _ResultBase = _interopRequireDefault(require("./ResultBase"));
|
|
33
33
|
|
|
34
|
+
var _excluded = ["name", "isPrivate", "type", "subText"];
|
|
35
|
+
|
|
34
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
35
37
|
|
|
36
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -78,7 +80,7 @@ var ContainerResult = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
78
80
|
_this$props$type = _this$props.type,
|
|
79
81
|
type = _this$props$type === void 0 ? 'container' : _this$props$type,
|
|
80
82
|
subText = _this$props.subText,
|
|
81
|
-
commonResultProps = (0, _objectWithoutProperties2.default)(_this$props,
|
|
83
|
+
commonResultProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
82
84
|
return /*#__PURE__*/_react.default.createElement(_ResultBase.default, (0, _extends2.default)({}, commonResultProps, {
|
|
83
85
|
type: type,
|
|
84
86
|
text: name,
|
|
@@ -31,6 +31,8 @@ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
|
31
31
|
|
|
32
32
|
var _ResultBase = _interopRequireDefault(require("./ResultBase"));
|
|
33
33
|
|
|
34
|
+
var _excluded = ["name", "containerName", "isPrivate", "objectKey", "type"];
|
|
35
|
+
|
|
34
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
35
37
|
|
|
36
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -93,7 +95,7 @@ var ObjectResult = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
93
95
|
objectKey = _this$props2.objectKey,
|
|
94
96
|
_this$props2$type = _this$props2.type,
|
|
95
97
|
type = _this$props2$type === void 0 ? 'object' : _this$props2$type,
|
|
96
|
-
commonResultProps = (0, _objectWithoutProperties2.default)(_this$props2,
|
|
98
|
+
commonResultProps = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
97
99
|
return /*#__PURE__*/_react.default.createElement(_ResultBase.default, (0, _extends2.default)({}, commonResultProps, {
|
|
98
100
|
type: type,
|
|
99
101
|
text: name,
|
|
@@ -31,6 +31,8 @@ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
|
31
31
|
|
|
32
32
|
var _ResultBase = _interopRequireDefault(require("./ResultBase"));
|
|
33
33
|
|
|
34
|
+
var _excluded = ["name", "mentionName", "mentionPrefix", "presenceMessage", "presenceState", "type"];
|
|
35
|
+
|
|
34
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
35
37
|
|
|
36
38
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -78,7 +80,7 @@ var PersonResult = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
78
80
|
presenceState = _this$props.presenceState,
|
|
79
81
|
_this$props$type = _this$props.type,
|
|
80
82
|
type = _this$props$type === void 0 ? 'person' : _this$props$type,
|
|
81
|
-
commonResultProps = (0, _objectWithoutProperties2.default)(_this$props,
|
|
83
|
+
commonResultProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
82
84
|
return /*#__PURE__*/_react.default.createElement(_ResultBase.default, (0, _extends2.default)({}, commonResultProps, {
|
|
83
85
|
type: type,
|
|
84
86
|
text: name,
|
|
@@ -31,9 +31,9 @@ var _ResultItem = _interopRequireDefault(require("../ResultItem/ResultItem"));
|
|
|
31
31
|
|
|
32
32
|
var _context = require("../context");
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
37
|
|
|
38
38
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
39
39
|
|
|
@@ -127,7 +127,8 @@ var ResultBase = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
127
127
|
value: function getAnalyticsData() {
|
|
128
128
|
var _this$props2 = this.props,
|
|
129
129
|
resultId = _this$props2.resultId,
|
|
130
|
-
|
|
130
|
+
_this$props2$analytic = _this$props2.analyticsData,
|
|
131
|
+
analyticsData = _this$props2$analytic === void 0 ? {} : _this$props2$analytic,
|
|
131
132
|
type = _this$props2.type,
|
|
132
133
|
context = _this$props2.context;
|
|
133
134
|
return _objectSpread({
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.getPlaceholderStyle = exports.getPlaceholderColor = exports.SearchInputTypeAhead = exports.SearchInputControlsContainer = exports.SearchInput = exports.SearchInner = exports.SearchFieldBaseOuter = exports.SearchFieldBaseInner = exports.SearchBox = void 0;
|
|
11
11
|
|
|
12
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
|
|
26
26
|
var inputRightPadding = (0, _constants.gridSize)() * 2;
|
|
27
27
|
|
|
28
|
-
var SearchBox = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: sticky;\n top: 0;\n
|
|
28
|
+
var SearchBox = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: sticky;\n top: 0;\n background-color: ", ";\n color: ", ";\n display: flex;\n height: 36px;\n z-index: 10; /* required to keep the search box on top of icons in results when sticky */\n"])), _colors.N0, _colors.N500);
|
|
29
29
|
|
|
30
30
|
exports.SearchBox = SearchBox;
|
|
31
31
|
|
|
@@ -34,9 +34,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
34
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
35
|
|
|
36
36
|
function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
37
|
-
var _class
|
|
37
|
+
var _class;
|
|
38
38
|
|
|
39
|
-
return
|
|
39
|
+
return _class = /*#__PURE__*/function (_React$Component) {
|
|
40
40
|
(0, _inherits2.default)(DecorateWithAnalyticsData, _React$Component);
|
|
41
41
|
|
|
42
42
|
var _super = _createSuper(DecorateWithAnalyticsData);
|
|
@@ -76,5 +76,5 @@ function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
|
76
76
|
}(_react.default.Component), (0, _defineProperty2.default)(_class, "defaultProps", {
|
|
77
77
|
children: [],
|
|
78
78
|
value: ''
|
|
79
|
-
}),
|
|
79
|
+
}), _class;
|
|
80
80
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -7,40 +7,34 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "AkNavigationItem", {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
get: function get() {
|
|
13
|
-
return
|
|
13
|
+
return _ResultItem.default;
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
Object.defineProperty(exports, "
|
|
16
|
+
Object.defineProperty(exports, "AkNavigationItemGroup", {
|
|
17
17
|
enumerable: true,
|
|
18
18
|
get: function get() {
|
|
19
19
|
return _ResultItemGroup.default;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
Object.defineProperty(exports, "AkNavigationItem", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _ResultItem.default;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
22
|
Object.defineProperty(exports, "AkQuickSearch", {
|
|
29
23
|
enumerable: true,
|
|
30
24
|
get: function get() {
|
|
31
25
|
return _QuickSearch.default;
|
|
32
26
|
}
|
|
33
27
|
});
|
|
34
|
-
Object.defineProperty(exports, "
|
|
28
|
+
Object.defineProperty(exports, "AkSearch", {
|
|
35
29
|
enumerable: true,
|
|
36
30
|
get: function get() {
|
|
37
|
-
return
|
|
31
|
+
return _Search.default;
|
|
38
32
|
}
|
|
39
33
|
});
|
|
40
|
-
Object.defineProperty(exports, "
|
|
34
|
+
Object.defineProperty(exports, "ContainerResult", {
|
|
41
35
|
enumerable: true,
|
|
42
36
|
get: function get() {
|
|
43
|
-
return
|
|
37
|
+
return _ContainerResult.default;
|
|
44
38
|
}
|
|
45
39
|
});
|
|
46
40
|
Object.defineProperty(exports, "ObjectResult", {
|
|
@@ -55,10 +49,10 @@ Object.defineProperty(exports, "PersonResult", {
|
|
|
55
49
|
return _PersonResult.default;
|
|
56
50
|
}
|
|
57
51
|
});
|
|
58
|
-
Object.defineProperty(exports, "
|
|
52
|
+
Object.defineProperty(exports, "QuickSearch", {
|
|
59
53
|
enumerable: true,
|
|
60
54
|
get: function get() {
|
|
61
|
-
return
|
|
55
|
+
return _QuickSearch.default;
|
|
62
56
|
}
|
|
63
57
|
});
|
|
64
58
|
Object.defineProperty(exports, "ResultBase", {
|
|
@@ -67,6 +61,12 @@ Object.defineProperty(exports, "ResultBase", {
|
|
|
67
61
|
return _ResultBase.default;
|
|
68
62
|
}
|
|
69
63
|
});
|
|
64
|
+
Object.defineProperty(exports, "ResultItemGroup", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function get() {
|
|
67
|
+
return _ResultItemGroup.default;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
70
|
exports.quickSearchResultTypes = void 0;
|
|
71
71
|
|
|
72
72
|
var resultTypes = _interopRequireWildcard(require("./components/Results"));
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,12 +5,11 @@ const inputRightPadding = gridSize() * 2;
|
|
|
5
5
|
export const SearchBox = styled.div`
|
|
6
6
|
position: sticky;
|
|
7
7
|
top: 0;
|
|
8
|
-
z-index: 1; /* required to keep the search box on top of icons in results when sticky */
|
|
9
8
|
background-color: ${N0};
|
|
10
9
|
color: ${N500};
|
|
11
10
|
display: flex;
|
|
12
11
|
height: 36px;
|
|
13
|
-
z-index: 10;
|
|
12
|
+
z-index: 10; /* required to keep the search box on top of icons in results when sticky */
|
|
14
13
|
`;
|
|
15
14
|
export const SearchFieldBaseOuter = styled.div`
|
|
16
15
|
display: flex;
|
|
@@ -4,9 +4,9 @@ import { AnalyticsDecorator } from '@atlaskit/analytics';
|
|
|
4
4
|
import isReactElement from './isReactElement';
|
|
5
5
|
import { QS_ANALYTICS_EV_SUBMIT } from './constants';
|
|
6
6
|
export default function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
7
|
-
var _class
|
|
7
|
+
var _class;
|
|
8
8
|
|
|
9
|
-
return
|
|
9
|
+
return _class = class DecorateWithAnalyticsData extends React.Component {
|
|
10
10
|
constructor(...args) {
|
|
11
11
|
super(...args);
|
|
12
12
|
|
|
@@ -29,5 +29,5 @@ export default function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
|
29
29
|
}, _defineProperty(_class, "defaultProps", {
|
|
30
30
|
children: [],
|
|
31
31
|
value: ''
|
|
32
|
-
}),
|
|
32
|
+
}), _class;
|
|
33
33
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -6,9 +6,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
10
|
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
12
|
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
14
|
|
|
@@ -7,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
var _excluded = ["name", "isPrivate", "type", "subText"];
|
|
10
11
|
|
|
11
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
13
|
|
|
@@ -61,7 +62,7 @@ var ContainerResult = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
61
62
|
_this$props$type = _this$props.type,
|
|
62
63
|
type = _this$props$type === void 0 ? 'container' : _this$props$type,
|
|
63
64
|
subText = _this$props.subText,
|
|
64
|
-
commonResultProps = _objectWithoutProperties(_this$props,
|
|
65
|
+
commonResultProps = _objectWithoutProperties(_this$props, _excluded);
|
|
65
66
|
|
|
66
67
|
return /*#__PURE__*/React.createElement(ResultBase, _extends({}, commonResultProps, {
|
|
67
68
|
type: type,
|
|
@@ -7,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
var _excluded = ["name", "containerName", "isPrivate", "objectKey", "type"];
|
|
10
11
|
|
|
11
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
13
|
|
|
@@ -76,7 +77,7 @@ var ObjectResult = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
76
77
|
objectKey = _this$props2.objectKey,
|
|
77
78
|
_this$props2$type = _this$props2.type,
|
|
78
79
|
type = _this$props2$type === void 0 ? 'object' : _this$props2$type,
|
|
79
|
-
commonResultProps = _objectWithoutProperties(_this$props2,
|
|
80
|
+
commonResultProps = _objectWithoutProperties(_this$props2, _excluded);
|
|
80
81
|
|
|
81
82
|
return /*#__PURE__*/React.createElement(ResultBase, _extends({}, commonResultProps, {
|
|
82
83
|
type: type,
|
|
@@ -7,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
var _excluded = ["name", "mentionName", "mentionPrefix", "presenceMessage", "presenceState", "type"];
|
|
10
11
|
|
|
11
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
13
|
|
|
@@ -62,7 +63,7 @@ var PersonResult = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
62
63
|
presenceState = _this$props.presenceState,
|
|
63
64
|
_this$props$type = _this$props.type,
|
|
64
65
|
type = _this$props$type === void 0 ? 'person' : _this$props$type,
|
|
65
|
-
commonResultProps = _objectWithoutProperties(_this$props,
|
|
66
|
+
commonResultProps = _objectWithoutProperties(_this$props, _excluded);
|
|
66
67
|
|
|
67
68
|
return /*#__PURE__*/React.createElement(ResultBase, _extends({}, commonResultProps, {
|
|
68
69
|
type: type,
|
|
@@ -7,9 +7,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
7
7
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
11
|
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
13
|
|
|
14
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
15
15
|
|
|
@@ -112,7 +112,8 @@ export var ResultBase = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
112
112
|
value: function getAnalyticsData() {
|
|
113
113
|
var _this$props2 = this.props,
|
|
114
114
|
resultId = _this$props2.resultId,
|
|
115
|
-
|
|
115
|
+
_this$props2$analytic = _this$props2.analyticsData,
|
|
116
|
+
analyticsData = _this$props2$analytic === void 0 ? {} : _this$props2$analytic,
|
|
116
117
|
type = _this$props2.type,
|
|
117
118
|
context = _this$props2.context;
|
|
118
119
|
return _objectSpread({
|
|
@@ -6,7 +6,7 @@ import styled, { css } from 'styled-components';
|
|
|
6
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { N0, N500, B200, placeholderText, N50 } from '@atlaskit/theme/colors';
|
|
8
8
|
var inputRightPadding = gridSize() * 2;
|
|
9
|
-
export var SearchBox = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n
|
|
9
|
+
export var SearchBox = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n background-color: ", ";\n color: ", ";\n display: flex;\n height: 36px;\n z-index: 10; /* required to keep the search box on top of icons in results when sticky */\n"])), N0, N500);
|
|
10
10
|
export var SearchFieldBaseOuter = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n margin-right: auto;\n padding-bottom: 2px;\n border-bottom: 2px solid ", ";\n"])), B200);
|
|
11
11
|
export var SearchFieldBaseInner = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding-right: ", "px; /* pad search text from FieldBase's isLoading spinner */\n display: flex;\n flex-grow: 1;\n"])), inputRightPadding);
|
|
12
12
|
export var SearchInner = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-right: ", "px;\n"])), gridSize() * 3);
|
|
@@ -15,9 +15,9 @@ import { AnalyticsDecorator } from '@atlaskit/analytics';
|
|
|
15
15
|
import isReactElement from './isReactElement';
|
|
16
16
|
import { QS_ANALYTICS_EV_SUBMIT } from './constants';
|
|
17
17
|
export default function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
18
|
-
var _class
|
|
18
|
+
var _class;
|
|
19
19
|
|
|
20
|
-
return
|
|
20
|
+
return _class = /*#__PURE__*/function (_React$Component) {
|
|
21
21
|
_inherits(DecorateWithAnalyticsData, _React$Component);
|
|
22
22
|
|
|
23
23
|
var _super = _createSuper(DecorateWithAnalyticsData);
|
|
@@ -60,5 +60,5 @@ export default function decorateWithAnalyticsData(WrappedQuickSearch) {
|
|
|
60
60
|
}(React.Component), _defineProperty(_class, "defaultProps", {
|
|
61
61
|
children: [],
|
|
62
62
|
value: ''
|
|
63
|
-
}),
|
|
63
|
+
}), _class;
|
|
64
64
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const ResultItemGroupHeader: import("styled-components").StyledComponentClass<import("react").
|
|
3
|
-
export declare const ResultItemGroupTitle: import("styled-components").StyledComponentClass<import("react").
|
|
2
|
+
export declare const ResultItemGroupHeader: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const ResultItemGroupTitle: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
4
4
|
export declare const ResultItemAfter: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
shouldTakeSpace: boolean;
|
|
6
6
|
}, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
shouldTakeSpace: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const ResultItemAfterWrapper: import("styled-components").StyledComponentClass<import("react").
|
|
10
|
-
export declare const ResultItemCaption: import("styled-components").StyledComponentClass<import("react").
|
|
11
|
-
export declare const ResultItemSubText: import("styled-components").StyledComponentClass<import("react").
|
|
12
|
-
export declare const ResultItemIcon: import("styled-components").StyledComponentClass<import("react").
|
|
13
|
-
export declare const ResultItemTextAfter: import("styled-components").StyledComponentClass<import("react").
|
|
9
|
+
export declare const ResultItemAfterWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
10
|
+
export declare const ResultItemCaption: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, any, import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>>;
|
|
11
|
+
export declare const ResultItemSubText: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, any, import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>>;
|
|
12
|
+
export declare const ResultItemIcon: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
13
|
+
export declare const ResultItemTextAfter: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const SearchBox: import("styled-components").StyledComponentClass<import("react").
|
|
3
|
-
export declare const SearchFieldBaseOuter: import("styled-components").StyledComponentClass<import("react").
|
|
4
|
-
export declare const SearchFieldBaseInner: import("styled-components").StyledComponentClass<import("react").
|
|
5
|
-
export declare const SearchInner: import("styled-components").StyledComponentClass<import("react").
|
|
2
|
+
export declare const SearchBox: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const SearchFieldBaseOuter: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const SearchFieldBaseInner: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const SearchInner: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
|
|
6
6
|
export declare const getPlaceholderStyle: (style: any) => import("styled-components").InterpolationValue[];
|
|
7
|
-
export declare const getPlaceholderColor: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<import("@atlaskit/theme").
|
|
8
|
-
export declare const SearchInput: import("styled-components").StyledComponentClass<import("react").
|
|
9
|
-
export declare const SearchInputTypeAhead: import("styled-components").StyledComponentClass<import("react").
|
|
10
|
-
export declare const SearchInputControlsContainer: import("styled-components").StyledComponentClass<import("react").
|
|
7
|
+
export declare const getPlaceholderColor: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<import("@atlaskit/theme").ThemeProps | undefined, any>>[];
|
|
8
|
+
export declare const SearchInput: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, any, import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>>;
|
|
9
|
+
export declare const SearchInputTypeAhead: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>, any, import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement>>;
|
|
10
|
+
export declare const SearchInputControlsContainer: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, any, import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
-
import { ResultData, ResultId } from './Results/types';
|
|
3
|
+
import { ResultData, ResultId, SelectedResultId } from './Results/types';
|
|
4
4
|
import { ResultBase } from './Results/ResultBase';
|
|
5
5
|
export declare type ResultContextType = {
|
|
6
6
|
/** Register result as keyboard navigation target */
|
|
@@ -19,4 +19,4 @@ export declare type ResultContextType = {
|
|
|
19
19
|
linkComponent?: ComponentType;
|
|
20
20
|
};
|
|
21
21
|
export declare const ResultContext: React.Context<ResultContextType>;
|
|
22
|
-
export declare const SelectedResultIdContext: React.Context<
|
|
22
|
+
export declare const SelectedResultIdContext: React.Context<SelectedResultId>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/quick-search",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.12",
|
|
4
4
|
"description": "A quick-search component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
15
|
"atlaskit:src": "src/index.ts",
|
|
16
16
|
"atlassian": {
|
|
17
|
-
"team": "Search
|
|
17
|
+
"team": "Search Platform: Search Experience",
|
|
18
18
|
"deprecatedAutoEntryPoints": true,
|
|
19
19
|
"releaseModel": "continuous",
|
|
20
20
|
"website": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@atlaskit/analytics": "^8.0.0",
|
|
26
|
-
"@atlaskit/avatar": "^
|
|
26
|
+
"@atlaskit/avatar": "^21.0.0",
|
|
27
27
|
"@atlaskit/item": "^12.0.0",
|
|
28
28
|
"@atlaskit/spinner": "^15.0.0",
|
|
29
|
-
"@atlaskit/theme": "^12.
|
|
29
|
+
"@atlaskit/theme": "^12.1.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0",
|
|
31
31
|
"keycode": "^2.1.7"
|
|
32
32
|
},
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"styled-components": "^3.2.6"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@atlaskit/avatar": "^
|
|
38
|
+
"@atlaskit/avatar": "^21.0.0",
|
|
39
39
|
"@atlaskit/docs": "*",
|
|
40
|
-
"@atlaskit/drawer": "^7.
|
|
41
|
-
"@atlaskit/icon": "^21.
|
|
40
|
+
"@atlaskit/drawer": "^7.1.0",
|
|
41
|
+
"@atlaskit/icon": "^21.10.0",
|
|
42
42
|
"@atlaskit/navigation": "^37.0.0",
|
|
43
43
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
44
44
|
"enzyme": "^3.10.0",
|
|
45
45
|
"prop-types": "^15.5.10",
|
|
46
46
|
"react": "^16.8.0",
|
|
47
47
|
"sinon": "^2.2.0",
|
|
48
|
-
"typescript": "3.
|
|
48
|
+
"typescript": "4.3.5",
|
|
49
49
|
"uuid": "^3.1.0"
|
|
50
50
|
},
|
|
51
51
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
package/report.api.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/quick-search".
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { ComponentType } from 'react';
|
|
9
|
+
import { default as React_2 } from 'react';
|
|
10
|
+
import { ReactNode } from 'react';
|
|
11
|
+
|
|
12
|
+
export declare class AkNavigationItem extends React_2.PureComponent<Props_2> {
|
|
13
|
+
static defaultProps: Partial<Props_2>;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare class AkSearch extends React_2.PureComponent<Props_4> {
|
|
18
|
+
static defaultProps: Partial<Props_4>;
|
|
19
|
+
onInputKeyDown: (event: React_2.KeyboardEvent<HTMLInputElement>) => void;
|
|
20
|
+
setInputRef: (ref: React_2.Ref<any>) => void;
|
|
21
|
+
renderInputControls: () => JSX.Element | null;
|
|
22
|
+
inputRef?: React_2.Ref<any>;
|
|
23
|
+
render(): JSX.Element;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare type AnalyticsData = Object;
|
|
27
|
+
|
|
28
|
+
export declare type CancelableEvent =
|
|
29
|
+
| KeyboardEvent
|
|
30
|
+
| MouseEvent
|
|
31
|
+
| React.KeyboardEvent<HTMLInputElement>
|
|
32
|
+
| React.MouseEvent<HTMLElement>;
|
|
33
|
+
|
|
34
|
+
declare type CommonResultProps = {
|
|
35
|
+
/** Unique ID of the result. This is passed as a parameter to certain callbacks */
|
|
36
|
+
resultId: string | number;
|
|
37
|
+
/** Type of the result. This is passed as a parameter to certain callbacks. */
|
|
38
|
+
type?: string;
|
|
39
|
+
/** Src URL of the image to be used as the result's icon, overriden by avatar prop */
|
|
40
|
+
avatarUrl?: string;
|
|
41
|
+
/** React Component of the image to be used as the result's icon, takes precedence over avatarUrl */
|
|
42
|
+
avatar?: ReactNode;
|
|
43
|
+
/** Content to be shown after the main content. Shown to the right of content (or to the left in RTL mode). */
|
|
44
|
+
elemAfter?: ReactNode;
|
|
45
|
+
/** Icon to be shown after the main content when the result is selected */
|
|
46
|
+
selectedIcon?: ReactNode;
|
|
47
|
+
/** Location to link out to on click. */
|
|
48
|
+
href?: string;
|
|
49
|
+
/** Target to open the link in. */
|
|
50
|
+
target?: string;
|
|
51
|
+
/** Reduces padding and font size. */
|
|
52
|
+
isCompact?: boolean;
|
|
53
|
+
/** Triggered by mouseClick event. */
|
|
54
|
+
onClick?: (resultData: ResultData) => void;
|
|
55
|
+
/** key/value pairs of attributes to be send in analytics events. */
|
|
56
|
+
analyticsData?: AnalyticsData | (() => AnalyticsData);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Generic result type for Atlassian containers.
|
|
61
|
+
*/
|
|
62
|
+
export declare class ContainerResult extends React_2.PureComponent<
|
|
63
|
+
ContainerResultProps
|
|
64
|
+
> {
|
|
65
|
+
getAvatar: () => {};
|
|
66
|
+
render(): JSX.Element;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export declare type ContainerResultProps = CommonResultProps & {
|
|
70
|
+
/** Name of the container. Provides the main text to be displayed as the item. */
|
|
71
|
+
name: React_2.ReactNode;
|
|
72
|
+
/** Text to appear to the right of the text. It has a lower font-weight. */
|
|
73
|
+
caption?: string;
|
|
74
|
+
/** Set whether to display a lock on the result's icon */
|
|
75
|
+
isPrivate?: boolean;
|
|
76
|
+
/** Text to be shown alongside the main `text`. */
|
|
77
|
+
subText?: React_2.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const _default: React_2.ComponentClass<Props_3, any>;
|
|
81
|
+
export { _default as AkQuickSearch };
|
|
82
|
+
export { _default as QuickSearch };
|
|
83
|
+
|
|
84
|
+
declare type DefaultProps = {
|
|
85
|
+
context: ResultContextType;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generic result type for Atlassian objects.
|
|
90
|
+
*/
|
|
91
|
+
export declare class ObjectResult extends React_2.PureComponent<
|
|
92
|
+
ObjectResultProps
|
|
93
|
+
> {
|
|
94
|
+
getAvatar: () => {};
|
|
95
|
+
getSubtext(): {} | null | undefined;
|
|
96
|
+
render(): JSX.Element;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare type ObjectResultProps = CommonResultProps & {
|
|
100
|
+
/** Name of the container. Provides the main text to be displayed as the item. */
|
|
101
|
+
name: React_2.ReactNode;
|
|
102
|
+
/** Text to appear to the right of the text. It has a lower font-weight. */
|
|
103
|
+
caption?: string;
|
|
104
|
+
/** Name of the container to which the object belongs. Displayed alongside the name */
|
|
105
|
+
containerName?: React_2.ReactNode;
|
|
106
|
+
/** Set whether to display a lock on the result's icon */
|
|
107
|
+
isPrivate?: boolean;
|
|
108
|
+
/** A key or identifier of the object. Ajoined to the `containerName` when provided. */
|
|
109
|
+
objectKey?: React_2.ReactNode;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export declare class PersonResult extends React_2.PureComponent<
|
|
113
|
+
PersonResultProps
|
|
114
|
+
> {
|
|
115
|
+
static defaultProps: Partial<PersonResultProps>;
|
|
116
|
+
getMention: () => string | undefined;
|
|
117
|
+
getAvatar: () => {};
|
|
118
|
+
render(): JSX.Element;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export declare type PersonResultProps = CommonResultProps & {
|
|
122
|
+
/** Name of the container. Provides the main text to be displayed as the item. */
|
|
123
|
+
name: React_2.ReactNode;
|
|
124
|
+
/** A user's custom handle. Appears to the right of their `name`. It has a lower font-weight. */
|
|
125
|
+
mentionName?: string;
|
|
126
|
+
/** A character with which to prefix the `mentionName`. Defaults to '@' */
|
|
127
|
+
mentionPrefix?: string;
|
|
128
|
+
/** Text to be shown alongside the main `text`. */
|
|
129
|
+
presenceMessage?: React_2.ReactNode;
|
|
130
|
+
/** Sets the appearance of the presence indicator */
|
|
131
|
+
presenceState?: 'online' | 'busy' | 'offline' | null;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
declare type Props = {
|
|
135
|
+
/** Text to appear as heading above group. Will be auto-capitalised. */
|
|
136
|
+
title: React_2.ReactNode;
|
|
137
|
+
/** React Elements to be displayed within the group. This should generally be a collection of ResultItems. */
|
|
138
|
+
children?: React_2.ReactNode;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
declare type Props_2 = {
|
|
142
|
+
/** Text to appear to the right of the text. It has a lower font-weight. */
|
|
143
|
+
caption?: string;
|
|
144
|
+
/** Location to link out to on click. This is passed down to the custom link component if one is provided. */
|
|
145
|
+
href?: string;
|
|
146
|
+
/** Target frame for item `href` link to be aimed at. */
|
|
147
|
+
target?: string;
|
|
148
|
+
/** React element to appear to the left of the text. This should be an @atlaskit/icon component. */
|
|
149
|
+
icon?: React_2.ReactNode;
|
|
150
|
+
/** Makes the navigation item appear with reduced padding and font size. */
|
|
151
|
+
isCompact?: boolean;
|
|
152
|
+
/** Set whether the item should be highlighted as selected. Selected items have a different background color. */
|
|
153
|
+
isSelected?: boolean;
|
|
154
|
+
/** Set whether the item has been highlighted using mouse navigation. Mouse selected items will not display the selectedIcon. */
|
|
155
|
+
isMouseSelected?: boolean;
|
|
156
|
+
/** Function to be called on click. This is passed down to a custom link component, if one is provided. */
|
|
157
|
+
onClick?(e: MouseEvent): void;
|
|
158
|
+
/** Standard onmouseenter event */
|
|
159
|
+
onMouseEnter?: (e: MouseEvent) => void;
|
|
160
|
+
/** Standard onmouseleave event */
|
|
161
|
+
onMouseLeave?: (e: MouseEvent) => void;
|
|
162
|
+
/** Text to be shown alongside the main `text`. */
|
|
163
|
+
subText?: React_2.ReactNode;
|
|
164
|
+
/** Main text to be displayed as the item. Accepts a react component but in most cases this should just be a string. */
|
|
165
|
+
text?: React_2.ReactNode;
|
|
166
|
+
/** React component to be placed to the right of the main text. */
|
|
167
|
+
textAfter?: React_2.ReactNode;
|
|
168
|
+
/** React component to be placed to the right of the main text when the item is selected with keyboard navigation. */
|
|
169
|
+
selectedIcon?: React_2.ReactNode;
|
|
170
|
+
/** React component to be used for rendering links */
|
|
171
|
+
linkComponent?: React_2.ComponentType;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
declare type Props_3 = {
|
|
175
|
+
/** Search results in the form of ResultItemGroups containing Result components */
|
|
176
|
+
children: React_2.ReactNode;
|
|
177
|
+
/** Set search loading state */
|
|
178
|
+
isLoading?: boolean;
|
|
179
|
+
/** onBlur callback for search input */
|
|
180
|
+
onSearchBlur?: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
181
|
+
/** onInput callback for search input */
|
|
182
|
+
onSearchInput?: (
|
|
183
|
+
event: React_2.FormEvent<HTMLInputElement>,
|
|
184
|
+
isAutocompleted?: boolean,
|
|
185
|
+
) => void;
|
|
186
|
+
/** onKeyDown callback for search input */
|
|
187
|
+
onSearchKeyDown?: (event: React_2.KeyboardEvent<HTMLInputElement>) => void;
|
|
188
|
+
/** Called when the user submits the search form without selecting a result */
|
|
189
|
+
onSearchSubmit?: (event: React_2.KeyboardEvent<HTMLInputElement>) => void;
|
|
190
|
+
/** Placeholder text for search input field */
|
|
191
|
+
placeholder?: string;
|
|
192
|
+
/** Value of the search input field */
|
|
193
|
+
value?: string;
|
|
194
|
+
/** Corresponds to the `resultId` of the selected result */
|
|
195
|
+
selectedResultId?: SelectedResultId;
|
|
196
|
+
/** Optional way of being notified when the selected result changes due to keyboard nav */
|
|
197
|
+
onSelectedResultIdChanged?: (id: SelectedResultId) => void;
|
|
198
|
+
firePrivateAnalyticsEvent?: (eventName: string, eventData: Object) => void;
|
|
199
|
+
/** React component to be used for rendering links */
|
|
200
|
+
linkComponent?: React_2.ComponentType<any>;
|
|
201
|
+
/** The elements to render to the right of the search input. */
|
|
202
|
+
inputControls?: React_2.ReactNode;
|
|
203
|
+
/** One string that is used to autocomplete the current search query */
|
|
204
|
+
autocompleteText?: string;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
declare type Props_4 = {
|
|
208
|
+
/** The elements to render as options to search from. */
|
|
209
|
+
children?: React_2.ReactNode;
|
|
210
|
+
/** The elements to render to the right of the search input. */
|
|
211
|
+
inputControls?: React_2.ReactNode;
|
|
212
|
+
/** Set whether the loading state should be shown. */
|
|
213
|
+
isLoading?: boolean;
|
|
214
|
+
/** Function to be called when the search input loses focus. */
|
|
215
|
+
onBlur?: (event: React_2.FocusEvent<HTMLInputElement>) => void;
|
|
216
|
+
/** Function to be called when a input action occurs (native `oninput` event). */
|
|
217
|
+
onInput?: (event: React_2.FormEvent<HTMLInputElement>) => void;
|
|
218
|
+
/** Function to be called when the user hits the escape key. */
|
|
219
|
+
onKeyDown?: (event: React_2.KeyboardEvent<HTMLInputElement>) => void;
|
|
220
|
+
/** Placeholder text for search field. */
|
|
221
|
+
placeholder?: string;
|
|
222
|
+
/** Current value of search field. */
|
|
223
|
+
value?: string;
|
|
224
|
+
/** Autocomplete information */
|
|
225
|
+
autocompleteText?: string;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
declare namespace quickSearchResultTypes {
|
|
229
|
+
export { ContainerResult, ObjectResult, PersonResult, ResultBase };
|
|
230
|
+
}
|
|
231
|
+
export { quickSearchResultTypes };
|
|
232
|
+
|
|
233
|
+
export declare const ResultBase: (props: ResultBaseProps) => JSX.Element;
|
|
234
|
+
|
|
235
|
+
declare class ResultBase_2 extends React_2.PureComponent<
|
|
236
|
+
DefaultProps & ResultBaseProps
|
|
237
|
+
> {
|
|
238
|
+
static defaultProps: Partial<ResultBaseProps>;
|
|
239
|
+
state: {
|
|
240
|
+
isMouseSelected: boolean;
|
|
241
|
+
};
|
|
242
|
+
registerResult(): void;
|
|
243
|
+
componentDidMount(): void;
|
|
244
|
+
componentDidUpdate(): void;
|
|
245
|
+
componentWillUnmount(): void;
|
|
246
|
+
getAnalyticsData(): AnalyticsData;
|
|
247
|
+
handleClick: (e: MouseEvent) => void;
|
|
248
|
+
handleMouseEnter: (event: MouseEvent) => void;
|
|
249
|
+
handleMouseLeave: () => void;
|
|
250
|
+
render(): JSX.Element;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare type ResultBaseProps = CommonResultProps & {
|
|
254
|
+
/** Type of the result. This is passed as a parameter to certain callbacks. */
|
|
255
|
+
type: string;
|
|
256
|
+
/** Main text to be displayed as the item. */
|
|
257
|
+
text: React_2.ReactNode;
|
|
258
|
+
/** Text to be shown alongside the main `text`. */
|
|
259
|
+
subText?: React_2.ReactNode;
|
|
260
|
+
/** Text to appear to the right of the text. It has a lower font-weight. */
|
|
261
|
+
caption?: string;
|
|
262
|
+
/** React element to appear to the left of the text. */
|
|
263
|
+
icon?: React_2.ReactNode;
|
|
264
|
+
/** The context provided by QuickSearch. */
|
|
265
|
+
context?: ResultContextType;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
declare type ResultContextType = {
|
|
269
|
+
/** Register result as keyboard navigation target */
|
|
270
|
+
registerResult: (result: ResultBase_2) => void;
|
|
271
|
+
/** Unregister result as keyboard navigation target */
|
|
272
|
+
unregisterResult: (result: ResultBase_2) => void;
|
|
273
|
+
/** Triggered by mouseEnter event. */
|
|
274
|
+
onMouseEnter: (resultData: ResultData) => void;
|
|
275
|
+
/** Standard onMouseLeave event. */
|
|
276
|
+
onMouseLeave: () => void;
|
|
277
|
+
/** Fires an analytics event */
|
|
278
|
+
sendAnalytics?: (eventName: string, eventData: Object) => void;
|
|
279
|
+
/** get the index of the search result in the list of result */
|
|
280
|
+
getIndex: (resultId: ResultId) => number | null;
|
|
281
|
+
/** React component to be used for rendering links */
|
|
282
|
+
linkComponent?: ComponentType;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
export declare type ResultData = {
|
|
286
|
+
resultId: ResultId;
|
|
287
|
+
type: string;
|
|
288
|
+
event: CancelableEvent;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
declare type ResultId = string | number;
|
|
292
|
+
|
|
293
|
+
declare class ResultItemGroup extends React_2.Component<Props> {
|
|
294
|
+
render(): JSX.Element;
|
|
295
|
+
}
|
|
296
|
+
export { ResultItemGroup as AkNavigationItemGroup };
|
|
297
|
+
export { ResultItemGroup };
|
|
298
|
+
|
|
299
|
+
declare type SelectedResultId = ResultId | null;
|
|
300
|
+
|
|
301
|
+
export {};
|
|
302
|
+
```
|