@atlaskit/link-datasource 1.22.6 → 1.22.7
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 +7 -0
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +15 -15
- package/dist/cjs/ui/issue-like-table/index.js +4 -4
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +11 -11
- package/dist/es2019/ui/issue-like-table/index.js +3 -3
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +11 -11
- package/dist/esm/ui/issue-like-table/index.js +3 -3
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.22.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#70616](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70616) [`76068b6be8dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76068b6be8dc) - Upgrading to Pragmatic drag and drop 1.0
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 1.22.6
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -11,14 +11,14 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
13
13
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
14
|
-
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/
|
|
15
|
-
var _boxWithoutTerminal = require("@atlaskit/pragmatic-drag-and-drop-react-indicator/box-without-terminal");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
14
|
+
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
15
|
+
var _boxWithoutTerminal = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box-without-terminal");
|
|
16
|
+
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
17
|
+
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
18
|
+
var _disableNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview");
|
|
19
|
+
var _pointerOutsideOfPreview = require("@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview");
|
|
20
|
+
var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
|
|
21
|
+
var _preventUnhandled = require("@atlaskit/pragmatic-drag-and-drop/prevent-unhandled");
|
|
22
22
|
var _styled = require("./styled");
|
|
23
23
|
var _utils = require("./utils");
|
|
24
24
|
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; }
|
|
@@ -104,7 +104,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
104
104
|
(0, _react.useEffect)(function () {
|
|
105
105
|
var cell = mainHeaderCellRef.current;
|
|
106
106
|
(0, _tinyInvariant.default)(cell);
|
|
107
|
-
return (0, _combine.combine)((0,
|
|
107
|
+
return (0, _combine.combine)((0, _adapter.draggable)({
|
|
108
108
|
element: cell,
|
|
109
109
|
getInitialData: function getInitialData() {
|
|
110
110
|
return {
|
|
@@ -117,7 +117,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
117
117
|
onGenerateDragPreview: function onGenerateDragPreview(_ref2) {
|
|
118
118
|
var nativeSetDragImage = _ref2.nativeSetDragImage;
|
|
119
119
|
(0, _setCustomNativeDragPreview.setCustomNativeDragPreview)({
|
|
120
|
-
getOffset: (0,
|
|
120
|
+
getOffset: (0, _pointerOutsideOfPreview.pointerOutsideOfPreview)({
|
|
121
121
|
x: '18px',
|
|
122
122
|
y: '18px'
|
|
123
123
|
}),
|
|
@@ -152,7 +152,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
152
152
|
(0, _react.useEffect)(function () {
|
|
153
153
|
var dropTarget = dropTargetRef.current;
|
|
154
154
|
(0, _tinyInvariant.default)(dropTarget);
|
|
155
|
-
return (0,
|
|
155
|
+
return (0, _adapter.dropTargetForElements)({
|
|
156
156
|
element: dropTarget,
|
|
157
157
|
getIsSticky: function getIsSticky() {
|
|
158
158
|
return true;
|
|
@@ -189,7 +189,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
189
189
|
|
|
190
190
|
// During dragging anywhere we want to remove `pointerEvents: 'none'` from all the drop targets
|
|
191
191
|
(0, _react.useEffect)(function () {
|
|
192
|
-
return (0,
|
|
192
|
+
return (0, _adapter.monitorForElements)({
|
|
193
193
|
canMonitor: function canMonitor(_ref5) {
|
|
194
194
|
var source = _ref5.source;
|
|
195
195
|
return source.data.type === 'table-header' && source.data.tableId === tableId;
|
|
@@ -215,7 +215,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
215
215
|
(0, _tinyInvariant.default)(resizeHandle);
|
|
216
216
|
var mainHeaderCell = mainHeaderCellRef.current;
|
|
217
217
|
(0, _tinyInvariant.default)(mainHeaderCell);
|
|
218
|
-
return (0,
|
|
218
|
+
return (0, _adapter.draggable)({
|
|
219
219
|
element: resizeHandle,
|
|
220
220
|
getInitialData: function getInitialData() {
|
|
221
221
|
// metadata related to currently dragging item (can be read by drop events etc)
|
|
@@ -234,7 +234,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
234
234
|
nativeSetDragImage: nativeSetDragImage
|
|
235
235
|
});
|
|
236
236
|
// Block drag operations outside `@atlaskit/pragmatic-drag-and-drop`
|
|
237
|
-
|
|
237
|
+
_preventUnhandled.preventUnhandled.start();
|
|
238
238
|
setState({
|
|
239
239
|
type: 'resizing',
|
|
240
240
|
initialWidth: width
|
|
@@ -253,7 +253,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
253
253
|
mainHeaderCell.style.setProperty('width', "".concat(proposedWidth, "px"));
|
|
254
254
|
},
|
|
255
255
|
onDrop: function onDrop() {
|
|
256
|
-
|
|
256
|
+
_preventUnhandled.preventUnhandled.stop();
|
|
257
257
|
setState(idleState);
|
|
258
258
|
if (onWidthChange) {
|
|
259
259
|
var cssWidth = +mainHeaderCell.style.getPropertyValue('width').slice(0, -2);
|
|
@@ -19,11 +19,11 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
19
19
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
20
20
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
21
21
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
22
|
-
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/
|
|
22
|
+
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
23
23
|
var _reorderWithEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge");
|
|
24
24
|
var _pragmaticDragAndDropReactBeautifulDndAutoscroll = require("@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll");
|
|
25
|
-
var
|
|
26
|
-
var
|
|
25
|
+
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
26
|
+
var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
27
27
|
var _primitives = require("@atlaskit/primitives");
|
|
28
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
29
29
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -326,7 +326,7 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
326
326
|
if (!onVisibleColumnKeysChange || !hasData) {
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
|
-
return (0, _combine.combine)((0,
|
|
329
|
+
return (0, _combine.combine)((0, _adapter.monitorForElements)({
|
|
330
330
|
onDragStart: function onDragStart(_ref8) {
|
|
331
331
|
var location = _ref8.location,
|
|
332
332
|
source = _ref8.source;
|
|
@@ -3,14 +3,14 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
5
5
|
import invariant from 'tiny-invariant';
|
|
6
|
-
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/
|
|
7
|
-
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-indicator/box-without-terminal';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
7
|
+
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box-without-terminal';
|
|
8
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
9
|
+
import { draggable, dropTargetForElements, monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
10
|
+
import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';
|
|
11
|
+
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
12
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
13
|
+
import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';
|
|
14
14
|
import { TableHeading } from './styled';
|
|
15
15
|
import { COLUMN_MIN_WIDTH, getWidthCss } from './utils';
|
|
16
16
|
const verticallyAlignedStyles = css({
|
|
@@ -100,7 +100,7 @@ export const DraggableTableHeading = ({
|
|
|
100
100
|
nativeSetDragImage
|
|
101
101
|
}) {
|
|
102
102
|
setCustomNativeDragPreview({
|
|
103
|
-
getOffset:
|
|
103
|
+
getOffset: pointerOutsideOfPreview({
|
|
104
104
|
x: '18px',
|
|
105
105
|
y: '18px'
|
|
106
106
|
}),
|
|
@@ -219,7 +219,7 @@ export const DraggableTableHeading = ({
|
|
|
219
219
|
nativeSetDragImage
|
|
220
220
|
});
|
|
221
221
|
// Block drag operations outside `@atlaskit/pragmatic-drag-and-drop`
|
|
222
|
-
|
|
222
|
+
preventUnhandled.start();
|
|
223
223
|
setState({
|
|
224
224
|
type: 'resizing',
|
|
225
225
|
initialWidth: width
|
|
@@ -241,7 +241,7 @@ export const DraggableTableHeading = ({
|
|
|
241
241
|
mainHeaderCell.style.setProperty('width', `${proposedWidth}px`);
|
|
242
242
|
},
|
|
243
243
|
onDrop() {
|
|
244
|
-
|
|
244
|
+
preventUnhandled.stop();
|
|
245
245
|
setState(idleState);
|
|
246
246
|
if (onWidthChange) {
|
|
247
247
|
let cssWidth = +mainHeaderCell.style.getPropertyValue('width').slice(0, -2);
|
|
@@ -7,11 +7,11 @@ import { useIntl } from 'react-intl-next';
|
|
|
7
7
|
import invariant from 'tiny-invariant';
|
|
8
8
|
import Heading from '@atlaskit/heading';
|
|
9
9
|
import { Skeleton } from '@atlaskit/linking-common';
|
|
10
|
-
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/
|
|
10
|
+
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
11
11
|
import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';
|
|
12
12
|
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
14
|
+
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
15
15
|
import { Flex } from '@atlaskit/primitives';
|
|
16
16
|
import { N40 } from '@atlaskit/theme/colors';
|
|
17
17
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -7,14 +7,14 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import ReactDOM from 'react-dom';
|
|
9
9
|
import invariant from 'tiny-invariant';
|
|
10
|
-
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/
|
|
11
|
-
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-indicator/box-without-terminal';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
10
|
+
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
11
|
+
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box-without-terminal';
|
|
12
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
13
|
+
import { draggable, dropTargetForElements, monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
14
|
+
import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/disable-native-drag-preview';
|
|
15
|
+
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
|
|
16
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
|
|
17
|
+
import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';
|
|
18
18
|
import { TableHeading } from './styled';
|
|
19
19
|
import { COLUMN_MIN_WIDTH, getWidthCss } from './utils';
|
|
20
20
|
var verticallyAlignedStyles = css({
|
|
@@ -111,7 +111,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref) {
|
|
|
111
111
|
onGenerateDragPreview: function onGenerateDragPreview(_ref2) {
|
|
112
112
|
var nativeSetDragImage = _ref2.nativeSetDragImage;
|
|
113
113
|
setCustomNativeDragPreview({
|
|
114
|
-
getOffset:
|
|
114
|
+
getOffset: pointerOutsideOfPreview({
|
|
115
115
|
x: '18px',
|
|
116
116
|
y: '18px'
|
|
117
117
|
}),
|
|
@@ -228,7 +228,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref) {
|
|
|
228
228
|
nativeSetDragImage: nativeSetDragImage
|
|
229
229
|
});
|
|
230
230
|
// Block drag operations outside `@atlaskit/pragmatic-drag-and-drop`
|
|
231
|
-
|
|
231
|
+
preventUnhandled.start();
|
|
232
232
|
setState({
|
|
233
233
|
type: 'resizing',
|
|
234
234
|
initialWidth: width
|
|
@@ -247,7 +247,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref) {
|
|
|
247
247
|
mainHeaderCell.style.setProperty('width', "".concat(proposedWidth, "px"));
|
|
248
248
|
},
|
|
249
249
|
onDrop: function onDrop() {
|
|
250
|
-
|
|
250
|
+
preventUnhandled.stop();
|
|
251
251
|
setState(idleState);
|
|
252
252
|
if (onWidthChange) {
|
|
253
253
|
var cssWidth = +mainHeaderCell.style.getPropertyValue('width').slice(0, -2);
|
|
@@ -16,11 +16,11 @@ import { useIntl } from 'react-intl-next';
|
|
|
16
16
|
import invariant from 'tiny-invariant';
|
|
17
17
|
import Heading from '@atlaskit/heading';
|
|
18
18
|
import { Skeleton } from '@atlaskit/linking-common';
|
|
19
|
-
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/
|
|
19
|
+
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
20
20
|
import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';
|
|
21
21
|
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
23
|
+
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
|
|
24
24
|
import { Flex } from '@atlaskit/primitives';
|
|
25
25
|
import { N40 } from '@atlaskit/theme/colors';
|
|
26
26
|
import Tooltip from '@atlaskit/tooltip';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.7",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/empty-state": "^7.7.0",
|
|
42
42
|
"@atlaskit/form": "^9.0.3",
|
|
43
43
|
"@atlaskit/heading": "^1.6.0",
|
|
44
|
-
"@atlaskit/icon": "^22.
|
|
44
|
+
"@atlaskit/icon": "^22.1.0",
|
|
45
45
|
"@atlaskit/icon-object": "^6.3.0",
|
|
46
46
|
"@atlaskit/image": "^1.1.0",
|
|
47
47
|
"@atlaskit/intl-messages-provider": "^1.0.0",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
56
56
|
"@atlaskit/outbound-auth-flow-client": "^3.4.5",
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
58
|
-
"@atlaskit/pragmatic-drag-and-drop": "^0.
|
|
59
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^0.
|
|
60
|
-
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.
|
|
61
|
-
"@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.
|
|
62
|
-
"@atlaskit/primitives": "^2.
|
|
58
|
+
"@atlaskit/pragmatic-drag-and-drop": "^1.0.0",
|
|
59
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
60
|
+
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^1.0.0",
|
|
61
|
+
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.0.0",
|
|
62
|
+
"@atlaskit/primitives": "^2.1.0",
|
|
63
63
|
"@atlaskit/select": "^17.1.0",
|
|
64
64
|
"@atlaskit/smart-card": "^26.47.0",
|
|
65
65
|
"@atlaskit/spinner": "^16.0.0",
|