@atlaskit/link-datasource 4.32.1 → 4.32.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 (28) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +0 -5
  3. package/dist/cjs/ui/common/modal/basic-search-input/index.js +0 -1
  4. package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +0 -1
  5. package/dist/cjs/ui/common/modal/popup-select/index.js +2 -0
  6. package/dist/cjs/ui/common/modal/popup-select/trigger.js +36 -1
  7. package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +5 -13
  8. package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +4 -10
  9. package/dist/cjs/ui/issue-like-table/edit-type/user/index.js +6 -13
  10. package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +0 -5
  11. package/dist/es2019/ui/common/modal/basic-search-input/index.js +0 -1
  12. package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +0 -1
  13. package/dist/es2019/ui/common/modal/popup-select/index.js +2 -0
  14. package/dist/es2019/ui/common/modal/popup-select/trigger.js +31 -2
  15. package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +5 -9
  16. package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +4 -8
  17. package/dist/es2019/ui/issue-like-table/edit-type/user/index.js +6 -13
  18. package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +0 -5
  19. package/dist/esm/ui/common/modal/basic-search-input/index.js +0 -1
  20. package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +0 -1
  21. package/dist/esm/ui/common/modal/popup-select/index.js +2 -0
  22. package/dist/esm/ui/common/modal/popup-select/trigger.js +37 -2
  23. package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +5 -13
  24. package/dist/esm/ui/issue-like-table/edit-type/status/index.js +4 -10
  25. package/dist/esm/ui/issue-like-table/edit-type/user/index.js +6 -13
  26. package/dist/types/ui/common/modal/popup-select/trigger.d.ts +1 -1
  27. package/dist/types-ts4.5/ui/common/modal/popup-select/trigger.d.ts +1 -1
  28. package/package.json +9 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 4.32.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`08c554687a400`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/08c554687a400) -
8
+ FG cleanup navx-sllv-fix-inline-edit-error
9
+ - Updated dependencies
10
+
11
+ ## 4.32.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`ebd1d53e42731`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebd1d53e42731) -
16
+ [ux] Fix a bug where pressing escape when dropdowns inside modal dialog are opened is closing the
17
+ modal dialog itself. Behind platform_navx_sllv_dropdown_escape_and_focus_fix FG
18
+ - Updated dependencies
19
+
3
20
  ## 4.32.1
4
21
 
5
22
  ### Patch Changes
@@ -61,7 +61,6 @@ var renderValidatorIcon = function renderValidatorIcon(lastValidationResult) {
61
61
  return /*#__PURE__*/React.createElement(_crossCircle.default, {
62
62
  label: "label",
63
63
  color: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
64
- LEGACY_size: "medium",
65
64
  testId: "assets-datasource-modal--aql-invalid",
66
65
  spacing: "spacious"
67
66
  });
@@ -70,14 +69,12 @@ var renderValidatorIcon = function renderValidatorIcon(lastValidationResult) {
70
69
  return /*#__PURE__*/React.createElement(_statusSuccess.default, {
71
70
  label: "label",
72
71
  color: "var(--ds-icon-success, ".concat(_colors.G300, ")"),
73
- LEGACY_size: "medium",
74
72
  testId: "assets-datasource-modal--aql-valid",
75
73
  spacing: "spacious"
76
74
  });
77
75
  }
78
76
  return /*#__PURE__*/React.createElement(_search.default, {
79
77
  label: "label",
80
- LEGACY_size: "medium",
81
78
  testId: "assets-datasource-modal--aql-idle",
82
79
  color: "currentColor",
83
80
  spacing: "spacious"
@@ -119,7 +116,6 @@ var AqlSearchInput = exports.AqlSearchInput = function AqlSearchInput(_ref2) {
119
116
  }, /*#__PURE__*/React.createElement(_questionCircle.default, {
120
117
  label: "label",
121
118
  color: "var(--ds-icon, ".concat(_colors.N500, ")"),
122
- LEGACY_size: "medium",
123
119
  testId: "assets-datasource-modal-help",
124
120
  spacing: "spacious"
125
121
  }))), /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -129,7 +125,6 @@ var AqlSearchInput = exports.AqlSearchInput = function AqlSearchInput(_ref2) {
129
125
  isLoading: isSearching,
130
126
  icon: function icon(iconProps) {
131
127
  return /*#__PURE__*/React.createElement(_search.default, (0, _extends2.default)({}, iconProps, {
132
- LEGACY_size: "medium",
133
128
  spacing: "spacious",
134
129
  color: "currentColor"
135
130
  }));
@@ -57,7 +57,6 @@ var BasicSearchInput = exports.BasicSearchInput = function BasicSearchInput(_ref
57
57
  isLoading: isSearching,
58
58
  icon: function icon(iconProps) {
59
59
  return /*#__PURE__*/React.createElement(_search.default, (0, _extends2.default)({}, iconProps, {
60
- LEGACY_size: "medium",
61
60
  spacing: "spacious",
62
61
  color: "currentColor"
63
62
  }));
@@ -59,7 +59,6 @@ var AvatarOptionLabel = function AvatarOptionLabel(_ref3) {
59
59
  xcss: styles.groupWrapperStyles
60
60
  }, /*#__PURE__*/_react.default.createElement(_peopleGroup.default, {
61
61
  color: "currentColor",
62
- LEGACY_size: "small",
63
62
  label: ""
64
63
  })) : /*#__PURE__*/_react.default.createElement(_avatar.default, {
65
64
  appearance: data.isSquare ? 'square' : 'circle',
@@ -16,6 +16,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
  var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
18
18
  var _reactIntlNext = require("react-intl-next");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _select = require("@atlaskit/select");
20
21
  var _analytics = require("../../../../analytics");
21
22
  var _control = _interopRequireDefault(require("./control"));
@@ -223,6 +224,7 @@ var FilterPopupSelect = exports.FilterPopupSelect = function FilterPopupSelect(_
223
224
  onInputChange: handleInputChange,
224
225
  onOpen: handleMenuOpen,
225
226
  onClose: handleMenuClose,
227
+ shouldPreventEscapePropagation: (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix'),
226
228
  target: function target(_ref3) {
227
229
  var isOpen = _ref3.isOpen,
228
230
  triggerProps = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
@@ -17,6 +17,7 @@ var _badge = _interopRequireDefault(require("@atlaskit/badge"));
17
17
  var _new = _interopRequireDefault(require("@atlaskit/button/new"));
18
18
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
19
19
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
20
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
21
  var _compiled = require("@atlaskit/primitives/compiled");
21
22
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
22
23
  var _excluded = ["as", "style"];
@@ -62,6 +63,15 @@ var PopupTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
62
63
  testId: "".concat(triggerButtonTestId, "--loading-button")
63
64
  }, label));
64
65
  }, [label, triggerButtonTestId]);
66
+ var loadingButton = (0, _react.useMemo)(function () {
67
+ return /*#__PURE__*/_react.default.createElement(LoadingStateAnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_standardButton.default, {
68
+ ref: ref,
69
+ iconAfter: /*#__PURE__*/_react.default.createElement(_spinner.default, {
70
+ size: 'xsmall'
71
+ }),
72
+ testId: "".concat(triggerButtonTestId, "--loading-button")
73
+ }, label));
74
+ }, [label, triggerButtonTestId, ref]);
65
75
  var DefaultButton = (0, _react.useCallback)(function () {
66
76
  return /*#__PURE__*/_react.default.createElement(_new.default, {
67
77
  isSelected: isSelected || hasOptions,
@@ -84,12 +94,37 @@ var PopupTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
84
94
  appearance: "primary"
85
95
  }, "+", selectedOptions.length - 1))));
86
96
  }, [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId]);
