@atlaskit/link-datasource 1.14.0 → 1.15.0

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 (39) hide show
  1. package/CHANGELOG.md +12 -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 +26 -25
  4. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.js +10 -0
  5. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/errorMessage.js +24 -0
  6. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +35 -0
  7. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/loadingMessage.js +21 -0
  8. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.js +24 -0
  9. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/{async-popup-select/loadingMessage.js → menu-list/selectMessage.js} +16 -9
  10. package/dist/es2019/analytics/constants.js +1 -1
  11. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +19 -9
  12. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.js +10 -0
  13. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/errorMessage.js +17 -0
  14. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +27 -0
  15. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/loadingMessage.js +14 -0
  16. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.js +17 -0
  17. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/{async-popup-select/loadingMessage.js → menu-list/selectMessage.js} +17 -9
  18. package/dist/esm/analytics/constants.js +1 -1
  19. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +26 -25
  20. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.js +10 -0
  21. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/errorMessage.js +17 -0
  22. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +28 -0
  23. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/loadingMessage.js +14 -0
  24. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.js +17 -0
  25. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/selectMessage.js +31 -0
  26. package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.d.ts +10 -0
  27. package/dist/types/ui/jira-issues-modal/basic-filters/ui/menu-list/errorMessage.d.ts +3 -0
  28. package/dist/types/ui/jira-issues-modal/basic-filters/ui/menu-list/index.d.ts +10 -0
  29. package/dist/types/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.d.ts +3 -0
  30. package/dist/types/ui/jira-issues-modal/basic-filters/ui/menu-list/selectMessage.d.ts +9 -0
  31. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.d.ts +10 -0
  32. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/menu-list/errorMessage.d.ts +3 -0
  33. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/menu-list/index.d.ts +10 -0
  34. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/menu-list/noOptionsMessage.d.ts +3 -0
  35. package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/menu-list/selectMessage.d.ts +9 -0
  36. package/package.json +2 -2
  37. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/loadingMessage.js +0 -24
  38. /package/dist/types/ui/jira-issues-modal/basic-filters/ui/{async-popup-select → menu-list}/loadingMessage.d.ts +0 -0
  39. /package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/{async-popup-select → menu-list}/loadingMessage.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#42867](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42867) [`39f66ca6aec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/39f66ca6aec) - Add error state UI to basic filter dropdown.
8
+
9
+ ## 1.14.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#42835](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42835) [`685b3b60d34`](https://bitbucket.org/atlassian/atlassian-frontend/commits/685b3b60d34) - Add empty state UI for basic filter dropdown.
14
+
3
15
  ## 1.14.0
4
16
 
5
17
  ### Minor 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.14.0"
10
+ packageVersion: "1.15.0"
11
11
  };
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
10
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
13
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
14
14
  var _react = _interopRequireWildcard(require("react"));
@@ -16,11 +16,11 @@ var _reactIntlNext = require("react-intl-next");
16
16
  var _useDebounce = require("use-debounce");
17
17
  var _select = require("@atlaskit/select");
18
18
  var _useFilterOptions2 = require("../../hooks/useFilterOptions");
19
+ var _menuList = _interopRequireDefault(require("../menu-list"));
19
20
  var _control = _interopRequireDefault(require("./control"));
20
21
  var _dropdownIndicator = _interopRequireDefault(require("./dropdownIndicator"));
21
22
  var _footer = _interopRequireDefault(require("./footer"));
22
23
  var _formatOptionLabel = _interopRequireDefault(require("./formatOptionLabel"));
23
- var _loadingMessage = _interopRequireDefault(require("./loadingMessage"));
24
24
  var _messages = require("./messages");
25
25
  var _trigger = _interopRequireDefault(require("./trigger"));
26
26
  var _excluded = ["isOpen"];
@@ -88,22 +88,14 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
88
88
  setSelectedOptions(newValue);
89
89
  onSelectionChange(newValue);
90
90
  };
91
- var handleOpenPopup = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
92
- return _regenerator.default.wrap(function _callee2$(_context2) {
93
- while (1) switch (_context2.prev = _context2.next) {
94
- case 0:
95
- if (!(status === 'empty')) {
96
- _context2.next = 3;
97
- break;
98
- }
99
- _context2.next = 3;
100
- return fetchFilterOptions();
101
- case 3:
102
- case "end":
103
- return _context2.stop();
104
- }
105
- }, _callee2);
106
- })), [fetchFilterOptions, status]);
91
+ var handleOpenPopup = (0, _react.useCallback)(function () {
92
+ if (status === 'empty' || status === 'rejected') {
93
+ // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
94
+ fetchFilterOptions({
95
+ searchString: searchTerm
96
+ });
97
+ }
98
+ }, [fetchFilterOptions, searchTerm, status]);
107
99
  (0, _react.useEffect)(function () {
108
100
  if (status === 'resolved') {
109
101
  var _pickerRef$current;
@@ -111,9 +103,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
111
103
  pickerRef === null || pickerRef === void 0 || (_pickerRef$current = pickerRef.current) === null || _pickerRef$current === void 0 || (_pickerRef$current = _pickerRef$current.selectRef) === null || _pickerRef$current === void 0 || (_pickerRef$current = _pickerRef$current.inputRef) === null || _pickerRef$current === void 0 || _pickerRef$current.focus();
112
104
  }
113
105
  }, [status]);
