@atlaskit/link-datasource 1.17.6 → 1.17.8

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/analytics/constants.js +1 -1
  3. package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +11 -3
  4. package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +4 -0
  5. package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +1 -0
  6. package/dist/cjs/ui/issue-like-table/empty-state/index.js +9 -4
  7. package/dist/cjs/ui/issue-like-table/index.js +17 -6
  8. package/dist/cjs/ui/issue-like-table/styled.js +1 -1
  9. package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -5
  10. package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +1 -1
  11. package/dist/cjs/ui/jira-issues-modal/modal/index.js +7 -2
  12. package/dist/cjs/ui/table-footer/index.js +1 -1
  13. package/dist/es2019/analytics/constants.js +1 -1
  14. package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +11 -3
  15. package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +5 -1
  16. package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +1 -0
  17. package/dist/es2019/ui/issue-like-table/empty-state/index.js +9 -4
  18. package/dist/es2019/ui/issue-like-table/index.js +20 -6
  19. package/dist/es2019/ui/issue-like-table/styled.js +14 -1
  20. package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -5
  21. package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +1 -1
  22. package/dist/es2019/ui/jira-issues-modal/modal/index.js +7 -2
  23. package/dist/es2019/ui/table-footer/index.js +1 -0
  24. package/dist/esm/analytics/constants.js +1 -1
  25. package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +11 -3
  26. package/dist/esm/ui/datasource-table-view/datasourceTableView.js +5 -1
  27. package/dist/esm/ui/issue-like-table/draggable-table-heading.js +1 -0
  28. package/dist/esm/ui/issue-like-table/empty-state/index.js +9 -4
  29. package/dist/esm/ui/issue-like-table/index.js +17 -6
  30. package/dist/esm/ui/issue-like-table/styled.js +1 -1
  31. package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +2 -5
  32. package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +1 -1
  33. package/dist/esm/ui/jira-issues-modal/modal/index.js +7 -2
  34. package/dist/esm/ui/table-footer/index.js +1 -1
  35. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.17.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
9
+ ## 1.17.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [#43413](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43413) [`73c1cebfd62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73c1cebfd62) - Move all logic to onOpen when opening the filter dropdown.
14
+ - Updated dependencies
15
+
3
16
  ## 1.17.6
4
17
 
5
18
  ### Patch Changes
@@ -7,5 +7,5 @@ exports.packageMetaData = exports.EVENT_CHANNEL = void 0;
7
7
  var EVENT_CHANNEL = exports.EVENT_CHANNEL = 'media';
8
8
  var packageMetaData = exports.packageMetaData = {
9
9
  packageName: "@atlaskit/link-datasource",
10
- packageVersion: "1.17.6"
10
+ packageVersion: "1.17.8"
11
11
  };
@@ -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)(_issueLikeTable.IssueLikeDataTableView, {
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
- paddingRight: "var(--ds-space-100, 8px)"
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: isCompact ? "0 ".concat(tableSidePadding, " 0 ").concat(tableSidePadding) : '0',
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 bellow */\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-background-accent-gray-subtler, ".concat(_colors.N40, ")"), "var(--ds-surface, #FFF)", tableSidePadding);
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
- padding: "0 ".concat(tableSidePadding, " 0 ").concat(tableSidePadding),
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 ? scrollableContainerStyles : null,
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-background-accent-gray-subtler, ".concat(_colors.N40, ")"), "var(--ds-space-050, 4px)", "var(--ds-space-100, 4px)", "var(--ds-space-050, 2px)", "var(--ds-background-input-hovered, #F7F8F9)");
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)");
@@ -154,7 +154,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
154
154
  });
155
155
  }
156
156
  }, [fetchFilterOptions, pageCursor, searchTerm]);
