@atlaskit/link-datasource 1.19.24 → 1.19.25
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 +7 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +13 -7
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +1 -1
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +9 -2
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +1 -1
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +13 -7
- package/dist/esm/ui/jira-issues-modal/modal/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.19.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59956](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59956) [`df18ff69a316`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/df18ff69a316) - Fix issue where assignee total count was wrong when clicking on show more button.
|
|
8
|
+
- [#59897](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59897) [`48e22f03d838`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/48e22f03d838) - Converted spacing values to corresponding space tokens
|
|
9
|
+
|
|
3
10
|
## 1.19.24
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -7,5 +7,5 @@ exports.packageMetaData = exports.EVENT_CHANNEL = void 0;
|
|
|
7
7
|
var EVENT_CHANNEL = exports.EVENT_CHANNEL = 'media';
|
|
8
8
|
var packageMetaData = exports.packageMetaData = {
|
|
9
9
|
packageName: "@atlaskit/link-datasource",
|
|
10
|
-
packageVersion: "1.19.
|
|
10
|
+
packageVersion: "1.19.25"
|
|
11
11
|
};
|
|
@@ -87,7 +87,7 @@ var AqlSearchInput = exports.AqlSearchInput = function AqlSearchInput(_ref) {
|
|
|
87
87
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_textfield.default, (0, _extends2.default)({}, fieldProps, {
|
|
88
88
|
elemBeforeInput: (0, _react2.jsx)("span", {
|
|
89
89
|
style: {
|
|
90
|
-
paddingLeft:
|
|
90
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
91
91
|
width: 24
|
|
92
92
|
}
|
|
93
93
|
}, renderValidatorIcon(lastValidationResult)),
|
|
@@ -77,9 +77,9 @@ var useFilterOptions = exports.useFilterOptions = function useFilterOptions(_ref
|
|
|
77
77
|
return _context.abrupt("return");
|
|
78
78
|
case 3:
|
|
79
79
|
isNewSearch = !pageCursor;
|
|
80
|
-
isNewSearch ? setStatus('loading') : setStatus('loadingMore');
|
|
81
80
|
isRequestLikeInitialSearch = !pageCursor && !searchString;
|
|
82
81
|
initialResponseData = initialData.current;
|
|
82
|
+
isNewSearch ? setStatus('loading') : setStatus('loadingMore');
|
|
83
83
|
_context.prev = 7;
|
|
84
84
|
if (!(isRequestLikeInitialSearch && initialResponseData)) {
|
|
85
85
|
_context.next = 12;
|
|
@@ -113,6 +113,13 @@ var useFilterOptions = exports.useFilterOptions = function useFilterOptions(_ref
|
|
|
113
113
|
siteUrl: siteUrl
|
|
114
114
|
}));
|
|
115
115
|
mappedTotalCount = (0, _transformers.mapFieldValuesToTotalCount)(response);
|
|
116
|
+
/**
|
|
117
|
+
* For assignee filter option, we want `Unassigned` as an option.
|
|
118
|
+
* Since we add it manually, we also need to update the total count by +1
|
|
119
|
+
*/
|
|
120
|
+
if (filterType === 'assignee' && !searchString) {
|
|
121
|
+
mappedTotalCount += 1;
|
|
122
|
+
}
|
|
116
123
|
if (isNewSearch) {
|
|
117
124
|
if (isRequestLikeInitialSearch) {
|
|
118
125
|
/**
|
|
@@ -127,7 +134,6 @@ var useFilterOptions = exports.useFilterOptions = function useFilterOptions(_ref
|
|
|
127
134
|
*/
|
|
128
135
|
if (filterType === 'assignee') {
|
|
129
136
|
mappedResponse.unshift(getAssigneeUnassignedFilterOption(formatMessage));
|
|
130
|
-
mappedTotalCount += 1;
|
|
131
137
|
}
|
|
132
138
|
}
|
|
133
139
|
setFilterOptions(mappedResponse);
|
|
@@ -137,18 +143,18 @@ var useFilterOptions = exports.useFilterOptions = function useFilterOptions(_ref
|
|
|
137
143
|
setTotalCount(mappedTotalCount);
|
|
138
144
|
setNextPageCursor((0, _transformers.mapFieldValuesToPageCursor)(response));
|
|
139
145
|
setStatus('resolved');
|
|
140
|
-
_context.next =
|
|
146
|
+
_context.next = 33;
|
|
141
147
|
break;
|
|
142
|
-
case
|
|
143
|
-
_context.prev =
|
|
148
|
+
case 29:
|
|
149
|
+
_context.prev = 29;
|
|
144
150
|
_context.t1 = _context["catch"](7);
|
|
145
151
|
setStatus('rejected');
|
|
146
152
|
setErrors([_context.t1]);
|
|
147
|
-
case
|
|
153
|
+
case 33:
|
|
148
154
|
case "end":
|
|
149
155
|
return _context.stop();
|
|
150
156
|
}
|
|
151
|
-
}, _callee, null, [[7,
|
|
157
|
+
}, _callee, null, [[7, 29]]);
|
|
152
158
|
})), [cloudId, filterOptions, filterType, formatMessage, getFieldValues, siteUrl]);
|
|
153
159
|
(0, _react.useEffect)(function () {
|
|
154
160
|
if (status !== 'rejected' && errors.length !== 0) {
|
|
@@ -79,7 +79,7 @@ var placeholderSmartLinkStyles = (0, _react2.css)({
|
|
|
79
79
|
borderRadius: '3px',
|
|
80
80
|
boxShadow: '0px 1px 1px rgba(9, 30, 66, 0.25), 0px 0px 1px rgba(9, 30, 66, 0.31)',
|
|
81
81
|
color: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
|
|
82
|
-
padding:
|
|
82
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
83
83
|
});
|
|
84
84
|
var issueCountStyles = (0, _react2.css)({
|
|
85
85
|
flex: 1,
|
|
@@ -81,7 +81,7 @@ export const AqlSearchInput = ({
|
|
|
81
81
|
}) => jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, {
|
|
82
82
|
elemBeforeInput: jsx("span", {
|
|
83
83
|
style: {
|
|
84
|
-
paddingLeft:
|
|
84
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
85
85
|
width: 24
|
|
86
86
|
}
|
|
87
87
|
}, renderValidatorIcon(lastValidationResult)),
|
|
@@ -36,11 +36,11 @@ export const useFilterOptions = ({
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
const isNewSearch = !pageCursor;
|
|
39
|
-
isNewSearch ? setStatus('loading') : setStatus('loadingMore');
|
|
40
39
|
const isRequestLikeInitialSearch = !pageCursor && !searchString;
|
|
41
40
|
const {
|
|
42
41
|
current: initialResponseData
|
|
43
42
|
} = initialData;
|
|
43
|
+
isNewSearch ? setStatus('loading') : setStatus('loadingMore');
|
|
44
44
|
try {
|
|
45
45
|
const response = isRequestLikeInitialSearch && initialResponseData ? initialResponseData : await getFieldValues({
|
|
46
46
|
cloudId,
|
|
@@ -59,6 +59,14 @@ export const useFilterOptions = ({
|
|
|
59
59
|
siteUrl
|
|
60
60
|
});
|
|
61
61
|
let mappedTotalCount = mapFieldValuesToTotalCount(response);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* For assignee filter option, we want `Unassigned` as an option.
|
|
65
|
+
* Since we add it manually, we also need to update the total count by +1
|
|
66
|
+
*/
|
|
67
|
+
if (filterType === 'assignee' && !searchString) {
|
|
68
|
+
mappedTotalCount += 1;
|
|
69
|
+
}
|
|
62
70
|
if (isNewSearch) {
|
|
63
71
|
if (isRequestLikeInitialSearch) {
|
|
64
72
|
/**
|
|
@@ -73,7 +81,6 @@ export const useFilterOptions = ({
|
|
|
73
81
|
*/
|
|
74
82
|
if (filterType === 'assignee') {
|
|
75
83
|
mappedResponse.unshift(getAssigneeUnassignedFilterOption(formatMessage));
|
|
76
|
-
mappedTotalCount += 1;
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
setFilterOptions(mappedResponse);
|
|
@@ -63,7 +63,7 @@ const placeholderSmartLinkStyles = css({
|
|
|
63
63
|
borderRadius: '3px',
|
|
64
64
|
boxShadow: '0px 1px 1px rgba(9, 30, 66, 0.25), 0px 0px 1px rgba(9, 30, 66, 0.31)',
|
|
65
65
|
color: `var(--ds-text-brand, ${B400})`,
|
|
66
|
-
padding:
|
|
66
|
+
padding: `0px ${"var(--ds-space-025, 2px)"}`
|
|
67
67
|
});
|
|
68
68
|
const issueCountStyles = css({
|
|
69
69
|
flex: 1,
|
|
@@ -79,7 +79,7 @@ export var AqlSearchInput = function AqlSearchInput(_ref) {
|
|
|
79
79
|
return jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, {
|
|
80
80
|
elemBeforeInput: jsx("span", {
|
|
81
81
|
style: {
|
|
82
|
-
paddingLeft:
|
|
82
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
83
83
|
width: 24
|
|
84
84
|
}
|
|
85
85
|
}, renderValidatorIcon(lastValidationResult)),
|
|
@@ -70,9 +70,9 @@ export var useFilterOptions = function useFilterOptions(_ref) {
|
|
|
70
70
|
return _context.abrupt("return");
|
|
71
71
|
case 3:
|
|
72
72
|
isNewSearch = !pageCursor;
|
|
73
|
-
isNewSearch ? setStatus('loading') : setStatus('loadingMore');
|
|
74
73
|
isRequestLikeInitialSearch = !pageCursor && !searchString;
|
|
75
74
|
initialResponseData = initialData.current;
|
|
75
|
+
isNewSearch ? setStatus('loading') : setStatus('loadingMore');
|
|
76
76
|
_context.prev = 7;
|
|
77
77
|
if (!(isRequestLikeInitialSearch && initialResponseData)) {
|
|
78
78
|
_context.next = 12;
|
|
@@ -106,6 +106,13 @@ export var useFilterOptions = function useFilterOptions(_ref) {
|
|
|
106
106
|
siteUrl: siteUrl
|
|
107
107
|
}));
|
|
108
108
|
mappedTotalCount = mapFieldValuesToTotalCount(response);
|
|
109
|
+
/**
|
|
110
|
+
* For assignee filter option, we want `Unassigned` as an option.
|
|
111
|
+
* Since we add it manually, we also need to update the total count by +1
|
|
112
|
+
*/
|
|
113
|
+
if (filterType === 'assignee' && !searchString) {
|
|
114
|
+
mappedTotalCount += 1;
|
|
115
|
+
}
|
|
109
116
|
if (isNewSearch) {
|
|
110
117
|
if (isRequestLikeInitialSearch) {
|
|
111
118
|
/**
|
|
@@ -120,7 +127,6 @@ export var useFilterOptions = function useFilterOptions(_ref) {
|
|
|
120
127
|
*/
|
|
121
128
|
if (filterType === 'assignee') {
|
|
122
129
|
mappedResponse.unshift(getAssigneeUnassignedFilterOption(formatMessage));
|
|
123
|
-
mappedTotalCount += 1;
|
|
124
130
|
}
|
|
125
131
|
}
|
|
126
132
|
setFilterOptions(mappedResponse);
|
|
@@ -130,18 +136,18 @@ export var useFilterOptions = function useFilterOptions(_ref) {
|
|
|
130
136
|
setTotalCount(mappedTotalCount);
|
|
131
137
|
setNextPageCursor(mapFieldValuesToPageCursor(response));
|
|
132
138
|
setStatus('resolved');
|
|
133
|
-
_context.next =
|
|
139
|
+
_context.next = 33;
|
|
134
140
|
break;
|
|
135
|
-
case
|
|
136
|
-
_context.prev =
|
|
141
|
+
case 29:
|
|
142
|
+
_context.prev = 29;
|
|
137
143
|
_context.t1 = _context["catch"](7);
|
|
138
144
|
setStatus('rejected');
|
|
139
145
|
setErrors([_context.t1]);
|
|
140
|
-
case
|
|
146
|
+
case 33:
|
|
141
147
|
case "end":
|
|
142
148
|
return _context.stop();
|
|
143
149
|
}
|
|
144
|
-
}, _callee, null, [[7,
|
|
150
|
+
}, _callee, null, [[7, 29]]);
|
|
145
151
|
})), [cloudId, filterOptions, filterType, formatMessage, getFieldValues, siteUrl]);
|
|
146
152
|
useEffect(function () {
|
|
147
153
|
if (status !== 'rejected' && errors.length !== 0) {
|
|
@@ -70,7 +70,7 @@ var placeholderSmartLinkStyles = css({
|
|
|
70
70
|
borderRadius: '3px',
|
|
71
71
|
boxShadow: '0px 1px 1px rgba(9, 30, 66, 0.25), 0px 0px 1px rgba(9, 30, 66, 0.31)',
|
|
72
72
|
color: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
73
|
-
padding:
|
|
73
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
74
74
|
});
|
|
75
75
|
var issueCountStyles = css({
|
|
76
76
|
flex: 1,
|