106
+ var filterOptionsLength = filterOptions.length;
107
+ var isError = status === 'rejected';
114
108
  var isLoading = status === 'loading' || status === 'empty';
115
- var shouldShowFooter = status === 'resolved' && filterOptions.length > 0;
116
- var options = isLoading ? [] : filterOptions; // if not set to [], then on loading, no loading UI will be shown
109
+ var isEmpty = status === 'resolved' && filterOptionsLength === 0;
110
+ var shouldShowFooter = status === 'resolved' && filterOptionsLength > 0;
111
+ var options = isLoading || isError ? [] : filterOptions; // if not set to [], for eg: on loading, no loading UI will be shown
117
112
 
118
113
  return /*#__PURE__*/_react.default.createElement(_select.PopupSelect, {
119
114
  isMulti: true,
@@ -132,12 +127,18 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
132
127
  closeMenuOnSelect: false,
133
128
  hideSelectedOptions: false,
134
129
  isLoading: isLoading,
135
- loadingMessage: _loadingMessage.default,
136
130
  placeholder: formatMessage(_messages.asyncPopupSelectMessages.selectPlaceholder),
137
131
  components: {
138
132
  /* @ts-expect-error - This component has stricter OptionType, hence a temp setup untill its made generic */
139
133
  Option: _select.CheckboxOption,
140
134
  Control: _control.default,
135
+ MenuList: function MenuList(props) {
136
+ return /*#__PURE__*/_react.default.createElement(_menuList.default, (0, _extends2.default)({}, props, {
137
+ isError: isError,
138
+ isEmpty: isEmpty,
139
+ isLoading: isLoading
140
+ }));
141
+ },
141
142
  DropdownIndicator: _dropdownIndicator.default,
142
143
  LoadingIndicator: undefined,
143
144
  // disables the three ... indicator in the searchbox when picker is loading
@@ -150,9 +151,9 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
150
151
  formatOptionLabel: _formatOptionLabel.default,
151
152
  onChange: handleOptionSelection,
152
153
  onInputChange: handleInputChange,
153
- target: function target(_ref4) {
154
- var isOpen = _ref4.isOpen,
155
- triggerProps = (0, _objectWithoutProperties2.default)(_ref4, _excluded);
154
+ target: function target(_ref3) {
155
+ var isOpen = _ref3.isOpen,
156
+ triggerProps = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
156
157
  return /*#__PURE__*/_react.default.createElement(_trigger.default, (0, _extends2.default)({}, triggerProps, {
157
158
  filterType: filterType,
158
159
  isSelected: isOpen,
@@ -161,7 +162,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
161
162
  }));
162
163
  },
163
164
  footer: shouldShowFooter && /*#__PURE__*/_react.default.createElement(_footer.default, {
164
- currentDisplayCount: filterOptions.length,
165
+ currentDisplayCount: filterOptionsLength,
165
166
  totalCount: totalCount
166
167
  })
167
168
  });
@@ -39,5 +39,15 @@ var asyncPopupSelectMessages = exports.asyncPopupSelectMessages = {
39
39
  id: 'linkDataSource.basic-filter.loading-message',
40
40
  defaultMessage: 'Loading...',
41
41
  description: 'The text for when options are being loaded in dropdown'
42
+ },
43
+ noOptionsMessage: {
44
+ id: 'linkDataSource.basic-filter.no-options-message',
45
+ defaultMessage: 'No matches found',
46
+ description: 'The text for when no matches are found in dropdown'
47
+ },
48
+ errorMessage: {
49
+ id: 'linkDataSource.basic-filter.error-message',
50
+ defaultMessage: "Couldn't retrieve data",
51
+ description: 'The text for when an error occurs when loading options'
42
52
  }
43
53
  };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
10
+ var _colors = require("@atlaskit/theme/colors");
11
+ var _messages = require("../async-popup-select/messages");
12
+ var _selectMessage = _interopRequireDefault(require("./selectMessage"));
13
+ var CustomErrorMessage = function CustomErrorMessage() {
14
+ return /*#__PURE__*/_react.default.createElement(_selectMessage.default, {
15
+ icon: /*#__PURE__*/_react.default.createElement(_error.default, {
16
+ primaryColor: "var(--ds-icon, ".concat(_colors.N500, ")"),
17
+ label: "",
18
+ size: "xlarge"
19
+ }),
20
+ message: _messages.asyncPopupSelectMessages.errorMessage,
21
+ testId: "jlol-basic-filter-popup-select--error-message"
22
+ });
23
+ };
24
+ var _default = exports.default = CustomErrorMessage;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _select = require("@atlaskit/select");
11
+ var _errorMessage = _interopRequireDefault(require("./errorMessage"));
12
+ var _loadingMessage = _interopRequireDefault(require("./loadingMessage"));
13
+ var _noOptionsMessage = _interopRequireDefault(require("./noOptionsMessage"));
14
+ var _excluded = ["isLoading", "isError", "isEmpty", "children"];
15
+ var CustomMenuList = function CustomMenuList(_ref) {
16
+ var isLoading = _ref.isLoading,
17
+ isError = _ref.isError,
18
+ isEmpty = _ref.isEmpty,
19
+ children = _ref.children,
20
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
21
+ var getChildComponent = function getChildComponent() {
22
+ if (isLoading) {
23
+ return /*#__PURE__*/_react.default.createElement(_loadingMessage.default, null);
24
+ }
25
+ if (isError) {
26
+ return /*#__PURE__*/_react.default.createElement(_errorMessage.default, null);
27
+ }
28
+ if (isEmpty) {
29
+ return /*#__PURE__*/_react.default.createElement(_noOptionsMessage.default, null);
30
+ }
31
+ return children;
32
+ };
33
+ return /*#__PURE__*/_react.default.createElement(_select.components.MenuList, props, getChildComponent());
34
+ };
35
+ var _default = exports.default = CustomMenuList;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
10
+ var _messages = require("../async-popup-select/messages");
11
+ var _selectMessage = _interopRequireDefault(require("./selectMessage"));
12
+ var CustomDropdownLoadingMessage = function CustomDropdownLoadingMessage() {
13
+ return /*#__PURE__*/_react.default.createElement(_selectMessage.default, {
14
+ icon: /*#__PURE__*/_react.default.createElement(_spinner.default, {
15
+ size: "large"
16
+ }),
17
+ message: _messages.asyncPopupSelectMessages.loadingMessage,
18
+ testId: "jlol-basic-filter-popup-select--loading-message"
19
+ });
20
+ };
21
+ var _default = exports.default = CustomDropdownLoadingMessage;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/question-circle"));
10
+ var _colors = require("@atlaskit/theme/colors");
11
+ var _messages = require("../async-popup-select/messages");
12
+ var _selectMessage = _interopRequireDefault(require("./selectMessage"));
13
+ var CustomNoOptionsMessage = function CustomNoOptionsMessage() {
14
+ return /*#__PURE__*/_react.default.createElement(_selectMessage.default, {
15
+ icon: /*#__PURE__*/_react.default.createElement(_questionCircle.default, {
16
+ primaryColor: "var(--ds-icon, ".concat(_colors.N500, ")"),
17
+ size: "xlarge",
18
+ label: ""
19
+ }),
20
+ message: _messages.asyncPopupSelectMessages.noOptionsMessage,
21
+ testId: "jlol-basic-filter-popup-select--no-options-message"
22
+ });
23
+ };
24
+ var _default = exports.default = CustomNoOptionsMessage;
@@ -9,23 +9,30 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
11
11
  var _primitives = require("@atlaskit/primitives");
12
- var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
13
- var _messages = require("./messages");
14
12
  var boxStyles = (0, _primitives.xcss)({
15
13
  height: "var(--ds-space-800, 64px)",
16
14
  marginBottom: "var(--ds-space-200, 16px)"
17
15
  });
18
- var CustomDropdownLoadingMessage = function CustomDropdownLoadingMessage() {
16
+ var stackStyles = (0, _primitives.xcss)({
17
+ paddingTop: 'space.100',
18
+ paddingBottom: 'space.100',
19
+ paddingLeft: 'space.150',
20
+ paddingRight: 'space.150'
21
+ });
22
+ var CustomSelectMessage = function CustomSelectMessage(_ref) {
23
+ var icon = _ref.icon,
24
+ message = _ref.message,
25
+ testId = _ref.testId;
19
26
  return /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
20
- testId: "jlol-basic-filter-popup-select--loading-message"
27
+ xcss: stackStyles,
28
+ testId: testId,
29
+ alignInline: "center"
21
30
  }, /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
22
31
  xcss: boxStyles,
23
32
  alignItems: "center",
24
33
  justifyContent: "center"
25
- }, /*#__PURE__*/_react.default.createElement(_spinner.default, {
26
- size: "large"
27
- })), /*#__PURE__*/_react.default.createElement(_heading.default, {
34
+ }, icon), /*#__PURE__*/_react.default.createElement(_heading.default, {
28
35
  level: "h400"
29
- }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.asyncPopupSelectMessages.loadingMessage)));
36
+ }, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, message)));
30
37
  };