157
- var handleOpenPopup = (0, _react.useCallback)(function () {
157
+ var handleMenuOpen = (0, _react.useCallback)(function () {
158
158
  if (status === 'empty' || status === 'rejected') {
159
159
  // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
160
160
  fetchFilterOptions({
@@ -163,13 +163,11 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
163
163
  } else if (status === 'resolved') {
164
164
  sortOptionsOnPopupOpen();
165
165
  }
166
- }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
167
- var handleMenuOpen = (0, _react.useCallback)(function () {
168
166
  fireEvent('ui.dropdown.opened.basicSearchDropdown', {
169
167
  filterType: filterType,
170
168
  selectionCount: selectedOptions.length
171
169
  });
172
- }, [filterType, fireEvent, selectedOptions.length]);
170
+ }, [fetchFilterOptions, filterType, fireEvent, searchTerm, selectedOptions.length, sortOptionsOnPopupOpen, status]);
173
171
  (0, _react.useEffect)(function () {
174
172
  if (status === 'resolved') {
175
173
  sortOptionsOnResolve();
@@ -252,7 +250,6 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
252
250
  filterType: filterType,
253
251
  selectedOptions: selectedOptions,
254
252
  isSelected: isOpen,
255
- onClick: handleOpenPopup,
256
253
  isDisabled: isDisabled
257
254
  }));
258
255
  },
@@ -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: '60px'
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,5 +1,5 @@
1
1
  export const EVENT_CHANNEL = 'media';
2
2
  export const packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.17.6"
4
+ packageVersion: "1.17.8"
5
5
  };
@@ -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(IssueLikeDataTableView, {
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
- paddingRight: "var(--ds-space-100, 8px)"
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: isCompact ? `0 ${tableSidePadding} 0 ${tableSidePadding}` : '0',
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-background-accent-gray-subtler, ${N40})`}; /* It is required to have solid (not half-transparent) color because of this gradient business bellow */
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
- padding: `0 ${tableSidePadding} 0 ${tableSidePadding}`,
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 ? scrollableContainerStyles : null,
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-bottom: 2px solid ${`var(--ds-background-accent-gray-subtler, ${N40})`};
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)"};
@@ -105,7 +105,7 @@ const AsyncPopupSelect = ({
105
105
  });
106
106
  }
107
107
  }, [fetchFilterOptions, pageCursor, searchTerm]);
108
- const handleOpenPopup = useCallback(() => {
108
+ const handleMenuOpen = useCallback(() => {
109
109
  if (status === 'empty' || status === 'rejected') {
110
110
  // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
111
111
  fetchFilterOptions({
@@ -114,13 +114,11 @@ const AsyncPopupSelect = ({
114
114
  } else if (status === 'resolved') {
115
115
  sortOptionsOnPopupOpen();
116
116
  }
117
- }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
118
- const handleMenuOpen = useCallback(() => {
119
117
  fireEvent('ui.dropdown.opened.basicSearchDropdown', {
120
118
  filterType,
121
119
  selectionCount: selectedOptions.length
122
120
  });
123
- }, [filterType, fireEvent, selectedOptions.length]);
121
+ }, [fetchFilterOptions, filterType, fireEvent, searchTerm, selectedOptions.length, sortOptionsOnPopupOpen, status]);
124
122
  useEffect(() => {
125
123
  if (status === 'resolved') {
126
124
  sortOptionsOnResolve();
@@ -203,7 +201,6 @@ const AsyncPopupSelect = ({
203
201
  filterType: filterType,
204
202
  selectedOptions: selectedOptions,
205
203
  isSelected: isOpen,
206
- onClick: handleOpenPopup,
207
204
  isDisabled: isDisabled
208
205
  })),
209
206
  footer: shouldShowFooter && /*#__PURE__*/React.createElement(PopupFooter, {
@@ -15,7 +15,7 @@ import { modeSwitcherMessages } from './messages';
15
15
  const inputContainerStyles = css({
16
16
  alignItems: 'baseline',
17
17
  display: 'flex',
18
- minHeight: '60px'
18
+ minHeight: '72px'
19
19
  });
20
20
  const basicSearchInputContainerStyles = xcss({
21
21
  flexGrow: 1
@@ -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,5 +1,5 @@
1
1
  export var EVENT_CHANNEL = 'media';
2
2
  export var packageMetaData = {
3
3
  packageName: "@atlaskit/link-datasource",
4
- packageVersion: "1.17.6"
4
+ packageVersion: "1.17.8"
5
5
  };
@@ -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(IssueLikeDataTableView, {
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
- paddingRight: "var(--ds-space-100, 8px)"
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: isCompact ? "0 ".concat(tableSidePadding, " 0 ").concat(tableSidePadding) : '0',
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 bellow */\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-background-accent-gray-subtler, ".concat(N40, ")"), "var(--ds-surface, #FFF)", tableSidePadding);
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
- padding: "0 ".concat(tableSidePadding, " 0 ").concat(tableSidePadding),
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 ? scrollableContainerStyles : null,
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-background-accent-gray-subtler, ".concat(N40, ")"), "var(--ds-space-050, 4px)", "var(--ds-space-100, 4px)", "var(--ds-space-050, 2px)", "var(--ds-background-input-hovered, #F7F8F9)");
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)");
@@ -144,7 +144,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
144
144
  });
145
145
  }
146
146
  }, [fetchFilterOptions, pageCursor, searchTerm]);
147
- var handleOpenPopup = useCallback(function () {
147
+ var handleMenuOpen = useCallback(function () {
148
148
  if (status === 'empty' || status === 'rejected') {
149
149
  // if user searches and gets status as rejected, we want the dropdown to try load the request with searchString when the user reopens the dropdown
150
150
  fetchFilterOptions({
@@ -153,13 +153,11 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
153
153
  } else if (status === 'resolved') {
154
154
  sortOptionsOnPopupOpen();
155
155
  }
156
- }, [fetchFilterOptions, searchTerm, sortOptionsOnPopupOpen, status]);
157
- var handleMenuOpen = useCallback(function () {
158
156
  fireEvent('ui.dropdown.opened.basicSearchDropdown', {
159
157
  filterType: filterType,
160
158
  selectionCount: selectedOptions.length
161
159
  });
162
- }, [filterType, fireEvent, selectedOptions.length]);
160
+ }, [fetchFilterOptions, filterType, fireEvent, searchTerm, selectedOptions.length, sortOptionsOnPopupOpen, status]);
163
161
  useEffect(function () {
164
162
  if (status === 'resolved') {
165
163
  sortOptionsOnResolve();
@@ -242,7 +240,6 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
242
240
  filterType: filterType,
243
241
  selectedOptions: selectedOptions,
244
242
  isSelected: isOpen,
245
- onClick: handleOpenPopup,
246
243
  isDisabled: isDisabled
247
244
  }));
248
245
  },
@@ -16,7 +16,7 @@ import { modeSwitcherMessages } from './messages';
16
16
  var inputContainerStyles = css({
17
17
  alignItems: 'baseline',
18
18
  display: 'flex',
19
- minHeight: '60px'
19
+ minHeight: '72px'
20
20
  });
21
21
  var basicSearchInputContainerStyles = xcss({
22
22
  flexGrow: 1
@@ -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, ")"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.17.6",
3
+ "version": "1.17.8",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/empty-state": "^7.5.0",
40
40
  "@atlaskit/form": "^9.0.0",
41
41
  "@atlaskit/heading": "^1.4.0",
42
- "@atlaskit/icon": "^21.12.0",
42
+ "@atlaskit/icon": "^22.0.0",
43
43
  "@atlaskit/icon-object": "^6.3.0",
44
44
  "@atlaskit/image": "^1.1.0",
45
45
  "@atlaskit/intl-messages-provider": "^1.0.0",