97
+ var defaultButton = (0, _react.useMemo)(function () {
98
+ return /*#__PURE__*/_react.default.createElement(_new.default, {
99
+ ref: ref,
100
+ isSelected: isSelected || hasOptions,
101
+ isDisabled: isDisabled,
102
+ iconAfter: function iconAfter() {
103
+ return /*#__PURE__*/_react.default.createElement(_chevronDown.default, {
104
+ label: "",
105
+ color: "currentColor",
106
+ size: "small"
107
+ });
108
+ },
109
+ testId: "".concat(triggerButtonTestId, "--button"),
110
+ "aria-expanded": isSelected
111
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Flex, null, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
112
+ xcss: styles.triggerButtonLabelStyles
113
+ }, label, firstOption && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ": ", firstOption.label)), selectedOptions && selectedOptions.length > 1 && /*#__PURE__*/_react.default.createElement(_compiled.Flex, {
114
+ xcss: styles.badgeStyles,
115
+ alignItems: "center"
116
+ }, /*#__PURE__*/_react.default.createElement(_badge.default, {
117
+ appearance: "primary"
118
+ }, "+", selectedOptions.length - 1))));
119
+ }, [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId, ref]);
87
120
 
88
121
  /**
89
122
  * We had an issue with the popup component referencing a stale DOM ref for the trigger button.
90
123
  * Hence introducing a Box to make sure ref is always the same and only content is refreshed on re-renders
91
124
  */
92
- return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
125
+ return (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix') ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
126
+ testId: triggerButtonTestId
127
+ }, showButtonLoading ? loadingButton : defaultButton) : /*#__PURE__*/_react.default.createElement(_compiled.Box, {
93
128
  ref: ref,
94
129
  testId: triggerButtonTestId
95
130
  }, showButtonLoading ? /*#__PURE__*/_react.default.createElement(LoadingButton, null) : /*#__PURE__*/_react.default.createElement(DefaultButton, null));
@@ -55,14 +55,12 @@ var IconEditType = function IconEditType(props) {
55
55
  // We can't update this field if we don't have an ID - however the ID
56
56
  // is typed optional.
57
57
  ,
58
- options: (0, _platformFeatureFlags.fg)('navx-sllv-fix-inline-edit-error') ? options === null || options === void 0 ? void 0 : options.filter(function (option) {
59
- return option.id;
60
- }) : options.filter(function (option) {
58
+ options: options === null || options === void 0 ? void 0 : options.filter(function (option) {
61
59
  return option.id;
62
60
  }),
63
61
  menuPlacement: "auto",
64
62
  isLoading: isLoading,
65
- filterOption: (0, _platformFeatureFlags.fg)('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
63
+ filterOption: filterOption,
66
64
  testId: "inline-edit-priority",
67
65
  value: currentValue === null || currentValue === void 0 || (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
68
66
  labelId: labelId,
@@ -87,17 +85,11 @@ var IconEditType = function IconEditType(props) {
87
85
  type: 'icon',
88
86
  values: e ? [e] : []
89
87
  });
90
- }
88
+ },
89
+ shouldPreventEscapePropagation: (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
91
90
  })));
92
91
  };
93
-
94
- /**
95
- * Remove on navx-sllv-fix-inline-edit-error cleanup
96
- */
97
- var filterOptionOld = function filterOptionOld(option, inputValue) {
98
- return option.label.toLowerCase().includes(inputValue.toLowerCase());
99
- };
100
- var filterOptionNew = function filterOptionNew(option, inputValue) {
92
+ var filterOption = function filterOption(option, inputValue) {
101
93
  var _option$label, _option$label$toLower;
102
94
  return (_option$label = option.label) === null || _option$label === void 0 || (_option$label$toLower = _option$label.toLowerCase) === null || _option$label$toLower === void 0 || (_option$label$toLower = _option$label$toLower.call(_option$label)) === null || _option$label$toLower === void 0 ? void 0 : _option$label$toLower.includes(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase());
103
95
  };
@@ -55,7 +55,7 @@ var StatusEditType = function StatusEditType(props) {
55
55
  blurInputOnSelect: true,
56
56
  menuPlacement: "auto",
57
57
  isLoading: isLoading,
58
- filterOption: (0, _platformFeatureFlags.fg)('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
58
+ filterOption: filterOption,
59
59
  testId: "inline-edit-status",
60
60
  getOptionValue: function getOptionValue(option) {
61
61
  return option.text;
@@ -80,17 +80,11 @@ var StatusEditType = function StatusEditType(props) {
80
80
  type: 'status',
81
81
  values: e ? [e] : []
82
82
  });
83
- }
83
+ },
84
+ shouldPreventEscapePropagation: (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
84
85
  })));
