@atlaskit/link-datasource 4.32.1 → 4.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +0 -5
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +0 -1
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +0 -1
- package/dist/cjs/ui/common/modal/popup-select/index.js +2 -0
- package/dist/cjs/ui/common/modal/popup-select/trigger.js +36 -1
- package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +2 -1
- package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +2 -1
- package/dist/cjs/ui/issue-like-table/edit-type/user/index.js +2 -1
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +0 -5
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +0 -1
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +0 -1
- package/dist/es2019/ui/common/modal/popup-select/index.js +2 -0
- package/dist/es2019/ui/common/modal/popup-select/trigger.js +31 -2
- package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +2 -1
- package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +2 -1
- package/dist/es2019/ui/issue-like-table/edit-type/user/index.js +2 -1
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +0 -5
- package/dist/esm/ui/common/modal/basic-search-input/index.js +0 -1
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +0 -1
- package/dist/esm/ui/common/modal/popup-select/index.js +2 -0
- package/dist/esm/ui/common/modal/popup-select/trigger.js +37 -2
- package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +2 -1
- package/dist/esm/ui/issue-like-table/edit-type/status/index.js +2 -1
- package/dist/esm/ui/issue-like-table/edit-type/user/index.js +2 -1
- package/dist/types/ui/common/modal/popup-select/trigger.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/trigger.d.ts +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.32.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ebd1d53e42731`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebd1d53e42731) -
|
|
8
|
+
[ux] Fix a bug where pressing escape when dropdowns inside modal dialog are opened is closing the
|
|
9
|
+
modal dialog itself. Behind platform_navx_sllv_dropdown_escape_and_focus_fix FG
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 4.32.1
|
|
4
13
|
|
|
5
14
|
### 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));
|
|
@@ -87,7 +87,8 @@ var IconEditType = function IconEditType(props) {
|
|
|
87
87
|
type: 'icon',
|
|
88
88
|
values: e ? [e] : []
|
|
89
89
|
});
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
|
+
shouldPreventEscapePropagation: (0, _platformFeatureFlags.fg)('platform_navx_sllv_dropdown_escape_and_focus_fix') ? true : undefined
|
|
91
92
|
})));
|
|
92
93
|
};
|
|
93
94
|
|
|
@@ -80,7 +80,8 @@ 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
|
|
|
@@ -115,7 +115,8 @@ 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
|
|
|
@@ -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));
|
|
@@ -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));
|
|
@@ -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<
|
|
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<
|
|
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.
|
|
3
|
+
"version": "4.32.2",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
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.
|
|
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",
|
|
@@ -187,6 +187,9 @@
|
|
|
187
187
|
"lp_disable_datasource_table_max_height_restriction": {
|
|
188
188
|
"type": "boolean"
|
|
189
189
|
},
|
|
190
|
+
"platform_navx_sllv_dropdown_escape_and_focus_fix": {
|
|
191
|
+
"type": "boolean"
|
|
192
|
+
},
|
|
190
193
|
"platform_navx_sllv_j2ws_dropdown_for_single_row": {
|
|
191
194
|
"type": "boolean"
|
|
192
195
|
}
|