@atlaskit/link-datasource 1.17.7 → 1.17.9
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 +1 -1
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +11 -3
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +4 -0
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +1 -0
- package/dist/cjs/ui/issue-like-table/empty-state/index.js +9 -4
- package/dist/cjs/ui/issue-like-table/index.js +17 -6
- package/dist/cjs/ui/issue-like-table/styled.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +7 -0
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +7 -2
- package/dist/cjs/ui/table-footer/index.js +1 -1
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +11 -3
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +1 -0
- package/dist/es2019/ui/issue-like-table/empty-state/index.js +9 -4
- package/dist/es2019/ui/issue-like-table/index.js +20 -6
- package/dist/es2019/ui/issue-like-table/styled.js +14 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +7 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +7 -2
- package/dist/es2019/ui/table-footer/index.js +1 -0
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +11 -3
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +1 -0
- package/dist/esm/ui/issue-like-table/empty-state/index.js +9 -4
- package/dist/esm/ui/issue-like-table/index.js +17 -6
- package/dist/esm/ui/issue-like-table/styled.js +1 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +7 -0
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +7 -2
- package/dist/esm/ui/table-footer/index.js +1 -1
- package/dist/types/analytics/generated/analytics.types.d.ts +8 -1
- package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +8 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.17.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43398](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43398) [`a7af91aa3fb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a7af91aa3fb) - Add analytics event when basic filter dropdown menu is closed.
|
|
8
|
+
|
|
9
|
+
## 1.17.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#43419](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43419) [`27726a80705`](https://bitbucket.org/atlassian/atlassian-frontend/commits/27726a80705) - [ux] Updated borders and added grid lines in datasource tables.
|
|
14
|
+
|
|
3
15
|
## 1.17.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RenderAssetsContent = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
9
10
|
var _accessRequired = require("../../../common/error-state/access-required");
|
|
10
11
|
var _modalLoadingError = require("../../../common/error-state/modal-loading-error");
|
|
11
12
|
var _noResults = require("../../../common/error-state/no-results");
|
|
@@ -18,6 +19,11 @@ var emptyStateOverrideStyles = (0, _react2.css)({
|
|
|
18
19
|
height: '420px',
|
|
19
20
|
overflow: 'hidden'
|
|
20
21
|
});
|
|
22
|
+
var tableBordersStyles = (0, _react2.css)({
|
|
23
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
24
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
25
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)"
|
|
26
|
+
});
|
|
21
27
|
var RenderAssetsContent = exports.RenderAssetsContent = function RenderAssetsContent(props) {
|
|
22
28
|
var status = props.status,
|
|
23
29
|
responseItems = props.responseItems,
|
|
@@ -32,7 +38,9 @@ var RenderAssetsContent = exports.RenderAssetsContent = function RenderAssetsCon
|
|
|
32
38
|
isFetchingInitialData = props.isFetchingInitialData;
|
|
33
39
|
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
34
40
|
var issueLikeDataTableView = (0, _react.useMemo)(function () {
|
|
35
|
-
return (0, _react2.jsx)(
|
|
41
|
+
return (0, _react2.jsx)("div", {
|
|
42
|
+
css: tableBordersStyles
|
|
43
|
+
}, (0, _react2.jsx)(_issueLikeTable.IssueLikeDataTableView, {
|
|
36
44
|
testId: "asset-datasource-table",
|
|
37
45
|
status: status,
|
|
38
46
|
columns: columns,
|
|
@@ -43,12 +51,12 @@ var RenderAssetsContent = exports.RenderAssetsContent = function RenderAssetsCon
|
|
|
43
51
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
44
52
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
45
53
|
parentContainerRenderInstanceId: modalRenderInstanceId
|
|
46
|
-
});
|
|
54
|
+
}));
|
|
47
55
|
}, [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys, modalRenderInstanceId]);
|
|
48
56
|
if (isFetchingInitialData) {
|
|
49
57
|
// Placing this check first as it's a priority before all others
|
|
50
58
|
return (0, _react2.jsx)("div", {
|
|
51
|
-
css: emptyStateOverrideStyles
|
|
59
|
+
css: [tableBordersStyles, emptyStateOverrideStyles]
|
|
52
60
|
}, (0, _react2.jsx)(_issueLikeTable.EmptyState, {
|
|
53
61
|
testId: "assets-aql-datasource-modal--loading-state"
|
|
54
62
|
}));
|
|
@@ -24,6 +24,9 @@ var _emptyState = _interopRequireDefault(require("../issue-like-table/empty-stat
|
|
|
24
24
|
var _tableFooter = require("../table-footer");
|
|
25
25
|
/** @jsx jsx */
|
|
26
26
|
|
|
27
|
+
var containerStyles = (0, _react2.css)({
|
|
28
|
+
borderRadius: 'inherit'
|
|
29
|
+
});
|
|
27
30
|
var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAnalytics(_ref) {
|
|
28
31
|
var datasourceId = _ref.datasourceId,
|
|
29
32
|
parameters = _ref.parameters,
|
|
@@ -128,6 +131,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
128
131
|
return (
|
|
129
132
|
// datasource-table classname is to exclude all children from being commentable - exclude list is in CFE
|
|
130
133
|
(0, _react2.jsx)("div", {
|
|
134
|
+
css: containerStyles,
|
|
131
135
|
className: "datasource-table"
|
|
132
136
|
}, hasColumns ? (0, _react2.jsx)(_issueLikeTable.IssueLikeDataTableView, {
|
|
133
137
|
testId: 'datasource-table-view',
|
|
@@ -268,6 +268,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
268
268
|
}, [id, index, onWidthChange, state, tableId, width]);
|
|
269
269
|
return (0, _react2.jsx)(_styled.TableHeading, {
|
|
270
270
|
ref: mainHeaderCellRef,
|
|
271
|
+
className: "has-column-picker",
|
|
271
272
|
"data-testid": "".concat(id, "-column-heading"),
|
|
272
273
|
style: _objectSpread({
|
|
273
274
|
cursor: 'grab'
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
9
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
9
10
|
var _styled = require("../styled");
|
|
10
11
|
/** @jsx jsx */
|
|
11
12
|
|
|
@@ -19,14 +20,19 @@ var SkeletonComponent = function SkeletonComponent(_ref) {
|
|
|
19
20
|
width: width
|
|
20
21
|
});
|
|
21
22
|
};
|
|
22
|
-
var tableSidePadding = "var(--ds-space-200, 16px)";
|
|
23
23
|
var tableBodyStyles = (0, _react.css)({
|
|
24
24
|
borderBottom: 0
|
|
25
25
|
});
|
|
26
26
|
var cellStyles = (0, _react.css)({
|
|
27
27
|
paddingBlock: "var(--ds-space-100, 12px)",
|
|
28
|
+
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
29
|
+
borderBottom: "0.5px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
30
|
+
'&:first-child': {
|
|
31
|
+
paddingLeft: "var(--ds-space-100, 4px)"
|
|
32
|
+
},
|
|
28
33
|
'&:last-child': {
|
|
29
|
-
|
|
34
|
+
borderRight: 0,
|
|
35
|
+
paddingRight: "var(--ds-space-100, 4px)"
|
|
30
36
|
}
|
|
31
37
|
});
|
|
32
38
|
var baseColumns = [{
|
|
@@ -99,10 +105,9 @@ var _default = exports.default = function _default(_ref4) {
|
|
|
99
105
|
return (0, _react.jsx)("div", {
|
|
100
106
|
style: {
|
|
101
107
|
// the IssueLikeDataTableView wraps the table in a container with the styling below while modal doesn't
|
|
102
|
-
// the isCompact prop is applied to non-modal empty states which require additional padding
|
|
103
108
|
// this maxHeight comes from scrollableContainerHeight
|
|
104
109
|
maxHeight: _styled.ScrollableContainerHeight,
|
|
105
|
-
padding:
|
|
110
|
+
padding: 0,
|
|
106
111
|
boxSizing: 'border-box'
|
|
107
112
|
}
|
|
108
113
|
}, (0, _react.jsx)("table", {
|
|
@@ -44,17 +44,27 @@ var tableHeadStyles = (0, _react2.css)({
|
|
|
44
44
|
top: 0,
|
|
45
45
|
zIndex: _zindex.stickyTableHeadersIndex
|
|
46
46
|
});
|
|
47
|
-
var ColumnPickerHeader = _styled.default.th(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 56px;\n z-index: 10;\n position: sticky;\n right: calc(-1 * ", ");\n background-color: ", ";\n border-bottom: 2px solid ", "; /* It is required to have solid (not half-transparent) color because of this gradient business
|
|
47
|
+
var ColumnPickerHeader = _styled.default.th(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 56px;\n z-index: 10;\n position: sticky;\n right: calc(-1 * ", ");\n background-color: ", ";\n border-bottom: 2px solid ", "; /* It is required to have solid (not half-transparent) color because of this gradient business below */\n\n padding-right: ", ";\n\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 0%,\n ", " 10%\n );\n vertical-align: middle; /* Keeps dropdown button in the middle */\n &:last-of-type {\n padding-right: ", ";\n }\n text-align: right; /* In case when TH itself is bigger we want to keep picker at the right side */\n"])), tableSidePadding, "var(--ds-surface, #FFF)", "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-space-100, 4px)", "var(--ds-surface, #FFF)", tableSidePadding);
|
|
48
48
|
var truncatedCellStyles = (0, _react2.css)({
|
|
49
49
|
overflow: 'hidden',
|
|
50
50
|
textOverflow: 'ellipsis',
|
|
51
|
-
whiteSpace: 'nowrap'
|
|
51
|
+
whiteSpace: 'nowrap',
|
|
52
|
+
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
53
|
+
borderBottom: "0.5px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
54
|
+
'&:first-child': {
|
|
55
|
+
paddingLeft: "var(--ds-space-100, 4px)"
|
|
56
|
+
},
|
|
57
|
+
'&:last-child': {
|
|
58
|
+
borderRight: 0,
|
|
59
|
+
paddingRight: "var(--ds-space-100, 4px)"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
var tableContainerStyles = (0, _react2.css)({
|
|
63
|
+
borderRadius: 'inherit'
|
|
52
64
|
});
|
|
53
65
|
var scrollableContainerStyles = (0, _react2.css)({
|
|
54
66
|
overflow: 'auto',
|
|
55
|
-
|
|
56
|
-
boxSizing: 'border-box',
|
|
57
|
-
borderRadius: "var(--ds-border-radius-100, 3px)"
|
|
67
|
+
boxSizing: 'border-box'
|
|
58
68
|
});
|
|
59
69
|
var tableStyles = (0, _react2.css)({
|
|
60
70
|
// These styles are needed to prevent thead bottom border from scrolling away.
|
|
@@ -379,7 +389,7 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
379
389
|
*/
|
|
380
390
|
contentEditable: false,
|
|
381
391
|
ref: containerRef,
|
|
382
|
-
css: scrollableContainerHeight
|
|
392
|
+
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles],
|
|
383
393
|
style: scrollableContainerHeight ? {
|
|
384
394
|
maxHeight: "".concat(scrollableContainerHeight, "px")
|
|
385
395
|
} : undefined
|
|
@@ -435,6 +445,7 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
435
445
|
} else {
|
|
436
446
|
return (0, _react2.jsx)(_styled2.TableHeading, {
|
|
437
447
|
key: key,
|
|
448
|
+
className: !!onVisibleColumnKeysChange ? 'has-column-picker' : '',
|
|
438
449
|
"data-testid": "".concat(key, "-column-heading"),
|
|
439
450
|
style: shouldUseWidth ? {
|
|
440
451
|
width: width
|
|
@@ -12,4 +12,4 @@ var _templateObject, _templateObject2;
|
|
|
12
12
|
var ScrollableContainerHeight = exports.ScrollableContainerHeight = 590;
|
|
13
13
|
var FieldTextFontSize = exports.FieldTextFontSize = '14px';
|
|
14
14
|
var Table = exports.Table = _styled.default.table(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n"])));
|
|
15
|
-
var TableHeading = exports.TableHeading = _styled.default.th(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n line-height: ", ";\n border-bottom: 2px solid ", ";\n height: calc(52px - ", " * 2 - 2px);\n vertical-align: bottom;\n\n & [data-testid='datasource-header-content--container'] {\n width: 100%;\n padding: ", " ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n white-space: normal;\n overflow: hidden;\n max-height: 2.5rem;\n word-wrap: break-word;\n\n &:hover {\n background: ", ";\n border-radius: 3px;\n }\n }\n"])), "var(--ds-font-lineHeight-300, 16px)", "var(--ds-
|
|
15
|
+
var TableHeading = exports.TableHeading = _styled.default.th(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n line-height: ", ";\n border-right: 0.5px solid ", ";\n border-bottom: 2px solid ", ";\n height: calc(52px - ", " * 2 - 2px);\n vertical-align: bottom;\n\n &.has-column-picker:nth-last-of-type(2) {\n border-right: 0;\n }\n\n &:first-child {\n padding-left: ", ";\n }\n\n &:last-child {\n border-right: 0;\n }\n\n & [data-testid='datasource-header-content--container'] {\n width: 100%;\n padding: ", " ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n white-space: normal;\n overflow: hidden;\n max-height: 2.5rem;\n word-wrap: break-word;\n\n &:hover {\n background: ", ";\n border-radius: 3px;\n }\n }\n"])), "var(--ds-font-lineHeight-300, 16px)", "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-space-050, 4px)", "var(--ds-space-100, 4px)", "var(--ds-space-100, 4px)", "var(--ds-space-050, 2px)", "var(--ds-background-input-hovered, #F7F8F9)");
|
|
@@ -168,6 +168,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
168
168
|
selectionCount: selectedOptions.length
|
|
169
169
|
});
|
|
170
170
|
}, [fetchFilterOptions, filterType, fireEvent, searchTerm, selectedOptions.length, sortOptionsOnPopupOpen, status]);
|
|
171
|
+
var handleMenuClose = (0, _react.useCallback)(function () {
|
|
172
|
+
fireEvent('ui.dropdown.closed.basicSearchDropdown', {
|
|
173
|
+
filterType: filterType,
|
|
174
|
+
selectionCount: selectedOptions.length
|
|
175
|
+
});
|
|
176
|
+
}, [filterType, fireEvent, selectedOptions.length]);
|
|
171
177
|
(0, _react.useEffect)(function () {
|
|
172
178
|
if (status === 'resolved') {
|
|
173
179
|
sortOptionsOnResolve();
|
|
@@ -243,6 +249,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
243
249
|
onChange: handleOptionSelection,
|
|
244
250
|
onInputChange: handleInputChange,
|
|
245
251
|
onOpen: handleMenuOpen,
|
|
252
|
+
onClose: handleMenuClose,
|
|
246
253
|
target: function target(_ref3) {
|
|
247
254
|
var isOpen = _ref3.isOpen,
|
|
248
255
|
triggerProps = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
27
|
var inputContainerStyles = (0, _react2.css)({
|
|
28
28
|
alignItems: 'baseline',
|
|
29
29
|
display: 'flex',
|
|
30
|
-
minHeight: '
|
|
30
|
+
minHeight: '72px'
|
|
31
31
|
});
|
|
32
32
|
var basicSearchInputContainerStyles = (0, _primitives.xcss)({
|
|
33
33
|
flexGrow: 1
|
|
@@ -51,6 +51,11 @@ var dropdownContainerStyles = (0, _react2.css)({
|
|
|
51
51
|
minHeight: '40px' // to prevent vertical shifting when site selector pops in
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
var tableContainerStyles = (0, _react2.css)({
|
|
55
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
56
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
57
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"))
|
|
58
|
+
});
|
|
54
59
|
var contentContainerStyles = (0, _react2.css)({
|
|
55
60
|
display: 'grid',
|
|
56
61
|
maxHeight: '420px',
|
|
@@ -432,7 +437,7 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
432
437
|
}, [visibleColumnKeys]);
|
|
433
438
|
var issueLikeDataTableView = (0, _react.useMemo)(function () {
|
|
434
439
|
return (0, _react2.jsx)("div", {
|
|
435
|
-
css: contentContainerStyles
|
|
440
|
+
css: [tableContainerStyles, contentContainerStyles]
|
|
436
441
|
}, (0, _react2.jsx)(_issueLikeTable.IssueLikeDataTableView, {
|
|
437
442
|
testId: "jira-jql-datasource-table",
|
|
438
443
|
status: status,
|
|
@@ -486,7 +491,7 @@ var PlainJiraIssuesConfigModal = exports.PlainJiraIssuesConfigModal = function P
|
|
|
486
491
|
} else if (status === 'empty' || !columns.length) {
|
|
487
492
|
// persist the empty state when making the initial /data request which contains the columns
|
|
488
493
|
return (0, _react2.jsx)("div", {
|
|
489
|
-
css: contentContainerStyles
|
|
494
|
+
css: [contentContainerStyles, !!jql && tableContainerStyles]
|
|
490
495
|
}, !!jql ? (0, _react2.jsx)(_issueLikeTable.EmptyState, {
|
|
491
496
|
testId: "jira-jql-datasource-modal--empty-state"
|
|
492
497
|
}) : (0, _react2.jsx)(_initialStateView.InitialStateView, {
|
|
@@ -21,7 +21,7 @@ var _messages = require("./messages");
|
|
|
21
21
|
var _syncInfo = require("./sync-info");
|
|
22
22
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
23
23
|
/** @jsx jsx */
|
|
24
|
-
var FooterWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 ", ";\n box-sizing: border-box;\n background: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-background-input, ".concat(_colors.N0, ")"));
|
|
24
|
+
var FooterWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 ", ";\n box-sizing: border-box;\n border-radius: inherit;\n background: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-background-input, ".concat(_colors.N0, ")"));
|
|
25
25
|
var TopBorderWrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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(_colors.N40, ")"));
|
|
26
26
|
var ItemCounterWrapper = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-self: center;\n"])));
|
|
27
27
|
var SyncWrapper = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n color: ", ";\n"])), "var(--ds-text-accent-gray, ".concat(_colors.N90, ")"));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
4
5
|
import { AccessRequired } from '../../../common/error-state/access-required';
|
|
5
6
|
import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
|
|
6
7
|
import { NoResults } from '../../../common/error-state/no-results';
|
|
@@ -11,6 +12,11 @@ const emptyStateOverrideStyles = css({
|
|
|
11
12
|
height: '420px',
|
|
12
13
|
overflow: 'hidden'
|
|
13
14
|
});
|
|
15
|
+
const tableBordersStyles = css({
|
|
16
|
+
border: `1px solid ${`var(--ds-border, ${N40})`}`,
|
|
17
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
18
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)"
|
|
19
|
+
});
|
|
14
20
|
export const RenderAssetsContent = props => {
|
|
15
21
|
const {
|
|
16
22
|
status,
|
|
@@ -26,7 +32,9 @@ export const RenderAssetsContent = props => {
|
|
|
26
32
|
isFetchingInitialData
|
|
27
33
|
} = props;
|
|
28
34
|
const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
29
|
-
const issueLikeDataTableView = useMemo(() => jsx(
|
|
35
|
+
const issueLikeDataTableView = useMemo(() => jsx("div", {
|
|
36
|
+
css: tableBordersStyles
|
|
37
|
+
}, jsx(IssueLikeDataTableView, {
|
|
30
38
|
testId: "asset-datasource-table",
|
|
31
39
|
status: status,
|
|
32
40
|
columns: columns,
|
|
@@ -37,11 +45,11 @@ export const RenderAssetsContent = props => {
|
|
|
37
45
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
38
46
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
39
47
|
parentContainerRenderInstanceId: modalRenderInstanceId
|
|
40
|
-
}), [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys, modalRenderInstanceId]);
|
|
48
|
+
})), [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys, modalRenderInstanceId]);
|
|
41
49
|
if (isFetchingInitialData) {
|
|
42
50
|
// Placing this check first as it's a priority before all others
|
|
43
51
|
return jsx("div", {
|
|
44
|
-
css: emptyStateOverrideStyles
|
|
52
|
+
css: [tableBordersStyles, emptyStateOverrideStyles]
|
|
45
53
|
}, jsx(EmptyState, {
|
|
46
54
|
testId: "assets-aql-datasource-modal--loading-state"
|
|
47
55
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
6
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
@@ -16,6 +16,9 @@ import { NoResults } from '../common/error-state/no-results';
|
|
|
16
16
|
import { IssueLikeDataTableView } from '../issue-like-table';
|
|
17
17
|
import EmptyState from '../issue-like-table/empty-state';
|
|
18
18
|
import { TableFooter } from '../table-footer';
|
|
19
|
+
const containerStyles = css({
|
|
20
|
+
borderRadius: 'inherit'
|
|
21
|
+
});
|
|
19
22
|
const DatasourceTableViewWithoutAnalytics = ({
|
|
20
23
|
datasourceId,
|
|
21
24
|
parameters,
|
|
@@ -123,6 +126,7 @@ const DatasourceTableViewWithoutAnalytics = ({
|
|
|
123
126
|
return (
|
|
124
127
|
// datasource-table classname is to exclude all children from being commentable - exclude list is in CFE
|
|
125
128
|
jsx("div", {
|
|
129
|
+
css: containerStyles,
|
|
126
130
|
className: "datasource-table"
|
|
127
131
|
}, hasColumns ? jsx(IssueLikeDataTableView, {
|
|
128
132
|
testId: 'datasource-table-view',
|
|
@@ -256,6 +256,7 @@ export const DraggableTableHeading = ({
|
|
|
256
256
|
}, [id, index, onWidthChange, state, tableId, width]);
|
|
257
257
|
return jsx(TableHeading, {
|
|
258
258
|
ref: mainHeaderCellRef,
|
|
259
|
+
className: "has-column-picker",
|
|
259
260
|
"data-testid": `${id}-column-heading`,
|
|
260
261
|
style: {
|
|
261
262
|
cursor: 'grab',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { Skeleton } from '@atlaskit/linking-common';
|
|
4
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
4
5
|
import { ScrollableContainerHeight, TableHeading } from '../styled';
|
|
5
6
|
const SkeletonComponent = ({
|
|
6
7
|
width,
|
|
@@ -11,14 +12,19 @@ const SkeletonComponent = ({
|
|
|
11
12
|
height: 14,
|
|
12
13
|
width: width
|
|
13
14
|
});
|
|
14
|
-
const tableSidePadding = "var(--ds-space-200, 16px)";
|
|
15
15
|
const tableBodyStyles = css({
|
|
16
16
|
borderBottom: 0
|
|
17
17
|
});
|
|
18
18
|
const cellStyles = css({
|
|
19
19
|
paddingBlock: "var(--ds-space-100, 12px)",
|
|
20
|
+
borderRight: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
21
|
+
borderBottom: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
22
|
+
'&:first-child': {
|
|
23
|
+
paddingLeft: `${"var(--ds-space-100, 4px)"}`
|
|
24
|
+
},
|
|
20
25
|
'&:last-child': {
|
|
21
|
-
|
|
26
|
+
borderRight: 0,
|
|
27
|
+
paddingRight: `${"var(--ds-space-100, 4px)"}`
|
|
22
28
|
}
|
|
23
29
|
});
|
|
24
30
|
const baseColumns = [{
|
|
@@ -92,10 +98,9 @@ export default (({
|
|
|
92
98
|
return jsx("div", {
|
|
93
99
|
style: {
|
|
94
100
|
// the IssueLikeDataTableView wraps the table in a container with the styling below while modal doesn't
|
|
95
|
-
// the isCompact prop is applied to non-modal empty states which require additional padding
|
|
96
101
|
// this maxHeight comes from scrollableContainerHeight
|
|
97
102
|
maxHeight: ScrollableContainerHeight,
|
|
98
|
-
padding:
|
|
103
|
+
padding: 0,
|
|
99
104
|
boxSizing: 'border-box'
|
|
100
105
|
}
|
|
101
106
|
}, jsx("table", {
|
|
@@ -34,7 +34,10 @@ const ColumnPickerHeader = styled.th`
|
|
|
34
34
|
position: sticky;
|
|
35
35
|
right: calc(-1 * ${tableSidePadding});
|
|
36
36
|
background-color: ${"var(--ds-surface, #FFF)"};
|
|
37
|
-
border-bottom: 2px solid ${`var(--ds-
|
|
37
|
+
border-bottom: 2px solid ${`var(--ds-border, ${N40})`}; /* It is required to have solid (not half-transparent) color because of this gradient business below */
|
|
38
|
+
|
|
39
|
+
padding-right: ${"var(--ds-space-100, 4px)"};
|
|
40
|
+
|
|
38
41
|
background: linear-gradient(
|
|
39
42
|
90deg,
|
|
40
43
|
rgba(255, 255, 255, 0) 0%,
|
|
@@ -49,13 +52,23 @@ const ColumnPickerHeader = styled.th`
|
|
|
49
52
|
const truncatedCellStyles = css({
|
|
50
53
|
overflow: 'hidden',
|
|
51
54
|
textOverflow: 'ellipsis',
|
|
52
|
-
whiteSpace: 'nowrap'
|
|
55
|
+
whiteSpace: 'nowrap',
|
|
56
|
+
borderRight: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
57
|
+
borderBottom: `0.5px solid ${`var(--ds-border, ${N40})`}`,
|
|
58
|
+
'&:first-child': {
|
|
59
|
+
paddingLeft: `${"var(--ds-space-100, 4px)"}`
|
|
60
|
+
},
|
|
61
|
+
'&:last-child': {
|
|
62
|
+
borderRight: 0,
|
|
63
|
+
paddingRight: `${"var(--ds-space-100, 4px)"}`
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const tableContainerStyles = css({
|
|
67
|
+
borderRadius: 'inherit'
|
|
53
68
|
});
|
|
54
69
|
const scrollableContainerStyles = css({
|
|
55
70
|
overflow: 'auto',
|
|
56
|
-
|
|
57
|
-
boxSizing: 'border-box',
|
|
58
|
-
borderRadius: "var(--ds-border-radius-100, 3px)"
|
|
71
|
+
boxSizing: 'border-box'
|
|
59
72
|
});
|
|
60
73
|
const tableStyles = css({
|
|
61
74
|
// These styles are needed to prevent thead bottom border from scrolling away.
|
|
@@ -332,7 +345,7 @@ export const IssueLikeDataTableView = ({
|
|
|
332
345
|
*/
|
|
333
346
|
contentEditable: false,
|
|
334
347
|
ref: containerRef,
|
|
335
|
-
css: scrollableContainerHeight
|
|
348
|
+
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles],
|
|
336
349
|
style: scrollableContainerHeight ? {
|
|
337
350
|
maxHeight: `${scrollableContainerHeight}px`
|
|
338
351
|
} : undefined
|
|
@@ -389,6 +402,7 @@ export const IssueLikeDataTableView = ({
|
|
|
389
402
|
} else {
|
|
390
403
|
return jsx(TableHeading, {
|
|
391
404
|
key: key,
|
|
405
|
+
className: !!onVisibleColumnKeysChange ? 'has-column-picker' : '',
|
|
392
406
|
"data-testid": `${key}-column-heading`,
|
|
393
407
|
style: shouldUseWidth ? {
|
|
394
408
|
width
|
|
@@ -8,10 +8,23 @@ export const Table = styled.table`
|
|
|
8
8
|
export const TableHeading = styled.th`
|
|
9
9
|
position: relative;
|
|
10
10
|
line-height: ${"var(--ds-font-lineHeight-300, 16px)"};
|
|
11
|
-
border-
|
|
11
|
+
border-right: 0.5px solid ${`var(--ds-border, ${N40})`};
|
|
12
|
+
border-bottom: 2px solid ${`var(--ds-border, ${N40})`};
|
|
12
13
|
height: calc(52px - ${"var(--ds-space-050, 4px)"} * 2 - 2px);
|
|
13
14
|
vertical-align: bottom;
|
|
14
15
|
|
|
16
|
+
&.has-column-picker:nth-last-of-type(2) {
|
|
17
|
+
border-right: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:first-child {
|
|
21
|
+
padding-left: ${"var(--ds-space-100, 4px)"};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:last-child {
|
|
25
|
+
border-right: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
& [data-testid='datasource-header-content--container'] {
|
|
16
29
|
width: 100%;
|
|
17
30
|
padding: ${"var(--ds-space-100, 4px)"} ${"var(--ds-space-050, 2px)"};
|
|
@@ -119,6 +119,12 @@ const AsyncPopupSelect = ({
|
|
|
119
119
|
selectionCount: selectedOptions.length
|
|
120
120
|
});
|
|
121
121
|
}, [fetchFilterOptions, filterType, fireEvent, searchTerm, selectedOptions.length, sortOptionsOnPopupOpen, status]);
|
|
122
|
+
const handleMenuClose = useCallback(() => {
|
|
123
|
+
fireEvent('ui.dropdown.closed.basicSearchDropdown', {
|
|
124
|
+
filterType,
|
|
125
|
+
selectionCount: selectedOptions.length
|
|
126
|
+
});
|
|
127
|
+
}, [filterType, fireEvent, selectedOptions.length]);
|
|
122
128
|
useEffect(() => {
|
|
123
129
|
if (status === 'resolved') {
|
|
124
130
|
sortOptionsOnResolve();
|
|
@@ -194,6 +200,7 @@ const AsyncPopupSelect = ({
|
|
|
194
200
|
onChange: handleOptionSelection,
|
|
195
201
|
onInputChange: handleInputChange,
|
|
196
202
|
onOpen: handleMenuOpen,
|
|
203
|
+
onClose: handleMenuClose,
|
|
197
204
|
target: ({
|
|
198
205
|
isOpen,
|
|
199
206
|
...triggerProps
|
|
@@ -35,6 +35,11 @@ const dropdownContainerStyles = css({
|
|
|
35
35
|
minHeight: '40px' // to prevent vertical shifting when site selector pops in
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
+
const tableContainerStyles = css({
|
|
39
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
40
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
41
|
+
border: `1px solid ${`var(--ds-border, ${N40})`}`
|
|
42
|
+
});
|
|
38
43
|
const contentContainerStyles = css({
|
|
39
44
|
display: 'grid',
|
|
40
45
|
maxHeight: '420px',
|
|
@@ -377,7 +382,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
377
382
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
378
383
|
}, [visibleColumnKeys]);
|
|
379
384
|
const issueLikeDataTableView = useMemo(() => jsx("div", {
|
|
380
|
-
css: contentContainerStyles
|
|
385
|
+
css: [tableContainerStyles, contentContainerStyles]
|
|
381
386
|
}, jsx(IssueLikeDataTableView, {
|
|
382
387
|
testId: "jira-jql-datasource-table",
|
|
383
388
|
status: status,
|
|
@@ -430,7 +435,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
430
435
|
} else if (status === 'empty' || !columns.length) {
|
|
431
436
|
// persist the empty state when making the initial /data request which contains the columns
|
|
432
437
|
return jsx("div", {
|
|
433
|
-
css: contentContainerStyles
|
|
438
|
+
css: [contentContainerStyles, !!jql && tableContainerStyles]
|
|
434
439
|
}, !!jql ? jsx(EmptyState, {
|
|
435
440
|
testId: `jira-jql-datasource-modal--empty-state`
|
|
436
441
|
}) : jsx(InitialStateView, {
|
|
@@ -14,6 +14,7 @@ import { SyncInfo } from './sync-info';
|
|
|
14
14
|
const FooterWrapper = styled.div`
|
|
15
15
|
padding: 0 ${"var(--ds-space-200, 16px)"};
|
|
16
16
|
box-sizing: border-box;
|
|
17
|
+
border-radius: inherit;
|
|
17
18
|
background: ${`var(--ds-background-input, ${N0})`};
|
|
18
19
|
`;
|
|
19
20
|
const TopBorderWrapper = styled.div`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
4
5
|
import { AccessRequired } from '../../../common/error-state/access-required';
|
|
5
6
|
import { ModalLoadingError } from '../../../common/error-state/modal-loading-error';
|
|
6
7
|
import { NoResults } from '../../../common/error-state/no-results';
|
|
@@ -11,6 +12,11 @@ var emptyStateOverrideStyles = css({
|
|
|
11
12
|
height: '420px',
|
|
12
13
|
overflow: 'hidden'
|
|
13
14
|
});
|
|
15
|
+
var tableBordersStyles = css({
|
|
16
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
17
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
18
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)"
|
|
19
|
+
});
|
|
14
20
|
export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
15
21
|
var status = props.status,
|
|
16
22
|
responseItems = props.responseItems,
|
|
@@ -25,7 +31,9 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
|
25
31
|
isFetchingInitialData = props.isFetchingInitialData;
|
|
26
32
|
var resolvedWithNoResults = status === 'resolved' && !responseItems.length;
|
|
27
33
|
var issueLikeDataTableView = useMemo(function () {
|
|
28
|
-
return jsx(
|
|
34
|
+
return jsx("div", {
|
|
35
|
+
css: tableBordersStyles
|
|
36
|
+
}, jsx(IssueLikeDataTableView, {
|
|
29
37
|
testId: "asset-datasource-table",
|
|
30
38
|
status: status,
|
|
31
39
|
columns: columns,
|
|
@@ -36,12 +44,12 @@ export var RenderAssetsContent = function RenderAssetsContent(props) {
|
|
|
36
44
|
onLoadDatasourceDetails: loadDatasourceDetails,
|
|
37
45
|
onVisibleColumnKeysChange: onVisibleColumnKeysChange,
|
|
38
46
|
parentContainerRenderInstanceId: modalRenderInstanceId
|
|
39
|
-
});
|
|
47
|
+
}));
|
|
40
48
|
}, [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, onVisibleColumnKeysChange, responseItems, status, visibleColumnKeys, modalRenderInstanceId]);
|
|
41
49
|
if (isFetchingInitialData) {
|
|
42
50
|
// Placing this check first as it's a priority before all others
|
|
43
51
|
return jsx("div", {
|
|
44
|
-
css: emptyStateOverrideStyles
|
|
52
|
+
css: [tableBordersStyles, emptyStateOverrideStyles]
|
|
45
53
|
}, jsx(EmptyState, {
|
|
46
54
|
testId: "assets-aql-datasource-modal--loading-state"
|
|
47
55
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
6
6
|
import { useDatasourceAnalyticsEvents } from '../../analytics';
|
|
@@ -16,6 +16,9 @@ import { NoResults } from '../common/error-state/no-results';
|
|
|
16
16
|
import { IssueLikeDataTableView } from '../issue-like-table';
|
|
17
17
|
import EmptyState from '../issue-like-table/empty-state';
|
|
18
18
|
import { TableFooter } from '../table-footer';
|
|
19
|
+
var containerStyles = css({
|
|
20
|
+
borderRadius: 'inherit'
|
|
21
|
+
});
|
|
19
22
|
var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAnalytics(_ref) {
|
|
20
23
|
var datasourceId = _ref.datasourceId,
|
|
21
24
|
parameters = _ref.parameters,
|
|
@@ -120,6 +123,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
120
123
|
return (
|
|
121
124
|
// datasource-table classname is to exclude all children from being commentable - exclude list is in CFE
|
|
122
125
|
jsx("div", {
|
|
126
|
+
css: containerStyles,
|
|
123
127
|
className: "datasource-table"
|
|
124
128
|
}, hasColumns ? jsx(IssueLikeDataTableView, {
|
|
125
129
|
testId: 'datasource-table-view',
|
|
@@ -262,6 +262,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref) {
|
|
|
262
262
|
}, [id, index, onWidthChange, state, tableId, width]);
|
|
263
263
|
return jsx(TableHeading, {
|
|
264
264
|
ref: mainHeaderCellRef,
|
|
265
|
+
className: "has-column-picker",
|
|
265
266
|
"data-testid": "".concat(id, "-column-heading"),
|
|
266
267
|
style: _objectSpread({
|
|
267
268
|
cursor: 'grab'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { Skeleton } from '@atlaskit/linking-common';
|
|
4
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
4
5
|
import { ScrollableContainerHeight, TableHeading } from '../styled';
|
|
5
6
|
var SkeletonComponent = function SkeletonComponent(_ref) {
|
|
6
7
|
var width = _ref.width,
|
|
@@ -12,14 +13,19 @@ var SkeletonComponent = function SkeletonComponent(_ref) {
|
|
|
12
13
|
width: width
|
|
13
14
|
});
|
|
14
15
|
};
|
|
15
|
-
var tableSidePadding = "var(--ds-space-200, 16px)";
|
|
16
16
|
var tableBodyStyles = css({
|
|
17
17
|
borderBottom: 0
|
|
18
18
|
});
|
|
19
19
|
var cellStyles = css({
|
|
20
20
|
paddingBlock: "var(--ds-space-100, 12px)",
|
|
21
|
+
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
22
|
+
borderBottom: "0.5px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
23
|
+
'&:first-child': {
|
|
24
|
+
paddingLeft: "var(--ds-space-100, 4px)"
|
|
25
|
+
},
|
|
21
26
|
'&:last-child': {
|
|
22
|
-
|
|
27
|
+
borderRight: 0,
|
|
28
|
+
paddingRight: "var(--ds-space-100, 4px)"
|
|
23
29
|
}
|
|
24
30
|
});
|
|
25
31
|
var baseColumns = [{
|
|
@@ -92,10 +98,9 @@ export default (function (_ref4) {
|
|
|
92
98
|
return jsx("div", {
|
|
93
99
|
style: {
|
|
94
100
|
// the IssueLikeDataTableView wraps the table in a container with the styling below while modal doesn't
|
|
95
|
-
// the isCompact prop is applied to non-modal empty states which require additional padding
|
|
96
101
|
// this maxHeight comes from scrollableContainerHeight
|
|
97
102
|
maxHeight: ScrollableContainerHeight,
|
|
98
|
-
padding:
|
|
103
|
+
padding: 0,
|
|
99
104
|
boxSizing: 'border-box'
|
|
100
105
|
}
|
|
101
106
|
}, jsx("table", {
|
|
@@ -37,17 +37,27 @@ var tableHeadStyles = css({
|
|
|
37
37
|
top: 0,
|
|
38
38
|
zIndex: stickyTableHeadersIndex
|
|
39
39
|
});
|
|
40
|
-
var ColumnPickerHeader = styled.th(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 56px;\n z-index: 10;\n position: sticky;\n right: calc(-1 * ", ");\n background-color: ", ";\n border-bottom: 2px solid ", "; /* It is required to have solid (not half-transparent) color because of this gradient business
|
|
40
|
+
var ColumnPickerHeader = styled.th(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 56px;\n z-index: 10;\n position: sticky;\n right: calc(-1 * ", ");\n background-color: ", ";\n border-bottom: 2px solid ", "; /* It is required to have solid (not half-transparent) color because of this gradient business below */\n\n padding-right: ", ";\n\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 0%,\n ", " 10%\n );\n vertical-align: middle; /* Keeps dropdown button in the middle */\n &:last-of-type {\n padding-right: ", ";\n }\n text-align: right; /* In case when TH itself is bigger we want to keep picker at the right side */\n"])), tableSidePadding, "var(--ds-surface, #FFF)", "var(--ds-border, ".concat(N40, ")"), "var(--ds-space-100, 4px)", "var(--ds-surface, #FFF)", tableSidePadding);
|
|
41
41
|
var truncatedCellStyles = css({
|
|
42
42
|
overflow: 'hidden',
|
|
43
43
|
textOverflow: 'ellipsis',
|
|
44
|
-
whiteSpace: 'nowrap'
|
|
44
|
+
whiteSpace: 'nowrap',
|
|
45
|
+
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
46
|
+
borderBottom: "0.5px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
47
|
+
'&:first-child': {
|
|
48
|
+
paddingLeft: "var(--ds-space-100, 4px)"
|
|
49
|
+
},
|
|
50
|
+
'&:last-child': {
|
|
51
|
+
borderRight: 0,
|
|
52
|
+
paddingRight: "var(--ds-space-100, 4px)"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
var tableContainerStyles = css({
|
|
56
|
+
borderRadius: 'inherit'
|
|
45
57
|
});
|
|
46
58
|
var scrollableContainerStyles = css({
|
|
47
59
|
overflow: 'auto',
|
|
48
|
-
|
|
49
|
-
boxSizing: 'border-box',
|
|
50
|
-
borderRadius: "var(--ds-border-radius-100, 3px)"
|
|
60
|
+
boxSizing: 'border-box'
|
|
51
61
|
});
|
|
52
62
|
var tableStyles = css({
|
|
53
63
|
// These styles are needed to prevent thead bottom border from scrolling away.
|
|
@@ -372,7 +382,7 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref) {
|
|
|
372
382
|
*/
|
|
373
383
|
contentEditable: false,
|
|
374
384
|
ref: containerRef,
|
|
375
|
-
css: scrollableContainerHeight
|
|
385
|
+
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles],
|
|
376
386
|
style: scrollableContainerHeight ? {
|
|
377
387
|
maxHeight: "".concat(scrollableContainerHeight, "px")
|
|
378
388
|
} : undefined
|
|
@@ -428,6 +438,7 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref) {
|
|
|
428
438
|
} else {
|
|
429
439
|
return jsx(TableHeading, {
|
|
430
440
|
key: key,
|
|
441
|
+
className: !!onVisibleColumnKeysChange ? 'has-column-picker' : '',
|
|
431
442
|
"data-testid": "".concat(key, "-column-heading"),
|
|
432
443
|
style: shouldUseWidth ? {
|
|
433
444
|
width: width
|
|
@@ -5,4 +5,4 @@ import { N40 } from '@atlaskit/theme/colors';
|
|
|
5
5
|
export var ScrollableContainerHeight = 590;
|
|
6
6
|
export var FieldTextFontSize = '14px';
|
|
7
7
|
export var Table = styled.table(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n"])));
|
|
8
|
-
export var TableHeading = styled.th(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n line-height: ", ";\n border-bottom: 2px solid ", ";\n height: calc(52px - ", " * 2 - 2px);\n vertical-align: bottom;\n\n & [data-testid='datasource-header-content--container'] {\n width: 100%;\n padding: ", " ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n white-space: normal;\n overflow: hidden;\n max-height: 2.5rem;\n word-wrap: break-word;\n\n &:hover {\n background: ", ";\n border-radius: 3px;\n }\n }\n"])), "var(--ds-font-lineHeight-300, 16px)", "var(--ds-
|
|
8
|
+
export var TableHeading = styled.th(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n line-height: ", ";\n border-right: 0.5px solid ", ";\n border-bottom: 2px solid ", ";\n height: calc(52px - ", " * 2 - 2px);\n vertical-align: bottom;\n\n &.has-column-picker:nth-last-of-type(2) {\n border-right: 0;\n }\n\n &:first-child {\n padding-left: ", ";\n }\n\n &:last-child {\n border-right: 0;\n }\n\n & [data-testid='datasource-header-content--container'] {\n width: 100%;\n padding: ", " ", ";\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n white-space: normal;\n overflow: hidden;\n max-height: 2.5rem;\n word-wrap: break-word;\n\n &:hover {\n background: ", ";\n border-radius: 3px;\n }\n }\n"])), "var(--ds-font-lineHeight-300, 16px)", "var(--ds-border, ".concat(N40, ")"), "var(--ds-border, ".concat(N40, ")"), "var(--ds-space-050, 4px)", "var(--ds-space-100, 4px)", "var(--ds-space-100, 4px)", "var(--ds-space-050, 2px)", "var(--ds-background-input-hovered, #F7F8F9)");
|
|
@@ -158,6 +158,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
158
158
|
selectionCount: selectedOptions.length
|
|
159
159
|
});
|
|
160
160
|
}, [fetchFilterOptions, filterType, fireEvent, searchTerm, selectedOptions.length, sortOptionsOnPopupOpen, status]);
|
|
161
|
+
var handleMenuClose = useCallback(function () {
|
|
162
|
+
fireEvent('ui.dropdown.closed.basicSearchDropdown', {
|
|
163
|
+
filterType: filterType,
|
|
164
|
+
selectionCount: selectedOptions.length
|
|
165
|
+
});
|
|
166
|
+
}, [filterType, fireEvent, selectedOptions.length]);
|
|
161
167
|
useEffect(function () {
|
|
162
168
|
if (status === 'resolved') {
|
|
163
169
|
sortOptionsOnResolve();
|
|
@@ -233,6 +239,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
233
239
|
onChange: handleOptionSelection,
|
|
234
240
|
onInputChange: handleInputChange,
|
|
235
241
|
onOpen: handleMenuOpen,
|
|
242
|
+
onClose: handleMenuClose,
|
|
236
243
|
target: function target(_ref3) {
|
|
237
244
|
var isOpen = _ref3.isOpen,
|
|
238
245
|
triggerProps = _objectWithoutProperties(_ref3, _excluded);
|
|
@@ -42,6 +42,11 @@ var dropdownContainerStyles = css({
|
|
|
42
42
|
minHeight: '40px' // to prevent vertical shifting when site selector pops in
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
+
var tableContainerStyles = css({
|
|
46
|
+
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
47
|
+
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
48
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
|
|
49
|
+
});
|
|
45
50
|
var contentContainerStyles = css({
|
|
46
51
|
display: 'grid',
|
|
47
52
|
maxHeight: '420px',
|
|
@@ -423,7 +428,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
423
428
|
}, [visibleColumnKeys]);
|
|
424
429
|
var issueLikeDataTableView = useMemo(function () {
|
|
425
430
|
return jsx("div", {
|
|
426
|
-
css: contentContainerStyles
|
|
431
|
+
css: [tableContainerStyles, contentContainerStyles]
|
|
427
432
|
}, jsx(IssueLikeDataTableView, {
|
|
428
433
|
testId: "jira-jql-datasource-table",
|
|
429
434
|
status: status,
|
|
@@ -477,7 +482,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
477
482
|
} else if (status === 'empty' || !columns.length) {
|
|
478
483
|
// persist the empty state when making the initial /data request which contains the columns
|
|
479
484
|
return jsx("div", {
|
|
480
|
-
css: contentContainerStyles
|
|
485
|
+
css: [contentContainerStyles, !!jql && tableContainerStyles]
|
|
481
486
|
}, !!jql ? jsx(EmptyState, {
|
|
482
487
|
testId: "jira-jql-datasource-modal--empty-state"
|
|
483
488
|
}) : jsx(InitialStateView, {
|
|
@@ -14,7 +14,7 @@ import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
|
14
14
|
import { N0, N40, N800, N90 } from '@atlaskit/theme/colors';
|
|
15
15
|
import { footerMessages } from './messages';
|
|
16
16
|
import { SyncInfo } from './sync-info';
|
|
17
|
-
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 FooterWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 ", ";\n box-sizing: border-box;\n border-radius: inherit;\n background: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-background-input, ".concat(N0, ")"));
|
|
18
18
|
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, ")"));
|
|
19
19
|
var ItemCounterWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-self: center;\n"])));
|
|
20
20
|
var SyncWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: ", ";\n"])), "var(--ds-text-accent-gray, ".concat(N90, ")"));
|
|
@@ -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::7b6bf74dbad7e14356c81bb8d6285cbe>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -93,6 +93,10 @@ export type DropdownOpenedBasicSearchDropdownAttributesType = {
|
|
|
93
93
|
filterType: 'project' | 'assignee' | 'issuetype' | 'status';
|
|
94
94
|
selectionCount: number;
|
|
95
95
|
};
|
|
96
|
+
export type DropdownClosedBasicSearchDropdownAttributesType = {
|
|
97
|
+
filterType: 'project' | 'assignee' | 'issuetype' | 'status';
|
|
98
|
+
selectionCount: number;
|
|
99
|
+
};
|
|
96
100
|
export type AqlEditorSearchedAttributesType = {};
|
|
97
101
|
export type GetWorkspaceIdSuccessAttributesType = {};
|
|
98
102
|
export type GetWorkspaceIdFailedAttributesType = {
|
|
@@ -168,6 +172,9 @@ export type AnalyticsEventAttributes = {
|
|
|
168
172
|
/**
|
|
169
173
|
* Fired when the basic filter dropdown is opened */
|
|
170
174
|
'ui.dropdown.opened.basicSearchDropdown': DropdownOpenedBasicSearchDropdownAttributesType;
|
|
175
|
+
/**
|
|
176
|
+
* Fired when the basic filter dropdown is closed */
|
|
177
|
+
'ui.dropdown.closed.basicSearchDropdown': DropdownClosedBasicSearchDropdownAttributesType;
|
|
171
178
|
/**
|
|
172
179
|
* Fired when search is initiated via the search icon or enter key press for aql editor input field. */
|
|
173
180
|
'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
|
|
@@ -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::7b6bf74dbad7e14356c81bb8d6285cbe>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -93,6 +93,10 @@ export type DropdownOpenedBasicSearchDropdownAttributesType = {
|
|
|
93
93
|
filterType: 'project' | 'assignee' | 'issuetype' | 'status';
|
|
94
94
|
selectionCount: number;
|
|
95
95
|
};
|
|
96
|
+
export type DropdownClosedBasicSearchDropdownAttributesType = {
|
|
97
|
+
filterType: 'project' | 'assignee' | 'issuetype' | 'status';
|
|
98
|
+
selectionCount: number;
|
|
99
|
+
};
|
|
96
100
|
export type AqlEditorSearchedAttributesType = {};
|
|
97
101
|
export type GetWorkspaceIdSuccessAttributesType = {};
|
|
98
102
|
export type GetWorkspaceIdFailedAttributesType = {
|
|
@@ -168,6 +172,9 @@ export type AnalyticsEventAttributes = {
|
|
|
168
172
|
/**
|
|
169
173
|
* Fired when the basic filter dropdown is opened */
|
|
170
174
|
'ui.dropdown.opened.basicSearchDropdown': DropdownOpenedBasicSearchDropdownAttributesType;
|
|
175
|
+
/**
|
|
176
|
+
* Fired when the basic filter dropdown is closed */
|
|
177
|
+
'ui.dropdown.closed.basicSearchDropdown': DropdownClosedBasicSearchDropdownAttributesType;
|
|
171
178
|
/**
|
|
172
179
|
* Fired when search is initiated via the search icon or enter key press for aql editor input field. */
|
|
173
180
|
'ui.aqlEditor.searched': AqlEditorSearchedAttributesType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.9",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.12.0",
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.0",
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.17.0",
|
|
58
|
-
"@atlaskit/primitives": "^1.
|
|
58
|
+
"@atlaskit/primitives": "^1.11.0",
|
|
59
59
|
"@atlaskit/select": "^17.0.0",
|
|
60
60
|
"@atlaskit/smart-card": "^26.42.0",
|
|
61
61
|
"@atlaskit/spinner": "^16.0.0",
|