@atlaskit/link-datasource 1.16.2 → 1.16.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.
Files changed (24) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/analytics/constants.js +1 -1
  3. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -2
  4. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +6 -3
  5. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.js +27 -2
  6. package/dist/es2019/analytics/constants.js +1 -1
  7. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -1
  8. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +4 -1
  9. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.js +23 -2
  10. package/dist/esm/analytics/constants.js +1 -1
  11. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -1
  12. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +6 -3
  13. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.js +24 -2
  14. package/dist/types/analytics/generated/analytics.types.d.ts +7 -1
  15. package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +1 -0
  16. package/dist/types/ui/jira-issues-modal/basic-filters/ui/menu-list/index.d.ts +3 -2
  17. package/dist/types/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.d.ts +4 -1
  18. package/dist/types/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -2
  19. package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +7 -1
  20. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +1 -0
  21. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/menu-list/index.d.ts +3 -2
  22. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.d.ts +4 -1
  23. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -2
  24. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.16.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#43029](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43029) [`e8fc17ac873`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e8fc17ac873) - Add ui analytics event when empty results UI is displayed for basic filter search.
8
+ - Updated dependencies
9
+
3
10
  ## 1.16.2
4
11
 
5
12
  ### Patch Changes
@@ -7,5 +7,5 @@ exports.packageMetaData = exports.EVENT_CHANNEL = void 0;
7
7
  var EVENT_CHANNEL = exports.EVENT_CHANNEL = 'media';
8
8
  var packageMetaData = exports.packageMetaData = {
9
9
  packageName: "@atlaskit/link-datasource",
10
- packageVersion: "1.16.2"
10
+ packageVersion: "1.16.3"
11
11
  };
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = void 0;
8
+ exports.default = exports.SEARCH_DEBOUNCE_MS = void 0;
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
@@ -30,7 +30,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
30
30
  var noFilterOptions = function noFilterOptions() {
31
31
  return true;
32
32
  };
33
- var SEARCH_DEBOUNCE_MS = 350;
33
+ var SEARCH_DEBOUNCE_MS = exports.SEARCH_DEBOUNCE_MS = 350;
34
34
  var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
35
35
  var filterType = _ref.filterType,
36
36
  cloudId = _ref.cloudId,
@@ -146,6 +146,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
146
146
  Control: _control.default,
