@atlaskit/link-datasource 1.19.15 → 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 +12 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/empty-state/index.js +4 -0
- package/dist/cjs/ui/issue-like-table/index.js +81 -67
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +5 -5
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +5 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +4 -5
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +2 -1
- package/dist/cjs/ui/jira-issues-modal/mode-switcher/index.js +1 -1
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/empty-state/index.js +4 -0
- package/dist/es2019/ui/issue-like-table/index.js +33 -20
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +5 -5
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +6 -2
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +3 -4
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +2 -1
- package/dist/es2019/ui/jira-issues-modal/mode-switcher/index.js +1 -1
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/assets-modal/modal/render-assets-content/index.js +1 -1
- package/dist/esm/ui/issue-like-table/empty-state/index.js +4 -0
- package/dist/esm/ui/issue-like-table/index.js +81 -67
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +5 -5
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/menu-list/index.js +6 -2
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +3 -4
- package/dist/esm/ui/jira-issues-modal/modal/index.js +2 -1
- package/dist/esm/ui/jira-issues-modal/mode-switcher/index.js +1 -1
- package/dist/types/ui/issue-like-table/index.d.ts +2 -1
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/issue-like-table/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/index.d.ts +1 -0
- package/examples-helpers/hoverableContainer.tsx +26 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 1.19.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#58204](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58204) [`f800efb5148e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f800efb5148e) - Design/Bug fixes for basic filters(after design review).
|
|
14
|
+
|
|
3
15
|
## 1.19.15
|
|
4
16
|
|
|
5
17
|
### 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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
123
|
-
var
|
|
124
|
-
return
|
|
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 (
|
|
128
|
-
var size =
|
|
139
|
+
backgroundSize: shadows.map(function (_ref3) {
|
|
140
|
+
var size = _ref3.size;
|
|
129
141
|
return size;
|
|
130
142
|
}).join(','),
|
|
131
|
-
backgroundAttachment: shadows.map(function (
|
|
132
|
-
var 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
|
-
|
|
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(
|
|
200
|
-
var testId =
|
|
201
|
-
onNextPage =
|
|
202
|
-
onLoadDatasourceDetails =
|
|
203
|
-
items =
|
|
204
|
-
columns =
|
|
205
|
-
|
|
206
|
-
renderItem =
|
|
207
|
-
visibleColumnKeys =
|
|
208
|
-
onVisibleColumnKeysChange =
|
|
209
|
-
columnCustomSizes =
|
|
210
|
-
onColumnResize =
|
|
211
|
-
status =
|
|
212
|
-
hasNextPage =
|
|
213
|
-
scrollableContainerHeight =
|
|
214
|
-
parentContainerRenderInstanceId =
|
|
215
|
-
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 (
|
|
251
|
-
var 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 (
|
|
267
|
-
var key =
|
|
268
|
-
title =
|
|
269
|
-
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(
|
|
312
|
-
var location =
|
|
313
|
-
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(
|
|
330
|
-
var location =
|
|
331
|
-
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(
|
|
342
|
-
var source =
|
|
343
|
-
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 (
|
|
392
|
+
cells: visibleSortedColumns.map(function (_ref11) {
|
|
379
393
|
var _newRowData$key;
|
|
380
|
-
var key =
|
|
381
|
-
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 (
|
|
483
|
-
var key =
|
|
484
|
-
content =
|
|
485
|
-
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 (
|
|
497
|
-
var cells =
|
|
498
|
-
var cell = cells.find(function (
|
|
499
|
-
var cellKey =
|
|
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 (
|
|
542
|
-
var key =
|
|
543
|
-
cells =
|
|
544
|
-
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 (
|
|
550
|
-
var cellKey =
|
|
551
|
-
content =
|
|
552
|
-
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
|
} : {
|
|
@@ -117,17 +117,17 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
117
117
|
}
|
|
118
118
|
}, [selectedOptions, filterOptions, sortedOptions]);
|
|
119
119
|
var sortOptionsOnResolve = (0, _react.useCallback)(function () {
|
|
120
|
-
// sortedOptions is empty initially, this will take care of setting the initial value and bring the selected items to the top
|
|
121
|
-
if (sortedOptions.length === 0) {
|
|
122
|
-
return sortOptionsOnPopupOpen();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
120
|
// when the user is searching, we want the search result to be displayed as it is, and the select component will take care of marking the selected items
|
|
126
121
|
if (searchTerm) {
|
|
127
122
|
sortPaginatedResults.current = false; // set to false to indicate pagination resolve action is completed from the sorting perspective
|
|
128
123
|
return setSortedOptions(filterOptions);
|
|
129
124
|
}
|
|
130
125
|
|
|
126
|
+
// sortedOptions is empty initially, this will take care of setting the initial value and bring the selected items to the top
|
|
127
|
+
if (sortedOptions.length === 0) {
|
|
128
|
+
return sortOptionsOnPopupOpen();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
131
|
// this block handles the pagination, where on pagination, we will just append newOptions to the current list
|
|
132
132
|
if (sortPaginatedResults.current) {
|
|
133
133
|
var newOptions = filterOptions.filter(function (option) {
|
|
@@ -15,6 +15,9 @@ var _errorMessage = _interopRequireDefault(require("./errorMessage"));
|
|
|
15
15
|
var _loadingMessage = _interopRequireDefault(require("./loadingMessage"));
|
|
16
16
|
var _noOptionsMessage = _interopRequireDefault(require("./noOptionsMessage"));
|
|
17
17
|
var _excluded = ["children"];
|
|
18
|
+
var inlineSpinnerStyles = (0, _primitives.xcss)({
|
|
19
|
+
paddingTop: "var(--ds-space-075, 6px)"
|
|
20
|
+
});
|
|
18
21
|
var CustomMenuList = function CustomMenuList(_ref) {
|
|
19
22
|
var children = _ref.children,
|
|
20
23
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -31,7 +34,8 @@ var CustomMenuList = function CustomMenuList(_ref) {
|
|
|
31
34
|
var isLoadingMoreData = !shouldDisplayShowMore && isLoadingMore;
|
|
32
35
|
var InlineSpinner = function InlineSpinner() {
|
|
33
36
|
return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
34
|
-
justifyContent: "center"
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
xcss: inlineSpinnerStyles
|
|
35
39
|
}, /*#__PURE__*/_react.default.createElement(_spinner.default, {
|
|
36
40
|
size: "medium"
|
|
37
41
|
}));
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.JiraSearchContainer = exports.DEFAULT_JQL_QUERY = exports.ALLOWED_ORDER_BY_KEYS = void 0;
|
|
8
|
+
exports.JiraSearchContainer = exports.FILTER_SELECTION_DEBOUNCE_MS = exports.DEFAULT_JQL_QUERY = exports.ALLOWED_ORDER_BY_KEYS = void 0;
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -18,7 +18,6 @@ var _primitives = require("@atlaskit/primitives");
|
|
|
18
18
|
var _analytics = require("../../../analytics");
|
|
19
19
|
var _basicFilters = require("../basic-filters");
|
|
20
20
|
var _useHydrateJqlQuery2 = require("../basic-filters/hooks/useHydrateJqlQuery");
|
|
21
|
-
var _asyncPopupSelect = require("../basic-filters/ui/async-popup-select");
|
|
22
21
|
var _isQueryTooComplex = require("../basic-filters/utils/isQueryTooComplex");
|
|
23
22
|
var _basicSearchInput = require("../basic-search-input");
|
|
24
23
|
var _jqlEditor = require("../jql-editor");
|
|
@@ -40,7 +39,7 @@ var basicSearchInputContainerStyles = (0, _primitives.xcss)({
|
|
|
40
39
|
});
|
|
41
40
|
var DEFAULT_JQL_QUERY = exports.DEFAULT_JQL_QUERY = 'created >= -30d order by created DESC';
|
|
42
41
|
var ALLOWED_ORDER_BY_KEYS = exports.ALLOWED_ORDER_BY_KEYS = ['key', 'summary', 'assignee', 'status', 'created'];
|
|
43
|
-
var
|
|
42
|
+
var FILTER_SELECTION_DEBOUNCE_MS = exports.FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
44
43
|
var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchContainer(props) {
|
|
45
44
|
var isSearching = props.isSearching,
|
|
46
45
|
parameters = props.parameters,
|
|
@@ -164,7 +163,7 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
164
163
|
basicFilterSelections: filterSelections,
|
|
165
164
|
isQueryComplex: isCurrentQueryComplex
|
|
166
165
|
});
|
|
167
|
-
},
|
|
166
|
+
}, FILTER_SELECTION_DEBOUNCE_MS),
|
|
168
167
|
_useDebouncedCallback2 = (0, _slicedToArray2.default)(_useDebouncedCallback, 1),
|
|
169
168
|
debouncedBasicFilterSelectionChange = _useDebouncedCallback2[0];
|
|
170
169
|
var handleBasicFilterSelectionChange = (0, _react.useCallback)(function (filterType, options) {
|
|
@@ -224,7 +223,7 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
224
223
|
onChange: onQueryChange,
|
|
225
224
|
onSearch: handleSearch,
|
|
226
225
|
query: jql
|
|
227
|
-
}), (0, _react2.jsx)(
|
|
226
|
+
}), (0, _react2.jsx)(_modeSwitcher.ModeSwitcher, {
|
|
228
227
|
onOptionValueChange: onSearchMethodChange,
|
|
229
228
|
selectedOptionValue: currentSearchMethod,
|
|
230
229
|
options: [{
|
|
@@ -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
|
-
|
|
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
|
|
@@ -20,7 +20,7 @@ var modeSwitcherStyles = (0, _react2.css)({
|
|
|
20
20
|
display: 'inline-flex',
|
|
21
21
|
gap: "var(--ds-space-050, 4px)",
|
|
22
22
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
23
|
-
padding: "var(--ds-space-
|
|
23
|
+
padding: "var(--ds-space-050, 4px)",
|
|
24
24
|
'&:disabled': {
|
|
25
25
|
opacity: '0.5'
|
|
26
26
|
},
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
)
|
|
90
|
+
)`,
|
|
91
|
+
backgroundPosition: 'left center',
|
|
91
92
|
size: `40px 100%`,
|
|
92
93
|
attachment: `local`
|
|
93
94
|
};
|
|
94
95
|
const topWhiteOverrideGradient = {
|
|
95
|
-
|
|
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
|
-
)
|
|
101
|
+
)`,
|
|
102
|
+
backgroundPosition: 'top center',
|
|
101
103
|
size: `100% 100px`,
|
|
102
104
|
attachment: `local`
|
|
103
105
|
};
|
|
104
106
|
const rightWhiteOverrideGradient = {
|
|
105
|
-
|
|
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
|
-
)
|
|
112
|
+
)`,
|
|
113
|
+
backgroundPosition: 'right center',
|
|
111
114
|
size: `40px 100%`,
|
|
112
115
|
attachment: `local`
|
|
113
116
|
};
|
|
114
117
|
const bottomWhiteOverride = {
|
|
115
|
-
|
|
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
|
-
)
|
|
123
|
+
)`,
|
|
124
|
+
backgroundPosition: 'bottom center',
|
|
121
125
|
size: `100% 40px`,
|
|
122
126
|
attachment: `local`
|
|
123
127
|
};
|
|
124
128
|
const leftShadowGradient = {
|
|
125
|
-
|
|
129
|
+
backgroundImage: `
|
|
126
130
|
linear-gradient(
|
|
127
131
|
90deg,
|
|
128
132
|
${shadowColor},
|
|
129
133
|
rgba(0, 0, 0, 0)
|
|
130
|
-
)
|
|
134
|
+
)`,
|
|
135
|
+
backgroundPosition: 'left center',
|
|
131
136
|
size: `14px 100%`,
|
|
132
137
|
attachment: `scroll`
|
|
133
138
|
};
|
|
134
139
|
const topShadowGradient = {
|
|
135
|
-
|
|
140
|
+
backgroundImage: `
|
|
136
141
|
linear-gradient(
|
|
137
142
|
0deg,
|
|
138
143
|
rgba(0, 0, 0, 0),
|
|
139
144
|
${shadowColorLight}
|
|
140
|
-
)
|
|
145
|
+
)`,
|
|
146
|
+
backgroundPosition: '0 52px',
|
|
141
147
|
size: `100% 14px`,
|
|
142
148
|
attachment: `scroll`
|
|
143
149
|
};
|
|
144
150
|
const rightShadowGradient = {
|
|
145
|
-
|
|
151
|
+
backgroundImage: `
|
|
146
152
|
linear-gradient(
|
|
147
153
|
90deg,
|
|
148
154
|
rgba(0, 0, 0, 0),
|
|
149
155
|
${shadowColor}
|
|
150
|
-
)
|
|
156
|
+
)`,
|
|
157
|
+
backgroundPosition: 'right center',
|
|
151
158
|
size: `14px 100%`,
|
|
152
159
|
attachment: `scroll`
|
|
153
160
|
};
|
|
154
161
|
const bottomShadowGradient = {
|
|
155
|
-
|
|
162
|
+
backgroundImage: `
|
|
156
163
|
linear-gradient(
|
|
157
164
|
0deg,
|
|
158
165
|
${shadowColorLight},
|
|
159
166
|
rgba(0, 0, 0, 0)
|
|
160
|
-
)
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
}) =>
|
|
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
|
-
|
|
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
|
|
@@ -73,17 +73,17 @@ const AsyncPopupSelect = ({
|
|
|
73
73
|
}
|
|
74
74
|
}, [selectedOptions, filterOptions, sortedOptions]);
|
|
75
75
|
const sortOptionsOnResolve = useCallback(() => {
|
|
76
|
-
// sortedOptions is empty initially, this will take care of setting the initial value and bring the selected items to the top
|
|
77
|
-
if (sortedOptions.length === 0) {
|
|
78
|
-
return sortOptionsOnPopupOpen();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
76
|
// when the user is searching, we want the search result to be displayed as it is, and the select component will take care of marking the selected items
|
|
82
77
|
if (searchTerm) {
|
|
83
78
|
sortPaginatedResults.current = false; // set to false to indicate pagination resolve action is completed from the sorting perspective
|
|
84
79
|
return setSortedOptions(filterOptions);
|
|
85
80
|
}
|
|
86
81
|
|
|
82
|
+
// sortedOptions is empty initially, this will take care of setting the initial value and bring the selected items to the top
|
|
83
|
+
if (sortedOptions.length === 0) {
|
|
84
|
+
return sortOptionsOnPopupOpen();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
87
|
// this block handles the pagination, where on pagination, we will just append newOptions to the current list
|
|
88
88
|
if (sortPaginatedResults.current) {
|
|
89
89
|
const newOptions = filterOptions.filter(option => !sortedOptions.find(sortedOption => sortedOption.value === option.value));
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Flex } from '@atlaskit/primitives';
|
|
2
|
+
import { Flex, xcss } from '@atlaskit/primitives';
|
|
3
3
|
import { components } from '@atlaskit/select';
|
|
4
4
|
import Spinner from '@atlaskit/spinner';
|
|
5
5
|
import ShowMoreButton from '../async-popup-select/showMoreButton';
|
|
6
6
|
import CustomErrorMessage from './errorMessage';
|
|
7
7
|
import CustomDropdownLoadingMessage from './loadingMessage';
|
|
8
8
|
import CustomNoOptionsMessage from './noOptionsMessage';
|
|
9
|
+
const inlineSpinnerStyles = xcss({
|
|
10
|
+
paddingTop: "var(--ds-space-075, 6px)"
|
|
11
|
+
});
|
|
9
12
|
const CustomMenuList = ({
|
|
10
13
|
children,
|
|
11
14
|
...props
|
|
@@ -23,7 +26,8 @@ const CustomMenuList = ({
|
|
|
23
26
|
const shouldDisplayShowMore = showMore && !isLoadingMore;
|
|
24
27
|
const isLoadingMoreData = !shouldDisplayShowMore && isLoadingMore;
|
|
25
28
|
const InlineSpinner = () => /*#__PURE__*/React.createElement(Flex, {
|
|
26
|
-
justifyContent: "center"
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
xcss: inlineSpinnerStyles
|
|
27
31
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
28
32
|
size: "medium"
|
|
29
33
|
}));
|
|
@@ -8,7 +8,6 @@ import { Flex, xcss } from '@atlaskit/primitives';
|
|
|
8
8
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
9
9
|
import { BasicFilters } from '../basic-filters';
|
|
10
10
|
import { useHydrateJqlQuery } from '../basic-filters/hooks/useHydrateJqlQuery';
|
|
11
|
-
import { SEARCH_DEBOUNCE_MS } from '../basic-filters/ui/async-popup-select';
|
|
12
11
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
13
12
|
import { BasicSearchInput } from '../basic-search-input';
|
|
14
13
|
import { JiraJQLEditor } from '../jql-editor';
|
|
@@ -25,7 +24,7 @@ const basicSearchInputContainerStyles = xcss({
|
|
|
25
24
|
});
|
|
26
25
|
export const DEFAULT_JQL_QUERY = 'created >= -30d order by created DESC';
|
|
27
26
|
export const ALLOWED_ORDER_BY_KEYS = ['key', 'summary', 'assignee', 'status', 'created'];
|
|
28
|
-
const
|
|
27
|
+
export const FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
29
28
|
export const JiraSearchContainer = props => {
|
|
30
29
|
const {
|
|
31
30
|
isSearching,
|
|
@@ -129,7 +128,7 @@ export const JiraSearchContainer = props => {
|
|
|
129
128
|
basicFilterSelections: filterSelections,
|
|
130
129
|
isQueryComplex: isCurrentQueryComplex
|
|
131
130
|
});
|
|
132
|
-
},
|
|
131
|
+
}, FILTER_SELECTION_DEBOUNCE_MS);
|
|
133
132
|
const handleBasicFilterSelectionChange = useCallback((filterType, options) => {
|
|
134
133
|
const updatedSelection = {
|
|
135
134
|
...filterSelections,
|
|
@@ -192,7 +191,7 @@ export const JiraSearchContainer = props => {
|
|
|
192
191
|
onChange: onQueryChange,
|
|
193
192
|
onSearch: handleSearch,
|
|
194
193
|
query: jql
|
|
195
|
-
}), jsx(
|
|
194
|
+
}), jsx(ModeSwitcher, {
|
|
196
195
|
onOptionValueChange: onSearchMethodChange,
|
|
197
196
|
selectedOptionValue: currentSearchMethod,
|
|
198
197
|
options: [{
|
|
@@ -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
|
-
|
|
52
|
+
backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
|
|
53
|
+
backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
|
|
53
54
|
backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
|
|
54
55
|
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
55
56
|
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
@@ -12,7 +12,7 @@ const modeSwitcherStyles = css({
|
|
|
12
12
|
display: 'inline-flex',
|
|
13
13
|
gap: "var(--ds-space-050, 4px)",
|
|
14
14
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
15
|
-
padding: "var(--ds-space-
|
|
15
|
+
padding: "var(--ds-space-050, 4px)",
|
|
16
16
|
'&:disabled': {
|
|
17
17
|
opacity: '0.5'
|
|
18
18
|
},
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
116
|
-
var
|
|
117
|
-
return
|
|
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 (
|
|
121
|
-
var size =
|
|
132
|
+
backgroundSize: shadows.map(function (_ref3) {
|
|
133
|
+
var size = _ref3.size;
|
|
122
134
|
return size;
|
|
123
135
|
}).join(','),
|
|
124
|
-
backgroundAttachment: shadows.map(function (
|
|
125
|
-
var 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
|
-
|
|
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(
|
|
193
|
-
var testId =
|
|
194
|
-
onNextPage =
|
|
195
|
-
onLoadDatasourceDetails =
|
|
196
|
-
items =
|
|
197
|
-
columns =
|
|
198
|
-
|
|
199
|
-
renderItem =
|
|
200
|
-
visibleColumnKeys =
|
|
201
|
-
onVisibleColumnKeysChange =
|
|
202
|
-
columnCustomSizes =
|
|
203
|
-
onColumnResize =
|
|
204
|
-
status =
|
|
205
|
-
hasNextPage =
|
|
206
|
-
scrollableContainerHeight =
|
|
207
|
-
parentContainerRenderInstanceId =
|
|
208
|
-
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 (
|
|
244
|
-
var 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 (
|
|
260
|
-
var key =
|
|
261
|
-
title =
|
|
262
|
-
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(
|
|
305
|
-
var location =
|
|
306
|
-
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(
|
|
323
|
-
var location =
|
|
324
|
-
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(
|
|
335
|
-
var source =
|
|
336
|
-
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 (
|
|
385
|
+
cells: visibleSortedColumns.map(function (_ref11) {
|
|
372
386
|
var _newRowData$key;
|
|
373
|
-
var key =
|
|
374
|
-
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 (
|
|
476
|
-
var key =
|
|
477
|
-
content =
|
|
478
|
-
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 (
|
|
490
|
-
var cells =
|
|
491
|
-
var cell = cells.find(function (
|
|
492
|
-
var cellKey =
|
|
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 (
|
|
535
|
-
var key =
|
|
536
|
-
cells =
|
|
537
|
-
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 (
|
|
543
|
-
var cellKey =
|
|
544
|
-
content =
|
|
545
|
-
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
|
} : {
|
|
@@ -107,17 +107,17 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
107
107
|
}
|
|
108
108
|
}, [selectedOptions, filterOptions, sortedOptions]);
|
|
109
109
|
var sortOptionsOnResolve = useCallback(function () {
|
|
110
|
-
// sortedOptions is empty initially, this will take care of setting the initial value and bring the selected items to the top
|
|
111
|
-
if (sortedOptions.length === 0) {
|
|
112
|
-
return sortOptionsOnPopupOpen();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
110
|
// when the user is searching, we want the search result to be displayed as it is, and the select component will take care of marking the selected items
|
|
116
111
|
if (searchTerm) {
|
|
117
112
|
sortPaginatedResults.current = false; // set to false to indicate pagination resolve action is completed from the sorting perspective
|
|
118
113
|
return setSortedOptions(filterOptions);
|
|
119
114
|
}
|
|
120
115
|
|
|
116
|
+
// sortedOptions is empty initially, this will take care of setting the initial value and bring the selected items to the top
|
|
117
|
+
if (sortedOptions.length === 0) {
|
|
118
|
+
return sortOptionsOnPopupOpen();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
121
|
// this block handles the pagination, where on pagination, we will just append newOptions to the current list
|
|
122
122
|
if (sortPaginatedResults.current) {
|
|
123
123
|
var newOptions = filterOptions.filter(function (option) {
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["children"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Flex } from '@atlaskit/primitives';
|
|
4
|
+
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
5
|
import { components } from '@atlaskit/select';
|
|
6
6
|
import Spinner from '@atlaskit/spinner';
|
|
7
7
|
import ShowMoreButton from '../async-popup-select/showMoreButton';
|
|
8
8
|
import CustomErrorMessage from './errorMessage';
|
|
9
9
|
import CustomDropdownLoadingMessage from './loadingMessage';
|
|
10
10
|
import CustomNoOptionsMessage from './noOptionsMessage';
|
|
11
|
+
var inlineSpinnerStyles = xcss({
|
|
12
|
+
paddingTop: "var(--ds-space-075, 6px)"
|
|
13
|
+
});
|
|
11
14
|
var CustomMenuList = function CustomMenuList(_ref) {
|
|
12
15
|
var children = _ref.children,
|
|
13
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -24,7 +27,8 @@ var CustomMenuList = function CustomMenuList(_ref) {
|
|
|
24
27
|
var isLoadingMoreData = !shouldDisplayShowMore && isLoadingMore;
|
|
25
28
|
var InlineSpinner = function InlineSpinner() {
|
|
26
29
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
27
|
-
justifyContent: "center"
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
xcss: inlineSpinnerStyles
|
|
28
32
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
29
33
|
size: "medium"
|
|
30
34
|
}));
|
|
@@ -14,7 +14,6 @@ import { Flex, xcss } from '@atlaskit/primitives';
|
|
|
14
14
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
15
15
|
import { BasicFilters } from '../basic-filters';
|
|
16
16
|
import { useHydrateJqlQuery } from '../basic-filters/hooks/useHydrateJqlQuery';
|
|
17
|
-
import { SEARCH_DEBOUNCE_MS } from '../basic-filters/ui/async-popup-select';
|
|
18
17
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
19
18
|
import { BasicSearchInput } from '../basic-search-input';
|
|
20
19
|
import { JiraJQLEditor } from '../jql-editor';
|
|
@@ -31,7 +30,7 @@ var basicSearchInputContainerStyles = xcss({
|
|
|
31
30
|
});
|
|
32
31
|
export var DEFAULT_JQL_QUERY = 'created >= -30d order by created DESC';
|
|
33
32
|
export var ALLOWED_ORDER_BY_KEYS = ['key', 'summary', 'assignee', 'status', 'created'];
|
|
34
|
-
var
|
|
33
|
+
export var FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
35
34
|
export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
36
35
|
var isSearching = props.isSearching,
|
|
37
36
|
parameters = props.parameters,
|
|
@@ -155,7 +154,7 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
155
154
|
basicFilterSelections: filterSelections,
|
|
156
155
|
isQueryComplex: isCurrentQueryComplex
|
|
157
156
|
});
|
|
158
|
-
},
|
|
157
|
+
}, FILTER_SELECTION_DEBOUNCE_MS),
|
|
159
158
|
_useDebouncedCallback2 = _slicedToArray(_useDebouncedCallback, 1),
|
|
160
159
|
debouncedBasicFilterSelectionChange = _useDebouncedCallback2[0];
|
|
161
160
|
var handleBasicFilterSelectionChange = useCallback(function (filterType, options) {
|
|
@@ -215,7 +214,7 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
215
214
|
onChange: onQueryChange,
|
|
216
215
|
onSearch: handleSearch,
|
|
217
216
|
query: jql
|
|
218
|
-
}), jsx(
|
|
217
|
+
}), jsx(ModeSwitcher, {
|
|
219
218
|
onOptionValueChange: onSearchMethodChange,
|
|
220
219
|
selectedOptionValue: currentSearchMethod,
|
|
221
220
|
options: [{
|
|
@@ -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
|
-
|
|
59
|
+
backgroundImage: scrollableContainerShadowsCssComponents.backgroundImage,
|
|
60
|
+
backgroundPosition: scrollableContainerShadowsCssComponents.backgroundPosition,
|
|
60
61
|
backgroundRepeat: scrollableContainerShadowsCssComponents.backgroundRepeat,
|
|
61
62
|
backgroundSize: scrollableContainerShadowsCssComponents.backgroundSize,
|
|
62
63
|
backgroundAttachment: scrollableContainerShadowsCssComponents.backgroundAttachment
|
|
@@ -12,7 +12,7 @@ var modeSwitcherStyles = css({
|
|
|
12
12
|
display: 'inline-flex',
|
|
13
13
|
gap: "var(--ds-space-050, 4px)",
|
|
14
14
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
15
|
-
padding: "var(--ds-space-
|
|
15
|
+
padding: "var(--ds-space-050, 4px)",
|
|
16
16
|
'&:disabled': {
|
|
17
17
|
opacity: '0.5'
|
|
18
18
|
},
|
|
@@ -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
|
-
|
|
7
|
+
backgroundImage: string;
|
|
8
|
+
backgroundPosition: string;
|
|
8
9
|
backgroundRepeat: string;
|
|
9
10
|
backgroundSize: string;
|
|
10
11
|
backgroundAttachment: string;
|
|
@@ -4,6 +4,7 @@ import { SelectedOptionsMap } from '../basic-filters/types';
|
|
|
4
4
|
import { JiraIssueDatasourceParameters, JiraIssueDatasourceParametersQuery } from '../types';
|
|
5
5
|
export declare const DEFAULT_JQL_QUERY = "created >= -30d order by created DESC";
|
|
6
6
|
export declare const ALLOWED_ORDER_BY_KEYS: string[];
|
|
7
|
+
export declare const FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
7
8
|
export interface SearchContainerProps {
|
|
8
9
|
isSearching?: boolean;
|
|
9
10
|
onSearch: (query: JiraIssueDatasourceParametersQuery, { searchMethod, basicFilterSelections, }: {
|
|
@@ -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
|
-
|
|
7
|
+
backgroundImage: string;
|
|
8
|
+
backgroundPosition: string;
|
|
8
9
|
backgroundRepeat: string;
|
|
9
10
|
backgroundSize: string;
|
|
10
11
|
backgroundAttachment: string;
|
|
@@ -4,6 +4,7 @@ import { SelectedOptionsMap } from '../basic-filters/types';
|
|
|
4
4
|
import { JiraIssueDatasourceParameters, JiraIssueDatasourceParametersQuery } from '../types';
|
|
5
5
|
export declare const DEFAULT_JQL_QUERY = "created >= -30d order by created DESC";
|
|
6
6
|
export declare const ALLOWED_ORDER_BY_KEYS: string[];
|
|
7
|
+
export declare const FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
7
8
|
export interface SearchContainerProps {
|
|
8
9
|
isSearching?: boolean;
|
|
9
10
|
onSearch: (query: JiraIssueDatasourceParametersQuery, { searchMethod, basicFilterSelections, }: {
|
|
@@ -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
|
+
};
|