@atlaskit/link-datasource 1.17.9 → 1.17.11
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 +13 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +30 -4
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +29 -3
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.js +29 -3
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts +5 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts +5 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.17.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43451](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43451) [`50a08b74209`](https://bitbucket.org/atlassian/atlassian-frontend/commits/50a08b74209) - Add loading state for the basic filter trigger button
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 1.17.10
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 1.17.9
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -7,5 +7,5 @@ exports.packageMetaData = exports.EVENT_CHANNEL = void 0;
|
|
|
7
7
|
var EVENT_CHANNEL = exports.EVENT_CHANNEL = 'media';
|
|
8
8
|
var packageMetaData = exports.packageMetaData = {
|
|
9
9
|
packageName: "@atlaskit/link-datasource",
|
|
10
|
-
packageVersion: "1.17.
|
|
10
|
+
packageVersion: "1.17.11"
|
|
11
11
|
};
|
|
@@ -196,6 +196,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
196
196
|
}
|
|
197
197
|
}, [selectedOptions, selection]);
|
|
198
198
|
var filterOptionsLength = filterOptions.length;
|
|
199
|
+
var isJQLHydrating = false;
|
|
199
200
|
var isError = status === 'rejected';
|
|
200
201
|
var isLoading = status === 'loading' || status === 'empty';
|
|
201
202
|
var isLoadingMore = status === 'loadingMore';
|
|
@@ -257,7 +258,8 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
257
258
|
filterType: filterType,
|
|
258
259
|
selectedOptions: selectedOptions,
|
|
259
260
|
isSelected: isOpen,
|
|
260
|
-
isDisabled: isDisabled
|
|
261
|
+
isDisabled: isDisabled,
|
|
262
|
+
isLoading: isJQLHydrating
|
|
261
263
|
}));
|
|
262
264
|
},
|
|
263
265
|
footer: shouldShowFooter && /*#__PURE__*/_react.default.createElement(_footer.default, {
|
|
@@ -5,14 +5,16 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.LoadingStateAnimationWrapper = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
12
|
var _reactIntlNext = require("react-intl-next");
|
|
12
13
|
var _badge = _interopRequireDefault(require("@atlaskit/badge"));
|
|
13
14
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
14
15
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
15
16
|
var _primitives = require("@atlaskit/primitives");
|
|
17
|
+
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
16
18
|
var _messages = require("./messages");
|
|
17
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,23 +26,47 @@ var triggerButtonLabelStyles = (0, _primitives.xcss)({
|
|
|
24
26
|
var badgeStyles = (0, _primitives.xcss)({
|
|
25
27
|
marginLeft: 'space.050'
|
|
26
28
|
});
|
|
29
|
+
var LoadingStateAnimationWrapper = exports.LoadingStateAnimationWrapper = _styled.default.div({
|
|
30
|
+
position: 'relative',
|
|
31
|
+
animation: 'flickerAnimation 2s infinite',
|
|
32
|
+
'@keyframes flickerAnimation': {
|
|
33
|
+
'0%': {
|
|
34
|
+
opacity: 1
|
|
35
|
+
},
|
|
36
|
+
'50%': {
|
|
37
|
+
opacity: 0.5
|
|
38
|
+
},
|
|
39
|
+
'100%': {
|
|
40
|
+
opacity: 1
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
27
44
|
var PopupTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
28
45
|
var filterType = _ref.filterType,
|
|
29
46
|
isSelected = _ref.isSelected,
|
|
30
47
|
isDisabled = _ref.isDisabled,
|
|
31
|
-
|
|
48
|
+
isLoading = _ref.isLoading,
|
|
32
49
|
selectedOptions = _ref.selectedOptions;
|
|
33
50
|
var _ref2 = selectedOptions || [],
|
|
34
51
|
_ref3 = (0, _slicedToArray2.default)(_ref2, 1),
|
|
35
52
|
firstOption = _ref3[0];
|
|
53
|
+
var testId = "jlol-basic-filter-".concat(filterType, "-trigger");
|
|
36
54
|
var hasOptions = selectedOptions && selectedOptions.length > 0;
|
|
55
|
+
var showButtonLoading = !isDisabled && isLoading;
|
|
56
|
+
if (showButtonLoading) {
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(LoadingStateAnimationWrapper, null, /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
58
|
+
iconAfter: /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
59
|
+
size: 'xsmall'
|
|
60
|
+
}),
|
|
61
|
+
testId: testId
|
|
62
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.asyncPopupSelectMessages["".concat(filterType, "Label")])));
|
|
63
|
+
}
|
|
37
64
|
return /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
38
65
|
ref: ref,
|
|
39
66
|
appearance: "default",
|
|
40
67
|
isSelected: isSelected || hasOptions,
|
|
41
68
|
isDisabled: isDisabled,
|
|
42
|
-
|
|
43
|
-
testId: "jlol-basic-filter-".concat(filterType, "-trigger"),
|
|
69
|
+
testId: testId,
|
|
44
70
|
iconAfter: /*#__PURE__*/_react.default.createElement(_chevronDown.default, {
|
|
45
71
|
label: ""
|
|
46
72
|
})
|
|
@@ -147,6 +147,7 @@ const AsyncPopupSelect = ({
|
|
|
147
147
|
}
|
|
148
148
|
}, [selectedOptions, selection]);
|
|
149
149
|
const filterOptionsLength = filterOptions.length;
|
|
150
|
+
const isJQLHydrating = false;
|
|
150
151
|
const isError = status === 'rejected';
|
|
151
152
|
const isLoading = status === 'loading' || status === 'empty';
|
|
152
153
|
const isLoadingMore = status === 'loadingMore';
|
|
@@ -208,7 +209,8 @@ const AsyncPopupSelect = ({
|
|
|
208
209
|
filterType: filterType,
|
|
209
210
|
selectedOptions: selectedOptions,
|
|
210
211
|
isSelected: isOpen,
|
|
211
|
-
isDisabled: isDisabled
|
|
212
|
+
isDisabled: isDisabled,
|
|
213
|
+
isLoading: isJQLHydrating
|
|
212
214
|
})),
|
|
213
215
|
footer: shouldShowFooter && /*#__PURE__*/React.createElement(PopupFooter, {
|
|
214
216
|
currentDisplayCount: popupSelectOptions.length,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
2
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
3
4
|
import Badge from '@atlaskit/badge';
|
|
4
5
|
import Button from '@atlaskit/button/standard-button';
|
|
5
6
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
6
7
|
import { Box, Flex, xcss } from '@atlaskit/primitives';
|
|
8
|
+
import Spinner from '@atlaskit/spinner';
|
|
7
9
|
import { asyncPopupSelectMessages } from './messages';
|
|
8
10
|
const triggerButtonLabelStyles = xcss({
|
|
9
11
|
textOverflow: 'ellipsis',
|
|
@@ -13,22 +15,46 @@ const triggerButtonLabelStyles = xcss({
|
|
|
13
15
|
const badgeStyles = xcss({
|
|
14
16
|
marginLeft: 'space.050'
|
|
15
17
|
});
|
|
18
|
+
export const LoadingStateAnimationWrapper = styled.div({
|
|
19
|
+
position: 'relative',
|
|
20
|
+
animation: 'flickerAnimation 2s infinite',
|
|
21
|
+
'@keyframes flickerAnimation': {
|
|
22
|
+
'0%': {
|
|
23
|
+
opacity: 1
|
|
24
|
+
},
|
|
25
|
+
'50%': {
|
|
26
|
+
opacity: 0.5
|
|
27
|
+
},
|
|
28
|
+
'100%': {
|
|
29
|
+
opacity: 1
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
16
33
|
const PopupTrigger = /*#__PURE__*/forwardRef(({
|
|
17
34
|
filterType,
|
|
18
35
|
isSelected,
|
|
19
36
|
isDisabled,
|
|
20
|
-
|
|
37
|
+
isLoading,
|
|
21
38
|
selectedOptions
|
|
22
39
|
}, ref) => {
|
|
23
40
|
const [firstOption] = selectedOptions || [];
|
|
41
|
+
const testId = `jlol-basic-filter-${filterType}-trigger`;
|
|
24
42
|
const hasOptions = selectedOptions && selectedOptions.length > 0;
|
|
43
|
+
const showButtonLoading = !isDisabled && isLoading;
|
|
44
|
+
if (showButtonLoading) {
|
|
45
|
+
return /*#__PURE__*/React.createElement(LoadingStateAnimationWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
46
|
+
iconAfter: /*#__PURE__*/React.createElement(Spinner, {
|
|
47
|
+
size: 'xsmall'
|
|
48
|
+
}),
|
|
49
|
+
testId: testId
|
|
50
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, asyncPopupSelectMessages[`${filterType}Label`])));
|
|
51
|
+
}
|
|
25
52
|
return /*#__PURE__*/React.createElement(Button, {
|
|
26
53
|
ref: ref,
|
|
27
54
|
appearance: "default",
|
|
28
55
|
isSelected: isSelected || hasOptions,
|
|
29
56
|
isDisabled: isDisabled,
|
|
30
|
-
|
|
31
|
-
testId: `jlol-basic-filter-${filterType}-trigger`,
|
|
57
|
+
testId: testId,
|
|
32
58
|
iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
33
59
|
label: ""
|
|
34
60
|
})
|
|
@@ -186,6 +186,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
186
186
|
}
|
|
187
187
|
}, [selectedOptions, selection]);
|
|
188
188
|
var filterOptionsLength = filterOptions.length;
|
|
189
|
+
var isJQLHydrating = false;
|
|
189
190
|
var isError = status === 'rejected';
|
|
190
191
|
var isLoading = status === 'loading' || status === 'empty';
|
|
191
192
|
var isLoadingMore = status === 'loadingMore';
|
|
@@ -247,7 +248,8 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
247
248
|
filterType: filterType,
|
|
248
249
|
selectedOptions: selectedOptions,
|
|
249
250
|
isSelected: isOpen,
|
|
250
|
-
isDisabled: isDisabled
|
|
251
|
+
isDisabled: isDisabled,
|
|
252
|
+
isLoading: isJQLHydrating
|
|
251
253
|
}));
|
|
252
254
|
},
|
|
253
255
|
footer: shouldShowFooter && /*#__PURE__*/React.createElement(PopupFooter, {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
3
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
5
|
import Badge from '@atlaskit/badge';
|
|
5
6
|
import Button from '@atlaskit/button/standard-button';
|
|
6
7
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
7
8
|
import { Box, Flex, xcss } from '@atlaskit/primitives';
|
|
9
|
+
import Spinner from '@atlaskit/spinner';
|
|
8
10
|
import { asyncPopupSelectMessages } from './messages';
|
|
9
11
|
var triggerButtonLabelStyles = xcss({
|
|
10
12
|
textOverflow: 'ellipsis',
|
|
@@ -14,23 +16,47 @@ var triggerButtonLabelStyles = xcss({
|
|
|
14
16
|
var badgeStyles = xcss({
|
|
15
17
|
marginLeft: 'space.050'
|
|
16
18
|
});
|
|
19
|
+
export var LoadingStateAnimationWrapper = styled.div({
|
|
20
|
+
position: 'relative',
|
|
21
|
+
animation: 'flickerAnimation 2s infinite',
|
|
22
|
+
'@keyframes flickerAnimation': {
|
|
23
|
+
'0%': {
|
|
24
|
+
opacity: 1
|
|
25
|
+
},
|
|
26
|
+
'50%': {
|
|
27
|
+
opacity: 0.5
|
|
28
|
+
},
|
|
29
|
+
'100%': {
|
|
30
|
+
opacity: 1
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
17
34
|
var PopupTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
18
35
|
var filterType = _ref.filterType,
|
|
19
36
|
isSelected = _ref.isSelected,
|
|
20
37
|
isDisabled = _ref.isDisabled,
|
|
21
|
-
|
|
38
|
+
isLoading = _ref.isLoading,
|
|
22
39
|
selectedOptions = _ref.selectedOptions;
|
|
23
40
|
var _ref2 = selectedOptions || [],
|
|
24
41
|
_ref3 = _slicedToArray(_ref2, 1),
|
|
25
42
|
firstOption = _ref3[0];
|
|
43
|
+
var testId = "jlol-basic-filter-".concat(filterType, "-trigger");
|
|
26
44
|
var hasOptions = selectedOptions && selectedOptions.length > 0;
|
|
45
|
+
var showButtonLoading = !isDisabled && isLoading;
|
|
46
|
+
if (showButtonLoading) {
|
|
47
|
+
return /*#__PURE__*/React.createElement(LoadingStateAnimationWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
48
|
+
iconAfter: /*#__PURE__*/React.createElement(Spinner, {
|
|
49
|
+
size: 'xsmall'
|
|
50
|
+
}),
|
|
51
|
+
testId: testId
|
|
52
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, asyncPopupSelectMessages["".concat(filterType, "Label")])));
|
|
53
|
+
}
|
|
27
54
|
return /*#__PURE__*/React.createElement(Button, {
|
|
28
55
|
ref: ref,
|
|
29
56
|
appearance: "default",
|
|
30
57
|
isSelected: isSelected || hasOptions,
|
|
31
58
|
isDisabled: isDisabled,
|
|
32
|
-
|
|
33
|
-
testId: "jlol-basic-filter-".concat(filterType, "-trigger"),
|
|
59
|
+
testId: testId,
|
|
34
60
|
iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
35
61
|
label: ""
|
|
36
62
|
})
|
|
@@ -5,7 +5,11 @@ export interface PopupTriggerProps {
|
|
|
5
5
|
selectedOptions?: ReadonlyArray<SelectOption>;
|
|
6
6
|
isSelected?: boolean;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
|
-
|
|
8
|
+
isLoading?: boolean;
|
|
9
9
|
}
|
|
10
|
+
export declare const LoadingStateAnimationWrapper: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: React.ElementType<any> | undefined;
|
|
13
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
14
|
declare const PopupTrigger: React.ForwardRefExoticComponent<PopupTriggerProps & React.RefAttributes<HTMLElement>>;
|
|
11
15
|
export default PopupTrigger;
|
package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/trigger.d.ts
CHANGED
|
@@ -5,7 +5,11 @@ export interface PopupTriggerProps {
|
|
|
5
5
|
selectedOptions?: ReadonlyArray<SelectOption>;
|
|
6
6
|
isSelected?: boolean;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
|
-
|
|
8
|
+
isLoading?: boolean;
|
|
9
9
|
}
|
|
10
|
+
export declare const LoadingStateAnimationWrapper: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: React.ElementType<any> | undefined;
|
|
13
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
14
|
declare const PopupTrigger: React.ForwardRefExoticComponent<PopupTriggerProps & React.RefAttributes<HTMLElement>>;
|
|
11
15
|
export default PopupTrigger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.11",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/analytics-next": "^9.1.3",
|
|
35
35
|
"@atlaskit/avatar": "^21.4.0",
|
|
36
36
|
"@atlaskit/badge": "^15.1.16",
|
|
37
|
-
"@atlaskit/button": "^16.
|
|
37
|
+
"@atlaskit/button": "^16.17.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
39
39
|
"@atlaskit/empty-state": "^7.5.0",
|
|
40
40
|
"@atlaskit/form": "^9.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/smart-card": "^26.42.0",
|
|
61
61
|
"@atlaskit/spinner": "^16.0.0",
|
|
62
62
|
"@atlaskit/tag": "^12.0.0",
|
|
63
|
-
"@atlaskit/textfield": "
|
|
63
|
+
"@atlaskit/textfield": "6.0.0",
|
|
64
64
|
"@atlaskit/theme": "^12.6.0",
|
|
65
65
|
"@atlaskit/tokens": "^1.28.0",
|
|
66
66
|
"@atlaskit/tooltip": "^18.0.0",
|