85
86
  };
86
-
87
- /**
88
- * Remove on navx-sllv-fix-inline-edit-error cleanup
89
- */
90
- var filterOptionOld = function filterOptionOld(option, inputValue) {
91
- return option.data.text.toLowerCase().includes(inputValue.toLowerCase());
92
- };
93
- var filterOptionNew = function filterOptionNew(option, inputValue) {
87
+ var filterOption = function filterOption(option, inputValue) {
94
88
  var _option$data, _option$data$toLowerC, _inputValue$toLowerCa;
95
89
  return (_option$data = option.data) === null || _option$data === void 0 || (_option$data = _option$data.text) === null || _option$data === void 0 || (_option$data$toLowerC = _option$data.toLowerCase) === null || _option$data$toLowerC === void 0 || (_option$data$toLowerC = _option$data$toLowerC.call(_option$data)) === null || _option$data$toLowerC === void 0 ? void 0 : _option$data$toLowerC.includes(inputValue === null || inputValue === void 0 || (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue));
96
90
  };
@@ -85,7 +85,7 @@ var UserEditType = function UserEditType(props) {
85
85
  options: options,
86
86
  isLoading: isLoading,
87
87
  testId: "inline-edit-user",
88
- filterOption: (0, _platformFeatureFlags.fg)('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
88
+ filterOption: filterOption,
89
89
  menuPlacement: "auto",
90
90
  onInputChange: handleUserInputDebounced,
91
91
  value: currentValue === null || currentValue === void 0 || (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
@@ -115,19 +115,12 @@ var UserEditType = function UserEditType(props) {
115
115
  type: 'user',
116
116
  values: e ? [e] : []
117
117
  });
118
- }
118
+ },
119
+ shouldPreventEscapePropagation: (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
119
120
  })));
120
121
  };
