@react-aria/dnd 3.0.0-alpha.3 → 3.0.0-alpha.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/dist/main.js +1642 -2219
- package/dist/main.js.map +1 -1
- package/dist/module.js +1605 -2144
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/DragManager.ts +24 -11
- package/src/constants.ts +3 -1
- package/src/useDrag.ts +12 -1
- package/src/useDraggableItem.ts +2 -2
- package/src/useDrop.ts +3 -2
- package/src/useDroppableCollection.ts +2 -2
- package/src/utils.ts +1 -20
package/dist/module.js
CHANGED
|
@@ -1,2371 +1,1832 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
copyMove: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.copy | $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.move,
|
|
39
|
-
copyLink: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.copy | $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.link,
|
|
40
|
-
linkMove: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.link | $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.move,
|
|
41
|
-
all: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.all,
|
|
42
|
-
uninitialized: $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.all
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const $cd2dc9b4103e6936caca05e2d05$export$EFFECT_ALLOWED = $cd2dc9b4103e6936caca05e2d05$var$invert($cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_ALLOWED);
|
|
46
|
-
const $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT = $cd2dc9b4103e6936caca05e2d05$var$invert($cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION);
|
|
47
|
-
const $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT_TO_DROP_OPERATION = {
|
|
48
|
-
none: 'cancel',
|
|
49
|
-
link: 'link',
|
|
50
|
-
copy: 'copy',
|
|
51
|
-
move: 'move'
|
|
1
|
+
import {useRef as $fP8tg$useRef, useState as $fP8tg$useState, useEffect as $fP8tg$useEffect, useCallback as $fP8tg$useCallback} from "react";
|
|
2
|
+
import $fP8tg$reactdom from "react-dom";
|
|
3
|
+
import {useGlobalListeners as $fP8tg$useGlobalListeners, useDescription as $fP8tg$useDescription, useId as $fP8tg$useId, useLayoutEffect as $fP8tg$useLayoutEffect, mergeProps as $fP8tg$mergeProps, getScrollParent as $fP8tg$getScrollParent, isWebKit as $fP8tg$isWebKit, isIOS as $fP8tg$isIOS, chain as $fP8tg$chain} from "@react-aria/utils";
|
|
4
|
+
import {useMessageFormatter as $fP8tg$useMessageFormatter} from "@react-aria/i18n";
|
|
5
|
+
import {announce as $fP8tg$announce} from "@react-aria/live-announcer";
|
|
6
|
+
import {ariaHideOutside as $fP8tg$ariaHideOutside} from "@react-aria/overlays";
|
|
7
|
+
import {useInteractionModality as $fP8tg$useInteractionModality, getInteractionModality as $fP8tg$getInteractionModality, setInteractionModality as $fP8tg$setInteractionModality, useFocus as $fP8tg$useFocus} from "@react-aria/interactions";
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
function $parcel$export(e, n, v, s) {
|
|
13
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
14
|
+
}
|
|
15
|
+
var $8253ed7ece74b463$exports = {};
|
|
16
|
+
|
|
17
|
+
$parcel$export($8253ed7ece74b463$exports, "useDrag", () => $8253ed7ece74b463$export$7941f8aafa4b6021);
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
let $103790afe9474d1c$export$60b7b4bcf3903d8e;
|
|
22
|
+
(function($103790afe9474d1c$export$60b7b4bcf3903d8e) {
|
|
23
|
+
$103790afe9474d1c$export$60b7b4bcf3903d8e[$103790afe9474d1c$export$60b7b4bcf3903d8e["none"] = 0] = "none";
|
|
24
|
+
$103790afe9474d1c$export$60b7b4bcf3903d8e[$103790afe9474d1c$export$60b7b4bcf3903d8e["cancel"] = 0] = "cancel";
|
|
25
|
+
$103790afe9474d1c$export$60b7b4bcf3903d8e[$103790afe9474d1c$export$60b7b4bcf3903d8e["move"] = 1] = "move";
|
|
26
|
+
$103790afe9474d1c$export$60b7b4bcf3903d8e[$103790afe9474d1c$export$60b7b4bcf3903d8e["copy"] = 2] = "copy";
|
|
27
|
+
$103790afe9474d1c$export$60b7b4bcf3903d8e[$103790afe9474d1c$export$60b7b4bcf3903d8e["link"] = 4] = "link";
|
|
28
|
+
$103790afe9474d1c$export$60b7b4bcf3903d8e[$103790afe9474d1c$export$60b7b4bcf3903d8e["all"] = 7] = "all";
|
|
29
|
+
})($103790afe9474d1c$export$60b7b4bcf3903d8e || ($103790afe9474d1c$export$60b7b4bcf3903d8e = {
|
|
30
|
+
}));
|
|
31
|
+
const $103790afe9474d1c$export$9bbdfc78cf083e16 = {
|
|
32
|
+
...$103790afe9474d1c$export$60b7b4bcf3903d8e,
|
|
33
|
+
copyMove: $103790afe9474d1c$export$60b7b4bcf3903d8e.copy | $103790afe9474d1c$export$60b7b4bcf3903d8e.move,
|
|
34
|
+
copyLink: $103790afe9474d1c$export$60b7b4bcf3903d8e.copy | $103790afe9474d1c$export$60b7b4bcf3903d8e.link,
|
|
35
|
+
linkMove: $103790afe9474d1c$export$60b7b4bcf3903d8e.link | $103790afe9474d1c$export$60b7b4bcf3903d8e.move,
|
|
36
|
+
all: $103790afe9474d1c$export$60b7b4bcf3903d8e.all,
|
|
37
|
+
uninitialized: $103790afe9474d1c$export$60b7b4bcf3903d8e.all
|
|
52
38
|
};
|
|
53
|
-
const $
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
const $103790afe9474d1c$export$dd0165308d8bff45 = $103790afe9474d1c$var$invert($103790afe9474d1c$export$9bbdfc78cf083e16);
|
|
40
|
+
const $103790afe9474d1c$export$d7ebf00f36b7a95e = $103790afe9474d1c$var$invert($103790afe9474d1c$export$60b7b4bcf3903d8e);
|
|
41
|
+
const $103790afe9474d1c$export$608ecc6f1b23c35d = {
|
|
42
|
+
none: 'cancel',
|
|
43
|
+
link: 'link',
|
|
44
|
+
copy: 'copy',
|
|
45
|
+
move: 'move'
|
|
46
|
+
};
|
|
47
|
+
const $103790afe9474d1c$export$5eacb0769d26d3b2 = $103790afe9474d1c$var$invert($103790afe9474d1c$export$608ecc6f1b23c35d);
|
|
48
|
+
function $103790afe9474d1c$var$invert(object) {
|
|
49
|
+
let res = {
|
|
50
|
+
};
|
|
51
|
+
for(let key in object)res[object[key]] = key;
|
|
52
|
+
return res;
|
|
63
53
|
}
|
|
54
|
+
const $103790afe9474d1c$export$4a7729b856e9a690 = new Set([
|
|
55
|
+
'text/plain',
|
|
56
|
+
'text/uri-list',
|
|
57
|
+
'text/html'
|
|
58
|
+
]);
|
|
59
|
+
const $103790afe9474d1c$export$fd9f9fc120c5402d = 'application/vnd.react-aria.items+json';
|
|
60
|
+
const $103790afe9474d1c$export$f8fc6581787339b3 = 'application/octet-stream';
|
|
64
61
|
|
|
65
|
-
const $cd2dc9b4103e6936caca05e2d05$export$NATIVE_DRAG_TYPES = new Set(['text/plain', 'text/uri-list', 'text/html']);
|
|
66
|
-
const $cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE = 'application/vnd.react-aria.items+json';
|
|
67
|
-
const $cd2dc9b4103e6936caca05e2d05$export$GENERIC_TYPE = 'application/octet-stream';
|
|
68
|
-
const $daf765036c8e081b3420fc4f613ad96$var$droppableCollectionIds = new WeakMap();
|
|
69
62
|
|
|
70
|
-
function $daf765036c8e081b3420fc4f613ad96$export$useDroppableCollectionId(state) {
|
|
71
|
-
let id = useId();
|
|
72
|
-
$daf765036c8e081b3420fc4f613ad96$var$droppableCollectionIds.set(state, id);
|
|
73
|
-
return id;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function $daf765036c8e081b3420fc4f613ad96$export$getDroppableCollectionId(state) {
|
|
77
|
-
let id = $daf765036c8e081b3420fc4f613ad96$var$droppableCollectionIds.get(state);
|
|
78
63
|
|
|
79
|
-
if (!id) {
|
|
80
|
-
throw new Error('Droppable item outside a droppable collection');
|
|
81
|
-
}
|
|
82
64
|
|
|
83
|
-
|
|
65
|
+
const $7252cd45fc48c07c$var$droppableCollectionIds = new WeakMap();
|
|
66
|
+
function $7252cd45fc48c07c$export$b1601eb39394a581(state) {
|
|
67
|
+
let id = $fP8tg$useId();
|
|
68
|
+
$7252cd45fc48c07c$var$droppableCollectionIds.set(state, id);
|
|
69
|
+
return id;
|
|
84
70
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
for (let item of items) {
|
|
90
|
-
for (let type of Object.keys(item)) {
|
|
91
|
-
types.add(type);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return types;
|
|
71
|
+
function $7252cd45fc48c07c$export$3093291712f09a77(state) {
|
|
72
|
+
let id = $7252cd45fc48c07c$var$droppableCollectionIds.get(state);
|
|
73
|
+
if (!id) throw new Error('Droppable item outside a droppable collection');
|
|
74
|
+
return id;
|
|
96
75
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (modality === 'pointer') {
|
|
104
|
-
modality = 'virtual';
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (modality === 'virtual' && 'ontouchstart' in window) {
|
|
108
|
-
modality = 'touch';
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return modality;
|
|
76
|
+
function $7252cd45fc48c07c$export$e1d41611756c6326(items) {
|
|
77
|
+
let types = new Set();
|
|
78
|
+
for (let item of items)for (let type of Object.keys(item))types.add(type);
|
|
79
|
+
return types;
|
|
112
80
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
81
|
+
function $7252cd45fc48c07c$var$mapModality(modality) {
|
|
82
|
+
if (!modality) modality = 'virtual';
|
|
83
|
+
if (modality === 'pointer') modality = 'virtual';
|
|
84
|
+
if (modality === 'virtual' && 'ontouchstart' in window) modality = 'touch';
|
|
85
|
+
return modality;
|
|
116
86
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return $daf765036c8e081b3420fc4f613ad96$var$mapModality(getInteractionModality());
|
|
87
|
+
function $7252cd45fc48c07c$export$49bac5d6d4b352ea() {
|
|
88
|
+
return $7252cd45fc48c07c$var$mapModality($fP8tg$useInteractionModality());
|
|
120
89
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// The data transfer API doesn't support more than one item of a given type at once.
|
|
124
|
-
// In addition, only a small set of types are supported natively for transfer between applications.
|
|
125
|
-
// We allow for both multiple items, as well as multiple representations of a single item.
|
|
126
|
-
// In order to make our API work with the native API, we serialize all items to JSON and
|
|
127
|
-
// store as a single native item. We only need to do this if there is more than one item
|
|
128
|
-
// of the same type, or if an item has more than one representation. Otherwise the native
|
|
129
|
-
// API is sufficient.
|
|
130
|
-
//
|
|
131
|
-
// The DataTransferItemList API also theoretically supports adding files, which would enable
|
|
132
|
-
// dragging binary data out of the browser onto the user's desktop for example. Unfortunately,
|
|
133
|
-
// this does not currently work in any browser, so it is not currently supported by our API.
|
|
134
|
-
// See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=438479.
|
|
135
|
-
let groupedByType = new Map();
|
|
136
|
-
let needsCustomData = false;
|
|
137
|
-
let customData = [];
|
|
138
|
-
|
|
139
|
-
for (let item of items) {
|
|
140
|
-
let types = Object.keys(item);
|
|
141
|
-
|
|
142
|
-
if (types.length > 1) {
|
|
143
|
-
needsCustomData = true;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
let dataByType = {};
|
|
147
|
-
|
|
148
|
-
for (let type of types) {
|
|
149
|
-
let typeItems = groupedByType.get(type);
|
|
150
|
-
|
|
151
|
-
if (!typeItems) {
|
|
152
|
-
typeItems = [];
|
|
153
|
-
groupedByType.set(type, typeItems);
|
|
154
|
-
} else {
|
|
155
|
-
needsCustomData = true;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
let data = item[type];
|
|
159
|
-
dataByType[type] = data;
|
|
160
|
-
typeItems.push(data);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
customData.push(dataByType);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
for (let [type, items] of groupedByType) {
|
|
167
|
-
if ($cd2dc9b4103e6936caca05e2d05$export$NATIVE_DRAG_TYPES.has(type)) {
|
|
168
|
-
// Only one item of a given type can be set on a data transfer.
|
|
169
|
-
// Join all of the items together separated by newlines.
|
|
170
|
-
let data = items.join('\n');
|
|
171
|
-
dataTransfer.items.add(data, type);
|
|
172
|
-
} else {
|
|
173
|
-
// Set data to the first item so we have access to the list of types.
|
|
174
|
-
dataTransfer.items.add(items[0], type);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (needsCustomData) {
|
|
179
|
-
let data = JSON.stringify(customData);
|
|
180
|
-
dataTransfer.items.add(data, $cd2dc9b4103e6936caca05e2d05$export$CUSTOM_DRAG_TYPE);
|
|
181
|
-
}
|
|
90
|
+
function $7252cd45fc48c07c$export$1fb2158d224b542c() {
|
|
91
|
+
return $7252cd45fc48c07c$var$mapModality($fP8tg$getInteractionModality());
|
|
182
92
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
93
|
+
function $7252cd45fc48c07c$export$f9c1490890ddd063(dataTransfer, items) {
|
|
94
|
+
// The data transfer API doesn't support more than one item of a given type at once.
|
|
95
|
+
// In addition, only a small set of types are supported natively for transfer between applications.
|
|
96
|
+
// We allow for both multiple items, as well as multiple representations of a single item.
|
|
97
|
+
// In order to make our API work with the native API, we serialize all items to JSON and
|
|
98
|
+
// store as a single native item. We only need to do this if there is more than one item
|
|
99
|
+
// of the same type, or if an item has more than one representation. Otherwise the native
|
|
100
|
+
// API is sufficient.
|
|
101
|
+
//
|
|
102
|
+
// The DataTransferItemList API also theoretically supports adding files, which would enable
|
|
103
|
+
// dragging binary data out of the browser onto the user's desktop for example. Unfortunately,
|
|
104
|
+
// this does not currently work in any browser, so it is not currently supported by our API.
|
|
105
|
+
// See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=438479.
|
|
106
|
+
let groupedByType = new Map();
|
|
107
|
+
let needsCustomData = false;
|
|
108
|
+
let customData = [];
|
|
109
|
+
for (let item of items){
|
|
110
|
+
let types = Object.keys(item);
|
|
111
|
+
if (types.length > 1) needsCustomData = true;
|
|
112
|
+
let dataByType = {
|
|
113
|
+
};
|
|
114
|
+
for (let type of types){
|
|
115
|
+
let typeItems = groupedByType.get(type);
|
|
116
|
+
if (!typeItems) {
|
|
117
|
+
typeItems = [];
|
|
118
|
+
groupedByType.set(type, typeItems);
|
|
119
|
+
} else needsCustomData = true;
|
|
120
|
+
let data = item[type];
|
|
121
|
+
dataByType[type] = data;
|
|
122
|
+
typeItems.push(data);
|
|
195
123
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
124
|
+
customData.push(dataByType);
|
|
125
|
+
}
|
|
126
|
+
for (let [type, items1] of groupedByType)if ($103790afe9474d1c$export$4a7729b856e9a690.has(type)) {
|
|
127
|
+
// Only one item of a given type can be set on a data transfer.
|
|
128
|
+
// Join all of the items together separated by newlines.
|
|
129
|
+
let data = items1.join('\n');
|
|
130
|
+
dataTransfer.items.add(data, type);
|
|
131
|
+
} else // Set data to the first item so we have access to the list of types.
|
|
132
|
+
dataTransfer.items.add(items1[0], type);
|
|
133
|
+
if (needsCustomData) {
|
|
134
|
+
let data = JSON.stringify(customData);
|
|
135
|
+
dataTransfer.items.add(data, $103790afe9474d1c$export$fd9f9fc120c5402d);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
class $7252cd45fc48c07c$export$7f04ce188c91447c {
|
|
139
|
+
has(type) {
|
|
140
|
+
if (this.includesUnknownTypes) return true;
|
|
141
|
+
return this.types.has(type);
|
|
142
|
+
}
|
|
143
|
+
constructor(dataTransfer){
|
|
144
|
+
this.types = new Set();
|
|
145
|
+
let hasFiles = false;
|
|
146
|
+
for (let item of dataTransfer.items)if (item.type !== $103790afe9474d1c$export$fd9f9fc120c5402d) {
|
|
147
|
+
if (item.kind === 'file') hasFiles = true;
|
|
148
|
+
if (item.type) this.types.add(item.type);
|
|
149
|
+
else // Files with unknown types or extensions that don't map to a known mime type
|
|
150
|
+
// are sometimes exposed as an empty string by the browser. Map to a generic
|
|
151
|
+
// mime type instead. Note that this could also be a directory as there's no
|
|
152
|
+
// way to determine if something is a file or directory until drop.
|
|
153
|
+
this.types.add($103790afe9474d1c$export$f8fc6581787339b3);
|
|
205
154
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes('Files');
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
has(type) {
|
|
216
|
-
if (this.includesUnknownTypes) {
|
|
217
|
-
return true;
|
|
155
|
+
// In Safari, when dragging files, the dataTransfer.items list is empty, but dataTransfer.types contains "Files".
|
|
156
|
+
// Unfortunately, this doesn't tell us what types of files the user is dragging, so we need to assume that any
|
|
157
|
+
// type the user checks for is included. See https://bugs.webkit.org/show_bug.cgi?id=223517.
|
|
158
|
+
this.includesUnknownTypes = !hasFiles && dataTransfer.types.includes('Files');
|
|
218
159
|
}
|
|
219
|
-
|
|
220
|
-
return this.types.has(type);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
160
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
for (let item of parsed) {
|
|
238
|
-
items.push({
|
|
239
|
-
kind: 'text',
|
|
240
|
-
types: new Set(Object.keys(item)),
|
|
241
|
-
getText: type => Promise.resolve(item[type])
|
|
161
|
+
function $7252cd45fc48c07c$export$d9e760437831f8b3(dataTransfer) {
|
|
162
|
+
let items = [];
|
|
163
|
+
// If our custom drag type is available, use that. This is a JSON serialized
|
|
164
|
+
// representation of all items in the drag, set when there are multiple items
|
|
165
|
+
// of the same type, or an individual item has multiple representations.
|
|
166
|
+
let hasCustomType = false;
|
|
167
|
+
if (dataTransfer.types.includes($103790afe9474d1c$export$fd9f9fc120c5402d)) try {
|
|
168
|
+
let data = dataTransfer.getData($103790afe9474d1c$export$fd9f9fc120c5402d);
|
|
169
|
+
let parsed = JSON.parse(data);
|
|
170
|
+
for (let item of parsed)items.push({
|
|
171
|
+
kind: 'text',
|
|
172
|
+
types: new Set(Object.keys(item)),
|
|
173
|
+
getText: (type)=>Promise.resolve(item[type])
|
|
242
174
|
});
|
|
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
|
-
if (!entry) {
|
|
268
|
-
// For some reason, Firefox includes an item with type image/png when copy
|
|
269
|
-
// and pasting any file or directory (no matter the type), but returns `null` for both
|
|
270
|
-
// item.getAsFile() and item.webkitGetAsEntry(). Safari works as expected. Ignore this
|
|
271
|
-
// item if this happens. See https://bugzilla.mozilla.org/show_bug.cgi?id=1699743.
|
|
272
|
-
// This was recently fixed in Chrome Canary: https://bugs.chromium.org/p/chromium/issues/detail?id=1175483.
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
if (entry.isFile) {
|
|
277
|
-
items.push($daf765036c8e081b3420fc4f613ad96$var$createFileItem(item.getAsFile()));
|
|
278
|
-
} else if (entry.isDirectory) {
|
|
279
|
-
items.push($daf765036c8e081b3420fc4f613ad96$var$createDirectoryItem(entry));
|
|
280
|
-
}
|
|
281
|
-
} else {
|
|
282
|
-
// Assume it's a file.
|
|
283
|
-
items.push($daf765036c8e081b3420fc4f613ad96$var$createFileItem(item.getAsFile()));
|
|
175
|
+
hasCustomType = true;
|
|
176
|
+
} catch (e) {
|
|
177
|
+
// ignore
|
|
178
|
+
}
|
|
179
|
+
// Otherwise, map native drag items to items of a single representation.
|
|
180
|
+
if (!hasCustomType) {
|
|
181
|
+
let stringItems = new Map();
|
|
182
|
+
for (let item of dataTransfer.items){
|
|
183
|
+
if (item.kind === 'string') // The data for all formats must be read here because the data transfer gets
|
|
184
|
+
// cleared out after the event handler finishes. If the item has an empty string
|
|
185
|
+
// as a type, the mime type is unknown. Map to a generic mime type instead.
|
|
186
|
+
stringItems.set(item.type || $103790afe9474d1c$export$f8fc6581787339b3, dataTransfer.getData(item.type));
|
|
187
|
+
else if (item.kind === 'file') {
|
|
188
|
+
// Despite the name, webkitGetAsEntry is also implemented in Firefox and Edge.
|
|
189
|
+
// In the future, we may use getAsFileSystemHandle instead, but that's currently
|
|
190
|
+
// only implemented in Chrome.
|
|
191
|
+
if (typeof item.webkitGetAsEntry === 'function') {
|
|
192
|
+
let entry = item.webkitGetAsEntry();
|
|
193
|
+
if (!entry) continue;
|
|
194
|
+
if (entry.isFile) items.push($7252cd45fc48c07c$var$createFileItem(item.getAsFile()));
|
|
195
|
+
else if (entry.isDirectory) items.push($7252cd45fc48c07c$var$createDirectoryItem(entry));
|
|
196
|
+
} else // Assume it's a file.
|
|
197
|
+
items.push($7252cd45fc48c07c$var$createFileItem(item.getAsFile()));
|
|
198
|
+
}
|
|
284
199
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
kind: 'text',
|
|
293
|
-
types: new Set(stringItems.keys()),
|
|
294
|
-
getText: type => Promise.resolve(stringItems.get(type))
|
|
295
|
-
});
|
|
200
|
+
// All string items are different representations of the same item. There's no way to have
|
|
201
|
+
// multiple string items at once in the current DataTransfer API.
|
|
202
|
+
if (stringItems.size > 0) items.push({
|
|
203
|
+
kind: 'text',
|
|
204
|
+
types: new Set(stringItems.keys()),
|
|
205
|
+
getText: (type)=>Promise.resolve(stringItems.get(type))
|
|
206
|
+
});
|
|
296
207
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return items;
|
|
208
|
+
return items;
|
|
300
209
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
return
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
resolve(reader.result);
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
reader.onerror = reject;
|
|
316
|
-
reader.readAsText(blob);
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
function $daf765036c8e081b3420fc4f613ad96$var$createFileItem(file) {
|
|
321
|
-
return {
|
|
322
|
-
kind: 'file',
|
|
323
|
-
type: file.type || $cd2dc9b4103e6936caca05e2d05$export$GENERIC_TYPE,
|
|
324
|
-
name: file.name,
|
|
325
|
-
getText: () => $daf765036c8e081b3420fc4f613ad96$var$blobToString(file),
|
|
326
|
-
getFile: () => Promise.resolve(file)
|
|
327
|
-
};
|
|
210
|
+
function $7252cd45fc48c07c$var$blobToString(blob) {
|
|
211
|
+
if (typeof blob.text === 'function') return blob.text();
|
|
212
|
+
// Safari doesn't have the Blob#text() method yet...
|
|
213
|
+
return new Promise((resolve, reject)=>{
|
|
214
|
+
let reader = new FileReader;
|
|
215
|
+
reader.onload = ()=>{
|
|
216
|
+
resolve(reader.result);
|
|
217
|
+
};
|
|
218
|
+
reader.onerror = reject;
|
|
219
|
+
reader.readAsText(blob);
|
|
220
|
+
});
|
|
328
221
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
222
|
+
function $7252cd45fc48c07c$var$createFileItem(file) {
|
|
223
|
+
return {
|
|
224
|
+
kind: 'file',
|
|
225
|
+
type: file.type || $103790afe9474d1c$export$f8fc6581787339b3,
|
|
226
|
+
name: file.name,
|
|
227
|
+
getText: ()=>$7252cd45fc48c07c$var$blobToString(file)
|
|
228
|
+
,
|
|
229
|
+
getFile: ()=>Promise.resolve(file)
|
|
230
|
+
};
|
|
336
231
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
232
|
+
function $7252cd45fc48c07c$var$createDirectoryItem(entry) {
|
|
233
|
+
return {
|
|
234
|
+
kind: 'directory',
|
|
235
|
+
name: entry.name,
|
|
236
|
+
getEntries: ()=>$7252cd45fc48c07c$var$getEntries(entry)
|
|
237
|
+
};
|
|
340
238
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
let reader = item.createReader(); // We must call readEntries repeatedly because there may be a limit to the
|
|
239
|
+
async function* $7252cd45fc48c07c$var$getEntries(item) {
|
|
240
|
+
let reader = item.createReader();
|
|
241
|
+
// We must call readEntries repeatedly because there may be a limit to the
|
|
345
242
|
// number of entries that are returned at once.
|
|
346
|
-
|
|
347
243
|
let entries;
|
|
348
|
-
|
|
349
244
|
do {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
} else if (entry.isDirectory) {
|
|
359
|
-
yield $daf765036c8e081b3420fc4f613ad96$var$createDirectoryItem(entry);
|
|
245
|
+
entries = await new Promise((resolve, reject)=>{
|
|
246
|
+
reader.readEntries(resolve, reject);
|
|
247
|
+
});
|
|
248
|
+
for (let entry of entries){
|
|
249
|
+
if (entry.isFile) {
|
|
250
|
+
let file = await $7252cd45fc48c07c$var$getEntryFile(entry);
|
|
251
|
+
yield $7252cd45fc48c07c$var$createFileItem(file);
|
|
252
|
+
} else if (entry.isDirectory) yield $7252cd45fc48c07c$var$createDirectoryItem(entry);
|
|
360
253
|
}
|
|
361
|
-
|
|
362
|
-
} while (entries.length > 0);
|
|
363
|
-
});
|
|
364
|
-
return $daf765036c8e081b3420fc4f613ad96$var$_getEntries.apply(this, arguments);
|
|
254
|
+
}while (entries.length > 0)
|
|
365
255
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
256
|
+
function $7252cd45fc48c07c$var$getEntryFile(entry) {
|
|
257
|
+
return new Promise((resolve, reject)=>entry.file(resolve, reject)
|
|
258
|
+
);
|
|
369
259
|
}
|
|
370
260
|
|
|
371
|
-
let $f2f44a26f7541d104d10e68c115a897a$var$dropTargets = new Map();
|
|
372
|
-
let $f2f44a26f7541d104d10e68c115a897a$var$dropItems = new Map();
|
|
373
|
-
let $f2f44a26f7541d104d10e68c115a897a$var$dragSession = null;
|
|
374
|
-
let $f2f44a26f7541d104d10e68c115a897a$var$subscriptions = new Set();
|
|
375
|
-
|
|
376
|
-
function $f2f44a26f7541d104d10e68c115a897a$export$registerDropTarget(target) {
|
|
377
|
-
var _dragSession;
|
|
378
261
|
|
|
379
|
-
$f2f44a26f7541d104d10e68c115a897a$var$dropTargets.set(target.element, target);
|
|
380
|
-
(_dragSession = $f2f44a26f7541d104d10e68c115a897a$var$dragSession) == null ? void 0 : _dragSession.updateValidDropTargets();
|
|
381
|
-
return () => {
|
|
382
|
-
var _dragSession2;
|
|
383
262
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
263
|
+
let $67560de7c78cb232$var$dropTargets = new Map();
|
|
264
|
+
let $67560de7c78cb232$var$dropItems = new Map();
|
|
265
|
+
let $67560de7c78cb232$var$dragSession = null;
|
|
266
|
+
let $67560de7c78cb232$var$subscriptions = new Set();
|
|
267
|
+
function $67560de7c78cb232$export$c28d9fb4a54e471a(target) {
|
|
268
|
+
$67560de7c78cb232$var$dropTargets.set(target.element, target);
|
|
269
|
+
$67560de7c78cb232$var$dragSession === null || $67560de7c78cb232$var$dragSession === void 0 ? void 0 : $67560de7c78cb232$var$dragSession.updateValidDropTargets();
|
|
270
|
+
return ()=>{
|
|
271
|
+
$67560de7c78cb232$var$dropTargets.delete(target.element);
|
|
272
|
+
$67560de7c78cb232$var$dragSession === null || $67560de7c78cb232$var$dragSession === void 0 ? void 0 : $67560de7c78cb232$var$dragSession.updateValidDropTargets();
|
|
273
|
+
};
|
|
387
274
|
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
};
|
|
275
|
+
function $67560de7c78cb232$export$aef80212ac99c003(item) {
|
|
276
|
+
$67560de7c78cb232$var$dropItems.set(item.element, item);
|
|
277
|
+
return ()=>{
|
|
278
|
+
$67560de7c78cb232$var$dropItems.delete(item.element);
|
|
279
|
+
};
|
|
394
280
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
$f2f44a26f7541d104d10e68c115a897a$var$dragSession.setup();
|
|
404
|
-
|
|
405
|
-
if ($daf765036c8e081b3420fc4f613ad96$export$getDragModality() === 'keyboard') {
|
|
406
|
-
$f2f44a26f7541d104d10e68c115a897a$var$dragSession.next();
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
for (let cb of $f2f44a26f7541d104d10e68c115a897a$var$subscriptions) {
|
|
411
|
-
cb();
|
|
412
|
-
}
|
|
281
|
+
function $67560de7c78cb232$export$549dbcf8649bf3b2(target, formatMessage) {
|
|
282
|
+
if ($67560de7c78cb232$var$dragSession) throw new Error('Cannot begin dragging while already dragging');
|
|
283
|
+
$67560de7c78cb232$var$dragSession = new $67560de7c78cb232$var$DragSession(target, formatMessage);
|
|
284
|
+
requestAnimationFrame(()=>{
|
|
285
|
+
$67560de7c78cb232$var$dragSession.setup();
|
|
286
|
+
if ($7252cd45fc48c07c$export$1fb2158d224b542c() === 'keyboard') $67560de7c78cb232$var$dragSession.next();
|
|
287
|
+
});
|
|
288
|
+
for (let cb of $67560de7c78cb232$var$subscriptions)cb();
|
|
413
289
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
return session;
|
|
290
|
+
function $67560de7c78cb232$export$418e185dd3f1b968() {
|
|
291
|
+
let [session, setSession] = $fP8tg$useState($67560de7c78cb232$var$dragSession);
|
|
292
|
+
$fP8tg$useEffect(()=>{
|
|
293
|
+
let cb = ()=>setSession($67560de7c78cb232$var$dragSession)
|
|
294
|
+
;
|
|
295
|
+
$67560de7c78cb232$var$subscriptions.add(cb);
|
|
296
|
+
return ()=>{
|
|
297
|
+
$67560de7c78cb232$var$subscriptions.delete(cb);
|
|
298
|
+
};
|
|
299
|
+
}, []);
|
|
300
|
+
return session;
|
|
426
301
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
for (let cb of $f2f44a26f7541d104d10e68c115a897a$var$subscriptions) {
|
|
432
|
-
cb();
|
|
433
|
-
}
|
|
302
|
+
function $67560de7c78cb232$var$endDragging() {
|
|
303
|
+
$67560de7c78cb232$var$dragSession = null;
|
|
304
|
+
for (let cb of $67560de7c78cb232$var$subscriptions)cb();
|
|
434
305
|
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
const $f2f44a26f7541d104d10e68c115a897a$var$MESSAGES = {
|
|
439
|
-
keyboard: 'dragStartedKeyboard',
|
|
440
|
-
touch: 'dragStartedTouch',
|
|
441
|
-
virtual: 'dragStartedVirtual'
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
class $f2f44a26f7541d104d10e68c115a897a$var$DragSession {
|
|
445
|
-
constructor(target, formatMessage) {
|
|
446
|
-
this.dragTarget = void 0;
|
|
447
|
-
this.validDropTargets = void 0;
|
|
448
|
-
this.currentDropTarget = void 0;
|
|
449
|
-
this.currentDropItem = void 0;
|
|
450
|
-
this.dropOperation = void 0;
|
|
451
|
-
this.mutationObserver = void 0;
|
|
452
|
-
this.mutationImmediate = void 0;
|
|
453
|
-
this.restoreAriaHidden = void 0;
|
|
454
|
-
this.formatMessage = void 0;
|
|
455
|
-
this.dragTarget = target;
|
|
456
|
-
this.formatMessage = formatMessage;
|
|
457
|
-
this.onKeyDown = this.onKeyDown.bind(this);
|
|
458
|
-
this.onFocus = this.onFocus.bind(this);
|
|
459
|
-
this.onBlur = this.onBlur.bind(this);
|
|
460
|
-
this.onClick = this.onClick.bind(this);
|
|
461
|
-
this.cancelEvent = this.cancelEvent.bind(this);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
setup() {
|
|
465
|
-
document.addEventListener('keydown', this.onKeyDown, true);
|
|
466
|
-
window.addEventListener('focus', this.onFocus, true);
|
|
467
|
-
window.addEventListener('blur', this.onBlur, true);
|
|
468
|
-
document.addEventListener('click', this.onClick, true);
|
|
469
|
-
|
|
470
|
-
for (let event of $f2f44a26f7541d104d10e68c115a897a$var$CANCELED_EVENTS) {
|
|
471
|
-
document.addEventListener(event, this.cancelEvent, true);
|
|
306
|
+
function $67560de7c78cb232$export$7454aff2e161f241(element) {
|
|
307
|
+
for (let target of $67560de7c78cb232$var$dropTargets.keys()){
|
|
308
|
+
if (target.contains(element)) return true;
|
|
472
309
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
const $67560de7c78cb232$var$CANCELED_EVENTS = [
|
|
313
|
+
'pointerdown',
|
|
314
|
+
'pointermove',
|
|
315
|
+
'pointerenter',
|
|
316
|
+
'pointerleave',
|
|
317
|
+
'pointerover',
|
|
318
|
+
'pointerout',
|
|
319
|
+
'pointerup',
|
|
320
|
+
'mousedown',
|
|
321
|
+
'mousemove',
|
|
322
|
+
'mouseenter',
|
|
323
|
+
'mouseleave',
|
|
324
|
+
'mouseover',
|
|
325
|
+
'mouseout',
|
|
326
|
+
'mouseup',
|
|
327
|
+
'touchstart',
|
|
328
|
+
'touchmove',
|
|
329
|
+
'touchend',
|
|
330
|
+
'keyup',
|
|
331
|
+
'focusin',
|
|
332
|
+
'focusout'
|
|
333
|
+
];
|
|
334
|
+
const $67560de7c78cb232$var$CLICK_EVENTS = [
|
|
335
|
+
'pointerup',
|
|
336
|
+
'mouseup',
|
|
337
|
+
'touchend'
|
|
338
|
+
];
|
|
339
|
+
const $67560de7c78cb232$var$MESSAGES = {
|
|
340
|
+
keyboard: 'dragStartedKeyboard',
|
|
341
|
+
touch: 'dragStartedTouch',
|
|
342
|
+
virtual: 'dragStartedVirtual'
|
|
343
|
+
};
|
|
344
|
+
class $67560de7c78cb232$var$DragSession {
|
|
345
|
+
setup() {
|
|
346
|
+
document.addEventListener('keydown', this.onKeyDown, true);
|
|
347
|
+
window.addEventListener('focus', this.onFocus, true);
|
|
348
|
+
window.addEventListener('blur', this.onBlur, true);
|
|
349
|
+
document.addEventListener('click', this.onClick, true);
|
|
350
|
+
for (let event of $67560de7c78cb232$var$CANCELED_EVENTS)document.addEventListener(event, this.cancelEvent, true);
|
|
351
|
+
this.mutationObserver = new MutationObserver(()=>this.updateValidDropTargets()
|
|
352
|
+
);
|
|
482
353
|
this.updateValidDropTargets();
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
this.
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
this.currentDropTarget.onKeyDown(e, this.dragTarget);
|
|
354
|
+
$fP8tg$announce(this.formatMessage($67560de7c78cb232$var$MESSAGES[$7252cd45fc48c07c$export$1fb2158d224b542c()]));
|
|
355
|
+
}
|
|
356
|
+
teardown() {
|
|
357
|
+
document.removeEventListener('keydown', this.onKeyDown, true);
|
|
358
|
+
window.removeEventListener('focus', this.onFocus, true);
|
|
359
|
+
window.removeEventListener('blur', this.onBlur, true);
|
|
360
|
+
document.removeEventListener('click', this.onClick, true);
|
|
361
|
+
for (let event of $67560de7c78cb232$var$CANCELED_EVENTS)document.removeEventListener(event, this.cancelEvent, true);
|
|
362
|
+
this.mutationObserver.disconnect();
|
|
363
|
+
this.restoreAriaHidden();
|
|
364
|
+
if (this.mutationImmediate) clearImmediate(this.mutationImmediate);
|
|
365
|
+
}
|
|
366
|
+
onKeyDown(e) {
|
|
367
|
+
var ref;
|
|
368
|
+
this.cancelEvent(e);
|
|
369
|
+
if (e.key === 'Escape') {
|
|
370
|
+
this.cancel();
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
if (e.key === 'Enter') {
|
|
374
|
+
if (e.altKey) this.activate();
|
|
375
|
+
else this.drop();
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
if (e.key === 'Tab' && !(e.metaKey || e.altKey || e.ctrlKey)) {
|
|
379
|
+
if (e.shiftKey) this.previous();
|
|
380
|
+
else this.next();
|
|
381
|
+
}
|
|
382
|
+
if (typeof ((ref = this.currentDropTarget) === null || ref === void 0 ? void 0 : ref.onKeyDown) === 'function') this.currentDropTarget.onKeyDown(e, this.dragTarget);
|
|
383
|
+
}
|
|
384
|
+
onFocus(e) {
|
|
385
|
+
// Prevent focus events, except to the original drag target.
|
|
386
|
+
if (e.target !== this.dragTarget.element) this.cancelEvent(e);
|
|
387
|
+
// Ignore focus events on the window/document (JSDOM). Will be handled in onBlur, below.
|
|
388
|
+
if (!(e.target instanceof HTMLElement) || e.target === this.dragTarget.element) return;
|
|
389
|
+
let dropTarget = this.validDropTargets.find((target)=>target.element.contains(e.target)
|
|
390
|
+
);
|
|
391
|
+
if (!dropTarget) {
|
|
392
|
+
if (this.currentDropTarget) this.currentDropTarget.element.focus();
|
|
393
|
+
else this.dragTarget.element.focus();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
let item = $67560de7c78cb232$var$dropItems.get(e.target);
|
|
397
|
+
this.setCurrentDropTarget(dropTarget, item);
|
|
398
|
+
}
|
|
399
|
+
onBlur(e) {
|
|
400
|
+
if (e.target !== this.dragTarget.element) this.cancelEvent(e);
|
|
401
|
+
// If nothing is gaining focus, or e.relatedTarget is the window/document (JSDOM),
|
|
402
|
+
// restore focus back to the current drop target if any, or the original drag target.
|
|
403
|
+
if (!e.relatedTarget || !(e.relatedTarget instanceof HTMLElement)) {
|
|
404
|
+
if (this.currentDropTarget) this.currentDropTarget.element.focus();
|
|
405
|
+
else this.dragTarget.element.focus();
|
|
406
|
+
}
|
|
537
407
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
408
|
+
onClick(e) {
|
|
409
|
+
this.cancelEvent(e);
|
|
410
|
+
if (e.detail !== 0) return;
|
|
411
|
+
if (e.target === this.dragTarget.element) {
|
|
412
|
+
this.cancel();
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
let dropTarget = this.validDropTargets.find((target)=>target.element.contains(e.target)
|
|
416
|
+
);
|
|
417
|
+
if (dropTarget) {
|
|
418
|
+
let item = $67560de7c78cb232$var$dropItems.get(e.target);
|
|
419
|
+
this.setCurrentDropTarget(dropTarget, item);
|
|
420
|
+
this.drop(item);
|
|
421
|
+
}
|
|
549
422
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
423
|
+
cancelEvent(e) {
|
|
424
|
+
var ref;
|
|
425
|
+
// Allow focusin and focusout on the drag target so focus ring works properly.
|
|
426
|
+
if ((e.type === 'focusin' || e.type === 'focusout') && e.target === ((ref = this.dragTarget) === null || ref === void 0 ? void 0 : ref.element)) return;
|
|
427
|
+
// Allow default for events that might cancel a click event
|
|
428
|
+
if (!$67560de7c78cb232$var$CLICK_EVENTS.includes(e.type)) e.preventDefault();
|
|
429
|
+
e.stopPropagation();
|
|
430
|
+
e.stopImmediatePropagation();
|
|
431
|
+
}
|
|
432
|
+
updateValidDropTargets() {
|
|
433
|
+
if (!this.mutationObserver) return;
|
|
434
|
+
this.mutationObserver.disconnect();
|
|
435
|
+
if (this.restoreAriaHidden) this.restoreAriaHidden();
|
|
436
|
+
this.validDropTargets = $67560de7c78cb232$var$findValidDropTargets(this.dragTarget);
|
|
437
|
+
if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
438
|
+
// Find valid drop items within collections
|
|
439
|
+
let types = $7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);
|
|
440
|
+
let validDropItems = [
|
|
441
|
+
...$67560de7c78cb232$var$dropItems.values()
|
|
442
|
+
].filter((item)=>{
|
|
443
|
+
if (typeof item.getDropOperation === 'function') return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== 'cancel';
|
|
444
|
+
return true;
|
|
445
|
+
});
|
|
446
|
+
// Filter out drop targets that contain valid items. We don't want to stop hiding elements
|
|
447
|
+
// other than the drop items that exist inside the collection.
|
|
448
|
+
let visibleDropTargets = this.validDropTargets.filter((target)=>!validDropItems.some((item)=>target.element.contains(item.element)
|
|
449
|
+
)
|
|
450
|
+
);
|
|
451
|
+
this.restoreAriaHidden = $fP8tg$ariaHideOutside([
|
|
452
|
+
this.dragTarget.element,
|
|
453
|
+
...validDropItems.map((item)=>item.element
|
|
454
|
+
),
|
|
455
|
+
...visibleDropTargets.map((target)=>target.element
|
|
456
|
+
)
|
|
457
|
+
]);
|
|
458
|
+
this.mutationObserver.observe(document.body, {
|
|
459
|
+
subtree: true,
|
|
460
|
+
attributes: true,
|
|
461
|
+
attributeFilter: [
|
|
462
|
+
'aria-hidden'
|
|
463
|
+
]
|
|
464
|
+
});
|
|
561
465
|
}
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
466
|
+
next() {
|
|
467
|
+
if (!this.currentDropTarget) {
|
|
468
|
+
this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
let index = this.validDropTargets.indexOf(this.currentDropTarget);
|
|
472
|
+
if (index < 0) {
|
|
473
|
+
this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
// If we've reached the end of the valid drop targets, cycle back to the original drag target.
|
|
477
|
+
// This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
|
|
478
|
+
if (index === this.validDropTargets.length - 1) {
|
|
479
|
+
if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
|
|
480
|
+
this.setCurrentDropTarget(null);
|
|
481
|
+
this.dragTarget.element.focus();
|
|
482
|
+
} else this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
483
|
+
} else this.setCurrentDropTarget(this.validDropTargets[index + 1]);
|
|
484
|
+
}
|
|
485
|
+
previous() {
|
|
486
|
+
if (!this.currentDropTarget) {
|
|
487
|
+
this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
let index = this.validDropTargets.indexOf(this.currentDropTarget);
|
|
491
|
+
if (index < 0) {
|
|
492
|
+
this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
// If we've reached the start of the valid drop targets, cycle back to the original drag target.
|
|
496
|
+
// This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
|
|
497
|
+
if (index === 0) {
|
|
498
|
+
if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
|
|
499
|
+
this.setCurrentDropTarget(null);
|
|
500
|
+
this.dragTarget.element.focus();
|
|
501
|
+
} else this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
502
|
+
} else this.setCurrentDropTarget(this.validDropTargets[index - 1]);
|
|
503
|
+
}
|
|
504
|
+
setCurrentDropTarget(dropTarget, item) {
|
|
505
|
+
if (dropTarget !== this.currentDropTarget) {
|
|
506
|
+
if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === 'function') {
|
|
507
|
+
let rect = this.currentDropTarget.element.getBoundingClientRect();
|
|
508
|
+
this.currentDropTarget.onDropExit({
|
|
509
|
+
type: 'dropexit',
|
|
510
|
+
x: rect.left + rect.width / 2,
|
|
511
|
+
y: rect.top + rect.height / 2
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
this.currentDropTarget = dropTarget;
|
|
515
|
+
if (dropTarget) {
|
|
516
|
+
if (typeof dropTarget.onDropEnter === 'function') {
|
|
517
|
+
let rect = dropTarget.element.getBoundingClientRect();
|
|
518
|
+
dropTarget.onDropEnter({
|
|
519
|
+
type: 'dropenter',
|
|
520
|
+
x: rect.left + rect.width / 2,
|
|
521
|
+
y: rect.top + rect.height / 2
|
|
522
|
+
}, this.dragTarget);
|
|
523
|
+
}
|
|
524
|
+
if (!item) dropTarget === null || dropTarget === void 0 ? void 0 : dropTarget.element.focus();
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
if (item !== this.currentDropItem) {
|
|
528
|
+
if (item && typeof this.currentDropTarget.onDropTargetEnter === 'function') this.currentDropTarget.onDropTargetEnter(item === null || item === void 0 ? void 0 : item.target);
|
|
529
|
+
item === null || item === void 0 ? void 0 : item.element.focus();
|
|
530
|
+
this.currentDropItem = item;
|
|
531
|
+
}
|
|
580
532
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
533
|
+
end() {
|
|
534
|
+
this.teardown();
|
|
535
|
+
if (typeof this.dragTarget.onDragEnd === 'function') {
|
|
536
|
+
let target = this.currentDropTarget && this.dropOperation !== 'cancel' ? this.currentDropTarget : this.dragTarget;
|
|
537
|
+
let rect = target.element.getBoundingClientRect();
|
|
538
|
+
this.dragTarget.onDragEnd({
|
|
539
|
+
type: 'dragend',
|
|
540
|
+
x: rect.x + rect.width / 2,
|
|
541
|
+
y: rect.y + rect.height / 2,
|
|
542
|
+
dropOperation: this.dropOperation
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
// Blur and re-focus the drop target so that the focus ring appears.
|
|
546
|
+
if (this.currentDropTarget) {
|
|
547
|
+
this.currentDropTarget.element.blur();
|
|
548
|
+
this.currentDropTarget.element.focus();
|
|
549
|
+
}
|
|
550
|
+
this.setCurrentDropTarget(null);
|
|
551
|
+
$67560de7c78cb232$var$endDragging();
|
|
588
552
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
553
|
+
cancel() {
|
|
554
|
+
this.end();
|
|
555
|
+
if (!this.dragTarget.element.closest('[aria-hidden="true"]')) this.dragTarget.element.focus();
|
|
556
|
+
$fP8tg$announce(this.formatMessage('dropCanceled'));
|
|
593
557
|
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
558
|
+
drop(item1) {
|
|
559
|
+
if (!this.currentDropTarget) {
|
|
560
|
+
this.cancel();
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
if (typeof (item1 === null || item1 === void 0 ? void 0 : item1.getDropOperation) === 'function') {
|
|
564
|
+
let types = $7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);
|
|
565
|
+
this.dropOperation = item1.getDropOperation(types, this.dragTarget.allowedDropOperations);
|
|
566
|
+
} else if (typeof this.currentDropTarget.getDropOperation === 'function') {
|
|
567
|
+
let types = $7252cd45fc48c07c$export$e1d41611756c6326(this.dragTarget.items);
|
|
568
|
+
this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
|
|
569
|
+
} else // TODO: show menu ??
|
|
570
|
+
this.dropOperation = this.dragTarget.allowedDropOperations[0];
|
|
571
|
+
if (typeof this.currentDropTarget.onDrop === 'function') {
|
|
572
|
+
let items = this.dragTarget.items.map((item)=>({
|
|
573
|
+
kind: 'text',
|
|
574
|
+
types: new Set(Object.keys(item)),
|
|
575
|
+
getText: (type)=>Promise.resolve(item[type])
|
|
576
|
+
})
|
|
577
|
+
);
|
|
578
|
+
let rect = this.currentDropTarget.element.getBoundingClientRect();
|
|
579
|
+
this.currentDropTarget.onDrop({
|
|
580
|
+
type: 'drop',
|
|
581
|
+
x: rect.left + rect.width / 2,
|
|
582
|
+
y: rect.top + rect.height / 2,
|
|
583
|
+
items: items,
|
|
584
|
+
dropOperation: this.dropOperation
|
|
585
|
+
}, item1 === null || item1 === void 0 ? void 0 : item1.target);
|
|
586
|
+
}
|
|
587
|
+
this.end();
|
|
588
|
+
$fP8tg$announce(this.formatMessage('dropComplete'));
|
|
589
|
+
}
|
|
590
|
+
activate() {
|
|
591
|
+
if (this.currentDropTarget && typeof this.currentDropTarget.onDropActivate === 'function') {
|
|
592
|
+
let rect = this.currentDropTarget.element.getBoundingClientRect();
|
|
593
|
+
this.currentDropTarget.onDropActivate({
|
|
594
|
+
type: 'dropactivate',
|
|
595
|
+
x: rect.left + rect.width / 2,
|
|
596
|
+
y: rect.top + rect.height / 2
|
|
597
|
+
});
|
|
598
|
+
}
|
|
601
599
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
600
|
+
constructor(target, formatMessage){
|
|
601
|
+
this.dragTarget = target;
|
|
602
|
+
this.formatMessage = formatMessage;
|
|
603
|
+
this.onKeyDown = this.onKeyDown.bind(this);
|
|
604
|
+
this.onFocus = this.onFocus.bind(this);
|
|
605
|
+
this.onBlur = this.onBlur.bind(this);
|
|
606
|
+
this.onClick = this.onClick.bind(this);
|
|
607
|
+
this.cancelEvent = this.cancelEvent.bind(this);
|
|
608
608
|
}
|
|
609
|
+
}
|
|
610
|
+
function $67560de7c78cb232$var$findValidDropTargets(options) {
|
|
611
|
+
let types = $7252cd45fc48c07c$export$e1d41611756c6326(options.items);
|
|
612
|
+
return [
|
|
613
|
+
...$67560de7c78cb232$var$dropTargets.values()
|
|
614
|
+
].filter((target)=>{
|
|
615
|
+
if (target.element.closest('[aria-hidden="true"]')) return false;
|
|
616
|
+
if (typeof target.getDropOperation === 'function') return target.getDropOperation(types, options.allowedDropOperations) !== 'cancel';
|
|
617
|
+
return true;
|
|
618
|
+
});
|
|
619
|
+
}
|
|
609
620
|
|
|
610
|
-
e.stopPropagation();
|
|
611
|
-
e.stopImmediatePropagation();
|
|
612
|
-
}
|
|
613
621
|
|
|
614
|
-
updateValidDropTargets() {
|
|
615
|
-
if (!this.mutationObserver) {
|
|
616
|
-
return;
|
|
617
|
-
}
|
|
618
622
|
|
|
619
|
-
|
|
623
|
+
var $c530af5bd0e7e6c6$exports = {};
|
|
624
|
+
var $7dfcac1a0c98c789$exports = {};
|
|
625
|
+
$7dfcac1a0c98c789$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"اضغط Enter لبدء السحب.\",\"dragDescriptionTouch\":\"اضغط مرتين لبدء السحب.\",\"dragDescriptionVirtual\":\"انقر لبدء السحب.\",\"dragItem\":\"اسحب {itemText}\",\"dragSelectedItems\":\"اسحب {count, plural, one {# عنصر محدد} other {# عناصر محددة}}\",\"dragStartedKeyboard\":\"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.\",\"dragStartedTouch\":\"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.\",\"dragStartedVirtual\":\"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.\",\"dropCanceled\":\"تم إلغاء الإفلات.\",\"dropComplete\":\"اكتمل الإفلات.\",\"dropDescriptionKeyboard\":\"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.\",\"dropDescriptionTouch\":\"اضغط مرتين للإفلات.\",\"dropDescriptionVirtual\":\"انقر للإفلات.\",\"dropIndicator\":\"مؤشر الإفلات\",\"dropOnItem\":\"إفلات {itemText}\",\"dropOnRoot\":\"الإفلات\",\"endDragKeyboard\":\"السحب. اضغط Enter لإلغاء السحب.\",\"endDragTouch\":\"السحب. اضغط مرتين لإلغاء السحب.\",\"endDragVirtual\":\"السحب. انقر لإلغاء السحب.\",\"insertAfter\":\"أدخل بعد {itemText}\",\"insertBefore\":\"أدخل قبل {itemText}\",\"insertBetween\":\"أدخل بين {beforeItemText} و {afterItemText}\"}");
|
|
620
626
|
|
|
621
|
-
if (this.restoreAriaHidden) {
|
|
622
|
-
this.restoreAriaHidden();
|
|
623
|
-
}
|
|
624
627
|
|
|
625
|
-
|
|
628
|
+
var $f311c26671219eca$exports = {};
|
|
629
|
+
$f311c26671219eca$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натиснете „Enter“, за да започнете да плъзгате.\",\"dragDescriptionTouch\":\"Натиснете двукратно, за да започнете да плъзгате.\",\"dragDescriptionVirtual\":\"Щракнете, за да започнете да плъзгате.\",\"dragItem\":\"Плъзни {itemText}\",\"dragSelectedItems\":\"Плъзни {count, plural, one {# избран елемент} other {# избрани елемента}}\",\"dragStartedKeyboard\":\"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.\",\"dragStartedTouch\":\"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.\",\"dragStartedVirtual\":\"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.\",\"dropCanceled\":\"Пускането е отменено.\",\"dropComplete\":\"Пускането е завършено.\",\"dropDescriptionKeyboard\":\"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.\",\"dropDescriptionTouch\":\"Натиснете двукратно за пускане.\",\"dropDescriptionVirtual\":\"Щракнете за пускане.\",\"dropIndicator\":\"индикатор за пускане\",\"dropOnItem\":\"Пусни върху {itemText}\",\"dropOnRoot\":\"Пусни върху\",\"endDragKeyboard\":\"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.\",\"endDragTouch\":\"Плъзгане. Натиснете двукратно за отмяна на плъзгането.\",\"endDragVirtual\":\"Плъзгане. Щракнете за отмяна.\",\"insertAfter\":\"Вмъкни след {itemText}\",\"insertBefore\":\"Вмъкни преди {itemText}\",\"insertBetween\":\"Вмъкни между {beforeItemText} и {afterItemText}\"}");
|
|
626
630
|
|
|
627
|
-
if (this.currentDropTarget && !this.validDropTargets.includes(this.currentDropTarget)) {
|
|
628
|
-
this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
629
|
-
} // Find valid drop items within collections
|
|
630
631
|
|
|
632
|
+
var $1aa4ade186550f72$exports = {};
|
|
633
|
+
$1aa4ade186550f72$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stisknutím klávesy Enter začnete s přetahováním.\",\"dragDescriptionTouch\":\"Poklepáním začnete s přetahováním.\",\"dragDescriptionVirtual\":\"Kliknutím začnete s přetahováním.\",\"dragItem\":\"Přetáhnout {itemText}\",\"dragSelectedItems\":\"Přetáhnout {count, plural, one {# vybranou položku} few {# vybrané položky} other {# vybraných položek}}\",\"dragStartedKeyboard\":\"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dragStartedTouch\":\"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.\",\"dragStartedVirtual\":\"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.\",\"dropCanceled\":\"Přetažení bylo zrušeno.\",\"dropComplete\":\"Přetažení bylo dokončeno.\",\"dropDescriptionKeyboard\":\"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dropDescriptionTouch\":\"Poklepáním přetažení dokončete.\",\"dropDescriptionVirtual\":\"Kliknutím objekt přetáhněte.\",\"dropIndicator\":\"indikátor přetažení\",\"dropOnItem\":\"Přetáhnout na {itemText}\",\"dropOnRoot\":\"Přetáhnout na\",\"endDragKeyboard\":\"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.\",\"endDragTouch\":\"Probíhá přetahování. Poklepáním přetažení zrušíte.\",\"endDragVirtual\":\"Probíhá přetahování. Kliknutím přetažení zrušíte.\",\"insertAfter\":\"Vložit za {itemText}\",\"insertBefore\":\"Vložit před {itemText}\",\"insertBetween\":\"Vložit mezi {beforeItemText} a {afterItemText}\"}");
|
|
631
634
|
|
|
632
|
-
let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(this.dragTarget.items);
|
|
633
|
-
let validDropItems = [...$f2f44a26f7541d104d10e68c115a897a$var$dropItems.values()].filter(item => {
|
|
634
|
-
if (typeof item.getDropOperation === 'function') {
|
|
635
|
-
return item.getDropOperation(types, this.dragTarget.allowedDropOperations) !== 'cancel';
|
|
636
|
-
}
|
|
637
635
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
// other than the drop items that exist inside the collection.
|
|
636
|
+
var $b6b0ea1b94a7633c$exports = {};
|
|
637
|
+
$b6b0ea1b94a7633c$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryk på Enter for at starte med at trække.\",\"dragDescriptionTouch\":\"Dobbelttryk for at starte med at trække.\",\"dragDescriptionVirtual\":\"Klik for at starte med at trække.\",\"dragItem\":\"Træk {itemText}\",\"dragSelectedItems\":\"Træk {count, plural, one {# valgt element} other {# valgte elementer}}\",\"dragStartedKeyboard\":\"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.\",\"dragStartedTouch\":\"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.\",\"dragStartedVirtual\":\"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.\",\"dropCanceled\":\"Slip annulleret.\",\"dropComplete\":\"Slip fuldført.\",\"dropDescriptionKeyboard\":\"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.\",\"dropDescriptionTouch\":\"Dobbelttryk for at slippe.\",\"dropDescriptionVirtual\":\"Klik for at slippe.\",\"dropIndicator\":\"slip-indikator\",\"dropOnItem\":\"Slip på {itemText}\",\"dropOnRoot\":\"Slip på\",\"endDragKeyboard\":\"Trækning. Tryk på enter for at annullere træk.\",\"endDragTouch\":\"Trækning. Dobbelttryk for at annullere træk.\",\"endDragVirtual\":\"Trækning. Klik for at annullere trækning.\",\"insertAfter\":\"Indsæt efter {itemText}\",\"insertBefore\":\"Indsæt før {itemText}\",\"insertBetween\":\"Indsæt mellem {beforeItemText} og {afterItemText}\"}");
|
|
641
638
|
|
|
642
|
-
let visibleDropTargets = this.validDropTargets.filter(target => !validDropItems.some(item => target.element.contains(item.element)));
|
|
643
|
-
this.restoreAriaHidden = ariaHideOutside([this.dragTarget.element, ...validDropItems.map(item => item.element), ...visibleDropTargets.map(target => target.element)]);
|
|
644
|
-
this.mutationObserver.observe(document.body, {
|
|
645
|
-
subtree: true,
|
|
646
|
-
attributes: true,
|
|
647
|
-
attributeFilter: ['aria-hidden']
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
639
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
654
|
-
return;
|
|
655
|
-
}
|
|
640
|
+
var $d10e4f47c744ad52$exports = {};
|
|
641
|
+
$d10e4f47c744ad52$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.\",\"dragDescriptionTouch\":\"Tippen Sie doppelt, um den Ziehvorgang zu starten.\",\"dragDescriptionVirtual\":\"Zum Starten des Ziehvorgangs klicken.\",\"dragItem\":\"{itemText} ziehen\",\"dragSelectedItems\":\"{count, plural, one {# ausgewähltes Objekt} other {# ausgewählte Objekte}} ziehen\",\"dragStartedKeyboard\":\"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.\",\"dragStartedTouch\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.\",\"dragStartedVirtual\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.\",\"dropCanceled\":\"Ablegen abgebrochen.\",\"dropComplete\":\"Ablegen abgeschlossen.\",\"dropDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.\",\"dropDescriptionTouch\":\"Tippen Sie doppelt, um das Objekt abzulegen.\",\"dropDescriptionVirtual\":\"Zum Ablegen klicken.\",\"dropIndicator\":\"Ablegeanzeiger\",\"dropOnItem\":\"Auf {itemText} ablegen\",\"dropOnRoot\":\"Ablegen auf\",\"endDragKeyboard\":\"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.\",\"endDragTouch\":\"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.\",\"endDragVirtual\":\"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.\",\"insertAfter\":\"Nach {itemText} einfügen\",\"insertBefore\":\"Vor {itemText} einfügen\",\"insertBetween\":\"Zwischen {beforeItemText} und {afterItemText} einfügen\"}");
|
|
656
642
|
|
|
657
|
-
let index = this.validDropTargets.indexOf(this.currentDropTarget);
|
|
658
643
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
return;
|
|
662
|
-
} // If we've reached the end of the valid drop targets, cycle back to the original drag target.
|
|
663
|
-
// This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
|
|
644
|
+
var $b3d2bb9abce688ab$exports = {};
|
|
645
|
+
$b3d2bb9abce688ab$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Πατήστε Enter για έναρξη της μεταφοράς.\",\"dragDescriptionTouch\":\"Πατήστε δύο φορές για έναρξη της μεταφοράς.\",\"dragDescriptionVirtual\":\"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.\",\"dragItem\":\"Μεταφορά {itemText}\",\"dragSelectedItems\":\"Μεταφορά σε {count, plural, one {# επιλεγμένο στοιχείο} other {# επιλεγμένα στοιχεία}}\",\"dragStartedKeyboard\":\"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.\",\"dragStartedTouch\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.\",\"dragStartedVirtual\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.\",\"dropCanceled\":\"Η απόθεση ακυρώθηκε.\",\"dropComplete\":\"Η απόθεση ολοκληρώθηκε.\",\"dropDescriptionKeyboard\":\"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.\",\"dropDescriptionTouch\":\"Πατήστε δύο φορές για απόθεση.\",\"dropDescriptionVirtual\":\"Κάντε κλικ για απόθεση.\",\"dropIndicator\":\"δείκτης απόθεσης\",\"dropOnItem\":\"Απόθεση σε {itemText}\",\"dropOnRoot\":\"Απόθεση σε\",\"endDragKeyboard\":\"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.\",\"endDragTouch\":\"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.\",\"endDragVirtual\":\"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.\",\"insertAfter\":\"Εισαγωγή μετά από {itemText}\",\"insertBefore\":\"Εισαγωγή πριν από {itemText}\",\"insertBetween\":\"Εισαγωγή μεταξύ {beforeItemText} και {afterItemText}\"}");
|
|
664
646
|
|
|
665
647
|
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
this.setCurrentDropTarget(null);
|
|
669
|
-
this.dragTarget.element.focus();
|
|
670
|
-
} else {
|
|
671
|
-
this.setCurrentDropTarget(this.validDropTargets[0]);
|
|
672
|
-
}
|
|
673
|
-
} else {
|
|
674
|
-
this.setCurrentDropTarget(this.validDropTargets[index + 1]);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
648
|
+
var $f9b46437e610cca1$exports = {};
|
|
649
|
+
$f9b46437e610cca1$exports = JSON.parse("{\"dragItem\":\"Drag {itemText}\",\"dragSelectedItems\":\"Drag {count, plural, one {# selected item} other {# selected items}}\",\"dragDescriptionKeyboard\":\"Press Enter to start dragging.\",\"dragDescriptionTouch\":\"Double tap to start dragging.\",\"dragDescriptionVirtual\":\"Click to start dragging.\",\"dragStartedKeyboard\":\"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.\",\"dragStartedTouch\":\"Started dragging. Navigate to a drop target, then double tap to drop.\",\"dragStartedVirtual\":\"Started dragging. Navigate to a drop target, then click or press Enter to drop.\",\"endDragKeyboard\":\"Dragging. Press Enter to cancel drag.\",\"endDragTouch\":\"Dragging. Double tap to cancel drag.\",\"endDragVirtual\":\"Dragging. Click to cancel drag.\",\"dropDescriptionKeyboard\":\"Press Enter to drop. Press Escape to cancel drag.\",\"dropDescriptionTouch\":\"Double tap to drop.\",\"dropDescriptionVirtual\":\"Click to drop.\",\"dropCanceled\":\"Drop canceled.\",\"dropComplete\":\"Drop complete.\",\"dropIndicator\":\"drop indicator\",\"dropOnRoot\":\"Drop on\",\"dropOnItem\":\"Drop on {itemText}\",\"insertBefore\":\"Insert before {itemText}\",\"insertBetween\":\"Insert between {beforeItemText} and {afterItemText}\",\"insertAfter\":\"Insert after {itemText}\"}");
|
|
677
650
|
|
|
678
|
-
previous() {
|
|
679
|
-
if (!this.currentDropTarget) {
|
|
680
|
-
this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
681
|
-
return;
|
|
682
|
-
}
|
|
683
651
|
|
|
684
|
-
|
|
652
|
+
var $204b5c01bd3acf26$exports = {};
|
|
653
|
+
$204b5c01bd3acf26$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pulse Intro para empezar a arrastrar.\",\"dragDescriptionTouch\":\"Pulse dos veces para iniciar el arrastre.\",\"dragDescriptionVirtual\":\"Haga clic para iniciar el arrastre.\",\"dragItem\":\"Arrastrar {itemText}\",\"dragSelectedItems\":\"Arrastrar {count, plural, one {# elemento seleccionado} other {# elementos seleccionados}}\",\"dragStartedKeyboard\":\"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino de colocación y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.\",\"dragStartedTouch\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, pulse dos veces para soltar.\",\"dragStartedVirtual\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, haga clic o pulse Intro para soltar.\",\"dropCanceled\":\"Se ha cancelado la colocación.\",\"dropComplete\":\"Colocación finalizada.\",\"dropDescriptionKeyboard\":\"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.\",\"dropDescriptionTouch\":\"Pulse dos veces para soltar.\",\"dropDescriptionVirtual\":\"Haga clic para soltar.\",\"dropIndicator\":\"indicador de colocación\",\"dropOnItem\":\"Soltar en {itemText}\",\"dropOnRoot\":\"Soltar en\",\"endDragKeyboard\":\"Arrastrando. Pulse Intro para cancelar el arrastre.\",\"endDragTouch\":\"Arrastrando. Pulse dos veces para cancelar el arrastre.\",\"endDragVirtual\":\"Arrastrando. Haga clic para cancelar el arrastre.\",\"insertAfter\":\"Insertar después de {itemText}\",\"insertBefore\":\"Insertar antes de {itemText}\",\"insertBetween\":\"Insertar entre {beforeItemText} y {afterItemText}\"}");
|
|
685
654
|
|
|
686
|
-
if (index < 0) {
|
|
687
|
-
this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
688
|
-
return;
|
|
689
|
-
} // If we've reached the start of the valid drop targets, cycle back to the original drag target.
|
|
690
|
-
// This lets the user cancel the drag in case they don't have an Escape key (e.g. iPad keyboard case).
|
|
691
655
|
|
|
656
|
+
var $110bdd83348ecbc0$exports = {};
|
|
657
|
+
$110bdd83348ecbc0$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Lohistamise alustamiseks vajutage klahvi Enter.\",\"dragDescriptionTouch\":\"Topeltpuudutage lohistamise alustamiseks.\",\"dragDescriptionVirtual\":\"Klõpsake lohistamise alustamiseks.\",\"dragItem\":\"Lohista {itemText}\",\"dragSelectedItems\":\"Lohista {count, plural, one {# valitud üksust} other {# valitud üksust}}\",\"dragStartedKeyboard\":\"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.\",\"dragStartedTouch\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.\",\"dragStartedVirtual\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.\",\"dropCanceled\":\"Lohistamisest loobuti.\",\"dropComplete\":\"Lohistamine on tehtud.\",\"dropDescriptionKeyboard\":\"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.\",\"dropDescriptionTouch\":\"Kukutamiseks topeltpuudutage.\",\"dropDescriptionVirtual\":\"Kukutamiseks klõpsake.\",\"dropIndicator\":\"lohistamise indikaator\",\"dropOnItem\":\"Kukuta asukohta {itemText}\",\"dropOnRoot\":\"Kukuta asukohta\",\"endDragKeyboard\":\"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.\",\"endDragTouch\":\"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.\",\"endDragVirtual\":\"Lohistamine. Lohistamisest loobumiseks klõpsake.\",\"insertAfter\":\"Sisesta {itemText} järele\",\"insertBefore\":\"Sisesta {itemText} ette\",\"insertBetween\":\"Sisesta {beforeItemText} ja {afterItemText} vahele\"}");
|
|
692
658
|
|
|
693
|
-
if (index === 0) {
|
|
694
|
-
if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
|
|
695
|
-
this.setCurrentDropTarget(null);
|
|
696
|
-
this.dragTarget.element.focus();
|
|
697
|
-
} else {
|
|
698
|
-
this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length - 1]);
|
|
699
|
-
}
|
|
700
|
-
} else {
|
|
701
|
-
this.setCurrentDropTarget(this.validDropTargets[index - 1]);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
setCurrentDropTarget(dropTarget, item) {
|
|
706
|
-
if (dropTarget !== this.currentDropTarget) {
|
|
707
|
-
if (this.currentDropTarget && typeof this.currentDropTarget.onDropExit === 'function') {
|
|
708
|
-
let rect = this.currentDropTarget.element.getBoundingClientRect();
|
|
709
|
-
this.currentDropTarget.onDropExit({
|
|
710
|
-
type: 'dropexit',
|
|
711
|
-
x: rect.left + rect.width / 2,
|
|
712
|
-
y: rect.top + rect.height / 2
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
this.currentDropTarget = dropTarget;
|
|
717
|
-
|
|
718
|
-
if (dropTarget) {
|
|
719
|
-
if (typeof dropTarget.onDropEnter === 'function') {
|
|
720
|
-
let rect = dropTarget.element.getBoundingClientRect();
|
|
721
|
-
dropTarget.onDropEnter({
|
|
722
|
-
type: 'dropenter',
|
|
723
|
-
x: rect.left + rect.width / 2,
|
|
724
|
-
y: rect.top + rect.height / 2
|
|
725
|
-
}, this.dragTarget);
|
|
726
|
-
}
|
|
727
659
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
}
|
|
660
|
+
var $87d3ccd5e347c7cc$exports = {};
|
|
661
|
+
$87d3ccd5e347c7cc$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Aloita vetäminen painamalla Enter-näppäintä.\",\"dragDescriptionTouch\":\"Aloita vetäminen kaksoisnapauttamalla.\",\"dragDescriptionVirtual\":\"Aloita vetäminen napsauttamalla.\",\"dragItem\":\"Vedä kohdetta {itemText}\",\"dragSelectedItems\":\"Vedä {count, plural, one {# valittua kohdetta} other {# valittua kohdetta}}\",\"dragStartedKeyboard\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.\",\"dragStartedTouch\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.\",\"dragStartedVirtual\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.\",\"dropCanceled\":\"Pudotus peruutettu.\",\"dropComplete\":\"Pudotus suoritettu.\",\"dropDescriptionKeyboard\":\"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.\",\"dropDescriptionTouch\":\"Pudota kaksoisnapauttamalla.\",\"dropDescriptionVirtual\":\"Pudota napsauttamalla.\",\"dropIndicator\":\"pudotuksen ilmaisin\",\"dropOnItem\":\"Pudota kohteeseen {itemText}\",\"dropOnRoot\":\"Pudota kohteeseen\",\"endDragKeyboard\":\"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.\",\"endDragTouch\":\"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.\",\"endDragVirtual\":\"Vedetään. Peruuta vetäminen napsauttamalla.\",\"insertAfter\":\"Lisää kohteen {itemText} jälkeen\",\"insertBefore\":\"Lisää ennen kohdetta {itemText}\",\"insertBetween\":\"Lisää kohteiden {beforeItemText} ja {afterItemText} väliin\"}");
|
|
733
662
|
|
|
734
|
-
if (item !== this.currentDropItem) {
|
|
735
|
-
if (item && typeof this.currentDropTarget.onDropTargetEnter === 'function') {
|
|
736
|
-
this.currentDropTarget.onDropTargetEnter(item == null ? void 0 : item.target);
|
|
737
|
-
}
|
|
738
663
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
end() {
|
|
745
|
-
this.teardown();
|
|
746
|
-
|
|
747
|
-
if (typeof this.dragTarget.onDragEnd === 'function') {
|
|
748
|
-
let target = this.currentDropTarget && this.dropOperation !== 'cancel' ? this.currentDropTarget : this.dragTarget;
|
|
749
|
-
let rect = target.element.getBoundingClientRect();
|
|
750
|
-
this.dragTarget.onDragEnd({
|
|
751
|
-
type: 'dragend',
|
|
752
|
-
x: rect.x + rect.width / 2,
|
|
753
|
-
y: rect.y + rect.height / 2,
|
|
754
|
-
dropOperation: this.dropOperation
|
|
755
|
-
});
|
|
756
|
-
}
|
|
664
|
+
var $a5de891427686596$exports = {};
|
|
665
|
+
$a5de891427686596$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Appuyez sur Entrée pour commencer le déplacement.\",\"dragDescriptionTouch\":\"Touchez deux fois pour commencer le déplacement.\",\"dragDescriptionVirtual\":\"Cliquez pour commencer le déplacement.\",\"dragItem\":\"Déplacer {itemText}\",\"dragSelectedItems\":\"Déplacer {count, plural, one {# élément sélectionné} other {# éléments sélectionnés}}\",\"dragStartedKeyboard\":\"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.\",\"dragStartedTouch\":\"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.\",\"dragStartedVirtual\":\"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.\",\"dropCanceled\":\"Dépôt annulé.\",\"dropComplete\":\"Dépôt terminé.\",\"dropDescriptionKeyboard\":\"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.\",\"dropDescriptionTouch\":\"Touchez deux fois pour déposer.\",\"dropDescriptionVirtual\":\"Cliquez pour déposer.\",\"dropIndicator\":\"indicateur de dépôt\",\"dropOnItem\":\"Déposer sur {itemText}\",\"dropOnRoot\":\"Déposer sur\",\"endDragKeyboard\":\"Déplacement. Appuyez sur Entrée pour annuler le déplacement.\",\"endDragTouch\":\"Déplacement. Touchez deux fois pour annuler le déplacement.\",\"endDragVirtual\":\"Déplacement. Cliquez pour annuler le déplacement.\",\"insertAfter\":\"Insérer après {itemText}\",\"insertBefore\":\"Insérer avant {itemText}\",\"insertBetween\":\"Insérer entre {beforeItemText} et {afterItemText}\"}");
|
|
757
666
|
|
|
758
|
-
this.setCurrentDropTarget(null);
|
|
759
|
-
$f2f44a26f7541d104d10e68c115a897a$var$endDragging();
|
|
760
|
-
}
|
|
761
667
|
|
|
762
|
-
|
|
763
|
-
|
|
668
|
+
var $ad7f4c66d85b4494$exports = {};
|
|
669
|
+
$ad7f4c66d85b4494$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"הקש על Enter כדי להתחיל לגרור.\",\"dragDescriptionTouch\":\"הקש פעמיים כדי להתחיל בגרירה.\",\"dragDescriptionVirtual\":\"לחץ כדי להתחיל לגרור.\",\"dragItem\":\"גרור את {itemText}\",\"dragSelectedItems\":\"גרור {count, plural, one {פריט נבחר #} other {# פריטים שנבחרו}}\",\"dragStartedKeyboard\":\"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.\",\"dragStartedTouch\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.\",\"dragStartedVirtual\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.\",\"dropCanceled\":\"השחרור בוטל.\",\"dropComplete\":\"השחרור הושלם.\",\"dropDescriptionKeyboard\":\"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.\",\"dropDescriptionTouch\":\"הקש פעמיים כדי לשחרר.\",\"dropDescriptionVirtual\":\"לחץ כדי לשחרר.\",\"dropIndicator\":\"מחוון שחרור\",\"dropOnItem\":\"שחרר על {itemText}\",\"dropOnRoot\":\"שחרר על\",\"endDragKeyboard\":\"גורר. הקש על Enter כדי לבטל את הגרירה.\",\"endDragTouch\":\"גורר. הקש פעמיים כדי לבטל את הגרירה.\",\"endDragVirtual\":\"גורר. לחץ כדי לבטל את הגרירה.\",\"insertAfter\":\"הוסף אחרי {itemText}\",\"insertBefore\":\"הוסף לפני {itemText}\",\"insertBetween\":\"הוסף בין {beforeItemText} לבין {afterItemText}\"}");
|
|
764
670
|
|
|
765
|
-
if (!this.dragTarget.element.closest('[aria-hidden="true"]')) {
|
|
766
|
-
this.dragTarget.element.focus();
|
|
767
|
-
}
|
|
768
671
|
|
|
769
|
-
|
|
770
|
-
|
|
672
|
+
var $4aa59f3c6a796cae$exports = {};
|
|
673
|
+
$4aa59f3c6a796cae$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste počeli povlačiti.\",\"dragDescriptionTouch\":\"Dvaput dodirnite da biste počeli povlačiti.\",\"dragDescriptionVirtual\":\"Kliknite da biste počeli povlačiti.\",\"dragItem\":\"Povucite stavku {itemText}\",\"dragSelectedItems\":\"Povucite {count, plural, one {# odabranu stavku} other {ovoliko odabranih stavki: #}}\",\"dragStartedKeyboard\":\"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.\",\"dragStartedTouch\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.\",\"dragStartedVirtual\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.\",\"dropCanceled\":\"Povlačenje je prekinuto.\",\"dropComplete\":\"Ispuštanje je dovršeno.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite da biste ispustili stavku.\",\"dropDescriptionVirtual\":\"Kliknite da biste ispustili stavku.\",\"dropIndicator\":\"pokazatelj ispuštanja\",\"dropOnItem\":\"Ispustite na stavku {itemText}\",\"dropOnRoot\":\"Ispustite na\",\"endDragKeyboard\":\"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.\",\"endDragTouch\":\"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.\",\"endDragVirtual\":\"Povlačenje. Kliknite da biste prekinuli povlačenje.\",\"insertAfter\":\"Umetnite iza stavke {itemText}\",\"insertBefore\":\"Ispustite ispred stavke {itemText}\",\"insertBetween\":\"Umetnite između stavki {beforeItemText} i {afterItemText}\"}");
|
|
771
674
|
|
|
772
|
-
drop(item) {
|
|
773
|
-
if (!this.currentDropTarget) {
|
|
774
|
-
this.cancel();
|
|
775
|
-
return;
|
|
776
|
-
}
|
|
777
675
|
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
this.dropOperation = item.getDropOperation(types, this.dragTarget.allowedDropOperations);
|
|
781
|
-
} else if (typeof this.currentDropTarget.getDropOperation === 'function') {
|
|
782
|
-
let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(this.dragTarget.items);
|
|
783
|
-
this.dropOperation = this.currentDropTarget.getDropOperation(types, this.dragTarget.allowedDropOperations);
|
|
784
|
-
} else {
|
|
785
|
-
// TODO: show menu ??
|
|
786
|
-
this.dropOperation = this.dragTarget.allowedDropOperations[0];
|
|
787
|
-
}
|
|
676
|
+
var $d8d3646556c40586$exports = {};
|
|
677
|
+
$d8d3646556c40586$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nyomja le az Enter billentyűt a húzás megkezdéséhez.\",\"dragDescriptionTouch\":\"Koppintson duplán a húzás megkezdéséhez.\",\"dragDescriptionVirtual\":\"Kattintson a húzás megkezdéséhez.\",\"dragItem\":\"{itemText} húzása\",\"dragSelectedItems\":\"{count, plural, one {# kijelölt elem} other {# kijelölt elem}} húzása\",\"dragStartedKeyboard\":\"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.\",\"dragStartedTouch\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.\",\"dragStartedVirtual\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.\",\"dropCanceled\":\"Elengedés megszakítva.\",\"dropComplete\":\"Elengedés teljesítve.\",\"dropDescriptionKeyboard\":\"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.\",\"dropDescriptionTouch\":\"Koppintson duplán az elengedéshez.\",\"dropDescriptionVirtual\":\"Kattintson az elengedéshez.\",\"dropIndicator\":\"elengedésjelző\",\"dropOnItem\":\"Elengedés erre: {itemText}\",\"dropOnRoot\":\"Elengedés erre:\",\"endDragKeyboard\":\"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.\",\"endDragTouch\":\"Húzás folyamatban. Koppintson duplán a húzás megszakításához.\",\"endDragVirtual\":\"Húzás folyamatban. Kattintson a húzás megszakításához.\",\"insertAfter\":\"Beszúrás {itemText} után\",\"insertBefore\":\"Beszúrás {itemText} elé\",\"insertBetween\":\"Beszúrás {beforeItemText} és {afterItemText} közé\"}");
|
|
788
678
|
|
|
789
|
-
if (typeof this.currentDropTarget.onDrop === 'function') {
|
|
790
|
-
let items = this.dragTarget.items.map(item => ({
|
|
791
|
-
kind: 'text',
|
|
792
|
-
types: new Set(Object.keys(item)),
|
|
793
|
-
getText: type => Promise.resolve(item[type])
|
|
794
|
-
}));
|
|
795
|
-
let rect = this.currentDropTarget.element.getBoundingClientRect();
|
|
796
|
-
this.currentDropTarget.onDrop({
|
|
797
|
-
type: 'drop',
|
|
798
|
-
x: rect.left + rect.width / 2,
|
|
799
|
-
y: rect.top + rect.height / 2,
|
|
800
|
-
items,
|
|
801
|
-
dropOperation: this.dropOperation
|
|
802
|
-
}, item == null ? void 0 : item.target);
|
|
803
|
-
}
|
|
804
679
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
activate() {
|
|
810
|
-
if (this.currentDropTarget && typeof this.currentDropTarget.onDropActivate === 'function') {
|
|
811
|
-
let rect = this.currentDropTarget.element.getBoundingClientRect();
|
|
812
|
-
this.currentDropTarget.onDropActivate({
|
|
813
|
-
type: 'dropactivate',
|
|
814
|
-
x: rect.left + rect.width / 2,
|
|
815
|
-
y: rect.top + rect.height / 2
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
}
|
|
680
|
+
var $982d558b45395246$exports = {};
|
|
681
|
+
$982d558b45395246$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Premi Invio per iniziare a trascinare.\",\"dragDescriptionTouch\":\"Tocca due volte per iniziare a trascinare.\",\"dragDescriptionVirtual\":\"Fai clic per iniziare a trascinare.\",\"dragItem\":\"Trascina {itemText}\",\"dragSelectedItems\":\"Trascina {count, plural, one {# altro elemento selezionato} other {# altri elementi selezionati}}\",\"dragStartedKeyboard\":\"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.\",\"dragStartedTouch\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.\",\"dragStartedVirtual\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.\",\"dropCanceled\":\"Rilascio annullato.\",\"dropComplete\":\"Rilascio completato.\",\"dropDescriptionKeyboard\":\"Premi Invio per rilasciare. Premi Esc per annullare.\",\"dropDescriptionTouch\":\"Tocca due volte per rilasciare.\",\"dropDescriptionVirtual\":\"Fai clic per rilasciare.\",\"dropIndicator\":\"indicatore di rilascio\",\"dropOnItem\":\"Rilascia su {itemText}\",\"dropOnRoot\":\"Rilascia su\",\"endDragKeyboard\":\"Trascinamento. Premi Invio per annullare.\",\"endDragTouch\":\"Trascinamento. Tocca due volte per annullare.\",\"endDragVirtual\":\"Trascinamento. Fai clic per annullare.\",\"insertAfter\":\"Inserisci dopo {itemText}\",\"insertBefore\":\"Inserisci prima di {itemText}\",\"insertBetween\":\"Inserisci tra {beforeItemText} e {afterItemText}\"}");
|
|
819
682
|
|
|
820
|
-
}
|
|
821
683
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
return [...$f2f44a26f7541d104d10e68c115a897a$var$dropTargets.values()].filter(target => {
|
|
825
|
-
if (target.element.closest('[aria-hidden="true"]')) {
|
|
826
|
-
return false;
|
|
827
|
-
}
|
|
684
|
+
var $6a0cf387b9de036c$exports = {};
|
|
685
|
+
$6a0cf387b9de036c$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Enter キーを押してドラッグを開始してください。\",\"dragDescriptionTouch\":\"ダブルタップしてドラッグを開始します。\",\"dragDescriptionVirtual\":\"クリックしてドラッグを開始します。\",\"dragItem\":\"{itemText} をドラッグ\",\"dragSelectedItems\":\"{count, plural, one {# 個の選択項目} other {# 個の選択項目}} をドラッグ\",\"dragStartedKeyboard\":\"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。\",\"dragStartedTouch\":\"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。\",\"dragStartedVirtual\":\"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。\",\"dropCanceled\":\"ドロップがキャンセルされました。\",\"dropComplete\":\"ドロップが完了しました。\",\"dropDescriptionKeyboard\":\"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。\",\"dropDescriptionTouch\":\"ダブルタップしてドロップします。\",\"dropDescriptionVirtual\":\"クリックしてドロップします。\",\"dropIndicator\":\"ドロップインジケーター\",\"dropOnItem\":\"{itemText} にドロップ\",\"dropOnRoot\":\"ドロップ場所\",\"endDragKeyboard\":\"ドラッグしています。Enter キーを押してドラッグをキャンセルします。\",\"endDragTouch\":\"ドラッグしています。ダブルタップしてドラッグをキャンセルします。\",\"endDragVirtual\":\"ドラッグしています。クリックしてドラッグをキャンセルします。\",\"insertAfter\":\"{itemText} の後に挿入\",\"insertBefore\":\"{itemText} の前に挿入\",\"insertBetween\":\"{beforeItemText} と {afterItemText} の間に挿入\"}");
|
|
828
686
|
|
|
829
|
-
if (typeof target.getDropOperation === 'function') {
|
|
830
|
-
return target.getDropOperation(types, options.allowedDropOperations) !== 'cancel';
|
|
831
|
-
}
|
|
832
687
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
688
|
+
var $a97fefa2956f4bcb$exports = {};
|
|
689
|
+
$a97fefa2956f4bcb$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"드래그를 시작하려면 Enter를 누르세요.\",\"dragDescriptionTouch\":\"드래그를 시작하려면 더블 탭하세요.\",\"dragDescriptionVirtual\":\"드래그를 시작하려면 클릭하세요.\",\"dragItem\":\"{itemText} 드래그\",\"dragSelectedItems\":\"{count, plural, one {#개 선택 항목} other {#개 선택 항목}} 드래그\",\"dragStartedKeyboard\":\"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.\",\"dragStartedTouch\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.\",\"dragStartedVirtual\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.\",\"dropCanceled\":\"드롭이 취소되었습니다.\",\"dropComplete\":\"드롭이 완료되었습니다.\",\"dropDescriptionKeyboard\":\"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.\",\"dropDescriptionTouch\":\"더블 탭하여 드롭하세요.\",\"dropDescriptionVirtual\":\"드롭하려면 클릭하세요.\",\"dropIndicator\":\"드롭 표시기\",\"dropOnItem\":\"{itemText}에 드롭\",\"dropOnRoot\":\"드롭 대상\",\"endDragKeyboard\":\"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.\",\"endDragTouch\":\"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.\",\"endDragVirtual\":\"드래그 중입니다. 드래그를 취소하려면 클릭하세요.\",\"insertAfter\":\"{itemText} 이후에 삽입\",\"insertBefore\":\"{itemText} 이전에 삽입\",\"insertBetween\":\"{beforeItemText} 및 {afterItemText} 사이에 삽입\"}");
|
|
836
690
|
|
|
837
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ar-AE.json
|
|
838
|
-
var $ea65b45ad5e7d0aed23c128bf8ad1ea2$exports = {};
|
|
839
|
-
$ea65b45ad5e7d0aed23c128bf8ad1ea2$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"اضغط Enter لبدء السحب.\",\"dragDescriptionTouch\":\"اضغط مرتين لبدء السحب.\",\"dragDescriptionVirtual\":\"انقر لبدء السحب.\",\"dragItem\":\"اسحب {itemText}\",\"dragSelectedItems\":\"اسحب {count, plural, one {# عنصر محدد} other {# عناصر محددة}}\",\"dragStartedKeyboard\":\"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.\",\"dragStartedTouch\":\"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.\",\"dragStartedVirtual\":\"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.\",\"dropCanceled\":\"تم إلغاء الإفلات.\",\"dropComplete\":\"اكتمل الإفلات.\",\"dropDescriptionKeyboard\":\"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.\",\"dropDescriptionTouch\":\"اضغط مرتين للإفلات.\",\"dropDescriptionVirtual\":\"انقر للإفلات.\",\"dropIndicator\":\"مؤشر الإفلات\",\"dropOnItem\":\"إفلات {itemText}\",\"dropOnRoot\":\"الإفلات\",\"endDragKeyboard\":\"السحب. اضغط Enter لإلغاء السحب.\",\"endDragTouch\":\"السحب. اضغط مرتين لإلغاء السحب.\",\"endDragVirtual\":\"السحب. انقر لإلغاء السحب.\",\"insertAfter\":\"أدخل بعد {itemText}\",\"insertBefore\":\"أدخل قبل {itemText}\",\"insertBetween\":\"أدخل بين {beforeItemText} و {afterItemText}\"}");
|
|
840
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/bg-BG.json
|
|
841
|
-
var $c92ee777c2aef6235da0efaaab60dc61$exports = {};
|
|
842
|
-
$c92ee777c2aef6235da0efaaab60dc61$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натиснете „Enter“, за да започнете да плъзгате.\",\"dragDescriptionTouch\":\"Натиснете двукратно, за да започнете да плъзгате.\",\"dragDescriptionVirtual\":\"Щракнете, за да започнете да плъзгате.\",\"dragItem\":\"Плъзни {itemText}\",\"dragSelectedItems\":\"Плъзни {count, plural, one {# избран елемент} other {# избрани елемента}}\",\"dragStartedKeyboard\":\"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.\",\"dragStartedTouch\":\"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.\",\"dragStartedVirtual\":\"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.\",\"dropCanceled\":\"Пускането е отменено.\",\"dropComplete\":\"Пускането е завършено.\",\"dropDescriptionKeyboard\":\"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.\",\"dropDescriptionTouch\":\"Натиснете двукратно за пускане.\",\"dropDescriptionVirtual\":\"Щракнете за пускане.\",\"dropIndicator\":\"индикатор за пускане\",\"dropOnItem\":\"Пусни върху {itemText}\",\"dropOnRoot\":\"Пусни върху\",\"endDragKeyboard\":\"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.\",\"endDragTouch\":\"Плъзгане. Натиснете двукратно за отмяна на плъзгането.\",\"endDragVirtual\":\"Плъзгане. Щракнете за отмяна.\",\"insertAfter\":\"Вмъкни след {itemText}\",\"insertBefore\":\"Вмъкни преди {itemText}\",\"insertBetween\":\"Вмъкни между {beforeItemText} и {afterItemText}\"}");
|
|
843
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/cs-CZ.json
|
|
844
|
-
var $c9e276469924972853a3320763f673d$exports = {};
|
|
845
|
-
$c9e276469924972853a3320763f673d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stisknutím klávesy Enter začnete s přetahováním.\",\"dragDescriptionTouch\":\"Poklepáním začnete s přetahováním.\",\"dragDescriptionVirtual\":\"Kliknutím začnete s přetahováním.\",\"dragItem\":\"Přetáhnout {itemText}\",\"dragSelectedItems\":\"Přetáhnout {count, plural, one {# vybranou položku} few {# vybrané položky} other {# vybraných položek}}\",\"dragStartedKeyboard\":\"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dragStartedTouch\":\"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.\",\"dragStartedVirtual\":\"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.\",\"dropCanceled\":\"Přetažení bylo zrušeno.\",\"dropComplete\":\"Přetažení bylo dokončeno.\",\"dropDescriptionKeyboard\":\"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.\",\"dropDescriptionTouch\":\"Poklepáním přetažení dokončete.\",\"dropDescriptionVirtual\":\"Kliknutím objekt přetáhněte.\",\"dropIndicator\":\"indikátor přetažení\",\"dropOnItem\":\"Přetáhnout na {itemText}\",\"dropOnRoot\":\"Přetáhnout na\",\"endDragKeyboard\":\"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.\",\"endDragTouch\":\"Probíhá přetahování. Poklepáním přetažení zrušíte.\",\"endDragVirtual\":\"Probíhá přetahování. Kliknutím přetažení zrušíte.\",\"insertAfter\":\"Vložit za {itemText}\",\"insertBefore\":\"Vložit před {itemText}\",\"insertBetween\":\"Vložit mezi {beforeItemText} a {afterItemText}\"}");
|
|
846
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/da-DK.json
|
|
847
|
-
var $b0325b2aec14df95ab943ec14d3bec3b$exports = {};
|
|
848
|
-
$b0325b2aec14df95ab943ec14d3bec3b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryk på Enter for at starte med at trække.\",\"dragDescriptionTouch\":\"Dobbelttryk for at starte med at trække.\",\"dragDescriptionVirtual\":\"Klik for at starte med at trække.\",\"dragItem\":\"Træk {itemText}\",\"dragSelectedItems\":\"Træk {count, plural, one {# valgt element} other {# valgte elementer}}\",\"dragStartedKeyboard\":\"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.\",\"dragStartedTouch\":\"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.\",\"dragStartedVirtual\":\"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.\",\"dropCanceled\":\"Slip annulleret.\",\"dropComplete\":\"Slip fuldført.\",\"dropDescriptionKeyboard\":\"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.\",\"dropDescriptionTouch\":\"Dobbelttryk for at slippe.\",\"dropDescriptionVirtual\":\"Klik for at slippe.\",\"dropIndicator\":\"slip-indikator\",\"dropOnItem\":\"Slip på {itemText}\",\"dropOnRoot\":\"Slip på\",\"endDragKeyboard\":\"Trækning. Tryk på enter for at annullere træk.\",\"endDragTouch\":\"Trækning. Dobbelttryk for at annullere træk.\",\"endDragVirtual\":\"Trækning. Klik for at annullere trækning.\",\"insertAfter\":\"Indsæt efter {itemText}\",\"insertBefore\":\"Indsæt før {itemText}\",\"insertBetween\":\"Indsæt mellem {beforeItemText} og {afterItemText}\"}");
|
|
849
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/de-DE.json
|
|
850
|
-
var $f367814043f59b69a839ff097fd4adb8$exports = {};
|
|
851
|
-
$f367814043f59b69a839ff097fd4adb8$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.\",\"dragDescriptionTouch\":\"Tippen Sie doppelt, um den Ziehvorgang zu starten.\",\"dragDescriptionVirtual\":\"Zum Starten des Ziehvorgangs klicken.\",\"dragItem\":\"{itemText} ziehen\",\"dragSelectedItems\":\"{count, plural, one {# ausgewähltes Objekt} other {# ausgewählte Objekte}} ziehen\",\"dragStartedKeyboard\":\"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.\",\"dragStartedTouch\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.\",\"dragStartedVirtual\":\"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.\",\"dropCanceled\":\"Ablegen abgebrochen.\",\"dropComplete\":\"Ablegen abgeschlossen.\",\"dropDescriptionKeyboard\":\"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.\",\"dropDescriptionTouch\":\"Tippen Sie doppelt, um das Objekt abzulegen.\",\"dropDescriptionVirtual\":\"Zum Ablegen klicken.\",\"dropIndicator\":\"Ablegeanzeiger\",\"dropOnItem\":\"Auf {itemText} ablegen\",\"dropOnRoot\":\"Ablegen auf\",\"endDragKeyboard\":\"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.\",\"endDragTouch\":\"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.\",\"endDragVirtual\":\"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.\",\"insertAfter\":\"Nach {itemText} einfügen\",\"insertBefore\":\"Vor {itemText} einfügen\",\"insertBetween\":\"Zwischen {beforeItemText} und {afterItemText} einfügen\"}");
|
|
852
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/el-GR.json
|
|
853
|
-
var $fe8897a7011951cab52f7814c2c9684$exports = {};
|
|
854
|
-
$fe8897a7011951cab52f7814c2c9684$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Πατήστε Enter για έναρξη της μεταφοράς.\",\"dragDescriptionTouch\":\"Πατήστε δύο φορές για έναρξη της μεταφοράς.\",\"dragDescriptionVirtual\":\"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.\",\"dragItem\":\"Μεταφορά {itemText}\",\"dragSelectedItems\":\"Μεταφορά σε {count, plural, one {# επιλεγμένο στοιχείο} other {# επιλεγμένα στοιχεία}}\",\"dragStartedKeyboard\":\"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.\",\"dragStartedTouch\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.\",\"dragStartedVirtual\":\"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.\",\"dropCanceled\":\"Η απόθεση ακυρώθηκε.\",\"dropComplete\":\"Η απόθεση ολοκληρώθηκε.\",\"dropDescriptionKeyboard\":\"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.\",\"dropDescriptionTouch\":\"Πατήστε δύο φορές για απόθεση.\",\"dropDescriptionVirtual\":\"Κάντε κλικ για απόθεση.\",\"dropIndicator\":\"δείκτης απόθεσης\",\"dropOnItem\":\"Απόθεση σε {itemText}\",\"dropOnRoot\":\"Απόθεση σε\",\"endDragKeyboard\":\"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.\",\"endDragTouch\":\"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.\",\"endDragVirtual\":\"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.\",\"insertAfter\":\"Εισαγωγή μετά από {itemText}\",\"insertBefore\":\"Εισαγωγή πριν από {itemText}\",\"insertBetween\":\"Εισαγωγή μεταξύ {beforeItemText} και {afterItemText}\"}");
|
|
855
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/en-US.json
|
|
856
|
-
var $aea68b9c3ace3526527e1fc930d35d$exports = {};
|
|
857
|
-
$aea68b9c3ace3526527e1fc930d35d$exports = JSON.parse("{\"dragItem\":\"Drag {itemText}\",\"dragSelectedItems\":\"Drag {count, plural, one {# selected item} other {# selected items}}\",\"dragDescriptionKeyboard\":\"Press Enter to start dragging.\",\"dragDescriptionTouch\":\"Double tap to start dragging.\",\"dragDescriptionVirtual\":\"Click to start dragging.\",\"dragStartedKeyboard\":\"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.\",\"dragStartedTouch\":\"Started dragging. Navigate to a drop target, then double tap to drop.\",\"dragStartedVirtual\":\"Started dragging. Navigate to a drop target, then click or press Enter to drop.\",\"endDragKeyboard\":\"Dragging. Press Enter to cancel drag.\",\"endDragTouch\":\"Dragging. Double tap to cancel drag.\",\"endDragVirtual\":\"Dragging. Click to cancel drag.\",\"dropDescriptionKeyboard\":\"Press Enter to drop. Press Escape to cancel drag.\",\"dropDescriptionTouch\":\"Double tap to drop.\",\"dropDescriptionVirtual\":\"Click to drop.\",\"dropCanceled\":\"Drop canceled.\",\"dropComplete\":\"Drop complete.\",\"dropIndicator\":\"drop indicator\",\"dropOnRoot\":\"Drop on\",\"dropOnItem\":\"Drop on {itemText}\",\"insertBefore\":\"Insert before {itemText}\",\"insertBetween\":\"Insert between {beforeItemText} and {afterItemText}\",\"insertAfter\":\"Insert after {itemText}\"}");
|
|
858
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/es-ES.json
|
|
859
|
-
var $a4319d93c8291b23c0d42dea$exports = {};
|
|
860
|
-
$a4319d93c8291b23c0d42dea$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pulse Intro para empezar a arrastrar.\",\"dragDescriptionTouch\":\"Pulse dos veces para iniciar el arrastre.\",\"dragDescriptionVirtual\":\"Haga clic para iniciar el arrastre.\",\"dragItem\":\"Arrastrar {itemText}\",\"dragSelectedItems\":\"Arrastrar {count, plural, one {# elemento seleccionado} other {# elementos seleccionados}}\",\"dragStartedKeyboard\":\"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino de colocación y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.\",\"dragStartedTouch\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, pulse dos veces para soltar.\",\"dragStartedVirtual\":\"Se ha empezado a arrastrar. Vaya al destino de colocación y, a continuación, haga clic o pulse Intro para soltar.\",\"dropCanceled\":\"Se ha cancelado la colocación.\",\"dropComplete\":\"Colocación finalizada.\",\"dropDescriptionKeyboard\":\"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.\",\"dropDescriptionTouch\":\"Pulse dos veces para soltar.\",\"dropDescriptionVirtual\":\"Haga clic para soltar.\",\"dropIndicator\":\"indicador de colocación\",\"dropOnItem\":\"Soltar en {itemText}\",\"dropOnRoot\":\"Soltar en\",\"endDragKeyboard\":\"Arrastrando. Pulse Intro para cancelar el arrastre.\",\"endDragTouch\":\"Arrastrando. Pulse dos veces para cancelar el arrastre.\",\"endDragVirtual\":\"Arrastrando. Haga clic para cancelar el arrastre.\",\"insertAfter\":\"Insertar después de {itemText}\",\"insertBefore\":\"Insertar antes de {itemText}\",\"insertBetween\":\"Insertar entre {beforeItemText} y {afterItemText}\"}");
|
|
861
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/et-EE.json
|
|
862
|
-
var $aa30228da98b6306a72b40036f345b$exports = {};
|
|
863
|
-
$aa30228da98b6306a72b40036f345b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Lohistamise alustamiseks vajutage klahvi Enter.\",\"dragDescriptionTouch\":\"Topeltpuudutage lohistamise alustamiseks.\",\"dragDescriptionVirtual\":\"Klõpsake lohistamise alustamiseks.\",\"dragItem\":\"Lohista {itemText}\",\"dragSelectedItems\":\"Lohista {count, plural, one {# valitud üksust} other {# valitud üksust}}\",\"dragStartedKeyboard\":\"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.\",\"dragStartedTouch\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.\",\"dragStartedVirtual\":\"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.\",\"dropCanceled\":\"Lohistamisest loobuti.\",\"dropComplete\":\"Lohistamine on tehtud.\",\"dropDescriptionKeyboard\":\"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.\",\"dropDescriptionTouch\":\"Kukutamiseks topeltpuudutage.\",\"dropDescriptionVirtual\":\"Kukutamiseks klõpsake.\",\"dropIndicator\":\"lohistamise indikaator\",\"dropOnItem\":\"Kukuta asukohta {itemText}\",\"dropOnRoot\":\"Kukuta asukohta\",\"endDragKeyboard\":\"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.\",\"endDragTouch\":\"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.\",\"endDragVirtual\":\"Lohistamine. Lohistamisest loobumiseks klõpsake.\",\"insertAfter\":\"Sisesta {itemText} järele\",\"insertBefore\":\"Sisesta {itemText} ette\",\"insertBetween\":\"Sisesta {beforeItemText} ja {afterItemText} vahele\"}");
|
|
864
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/fi-FI.json
|
|
865
|
-
var $a5a5afea8782a33461a527d7c4a$exports = {};
|
|
866
|
-
$a5a5afea8782a33461a527d7c4a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Aloita vetäminen painamalla Enter-näppäintä.\",\"dragDescriptionTouch\":\"Aloita vetäminen kaksoisnapauttamalla.\",\"dragDescriptionVirtual\":\"Aloita vetäminen napsauttamalla.\",\"dragItem\":\"Vedä kohdetta {itemText}\",\"dragSelectedItems\":\"Vedä {count, plural, one {# valittua kohdetta} other {# valittua kohdetta}}\",\"dragStartedKeyboard\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.\",\"dragStartedTouch\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.\",\"dragStartedVirtual\":\"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.\",\"dropCanceled\":\"Pudotus peruutettu.\",\"dropComplete\":\"Pudotus suoritettu.\",\"dropDescriptionKeyboard\":\"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.\",\"dropDescriptionTouch\":\"Pudota kaksoisnapauttamalla.\",\"dropDescriptionVirtual\":\"Pudota napsauttamalla.\",\"dropIndicator\":\"pudotuksen ilmaisin\",\"dropOnItem\":\"Pudota kohteeseen {itemText}\",\"dropOnRoot\":\"Pudota kohteeseen\",\"endDragKeyboard\":\"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.\",\"endDragTouch\":\"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.\",\"endDragVirtual\":\"Vedetään. Peruuta vetäminen napsauttamalla.\",\"insertAfter\":\"Lisää kohteen {itemText} jälkeen\",\"insertBefore\":\"Lisää ennen kohdetta {itemText}\",\"insertBetween\":\"Lisää kohteiden {beforeItemText} ja {afterItemText} väliin\"}");
|
|
867
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/fr-FR.json
|
|
868
|
-
var $b32fceb28c2b8e8e846140594714351f$exports = {};
|
|
869
|
-
$b32fceb28c2b8e8e846140594714351f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Appuyez sur Entrée pour commencer le déplacement.\",\"dragDescriptionTouch\":\"Touchez deux fois pour commencer le déplacement.\",\"dragDescriptionVirtual\":\"Cliquez pour commencer le déplacement.\",\"dragItem\":\"Déplacer {itemText}\",\"dragSelectedItems\":\"Déplacer {count, plural, one {# élément sélectionné} other {# éléments sélectionnés}}\",\"dragStartedKeyboard\":\"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.\",\"dragStartedTouch\":\"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.\",\"dragStartedVirtual\":\"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.\",\"dropCanceled\":\"Dépôt annulé.\",\"dropComplete\":\"Dépôt terminé.\",\"dropDescriptionKeyboard\":\"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.\",\"dropDescriptionTouch\":\"Touchez deux fois pour déposer.\",\"dropDescriptionVirtual\":\"Cliquez pour déposer.\",\"dropIndicator\":\"indicateur de dépôt\",\"dropOnItem\":\"Déposer sur {itemText}\",\"dropOnRoot\":\"Déposer sur\",\"endDragKeyboard\":\"Déplacement. Appuyez sur Entrée pour annuler le déplacement.\",\"endDragTouch\":\"Déplacement. Touchez deux fois pour annuler le déplacement.\",\"endDragVirtual\":\"Déplacement. Cliquez pour annuler le déplacement.\",\"insertAfter\":\"Insérer après {itemText}\",\"insertBefore\":\"Insérer avant {itemText}\",\"insertBetween\":\"Insérer entre {beforeItemText} et {afterItemText}\"}");
|
|
870
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/he-IL.json
|
|
871
|
-
var $d9bdb7d78ee35d20ae60007d2accaf5$exports = {};
|
|
872
|
-
$d9bdb7d78ee35d20ae60007d2accaf5$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"הקש על Enter כדי להתחיל לגרור.\",\"dragDescriptionTouch\":\"הקש פעמיים כדי להתחיל בגרירה.\",\"dragDescriptionVirtual\":\"לחץ כדי להתחיל לגרור.\",\"dragItem\":\"גרור את {itemText}\",\"dragSelectedItems\":\"גרור {count, plural, one {פריט נבחר #} other {# פריטים שנבחרו}}\",\"dragStartedKeyboard\":\"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.\",\"dragStartedTouch\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.\",\"dragStartedVirtual\":\"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.\",\"dropCanceled\":\"השחרור בוטל.\",\"dropComplete\":\"השחרור הושלם.\",\"dropDescriptionKeyboard\":\"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.\",\"dropDescriptionTouch\":\"הקש פעמיים כדי לשחרר.\",\"dropDescriptionVirtual\":\"לחץ כדי לשחרר.\",\"dropIndicator\":\"מחוון שחרור\",\"dropOnItem\":\"שחרר על {itemText}\",\"dropOnRoot\":\"שחרר על\",\"endDragKeyboard\":\"גורר. הקש על Enter כדי לבטל את הגרירה.\",\"endDragTouch\":\"גורר. הקש פעמיים כדי לבטל את הגרירה.\",\"endDragVirtual\":\"גורר. לחץ כדי לבטל את הגרירה.\",\"insertAfter\":\"הוסף אחרי {itemText}\",\"insertBefore\":\"הוסף לפני {itemText}\",\"insertBetween\":\"הוסף בין {beforeItemText} לבין {afterItemText}\"}");
|
|
873
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/hr-HR.json
|
|
874
|
-
var $c14894ae7d558e9dc3011ecae5f8a96b$exports = {};
|
|
875
|
-
$c14894ae7d558e9dc3011ecae5f8a96b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste počeli povlačiti.\",\"dragDescriptionTouch\":\"Dvaput dodirnite da biste počeli povlačiti.\",\"dragDescriptionVirtual\":\"Kliknite da biste počeli povlačiti.\",\"dragItem\":\"Povucite stavku {itemText}\",\"dragSelectedItems\":\"Povucite {count, plural, one {# odabranu stavku} other {ovoliko odabranih stavki: #}}\",\"dragStartedKeyboard\":\"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.\",\"dragStartedTouch\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.\",\"dragStartedVirtual\":\"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.\",\"dropCanceled\":\"Povlačenje je prekinuto.\",\"dropComplete\":\"Ispuštanje je dovršeno.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite da biste ispustili stavku.\",\"dropDescriptionVirtual\":\"Kliknite da biste ispustili stavku.\",\"dropIndicator\":\"pokazatelj ispuštanja\",\"dropOnItem\":\"Ispustite na stavku {itemText}\",\"dropOnRoot\":\"Ispustite na\",\"endDragKeyboard\":\"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.\",\"endDragTouch\":\"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.\",\"endDragVirtual\":\"Povlačenje. Kliknite da biste prekinuli povlačenje.\",\"insertAfter\":\"Umetnite iza stavke {itemText}\",\"insertBefore\":\"Ispustite ispred stavke {itemText}\",\"insertBetween\":\"Umetnite između stavki {beforeItemText} i {afterItemText}\"}");
|
|
876
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/hu-HU.json
|
|
877
|
-
var $f194e25a9c86722f6a3826e7ad96c717$exports = {};
|
|
878
|
-
$f194e25a9c86722f6a3826e7ad96c717$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nyomja le az Enter billentyűt a húzás megkezdéséhez.\",\"dragDescriptionTouch\":\"Koppintson duplán a húzás megkezdéséhez.\",\"dragDescriptionVirtual\":\"Kattintson a húzás megkezdéséhez.\",\"dragItem\":\"{itemText} húzása\",\"dragSelectedItems\":\"{count, plural, one {# kijelölt elem} other {# kijelölt elem}} húzása\",\"dragStartedKeyboard\":\"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.\",\"dragStartedTouch\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.\",\"dragStartedVirtual\":\"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.\",\"dropCanceled\":\"Elengedés megszakítva.\",\"dropComplete\":\"Elengedés teljesítve.\",\"dropDescriptionKeyboard\":\"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.\",\"dropDescriptionTouch\":\"Koppintson duplán az elengedéshez.\",\"dropDescriptionVirtual\":\"Kattintson az elengedéshez.\",\"dropIndicator\":\"elengedésjelző\",\"dropOnItem\":\"Elengedés erre: {itemText}\",\"dropOnRoot\":\"Elengedés erre:\",\"endDragKeyboard\":\"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.\",\"endDragTouch\":\"Húzás folyamatban. Koppintson duplán a húzás megszakításához.\",\"endDragVirtual\":\"Húzás folyamatban. Kattintson a húzás megszakításához.\",\"insertAfter\":\"Beszúrás {itemText} után\",\"insertBefore\":\"Beszúrás {itemText} elé\",\"insertBetween\":\"Beszúrás {beforeItemText} és {afterItemText} közé\"}");
|
|
879
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/it-IT.json
|
|
880
|
-
var $cae04c9878c1e24b1bce5348e54e95a4$exports = {};
|
|
881
|
-
$cae04c9878c1e24b1bce5348e54e95a4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Premi Invio per iniziare a trascinare.\",\"dragDescriptionTouch\":\"Tocca due volte per iniziare a trascinare.\",\"dragDescriptionVirtual\":\"Fai clic per iniziare a trascinare.\",\"dragItem\":\"Trascina {itemText}\",\"dragSelectedItems\":\"Trascina {count, plural, one {# altro elemento selezionato} other {# altri elementi selezionati}}\",\"dragStartedKeyboard\":\"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.\",\"dragStartedTouch\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.\",\"dragStartedVirtual\":\"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.\",\"dropCanceled\":\"Rilascio annullato.\",\"dropComplete\":\"Rilascio completato.\",\"dropDescriptionKeyboard\":\"Premi Invio per rilasciare. Premi Esc per annullare.\",\"dropDescriptionTouch\":\"Tocca due volte per rilasciare.\",\"dropDescriptionVirtual\":\"Fai clic per rilasciare.\",\"dropIndicator\":\"indicatore di rilascio\",\"dropOnItem\":\"Rilascia su {itemText}\",\"dropOnRoot\":\"Rilascia su\",\"endDragKeyboard\":\"Trascinamento. Premi Invio per annullare.\",\"endDragTouch\":\"Trascinamento. Tocca due volte per annullare.\",\"endDragVirtual\":\"Trascinamento. Fai clic per annullare.\",\"insertAfter\":\"Inserisci dopo {itemText}\",\"insertBefore\":\"Inserisci prima di {itemText}\",\"insertBetween\":\"Inserisci tra {beforeItemText} e {afterItemText}\"}");
|
|
882
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ja-JP.json
|
|
883
|
-
var $b9679eb29e949e5727cbdcf506da08c1$exports = {};
|
|
884
|
-
$b9679eb29e949e5727cbdcf506da08c1$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Enter キーを押してドラッグを開始してください。\",\"dragDescriptionTouch\":\"ダブルタップしてドラッグを開始します。\",\"dragDescriptionVirtual\":\"クリックしてドラッグを開始します。\",\"dragItem\":\"{itemText} をドラッグ\",\"dragSelectedItems\":\"{count, plural, one {# 個の選択項目} other {# 個の選択項目}} をドラッグ\",\"dragStartedKeyboard\":\"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。\",\"dragStartedTouch\":\"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。\",\"dragStartedVirtual\":\"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。\",\"dropCanceled\":\"ドロップがキャンセルされました。\",\"dropComplete\":\"ドロップが完了しました。\",\"dropDescriptionKeyboard\":\"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。\",\"dropDescriptionTouch\":\"ダブルタップしてドロップします。\",\"dropDescriptionVirtual\":\"クリックしてドロップします。\",\"dropIndicator\":\"ドロップインジケーター\",\"dropOnItem\":\"{itemText} にドロップ\",\"dropOnRoot\":\"ドロップ場所\",\"endDragKeyboard\":\"ドラッグしています。Enter キーを押してドラッグをキャンセルします。\",\"endDragTouch\":\"ドラッグしています。ダブルタップしてドラッグをキャンセルします。\",\"endDragVirtual\":\"ドラッグしています。クリックしてドラッグをキャンセルします。\",\"insertAfter\":\"{itemText} の後に挿入\",\"insertBefore\":\"{itemText} の前に挿入\",\"insertBetween\":\"{beforeItemText} と {afterItemText} の間に挿入\"}");
|
|
885
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ko-KR.json
|
|
886
|
-
var $c663d68cc7455025fffd92332e200be$exports = {};
|
|
887
|
-
$c663d68cc7455025fffd92332e200be$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"드래그를 시작하려면 Enter를 누르세요.\",\"dragDescriptionTouch\":\"드래그를 시작하려면 더블 탭하세요.\",\"dragDescriptionVirtual\":\"드래그를 시작하려면 클릭하세요.\",\"dragItem\":\"{itemText} 드래그\",\"dragSelectedItems\":\"{count, plural, one {#개 선택 항목} other {#개 선택 항목}} 드래그\",\"dragStartedKeyboard\":\"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.\",\"dragStartedTouch\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.\",\"dragStartedVirtual\":\"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.\",\"dropCanceled\":\"드롭이 취소되었습니다.\",\"dropComplete\":\"드롭이 완료되었습니다.\",\"dropDescriptionKeyboard\":\"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.\",\"dropDescriptionTouch\":\"더블 탭하여 드롭하세요.\",\"dropDescriptionVirtual\":\"드롭하려면 클릭하세요.\",\"dropIndicator\":\"드롭 표시기\",\"dropOnItem\":\"{itemText}에 드롭\",\"dropOnRoot\":\"드롭 대상\",\"endDragKeyboard\":\"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.\",\"endDragTouch\":\"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.\",\"endDragVirtual\":\"드래그 중입니다. 드래그를 취소하려면 클릭하세요.\",\"insertAfter\":\"{itemText} 이후에 삽입\",\"insertBefore\":\"{itemText} 이전에 삽입\",\"insertBetween\":\"{beforeItemText} 및 {afterItemText} 사이에 삽입\"}");
|
|
888
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/lt-LT.json
|
|
889
|
-
var $d454665d97cf724871a9c3eb05$exports = {};
|
|
890
|
-
$d454665d97cf724871a9c3eb05$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Paspauskite „Enter“, kad pradėtumėte vilkti.\",\"dragDescriptionTouch\":\"Palieskite dukart, kad pradėtumėte vilkti.\",\"dragDescriptionVirtual\":\"Spustelėkite, kad pradėtumėte vilkti.\",\"dragItem\":\"Vilkti {itemText}\",\"dragSelectedItems\":\"Vilkti {count, plural, one {# pasirinktą elementą} other {# pasirinktus elementus}}\",\"dragStartedKeyboard\":\"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.\",\"dragStartedTouch\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.\",\"dragStartedVirtual\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.\",\"dropCanceled\":\"Numetimas atšauktas.\",\"dropComplete\":\"Numesta.\",\"dropDescriptionKeyboard\":\"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.\",\"dropDescriptionTouch\":\"Palieskite dukart, kad numestumėte.\",\"dropDescriptionVirtual\":\"Spustelėkite, kad numestumėte.\",\"dropIndicator\":\"numetimo indikatorius\",\"dropOnItem\":\"Numesti ant {itemText}\",\"dropOnRoot\":\"Numesti ant\",\"endDragKeyboard\":\"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.\",\"endDragTouch\":\"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.\",\"endDragVirtual\":\"Velkama. Spustelėkite, kad atšauktumėte vilkimą.\",\"insertAfter\":\"Įterpti po {itemText}\",\"insertBefore\":\"Įterpti prieš {itemText}\",\"insertBetween\":\"Įterpti tarp {beforeItemText} ir {afterItemText}\"}");
|
|
891
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/lv-LV.json
|
|
892
|
-
var $ca66a3bcdd44dae4665871a98bb416e3$exports = {};
|
|
893
|
-
$ca66a3bcdd44dae4665871a98bb416e3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nospiediet Enter, lai sāktu vilkšanu.\",\"dragDescriptionTouch\":\"Veiciet dubultskārienu, lai sāktu vilkšanu.\",\"dragDescriptionVirtual\":\"Noklikšķiniet, lai sāktu vilkšanu.\",\"dragItem\":\"Velciet {itemText}\",\"dragSelectedItems\":\"Velciet {count, plural, one {# atlasīto vienumu} other {# atlasītos vienumus}}\",\"dragStartedKeyboard\":\"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.\",\"dragStartedTouch\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.\",\"dragStartedVirtual\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.\",\"dropCanceled\":\"Nomešana atcelta.\",\"dropComplete\":\"Nomešana pabeigta.\",\"dropDescriptionKeyboard\":\"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.\",\"dropDescriptionTouch\":\"Veiciet dubultskārienu, lai nomestu.\",\"dropDescriptionVirtual\":\"Noklikšķiniet, lai nomestu.\",\"dropIndicator\":\"nomešanas indikators\",\"dropOnItem\":\"Nometiet uz {itemText}\",\"dropOnRoot\":\"Nometiet uz\",\"endDragKeyboard\":\"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.\",\"endDragTouch\":\"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.\",\"endDragVirtual\":\"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.\",\"insertAfter\":\"Ievietojiet pēc {itemText}\",\"insertBefore\":\"Ievietojiet pirms {itemText}\",\"insertBetween\":\"Ievietojiet starp {beforeItemText} un {afterItemText}\"}");
|
|
894
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/nb-NO.json
|
|
895
|
-
var $cb7e072c8b2f7c15a7e06a7ac99163$exports = {};
|
|
896
|
-
$cb7e072c8b2f7c15a7e06a7ac99163$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Trykk på Enter for å begynne å dra.\",\"dragDescriptionTouch\":\"Dobbelttrykk for å begynne å dra.\",\"dragDescriptionVirtual\":\"Klikk for å begynne å dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# merket element} other {# merkede elementer}}\",\"dragStartedKeyboard\":\"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.\",\"dragStartedTouch\":\"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.\",\"dragStartedVirtual\":\"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.\",\"dropCanceled\":\"Avbrøt slipping.\",\"dropComplete\":\"Slippingen er fullført.\",\"dropDescriptionKeyboard\":\"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.\",\"dropDescriptionTouch\":\"Dobbelttrykk for å slippe.\",\"dropDescriptionVirtual\":\"Klikk for å slippe.\",\"dropIndicator\":\"slippeindikator\",\"dropOnItem\":\"Slipp på {itemText}\",\"dropOnRoot\":\"Slipp på\",\"endDragKeyboard\":\"Drar. Trykk på Enter hvis du vil avbryte.\",\"endDragTouch\":\"Drar. Dobbelttrykk hvis du vil avbryte.\",\"endDragVirtual\":\"Drar. Klikk hvis du vil avbryte.\",\"insertAfter\":\"Sett inn etter {itemText}\",\"insertBefore\":\"Sett inn før {itemText}\",\"insertBetween\":\"Sett inn mellom {beforeItemText} og {afterItemText}\"}");
|
|
897
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/nl-NL.json
|
|
898
|
-
var $f9d8bf1245c4a4f581c7966119af7c$exports = {};
|
|
899
|
-
$f9d8bf1245c4a4f581c7966119af7c$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Druk op Enter om te slepen.\",\"dragDescriptionTouch\":\"Dubbeltik om te slepen.\",\"dragDescriptionVirtual\":\"Klik om met slepen te starten.\",\"dragItem\":\"{itemText} slepen\",\"dragSelectedItems\":\"{count, plural, one {# geselecteerd item} other {# geselecteerde items}} slepen\",\"dragStartedKeyboard\":\"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.\",\"dragStartedTouch\":\"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.\",\"dragStartedVirtual\":\"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.\",\"dropCanceled\":\"Neerzetten geannuleerd.\",\"dropComplete\":\"Neerzetten voltooid.\",\"dropDescriptionKeyboard\":\"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.\",\"dropDescriptionTouch\":\"Dubbeltik om neer te zetten.\",\"dropDescriptionVirtual\":\"Klik om neer te zetten.\",\"dropIndicator\":\"aanwijzer voor neerzetten\",\"dropOnItem\":\"Neerzetten op {itemText}\",\"dropOnRoot\":\"Neerzetten op\",\"endDragKeyboard\":\"Bezig met slepen. Druk op Enter om te annuleren.\",\"endDragTouch\":\"Bezig met slepen. Dubbeltik om te annuleren.\",\"endDragVirtual\":\"Bezig met slepen. Klik om te annuleren.\",\"insertAfter\":\"Plaatsen na {itemText}\",\"insertBefore\":\"Plaatsen vóór {itemText}\",\"insertBetween\":\"Plaatsen tussen {beforeItemText} en {afterItemText}\"}");
|
|
900
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pl-PL.json
|
|
901
|
-
var $cd07a56ec0cb160ba15542c10691829d$exports = {};
|
|
902
|
-
$cd07a56ec0cb160ba15542c10691829d$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Naciśnij Enter, aby rozpocząć przeciąganie.\",\"dragDescriptionTouch\":\"Dotknij dwukrotnie, aby rozpocząć przeciąganie.\",\"dragDescriptionVirtual\":\"Kliknij, aby rozpocząć przeciąganie.\",\"dragItem\":\"Przeciągnij {itemText}\",\"dragSelectedItems\":\"Przeciągnij {count, plural, one {# wybrany element} other {# wybranych elementów}}\",\"dragStartedKeyboard\":\"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.\",\"dragStartedTouch\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F\",\"dragStartedVirtual\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.\",\"dropCanceled\":\"Anulowano upuszczenie.\",\"dropComplete\":\"Zakończono upuszczanie.\",\"dropDescriptionKeyboard\":\"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.\",\"dropDescriptionTouch\":\"Dotknij dwukrotnie, aby upuścić.\",\"dropDescriptionVirtual\":\"Kliknij, aby upuścić.\",\"dropIndicator\":\"wskaźnik upuszczenia\",\"dropOnItem\":\"Upuść na {itemText}\",\"dropOnRoot\":\"Upuść\",\"endDragKeyboard\":\"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.\",\"endDragTouch\":\"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.\",\"endDragVirtual\":\"Przeciąganie. Kliknij, aby anulować przeciąganie.\",\"insertAfter\":\"Umieść za {itemText}\",\"insertBefore\":\"Umieść przed {itemText}\",\"insertBetween\":\"Umieść między {beforeItemText} i {afterItemText}\"}");
|
|
903
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pt-BR.json
|
|
904
|
-
var $a70fe1fa67e039d2646076dfb78cee1$exports = {};
|
|
905
|
-
$a70fe1fa67e039d2646076dfb78cee1$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pressione Enter para começar a arrastar.\",\"dragDescriptionTouch\":\"Toque duas vezes para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para começar a arrastar.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} other {# itens selecionados}}\",\"dragStartedKeyboard\":\"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.\",\"dragStartedTouch\":\"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.\",\"dragStartedVirtual\":\"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.\",\"dropCanceled\":\"Liberação cancelada.\",\"dropComplete\":\"Liberação concluída.\",\"dropDescriptionKeyboard\":\"Pressione Enter para soltar. Pressione Escape para cancelar.\",\"dropDescriptionTouch\":\"Toque duas vezes para soltar.\",\"dropDescriptionVirtual\":\"Clique para soltar.\",\"dropIndicator\":\"indicador de liberação\",\"dropOnItem\":\"Soltar em {itemText}\",\"dropOnRoot\":\"Soltar\",\"endDragKeyboard\":\"Arrastando. Pressione Enter para cancelar.\",\"endDragTouch\":\"Arrastando. Toque duas vezes para cancelar.\",\"endDragVirtual\":\"Arrastando. Clique para cancelar.\",\"insertAfter\":\"Inserir após {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
|
|
906
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/pt-PT.json
|
|
907
|
-
var $e37cb9bf759f35580e0f57d85e98be4b$exports = {};
|
|
908
|
-
$e37cb9bf759f35580e0f57d85e98be4b$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Prima Enter para iniciar o arrasto.\",\"dragDescriptionTouch\":\"Faça duplo toque para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para iniciar o arrasto.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} outro {# itens selecionados}}\",\"dragStartedKeyboard\":\"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.\",\"dragStartedTouch\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.\",\"dragStartedVirtual\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.\",\"dropCanceled\":\"Largar cancelado.\",\"dropComplete\":\"Largar completo.\",\"dropDescriptionKeyboard\":\"Prima Enter para largar. Prima Escape para cancelar o arrasto.\",\"dropDescriptionTouch\":\"Faça duplo toque para largar.\",\"dropDescriptionVirtual\":\"Clique para largar.\",\"dropIndicator\":\"Indicador de largar\",\"dropOnItem\":\"Largar em {itemText}\",\"dropOnRoot\":\"Largar em\",\"endDragKeyboard\":\"A arrastar. Prima Enter para cancelar o arrasto.\",\"endDragTouch\":\"A arrastar. Faça duplo toque para cancelar o arrasto.\",\"endDragVirtual\":\"A arrastar. Clique para cancelar o arrasto.\",\"insertAfter\":\"Inserir depois de {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
|
|
909
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ro-RO.json
|
|
910
|
-
var $f4cf63884707eedcbdf4eae0b61ef1bf$exports = {};
|
|
911
|
-
$f4cf63884707eedcbdf4eae0b61ef1bf$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Apăsați pe Enter pentru a începe glisarea.\",\"dragDescriptionTouch\":\"Atingeți de două ori pentru a începe să glisați.\",\"dragDescriptionVirtual\":\"Faceți clic pentru a începe glisarea.\",\"dragItem\":\"Glisați {itemText}\",\"dragSelectedItems\":\"Glisați {count, plural, one {# element selectat} other {# elemente selectate}}\",\"dragStartedKeyboard\":\"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.\",\"dragStartedTouch\":\"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.\",\"dragStartedVirtual\":\"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.\",\"dropCanceled\":\"Fixare anulată.\",\"dropComplete\":\"Fixare finalizată.\",\"dropDescriptionKeyboard\":\"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.\",\"dropDescriptionTouch\":\"Atingeți de două ori pentru a fixa.\",\"dropDescriptionVirtual\":\"Faceți clic pentru a fixa.\",\"dropIndicator\":\"indicator de fixare\",\"dropOnItem\":\"Fixați pe {itemText}\",\"dropOnRoot\":\"Fixare pe\",\"endDragKeyboard\":\"Se glisează. Apăsați pe Enter pentru a anula glisarea.\",\"endDragTouch\":\"Se glisează. Atingeți de două ori pentru a anula glisarea.\",\"endDragVirtual\":\"Se glisează. Faceți clic pentru a anula glisarea.\",\"insertAfter\":\"Inserați după {itemText}\",\"insertBefore\":\"Inserați înainte de {itemText}\",\"insertBetween\":\"Inserați între {beforeItemText} și {afterItemText}\"}");
|
|
912
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/ru-RU.json
|
|
913
|
-
var $e2321eb9f531b07389bd6bfcdd631256$exports = {};
|
|
914
|
-
$e2321eb9f531b07389bd6bfcdd631256$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Нажмите клавишу Enter для начала перетаскивания.\",\"dragDescriptionTouch\":\"Дважды нажмите для начала перетаскивания.\",\"dragDescriptionVirtual\":\"Щелкните для начала перетаскивания.\",\"dragItem\":\"Перетащить {itemText}\",\"dragSelectedItems\":\"Перетащить {count, plural, one {# выбранный элемент} other {# выбранных элем}}\",\"dragStartedKeyboard\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.\",\"dragStartedTouch\":\"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.\",\"dragStartedVirtual\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.\",\"dropCanceled\":\"Перетаскивание отменено.\",\"dropComplete\":\"Перетаскивание завершено.\",\"dropDescriptionKeyboard\":\"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.\",\"dropDescriptionTouch\":\"Дважды нажмите, чтобы применить перетаскивание.\",\"dropDescriptionVirtual\":\"Щелкните, чтобы применить перетаскивание.\",\"dropIndicator\":\"индикатор перетаскивания\",\"dropOnItem\":\"Перетащить на {itemText}\",\"dropOnRoot\":\"Перетащить на\",\"endDragKeyboard\":\"Перетаскивание. Нажмите клавишу Enter для отмены.\",\"endDragTouch\":\"Перетаскивание. Дважды нажмите для отмены.\",\"endDragVirtual\":\"Перетаскивание. Щелкните для отмены.\",\"insertAfter\":\"Вставить после {itemText}\",\"insertBefore\":\"Вставить перед {itemText}\",\"insertBetween\":\"Вставить между {beforeItemText} и {afterItemText}\"}");
|
|
915
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sk-SK.json
|
|
916
|
-
var $ef19e5833adeee78e3c34d0f68fa9f31$exports = {};
|
|
917
|
-
$ef19e5833adeee78e3c34d0f68fa9f31$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stlačením klávesu Enter začnete presúvanie.\",\"dragDescriptionTouch\":\"Dvojitým kliknutím začnete presúvanie.\",\"dragDescriptionVirtual\":\"Kliknutím začnete presúvanie.\",\"dragItem\":\"Presunúť položku {itemText}\",\"dragSelectedItems\":\"Presunúť {count, plural, one {# vybratú položku} other {# vybraté položky}}\",\"dragStartedKeyboard\":\"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.\",\"dragStartedTouch\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.\",\"dragStartedVirtual\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.\",\"dropCanceled\":\"Umiestnenie zrušené.\",\"dropComplete\":\"Umiestnenie dokončené.\",\"dropDescriptionKeyboard\":\"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.\",\"dropDescriptionTouch\":\"Dvojitým kliknutím umiestnite položku.\",\"dropDescriptionVirtual\":\"Kliknutím umiestnite položku.\",\"dropIndicator\":\"indikátor umiestnenia\",\"dropOnItem\":\"Umiestniť na položku {itemText}\",\"dropOnRoot\":\"Umiestniť na\",\"endDragKeyboard\":\"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.\",\"endDragTouch\":\"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.\",\"endDragVirtual\":\"Prebieha presúvanie.\",\"insertAfter\":\"Vložiť za položku {itemText}\",\"insertBefore\":\"Vložiť pred položku {itemText}\",\"insertBetween\":\"Vložiť medzi položky {beforeItemText} a {afterItemText}\"}");
|
|
918
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sl-SI.json
|
|
919
|
-
var $b895c4fbc849f3dcfcdb2d8899ed32b4$exports = {};
|
|
920
|
-
$b895c4fbc849f3dcfcdb2d8899ed32b4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite tipko Enter za začetek vlečenja.\",\"dragDescriptionTouch\":\"Dvotapnite za začetek vlečenja.\",\"dragDescriptionVirtual\":\"Kliknite za začetek vlečenja.\",\"dragItem\":\"Povleci {itemText}\",\"dragSelectedItems\":\"Povlecite {count, plural, one {# izbran element} other {izbrane elemente (#)}}\",\"dragStartedKeyboard\":\"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.\",\"dragStartedTouch\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.\",\"dragStartedVirtual\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.\",\"dropCanceled\":\"Spust je preklican.\",\"dropComplete\":\"Spust je končan.\",\"dropDescriptionKeyboard\":\"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.\",\"dropDescriptionTouch\":\"Dvotapnite, da spustite.\",\"dropDescriptionVirtual\":\"Kliknite, da spustite.\",\"dropIndicator\":\"indikator spusta\",\"dropOnItem\":\"Spusti na mesto {itemText}\",\"dropOnRoot\":\"Spusti na mesto\",\"endDragKeyboard\":\"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.\",\"endDragTouch\":\"Vlečenje. Dvotapnite za preklic vlečenja.\",\"endDragVirtual\":\"Vlečenje. Kliknite, da prekličete vlečenje.\",\"insertAfter\":\"Vstavi za {itemText}\",\"insertBefore\":\"Vstavi pred {itemText}\",\"insertBetween\":\"Vstavi med {beforeItemText} in {afterItemText}\"}");
|
|
921
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sr-SP.json
|
|
922
|
-
var $b75ddb34dcfa290a634852a820c90c5$exports = {};
|
|
923
|
-
$b75ddb34dcfa290a634852a820c90c5$exports = JSON.parse("{\"dragItem\":\"Prevucite {itemText}\",\"dragSelectedItems\":\"Prevucite {count, plural, one {# izabranu stavku} other {# izabrane stavke}}\",\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste započeli prevlačenje..\",\"dragDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dragDescriptionVirtual\":\"Kliknite da biste započeli prevlačenje.\",\"dragStartedKeyboard\":\"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.\",\"dragStartedTouch\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.\",\"dragStartedVirtual\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.\",\"endDragKeyboard\":\"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.\",\"endDragTouch\":\"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.\",\"endDragVirtual\":\"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dropDescriptionVirtual\":\"Kliknite za otpuštanje.\",\"dropCanceled\":\"Otpuštanje je otkazano.\",\"dropComplete\":\"Prevlačenje je završeno.\",\"dropIndicator\":\"Indikator otpuštanja\",\"dropOnRoot\":\"Otpusti na\",\"dropOnItem\":\"Otpusti na {itemText}\",\"insertBefore\":\"Umetnite ispred {itemText}\",\"insertBetween\":\"Umetnite između {beforeItemText} i {afterItemText}\",\"insertAfter\":\"Umetnite posle {itemText}\"}");
|
|
924
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/sv-SE.json
|
|
925
|
-
var $f010cb5a3a37b4733a80a1d1f871$exports = {};
|
|
926
|
-
$f010cb5a3a37b4733a80a1d1f871$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryck på enter för att börja dra.\",\"dragDescriptionTouch\":\"Dubbeltryck för att börja dra.\",\"dragDescriptionVirtual\":\"Klicka för att börja dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# valt objekt} other {# valda objekt}}\",\"dragStartedKeyboard\":\"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.\",\"dragStartedTouch\":\"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.\",\"dragStartedVirtual\":\"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.\",\"dropCanceled\":\"Släppåtgärd avbröts.\",\"dropComplete\":\"Släppåtgärd klar.\",\"dropDescriptionKeyboard\":\"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.\",\"dropDescriptionTouch\":\"Dubbeltryck för att släppa.\",\"dropDescriptionVirtual\":\"Klicka för att släppa.\",\"dropIndicator\":\"släppindikator\",\"dropOnItem\":\"Släpp på {itemText}\",\"dropOnRoot\":\"Släpp på\",\"endDragKeyboard\":\"Drar. Tryck på enter för att avbryta dragåtgärd.\",\"endDragTouch\":\"Drar. Dubbeltryck för att avbryta dragåtgärd.\",\"endDragVirtual\":\"Drar. Klicka för att avbryta dragåtgärd.\",\"insertAfter\":\"Infoga efter {itemText}\",\"insertBefore\":\"Infoga före {itemText}\",\"insertBetween\":\"Infoga mellan {beforeItemText} och {afterItemText}\"}");
|
|
927
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/tr-TR.json
|
|
928
|
-
var $a8e9337c82319ec72dd3b41245c71e1e$exports = {};
|
|
929
|
-
$a8e9337c82319ec72dd3b41245c71e1e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Sürüklemeyi başlatmak için Enter'a basın.\",\"dragDescriptionTouch\":\"Sürüklemeyi başlatmak için çift tıklayın.\",\"dragDescriptionVirtual\":\"Sürüklemeyi başlatmak için tıklayın.\",\"dragItem\":\"{itemText}’i sürükle\",\"dragSelectedItems\":\"Sürükle {count, plural, one {# seçili öge} other {# seçili öge}}\",\"dragStartedKeyboard\":\"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.\",\"dragStartedTouch\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.\",\"dragStartedVirtual\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.\",\"dropCanceled\":\"Bırakma iptal edildi.\",\"dropComplete\":\"Bırakma tamamlandı.\",\"dropDescriptionKeyboard\":\"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.\",\"dropDescriptionTouch\":\"Bırakmak için çift tıklayın.\",\"dropDescriptionVirtual\":\"Bırakmak için tıklayın.\",\"dropIndicator\":\"bırakma göstergesi\",\"dropOnItem\":\"{itemText} üzerine bırak\",\"dropOnRoot\":\"Bırakın\",\"endDragKeyboard\":\"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.\",\"endDragTouch\":\"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.\",\"endDragVirtual\":\"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.\",\"insertAfter\":\"{itemText}’den sonra gir\",\"insertBefore\":\"{itemText}’den önce gir\",\"insertBetween\":\"{beforeItemText} ve {afterItemText} arasına gir\"}");
|
|
930
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/uk-UA.json
|
|
931
|
-
var $e74f5b955cc9ed1ca9994fc3460$exports = {};
|
|
932
|
-
$e74f5b955cc9ed1ca9994fc3460$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натисніть Enter, щоб почати перетягування.\",\"dragDescriptionTouch\":\"Натисніть двічі, щоб почати перетягування.\",\"dragDescriptionVirtual\":\"Натисніть, щоб почати перетягування.\",\"dragItem\":\"Перетягнути {itemText}\",\"dragSelectedItems\":\"Перетягніть {count, plural, one {# вибраний елемент} other {# вибраних елем}}\",\"dragStartedKeyboard\":\"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.\",\"dragStartedTouch\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.\",\"dragStartedVirtual\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.\",\"dropCanceled\":\"Перетягування скасовано.\",\"dropComplete\":\"Перетягування завершено.\",\"dropDescriptionKeyboard\":\"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.\",\"dropDescriptionTouch\":\"Натисніть двічі, щоб перетягнути.\",\"dropDescriptionVirtual\":\"Натисніть, щоб перетягнути.\",\"dropIndicator\":\"індикатор перетягування\",\"dropOnItem\":\"Перетягнути на {itemText}\",\"dropOnRoot\":\"Перетягнути на\",\"endDragKeyboard\":\"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.\",\"endDragTouch\":\"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.\",\"endDragVirtual\":\"Триває перетягування. Натисніть, щоб скасувати перетягування.\",\"insertAfter\":\"Вставити після {itemText}\",\"insertBefore\":\"Вставити перед {itemText}\",\"insertBetween\":\"Вставити між {beforeItemText} і {afterItemText}\"}");
|
|
933
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/zh-CN.json
|
|
934
|
-
var $b007023265925d07a3d47c3d12f09c5$exports = {};
|
|
935
|
-
$b007023265925d07a3d47c3d12f09c5$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 开始拖动。\",\"dragDescriptionTouch\":\"双击开始拖动。\",\"dragDescriptionVirtual\":\"单击开始拖动。\",\"dragItem\":\"拖动 {itemText}\",\"dragSelectedItems\":\"拖动 {count, plural, one {# 选中项目} other {# 选中项目}}\",\"dragStartedKeyboard\":\"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。\",\"dragStartedTouch\":\"已开始拖动。导航到放置目标,然后双击放置。\",\"dragStartedVirtual\":\"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 放置。按 Escape 取消拖动。\",\"dropDescriptionTouch\":\"双击放置。\",\"dropDescriptionVirtual\":\"单击放置。\",\"dropIndicator\":\"放置标记\",\"dropOnItem\":\"放置于 {itemText}\",\"dropOnRoot\":\"放置于\",\"endDragKeyboard\":\"正在拖动。按 Enter 取消拖动。\",\"endDragTouch\":\"正在拖动。双击取消拖动。\",\"endDragVirtual\":\"正在拖动。单击取消拖动。\",\"insertAfter\":\"插入到 {itemText} 之后\",\"insertBefore\":\"插入到 {itemText} 之前\",\"insertBetween\":\"插入到 {beforeItemText} 和 {afterItemText} 之间\"}");
|
|
936
|
-
// ASSET: /Users/govett/dev/react-spectrum-v3/packages/@react-aria/dnd/intl/zh-TW.json
|
|
937
|
-
var $f4995277bc73b497cd1257981bc3$exports = {};
|
|
938
|
-
$f4995277bc73b497cd1257981bc3$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 鍵以開始拖曳。\",\"dragDescriptionTouch\":\"輕點兩下以開始拖曳。\",\"dragDescriptionVirtual\":\"按一下滑鼠以開始拖曳。\",\"dragItem\":\"拖曳「{itemText}」\",\"dragSelectedItems\":\"拖曳 {count, plural, one {# 個選定項目} other {# 個選定項目}}\",\"dragStartedKeyboard\":\"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。\",\"dragStartedTouch\":\"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。\",\"dragStartedVirtual\":\"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。\",\"dropDescriptionTouch\":\"輕點兩下以放置。\",\"dropDescriptionVirtual\":\"按一下滑鼠以放置。\",\"dropIndicator\":\"放置指示器\",\"dropOnItem\":\"放置在「{itemText}」上\",\"dropOnRoot\":\"放置在\",\"endDragKeyboard\":\"拖曳中。按 Enter 鍵以取消拖曳。\",\"endDragTouch\":\"拖曳中。輕點兩下以取消拖曳。\",\"endDragVirtual\":\"拖曳中。按一下滑鼠以取消拖曳。\",\"insertAfter\":\"插入至「{itemText}」之後\",\"insertBefore\":\"插入至「{itemText}」之前\",\"insertBetween\":\"插入至「{beforeItemText}」和「{afterItemText}」之間\"}");
|
|
939
|
-
// @ts-ignore
|
|
940
|
-
const $f99d7f1872611f5fbbb2d18deb9a89$var$intlMessages = {
|
|
941
|
-
"ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
|
|
942
|
-
"bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
|
|
943
|
-
"cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
|
|
944
|
-
"da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
|
|
945
|
-
"de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
|
|
946
|
-
"el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
|
|
947
|
-
"en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
|
|
948
|
-
"es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
|
|
949
|
-
"et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
|
|
950
|
-
"fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
|
|
951
|
-
"fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
|
|
952
|
-
"he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
|
|
953
|
-
"hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
|
|
954
|
-
"hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
|
|
955
|
-
"it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
|
|
956
|
-
"ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
|
|
957
|
-
"ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
|
|
958
|
-
"lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
|
|
959
|
-
"lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
|
|
960
|
-
"nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
|
|
961
|
-
"nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
|
|
962
|
-
"pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
|
|
963
|
-
"pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
|
|
964
|
-
"pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
|
|
965
|
-
"ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
|
|
966
|
-
"ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
|
|
967
|
-
"sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
|
|
968
|
-
"sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
|
|
969
|
-
"sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
|
|
970
|
-
"sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
|
|
971
|
-
"tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
|
|
972
|
-
"uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
|
|
973
|
-
"zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
|
|
974
|
-
"zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
|
|
975
|
-
};
|
|
976
|
-
const $f99d7f1872611f5fbbb2d18deb9a89$var$MESSAGES = {
|
|
977
|
-
keyboard: {
|
|
978
|
-
start: 'dragDescriptionKeyboard',
|
|
979
|
-
end: 'endDragKeyboard'
|
|
980
|
-
},
|
|
981
|
-
touch: {
|
|
982
|
-
start: 'dragDescriptionTouch',
|
|
983
|
-
end: 'endDragTouch'
|
|
984
|
-
},
|
|
985
|
-
virtual: {
|
|
986
|
-
start: 'dragDescriptionVirtual',
|
|
987
|
-
end: 'endDragVirtual'
|
|
988
|
-
}
|
|
989
|
-
};
|
|
990
|
-
export function useDrag(options) {
|
|
991
|
-
let formatMessage = useMessageFormatter($f99d7f1872611f5fbbb2d18deb9a89$var$intlMessages);
|
|
992
|
-
let state = useRef({
|
|
993
|
-
options,
|
|
994
|
-
x: 0,
|
|
995
|
-
y: 0
|
|
996
|
-
}).current;
|
|
997
|
-
state.options = options;
|
|
998
|
-
let [isDragging, setDragging] = useState(false);
|
|
999
|
-
|
|
1000
|
-
let onDragStart = e => {
|
|
1001
|
-
let items = options.getItems();
|
|
1002
|
-
$daf765036c8e081b3420fc4f613ad96$export$writeToDataTransfer(e.dataTransfer, items);
|
|
1003
|
-
|
|
1004
|
-
if (typeof options.getAllowedDropOperations === 'function') {
|
|
1005
|
-
let allowedOperations = options.getAllowedDropOperations();
|
|
1006
|
-
let allowed = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.none;
|
|
1007
|
-
|
|
1008
|
-
for (let operation of allowedOperations) {
|
|
1009
|
-
allowed |= $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION[operation] || $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.none;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
e.dataTransfer.effectAllowed = $cd2dc9b4103e6936caca05e2d05$export$EFFECT_ALLOWED[allowed] || 'none';
|
|
1013
|
-
} // If there is a renderPreview function, use it to render a custom preview image that will
|
|
1014
|
-
// appear under the pointer while dragging. If not, the element itself is dragged by the browser.
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
if (typeof options.renderPreview === 'function') {
|
|
1018
|
-
let preview = options.renderPreview(items);
|
|
1019
|
-
|
|
1020
|
-
if (preview) {
|
|
1021
|
-
// Create an off-screen div to render the preview into.
|
|
1022
|
-
let node = document.createElement('div');
|
|
1023
|
-
node.style.zIndex = '-100';
|
|
1024
|
-
node.style.position = 'absolute';
|
|
1025
|
-
node.style.top = '0';
|
|
1026
|
-
node.style.left = '-100000px';
|
|
1027
|
-
document.body.appendChild(node); // Call renderPreview to get a JSX element, and render it into the div with React DOM.
|
|
1028
|
-
|
|
1029
|
-
_reactDom.render(preview, node); // Compute the offset that the preview will appear under the mouse.
|
|
1030
|
-
// If possible, this is based on the point the user clicked on the target.
|
|
1031
|
-
// If the preview is much smaller, then just use the center point of the preview.
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
let size = node.getBoundingClientRect();
|
|
1035
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1036
|
-
let x = e.clientX - rect.x;
|
|
1037
|
-
let y = e.clientY - rect.y;
|
|
1038
|
-
|
|
1039
|
-
if (x > size.width || y > size.height) {
|
|
1040
|
-
x = size.width / 2;
|
|
1041
|
-
y = size.height / 2;
|
|
1042
|
-
}
|
|
1043
691
|
|
|
1044
|
-
|
|
692
|
+
var $5fb5837f94e1c150$exports = {};
|
|
693
|
+
$5fb5837f94e1c150$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Paspauskite „Enter“, kad pradėtumėte vilkti.\",\"dragDescriptionTouch\":\"Palieskite dukart, kad pradėtumėte vilkti.\",\"dragDescriptionVirtual\":\"Spustelėkite, kad pradėtumėte vilkti.\",\"dragItem\":\"Vilkti {itemText}\",\"dragSelectedItems\":\"Vilkti {count, plural, one {# pasirinktą elementą} other {# pasirinktus elementus}}\",\"dragStartedKeyboard\":\"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.\",\"dragStartedTouch\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.\",\"dragStartedVirtual\":\"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.\",\"dropCanceled\":\"Numetimas atšauktas.\",\"dropComplete\":\"Numesta.\",\"dropDescriptionKeyboard\":\"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.\",\"dropDescriptionTouch\":\"Palieskite dukart, kad numestumėte.\",\"dropDescriptionVirtual\":\"Spustelėkite, kad numestumėte.\",\"dropIndicator\":\"numetimo indikatorius\",\"dropOnItem\":\"Numesti ant {itemText}\",\"dropOnRoot\":\"Numesti ant\",\"endDragKeyboard\":\"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.\",\"endDragTouch\":\"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.\",\"endDragVirtual\":\"Velkama. Spustelėkite, kad atšauktumėte vilkimą.\",\"insertAfter\":\"Įterpti po {itemText}\",\"insertBefore\":\"Įterpti prieš {itemText}\",\"insertBetween\":\"Įterpti tarp {beforeItemText} ir {afterItemText}\"}");
|
|
1045
694
|
|
|
1046
|
-
requestAnimationFrame(() => {
|
|
1047
|
-
document.body.removeChild(node);
|
|
1048
|
-
});
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
695
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
type: 'dragstart',
|
|
1055
|
-
x: e.clientX,
|
|
1056
|
-
y: e.clientY
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
696
|
+
var $5b2e5709864cc922$exports = {};
|
|
697
|
+
$5b2e5709864cc922$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Nospiediet Enter, lai sāktu vilkšanu.\",\"dragDescriptionTouch\":\"Veiciet dubultskārienu, lai sāktu vilkšanu.\",\"dragDescriptionVirtual\":\"Noklikšķiniet, lai sāktu vilkšanu.\",\"dragItem\":\"Velciet {itemText}\",\"dragSelectedItems\":\"Velciet {count, plural, one {# atlasīto vienumu} other {# atlasītos vienumus}}\",\"dragStartedKeyboard\":\"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.\",\"dragStartedTouch\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.\",\"dragStartedVirtual\":\"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.\",\"dropCanceled\":\"Nomešana atcelta.\",\"dropComplete\":\"Nomešana pabeigta.\",\"dropDescriptionKeyboard\":\"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.\",\"dropDescriptionTouch\":\"Veiciet dubultskārienu, lai nomestu.\",\"dropDescriptionVirtual\":\"Noklikšķiniet, lai nomestu.\",\"dropIndicator\":\"nomešanas indikators\",\"dropOnItem\":\"Nometiet uz {itemText}\",\"dropOnRoot\":\"Nometiet uz\",\"endDragKeyboard\":\"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.\",\"endDragTouch\":\"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.\",\"endDragVirtual\":\"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.\",\"insertAfter\":\"Ievietojiet pēc {itemText}\",\"insertBefore\":\"Ievietojiet pirms {itemText}\",\"insertBetween\":\"Ievietojiet starp {beforeItemText} un {afterItemText}\"}");
|
|
1059
698
|
|
|
1060
|
-
state.x = e.clientX;
|
|
1061
|
-
state.y = e.clientY; // Wait a frame before we set dragging to true so that the browser has time to
|
|
1062
|
-
// render the preview image before we update the element that has been dragged.
|
|
1063
699
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
});
|
|
1067
|
-
};
|
|
700
|
+
var $ee15bb8efb18cc69$exports = {};
|
|
701
|
+
$ee15bb8efb18cc69$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Trykk på Enter for å begynne å dra.\",\"dragDescriptionTouch\":\"Dobbelttrykk for å begynne å dra.\",\"dragDescriptionVirtual\":\"Klikk for å begynne å dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# merket element} other {# merkede elementer}}\",\"dragStartedKeyboard\":\"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.\",\"dragStartedTouch\":\"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.\",\"dragStartedVirtual\":\"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.\",\"dropCanceled\":\"Avbrøt slipping.\",\"dropComplete\":\"Slippingen er fullført.\",\"dropDescriptionKeyboard\":\"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.\",\"dropDescriptionTouch\":\"Dobbelttrykk for å slippe.\",\"dropDescriptionVirtual\":\"Klikk for å slippe.\",\"dropIndicator\":\"slippeindikator\",\"dropOnItem\":\"Slipp på {itemText}\",\"dropOnRoot\":\"Slipp på\",\"endDragKeyboard\":\"Drar. Trykk på Enter hvis du vil avbryte.\",\"endDragTouch\":\"Drar. Dobbelttrykk hvis du vil avbryte.\",\"endDragVirtual\":\"Drar. Klikk hvis du vil avbryte.\",\"insertAfter\":\"Sett inn etter {itemText}\",\"insertBefore\":\"Sett inn før {itemText}\",\"insertBetween\":\"Sett inn mellom {beforeItemText} og {afterItemText}\"}");
|
|
1068
702
|
|
|
1069
|
-
let onDrag = e => {
|
|
1070
|
-
if (e.clientX === state.x && e.clientY === state.y) {
|
|
1071
|
-
return;
|
|
1072
|
-
}
|
|
1073
703
|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
type: 'dragmove',
|
|
1077
|
-
x: e.clientX,
|
|
1078
|
-
y: e.clientY
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
704
|
+
var $1daf2d4602e26ac4$exports = {};
|
|
705
|
+
$1daf2d4602e26ac4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Druk op Enter om te slepen.\",\"dragDescriptionTouch\":\"Dubbeltik om te slepen.\",\"dragDescriptionVirtual\":\"Klik om met slepen te starten.\",\"dragItem\":\"{itemText} slepen\",\"dragSelectedItems\":\"{count, plural, one {# geselecteerd item} other {# geselecteerde items}} slepen\",\"dragStartedKeyboard\":\"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.\",\"dragStartedTouch\":\"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.\",\"dragStartedVirtual\":\"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.\",\"dropCanceled\":\"Neerzetten geannuleerd.\",\"dropComplete\":\"Neerzetten voltooid.\",\"dropDescriptionKeyboard\":\"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.\",\"dropDescriptionTouch\":\"Dubbeltik om neer te zetten.\",\"dropDescriptionVirtual\":\"Klik om neer te zetten.\",\"dropIndicator\":\"aanwijzer voor neerzetten\",\"dropOnItem\":\"Neerzetten op {itemText}\",\"dropOnRoot\":\"Neerzetten op\",\"endDragKeyboard\":\"Bezig met slepen. Druk op Enter om te annuleren.\",\"endDragTouch\":\"Bezig met slepen. Dubbeltik om te annuleren.\",\"endDragVirtual\":\"Bezig met slepen. Klik om te annuleren.\",\"insertAfter\":\"Plaatsen na {itemText}\",\"insertBefore\":\"Plaatsen vóór {itemText}\",\"insertBetween\":\"Plaatsen tussen {beforeItemText} en {afterItemText}\"}");
|
|
1081
706
|
|
|
1082
|
-
state.x = e.clientX;
|
|
1083
|
-
state.y = e.clientY;
|
|
1084
|
-
};
|
|
1085
|
-
|
|
1086
|
-
let onDragEnd = e => {
|
|
1087
|
-
if (typeof options.onDragEnd === 'function') {
|
|
1088
|
-
options.onDragEnd({
|
|
1089
|
-
type: 'dragend',
|
|
1090
|
-
x: e.clientX,
|
|
1091
|
-
y: e.clientY,
|
|
1092
|
-
dropOperation: $cd2dc9b4103e6936caca05e2d05$export$DROP_EFFECT_TO_DROP_OPERATION[e.dataTransfer.dropEffect]
|
|
1093
|
-
});
|
|
1094
|
-
}
|
|
1095
707
|
|
|
1096
|
-
|
|
1097
|
-
|
|
708
|
+
var $7115429b0f60511f$exports = {};
|
|
709
|
+
$7115429b0f60511f$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Naciśnij Enter, aby rozpocząć przeciąganie.\",\"dragDescriptionTouch\":\"Dotknij dwukrotnie, aby rozpocząć przeciąganie.\",\"dragDescriptionVirtual\":\"Kliknij, aby rozpocząć przeciąganie.\",\"dragItem\":\"Przeciągnij {itemText}\",\"dragSelectedItems\":\"Przeciągnij {count, plural, one {# wybrany element} other {# wybranych elementów}}\",\"dragStartedKeyboard\":\"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.\",\"dragStartedTouch\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F\",\"dragStartedVirtual\":\"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.\",\"dropCanceled\":\"Anulowano upuszczenie.\",\"dropComplete\":\"Zakończono upuszczanie.\",\"dropDescriptionKeyboard\":\"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.\",\"dropDescriptionTouch\":\"Dotknij dwukrotnie, aby upuścić.\",\"dropDescriptionVirtual\":\"Kliknij, aby upuścić.\",\"dropIndicator\":\"wskaźnik upuszczenia\",\"dropOnItem\":\"Upuść na {itemText}\",\"dropOnRoot\":\"Upuść\",\"endDragKeyboard\":\"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.\",\"endDragTouch\":\"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.\",\"endDragVirtual\":\"Przeciąganie. Kliknij, aby anulować przeciąganie.\",\"insertAfter\":\"Umieść za {itemText}\",\"insertBefore\":\"Umieść przed {itemText}\",\"insertBetween\":\"Umieść między {beforeItemText} i {afterItemText}\"}");
|
|
1098
710
|
|
|
1099
|
-
let onPress = e => {
|
|
1100
|
-
if (e.pointerType !== 'keyboard' && e.pointerType !== 'virtual') {
|
|
1101
|
-
return;
|
|
1102
|
-
}
|
|
1103
711
|
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
state.options.onDragStart({
|
|
1107
|
-
type: 'dragstart',
|
|
1108
|
-
x: rect.x + rect.width / 2,
|
|
1109
|
-
y: rect.y + rect.height / 2
|
|
1110
|
-
});
|
|
1111
|
-
}
|
|
712
|
+
var $5edd453ae5d4a8bc$exports = {};
|
|
713
|
+
$5edd453ae5d4a8bc$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pressione Enter para começar a arrastar.\",\"dragDescriptionTouch\":\"Toque duas vezes para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para começar a arrastar.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} other {# itens selecionados}}\",\"dragStartedKeyboard\":\"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.\",\"dragStartedTouch\":\"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.\",\"dragStartedVirtual\":\"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.\",\"dropCanceled\":\"Liberação cancelada.\",\"dropComplete\":\"Liberação concluída.\",\"dropDescriptionKeyboard\":\"Pressione Enter para soltar. Pressione Escape para cancelar.\",\"dropDescriptionTouch\":\"Toque duas vezes para soltar.\",\"dropDescriptionVirtual\":\"Clique para soltar.\",\"dropIndicator\":\"indicador de liberação\",\"dropOnItem\":\"Soltar em {itemText}\",\"dropOnRoot\":\"Soltar\",\"endDragKeyboard\":\"Arrastando. Pressione Enter para cancelar.\",\"endDragTouch\":\"Arrastando. Toque duas vezes para cancelar.\",\"endDragVirtual\":\"Arrastando. Clique para cancelar.\",\"insertAfter\":\"Inserir após {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
|
|
1112
714
|
|
|
1113
|
-
$f2f44a26f7541d104d10e68c115a897a$export$beginDragging({
|
|
1114
|
-
element: e.target,
|
|
1115
|
-
items: state.options.getItems(),
|
|
1116
|
-
allowedDropOperations: typeof state.options.getAllowedDropOperations === 'function' ? state.options.getAllowedDropOperations() : ['move', 'copy', 'link'],
|
|
1117
715
|
|
|
1118
|
-
|
|
1119
|
-
|
|
716
|
+
var $5f431994f708535e$exports = {};
|
|
717
|
+
$5f431994f708535e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Prima Enter para iniciar o arrasto.\",\"dragDescriptionTouch\":\"Faça duplo toque para começar a arrastar.\",\"dragDescriptionVirtual\":\"Clique para iniciar o arrasto.\",\"dragItem\":\"Arrastar {itemText}\",\"dragSelectedItems\":\"Arrastar {count, plural, one {# item selecionado} outro {# itens selecionados}}\",\"dragStartedKeyboard\":\"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.\",\"dragStartedTouch\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.\",\"dragStartedVirtual\":\"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.\",\"dropCanceled\":\"Largar cancelado.\",\"dropComplete\":\"Largar completo.\",\"dropDescriptionKeyboard\":\"Prima Enter para largar. Prima Escape para cancelar o arrasto.\",\"dropDescriptionTouch\":\"Faça duplo toque para largar.\",\"dropDescriptionVirtual\":\"Clique para largar.\",\"dropIndicator\":\"Indicador de largar\",\"dropOnItem\":\"Largar em {itemText}\",\"dropOnRoot\":\"Largar em\",\"endDragKeyboard\":\"A arrastar. Prima Enter para cancelar o arrasto.\",\"endDragTouch\":\"A arrastar. Faça duplo toque para cancelar o arrasto.\",\"endDragVirtual\":\"A arrastar. Clique para cancelar o arrasto.\",\"insertAfter\":\"Inserir depois de {itemText}\",\"insertBefore\":\"Inserir antes de {itemText}\",\"insertBetween\":\"Inserir entre {beforeItemText} e {afterItemText}\"}");
|
|
1120
718
|
|
|
1121
|
-
if (typeof state.options.onDragEnd === 'function') {
|
|
1122
|
-
state.options.onDragEnd(e);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
}, formatMessage);
|
|
1127
|
-
setDragging(true);
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
|
-
let modality = $daf765036c8e081b3420fc4f613ad96$export$useDragModality();
|
|
1131
|
-
let descriptionProps = useDescription(formatMessage(!isDragging ? $f99d7f1872611f5fbbb2d18deb9a89$var$MESSAGES[modality].start : $f99d7f1872611f5fbbb2d18deb9a89$var$MESSAGES[modality].end));
|
|
1132
|
-
return {
|
|
1133
|
-
dragProps: {
|
|
1134
|
-
draggable: 'true',
|
|
1135
|
-
onDragStart,
|
|
1136
|
-
onDrag,
|
|
1137
|
-
onDragEnd
|
|
1138
|
-
},
|
|
1139
|
-
dragButtonProps: _babelRuntimeHelpersEsmExtends({}, descriptionProps, {
|
|
1140
|
-
onPress
|
|
1141
|
-
}),
|
|
1142
|
-
isDragging
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
// @ts-ignore
|
|
1146
|
-
const $c50618638a6eda91cf58d6698d439d4$var$intlMessages = {
|
|
1147
|
-
"ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
|
|
1148
|
-
"bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
|
|
1149
|
-
"cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
|
|
1150
|
-
"da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
|
|
1151
|
-
"de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
|
|
1152
|
-
"el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
|
|
1153
|
-
"en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
|
|
1154
|
-
"es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
|
|
1155
|
-
"et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
|
|
1156
|
-
"fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
|
|
1157
|
-
"fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
|
|
1158
|
-
"he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
|
|
1159
|
-
"hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
|
|
1160
|
-
"hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
|
|
1161
|
-
"it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
|
|
1162
|
-
"ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
|
|
1163
|
-
"ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
|
|
1164
|
-
"lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
|
|
1165
|
-
"lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
|
|
1166
|
-
"nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
|
|
1167
|
-
"nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
|
|
1168
|
-
"pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
|
|
1169
|
-
"pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
|
|
1170
|
-
"pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
|
|
1171
|
-
"ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
|
|
1172
|
-
"ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
|
|
1173
|
-
"sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
|
|
1174
|
-
"sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
|
|
1175
|
-
"sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
|
|
1176
|
-
"sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
|
|
1177
|
-
"tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
|
|
1178
|
-
"uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
|
|
1179
|
-
"zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
|
|
1180
|
-
"zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
|
|
1181
|
-
};
|
|
1182
|
-
const $c50618638a6eda91cf58d6698d439d4$var$MESSAGES = {
|
|
1183
|
-
keyboard: 'dropDescriptionKeyboard',
|
|
1184
|
-
touch: 'dropDescriptionTouch',
|
|
1185
|
-
virtual: 'dropDescriptionVirtual'
|
|
1186
|
-
};
|
|
1187
719
|
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
let modality = $daf765036c8e081b3420fc4f613ad96$export$useDragModality();
|
|
1191
|
-
let dragSession = $f2f44a26f7541d104d10e68c115a897a$export$useDragSession();
|
|
1192
|
-
let descriptionProps = useDescription(dragSession ? formatMessage($c50618638a6eda91cf58d6698d439d4$var$MESSAGES[modality]) : '');
|
|
1193
|
-
return {
|
|
1194
|
-
dropProps: _babelRuntimeHelpersEsmExtends({}, descriptionProps, {
|
|
1195
|
-
// Mobile Safari does not properly bubble click events on elements except links or inputs
|
|
1196
|
-
// unless there is an onclick handler bound directly to the element itself. By adding this
|
|
1197
|
-
// handler, React will take care of adding that for us, and we are able to handle document
|
|
1198
|
-
// level click events in the DragManager.
|
|
1199
|
-
// See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
|
|
1200
|
-
onClick: () => {}
|
|
1201
|
-
})
|
|
1202
|
-
};
|
|
1203
|
-
}
|
|
720
|
+
var $107b5e2e45e971f1$exports = {};
|
|
721
|
+
$107b5e2e45e971f1$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Apăsați pe Enter pentru a începe glisarea.\",\"dragDescriptionTouch\":\"Atingeți de două ori pentru a începe să glisați.\",\"dragDescriptionVirtual\":\"Faceți clic pentru a începe glisarea.\",\"dragItem\":\"Glisați {itemText}\",\"dragSelectedItems\":\"Glisați {count, plural, one {# element selectat} other {# elemente selectate}}\",\"dragStartedKeyboard\":\"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.\",\"dragStartedTouch\":\"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.\",\"dragStartedVirtual\":\"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.\",\"dropCanceled\":\"Fixare anulată.\",\"dropComplete\":\"Fixare finalizată.\",\"dropDescriptionKeyboard\":\"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.\",\"dropDescriptionTouch\":\"Atingeți de două ori pentru a fixa.\",\"dropDescriptionVirtual\":\"Faceți clic pentru a fixa.\",\"dropIndicator\":\"indicator de fixare\",\"dropOnItem\":\"Fixați pe {itemText}\",\"dropOnRoot\":\"Fixare pe\",\"endDragKeyboard\":\"Se glisează. Apăsați pe Enter pentru a anula glisarea.\",\"endDragTouch\":\"Se glisează. Atingeți de două ori pentru a anula glisarea.\",\"endDragVirtual\":\"Se glisează. Faceți clic pentru a anula glisarea.\",\"insertAfter\":\"Inserați după {itemText}\",\"insertBefore\":\"Inserați înainte de {itemText}\",\"insertBetween\":\"Inserați între {beforeItemText} și {afterItemText}\"}");
|
|
1204
722
|
|
|
1205
|
-
const $d8fbdabc9bf5e02249691efe73c6554$var$DROP_ACTIVATE_TIMEOUT = 800;
|
|
1206
|
-
export function useDrop(options) {
|
|
1207
|
-
let [isDropTarget, setDropTarget] = useState(false);
|
|
1208
|
-
let state = useRef({
|
|
1209
|
-
x: 0,
|
|
1210
|
-
y: 0,
|
|
1211
|
-
dragEnterCount: 0,
|
|
1212
|
-
dropEffect: 'none',
|
|
1213
|
-
dropActivateTimer: null
|
|
1214
|
-
}).current;
|
|
1215
|
-
|
|
1216
|
-
let onDragOver = e => {
|
|
1217
|
-
e.preventDefault();
|
|
1218
|
-
e.stopPropagation();
|
|
1219
|
-
|
|
1220
|
-
if (e.clientX === state.x && e.clientY === state.y) {
|
|
1221
|
-
e.dataTransfer.dropEffect = state.dropEffect;
|
|
1222
|
-
return;
|
|
1223
|
-
}
|
|
1224
723
|
|
|
1225
|
-
|
|
1226
|
-
|
|
724
|
+
var $d4b9c2f01c1892f7$exports = {};
|
|
725
|
+
$d4b9c2f01c1892f7$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Нажмите клавишу Enter для начала перетаскивания.\",\"dragDescriptionTouch\":\"Дважды нажмите для начала перетаскивания.\",\"dragDescriptionVirtual\":\"Щелкните для начала перетаскивания.\",\"dragItem\":\"Перетащить {itemText}\",\"dragSelectedItems\":\"Перетащить {count, plural, one {# выбранный элемент} other {# выбранных элем}}\",\"dragStartedKeyboard\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.\",\"dragStartedTouch\":\"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.\",\"dragStartedVirtual\":\"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.\",\"dropCanceled\":\"Перетаскивание отменено.\",\"dropComplete\":\"Перетаскивание завершено.\",\"dropDescriptionKeyboard\":\"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.\",\"dropDescriptionTouch\":\"Дважды нажмите, чтобы применить перетаскивание.\",\"dropDescriptionVirtual\":\"Щелкните, чтобы применить перетаскивание.\",\"dropIndicator\":\"индикатор перетаскивания\",\"dropOnItem\":\"Перетащить на {itemText}\",\"dropOnRoot\":\"Перетащить на\",\"endDragKeyboard\":\"Перетаскивание. Нажмите клавишу Enter для отмены.\",\"endDragTouch\":\"Перетаскивание. Дважды нажмите для отмены.\",\"endDragVirtual\":\"Перетаскивание. Щелкните для отмены.\",\"insertAfter\":\"Вставить после {itemText}\",\"insertBefore\":\"Вставить перед {itemText}\",\"insertBetween\":\"Вставить между {beforeItemText} и {afterItemText}\"}");
|
|
1227
726
|
|
|
1228
|
-
if (typeof options.getDropOperationForPoint === 'function') {
|
|
1229
|
-
let allowedOperations = $d8fbdabc9bf5e02249691efe73c6554$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
|
|
1230
|
-
let types = new $daf765036c8e081b3420fc4f613ad96$export$DragTypes(e.dataTransfer);
|
|
1231
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1232
|
-
let dropOperation = options.getDropOperationForPoint(types, allowedOperations, state.x - rect.x, state.y - rect.y);
|
|
1233
|
-
state.dropEffect = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_TO_DROP_EFFECT[dropOperation] || 'none';
|
|
1234
|
-
}
|
|
1235
727
|
|
|
1236
|
-
|
|
728
|
+
var $dbdc1942894e83e4$exports = {};
|
|
729
|
+
$dbdc1942894e83e4$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Stlačením klávesu Enter začnete presúvanie.\",\"dragDescriptionTouch\":\"Dvojitým kliknutím začnete presúvanie.\",\"dragDescriptionVirtual\":\"Kliknutím začnete presúvanie.\",\"dragItem\":\"Presunúť položku {itemText}\",\"dragSelectedItems\":\"Presunúť {count, plural, one {# vybratú položku} other {# vybraté položky}}\",\"dragStartedKeyboard\":\"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.\",\"dragStartedTouch\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.\",\"dragStartedVirtual\":\"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.\",\"dropCanceled\":\"Umiestnenie zrušené.\",\"dropComplete\":\"Umiestnenie dokončené.\",\"dropDescriptionKeyboard\":\"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.\",\"dropDescriptionTouch\":\"Dvojitým kliknutím umiestnite položku.\",\"dropDescriptionVirtual\":\"Kliknutím umiestnite položku.\",\"dropIndicator\":\"indikátor umiestnenia\",\"dropOnItem\":\"Umiestniť na položku {itemText}\",\"dropOnRoot\":\"Umiestniť na\",\"endDragKeyboard\":\"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.\",\"endDragTouch\":\"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.\",\"endDragVirtual\":\"Prebieha presúvanie.\",\"insertAfter\":\"Vložiť za položku {itemText}\",\"insertBefore\":\"Vložiť pred položku {itemText}\",\"insertBetween\":\"Vložiť medzi položky {beforeItemText} a {afterItemText}\"}");
|
|
1237
730
|
|
|
1238
|
-
if (typeof options.onDropMove === 'function') {
|
|
1239
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1240
|
-
options.onDropMove({
|
|
1241
|
-
type: 'dropmove',
|
|
1242
|
-
x: state.x - rect.x,
|
|
1243
|
-
y: state.y - rect.y
|
|
1244
|
-
});
|
|
1245
|
-
}
|
|
1246
731
|
|
|
1247
|
-
|
|
732
|
+
var $fbaaaaebd547d998$exports = {};
|
|
733
|
+
$fbaaaaebd547d998$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Pritisnite tipko Enter za začetek vlečenja.\",\"dragDescriptionTouch\":\"Dvotapnite za začetek vlečenja.\",\"dragDescriptionVirtual\":\"Kliknite za začetek vlečenja.\",\"dragItem\":\"Povleci {itemText}\",\"dragSelectedItems\":\"Povlecite {count, plural, one {# izbran element} other {izbrane elemente (#)}}\",\"dragStartedKeyboard\":\"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.\",\"dragStartedTouch\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.\",\"dragStartedVirtual\":\"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.\",\"dropCanceled\":\"Spust je preklican.\",\"dropComplete\":\"Spust je končan.\",\"dropDescriptionKeyboard\":\"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.\",\"dropDescriptionTouch\":\"Dvotapnite, da spustite.\",\"dropDescriptionVirtual\":\"Kliknite, da spustite.\",\"dropIndicator\":\"indikator spusta\",\"dropOnItem\":\"Spusti na mesto {itemText}\",\"dropOnRoot\":\"Spusti na mesto\",\"endDragKeyboard\":\"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.\",\"endDragTouch\":\"Vlečenje. Dvotapnite za preklic vlečenja.\",\"endDragVirtual\":\"Vlečenje. Kliknite, da prekličete vlečenje.\",\"insertAfter\":\"Vstavi za {itemText}\",\"insertBefore\":\"Vstavi pred {itemText}\",\"insertBetween\":\"Vstavi med {beforeItemText} in {afterItemText}\"}");
|
|
1248
734
|
|
|
1249
|
-
if (typeof options.onDropActivate === 'function' && state.dropEffect !== 'none') {
|
|
1250
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1251
|
-
state.dropActivateTimer = setTimeout(() => {
|
|
1252
|
-
options.onDropActivate({
|
|
1253
|
-
type: 'dropactivate',
|
|
1254
|
-
x: state.x - rect.x,
|
|
1255
|
-
y: state.y - rect.y
|
|
1256
|
-
});
|
|
1257
|
-
}, $d8fbdabc9bf5e02249691efe73c6554$var$DROP_ACTIVATE_TIMEOUT);
|
|
1258
|
-
}
|
|
1259
|
-
};
|
|
1260
735
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
state.dragEnterCount++;
|
|
736
|
+
var $a0caa33f1e264489$exports = {};
|
|
737
|
+
$a0caa33f1e264489$exports = JSON.parse("{\"dragItem\":\"Prevucite {itemText}\",\"dragSelectedItems\":\"Prevucite {count, plural, one {# izabranu stavku} other {# izabrane stavke}}\",\"dragDescriptionKeyboard\":\"Pritisnite Enter da biste započeli prevlačenje..\",\"dragDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dragDescriptionVirtual\":\"Kliknite da biste započeli prevlačenje.\",\"dragStartedKeyboard\":\"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.\",\"dragStartedTouch\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.\",\"dragStartedVirtual\":\"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.\",\"endDragKeyboard\":\"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.\",\"endDragTouch\":\"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.\",\"endDragVirtual\":\"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.\",\"dropDescriptionKeyboard\":\"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.\",\"dropDescriptionTouch\":\"Dvaput dodirnite za otpuštanje.\",\"dropDescriptionVirtual\":\"Kliknite za otpuštanje.\",\"dropCanceled\":\"Otpuštanje je otkazano.\",\"dropComplete\":\"Prevlačenje je završeno.\",\"dropIndicator\":\"Indikator otpuštanja\",\"dropOnRoot\":\"Otpusti na\",\"dropOnItem\":\"Otpusti na {itemText}\",\"insertBefore\":\"Umetnite ispred {itemText}\",\"insertBetween\":\"Umetnite između {beforeItemText} i {afterItemText}\",\"insertAfter\":\"Umetnite posle {itemText}\"}");
|
|
1264
738
|
|
|
1265
|
-
if (state.dragEnterCount > 1) {
|
|
1266
|
-
return;
|
|
1267
|
-
}
|
|
1268
739
|
|
|
1269
|
-
|
|
1270
|
-
|
|
740
|
+
var $d576b66176f5c0ff$exports = {};
|
|
741
|
+
$d576b66176f5c0ff$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Tryck på enter för att börja dra.\",\"dragDescriptionTouch\":\"Dubbeltryck för att börja dra.\",\"dragDescriptionVirtual\":\"Klicka för att börja dra.\",\"dragItem\":\"Dra {itemText}\",\"dragSelectedItems\":\"Dra {count, plural, one {# valt objekt} other {# valda objekt}}\",\"dragStartedKeyboard\":\"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.\",\"dragStartedTouch\":\"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.\",\"dragStartedVirtual\":\"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.\",\"dropCanceled\":\"Släppåtgärd avbröts.\",\"dropComplete\":\"Släppåtgärd klar.\",\"dropDescriptionKeyboard\":\"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.\",\"dropDescriptionTouch\":\"Dubbeltryck för att släppa.\",\"dropDescriptionVirtual\":\"Klicka för att släppa.\",\"dropIndicator\":\"släppindikator\",\"dropOnItem\":\"Släpp på {itemText}\",\"dropOnRoot\":\"Släpp på\",\"endDragKeyboard\":\"Drar. Tryck på enter för att avbryta dragåtgärd.\",\"endDragTouch\":\"Drar. Dubbeltryck för att avbryta dragåtgärd.\",\"endDragVirtual\":\"Drar. Klicka för att avbryta dragåtgärd.\",\"insertAfter\":\"Infoga efter {itemText}\",\"insertBefore\":\"Infoga före {itemText}\",\"insertBetween\":\"Infoga mellan {beforeItemText} och {afterItemText}\"}");
|
|
1271
742
|
|
|
1272
|
-
if (typeof options.getDropOperation === 'function') {
|
|
1273
|
-
let types = new $daf765036c8e081b3420fc4f613ad96$export$DragTypes(e.dataTransfer);
|
|
1274
|
-
dropOperation = options.getDropOperation(types, allowedOperations);
|
|
1275
|
-
}
|
|
1276
743
|
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
}
|
|
744
|
+
var $0681f168c13d8f2a$exports = {};
|
|
745
|
+
$0681f168c13d8f2a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Sürüklemeyi başlatmak için Enter'a basın.\",\"dragDescriptionTouch\":\"Sürüklemeyi başlatmak için çift tıklayın.\",\"dragDescriptionVirtual\":\"Sürüklemeyi başlatmak için tıklayın.\",\"dragItem\":\"{itemText}’i sürükle\",\"dragSelectedItems\":\"Sürükle {count, plural, one {# seçili öge} other {# seçili öge}}\",\"dragStartedKeyboard\":\"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.\",\"dragStartedTouch\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.\",\"dragStartedVirtual\":\"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.\",\"dropCanceled\":\"Bırakma iptal edildi.\",\"dropComplete\":\"Bırakma tamamlandı.\",\"dropDescriptionKeyboard\":\"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.\",\"dropDescriptionTouch\":\"Bırakmak için çift tıklayın.\",\"dropDescriptionVirtual\":\"Bırakmak için tıklayın.\",\"dropIndicator\":\"bırakma göstergesi\",\"dropOnItem\":\"{itemText} üzerine bırak\",\"dropOnRoot\":\"Bırakın\",\"endDragKeyboard\":\"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.\",\"endDragTouch\":\"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.\",\"endDragVirtual\":\"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.\",\"insertAfter\":\"{itemText}’den sonra gir\",\"insertBefore\":\"{itemText}’den önce gir\",\"insertBetween\":\"{beforeItemText} ve {afterItemText} arasına gir\"}");
|
|
1280
746
|
|
|
1281
|
-
if (typeof options.getDropOperationForPoint === 'function') {
|
|
1282
|
-
let types = new $daf765036c8e081b3420fc4f613ad96$export$DragTypes(e.dataTransfer);
|
|
1283
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1284
|
-
dropOperation = options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y);
|
|
1285
|
-
}
|
|
1286
747
|
|
|
1287
|
-
|
|
1288
|
-
|
|
748
|
+
var $2bfbc1f42c1cf5a7$exports = {};
|
|
749
|
+
$2bfbc1f42c1cf5a7$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"Натисніть Enter, щоб почати перетягування.\",\"dragDescriptionTouch\":\"Натисніть двічі, щоб почати перетягування.\",\"dragDescriptionVirtual\":\"Натисніть, щоб почати перетягування.\",\"dragItem\":\"Перетягнути {itemText}\",\"dragSelectedItems\":\"Перетягніть {count, plural, one {# вибраний елемент} other {# вибраних елем}}\",\"dragStartedKeyboard\":\"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.\",\"dragStartedTouch\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.\",\"dragStartedVirtual\":\"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.\",\"dropCanceled\":\"Перетягування скасовано.\",\"dropComplete\":\"Перетягування завершено.\",\"dropDescriptionKeyboard\":\"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.\",\"dropDescriptionTouch\":\"Натисніть двічі, щоб перетягнути.\",\"dropDescriptionVirtual\":\"Натисніть, щоб перетягнути.\",\"dropIndicator\":\"індикатор перетягування\",\"dropOnItem\":\"Перетягнути на {itemText}\",\"dropOnRoot\":\"Перетягнути на\",\"endDragKeyboard\":\"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.\",\"endDragTouch\":\"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.\",\"endDragVirtual\":\"Триває перетягування. Натисніть, щоб скасувати перетягування.\",\"insertAfter\":\"Вставити після {itemText}\",\"insertBefore\":\"Вставити перед {itemText}\",\"insertBetween\":\"Вставити між {beforeItemText} і {afterItemText}\"}");
|
|
1289
750
|
|
|
1290
|
-
if (typeof options.onDropEnter === 'function' && dropOperation !== 'cancel') {
|
|
1291
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1292
|
-
options.onDropEnter({
|
|
1293
|
-
type: 'dropenter',
|
|
1294
|
-
x: e.clientX - rect.x,
|
|
1295
|
-
y: e.clientY - rect.y
|
|
1296
|
-
});
|
|
1297
|
-
}
|
|
1298
751
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
};
|
|
752
|
+
var $d0f488d433b55b8a$exports = {};
|
|
753
|
+
$d0f488d433b55b8a$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 开始拖动。\",\"dragDescriptionTouch\":\"双击开始拖动。\",\"dragDescriptionVirtual\":\"单击开始拖动。\",\"dragItem\":\"拖动 {itemText}\",\"dragSelectedItems\":\"拖动 {count, plural, one {# 选中项目} other {# 选中项目}}\",\"dragStartedKeyboard\":\"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。\",\"dragStartedTouch\":\"已开始拖动。导航到放置目标,然后双击放置。\",\"dragStartedVirtual\":\"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 放置。按 Escape 取消拖动。\",\"dropDescriptionTouch\":\"双击放置。\",\"dropDescriptionVirtual\":\"单击放置。\",\"dropIndicator\":\"放置标记\",\"dropOnItem\":\"放置于 {itemText}\",\"dropOnRoot\":\"放置于\",\"endDragKeyboard\":\"正在拖动。按 Enter 取消拖动。\",\"endDragTouch\":\"正在拖动。双击取消拖动。\",\"endDragVirtual\":\"正在拖动。单击取消拖动。\",\"insertAfter\":\"插入到 {itemText} 之后\",\"insertBefore\":\"插入到 {itemText} 之前\",\"insertBetween\":\"插入到 {beforeItemText} 和 {afterItemText} 之间\"}");
|
|
1302
754
|
|
|
1303
|
-
let onDragLeave = e => {
|
|
1304
|
-
e.stopPropagation();
|
|
1305
|
-
state.dragEnterCount--;
|
|
1306
755
|
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}
|
|
756
|
+
var $46168b0dce85301e$exports = {};
|
|
757
|
+
$46168b0dce85301e$exports = JSON.parse("{\"dragDescriptionKeyboard\":\"按 Enter 鍵以開始拖曳。\",\"dragDescriptionTouch\":\"輕點兩下以開始拖曳。\",\"dragDescriptionVirtual\":\"按一下滑鼠以開始拖曳。\",\"dragItem\":\"拖曳「{itemText}」\",\"dragSelectedItems\":\"拖曳 {count, plural, one {# 個選定項目} other {# 個選定項目}}\",\"dragStartedKeyboard\":\"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。\",\"dragStartedTouch\":\"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。\",\"dragStartedVirtual\":\"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。\",\"dropCanceled\":\"放置已取消。\",\"dropComplete\":\"放置已完成。\",\"dropDescriptionKeyboard\":\"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。\",\"dropDescriptionTouch\":\"輕點兩下以放置。\",\"dropDescriptionVirtual\":\"按一下滑鼠以放置。\",\"dropIndicator\":\"放置指示器\",\"dropOnItem\":\"放置在「{itemText}」上\",\"dropOnRoot\":\"放置在\",\"endDragKeyboard\":\"拖曳中。按 Enter 鍵以取消拖曳。\",\"endDragTouch\":\"拖曳中。輕點兩下以取消拖曳。\",\"endDragVirtual\":\"拖曳中。按一下滑鼠以取消拖曳。\",\"insertAfter\":\"插入至「{itemText}」之後\",\"insertBefore\":\"插入至「{itemText}」之前\",\"insertBetween\":\"插入至「{beforeItemText}」和「{afterItemText}」之間\"}");
|
|
1310
758
|
|
|
1311
|
-
if (typeof options.onDropExit === 'function' && state.dropEffect !== 'none') {
|
|
1312
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1313
|
-
options.onDropExit({
|
|
1314
|
-
type: 'dropexit',
|
|
1315
|
-
x: e.clientX - rect.x,
|
|
1316
|
-
y: e.clientY - rect.y
|
|
1317
|
-
});
|
|
1318
|
-
}
|
|
1319
759
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
760
|
+
$c530af5bd0e7e6c6$exports = {
|
|
761
|
+
"ar-AE": $7dfcac1a0c98c789$exports,
|
|
762
|
+
"bg-BG": $f311c26671219eca$exports,
|
|
763
|
+
"cs-CZ": $1aa4ade186550f72$exports,
|
|
764
|
+
"da-DK": $b6b0ea1b94a7633c$exports,
|
|
765
|
+
"de-DE": $d10e4f47c744ad52$exports,
|
|
766
|
+
"el-GR": $b3d2bb9abce688ab$exports,
|
|
767
|
+
"en-US": $f9b46437e610cca1$exports,
|
|
768
|
+
"es-ES": $204b5c01bd3acf26$exports,
|
|
769
|
+
"et-EE": $110bdd83348ecbc0$exports,
|
|
770
|
+
"fi-FI": $87d3ccd5e347c7cc$exports,
|
|
771
|
+
"fr-FR": $a5de891427686596$exports,
|
|
772
|
+
"he-IL": $ad7f4c66d85b4494$exports,
|
|
773
|
+
"hr-HR": $4aa59f3c6a796cae$exports,
|
|
774
|
+
"hu-HU": $d8d3646556c40586$exports,
|
|
775
|
+
"it-IT": $982d558b45395246$exports,
|
|
776
|
+
"ja-JP": $6a0cf387b9de036c$exports,
|
|
777
|
+
"ko-KR": $a97fefa2956f4bcb$exports,
|
|
778
|
+
"lt-LT": $5fb5837f94e1c150$exports,
|
|
779
|
+
"lv-LV": $5b2e5709864cc922$exports,
|
|
780
|
+
"nb-NO": $ee15bb8efb18cc69$exports,
|
|
781
|
+
"nl-NL": $1daf2d4602e26ac4$exports,
|
|
782
|
+
"pl-PL": $7115429b0f60511f$exports,
|
|
783
|
+
"pt-BR": $5edd453ae5d4a8bc$exports,
|
|
784
|
+
"pt-PT": $5f431994f708535e$exports,
|
|
785
|
+
"ro-RO": $107b5e2e45e971f1$exports,
|
|
786
|
+
"ru-RU": $d4b9c2f01c1892f7$exports,
|
|
787
|
+
"sk-SK": $dbdc1942894e83e4$exports,
|
|
788
|
+
"sl-SI": $fbaaaaebd547d998$exports,
|
|
789
|
+
"sr-SP": $a0caa33f1e264489$exports,
|
|
790
|
+
"sv-SE": $d576b66176f5c0ff$exports,
|
|
791
|
+
"tr-TR": $0681f168c13d8f2a$exports,
|
|
792
|
+
"uk-UA": $2bfbc1f42c1cf5a7$exports,
|
|
793
|
+
"zh-CN": $d0f488d433b55b8a$exports,
|
|
794
|
+
"zh-TW": $46168b0dce85301e$exports
|
|
795
|
+
};
|
|
1347
796
|
|
|
1348
|
-
if (typeof options.onDropExit === 'function') {
|
|
1349
|
-
let rect = e.currentTarget.getBoundingClientRect();
|
|
1350
|
-
options.onDropExit({
|
|
1351
|
-
type: 'dropexit',
|
|
1352
|
-
x: e.clientX - rect.x,
|
|
1353
|
-
y: e.clientY - rect.y
|
|
1354
|
-
});
|
|
1355
|
-
}
|
|
1356
797
|
|
|
1357
|
-
state.dragEnterCount = 0;
|
|
1358
|
-
setDropTarget(false);
|
|
1359
|
-
clearTimeout(state.dropActivateTimer);
|
|
1360
|
-
};
|
|
1361
798
|
|
|
1362
|
-
let optionsRef = useRef(options);
|
|
1363
|
-
optionsRef.current = options;
|
|
1364
|
-
useLayoutEffect(() => $f2f44a26f7541d104d10e68c115a897a$export$registerDropTarget({
|
|
1365
|
-
element: optionsRef.current.ref.current,
|
|
1366
|
-
getDropOperation: optionsRef.current.getDropOperation,
|
|
1367
799
|
|
|
1368
|
-
onDropEnter(e) {
|
|
1369
|
-
setDropTarget(true);
|
|
1370
800
|
|
|
1371
|
-
if (typeof optionsRef.current.onDropEnter === 'function') {
|
|
1372
|
-
optionsRef.current.onDropEnter(e);
|
|
1373
|
-
}
|
|
1374
|
-
},
|
|
1375
801
|
|
|
1376
|
-
onDropExit(e) {
|
|
1377
|
-
setDropTarget(false);
|
|
1378
802
|
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
803
|
+
const $8253ed7ece74b463$var$MESSAGES = {
|
|
804
|
+
keyboard: {
|
|
805
|
+
start: 'dragDescriptionKeyboard',
|
|
806
|
+
end: 'endDragKeyboard'
|
|
1382
807
|
},
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
optionsRef.current.onDrop(e);
|
|
1387
|
-
}
|
|
808
|
+
touch: {
|
|
809
|
+
start: 'dragDescriptionTouch',
|
|
810
|
+
end: 'endDragTouch'
|
|
1388
811
|
},
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
optionsRef.current.onDropActivate(e);
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
}), [optionsRef]);
|
|
1397
|
-
let {
|
|
1398
|
-
dropProps
|
|
1399
|
-
} = $c50618638a6eda91cf58d6698d439d4$export$useVirtualDrop();
|
|
1400
|
-
return {
|
|
1401
|
-
dropProps: _babelRuntimeHelpersEsmExtends({}, dropProps, {
|
|
1402
|
-
onDragEnter,
|
|
1403
|
-
onDragOver,
|
|
1404
|
-
onDragLeave,
|
|
1405
|
-
onDrop
|
|
1406
|
-
}),
|
|
1407
|
-
isDropTarget
|
|
1408
|
-
};
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
function $d8fbdabc9bf5e02249691efe73c6554$var$effectAllowedToOperations(effectAllowed) {
|
|
1412
|
-
let allowedOperationsBits = $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION_ALLOWED[effectAllowed];
|
|
1413
|
-
let allowedOperations = [];
|
|
1414
|
-
|
|
1415
|
-
if (allowedOperationsBits & $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.move) {
|
|
1416
|
-
allowedOperations.push('move');
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
if (allowedOperationsBits & $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.copy) {
|
|
1420
|
-
allowedOperations.push('copy');
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
if (allowedOperationsBits & $cd2dc9b4103e6936caca05e2d05$export$DROP_OPERATION.link) {
|
|
1424
|
-
allowedOperations.push('link');
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
return allowedOperations;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
const $fc185692b5b48db744e326077771d19$var$AUTOSCROLL_AREA_SIZE = 20;
|
|
1431
|
-
|
|
1432
|
-
function $fc185692b5b48db744e326077771d19$export$useAutoScroll(ref) {
|
|
1433
|
-
let scrollableRef = useRef(null);
|
|
1434
|
-
useEffect(() => {
|
|
1435
|
-
if (ref.current) {
|
|
1436
|
-
scrollableRef.current = getScrollParent(ref.current);
|
|
1437
|
-
}
|
|
1438
|
-
}, [ref]);
|
|
1439
|
-
let state = useRef({
|
|
1440
|
-
timer: null,
|
|
1441
|
-
dx: 0,
|
|
1442
|
-
dy: 0
|
|
1443
|
-
}).current;
|
|
1444
|
-
let scroll = useCallback(() => {
|
|
1445
|
-
scrollableRef.current.scrollLeft += state.dx;
|
|
1446
|
-
scrollableRef.current.scrollTop += state.dy;
|
|
1447
|
-
|
|
1448
|
-
if (state.timer) {
|
|
1449
|
-
state.timer = requestAnimationFrame(scroll);
|
|
812
|
+
virtual: {
|
|
813
|
+
start: 'dragDescriptionVirtual',
|
|
814
|
+
end: 'endDragVirtual'
|
|
1450
815
|
}
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
state.dx = x - right;
|
|
816
|
+
};
|
|
817
|
+
function $8253ed7ece74b463$export$7941f8aafa4b6021(options) {
|
|
818
|
+
let formatMessage = $fP8tg$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c530af5bd0e7e6c6$exports)));
|
|
819
|
+
let state = $fP8tg$useRef({
|
|
820
|
+
options: options,
|
|
821
|
+
x: 0,
|
|
822
|
+
y: 0
|
|
823
|
+
}).current;
|
|
824
|
+
state.options = options;
|
|
825
|
+
let [isDragging, setDragging] = $fP8tg$useState(false);
|
|
826
|
+
let { addGlobalListener: addGlobalListener , removeAllGlobalListeners: removeAllGlobalListeners } = $fP8tg$useGlobalListeners();
|
|
827
|
+
let onDragStart = (e1)=>{
|
|
828
|
+
let items = options.getItems();
|
|
829
|
+
$7252cd45fc48c07c$export$f9c1490890ddd063(e1.dataTransfer, items);
|
|
830
|
+
if (typeof options.getAllowedDropOperations === 'function') {
|
|
831
|
+
let allowedOperations = options.getAllowedDropOperations();
|
|
832
|
+
let allowed = $103790afe9474d1c$export$60b7b4bcf3903d8e.none;
|
|
833
|
+
for (let operation of allowedOperations)allowed |= $103790afe9474d1c$export$60b7b4bcf3903d8e[operation] || $103790afe9474d1c$export$60b7b4bcf3903d8e.none;
|
|
834
|
+
e1.dataTransfer.effectAllowed = $103790afe9474d1c$export$dd0165308d8bff45[allowed] || 'none';
|
|
1471
835
|
}
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
836
|
+
// If there is a renderPreview function, use it to render a custom preview image that will
|
|
837
|
+
// appear under the pointer while dragging. If not, the element itself is dragged by the browser.
|
|
838
|
+
if (typeof options.renderPreview === 'function') {
|
|
839
|
+
let preview = options.renderPreview(items);
|
|
840
|
+
if (preview) {
|
|
841
|
+
// Create an off-screen div to render the preview into.
|
|
842
|
+
let node = document.createElement('div');
|
|
843
|
+
node.style.zIndex = '-100';
|
|
844
|
+
node.style.position = 'absolute';
|
|
845
|
+
node.style.top = '0';
|
|
846
|
+
node.style.left = '-100000px';
|
|
847
|
+
document.body.appendChild(node);
|
|
848
|
+
// Call renderPreview to get a JSX element, and render it into the div with React DOM.
|
|
849
|
+
$fP8tg$reactdom.render(preview, node);
|
|
850
|
+
// Compute the offset that the preview will appear under the mouse.
|
|
851
|
+
// If possible, this is based on the point the user clicked on the target.
|
|
852
|
+
// If the preview is much smaller, then just use the center point of the preview.
|
|
853
|
+
let size = node.getBoundingClientRect();
|
|
854
|
+
let rect = e1.currentTarget.getBoundingClientRect();
|
|
855
|
+
let x = e1.clientX - rect.x;
|
|
856
|
+
let y = e1.clientY - rect.y;
|
|
857
|
+
if (x > size.width || y > size.height) {
|
|
858
|
+
x = size.width / 2;
|
|
859
|
+
y = size.height / 2;
|
|
860
|
+
}
|
|
861
|
+
e1.dataTransfer.setDragImage(node, x, y);
|
|
862
|
+
// Remove the preview from the DOM after a frame so the browser has time to paint.
|
|
863
|
+
requestAnimationFrame(()=>{
|
|
864
|
+
document.body.removeChild(node);
|
|
865
|
+
});
|
|
866
|
+
}
|
|
1477
867
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
868
|
+
// Enforce that drops are handled by useDrop.
|
|
869
|
+
addGlobalListener(window, 'drop', (e)=>{
|
|
870
|
+
if (!$67560de7c78cb232$export$7454aff2e161f241(e.target)) {
|
|
871
|
+
e.preventDefault();
|
|
872
|
+
e.stopPropagation();
|
|
873
|
+
throw new Error('Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.');
|
|
874
|
+
}
|
|
875
|
+
}, {
|
|
876
|
+
capture: true,
|
|
877
|
+
once: true
|
|
878
|
+
});
|
|
879
|
+
if (typeof options.onDragStart === 'function') options.onDragStart({
|
|
880
|
+
type: 'dragstart',
|
|
881
|
+
x: e1.clientX,
|
|
882
|
+
y: e1.clientY
|
|
883
|
+
});
|
|
884
|
+
state.x = e1.clientX;
|
|
885
|
+
state.y = e1.clientY;
|
|
886
|
+
// Wait a frame before we set dragging to true so that the browser has time to
|
|
887
|
+
// render the preview image before we update the element that has been dragged.
|
|
888
|
+
requestAnimationFrame(()=>{
|
|
889
|
+
setDragging(true);
|
|
890
|
+
});
|
|
891
|
+
};
|
|
892
|
+
let onDrag = (e)=>{
|
|
893
|
+
if (e.clientX === state.x && e.clientY === state.y) return;
|
|
894
|
+
if (typeof options.onDragMove === 'function') options.onDragMove({
|
|
895
|
+
type: 'dragmove',
|
|
896
|
+
x: e.clientX,
|
|
897
|
+
y: e.clientY
|
|
898
|
+
});
|
|
899
|
+
state.x = e.clientX;
|
|
900
|
+
state.y = e.clientY;
|
|
901
|
+
};
|
|
902
|
+
let onDragEnd = (e)=>{
|
|
903
|
+
if (typeof options.onDragEnd === 'function') options.onDragEnd({
|
|
904
|
+
type: 'dragend',
|
|
905
|
+
x: e.clientX,
|
|
906
|
+
y: e.clientY,
|
|
907
|
+
dropOperation: $103790afe9474d1c$export$608ecc6f1b23c35d[e.dataTransfer.dropEffect]
|
|
908
|
+
});
|
|
909
|
+
setDragging(false);
|
|
910
|
+
removeAllGlobalListeners();
|
|
911
|
+
};
|
|
912
|
+
let onPress = (e2)=>{
|
|
913
|
+
if (e2.pointerType !== 'keyboard' && e2.pointerType !== 'virtual') return;
|
|
914
|
+
if (typeof state.options.onDragStart === 'function') {
|
|
915
|
+
let rect = e2.target.getBoundingClientRect();
|
|
916
|
+
state.options.onDragStart({
|
|
917
|
+
type: 'dragstart',
|
|
918
|
+
x: rect.x + rect.width / 2,
|
|
919
|
+
y: rect.y + rect.height / 2
|
|
920
|
+
});
|
|
1481
921
|
}
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
922
|
+
$67560de7c78cb232$export$549dbcf8649bf3b2({
|
|
923
|
+
element: e2.target,
|
|
924
|
+
items: state.options.getItems(),
|
|
925
|
+
allowedDropOperations: typeof state.options.getAllowedDropOperations === 'function' ? state.options.getAllowedDropOperations() : [
|
|
926
|
+
'move',
|
|
927
|
+
'copy',
|
|
928
|
+
'link'
|
|
929
|
+
],
|
|
930
|
+
onDragEnd (e) {
|
|
931
|
+
setDragging(false);
|
|
932
|
+
if (typeof state.options.onDragEnd === 'function') state.options.onDragEnd(e);
|
|
933
|
+
}
|
|
934
|
+
}, formatMessage);
|
|
935
|
+
setDragging(true);
|
|
936
|
+
};
|
|
937
|
+
let modality = $7252cd45fc48c07c$export$49bac5d6d4b352ea();
|
|
938
|
+
let descriptionProps = $fP8tg$useDescription(formatMessage(!isDragging ? $8253ed7ece74b463$var$MESSAGES[modality].start : $8253ed7ece74b463$var$MESSAGES[modality].end));
|
|
939
|
+
return {
|
|
940
|
+
dragProps: {
|
|
941
|
+
draggable: 'true',
|
|
942
|
+
onDragStart: onDragStart,
|
|
943
|
+
onDrag: onDrag,
|
|
944
|
+
onDragEnd: onDragEnd
|
|
945
|
+
},
|
|
946
|
+
dragButtonProps: {
|
|
947
|
+
...descriptionProps,
|
|
948
|
+
onPress: onPress
|
|
949
|
+
},
|
|
950
|
+
isDragging: isDragging
|
|
951
|
+
};
|
|
1495
952
|
}
|
|
1496
953
|
|
|
1497
|
-
const $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS = ['before', 'on', 'after'];
|
|
1498
|
-
export function useDroppableCollection(props, state, ref) {
|
|
1499
|
-
let localState = useRef({
|
|
1500
|
-
props,
|
|
1501
|
-
state,
|
|
1502
|
-
nextTarget: null,
|
|
1503
|
-
dropOperation: null
|
|
1504
|
-
}).current;
|
|
1505
|
-
localState.props = props;
|
|
1506
|
-
localState.state = state;
|
|
1507
|
-
let autoScroll = $fc185692b5b48db744e326077771d19$export$useAutoScroll(ref);
|
|
1508
|
-
let {
|
|
1509
|
-
dropProps
|
|
1510
|
-
} = useDrop({
|
|
1511
|
-
ref,
|
|
1512
|
-
|
|
1513
|
-
onDropEnter(e) {
|
|
1514
|
-
let target = props.getDropTargetFromPoint(e.x, e.y);
|
|
1515
|
-
state.setTarget(target);
|
|
1516
|
-
},
|
|
1517
|
-
|
|
1518
|
-
onDropMove(e) {
|
|
1519
|
-
state.setTarget(localState.nextTarget);
|
|
1520
|
-
autoScroll.move(e.x, e.y);
|
|
1521
|
-
},
|
|
1522
954
|
|
|
1523
|
-
|
|
1524
|
-
let target = props.getDropTargetFromPoint(x, y);
|
|
955
|
+
var $5c06e4929e123553$exports = {};
|
|
1525
956
|
|
|
1526
|
-
|
|
1527
|
-
localState.dropOperation = 'cancel';
|
|
1528
|
-
localState.nextTarget = null;
|
|
1529
|
-
return 'cancel';
|
|
1530
|
-
}
|
|
957
|
+
$parcel$export($5c06e4929e123553$exports, "useDrop", () => $5c06e4929e123553$export$ccdee5eaf73cf661);
|
|
1531
958
|
|
|
1532
|
-
if (state.isDropTarget(target)) {
|
|
1533
|
-
localState.nextTarget = target;
|
|
1534
|
-
return localState.dropOperation;
|
|
1535
|
-
}
|
|
1536
959
|
|
|
1537
|
-
localState.dropOperation = state.getDropOperation(target, types, allowedOperations); // If the target doesn't accept the drop, see if the root accepts it instead.
|
|
1538
960
|
|
|
1539
|
-
if (localState.dropOperation === 'cancel') {
|
|
1540
|
-
let rootTarget = {
|
|
1541
|
-
type: 'root'
|
|
1542
|
-
};
|
|
1543
|
-
let dropOperation = state.getDropOperation(rootTarget, types, allowedOperations);
|
|
1544
961
|
|
|
1545
|
-
if (dropOperation !== 'cancel') {
|
|
1546
|
-
target = rootTarget;
|
|
1547
|
-
localState.dropOperation = dropOperation;
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
962
|
|
|
1551
|
-
localState.nextTarget = localState.dropOperation === 'cancel' ? null : target;
|
|
1552
|
-
return localState.dropOperation;
|
|
1553
|
-
},
|
|
1554
963
|
|
|
1555
|
-
onDropExit() {
|
|
1556
|
-
state.setTarget(null);
|
|
1557
|
-
autoScroll.stop();
|
|
1558
|
-
},
|
|
1559
964
|
|
|
1560
|
-
onDropActivate(e) {
|
|
1561
|
-
var _state$target, _state$target2;
|
|
1562
965
|
|
|
1563
|
-
if (((_state$target = state.target) == null ? void 0 : _state$target.type) === 'item' && ((_state$target2 = state.target) == null ? void 0 : _state$target2.dropPosition) === 'on' && typeof props.onDropActivate === 'function') {
|
|
1564
|
-
props.onDropActivate({
|
|
1565
|
-
type: 'dropactivate',
|
|
1566
|
-
x: e.x,
|
|
1567
|
-
// todo
|
|
1568
|
-
y: e.y,
|
|
1569
|
-
target: state.target
|
|
1570
|
-
});
|
|
1571
|
-
}
|
|
1572
|
-
},
|
|
1573
966
|
|
|
1574
|
-
onDrop(e) {
|
|
1575
|
-
if (state.target && typeof props.onDrop === 'function') {
|
|
1576
|
-
onDrop(e, state.target);
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
967
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
let
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
y: e.y,
|
|
1601
|
-
target,
|
|
1602
|
-
items: e.items,
|
|
1603
|
-
dropOperation: e.dropOperation
|
|
1604
|
-
}); // Wait for a short time period after the onDrop is called to allow the data to be read asynchronously
|
|
1605
|
-
// and for React to re-render. If an insert occurs during this time, it will be selected/focused below.
|
|
1606
|
-
// If items are not "immediately" inserted by the onDrop handler, the application will need to handle
|
|
1607
|
-
// selecting and focusing those items themselves.
|
|
1608
|
-
|
|
1609
|
-
droppingState.current.timeout = setTimeout(() => {
|
|
1610
|
-
// If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
|
|
1611
|
-
// focus that item and show the focus ring to give the user feedback that the drop occurred.
|
|
1612
|
-
// Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
|
|
1613
|
-
let {
|
|
1614
|
-
state
|
|
1615
|
-
} = localState;
|
|
1616
|
-
|
|
1617
|
-
if (state.selectionManager.focusedKey === focusedKey) {
|
|
1618
|
-
if (target.type === 'item' && target.dropPosition === 'on' && state.collection.getItem(target.key) != null) {
|
|
1619
|
-
state.selectionManager.setFocusedKey(target.key);
|
|
1620
|
-
state.selectionManager.setFocused(true);
|
|
1621
|
-
setInteractionModality('keyboard');
|
|
1622
|
-
} else if (!state.selectionManager.isSelected(focusedKey)) {
|
|
1623
|
-
setInteractionModality('keyboard');
|
|
968
|
+
const $224594fe3e57ff1e$var$MESSAGES = {
|
|
969
|
+
keyboard: 'dropDescriptionKeyboard',
|
|
970
|
+
touch: 'dropDescriptionTouch',
|
|
971
|
+
virtual: 'dropDescriptionVirtual'
|
|
972
|
+
};
|
|
973
|
+
function $224594fe3e57ff1e$export$62447ad3d2ec7da6() {
|
|
974
|
+
let formatMessage = $fP8tg$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c530af5bd0e7e6c6$exports)));
|
|
975
|
+
let modality = $7252cd45fc48c07c$export$49bac5d6d4b352ea();
|
|
976
|
+
let dragSession = $67560de7c78cb232$export$418e185dd3f1b968();
|
|
977
|
+
let descriptionProps = $fP8tg$useDescription(dragSession ? formatMessage($224594fe3e57ff1e$var$MESSAGES[modality]) : '');
|
|
978
|
+
return {
|
|
979
|
+
dropProps: {
|
|
980
|
+
...descriptionProps,
|
|
981
|
+
// Mobile Safari does not properly bubble click events on elements except links or inputs
|
|
982
|
+
// unless there is an onclick handler bound directly to the element itself. By adding this
|
|
983
|
+
// handler, React will take care of adding that for us, and we are able to handle document
|
|
984
|
+
// level click events in the DragManager.
|
|
985
|
+
// See https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
|
|
986
|
+
onClick: ()=>{
|
|
987
|
+
}
|
|
1624
988
|
}
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
droppingState.current = null;
|
|
1628
|
-
}, 50);
|
|
1629
|
-
}, [localState]); // eslint-disable-next-line arrow-body-style
|
|
1630
|
-
|
|
1631
|
-
useEffect(() => {
|
|
1632
|
-
return () => {
|
|
1633
|
-
if (droppingState.current) {
|
|
1634
|
-
clearTimeout(droppingState.current.timeout);
|
|
1635
|
-
}
|
|
1636
989
|
};
|
|
1637
|
-
|
|
1638
|
-
useLayoutEffect(() => {
|
|
1639
|
-
// If an insert occurs during a drop, we want to immediately select these items to give
|
|
1640
|
-
// feedback to the user that a drop occurred. Only do this if the selection didn't change
|
|
1641
|
-
// since the drop started so we don't override if the user or application did something.
|
|
1642
|
-
if (droppingState.current && state.selectionManager.isFocused && state.collection.size > droppingState.current.collection.size && state.selectionManager.isSelectionEqual(droppingState.current.selectedKeys)) {
|
|
1643
|
-
let newKeys = new Set();
|
|
1644
|
-
|
|
1645
|
-
for (let key of state.collection.getKeys()) {
|
|
1646
|
-
if (!droppingState.current.collection.getItem(key)) {
|
|
1647
|
-
newKeys.add(key);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
state.selectionManager.setSelectedKeys(newKeys); // If the focused item didn't change since the drop occurred, also focus the first
|
|
1652
|
-
// inserted item. If selection is disabled, then also show the focus ring so there
|
|
1653
|
-
// is some indication that items were added.
|
|
990
|
+
}
|
|
1654
991
|
|
|
1655
|
-
if (state.selectionManager.focusedKey === droppingState.current.focusedKey) {
|
|
1656
|
-
let first = newKeys.keys().next().value;
|
|
1657
|
-
state.selectionManager.setFocusedKey(first);
|
|
1658
992
|
|
|
1659
|
-
|
|
1660
|
-
|
|
993
|
+
const $5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT = 800;
|
|
994
|
+
function $5c06e4929e123553$export$ccdee5eaf73cf661(options) {
|
|
995
|
+
let [isDropTarget, setDropTarget] = $fP8tg$useState(false);
|
|
996
|
+
let state = $fP8tg$useRef({
|
|
997
|
+
x: 0,
|
|
998
|
+
y: 0,
|
|
999
|
+
dragEnterCount: 0,
|
|
1000
|
+
dropEffect: 'none',
|
|
1001
|
+
dropActivateTimer: null
|
|
1002
|
+
}).current;
|
|
1003
|
+
let onDragOver = (e)=>{
|
|
1004
|
+
e.preventDefault();
|
|
1005
|
+
e.stopPropagation();
|
|
1006
|
+
if (e.clientX === state.x && e.clientY === state.y) {
|
|
1007
|
+
e.dataTransfer.dropEffect = state.dropEffect;
|
|
1008
|
+
return;
|
|
1661
1009
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
wrap = true;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
if (!target) {
|
|
1674
|
-
return {
|
|
1675
|
-
type: 'root'
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
let {
|
|
1680
|
-
keyboardDelegate
|
|
1681
|
-
} = localState.props;
|
|
1682
|
-
let nextKey = target.type === 'item' ? keyboardDelegate.getKeyBelow(target.key) : keyboardDelegate.getFirstKey();
|
|
1683
|
-
let dropPosition = 'before';
|
|
1684
|
-
|
|
1685
|
-
if (target.type === 'item') {
|
|
1686
|
-
let positionIndex = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS.indexOf(target.dropPosition);
|
|
1687
|
-
let nextDropPosition = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS[positionIndex + 1];
|
|
1688
|
-
|
|
1689
|
-
if (positionIndex < $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS.length - 1 && !(nextDropPosition === 'after' && nextKey != null)) {
|
|
1690
|
-
return {
|
|
1691
|
-
type: 'item',
|
|
1692
|
-
key: target.key,
|
|
1693
|
-
dropPosition: nextDropPosition
|
|
1694
|
-
};
|
|
1695
|
-
} // If the last drop position was 'after', then 'before' on the next key is equivalent.
|
|
1696
|
-
// Switch to 'on' instead.
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
if (target.dropPosition === 'after') {
|
|
1700
|
-
dropPosition = 'on';
|
|
1010
|
+
state.x = e.clientX;
|
|
1011
|
+
state.y = e.clientY;
|
|
1012
|
+
if (typeof options.getDropOperationForPoint === 'function') {
|
|
1013
|
+
let allowedOperations = $5c06e4929e123553$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
|
|
1014
|
+
let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
|
|
1015
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1016
|
+
let dropOperation = options.getDropOperationForPoint(types, allowedOperations, state.x - rect.x, state.y - rect.y);
|
|
1017
|
+
state.dropEffect = $103790afe9474d1c$export$5eacb0769d26d3b2[dropOperation] || 'none';
|
|
1701
1018
|
}
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1019
|
+
e.dataTransfer.dropEffect = state.dropEffect;
|
|
1020
|
+
if (typeof options.onDropMove === 'function') {
|
|
1021
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1022
|
+
options.onDropMove({
|
|
1023
|
+
type: 'dropmove',
|
|
1024
|
+
x: state.x - rect.x,
|
|
1025
|
+
y: state.y - rect.y
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
clearTimeout(state.dropActivateTimer);
|
|
1029
|
+
if (typeof options.onDropActivate === 'function' && state.dropEffect !== 'none') {
|
|
1030
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1031
|
+
state.dropActivateTimer = setTimeout(()=>{
|
|
1032
|
+
options.onDropActivate({
|
|
1033
|
+
type: 'dropactivate',
|
|
1034
|
+
x: state.x - rect.x,
|
|
1035
|
+
y: state.y - rect.y
|
|
1036
|
+
});
|
|
1037
|
+
}, $5c06e4929e123553$var$DROP_ACTIVATE_TIMEOUT);
|
|
1709
1038
|
}
|
|
1710
|
-
|
|
1711
|
-
return null;
|
|
1712
|
-
}
|
|
1713
|
-
|
|
1714
|
-
return {
|
|
1715
|
-
type: 'item',
|
|
1716
|
-
key: nextKey,
|
|
1717
|
-
dropPosition
|
|
1718
|
-
};
|
|
1719
1039
|
};
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
let nextKey = (target == null ? void 0 : target.type) === 'item' ? keyboardDelegate.getKeyAbove(target.key) : keyboardDelegate.getLastKey();
|
|
1730
|
-
let dropPosition = !target || target.type === 'root' ? 'after' : 'on';
|
|
1731
|
-
|
|
1732
|
-
if ((target == null ? void 0 : target.type) === 'item') {
|
|
1733
|
-
let positionIndex = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS.indexOf(target.dropPosition);
|
|
1734
|
-
let nextDropPosition = $a51d66e59f7aa4342b5a89c7c961bedc$var$DROP_POSITIONS[positionIndex - 1];
|
|
1735
|
-
|
|
1736
|
-
if (positionIndex > 0 && nextDropPosition !== 'after') {
|
|
1737
|
-
return {
|
|
1738
|
-
type: 'item',
|
|
1739
|
-
key: target.key,
|
|
1740
|
-
dropPosition: nextDropPosition
|
|
1741
|
-
};
|
|
1742
|
-
} // If the last drop position was 'before', then 'after' on the previous key is equivalent.
|
|
1743
|
-
// Switch to 'on' instead.
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
if (target.dropPosition === 'before') {
|
|
1747
|
-
dropPosition = 'on';
|
|
1040
|
+
let onDragEnter = (e)=>{
|
|
1041
|
+
e.stopPropagation();
|
|
1042
|
+
state.dragEnterCount++;
|
|
1043
|
+
if (state.dragEnterCount > 1) return;
|
|
1044
|
+
let allowedOperations = $5c06e4929e123553$var$effectAllowedToOperations(e.dataTransfer.effectAllowed);
|
|
1045
|
+
let dropOperation = allowedOperations[0];
|
|
1046
|
+
if (typeof options.getDropOperation === 'function') {
|
|
1047
|
+
let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
|
|
1048
|
+
dropOperation = options.getDropOperation(types, allowedOperations);
|
|
1748
1049
|
}
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
type: 'root'
|
|
1755
|
-
};
|
|
1050
|
+
if (dropOperation !== 'cancel') setDropTarget(true);
|
|
1051
|
+
if (typeof options.getDropOperationForPoint === 'function') {
|
|
1052
|
+
let types = new $7252cd45fc48c07c$export$7f04ce188c91447c(e.dataTransfer);
|
|
1053
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1054
|
+
dropOperation = options.getDropOperationForPoint(types, allowedOperations, e.clientX - rect.x, e.clientY - rect.y);
|
|
1756
1055
|
}
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1056
|
+
state.dropEffect = $103790afe9474d1c$export$5eacb0769d26d3b2[dropOperation] || 'none';
|
|
1057
|
+
e.dataTransfer.dropEffect = state.dropEffect;
|
|
1058
|
+
if (typeof options.onDropEnter === 'function' && dropOperation !== 'cancel') {
|
|
1059
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1060
|
+
options.onDropEnter({
|
|
1061
|
+
type: 'dropenter',
|
|
1062
|
+
x: e.clientX - rect.x,
|
|
1063
|
+
y: e.clientY - rect.y
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
state.x = e.clientX;
|
|
1067
|
+
state.y = e.clientY;
|
|
1766
1068
|
};
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
if (!nextTarget) {
|
|
1780
|
-
return null;
|
|
1069
|
+
let onDragLeave = (e)=>{
|
|
1070
|
+
e.stopPropagation();
|
|
1071
|
+
state.dragEnterCount--;
|
|
1072
|
+
if (state.dragEnterCount > 0) return;
|
|
1073
|
+
if (typeof options.onDropExit === 'function' && state.dropEffect !== 'none') {
|
|
1074
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1075
|
+
options.onDropExit({
|
|
1076
|
+
type: 'dropexit',
|
|
1077
|
+
x: e.clientX - rect.x,
|
|
1078
|
+
y: e.clientY - rect.y
|
|
1079
|
+
});
|
|
1781
1080
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1081
|
+
setDropTarget(false);
|
|
1082
|
+
clearTimeout(state.dropActivateTimer);
|
|
1083
|
+
};
|
|
1084
|
+
let onDrop = (e)=>{
|
|
1085
|
+
e.preventDefault();
|
|
1086
|
+
e.stopPropagation();
|
|
1087
|
+
if (typeof options.onDrop === 'function') {
|
|
1088
|
+
let dropOperation = $103790afe9474d1c$export$608ecc6f1b23c35d[state.dropEffect];
|
|
1089
|
+
let items = $7252cd45fc48c07c$export$d9e760437831f8b3(e.dataTransfer);
|
|
1090
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1091
|
+
let event = {
|
|
1092
|
+
type: 'drop',
|
|
1093
|
+
x: e.clientX - rect.x,
|
|
1094
|
+
y: e.clientY - rect.y,
|
|
1095
|
+
items: items,
|
|
1096
|
+
dropOperation: dropOperation
|
|
1097
|
+
};
|
|
1098
|
+
// Wait a frame to dispatch the drop event so that we ensure the dragend event fires first.
|
|
1099
|
+
// Otherwise, if onDrop removes the original dragged element from the DOM, dragend will never be fired.
|
|
1100
|
+
// This behavior is consistent across browsers, but see this issue for details:
|
|
1101
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=460801
|
|
1102
|
+
setTimeout(()=>{
|
|
1103
|
+
options.onDrop(event);
|
|
1104
|
+
}, 0);
|
|
1788
1105
|
}
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1106
|
+
if (typeof options.onDropExit === 'function') {
|
|
1107
|
+
let rect = e.currentTarget.getBoundingClientRect();
|
|
1108
|
+
options.onDropExit({
|
|
1109
|
+
type: 'dropexit',
|
|
1110
|
+
x: e.clientX - rect.x,
|
|
1111
|
+
y: e.clientY - rect.y
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
state.dragEnterCount = 0;
|
|
1115
|
+
setDropTarget(false);
|
|
1116
|
+
clearTimeout(state.dropActivateTimer);
|
|
1117
|
+
};
|
|
1118
|
+
let optionsRef = $fP8tg$useRef(options);
|
|
1119
|
+
optionsRef.current = options;
|
|
1120
|
+
$fP8tg$useLayoutEffect(()=>$67560de7c78cb232$export$c28d9fb4a54e471a({
|
|
1121
|
+
element: optionsRef.current.ref.current,
|
|
1122
|
+
getDropOperation: optionsRef.current.getDropOperation,
|
|
1123
|
+
onDropEnter (e) {
|
|
1124
|
+
setDropTarget(true);
|
|
1125
|
+
if (typeof optionsRef.current.onDropEnter === 'function') optionsRef.current.onDropEnter(e);
|
|
1126
|
+
},
|
|
1127
|
+
onDropExit (e) {
|
|
1128
|
+
setDropTarget(false);
|
|
1129
|
+
if (typeof optionsRef.current.onDropExit === 'function') optionsRef.current.onDropExit(e);
|
|
1130
|
+
},
|
|
1131
|
+
onDrop (e) {
|
|
1132
|
+
if (typeof optionsRef.current.onDrop === 'function') optionsRef.current.onDrop(e);
|
|
1133
|
+
},
|
|
1134
|
+
onDropActivate (e) {
|
|
1135
|
+
if (typeof optionsRef.current.onDropActivate === 'function') optionsRef.current.onDropActivate(e);
|
|
1136
|
+
}
|
|
1137
|
+
})
|
|
1138
|
+
, [
|
|
1139
|
+
optionsRef
|
|
1140
|
+
]);
|
|
1141
|
+
let { dropProps: dropProps } = $224594fe3e57ff1e$export$62447ad3d2ec7da6();
|
|
1142
|
+
return {
|
|
1143
|
+
dropProps: {
|
|
1144
|
+
...dropProps,
|
|
1145
|
+
onDragEnter: onDragEnter,
|
|
1146
|
+
onDragOver: onDragOver,
|
|
1147
|
+
onDragLeave: onDragLeave,
|
|
1148
|
+
onDrop: onDrop
|
|
1149
|
+
},
|
|
1150
|
+
isDropTarget: isDropTarget
|
|
1796
1151
|
};
|
|
1152
|
+
}
|
|
1153
|
+
function $5c06e4929e123553$var$effectAllowedToOperations(effectAllowed) {
|
|
1154
|
+
let allowedOperationsBits = $103790afe9474d1c$export$9bbdfc78cf083e16[effectAllowed];
|
|
1155
|
+
let allowedOperations = [];
|
|
1156
|
+
if (allowedOperationsBits & $103790afe9474d1c$export$60b7b4bcf3903d8e.move) allowedOperations.push('move');
|
|
1157
|
+
if (allowedOperationsBits & $103790afe9474d1c$export$60b7b4bcf3903d8e.copy) allowedOperations.push('copy');
|
|
1158
|
+
if (allowedOperationsBits & $103790afe9474d1c$export$60b7b4bcf3903d8e.link) allowedOperations.push('link');
|
|
1159
|
+
return allowedOperations;
|
|
1160
|
+
}
|
|
1797
1161
|
|
|
1798
|
-
return $f2f44a26f7541d104d10e68c115a897a$export$registerDropTarget({
|
|
1799
|
-
element: ref.current,
|
|
1800
1162
|
|
|
1801
|
-
|
|
1802
|
-
if (localState.state.target) {
|
|
1803
|
-
return localState.state.getDropOperation(localState.state.target, types, allowedOperations);
|
|
1804
|
-
} // Check if any of the targets accept the drop.
|
|
1805
|
-
// TODO: should we have a faster way of doing this or e.g. for pagination?
|
|
1163
|
+
var $4b52e4eff84e5217$exports = {};
|
|
1806
1164
|
|
|
1165
|
+
$parcel$export($4b52e4eff84e5217$exports, "useDroppableCollection", () => $4b52e4eff84e5217$export$f4e2f423c21f7b04);
|
|
1807
1166
|
|
|
1808
|
-
let target = nextValidTarget(null, types, allowedOperations, getNextTarget);
|
|
1809
|
-
return target ? 'move' : 'cancel';
|
|
1810
|
-
},
|
|
1811
1167
|
|
|
1812
|
-
onDropEnter(e, drag) {
|
|
1813
|
-
let types = $daf765036c8e081b3420fc4f613ad96$export$getTypes(drag.items);
|
|
1814
|
-
let selectionManager = localState.state.selectionManager;
|
|
1815
|
-
let target; // When entering the droppable collection for the first time, the default drop target
|
|
1816
|
-
// is after the focused key.
|
|
1817
1168
|
|
|
1818
|
-
let key = selectionManager.focusedKey;
|
|
1819
|
-
let dropPosition = 'after'; // If the focused key is a cell, get the parent item instead.
|
|
1820
|
-
// For now, we assume that individual cells cannot be dropped on.
|
|
1821
1169
|
|
|
1822
|
-
let item = localState.state.collection.getItem(key);
|
|
1823
1170
|
|
|
1824
|
-
if ((item == null ? void 0 : item.type) === 'cell') {
|
|
1825
|
-
key = item.parentKey;
|
|
1826
|
-
} // If the focused item is also selected, the default drop target is after the last selected item.
|
|
1827
|
-
// But if the focused key is the first selected item, then default to before the first selected item.
|
|
1828
|
-
// This is to make reordering lists slightly easier. If you select top down, we assume you want to
|
|
1829
|
-
// move the items down. If you select bottom up, we assume you want to move the items up.
|
|
1830
1171
|
|
|
1831
1172
|
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1173
|
+
const $80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE = 20;
|
|
1174
|
+
function $80d9daea3067eff3$export$6323452ca4533ed8(ref) {
|
|
1175
|
+
let scrollableRef = $fP8tg$useRef(null);
|
|
1176
|
+
$fP8tg$useEffect(()=>{
|
|
1177
|
+
if (ref.current) scrollableRef.current = $fP8tg$getScrollParent(ref.current);
|
|
1178
|
+
}, [
|
|
1179
|
+
ref
|
|
1180
|
+
]);
|
|
1181
|
+
let state = $fP8tg$useRef({
|
|
1182
|
+
timer: null,
|
|
1183
|
+
dx: 0,
|
|
1184
|
+
dy: 0
|
|
1185
|
+
}).current;
|
|
1186
|
+
let scroll = $fP8tg$useCallback(()=>{
|
|
1187
|
+
scrollableRef.current.scrollLeft += state.dx;
|
|
1188
|
+
scrollableRef.current.scrollTop += state.dy;
|
|
1189
|
+
if (state.timer) state.timer = requestAnimationFrame(scroll);
|
|
1190
|
+
}, [
|
|
1191
|
+
scrollableRef,
|
|
1192
|
+
state
|
|
1193
|
+
]);
|
|
1194
|
+
return {
|
|
1195
|
+
move (x, y) {
|
|
1196
|
+
// Most browsers auto scroll natively, but WebKit on macOS does not (iOS does 🤷♂️).
|
|
1197
|
+
// https://bugs.webkit.org/show_bug.cgi?id=222636
|
|
1198
|
+
if (!$fP8tg$isWebKit() || $fP8tg$isIOS() || !scrollableRef.current) return;
|
|
1199
|
+
let box = scrollableRef.current.getBoundingClientRect();
|
|
1200
|
+
let left = $80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE;
|
|
1201
|
+
let top = $80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE;
|
|
1202
|
+
let bottom = box.height - $80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE;
|
|
1203
|
+
let right = box.width - $80d9daea3067eff3$var$AUTOSCROLL_AREA_SIZE;
|
|
1204
|
+
if (x < left || x > right || y < top || y > bottom) {
|
|
1205
|
+
if (x < left) state.dx = x - left;
|
|
1206
|
+
else if (x > right) state.dx = x - right;
|
|
1207
|
+
if (y < top) state.dy = y - top;
|
|
1208
|
+
else if (y > bottom) state.dy = y - bottom;
|
|
1209
|
+
if (!state.timer) state.timer = requestAnimationFrame(scroll);
|
|
1210
|
+
} else this.stop();
|
|
1211
|
+
},
|
|
1212
|
+
stop () {
|
|
1213
|
+
if (state.timer) {
|
|
1214
|
+
cancelAnimationFrame(state.timer);
|
|
1215
|
+
state.timer = null;
|
|
1216
|
+
}
|
|
1838
1217
|
}
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1839
1220
|
|
|
1840
|
-
if (key != null) {
|
|
1841
|
-
target = {
|
|
1842
|
-
type: 'item',
|
|
1843
|
-
key,
|
|
1844
|
-
dropPosition
|
|
1845
|
-
}; // If the default target is not valid, find the next one that is.
|
|
1846
|
-
|
|
1847
|
-
if (localState.state.getDropOperation(target, types, drag.allowedDropOperations) === 'cancel') {
|
|
1848
|
-
var _nextValidTarget;
|
|
1849
1221
|
|
|
1850
|
-
target = (_nextValidTarget = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false)) != null ? _nextValidTarget : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
|
|
1851
|
-
}
|
|
1852
|
-
} // If no focused key, then start from the root.
|
|
1853
1222
|
|
|
1854
1223
|
|
|
1855
|
-
|
|
1856
|
-
|
|
1224
|
+
const $4b52e4eff84e5217$var$DROP_POSITIONS = [
|
|
1225
|
+
'before',
|
|
1226
|
+
'on',
|
|
1227
|
+
'after'
|
|
1228
|
+
];
|
|
1229
|
+
function $4b52e4eff84e5217$export$f4e2f423c21f7b04(props, state1, ref2) {
|
|
1230
|
+
let localState = $fP8tg$useRef({
|
|
1231
|
+
props: props,
|
|
1232
|
+
state: state1,
|
|
1233
|
+
nextTarget: null,
|
|
1234
|
+
dropOperation: null
|
|
1235
|
+
}).current;
|
|
1236
|
+
localState.props = props;
|
|
1237
|
+
localState.state = state1;
|
|
1238
|
+
let autoScroll = $80d9daea3067eff3$export$6323452ca4533ed8(ref2);
|
|
1239
|
+
let { dropProps: dropProps } = $5c06e4929e123553$export$ccdee5eaf73cf661({
|
|
1240
|
+
ref: ref2,
|
|
1241
|
+
onDropEnter (e) {
|
|
1242
|
+
let target = props.getDropTargetFromPoint(e.x, e.y);
|
|
1243
|
+
state1.setTarget(target);
|
|
1244
|
+
},
|
|
1245
|
+
onDropMove (e) {
|
|
1246
|
+
state1.setTarget(localState.nextTarget);
|
|
1247
|
+
autoScroll.move(e.x, e.y);
|
|
1248
|
+
},
|
|
1249
|
+
getDropOperationForPoint (types, allowedOperations, x, y) {
|
|
1250
|
+
let target = props.getDropTargetFromPoint(x, y);
|
|
1251
|
+
if (!target) {
|
|
1252
|
+
localState.dropOperation = 'cancel';
|
|
1253
|
+
localState.nextTarget = null;
|
|
1254
|
+
return 'cancel';
|
|
1255
|
+
}
|
|
1256
|
+
if (state1.isDropTarget(target)) {
|
|
1257
|
+
localState.nextTarget = target;
|
|
1258
|
+
return localState.dropOperation;
|
|
1259
|
+
}
|
|
1260
|
+
localState.dropOperation = state1.getDropOperation(target, types, allowedOperations);
|
|
1261
|
+
// If the target doesn't accept the drop, see if the root accepts it instead.
|
|
1262
|
+
if (localState.dropOperation === 'cancel') {
|
|
1263
|
+
let rootTarget = {
|
|
1264
|
+
type: 'root'
|
|
1265
|
+
};
|
|
1266
|
+
let dropOperation = state1.getDropOperation(rootTarget, types, allowedOperations);
|
|
1267
|
+
if (dropOperation !== 'cancel') {
|
|
1268
|
+
target = rootTarget;
|
|
1269
|
+
localState.dropOperation = dropOperation;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
localState.nextTarget = localState.dropOperation === 'cancel' ? null : target;
|
|
1273
|
+
return localState.dropOperation;
|
|
1274
|
+
},
|
|
1275
|
+
onDropExit () {
|
|
1276
|
+
state1.setTarget(null);
|
|
1277
|
+
autoScroll.stop();
|
|
1278
|
+
},
|
|
1279
|
+
onDropActivate (e) {
|
|
1280
|
+
var ref, ref1;
|
|
1281
|
+
if (((ref = state1.target) === null || ref === void 0 ? void 0 : ref.type) === 'item' && ((ref1 = state1.target) === null || ref1 === void 0 ? void 0 : ref1.dropPosition) === 'on' && typeof props.onDropActivate === 'function') props.onDropActivate({
|
|
1282
|
+
type: 'dropactivate',
|
|
1283
|
+
x: e.x,
|
|
1284
|
+
y: e.y,
|
|
1285
|
+
target: state1.target
|
|
1286
|
+
});
|
|
1287
|
+
},
|
|
1288
|
+
onDrop (e) {
|
|
1289
|
+
if (state1.target && typeof props.onDrop === 'function') onDrop(e, state1.target);
|
|
1857
1290
|
}
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
localState.props.onDropActivate({
|
|
1875
|
-
type: 'dropactivate',
|
|
1291
|
+
});
|
|
1292
|
+
let droppingState = $fP8tg$useRef(null);
|
|
1293
|
+
let onDrop = $fP8tg$useCallback((e, target)=>{
|
|
1294
|
+
let { state: state2 } = localState;
|
|
1295
|
+
// Focus the collection.
|
|
1296
|
+
state2.selectionManager.setFocused(true);
|
|
1297
|
+
// Save some state of the collection/selection before the drop occurs so we can compare later.
|
|
1298
|
+
let focusedKey = state2.selectionManager.focusedKey;
|
|
1299
|
+
droppingState.current = {
|
|
1300
|
+
timeout: null,
|
|
1301
|
+
focusedKey: focusedKey,
|
|
1302
|
+
collection: state2.collection,
|
|
1303
|
+
selectedKeys: state2.selectionManager.selectedKeys
|
|
1304
|
+
};
|
|
1305
|
+
localState.props.onDrop({
|
|
1306
|
+
type: 'drop',
|
|
1876
1307
|
x: e.x,
|
|
1877
|
-
// todo
|
|
1878
1308
|
y: e.y,
|
|
1879
|
-
target:
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1309
|
+
target: target,
|
|
1310
|
+
items: e.items,
|
|
1311
|
+
dropOperation: e.dropOperation
|
|
1312
|
+
});
|
|
1313
|
+
// Wait for a short time period after the onDrop is called to allow the data to be read asynchronously
|
|
1314
|
+
// and for React to re-render. If an insert occurs during this time, it will be selected/focused below.
|
|
1315
|
+
// If items are not "immediately" inserted by the onDrop handler, the application will need to handle
|
|
1316
|
+
// selecting and focusing those items themselves.
|
|
1317
|
+
droppingState.current.timeout = setTimeout(()=>{
|
|
1318
|
+
// If focus didn't move already (e.g. due to an insert), and the user dropped on an item,
|
|
1319
|
+
// focus that item and show the focus ring to give the user feedback that the drop occurred.
|
|
1320
|
+
// Also show the focus ring if the focused key is not selected, e.g. in case of a reorder.
|
|
1321
|
+
let { state: state } = localState;
|
|
1322
|
+
if (state.selectionManager.focusedKey === focusedKey) {
|
|
1323
|
+
if (target.type === 'item' && target.dropPosition === 'on' && state.collection.getItem(target.key) != null) {
|
|
1324
|
+
state.selectionManager.setFocusedKey(target.key);
|
|
1325
|
+
state.selectionManager.setFocused(true);
|
|
1326
|
+
$fP8tg$setInteractionModality('keyboard');
|
|
1327
|
+
} else if (!state.selectionManager.isSelected(focusedKey)) $fP8tg$setInteractionModality('keyboard');
|
|
1328
|
+
}
|
|
1329
|
+
droppingState.current = null;
|
|
1330
|
+
}, 50);
|
|
1331
|
+
}, [
|
|
1332
|
+
localState
|
|
1333
|
+
]);
|
|
1334
|
+
// eslint-disable-next-line arrow-body-style
|
|
1335
|
+
$fP8tg$useEffect(()=>{
|
|
1336
|
+
return ()=>{
|
|
1337
|
+
if (droppingState.current) clearTimeout(droppingState.current.timeout);
|
|
1338
|
+
};
|
|
1339
|
+
}, []);
|
|
1340
|
+
$fP8tg$useLayoutEffect(()=>{
|
|
1341
|
+
// If an insert occurs during a drop, we want to immediately select these items to give
|
|
1342
|
+
// feedback to the user that a drop occurred. Only do this if the selection didn't change
|
|
1343
|
+
// since the drop started so we don't override if the user or application did something.
|
|
1344
|
+
if (droppingState.current && state1.selectionManager.isFocused && state1.collection.size > droppingState.current.collection.size && state1.selectionManager.isSelectionEqual(droppingState.current.selectedKeys)) {
|
|
1345
|
+
let newKeys = new Set();
|
|
1346
|
+
for (let key of state1.collection.getKeys())if (!droppingState.current.collection.getItem(key)) newKeys.add(key);
|
|
1347
|
+
state1.selectionManager.setSelectedKeys(newKeys);
|
|
1348
|
+
// If the focused item didn't change since the drop occurred, also focus the first
|
|
1349
|
+
// inserted item. If selection is disabled, then also show the focus ring so there
|
|
1350
|
+
// is some indication that items were added.
|
|
1351
|
+
if (state1.selectionManager.focusedKey === droppingState.current.focusedKey) {
|
|
1352
|
+
let first = newKeys.keys().next().value;
|
|
1353
|
+
state1.selectionManager.setFocusedKey(first);
|
|
1354
|
+
if (state1.selectionManager.selectionMode === 'none') $fP8tg$setInteractionModality('keyboard');
|
|
1355
|
+
}
|
|
1356
|
+
droppingState.current = null;
|
|
1887
1357
|
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1358
|
+
});
|
|
1359
|
+
$fP8tg$useEffect(()=>{
|
|
1360
|
+
let getNextTarget1 = (target, wrap = true)=>{
|
|
1361
|
+
if (!target) return {
|
|
1362
|
+
type: 'root'
|
|
1363
|
+
};
|
|
1364
|
+
let { keyboardDelegate: keyboardDelegate } = localState.props;
|
|
1365
|
+
let nextKey = target.type === 'item' ? keyboardDelegate.getKeyBelow(target.key) : keyboardDelegate.getFirstKey();
|
|
1366
|
+
let dropPosition = 'before';
|
|
1367
|
+
if (target.type === 'item') {
|
|
1368
|
+
let positionIndex = $4b52e4eff84e5217$var$DROP_POSITIONS.indexOf(target.dropPosition);
|
|
1369
|
+
let nextDropPosition = $4b52e4eff84e5217$var$DROP_POSITIONS[positionIndex + 1];
|
|
1370
|
+
if (positionIndex < $4b52e4eff84e5217$var$DROP_POSITIONS.length - 1 && !(nextDropPosition === 'after' && nextKey != null)) return {
|
|
1371
|
+
type: 'item',
|
|
1372
|
+
key: target.key,
|
|
1373
|
+
dropPosition: nextDropPosition
|
|
1374
|
+
};
|
|
1375
|
+
// If the last drop position was 'after', then 'before' on the next key is equivalent.
|
|
1376
|
+
// Switch to 'on' instead.
|
|
1377
|
+
if (target.dropPosition === 'after') dropPosition = 'on';
|
|
1905
1378
|
}
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
localState.state.setTarget(target);
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
break;
|
|
1379
|
+
if (nextKey == null) {
|
|
1380
|
+
if (wrap) return {
|
|
1381
|
+
type: 'root'
|
|
1382
|
+
};
|
|
1383
|
+
return null;
|
|
1915
1384
|
}
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1385
|
+
return {
|
|
1386
|
+
type: 'item',
|
|
1387
|
+
key: nextKey,
|
|
1388
|
+
dropPosition: dropPosition
|
|
1389
|
+
};
|
|
1390
|
+
};
|
|
1391
|
+
let getPreviousTarget = (target, wrap = true)=>{
|
|
1392
|
+
let { keyboardDelegate: keyboardDelegate } = localState.props;
|
|
1393
|
+
let nextKey = (target === null || target === void 0 ? void 0 : target.type) === 'item' ? keyboardDelegate.getKeyAbove(target.key) : keyboardDelegate.getLastKey();
|
|
1394
|
+
let dropPosition = !target || target.type === 'root' ? 'after' : 'on';
|
|
1395
|
+
if ((target === null || target === void 0 ? void 0 : target.type) === 'item') {
|
|
1396
|
+
let positionIndex = $4b52e4eff84e5217$var$DROP_POSITIONS.indexOf(target.dropPosition);
|
|
1397
|
+
let nextDropPosition = $4b52e4eff84e5217$var$DROP_POSITIONS[positionIndex - 1];
|
|
1398
|
+
if (positionIndex > 0 && nextDropPosition !== 'after') return {
|
|
1399
|
+
type: 'item',
|
|
1400
|
+
key: target.key,
|
|
1401
|
+
dropPosition: nextDropPosition
|
|
1402
|
+
};
|
|
1403
|
+
// If the last drop position was 'before', then 'after' on the previous key is equivalent.
|
|
1404
|
+
// Switch to 'on' instead.
|
|
1405
|
+
if (target.dropPosition === 'before') dropPosition = 'on';
|
|
1925
1406
|
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1407
|
+
if (nextKey == null) {
|
|
1408
|
+
if (wrap) return {
|
|
1409
|
+
type: 'root'
|
|
1410
|
+
};
|
|
1411
|
+
return null;
|
|
1412
|
+
}
|
|
1413
|
+
return {
|
|
1414
|
+
type: 'item',
|
|
1415
|
+
key: nextKey,
|
|
1416
|
+
dropPosition: dropPosition
|
|
1417
|
+
};
|
|
1418
|
+
};
|
|
1419
|
+
let nextValidTarget = (target, types, allowedDropOperations, getNextTarget, wrap = true)=>{
|
|
1420
|
+
let seenRoot = 0;
|
|
1421
|
+
let operation;
|
|
1422
|
+
do {
|
|
1423
|
+
let nextTarget = getNextTarget(target, wrap);
|
|
1424
|
+
if (!nextTarget) return null;
|
|
1425
|
+
target = nextTarget;
|
|
1426
|
+
operation = localState.state.getDropOperation(nextTarget, types, allowedDropOperations);
|
|
1427
|
+
if (target.type === 'root') seenRoot++;
|
|
1428
|
+
}while (operation === 'cancel' && !localState.state.isDropTarget(target) && seenRoot < 2)
|
|
1429
|
+
if (operation === 'cancel') return null;
|
|
1430
|
+
return target;
|
|
1431
|
+
};
|
|
1432
|
+
return $67560de7c78cb232$export$c28d9fb4a54e471a({
|
|
1433
|
+
element: ref2.current,
|
|
1434
|
+
getDropOperation (types, allowedOperations) {
|
|
1435
|
+
if (localState.state.target) return localState.state.getDropOperation(localState.state.target, types, allowedOperations);
|
|
1436
|
+
// Check if any of the targets accept the drop.
|
|
1437
|
+
// TODO: should we have a faster way of doing this or e.g. for pagination?
|
|
1438
|
+
let target = nextValidTarget(null, types, allowedOperations, getNextTarget1);
|
|
1439
|
+
return target ? 'move' : 'cancel';
|
|
1440
|
+
},
|
|
1441
|
+
onDropEnter (e, drag) {
|
|
1442
|
+
let types = $7252cd45fc48c07c$export$e1d41611756c6326(drag.items);
|
|
1443
|
+
let selectionManager = localState.state.selectionManager;
|
|
1444
|
+
let target;
|
|
1445
|
+
// When entering the droppable collection for the first time, the default drop target
|
|
1446
|
+
// is after the focused key.
|
|
1447
|
+
let key = selectionManager.focusedKey;
|
|
1448
|
+
let dropPosition = 'after';
|
|
1449
|
+
// If the focused key is a cell, get the parent item instead.
|
|
1450
|
+
// For now, we assume that individual cells cannot be dropped on.
|
|
1451
|
+
let item = localState.state.collection.getItem(key);
|
|
1452
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === 'cell') key = item.parentKey;
|
|
1453
|
+
// If the focused item is also selected, the default drop target is after the last selected item.
|
|
1454
|
+
// But if the focused key is the first selected item, then default to before the first selected item.
|
|
1455
|
+
// This is to make reordering lists slightly easier. If you select top down, we assume you want to
|
|
1456
|
+
// move the items down. If you select bottom up, we assume you want to move the items up.
|
|
1457
|
+
if (selectionManager.isSelected(key)) {
|
|
1458
|
+
if (selectionManager.selectedKeys.size > 1 && selectionManager.firstSelectedKey === key) dropPosition = 'before';
|
|
1459
|
+
else key = selectionManager.lastSelectedKey;
|
|
1460
|
+
}
|
|
1461
|
+
if (key != null) {
|
|
1462
|
+
target = {
|
|
1463
|
+
type: 'item',
|
|
1464
|
+
key: key,
|
|
1465
|
+
dropPosition: dropPosition
|
|
1466
|
+
};
|
|
1467
|
+
var ref;
|
|
1468
|
+
// If the default target is not valid, find the next one that is.
|
|
1469
|
+
if (localState.state.getDropOperation(target, types, drag.allowedDropOperations) === 'cancel') target = (ref = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false)) !== null && ref !== void 0 ? ref : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
|
|
1470
|
+
}
|
|
1471
|
+
// If no focused key, then start from the root.
|
|
1472
|
+
if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
|
|
1931
1473
|
localState.state.setTarget(target);
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1474
|
+
},
|
|
1475
|
+
onDropExit () {
|
|
1476
|
+
localState.state.setTarget(null);
|
|
1477
|
+
},
|
|
1478
|
+
onDropTargetEnter (target) {
|
|
1479
|
+
localState.state.setTarget(target);
|
|
1480
|
+
},
|
|
1481
|
+
onDropActivate (e) {
|
|
1482
|
+
var ref, ref3;
|
|
1483
|
+
if (((ref = localState.state.target) === null || ref === void 0 ? void 0 : ref.type) === 'item' && ((ref3 = localState.state.target) === null || ref3 === void 0 ? void 0 : ref3.dropPosition) === 'on' && typeof localState.props.onDropActivate === 'function') localState.props.onDropActivate({
|
|
1484
|
+
type: 'dropactivate',
|
|
1485
|
+
x: e.x,
|
|
1486
|
+
y: e.y,
|
|
1487
|
+
target: localState.state.target
|
|
1488
|
+
});
|
|
1489
|
+
},
|
|
1490
|
+
onDrop (e, target) {
|
|
1491
|
+
if (localState.state.target && typeof localState.props.onDrop === 'function') onDrop(e, target || localState.state.target);
|
|
1492
|
+
},
|
|
1493
|
+
onKeyDown (e, drag) {
|
|
1494
|
+
let { keyboardDelegate: keyboardDelegate } = localState.props;
|
|
1495
|
+
let types = $7252cd45fc48c07c$export$e1d41611756c6326(drag.items);
|
|
1496
|
+
switch(e.key){
|
|
1497
|
+
case 'ArrowDown':
|
|
1498
|
+
if (keyboardDelegate.getKeyBelow) {
|
|
1499
|
+
let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getNextTarget1);
|
|
1500
|
+
localState.state.setTarget(target);
|
|
1501
|
+
}
|
|
1502
|
+
break;
|
|
1503
|
+
case 'ArrowUp':
|
|
1504
|
+
if (keyboardDelegate.getKeyAbove) {
|
|
1505
|
+
let target = nextValidTarget(localState.state.target, types, drag.allowedDropOperations, getPreviousTarget);
|
|
1506
|
+
localState.state.setTarget(target);
|
|
1507
|
+
}
|
|
1508
|
+
break;
|
|
1509
|
+
case 'Home':
|
|
1510
|
+
if (keyboardDelegate.getFirstKey) {
|
|
1511
|
+
let target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
|
|
1512
|
+
localState.state.setTarget(target);
|
|
1513
|
+
}
|
|
1514
|
+
break;
|
|
1515
|
+
case 'End':
|
|
1516
|
+
if (keyboardDelegate.getLastKey) {
|
|
1517
|
+
let target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
|
|
1518
|
+
localState.state.setTarget(target);
|
|
1519
|
+
}
|
|
1520
|
+
break;
|
|
1521
|
+
case 'PageDown':
|
|
1522
|
+
if (keyboardDelegate.getKeyPageBelow) {
|
|
1523
|
+
let target = localState.state.target;
|
|
1524
|
+
if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget1);
|
|
1525
|
+
else {
|
|
1526
|
+
// If on the root, go to the item a page below the top. Otherwise a page below the current item.
|
|
1527
|
+
let nextKey = keyboardDelegate.getKeyPageBelow(target.type === 'item' ? target.key : keyboardDelegate.getFirstKey());
|
|
1528
|
+
let dropPosition = target.type === 'item' ? target.dropPosition : 'after';
|
|
1529
|
+
// If there is no next key, or we are starting on the last key, jump to the last possible position.
|
|
1530
|
+
if (nextKey == null || target.type === 'item' && target.key === keyboardDelegate.getLastKey()) {
|
|
1531
|
+
nextKey = keyboardDelegate.getLastKey();
|
|
1532
|
+
dropPosition = 'after';
|
|
1533
|
+
}
|
|
1534
|
+
target = {
|
|
1535
|
+
type: 'item',
|
|
1536
|
+
key: nextKey,
|
|
1537
|
+
dropPosition: dropPosition
|
|
1538
|
+
};
|
|
1539
|
+
// If the target does not accept the drop, find the next valid target.
|
|
1540
|
+
// If no next valid target, find the previous valid target.
|
|
1541
|
+
let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
|
|
1542
|
+
var ref;
|
|
1543
|
+
if (operation === 'cancel') target = (ref = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false)) !== null && ref !== void 0 ? ref : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
|
|
1544
|
+
}
|
|
1545
|
+
localState.state.setTarget(target !== null && target !== void 0 ? target : localState.state.target);
|
|
1546
|
+
}
|
|
1547
|
+
break;
|
|
1548
|
+
case 'PageUp':
|
|
1549
|
+
{
|
|
1550
|
+
if (!keyboardDelegate.getKeyPageAbove) break;
|
|
1551
|
+
let target = localState.state.target;
|
|
1552
|
+
if (!target) target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
|
|
1553
|
+
else if (target.type === 'item') {
|
|
1554
|
+
// If at the top already, switch to the root. Otherwise navigate a page up.
|
|
1555
|
+
if (target.key === keyboardDelegate.getFirstKey()) target = {
|
|
1556
|
+
type: 'root'
|
|
1557
|
+
};
|
|
1558
|
+
else {
|
|
1559
|
+
let nextKey = keyboardDelegate.getKeyPageAbove(target.key);
|
|
1560
|
+
let dropPosition = target.dropPosition;
|
|
1561
|
+
if (nextKey == null) {
|
|
1562
|
+
nextKey = keyboardDelegate.getFirstKey();
|
|
1563
|
+
dropPosition = 'before';
|
|
1564
|
+
}
|
|
1565
|
+
target = {
|
|
1566
|
+
type: 'item',
|
|
1567
|
+
key: nextKey,
|
|
1568
|
+
dropPosition: dropPosition
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
// If the target does not accept the drop, find the previous valid target.
|
|
1572
|
+
// If no next valid target, find the next valid target.
|
|
1573
|
+
let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
|
|
1574
|
+
var ref4;
|
|
1575
|
+
if (operation === 'cancel') target = (ref4 = nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false)) !== null && ref4 !== void 0 ? ref4 : nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget1, false);
|
|
1576
|
+
}
|
|
1577
|
+
localState.state.setTarget(target !== null && target !== void 0 ? target : localState.state.target);
|
|
1578
|
+
break;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1935
1581
|
}
|
|
1582
|
+
});
|
|
1583
|
+
}, [
|
|
1584
|
+
localState,
|
|
1585
|
+
ref2,
|
|
1586
|
+
onDrop
|
|
1587
|
+
]);
|
|
1588
|
+
let id = $7252cd45fc48c07c$export$b1601eb39394a581(state1);
|
|
1589
|
+
return {
|
|
1590
|
+
collectionProps: $fP8tg$mergeProps(dropProps, {
|
|
1591
|
+
id: id,
|
|
1592
|
+
// Remove description from collection element. If dropping on the entire collection,
|
|
1593
|
+
// there should be a drop indicator that has this description, so no need to double announce.
|
|
1594
|
+
'aria-describedby': null
|
|
1595
|
+
})
|
|
1596
|
+
};
|
|
1597
|
+
}
|
|
1936
1598
|
|
|
1937
|
-
case 'PageDown':
|
|
1938
|
-
{
|
|
1939
|
-
if (keyboardDelegate.getKeyPageBelow) {
|
|
1940
|
-
var _target;
|
|
1941
|
-
|
|
1942
|
-
let target = localState.state.target;
|
|
1943
|
-
|
|
1944
|
-
if (!target) {
|
|
1945
|
-
target = nextValidTarget(null, types, drag.allowedDropOperations, getNextTarget);
|
|
1946
|
-
} else {
|
|
1947
|
-
// If on the root, go to the item a page below the top. Otherwise a page below the current item.
|
|
1948
|
-
let nextKey = keyboardDelegate.getKeyPageBelow(target.type === 'item' ? target.key : keyboardDelegate.getFirstKey());
|
|
1949
|
-
let dropPosition = target.type === 'item' ? target.dropPosition : 'after'; // If there is no next key, or we are starting on the last key, jump to the last possible position.
|
|
1950
|
-
|
|
1951
|
-
if (nextKey == null || target.type === 'item' && target.key === keyboardDelegate.getLastKey()) {
|
|
1952
|
-
nextKey = keyboardDelegate.getLastKey();
|
|
1953
|
-
dropPosition = 'after';
|
|
1954
|
-
}
|
|
1955
1599
|
|
|
1956
|
-
|
|
1957
|
-
type: 'item',
|
|
1958
|
-
key: nextKey,
|
|
1959
|
-
dropPosition
|
|
1960
|
-
}; // If the target does not accept the drop, find the next valid target.
|
|
1961
|
-
// If no next valid target, find the previous valid target.
|
|
1600
|
+
var $bfaab576ce1c580e$exports = {};
|
|
1962
1601
|
|
|
1963
|
-
|
|
1602
|
+
$parcel$export($bfaab576ce1c580e$exports, "useDroppableItem", () => $bfaab576ce1c580e$export$f7b0c5d28b66b6a5);
|
|
1964
1603
|
|
|
1965
|
-
if (operation === 'cancel') {
|
|
1966
|
-
var _nextValidTarget2;
|
|
1967
1604
|
|
|
1968
|
-
target = (_nextValidTarget2 = nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false)) != null ? _nextValidTarget2 : nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false);
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
1605
|
|
|
1972
|
-
localState.state.setTarget((_target = target) != null ? _target : localState.state.target);
|
|
1973
|
-
}
|
|
1974
1606
|
|
|
1975
|
-
|
|
1607
|
+
function $bfaab576ce1c580e$export$f7b0c5d28b66b6a5(options, state, ref) {
|
|
1608
|
+
let { dropProps: dropProps } = $224594fe3e57ff1e$export$62447ad3d2ec7da6();
|
|
1609
|
+
$fP8tg$useEffect(()=>{
|
|
1610
|
+
if (ref.current) return $67560de7c78cb232$export$aef80212ac99c003({
|
|
1611
|
+
element: ref.current,
|
|
1612
|
+
target: options.target,
|
|
1613
|
+
getDropOperation (types, allowedOperations) {
|
|
1614
|
+
return state.getDropOperation(options.target, types, allowedOperations);
|
|
1976
1615
|
}
|
|
1616
|
+
});
|
|
1617
|
+
}, [
|
|
1618
|
+
ref,
|
|
1619
|
+
options.target,
|
|
1620
|
+
state
|
|
1621
|
+
]);
|
|
1622
|
+
let dragSession = $67560de7c78cb232$export$418e185dd3f1b968();
|
|
1623
|
+
let isValidDropTarget = dragSession && state.getDropOperation(options.target, $7252cd45fc48c07c$export$e1d41611756c6326(dragSession.dragTarget.items), dragSession.dragTarget.allowedDropOperations) !== 'cancel';
|
|
1624
|
+
let isDropTarget = state.isDropTarget(options.target);
|
|
1625
|
+
$fP8tg$useEffect(()=>{
|
|
1626
|
+
if (dragSession && isDropTarget && ref.current) ref.current.focus();
|
|
1627
|
+
}, [
|
|
1628
|
+
isDropTarget,
|
|
1629
|
+
dragSession,
|
|
1630
|
+
ref
|
|
1631
|
+
]);
|
|
1632
|
+
return {
|
|
1633
|
+
dropProps: {
|
|
1634
|
+
...dropProps,
|
|
1635
|
+
'aria-hidden': !dragSession || isValidDropTarget ? undefined : 'true'
|
|
1636
|
+
}
|
|
1637
|
+
};
|
|
1638
|
+
}
|
|
1977
1639
|
|
|
1978
|
-
case 'PageUp':
|
|
1979
|
-
{
|
|
1980
|
-
var _target2;
|
|
1981
|
-
|
|
1982
|
-
if (!keyboardDelegate.getKeyPageAbove) {
|
|
1983
|
-
break;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
let target = localState.state.target;
|
|
1987
|
-
|
|
1988
|
-
if (!target) {
|
|
1989
|
-
target = nextValidTarget(null, types, drag.allowedDropOperations, getPreviousTarget);
|
|
1990
|
-
} else if (target.type === 'item') {
|
|
1991
|
-
// If at the top already, switch to the root. Otherwise navigate a page up.
|
|
1992
|
-
if (target.key === keyboardDelegate.getFirstKey()) {
|
|
1993
|
-
target = {
|
|
1994
|
-
type: 'root'
|
|
1995
|
-
};
|
|
1996
|
-
} else {
|
|
1997
|
-
let nextKey = keyboardDelegate.getKeyPageAbove(target.key);
|
|
1998
|
-
let dropPosition = target.dropPosition;
|
|
1999
|
-
|
|
2000
|
-
if (nextKey == null) {
|
|
2001
|
-
nextKey = keyboardDelegate.getFirstKey();
|
|
2002
|
-
dropPosition = 'before';
|
|
2003
|
-
}
|
|
2004
1640
|
|
|
2005
|
-
|
|
2006
|
-
type: 'item',
|
|
2007
|
-
key: nextKey,
|
|
2008
|
-
dropPosition
|
|
2009
|
-
};
|
|
2010
|
-
} // If the target does not accept the drop, find the previous valid target.
|
|
2011
|
-
// If no next valid target, find the next valid target.
|
|
1641
|
+
var $ddf25448c71fc93a$exports = {};
|
|
2012
1642
|
|
|
1643
|
+
$parcel$export($ddf25448c71fc93a$exports, "useDropIndicator", () => $ddf25448c71fc93a$export$8d0e41d2815afac5);
|
|
2013
1644
|
|
|
2014
|
-
let operation = localState.state.getDropOperation(target, types, drag.allowedDropOperations);
|
|
2015
1645
|
|
|
2016
|
-
if (operation === 'cancel') {
|
|
2017
|
-
var _nextValidTarget3;
|
|
2018
1646
|
|
|
2019
|
-
target = (_nextValidTarget3 = nextValidTarget(target, types, drag.allowedDropOperations, getPreviousTarget, false)) != null ? _nextValidTarget3 : nextValidTarget(target, types, drag.allowedDropOperations, getNextTarget, false);
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
1647
|
|
|
2023
|
-
localState.state.setTarget((_target2 = target) != null ? _target2 : localState.state.target);
|
|
2024
|
-
break;
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
1648
|
|
|
2029
|
-
});
|
|
2030
|
-
}, [localState, ref, onDrop]);
|
|
2031
|
-
let id = $daf765036c8e081b3420fc4f613ad96$export$useDroppableCollectionId(state);
|
|
2032
|
-
return {
|
|
2033
|
-
collectionProps: mergeProps(dropProps, {
|
|
2034
|
-
id,
|
|
2035
|
-
// Remove description from collection element. If dropping on the entire collection,
|
|
2036
|
-
// there should be a drop indicator that has this description, so no need to double announce.
|
|
2037
|
-
'aria-describedby': null
|
|
2038
|
-
})
|
|
2039
|
-
};
|
|
2040
|
-
}
|
|
2041
|
-
export function useDroppableItem(options, state, ref) {
|
|
2042
|
-
let {
|
|
2043
|
-
dropProps
|
|
2044
|
-
} = $c50618638a6eda91cf58d6698d439d4$export$useVirtualDrop();
|
|
2045
|
-
useEffect(() => {
|
|
2046
|
-
if (ref.current) {
|
|
2047
|
-
return $f2f44a26f7541d104d10e68c115a897a$export$registerDropItem({
|
|
2048
|
-
element: ref.current,
|
|
2049
|
-
target: options.target,
|
|
2050
|
-
|
|
2051
|
-
getDropOperation(types, allowedOperations) {
|
|
2052
|
-
return state.getDropOperation(options.target, types, allowedOperations);
|
|
2053
|
-
}
|
|
2054
1649
|
|
|
2055
|
-
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
const $e65309df38042ad25da81b54d9192642$var$intlMessages = {
|
|
2074
|
-
"ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
|
|
2075
|
-
"bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
|
|
2076
|
-
"cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
|
|
2077
|
-
"da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
|
|
2078
|
-
"de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
|
|
2079
|
-
"el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
|
|
2080
|
-
"en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
|
|
2081
|
-
"es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
|
|
2082
|
-
"et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
|
|
2083
|
-
"fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
|
|
2084
|
-
"fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
|
|
2085
|
-
"he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
|
|
2086
|
-
"hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
|
|
2087
|
-
"hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
|
|
2088
|
-
"it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
|
|
2089
|
-
"ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
|
|
2090
|
-
"ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
|
|
2091
|
-
"lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
|
|
2092
|
-
"lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
|
|
2093
|
-
"nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
|
|
2094
|
-
"nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
|
|
2095
|
-
"pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
|
|
2096
|
-
"pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
|
|
2097
|
-
"pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
|
|
2098
|
-
"ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
|
|
2099
|
-
"ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
|
|
2100
|
-
"sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
|
|
2101
|
-
"sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
|
|
2102
|
-
"sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
|
|
2103
|
-
"sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
|
|
2104
|
-
"tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
|
|
2105
|
-
"uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
|
|
2106
|
-
"zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
|
|
2107
|
-
"zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
|
|
2108
|
-
};
|
|
2109
|
-
export function useDropIndicator(props, state, ref) {
|
|
2110
|
-
let {
|
|
2111
|
-
target
|
|
2112
|
-
} = props;
|
|
2113
|
-
let {
|
|
2114
|
-
collection
|
|
2115
|
-
} = state;
|
|
2116
|
-
let formatMessage = useMessageFormatter($e65309df38042ad25da81b54d9192642$var$intlMessages);
|
|
2117
|
-
let dragSession = $f2f44a26f7541d104d10e68c115a897a$export$useDragSession();
|
|
2118
|
-
let {
|
|
2119
|
-
dropProps
|
|
2120
|
-
} = useDroppableItem(props, state, ref);
|
|
2121
|
-
let id = useId();
|
|
2122
|
-
|
|
2123
|
-
let getText = key => {
|
|
2124
|
-
var _collection$getItem;
|
|
2125
|
-
|
|
2126
|
-
return (_collection$getItem = collection.getItem(key)) == null ? void 0 : _collection$getItem.textValue;
|
|
2127
|
-
};
|
|
2128
|
-
|
|
2129
|
-
let label = '';
|
|
2130
|
-
let labelledBy;
|
|
2131
|
-
|
|
2132
|
-
if (target.type === 'root') {
|
|
2133
|
-
label = formatMessage('dropOnRoot');
|
|
2134
|
-
labelledBy = id + " " + $daf765036c8e081b3420fc4f613ad96$export$getDroppableCollectionId(state);
|
|
2135
|
-
} else if (target.dropPosition === 'on') {
|
|
2136
|
-
label = formatMessage('dropOnItem', {
|
|
2137
|
-
itemText: getText(target.key)
|
|
1650
|
+
function $ddf25448c71fc93a$export$8d0e41d2815afac5(props, state, ref1) {
|
|
1651
|
+
let { target: target } = props;
|
|
1652
|
+
let { collection: collection } = state;
|
|
1653
|
+
let formatMessage = $fP8tg$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c530af5bd0e7e6c6$exports)));
|
|
1654
|
+
let dragSession = $67560de7c78cb232$export$418e185dd3f1b968();
|
|
1655
|
+
let { dropProps: dropProps } = $bfaab576ce1c580e$export$f7b0c5d28b66b6a5(props, state, ref1);
|
|
1656
|
+
let id = $fP8tg$useId();
|
|
1657
|
+
let getText = (key)=>{
|
|
1658
|
+
var ref;
|
|
1659
|
+
return (ref = collection.getItem(key)) === null || ref === void 0 ? void 0 : ref.textValue;
|
|
1660
|
+
};
|
|
1661
|
+
let label = '';
|
|
1662
|
+
let labelledBy;
|
|
1663
|
+
if (target.type === 'root') {
|
|
1664
|
+
label = formatMessage('dropOnRoot');
|
|
1665
|
+
labelledBy = `${id} ${$7252cd45fc48c07c$export$3093291712f09a77(state)}`;
|
|
1666
|
+
} else if (target.dropPosition === 'on') label = formatMessage('dropOnItem', {
|
|
1667
|
+
itemText: getText(target.key)
|
|
2138
1668
|
});
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
} else if (after) {
|
|
2153
|
-
label = formatMessage('insertBefore', {
|
|
2154
|
-
itemText: getText(after)
|
|
2155
|
-
});
|
|
1669
|
+
else {
|
|
1670
|
+
let before = target.dropPosition === 'before' ? collection.getKeyBefore(target.key) : target.key;
|
|
1671
|
+
let after = target.dropPosition === 'after' ? collection.getKeyAfter(target.key) : target.key;
|
|
1672
|
+
if (before && after) label = formatMessage('insertBetween', {
|
|
1673
|
+
beforeItemText: getText(before),
|
|
1674
|
+
afterItemText: getText(after)
|
|
1675
|
+
});
|
|
1676
|
+
else if (before) label = formatMessage('insertAfter', {
|
|
1677
|
+
itemText: getText(before)
|
|
1678
|
+
});
|
|
1679
|
+
else if (after) label = formatMessage('insertBefore', {
|
|
1680
|
+
itemText: getText(after)
|
|
1681
|
+
});
|
|
2156
1682
|
}
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
}
|
|
2168
|
-
};
|
|
1683
|
+
return {
|
|
1684
|
+
dropIndicatorProps: {
|
|
1685
|
+
...dropProps,
|
|
1686
|
+
id: id,
|
|
1687
|
+
'aria-roledescription': formatMessage('dropIndicator'),
|
|
1688
|
+
'aria-label': label,
|
|
1689
|
+
'aria-labelledby': labelledBy,
|
|
1690
|
+
'aria-hidden': !dragSession ? 'true' : dropProps['aria-hidden'],
|
|
1691
|
+
tabIndex: -1
|
|
1692
|
+
}
|
|
1693
|
+
};
|
|
2169
1694
|
}
|
|
2170
|
-
// @ts-ignore
|
|
2171
|
-
const $c31f32db0058c09f3d7ccaba0e954c$var$intlMessages = {
|
|
2172
|
-
"ar-AE": _babelRuntimeHelpersEsmInteropRequireDefault($ea65b45ad5e7d0aed23c128bf8ad1ea2$exports).default,
|
|
2173
|
-
"bg-BG": _babelRuntimeHelpersEsmInteropRequireDefault($c92ee777c2aef6235da0efaaab60dc61$exports).default,
|
|
2174
|
-
"cs-CZ": _babelRuntimeHelpersEsmInteropRequireDefault($c9e276469924972853a3320763f673d$exports).default,
|
|
2175
|
-
"da-DK": _babelRuntimeHelpersEsmInteropRequireDefault($b0325b2aec14df95ab943ec14d3bec3b$exports).default,
|
|
2176
|
-
"de-DE": _babelRuntimeHelpersEsmInteropRequireDefault($f367814043f59b69a839ff097fd4adb8$exports).default,
|
|
2177
|
-
"el-GR": _babelRuntimeHelpersEsmInteropRequireDefault($fe8897a7011951cab52f7814c2c9684$exports).default,
|
|
2178
|
-
"en-US": _babelRuntimeHelpersEsmInteropRequireDefault($aea68b9c3ace3526527e1fc930d35d$exports).default,
|
|
2179
|
-
"es-ES": _babelRuntimeHelpersEsmInteropRequireDefault($a4319d93c8291b23c0d42dea$exports).default,
|
|
2180
|
-
"et-EE": _babelRuntimeHelpersEsmInteropRequireDefault($aa30228da98b6306a72b40036f345b$exports).default,
|
|
2181
|
-
"fi-FI": _babelRuntimeHelpersEsmInteropRequireDefault($a5a5afea8782a33461a527d7c4a$exports).default,
|
|
2182
|
-
"fr-FR": _babelRuntimeHelpersEsmInteropRequireDefault($b32fceb28c2b8e8e846140594714351f$exports).default,
|
|
2183
|
-
"he-IL": _babelRuntimeHelpersEsmInteropRequireDefault($d9bdb7d78ee35d20ae60007d2accaf5$exports).default,
|
|
2184
|
-
"hr-HR": _babelRuntimeHelpersEsmInteropRequireDefault($c14894ae7d558e9dc3011ecae5f8a96b$exports).default,
|
|
2185
|
-
"hu-HU": _babelRuntimeHelpersEsmInteropRequireDefault($f194e25a9c86722f6a3826e7ad96c717$exports).default,
|
|
2186
|
-
"it-IT": _babelRuntimeHelpersEsmInteropRequireDefault($cae04c9878c1e24b1bce5348e54e95a4$exports).default,
|
|
2187
|
-
"ja-JP": _babelRuntimeHelpersEsmInteropRequireDefault($b9679eb29e949e5727cbdcf506da08c1$exports).default,
|
|
2188
|
-
"ko-KR": _babelRuntimeHelpersEsmInteropRequireDefault($c663d68cc7455025fffd92332e200be$exports).default,
|
|
2189
|
-
"lt-LT": _babelRuntimeHelpersEsmInteropRequireDefault($d454665d97cf724871a9c3eb05$exports).default,
|
|
2190
|
-
"lv-LV": _babelRuntimeHelpersEsmInteropRequireDefault($ca66a3bcdd44dae4665871a98bb416e3$exports).default,
|
|
2191
|
-
"nb-NO": _babelRuntimeHelpersEsmInteropRequireDefault($cb7e072c8b2f7c15a7e06a7ac99163$exports).default,
|
|
2192
|
-
"nl-NL": _babelRuntimeHelpersEsmInteropRequireDefault($f9d8bf1245c4a4f581c7966119af7c$exports).default,
|
|
2193
|
-
"pl-PL": _babelRuntimeHelpersEsmInteropRequireDefault($cd07a56ec0cb160ba15542c10691829d$exports).default,
|
|
2194
|
-
"pt-BR": _babelRuntimeHelpersEsmInteropRequireDefault($a70fe1fa67e039d2646076dfb78cee1$exports).default,
|
|
2195
|
-
"pt-PT": _babelRuntimeHelpersEsmInteropRequireDefault($e37cb9bf759f35580e0f57d85e98be4b$exports).default,
|
|
2196
|
-
"ro-RO": _babelRuntimeHelpersEsmInteropRequireDefault($f4cf63884707eedcbdf4eae0b61ef1bf$exports).default,
|
|
2197
|
-
"ru-RU": _babelRuntimeHelpersEsmInteropRequireDefault($e2321eb9f531b07389bd6bfcdd631256$exports).default,
|
|
2198
|
-
"sk-SK": _babelRuntimeHelpersEsmInteropRequireDefault($ef19e5833adeee78e3c34d0f68fa9f31$exports).default,
|
|
2199
|
-
"sl-SI": _babelRuntimeHelpersEsmInteropRequireDefault($b895c4fbc849f3dcfcdb2d8899ed32b4$exports).default,
|
|
2200
|
-
"sr-SP": _babelRuntimeHelpersEsmInteropRequireDefault($b75ddb34dcfa290a634852a820c90c5$exports).default,
|
|
2201
|
-
"sv-SE": _babelRuntimeHelpersEsmInteropRequireDefault($f010cb5a3a37b4733a80a1d1f871$exports).default,
|
|
2202
|
-
"tr-TR": _babelRuntimeHelpersEsmInteropRequireDefault($a8e9337c82319ec72dd3b41245c71e1e$exports).default,
|
|
2203
|
-
"uk-UA": _babelRuntimeHelpersEsmInteropRequireDefault($e74f5b955cc9ed1ca9994fc3460$exports).default,
|
|
2204
|
-
"zh-CN": _babelRuntimeHelpersEsmInteropRequireDefault($b007023265925d07a3d47c3d12f09c5$exports).default,
|
|
2205
|
-
"zh-TW": _babelRuntimeHelpersEsmInteropRequireDefault($f4995277bc73b497cd1257981bc3$exports).default
|
|
2206
|
-
};
|
|
2207
|
-
export function useDraggableItem(props, state) {
|
|
2208
|
-
let formatMessage = useMessageFormatter($c31f32db0058c09f3d7ccaba0e954c$var$intlMessages);
|
|
2209
|
-
let {
|
|
2210
|
-
dragProps,
|
|
2211
|
-
dragButtonProps
|
|
2212
|
-
} = useDrag({
|
|
2213
|
-
getItems() {
|
|
2214
|
-
return state.getItems(props.key);
|
|
2215
|
-
},
|
|
2216
1695
|
|
|
2217
|
-
renderPreview() {
|
|
2218
|
-
return state.renderPreview(props.key);
|
|
2219
|
-
},
|
|
2220
1696
|
|
|
2221
|
-
|
|
2222
|
-
state.startDrag(props.key, e);
|
|
2223
|
-
},
|
|
1697
|
+
var $fd98cf7cbf233429$exports = {};
|
|
2224
1698
|
|
|
2225
|
-
|
|
2226
|
-
state.moveDrag(e);
|
|
2227
|
-
},
|
|
1699
|
+
$parcel$export($fd98cf7cbf233429$exports, "useDraggableItem", () => $fd98cf7cbf233429$export$b35afafff42da2d9);
|
|
2228
1700
|
|
|
2229
|
-
onDragEnd(e) {
|
|
2230
|
-
state.endDrag(e);
|
|
2231
|
-
}
|
|
2232
1701
|
|
|
2233
|
-
});
|
|
2234
|
-
let item = state.collection.getItem(props.key);
|
|
2235
|
-
let numSelectedKeys = state.selectionManager.selectedKeys.size;
|
|
2236
|
-
let isSelected = state.selectionManager.isSelected(props.key);
|
|
2237
|
-
let message;
|
|
2238
1702
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
1703
|
+
function $fd98cf7cbf233429$export$b35afafff42da2d9(props, state) {
|
|
1704
|
+
let formatMessage = $fP8tg$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c530af5bd0e7e6c6$exports)));
|
|
1705
|
+
let { dragProps: dragProps , dragButtonProps: dragButtonProps } = $8253ed7ece74b463$export$7941f8aafa4b6021({
|
|
1706
|
+
getItems () {
|
|
1707
|
+
return state.getItems(props.key);
|
|
1708
|
+
},
|
|
1709
|
+
renderPreview () {
|
|
1710
|
+
return state.renderPreview(props.key);
|
|
1711
|
+
},
|
|
1712
|
+
onDragStart (e) {
|
|
1713
|
+
state.startDrag(props.key, e);
|
|
1714
|
+
},
|
|
1715
|
+
onDragMove (e) {
|
|
1716
|
+
state.moveDrag(e);
|
|
1717
|
+
},
|
|
1718
|
+
onDragEnd (e) {
|
|
1719
|
+
state.endDrag(e);
|
|
1720
|
+
}
|
|
2242
1721
|
});
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
message
|
|
2247
|
-
|
|
1722
|
+
let item = state.collection.getItem(props.key);
|
|
1723
|
+
let numSelectedKeys = state.selectionManager.selectedKeys.size;
|
|
1724
|
+
let isSelected = state.selectionManager.isSelected(props.key);
|
|
1725
|
+
let message;
|
|
1726
|
+
var ref;
|
|
1727
|
+
if (isSelected && numSelectedKeys > 1) message = formatMessage('dragSelectedItems', {
|
|
1728
|
+
count: numSelectedKeys
|
|
2248
1729
|
});
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
}
|
|
2258
|
-
const $c53884c4f6104c585fa0d7b24981b682$var$globalEvents = new Map();
|
|
2259
|
-
|
|
2260
|
-
function $c53884c4f6104c585fa0d7b24981b682$var$addGlobalEventListener(event, fn) {
|
|
2261
|
-
let eventData = $c53884c4f6104c585fa0d7b24981b682$var$globalEvents.get(event);
|
|
2262
|
-
|
|
2263
|
-
if (!eventData) {
|
|
2264
|
-
let handlers = new Set();
|
|
2265
|
-
|
|
2266
|
-
let listener = e => {
|
|
2267
|
-
for (let handler of handlers) {
|
|
2268
|
-
handler(e);
|
|
2269
|
-
}
|
|
2270
|
-
};
|
|
2271
|
-
|
|
2272
|
-
eventData = {
|
|
2273
|
-
listener,
|
|
2274
|
-
handlers
|
|
1730
|
+
else message = formatMessage('dragItem', {
|
|
1731
|
+
itemText: (ref = item === null || item === void 0 ? void 0 : item.textValue) !== null && ref !== void 0 ? ref : ''
|
|
1732
|
+
});
|
|
1733
|
+
return {
|
|
1734
|
+
dragProps: dragProps,
|
|
1735
|
+
dragButtonProps: {
|
|
1736
|
+
...dragButtonProps,
|
|
1737
|
+
'aria-label': message
|
|
1738
|
+
}
|
|
2275
1739
|
};
|
|
2276
|
-
$c53884c4f6104c585fa0d7b24981b682$var$globalEvents.set(event, eventData);
|
|
2277
|
-
document.addEventListener(event, listener);
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
eventData.handlers.add(fn);
|
|
2281
|
-
return () => {
|
|
2282
|
-
eventData.handlers.delete(fn);
|
|
2283
|
-
|
|
2284
|
-
if (eventData.handlers.size === 0) {
|
|
2285
|
-
document.removeEventListener(event, eventData.listener);
|
|
2286
|
-
$c53884c4f6104c585fa0d7b24981b682$var$globalEvents.delete(event);
|
|
2287
|
-
}
|
|
2288
|
-
};
|
|
2289
1740
|
}
|
|
2290
1741
|
|
|
2291
|
-
export function useClipboard(options) {
|
|
2292
|
-
let ref = useRef(options);
|
|
2293
|
-
ref.current = options;
|
|
2294
|
-
let isFocusedRef = useRef(false);
|
|
2295
|
-
let {
|
|
2296
|
-
focusProps
|
|
2297
|
-
} = useFocus({
|
|
2298
|
-
onFocusChange: isFocused => {
|
|
2299
|
-
isFocusedRef.current = isFocused;
|
|
2300
|
-
}
|
|
2301
|
-
});
|
|
2302
|
-
useEffect(() => {
|
|
2303
|
-
let onBeforeCopy = e => {
|
|
2304
|
-
// Enable the "Copy" menu item in Safari if this element is focused and copying is supported.
|
|
2305
|
-
let options = ref.current;
|
|
2306
|
-
|
|
2307
|
-
if (isFocusedRef.current && options.getItems) {
|
|
2308
|
-
e.preventDefault();
|
|
2309
|
-
}
|
|
2310
|
-
};
|
|
2311
1742
|
|
|
2312
|
-
|
|
2313
|
-
let options = ref.current;
|
|
1743
|
+
var $9fcc7f0d70d084ee$exports = {};
|
|
2314
1744
|
|
|
2315
|
-
|
|
2316
|
-
return;
|
|
2317
|
-
}
|
|
1745
|
+
$parcel$export($9fcc7f0d70d084ee$exports, "useClipboard", () => $9fcc7f0d70d084ee$export$2314ca2a3e892862);
|
|
2318
1746
|
|
|
2319
|
-
e.preventDefault();
|
|
2320
|
-
$daf765036c8e081b3420fc4f613ad96$export$writeToDataTransfer(e.clipboardData, options.getItems());
|
|
2321
|
-
options.onCopy == null ? void 0 : options.onCopy();
|
|
2322
|
-
};
|
|
2323
1747
|
|
|
2324
|
-
let onBeforeCut = e => {
|
|
2325
|
-
let options = ref.current;
|
|
2326
|
-
|
|
2327
|
-
if (isFocusedRef.current && options.onCut && options.getItems) {
|
|
2328
|
-
e.preventDefault();
|
|
2329
|
-
}
|
|
2330
|
-
};
|
|
2331
1748
|
|
|
2332
|
-
let onCut = e => {
|
|
2333
|
-
let options = ref.current;
|
|
2334
1749
|
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
1750
|
+
const $9fcc7f0d70d084ee$var$globalEvents = new Map();
|
|
1751
|
+
function $9fcc7f0d70d084ee$var$addGlobalEventListener(event, fn) {
|
|
1752
|
+
let eventData = $9fcc7f0d70d084ee$var$globalEvents.get(event);
|
|
1753
|
+
if (!eventData) {
|
|
1754
|
+
let handlers = new Set();
|
|
1755
|
+
let listener = (e)=>{
|
|
1756
|
+
for (let handler of handlers)handler(e);
|
|
1757
|
+
};
|
|
1758
|
+
eventData = {
|
|
1759
|
+
listener: listener,
|
|
1760
|
+
handlers: handlers
|
|
1761
|
+
};
|
|
1762
|
+
$9fcc7f0d70d084ee$var$globalEvents.set(event, eventData);
|
|
1763
|
+
document.addEventListener(event, listener);
|
|
1764
|
+
}
|
|
1765
|
+
eventData.handlers.add(fn);
|
|
1766
|
+
return ()=>{
|
|
1767
|
+
eventData.handlers.delete(fn);
|
|
1768
|
+
if (eventData.handlers.size === 0) {
|
|
1769
|
+
document.removeEventListener(event, eventData.listener);
|
|
1770
|
+
$9fcc7f0d70d084ee$var$globalEvents.delete(event);
|
|
1771
|
+
}
|
|
2342
1772
|
};
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
1773
|
+
}
|
|
1774
|
+
function $9fcc7f0d70d084ee$export$2314ca2a3e892862(options1) {
|
|
1775
|
+
let ref = $fP8tg$useRef(options1);
|
|
1776
|
+
ref.current = options1;
|
|
1777
|
+
let isFocusedRef = $fP8tg$useRef(false);
|
|
1778
|
+
let { focusProps: focusProps } = $fP8tg$useFocus({
|
|
1779
|
+
onFocusChange: (isFocused)=>{
|
|
1780
|
+
isFocusedRef.current = isFocused;
|
|
1781
|
+
}
|
|
1782
|
+
});
|
|
1783
|
+
$fP8tg$useEffect(()=>{
|
|
1784
|
+
let onBeforeCopy = (e)=>{
|
|
1785
|
+
// Enable the "Copy" menu item in Safari if this element is focused and copying is supported.
|
|
1786
|
+
let options = ref.current;
|
|
1787
|
+
if (isFocusedRef.current && options.getItems) e.preventDefault();
|
|
1788
|
+
};
|
|
1789
|
+
let onCopy = (e)=>{
|
|
1790
|
+
var ref1;
|
|
1791
|
+
let options = ref.current;
|
|
1792
|
+
if (!isFocusedRef.current || !options.getItems) return;
|
|
1793
|
+
e.preventDefault();
|
|
1794
|
+
$7252cd45fc48c07c$export$f9c1490890ddd063(e.clipboardData, options.getItems());
|
|
1795
|
+
(ref1 = options.onCopy) === null || ref1 === void 0 ? void 0 : ref1.call(options);
|
|
1796
|
+
};
|
|
1797
|
+
let onBeforeCut = (e)=>{
|
|
1798
|
+
let options = ref.current;
|
|
1799
|
+
if (isFocusedRef.current && options.onCut && options.getItems) e.preventDefault();
|
|
1800
|
+
};
|
|
1801
|
+
let onCut = (e)=>{
|
|
1802
|
+
let options = ref.current;
|
|
1803
|
+
if (!isFocusedRef.current || !options.onCut || !options.getItems) return;
|
|
1804
|
+
e.preventDefault();
|
|
1805
|
+
$7252cd45fc48c07c$export$f9c1490890ddd063(e.clipboardData, options.getItems());
|
|
1806
|
+
options.onCut();
|
|
1807
|
+
};
|
|
1808
|
+
let onBeforePaste = (e)=>{
|
|
1809
|
+
let options = ref.current;
|
|
1810
|
+
// Unfortunately, e.clipboardData.types is not available in this event so we always
|
|
1811
|
+
// have to enable the Paste menu item even if the type of data is unsupported.
|
|
1812
|
+
if (isFocusedRef.current && options.onPaste) e.preventDefault();
|
|
1813
|
+
};
|
|
1814
|
+
let onPaste = (e)=>{
|
|
1815
|
+
let options = ref.current;
|
|
1816
|
+
if (!isFocusedRef.current || !options.onPaste) return;
|
|
1817
|
+
e.preventDefault();
|
|
1818
|
+
let items = $7252cd45fc48c07c$export$d9e760437831f8b3(e.clipboardData);
|
|
1819
|
+
options.onPaste(items);
|
|
1820
|
+
};
|
|
1821
|
+
return $fP8tg$chain($9fcc7f0d70d084ee$var$addGlobalEventListener('beforecopy', onBeforeCopy), $9fcc7f0d70d084ee$var$addGlobalEventListener('copy', onCopy), $9fcc7f0d70d084ee$var$addGlobalEventListener('beforecut', onBeforeCut), $9fcc7f0d70d084ee$var$addGlobalEventListener('cut', onCut), $9fcc7f0d70d084ee$var$addGlobalEventListener('beforepaste', onBeforePaste), $9fcc7f0d70d084ee$var$addGlobalEventListener('paste', onPaste));
|
|
1822
|
+
}, []);
|
|
1823
|
+
return {
|
|
1824
|
+
clipboardProps: focusProps
|
|
2351
1825
|
};
|
|
1826
|
+
}
|
|
2352
1827
|
|
|
2353
|
-
let onPaste = e => {
|
|
2354
|
-
let options = ref.current;
|
|
2355
1828
|
|
|
2356
|
-
if (!isFocusedRef.current || !options.onPaste) {
|
|
2357
|
-
return;
|
|
2358
|
-
}
|
|
2359
1829
|
|
|
2360
|
-
e.preventDefault();
|
|
2361
|
-
let items = $daf765036c8e081b3420fc4f613ad96$export$readFromDataTransfer(e.clipboardData);
|
|
2362
|
-
options.onPaste(items);
|
|
2363
|
-
};
|
|
2364
1830
|
|
|
2365
|
-
|
|
2366
|
-
}, []);
|
|
2367
|
-
return {
|
|
2368
|
-
clipboardProps: focusProps
|
|
2369
|
-
};
|
|
2370
|
-
}
|
|
1831
|
+
export {$8253ed7ece74b463$export$7941f8aafa4b6021 as useDrag, $5c06e4929e123553$export$ccdee5eaf73cf661 as useDrop, $4b52e4eff84e5217$export$f4e2f423c21f7b04 as useDroppableCollection, $bfaab576ce1c580e$export$f7b0c5d28b66b6a5 as useDroppableItem, $ddf25448c71fc93a$export$8d0e41d2815afac5 as useDropIndicator, $fd98cf7cbf233429$export$b35afafff42da2d9 as useDraggableItem, $9fcc7f0d70d084ee$export$2314ca2a3e892862 as useClipboard};
|
|
2371
1832
|
//# sourceMappingURL=module.js.map
|