@atlaskit/link-datasource 1.19.16 → 1.19.17

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.19.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [#58033](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58033) [`e833dd7a4e2f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e833dd7a4e2f) - [ux] Updated datasource tables to always have a background.
8
+
3
9
  ## 1.19.16
4
10
 
5
11
  ### 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.19.16"
10
+ packageVersion: "1.19.17"
11
11
  };
@@ -30,7 +30,7 @@ var tableBordersStyles = (0, _react2.css)({
30
30
  borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
31
31
  borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
32
32
  borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(_colors.N40, ")")),
33
- background: _issueLikeTable.scrollableContainerShadowsCssComponents.background,
33
+ backgroundImage: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundImage,
34
34
  backgroundRepeat: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundRepeat,
35
35
  backgroundSize: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundSize,
36
36
  backgroundAttachment: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -23,6 +23,9 @@ var SkeletonComponent = function SkeletonComponent(_ref) {
23
23
  var tableBodyStyles = (0, _react.css)({
24
24
  borderBottom: 0
25
25
  });
26
+ var tableStyles = (0, _react.css)({
27
+ background: "var(--ds-elevation-surface-current, #FFF)"
28
+ });
26
29
  var padding = "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)");
27
30
  var cellStyles = (0, _react.css)({
28
31
  padding: padding,
@@ -112,6 +115,7 @@ var _default = exports.default = function _default(_ref4) {
112
115
  boxSizing: 'border-box'
113
116
  }
114
117
  }, (0, _react.jsx)("table", {
118
+ css: tableStyles,
115
119
  "data-testid": testId
116
120
  }, (0, _react.jsx)("thead", {
117
121
  style: {
@@ -78,65 +78,79 @@ var tableContainerStyles = (0, _react2.css)({
78
78
  var shadowColor = "var(--ds-shadow-overflow-perimeter, rgba(0, 0, 0, 0.1))";
79
79
  var shadowColorLight = "var(--ds-shadow-overflow-perimeter, rgba(0, 0, 0, 0.05))";
80
80
  var leftWhiteOverrideGradient = {
81
- background: "\n linear-gradient(\n 90deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n ) left center"),
81
+ backgroundImage: "\n linear-gradient(\n 90deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n )"),
82
+ backgroundPosition: 'left center',
82
83
  size: "40px 100%",
83
84
  attachment: "local"
84
85
  };
85
86
  var topWhiteOverrideGradient = {
86
- background: "\n linear-gradient(\n 0deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%\n ) top center"),
87
+ backgroundImage: "\n linear-gradient(\n 0deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%\n )"),
88
+ backgroundPosition: 'top center',
87
89
  size: "100% 100px",
88
90
  attachment: "local"
89
91
  };
90
92
  var rightWhiteOverrideGradient = {
91
- background: "\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 70%\n ) right center"),
93
+ backgroundImage: "\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 70%\n )"),
94
+ backgroundPosition: 'right center',
92
95
  size: "40px 100%",
93
96
  attachment: "local"
94
97
  };
95
98
  var bottomWhiteOverride = {
96
- background: "\n linear-gradient(\n 0deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n ) bottom center"),
99
+ backgroundImage: "\n linear-gradient(\n 0deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n )"),
100
+ backgroundPosition: 'bottom center',
97
101
  size: "100% 40px",
98
102
  attachment: "local"
99
103
  };
100
104
  var leftShadowGradient = {
101
- background: "\n linear-gradient(\n 90deg,\n ".concat(shadowColor, ",\n rgba(0, 0, 0, 0)\n ) left center"),
105
+ backgroundImage: "\n linear-gradient(\n 90deg,\n ".concat(shadowColor, ",\n rgba(0, 0, 0, 0)\n )"),
106
+ backgroundPosition: 'left center',
102
107
  size: "14px 100%",
103
108
  attachment: "scroll"
104
109
  };
105
110
  var topShadowGradient = {
106
- background: "\n linear-gradient(\n 0deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColorLight, "\n ) 0 52px"),
111
+ backgroundImage: "\n linear-gradient(\n 0deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColorLight, "\n )"),
112
+ backgroundPosition: '0 52px',
107
113
  size: "100% 14px",
108
114
  attachment: "scroll"
109
115
  };
110
116
  var rightShadowGradient = {
111
- background: "\n linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColor, "\n ) right center"),
117
+ backgroundImage: "\n linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColor, "\n )"),
118
+ backgroundPosition: 'right center',
112
119
  size: "14px 100%",
113
120
  attachment: "scroll"
114
121
  };
115
122
  var bottomShadowGradient = {
116
- background: "\n linear-gradient(\n 0deg,\n ".concat(shadowColorLight, ",\n rgba(0, 0, 0, 0)\n ) bottom center"),
123
+ backgroundImage: "\n linear-gradient(\n 0deg,\n ".concat(shadowColorLight, ",\n rgba(0, 0, 0, 0)\n )"),
124
+ backgroundPosition: 'bottom center',
117
125
  size: "100% 10px",
118
126
  attachment: "scroll"
119
127
  };