31
- var _default = exports.default = CustomDropdownLoadingMessage;
38
+ var _default = exports.default = CustomSelectMessage;
@@ -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.14.0"
4
+ packageVersion: "1.15.0"
5
5
  };
@@ -4,11 +4,11 @@ import { useIntl } from 'react-intl-next';
4
4
  import { useDebouncedCallback } from 'use-debounce';
5
5
  import { CheckboxOption, PopupSelect } from '@atlaskit/select';
6
6
  import { useFilterOptions } from '../../hooks/useFilterOptions';
7
+ import CustomMenuList from '../menu-list';
7
8
  import CustomControl from './control';
8
9
  import CustomDropdownIndicator from './dropdownIndicator';
9
10
  import PopupFooter from './footer';
10
11
  import formatOptionLabel from './formatOptionLabel';
11
- import CustomDropdownLoadingMessage from './loadingMessage';
12
12
  import { asyncPopupSelectMessages } from './messages';
13
13
  import PopupTrigger from './trigger';
14
14
  // Needed to disable filtering from react-select
@@ -51,11 +51,14 @@ const AsyncPopupSelect = ({
51
51
  setSelectedOptions(newValue);
52
52
  onSelectionChange(newValue);
53
53
  };
54
- const handleOpenPopup = useCallback(async () => {
55
- if (status === 'empty') {
56
- await fetchFilterOptions();
54
+ const handleOpenPopup = useCallback(() => {
55
+ if (status === 'empty' || status === 'rejected') {
56
+ // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
57
+ fetchFilterOptions({
58
+ searchString: searchTerm
59
+ });
57
60
  }
58
- }, [fetchFilterOptions, status]);
61
+ }, [fetchFilterOptions, searchTerm, status]);
59
62
  useEffect(() => {
60
63
  if (status === 'resolved') {
61
64
  var _pickerRef$current, _pickerRef$current$se, _pickerRef$current$se2;
@@ -63,9 +66,12 @@ const AsyncPopupSelect = ({
63
66
  pickerRef === null || pickerRef === void 0 ? void 0 : (_pickerRef$current = pickerRef.current) === null || _pickerRef$current === void 0 ? void 0 : (_pickerRef$current$se = _pickerRef$current.selectRef) === null || _pickerRef$current$se === void 0 ? void 0 : (_pickerRef$current$se2 = _pickerRef$current$se.inputRef) === null || _pickerRef$current$se2 === void 0 ? void 0 : _pickerRef$current$se2.focus();
64
67
  }
65
68
  }, [status]);
69
+ const filterOptionsLength = filterOptions.length;
70
+ const isError = status === 'rejected';
66
71
  const isLoading = status === 'loading' || status === 'empty';
67
- const shouldShowFooter = status === 'resolved' && filterOptions.length > 0;
68
- const options = isLoading ? [] : filterOptions; // if not set to [], then on loading, no loading UI will be shown
72
+ const isEmpty = status === 'resolved' && filterOptionsLength === 0;
73
+ const shouldShowFooter = status === 'resolved' && filterOptionsLength > 0;
74
+ const options = isLoading || isError ? [] : filterOptions; // if not set to [], for eg: on loading, no loading UI will be shown
69
75
 
70
76
  return /*#__PURE__*/React.createElement(PopupSelect, {
71
77
  isMulti: true,
@@ -84,12 +90,16 @@ const AsyncPopupSelect = ({
84
90
  closeMenuOnSelect: false,
85
91
  hideSelectedOptions: false,
86
92
  isLoading: isLoading,
87
- loadingMessage: CustomDropdownLoadingMessage,
88
93
  placeholder: formatMessage(asyncPopupSelectMessages.selectPlaceholder),
89
94
  components: {
90
95
  /* @ts-expect-error - This component has stricter OptionType, hence a temp setup untill its made generic */
91
96
  Option: CheckboxOption,
92
97
  Control: CustomControl,
98
+ MenuList: props => /*#__PURE__*/React.createElement(CustomMenuList, _extends({}, props, {
99
+ isError: isError,
100
+ isEmpty: isEmpty,
101
+ isLoading: isLoading
102
+ })),
93
103
  DropdownIndicator: CustomDropdownIndicator,
94
104
  LoadingIndicator: undefined,
95
105
  // disables the three ... indicator in the searchbox when picker is loading
@@ -112,7 +122,7 @@ const AsyncPopupSelect = ({
112
122
  isDisabled: isDisabled
113
123
  })),
114
124
  footer: shouldShowFooter && /*#__PURE__*/React.createElement(PopupFooter, {
115
- currentDisplayCount: filterOptions.length,
125
+ currentDisplayCount: filterOptionsLength,
116
126
  totalCount: totalCount
117
127
  })
118
128
  });
@@ -33,5 +33,15 @@ export const asyncPopupSelectMessages = {
33
33
  id: 'linkDataSource.basic-filter.loading-message',
34
34
  defaultMessage: 'Loading...',
35
35
  description: 'The text for when options are being loaded in dropdown'
36
+ },
37
+ noOptionsMessage: {
38
+ id: 'linkDataSource.basic-filter.no-options-message',
39
+ defaultMessage: 'No matches found',
40
+ description: 'The text for when no matches are found in dropdown'
41
+ },
42
+ errorMessage: {
43
+ id: 'linkDataSource.basic-filter.error-message',
44
+ defaultMessage: "Couldn't retrieve data",
45
+ description: 'The text for when an error occurs when loading options'
36
46
  }
37
47
  };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import ErrorIcon from '@atlaskit/icon/glyph/error';
3
+ import { N500 } from '@atlaskit/theme/colors';
4
+ import { asyncPopupSelectMessages } from '../async-popup-select/messages';
5
+ import CustomSelectMessage from './selectMessage';
6
+ const CustomErrorMessage = () => {
7
+ return /*#__PURE__*/React.createElement(CustomSelectMessage, {
8
+ icon: /*#__PURE__*/React.createElement(ErrorIcon, {
9
+ primaryColor: `var(--ds-icon, ${N500})`,
10
+ label: "",
11
+ size: "xlarge"
12
+ }),
13
+ message: asyncPopupSelectMessages.errorMessage,
14
+ testId: "jlol-basic-filter-popup-select--error-message"
15
+ });
16
+ };
17
+ export default CustomErrorMessage;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { components } from '@atlaskit/select';
3
+ import CustomErrorMessage from './errorMessage';
4
+ import CustomDropdownLoadingMessage from './loadingMessage';
5
+ import CustomNoOptionsMessage from './noOptionsMessage';
6
+ const CustomMenuList = ({
7
+ isLoading,
8
+ isError,
9
+ isEmpty,
10
+ children,
11
+ ...props
12
+ }) => {
13
+ const getChildComponent = () => {
14
+ if (isLoading) {
15
+ return /*#__PURE__*/React.createElement(CustomDropdownLoadingMessage, null);
16
+ }
17
+ if (isError) {
18
+ return /*#__PURE__*/React.createElement(CustomErrorMessage, null);
19
+ }
20
+ if (isEmpty) {
21
+ return /*#__PURE__*/React.createElement(CustomNoOptionsMessage, null);
22
+ }
23
+ return children;
24
+ };
25
+ return /*#__PURE__*/React.createElement(components.MenuList, props, getChildComponent());
26
+ };
27
+ export default CustomMenuList;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import Spinner from '@atlaskit/spinner';
3
+ import { asyncPopupSelectMessages } from '../async-popup-select/messages';
4
+ import CustomSelectMessage from './selectMessage';
5
+ const CustomDropdownLoadingMessage = () => {
6
+ return /*#__PURE__*/React.createElement(CustomSelectMessage, {
7
+ icon: /*#__PURE__*/React.createElement(Spinner, {
8
+ size: "large"
9
+ }),
10
+ message: asyncPopupSelectMessages.loadingMessage,
11
+ testId: "jlol-basic-filter-popup-select--loading-message"
12
+ });
13
+ };
14
+ export default CustomDropdownLoadingMessage;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
3
+ import { N500 } from '@atlaskit/theme/colors';
4
+ import { asyncPopupSelectMessages } from '../async-popup-select/messages';
5
+ import CustomSelectMessage from './selectMessage';
6
+ const CustomNoOptionsMessage = () => {
7
+ return /*#__PURE__*/React.createElement(CustomSelectMessage, {
8
+ icon: /*#__PURE__*/React.createElement(QuestionCircleIcon, {
9
+ primaryColor: `var(--ds-icon, ${N500})`,
10
+ size: "xlarge",
11
+ label: ""
12
+ }),
13
+ message: asyncPopupSelectMessages.noOptionsMessage,
14
+ testId: "jlol-basic-filter-popup-select--no-options-message"
15
+ });
16
+ };
17
+ export default CustomNoOptionsMessage;
@@ -2,23 +2,31 @@ import React from 'react';
2
2
  import { FormattedMessage } from 'react-intl-next';
3
3
  import Heading from '@atlaskit/heading';
4
4
  import { Flex, Stack, xcss } from '@atlaskit/primitives';
5
- import Spinner from '@atlaskit/spinner';
6
- import { asyncPopupSelectMessages } from './messages';
7
5
  const boxStyles = xcss({
8
6
  height: "var(--ds-space-800, 64px)",
9
7
  marginBottom: "var(--ds-space-200, 16px)"
10
8
  });
11
- const CustomDropdownLoadingMessage = () => {
9
+ const stackStyles = xcss({
10
+ paddingTop: 'space.100',
11
+ paddingBottom: 'space.100',
12
+ paddingLeft: 'space.150',
13
+ paddingRight: 'space.150'
14
+ });
15
+ const CustomSelectMessage = ({
16
+ icon,
17
+ message,
18
+ testId
19
+ }) => {
12
20
  return /*#__PURE__*/React.createElement(Stack, {
13
- testId: "jlol-basic-filter-popup-select--loading-message"
21
+ xcss: stackStyles,
22
+ testId: testId,
23
+ alignInline: "center"
14
24
  }, /*#__PURE__*/React.createElement(Flex, {
15
25
  xcss: boxStyles,
16
26
  alignItems: "center",
17
27
  justifyContent: "center"
18
- }, /*#__PURE__*/React.createElement(Spinner, {
19
- size: "large"
20
- })), /*#__PURE__*/React.createElement(Heading, {
28
+ }, icon), /*#__PURE__*/React.createElement(Heading, {
21
29
  level: "h400"
22
- }, /*#__PURE__*/React.createElement(FormattedMessage, asyncPopupSelectMessages.loadingMessage)));
30
+ }, /*#__PURE__*/React.createElement(FormattedMessage, message)));
23
31
  };
24
- export default CustomDropdownLoadingMessage;
32
+ export default CustomSelectMessage;
@@ -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.14.0"
4
+ packageVersion: "1.15.0"
5
5
  };
@@ -1,5 +1,5 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  var _excluded = ["isOpen"];
@@ -9,11 +9,11 @@ import { useIntl } from 'react-intl-next';
9
9
  import { useDebouncedCallback } from 'use-debounce';
10
10
  import { CheckboxOption, PopupSelect } from '@atlaskit/select';
11
11
  import { useFilterOptions } from '../../hooks/useFilterOptions';
12
+ import CustomMenuList from '../menu-list';
12
13
  import CustomControl from './control';
13
14
  import CustomDropdownIndicator from './dropdownIndicator';
14
15
  import PopupFooter from './footer';
15
16
  import formatOptionLabel from './formatOptionLabel';
16
- import CustomDropdownLoadingMessage from './loadingMessage';
17
17
  import { asyncPopupSelectMessages } from './messages';
18
18
  import PopupTrigger from './trigger';
19
19
  // Needed to disable filtering from react-select
@@ -78,22 +78,14 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
78
78
  setSelectedOptions(newValue);
79
79
  onSelectionChange(newValue);
80
80
  };
81
- var handleOpenPopup = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
82
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
83
- while (1) switch (_context2.prev = _context2.next) {
84
- case 0:
85
- if (!(status === 'empty')) {
86
- _context2.next = 3;
87
- break;
88
- }
89
- _context2.next = 3;
90
- return fetchFilterOptions();
91
- case 3:
92
- case "end":
93
- return _context2.stop();
94
- }
95
- }, _callee2);
96
- })), [fetchFilterOptions, status]);
81
+ var handleOpenPopup = useCallback(function () {
82
+ if (status === 'empty' || status === 'rejected') {
83
+ // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
84
+ fetchFilterOptions({
85
+ searchString: searchTerm
86
+ });
87
+ }
88
+ }, [fetchFilterOptions, searchTerm, status]);
97
89
  useEffect(function () {
98
90
  if (status === 'resolved') {
99
91
  var _pickerRef$current;
@@ -101,9 +93,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
101
93
  pickerRef === null || pickerRef === void 0 || (_pickerRef$current = pickerRef.current) === null || _pickerRef$current === void 0 || (_pickerRef$current = _pickerRef$current.selectRef) === null || _pickerRef$current === void 0 || (_pickerRef$current = _pickerRef$current.inputRef) === null || _pickerRef$current === void 0 || _pickerRef$current.focus();
102
94
  }
103
95
  }, [status]);
