@atlaskit/pragmatic-drag-and-drop 1.1.6 → 1.1.8
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 +422 -255
- package/combine/package.json +1 -1
- package/dist/cjs/util/changing-window/is-entering-window.js +22 -27
- package/dist/cjs/util/changing-window/is-from-another-window.js +22 -0
- package/dist/cjs/util/changing-window/is-leaving-window.js +25 -28
- package/dist/es2019/util/changing-window/is-entering-window.js +22 -28
- package/dist/es2019/util/changing-window/is-from-another-window.js +16 -0
- package/dist/es2019/util/changing-window/is-leaving-window.js +25 -29
- package/dist/esm/util/changing-window/is-entering-window.js +22 -28
- package/dist/esm/util/changing-window/is-from-another-window.js +16 -0
- package/dist/esm/util/changing-window/is-leaving-window.js +25 -29
- package/dist/types/adapter/external-adapter.d.ts +1 -1
- package/dist/types/util/changing-window/is-from-another-window.d.ts +4 -0
- package/dist/types-ts4.5/adapter/external-adapter.d.ts +1 -1
- package/dist/types-ts4.5/util/changing-window/is-from-another-window.d.ts +4 -0
- package/element/adapter/package.json +1 -1
- package/element/center-under-pointer/package.json +1 -1
- package/element/disable-native-drag-preview/package.json +1 -1
- package/element/format-urls-for-external/package.json +1 -1
- package/element/pointer-outside-of-preview/package.json +1 -1
- package/element/preserve-offset-on-source/package.json +1 -1
- package/element/scroll-just-enough-into-view/package.json +1 -1
- package/element/set-custom-native-drag-preview/package.json +1 -1
- package/external/adapter/package.json +1 -1
- package/external/file/package.json +1 -1
- package/external/html/package.json +1 -1
- package/external/some/package.json +1 -1
- package/external/text/package.json +1 -1
- package/external/url/package.json +1 -1
- package/once/package.json +1 -1
- package/package.json +2 -2
- package/prevent-unhandled/package.json +1 -1
- package/reorder/package.json +1 -1
- package/text-selection/adapter/package.json +1 -1
- package/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,499 +1,666 @@
|
|
|
1
1
|
# @atlaskit/pragmatic-drag-and-drop
|
|
2
2
|
|
|
3
|
+
## 1.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#100196](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100196)
|
|
8
|
+
[`da322bbbe7f5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/da322bbbe7f5) -
|
|
9
|
+
Setting `sideEffects: true` in `package.json` as a few essential files in `core` have side
|
|
10
|
+
effects. Unfortunately we require side effects to work around browser bugs and strangeness 😅.
|
|
11
|
+
|
|
12
|
+
## 1.1.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#95385](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95385)
|
|
17
|
+
[`c8d2e32f5071`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c8d2e32f5071) -
|
|
18
|
+
Minor internal refactor of code concerning entering / leaving a window
|
|
19
|
+
|
|
3
20
|
## 1.1.6
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
6
23
|
|
|
7
|
-
-
|
|
24
|
+
- [#94759](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94759)
|
|
25
|
+
[`140fc0d20c02`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/140fc0d20c02) -
|
|
26
|
+
Fixing our Safari workaround in `setCustomNativeDragPreview()` for a
|
|
27
|
+
[Safari drag preview bug](https://bugs.webkit.org/show_bug.cgi?id=266025) so that it works
|
|
28
|
+
correctly for `react@18+` usage.
|
|
8
29
|
|
|
9
30
|
## 1.1.5
|
|
10
31
|
|
|
11
32
|
### Patch Changes
|
|
12
33
|
|
|
13
|
-
-
|
|
34
|
+
- [#94316](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94316)
|
|
35
|
+
[`35fd5ed8e1d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35fd5ed8e1d7) -
|
|
36
|
+
Upgrading internal dependency `bind-event-listener` to `@^3.0.0`
|
|
14
37
|
|
|
15
38
|
## 1.1.4
|
|
16
39
|
|
|
17
40
|
### Patch Changes
|
|
18
41
|
|
|
19
|
-
-
|
|
42
|
+
- [#94302](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94302)
|
|
43
|
+
[`66ca9d1d1602`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/66ca9d1d1602) -
|
|
44
|
+
Improving jsdoc for the drop target `canDrop` function
|
|
20
45
|
|
|
21
46
|
## 1.1.3
|
|
22
47
|
|
|
23
48
|
### Patch Changes
|
|
24
49
|
|
|
25
|
-
-
|
|
50
|
+
- [#84398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84398)
|
|
51
|
+
[`77694db987fc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77694db987fc) -
|
|
52
|
+
Public release of Pragmatic drag and drop documentation
|
|
26
53
|
|
|
27
54
|
## 1.1.2
|
|
28
55
|
|
|
29
56
|
### Patch Changes
|
|
30
57
|
|
|
31
|
-
-
|
|
58
|
+
- [#84047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84047)
|
|
59
|
+
[`72a86ac4a940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/72a86ac4a940) -
|
|
60
|
+
Removing experimental `DropData` from `onDrop()`. Exposing the native `dropEffect` turned out to
|
|
61
|
+
problematic, as you will always get a `"none"` drop effect if dropping externally if the
|
|
62
|
+
original `draggable` was removed (a native `"dragend"` event is targetted at the original
|
|
63
|
+
draggable). This made the weak signal of `dropEffect` for even weaker and more problematic. In
|
|
64
|
+
order to not create footguns for folks, we have decided to remove this experimental API for now.
|
|
65
|
+
We can explore adding the API back in the future if folks think it would be valuable.
|
|
32
66
|
|
|
33
67
|
## 1.1.1
|
|
34
68
|
|
|
35
69
|
### Patch Changes
|
|
36
70
|
|
|
37
|
-
-
|
|
71
|
+
- [#83702](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83702)
|
|
72
|
+
[`4d9e25ab4eaa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d9e25ab4eaa) -
|
|
73
|
+
Updating the descriptions of Pragmatic drag and drop packages, so they each provide a consistent
|
|
74
|
+
description to various consumers, and so they are consistently formed amongst each other.
|
|
38
75
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
76
|
+
- `package.json` `description`
|
|
77
|
+
- `README.md`
|
|
78
|
+
- Website documentation
|
|
42
79
|
|
|
43
80
|
## 1.1.0
|
|
44
81
|
|
|
45
82
|
### Minor Changes
|
|
46
83
|
|
|
47
|
-
-
|
|
84
|
+
- [#82653](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82653)
|
|
85
|
+
[`136d8da5542d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/136d8da5542d) -
|
|
86
|
+
_Experimental_: Adding additional information to `onDrop()` events to expose what the final
|
|
87
|
+
`dropEffect` was for a drag operation (_now removed_)
|
|
48
88
|
|
|
49
|
-
|
|
89
|
+
Fixing a bug where `preventUnhandled.start()` would prevent unhandled drag operations forever.
|
|
90
|
+
It now only prevents unhandled drag operations for the current drag operation.
|
|
91
|
+
`preventUnhandled.stop()` is now optional, as `preventUnhandled.start()` now tidies up itself.
|
|
92
|
+
You can still leverage `preventUnhandled.stop()` to stop preventing unhandled drag operations
|
|
93
|
+
during a drag.
|
|
50
94
|
|
|
51
|
-
|
|
95
|
+
Tightening the `getDropEffect()` function on drop targets slightly so that `"none"` cannot be
|
|
96
|
+
provided. Using `"none"` as the drop effect would break the expected behaviour for nested drop
|
|
97
|
+
targets.
|
|
52
98
|
|
|
53
99
|
## 1.0.2
|
|
54
100
|
|
|
55
101
|
### Patch Changes
|
|
56
102
|
|
|
57
|
-
-
|
|
103
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
104
|
+
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
|
|
105
|
+
Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
58
106
|
|
|
59
107
|
## 1.0.1
|
|
60
108
|
|
|
61
109
|
### Patch Changes
|
|
62
110
|
|
|
63
|
-
-
|
|
111
|
+
- [#76476](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/76476)
|
|
112
|
+
[`35148e092790`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35148e092790) -
|
|
113
|
+
Adding warning for test environments to let people know if DragEvents have not been setup
|
|
114
|
+
correctly.
|
|
64
115
|
|
|
65
116
|
## 1.0.0
|
|
66
117
|
|
|
67
118
|
### Major Changes
|
|
68
119
|
|
|
69
|
-
-
|
|
120
|
+
- [#70616](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/70616)
|
|
121
|
+
[`42e57ea65fee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/42e57ea65fee) -
|
|
122
|
+
This is our first `major` release (`1.0`) for all Pragmatic drag and drop packages.
|
|
70
123
|
|
|
71
|
-
|
|
124
|
+
For a detailed explanation of these changes, and how to upgrade (automatically) to `1.0` please
|
|
125
|
+
see our
|
|
126
|
+
[1.0 upgrade guide](http://atlassian.design/components/pragmatic-drag-and-drop/core-package/upgrade-guides/upgrade-guide-for-1.0)
|
|
72
127
|
|
|
73
128
|
## 0.25.0
|
|
74
129
|
|
|
75
130
|
### Minor Changes
|
|
76
131
|
|
|
77
|
-
-
|
|
132
|
+
- [#59458](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59458)
|
|
133
|
+
[`7d6a69cfa61c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7d6a69cfa61c) -
|
|
134
|
+
Adding workaround for Safari bug.
|
|
78
135
|
|
|
79
|
-
|
|
136
|
+
In Safari (and iOS) if the element used for generating a native drag preview has opacity
|
|
137
|
+
applied, then the native drag preview can include elements underneath the drag preview element.
|
|
80
138
|
|
|
81
|
-
|
|
139
|
+
Pragmatic drag and drop now includes a workaround for this Safari bug.
|
|
82
140
|
|
|
83
141
|
## 0.24.0
|
|
84
142
|
|
|
85
143
|
### Minor Changes
|
|
86
144
|
|
|
87
|
-
-
|
|
145
|
+
- [#39935](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39935)
|
|
146
|
+
[`03b91562fec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03b91562fec) -
|
|
147
|
+
Exposing `AllDragTypes` type. This was previously an internal type, but it provided helpful to
|
|
148
|
+
expose for our new auto scroller. `AllDragTypes` is helpful if you need a function to work with
|
|
149
|
+
either `element` or `file` drag operations.
|
|
88
150
|
|
|
89
151
|
## 0.23.0
|
|
90
152
|
|
|
91
153
|
### Minor Changes
|
|
92
154
|
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
155
|
+
- [#38713](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38713)
|
|
156
|
+
[`3da89e29dfc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3da89e29dfc) - We
|
|
157
|
+
have renamed and tweaked the recently added `setCustomNativeDragPreview` `getOffset` utility
|
|
158
|
+
`preserveOffsetFromPointer` to be a bit easier to understand what it is doing.
|
|
159
|
+
|
|
160
|
+
```diff
|
|
161
|
+
- import { preserveOffsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-from-pointer';
|
|
162
|
+
+ import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-on-source';
|
|
163
|
+
|
|
164
|
+
draggable({
|
|
165
|
+
element: myElement,
|
|
166
|
+
onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
|
|
167
|
+
setCustomNativeDragPreview({
|
|
168
|
+
- getOffset: preserveOffsetFromPointer({
|
|
169
|
+
+ 'preserveOffsetOnSource' is a more accurate description of what is being achieved
|
|
170
|
+
+ getOffset: preserveOffsetOnSource({
|
|
171
|
+
- sourceElement: source.element,
|
|
172
|
+
+ // no longer including 'source' in argument name
|
|
173
|
+
+ // as it is implied by the function name
|
|
174
|
+
+ element: source.element,
|
|
175
|
+
input: location.current.input,
|
|
176
|
+
}),
|
|
177
|
+
render: function render({ container }) {
|
|
178
|
+
/* ... */
|
|
179
|
+
},
|
|
180
|
+
nativeSetDragImage,
|
|
181
|
+
});
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
```
|
|
120
185
|
|
|
121
186
|
## 0.22.0
|
|
122
187
|
|
|
123
188
|
### Minor Changes
|
|
124
189
|
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
|
|
190
|
+
- [#38397](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38397)
|
|
191
|
+
[`d644a68ddf6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d644a68ddf6) - Added
|
|
192
|
+
a new `setCustomNativeDragPreview` `getOffset` utility: `preserveOffsetFromPointer`.
|
|
193
|
+
`preserveOffsetFromPointer` mimics the default behaviour for non custom drag previews when
|
|
194
|
+
starting a drag: the initial cursor position offset is preserved for a seamless drag and drop
|
|
195
|
+
experience.
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
|
|
199
|
+
import { preserveOffsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/preserve-offset-from-pointer';
|
|
200
|
+
|
|
201
|
+
draggable({
|
|
202
|
+
element: myElement,
|
|
203
|
+
onGenerateDragPreview: ({ nativeSetDragImage, location, source }) => {
|
|
204
|
+
setCustomNativeDragPreview({
|
|
205
|
+
getOffset: preserveOffsetFromPointer({
|
|
206
|
+
sourceElement: source.element,
|
|
207
|
+
input: location.current.input,
|
|
208
|
+
}),
|
|
209
|
+
render: function render({ container }) {
|
|
210
|
+
/* ... */
|
|
211
|
+
},
|
|
212
|
+
nativeSetDragImage,
|
|
213
|
+
});
|
|
141
214
|
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
});
|
|
146
|
-
```
|
|
215
|
+
});
|
|
216
|
+
```
|
|
147
217
|
|
|
148
218
|
## 0.21.0
|
|
149
219
|
|
|
150
220
|
### Minor Changes
|
|
151
221
|
|
|
152
|
-
-
|
|
222
|
+
- [#38525](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38525)
|
|
223
|
+
[`de7463c7096`](https://bitbucket.org/atlassian/atlassian-frontend/commits/de7463c7096) -
|
|
224
|
+
Exposing some additional TypeScript types. These can be helpful when creating helper packages.
|
|
153
225
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
226
|
+
```ts
|
|
227
|
+
import type {
|
|
228
|
+
// These types are not needed for consumers
|
|
229
|
+
// They are mostly helpful for other packages
|
|
230
|
+
AllDragTypes,
|
|
231
|
+
MonitorArgs,
|
|
232
|
+
BaseEventPayload,
|
|
233
|
+
} from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
234
|
+
```
|
|
163
235
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
236
|
+
- `AllDragTypes`: representation of all entities types in the system (eg element and file)
|
|
237
|
+
- `MonitorArgs<DragType extends AllDragTypes>`: the arguments that can be passed to a monitor
|
|
238
|
+
- `BaseEventPayload<DragType extends AllDragTypes>`: the shared properties in all events
|
|
167
239
|
|
|
168
240
|
## 0.20.0
|
|
169
241
|
|
|
170
242
|
### Minor Changes
|
|
171
243
|
|
|
172
|
-
-
|
|
244
|
+
- [#38453](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38453)
|
|
245
|
+
[`554a6d8cc34`](https://bitbucket.org/atlassian/atlassian-frontend/commits/554a6d8cc34) - ###
|
|
246
|
+
Stickiness algorithm improvement
|
|
173
247
|
|
|
174
|
-
|
|
248
|
+
We have made some improvements to the drop target stickiness algorithm to allow sticky drop
|
|
249
|
+
targets that are no longer dragged over to cancel their stickiness.
|
|
175
250
|
|
|
176
|
-
|
|
251
|
+
Stickiness is no longer maintained when a sticky drop target states it cannot be dropped on
|
|
177
252
|
|
|
178
|
-
|
|
179
|
-
> Result: `[]`
|
|
253
|
+
> Scenario: `[A(sticky)]` → `[]` + `A:canDrop()` returns `false` Result: `[]`
|
|
180
254
|
|
|
181
|
-
|
|
255
|
+
Stickiness is no longer maintained when a sticky drop start states it is no longer sticky
|
|
182
256
|
|
|
183
|
-
|
|
184
|
-
> Result: `[]`
|
|
257
|
+
> Scenario: `[A(sticky)]` → `[]` + `A:getIsSticky()` returns `false` Result: `[]`
|
|
185
258
|
|
|
186
|
-
|
|
259
|
+
Stickiness is no longer maintained when a sticky drop start is unmounted
|
|
187
260
|
|
|
188
|
-
|
|
189
|
-
> Result: `[]`
|
|
261
|
+
> Scenario: `[A(sticky)]` → `[]` + `A` is unmounted Result: `[]`
|
|
190
262
|
|
|
191
|
-
|
|
263
|
+
To help facilitate this change:
|
|
192
264
|
|
|
193
|
-
|
|
194
|
-
|
|
265
|
+
- `getIsSticky()` is now only called when an _drop target_ is a potential candidate for
|
|
266
|
+
stickiness (previously it was called repeatedly)
|
|
267
|
+
- `getIsSticky()` and `canDrop()` are called on _drop targets_ that are no longer being
|
|
268
|
+
dragged over, but are candidates for stickiness
|
|
195
269
|
|
|
196
|
-
|
|
270
|
+
### Change to `DropTargetRecord` `type`
|
|
197
271
|
|
|
198
|
-
|
|
272
|
+
Previously, the `DropTargetRecord` type had a property called `sticky` which would represent
|
|
273
|
+
whether the _drop target_ was registering itself as sticky via `getIsSticky()`. Knowing `sticky`
|
|
274
|
+
is not overly helpful given that we now regularly recompute stickiness and a _drop target_ can
|
|
275
|
+
change disable stickiness after it is applied.
|
|
199
276
|
|
|
200
|
-
|
|
277
|
+
What is helpful, is knowing whether a _drop target_ is active _because_ of stickiness. So we
|
|
278
|
+
have removed `sticky` and added `isActiveDueToStickiness` to the `DropTargetRecord` type.
|
|
201
279
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
280
|
+
```diff
|
|
281
|
+
type DropTargetRecord = {
|
|
282
|
+
element: Element;
|
|
283
|
+
data: Record<string | symbol, unknown>;
|
|
284
|
+
dropEffect: DataTransfer['dropEffect'];
|
|
285
|
+
- sticky: boolean;
|
|
286
|
+
+ isActiveDueToStickiness: boolean;
|
|
287
|
+
};
|
|
288
|
+
```
|
|
211
289
|
|
|
212
290
|
## 0.19.0
|
|
213
291
|
|
|
214
292
|
### Minor Changes
|
|
215
293
|
|
|
216
|
-
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
294
|
+
- [#35574](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/35574)
|
|
295
|
+
[`8c301a251e4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8c301a251e4) - We
|
|
296
|
+
have changed the API of `setCustomNativeDragPreview()` to allow increased control and slightly
|
|
297
|
+
lower bundles as well.
|
|
298
|
+
|
|
299
|
+
We have removed the `placement` argument, and replaced it with `getOffset()`.
|
|
300
|
+
|
|
301
|
+
```diff
|
|
302
|
+
- placement: { type: 'center' } | { type: 'offset-from-pointer'; x: CSSValue; y: CSSValue };
|
|
303
|
+
+ getOffset: (args: { container: HTMLElement }) => {x: number, y: number}
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
`getOffset()` allows unlimited control over how to place the custom native drag preview relative
|
|
307
|
+
to the users pointer. Please see our updated documentation for detailed information about the
|
|
308
|
+
new `getOffset()` API. Our new `getOffset()` approach means that we also no longer need to bake
|
|
309
|
+
in all `placement` options into the bundle - consumers now only pay for what they use!
|
|
310
|
+
|
|
311
|
+
`placement: { type: 'offset-from-pointer' }` has been replaced by `offsetFromPointer()`
|
|
312
|
+
|
|
313
|
+
```diff
|
|
314
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
|
|
315
|
+
+ import { offsetFromPointer } from '@atlaskit/pragmatic-drag-and-drop/util/offset-from-pointer;
|
|
316
|
+
|
|
317
|
+
draggable({
|
|
318
|
+
element: myElement,
|
|
319
|
+
onGenerateDragPreview: ({ nativeSetDragImage }) => {
|
|
320
|
+
setCustomNativeDragPreview({
|
|
321
|
+
- placement: { type: 'offset-from-pointer', x: '16px', y: '8px' }
|
|
322
|
+
+ getOffset: offsetFromPointer({x: '16px', y: '8px'}),
|
|
323
|
+
render: function render({ container }) {
|
|
324
|
+
ReactDOM.render(<Preview item={item} />, container);
|
|
325
|
+
return function cleanup() {
|
|
326
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
327
|
+
};
|
|
328
|
+
},
|
|
329
|
+
nativeSetDragImage,
|
|
330
|
+
});
|
|
331
|
+
},
|
|
332
|
+
});
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
`placement: { type: 'center' }` has been replaced by `centerUnderPointer()`
|
|
336
|
+
|
|
337
|
+
```diff
|
|
338
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/util/set-custom-native-drag-preview';
|
|
339
|
+
+ import { centerUnderPointer } from '@atlaskit/pragmatic-drag-and-drop/util/center-under-pointer-pointer;
|
|
340
|
+
|
|
341
|
+
draggable({
|
|
342
|
+
element: myElement,
|
|
343
|
+
onGenerateDragPreview: ({ nativeSetDragImage }) => {
|
|
344
|
+
setCustomNativeDragPreview({
|
|
345
|
+
- placement: { type: 'center' }
|
|
346
|
+
+ getOffset: centerUnderPointer,
|
|
347
|
+
render: function render({ container }) {
|
|
348
|
+
ReactDOM.render(<Preview item={item} />, container);
|
|
349
|
+
return function cleanup() {
|
|
350
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
351
|
+
};
|
|
352
|
+
},
|
|
353
|
+
nativeSetDragImage,
|
|
354
|
+
});
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
```
|
|
274
358
|
|
|
275
359
|
## 0.18.2
|
|
276
360
|
|
|
277
361
|
### Patch Changes
|
|
278
362
|
|
|
279
|
-
-
|
|
363
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
|
|
364
|
+
[`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
|
|
365
|
+
legacy types are published for TS 4.5-4.8
|
|
280
366
|
|
|
281
367
|
## 0.18.1
|
|
282
368
|
|
|
283
369
|
### Patch Changes
|
|
284
370
|
|
|
285
|
-
-
|
|
371
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
|
|
372
|
+
[`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) -
|
|
373
|
+
Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
286
374
|
|
|
287
375
|
## 0.18.0
|
|
288
376
|
|
|
289
377
|
### Minor Changes
|
|
290
378
|
|
|
291
|
-
-
|
|
379
|
+
- [#33344](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33344)
|
|
380
|
+
[`9fd8556db17`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9fd8556db17) -
|
|
381
|
+
Internal folder name structure change
|
|
292
382
|
|
|
293
383
|
## 0.17.0
|
|
294
384
|
|
|
295
385
|
### Minor Changes
|
|
296
386
|
|
|
297
|
-
-
|
|
387
|
+
- [#33262](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33262)
|
|
388
|
+
[`34ed7b2ec63`](https://bitbucket.org/atlassian/atlassian-frontend/commits/34ed7b2ec63) - We
|
|
389
|
+
have changed the name of our drag and drop packages to align on the single name of "Pragmatic
|
|
390
|
+
drag and drop"
|
|
298
391
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
392
|
+
```diff
|
|
393
|
+
- @atlaskit/drag-and-drop
|
|
394
|
+
+ @atlaskit/pragmatic-drag-and-drop
|
|
302
395
|
|
|
303
|
-
|
|
304
|
-
|
|
396
|
+
- @atlaskit/drag-and-drop-autoscroll
|
|
397
|
+
+ @atlaskit/pragmatic-drag-and-drop-autoscroll
|
|
305
398
|
|
|
306
|
-
|
|
307
|
-
|
|
399
|
+
- @atlaskit/drag-and-drop-hitbox
|
|
400
|
+
+ @atlaskit/pragmatic-drag-and-drop-hitbox
|
|
308
401
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
402
|
+
- @atlaskit/drag-and-drop-indicator
|
|
403
|
+
+ @atlaskit/pragmatic-drag-and-drop-react-indicator
|
|
404
|
+
# Note: `react` was added to this package name as our indicator package is designed for usage with `react`.
|
|
312
405
|
|
|
313
|
-
|
|
314
|
-
|
|
406
|
+
- @atlaskit/drag-and-drop-live-region
|
|
407
|
+
+ @atlaskit/pragmatic-drag-and-drop-live-region
|
|
315
408
|
|
|
316
|
-
|
|
317
|
-
|
|
409
|
+
- @atlaskit/drag-and-drop-react-beautiful-dnd-migration
|
|
410
|
+
+ @atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration
|
|
318
411
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
412
|
+
- @atlaskit/drag-and-drop-docs
|
|
413
|
+
+ @atlaskit/pragmatic-drag-and-drop-docs
|
|
414
|
+
```
|
|
322
415
|
|
|
323
|
-
|
|
416
|
+
The new `@atlaskit/pragmatic-drag-and-drop*` packages will start their initial versions from
|
|
417
|
+
where the ``@atlaskit/drag-and-drop*` packages left off. Doing this will make it easier to look
|
|
418
|
+
back on changelogs and see how the packages have progressed.
|
|
324
419
|
|
|
325
420
|
## 0.16.0
|
|
326
421
|
|
|
327
422
|
### Minor Changes
|
|
328
423
|
|
|
329
|
-
-
|
|
424
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
|
|
425
|
+
[`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
|
|
426
|
+
minor dependency bump
|
|
330
427
|
|
|
331
428
|
## 0.15.1
|
|
332
429
|
|
|
333
430
|
### Patch Changes
|
|
334
431
|
|
|
335
|
-
-
|
|
432
|
+
- [#32424](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/32424)
|
|
433
|
+
[`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY
|
|
434
|
+
remove before merging to master; dupe adf-schema via adf-utils
|
|
336
435
|
|
|
337
436
|
## 0.15.0
|
|
338
437
|
|
|
339
438
|
### Minor Changes
|
|
340
439
|
|
|
341
|
-
-
|
|
440
|
+
- [#31909](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31909)
|
|
441
|
+
[`ed028658f13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ed028658f13) - Minor
|
|
442
|
+
internal refactor and adding additional tests
|
|
342
443
|
|
|
343
444
|
## 0.14.0
|
|
344
445
|
|
|
345
446
|
### Minor Changes
|
|
346
447
|
|
|
347
|
-
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
448
|
+
- [#31794](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/31794)
|
|
449
|
+
[`eab6d26451d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eab6d26451d) -
|
|
450
|
+
Improving the resilience of our workaround for a
|
|
451
|
+
[Browser bug](https://bugs.chromium.org/p/chromium/issues/detail?id=410328) where after a drag
|
|
452
|
+
finishes, an unrelated element can be entered into.
|
|
453
|
+
- [`ba7ea570aee`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba7ea570aee) - > Both
|
|
454
|
+
of these changes should not impact most consumers as they are targeted at edge cases.
|
|
455
|
+
|
|
456
|
+
- **Fix**: We no longer extract user input (eg `clientX`) from native `"dragleave"` events due
|
|
457
|
+
to a
|
|
458
|
+
[Bug with Chrome we discovered](https://bugs.chromium.org/p/chromium/issues/detail?id=1429937).
|
|
459
|
+
Due to this bug, it was possible for `location.current.input` to be incorrectly set in
|
|
460
|
+
`onDropTargetChange` and `onDrop` when a user was cancelling a drag or dropping or no drop
|
|
461
|
+
targets.
|
|
462
|
+
|
|
463
|
+
- **Fix**: `location.previous.dropTargets` _should_ always point to the
|
|
464
|
+
`location.current.dropTargets` value from the previous event (exception:
|
|
465
|
+
`onGenerateDragPreview` and `onDragStart` have the same `location.previous` and
|
|
466
|
+
`location.current` values). Previously, the `location.previous.dropTargets` value did not
|
|
467
|
+
match the last events `location.current.dropTargets` value in `onDrop`. `onDrop()` would
|
|
468
|
+
incorrectly use the `location.current` and `location.previous` values from the last event
|
|
469
|
+
rather than creating a new `location.current` entry. Now, `onDrop()`,
|
|
470
|
+
`location.previous.dropTargets` points to the `location.current.dropTargets` from the last
|
|
471
|
+
event (same as all other events) and `location.current.dropTargets` points to what the
|
|
472
|
+
previous drop target was as well (no change)
|
|
353
473
|
|
|
354
474
|
## 0.13.0
|
|
355
475
|
|
|
356
476
|
### Minor Changes
|
|
357
477
|
|
|
358
|
-
-
|
|
478
|
+
- [#30879](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30879)
|
|
479
|
+
[`2582df26509`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2582df26509) - Fixing
|
|
480
|
+
a browser bug where after a drag finishes, a unrelated element can be entered into by the
|
|
481
|
+
browser
|
|
359
482
|
|
|
360
|
-
|
|
361
|
-
|
|
483
|
+
- [Visual explanation of bug](https://twitter.com/alexandereardon/status/1633614212873465856)
|
|
484
|
+
- [Chrome bug](https://bugs.chromium.org/p/chromium/issues/detail?id=410328)
|
|
362
485
|
|
|
363
486
|
## 0.12.0
|
|
364
487
|
|
|
365
488
|
### Minor Changes
|
|
366
489
|
|
|
367
|
-
-
|
|
490
|
+
- [#30953](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30953)
|
|
491
|
+
[`90901f5bbe0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/90901f5bbe0) -
|
|
492
|
+
Replace default entry point of `undefined` with `{}`.
|
|
368
493
|
|
|
369
|
-
|
|
370
|
-
|
|
494
|
+
> **NOTE:** Importing from the default entry point isn't supported. _Please use individual entry
|
|
495
|
+
> points in order to always obtain minimum kbs._
|
|
371
496
|
|
|
372
497
|
## 0.11.0
|
|
373
498
|
|
|
374
499
|
### Minor Changes
|
|
375
500
|
|
|
376
|
-
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
501
|
+
- [#30668](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/30668)
|
|
502
|
+
[`1ecbb19d450`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ecbb19d450) - Adding
|
|
503
|
+
a new function to make creating _custom_ native drag previews safe and easy:
|
|
504
|
+
`setCustomNativeDragPreview`
|
|
505
|
+
|
|
506
|
+
```tsx
|
|
507
|
+
import { setCustomNativeDragPreview } from '@atlaskit/drag-and-drop/util/set-custom-native-drag-preview';
|
|
508
|
+
|
|
509
|
+
draggable({
|
|
510
|
+
element: myElement,
|
|
511
|
+
onGenerateDragPreview: ({ nativeSetDragImage }) => {
|
|
512
|
+
setCustomNativeDragPreview({
|
|
513
|
+
render: function render({ container }) {
|
|
514
|
+
ReactDOM.render(<Preview item={item} />, container);
|
|
515
|
+
return function cleanup() {
|
|
516
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
517
|
+
};
|
|
518
|
+
},
|
|
519
|
+
nativeSetDragImage,
|
|
520
|
+
});
|
|
390
521
|
},
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
},
|
|
394
|
-
});
|
|
395
|
-
```
|
|
522
|
+
});
|
|
523
|
+
```
|
|
396
524
|
|
|
397
|
-
|
|
525
|
+
Please see our element adapter documentation for more detailed usage information
|
|
398
526
|
|
|
399
527
|
## 0.10.0
|
|
400
528
|
|
|
401
529
|
### Minor Changes
|
|
402
530
|
|
|
403
|
-
-
|
|
531
|
+
- [#29951](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29951)
|
|
532
|
+
[`9c0975e2fab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c0975e2fab) - Bug
|
|
533
|
+
fix: A _monitor_ should not be called after it is removed. Previously, if a _monitor_
|
|
534
|
+
(monitor 1) removed another _monitor_ (monitor 2) for the same event, then the second monitor
|
|
535
|
+
(monitor 2) would still be called. This has been fixed
|
|
404
536
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
537
|
+
```ts
|
|
538
|
+
const cleanupMonitor1 = monitorForElements({
|
|
539
|
+
onDragStart: () => {
|
|
540
|
+
cleanupMonitor2();
|
|
541
|
+
},
|
|
542
|
+
});
|
|
543
|
+
const cleanupMonitor2 = monitorForElements({
|
|
544
|
+
// Previously this `onDragStart` would have been called during `onDragStart` even though it was unbound by the first monitor
|
|
545
|
+
onDragStart: () => {},
|
|
546
|
+
});
|
|
547
|
+
```
|
|
416
548
|
|
|
417
549
|
## 0.9.0
|
|
418
550
|
|
|
419
551
|
### Minor Changes
|
|
420
552
|
|
|
421
|
-
-
|
|
553
|
+
- [#29651](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/29651)
|
|
554
|
+
[`03e0aa5ae85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/03e0aa5ae85) -
|
|
555
|
+
`@atlaskit/drag-and-drop` adds event listeners to the `window` during a drag operation. These
|
|
556
|
+
drag operation event listeners were [`bubble` phase event listeners](https://domevents.dev/),
|
|
557
|
+
but they are now `capture` phase event listeners to be more resliant against external code
|
|
558
|
+
(incorrectly) stopping events.
|
|
422
559
|
|
|
423
|
-
|
|
560
|
+
This does not impact the ability of a consumer to have their own `draggable`s on a page not
|
|
561
|
+
controlled by `@atlaskit/drag-and-drop`
|
|
424
562
|
|
|
425
563
|
## 0.8.1
|
|
426
564
|
|
|
427
565
|
### Patch Changes
|
|
428
566
|
|
|
429
|
-
-
|
|
567
|
+
- [#28324](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/28324)
|
|
568
|
+
[`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds
|
|
569
|
+
for this package now pass through a tokens babel plugin, removing runtime invocations of the
|
|
570
|
+
tokens() function and improving performance.
|
|
430
571
|
|
|
431
572
|
## 0.8.0
|
|
432
573
|
|
|
433
574
|
### Minor Changes
|
|
434
575
|
|
|
435
|
-
-
|
|
576
|
+
- [#26317](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/26317)
|
|
577
|
+
[`1e3f9743e57`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e3f9743e57) - A
|
|
578
|
+
_monitor_ that is added during an event (eg `onDragStart`) will no longer be called for the
|
|
579
|
+
current event. This is to prevent the accidental creation of infinite loops. This behaviour
|
|
580
|
+
matches native [`EventTargets`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)
|
|
581
|
+
where an event listener cannot add another event listener during an active event to the same
|
|
582
|
+
event target in the same event phase.
|
|
436
583
|
|
|
437
584
|
## 0.7.1
|
|
438
585
|
|
|
439
586
|
### Patch Changes
|
|
440
587
|
|
|
441
|
-
-
|
|
588
|
+
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874)
|
|
589
|
+
[`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) -
|
|
590
|
+
Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
442
591
|
|
|
443
592
|
## 0.7.0
|
|
444
593
|
|
|
445
594
|
### Minor Changes
|
|
446
595
|
|
|
447
|
-
-
|
|
596
|
+
- [#25428](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25428)
|
|
597
|
+
[`f2a7931d609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f2a7931d609) - Adding
|
|
598
|
+
jsdoc to DragLocation type for better autocomplete
|
|
448
599
|
|
|
449
600
|
## 0.6.0
|
|
450
601
|
|
|
451
602
|
### Minor Changes
|
|
452
603
|
|
|
453
|
-
-
|
|
604
|
+
- [#25002](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25002)
|
|
605
|
+
[`0f755214ee7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0f755214ee7) -
|
|
606
|
+
Internal folder renaming. No API impact
|
|
454
607
|
|
|
455
608
|
## 0.5.0
|
|
456
609
|
|
|
457
610
|
### Minor Changes
|
|
458
611
|
|
|
459
|
-
-
|
|
612
|
+
- [#25007](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/25007)
|
|
613
|
+
[`17950433a70`](https://bitbucket.org/atlassian/atlassian-frontend/commits/17950433a70) -
|
|
614
|
+
Touching package to release re-release previous version. The previous (now deprecated) version
|
|
615
|
+
did not have it's entry points built correctly
|
|
460
616
|
|
|
461
617
|
## 0.4.0
|
|
462
618
|
|
|
463
619
|
### Minor Changes
|
|
464
620
|
|
|
465
|
-
-
|
|
621
|
+
- [#24861](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24861)
|
|
622
|
+
[`4d739042b04`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4d739042b04) -
|
|
623
|
+
Improving jsdoc auto complete information for `GetFeedbackArgs`
|
|
466
624
|
|
|
467
625
|
## 0.3.0
|
|
468
626
|
|
|
469
627
|
### Minor Changes
|
|
470
628
|
|
|
471
|
-
-
|
|
629
|
+
- [#24810](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24810)
|
|
630
|
+
[`52403a2c11f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/52403a2c11f) - Adding
|
|
631
|
+
a `canMonitor()` function to _monitors_ to allow a _monitor_ to conditionally apply to a drag
|
|
632
|
+
operation.
|
|
472
633
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
```
|
|
634
|
+
```ts
|
|
635
|
+
monitorForElements({
|
|
636
|
+
canMonitor: ({ source }) => source.data.type === 'card',
|
|
637
|
+
onDragStart: () => console.log('I will only be activated when dragging a card!'),
|
|
638
|
+
});
|
|
639
|
+
```
|
|
480
640
|
|
|
481
641
|
## 0.2.0
|
|
482
642
|
|
|
483
643
|
### Minor Changes
|
|
484
644
|
|
|
485
|
-
-
|
|
645
|
+
- [#24613](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24613)
|
|
646
|
+
[`1cf9e484b4b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1cf9e484b4b) - We
|
|
647
|
+
have improved our naming consistency across our drag and drop packages.
|
|
486
648
|
|
|
487
|
-
|
|
649
|
+
- `@atlaskit/drag-and-drop/util/cancel-unhandled` has been renamed to
|
|
650
|
+
`@atlaskit/drag-and-drop/addon/cancel-unhandled`
|
|
488
651
|
|
|
489
652
|
## 0.1.0
|
|
490
653
|
|
|
491
654
|
### Minor Changes
|
|
492
655
|
|
|
493
|
-
-
|
|
656
|
+
- [#24532](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24532)
|
|
657
|
+
[`73427c38077`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73427c38077) -
|
|
658
|
+
Initial release of `@atlaskit/drag-and-drop` packages 🎉
|
|
494
659
|
|
|
495
660
|
## 0.0.1
|
|
496
661
|
|
|
497
662
|
### Patch Changes
|
|
498
663
|
|
|
499
|
-
-
|
|
664
|
+
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492)
|
|
665
|
+
[`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) -
|
|
666
|
+
Upgrade Typescript from `4.2.4` to `4.3.5`.
|