@atlaskit/link-datasource 6.6.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +3 -3
- package/dist/cjs/state/actions/index.js +3 -3
- package/dist/cjs/ui/common/modal/datasource-context/index.js +4 -2
- package/dist/cjs/ui/common/modal/datasources-table-in-modal-preview/index.js +5 -1
- package/dist/cjs/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js +22 -0
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +14 -0
- package/dist/cjs/ui/issue-like-table/index.compiled.css +3 -0
- package/dist/cjs/ui/issue-like-table/index.js +142 -89
- package/dist/cjs/ui/issue-like-table/table-settings-menu/index.compiled.css +6 -0
- package/dist/cjs/ui/issue-like-table/table-settings-menu/index.js +96 -0
- package/dist/cjs/ui/issue-like-table/table-settings-menu/messages.js +24 -0
- package/dist/es2019/hooks/useDatasourceTableState.js +1 -1
- package/dist/es2019/state/actions/index.js +1 -1
- package/dist/es2019/ui/common/modal/datasource-context/index.js +4 -2
- package/dist/es2019/ui/common/modal/datasources-table-in-modal-preview/index.js +5 -1
- package/dist/es2019/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js +22 -0
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +33 -17
- package/dist/es2019/ui/issue-like-table/index.compiled.css +3 -0
- package/dist/es2019/ui/issue-like-table/index.js +53 -5
- package/dist/es2019/ui/issue-like-table/table-settings-menu/index.compiled.css +6 -0
- package/dist/es2019/ui/issue-like-table/table-settings-menu/index.js +76 -0
- package/dist/es2019/ui/issue-like-table/table-settings-menu/messages.js +18 -0
- package/dist/esm/hooks/useDatasourceTableState.js +1 -1
- package/dist/esm/state/actions/index.js +1 -1
- package/dist/esm/ui/common/modal/datasource-context/index.js +4 -2
- package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/index.js +5 -1
- package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js +22 -0
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +5 -1
- package/dist/esm/ui/issue-like-table/column-picker/index.js +14 -0
- package/dist/esm/ui/issue-like-table/index.compiled.css +3 -0
- package/dist/esm/ui/issue-like-table/index.js +140 -87
- package/dist/esm/ui/issue-like-table/table-settings-menu/index.compiled.css +6 -0
- package/dist/esm/ui/issue-like-table/table-settings-menu/index.js +87 -0
- package/dist/esm/ui/issue-like-table/table-settings-menu/messages.js +18 -0
- package/dist/types/state/actions/index.d.ts +1 -1
- package/dist/types/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.d.ts +1 -1
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +2 -2
- package/dist/types/ui/datasource-table-view/types.d.ts +1 -1
- package/dist/types/ui/issue-like-table/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/table-settings-menu/index.d.ts +8 -0
- package/dist/types/ui/issue-like-table/table-settings-menu/messages.d.ts +17 -0
- package/dist/types/ui/issue-like-table/types.d.ts +6 -0
- package/examples-helpers/buildAssetsIssuesTable.tsx +2 -0
- package/examples-helpers/buildConfluenceSearchTable.tsx +2 -0
- package/examples-helpers/buildIssueLikeTable.tsx +2 -0
- package/examples-helpers/buildJiraIssuesTable.tsx +2 -0
- package/examples-helpers/useAssetsTableProps.tsx +6 -0
- package/examples-helpers/useCommonTableProps.tsx +5 -2
- package/package.json +62 -58
- package/report.api.md +0 -191
package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useCallback, useState } from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
3
4
|
export var useColumnWrapping = function useColumnWrapping() {
|
|
4
5
|
var initialWrappedColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
5
6
|
var _useState = useState(initialWrappedColumnKeys),
|
|
@@ -15,6 +16,27 @@ export var useColumnWrapping = function useColumnWrapping() {
|
|
|
15
16
|
}
|
|
16
17
|
setWrappedColumnKeys(Array.from(set));
|
|
17
18
|
}, [wrappedColumnKeys]);
|
|
19
|
+
var onWrappedColumnChangeWithLatestState = useCallback(function (key, isWrapped) {
|
|
20
|
+
setWrappedColumnKeys(function (currentWrappedColumnKeys) {
|
|
21
|
+
var nextWrappedColumnKeys = new Set(currentWrappedColumnKeys);
|
|
22
|
+
if (isWrapped) {
|
|
23
|
+
nextWrappedColumnKeys.add(key);
|
|
24
|
+
} else {
|
|
25
|
+
nextWrappedColumnKeys.delete(key);
|
|
26
|
+
}
|
|
27
|
+
return Array.from(nextWrappedColumnKeys);
|
|
28
|
+
});
|
|
29
|
+
}, []);
|
|
30
|
+
var onWrappedColumnsChange = useCallback(function (nextWrappedColumnKeys) {
|
|
31
|
+
setWrappedColumnKeys(nextWrappedColumnKeys);
|
|
32
|
+
}, []);
|
|
33
|
+
if (fg('platform_lp_sllv_table_settings_menu')) {
|
|
34
|
+
return {
|
|
35
|
+
wrappedColumnKeys: wrappedColumnKeys,
|
|
36
|
+
onWrappedColumnChange: onWrappedColumnChangeWithLatestState,
|
|
37
|
+
onWrappedColumnsChange: onWrappedColumnsChange
|
|
38
|
+
};
|
|
39
|
+
}
|
|
18
40
|
return {
|
|
19
41
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
20
42
|
onWrappedColumnChange: onWrappedColumnChange
|
|
@@ -42,6 +42,7 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
42
42
|
onColumnResize = _ref.onColumnResize,
|
|
43
43
|
wrappedColumnKeys = _ref.wrappedColumnKeys,
|
|
44
44
|
onWrappedColumnChange = _ref.onWrappedColumnChange,
|
|
45
|
+
onWrappedColumnsChange = _ref.onWrappedColumnsChange,
|
|
45
46
|
_ref$scrollableContai = _ref.scrollableContainerHeight,
|
|
46
47
|
scrollableContainerHeight = _ref$scrollableContai === void 0 ? DefaultScrollableContainerHeight : _ref$scrollableContai;
|
|
47
48
|
// Local copy lets us apply in-session sort mutations without mutating external parameters.
|
|
@@ -227,7 +228,10 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
227
228
|
sortState: sortState
|
|
228
229
|
} : {}, {
|
|
229
230
|
wrappedColumnKeys: wrappedColumnKeys,
|
|
230
|
-
onWrappedColumnChange: onWrappedColumnChange
|
|
231
|
+
onWrappedColumnChange: onWrappedColumnChange
|
|
232
|
+
}, onWrappedColumnsChange && fg('platform_lp_sllv_table_settings_menu') ? {
|
|
233
|
+
onWrappedColumnsChange: onWrappedColumnsChange
|
|
234
|
+
} : {}, {
|
|
231
235
|
scrollableContainerHeight: isInPDFRender ? undefined : fg('lp_enable_datasource-table-view_height_override') ? scrollableContainerHeight : DefaultScrollableContainerHeight,
|
|
232
236
|
extensionKey: extensionKey
|
|
233
237
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
@@ -9,8 +9,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
9
9
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
10
10
|
import { useIntl } from 'react-intl';
|
|
11
11
|
import Button from '@atlaskit/button/default/button';
|
|
12
|
+
import IconButton from '@atlaskit/button/icon/button';
|
|
12
13
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
13
14
|
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
15
|
+
import TableColumnsDistributeIcon from '@atlaskit/icon/core/table-columns-distribute';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
17
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
15
18
|
import { createFilter } from '@atlaskit/react-select/filters';
|
|
16
19
|
import { PopupSelect } from '@atlaskit/select/popup-select';
|
|
@@ -141,6 +144,17 @@ export var ColumnPicker = function ColumnPicker(_ref) {
|
|
|
141
144
|
target: function target(_ref8) {
|
|
142
145
|
var isOpen = _ref8.isOpen,
|
|
143
146
|
triggerProps = _objectWithoutProperties(_ref8, _excluded);
|
|
147
|
+
if (fg('platform_lp_sllv_table_settings_menu')) {
|
|
148
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({}, triggerProps, {
|
|
149
|
+
appearance: "default",
|
|
150
|
+
icon: TableColumnsDistributeIcon,
|
|
151
|
+
isSelected: isOpen,
|
|
152
|
+
isTooltipDisabled: false,
|
|
153
|
+
label: intl.formatMessage(columnPickerMessages.tooltip),
|
|
154
|
+
spacing: "default",
|
|
155
|
+
testId: "column-picker-trigger-button"
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
144
158
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
145
159
|
content: intl.formatMessage(columnPickerMessages.tooltip)
|
|
146
160
|
}, function (tooltipProps) {
|
|
@@ -51,6 +51,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
|
|
|
51
51
|
.ProseMirror .pm-table-wrapper>table thead ._1pmc1b66{padding-right:var(--ds-space-050,4px)}
|
|
52
52
|
.ProseMirror .pm-table-wrapper>table thead ._1pmsusvi:last-of-type{box-sizing:border-box}
|
|
53
53
|
.ProseMirror .pm-table-wrapper>table thead ._1wwnusvi{box-sizing:border-box}
|
|
54
|
+
.ProseMirror .pm-table-wrapper>table thead ._2k5114em:last-of-type{width:95px}
|
|
54
55
|
.ProseMirror .pm-table-wrapper>table thead ._2k51ys9h:last-of-type{width:5pc}
|
|
55
56
|
.ProseMirror .pm-table-wrapper>table thead ._6dd7v77o{padding-bottom:var(--ds-space-025,2px)}
|
|
56
57
|
.ProseMirror .pm-table-wrapper>table thead ._7cz2v77o{padding-top:var(--ds-space-025,2px)}
|
|
@@ -118,6 +119,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
|
|
|
118
119
|
._kqsw1if8{position:sticky}
|
|
119
120
|
._kqswh2mm{position:relative}
|
|
120
121
|
._lura1osq [data-testid=datasource-header-content--container]{width:100%}
|
|
122
|
+
._mgul14em:last-of-type{width:95px}
|
|
121
123
|
._mgulys9h:last-of-type{width:5pc}
|
|
122
124
|
._ml92nkob:last-of-type{vertical-align:middle}
|
|
123
125
|
._mrkbidpf{border-bottom-left-radius:0}
|
|
@@ -159,6 +161,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}.ProseMirr
|
|
|
159
161
|
.pm-table-wrapper>table thead ._3mvc1tcg{line-height:24px}
|
|
160
162
|
.pm-table-wrapper>table thead ._7okwusvi:last-of-type{box-sizing:border-box}
|
|
161
163
|
.pm-table-wrapper>table thead ._7s0n1if8:last-of-type{position:sticky}
|
|
164
|
+
.pm-table-wrapper>table thead ._efqo14em:last-of-type{width:95px}
|
|
162
165
|
.pm-table-wrapper>table thead ._efqoys9h:last-of-type{width:5pc}
|
|
163
166
|
.pm-table-wrapper>table thead ._gdprpxbi:last-of-type{padding-right:var(--ds-space-200,1pc)}
|
|
164
167
|
.pm-table-wrapper>table thead ._mowjusic:last-of-type{text-align:right}
|
|
@@ -9,7 +9,8 @@ var _excluded = ["as", "style"],
|
|
|
9
9
|
_excluded2 = ["as", "style"],
|
|
10
10
|
_excluded3 = ["as", "style"],
|
|
11
11
|
_excluded4 = ["as", "style"],
|
|
12
|
-
_excluded5 = ["as", "style"]
|
|
12
|
+
_excluded5 = ["as", "style"],
|
|
13
|
+
_excluded6 = ["as", "style"];
|
|
13
14
|
import "./index.compiled.css";
|
|
14
15
|
import { forwardRef } from 'react';
|
|
15
16
|
import * as React from 'react';
|
|
@@ -30,16 +31,17 @@ import { Skeleton } from '@atlaskit/linking-common';
|
|
|
30
31
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
31
32
|
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/extract-closest-edge';
|
|
32
33
|
import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';
|
|
33
|
-
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
34
|
+
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll/auto-scroller';
|
|
34
35
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
35
36
|
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
36
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
37
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
37
38
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
38
39
|
import { startUfoExperience, succeedUfoExperience } from '../../analytics/ufoExperiences';
|
|
39
40
|
import { useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
|
|
40
41
|
import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
|
|
41
42
|
import { NoResults } from '../common/error-state/no-results';
|
|
42
43
|
import { ColumnPicker } from './column-picker';
|
|
44
|
+
import { hasAvailableTableSettings, TableSettingsMenu } from './table-settings-menu';
|
|
43
45
|
import { DragColumnPreview } from './drag-column-preview';
|
|
44
46
|
import { DraggableTableHeading } from './draggable-table-heading';
|
|
45
47
|
import TableEmptyState from './empty-state';
|
|
@@ -51,6 +53,7 @@ import { COLUMN_BASE_WIDTH, getFieldLabelById, getWidthCss } from './utils';
|
|
|
51
53
|
var tableSidePadding = "var(--ds-space-200, 16px)";
|
|
52
54
|
var tableHeadStyles = null;
|
|
53
55
|
var columnPickerWidth = 80;
|
|
56
|
+
var columnPickerWithSettingsWidth = 95;
|
|
54
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
55
58
|
var ColumnPickerHeader = forwardRef(function (_ref, __cmplr) {
|
|
56
59
|
var _ref$as = _ref.as,
|
|
@@ -63,9 +66,24 @@ var ColumnPickerHeader = forwardRef(function (_ref, __cmplr) {
|
|
|
63
66
|
className: ax(["_1bqmidpf _2eacidpf _1rmlidpf _13xs13hi _19xw13hi _ex0g13hi _1rag1uh4 _1ul51uh4 _12ch1uh4 _12ruusvi _1pmsusvi _7okwusvi _mgulys9h _2k51ys9h _efqoys9h _1xzrzo7u _1ejpzo7u _1fmczo7u _77i31if8 _zjk41if8 _7s0n1if8 _3t471vc6 _9g2k1vc6 _1h0z1vc6 _1o59pxbi _1l3vpxbi _gdprpxbi _ml92nkob _1nfwnkob _11ljnkob _1ixkusic _s1peusic _mowjusic", __cmplp.className])
|
|
64
67
|
}));
|
|
65
68
|
});
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
66
70
|
if (process.env.NODE_ENV !== 'production') {
|
|
67
71
|
ColumnPickerHeader.displayName = 'ColumnPickerHeader';
|
|
68
72
|
}
|
|
73
|
+
var ColumnPickerHeaderWithSettings = forwardRef(function (_ref2, __cmplr) {
|
|
74
|
+
var _ref2$as = _ref2.as,
|
|
75
|
+
C = _ref2$as === void 0 ? "th" : _ref2$as,
|
|
76
|
+
__cmpls = _ref2.style,
|
|
77
|
+
__cmplp = _objectWithoutProperties(_ref2, _excluded2);
|
|
78
|
+
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
79
|
+
style: __cmpls,
|
|
80
|
+
ref: __cmplr,
|
|
81
|
+
className: ax(["_1bqmidpf _2eacidpf _1rmlidpf _13xs13hi _19xw13hi _ex0g13hi _1rag1uh4 _1ul51uh4 _12ch1uh4 _12ruusvi _1pmsusvi _7okwusvi _mgul14em _2k5114em _efqo14em _1xzrzo7u _1ejpzo7u _1fmczo7u _77i31if8 _zjk41if8 _7s0n1if8 _3t471vc6 _9g2k1vc6 _1h0z1vc6 _1o59pxbi _1l3vpxbi _gdprpxbi _ml92nkob _1nfwnkob _11ljnkob _1ixkusic _s1peusic _mowjusic", __cmplp.className])
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
85
|
+
ColumnPickerHeaderWithSettings.displayName = 'ColumnPickerHeaderWithSettings';
|
|
86
|
+
}
|
|
69
87
|
var truncateStyles = null;
|
|
70
88
|
var wrappedStyles = null;
|
|
71
89
|
var richTextCellStyles = null;
|
|
@@ -88,11 +106,11 @@ var getHorizontalScrollParent = function getHorizontalScrollParent(element) {
|
|
|
88
106
|
};
|
|
89
107
|
|
|
90
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
91
|
-
var Table = forwardRef(function (
|
|
92
|
-
var
|
|
93
|
-
C =
|
|
94
|
-
__cmpls =
|
|
95
|
-
__cmplp = _objectWithoutProperties(
|
|
109
|
+
var Table = forwardRef(function (_ref3, __cmplr) {
|
|
110
|
+
var _ref3$as = _ref3.as,
|
|
111
|
+
C = _ref3$as === void 0 ? "table" : _ref3$as,
|
|
112
|
+
__cmpls = _ref3.style,
|
|
113
|
+
__cmplp = _objectWithoutProperties(_ref3, _excluded3);
|
|
96
114
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
97
115
|
style: __cmpls,
|
|
98
116
|
ref: __cmplr,
|
|
@@ -104,11 +122,11 @@ var Table = forwardRef(function (_ref2, __cmplr) {
|
|
|
104
122
|
if (process.env.NODE_ENV !== 'production') {
|
|
105
123
|
Table.displayName = 'Table';
|
|
106
124
|
}
|
|
107
|
-
var TableHeading = forwardRef(function (
|
|
108
|
-
var
|
|
109
|
-
C =
|
|
110
|
-
__cmpls =
|
|
111
|
-
__cmplp = _objectWithoutProperties(
|
|
125
|
+
var TableHeading = forwardRef(function (_ref4, __cmplr) {
|
|
126
|
+
var _ref4$as = _ref4.as,
|
|
127
|
+
C = _ref4$as === void 0 ? "th" : _ref4$as,
|
|
128
|
+
__cmpls = _ref4.style,
|
|
129
|
+
__cmplp = _objectWithoutProperties(_ref4, _excluded4);
|
|
112
130
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
113
131
|
style: __cmpls,
|
|
114
132
|
ref: __cmplr,
|
|
@@ -120,11 +138,11 @@ var TableHeading = forwardRef(function (_ref3, __cmplr) {
|
|
|
120
138
|
if (process.env.NODE_ENV !== 'production') {
|
|
121
139
|
TableHeading.displayName = 'TableHeading';
|
|
122
140
|
}
|
|
123
|
-
var InlineEditableTableCell = forwardRef(function (
|
|
124
|
-
var
|
|
125
|
-
C =
|
|
126
|
-
__cmpls =
|
|
127
|
-
__cmplp = _objectWithoutProperties(
|
|
141
|
+
var InlineEditableTableCell = forwardRef(function (_ref5, __cmplr) {
|
|
142
|
+
var _ref5$as = _ref5.as,
|
|
143
|
+
C = _ref5$as === void 0 ? "td" : _ref5$as,
|
|
144
|
+
__cmpls = _ref5.style,
|
|
145
|
+
__cmplp = _objectWithoutProperties(_ref5, _excluded5);
|
|
128
146
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
129
147
|
style: __cmpls,
|
|
130
148
|
ref: __cmplr,
|
|
@@ -154,11 +172,11 @@ var headerStyles = null;
|
|
|
154
172
|
var headingHoverEffectStyles = null;
|
|
155
173
|
|
|
156
174
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Matches DraggableTableHeading button normalization.
|
|
157
|
-
var SortableHeaderParent = forwardRef(function (
|
|
158
|
-
var
|
|
159
|
-
C =
|
|
160
|
-
__cmpls =
|
|
161
|
-
__cmplp = _objectWithoutProperties(
|
|
175
|
+
var SortableHeaderParent = forwardRef(function (_ref6, __cmplr) {
|
|
176
|
+
var _ref6$as = _ref6.as,
|
|
177
|
+
C = _ref6$as === void 0 ? "div" : _ref6$as,
|
|
178
|
+
__cmpls = _ref6.style,
|
|
179
|
+
__cmplp = _objectWithoutProperties(_ref6, _excluded6);
|
|
162
180
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
163
181
|
style: __cmpls,
|
|
164
182
|
ref: __cmplr,
|
|
@@ -214,28 +232,29 @@ function getDefaultColumnWidth(key, type) {
|
|
|
214
232
|
return DEFAULT_WIDTH;
|
|
215
233
|
}
|
|
216
234
|
}
|
|
217
|
-
export var IssueLikeDataTableView = function IssueLikeDataTableView(
|
|
235
|
+
export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref7) {
|
|
218
236
|
var _containerRef$current;
|
|
219
|
-
var testId =
|
|
220
|
-
onNextPage =
|
|
221
|
-
onLoadDatasourceDetails =
|
|
222
|
-
items =
|
|
223
|
-
itemIds =
|
|
224
|
-
columns =
|
|
225
|
-
|
|
226
|
-
renderItem =
|
|
227
|
-
visibleColumnKeys =
|
|
228
|
-
onVisibleColumnKeysChange =
|
|
229
|
-
columnCustomSizes =
|
|
230
|
-
onColumnResize =
|
|
231
|
-
onColumnSort =
|
|
232
|
-
wrappedColumnKeys =
|
|
233
|
-
onWrappedColumnChange =
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
var testId = _ref7.testId,
|
|
238
|
+
onNextPage = _ref7.onNextPage,
|
|
239
|
+
onLoadDatasourceDetails = _ref7.onLoadDatasourceDetails,
|
|
240
|
+
items = _ref7.items,
|
|
241
|
+
itemIds = _ref7.itemIds,
|
|
242
|
+
columns = _ref7.columns,
|
|
243
|
+
_ref7$renderItem = _ref7.renderItem,
|
|
244
|
+
renderItem = _ref7$renderItem === void 0 ? renderType : _ref7$renderItem,
|
|
245
|
+
visibleColumnKeys = _ref7.visibleColumnKeys,
|
|
246
|
+
onVisibleColumnKeysChange = _ref7.onVisibleColumnKeysChange,
|
|
247
|
+
columnCustomSizes = _ref7.columnCustomSizes,
|
|
248
|
+
onColumnResize = _ref7.onColumnResize,
|
|
249
|
+
onColumnSort = _ref7.onColumnSort,
|
|
250
|
+
wrappedColumnKeys = _ref7.wrappedColumnKeys,
|
|
251
|
+
onWrappedColumnChange = _ref7.onWrappedColumnChange,
|
|
252
|
+
onWrappedColumnsChange = _ref7.onWrappedColumnsChange,
|
|
253
|
+
sortState = _ref7.sortState,
|
|
254
|
+
status = _ref7.status,
|
|
255
|
+
hasNextPage = _ref7.hasNextPage,
|
|
256
|
+
scrollableContainerHeight = _ref7.scrollableContainerHeight,
|
|
257
|
+
extensionKey = _ref7.extensionKey;
|
|
239
258
|
var _useIntl = useIntl(),
|
|
240
259
|
formatMessage = _useIntl.formatMessage;
|
|
241
260
|
var tableId = useMemo(function () {
|
|
@@ -274,25 +293,48 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
274
293
|
}, [experienceId, status]);
|
|
275
294
|
var visibleSortedColumns = useMemo(function () {
|
|
276
295
|
return visibleColumnKeys.map(function (visibleKey) {
|
|
277
|
-
return orderedColumns.find(function (
|
|
278
|
-
var key =
|
|
296
|
+
return orderedColumns.find(function (_ref8) {
|
|
297
|
+
var key = _ref8.key;
|
|
279
298
|
return visibleKey === key;
|
|
280
299
|
});
|
|
281
300
|
}).filter(Boolean);
|
|
282
301
|
}, [orderedColumns, visibleColumnKeys]);
|
|
302
|
+
var isWrapTextSettingAvailable = Boolean(onWrappedColumnsChange) && fg('platform_lp_sllv_table_settings_menu');
|
|
303
|
+
var areAllVisibleColumnsWrapped = false;
|
|
304
|
+
if (isWrapTextSettingAvailable) {
|
|
305
|
+
areAllVisibleColumnsWrapped = visibleColumnKeys.length > 0 && visibleColumnKeys.every(function (columnKey) {
|
|
306
|
+
return wrappedColumnKeys === null || wrappedColumnKeys === void 0 ? void 0 : wrappedColumnKeys.includes(columnKey);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
var handleWrapTextOnAllColumnsChange = useCallback(function () {
|
|
310
|
+
if (!onWrappedColumnsChange) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
var nextWrappedColumnKeys = areAllVisibleColumnsWrapped ? (wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 ? wrappedColumnKeys : []).filter(function (columnKey) {
|
|
314
|
+
return !visibleColumnKeys.includes(columnKey);
|
|
315
|
+
}) : Array.from(new Set([].concat(_toConsumableArray(wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 ? wrappedColumnKeys : []), _toConsumableArray(visibleColumnKeys))));
|
|
316
|
+
onWrappedColumnsChange(nextWrappedColumnKeys);
|
|
317
|
+
}, [areAllVisibleColumnsWrapped, onWrappedColumnsChange, visibleColumnKeys, wrappedColumnKeys]);
|
|
318
|
+
var tableSettingsMenuProps = {
|
|
319
|
+
wrapTextSetting: isWrapTextSettingAvailable ? {
|
|
320
|
+
isChecked: areAllVisibleColumnsWrapped,
|
|
321
|
+
onChange: handleWrapTextOnAllColumnsChange
|
|
322
|
+
} : undefined
|
|
323
|
+
};
|
|
324
|
+
var shouldShowTableSettingsMenu = hasAvailableTableSettings(tableSettingsMenuProps);
|
|
283
325
|
|
|
284
326
|
// TODO seems like this component can't handle some combination of incremental data retrieval.
|
|
285
327
|
// If data comes first, then columns and then visibleColumnKeys it blows up,
|
|
286
328
|
// or some other combination.
|
|
287
329
|
var columnsWidthsSum = useMemo(function () {
|
|
288
|
-
return visibleSortedColumns.map(function (
|
|
289
|
-
var key =
|
|
290
|
-
type =
|
|
330
|
+
return visibleSortedColumns.map(function (_ref9) {
|
|
331
|
+
var key = _ref9.key,
|
|
332
|
+
type = _ref9.type;
|
|
291
333
|
return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
|
|
292
334
|
}).reduce(function (sum, width) {
|
|
293
335
|
return width + sum;
|
|
294
|
-
}, 0) + (onVisibleColumnKeysChange ? columnPickerWidth : 0);
|
|
295
|
-
}, [columnCustomSizes, onVisibleColumnKeysChange, visibleSortedColumns]);
|
|
336
|
+
}, 0) + (onVisibleColumnKeysChange && shouldShowTableSettingsMenu ? columnPickerWithSettingsWidth : onVisibleColumnKeysChange ? columnPickerWidth : 0);
|
|
337
|
+
}, [columnCustomSizes, onVisibleColumnKeysChange, shouldShowTableSettingsMenu, visibleSortedColumns]);
|
|
296
338
|
var shouldUseWidth = !!(onColumnResize || columnCustomSizes);
|
|
297
339
|
var tableContainerWidth = Math.ceil(((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect().width) || 0);
|
|
298
340
|
var getColumnWidth = useCallback(function (key, type, isLastCell) {
|
|
@@ -303,10 +345,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
303
345
|
}
|
|
304
346
|
}, [columnCustomSizes, columnsWidthsSum, shouldUseWidth, tableContainerWidth]);
|
|
305
347
|
var headerColumns = useMemo(function () {
|
|
306
|
-
return visibleSortedColumns.map(function (
|
|
307
|
-
var key =
|
|
308
|
-
title =
|
|
309
|
-
type =
|
|
348
|
+
return visibleSortedColumns.map(function (_ref0, index) {
|
|
349
|
+
var key = _ref0.key,
|
|
350
|
+
title = _ref0.title,
|
|
351
|
+
type = _ref0.type;
|
|
310
352
|
return {
|
|
311
353
|
key: key,
|
|
312
354
|
content: title,
|
|
@@ -389,9 +431,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
389
431
|
return;
|
|
390
432
|
}
|
|
391
433
|
return combine(monitorForElements({
|
|
392
|
-
onDragStart: function onDragStart(
|
|
393
|
-
var location =
|
|
394
|
-
source =
|
|
434
|
+
onDragStart: function onDragStart(_ref1) {
|
|
435
|
+
var location = _ref1.location,
|
|
436
|
+
source = _ref1.source;
|
|
395
437
|
initialAutoScrollerClientY.current = location.current.input.clientY;
|
|
396
438
|
if (source.data.type === 'table-header') {
|
|
397
439
|
var _containerRef$current2;
|
|
@@ -407,9 +449,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
407
449
|
});
|
|
408
450
|
}
|
|
409
451
|
},
|
|
410
|
-
onDrag: function onDrag(
|
|
411
|
-
var location =
|
|
412
|
-
source =
|
|
452
|
+
onDrag: function onDrag(_ref10) {
|
|
453
|
+
var location = _ref10.location,
|
|
454
|
+
source = _ref10.source;
|
|
413
455
|
if (source.data.type === 'table-header') {
|
|
414
456
|
var _containerRef$current3;
|
|
415
457
|
autoScroller.updateInput({
|
|
@@ -419,9 +461,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
419
461
|
});
|
|
420
462
|
}
|
|
421
463
|
},
|
|
422
|
-
onDrop: function onDrop(
|
|
423
|
-
var source =
|
|
424
|
-
location =
|
|
464
|
+
onDrop: function onDrop(_ref11) {
|
|
465
|
+
var source = _ref11.source,
|
|
466
|
+
location = _ref11.location;
|
|
425
467
|
autoScroller.stop();
|
|
426
468
|
if (location.current.dropTargets.length === 0) {
|
|
427
469
|
return;
|
|
@@ -456,10 +498,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
456
498
|
return itemIds.map(function (id, rowIndex) {
|
|
457
499
|
return {
|
|
458
500
|
key: id,
|
|
459
|
-
cells: visibleSortedColumns.map(function (
|
|
460
|
-
var key =
|
|
461
|
-
type =
|
|
462
|
-
title =
|
|
501
|
+
cells: visibleSortedColumns.map(function (_ref12, cellIndex) {
|
|
502
|
+
var key = _ref12.key,
|
|
503
|
+
type = _ref12.type,
|
|
504
|
+
title = _ref12.title;
|
|
463
505
|
return {
|
|
464
506
|
key: key,
|
|
465
507
|
columnKey: key,
|
|
@@ -595,10 +637,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
595
637
|
className: ax(["_n7zlidpf", "_bfhkchd4 _kqsw1if8 _154iidpf _1pbyzo7u", !!onVisibleColumnKeysChange ? 'has-column-picker' : ''])
|
|
596
638
|
}, /*#__PURE__*/React.createElement("tr", {
|
|
597
639
|
ref: tableHeaderRowRef
|
|
598
|
-
}, headerColumns.map(function (
|
|
599
|
-
var key =
|
|
600
|
-
content =
|
|
601
|
-
width =
|
|
640
|
+
}, headerColumns.map(function (_ref14, cellIndex) {
|
|
641
|
+
var key = _ref14.key,
|
|
642
|
+
content = _ref14.content,
|
|
643
|
+
width = _ref14.width;
|
|
602
644
|
var heading = /*#__PURE__*/React.createElement(Tooltip, {
|
|
603
645
|
content: content,
|
|
604
646
|
tag: "span",
|
|
@@ -643,10 +685,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
643
685
|
}
|
|
644
686
|
if (isEditable) {
|
|
645
687
|
var _containerRef$current4;
|
|
646
|
-
var previewRows = tableRows.map(function (
|
|
647
|
-
var cells =
|
|
648
|
-
var cell = cells.find(function (
|
|
649
|
-
var cellKey =
|
|
688
|
+
var previewRows = tableRows.map(function (_ref15) {
|
|
689
|
+
var cells = _ref15.cells;
|
|
690
|
+
var cell = cells.find(function (_ref16) {
|
|
691
|
+
var cellKey = _ref16.key;
|
|
650
692
|
return cellKey === key;
|
|
651
693
|
});
|
|
652
694
|
if (cell) {
|
|
@@ -683,12 +725,23 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
683
725
|
})
|
|
684
726
|
}), heading);
|
|
685
727
|
}
|
|
686
|
-
}), onVisibleColumnKeysChange && /*#__PURE__*/React.createElement(
|
|
728
|
+
}), onVisibleColumnKeysChange && (shouldShowTableSettingsMenu ? /*#__PURE__*/React.createElement(ColumnPickerHeaderWithSettings, null, /*#__PURE__*/React.createElement(Inline, {
|
|
729
|
+
alignBlock: "center",
|
|
730
|
+
alignInline: "end",
|
|
731
|
+
space: "space.050"
|
|
732
|
+
}, /*#__PURE__*/React.createElement(ColumnPicker, {
|
|
733
|
+
columns: shouldDisplayColumnsInPicker ? orderedColumns : [],
|
|
734
|
+
selectedColumnKeys: shouldDisplayColumnsInPicker ? visibleColumnKeys : [],
|
|
735
|
+
onSelectedColumnKeysChange: onSelectedColumnKeysChange,
|
|
736
|
+
onOpen: handlePickerOpen
|
|
737
|
+
}), /*#__PURE__*/React.createElement(TableSettingsMenu, {
|
|
738
|
+
wrapTextSetting: tableSettingsMenuProps.wrapTextSetting
|
|
739
|
+
}))) : /*#__PURE__*/React.createElement(ColumnPickerHeader, null, /*#__PURE__*/React.createElement(ColumnPicker, {
|
|
687
740
|
columns: shouldDisplayColumnsInPicker ? orderedColumns : [],
|
|
688
741
|
selectedColumnKeys: shouldDisplayColumnsInPicker ? visibleColumnKeys : [],
|
|
689
742
|
onSelectedColumnKeysChange: onSelectedColumnKeysChange,
|
|
690
743
|
onOpen: handlePickerOpen
|
|
691
|
-
})))), /*#__PURE__*/React.createElement("tbody", {
|
|
744
|
+
}))))), /*#__PURE__*/React.createElement("tbody", {
|
|
692
745
|
"data-testid": testId && "".concat(testId, "--body"),
|
|
693
746
|
className: ax(["_n7zlidpf"])
|
|
694
747
|
}, hasNoResults && /*#__PURE__*/React.createElement("tr", {
|
|
@@ -703,19 +756,19 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
703
756
|
className: ax(["_kqsw1if8 _1ltvidpf _1e0c1txw _1bah1h6o"])
|
|
704
757
|
}, /*#__PURE__*/React.createElement(NoResults, {
|
|
705
758
|
isCompact: true
|
|
706
|
-
})))), rows.map(function (
|
|
707
|
-
var key =
|
|
708
|
-
cells =
|
|
709
|
-
ref =
|
|
759
|
+
})))), rows.map(function (_ref17) {
|
|
760
|
+
var key = _ref17.key,
|
|
761
|
+
cells = _ref17.cells,
|
|
762
|
+
ref = _ref17.ref;
|
|
710
763
|
return /*#__PURE__*/React.createElement("tr", {
|
|
711
764
|
key: key,
|
|
712
765
|
"data-testid": testId && "".concat(testId, "--row-").concat(key),
|
|
713
766
|
ref: ref
|
|
714
|
-
}, cells.map(function (
|
|
715
|
-
var cellKey =
|
|
716
|
-
cellType =
|
|
717
|
-
content =
|
|
718
|
-
width =
|
|
767
|
+
}, cells.map(function (_ref18, cellIndex) {
|
|
768
|
+
var cellKey = _ref18.key,
|
|
769
|
+
cellType = _ref18.type,
|
|
770
|
+
content = _ref18.content,
|
|
771
|
+
width = _ref18.width;
|
|
719
772
|
var isLastCell = cellIndex === cells.length - 1;
|
|
720
773
|
var loadingRowStyle = getWidthCss({
|
|
721
774
|
shouldUseWidth: shouldUseWidth,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
2
|
+
._1bsb1mjv{width:300px}
|
|
3
|
+
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
4
|
+
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
5
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
6
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useId, useState } from 'react';
|
|
7
|
+
import { useIntl } from 'react-intl';
|
|
8
|
+
import IconButton from '@atlaskit/button/icon/button';
|
|
9
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
10
|
+
import { Popup } from '@atlaskit/popup/popup';
|
|
11
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
12
|
+
import { layers } from '@atlaskit/theme/constants';
|
|
13
|
+
import Toggle from '@atlaskit/toggle/toggle';
|
|
14
|
+
import { tableSettingsMenuMessages } from './messages';
|
|
15
|
+
var styles = {
|
|
16
|
+
menu: "_1rjcu2gc _1bsb1mjv",
|
|
17
|
+
setting: "_bfhksm61 _ca0q1b66 _u5f3utpp _n3td1b66 _19bvutpp"
|
|
18
|
+
};
|
|
19
|
+
export var hasAvailableTableSettings = function hasAvailableTableSettings(_ref) {
|
|
20
|
+
var wrapTextSetting = _ref.wrapTextSetting;
|
|
21
|
+
return Boolean(wrapTextSetting);
|
|
22
|
+
};
|
|
23
|
+
export var TableSettingsMenu = function TableSettingsMenu(props) {
|
|
24
|
+
var _useIntl = useIntl(),
|
|
25
|
+
formatMessage = _useIntl.formatMessage;
|
|
26
|
+
var _useState = useState(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
isOpen = _useState2[0],
|
|
29
|
+
setIsOpen = _useState2[1];
|
|
30
|
+
var wrapTextToggleId = useId();
|
|
31
|
+
if (!hasAvailableTableSettings(props)) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
var wrapTextSetting = props.wrapTextSetting;
|
|
35
|
+
var wrapTextLabel = formatMessage(tableSettingsMenuMessages.wrapTextOnAllColumns);
|
|
36
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
37
|
+
isOpen: isOpen,
|
|
38
|
+
onClose: function onClose() {
|
|
39
|
+
return setIsOpen(false);
|
|
40
|
+
},
|
|
41
|
+
placement: "bottom-end",
|
|
42
|
+
shouldFlip: true,
|
|
43
|
+
testId: "table-settings-menu",
|
|
44
|
+
zIndex: layers.modal(),
|
|
45
|
+
role: "dialog",
|
|
46
|
+
label: formatMessage(tableSettingsMenuMessages.tableSettings),
|
|
47
|
+
trigger: function trigger(triggerProps) {
|
|
48
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
49
|
+
ref: triggerProps.ref,
|
|
50
|
+
"aria-controls": triggerProps['aria-controls'],
|
|
51
|
+
"aria-expanded": triggerProps['aria-expanded'],
|
|
52
|
+
"aria-haspopup": triggerProps['aria-haspopup'],
|
|
53
|
+
icon: ShowMoreHorizontalIcon,
|
|
54
|
+
isSelected: isOpen,
|
|
55
|
+
isTooltipDisabled: false,
|
|
56
|
+
label: formatMessage(tableSettingsMenuMessages.moreActions),
|
|
57
|
+
onClick: function onClick() {
|
|
58
|
+
return setIsOpen(function (currentIsOpen) {
|
|
59
|
+
return !currentIsOpen;
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
spacing: "default"
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
content: function content(_ref2) {
|
|
66
|
+
var setInitialFocusRef = _ref2.setInitialFocusRef;
|
|
67
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
68
|
+
xcss: styles.menu
|
|
69
|
+
}, wrapTextSetting && /*#__PURE__*/React.createElement(Box, {
|
|
70
|
+
xcss: styles.setting
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
72
|
+
alignBlock: "center",
|
|
73
|
+
spread: "space-between"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
75
|
+
htmlFor: wrapTextToggleId
|
|
76
|
+
}, wrapTextLabel), /*#__PURE__*/React.createElement(Toggle, {
|
|
77
|
+
ref: function ref(element) {
|
|
78
|
+
setInitialFocusRef(element);
|
|
79
|
+
},
|
|
80
|
+
id: wrapTextToggleId,
|
|
81
|
+
isChecked: wrapTextSetting.isChecked,
|
|
82
|
+
onChange: wrapTextSetting.onChange,
|
|
83
|
+
testId: "table-settings-menu-wrap-text-toggle"
|
|
84
|
+
}))));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export var tableSettingsMenuMessages = defineMessages({
|
|
3
|
+
moreActions: {
|
|
4
|
+
id: 'link-datasource.issue-like-table.table-settings-menu.moreActions',
|
|
5
|
+
description: 'Tooltip and accessibility label for the table settings meatball menu button',
|
|
6
|
+
defaultMessage: 'More actions'
|
|
7
|
+
},
|
|
8
|
+
tableSettings: {
|
|
9
|
+
id: 'link-datasource.issue-like-table.table-settings-menu.tableSettings',
|
|
10
|
+
description: 'Accessibility label for the table settings popup',
|
|
11
|
+
defaultMessage: 'Table settings'
|
|
12
|
+
},
|
|
13
|
+
wrapTextOnAllColumns: {
|
|
14
|
+
id: 'link-datasource.issue-like-table.table-settings-menu.wrapTextOnAllColumns',
|
|
15
|
+
description: 'Label for the toggle that wraps text in every table column',
|
|
16
|
+
defaultMessage: 'Wrap text in all columns'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Action, type BoundActions, type HookFunction, type Store } from 'react-sweet-state';
|
|
2
|
-
import { useDatasourceClientExtension } from '@atlaskit/link-client-extension';
|
|
2
|
+
import { useDatasourceClientExtension } from '@atlaskit/link-client-extension/use-data-source-client-extension';
|
|
3
3
|
import type { ActionsDiscoveryRequest, AtomicActionExecuteRequest, AtomicActionExecuteResponse, AtomicActionInterface } from '@atlaskit/linking-types/datasource-actions';
|
|
4
4
|
import { type DatasourceOperationFailedAttributesType, type EventKey } from '../../../src/analytics/generated/analytics.types';
|
|
5
5
|
import type createEventPayload from '../../../src/analytics/generated/create-event-payload';
|
package/dist/types/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type IssueLikeDataTableViewProps } from '../../../../issue-like-table/types';
|
|
2
|
-
export type ColumnWrappingProps = Required<Pick<IssueLikeDataTableViewProps, 'wrappedColumnKeys' | 'onWrappedColumnChange'
|
|
2
|
+
export type ColumnWrappingProps = Required<Pick<IssueLikeDataTableViewProps, 'wrappedColumnKeys' | 'onWrappedColumnChange'>> & Pick<IssueLikeDataTableViewProps, 'onWrappedColumnsChange'>;
|
|
3
3
|
export declare const useColumnWrapping: (initialWrappedColumnKeys?: string[]) => ColumnWrappingProps;
|
|
@@ -10,9 +10,9 @@ export declare const DatasourceTableView: ForwardRefExoticComponent<{
|
|
|
10
10
|
datasourceId: string;
|
|
11
11
|
parameters: DatasourceParameters;
|
|
12
12
|
url?: string;
|
|
13
|
-
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>> & WithContextProps & RefAttributes<any>>;
|
|
13
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onWrappedColumnsChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>> & WithContextProps & RefAttributes<any>>;
|
|
14
14
|
export declare const DataSourceTableViewNoSuspense: ForwardRefExoticComponent<{
|
|
15
15
|
datasourceId: string;
|
|
16
16
|
parameters: DatasourceParameters;
|
|
17
17
|
url?: string;
|
|
18
|
-
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>> & WithContextProps & RefAttributes<any>>;
|
|
18
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onWrappedColumnsChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>> & WithContextProps & RefAttributes<any>>;
|
|
@@ -7,4 +7,4 @@ export type DatasourceTableViewProps = {
|
|
|
7
7
|
parameters: DatasourceParameters;
|
|
8
8
|
/** Url for an existing datasource, initially used for displaying to a user unauthorized to query that site */
|
|
9
9
|
url?: string;
|
|
10
|
-
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>>;
|
|
10
|
+
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onWrappedColumnsChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>>;
|