96
+ var filterOptionsLength = filterOptions.length;
97
+ var isError = status === 'rejected';
104
98
  var isLoading = status === 'loading' || status === 'empty';
105
- var shouldShowFooter = status === 'resolved' && filterOptions.length > 0;
106
- var options = isLoading ? [] : filterOptions; // if not set to [], then on loading, no loading UI will be shown
99
+ var isEmpty = status === 'resolved' && filterOptionsLength === 0;
100
+ var shouldShowFooter = status === 'resolved' && filterOptionsLength > 0;
101
+ var options = isLoading || isError ? [] : filterOptions; // if not set to [], for eg: on loading, no loading UI will be shown
107
102
 
108
103
  return /*#__PURE__*/React.createElement(PopupSelect, {
109
104
  isMulti: true,
@@ -122,12 +117,18 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
122
117
  closeMenuOnSelect: false,
123
118
  hideSelectedOptions: false,
124
119
  isLoading: isLoading,
125
- loadingMessage: CustomDropdownLoadingMessage,
126
120
  placeholder: formatMessage(asyncPopupSelectMessages.selectPlaceholder),
127
121
  components: {
128
122
  /* @ts-expect-error - This component has stricter OptionType, hence a temp setup untill its made generic */
129
123
  Option: CheckboxOption,
130
124
  Control: CustomControl,
125
+ MenuList: function MenuList(props) {
126
+ return /*#__PURE__*/React.createElement(CustomMenuList, _extends({}, props, {
127
+ isError: isError,
128
+ isEmpty: isEmpty,
129
+ isLoading: isLoading
130
+ }));
131
+ },
131
132
  DropdownIndicator: CustomDropdownIndicator,
132
133
  LoadingIndicator: undefined,
133
134
  // disables the three ... indicator in the searchbox when picker is loading
@@ -140,9 +141,9 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
140
141
  formatOptionLabel: formatOptionLabel,
141
142
  onChange: handleOptionSelection,
142
143
  onInputChange: handleInputChange,
143
- target: function target(_ref4) {
144
- var isOpen = _ref4.isOpen,
145
- triggerProps = _objectWithoutProperties(_ref4, _excluded);
144
+ target: function target(_ref3) {
145
+ var isOpen = _ref3.isOpen,
146
+ triggerProps = _objectWithoutProperties(_ref3, _excluded);
146
147
  return /*#__PURE__*/React.createElement(PopupTrigger, _extends({}, triggerProps, {
147
148
  filterType: filterType,
148
149
  isSelected: isOpen,
@@ -151,7 +152,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
151
152
  }));
152
153
  },
153
154
  footer: shouldShowFooter && /*#__PURE__*/React.createElement(PopupFooter, {
154
- currentDisplayCount: filterOptions.length,
155
+ currentDisplayCount: filterOptionsLength,
155
156
  totalCount: totalCount
156
157
  })
157
158
  });
@@ -33,5 +33,15 @@ export var asyncPopupSelectMessages = {
33
33
  id: 'linkDataSource.basic-filter.loading-message',
34
34
  defaultMessage: 'Loading...',
35
35
  description: 'The text for when options are being loaded in dropdown'
36
+ },
37
+ noOptionsMessage: {
38
+ id: 'linkDataSource.basic-filter.no-options-message',
39
+ defaultMessage: 'No matches found',
40
+ description: 'The text for when no matches are found in dropdown'
41
+ },
42
+ errorMessage: {
43
+ id: 'linkDataSource.basic-filter.error-message',
44
+ defaultMessage: "Couldn't retrieve data",
45
+ description: 'The text for when an error occurs when loading options'
36
46
  }
37
47
  };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import ErrorIcon from '@atlaskit/icon/glyph/error';
3
+ import { N500 } from '@atlaskit/theme/colors';
4
+ import { asyncPopupSelectMessages } from '../async-popup-select/messages';
5
+ import CustomSelectMessage from './selectMessage';
6
+ var CustomErrorMessage = function CustomErrorMessage() {
7
+ return /*#__PURE__*/React.createElement(CustomSelectMessage, {
8
+ icon: /*#__PURE__*/React.createElement(ErrorIcon, {
9
+ primaryColor: "var(--ds-icon, ".concat(N500, ")"),
10
+ label: "",
11
+ size: "xlarge"
12
+ }),
13
+ message: asyncPopupSelectMessages.errorMessage,
14
+ testId: "jlol-basic-filter-popup-select--error-message"
15
+ });
16
+ };
17
+ export default CustomErrorMessage;
@@ -0,0 +1,28 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ var _excluded = ["isLoading", "isError", "isEmpty", "children"];
3
+ import React from 'react';
4
+ import { components } from '@atlaskit/select';
5
+ import CustomErrorMessage from './errorMessage';
6
+ import CustomDropdownLoadingMessage from './loadingMessage';
7
+ import CustomNoOptionsMessage from './noOptionsMessage';
8
+ var CustomMenuList = function CustomMenuList(_ref) {
9
+ var isLoading = _ref.isLoading,
10
+ isError = _ref.isError,
11
+ isEmpty = _ref.isEmpty,
12
+ children = _ref.children,
13
+ props = _objectWithoutProperties(_ref, _excluded);
14
+ var getChildComponent = function getChildComponent() {
15
+ if (isLoading) {
16
+ return /*#__PURE__*/React.createElement(CustomDropdownLoadingMessage, null);
17
+ }
18
+ if (isError) {
19
+ return /*#__PURE__*/React.createElement(CustomErrorMessage, null);
20
+ }
21
+ if (isEmpty) {
22
+ return /*#__PURE__*/React.createElement(CustomNoOptionsMessage, null);
23
+ }
24
+ return children;
25
+ };
26
+ return /*#__PURE__*/React.createElement(components.MenuList, props, getChildComponent());
27
+ };
28
+ export default CustomMenuList;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import Spinner from '@atlaskit/spinner';
3
+ import { asyncPopupSelectMessages } from '../async-popup-select/messages';
4
+ import CustomSelectMessage from './selectMessage';
5
+ var CustomDropdownLoadingMessage = function CustomDropdownLoadingMessage() {
6
+ return /*#__PURE__*/React.createElement(CustomSelectMessage, {
7
+ icon: /*#__PURE__*/React.createElement(Spinner, {
8
+ size: "large"
9
+ }),
10
+ message: asyncPopupSelectMessages.loadingMessage,
11
+ testId: "jlol-basic-filter-popup-select--loading-message"
12
+ });
13
+ };
14
+ export default CustomDropdownLoadingMessage;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
3
+ import { N500 } from '@atlaskit/theme/colors';
4
+ import { asyncPopupSelectMessages } from '../async-popup-select/messages';
5
+ import CustomSelectMessage from './selectMessage';
6
+ var CustomNoOptionsMessage = function CustomNoOptionsMessage() {
7
+ return /*#__PURE__*/React.createElement(CustomSelectMessage, {
8
+ icon: /*#__PURE__*/React.createElement(QuestionCircleIcon, {
9
+ primaryColor: "var(--ds-icon, ".concat(N500, ")"),
10
+ size: "xlarge",
11
+ label: ""
12
+ }),
13
+ message: asyncPopupSelectMessages.noOptionsMessage,
14
+ testId: "jlol-basic-filter-popup-select--no-options-message"
15
+ });
16
+ };
17
+ export default CustomNoOptionsMessage;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { FormattedMessage } from 'react-intl-next';
3
+ import Heading from '@atlaskit/heading';
4
+ import { Flex, Stack, xcss } from '@atlaskit/primitives';
5
+ var boxStyles = xcss({
6
+ height: "var(--ds-space-800, 64px)",
7
+ marginBottom: "var(--ds-space-200, 16px)"
8
+ });
9
+ var stackStyles = xcss({
10
+ paddingTop: 'space.100',
11
+ paddingBottom: 'space.100',
12
+ paddingLeft: 'space.150',
13
+ paddingRight: 'space.150'
14
+ });
15
+ var CustomSelectMessage = function CustomSelectMessage(_ref) {
16
+ var icon = _ref.icon,
17
+ message = _ref.message,
18
+ testId = _ref.testId;
19
+ return /*#__PURE__*/React.createElement(Stack, {
20
+ xcss: stackStyles,
21
+ testId: testId,
22
+ alignInline: "center"
23
+ }, /*#__PURE__*/React.createElement(Flex, {
24
+ xcss: boxStyles,
25
+ alignItems: "center",
26
+ justifyContent: "center"
27
+ }, icon), /*#__PURE__*/React.createElement(Heading, {
28
+ level: "h400"
29
+ }, /*#__PURE__*/React.createElement(FormattedMessage, message)));
30
+ };
31
+ export default CustomSelectMessage;
@@ -34,4 +34,14 @@ export declare const asyncPopupSelectMessages: {
34
34
  defaultMessage: string;
35
35
  description: string;
36
36
  };
37
+ noOptionsMessage: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ errorMessage: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
37
47
  };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CustomErrorMessage: () => JSX.Element;