121
-
122
- /**
123
- * Remove on navx-sllv-fix-inline-edit-error cleanup
124
- */
125
- var filterOptionOld = function filterOptionOld(option, inputValue) {
126
- var _option$data$displayN, _option$data$displayN2;
127
- return (_option$data$displayN = (_option$data$displayN2 = option.data.displayName) === null || _option$data$displayN2 === void 0 ? void 0 : _option$data$displayN2.toLowerCase().includes(inputValue.toLowerCase())) !== null && _option$data$displayN !== void 0 ? _option$data$displayN : false;
128
- };
129
- var filterOptionNew = function filterOptionNew(option, inputValue) {
130
- var _option$data$displayN3, _option$data, _option$data$toLowerC, _inputValue$toLowerCa;
131
- return (_option$data$displayN3 = (_option$data = option.data) === null || _option$data === void 0 || (_option$data = _option$data.displayName) === null || _option$data === void 0 || (_option$data$toLowerC = _option$data.toLowerCase) === null || _option$data$toLowerC === void 0 || (_option$data$toLowerC = _option$data$toLowerC.call(_option$data)) === null || _option$data$toLowerC === void 0 ? void 0 : _option$data$toLowerC.includes(inputValue === null || inputValue === void 0 || (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue))) !== null && _option$data$displayN3 !== void 0 ? _option$data$displayN3 : false;
122
+ var filterOption = function filterOption(option, inputValue) {
123
+ var _option$data$displayN, _option$data, _option$data$toLowerC, _inputValue$toLowerCa;
124
+ return (_option$data$displayN = (_option$data = option.data) === null || _option$data === void 0 || (_option$data = _option$data.displayName) === null || _option$data === void 0 || (_option$data$toLowerC = _option$data.toLowerCase) === null || _option$data$toLowerC === void 0 || (_option$data$toLowerC = _option$data$toLowerC.call(_option$data)) === null || _option$data$toLowerC === void 0 ? void 0 : _option$data$toLowerC.includes(inputValue === null || inputValue === void 0 || (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue))) !== null && _option$data$displayN !== void 0 ? _option$data$displayN : false;
132
125
  };
133
126
  var _default = exports.default = UserEditType;
@@ -52,7 +52,6 @@ const renderValidatorIcon = lastValidationResult => {
52
52
  return /*#__PURE__*/React.createElement(CrossCircleIcon, {
53
53
  label: "label",
54
54
  color: `var(--ds-icon-danger, ${R400})`,
55
- LEGACY_size: "medium",
56
55
  testId: "assets-datasource-modal--aql-invalid",
57
56
  spacing: "spacious"
58
57
  });
@@ -61,14 +60,12 @@ const renderValidatorIcon = lastValidationResult => {
61
60
  return /*#__PURE__*/React.createElement(CheckCircleIcon, {
62
61
  label: "label",
63
62
  color: `var(--ds-icon-success, ${G300})`,
64
- LEGACY_size: "medium",
65
63
  testId: "assets-datasource-modal--aql-valid",
66
64
  spacing: "spacious"
67
65
  });
68
66
  }
69
67
  return /*#__PURE__*/React.createElement(SearchIcon, {
70
68
  label: "label",
71
- LEGACY_size: "medium",
72
69
  testId: "assets-datasource-modal--aql-idle",
73
70
  color: "currentColor",
74
71
  spacing: "spacious"
@@ -112,7 +109,6 @@ export const AqlSearchInput = ({
112
109
  }, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
113
110
  label: "label",
114
111
  color: `var(--ds-icon, ${N500})`,
115
- LEGACY_size: "medium",
116
112
  testId: "assets-datasource-modal-help",
117
113
  spacing: "spacious"
118
114
  }))), /*#__PURE__*/React.createElement(Box, {
@@ -121,7 +117,6 @@ export const AqlSearchInput = ({
121
117
  appearance: "primary",
122
118
  isLoading: isSearching,
123
119
  icon: iconProps => /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
124
- LEGACY_size: "medium",
125
120
  spacing: "spacious",
126
121
  color: "currentColor"
127
122
  })),
@@ -50,7 +50,6 @@ export const BasicSearchInput = ({
50
50
  appearance: "primary",
51
51
  isLoading: isSearching,
52
52
  icon: iconProps => /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
53
- LEGACY_size: "medium",
54
53
  spacing: "spacious",
55
54
  color: "currentColor"
56
55
  })),
@@ -57,7 +57,6 @@ const AvatarOptionLabel = ({
57
57
  xcss: styles.groupWrapperStyles
58
58
  }, /*#__PURE__*/React.createElement(PeopleGroupIcon, {
59
59
  color: "currentColor",
60
- LEGACY_size: "small",
61
60
  label: ""
62
61
  })) : /*#__PURE__*/React.createElement(Avatar, {
63
62
  appearance: data.isSquare ? 'square' : 'circle',
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import isEqual from 'lodash/isEqual';
4
4
  import { useIntl } from 'react-intl-next';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { PopupSelect } from '@atlaskit/select';
6
7
  import { useDatasourceAnalyticsEvents } from '../../../../analytics';
7
8
  import CustomControl from './control';
@@ -172,6 +173,7 @@ export const FilterPopupSelect = ({
172
173
  onInputChange: handleInputChange,
173
174
  onOpen: handleMenuOpen,
174
175
  onClose: handleMenuClose,
176
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix'),
175
177
  target: ({
176
178
  isOpen,
177
179
  ...triggerProps
@@ -2,11 +2,12 @@
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./trigger.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
- import React, { forwardRef, useCallback } from 'react';
5
+ import React, { forwardRef, useCallback, useMemo } from 'react';
6
6
  import Badge from '@atlaskit/badge';
7
7
  import NewButton from '@atlaskit/button/new';
8
8
  import Button from '@atlaskit/button/standard-button';
9
9
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { Box, Flex } from '@atlaskit/primitives/compiled';
11
12
  import Spinner from '@atlaskit/spinner';
12
13
  const styles = {
@@ -47,6 +48,13 @@ const PopupTrigger = /*#__PURE__*/forwardRef(({
47
48
  }),
48
49
  testId: `${triggerButtonTestId}--loading-button`
49
50
  }, label)), [label, triggerButtonTestId]);
51
+ const loadingButton = useMemo(() => /*#__PURE__*/React.createElement(LoadingStateAnimationWrapper, null, /*#__PURE__*/React.createElement(Button, {
52
+ ref: ref,
53
+ iconAfter: /*#__PURE__*/React.createElement(Spinner, {
54
+ size: 'xsmall'
55
+ }),
56
+ testId: `${triggerButtonTestId}--loading-button`
57
+ }, label)), [label, triggerButtonTestId, ref]);
50
58
  const DefaultButton = useCallback(() => /*#__PURE__*/React.createElement(NewButton, {
51
59
  isSelected: isSelected || hasOptions,
52
60
  isDisabled: isDisabled,
@@ -65,12 +73,33 @@ const PopupTrigger = /*#__PURE__*/forwardRef(({
65
73
  }, /*#__PURE__*/React.createElement(Badge, {
66
74
  appearance: "primary"
67
75
  }, "+", selectedOptions.length - 1)))), [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId]);
76
+ const defaultButton = useMemo(() => /*#__PURE__*/React.createElement(NewButton, {
77
+ ref: ref,
78
+ isSelected: isSelected || hasOptions,
79
+ isDisabled: isDisabled,
80
+ iconAfter: () => /*#__PURE__*/React.createElement(ChevronDownIcon, {
81
+ label: "",
82
+ color: "currentColor",
83
+ size: "small"
84
+ }),
85
+ testId: `${triggerButtonTestId}--button`,
86
+ "aria-expanded": isSelected
87
+ }, /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Box, {
88
+ xcss: styles.triggerButtonLabelStyles
89
+ }, label, firstOption && /*#__PURE__*/React.createElement(React.Fragment, null, ": ", firstOption.label)), selectedOptions && selectedOptions.length > 1 && /*#__PURE__*/React.createElement(Flex, {
90
+ xcss: styles.badgeStyles,
91
+ alignItems: "center"
92
+ }, /*#__PURE__*/React.createElement(Badge, {
93
+ appearance: "primary"
94
+ }, "+", selectedOptions.length - 1)))), [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId, ref]);
68
95
 
69
96
  /**
70
97
  * We had an issue with the popup component referencing a stale DOM ref for the trigger button.
71
98
  * Hence introducing a Box to make sure ref is always the same and only content is refreshed on re-renders
72
99
  */
73
- return /*#__PURE__*/React.createElement(Box, {
100
+ return fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? /*#__PURE__*/React.createElement(Box, {
101
+ testId: triggerButtonTestId
102
+ }, showButtonLoading ? loadingButton : defaultButton) : /*#__PURE__*/React.createElement(Box, {
74
103
  ref: ref,
75
104
  testId: triggerButtonTestId
76
105
  }, showButtonLoading ? /*#__PURE__*/React.createElement(LoadingButton, null) : /*#__PURE__*/React.createElement(DefaultButton, null));
@@ -49,10 +49,10 @@ const IconEditType = props => {
49
49
  // We can't update this field if we don't have an ID - however the ID
50
50
  // is typed optional.
51
51
  ,
52
- options: fg('navx-sllv-fix-inline-edit-error') ? options === null || options === void 0 ? void 0 : options.filter(option => option.id) : options.filter(option => option.id),
52
+ options: options === null || options === void 0 ? void 0 : options.filter(option => option.id),
53
53
  menuPlacement: "auto",
54
54
  isLoading: isLoading,
55
- filterOption: fg('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
55
+ filterOption: filterOption,
56
56
  testId: "inline-edit-priority",
57
57
  value: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
58
58
  labelId: labelId,
@@ -72,15 +72,11 @@ const IconEditType = props => {
72
72
  onChange: e => props.setEditValues({
73
73
  type: 'icon',
74
74
  values: e ? [e] : []
75
- })
75
+ }),
76
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
76
77
  })));
77
78
  };
78
-
79
- /**
80
- * Remove on navx-sllv-fix-inline-edit-error cleanup
81
- */
82
- const filterOptionOld = (option, inputValue) => option.label.toLowerCase().includes(inputValue.toLowerCase());
83
- const filterOptionNew = (option, inputValue) => {
79
+ const filterOption = (option, inputValue) => {
84
80
  var _option$label, _option$label$toLower, _option$label$toLower2;
85
81
  return (_option$label = option.label) === null || _option$label === void 0 ? void 0 : (_option$label$toLower = _option$label.toLowerCase) === null || _option$label$toLower === void 0 ? void 0 : (_option$label$toLower2 = _option$label$toLower.call(_option$label)) === null || _option$label$toLower2 === void 0 ? void 0 : _option$label$toLower2.includes(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase());
86
82
  };
@@ -49,7 +49,7 @@ const StatusEditType = props => {
49
49
  blurInputOnSelect: true,
50
50
  menuPlacement: "auto",
51
51
  isLoading: isLoading,
52
- filterOption: fg('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
52
+ filterOption: filterOption,
53
53
  testId: "inline-edit-status",
54
54
  getOptionValue: option => option.text,
55
55
  value: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
@@ -68,15 +68,11 @@ const StatusEditType = props => {
68
68
  onChange: e => props.setEditValues({
69
69
  type: 'status',
70
70
  values: e ? [e] : []
71
- })
71
+ }),
72
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
72
73
  })));
