@atlaskit/link-datasource 0.31.2 → 0.32.0
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 +12 -0
- package/dist/cjs/analytics/constants.js +8 -0
- package/dist/cjs/analytics/generated/analytics.types.js +5 -0
- package/dist/cjs/analytics/generated/create-event-payload.js +46 -0
- package/dist/cjs/analytics/generated/use-analytics-events.js +32 -0
- package/dist/cjs/analytics/index.js +18 -0
- package/dist/cjs/ui/common/error-state/access-required.js +12 -3
- package/dist/cjs/ui/common/error-state/loading-error.js +20 -11
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +21 -12
- package/dist/cjs/ui/common/error-state/no-results.js +48 -41
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +7 -19
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +2 -4
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +37 -0
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +60 -25
- package/dist/cjs/ui/issue-like-table/empty-state/index.js +6 -1
- package/dist/cjs/ui/issue-like-table/index.js +102 -71
- package/dist/cjs/ui/issue-like-table/styled.js +2 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +8 -0
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +43 -15
- package/dist/cjs/ui/table-footer/index.js +10 -7
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/constants.js +1 -0
- package/dist/es2019/analytics/generated/analytics.types.js +1 -0
- package/dist/es2019/analytics/generated/create-event-payload.js +28 -0
- package/dist/es2019/analytics/generated/use-analytics-events.js +24 -0
- package/dist/es2019/analytics/index.js +3 -0
- package/dist/es2019/ui/common/error-state/access-required.js +10 -0
- package/dist/es2019/ui/common/error-state/loading-error.js +10 -0
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +10 -0
- package/dist/es2019/ui/common/error-state/no-results.js +8 -0
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +8 -20
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +1 -3
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +46 -0
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +53 -18
- package/dist/es2019/ui/issue-like-table/empty-state/index.js +6 -1
- package/dist/es2019/ui/issue-like-table/index.js +86 -43
- package/dist/es2019/ui/issue-like-table/styled.js +18 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +9 -0
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +43 -13
- package/dist/es2019/ui/table-footer/index.js +11 -11
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/constants.js +1 -0
- package/dist/esm/analytics/generated/analytics.types.js +1 -0
- package/dist/esm/analytics/generated/create-event-payload.js +38 -0
- package/dist/esm/analytics/generated/use-analytics-events.js +23 -0
- package/dist/esm/analytics/index.js +5 -0
- package/dist/esm/ui/common/error-state/access-required.js +9 -0
- package/dist/esm/ui/common/error-state/loading-error.js +9 -0
- package/dist/esm/ui/common/error-state/modal-loading-error.js +9 -0
- package/dist/esm/ui/common/error-state/no-results.js +7 -0
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +8 -20
- package/dist/esm/ui/issue-like-table/column-picker/index.js +2 -4
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +29 -0
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +60 -25
- package/dist/esm/ui/issue-like-table/empty-state/index.js +6 -1
- package/dist/esm/ui/issue-like-table/index.js +102 -71
- package/dist/esm/ui/issue-like-table/styled.js +2 -1
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +8 -0
- package/dist/esm/ui/jira-issues-modal/modal/index.js +43 -14
- package/dist/esm/ui/table-footer/index.js +10 -7
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/constants.d.ts +1 -0
- package/dist/types/analytics/generated/analytics.types.d.ts +49 -0
- package/dist/types/analytics/generated/create-event-payload.d.ts +27 -0
- package/dist/types/analytics/generated/use-analytics-events.d.ts +3 -0
- package/dist/types/analytics/index.d.ts +4 -0
- package/dist/types/ui/common/error-state/access-required.d.ts +0 -1
- package/dist/types/ui/common/error-state/loading-error.d.ts +0 -1
- package/dist/types/ui/common/error-state/modal-loading-error.d.ts +0 -1
- package/dist/types/ui/common/error-state/no-results.d.ts +0 -1
- package/dist/types/ui/issue-like-table/column-picker/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/column-picker/types.d.ts +0 -1
- package/dist/types/ui/issue-like-table/drag-column-preview.d.ts +7 -0
- package/dist/types/ui/issue-like-table/draggable-table-heading.d.ts +2 -3
- package/dist/types/ui/issue-like-table/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/types.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/modal/index.d.ts +3 -1
- package/dist/types-ts4.5/analytics/constants.d.ts +1 -0
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +49 -0
- package/dist/types-ts4.5/analytics/generated/create-event-payload.d.ts +31 -0
- package/dist/types-ts4.5/analytics/generated/use-analytics-events.d.ts +7 -0
- package/dist/types-ts4.5/analytics/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/common/error-state/access-required.d.ts +0 -1
- package/dist/types-ts4.5/ui/common/error-state/loading-error.d.ts +0 -1
- package/dist/types-ts4.5/ui/common/error-state/modal-loading-error.d.ts +0 -1
- package/dist/types-ts4.5/ui/common/error-state/no-results.d.ts +0 -1
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/issue-like-table/drag-column-preview.d.ts +7 -0
- package/dist/types-ts4.5/ui/issue-like-table/draggable-table-heading.d.ts +2 -3
- package/dist/types-ts4.5/ui/issue-like-table/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/types.d.ts +5 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +3 -1
- package/package.json +7 -2
|
@@ -3,6 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
6
7
|
import { BasicSearchInput } from '../basic-search-input';
|
|
7
8
|
import { JiraJQLEditor } from '../jql-editor';
|
|
8
9
|
import { ModeSwitcher } from '../mode-switcher';
|
|
@@ -46,6 +47,8 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
46
47
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
47
48
|
orderDirection = _useState10[0],
|
|
48
49
|
setOrderDirection = _useState10[1];
|
|
50
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
51
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
49
52
|
var onSearchModeChange = function onSearchModeChange(searchMode) {
|
|
50
53
|
setCurrentSearchMode(searchMode);
|
|
51
54
|
};
|
|
@@ -79,6 +82,11 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
79
82
|
onSearch({
|
|
80
83
|
jql: jql
|
|
81
84
|
});
|
|
85
|
+
if (currentSearchMode === basicModeValue) {
|
|
86
|
+
fireEvent('ui.form.submitted.basicSearch', {});
|
|
87
|
+
} else if (currentSearchMode === jqlModeValue) {
|
|
88
|
+
fireEvent('ui.jqlEditor.searched', {});
|
|
89
|
+
}
|
|
82
90
|
};
|
|
83
91
|
return jsx("div", {
|
|
84
92
|
css: inputContainerStyles
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
8
|
/** @jsx jsx */
|
|
6
9
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
10
|
import { css, jsx } from '@emotion/react';
|
|
8
11
|
import { FormattedMessage, FormattedNumber, useIntl } from 'react-intl-next';
|
|
12
|
+
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
9
13
|
import Button from '@atlaskit/button/standard-button';
|
|
10
14
|
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
11
|
-
import { B400, N0, N800 } from '@atlaskit/theme/colors';
|
|
15
|
+
import { B400, N0, N40, N800 } from '@atlaskit/theme/colors';
|
|
16
|
+
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
12
17
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
13
18
|
import { getAvailableJiraSites } from '../../../services/getAvailableJiraSites';
|
|
19
|
+
import { name as packageName, version as packageVersion } from '../../../version.json';
|
|
14
20
|
import { AccessRequired } from '../../common/error-state/access-required';
|
|
15
21
|
import { ModalLoadingError } from '../../common/error-state/modal-loading-error';
|
|
16
22
|
import { NoResults } from '../../common/error-state/no-results';
|
|
@@ -26,8 +32,9 @@ var dropdownContainerStyles = css({
|
|
|
26
32
|
});
|
|
27
33
|
var contentContainerStyles = css({
|
|
28
34
|
display: 'grid',
|
|
29
|
-
|
|
30
|
-
overflow: 'auto'
|
|
35
|
+
maxHeight: '420px',
|
|
36
|
+
overflow: 'auto',
|
|
37
|
+
borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(N40, ")"))
|
|
31
38
|
});
|
|
32
39
|
var placeholderSmartLinkStyles = css({
|
|
33
40
|
backgroundColor: "var(--ds-surface-raised, ".concat(N0, ")"),
|
|
@@ -44,7 +51,7 @@ var issueCountStyles = css({
|
|
|
44
51
|
var smartLinkContainerStyles = css({
|
|
45
52
|
paddingLeft: '1px'
|
|
46
53
|
});
|
|
47
|
-
export var
|
|
54
|
+
export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
48
55
|
var datasourceId = props.datasourceId,
|
|
49
56
|
initialParameters = props.parameters,
|
|
50
57
|
initialVisibleColumnKeys = props.visibleColumnKeys,
|
|
@@ -93,6 +100,8 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
93
100
|
totalCount = _useDatasourceTableSt.totalCount;
|
|
94
101
|
var _useIntl = useIntl(),
|
|
95
102
|
formatMessage = _useIntl.formatMessage;
|
|
103
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
104
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
96
105
|
var selectedJiraSite = useMemo(function () {
|
|
97
106
|
return availableSites.find(function (jiraSite) {
|
|
98
107
|
return jiraSite.cloudId === cloudId;
|
|
@@ -102,6 +111,9 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
102
111
|
var jqlUrl = selectedJiraSite && jql && "".concat(selectedJiraSite.url, "/issues/?jql=").concat(encodeURI(jql));
|
|
103
112
|
var isInsertDisabled = !isParametersSet || status === 'rejected' || status === 'unauthorized' || status === 'loading' || resolvedWithNoResults;
|
|
104
113
|
var shouldShowIssueCount = !!totalCount && totalCount !== 1 && currentViewMode === 'issue';
|
|
114
|
+
useEffect(function () {
|
|
115
|
+
fireEvent('screen.datasourceModalDialog.viewed', {});
|
|
116
|
+
}, [fireEvent]);
|
|
105
117
|
useEffect(function () {
|
|
106
118
|
var newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
107
119
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
@@ -118,7 +130,10 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
118
130
|
case 2:
|
|
119
131
|
jiraSites = _context.sent;
|
|
120
132
|
setAvailableSites(jiraSites);
|
|
121
|
-
|
|
133
|
+
fireEvent('ui.modal.ready.datasource', {
|
|
134
|
+
instancesCount: jiraSites.length
|
|
135
|
+
});
|
|
136
|
+
case 5:
|
|
122
137
|
case "end":
|
|
123
138
|
return _context.stop();
|
|
124
139
|
}
|
|
@@ -129,7 +144,7 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
129
144
|
};
|
|
130
145
|
}();
|
|
131
146
|
void fetchSiteDisplayNames();
|
|
132
|
-
}, []);
|
|
147
|
+
}, [fireEvent]);
|
|
133
148
|
useEffect(function () {
|
|
134
149
|
if (!cloudId && selectedJiraSite) {
|
|
135
150
|
setCloudId(selectedJiraSite.cloudId);
|
|
@@ -200,7 +215,9 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
200
215
|
setCurrentViewMode(selectedMode);
|
|
201
216
|
};
|
|
202
217
|
var issueLikeDataTableView = useMemo(function () {
|
|
203
|
-
return jsx(
|
|
218
|
+
return jsx("div", {
|
|
219
|
+
css: contentContainerStyles
|
|
220
|
+
}, jsx(IssueLikeDataTableView, {
|
|
204
221
|
testId: "jira-jql-datasource-table",
|
|
205
222
|
status: status,
|
|
206
223
|
columns: columns,
|
|
@@ -210,7 +227,7 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
210
227
|
onNextPage: onNextPage,
|
|
211
228
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
212
229
|
onVisibleColumnKeysChange: setVisibleColumnKeys
|
|
213
|
-
});
|
|
230
|
+
}));
|
|
214
231
|
}, [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, responseItems, status, visibleColumnKeys]);
|
|
215
232
|
var renderCountModeContent = useCallback(function () {
|
|
216
233
|
var url = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
|
|
@@ -247,9 +264,11 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
247
264
|
return jsx(NoResults, null);
|
|
248
265
|
} else if (status === 'empty' || !columns.length) {
|
|
249
266
|
// persist the empty state when making the initial /data request which contains the columns
|
|
250
|
-
return jsx(
|
|
267
|
+
return jsx("div", {
|
|
268
|
+
css: contentContainerStyles
|
|
269
|
+
}, jsx(EmptyState, {
|
|
251
270
|
testId: "jira-jql-datasource-modal--empty-state"
|
|
252
|
-
});
|
|
271
|
+
}));
|
|
253
272
|
}
|
|
254
273
|
var firstIssueUrl = retrieveUrlForSmartCardRender();
|
|
255
274
|
if (responseItems.length === 1 && firstIssueUrl) {
|
|
@@ -292,9 +311,7 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
292
311
|
isSearching: status === 'loading',
|
|
293
312
|
parameters: parameters,
|
|
294
313
|
onSearch: onSearch
|
|
295
|
-
}), jsx("div", {
|
|
296
|
-
css: contentContainerStyles
|
|
297
|
-
}, currentViewMode === 'count' ? renderCountModeContent() : renderIssuesModeContent())), jsx(ModalFooter, null, shouldShowIssueCount && jsx("div", {
|
|
314
|
+
}), currentViewMode === 'count' ? renderCountModeContent() : renderIssuesModeContent()), jsx(ModalFooter, null, shouldShowIssueCount && jsx("div", {
|
|
298
315
|
"data-testid": "jira-jql-datasource-modal-total-issues-count",
|
|
299
316
|
css: issueCountStyles
|
|
300
317
|
}, jsx(FormattedNumber, {
|
|
@@ -312,4 +329,16 @@ export var JiraIssuesConfigModal = function JiraIssuesConfigModal(props) {
|
|
|
312
329
|
isDisabled: isInsertDisabled,
|
|
313
330
|
testId: 'jira-jql-datasource-modal--insert-button'
|
|
314
331
|
}, jsx(FormattedMessage, modalMessages.insertIssuesButtonText)))));
|
|
315
|
-
};
|
|
332
|
+
};
|
|
333
|
+
var analyticsContextAttributes = {
|
|
334
|
+
dataProvider: 'jira-issues'
|
|
335
|
+
};
|
|
336
|
+
var analyticsContextData = {
|
|
337
|
+
packageName: packageName,
|
|
338
|
+
packageVersion: packageVersion,
|
|
339
|
+
source: 'datasourceConfigModal'
|
|
340
|
+
};
|
|
341
|
+
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
342
|
+
attributes: _objectSpread({}, analyticsContextAttributes)
|
|
343
|
+
});
|
|
344
|
+
export var JiraIssuesConfigModal = withAnalyticsContext(contextData)(PlainJiraIssuesConfigModal);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { Fragment, useEffect, useState } from 'react';
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
@@ -13,10 +13,11 @@ import RefreshIcon from '@atlaskit/icon/glyph/refresh';
|
|
|
13
13
|
import { N0, N40, N800, N90 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { footerMessages } from './messages';
|
|
15
15
|
import { SyncInfo } from './sync-info';
|
|
16
|
-
var FooterWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
16
|
+
var FooterWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 ", ";\n box-sizing: border-box;\n background: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-background-input, ".concat(N0, ")"));
|
|
17
|
+
var TopBorderWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n padding: ", " 0;\n border-top: 2px solid ", ";\n"])), "var(--ds-space-250, 20px)", "var(--ds-background-accent-gray-subtler, ".concat(N40, ")"));
|
|
18
|
+
var IssueCounterWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-self: center;\n color: ", ";\n"])), "var(--ds-text-accent-gray, ".concat(N800, ")"));
|
|
19
|
+
var SyncWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: ", ";\n"])), "var(--ds-text-accent-gray, ".concat(N90, ")"));
|
|
20
|
+
var SyncTextWrapper = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-right: 5px;\n"])));
|
|
20
21
|
export var TableFooter = function TableFooter(_ref) {
|
|
21
22
|
var issueCount = _ref.issueCount,
|
|
22
23
|
onRefresh = _ref.onRefresh,
|
|
@@ -37,7 +38,9 @@ export var TableFooter = function TableFooter(_ref) {
|
|
|
37
38
|
// ensure correct positioning since 'justify-content: space-between' is used).
|
|
38
39
|
return onRefresh || showIssueCount ? jsx(FooterWrapper, {
|
|
39
40
|
"data-testid": "table-footer"
|
|
40
|
-
}, jsx(
|
|
41
|
+
}, jsx(TopBorderWrapper, null, jsx(IssueCounterWrapper, {
|
|
42
|
+
"data-testid": 'issue-count-wrapper'
|
|
43
|
+
}, showIssueCount && jsx(Heading, {
|
|
41
44
|
testId: "issue-count",
|
|
42
45
|
level: "h400"
|
|
43
46
|
}, jsx(FormattedNumber, {
|
|
@@ -58,5 +61,5 @@ export var TableFooter = function TableFooter(_ref) {
|
|
|
58
61
|
}),
|
|
59
62
|
isDisabled: isLoading,
|
|
60
63
|
testId: "refresh-button"
|
|
61
|
-
})))) : null;
|
|
64
|
+
}))))) : null;
|
|
62
65
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVENT_CHANNEL = "media";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::75446f307933096c01c4784a1d7f2aa9>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
|
+
*/
|
|
9
|
+
export type PackageMetaDataType = {
|
|
10
|
+
packageName: '@atlaskit/link-datasource';
|
|
11
|
+
packageVersion: string;
|
|
12
|
+
};
|
|
13
|
+
export type AnalyticsContextType = {
|
|
14
|
+
source: 'datasourceConfigModal' | 'datasourceConfluenceEditor';
|
|
15
|
+
};
|
|
16
|
+
export type AnalyticsContextAttributesType = {
|
|
17
|
+
dataProvider: 'jira-issues';
|
|
18
|
+
};
|
|
19
|
+
export type DatasourceModalDialogViewedAttributesType = {};
|
|
20
|
+
export type ModalReadyDatasourceAttributesType = {
|
|
21
|
+
instancesCount: number;
|
|
22
|
+
};
|
|
23
|
+
export type JqlEditorSearchedAttributesType = {};
|
|
24
|
+
export type FormSubmittedBasicSearchAttributesType = {};
|
|
25
|
+
export type EmptyResultShownDatasourceAttributesType = {};
|
|
26
|
+
export type ErrorShownAttributesType = {
|
|
27
|
+
reason: 'network' | 'access';
|
|
28
|
+
};
|
|
29
|
+
export type AnalyticsEventAttributes = {
|
|
30
|
+
/**
|
|
31
|
+
* Fires when user sees modal dialog. */
|
|
32
|
+
'screen.datasourceModalDialog.viewed': DatasourceModalDialogViewedAttributesType;
|
|
33
|
+
/**
|
|
34
|
+
* Fires when the datasource modal is ready for searching and displaying search results. */
|
|
35
|
+
'ui.modal.ready.datasource': ModalReadyDatasourceAttributesType;
|
|
36
|
+
/**
|
|
37
|
+
* Fires when search is initiated via the search icon or enter key press for jql editor input field. */
|
|
38
|
+
'ui.jqlEditor.searched': JqlEditorSearchedAttributesType;
|
|
39
|
+
/**
|
|
40
|
+
* Fires when search is initiated via the search icon or enter key press from the basic input textfield. */
|
|
41
|
+
'ui.form.submitted.basicSearch': FormSubmittedBasicSearchAttributesType;
|
|
42
|
+
/**
|
|
43
|
+
* Fires when datasource results are empty. */
|
|
44
|
+
'ui.emptyResult.shown.datasource': EmptyResultShownDatasourceAttributesType;
|
|
45
|
+
/**
|
|
46
|
+
* Fires when datasource errors state is shown. */
|
|
47
|
+
'ui.error.shown': ErrorShownAttributesType;
|
|
48
|
+
};
|
|
49
|
+
export type EventKey = keyof AnalyticsEventAttributes;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::819168596ba17484cadda969f8ecf82d>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
|
+
*/
|
|
9
|
+
import { AnalyticsEventAttributes, EventKey } from './analytics.types';
|
|
10
|
+
type OptionalIfUndefined<T> = undefined extends T ? [param?: T] : [param: T];
|
|
11
|
+
export type EventPayloadAttributes<K extends EventKey> = OptionalIfUndefined<AnalyticsEventAttributes[K]>;
|
|
12
|
+
type EventTypes = 'ui' | 'track' | 'operational' | 'screen';
|
|
13
|
+
type ScreenEventPayload<K extends EventKey> = {
|
|
14
|
+
eventType: 'screen';
|
|
15
|
+
name: string;
|
|
16
|
+
action: 'viewed';
|
|
17
|
+
attributes?: AnalyticsEventAttributes[K];
|
|
18
|
+
};
|
|
19
|
+
type EventPayload<K extends EventKey> = {
|
|
20
|
+
eventType: Omit<EventTypes, 'screen'>;
|
|
21
|
+
actionSubject: string;
|
|
22
|
+
action: string;
|
|
23
|
+
actionSubjectId?: string;
|
|
24
|
+
attributes?: AnalyticsEventAttributes[K];
|
|
25
|
+
};
|
|
26
|
+
declare const createEventPayload: <K extends keyof AnalyticsEventAttributes>(eventKey: K, ...[attributes]: OptionalIfUndefined<AnalyticsEventAttributes[K]>) => ScreenEventPayload<K> | EventPayload<K>;
|
|
27
|
+
export default createEventPayload;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const useAnalyticsEvents: () => {
|
|
2
|
+
fireEvent: <K extends keyof import("./analytics.types").AnalyticsEventAttributes>(params_0: K, ...params_1: undefined extends import("./analytics.types").AnalyticsEventAttributes[K] ? [param?: import("./analytics.types").AnalyticsEventAttributes[K] | undefined] : [param: import("./analytics.types").AnalyticsEventAttributes[K]]) => void;
|
|
3
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { EVENT_CHANNEL } from './constants';
|
|
2
|
+
export declare const useDatasourceAnalyticsEvents: () => {
|
|
3
|
+
fireEvent: <K extends keyof import("./generated/analytics.types").AnalyticsEventAttributes>(params_0: K, ...params_1: undefined extends import("./generated/analytics.types").AnalyticsEventAttributes[K] ? [param?: import("./generated/analytics.types").AnalyticsEventAttributes[K] | undefined] : [param: import("./generated/analytics.types").AnalyticsEventAttributes[K]]) => void;
|
|
4
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { ColumnPickerProps } from './types';
|
|
3
|
-
export declare const ColumnPicker: ({
|
|
3
|
+
export declare const ColumnPicker: ({ columns, selectedColumnKeys, onSelectedColumnKeysChange, onOpen, }: ColumnPickerProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DatasourceResponseSchemaProperty } from '@atlaskit/linking-types';
|
|
2
2
|
export type ColumnPickerProps = {
|
|
3
|
-
isDatasourceLoading: boolean;
|
|
4
3
|
columns: DatasourceResponseSchemaProperty[];
|
|
5
4
|
selectedColumnKeys: string[];
|
|
6
5
|
onSelectedColumnKeysChange: (selectedColumnKeys: string[]) => void;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight,
|
|
4
|
+
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight, dragPreview, maxWidth, }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
index: number;
|
|
8
8
|
tableId: Symbol;
|
|
9
9
|
dndPreviewHeight: number;
|
|
10
|
+
dragPreview: React.ReactNode;
|
|
10
11
|
maxWidth?: number | undefined;
|
|
11
|
-
onDragPreviewStart: () => void;
|
|
12
|
-
onDragPreviewEnd: () => void;
|
|
13
12
|
}) => jsx.JSX.Element;
|
|
@@ -12,5 +12,5 @@ export interface RowCellType {
|
|
|
12
12
|
content?: React.ReactNode | string;
|
|
13
13
|
maxWidth?: number;
|
|
14
14
|
}
|
|
15
|
-
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, status, hasNextPage, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
15
|
+
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, status, hasNextPage, scrollableContainerHeight, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
16
16
|
export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => jsx.JSX.Element;
|
|
@@ -37,4 +37,9 @@ export interface IssueLikeDataTableViewProps {
|
|
|
37
37
|
* @param visibleColumnKeys
|
|
38
38
|
*/
|
|
39
39
|
onVisibleColumnKeysChange?: (visibleColumnKeys: string[]) => void;
|
|
40
|
+
/**
|
|
41
|
+
* If this number is set it will restrict (max-height) maximum size of the component AND make main container a scrollable container.
|
|
42
|
+
* It this number is undefined it will not restrict height and not make container scrollable.
|
|
43
|
+
*/
|
|
44
|
+
scrollableContainerHeight?: number;
|
|
40
45
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { jsx } from '@emotion/react';
|
|
2
3
|
import { JiraIssuesConfigModalProps } from '../types';
|
|
3
|
-
export declare const
|
|
4
|
+
export declare const PlainJiraIssuesConfigModal: (props: JiraIssuesConfigModalProps) => jsx.JSX.Element;
|
|
5
|
+
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<JiraIssuesConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVENT_CHANNEL = "media";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::75446f307933096c01c4784a1d7f2aa9>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
|
+
*/
|
|
9
|
+
export type PackageMetaDataType = {
|
|
10
|
+
packageName: '@atlaskit/link-datasource';
|
|
11
|
+
packageVersion: string;
|
|
12
|
+
};
|
|
13
|
+
export type AnalyticsContextType = {
|
|
14
|
+
source: 'datasourceConfigModal' | 'datasourceConfluenceEditor';
|
|
15
|
+
};
|
|
16
|
+
export type AnalyticsContextAttributesType = {
|
|
17
|
+
dataProvider: 'jira-issues';
|
|
18
|
+
};
|
|
19
|
+
export type DatasourceModalDialogViewedAttributesType = {};
|
|
20
|
+
export type ModalReadyDatasourceAttributesType = {
|
|
21
|
+
instancesCount: number;
|
|
22
|
+
};
|
|
23
|
+
export type JqlEditorSearchedAttributesType = {};
|
|
24
|
+
export type FormSubmittedBasicSearchAttributesType = {};
|
|
25
|
+
export type EmptyResultShownDatasourceAttributesType = {};
|
|
26
|
+
export type ErrorShownAttributesType = {
|
|
27
|
+
reason: 'network' | 'access';
|
|
28
|
+
};
|
|
29
|
+
export type AnalyticsEventAttributes = {
|
|
30
|
+
/**
|
|
31
|
+
* Fires when user sees modal dialog. */
|
|
32
|
+
'screen.datasourceModalDialog.viewed': DatasourceModalDialogViewedAttributesType;
|
|
33
|
+
/**
|
|
34
|
+
* Fires when the datasource modal is ready for searching and displaying search results. */
|
|
35
|
+
'ui.modal.ready.datasource': ModalReadyDatasourceAttributesType;
|
|
36
|
+
/**
|
|
37
|
+
* Fires when search is initiated via the search icon or enter key press for jql editor input field. */
|
|
38
|
+
'ui.jqlEditor.searched': JqlEditorSearchedAttributesType;
|
|
39
|
+
/**
|
|
40
|
+
* Fires when search is initiated via the search icon or enter key press from the basic input textfield. */
|
|
41
|
+
'ui.form.submitted.basicSearch': FormSubmittedBasicSearchAttributesType;
|
|
42
|
+
/**
|
|
43
|
+
* Fires when datasource results are empty. */
|
|
44
|
+
'ui.emptyResult.shown.datasource': EmptyResultShownDatasourceAttributesType;
|
|
45
|
+
/**
|
|
46
|
+
* Fires when datasource errors state is shown. */
|
|
47
|
+
'ui.error.shown': ErrorShownAttributesType;
|
|
48
|
+
};
|
|
49
|
+
export type EventKey = keyof AnalyticsEventAttributes;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::819168596ba17484cadda969f8ecf82d>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
|
+
*/
|
|
9
|
+
import { AnalyticsEventAttributes, EventKey } from './analytics.types';
|
|
10
|
+
type OptionalIfUndefined<T> = undefined extends T ? [
|
|
11
|
+
param?: T
|
|
12
|
+
] : [
|
|
13
|
+
param: T
|
|
14
|
+
];
|
|
15
|
+
export type EventPayloadAttributes<K extends EventKey> = OptionalIfUndefined<AnalyticsEventAttributes[K]>;
|
|
16
|
+
type EventTypes = 'ui' | 'track' | 'operational' | 'screen';
|
|
17
|
+
type ScreenEventPayload<K extends EventKey> = {
|
|
18
|
+
eventType: 'screen';
|
|
19
|
+
name: string;
|
|
20
|
+
action: 'viewed';
|
|
21
|
+
attributes?: AnalyticsEventAttributes[K];
|
|
22
|
+
};
|
|
23
|
+
type EventPayload<K extends EventKey> = {
|
|
24
|
+
eventType: Omit<EventTypes, 'screen'>;
|
|
25
|
+
actionSubject: string;
|
|
26
|
+
action: string;
|
|
27
|
+
actionSubjectId?: string;
|
|
28
|
+
attributes?: AnalyticsEventAttributes[K];
|
|
29
|
+
};
|
|
30
|
+
declare const createEventPayload: <K extends keyof AnalyticsEventAttributes>(eventKey: K, ...[attributes]: OptionalIfUndefined<AnalyticsEventAttributes[K]>) => ScreenEventPayload<K> | EventPayload<K>;
|
|
31
|
+
export default createEventPayload;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const useAnalyticsEvents: () => {
|
|
2
|
+
fireEvent: <K extends keyof import("./analytics.types").AnalyticsEventAttributes>(params_0: K, ...params_1: undefined extends import("./analytics.types").AnalyticsEventAttributes[K] ? [
|
|
3
|
+
param?: import("./analytics.types").AnalyticsEventAttributes[K] | undefined
|
|
4
|
+
] : [
|
|
5
|
+
param: import("./analytics.types").AnalyticsEventAttributes[K]
|
|
6
|
+
]) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { EVENT_CHANNEL } from './constants';
|
|
2
|
+
export declare const useDatasourceAnalyticsEvents: () => {
|
|
3
|
+
fireEvent: <K extends keyof import("./generated/analytics.types").AnalyticsEventAttributes>(params_0: K, ...params_1: undefined extends import("./generated/analytics.types").AnalyticsEventAttributes[K] ? [
|
|
4
|
+
param?: import("./generated/analytics.types").AnalyticsEventAttributes[K] | undefined
|
|
5
|
+
] : [
|
|
6
|
+
param: import("./generated/analytics.types").AnalyticsEventAttributes[K]
|
|
7
|
+
]) => void;
|
|
8
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { ColumnPickerProps } from './types';
|
|
3
|
-
export declare const ColumnPicker: ({
|
|
3
|
+
export declare const ColumnPicker: ({ columns, selectedColumnKeys, onSelectedColumnKeysChange, onOpen, }: ColumnPickerProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DatasourceResponseSchemaProperty } from '@atlaskit/linking-types';
|
|
2
2
|
export type ColumnPickerProps = {
|
|
3
|
-
isDatasourceLoading: boolean;
|
|
4
3
|
columns: DatasourceResponseSchemaProperty[];
|
|
5
4
|
selectedColumnKeys: string[];
|
|
6
5
|
onSelectedColumnKeysChange: (selectedColumnKeys: string[]) => void;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight,
|
|
4
|
+
export declare const DraggableTableHeading: ({ children, id, index, tableId, dndPreviewHeight, dragPreview, maxWidth, }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
id: string;
|
|
7
7
|
index: number;
|
|
8
8
|
tableId: Symbol;
|
|
9
9
|
dndPreviewHeight: number;
|
|
10
|
+
dragPreview: React.ReactNode;
|
|
10
11
|
maxWidth?: number | undefined;
|
|
11
|
-
onDragPreviewStart: () => void;
|
|
12
|
-
onDragPreviewEnd: () => void;
|
|
13
12
|
}) => jsx.JSX.Element;
|
|
@@ -12,5 +12,5 @@ export interface RowCellType {
|
|
|
12
12
|
content?: React.ReactNode | string;
|
|
13
13
|
maxWidth?: number;
|
|
14
14
|
}
|
|
15
|
-
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, status, hasNextPage, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
15
|
+
export declare const IssueLikeDataTableView: ({ testId, onNextPage, onLoadDatasourceDetails, items, columns, renderItem, visibleColumnKeys, onVisibleColumnKeysChange, status, hasNextPage, scrollableContainerHeight, }: IssueLikeDataTableViewProps) => jsx.JSX.Element;
|
|
16
16
|
export declare const EmptyState: ({ isCompact, testId }: import("./empty-state").Props) => jsx.JSX.Element;
|
|
@@ -37,4 +37,9 @@ export interface IssueLikeDataTableViewProps {
|
|
|
37
37
|
* @param visibleColumnKeys
|
|
38
38
|
*/
|
|
39
39
|
onVisibleColumnKeysChange?: (visibleColumnKeys: string[]) => void;
|
|
40
|
+
/**
|
|
41
|
+
* If this number is set it will restrict (max-height) maximum size of the component AND make main container a scrollable container.
|
|
42
|
+
* It this number is undefined it will not restrict height and not make container scrollable.
|
|
43
|
+
*/
|
|
44
|
+
scrollableContainerHeight?: number;
|
|
40
45
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { jsx } from '@emotion/react';
|
|
2
3
|
import { JiraIssuesConfigModalProps } from '../types';
|
|
3
|
-
export declare const
|
|
4
|
+
export declare const PlainJiraIssuesConfigModal: (props: JiraIssuesConfigModalProps) => jsx.JSX.Element;
|
|
5
|
+
export declare const JiraIssuesConfigModal: import("react").ForwardRefExoticComponent<JiraIssuesConfigModalProps & import("@atlaskit/analytics-next").WithContextProps & import("react").RefAttributes<any>>;
|