3
+ export default CustomErrorMessage;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { MenuListComponentProps } from '@atlaskit/select';
3
+ import { SelectOption } from '../../types';
4
+ type CustomProps = {
5
+ isError?: boolean;
6
+ isLoading?: boolean;
7
+ isEmpty?: boolean;
8
+ };
9
+ declare const CustomMenuList: ({ isLoading, isError, isEmpty, children, ...props }: MenuListComponentProps<SelectOption, true> & CustomProps) => JSX.Element;
10
+ export default CustomMenuList;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CustomNoOptionsMessage: () => JSX.Element;
3
+ export default CustomNoOptionsMessage;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ interface CustomSelectMessageProps {
4
+ icon: React.ReactNode;
5
+ message: MessageDescriptor;
6
+ testId: string;
7
+ }
8
+ declare const CustomSelectMessage: ({ icon, message, testId, }: CustomSelectMessageProps) => JSX.Element;
9
+ export default CustomSelectMessage;
@@ -34,4 +34,14 @@ export declare const asyncPopupSelectMessages: {
34
34
  defaultMessage: string;
35
35
  description: string;
36
36
  };
37
+ noOptionsMessage: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ errorMessage: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
37
47
  };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CustomErrorMessage: () => JSX.Element;
3
+ export default CustomErrorMessage;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { MenuListComponentProps } from '@atlaskit/select';
3
+ import { SelectOption } from '../../types';
4
+ type CustomProps = {
5
+ isError?: boolean;
6
+ isLoading?: boolean;
7
+ isEmpty?: boolean;
8
+ };
9
+ declare const CustomMenuList: ({ isLoading, isError, isEmpty, children, ...props }: MenuListComponentProps<SelectOption, true> & CustomProps) => JSX.Element;
10
+ export default CustomMenuList;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CustomNoOptionsMessage: () => JSX.Element;
3
+ export default CustomNoOptionsMessage;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ interface CustomSelectMessageProps {
4
+ icon: React.ReactNode;
5
+ message: MessageDescriptor;
6
+ testId: string;
7
+ }
8
+ declare const CustomSelectMessage: ({ icon, message, testId, }: CustomSelectMessageProps) => JSX.Element;
9
+ export default CustomSelectMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
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.16.0",
48
+ "@atlaskit/linking-common": "^4.17.0",
49
49
  "@atlaskit/linking-types": "^8.4.0",