120
128
  var shadows = [leftWhiteOverrideGradient, leftShadowGradient, rightWhiteOverrideGradient, rightShadowGradient, topWhiteOverrideGradient, topShadowGradient, bottomWhiteOverride, bottomShadowGradient];
121
129
  var scrollableContainerShadowsCssComponents = exports.scrollableContainerShadowsCssComponents = {
122
- background: shadows.map(function (_ref) {
123
- var background = _ref.background;
124
- return background;
130
+ backgroundImage: shadows.map(function (_ref) {
131
+ var backgroundImage = _ref.backgroundImage;
132
+ return backgroundImage;
133
+ }).join(','),
134
+ backgroundPosition: shadows.map(function (_ref2) {
135
+ var backgroundPosition = _ref2.backgroundPosition;
136
+ return backgroundPosition;
125
137
  }).join(','),
126
138
  backgroundRepeat: 'no-repeat',
127
- backgroundSize: shadows.map(function (_ref2) {
128
- var size = _ref2.size;
139
+ backgroundSize: shadows.map(function (_ref3) {
140
+ var size = _ref3.size;
129
141
  return size;
130
142
  }).join(','),
131
- backgroundAttachment: shadows.map(function (_ref3) {
132
- var attachment = _ref3.attachment;
143
+ backgroundAttachment: shadows.map(function (_ref4) {
144
+ var attachment = _ref4.attachment;
133
145
  return attachment;
134
146
  }).join(',')
135
147
  };
136
148
  var scrollableContainerStyles = (0, _react2.css)({
137
149
  overflow: 'auto',
138
150
  boxSizing: 'border-box',
139
- background: scrollableContainerShadowsCssComponents.background,
151
+ backgroundColor: "var(--ds-elevation-surface-current, #FFF)",
152
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
153
+ backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
140
154
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
141
155
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
142
156
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -196,23 +210,23 @@ function getDefaultColumnWidth(key, type) {
196
210
  return DEFAULT_WIDTH;
197
211
  }
198
212
  }
199
- var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
200
- var testId = _ref4.testId,
201
- onNextPage = _ref4.onNextPage,
202
- onLoadDatasourceDetails = _ref4.onLoadDatasourceDetails,
203
- items = _ref4.items,
204
- columns = _ref4.columns,
205
- _ref4$renderItem = _ref4.renderItem,
206
- renderItem = _ref4$renderItem === void 0 ? _renderType.fallbackRenderType : _ref4$renderItem,
207
- visibleColumnKeys = _ref4.visibleColumnKeys,
208
- onVisibleColumnKeysChange = _ref4.onVisibleColumnKeysChange,
209
- columnCustomSizes = _ref4.columnCustomSizes,
210
- onColumnResize = _ref4.onColumnResize,
211
- status = _ref4.status,
212
- hasNextPage = _ref4.hasNextPage,
213
- scrollableContainerHeight = _ref4.scrollableContainerHeight,
214
- parentContainerRenderInstanceId = _ref4.parentContainerRenderInstanceId,
215
- extensionKey = _ref4.extensionKey;
213
+ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
214
+ var testId = _ref5.testId,
215
+ onNextPage = _ref5.onNextPage,
216
+ onLoadDatasourceDetails = _ref5.onLoadDatasourceDetails,
217
+ items = _ref5.items,
218
+ columns = _ref5.columns,
219
+ _ref5$renderItem = _ref5.renderItem,
220
+ renderItem = _ref5$renderItem === void 0 ? _renderType.fallbackRenderType : _ref5$renderItem,
221
+ visibleColumnKeys = _ref5.visibleColumnKeys,
222
+ onVisibleColumnKeysChange = _ref5.onVisibleColumnKeysChange,
223
+ columnCustomSizes = _ref5.columnCustomSizes,
224
+ onColumnResize = _ref5.onColumnResize,
225
+ status = _ref5.status,
226
+ hasNextPage = _ref5.hasNextPage,
227
+ scrollableContainerHeight = _ref5.scrollableContainerHeight,
228
+ parentContainerRenderInstanceId = _ref5.parentContainerRenderInstanceId,
229
+ extensionKey = _ref5.extensionKey;
216
230
  var tableId = (0, _react.useMemo)(function () {
217
231
  return Symbol('unique-id');
218
232
  }, []);
@@ -247,8 +261,8 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
247
261
  }, [parentContainerRenderInstanceId, status]);
248
262
  var visibleSortedColumns = (0, _react.useMemo)(function () {
249
263
  return visibleColumnKeys.map(function (visibleKey) {
250
- return orderedColumns.find(function (_ref5) {
251
- var key = _ref5.key;
264
+ return orderedColumns.find(function (_ref6) {
265
+ var key = _ref6.key;
252
266
  return visibleKey === key;
253
267
  });
254
268
  }).filter(Boolean);
@@ -263,10 +277,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
263
277
  return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
264
278
  }, [columnCustomSizes]);
265
279
  var headerColumns = (0, _react.useMemo)(function () {
266
- return visibleSortedColumns.map(function (_ref6) {
267
- var key = _ref6.key,
268
- title = _ref6.title,
269
- type = _ref6.type;
280
+ return visibleSortedColumns.map(function (_ref7) {
281
+ var key = _ref7.key,
282
+ title = _ref7.title,
283
+ type = _ref7.type;
270
284
  return {
271
285
  key: key,
272
286
  content: title,
@@ -308,9 +322,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
308
322
  return;
309
323
  }
310
324
  return (0, _combine.combine)((0, _element.monitorForElements)({
311
- onDragStart: function onDragStart(_ref7) {
312
- var location = _ref7.location,
313
- source = _ref7.source;
325
+ onDragStart: function onDragStart(_ref8) {
326
+ var location = _ref8.location,
327
+ source = _ref8.source;
314
328
  initialAutoScrollerClientY.current = location.current.input.clientY;
315
329
  if (source.data.type === 'table-header') {
316
330
  var _containerRef$current;
@@ -326,9 +340,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
326
340
  });
327
341
  }
328
342
  },
329
- onDrag: function onDrag(_ref8) {
330
- var location = _ref8.location,
331
- source = _ref8.source;
343
+ onDrag: function onDrag(_ref9) {
344
+ var location = _ref9.location,
345
+ source = _ref9.source;
332
346
  if (source.data.type === 'table-header') {
333
347
  var _containerRef$current2;
334
348
  _pragmaticDragAndDropReactBeautifulDndAutoscroll.autoScroller.updateInput({
@@ -338,9 +352,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
338
352
  });
339
353
  }
340
354
  },
341
- onDrop: function onDrop(_ref9) {
342
- var source = _ref9.source,
343
- location = _ref9.location;
355
+ onDrop: function onDrop(_ref10) {
356
+ var source = _ref10.source,
357
+ location = _ref10.location;
344
358
  _pragmaticDragAndDropReactBeautifulDndAutoscroll.autoScroller.stop();
345
359
  if (location.current.dropTargets.length === 0) {
346
360
  return;
@@ -375,10 +389,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
375
389
  return items.map(function (newRowData, rowIndex) {
376
390
  return {
377
391
  key: "".concat(identityColumnKey && newRowData[identityColumnKey] && newRowData[identityColumnKey].data || rowIndex),
378
- cells: visibleSortedColumns.map(function (_ref10) {
392
+ cells: visibleSortedColumns.map(function (_ref11) {
379
393
  var _newRowData$key;
380
- var key = _ref10.key,
381
- type = _ref10.type;
394
+ var key = _ref11.key,
395
+ type = _ref11.type;
382
396
  var value = ((_newRowData$key = newRowData[key]) === null || _newRowData$key === void 0 ? void 0 : _newRowData$key.data) || newRowData[key];
383
397
  var values = Array.isArray(value) ? value : [value];
384
398
  var content = values.map(function (value) {
@@ -479,10 +493,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
479
493
  css: [noDefaultBorderStyles, tableHeadStyles]
480
494
  }, (0, _react2.jsx)("tr", {
481
495
  ref: tableHeaderRowRef
482
- }, headerColumns.map(function (_ref12, cellIndex) {
483
- var key = _ref12.key,
484
- content = _ref12.content,
485
- width = _ref12.width;
496
+ }, headerColumns.map(function (_ref13, cellIndex) {
497
+ var key = _ref13.key,
498
+ content = _ref13.content,
499
+ width = _ref13.width;
486
500
  var heading = (0, _react2.jsx)(_tooltip.default, {
487
501
  content: content,
488
502
  tag: "span",
@@ -493,10 +507,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
493
507
  }, content));
494
508
  if (onVisibleColumnKeysChange && hasData) {
495
509
  var _containerRef$current3;
496
- var previewRows = tableRows.map(function (_ref13) {
497
- var cells = _ref13.cells;
498
- var cell = cells.find(function (_ref14) {
499
- var cellKey = _ref14.key;
510
+ var previewRows = tableRows.map(function (_ref14) {
511
+ var cells = _ref14.cells;
512
+ var cell = cells.find(function (_ref15) {
513
+ var cellKey = _ref15.key;
500
514
  return cellKey === key;
501
515
  });
502
516
  if (cell) {
@@ -538,18 +552,18 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
538
552
  })))), (0, _react2.jsx)("tbody", {
539
553
  css: noDefaultBorderStyles,
540
554
  "data-testid": testId && "".concat(testId, "--body")
541
- }, rows.map(function (_ref15) {
542
- var key = _ref15.key,
543
- cells = _ref15.cells,
544
- ref = _ref15.ref;
555
+ }, rows.map(function (_ref16) {
556
+ var key = _ref16.key,
557
+ cells = _ref16.cells,
558
+ ref = _ref16.ref;
545
559
  return (0, _react2.jsx)("tr", {
546
560
  key: key,
547
561
  "data-testid": testId && "".concat(testId, "--row-").concat(key),
548
562
  ref: ref
549
- }, cells.map(function (_ref16, cellIndex) {
550
- var cellKey = _ref16.key,
551
- content = _ref16.content,
552
- width = _ref16.width;
563
+ }, cells.map(function (_ref17, cellIndex) {
564
+ var cellKey = _ref17.key,
565
+ content = _ref17.content,
566
+ width = _ref17.width;
553
567
  var loadingRowStyle = shouldUseWidth ? {
554
568
  width: width
555
569
  } : {
@@ -65,7 +65,8 @@ var contentContainerStyles = (0, _react2.css)({
65
65
  maxHeight: '420px',
66
66
  overflow: 'auto',
67
67
  borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(_colors.N40, ")")),
68
- background: _issueLikeTable.scrollableContainerShadowsCssComponents.background,
68
+ backgroundImage: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundImage,
69
+ backgroundPosition: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundPosition,
69
70
  backgroundRepeat: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundRepeat,
70
71
  backgroundSize: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundSize,
71
72
  backgroundAttachment: _issueLikeTable.scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -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.19.16"
4
+ packageVersion: "1.19.17"
5
5
  };
@@ -23,7 +23,7 @@ const tableBordersStyles = css({
23
23
  borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
24
24
  borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
25
25
  borderBottom: `2px solid ${`var(--ds-background-accent-gray-subtler, ${N40})`}`,
26
- background: scrollableContainerShadowsCssComponents.background,
26
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
27
27
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
28
28
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
29
29
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -15,6 +15,9 @@ const SkeletonComponent = ({
15
15
  const tableBodyStyles = css({
16
16
  borderBottom: 0
17
17
  });
18
+ const tableStyles = css({
19
+ background: "var(--ds-elevation-surface-current, #FFF)"
20
+ });
18
21
  const padding = `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"}`;
19
22
  const cellStyles = css({
20
23
  padding,
@@ -105,6 +108,7 @@ export default (({
105
108
  boxSizing: 'border-box'
106
109
  }
107
110
  }, jsx("table", {
111
+ css: tableStyles,
108
112
  "data-testid": testId
109
113
  }, jsx("thead", {
110
114
  style: {
@@ -82,90 +82,101 @@ const tableContainerStyles = css({
82
82
  const shadowColor = "var(--ds-shadow-overflow-perimeter, rgba(0, 0, 0, 0.1))";
83
83
  const shadowColorLight = "var(--ds-shadow-overflow-perimeter, rgba(0, 0, 0, 0.05))";
84
84
  const leftWhiteOverrideGradient = {
85
- background: `
85
+ backgroundImage: `
86
86
  linear-gradient(
87
87
  90deg,
88
88
  ${"var(--ds-elevation-surface-current, #FFF)"} 30%,
89
89
  rgba(255, 255, 255, 0)
90
- ) left center`,
90
+ )`,
91
+ backgroundPosition: 'left center',
91
92
  size: `40px 100%`,
92
93
  attachment: `local`
93
94
  };
94
95
  const topWhiteOverrideGradient = {
95
- background: `
96
+ backgroundImage: `
96
97
  linear-gradient(
97
98
  0deg,
98
99
  rgba(255, 255, 255, 0),
99
100
  ${"var(--ds-elevation-surface-current, #FFF)"} 30%
100
- ) top center`,
101
+ )`,
102
+ backgroundPosition: 'top center',
101
103
  size: `100% 100px`,
102
104
  attachment: `local`
103
105
  };
104
106
  const rightWhiteOverrideGradient = {
105
- background: `
107
+ backgroundImage: `
106
108
  linear-gradient(
107
109
  90deg,
108
110
  rgba(255, 255, 255, 0),
109
111
  ${"var(--ds-elevation-surface-current, #FFF)"} 70%
110
- ) right center`,
112
+ )`,
113
+ backgroundPosition: 'right center',
111
114
  size: `40px 100%`,
112
115
  attachment: `local`
113
116
  };
114
117
  const bottomWhiteOverride = {
115
- background: `
118
+ backgroundImage: `
116
119
  linear-gradient(
117
120
  0deg,
118
121
  ${"var(--ds-elevation-surface-current, #FFF)"} 30%,
119
122
  rgba(255, 255, 255, 0)
120
- ) bottom center`,
123
+ )`,
124
+ backgroundPosition: 'bottom center',
121
125
  size: `100% 40px`,
122
126
  attachment: `local`
123
127
  };
124
128
  const leftShadowGradient = {
125
- background: `
129
+ backgroundImage: `
126
130
  linear-gradient(
127
131
  90deg,
128
132
  ${shadowColor},
129
133
  rgba(0, 0, 0, 0)
130
- ) left center`,
134
+ )`,
135
+ backgroundPosition: 'left center',
131
136
  size: `14px 100%`,
132
137
  attachment: `scroll`
133
138
  };
134
139
  const topShadowGradient = {
135
- background: `
140
+ backgroundImage: `
136
141
  linear-gradient(
137
142
  0deg,
138
143
  rgba(0, 0, 0, 0),
139
144
  ${shadowColorLight}
140
- ) 0 52px`,
145
+ )`,
146
+ backgroundPosition: '0 52px',
141
147
  size: `100% 14px`,
142
148
  attachment: `scroll`
143
149
  };
144
150
  const rightShadowGradient = {
145
- background: `
151
+ backgroundImage: `
146
152
  linear-gradient(
147
153
  90deg,
148
154
  rgba(0, 0, 0, 0),
149
155
  ${shadowColor}
150
- ) right center`,
156
+ )`,
157
+ backgroundPosition: 'right center',
151
158
  size: `14px 100%`,
152
159
  attachment: `scroll`
153
160
  };
154
161
  const bottomShadowGradient = {
155
- background: `
162
+ backgroundImage: `
156
163
  linear-gradient(
157
164
  0deg,
158
165
  ${shadowColorLight},
159
166
  rgba(0, 0, 0, 0)
160
- ) bottom center`,
167
+ )`,
168
+ backgroundPosition: 'bottom center',
161
169
  size: `100% 10px`,
162
170
  attachment: `scroll`
163
171
  };
164
172
  const shadows = [leftWhiteOverrideGradient, leftShadowGradient, rightWhiteOverrideGradient, rightShadowGradient, topWhiteOverrideGradient, topShadowGradient, bottomWhiteOverride, bottomShadowGradient];
165
173
  export const scrollableContainerShadowsCssComponents = {
166
- background: shadows.map(({
167
- background
168
- }) => background).join(','),
174
+ backgroundImage: shadows.map(({
175
+ backgroundImage
176
+ }) => backgroundImage).join(','),
177
+ backgroundPosition: shadows.map(({
178
+ backgroundPosition
179
+ }) => backgroundPosition).join(','),
169
180
  backgroundRepeat: 'no-repeat',
170
181
  backgroundSize: shadows.map(({
171
182
  size
@@ -177,7 +188,9 @@ export const scrollableContainerShadowsCssComponents = {
177
188
  const scrollableContainerStyles = css({
178
189
  overflow: 'auto',
179
190
  boxSizing: 'border-box',
180
- background: scrollableContainerShadowsCssComponents.background,
191
+ backgroundColor: "var(--ds-elevation-surface-current, #FFF)",
192
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
193
+ backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
181
194
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
182
195
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
183
196
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -49,7 +49,8 @@ const contentContainerStyles = css({
49
49
  maxHeight: '420px',
50
50
  overflow: 'auto',
51
51
  borderBottom: `2px solid ${`var(--ds-background-accent-gray-subtler, ${N40})`}`,
52
- background: scrollableContainerShadowsCssComponents.background,
52
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
53
+ backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
53
54
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
54
55
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
55
56
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -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.19.16"
4
+ packageVersion: "1.19.17"
5
5
  };
@@ -23,7 +23,7 @@ var tableBordersStyles = css({
23
23
  borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
24
24
  borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
25
25
  borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(N40, ")")),
26
- background: scrollableContainerShadowsCssComponents.background,
26
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
27
27
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
28
28
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
29
29
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -16,6 +16,9 @@ var SkeletonComponent = function SkeletonComponent(_ref) {
16
16
  var tableBodyStyles = css({
17
17
  borderBottom: 0
18
18
  });
19
+ var tableStyles = css({
20
+ background: "var(--ds-elevation-surface-current, #FFF)"
21
+ });
19
22
  var padding = "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)");
20
23
  var cellStyles = css({
21
24
  padding: padding,
@@ -105,6 +108,7 @@ export default (function (_ref4) {
105
108
  boxSizing: 'border-box'
106
109
  }
107
110
  }, jsx("table", {
111
+ css: tableStyles,
108
112
  "data-testid": testId
109
113
  }, jsx("thead", {
110
114
  style: {
@@ -71,65 +71,79 @@ var tableContainerStyles = css({
71
71
  var shadowColor = "var(--ds-shadow-overflow-perimeter, rgba(0, 0, 0, 0.1))";
72
72
  var shadowColorLight = "var(--ds-shadow-overflow-perimeter, rgba(0, 0, 0, 0.05))";
73
73
  var leftWhiteOverrideGradient = {
74
- background: "\n linear-gradient(\n 90deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n ) left center"),
74
+ backgroundImage: "\n linear-gradient(\n 90deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n )"),
75
+ backgroundPosition: 'left center',
75
76
  size: "40px 100%",
76
77
  attachment: "local"
77
78
  };
78
79
  var topWhiteOverrideGradient = {
79
- background: "\n linear-gradient(\n 0deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%\n ) top center"),
80
+ backgroundImage: "\n linear-gradient(\n 0deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%\n )"),
81
+ backgroundPosition: 'top center',
80
82
  size: "100% 100px",
81
83
  attachment: "local"
82
84
  };
83
85
  var rightWhiteOverrideGradient = {
84
- background: "\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 70%\n ) right center"),
86
+ backgroundImage: "\n linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 70%\n )"),
87
+ backgroundPosition: 'right center',
85
88
  size: "40px 100%",
86
89
  attachment: "local"
87
90
  };
88
91
  var bottomWhiteOverride = {
89
- background: "\n linear-gradient(\n 0deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n ) bottom center"),
92
+ backgroundImage: "\n linear-gradient(\n 0deg,\n ".concat("var(--ds-elevation-surface-current, #FFF)", " 30%,\n rgba(255, 255, 255, 0)\n )"),
93
+ backgroundPosition: 'bottom center',
90
94
  size: "100% 40px",
91
95
  attachment: "local"
92
96
  };
93
97
  var leftShadowGradient = {
94
- background: "\n linear-gradient(\n 90deg,\n ".concat(shadowColor, ",\n rgba(0, 0, 0, 0)\n ) left center"),
98
+ backgroundImage: "\n linear-gradient(\n 90deg,\n ".concat(shadowColor, ",\n rgba(0, 0, 0, 0)\n )"),
99
+ backgroundPosition: 'left center',
95
100
  size: "14px 100%",
96
101
  attachment: "scroll"
97
102
  };
98
103
  var topShadowGradient = {
99
- background: "\n linear-gradient(\n 0deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColorLight, "\n ) 0 52px"),
104
+ backgroundImage: "\n linear-gradient(\n 0deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColorLight, "\n )"),
105
+ backgroundPosition: '0 52px',
100
106
  size: "100% 14px",
101
107
  attachment: "scroll"
102
108
  };
103
109
  var rightShadowGradient = {
104
- background: "\n linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColor, "\n ) right center"),
110
+ backgroundImage: "\n linear-gradient(\n 90deg,\n rgba(0, 0, 0, 0),\n ".concat(shadowColor, "\n )"),
111
+ backgroundPosition: 'right center',
105
112
  size: "14px 100%",
106
113
  attachment: "scroll"
107
114
  };
108
115
  var bottomShadowGradient = {
109
- background: "\n linear-gradient(\n 0deg,\n ".concat(shadowColorLight, ",\n rgba(0, 0, 0, 0)\n ) bottom center"),
116
+ backgroundImage: "\n linear-gradient(\n 0deg,\n ".concat(shadowColorLight, ",\n rgba(0, 0, 0, 0)\n )"),
117
+ backgroundPosition: 'bottom center',
110
118
  size: "100% 10px",
111
119
  attachment: "scroll"
112
120
  };
113
121
  var shadows = [leftWhiteOverrideGradient, leftShadowGradient, rightWhiteOverrideGradient, rightShadowGradient, topWhiteOverrideGradient, topShadowGradient, bottomWhiteOverride, bottomShadowGradient];
114
122
  export var scrollableContainerShadowsCssComponents = {
115
- background: shadows.map(function (_ref) {
116
- var background = _ref.background;
117
- return background;
123
+ backgroundImage: shadows.map(function (_ref) {
124
+ var backgroundImage = _ref.backgroundImage;
125
+ return backgroundImage;
126
+ }).join(','),
127
+ backgroundPosition: shadows.map(function (_ref2) {
128
+ var backgroundPosition = _ref2.backgroundPosition;
129
+ return backgroundPosition;
118
130
  }).join(','),
119
131
  backgroundRepeat: 'no-repeat',
120
- backgroundSize: shadows.map(function (_ref2) {
121
- var size = _ref2.size;
132
+ backgroundSize: shadows.map(function (_ref3) {
133
+ var size = _ref3.size;
122
134
  return size;
123
135
  }).join(','),
124
- backgroundAttachment: shadows.map(function (_ref3) {
125
- var attachment = _ref3.attachment;
136
+ backgroundAttachment: shadows.map(function (_ref4) {
137
+ var attachment = _ref4.attachment;
126
138
  return attachment;
127
139
  }).join(',')
128
140
  };
129
141
  var scrollableContainerStyles = css({
130
142
  overflow: 'auto',
131
143
  boxSizing: 'border-box',
132
- background: scrollableContainerShadowsCssComponents.background,
144
+ backgroundColor: "var(--ds-elevation-surface-current, #FFF)",
145
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
146
+ backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
133
147
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
134
148
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
135
149
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -189,23 +203,23 @@ function getDefaultColumnWidth(key, type) {
189
203
  return DEFAULT_WIDTH;
190
204
  }
191
205
  }
192
- export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
193
- var testId = _ref4.testId,
194
- onNextPage = _ref4.onNextPage,
195
- onLoadDatasourceDetails = _ref4.onLoadDatasourceDetails,
196
- items = _ref4.items,
197
- columns = _ref4.columns,
198
- _ref4$renderItem = _ref4.renderItem,
199
- renderItem = _ref4$renderItem === void 0 ? fallbackRenderType : _ref4$renderItem,
200
- visibleColumnKeys = _ref4.visibleColumnKeys,
201
- onVisibleColumnKeysChange = _ref4.onVisibleColumnKeysChange,
202
- columnCustomSizes = _ref4.columnCustomSizes,
203
- onColumnResize = _ref4.onColumnResize,
204
- status = _ref4.status,
205
- hasNextPage = _ref4.hasNextPage,
206
- scrollableContainerHeight = _ref4.scrollableContainerHeight,
207
- parentContainerRenderInstanceId = _ref4.parentContainerRenderInstanceId,
208
- extensionKey = _ref4.extensionKey;
206
+ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
207
+ var testId = _ref5.testId,
208
+ onNextPage = _ref5.onNextPage,
209
+ onLoadDatasourceDetails = _ref5.onLoadDatasourceDetails,
210
+ items = _ref5.items,
211
+ columns = _ref5.columns,
212
+ _ref5$renderItem = _ref5.renderItem,
213
+ renderItem = _ref5$renderItem === void 0 ? fallbackRenderType : _ref5$renderItem,
214
+ visibleColumnKeys = _ref5.visibleColumnKeys,
215
+ onVisibleColumnKeysChange = _ref5.onVisibleColumnKeysChange,
216
+ columnCustomSizes = _ref5.columnCustomSizes,
217
+ onColumnResize = _ref5.onColumnResize,
218
+ status = _ref5.status,
219
+ hasNextPage = _ref5.hasNextPage,
220
+ scrollableContainerHeight = _ref5.scrollableContainerHeight,
221
+ parentContainerRenderInstanceId = _ref5.parentContainerRenderInstanceId,
222
+ extensionKey = _ref5.extensionKey;
209
223
  var tableId = useMemo(function () {
210
224
  return Symbol('unique-id');
211
225
  }, []);
@@ -240,8 +254,8 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
240
254
  }, [parentContainerRenderInstanceId, status]);
241
255
  var visibleSortedColumns = useMemo(function () {
242
256
  return visibleColumnKeys.map(function (visibleKey) {
243
- return orderedColumns.find(function (_ref5) {
244
- var key = _ref5.key;
257
+ return orderedColumns.find(function (_ref6) {
258
+ var key = _ref6.key;
245
259
  return visibleKey === key;
246
260
  });
247
261
  }).filter(Boolean);
@@ -256,10 +270,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
256
270
  return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
257
271
  }, [columnCustomSizes]);
258
272
  var headerColumns = useMemo(function () {
259
- return visibleSortedColumns.map(function (_ref6) {
260
- var key = _ref6.key,
261
- title = _ref6.title,
262
- type = _ref6.type;
273
+ return visibleSortedColumns.map(function (_ref7) {
274
+ var key = _ref7.key,
275
+ title = _ref7.title,
276
+ type = _ref7.type;
263
277
  return {
264
278
  key: key,
265
279
  content: title,
@@ -301,9 +315,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
301
315
  return;
302
316
  }
303
317
  return combine(monitorForElements({
304
- onDragStart: function onDragStart(_ref7) {
305
- var location = _ref7.location,
306
- source = _ref7.source;
318
+ onDragStart: function onDragStart(_ref8) {
319
+ var location = _ref8.location,
320
+ source = _ref8.source;
307
321
  initialAutoScrollerClientY.current = location.current.input.clientY;
308
322
  if (source.data.type === 'table-header') {
309
323
  var _containerRef$current;
@@ -319,9 +333,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
319
333
  });
320
334
  }
321
335
  },
322
- onDrag: function onDrag(_ref8) {
323
- var location = _ref8.location,
324
- source = _ref8.source;
336
+ onDrag: function onDrag(_ref9) {
337
+ var location = _ref9.location,
338
+ source = _ref9.source;
325
339
  if (source.data.type === 'table-header') {
326
340
  var _containerRef$current2;
327
341
  autoScroller.updateInput({
@@ -331,9 +345,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
331
345
  });
332
346
  }
333
347
  },
334
- onDrop: function onDrop(_ref9) {
335
- var source = _ref9.source,
336
- location = _ref9.location;
348
+ onDrop: function onDrop(_ref10) {
349
+ var source = _ref10.source,
350
+ location = _ref10.location;
337
351
  autoScroller.stop();
338
352
  if (location.current.dropTargets.length === 0) {
339
353
  return;
@@ -368,10 +382,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
368
382
  return items.map(function (newRowData, rowIndex) {
369
383
  return {
370
384
  key: "".concat(identityColumnKey && newRowData[identityColumnKey] && newRowData[identityColumnKey].data || rowIndex),
371
- cells: visibleSortedColumns.map(function (_ref10) {
385
+ cells: visibleSortedColumns.map(function (_ref11) {
372
386
  var _newRowData$key;
373
- var key = _ref10.key,
374
- type = _ref10.type;
387
+ var key = _ref11.key,
388
+ type = _ref11.type;
375
389
  var value = ((_newRowData$key = newRowData[key]) === null || _newRowData$key === void 0 ? void 0 : _newRowData$key.data) || newRowData[key];
376
390
  var values = Array.isArray(value) ? value : [value];
377
391
  var content = values.map(function (value) {
@@ -472,10 +486,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
472
486
  css: [noDefaultBorderStyles, tableHeadStyles]
473
487
  }, jsx("tr", {
474
488
  ref: tableHeaderRowRef
475
- }, headerColumns.map(function (_ref12, cellIndex) {
476
- var key = _ref12.key,
477
- content = _ref12.content,
478
- width = _ref12.width;
489
+ }, headerColumns.map(function (_ref13, cellIndex) {
490
+ var key = _ref13.key,
491
+ content = _ref13.content,
492
+ width = _ref13.width;
479
493
  var heading = jsx(Tooltip, {
480
494
  content: content,
481
495
  tag: "span",
@@ -486,10 +500,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
486
500
  }, content));
487
501
  if (onVisibleColumnKeysChange && hasData) {
488
502
  var _containerRef$current3;
489
- var previewRows = tableRows.map(function (_ref13) {
490
- var cells = _ref13.cells;
491
- var cell = cells.find(function (_ref14) {
492
- var cellKey = _ref14.key;
503
+ var previewRows = tableRows.map(function (_ref14) {
504
+ var cells = _ref14.cells;
505
+ var cell = cells.find(function (_ref15) {
506
+ var cellKey = _ref15.key;
493
507
  return cellKey === key;
494
508
  });
495
509
  if (cell) {
@@ -531,18 +545,18 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref4) {
531
545
  })))), jsx("tbody", {
532
546
  css: noDefaultBorderStyles,
533
547
  "data-testid": testId && "".concat(testId, "--body")
534
- }, rows.map(function (_ref15) {
535
- var key = _ref15.key,
536
- cells = _ref15.cells,
537
- ref = _ref15.ref;
548
+ }, rows.map(function (_ref16) {
549
+ var key = _ref16.key,
550
+ cells = _ref16.cells,
551
+ ref = _ref16.ref;
538
552
  return jsx("tr", {
539
553
  key: key,
540
554
  "data-testid": testId && "".concat(testId, "--row-").concat(key),
541
555
  ref: ref
542
- }, cells.map(function (_ref16, cellIndex) {
543
- var cellKey = _ref16.key,
544
- content = _ref16.content,
545
- width = _ref16.width;
556
+ }, cells.map(function (_ref17, cellIndex) {
557
+ var cellKey = _ref17.key,
558
+ content = _ref17.content,
559
+ width = _ref17.width;
546
560
  var loadingRowStyle = shouldUseWidth ? {
547
561
  width: width
548
562
  } : {
@@ -56,7 +56,8 @@ var contentContainerStyles = css({
56
56
  maxHeight: '420px',
57
57
  overflow: 'auto',
58
58
  borderBottom: "2px solid ".concat("var(--ds-background-accent-gray-subtler, ".concat(N40, ")")),
59
- background: scrollableContainerShadowsCssComponents.background,
59
+ backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
60
+ backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
60
61
  backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
61
62
  backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
62
63
  backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
@@ -4,7 +4,8 @@ import { jsx } from '@emotion/react';
4
4
  import { DatasourceResponseSchemaProperty } from '@atlaskit/linking-types/datasource';
5
5
  import { IssueLikeDataTableViewProps } from './types';
6
6
  export declare const scrollableContainerShadowsCssComponents: {
7
- background: string;
7
+ backgroundImage: string;
8
+ backgroundPosition: string;
8
9
  backgroundRepeat: string;
9
10
  backgroundSize: string;
10
11
  backgroundAttachment: string;
@@ -4,7 +4,8 @@ import { jsx } from '@emotion/react';
4
4
  import { DatasourceResponseSchemaProperty } from '@atlaskit/linking-types/datasource';
5
5
  import { IssueLikeDataTableViewProps } from './types';
6
6
  export declare const scrollableContainerShadowsCssComponents: {
7
- background: string;
7
+ backgroundImage: string;
8
+ backgroundPosition: string;
8
9
  backgroundRepeat: string;
9
10
  backgroundSize: string;
10
11
  backgroundAttachment: string;
@@ -0,0 +1,26 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+
4
+ import { jsx } from '@emotion/react';
5
+
6
+ import { Box, xcss } from '@atlaskit/primitives';
7
+
8
+ const containerStyles = xcss({
9
+ height: '100%',
10
+ backgroundColor: 'elevation.surface.overlay',
11
+ padding: 'space.400',
12
+ ':hover': {
13
+ backgroundColor: 'elevation.surface.overlay.hovered',
14
+ },
15
+ });
16
+
17
+ // To simulate Jira description's hover background wrapper
18
+ export const HoverableContainer = ({
19
+ children,
20
+ }: React.PropsWithChildren<{}>) => {
21
+ return (
22
+ <Box testId="examples-hoverable-container" xcss={containerStyles}>
23
+ {children}
24
+ </Box>
25
+ );
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.19.16",
3
+ "version": "1.19.17",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"