73
74
  };
74
-
75
- /**
76
- * Remove on navx-sllv-fix-inline-edit-error cleanup
77
- */
78
- const filterOptionOld = (option, inputValue) => option.data.text.toLowerCase().includes(inputValue.toLowerCase());
79
- const filterOptionNew = (option, inputValue) => {
75
+ const filterOption = (option, inputValue) => {
80
76
  var _option$data, _option$data$text, _option$data$text$toL, _option$data$text$toL2, _inputValue$toLowerCa;
81
77
  return (_option$data = option.data) === null || _option$data === void 0 ? void 0 : (_option$data$text = _option$data.text) === null || _option$data$text === void 0 ? void 0 : (_option$data$text$toL = _option$data$text.toLowerCase) === null || _option$data$text$toL === void 0 ? void 0 : (_option$data$text$toL2 = _option$data$text$toL.call(_option$data$text)) === null || _option$data$text$toL2 === void 0 ? void 0 : _option$data$text$toL2.includes(inputValue === null || inputValue === void 0 ? void 0 : (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue));
82
78
  };
@@ -70,7 +70,7 @@ const UserEditType = props => {
70
70
  options: options,
71
71
  isLoading: isLoading,
72
72
  testId: "inline-edit-user",
73
- filterOption: fg('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
73
+ filterOption: filterOption,
74
74
  menuPlacement: "auto",
75
75
  onInputChange: handleUserInputDebounced,
76
76
  value: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
@@ -94,19 +94,12 @@ const UserEditType = props => {
94
94
  onChange: e => props.setEditValues({
95
95
  type: 'user',
96
96
  values: e ? [e] : []
97
- })
97
+ }),
98
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
98
99
  })));
99
100
  };
100
-
101
- /**
102
- * Remove on navx-sllv-fix-inline-edit-error cleanup
103
- */
104
- const filterOptionOld = (option, inputValue) => {
105
- var _option$data$displayN, _option$data$displayN2;
106
- return (_option$data$displayN = (_option$data$displayN2 = option.data.displayName) === null || _option$data$displayN2 === void 0 ? void 0 : _option$data$displayN2.toLowerCase().includes(inputValue.toLowerCase())) !== null && _option$data$displayN !== void 0 ? _option$data$displayN : false;
107
- };
108
- const filterOptionNew = (option, inputValue) => {
109
- var _option$data$displayN3, _option$data, _option$data$displayN4, _option$data$displayN5, _option$data$displayN6, _inputValue$toLowerCa;
110
- return (_option$data$displayN3 = (_option$data = option.data) === null || _option$data === void 0 ? void 0 : (_option$data$displayN4 = _option$data.displayName) === null || _option$data$displayN4 === void 0 ? void 0 : (_option$data$displayN5 = _option$data$displayN4.toLowerCase) === null || _option$data$displayN5 === void 0 ? void 0 : (_option$data$displayN6 = _option$data$displayN5.call(_option$data$displayN4)) === null || _option$data$displayN6 === void 0 ? void 0 : _option$data$displayN6.includes(inputValue === null || inputValue === void 0 ? void 0 : (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue))) !== null && _option$data$displayN3 !== void 0 ? _option$data$displayN3 : false;
101
+ const filterOption = (option, inputValue) => {
102
+ var _option$data$displayN, _option$data, _option$data$displayN2, _option$data$displayN3, _option$data$displayN4, _inputValue$toLowerCa;
103
+ return (_option$data$displayN = (_option$data = option.data) === null || _option$data === void 0 ? void 0 : (_option$data$displayN2 = _option$data.displayName) === null || _option$data$displayN2 === void 0 ? void 0 : (_option$data$displayN3 = _option$data$displayN2.toLowerCase) === null || _option$data$displayN3 === void 0 ? void 0 : (_option$data$displayN4 = _option$data$displayN3.call(_option$data$displayN2)) === null || _option$data$displayN4 === void 0 ? void 0 : _option$data$displayN4.includes(inputValue === null || inputValue === void 0 ? void 0 : (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue))) !== null && _option$data$displayN !== void 0 ? _option$data$displayN : false;
111
104
  };
112
105
  export default UserEditType;
@@ -54,7 +54,6 @@ var renderValidatorIcon = function renderValidatorIcon(lastValidationResult) {
54
54
  return /*#__PURE__*/React.createElement(CrossCircleIcon, {
55
55
  label: "label",
56
56
  color: "var(--ds-icon-danger, ".concat(R400, ")"),
57
- LEGACY_size: "medium",
58
57
  testId: "assets-datasource-modal--aql-invalid",
59
58
  spacing: "spacious"
60
59
  });
@@ -63,14 +62,12 @@ var renderValidatorIcon = function renderValidatorIcon(lastValidationResult) {
63
62
  return /*#__PURE__*/React.createElement(CheckCircleIcon, {
64
63
  label: "label",
65
64
  color: "var(--ds-icon-success, ".concat(G300, ")"),
66
- LEGACY_size: "medium",
67
65
  testId: "assets-datasource-modal--aql-valid",
68
66
  spacing: "spacious"
69
67
  });
70
68
  }
71
69
  return /*#__PURE__*/React.createElement(SearchIcon, {
72
70
  label: "label",
73
- LEGACY_size: "medium",
74
71
  testId: "assets-datasource-modal--aql-idle",
75
72
  color: "currentColor",
76
73
  spacing: "spacious"
@@ -112,7 +109,6 @@ export var AqlSearchInput = function AqlSearchInput(_ref2) {
112
109
  }, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
113
110
  label: "label",
114
111
  color: "var(--ds-icon, ".concat(N500, ")"),
115
- LEGACY_size: "medium",
116
112
  testId: "assets-datasource-modal-help",
117
113
  spacing: "spacious"
118
114
  }))), /*#__PURE__*/React.createElement(Box, {
@@ -122,7 +118,6 @@ export var AqlSearchInput = function AqlSearchInput(_ref2) {
122
118
  isLoading: isSearching,
123
119
  icon: function icon(iconProps) {
124
120
  return /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
125
- LEGACY_size: "medium",
126
121
  spacing: "spacious",
127
122
  color: "currentColor"
128
123
  }));
@@ -48,7 +48,6 @@ export var BasicSearchInput = function BasicSearchInput(_ref) {
48
48
  isLoading: isSearching,
49
49
  icon: function icon(iconProps) {
50
50
  return /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
51
- LEGACY_size: "medium",
52
51
  spacing: "spacious",
53
52
  color: "currentColor"
54
53
  }));
