@atlaskit/link-datasource 3.1.5 → 3.2.1
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 +15 -0
- package/dist/cjs/ui/jira-issues-modal/basic-filters/utils/isQueryTooComplex.js +1 -2
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +7 -14
- package/dist/cjs/ui/jira-issues-modal/modal/ModalOld.js +1 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +1 -4
- package/dist/es2019/ui/jira-issues-modal/basic-filters/utils/isQueryTooComplex.js +1 -2
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +6 -13
- package/dist/es2019/ui/jira-issues-modal/modal/ModalOld.js +1 -2
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +1 -4
- package/dist/esm/ui/jira-issues-modal/basic-filters/utils/isQueryTooComplex.js +1 -2
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +7 -14
- package/dist/esm/ui/jira-issues-modal/modal/ModalOld.js +1 -2
- package/dist/esm/ui/jira-issues-modal/modal/index.js +1 -4
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 3.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#147374](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147374)
|
|
14
|
+
[`8f647e8fa0041`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f647e8fa0041) -
|
|
15
|
+
Introduces basic filters for Jira smart link list view config modal as a permanent feature by
|
|
16
|
+
removing feature flag platform.linking-platform.datasource.show-jlol-basic-filters
|
|
17
|
+
|
|
3
18
|
## 3.1.5
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -16,7 +16,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
17
17
|
var _mergeWith = _interopRequireDefault(require("lodash/mergeWith"));
|
|
18
18
|
var _jqlAst = require("@atlaskit/jql-ast");
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _jiraSearchContainer = require("../../jira-search-container");
|
|
21
20
|
var _isClauseTooComplex = require("./isClauseTooComplex");
|
|
22
21
|
var _index = require("./index");
|
|
@@ -119,7 +118,7 @@ var JqlClauseCollectingVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
|
119
118
|
return JqlClauseCollectingVisitor;
|
|
120
119
|
}(_jqlAst.AbstractJastVisitor);
|
|
121
120
|
var isQueryTooComplex = exports.isQueryTooComplex = function isQueryTooComplex(jql) {
|
|
122
|
-
if (!
|
|
121
|
+
if (!jql) {
|
|
123
122
|
return false;
|
|
124
123
|
}
|
|
125
124
|
if (!(0, _index.isValidJql)(jql)) {
|
|
@@ -13,7 +13,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _react2 = require("@emotion/react");
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
var _useDebounce = require("use-debounce");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _primitives = require("@atlaskit/primitives");
|
|
18
17
|
var _analytics = require("../../../analytics");
|
|
19
18
|
var _basicSearchInput = require("../../common/modal/basic-search-input");
|
|
@@ -88,12 +87,6 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
88
87
|
_useState14 = (0, _slicedToArray2.default)(_useState13, 2),
|
|
89
88
|
filterSelections = _useState14[0],
|
|
90
89
|
setFilterSelections = _useState14[1];
|
|
91
|
-
var showBasicFilters = (0, _react.useMemo)(function () {
|
|
92
|
-
if ((0, _platformFeatureFlags.fg)('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
return false;
|
|
96
|
-
}, []);
|
|
97
90
|
var modeSwitcherOptionsMap = (0, _react.useMemo)(function () {
|
|
98
91
|
return {
|
|
99
92
|
jql: {
|
|
@@ -109,8 +102,8 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
109
102
|
};
|
|
110
103
|
}, [formatMessage, isComplexQuery]);
|
|
111
104
|
var modeSwitcherOptions = (0, _react.useMemo)(function () {
|
|
112
|
-
return
|
|
113
|
-
}, [modeSwitcherOptionsMap
|
|
105
|
+
return [modeSwitcherOptionsMap.basic, modeSwitcherOptionsMap.jql];
|
|
106
|
+
}, [modeSwitcherOptionsMap]);
|
|
114
107
|
var _useHydrateJqlQuery = (0, _useHydrateJqlQuery2.useHydrateJqlQuery)(cloudId || '', searchBarJql),
|
|
115
108
|
hydratedOptions = _useHydrateJqlQuery.hydratedOptions,
|
|
116
109
|
fetchHydratedJqlOptions = _useHydrateJqlQuery.fetchHydratedJqlOptions,
|
|
@@ -160,11 +153,11 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
160
153
|
isQueryComplex: isCurrentQueryComplex
|
|
161
154
|
});
|
|
162
155
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
163
|
-
if (
|
|
156
|
+
if (!isCurrentQueryComplex) {
|
|
164
157
|
fetchHydratedJqlOptions();
|
|
165
158
|
}
|
|
166
159
|
}
|
|
167
|
-
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch
|
|
160
|
+
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch]);
|
|
168
161
|
var _useDebouncedCallback = (0, _useDebounce.useDebouncedCallback)(function (filterValues) {
|
|
169
162
|
var jqlWithFilterValues = (0, _buildJQL.buildJQL)({
|
|
170
163
|
rawSearch: basicSearchTerm,
|
|
@@ -192,7 +185,7 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
192
185
|
(0, _react.useEffect)(function () {
|
|
193
186
|
var isCurrentQueryComplex = (0, _isQueryTooComplex.isQueryTooComplex)(searchBarJql);
|
|
194
187
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
195
|
-
if (
|
|
188
|
+
if (!isCurrentQueryComplex && searchBarJql !== DEFAULT_JQL_QUERY) {
|
|
196
189
|
fetchHydratedJqlOptions();
|
|
197
190
|
}
|
|
198
191
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -231,8 +224,8 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
231
224
|
searchTerm: basicSearchTerm,
|
|
232
225
|
placeholder: _messages.basicSearchInputMessages.basicTextSearchLabel,
|
|
233
226
|
testId: "jira-datasource-modal",
|
|
234
|
-
fullWidth:
|
|
235
|
-
}),
|
|
227
|
+
fullWidth: false
|
|
228
|
+
}), (0, _react2.jsx)(_basicFilters.BasicFilters, {
|
|
236
229
|
jql: searchBarJql,
|
|
237
230
|
site: site,
|
|
238
231
|
onChange: handleBasicFilterSelectionChange,
|
|
@@ -103,7 +103,7 @@ var PlainJiraIssuesConfigModalOld = exports.PlainJiraIssuesConfigModalOld = func
|
|
|
103
103
|
// analytics related parameters
|
|
104
104
|
var searchCount = (0, _react.useRef)(0);
|
|
105
105
|
var userInteractions = (0, _userInteractions.useUserInteractions)();
|
|
106
|
-
var initialSearchMethod =
|
|
106
|
+
var initialSearchMethod = !(0, _isQueryTooComplex.isQueryTooComplex)((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.jql) || '') ? 'basic' : 'jql';
|
|
107
107
|
var _useState11 = (0, _react.useState)(initialSearchMethod),
|
|
108
108
|
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
109
109
|
currentSearchMethod = _useState12[0],
|
|
@@ -430,7 +430,6 @@ var PlainJiraIssuesConfigModalOld = exports.PlainJiraIssuesConfigModalOld = func
|
|
|
430
430
|
}, !!jql ? (0, _react2.jsx)(_issueLikeTable.EmptyState, {
|
|
431
431
|
testId: "jira-datasource-modal--empty-state"
|
|
432
432
|
}) : (0, _react2.jsx)(_initialStateView.InitialStateView, {
|
|
433
|
-
showBeta: !(0, _platformFeatureFlags.fg)('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
434
433
|
icon: (0, _react2.jsx)(_jiraIssuesInitialStateSvg.JiraInitialStateSVG, null),
|
|
435
434
|
title: _messages3.modalMessages.searchJiraTitle,
|
|
436
435
|
description: currentSearchMethod === 'jql' ? _messages2.initialStateViewMessages.searchDescriptionForJQLSearch : _messages2.initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
@@ -105,9 +105,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
105
105
|
// analytics related parameters
|
|
106
106
|
var searchCount = (0, _react.useRef)(0);
|
|
107
107
|
var userInteractions = (0, _userInteractions.useUserInteractions)();
|
|
108
|
-
var initialSearchMethod =
|
|
109
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
110
|
-
(0, _platformFeatureFlags.fg)('platform.linking-platform.datasource.show-jlol-basic-filters') && !(0, _isQueryTooComplex.isQueryTooComplex)(initialJql || '') ? 'basic' : 'jql';
|
|
108
|
+
var initialSearchMethod = !(0, _isQueryTooComplex.isQueryTooComplex)(initialJql || '') ? 'basic' : 'jql';
|
|
111
109
|
var _useState5 = (0, _react.useState)(initialSearchMethod),
|
|
112
110
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
113
111
|
currentSearchMethod = _useState6[0],
|
|
@@ -298,7 +296,6 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
298
296
|
}, !!jql ? (0, _react2.jsx)(_issueLikeTable.EmptyState, {
|
|
299
297
|
testId: "jira-datasource-modal--empty-state"
|
|
300
298
|
}) : (0, _react2.jsx)(_initialStateView.InitialStateView, {
|
|
301
|
-
showBeta: !(0, _platformFeatureFlags.fg)('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
302
299
|
icon: (0, _react2.jsx)(_jiraIssuesInitialStateSvg.JiraInitialStateSVG, null),
|
|
303
300
|
title: _messages3.modalMessages.searchJiraTitle,
|
|
304
301
|
description: currentSearchMethod === 'jql' ? _messages2.initialStateViewMessages.searchDescriptionForJQLSearch : _messages2.initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import mergeWith from 'lodash/mergeWith';
|
|
3
3
|
import { AbstractJastVisitor, COMPOUND_OPERATOR_AND, COMPOUND_OPERATOR_OR, JastBuilder, OPERATOR_EQUALS, OPERATOR_IN, OPERATOR_LIKE } from '@atlaskit/jql-ast';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { ALLOWED_ORDER_BY_KEYS } from '../../jira-search-container';
|
|
6
5
|
import { isClauseTooComplex } from './isClauseTooComplex';
|
|
7
6
|
import { isValidJql } from './index';
|
|
@@ -83,7 +82,7 @@ class JqlClauseCollectingVisitor extends AbstractJastVisitor {
|
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
export const isQueryTooComplex = jql => {
|
|
86
|
-
if (!
|
|
85
|
+
if (!jql) {
|
|
87
86
|
return false;
|
|
88
87
|
}
|
|
89
88
|
if (!isValidJql(jql)) {
|
|
@@ -8,7 +8,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { useIntl } from 'react-intl-next';
|
|
10
10
|
import { useDebouncedCallback } from 'use-debounce';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
13
12
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
14
13
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
@@ -58,12 +57,6 @@ export const JiraSearchContainer = props => {
|
|
|
58
57
|
const [orderKey, setOrderKey] = useState();
|
|
59
58
|
const [orderDirection, setOrderDirection] = useState();
|
|
60
59
|
const [filterSelections, setFilterSelections] = useState({});
|
|
61
|
-
const showBasicFilters = useMemo(() => {
|
|
62
|
-
if (fg('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
return false;
|
|
66
|
-
}, []);
|
|
67
60
|
const modeSwitcherOptionsMap = useMemo(() => ({
|
|
68
61
|
jql: {
|
|
69
62
|
label: 'JQL',
|
|
@@ -76,7 +69,7 @@ export const JiraSearchContainer = props => {
|
|
|
76
69
|
tooltipText: isComplexQuery ? formatMessage(modeSwitcherMessages.basicModeSwitchDisabledTooltipText) : ''
|
|
77
70
|
}
|
|
78
71
|
}), [formatMessage, isComplexQuery]);
|
|
79
|
-
const modeSwitcherOptions = useMemo(() =>
|
|
72
|
+
const modeSwitcherOptions = useMemo(() => [modeSwitcherOptionsMap.basic, modeSwitcherOptionsMap.jql], [modeSwitcherOptionsMap]);
|
|
80
73
|
const {
|
|
81
74
|
hydratedOptions,
|
|
82
75
|
fetchHydratedJqlOptions,
|
|
@@ -125,11 +118,11 @@ export const JiraSearchContainer = props => {
|
|
|
125
118
|
isQueryComplex: isCurrentQueryComplex
|
|
126
119
|
});
|
|
127
120
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
128
|
-
if (
|
|
121
|
+
if (!isCurrentQueryComplex) {
|
|
129
122
|
fetchHydratedJqlOptions();
|
|
130
123
|
}
|
|
131
124
|
}
|
|
132
|
-
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch
|
|
125
|
+
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch]);
|
|
133
126
|
const [debouncedBasicFilterSelectionChange] = useDebouncedCallback(filterValues => {
|
|
134
127
|
const jqlWithFilterValues = buildJQL({
|
|
135
128
|
rawSearch: basicSearchTerm,
|
|
@@ -158,7 +151,7 @@ export const JiraSearchContainer = props => {
|
|
|
158
151
|
useEffect(() => {
|
|
159
152
|
const isCurrentQueryComplex = isQueryTooComplex(searchBarJql);
|
|
160
153
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
161
|
-
if (
|
|
154
|
+
if (!isCurrentQueryComplex && searchBarJql !== DEFAULT_JQL_QUERY) {
|
|
162
155
|
fetchHydratedJqlOptions();
|
|
163
156
|
}
|
|
164
157
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -199,8 +192,8 @@ export const JiraSearchContainer = props => {
|
|
|
199
192
|
searchTerm: basicSearchTerm,
|
|
200
193
|
placeholder: basicSearchInputMessages.basicTextSearchLabel,
|
|
201
194
|
testId: "jira-datasource-modal",
|
|
202
|
-
fullWidth:
|
|
203
|
-
}),
|
|
195
|
+
fullWidth: false
|
|
196
|
+
}), jsx(BasicFilters, {
|
|
204
197
|
jql: searchBarJql,
|
|
205
198
|
site: site,
|
|
206
199
|
onChange: handleBasicFilterSelectionChange,
|
|
@@ -82,7 +82,7 @@ export const PlainJiraIssuesConfigModalOld = props => {
|
|
|
82
82
|
// analytics related parameters
|
|
83
83
|
const searchCount = useRef(0);
|
|
84
84
|
const userInteractions = useUserInteractions();
|
|
85
|
-
const initialSearchMethod =
|
|
85
|
+
const initialSearchMethod = !isQueryTooComplex((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.jql) || '') ? 'basic' : 'jql';
|
|
86
86
|
const [currentSearchMethod, setCurrentSearchMethod] = useState(initialSearchMethod);
|
|
87
87
|
const searchMethodSearchedWith = useRef(null);
|
|
88
88
|
const visibleColumnCount = useRef((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
@@ -412,7 +412,6 @@ export const PlainJiraIssuesConfigModalOld = props => {
|
|
|
412
412
|
}, !!jql ? jsx(EmptyState, {
|
|
413
413
|
testId: `jira-datasource-modal--empty-state`
|
|
414
414
|
}) : jsx(InitialStateView, {
|
|
415
|
-
showBeta: !fg('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
416
415
|
icon: jsx(JiraInitialStateSVG, null),
|
|
417
416
|
title: modalMessages.searchJiraTitle,
|
|
418
417
|
description: currentSearchMethod === 'jql' ? initialStateViewMessages.searchDescriptionForJQLSearch : initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
@@ -99,9 +99,7 @@ const PlainJiraIssuesConfigModal = props => {
|
|
|
99
99
|
// analytics related parameters
|
|
100
100
|
const searchCount = useRef(0);
|
|
101
101
|
const userInteractions = useUserInteractions();
|
|
102
|
-
const initialSearchMethod =
|
|
103
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
104
|
-
fg('platform.linking-platform.datasource.show-jlol-basic-filters') && !isQueryTooComplex(initialJql || '') ? 'basic' : 'jql';
|
|
102
|
+
const initialSearchMethod = !isQueryTooComplex(initialJql || '') ? 'basic' : 'jql';
|
|
105
103
|
const [currentSearchMethod, setCurrentSearchMethod] = useState(initialSearchMethod);
|
|
106
104
|
const searchMethodSearchedWith = useRef(null);
|
|
107
105
|
const basicFilterSelectionsSearchedWith = useRef({});
|
|
@@ -285,7 +283,6 @@ const PlainJiraIssuesConfigModal = props => {
|
|
|
285
283
|
}, !!jql ? jsx(EmptyState, {
|
|
286
284
|
testId: `jira-datasource-modal--empty-state`
|
|
287
285
|
}) : jsx(InitialStateView, {
|
|
288
|
-
showBeta: !fg('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
289
286
|
icon: jsx(JiraInitialStateSVG, null),
|
|
290
287
|
title: modalMessages.searchJiraTitle,
|
|
291
288
|
description: currentSearchMethod === 'jql' ? initialStateViewMessages.searchDescriptionForJQLSearch : initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
@@ -11,7 +11,6 @@ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function
|
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import mergeWith from 'lodash/mergeWith';
|
|
13
13
|
import { AbstractJastVisitor, COMPOUND_OPERATOR_AND, COMPOUND_OPERATOR_OR, JastBuilder, OPERATOR_EQUALS, OPERATOR_IN, OPERATOR_LIKE } from '@atlaskit/jql-ast';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { ALLOWED_ORDER_BY_KEYS } from '../../jira-search-container';
|
|
16
15
|
import { isClauseTooComplex } from './isClauseTooComplex';
|
|
17
16
|
import { isValidJql } from './index';
|
|
@@ -113,7 +112,7 @@ var JqlClauseCollectingVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
|
113
112
|
return JqlClauseCollectingVisitor;
|
|
114
113
|
}(AbstractJastVisitor);
|
|
115
114
|
export var isQueryTooComplex = function isQueryTooComplex(jql) {
|
|
116
|
-
if (!
|
|
115
|
+
if (!jql) {
|
|
117
116
|
return false;
|
|
118
117
|
}
|
|
119
118
|
if (!isValidJql(jql)) {
|
|
@@ -14,7 +14,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
15
|
import { useIntl } from 'react-intl-next';
|
|
16
16
|
import { useDebouncedCallback } from 'use-debounce';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
19
18
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
20
19
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
@@ -81,12 +80,6 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
81
80
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
82
81
|
filterSelections = _useState14[0],
|
|
83
82
|
setFilterSelections = _useState14[1];
|
|
84
|
-
var showBasicFilters = useMemo(function () {
|
|
85
|
-
if (fg('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
return false;
|
|
89
|
-
}, []);
|
|
90
83
|
var modeSwitcherOptionsMap = useMemo(function () {
|
|
91
84
|
return {
|
|
92
85
|
jql: {
|
|
@@ -102,8 +95,8 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
102
95
|
};
|
|
103
96
|
}, [formatMessage, isComplexQuery]);
|
|
104
97
|
var modeSwitcherOptions = useMemo(function () {
|
|
105
|
-
return
|
|
106
|
-
}, [modeSwitcherOptionsMap
|
|
98
|
+
return [modeSwitcherOptionsMap.basic, modeSwitcherOptionsMap.jql];
|
|
99
|
+
}, [modeSwitcherOptionsMap]);
|
|
107
100
|
var _useHydrateJqlQuery = useHydrateJqlQuery(cloudId || '', searchBarJql),
|
|
108
101
|
hydratedOptions = _useHydrateJqlQuery.hydratedOptions,
|
|
109
102
|
fetchHydratedJqlOptions = _useHydrateJqlQuery.fetchHydratedJqlOptions,
|
|
@@ -153,11 +146,11 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
153
146
|
isQueryComplex: isCurrentQueryComplex
|
|
154
147
|
});
|
|
155
148
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
156
|
-
if (
|
|
149
|
+
if (!isCurrentQueryComplex) {
|
|
157
150
|
fetchHydratedJqlOptions();
|
|
158
151
|
}
|
|
159
152
|
}
|
|
160
|
-
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch
|
|
153
|
+
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch]);
|
|
161
154
|
var _useDebouncedCallback = useDebouncedCallback(function (filterValues) {
|
|
162
155
|
var jqlWithFilterValues = buildJQL({
|
|
163
156
|
rawSearch: basicSearchTerm,
|
|
@@ -185,7 +178,7 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
185
178
|
useEffect(function () {
|
|
186
179
|
var isCurrentQueryComplex = isQueryTooComplex(searchBarJql);
|
|
187
180
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
188
|
-
if (
|
|
181
|
+
if (!isCurrentQueryComplex && searchBarJql !== DEFAULT_JQL_QUERY) {
|
|
189
182
|
fetchHydratedJqlOptions();
|
|
190
183
|
}
|
|
191
184
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -224,8 +217,8 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
224
217
|
searchTerm: basicSearchTerm,
|
|
225
218
|
placeholder: basicSearchInputMessages.basicTextSearchLabel,
|
|
226
219
|
testId: "jira-datasource-modal",
|
|
227
|
-
fullWidth:
|
|
228
|
-
}),
|
|
220
|
+
fullWidth: false
|
|
221
|
+
}), jsx(BasicFilters, {
|
|
229
222
|
jql: searchBarJql,
|
|
230
223
|
site: site,
|
|
231
224
|
onChange: handleBasicFilterSelectionChange,
|
|
@@ -100,7 +100,7 @@ export var PlainJiraIssuesConfigModalOld = function PlainJiraIssuesConfigModalOl
|
|
|
100
100
|
// analytics related parameters
|
|
101
101
|
var searchCount = useRef(0);
|
|
102
102
|
var userInteractions = useUserInteractions();
|
|
103
|
-
var initialSearchMethod =
|
|
103
|
+
var initialSearchMethod = !isQueryTooComplex((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.jql) || '') ? 'basic' : 'jql';
|
|
104
104
|
var _useState11 = useState(initialSearchMethod),
|
|
105
105
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
106
106
|
currentSearchMethod = _useState12[0],
|
|
@@ -427,7 +427,6 @@ export var PlainJiraIssuesConfigModalOld = function PlainJiraIssuesConfigModalOl
|
|
|
427
427
|
}, !!jql ? jsx(EmptyState, {
|
|
428
428
|
testId: "jira-datasource-modal--empty-state"
|
|
429
429
|
}) : jsx(InitialStateView, {
|
|
430
|
-
showBeta: !fg('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
431
430
|
icon: jsx(JiraInitialStateSVG, null),
|
|
432
431
|
title: modalMessages.searchJiraTitle,
|
|
433
432
|
description: currentSearchMethod === 'jql' ? initialStateViewMessages.searchDescriptionForJQLSearch : initialStateViewMessages.searchDescriptionForBasicSearch,
|
|
@@ -103,9 +103,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
103
103
|
// analytics related parameters
|
|
104
104
|
var searchCount = useRef(0);
|
|
105
105
|
var userInteractions = useUserInteractions();
|
|
106
|
-
var initialSearchMethod =
|
|
107
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
108
|
-
fg('platform.linking-platform.datasource.show-jlol-basic-filters') && !isQueryTooComplex(initialJql || '') ? 'basic' : 'jql';
|
|
106
|
+
var initialSearchMethod = !isQueryTooComplex(initialJql || '') ? 'basic' : 'jql';
|
|
109
107
|
var _useState5 = useState(initialSearchMethod),
|
|
110
108
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
111
109
|
currentSearchMethod = _useState6[0],
|
|
@@ -296,7 +294,6 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
296
294
|
}, !!jql ? jsx(EmptyState, {
|
|
297
295
|
testId: "jira-datasource-modal--empty-state"
|
|
298
296
|
}) : jsx(InitialStateView, {
|
|
299
|
-
showBeta: !fg('platform.linking-platform.datasource.show-jlol-basic-filters'),
|
|
300
297
|
icon: jsx(JiraInitialStateSVG, null),
|
|
301
298
|
title: modalMessages.searchJiraTitle,
|
|
302
299
|
description: currentSearchMethod === 'jql' ? initialStateViewMessages.searchDescriptionForJQLSearch : initialStateViewMessages.searchDescriptionForBasicSearch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/flag": "^15.8.0",
|
|
49
49
|
"@atlaskit/form": "^10.5.0",
|
|
50
50
|
"@atlaskit/heading": "^2.4.0",
|
|
51
|
-
"@atlaskit/icon": "^22.
|
|
51
|
+
"@atlaskit/icon": "^22.20.0",
|
|
52
52
|
"@atlaskit/icon-object": "^6.5.0",
|
|
53
53
|
"@atlaskit/image": "^1.3.0",
|
|
54
54
|
"@atlaskit/inline-edit": "^13.7.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/jql-ast": "^3.3.0",
|
|
57
57
|
"@atlaskit/jql-editor": "^4.8.0",
|
|
58
58
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.1.0",
|
|
59
|
-
"@atlaskit/layering": "^0.
|
|
59
|
+
"@atlaskit/layering": "^0.5.0",
|
|
60
60
|
"@atlaskit/link-client-extension": "^2.4.0",
|
|
61
61
|
"@atlaskit/linking-common": "^5.11.0",
|
|
62
62
|
"@atlaskit/linking-types": "^9.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
66
66
|
"@atlaskit/outbound-auth-flow-client": "^3.4.5",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
68
|
-
"@atlaskit/popup": "^1.
|
|
68
|
+
"@atlaskit/popup": "^1.28.0",
|
|
69
69
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.0",
|
|
70
70
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
71
71
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.2.0",
|
|
@@ -171,9 +171,6 @@
|
|
|
171
171
|
"platform.linking-platform.datasource-assets_update_refresh_button_dt3qk": {
|
|
172
172
|
"type": "boolean"
|
|
173
173
|
},
|
|
174
|
-
"platform.linking-platform.datasource.show-jlol-basic-filters": {
|
|
175
|
-
"type": "boolean"
|
|
176
|
-
},
|
|
177
174
|
"platform.linking-platform.datasource.show-clol-basic-filters": {
|
|
178
175
|
"type": "boolean"
|
|
179
176
|
},
|