@atlaskit/link-datasource 1.19.3 → 1.19.4
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 +6 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +9 -4
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +6 -2
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +9 -4
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +5 -1
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +9 -4
- package/dist/esm/ui/jira-issues-modal/modal/index.js +6 -2
- package/dist/types/analytics/generated/analytics.types.d.ts +5 -2
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +5 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/index.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.19.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43869](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43869) [`a46528b1133`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a46528b1133) - Update jql searched and insert click analytics events with isQueryComplex attribute.
|
|
8
|
+
|
|
3
9
|
## 1.19.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -122,17 +122,20 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
122
122
|
setJql(query);
|
|
123
123
|
}, []);
|
|
124
124
|
var handleSearch = (0, _react.useCallback)(function () {
|
|
125
|
+
var isCurrentQueryComplex = (0, _isQueryTooComplex.isQueryTooComplex)(jql);
|
|
125
126
|
onSearch({
|
|
126
127
|
jql: jql
|
|
127
128
|
}, {
|
|
128
129
|
searchMethod: currentSearchMethod,
|
|
129
|
-
basicFilterSelections: filterSelections
|
|
130
|
+
basicFilterSelections: filterSelections,
|
|
131
|
+
isQueryComplex: isCurrentQueryComplex
|
|
130
132
|
});
|
|
131
133
|
if (currentSearchMethod === 'basic') {
|
|
132
134
|
fireEvent('ui.form.submitted.basicSearch', {});
|
|
133
135
|
} else if (currentSearchMethod === 'jql') {
|
|
134
|
-
fireEvent('ui.jqlEditor.searched', {
|
|
135
|
-
|
|
136
|
+
fireEvent('ui.jqlEditor.searched', {
|
|
137
|
+
isQueryComplex: isCurrentQueryComplex
|
|
138
|
+
});
|
|
136
139
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
137
140
|
if (showBasicFilters && !isCurrentQueryComplex) {
|
|
138
141
|
fetchHydratedJqlOptions();
|
|
@@ -147,11 +150,13 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
147
150
|
orderKey: orderKey
|
|
148
151
|
});
|
|
149
152
|
setJql(jqlWithFilterValues);
|
|
153
|
+
var isCurrentQueryComplex = (0, _isQueryTooComplex.isQueryTooComplex)(jqlWithFilterValues);
|
|
150
154
|
onSearch({
|
|
151
155
|
jql: jqlWithFilterValues
|
|
152
156
|
}, {
|
|
153
157
|
searchMethod: currentSearchMethod,
|
|
154
|
-
basicFilterSelections: filterSelections
|
|
158
|
+
basicFilterSelections: filterSelections,
|
|
159
|
+
isQueryComplex: isCurrentQueryComplex
|
|
155
160
|
});
|
|
156
161
|
}, _asyncPopupSelect.SEARCH_DEBOUNCE_MS),
|
|
157
162
|
_useDebouncedCallback2 = (0, _slicedToArray2.default)(_useDebouncedCallback, 1),
|
|
@@ -142,6 +142,7 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
142
142
|
var searchMethodSearchedWith = (0, _react.useRef)(null);
|
|
143
143
|
var visibleColumnCount = (0, _react.useRef)((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
144
144
|
var basicFilterSelectionsSearchedWith = (0, _react.useRef)({});
|
|
145
|
+
var isSearchedWithComplexQuery = (0, _react.useRef)(false);
|
|
145
146
|
var parameters = (0, _react.useMemo)(function () {
|
|
146
147
|
return !!cloudId ? {
|
|
147
148
|
cloudId: cloudId,
|
|
@@ -308,10 +309,12 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
308
309
|
(0, _useColumnPickerRenderedFailedUfoExperience.useColumnPickerRenderedFailedUfoExperience)(status, modalRenderInstanceId);
|
|
309
310
|
var onSearch = (0, _react.useCallback)(function (newParameters, _ref2) {
|
|
310
311
|
var searchMethod = _ref2.searchMethod,
|
|
311
|
-
basicFilterSelections = _ref2.basicFilterSelections
|
|
312
|
+
basicFilterSelections = _ref2.basicFilterSelections,
|
|
313
|
+
isQueryComplex = _ref2.isQueryComplex;
|
|
312
314
|
searchCount.current++;
|
|
313
315
|
searchMethodSearchedWith.current = searchMethod;
|
|
314
316
|
basicFilterSelectionsSearchedWith.current = basicFilterSelections;
|
|
317
|
+
isSearchedWithComplexQuery.current = isQueryComplex;
|
|
315
318
|
if (jql !== newParameters.jql) {
|
|
316
319
|
userInteractionActions.current.add(_types.DatasourceAction.QUERY_UPDATED);
|
|
317
320
|
}
|
|
@@ -362,7 +365,8 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
362
365
|
display: getDisplayValue(currentViewMode, totalCount || 0),
|
|
363
366
|
searchCount: searchCount.current,
|
|
364
367
|
searchMethod: (0, _utils.mapSearchMethod)(searchMethodSearchedWith.current),
|
|
365
|
-
actions: Array.from(userInteractionActions.current)
|
|
368
|
+
actions: Array.from(userInteractionActions.current),
|
|
369
|
+
isQueryComplex: isSearchedWithComplexQuery.current
|
|
366
370
|
}, searchMethodSearchedWith.current === 'basic' ? _objectSpread({}, filterSelectionCount) : {}),
|
|
367
371
|
eventType: 'ui'
|
|
368
372
|
});
|
|
@@ -92,17 +92,20 @@ export const JiraSearchContainer = props => {
|
|
|
92
92
|
setJql(query);
|
|
93
93
|
}, []);
|
|
94
94
|
const handleSearch = useCallback(() => {
|
|
95
|
+
const isCurrentQueryComplex = isQueryTooComplex(jql);
|
|
95
96
|
onSearch({
|
|
96
97
|
jql
|
|
97
98
|
}, {
|
|
98
99
|
searchMethod: currentSearchMethod,
|
|
99
|
-
basicFilterSelections: filterSelections
|
|
100
|
+
basicFilterSelections: filterSelections,
|
|
101
|
+
isQueryComplex: isCurrentQueryComplex
|
|
100
102
|
});
|
|
101
103
|
if (currentSearchMethod === 'basic') {
|
|
102
104
|
fireEvent('ui.form.submitted.basicSearch', {});
|
|
103
105
|
} else if (currentSearchMethod === 'jql') {
|
|
104
|
-
fireEvent('ui.jqlEditor.searched', {
|
|
105
|
-
|
|
106
|
+
fireEvent('ui.jqlEditor.searched', {
|
|
107
|
+
isQueryComplex: isCurrentQueryComplex
|
|
108
|
+
});
|
|
106
109
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
107
110
|
if (showBasicFilters && !isCurrentQueryComplex) {
|
|
108
111
|
fetchHydratedJqlOptions();
|
|
@@ -117,11 +120,13 @@ export const JiraSearchContainer = props => {
|
|
|
117
120
|
orderKey
|
|
118
121
|
});
|
|
119
122
|
setJql(jqlWithFilterValues);
|
|
123
|
+
const isCurrentQueryComplex = isQueryTooComplex(jqlWithFilterValues);
|
|
120
124
|
onSearch({
|
|
121
125
|
jql: jqlWithFilterValues
|
|
122
126
|
}, {
|
|
123
127
|
searchMethod: currentSearchMethod,
|
|
124
|
-
basicFilterSelections: filterSelections
|
|
128
|
+
basicFilterSelections: filterSelections,
|
|
129
|
+
isQueryComplex: isCurrentQueryComplex
|
|
125
130
|
});
|
|
126
131
|
}, SEARCH_DEBOUNCE_MS);
|
|
127
132
|
const handleBasicFilterSelectionChange = useCallback(filterValues => {
|
|
@@ -109,6 +109,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
109
109
|
const searchMethodSearchedWith = useRef(null);
|
|
110
110
|
const visibleColumnCount = useRef((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
111
111
|
const basicFilterSelectionsSearchedWith = useRef({});
|
|
112
|
+
const isSearchedWithComplexQuery = useRef(false);
|
|
112
113
|
const parameters = useMemo(() => !!cloudId ? {
|
|
113
114
|
cloudId,
|
|
114
115
|
jql: jql || ''
|
|
@@ -256,11 +257,13 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
256
257
|
useColumnPickerRenderedFailedUfoExperience(status, modalRenderInstanceId);
|
|
257
258
|
const onSearch = useCallback((newParameters, {
|
|
258
259
|
searchMethod,
|
|
259
|
-
basicFilterSelections
|
|
260
|
+
basicFilterSelections,
|
|
261
|
+
isQueryComplex
|
|
260
262
|
}) => {
|
|
261
263
|
searchCount.current++;
|
|
262
264
|
searchMethodSearchedWith.current = searchMethod;
|
|
263
265
|
basicFilterSelectionsSearchedWith.current = basicFilterSelections;
|
|
266
|
+
isSearchedWithComplexQuery.current = isQueryComplex;
|
|
264
267
|
if (jql !== newParameters.jql) {
|
|
265
268
|
userInteractionActions.current.add(DatasourceAction.QUERY_UPDATED);
|
|
266
269
|
}
|
|
@@ -316,6 +319,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
316
319
|
searchCount: searchCount.current,
|
|
317
320
|
searchMethod: mapSearchMethod(searchMethodSearchedWith.current),
|
|
318
321
|
actions: Array.from(userInteractionActions.current),
|
|
322
|
+
isQueryComplex: isSearchedWithComplexQuery.current,
|
|
319
323
|
...(searchMethodSearchedWith.current === 'basic' ? {
|
|
320
324
|
...filterSelectionCount
|
|
321
325
|
} : {})
|
|
@@ -113,17 +113,20 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
113
113
|
setJql(query);
|
|
114
114
|
}, []);
|
|
115
115
|
var handleSearch = useCallback(function () {
|
|
116
|
+
var isCurrentQueryComplex = isQueryTooComplex(jql);
|
|
116
117
|
onSearch({
|
|
117
118
|
jql: jql
|
|
118
119
|
}, {
|
|
119
120
|
searchMethod: currentSearchMethod,
|
|
120
|
-
basicFilterSelections: filterSelections
|
|
121
|
+
basicFilterSelections: filterSelections,
|
|
122
|
+
isQueryComplex: isCurrentQueryComplex
|
|
121
123
|
});
|
|
122
124
|
if (currentSearchMethod === 'basic') {
|
|
123
125
|
fireEvent('ui.form.submitted.basicSearch', {});
|
|
124
126
|
} else if (currentSearchMethod === 'jql') {
|
|
125
|
-
fireEvent('ui.jqlEditor.searched', {
|
|
126
|
-
|
|
127
|
+
fireEvent('ui.jqlEditor.searched', {
|
|
128
|
+
isQueryComplex: isCurrentQueryComplex
|
|
129
|
+
});
|
|
127
130
|
setIsComplexQuery(isCurrentQueryComplex);
|
|
128
131
|
if (showBasicFilters && !isCurrentQueryComplex) {
|
|
129
132
|
fetchHydratedJqlOptions();
|
|
@@ -138,11 +141,13 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
138
141
|
orderKey: orderKey
|
|
139
142
|
});
|
|
140
143
|
setJql(jqlWithFilterValues);
|
|
144
|
+
var isCurrentQueryComplex = isQueryTooComplex(jqlWithFilterValues);
|
|
141
145
|
onSearch({
|
|
142
146
|
jql: jqlWithFilterValues
|
|
143
147
|
}, {
|
|
144
148
|
searchMethod: currentSearchMethod,
|
|
145
|
-
basicFilterSelections: filterSelections
|
|
149
|
+
basicFilterSelections: filterSelections,
|
|
150
|
+
isQueryComplex: isCurrentQueryComplex
|
|
146
151
|
});
|
|
147
152
|
}, SEARCH_DEBOUNCE_MS),
|
|
148
153
|
_useDebouncedCallback2 = _slicedToArray(_useDebouncedCallback, 1),
|
|
@@ -133,6 +133,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
133
133
|
var searchMethodSearchedWith = useRef(null);
|
|
134
134
|
var visibleColumnCount = useRef((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
135
135
|
var basicFilterSelectionsSearchedWith = useRef({});
|
|
136
|
+
var isSearchedWithComplexQuery = useRef(false);
|
|
136
137
|
var parameters = useMemo(function () {
|
|
137
138
|
return !!cloudId ? {
|
|
138
139
|
cloudId: cloudId,
|
|
@@ -299,10 +300,12 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
299
300
|
useColumnPickerRenderedFailedUfoExperience(status, modalRenderInstanceId);
|
|
300
301
|
var onSearch = useCallback(function (newParameters, _ref2) {
|
|
301
302
|
var searchMethod = _ref2.searchMethod,
|
|
302
|
-
basicFilterSelections = _ref2.basicFilterSelections
|
|
303
|
+
basicFilterSelections = _ref2.basicFilterSelections,
|
|
304
|
+
isQueryComplex = _ref2.isQueryComplex;
|
|
303
305
|
searchCount.current++;
|
|
304
306
|
searchMethodSearchedWith.current = searchMethod;
|
|
305
307
|
basicFilterSelectionsSearchedWith.current = basicFilterSelections;
|
|
308
|
+
isSearchedWithComplexQuery.current = isQueryComplex;
|
|
306
309
|
if (jql !== newParameters.jql) {
|
|
307
310
|
userInteractionActions.current.add(DatasourceAction.QUERY_UPDATED);
|
|
308
311
|
}
|
|
@@ -353,7 +356,8 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
353
356
|
display: getDisplayValue(currentViewMode, totalCount || 0),
|
|
354
357
|
searchCount: searchCount.current,
|
|
355
358
|
searchMethod: mapSearchMethod(searchMethodSearchedWith.current),
|
|
356
|
-
actions: Array.from(userInteractionActions.current)
|
|
359
|
+
actions: Array.from(userInteractionActions.current),
|
|
360
|
+
isQueryComplex: isSearchedWithComplexQuery.current
|
|
357
361
|
}, searchMethodSearchedWith.current === 'basic' ? _objectSpread({}, filterSelectionCount) : {}),
|
|
358
362
|
eventType: 'ui'
|
|
359
363
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::32dd97482f811937fcb07590b84179dd>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -21,7 +21,9 @@ export type ModalReadyDatasourceAttributesType = {
|
|
|
21
21
|
instancesCount: number | null;
|
|
22
22
|
schemasCount: number | null;
|
|
23
23
|
};
|
|
24
|
-
export type JqlEditorSearchedAttributesType = {
|
|
24
|
+
export type JqlEditorSearchedAttributesType = {
|
|
25
|
+
isQueryComplex: boolean;
|
|
26
|
+
};
|
|
25
27
|
export type FormSubmittedBasicSearchAttributesType = {};
|
|
26
28
|
export type EmptyResultShownDatasourceAttributesType = {};
|
|
27
29
|
export type ErrorShownAttributesType = {
|
|
@@ -40,6 +42,7 @@ export type ButtonClickedInsertAttributesType = {
|
|
|
40
42
|
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
41
43
|
extensionKey: string | null;
|
|
42
44
|
actions: unknown[];
|
|
45
|
+
isQueryComplex: boolean;
|
|
43
46
|
};
|
|
44
47
|
export type ButtonClickedCancelAttributesType = {
|
|
45
48
|
searchCount: number;
|
|
@@ -8,6 +8,7 @@ export interface SearchContainerProps {
|
|
|
8
8
|
onSearch: (query: JiraIssueDatasourceParametersQuery, { searchMethod, basicFilterSelections, }: {
|
|
9
9
|
searchMethod: JiraSearchMethod;
|
|
10
10
|
basicFilterSelections: SelectedOptionsMap;
|
|
11
|
+
isQueryComplex: boolean;
|
|
11
12
|
}) => void;
|
|
12
13
|
initialSearchMethod: JiraSearchMethod;
|
|
13
14
|
onSearchMethodChange: (searchMethod: JiraSearchMethod) => void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::32dd97482f811937fcb07590b84179dd>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -21,7 +21,9 @@ export type ModalReadyDatasourceAttributesType = {
|
|
|
21
21
|
instancesCount: number | null;
|
|
22
22
|
schemasCount: number | null;
|
|
23
23
|
};
|
|
24
|
-
export type JqlEditorSearchedAttributesType = {
|
|
24
|
+
export type JqlEditorSearchedAttributesType = {
|
|
25
|
+
isQueryComplex: boolean;
|
|
26
|
+
};
|
|
25
27
|
export type FormSubmittedBasicSearchAttributesType = {};
|
|
26
28
|
export type EmptyResultShownDatasourceAttributesType = {};
|
|
27
29
|
export type ErrorShownAttributesType = {
|
|
@@ -40,6 +42,7 @@ export type ButtonClickedInsertAttributesType = {
|
|
|
40
42
|
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
41
43
|
extensionKey: string | null;
|
|
42
44
|
actions: unknown[];
|
|
45
|
+
isQueryComplex: boolean;
|
|
43
46
|
};
|
|
44
47
|
export type ButtonClickedCancelAttributesType = {
|
|
45
48
|
searchCount: number;
|
|
@@ -8,6 +8,7 @@ export interface SearchContainerProps {
|
|
|
8
8
|
onSearch: (query: JiraIssueDatasourceParametersQuery, { searchMethod, basicFilterSelections, }: {
|
|
9
9
|
searchMethod: JiraSearchMethod;
|
|
10
10
|
basicFilterSelections: SelectedOptionsMap;
|
|
11
|
+
isQueryComplex: boolean;
|
|
11
12
|
}) => void;
|
|
12
13
|
initialSearchMethod: JiraSearchMethod;
|
|
13
14
|
onSearchMethodChange: (searchMethod: JiraSearchMethod) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.4",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/jql-ast": "^3.0.0",
|
|
47
47
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
|
|
48
48
|
"@atlaskit/link-client-extension": "^1.8.0",
|
|
49
|
-
"@atlaskit/linking-common": "^4.
|
|
49
|
+
"@atlaskit/linking-common": "^4.21.0",
|
|
50
50
|
"@atlaskit/linking-types": "^8.5.0",
|
|
51
51
|
"@atlaskit/lozenge": "^11.4.0",
|
|
52
52
|
"@atlaskit/modal-dialog": "^12.9.0",
|