@@ -52,7 +52,6 @@ var AvatarOptionLabel = function AvatarOptionLabel(_ref3) {
52
52
  xcss: styles.groupWrapperStyles
53
53
  }, /*#__PURE__*/React.createElement(PeopleGroupIcon, {
54
54
  color: "currentColor",
55
- LEGACY_size: "small",
56
55
  label: ""
57
56
  })) : /*#__PURE__*/React.createElement(Avatar, {
58
57
  appearance: data.isSquare ? 'square' : 'circle',
@@ -11,6 +11,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
11
  import React, { useCallback, useEffect, useRef, useState } from 'react';
12
12
  import isEqual from 'lodash/isEqual';
13
13
  import { useIntl } from 'react-intl-next';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { PopupSelect } from '@atlaskit/select';
15
16
  import { useDatasourceAnalyticsEvents } from '../../../../analytics';
16
17
  import CustomControl from './control';
@@ -214,6 +215,7 @@ export var FilterPopupSelect = function FilterPopupSelect(_ref) {
214
215
  onInputChange: handleInputChange,
215
216
  onOpen: handleMenuOpen,
216
217
  onClose: handleMenuClose,
218
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix'),
217
219
  target: function target(_ref3) {
218
220
  var isOpen = _ref3.isOpen,
219
221
  triggerProps = _objectWithoutProperties(_ref3, _excluded);
@@ -5,11 +5,12 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
5
5
  var _excluded = ["as", "style"];
6
6
  import "./trigger.compiled.css";
7
7
  import { ax, ix } from "@compiled/react/runtime";
8
- import React, { forwardRef, useCallback } from 'react';
8
+ import React, { forwardRef, useCallback, useMemo } from 'react';
9
9
  import Badge from '@atlaskit/badge';
10
10
  import NewButton from '@atlaskit/button/new';
11
11
  import Button from '@atlaskit/button/standard-button';
12
12
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { Box, Flex } from '@atlaskit/primitives/compiled';
14
15
  import Spinner from '@atlaskit/spinner';
15
16
  var styles = {
@@ -53,6 +54,15 @@ var PopupTrigger = /*#__PURE__*/forwardRef(function (_ref2, ref) {
53
54
  testId: "".concat(triggerButtonTestId, "--loading-button")
54
55
  }, label));
55
56
  }, [label, triggerButtonTestId]);
57
+ var loadingButton = useMemo(function () {
58
+ return /*#__PURE__*/React.createElement(LoadingStateAnimationWrapper, null, /*#__PURE__*/React.createElement(Button, {
59
+ ref: ref,
60
+ iconAfter: /*#__PURE__*/React.createElement(Spinner, {
61
+ size: 'xsmall'
62
+ }),
63
+ testId: "".concat(triggerButtonTestId, "--loading-button")
64
+ }, label));
65
+ }, [label, triggerButtonTestId, ref]);
56
66
  var DefaultButton = useCallback(function () {
57
67
  return /*#__PURE__*/React.createElement(NewButton, {
58
68
  isSelected: isSelected || hasOptions,
@@ -75,12 +85,37 @@ var PopupTrigger = /*#__PURE__*/forwardRef(function (_ref2, ref) {
75
85
  appearance: "primary"
76
86
  }, "+", selectedOptions.length - 1))));
77
87
  }, [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId]);
88
+ var defaultButton = useMemo(function () {
89
+ return /*#__PURE__*/React.createElement(NewButton, {
90
+ ref: ref,
91
+ isSelected: isSelected || hasOptions,
92
+ isDisabled: isDisabled,
93
+ iconAfter: function iconAfter() {
94
+ return /*#__PURE__*/React.createElement(ChevronDownIcon, {
95
+ label: "",
96
+ color: "currentColor",
97
+ size: "small"
98
+ });
99
+ },
100
+ testId: "".concat(triggerButtonTestId, "--button"),
101
+ "aria-expanded": isSelected
102
+ }, /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Box, {
103
+ xcss: styles.triggerButtonLabelStyles
104
+ }, label, firstOption && /*#__PURE__*/React.createElement(React.Fragment, null, ": ", firstOption.label)), selectedOptions && selectedOptions.length > 1 && /*#__PURE__*/React.createElement(Flex, {
105
+ xcss: styles.badgeStyles,
106
+ alignItems: "center"
107
+ }, /*#__PURE__*/React.createElement(Badge, {
108
+ appearance: "primary"
109
+ }, "+", selectedOptions.length - 1))));
110
+ }, [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId, ref]);
78
111
 
