@atlaskit/link-datasource 1.0.14 → 1.0.16
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/utils.js +17 -0
- package/dist/cjs/common/types.js +5 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +23 -7
- package/dist/cjs/i18n/cs.js +2 -2
- package/dist/cjs/i18n/da.js +2 -2
- package/dist/cjs/i18n/de.js +2 -2
- package/dist/cjs/i18n/en.js +1 -1
- package/dist/cjs/i18n/en_GB.js +1 -1
- package/dist/cjs/i18n/en_ZZ.js +1 -1
- package/dist/cjs/i18n/es.js +2 -2
- package/dist/cjs/i18n/fi.js +2 -2
- package/dist/cjs/i18n/fr.js +2 -2
- package/dist/cjs/i18n/hu.js +2 -2
- package/dist/cjs/i18n/it.js +2 -2
- package/dist/cjs/i18n/ja.js +2 -2
- package/dist/cjs/i18n/ko.js +2 -2
- package/dist/cjs/i18n/nb.js +2 -2
- package/dist/cjs/i18n/nl.js +2 -2
- package/dist/cjs/i18n/pl.js +2 -2
- package/dist/cjs/i18n/pt_BR.js +2 -2
- package/dist/cjs/i18n/ru.js +2 -2
- package/dist/cjs/i18n/sv.js +2 -2
- package/dist/cjs/i18n/th.js +2 -2
- package/dist/cjs/i18n/tr.js +2 -2
- package/dist/cjs/i18n/uk.js +2 -2
- package/dist/cjs/i18n/vi.js +2 -2
- package/dist/cjs/i18n/zh.js +2 -2
- package/dist/cjs/i18n/zh_TW.js +2 -2
- package/dist/cjs/ui/assets-modal/modal/index.js +1 -1
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +19 -3
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +19 -16
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +4 -2
- package/dist/es2019/analytics/utils.js +10 -0
- package/dist/es2019/common/types.js +1 -0
- package/dist/es2019/hooks/useDatasourceTableState.js +16 -2
- package/dist/es2019/i18n/cs.js +2 -2
- package/dist/es2019/i18n/da.js +2 -2
- package/dist/es2019/i18n/de.js +2 -2
- package/dist/es2019/i18n/en.js +1 -1
- package/dist/es2019/i18n/en_GB.js +1 -1
- package/dist/es2019/i18n/en_ZZ.js +1 -1
- package/dist/es2019/i18n/es.js +2 -2
- package/dist/es2019/i18n/fi.js +2 -2
- package/dist/es2019/i18n/fr.js +2 -2
- package/dist/es2019/i18n/hu.js +2 -2
- package/dist/es2019/i18n/it.js +2 -2
- package/dist/es2019/i18n/ja.js +2 -2
- package/dist/es2019/i18n/ko.js +2 -2
- package/dist/es2019/i18n/nb.js +2 -2
- package/dist/es2019/i18n/nl.js +2 -2
- package/dist/es2019/i18n/pl.js +2 -2
- package/dist/es2019/i18n/pt_BR.js +2 -2
- package/dist/es2019/i18n/ru.js +2 -2
- package/dist/es2019/i18n/sv.js +2 -2
- package/dist/es2019/i18n/th.js +2 -2
- package/dist/es2019/i18n/tr.js +2 -2
- package/dist/es2019/i18n/uk.js +2 -2
- package/dist/es2019/i18n/vi.js +2 -2
- package/dist/es2019/i18n/zh.js +2 -2
- package/dist/es2019/i18n/zh_TW.js +2 -2
- package/dist/es2019/ui/assets-modal/modal/index.js +1 -1
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +20 -4
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +15 -13
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +6 -4
- package/dist/esm/analytics/utils.js +10 -0
- package/dist/esm/common/types.js +1 -0
- package/dist/esm/hooks/useDatasourceTableState.js +23 -7
- package/dist/esm/i18n/cs.js +2 -2
- package/dist/esm/i18n/da.js +2 -2
- package/dist/esm/i18n/de.js +2 -2
- package/dist/esm/i18n/en.js +1 -1
- package/dist/esm/i18n/en_GB.js +1 -1
- package/dist/esm/i18n/en_ZZ.js +1 -1
- package/dist/esm/i18n/es.js +2 -2
- package/dist/esm/i18n/fi.js +2 -2
- package/dist/esm/i18n/fr.js +2 -2
- package/dist/esm/i18n/hu.js +2 -2
- package/dist/esm/i18n/it.js +2 -2
- package/dist/esm/i18n/ja.js +2 -2
- package/dist/esm/i18n/ko.js +2 -2
- package/dist/esm/i18n/nb.js +2 -2
- package/dist/esm/i18n/nl.js +2 -2
- package/dist/esm/i18n/pl.js +2 -2
- package/dist/esm/i18n/pt_BR.js +2 -2
- package/dist/esm/i18n/ru.js +2 -2
- package/dist/esm/i18n/sv.js +2 -2
- package/dist/esm/i18n/th.js +2 -2
- package/dist/esm/i18n/tr.js +2 -2
- package/dist/esm/i18n/uk.js +2 -2
- package/dist/esm/i18n/vi.js +2 -2
- package/dist/esm/i18n/zh.js +2 -2
- package/dist/esm/i18n/zh_TW.js +2 -2
- package/dist/esm/ui/assets-modal/modal/index.js +1 -1
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +20 -4
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +17 -15
- package/dist/esm/ui/jira-issues-modal/modal/index.js +6 -4
- package/dist/types/analytics/generated/analytics.types.d.ts +13 -13
- package/dist/types/analytics/utils.d.ts +2 -0
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +3 -1
- package/dist/types/ui/jira-issues-modal/mode-switcher/index.d.ts +4 -4
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +13 -13
- package/dist/types-ts4.5/analytics/utils.d.ts +2 -0
- package/dist/types-ts4.5/common/types.d.ts +1 -0
- package/dist/types-ts4.5/ui/datasource-table-view/datasourceTableView.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/mode-switcher/index.d.ts +4 -4
- package/package.json +4 -4
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
+
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
|
+
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
4
6
|
import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
|
|
5
7
|
import { AccessRequired } from '../common/error-state/access-required';
|
|
6
8
|
import { LoadingError } from '../common/error-state/loading-error';
|
|
@@ -8,7 +10,7 @@ import { NoResults } from '../common/error-state/no-results';
|
|
|
8
10
|
import { IssueLikeDataTableView } from '../issue-like-table';
|
|
9
11
|
import EmptyState from '../issue-like-table/empty-state';
|
|
10
12
|
import { TableFooter } from '../table-footer';
|
|
11
|
-
|
|
13
|
+
var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAnalytics(_ref) {
|
|
12
14
|
var datasourceId = _ref.datasourceId,
|
|
13
15
|
parameters = _ref.parameters,
|
|
14
16
|
visibleColumnKeys = _ref.visibleColumnKeys,
|
|
@@ -26,7 +28,12 @@ export var DatasourceTableView = function DatasourceTableView(_ref) {
|
|
|
26
28
|
columns = _useDatasourceTableSt.columns,
|
|
27
29
|
defaultVisibleColumnKeys = _useDatasourceTableSt.defaultVisibleColumnKeys,
|
|
28
30
|
totalCount = _useDatasourceTableSt.totalCount,
|
|
29
|
-
loadDatasourceDetails = _useDatasourceTableSt.loadDatasourceDetails
|
|
31
|
+
loadDatasourceDetails = _useDatasourceTableSt.loadDatasourceDetails,
|
|
32
|
+
_useDatasourceTableSt2 = _useDatasourceTableSt.extensionKey,
|
|
33
|
+
extensionKey = _useDatasourceTableSt2 === void 0 ? null : _useDatasourceTableSt2,
|
|
34
|
+
destinationObjectTypes = _useDatasourceTableSt.destinationObjectTypes;
|
|
35
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
36
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
30
37
|
|
|
31
38
|
/* Need this to make sure that the datasource in the editor gets updated new info if any edits are made in the modal
|
|
32
39
|
But we don't want to call it on initial load. This screws up useDatasourceTableState's internal
|
|
@@ -45,10 +52,14 @@ export var DatasourceTableView = function DatasourceTableView(_ref) {
|
|
|
45
52
|
}
|
|
46
53
|
}, [visibleColumnKeys, defaultVisibleColumnKeys, onVisibleColumnKeysChange]);
|
|
47
54
|
var forcedReset = useCallback(function () {
|
|
55
|
+
fireEvent('ui.button.clicked.sync', {
|
|
56
|
+
extensionKey: extensionKey,
|
|
57
|
+
destinationObjectTypes: destinationObjectTypes
|
|
58
|
+
});
|
|
48
59
|
reset({
|
|
49
60
|
shouldForceRequest: true
|
|
50
61
|
});
|
|
51
|
-
}, [reset]);
|
|
62
|
+
}, [destinationObjectTypes, extensionKey, fireEvent, reset]);
|
|
52
63
|
if (status === 'resolved' && !responseItems.length) {
|
|
53
64
|
return jsx(NoResults, {
|
|
54
65
|
onRefresh: reset
|
|
@@ -88,4 +99,9 @@ export var DatasourceTableView = function DatasourceTableView(_ref) {
|
|
|
88
99
|
isLoading: !isDataReady || status === 'loading'
|
|
89
100
|
}))
|
|
90
101
|
);
|
|
91
|
-
};
|
|
102
|
+
};
|
|
103
|
+
var analyticsContextData = {
|
|
104
|
+
packageName: "@atlaskit/link-datasource",
|
|
105
|
+
packageVersion: "1.0.16"
|
|
106
|
+
};
|
|
107
|
+
export var DatasourceTableView = withAnalyticsContext(analyticsContextData)(DatasourceTableViewWithoutAnalytics);
|
|
@@ -16,6 +16,10 @@ var inputContainerStyles = css({
|
|
|
16
16
|
minHeight: '60px'
|
|
17
17
|
});
|
|
18
18
|
var DEFAULT_JQL_QUERY = 'created >= -30d order by created DESC';
|
|
19
|
+
var JiraSearchMethodSwitcher = ModeSwitcher;
|
|
20
|
+
export var getInitialSearchMethod = function getInitialSearchMethod(initialJql) {
|
|
21
|
+
return initialJql ? 'jql' : 'basic';
|
|
22
|
+
};
|
|
19
23
|
export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
20
24
|
var isSearching = props.isSearching,
|
|
21
25
|
parameters = props.parameters,
|
|
@@ -25,16 +29,14 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
25
29
|
initialJql = _ref.jql;
|
|
26
30
|
var _useIntl = useIntl(),
|
|
27
31
|
formatMessage = _useIntl.formatMessage;
|
|
28
|
-
var basicModeValue = 'basic';
|
|
29
|
-
var jqlModeValue = 'jql';
|
|
30
32
|
var _useState = useState(''),
|
|
31
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
34
|
basicSearchTerm = _useState2[0],
|
|
33
35
|
setBasicSearchTerm = _useState2[1];
|
|
34
|
-
var _useState3 = useState(initialJql
|
|
36
|
+
var _useState3 = useState(getInitialSearchMethod(initialJql)),
|
|
35
37
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
currentSearchMethod = _useState4[0],
|
|
39
|
+
setCurrentSearchMethod = _useState4[1];
|
|
38
40
|
var _useState5 = useState(initialJql || DEFAULT_JQL_QUERY),
|
|
39
41
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
40
42
|
jql = _useState6[0],
|
|
@@ -50,7 +52,7 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
50
52
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
51
53
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
52
54
|
var onSearchModeChange = function onSearchModeChange(searchMode) {
|
|
53
|
-
|
|
55
|
+
setCurrentSearchMethod(searchMode);
|
|
54
56
|
};
|
|
55
57
|
var handleBasicSearchChange = function handleBasicSearchChange(e) {
|
|
56
58
|
var rawSearch = e.currentTarget.value;
|
|
@@ -81,35 +83,35 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
81
83
|
var handleSearch = function handleSearch() {
|
|
82
84
|
onSearch({
|
|
83
85
|
jql: jql
|
|
84
|
-
});
|
|
85
|
-
if (
|
|
86
|
+
}, currentSearchMethod);
|
|
87
|
+
if (currentSearchMethod === 'basic') {
|
|
86
88
|
fireEvent('ui.form.submitted.basicSearch', {});
|
|
87
|
-
} else if (
|
|
89
|
+
} else if (currentSearchMethod === 'jql') {
|
|
88
90
|
fireEvent('ui.jqlEditor.searched', {});
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
93
|
return jsx("div", {
|
|
92
94
|
css: inputContainerStyles
|
|
93
|
-
},
|
|
95
|
+
}, currentSearchMethod === 'basic' && jsx(BasicSearchInput, {
|
|
94
96
|
isSearching: isSearching,
|
|
95
97
|
onChange: handleBasicSearchChange,
|
|
96
98
|
onSearch: handleSearch,
|
|
97
99
|
searchTerm: basicSearchTerm
|
|
98
|
-
}),
|
|
100
|
+
}), currentSearchMethod === 'jql' && jsx(JiraJQLEditor, {
|
|
99
101
|
cloudId: cloudId || '',
|
|
100
102
|
isSearching: isSearching,
|
|
101
103
|
onChange: onQueryChange,
|
|
102
104
|
onSearch: handleSearch,
|
|
103
105
|
query: jql
|
|
104
|
-
}), jsx(
|
|
106
|
+
}), jsx(JiraSearchMethodSwitcher, {
|
|
105
107
|
onOptionValueChange: onSearchModeChange,
|
|
106
|
-
selectedOptionValue:
|
|
108
|
+
selectedOptionValue: currentSearchMethod,
|
|
107
109
|
options: [{
|
|
108
110
|
label: formatMessage(modeSwitcherMessages.basicTextSearchLabel),
|
|
109
|
-
value:
|
|
111
|
+
value: 'basic'
|
|
110
112
|
}, {
|
|
111
113
|
label: 'JQL',
|
|
112
|
-
value:
|
|
114
|
+
value: 'jql'
|
|
113
115
|
}]
|
|
114
116
|
}));
|
|
115
117
|
};
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
/** @jsx jsx */
|
|
9
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
9
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
12
12
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -21,7 +21,7 @@ import { ModalLoadingError } from '../../common/error-state/modal-loading-error'
|
|
|
21
21
|
import { NoResults } from '../../common/error-state/no-results';
|
|
22
22
|
import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
|
|
23
23
|
import LinkRenderType from '../../issue-like-table/render-type/link';
|
|
24
|
-
import { JiraSearchContainer } from '../jira-search-container';
|
|
24
|
+
import { getInitialSearchMethod, JiraSearchContainer } from '../jira-search-container';
|
|
25
25
|
import { ModeSwitcher } from '../mode-switcher';
|
|
26
26
|
import { JiraSiteSelector } from '../site-selector';
|
|
27
27
|
import { modalMessages } from './messages';
|
|
@@ -97,6 +97,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
97
97
|
defaultVisibleColumnKeys = _useDatasourceTableSt.defaultVisibleColumnKeys,
|
|
98
98
|
loadDatasourceDetails = _useDatasourceTableSt.loadDatasourceDetails,
|
|
99
99
|
totalCount = _useDatasourceTableSt.totalCount;
|
|
100
|
+
var lastSearchMethodRef = useRef(getInitialSearchMethod(parameters === null || parameters === void 0 ? void 0 : parameters.jql));
|
|
100
101
|
var _useIntl = useIntl(),
|
|
101
102
|
formatMessage = _useIntl.formatMessage;
|
|
102
103
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
@@ -149,7 +150,8 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
149
150
|
setCloudId(selectedJiraSite.cloudId);
|
|
150
151
|
}
|
|
151
152
|
}, [cloudId, selectedJiraSite]);
|
|
152
|
-
var onSearch = useCallback(function (newParameters) {
|
|
153
|
+
var onSearch = useCallback(function (newParameters, searchMethod) {
|
|
154
|
+
lastSearchMethodRef.current = searchMethod;
|
|
153
155
|
setJql(newParameters.jql);
|
|
154
156
|
reset({
|
|
155
157
|
shouldForceRequest: true
|
|
@@ -338,7 +340,7 @@ var analyticsContextAttributes = {
|
|
|
338
340
|
};
|
|
339
341
|
var analyticsContextData = {
|
|
340
342
|
packageName: "@atlaskit/link-datasource",
|
|
341
|
-
packageVersion: "1.0.
|
|
343
|
+
packageVersion: "1.0.16",
|
|
342
344
|
source: 'datasourceConfigModal'
|
|
343
345
|
};
|
|
344
346
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -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::cebde8a5da8d6359c36559622f48971b>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -27,50 +27,50 @@ export type ErrorShownAttributesType = {
|
|
|
27
27
|
reason: 'network' | 'access';
|
|
28
28
|
};
|
|
29
29
|
export type ButtonClickedSyncAttributesType = {
|
|
30
|
-
extensionKey: string;
|
|
30
|
+
extensionKey: string | null;
|
|
31
31
|
destinationObjectTypes: unknown[];
|
|
32
32
|
};
|
|
33
33
|
export type ButtonClickedInsertAttributesType = {
|
|
34
34
|
searchCount: number;
|
|
35
35
|
totalItemCount: number;
|
|
36
|
-
displayedColumnCount: number;
|
|
36
|
+
displayedColumnCount: number | null;
|
|
37
37
|
display: 'datasource_inline' | 'datasource_table' | 'inline';
|
|
38
38
|
destinationObjectTypes: unknown[];
|
|
39
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
39
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
40
40
|
};
|
|
41
41
|
export type ButtonClickedCancelAttributesType = {
|
|
42
42
|
searchCount: number;
|
|
43
43
|
};
|
|
44
44
|
export type LinkClickedSingleItemAttributesType = {
|
|
45
|
-
extensionKey: string;
|
|
45
|
+
extensionKey: string | null;
|
|
46
46
|
destinationObjectTypes: unknown[];
|
|
47
47
|
};
|
|
48
48
|
export type DatasourceRenderedAttributesType = {
|
|
49
49
|
totalItemCount: number;
|
|
50
50
|
destinationObjectTypes: unknown[];
|
|
51
|
-
displayedColumnCount: number;
|
|
52
|
-
extensionKey: string;
|
|
51
|
+
displayedColumnCount: number | null;
|
|
52
|
+
extensionKey: string | null;
|
|
53
53
|
display: 'datasource_inline' | 'datasource_table' | 'inline';
|
|
54
54
|
status: 'resolved' | 'unauthorized' | 'forbidden' | 'not_found' | 'errored';
|
|
55
55
|
};
|
|
56
56
|
export type NextItemLoadedAttributesType = {
|
|
57
57
|
destinationObjectTypes: unknown[];
|
|
58
|
-
extensionKey: string;
|
|
58
|
+
extensionKey: string | null;
|
|
59
59
|
loadedItemCount: number;
|
|
60
60
|
};
|
|
61
61
|
export type TableViewedDatasourceAttributesType = {
|
|
62
62
|
destinationObjectTypes: unknown[];
|
|
63
63
|
totalItemCount: number;
|
|
64
|
-
displayedColumnCount: number;
|
|
65
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
64
|
+
displayedColumnCount: number | null;
|
|
65
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
66
66
|
};
|
|
67
67
|
export type LinkViewedSingleItemAttributesType = {
|
|
68
68
|
destinationObjectTypes: unknown[];
|
|
69
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
69
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
70
70
|
};
|
|
71
71
|
export type LinkViewedCountAttributesType = {
|
|
72
72
|
destinationObjectTypes: unknown[];
|
|
73
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
73
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
74
74
|
totalItemCount: number;
|
|
75
75
|
};
|
|
76
76
|
export type AnalyticsEventAttributes = {
|
|
@@ -109,7 +109,7 @@ export type AnalyticsEventAttributes = {
|
|
|
109
109
|
'ui.datasource.rendered': DatasourceRenderedAttributesType;
|
|
110
110
|
/**
|
|
111
111
|
* Fired when user scrolls to the next page/list of the objects */
|
|
112
|
-
'
|
|
112
|
+
'track.nextItem.loaded': NextItemLoadedAttributesType;
|
|
113
113
|
/**
|
|
114
114
|
* Fired when the datasource results are displayed as table */
|
|
115
115
|
'ui.table.viewed.datasource': TableViewedDatasourceAttributesType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type JiraSearchMethod = 'basic' | 'jql';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DatasourceTableViewProps } from './types';
|
|
3
|
-
export declare const DatasourceTableView: (
|
|
3
|
+
export declare const DatasourceTableView: import("react").ForwardRefExoticComponent<DatasourceTableViewProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { JiraSearchMethod } from '../../../common/types';
|
|
2
3
|
import { JiraIssueDatasourceParameters, JiraIssueDatasourceParametersQuery } from '../types';
|
|
3
4
|
export interface SearchContainerProps {
|
|
4
5
|
isSearching?: boolean;
|
|
5
|
-
onSearch: (query: JiraIssueDatasourceParametersQuery) => void;
|
|
6
|
+
onSearch: (query: JiraIssueDatasourceParametersQuery, searchMethod: JiraSearchMethod) => void;
|
|
6
7
|
parameters?: JiraIssueDatasourceParameters;
|
|
7
8
|
}
|
|
9
|
+
export declare const getInitialSearchMethod: (initialJql?: string) => JiraSearchMethod;
|
|
8
10
|
export declare const JiraSearchContainer: (props: SearchContainerProps) => jsx.JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
export interface ModeSwitcherProps {
|
|
2
|
+
export interface ModeSwitcherProps<T extends string = string> {
|
|
3
3
|
isCompact?: boolean;
|
|
4
4
|
isDisabled?: boolean;
|
|
5
5
|
options: {
|
|
6
6
|
label: string;
|
|
7
|
-
value:
|
|
7
|
+
value: T;
|
|
8
8
|
}[];
|
|
9
|
-
onOptionValueChange: (selectedOptionValue:
|
|
9
|
+
onOptionValueChange: (selectedOptionValue: T) => void;
|
|
10
10
|
selectedOptionValue?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const ModeSwitcher: (props: ModeSwitcherProps) => jsx.JSX.Element | null;
|
|
12
|
+
export declare const ModeSwitcher: <T extends string = string>(props: ModeSwitcherProps<T>) => jsx.JSX.Element | null;
|
|
@@ -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::cebde8a5da8d6359c36559622f48971b>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -27,50 +27,50 @@ export type ErrorShownAttributesType = {
|
|
|
27
27
|
reason: 'network' | 'access';
|
|
28
28
|
};
|
|
29
29
|
export type ButtonClickedSyncAttributesType = {
|
|
30
|
-
extensionKey: string;
|
|
30
|
+
extensionKey: string | null;
|
|
31
31
|
destinationObjectTypes: unknown[];
|
|
32
32
|
};
|
|
33
33
|
export type ButtonClickedInsertAttributesType = {
|
|
34
34
|
searchCount: number;
|
|
35
35
|
totalItemCount: number;
|
|
36
|
-
displayedColumnCount: number;
|
|
36
|
+
displayedColumnCount: number | null;
|
|
37
37
|
display: 'datasource_inline' | 'datasource_table' | 'inline';
|
|
38
38
|
destinationObjectTypes: unknown[];
|
|
39
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
39
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
40
40
|
};
|
|
41
41
|
export type ButtonClickedCancelAttributesType = {
|
|
42
42
|
searchCount: number;
|
|
43
43
|
};
|
|
44
44
|
export type LinkClickedSingleItemAttributesType = {
|
|
45
|
-
extensionKey: string;
|
|
45
|
+
extensionKey: string | null;
|
|
46
46
|
destinationObjectTypes: unknown[];
|
|
47
47
|
};
|
|
48
48
|
export type DatasourceRenderedAttributesType = {
|
|
49
49
|
totalItemCount: number;
|
|
50
50
|
destinationObjectTypes: unknown[];
|
|
51
|
-
displayedColumnCount: number;
|
|
52
|
-
extensionKey: string;
|
|
51
|
+
displayedColumnCount: number | null;
|
|
52
|
+
extensionKey: string | null;
|
|
53
53
|
display: 'datasource_inline' | 'datasource_table' | 'inline';
|
|
54
54
|
status: 'resolved' | 'unauthorized' | 'forbidden' | 'not_found' | 'errored';
|
|
55
55
|
};
|
|
56
56
|
export type NextItemLoadedAttributesType = {
|
|
57
57
|
destinationObjectTypes: unknown[];
|
|
58
|
-
extensionKey: string;
|
|
58
|
+
extensionKey: string | null;
|
|
59
59
|
loadedItemCount: number;
|
|
60
60
|
};
|
|
61
61
|
export type TableViewedDatasourceAttributesType = {
|
|
62
62
|
destinationObjectTypes: unknown[];
|
|
63
63
|
totalItemCount: number;
|
|
64
|
-
displayedColumnCount: number;
|
|
65
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
64
|
+
displayedColumnCount: number | null;
|
|
65
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
66
66
|
};
|
|
67
67
|
export type LinkViewedSingleItemAttributesType = {
|
|
68
68
|
destinationObjectTypes: unknown[];
|
|
69
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
69
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
70
70
|
};
|
|
71
71
|
export type LinkViewedCountAttributesType = {
|
|
72
72
|
destinationObjectTypes: unknown[];
|
|
73
|
-
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter';
|
|
73
|
+
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
74
74
|
totalItemCount: number;
|
|
75
75
|
};
|
|
76
76
|
export type AnalyticsEventAttributes = {
|
|
@@ -109,7 +109,7 @@ export type AnalyticsEventAttributes = {
|
|
|
109
109
|
'ui.datasource.rendered': DatasourceRenderedAttributesType;
|
|
110
110
|
/**
|
|
111
111
|
* Fired when user scrolls to the next page/list of the objects */
|
|
112
|
-
'
|
|
112
|
+
'track.nextItem.loaded': NextItemLoadedAttributesType;
|
|
113
113
|
/**
|
|
114
114
|
* Fired when the datasource results are displayed as table */
|
|
115
115
|
'ui.table.viewed.datasource': TableViewedDatasourceAttributesType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type JiraSearchMethod = 'basic' | 'jql';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { DatasourceTableViewProps } from './types';
|
|
3
|
-
export declare const DatasourceTableView: (
|
|
3
|
+
export declare const DatasourceTableView: import("react").ForwardRefExoticComponent<DatasourceTableViewProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { JiraSearchMethod } from '../../../common/types';
|
|
2
3
|
import { JiraIssueDatasourceParameters, JiraIssueDatasourceParametersQuery } from '../types';
|
|
3
4
|
export interface SearchContainerProps {
|
|
4
5
|
isSearching?: boolean;
|
|
5
|
-
onSearch: (query: JiraIssueDatasourceParametersQuery) => void;
|
|
6
|
+
onSearch: (query: JiraIssueDatasourceParametersQuery, searchMethod: JiraSearchMethod) => void;
|
|
6
7
|
parameters?: JiraIssueDatasourceParameters;
|
|
7
8
|
}
|
|
9
|
+
export declare const getInitialSearchMethod: (initialJql?: string) => JiraSearchMethod;
|
|
8
10
|
export declare const JiraSearchContainer: (props: SearchContainerProps) => jsx.JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
export interface ModeSwitcherProps {
|
|
2
|
+
export interface ModeSwitcherProps<T extends string = string> {
|
|
3
3
|
isCompact?: boolean;
|
|
4
4
|
isDisabled?: boolean;
|
|
5
5
|
options: {
|
|
6
6
|
label: string;
|
|
7
|
-
value:
|
|
7
|
+
value: T;
|
|
8
8
|
}[];
|
|
9
|
-
onOptionValueChange: (selectedOptionValue:
|
|
9
|
+
onOptionValueChange: (selectedOptionValue: T) => void;
|
|
10
10
|
selectedOptionValue?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const ModeSwitcher: (props: ModeSwitcherProps) => jsx.JSX.Element | null;
|
|
12
|
+
export declare const ModeSwitcher: <T extends string = string>(props: ModeSwitcherProps<T>) => jsx.JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.16.0",
|
|
55
55
|
"@atlaskit/select": "^16.5.0",
|
|
56
|
-
"@atlaskit/smart-card": "^26.
|
|
56
|
+
"@atlaskit/smart-card": "^26.20.0",
|
|
57
57
|
"@atlaskit/spinner": "^15.5.0",
|
|
58
58
|
"@atlaskit/tag": "^11.5.0",
|
|
59
59
|
"@atlaskit/textfield": "5.6.6",
|
|
60
|
-
"@atlaskit/theme": "^12.
|
|
61
|
-
"@atlaskit/tokens": "^1.
|
|
60
|
+
"@atlaskit/theme": "^12.6.0",
|
|
61
|
+
"@atlaskit/tokens": "^1.20.0",
|
|
62
62
|
"@atlaskit/tooltip": "^17.8.0",
|
|
63
63
|
"@atlassianlabs/jql-editor": "^2.0.1",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|