@atlaskit/link-datasource 4.33.4 → 4.33.6
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 +14 -0
- package/dist/cjs/ui/common/modal/insert-button/index.js +0 -1
- package/dist/cjs/ui/issue-like-table/column-picker/index.compiled.css +2 -1
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +20 -2
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.compiled.css +2 -0
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +58 -32
- package/dist/es2019/ui/common/modal/insert-button/index.js +0 -1
- package/dist/es2019/ui/issue-like-table/column-picker/index.compiled.css +2 -1
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +18 -2
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.compiled.css +2 -0
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +27 -2
- package/dist/esm/ui/common/modal/insert-button/index.js +0 -1
- package/dist/esm/ui/issue-like-table/column-picker/index.compiled.css +2 -1
- package/dist/esm/ui/issue-like-table/column-picker/index.js +20 -2
- package/dist/esm/ui/issue-like-table/draggable-table-heading.compiled.css +2 -0
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +58 -32
- package/examples-helpers/fakeModalDialogContainer.tsx +9 -7
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.33.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c085330e0dde8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c085330e0dde8) -
|
|
8
|
+
Remove new icon button styling hack
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.33.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.33.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -51,7 +51,6 @@ var InsertButton = exports.InsertButton = function InsertButton(_ref) {
|
|
|
51
51
|
if (isJqlSubmitFixEnabled) {
|
|
52
52
|
onBeforeInsert === null || onBeforeInsert === void 0 || onBeforeInsert(parameters);
|
|
53
53
|
}
|
|
54
|
-
;
|
|
55
54
|
var insertButtonClickedEvent = analyticsEvent.update({
|
|
56
55
|
actionSubjectId: 'insert',
|
|
57
56
|
attributes: _objectSpread({
|
|
@@ -18,6 +18,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
18
18
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
19
19
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
20
20
|
var _customize = _interopRequireDefault(require("@atlaskit/icon/core/customize"));
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
23
|
var _select = require("@atlaskit/select");
|
|
23
24
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -28,7 +29,8 @@ var _messages = require("./messages");
|
|
|
28
29
|
var _excluded = ["isOpen"];
|
|
29
30
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
30
31
|
var styles = {
|
|
31
|
-
chevronIconStyles: "_1e0c1txw _4cvr1h6o"
|
|
32
|
+
chevronIconStyles: "_1e0c1txw _4cvr1h6o",
|
|
33
|
+
customizeIcon: "_s7n4nkob"
|
|
32
34
|
};
|
|
33
35
|
var ColumnPicker = exports.ColumnPicker = function ColumnPicker(_ref) {
|
|
34
36
|
var columns = _ref.columns,
|
|
@@ -154,7 +156,23 @@ var ColumnPicker = exports.ColumnPicker = function ColumnPicker(_ref) {
|
|
|
154
156
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
155
157
|
content: intl.formatMessage(_messages.columnPickerMessages.tooltip)
|
|
156
158
|
}, function (tooltipProps) {
|
|
157
|
-
return /*#__PURE__*/_react.default.createElement(_new.default, (0, _extends2.default)({}, tooltipProps, triggerProps, {
|
|
159
|
+
return (0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') ? /*#__PURE__*/_react.default.createElement(_new.default, (0, _extends2.default)({}, tooltipProps, triggerProps, {
|
|
160
|
+
isSelected: isOpen,
|
|
161
|
+
spacing: "compact",
|
|
162
|
+
appearance: 'default',
|
|
163
|
+
testId: "column-picker-trigger-button",
|
|
164
|
+
iconAfter: function iconAfter() {
|
|
165
|
+
return /*#__PURE__*/_react.default.createElement(_chevronDown.default, {
|
|
166
|
+
label: "down",
|
|
167
|
+
size: "small"
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
171
|
+
as: "span",
|
|
172
|
+
xcss: styles.customizeIcon
|
|
173
|
+
}, /*#__PURE__*/_react.default.createElement(_customize.default, {
|
|
174
|
+
label: "customize"
|
|
175
|
+
}))) : /*#__PURE__*/_react.default.createElement(_new.default, (0, _extends2.default)({}, tooltipProps, triggerProps, {
|
|
158
176
|
isSelected: isOpen,
|
|
159
177
|
spacing: "compact",
|
|
160
178
|
appearance: 'default',
|
|
@@ -29,6 +29,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}
|
|
|
29
29
|
.ProseMirror .pm-table-wrapper>table thead ._s99e1tcg{line-height:24px}
|
|
30
30
|
._11681tcg [data-testid=datasource-header-content--container]{line-height:24px}
|
|
31
31
|
._11j11b66 [data-testid=datasource-header-content--container]{padding-right:var(--ds-space-050,4px)}
|
|
32
|
+
._11lvlcsk button{padding-left:var(--ds-space-0,4px)}
|
|
32
33
|
._11lvze3t button{padding-left:var(--ds-space-0,0)}
|
|
33
34
|
._12pn15vq [data-testid=datasource-header-content--container]{overflow-x:hidden}
|
|
34
35
|
._154iidpf{top:0}
|
|
@@ -78,6 +79,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}
|
|
|
78
79
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
79
80
|
._vchhusvi{box-sizing:border-box}
|
|
80
81
|
._vwz41tcg{line-height:24px}
|
|
82
|
+
._yhjmlcsk button{padding-right:var(--ds-space-0,4px)}
|
|
81
83
|
._yhjmze3t button{padding-right:var(--ds-space-0,0)}
|
|
82
84
|
.pm-table-wrapper>table thead ._11ep1b66{padding-right:var(--ds-space-050,4px)}
|
|
83
85
|
.pm-table-wrapper>table thead ._15hu1b66{padding-left:var(--ds-space-050,4px)}
|
|
@@ -22,6 +22,7 @@ var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
|
22
22
|
var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
|
|
23
23
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
24
24
|
var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/core/chevron-up"));
|
|
25
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
26
|
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
26
27
|
var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box");
|
|
27
28
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
@@ -37,7 +38,8 @@ var _messages = require("./messages");
|
|
|
37
38
|
var _utils = require("./utils");
|
|
38
39
|
var _excluded = ["as", "style"],
|
|
39
40
|
_excluded2 = ["as", "style"],
|
|
40
|
-
_excluded3 = ["
|
|
41
|
+
_excluded3 = ["as", "style"],
|
|
42
|
+
_excluded4 = ["triggerRef"];
|
|
41
43
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
42
44
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
43
45
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -58,7 +60,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
58
60
|
TableHeading.displayName = 'TableHeading';
|
|
59
61
|
}
|
|
60
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
61
|
-
var
|
|
63
|
+
var DropdownParentOld = (0, _react.forwardRef)(function (_ref2, __cmplr) {
|
|
62
64
|
var _ref2$as = _ref2.as,
|
|
63
65
|
C = _ref2$as === void 0 ? "div" : _ref2$as,
|
|
64
66
|
__cmpls = _ref2.style,
|
|
@@ -69,6 +71,22 @@ var DropdownParent = (0, _react.forwardRef)(function (_ref2, __cmplr) {
|
|
|
69
71
|
className: (0, _runtime.ax)(["_1e0c1txw _4cvr1h6o _o5721q9c _1wtnze3t _ficf1e5h _jq8g1wug _11lvze3t _yhjmze3t", __cmplp.className])
|
|
70
72
|
}));
|
|
71
73
|
});
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
76
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
77
|
+
DropdownParentOld.displayName = 'DropdownParentOld';
|
|
78
|
+
}
|
|
79
|
+
var DropdownParent = (0, _react.forwardRef)(function (_ref3, __cmplr) {
|
|
80
|
+
var _ref3$as = _ref3.as,
|
|
81
|
+
C = _ref3$as === void 0 ? "div" : _ref3$as,
|
|
82
|
+
__cmpls = _ref3.style,
|
|
83
|
+
__cmplp = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
|
|
84
|
+
return /*#__PURE__*/React.createElement(C, (0, _extends2.default)({}, __cmplp, {
|
|
85
|
+
style: __cmpls,
|
|
86
|
+
ref: __cmplr,
|
|
87
|
+
className: (0, _runtime.ax)(["_1e0c1txw _4cvr1h6o _o5721q9c _1wtnze3t _ficf1e5h _jq8g1wug _11lvlcsk _yhjmlcsk", __cmplp.className])
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
72
90
|
if (process.env.NODE_ENV !== 'production') {
|
|
73
91
|
DropdownParent.displayName = 'DropdownParent';
|
|
74
92
|
}
|
|
@@ -82,17 +100,17 @@ var idleState = {
|
|
|
82
100
|
var draggingState = {
|
|
83
101
|
type: 'dragging'
|
|
84
102
|
};
|
|
85
|
-
var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTableHeading(
|
|
86
|
-
var children =
|
|
87
|
-
id =
|
|
88
|
-
index =
|
|
89
|
-
tableId =
|
|
90
|
-
dndPreviewHeight =
|
|
91
|
-
dragPreview =
|
|
92
|
-
width =
|
|
93
|
-
onWidthChange =
|
|
94
|
-
isWrapped =
|
|
95
|
-
onIsWrappedChange =
|
|
103
|
+
var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTableHeading(_ref4) {
|
|
104
|
+
var children = _ref4.children,
|
|
105
|
+
id = _ref4.id,
|
|
106
|
+
index = _ref4.index,
|
|
107
|
+
tableId = _ref4.tableId,
|
|
108
|
+
dndPreviewHeight = _ref4.dndPreviewHeight,
|
|
109
|
+
dragPreview = _ref4.dragPreview,
|
|
110
|
+
width = _ref4.width,
|
|
111
|
+
onWidthChange = _ref4.onWidthChange,
|
|
112
|
+
isWrapped = _ref4.isWrapped,
|
|
113
|
+
onIsWrappedChange = _ref4.onIsWrappedChange;
|
|
96
114
|
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
97
115
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
98
116
|
var mainHeaderCellRef = (0, _react.useRef)(null);
|
|
@@ -128,15 +146,15 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
128
146
|
tableId: tableId
|
|
129
147
|
};
|
|
130
148
|
},
|
|
131
|
-
onGenerateDragPreview: function onGenerateDragPreview(
|
|
132
|
-
var nativeSetDragImage =
|
|
149
|
+
onGenerateDragPreview: function onGenerateDragPreview(_ref5) {
|
|
150
|
+
var nativeSetDragImage = _ref5.nativeSetDragImage;
|
|
133
151
|
(0, _setCustomNativeDragPreview.setCustomNativeDragPreview)({
|
|
134
152
|
getOffset: (0, _pointerOutsideOfPreview.pointerOutsideOfPreview)({
|
|
135
153
|
x: '18px',
|
|
136
154
|
y: '18px'
|
|
137
155
|
}),
|
|
138
|
-
render: function render(
|
|
139
|
-
var container =
|
|
156
|
+
render: function render(_ref6) {
|
|
157
|
+
var container = _ref6.container;
|
|
140
158
|
// Cause a `react` re-render to create your portal synchronously
|
|
141
159
|
setState({
|
|
142
160
|
type: 'preview',
|
|
@@ -171,9 +189,9 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
171
189
|
getIsSticky: function getIsSticky() {
|
|
172
190
|
return true;
|
|
173
191
|
},
|
|
174
|
-
getData: function getData(
|
|
175
|
-
var input =
|
|
176
|
-
element =
|
|
192
|
+
getData: function getData(_ref7) {
|
|
193
|
+
var input = _ref7.input,
|
|
194
|
+
element = _ref7.element;
|
|
177
195
|
var data = {
|
|
178
196
|
id: id,
|
|
179
197
|
index: index
|
|
@@ -204,8 +222,8 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
204
222
|
// During dragging anywhere we want to remove `pointerEvents: 'none'` from all the drop targets
|
|
205
223
|
(0, _react.useEffect)(function () {
|
|
206
224
|
return (0, _adapter.monitorForElements)({
|
|
207
|
-
canMonitor: function canMonitor(
|
|
208
|
-
var source =
|
|
225
|
+
canMonitor: function canMonitor(_ref8) {
|
|
226
|
+
var source = _ref8.source;
|
|
209
227
|
return source.data.type === 'table-header' && source.data.tableId === tableId;
|
|
210
228
|
},
|
|
211
229
|
onDragStart: function onDragStart() {
|
|
@@ -241,8 +259,8 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
241
259
|
};
|
|
242
260
|
},
|
|
243
261
|
// Is called when dragging started
|
|
244
|
-
onGenerateDragPreview: function onGenerateDragPreview(
|
|
245
|
-
var nativeSetDragImage =
|
|
262
|
+
onGenerateDragPreview: function onGenerateDragPreview(_ref9) {
|
|
263
|
+
var nativeSetDragImage = _ref9.nativeSetDragImage;
|
|
246
264
|
// We don't show any preview, since column separator (handle) is moving with the cursor
|
|
247
265
|
(0, _disableNativeDragPreview.disableNativeDragPreview)({
|
|
248
266
|
nativeSetDragImage: nativeSetDragImage
|
|
@@ -254,8 +272,8 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
254
272
|
initialWidth: width
|
|
255
273
|
});
|
|
256
274
|
},
|
|
257
|
-
onDrag: function onDrag(
|
|
258
|
-
var location =
|
|
275
|
+
onDrag: function onDrag(_ref0) {
|
|
276
|
+
var location = _ref0.location;
|
|
259
277
|
var relativeDistanceX = location.current.input.clientX - location.initial.input.clientX;
|
|
260
278
|
(0, _tinyInvariant.default)(state.type === 'resizing');
|
|
261
279
|
var initialWidth = state.initialWidth;
|
|
@@ -294,9 +312,9 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
294
312
|
var TriggerIcon = (0, _react.useMemo)(function () {
|
|
295
313
|
return shouldShowTriggerIcon ? isDropdownOpen ? _chevronUp.default : _chevronDown.default : isWideEnoughToHaveChevron ? _customIcons.GlyphPlaceholder : undefined;
|
|
296
314
|
}, [shouldShowTriggerIcon, isDropdownOpen, isWideEnoughToHaveChevron]);
|
|
297
|
-
var getTriggerButton = (0, _react.useCallback)(function (
|
|
298
|
-
var triggerRef =
|
|
299
|
-
props = (0, _objectWithoutProperties2.default)(
|
|
315
|
+
var getTriggerButton = (0, _react.useCallback)(function (_ref1) {
|
|
316
|
+
var triggerRef = _ref1.triggerRef,
|
|
317
|
+
props = (0, _objectWithoutProperties2.default)(_ref1, _excluded4);
|
|
300
318
|
return /*#__PURE__*/React.createElement(_new.default, (0, _extends2.default)({}, props, {
|
|
301
319
|
testId: "".concat(id, "-column-dropdown"),
|
|
302
320
|
shouldFitContainer: true,
|
|
@@ -316,8 +334,8 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
316
334
|
}
|
|
317
335
|
}), children);
|
|
318
336
|
}, [children, id, TriggerIcon]);
|
|
319
|
-
var onDropdownOpenChange = (0, _react.useCallback)(function (
|
|
320
|
-
var isOpen =
|
|
337
|
+
var onDropdownOpenChange = (0, _react.useCallback)(function (_ref10) {
|
|
338
|
+
var isOpen = _ref10.isOpen;
|
|
321
339
|
return setIsDropdownOpen(isOpen);
|
|
322
340
|
}, []);
|
|
323
341
|
var toggleWrap = (0, _react.useCallback)(function () {
|
|
@@ -349,7 +367,15 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
349
367
|
},
|
|
350
368
|
"data-testid": "column-resize-handle",
|
|
351
369
|
className: (0, _runtime.ax)(["_1y7c1ejb _1bsbaakz _80om11mm _16jlidpf _kqswstnw _1pbykb7n _1xi2aesa _154iidpf _1tesidpf _pdyk1hrg _154pidpf _dydkssc3 _1kt9b3bt _1cs8stnw _1rusopvu _1mp4atg7 _qneczvxw _1ct3kb7n", state.type === 'resizing' && "_80omn7od _154pkb7n"])
|
|
352
|
-
}) : null, onIsWrappedChange ? /*#__PURE__*/React.createElement(DropdownParent, null, /*#__PURE__*/React.createElement(_dropdownMenu.default, {
|
|
370
|
+
}) : null, onIsWrappedChange && (0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') ? /*#__PURE__*/React.createElement(DropdownParent, null, /*#__PURE__*/React.createElement(_dropdownMenu.default, {
|
|
371
|
+
trigger: getTriggerButton,
|
|
372
|
+
onOpenChange: onDropdownOpenChange,
|
|
373
|
+
placement: 'bottom'
|
|
374
|
+
}, /*#__PURE__*/React.createElement(_dropdownMenu.DropdownItem, {
|
|
375
|
+
elemBefore: isWrapped ? /*#__PURE__*/React.createElement(_customIcons.UnwrapTextIcon, null) : /*#__PURE__*/React.createElement(_customIcons.WrapTextIcon, null),
|
|
376
|
+
testId: "".concat(id, "-column-dropdown-item-toggle-wrapping"),
|
|
377
|
+
onClick: toggleWrap
|
|
378
|
+
}, isWrapped ? /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.issueLikeTableMessages.unwrapText) : /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.issueLikeTableMessages.wrapText)))) : onIsWrappedChange ? /*#__PURE__*/React.createElement(DropdownParentOld, null, /*#__PURE__*/React.createElement(_dropdownMenu.default, {
|
|
353
379
|
trigger: getTriggerButton,
|
|
354
380
|
onOpenChange: onDropdownOpenChange,
|
|
355
381
|
placement: 'bottom'
|
|
@@ -43,7 +43,6 @@ export const InsertButton = ({
|
|
|
43
43
|
if (isJqlSubmitFixEnabled) {
|
|
44
44
|
onBeforeInsert === null || onBeforeInsert === void 0 ? void 0 : onBeforeInsert(parameters);
|
|
45
45
|
}
|
|
46
|
-
;
|
|
47
46
|
const insertButtonClickedEvent = analyticsEvent.update({
|
|
48
47
|
actionSubjectId: 'insert',
|
|
49
48
|
attributes: {
|
|
@@ -7,6 +7,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
8
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
9
9
|
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
12
|
import { createFilter, PopupSelect } from '@atlaskit/select';
|
|
12
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -15,7 +16,8 @@ import { useDatasourceExperienceId } from '../../../contexts/datasource-experien
|
|
|
15
16
|
import { ConcatenatedMenuList, MenuItem } from './concatenated-menu-list';
|
|
16
17
|
import { columnPickerMessages } from './messages';
|
|
17
18
|
const styles = {
|
|
18
|
-
chevronIconStyles: "_1e0c1txw _4cvr1h6o"
|
|
19
|
+
chevronIconStyles: "_1e0c1txw _4cvr1h6o",
|
|
20
|
+
customizeIcon: "_s7n4nkob"
|
|
19
21
|
};
|
|
20
22
|
export const ColumnPicker = ({
|
|
21
23
|
columns,
|
|
@@ -126,7 +128,21 @@ export const ColumnPicker = ({
|
|
|
126
128
|
...triggerProps
|
|
127
129
|
}) => /*#__PURE__*/React.createElement(Tooltip, {
|
|
128
130
|
content: intl.formatMessage(columnPickerMessages.tooltip)
|
|
129
|
-
}, tooltipProps => /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
131
|
+
}, tooltipProps => fg('platform-button-icon-spacing-cleanup') ? /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
132
|
+
isSelected: isOpen,
|
|
133
|
+
spacing: "compact",
|
|
134
|
+
appearance: 'default',
|
|
135
|
+
testId: "column-picker-trigger-button",
|
|
136
|
+
iconAfter: () => /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
137
|
+
label: "down",
|
|
138
|
+
size: "small"
|
|
139
|
+
})
|
|
140
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
141
|
+
as: "span",
|
|
142
|
+
xcss: styles.customizeIcon
|
|
143
|
+
}, /*#__PURE__*/React.createElement(CustomizeIcon, {
|
|
144
|
+
label: "customize"
|
|
145
|
+
}))) : /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
130
146
|
isSelected: isOpen,
|
|
131
147
|
spacing: "compact",
|
|
132
148
|
appearance: 'default',
|
|
@@ -29,6 +29,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}
|
|
|
29
29
|
.ProseMirror .pm-table-wrapper>table thead ._s99e1tcg{line-height:24px}
|
|
30
30
|
._11681tcg [data-testid=datasource-header-content--container]{line-height:24px}
|
|
31
31
|
._11j11b66 [data-testid=datasource-header-content--container]{padding-right:var(--ds-space-050,4px)}
|
|
32
|
+
._11lvlcsk button{padding-left:var(--ds-space-0,4px)}
|
|
32
33
|
._11lvze3t button{padding-left:var(--ds-space-0,0)}
|
|
33
34
|
._12pn15vq [data-testid=datasource-header-content--container]{overflow-x:hidden}
|
|
34
35
|
._154iidpf{top:0}
|
|
@@ -78,6 +79,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}
|
|
|
78
79
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
79
80
|
._vchhusvi{box-sizing:border-box}
|
|
80
81
|
._vwz41tcg{line-height:24px}
|
|
82
|
+
._yhjmlcsk button{padding-right:var(--ds-space-0,4px)}
|
|
81
83
|
._yhjmze3t button{padding-right:var(--ds-space-0,0)}
|
|
82
84
|
.pm-table-wrapper>table thead ._11ep1b66{padding-right:var(--ds-space-050,4px)}
|
|
83
85
|
.pm-table-wrapper>table thead ._15hu1b66{padding-left:var(--ds-space-050,4px)}
|
|
@@ -14,6 +14,7 @@ import Button from '@atlaskit/button/new';
|
|
|
14
14
|
import DropdownMenu, { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
15
15
|
import ChevronDown from '@atlaskit/icon/core/chevron-down';
|
|
16
16
|
import ChevronUp from '@atlaskit/icon/core/chevron-up';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
18
19
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
19
20
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
@@ -44,7 +45,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
44
45
|
TableHeading.displayName = 'TableHeading';
|
|
45
46
|
}
|
|
46
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
47
|
-
const
|
|
48
|
+
const DropdownParentOld = forwardRef(({
|
|
48
49
|
as: C = "div",
|
|
49
50
|
style: __cmpls,
|
|
50
51
|
...__cmplp
|
|
@@ -55,6 +56,22 @@ const DropdownParent = forwardRef(({
|
|
|
55
56
|
className: ax(["_1e0c1txw _4cvr1h6o _o5721q9c _1wtnze3t _ficf1e5h _jq8g1wug _11lvze3t _yhjmze3t", __cmplp.className])
|
|
56
57
|
}));
|
|
57
58
|
});
|
|
59
|
+
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
61
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
62
|
+
DropdownParentOld.displayName = 'DropdownParentOld';
|
|
63
|
+
}
|
|
64
|
+
const DropdownParent = forwardRef(({
|
|
65
|
+
as: C = "div",
|
|
66
|
+
style: __cmpls,
|
|
67
|
+
...__cmplp
|
|
68
|
+
}, __cmplr) => {
|
|
69
|
+
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
70
|
+
style: __cmpls,
|
|
71
|
+
ref: __cmplr,
|
|
72
|
+
className: ax(["_1e0c1txw _4cvr1h6o _o5721q9c _1wtnze3t _ficf1e5h _jq8g1wug _11lvlcsk _yhjmlcsk", __cmplp.className])
|
|
73
|
+
}));
|
|
74
|
+
});
|
|
58
75
|
if (process.env.NODE_ENV !== 'production') {
|
|
59
76
|
DropdownParent.displayName = 'DropdownParent';
|
|
60
77
|
}
|
|
@@ -322,7 +339,15 @@ export const DraggableTableHeading = ({
|
|
|
322
339
|
},
|
|
323
340
|
"data-testid": "column-resize-handle",
|
|
324
341
|
className: ax(["_1y7c1ejb _1bsbaakz _80om11mm _16jlidpf _kqswstnw _1pbykb7n _1xi2aesa _154iidpf _1tesidpf _pdyk1hrg _154pidpf _dydkssc3 _1kt9b3bt _1cs8stnw _1rusopvu _1mp4atg7 _qneczvxw _1ct3kb7n", state.type === 'resizing' && "_80omn7od _154pkb7n"])
|
|
325
|
-
}) : null, onIsWrappedChange ? /*#__PURE__*/React.createElement(DropdownParent, null, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
342
|
+
}) : null, onIsWrappedChange && fg('platform-button-icon-spacing-cleanup') ? /*#__PURE__*/React.createElement(DropdownParent, null, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
343
|
+
trigger: getTriggerButton,
|
|
344
|
+
onOpenChange: onDropdownOpenChange,
|
|
345
|
+
placement: 'bottom'
|
|
346
|
+
}, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
347
|
+
elemBefore: isWrapped ? /*#__PURE__*/React.createElement(UnwrapTextIcon, null) : /*#__PURE__*/React.createElement(WrapTextIcon, null),
|
|
348
|
+
testId: `${id}-column-dropdown-item-toggle-wrapping`,
|
|
349
|
+
onClick: toggleWrap
|
|
350
|
+
}, isWrapped ? /*#__PURE__*/React.createElement(FormattedMessage, issueLikeTableMessages.unwrapText) : /*#__PURE__*/React.createElement(FormattedMessage, issueLikeTableMessages.wrapText)))) : onIsWrappedChange ? /*#__PURE__*/React.createElement(DropdownParentOld, null, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
326
351
|
trigger: getTriggerButton,
|
|
327
352
|
onOpenChange: onDropdownOpenChange,
|
|
328
353
|
placement: 'bottom'
|
|
@@ -42,7 +42,6 @@ export var InsertButton = function InsertButton(_ref) {
|
|
|
42
42
|
if (isJqlSubmitFixEnabled) {
|
|
43
43
|
onBeforeInsert === null || onBeforeInsert === void 0 || onBeforeInsert(parameters);
|
|
44
44
|
}
|
|
45
|
-
;
|
|
46
45
|
var insertButtonClickedEvent = analyticsEvent.update({
|
|
47
46
|
actionSubjectId: 'insert',
|
|
48
47
|
attributes: _objectSpread({
|
|
@@ -11,6 +11,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
11
11
|
import Button from '@atlaskit/button/new';
|
|
12
12
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
13
13
|
import CustomizeIcon from '@atlaskit/icon/core/customize';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
15
16
|
import { createFilter, PopupSelect } from '@atlaskit/select';
|
|
16
17
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -19,7 +20,8 @@ import { useDatasourceExperienceId } from '../../../contexts/datasource-experien
|
|
|
19
20
|
import { ConcatenatedMenuList, MenuItem } from './concatenated-menu-list';
|
|
20
21
|
import { columnPickerMessages } from './messages';
|
|
21
22
|
var styles = {
|
|
22
|
-
chevronIconStyles: "_1e0c1txw _4cvr1h6o"
|
|
23
|
+
chevronIconStyles: "_1e0c1txw _4cvr1h6o",
|
|
24
|
+
customizeIcon: "_s7n4nkob"
|
|
23
25
|
};
|
|
24
26
|
export var ColumnPicker = function ColumnPicker(_ref) {
|
|
25
27
|
var columns = _ref.columns,
|
|
@@ -145,7 +147,23 @@ export var ColumnPicker = function ColumnPicker(_ref) {
|
|
|
145
147
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
146
148
|
content: intl.formatMessage(columnPickerMessages.tooltip)
|
|
147
149
|
}, function (tooltipProps) {
|
|
148
|
-
return /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
150
|
+
return fg('platform-button-icon-spacing-cleanup') ? /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
151
|
+
isSelected: isOpen,
|
|
152
|
+
spacing: "compact",
|
|
153
|
+
appearance: 'default',
|
|
154
|
+
testId: "column-picker-trigger-button",
|
|
155
|
+
iconAfter: function iconAfter() {
|
|
156
|
+
return /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
157
|
+
label: "down",
|
|
158
|
+
size: "small"
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
162
|
+
as: "span",
|
|
163
|
+
xcss: styles.customizeIcon
|
|
164
|
+
}, /*#__PURE__*/React.createElement(CustomizeIcon, {
|
|
165
|
+
label: "customize"
|
|
166
|
+
}))) : /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, triggerProps, {
|
|
149
167
|
isSelected: isOpen,
|
|
150
168
|
spacing: "compact",
|
|
151
169
|
appearance: 'default',
|
|
@@ -29,6 +29,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}
|
|
|
29
29
|
.ProseMirror .pm-table-wrapper>table thead ._s99e1tcg{line-height:24px}
|
|
30
30
|
._11681tcg [data-testid=datasource-header-content--container]{line-height:24px}
|
|
31
31
|
._11j11b66 [data-testid=datasource-header-content--container]{padding-right:var(--ds-space-050,4px)}
|
|
32
|
+
._11lvlcsk button{padding-left:var(--ds-space-0,4px)}
|
|
32
33
|
._11lvze3t button{padding-left:var(--ds-space-0,0)}
|
|
33
34
|
._12pn15vq [data-testid=datasource-header-content--container]{overflow-x:hidden}
|
|
34
35
|
._154iidpf{top:0}
|
|
@@ -78,6 +79,7 @@ thead.has-column-picker ._10i2idpf:nth-last-of-type(2){border-right:0}
|
|
|
78
79
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
79
80
|
._vchhusvi{box-sizing:border-box}
|
|
80
81
|
._vwz41tcg{line-height:24px}
|
|
82
|
+
._yhjmlcsk button{padding-right:var(--ds-space-0,4px)}
|
|
81
83
|
._yhjmze3t button{padding-right:var(--ds-space-0,0)}
|
|
82
84
|
.pm-table-wrapper>table thead ._11ep1b66{padding-right:var(--ds-space-050,4px)}
|
|
83
85
|
.pm-table-wrapper>table thead ._15hu1b66{padding-left:var(--ds-space-050,4px)}
|
|
@@ -5,7 +5,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
6
|
var _excluded = ["as", "style"],
|
|
7
7
|
_excluded2 = ["as", "style"],
|
|
8
|
-
_excluded3 = ["
|
|
8
|
+
_excluded3 = ["as", "style"],
|
|
9
|
+
_excluded4 = ["triggerRef"];
|
|
9
10
|
import "./draggable-table-heading.compiled.css";
|
|
10
11
|
import { forwardRef } from 'react';
|
|
11
12
|
import * as React from 'react';
|
|
@@ -22,6 +23,7 @@ import Button from '@atlaskit/button/new';
|
|
|
22
23
|
import DropdownMenu, { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
23
24
|
import ChevronDown from '@atlaskit/icon/core/chevron-down';
|
|
24
25
|
import ChevronUp from '@atlaskit/icon/core/chevron-up';
|
|
26
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
27
|
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
26
28
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
27
29
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
@@ -52,7 +54,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
52
54
|
TableHeading.displayName = 'TableHeading';
|
|
53
55
|
}
|
|
54
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
55
|
-
var
|
|
57
|
+
var DropdownParentOld = forwardRef(function (_ref2, __cmplr) {
|
|
56
58
|
var _ref2$as = _ref2.as,
|
|
57
59
|
C = _ref2$as === void 0 ? "div" : _ref2$as,
|
|
58
60
|
__cmpls = _ref2.style,
|
|
@@ -63,6 +65,22 @@ var DropdownParent = forwardRef(function (_ref2, __cmplr) {
|
|
|
63
65
|
className: ax(["_1e0c1txw _4cvr1h6o _o5721q9c _1wtnze3t _ficf1e5h _jq8g1wug _11lvze3t _yhjmze3t", __cmplp.className])
|
|
64
66
|
}));
|
|
65
67
|
});
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
70
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
71
|
+
DropdownParentOld.displayName = 'DropdownParentOld';
|
|
72
|
+
}
|
|
73
|
+
var DropdownParent = forwardRef(function (_ref3, __cmplr) {
|
|
74
|
+
var _ref3$as = _ref3.as,
|
|
75
|
+
C = _ref3$as === void 0 ? "div" : _ref3$as,
|
|
76
|
+
__cmpls = _ref3.style,
|
|
77
|
+
__cmplp = _objectWithoutProperties(_ref3, _excluded3);
|
|
78
|
+
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
79
|
+
style: __cmpls,
|
|
80
|
+
ref: __cmplr,
|
|
81
|
+
className: ax(["_1e0c1txw _4cvr1h6o _o5721q9c _1wtnze3t _ficf1e5h _jq8g1wug _11lvlcsk _yhjmlcsk", __cmplp.className])
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
66
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
67
85
|
DropdownParent.displayName = 'DropdownParent';
|
|
68
86
|
}
|
|
@@ -76,17 +94,17 @@ var idleState = {
|
|
|
76
94
|
var draggingState = {
|
|
77
95
|
type: 'dragging'
|
|
78
96
|
};
|
|
79
|
-
export var DraggableTableHeading = function DraggableTableHeading(
|
|
80
|
-
var children =
|
|
81
|
-
id =
|
|
82
|
-
index =
|
|
83
|
-
tableId =
|
|
84
|
-
dndPreviewHeight =
|
|
85
|
-
dragPreview =
|
|
86
|
-
width =
|
|
87
|
-
onWidthChange =
|
|
88
|
-
isWrapped =
|
|
89
|
-
onIsWrappedChange =
|
|
97
|
+
export var DraggableTableHeading = function DraggableTableHeading(_ref4) {
|
|
98
|
+
var children = _ref4.children,
|
|
99
|
+
id = _ref4.id,
|
|
100
|
+
index = _ref4.index,
|
|
101
|
+
tableId = _ref4.tableId,
|
|
102
|
+
dndPreviewHeight = _ref4.dndPreviewHeight,
|
|
103
|
+
dragPreview = _ref4.dragPreview,
|
|
104
|
+
width = _ref4.width,
|
|
105
|
+
onWidthChange = _ref4.onWidthChange,
|
|
106
|
+
isWrapped = _ref4.isWrapped,
|
|
107
|
+
onIsWrappedChange = _ref4.onIsWrappedChange;
|
|
90
108
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
91
109
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
92
110
|
var mainHeaderCellRef = useRef(null);
|
|
@@ -122,15 +140,15 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
122
140
|
tableId: tableId
|
|
123
141
|
};
|
|
124
142
|
},
|
|
125
|
-
onGenerateDragPreview: function onGenerateDragPreview(
|
|
126
|
-
var nativeSetDragImage =
|
|
143
|
+
onGenerateDragPreview: function onGenerateDragPreview(_ref5) {
|
|
144
|
+
var nativeSetDragImage = _ref5.nativeSetDragImage;
|
|
127
145
|
setCustomNativeDragPreview({
|
|
128
146
|
getOffset: pointerOutsideOfPreview({
|
|
129
147
|
x: '18px',
|
|
130
148
|
y: '18px'
|
|
131
149
|
}),
|
|
132
|
-
render: function render(
|
|
133
|
-
var container =
|
|
150
|
+
render: function render(_ref6) {
|
|
151
|
+
var container = _ref6.container;
|
|
134
152
|
// Cause a `react` re-render to create your portal synchronously
|
|
135
153
|
setState({
|
|
136
154
|
type: 'preview',
|
|
@@ -165,9 +183,9 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
165
183
|
getIsSticky: function getIsSticky() {
|
|
166
184
|
return true;
|
|
167
185
|
},
|
|
168
|
-
getData: function getData(
|
|
169
|
-
var input =
|
|
170
|
-
element =
|
|
186
|
+
getData: function getData(_ref7) {
|
|
187
|
+
var input = _ref7.input,
|
|
188
|
+
element = _ref7.element;
|
|
171
189
|
var data = {
|
|
172
190
|
id: id,
|
|
173
191
|
index: index
|
|
@@ -198,8 +216,8 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
198
216
|
// During dragging anywhere we want to remove `pointerEvents: 'none'` from all the drop targets
|
|
199
217
|
useEffect(function () {
|
|
200
218
|
return monitorForElements({
|
|
201
|
-
canMonitor: function canMonitor(
|
|
202
|
-
var source =
|
|
219
|
+
canMonitor: function canMonitor(_ref8) {
|
|
220
|
+
var source = _ref8.source;
|
|
203
221
|
return source.data.type === 'table-header' && source.data.tableId === tableId;
|
|
204
222
|
},
|
|
205
223
|
onDragStart: function onDragStart() {
|
|
@@ -235,8 +253,8 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
235
253
|
};
|
|
236
254
|
},
|
|
237
255
|
// Is called when dragging started
|
|
238
|
-
onGenerateDragPreview: function onGenerateDragPreview(
|
|
239
|
-
var nativeSetDragImage =
|
|
256
|
+
onGenerateDragPreview: function onGenerateDragPreview(_ref9) {
|
|
257
|
+
var nativeSetDragImage = _ref9.nativeSetDragImage;
|
|
240
258
|
// We don't show any preview, since column separator (handle) is moving with the cursor
|
|
241
259
|
disableNativeDragPreview({
|
|
242
260
|
nativeSetDragImage: nativeSetDragImage
|
|
@@ -248,8 +266,8 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
248
266
|
initialWidth: width
|
|
249
267
|
});
|
|
250
268
|
},
|
|
251
|
-
onDrag: function onDrag(
|
|
252
|
-
var location =
|
|
269
|
+
onDrag: function onDrag(_ref0) {
|
|
270
|
+
var location = _ref0.location;
|
|
253
271
|
var relativeDistanceX = location.current.input.clientX - location.initial.input.clientX;
|
|
254
272
|
invariant(state.type === 'resizing');
|
|
255
273
|
var initialWidth = state.initialWidth;
|
|
@@ -288,9 +306,9 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
288
306
|
var TriggerIcon = useMemo(function () {
|
|
289
307
|
return shouldShowTriggerIcon ? isDropdownOpen ? ChevronUp : ChevronDown : isWideEnoughToHaveChevron ? GlyphPlaceholder : undefined;
|
|
290
308
|
}, [shouldShowTriggerIcon, isDropdownOpen, isWideEnoughToHaveChevron]);
|
|
291
|
-
var getTriggerButton = useCallback(function (
|
|
292
|
-
var triggerRef =
|
|
293
|
-
props = _objectWithoutProperties(
|
|
309
|
+
var getTriggerButton = useCallback(function (_ref1) {
|
|
310
|
+
var triggerRef = _ref1.triggerRef,
|
|
311
|
+
props = _objectWithoutProperties(_ref1, _excluded4);
|
|
294
312
|
return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
295
313
|
testId: "".concat(id, "-column-dropdown"),
|
|
296
314
|
shouldFitContainer: true,
|
|
@@ -310,8 +328,8 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
310
328
|
}
|
|
311
329
|
}), children);
|
|
312
330
|
}, [children, id, TriggerIcon]);
|
|
313
|
-
var onDropdownOpenChange = useCallback(function (
|
|
314
|
-
var isOpen =
|
|
331
|
+
var onDropdownOpenChange = useCallback(function (_ref10) {
|
|
332
|
+
var isOpen = _ref10.isOpen;
|
|
315
333
|
return setIsDropdownOpen(isOpen);
|
|
316
334
|
}, []);
|
|
317
335
|
var toggleWrap = useCallback(function () {
|
|
@@ -343,7 +361,15 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
343
361
|
},
|
|
344
362
|
"data-testid": "column-resize-handle",
|
|
345
363
|
className: ax(["_1y7c1ejb _1bsbaakz _80om11mm _16jlidpf _kqswstnw _1pbykb7n _1xi2aesa _154iidpf _1tesidpf _pdyk1hrg _154pidpf _dydkssc3 _1kt9b3bt _1cs8stnw _1rusopvu _1mp4atg7 _qneczvxw _1ct3kb7n", state.type === 'resizing' && "_80omn7od _154pkb7n"])
|
|
346
|
-
}) : null, onIsWrappedChange ? /*#__PURE__*/React.createElement(DropdownParent, null, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
364
|
+
}) : null, onIsWrappedChange && fg('platform-button-icon-spacing-cleanup') ? /*#__PURE__*/React.createElement(DropdownParent, null, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
365
|
+
trigger: getTriggerButton,
|
|
366
|
+
onOpenChange: onDropdownOpenChange,
|
|
367
|
+
placement: 'bottom'
|
|
368
|
+
}, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
369
|
+
elemBefore: isWrapped ? /*#__PURE__*/React.createElement(UnwrapTextIcon, null) : /*#__PURE__*/React.createElement(WrapTextIcon, null),
|
|
370
|
+
testId: "".concat(id, "-column-dropdown-item-toggle-wrapping"),
|
|
371
|
+
onClick: toggleWrap
|
|
372
|
+
}, isWrapped ? /*#__PURE__*/React.createElement(FormattedMessage, issueLikeTableMessages.unwrapText) : /*#__PURE__*/React.createElement(FormattedMessage, issueLikeTableMessages.wrapText)))) : onIsWrappedChange ? /*#__PURE__*/React.createElement(DropdownParentOld, null, /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
347
373
|
trigger: getTriggerButton,
|
|
348
374
|
onOpenChange: onDropdownOpenChange,
|
|
349
375
|
placement: 'bottom'
|
|
@@ -19,10 +19,12 @@ const styles = cssMap({
|
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
export const FakeModalDialogContainer = ({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
22
|
+
export const FakeModalDialogContainer = ({
|
|
23
|
+
children,
|
|
24
|
+
hasOverflow = true,
|
|
25
|
+
}: {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
hasOverflow?: boolean;
|
|
28
|
+
}): React.JSX.Element => {
|
|
29
|
+
return <Box xcss={cx(styles.tableWrapper, hasOverflow && styles.hasOverflow)}>{children}</Box>;
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.33.
|
|
3
|
+
"version": "4.33.6",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/afm-i18n-platform-linking-platform-link-datasource": "2.7.0",
|
|
41
41
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
42
42
|
"@atlaskit/atlassian-context": "^0.6.0",
|
|
43
|
-
"@atlaskit/avatar": "^25.
|
|
43
|
+
"@atlaskit/avatar": "^25.8.0",
|
|
44
44
|
"@atlaskit/avatar-group": "^12.4.0",
|
|
45
45
|
"@atlaskit/badge": "^18.4.0",
|
|
46
46
|
"@atlaskit/button": "^23.9.0",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"@atlaskit/inline-edit": "^15.6.0",
|
|
60
60
|
"@atlaskit/intl-messages-provider": "^2.0.0",
|
|
61
61
|
"@atlaskit/jql-ast": "^3.4.0",
|
|
62
|
-
"@atlaskit/jql-editor": "^5.
|
|
63
|
-
"@atlaskit/jql-editor-autocomplete-rest": "^3.
|
|
62
|
+
"@atlaskit/jql-editor": "^5.13.0",
|
|
63
|
+
"@atlaskit/jql-editor-autocomplete-rest": "^3.1.0",
|
|
64
64
|
"@atlaskit/layering": "^3.6.0",
|
|
65
65
|
"@atlaskit/link": "^3.3.0",
|
|
66
66
|
"@atlaskit/link-client-extension": "^6.0.0",
|
|
67
67
|
"@atlaskit/link-provider": "^4.2.0",
|
|
68
|
-
"@atlaskit/linking-common": "^9.
|
|
68
|
+
"@atlaskit/linking-common": "^9.10.0",
|
|
69
69
|
"@atlaskit/linking-types": "^14.2.0",
|
|
70
70
|
"@atlaskit/logo": "^19.10.0",
|
|
71
71
|
"@atlaskit/lozenge": "^13.4.0",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"@atlaskit/primitives": "^18.0.0",
|
|
81
81
|
"@atlaskit/react-select": "^3.13.0",
|
|
82
82
|
"@atlaskit/select": "^21.7.0",
|
|
83
|
-
"@atlaskit/smart-card": "^43.
|
|
84
|
-
"@atlaskit/smart-user-picker": "^
|
|
83
|
+
"@atlaskit/smart-card": "^43.25.0",
|
|
84
|
+
"@atlaskit/smart-user-picker": "^9.0.0",
|
|
85
85
|
"@atlaskit/spinner": "^19.0.0",
|
|
86
86
|
"@atlaskit/tag": "^14.5.0",
|
|
87
87
|
"@atlaskit/textfield": "^8.2.0",
|
|
@@ -190,6 +190,9 @@
|
|
|
190
190
|
},
|
|
191
191
|
"platform_navx_sllv_j2ws_dropdown_for_single_row": {
|
|
192
192
|
"type": "boolean"
|
|
193
|
+
},
|
|
194
|
+
"platform-button-icon-spacing-cleanup": {
|
|
195
|
+
"type": "boolean"
|
|
193
196
|
}
|
|
194
197
|
},
|
|
195
198
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/9c893299-a527-4457-9b46-f3bc4c828766"
|