79
112
  /**
80
113
  * We had an issue with the popup component referencing a stale DOM ref for the trigger button.
81
114
  * Hence introducing a Box to make sure ref is always the same and only content is refreshed on re-renders
82
115
  */
83
- return /*#__PURE__*/React.createElement(Box, {
116
+ return fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? /*#__PURE__*/React.createElement(Box, {
117
+ testId: triggerButtonTestId
118
+ }, showButtonLoading ? loadingButton : defaultButton) : /*#__PURE__*/React.createElement(Box, {
84
119
  ref: ref,
85
120
  testId: triggerButtonTestId
86
121
  }, showButtonLoading ? /*#__PURE__*/React.createElement(LoadingButton, null) : /*#__PURE__*/React.createElement(DefaultButton, null));
@@ -46,14 +46,12 @@ var IconEditType = function IconEditType(props) {
46
46
  // We can't update this field if we don't have an ID - however the ID
47
47
  // is typed optional.
48
48
  ,
49
- options: fg('navx-sllv-fix-inline-edit-error') ? options === null || options === void 0 ? void 0 : options.filter(function (option) {
50
- return option.id;
51
- }) : options.filter(function (option) {
49
+ options: options === null || options === void 0 ? void 0 : options.filter(function (option) {
52
50
  return option.id;
53
51
  }),
54
52
  menuPlacement: "auto",
55
53
  isLoading: isLoading,
56
- filterOption: fg('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
54
+ filterOption: filterOption,
57
55
  testId: "inline-edit-priority",
58
56
  value: currentValue === null || currentValue === void 0 || (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
59
57
  labelId: labelId,
@@ -78,17 +76,11 @@ var IconEditType = function IconEditType(props) {
78
76
  type: 'icon',
79
77
  values: e ? [e] : []
80
78
  });
81
- }
79
+ },
80
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
82
81
  })));
83
82
  };
84
-
85
- /**
86
- * Remove on navx-sllv-fix-inline-edit-error cleanup
87
- */
88
- var filterOptionOld = function filterOptionOld(option, inputValue) {
89
- return option.label.toLowerCase().includes(inputValue.toLowerCase());
90
- };
91
- var filterOptionNew = function filterOptionNew(option, inputValue) {
83
+ var filterOption = function filterOption(option, inputValue) {
92
84
  var _option$label, _option$label$toLower;
93
85
  return (_option$label = option.label) === null || _option$label === void 0 || (_option$label$toLower = _option$label.toLowerCase) === null || _option$label$toLower === void 0 || (_option$label$toLower = _option$label$toLower.call(_option$label)) === null || _option$label$toLower === void 0 ? void 0 : _option$label$toLower.includes(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase());
94
86
  };
@@ -46,7 +46,7 @@ var StatusEditType = function StatusEditType(props) {
46
46
  blurInputOnSelect: true,
47
47
  menuPlacement: "auto",
48
48
  isLoading: isLoading,
49
- filterOption: fg('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
49
+ filterOption: filterOption,
50
50
  testId: "inline-edit-status",
51
51
  getOptionValue: function getOptionValue(option) {
52
52
  return option.text;
@@ -71,17 +71,11 @@ var StatusEditType = function StatusEditType(props) {
71
71
  type: 'status',
72
72
  values: e ? [e] : []
73
73
  });
74
- }
74
+ },
75
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
75
76
  })));
76
77
  };
77
-
78
- /**
79
- * Remove on navx-sllv-fix-inline-edit-error cleanup
80
- */
81
- var filterOptionOld = function filterOptionOld(option, inputValue) {
82
- return option.data.text.toLowerCase().includes(inputValue.toLowerCase());
83
- };
84
- var filterOptionNew = function filterOptionNew(option, inputValue) {
78
+ var filterOption = function filterOption(option, inputValue) {
85
79
  var _option$data, _option$data$toLowerC, _inputValue$toLowerCa;
86
80
  return (_option$data = option.data) === null || _option$data === void 0 || (_option$data = _option$data.text) === null || _option$data === void 0 || (_option$data$toLowerC = _option$data.toLowerCase) === null || _option$data$toLowerC === void 0 || (_option$data$toLowerC = _option$data$toLowerC.call(_option$data)) === null || _option$data$toLowerC === void 0 ? void 0 : _option$data$toLowerC.includes(inputValue === null || inputValue === void 0 || (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue));
87
81
  };
@@ -76,7 +76,7 @@ var UserEditType = function UserEditType(props) {
76
76
  options: options,
77
77
  isLoading: isLoading,
78
78
  testId: "inline-edit-user",
79
- filterOption: fg('navx-sllv-fix-inline-edit-error') ? filterOptionNew : filterOptionOld,
79
+ filterOption: filterOption,
80
80
  menuPlacement: "auto",
81
81
  onInputChange: handleUserInputDebounced,
82
82
  value: currentValue === null || currentValue === void 0 || (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
@@ -106,19 +106,12 @@ var UserEditType = function UserEditType(props) {
106
106
  type: 'user',
107
107
  values: e ? [e] : []
108
108
  });
109
- }
109
+ },
110
+ shouldPreventEscapePropagation: fg('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
110
111
  })));
111
112
  };
