@atlaskit/link-datasource 1.19.23 → 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 +13 -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/datasource-table-view/datasourceTableView.js +33 -30
- package/dist/cjs/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +13 -7
- package/dist/cjs/ui/jira-issues-modal/initial-state-view/messages.js +2 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +9 -3
- 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/datasource-table-view/datasourceTableView.js +33 -30
- package/dist/es2019/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +9 -2
- package/dist/es2019/ui/jira-issues-modal/initial-state-view/messages.js +2 -2
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +9 -3
- 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/datasource-table-view/datasourceTableView.js +33 -30
- package/dist/esm/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.js +13 -7
- package/dist/esm/ui/jira-issues-modal/initial-state-view/messages.js +2 -2
- package/dist/esm/ui/jira-issues-modal/modal/index.js +9 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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
|
+
|
|
10
|
+
## 1.19.24
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#57192](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/57192) [`cb7776f514cb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cb7776f514cb) - Fix issue like table and assets editor plugin card not translated issue
|
|
15
|
+
|
|
3
16
|
## 1.19.23
|
|
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.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)),
|
|
@@ -9,12 +9,15 @@ var _react = require("react");
|
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _uuid = require("uuid");
|
|
11
11
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
12
|
+
var _intlMessagesProvider = require("@atlaskit/intl-messages-provider");
|
|
12
13
|
var _analytics = require("../../analytics");
|
|
13
14
|
var _constants = require("../../analytics/constants");
|
|
14
15
|
var _ufoExperiences = require("../../analytics/ufoExperiences");
|
|
15
16
|
var _useColumnPickerRenderedFailedUfoExperience = require("../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience");
|
|
16
17
|
var _useDataRenderedUfoExperience = require("../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience");
|
|
18
|
+
var _fetchMessagesForLocale = require("../../common/utils/locale/fetch-messages-for-locale");
|
|
17
19
|
var _useDatasourceTableState = require("../../hooks/useDatasourceTableState");
|
|
20
|
+
var _en = _interopRequireDefault(require("../../i18n/en"));
|
|
18
21
|
var _styled = require("../../ui/issue-like-table/styled");
|
|
19
22
|
var _accessRequired = require("../common/error-state/access-required");
|
|
20
23
|
var _loadingError = require("../common/error-state/loading-error");
|
|
@@ -128,35 +131,35 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
128
131
|
onRefresh: reset
|
|
129
132
|
});
|
|
130
133
|
}
|
|
131
|
-
return (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
);
|
|
134
|
+
return (0, _react2.jsx)(_intlMessagesProvider.IntlMessagesProvider, {
|
|
135
|
+
defaultMessages: _en.default,
|
|
136
|
+
loaderFn: _fetchMessagesForLocale.fetchMessagesForLocale
|
|
137
|
+
}, (0, _react2.jsx)("div", {
|
|
138
|
+
css: containerStyles,
|
|
139
|
+
className: "datasource-table"
|
|
140
|
+
}, hasColumns ? (0, _react2.jsx)(_issueLikeTable.IssueLikeDataTableView, {
|
|
141
|
+
testId: 'datasource-table-view',
|
|
142
|
+
hasNextPage: hasNextPage,
|
|
143
|
+
items: responseItems,
|
|
144
|
+
onNextPage: onNextPage,
|
|
145
|
+
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
146
|
+
status: status,
|
|
147
|
+
columns: columns,
|
|
148
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
149
|
+
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
150
|
+
columnCustomSizes: columnCustomSizes,
|
|
151
|
+
onColumnResize: onColumnResize,
|
|
152
|
+
scrollableContainerHeight: _styled.ScrollableContainerHeight,
|
|
153
|
+
parentContainerRenderInstanceId: tableRenderInstanceId,
|
|
154
|
+
extensionKey: extensionKey
|
|
155
|
+
}) : (0, _react2.jsx)(_emptyState.default, {
|
|
156
|
+
testId: "datasource-table-view-skeleton",
|
|
157
|
+
isCompact: true
|
|
158
|
+
}), (0, _react2.jsx)(_tableFooter.TableFooter, {
|
|
159
|
+
itemCount: isDataReady ? totalCount : undefined,
|
|
160
|
+
onRefresh: forcedReset,
|
|
161
|
+
isLoading: !isDataReady || status === 'loading',
|
|
162
|
+
url: url
|
|
163
|
+
})));
|
|
161
164
|
};
|
|
162
165
|
var DatasourceTableView = exports.DatasourceTableView = (0, _analyticsNext.withAnalyticsContext)(_constants.packageMetaData)(DatasourceTableViewWithoutAnalytics);
|
|
@@ -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) {
|
|
@@ -17,12 +17,12 @@ var initialStateViewMessages = exports.initialStateViewMessages = (0, _reactIntl
|
|
|
17
17
|
defaultMessage: 'Beta'
|
|
18
18
|
},
|
|
19
19
|
searchDescriptionForBasicSearch: {
|
|
20
|
-
id: 'linkDataSource.modal-initial-state.searchDescription',
|
|
20
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-basic',
|
|
21
21
|
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
22
22
|
defaultMessage: 'Search by keyword for issues to insert.'
|
|
23
23
|
},
|
|
24
24
|
searchDescriptionForJQLSearch: {
|
|
25
|
-
id: 'linkDataSource.modal-initial-state.searchDescription',
|
|
25
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-jql',
|
|
26
26
|
description: 'The initial modal search state helper message displayed under the search title when JQL search mode is selected',
|
|
27
27
|
defaultMessage: 'Use JQL (Jira Query Language) to search for issues.'
|
|
28
28
|
},
|
|
@@ -18,6 +18,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
18
18
|
var _uuid = require("uuid");
|
|
19
19
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
20
20
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
21
|
+
var _intlMessagesProvider = require("@atlaskit/intl-messages-provider");
|
|
21
22
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
22
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _linkUrl = _interopRequireDefault(require("@atlaskit/smart-card/link-url"));
|
|
@@ -29,7 +30,9 @@ var _ufoExperiences = require("../../../analytics/ufoExperiences");
|
|
|
29
30
|
var _useColumnPickerRenderedFailedUfoExperience = require("../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience");
|
|
30
31
|
var _useDataRenderedUfoExperience = require("../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience");
|
|
31
32
|
var _utils = require("../../../analytics/utils");
|
|
33
|
+
var _fetchMessagesForLocale = require("../../../common/utils/locale/fetch-messages-for-locale");
|
|
32
34
|
var _useDatasourceTableState = require("../../../hooks/useDatasourceTableState");
|
|
35
|
+
var _en = _interopRequireDefault(require("../../../i18n/en"));
|
|
33
36
|
var _getAvailableJiraSites = require("../../../services/getAvailableJiraSites");
|
|
34
37
|
var _accessRequired = require("../../common/error-state/access-required");
|
|
35
38
|
var _modalLoadingError = require("../../common/error-state/modal-loading-error");
|
|
@@ -76,7 +79,7 @@ var placeholderSmartLinkStyles = (0, _react2.css)({
|
|
|
76
79
|
borderRadius: '3px',
|
|
77
80
|
boxShadow: '0px 1px 1px rgba(9, 30, 66, 0.25), 0px 0px 1px rgba(9, 30, 66, 0.31)',
|
|
78
81
|
color: "var(--ds-text-brand, ".concat(_colors.B400, ")"),
|
|
79
|
-
padding:
|
|
82
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
80
83
|
});
|
|
81
84
|
var issueCountStyles = (0, _react2.css)({
|
|
82
85
|
flex: 1,
|
|
@@ -540,7 +543,10 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
540
543
|
}
|
|
541
544
|
return issueLikeDataTableView;
|
|
542
545
|
}, [columns.length, currentSearchMethod, issueLikeDataTableView, jql, jqlUrl, resolvedWithNoResults, responseItems.length, retrieveUrlForSmartCardRender, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited]);
|
|
543
|
-
return (0, _react2.jsx)(
|
|
546
|
+
return (0, _react2.jsx)(_intlMessagesProvider.IntlMessagesProvider, {
|
|
547
|
+
defaultMessages: _en.default,
|
|
548
|
+
loaderFn: _fetchMessagesForLocale.fetchMessagesForLocale
|
|
549
|
+
}, (0, _react2.jsx)(_modalDialog.ModalTransition, null, (0, _react2.jsx)(_modalDialog.default, {
|
|
544
550
|
testId: "jira-jql-datasource-modal",
|
|
545
551
|
onClose: onCancel,
|
|
546
552
|
width: "calc(100% - 80px)",
|
|
@@ -596,7 +602,7 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
596
602
|
onClick: onInsertPressed,
|
|
597
603
|
isDisabled: isInsertDisabled,
|
|
598
604
|
testId: "jira-jql-datasource-modal--insert-button"
|
|
599
|
-
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.insertIssuesButtonText)))));
|
|
605
|
+
}, (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.modalMessages.insertIssuesButtonText))))));
|
|
600
606
|
};
|
|
601
607
|
var analyticsContextAttributes = {
|
|
602
608
|
dataProvider: 'jira-issues'
|
|
@@ -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)),
|
|
@@ -3,12 +3,15 @@ import { useCallback, useEffect, useRef } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
6
7
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
7
8
|
import { packageMetaData } from '../../analytics/constants';
|
|
8
9
|
import { startUfoExperience } from '../../analytics/ufoExperiences';
|
|
9
10
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
10
11
|
import { useDataRenderedUfoExperience } from '../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
12
|
+
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
11
13
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
14
|
+
import i18nEN from '../../i18n/en';
|
|
12
15
|
import { ScrollableContainerHeight } from '../../ui/issue-like-table/styled';
|
|
13
16
|
import { AccessRequired } from '../common/error-state/access-required';
|
|
14
17
|
import { LoadingError } from '../common/error-state/loading-error';
|
|
@@ -123,35 +126,35 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
123
126
|
onRefresh: reset
|
|
124
127
|
});
|
|
125
128
|
}
|
|
126
|
-
return (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
);
|
|
129
|
+
return jsx(IntlMessagesProvider, {
|
|
130
|
+
defaultMessages: i18nEN,
|
|
131
|
+
loaderFn: fetchMessagesForLocale
|
|
132
|
+
}, jsx("div", {
|
|
133
|
+
css: containerStyles,
|
|
134
|
+
className: "datasource-table"
|
|
135
|
+
}, hasColumns ? jsx(IssueLikeDataTableView, {
|
|
136
|
+
testId: 'datasource-table-view',
|
|
137
|
+
hasNextPage: hasNextPage,
|
|
138
|
+
items: responseItems,
|
|
139
|
+
onNextPage: onNextPage,
|
|
140
|
+
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
141
|
+
status: status,
|
|
142
|
+
columns: columns,
|
|
143
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
144
|
+
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
145
|
+
columnCustomSizes: columnCustomSizes,
|
|
146
|
+
onColumnResize: onColumnResize,
|
|
147
|
+
scrollableContainerHeight: ScrollableContainerHeight,
|
|
148
|
+
parentContainerRenderInstanceId: tableRenderInstanceId,
|
|
149
|
+
extensionKey: extensionKey
|
|
150
|
+
}) : jsx(EmptyState, {
|
|
151
|
+
testId: "datasource-table-view-skeleton",
|
|
152
|
+
isCompact: true
|
|
153
|
+
}), jsx(TableFooter, {
|
|
154
|
+
itemCount: isDataReady ? totalCount : undefined,
|
|
155
|
+
onRefresh: forcedReset,
|
|
156
|
+
isLoading: !isDataReady || status === 'loading',
|
|
157
|
+
url: url
|
|
158
|
+
})));
|
|
156
159
|
};
|
|
157
160
|
export const DatasourceTableView = withAnalyticsContext(packageMetaData)(DatasourceTableViewWithoutAnalytics);
|
|
@@ -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);
|
|
@@ -11,12 +11,12 @@ export const initialStateViewMessages = defineMessages({
|
|
|
11
11
|
defaultMessage: 'Beta'
|
|
12
12
|
},
|
|
13
13
|
searchDescriptionForBasicSearch: {
|
|
14
|
-
id: 'linkDataSource.modal-initial-state.searchDescription',
|
|
14
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-basic',
|
|
15
15
|
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
16
16
|
defaultMessage: 'Search by keyword for issues to insert.'
|
|
17
17
|
},
|
|
18
18
|
searchDescriptionForJQLSearch: {
|
|
19
|
-
id: 'linkDataSource.modal-initial-state.searchDescription',
|
|
19
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-jql',
|
|
20
20
|
description: 'The initial modal search state helper message displayed under the search title when JQL search mode is selected',
|
|
21
21
|
defaultMessage: 'Use JQL (Jira Query Language) to search for issues.'
|
|
22
22
|
},
|
|
@@ -6,6 +6,7 @@ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
7
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
8
8
|
import Button from '@atlaskit/button/standard-button';
|
|
9
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
9
10
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
10
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
@@ -17,7 +18,9 @@ import { startUfoExperience } from '../../../analytics/ufoExperiences';
|
|
|
17
18
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
18
19
|
import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
19
20
|
import { mapSearchMethod } from '../../../analytics/utils';
|
|
21
|
+
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
20
22
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
23
|
+
import i18nEN from '../../../i18n/en';
|
|
21
24
|
import { getAvailableJiraSites } from '../../../services/getAvailableJiraSites';
|
|
22
25
|
import { AccessRequired } from '../../common/error-state/access-required';
|
|
23
26
|
import { ModalLoadingError } from '../../common/error-state/modal-loading-error';
|
|
@@ -60,7 +63,7 @@ const placeholderSmartLinkStyles = css({
|
|
|
60
63
|
borderRadius: '3px',
|
|
61
64
|
boxShadow: '0px 1px 1px rgba(9, 30, 66, 0.25), 0px 0px 1px rgba(9, 30, 66, 0.31)',
|
|
62
65
|
color: `var(--ds-text-brand, ${B400})`,
|
|
63
|
-
padding:
|
|
66
|
+
padding: `0px ${"var(--ds-space-025, 2px)"}`
|
|
64
67
|
});
|
|
65
68
|
const issueCountStyles = css({
|
|
66
69
|
flex: 1,
|
|
@@ -488,7 +491,10 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
488
491
|
}
|
|
489
492
|
return issueLikeDataTableView;
|
|
490
493
|
}, [columns.length, currentSearchMethod, issueLikeDataTableView, jql, jqlUrl, resolvedWithNoResults, responseItems.length, retrieveUrlForSmartCardRender, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited]);
|
|
491
|
-
return jsx(
|
|
494
|
+
return jsx(IntlMessagesProvider, {
|
|
495
|
+
defaultMessages: i18nEN,
|
|
496
|
+
loaderFn: fetchMessagesForLocale
|
|
497
|
+
}, jsx(ModalTransition, null, jsx(Modal, {
|
|
492
498
|
testId: "jira-jql-datasource-modal",
|
|
493
499
|
onClose: onCancel,
|
|
494
500
|
width: "calc(100% - 80px)",
|
|
@@ -544,7 +550,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
544
550
|
onClick: onInsertPressed,
|
|
545
551
|
isDisabled: isInsertDisabled,
|
|
546
552
|
testId: "jira-jql-datasource-modal--insert-button"
|
|
547
|
-
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
|
|
553
|
+
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText))))));
|
|
548
554
|
};
|
|
549
555
|
const analyticsContextAttributes = {
|
|
550
556
|
dataProvider: 'jira-issues'
|
|
@@ -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)),
|
|
@@ -3,12 +3,15 @@ import { useCallback, useEffect, useRef } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
6
7
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
7
8
|
import { packageMetaData } from '../../analytics/constants';
|
|
8
9
|
import { startUfoExperience } from '../../analytics/ufoExperiences';
|
|
9
10
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
10
11
|
import { useDataRenderedUfoExperience } from '../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
12
|
+
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
11
13
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
14
|
+
import i18nEN from '../../i18n/en';
|
|
12
15
|
import { ScrollableContainerHeight } from '../../ui/issue-like-table/styled';
|
|
13
16
|
import { AccessRequired } from '../common/error-state/access-required';
|
|
14
17
|
import { LoadingError } from '../common/error-state/loading-error';
|
|
@@ -120,35 +123,35 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
120
123
|
onRefresh: reset
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
|
-
return (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
);
|
|
126
|
+
return jsx(IntlMessagesProvider, {
|
|
127
|
+
defaultMessages: i18nEN,
|
|
128
|
+
loaderFn: fetchMessagesForLocale
|
|
129
|
+
}, jsx("div", {
|
|
130
|
+
css: containerStyles,
|
|
131
|
+
className: "datasource-table"
|
|
132
|
+
}, hasColumns ? jsx(IssueLikeDataTableView, {
|
|
133
|
+
testId: 'datasource-table-view',
|
|
134
|
+
hasNextPage: hasNextPage,
|
|
135
|
+
items: responseItems,
|
|
136
|
+
onNextPage: onNextPage,
|
|
137
|
+
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
138
|
+
status: status,
|
|
139
|
+
columns: columns,
|
|
140
|
+
visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
|
|
141
|
+
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
142
|
+
columnCustomSizes: columnCustomSizes,
|
|
143
|
+
onColumnResize: onColumnResize,
|
|
144
|
+
scrollableContainerHeight: ScrollableContainerHeight,
|
|
145
|
+
parentContainerRenderInstanceId: tableRenderInstanceId,
|
|
146
|
+
extensionKey: extensionKey
|
|
147
|
+
}) : jsx(EmptyState, {
|
|
148
|
+
testId: "datasource-table-view-skeleton",
|
|
149
|
+
isCompact: true
|
|
150
|
+
}), jsx(TableFooter, {
|
|
151
|
+
itemCount: isDataReady ? totalCount : undefined,
|
|
152
|
+
onRefresh: forcedReset,
|
|
153
|
+
isLoading: !isDataReady || status === 'loading',
|
|
154
|
+
url: url
|
|
155
|
+
})));
|
|
153
156
|
};
|
|
154
157
|
export var DatasourceTableView = withAnalyticsContext(packageMetaData)(DatasourceTableViewWithoutAnalytics);
|
|
@@ -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) {
|
|
@@ -11,12 +11,12 @@ export var initialStateViewMessages = defineMessages({
|
|
|
11
11
|
defaultMessage: 'Beta'
|
|
12
12
|
},
|
|
13
13
|
searchDescriptionForBasicSearch: {
|
|
14
|
-
id: 'linkDataSource.modal-initial-state.searchDescription',
|
|
14
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-basic',
|
|
15
15
|
description: 'The initial modal search state helper message displayed under the search title when basic search mode is selected',
|
|
16
16
|
defaultMessage: 'Search by keyword for issues to insert.'
|
|
17
17
|
},
|
|
18
18
|
searchDescriptionForJQLSearch: {
|
|
19
|
-
id: 'linkDataSource.modal-initial-state.searchDescription',
|
|
19
|
+
id: 'linkDataSource.modal-initial-state.searchDescription-jql',
|
|
20
20
|
description: 'The initial modal search state helper message displayed under the search title when JQL search mode is selected',
|
|
21
21
|
defaultMessage: 'Use JQL (Jira Query Language) to search for issues.'
|
|
22
22
|
},
|
|
@@ -13,6 +13,7 @@ import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
|
13
13
|
import { v4 as uuidv4 } from 'uuid';
|
|
14
14
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
15
15
|
import Button from '@atlaskit/button/standard-button';
|
|
16
|
+
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
16
17
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
17
18
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
@@ -24,7 +25,9 @@ import { startUfoExperience } from '../../../analytics/ufoExperiences';
|
|
|
24
25
|
import { useColumnPickerRenderedFailedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience';
|
|
25
26
|
import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/hooks/useDataRenderedUfoExperience';
|
|
26
27
|
import { mapSearchMethod } from '../../../analytics/utils';
|
|
28
|
+
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
27
29
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
30
|
+
import i18nEN from '../../../i18n/en';
|
|
28
31
|
import { getAvailableJiraSites } from '../../../services/getAvailableJiraSites';
|
|
29
32
|
import { AccessRequired } from '../../common/error-state/access-required';
|
|
30
33
|
import { ModalLoadingError } from '../../common/error-state/modal-loading-error';
|
|
@@ -67,7 +70,7 @@ var placeholderSmartLinkStyles = css({
|
|
|
67
70
|
borderRadius: '3px',
|
|
68
71
|
boxShadow: '0px 1px 1px rgba(9, 30, 66, 0.25), 0px 0px 1px rgba(9, 30, 66, 0.31)',
|
|
69
72
|
color: "var(--ds-text-brand, ".concat(B400, ")"),
|
|
70
|
-
padding:
|
|
73
|
+
padding: "0px ".concat("var(--ds-space-025, 2px)")
|
|
71
74
|
});
|
|
72
75
|
var issueCountStyles = css({
|
|
73
76
|
flex: 1,
|
|
@@ -531,7 +534,10 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
531
534
|
}
|
|
532
535
|
return issueLikeDataTableView;
|
|
533
536
|
}, [columns.length, currentSearchMethod, issueLikeDataTableView, jql, jqlUrl, resolvedWithNoResults, responseItems.length, retrieveUrlForSmartCardRender, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url, status, urlBeingEdited]);
|
|
534
|
-
return jsx(
|
|
537
|
+
return jsx(IntlMessagesProvider, {
|
|
538
|
+
defaultMessages: i18nEN,
|
|
539
|
+
loaderFn: fetchMessagesForLocale
|
|
540
|
+
}, jsx(ModalTransition, null, jsx(Modal, {
|
|
535
541
|
testId: "jira-jql-datasource-modal",
|
|
536
542
|
onClose: onCancel,
|
|
537
543
|
width: "calc(100% - 80px)",
|
|
@@ -587,7 +593,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
587
593
|
onClick: onInsertPressed,
|
|
588
594
|
isDisabled: isInsertDisabled,
|
|
589
595
|
testId: "jira-jql-datasource-modal--insert-button"
|
|
590
|
-
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
|
|
596
|
+
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText))))));
|
|
591
597
|
};
|
|
592
598
|
var analyticsContextAttributes = {
|
|
593
599
|
dataProvider: 'jira-issues'
|