50
50
  "@atlaskit/lozenge": "^11.4.0",
51
51
  "@atlaskit/modal-dialog": "^12.8.0",
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { FormattedMessage } from 'react-intl-next';
3
- import Heading from '@atlaskit/heading';
4
- import { Flex, Stack, xcss } from '@atlaskit/primitives';
5
- import Spinner from '@atlaskit/spinner';
6
- import { asyncPopupSelectMessages } from './messages';
7
- var boxStyles = xcss({
8
- height: "var(--ds-space-800, 64px)",
9
- marginBottom: "var(--ds-space-200, 16px)"
10
- });
11
- var CustomDropdownLoadingMessage = function CustomDropdownLoadingMessage() {
12
- return /*#__PURE__*/React.createElement(Stack, {
13
- testId: "jlol-basic-filter-popup-select--loading-message"
14
- }, /*#__PURE__*/React.createElement(Flex, {
15
- xcss: boxStyles,
16
- alignItems: "center",
17
- justifyContent: "center"
18
- }, /*#__PURE__*/React.createElement(Spinner, {
19
- size: "large"
20
- })), /*#__PURE__*/React.createElement(Heading, {
21
- level: "h400"
22
- }, /*#__PURE__*/React.createElement(FormattedMessage, asyncPopupSelectMessages.loadingMessage)));
23
- };
24
- export default CustomDropdownLoadingMessage;