147
147
  MenuList: function MenuList(props) {
148
148
  return /*#__PURE__*/_react.default.createElement(_menuList.default, (0, _extends2.default)({}, props, {
149
+ filterType: filterType,
149
150
  isError: isError,
150
151
  isEmpty: isEmpty,
151
152
  isLoading: isLoading,
@@ -14,9 +14,10 @@ var _showMoreButton = _interopRequireDefault(require("../async-popup-select/show
14
14
  var _errorMessage = _interopRequireDefault(require("./errorMessage"));
15
15
  var _loadingMessage = _interopRequireDefault(require("./loadingMessage"));
16
16
  var _noOptionsMessage = _interopRequireDefault(require("./noOptionsMessage"));
17
- var _excluded = ["isLoading", "isLoadingMore", "isError", "isEmpty", "showMore", "handleShowMore", "children"];
17
+ var _excluded = ["filterType", "isLoading", "isLoadingMore", "isError", "isEmpty", "showMore", "handleShowMore", "children"];
18
18
  var CustomMenuList = function CustomMenuList(_ref) {
19
- var isLoading = _ref.isLoading,
19
+ var filterType = _ref.filterType,
20
+ isLoading = _ref.isLoading,
20
21
  isLoadingMore = _ref.isLoadingMore,
21
22
  isError = _ref.isError,
22
23
  isEmpty = _ref.isEmpty,
@@ -41,7 +42,9 @@ var CustomMenuList = function CustomMenuList(_ref) {
41
42
  return /*#__PURE__*/_react.default.createElement(_errorMessage.default, null);
42
43
  }
43
44
  if (isEmpty) {
44
- return /*#__PURE__*/_react.default.createElement(_noOptionsMessage.default, null);
45
+ return /*#__PURE__*/_react.default.createElement(_noOptionsMessage.default, {
46
+ filterType: filterType
47
+ });
45
48
  }
46
49
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, shouldDisplayShowMore && /*#__PURE__*/_react.default.createElement(_showMoreButton.default, {
47
50
  onShowMore: handleShowMore
@@ -1,16 +1,41 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _useDebounce = require("use-debounce");
9
12
  var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/question-circle"));
10
13
  var _colors = require("@atlaskit/theme/colors");
14
+ var _analytics = require("../../../../../analytics");
15
+ var _asyncPopupSelect = require("../async-popup-select");
11
16
  var _messages = require("./messages");
12
17
  var _selectMessage = _interopRequireDefault(require("./selectMessage"));
13
- var CustomNoOptionsMessage = function CustomNoOptionsMessage() {
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ var CustomNoOptionsMessage = function CustomNoOptionsMessage(_ref) {
21
+ var filterType = _ref.filterType;
22
+ var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
23
+ fireEvent = _useDatasourceAnalyti.fireEvent;
24
+
25
+ /**
26
+ * Debounce is required because our search is debounced
27
+ * When we type in the input box, it does not trigger a request right away. This means, if you currently having an empty result set, and you do a search,
28
+ * there might be some react render cycles becuause of setting search input value where you could seen an empty UI condition triggered.
29
+ * To fix this, we need to wait till the search debounce period to see if the new results are emtpy or not.
30
+ */
31
+ var _useDebouncedCallback = (0, _useDebounce.useDebouncedCallback)(function () {
32
+ fireEvent('ui.emptyResult.shown.basicSearchDropdown', {
33
+ filterType: filterType
34
+ });
35
+ }, _asyncPopupSelect.SEARCH_DEBOUNCE_MS),
36
+ _useDebouncedCallback2 = (0, _slicedToArray2.default)(_useDebouncedCallback, 1),
37
+ debouncedAnalyticsCallback = _useDebouncedCallback2[0];
38
+ (0, _react.useEffect)(debouncedAnalyticsCallback, [debouncedAnalyticsCallback]);
14
39
  return /*#__PURE__*/_react.default.createElement(_selectMessage.default, {
15
40
  icon: /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
16
41
  primaryColor: "var(--ds-icon, ".concat(_colors.N500, ")"),
@@ -1,5 +1,5 @@
1
1
  export const EVENT_CHANNEL = 'media';
2
2
  export const packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.16.2"
4
+ packageVersion: "1.16.3"
5
5
  };
@@ -13,7 +13,7 @@ import { asyncPopupSelectMessages } from './messages';
13
13
  import PopupTrigger from './trigger';
14
14
  // Needed to disable filtering from react-select
15
15
  const noFilterOptions = () => true;
16
- const SEARCH_DEBOUNCE_MS = 350;
16
+ export const SEARCH_DEBOUNCE_MS = 350;
17
17
  const AsyncPopupSelect = ({
18
18
  filterType,
19
19
  cloudId,
@@ -108,6 +108,7 @@ const AsyncPopupSelect = ({
108
108
  Option: CheckboxOption,
109
109
  Control: CustomControl,
110
110
  MenuList: props => /*#__PURE__*/React.createElement(CustomMenuList, _extends({}, props, {
111
+ filterType: filterType,
111
112
  isError: isError,
112
113
  isEmpty: isEmpty,
113
114
  isLoading: isLoading,
@@ -7,6 +7,7 @@ import CustomErrorMessage from './errorMessage';
7
7
  import CustomDropdownLoadingMessage from './loadingMessage';
8
8
  import CustomNoOptionsMessage from './noOptionsMessage';
9
9
  const CustomMenuList = ({
10
+ filterType,
10
11
  isLoading,
11
12
  isLoadingMore,
12
13
  isError,
@@ -31,7 +32,9 @@ const CustomMenuList = ({
31
32
  return /*#__PURE__*/React.createElement(CustomErrorMessage, null);
32
33
  }
33
34
  if (isEmpty) {
34
- return /*#__PURE__*/React.createElement(CustomNoOptionsMessage, null);
35
+ return /*#__PURE__*/React.createElement(CustomNoOptionsMessage, {
36
+ filterType: filterType
37
+ });
35
38
  }
36
39
  return /*#__PURE__*/React.createElement(React.Fragment, null, children, shouldDisplayShowMore && /*#__PURE__*/React.createElement(ShowMoreButton, {
37
40
  onShowMore: handleShowMore
@@ -1,9 +1,30 @@
1
- import React from 'react';
1
+ import React, { useEffect } from 'react';
2
+ import { useDebouncedCallback } from 'use-debounce';
2
3
  import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
3
4
  import { N500 } from '@atlaskit/theme/colors';
5
+ import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
6
+ import { SEARCH_DEBOUNCE_MS } from '../async-popup-select';
4
7
  import { asyncPopupSelectMessages } from './messages';
5
8
  import CustomSelectMessage from './selectMessage';
6
- const CustomNoOptionsMessage = () => {
9
+ const CustomNoOptionsMessage = ({
10
+ filterType
11
+ }) => {
12
+ const {
13
+ fireEvent
14
+ } = useDatasourceAnalyticsEvents();
15
+
16
+ /**
17
+ * Debounce is required because our search is debounced
18
+ * When we type in the input box, it does not trigger a request right away. This means, if you currently having an empty result set, and you do a search,
19
+ * there might be some react render cycles becuause of setting search input value where you could seen an empty UI condition triggered.
20
+ * To fix this, we need to wait till the search debounce period to see if the new results are emtpy or not.
21
+ */
22
+ const [debouncedAnalyticsCallback] = useDebouncedCallback(() => {
23
+ fireEvent('ui.emptyResult.shown.basicSearchDropdown', {
24
+ filterType
25
+ });
26
+ }, SEARCH_DEBOUNCE_MS);
27
+ useEffect(debouncedAnalyticsCallback, [debouncedAnalyticsCallback]);
7
28
  return /*#__PURE__*/React.createElement(CustomSelectMessage, {
8
29
  icon: /*#__PURE__*/React.createElement(QuestionCircleIcon, {
9
30
  primaryColor: `var(--ds-icon, ${N500})`,
@@ -1,5 +1,5 @@
1
1
  export var EVENT_CHANNEL = 'media';
2
2
  export var packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.16.2"
4
+ packageVersion: "1.16.3"
5
5
  };
@@ -20,7 +20,7 @@ import PopupTrigger from './trigger';
20
20
  var noFilterOptions = function noFilterOptions() {
21
21
  return true;
22
22
  };
23
- var SEARCH_DEBOUNCE_MS = 350;
23
+ export var SEARCH_DEBOUNCE_MS = 350;
24
24
  var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
25
25
  var filterType = _ref.filterType,
26
26
  cloudId = _ref.cloudId,
@@ -136,6 +136,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
136
136
  Control: CustomControl,
137
137
  MenuList: function MenuList(props) {
138
138
  return /*#__PURE__*/React.createElement(CustomMenuList, _extends({}, props, {
139
+ filterType: filterType,
139
140
  isError: isError,
140
141
  isEmpty: isEmpty,
141
142
  isLoading: isLoading,
@@ -1,5 +1,5 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- var _excluded = ["isLoading", "isLoadingMore", "isError", "isEmpty", "showMore", "handleShowMore", "children"];
2
+ var _excluded = ["filterType", "isLoading", "isLoadingMore", "isError", "isEmpty", "showMore", "handleShowMore", "children"];
3
3
  import React from 'react';
4
4
  import { Flex } from '@atlaskit/primitives';
5
5
  import { components } from '@atlaskit/select';
@@ -9,7 +9,8 @@ import CustomErrorMessage from './errorMessage';
9
9
  import CustomDropdownLoadingMessage from './loadingMessage';
10
10
  import CustomNoOptionsMessage from './noOptionsMessage';
11
11
  var CustomMenuList = function CustomMenuList(_ref) {
12
- var isLoading = _ref.isLoading,
12
+ var filterType = _ref.filterType,
13
+ isLoading = _ref.isLoading,
13
14
  isLoadingMore = _ref.isLoadingMore,
14
15
  isError = _ref.isError,
15
16
  isEmpty = _ref.isEmpty,
@@ -34,7 +35,9 @@ var CustomMenuList = function CustomMenuList(_ref) {
34
35
  return /*#__PURE__*/React.createElement(CustomErrorMessage, null);
35
36
  }
36
37
  if (isEmpty) {
37
- return /*#__PURE__*/React.createElement(CustomNoOptionsMessage, null);
38
+ return /*#__PURE__*/React.createElement(CustomNoOptionsMessage, {
39
+ filterType: filterType
40
+ });
38
41
  }
39
42
  return /*#__PURE__*/React.createElement(React.Fragment, null, children, shouldDisplayShowMore && /*#__PURE__*/React.createElement(ShowMoreButton, {
40
43
  onShowMore: handleShowMore
@@ -1,9 +1,31 @@
1
- import React from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import React, { useEffect } from 'react';
3
+ import { useDebouncedCallback } from 'use-debounce';
2
4
  import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
3
5
  import { N500 } from '@atlaskit/theme/colors';
6
+ import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
7
+ import { SEARCH_DEBOUNCE_MS } from '../async-popup-select';
4
8
  import { asyncPopupSelectMessages } from './messages';
5
9
  import CustomSelectMessage from './selectMessage';
6
- var CustomNoOptionsMessage = function CustomNoOptionsMessage() {
10
+ var CustomNoOptionsMessage = function CustomNoOptionsMessage(_ref) {
11
+ var filterType = _ref.filterType;
12
+ var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
13
+ fireEvent = _useDatasourceAnalyti.fireEvent;
14
+
15
+ /**
16
+ * Debounce is required because our search is debounced
17
+ * When we type in the input box, it does not trigger a request right away. This means, if you currently having an empty result set, and you do a search,
18
+ * there might be some react render cycles becuause of setting search input value where you could seen an empty UI condition triggered.
19
+ * To fix this, we need to wait till the search debounce period to see if the new results are emtpy or not.
20
+ */
21
+ var _useDebouncedCallback = useDebouncedCallback(function () {
22
+ fireEvent('ui.emptyResult.shown.basicSearchDropdown', {
23
+ filterType: filterType
24
+ });
25
+ }, SEARCH_DEBOUNCE_MS),
26
+ _useDebouncedCallback2 = _slicedToArray(_useDebouncedCallback, 1),
27
+ debouncedAnalyticsCallback = _useDebouncedCallback2[0];
28
+ useEffect(debouncedAnalyticsCallback, [debouncedAnalyticsCallback]);
7
29
  return /*#__PURE__*/React.createElement(CustomSelectMessage, {
8
30
  icon: /*#__PURE__*/React.createElement(QuestionCircleIcon, {
9
31
  primaryColor: "var(--ds-icon, ".concat(N500, ")"),
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::7e783b41141644b6a0df41de5ab456df>>
6
+ * @codegen <<SignedSource::ea736210c3d6e0528843ce49cebf0610>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -82,6 +82,9 @@ export type LinkViewedCountAttributesType = {
82
82
  totalItemCount: number;
83
83
  extensionKey: string | null;
84
84
  };
85
+ export type EmptyResultShownBasicSearchDropdownAttributesType = {
86
+ filterType: 'project' | 'assignee' | 'issuetype' | 'status';
87
+ };
85
88
  export type AqlEditorSearchedAttributesType = {};
86
89
  export type AnalyticsEventAttributes = {
87
90
  /**
@@ -132,6 +135,9 @@ export type AnalyticsEventAttributes = {
132
135
  /**
133
136
  * Fired when the datasource results are displayed as link( smart-link) in count mode. */
134
137
  'ui.link.viewed.count': LinkViewedCountAttributesType;
138
+ /**
139
+ * Fired when the basic filter search results are empty */
140
+ 'ui.emptyResult.shown.basicSearchDropdown': EmptyResultShownBasicSearchDropdownAttributesType;
135
141
  /**
136
142
  * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
137
143
  'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
@@ -7,5 +7,6 @@ export interface AsyncPopupSelectProps {
7
7
  onSelectionChange?: (selection: SelectOption[]) => void;
8
8
  isDisabled?: boolean;
9
9
  }
10
+ export declare const SEARCH_DEBOUNCE_MS = 350;
10
11
  declare const AsyncPopupSelect: ({ filterType, cloudId, selection, onSelectionChange, isDisabled, }: AsyncPopupSelectProps) => JSX.Element;
11
12
  export default AsyncPopupSelect;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { MenuListComponentProps } from '@atlaskit/select';
3
- import { SelectOption } from '../../types';
3
+ import { BasicFilterFieldType, SelectOption } from '../../types';
4
4
  type CustomProps = {
5
5
  isError?: boolean;
6
6
  isLoading?: boolean;
@@ -8,6 +8,7 @@ type CustomProps = {
8
8
  isEmpty?: boolean;
9
9
  showMore?: boolean;
10
10
  handleShowMore: () => void;
11
+ filterType: BasicFilterFieldType;
11
12
  };
12
- declare const CustomMenuList: ({ isLoading, isLoadingMore, isError, isEmpty, showMore, handleShowMore, children, ...props }: MenuListComponentProps<SelectOption, true> & CustomProps) => JSX.Element;
13
+ declare const CustomMenuList: ({ filterType, isLoading, isLoadingMore, isError, isEmpty, showMore, handleShowMore, children, ...props }: MenuListComponentProps<SelectOption, true> & CustomProps) => JSX.Element;
13
14
  export default CustomMenuList;
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" />
2
- declare const CustomNoOptionsMessage: () => JSX.Element;
2
+ import { BasicFilterFieldType } from '../../types';
3
+ declare const CustomNoOptionsMessage: ({ filterType, }: {
4
+ filterType: BasicFilterFieldType;
5
+ }) => JSX.Element;
3
6
  export default CustomNoOptionsMessage;
@@ -1,9 +1,9 @@
1
1
  import { FieldValuesResponse, HydrateResponse, SelectOption } from '../types';
2
2
  export declare function mapHydrateResponseData({ data }: HydrateResponse): {
3
- status?: SelectOption[] | undefined;
4
- assignee?: SelectOption[] | undefined;
5
3
  project?: SelectOption[] | undefined;
4
+ assignee?: SelectOption[] | undefined;
6
5
  issuetype?: SelectOption[] | undefined;
6
+ status?: SelectOption[] | undefined;
7
7
  };
8
8
  export declare function mapFieldValuesToFilterOptions({ data, }: FieldValuesResponse): SelectOption[];
9
9
  export declare function mapFieldValuesToTotalCount({ data, }: FieldValuesResponse): number;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::7e783b41141644b6a0df41de5ab456df>>
6
+ * @codegen <<SignedSource::ea736210c3d6e0528843ce49cebf0610>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -82,6 +82,9 @@ export type LinkViewedCountAttributesType = {
82
82
  totalItemCount: number;
83
83
  extensionKey: string | null;
84
84
  };
85
+ export type EmptyResultShownBasicSearchDropdownAttributesType = {
86
+ filterType: 'project' | 'assignee' | 'issuetype' | 'status';
87
+ };
85
88
  export type AqlEditorSearchedAttributesType = {};
86
89
  export type AnalyticsEventAttributes = {
87
90
  /**
@@ -132,6 +135,9 @@ export type AnalyticsEventAttributes = {
132
135
  /**
133
136
  * Fired when the datasource results are displayed as link( smart-link) in count mode. */
134
137
  'ui.link.viewed.count': LinkViewedCountAttributesType;
138
+ /**
139
+ * Fired when the basic filter search results are empty */
140
+ 'ui.emptyResult.shown.basicSearchDropdown': EmptyResultShownBasicSearchDropdownAttributesType;
135
141
  /**
136
142
  * Fired when search is initiated via the search icon or enter key press for aql editor input field. */
137
143
  'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
@@ -7,5 +7,6 @@ export interface AsyncPopupSelectProps {
7
7
  onSelectionChange?: (selection: SelectOption[]) => void;
8
8
  isDisabled?: boolean;
9
9
  }
10
+ export declare const SEARCH_DEBOUNCE_MS = 350;
10
11
  declare const AsyncPopupSelect: ({ filterType, cloudId, selection, onSelectionChange, isDisabled, }: AsyncPopupSelectProps) => JSX.Element;
11
12
  export default AsyncPopupSelect;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { MenuListComponentProps } from '@atlaskit/select';
3
- import { SelectOption } from '../../types';
3
+ import { BasicFilterFieldType, SelectOption } from '../../types';
4
4
  type CustomProps = {
5
5
  isError?: boolean;
6
6
  isLoading?: boolean;
@@ -8,6 +8,7 @@ type CustomProps = {
8
8
  isEmpty?: boolean;
9
9
  showMore?: boolean;
10
10
  handleShowMore: () => void;
11
+ filterType: BasicFilterFieldType;
11
12
  };
12
- declare const CustomMenuList: ({ isLoading, isLoadingMore, isError, isEmpty, showMore, handleShowMore, children, ...props }: MenuListComponentProps<SelectOption, true> & CustomProps) => JSX.Element;
13
+ declare const CustomMenuList: ({ filterType, isLoading, isLoadingMore, isError, isEmpty, showMore, handleShowMore, children, ...props }: MenuListComponentProps<SelectOption, true> & CustomProps) => JSX.Element;
13
14
  export default CustomMenuList;
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" />
2
- declare const CustomNoOptionsMessage: () => JSX.Element;
2
+ import { BasicFilterFieldType } from '../../types';
3
+ declare const CustomNoOptionsMessage: ({ filterType, }: {
4
+ filterType: BasicFilterFieldType;
5
+ }) => JSX.Element;
3
6
  export default CustomNoOptionsMessage;
@@ -1,9 +1,9 @@
1
1
  import { FieldValuesResponse, HydrateResponse, SelectOption } from '../types';
2
2
  export declare function mapHydrateResponseData({ data }: HydrateResponse): {
3
- status?: SelectOption[] | undefined;
4
- assignee?: SelectOption[] | undefined;
5
3
  project?: SelectOption[] | undefined;
4
+ assignee?: SelectOption[] | undefined;
6
5
  issuetype?: SelectOption[] | undefined;
6
+ status?: SelectOption[] | undefined;
7
7
  };
8
8
  export declare function mapFieldValuesToFilterOptions({ data, }: FieldValuesResponse): SelectOption[];
9
9
  export declare function mapFieldValuesToTotalCount({ data, }: FieldValuesResponse): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/jql-ast": "^3.0.0",
46
46
  "@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
47
47
  "@atlaskit/link-client-extension": "^1.8.0",
48
- "@atlaskit/linking-common": "^4.17.0",
48
+ "@atlaskit/linking-common": "^4.18.0",
49
49
  "@atlaskit/linking-types": "^8.4.0",
50
50
  "@atlaskit/lozenge": "^11.4.0",
51
51
  "@atlaskit/modal-dialog": "^12.8.0",