112
-
113
- /**
114
- * Remove on navx-sllv-fix-inline-edit-error cleanup
115
- */
116
- var filterOptionOld = function filterOptionOld(option, inputValue) {
117
- var _option$data$displayN, _option$data$displayN2;
118
- return (_option$data$displayN = (_option$data$displayN2 = option.data.displayName) === null || _option$data$displayN2 === void 0 ? void 0 : _option$data$displayN2.toLowerCase().includes(inputValue.toLowerCase())) !== null && _option$data$displayN !== void 0 ? _option$data$displayN : false;
119
- };
120
- var filterOptionNew = function filterOptionNew(option, inputValue) {
121
- var _option$data$displayN3, _option$data, _option$data$toLowerC, _inputValue$toLowerCa;
122
- return (_option$data$displayN3 = (_option$data = option.data) === null || _option$data === void 0 || (_option$data = _option$data.displayName) === null || _option$data === void 0 || (_option$data$toLowerC = _option$data.toLowerCase) === null || _option$data$toLowerC === void 0 || (_option$data$toLowerC = _option$data$toLowerC.call(_option$data)) === null || _option$data$toLowerC === void 0 ? void 0 : _option$data$toLowerC.includes(inputValue === null || inputValue === void 0 || (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue))) !== null && _option$data$displayN3 !== void 0 ? _option$data$displayN3 : false;
113
+ var filterOption = function filterOption(option, inputValue) {
114
+ var _option$data$displayN, _option$data, _option$data$toLowerC, _inputValue$toLowerCa;
115
+ return (_option$data$displayN = (_option$data = option.data) === null || _option$data === void 0 || (_option$data = _option$data.displayName) === null || _option$data === void 0 || (_option$data$toLowerC = _option$data.toLowerCase) === null || _option$data$toLowerC === void 0 || (_option$data$toLowerC = _option$data$toLowerC.call(_option$data)) === null || _option$data$toLowerC === void 0 ? void 0 : _option$data$toLowerC.includes(inputValue === null || inputValue === void 0 || (_inputValue$toLowerCa = inputValue.toLowerCase) === null || _inputValue$toLowerCa === void 0 ? void 0 : _inputValue$toLowerCa.call(inputValue))) !== null && _option$data$displayN !== void 0 ? _option$data$displayN : false;
123
116
  };
124
117
  export default UserEditType;
@@ -8,5 +8,5 @@ export interface PopupTriggerProps {
8
8
  selectedOptions?: ReadonlyArray<SelectOption>;
9
9
  testId?: string;
10
10
  }
11
- declare const PopupTrigger: React.ForwardRefExoticComponent<PopupTriggerProps & React.RefAttributes<HTMLElement>>;
11
+ declare const PopupTrigger: React.ForwardRefExoticComponent<PopupTriggerProps & React.RefAttributes<HTMLButtonElement>>;
12
12
  export default PopupTrigger;
@@ -8,5 +8,5 @@ export interface PopupTriggerProps {
8
8
  selectedOptions?: ReadonlyArray<SelectOption>;
9
9
  testId?: string;
10
10
  }
11
- declare const PopupTrigger: React.ForwardRefExoticComponent<PopupTriggerProps & React.RefAttributes<HTMLElement>>;
11
+ declare const PopupTrigger: React.ForwardRefExoticComponent<PopupTriggerProps & React.RefAttributes<HTMLButtonElement>>;
12
12
  export default PopupTrigger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "4.32.1",
3
+ "version": "4.32.3",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -67,9 +67,9 @@
67
67
  "@atlaskit/link-provider": "^4.1.0",
68
68
  "@atlaskit/linking-common": "^9.9.0",
69
69
  "@atlaskit/linking-types": "^14.2.0",
70
- "@atlaskit/logo": "^19.9.0",
70
+ "@atlaskit/logo": "^19.10.0",
71
71
  "@atlaskit/lozenge": "^13.3.0",
72
- "@atlaskit/modal-dialog": "^14.9.0",
72
+ "@atlaskit/modal-dialog": "^14.10.0",
73
73
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
74
74
  "@atlaskit/platform-feature-flags": "^1.1.0",
75
75
  "@atlaskit/popup": "^4.13.0",
@@ -81,13 +81,13 @@
81
81
  "@atlaskit/react-select": "^3.13.0",
82
82
  "@atlaskit/select": "^21.6.0",
83
83
  "@atlaskit/smart-card": "^43.20.0",
84
- "@atlaskit/smart-user-picker": "^8.8.0",
84
+ "@atlaskit/smart-user-picker": "^8.9.0",
85
85
  "@atlaskit/spinner": "^19.0.0",
86
86
  "@atlaskit/tag": "^14.2.0",
87
87
  "@atlaskit/textfield": "^8.2.0",
88
88
  "@atlaskit/theme": "^21.0.0",
89
89
  "@atlaskit/tokens": "^9.1.0",
90
- "@atlaskit/tooltip": "^20.12.0",
90
+ "@atlaskit/tooltip": "^20.14.0",
91
91
  "@atlaskit/ufo": "^0.4.0",
92
92
  "@atlaskit/width-detector": "^5.0.0",
93
93
  "@babel/runtime": "^7.0.0",
@@ -113,6 +113,7 @@
113
113
  "@atlaskit/json-ld-types": "^1.4.0",
114
114
  "@atlaskit/link-test-helpers": "^9.0.0",
115
115
  "@atlaskit/ssr": "workspace:^",
116
+ "@atlassian/a11y-jest-testing": "^0.6.0",
116
117
  "@atlassian/feature-flags-test-utils": "^1.0.0",
117
118
  "@faker-js/faker": "^7.5.0",
118
119
  "@testing-library/dom": "^10.1.0",
@@ -175,9 +176,6 @@
175
176
  "navx-1895-new-logo-design": {
176
177
  "type": "boolean"
177
178
  },
178
- "navx-sllv-fix-inline-edit-error": {
179
- "type": "boolean"
180
- },
181
179
  "platform_navx_jira_sllv_rich_text_gate": {
182
180
  "type": "boolean"
183
181
  },
@@ -187,6 +185,9 @@
187
185
  "lp_disable_datasource_table_max_height_restriction": {
188
186
  "type": "boolean"
189
187
  },
188
+ "platform_navx_sllv_dropdown_escape_and_focus_fix": {
189
+ "type": "boolean"
190
+ },
190
191
  "platform_navx_sllv_j2ws_dropdown_for_single_row": {
191
192
  "type": "boolean"
192
193
  }