easy-file-system 1.3.116 → 1.3.120
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/example.js +2538 -2413
- package/lib/div/item/entry/directoryName.js +17 -21
- package/lib/div/item/entry/fileName.js +11 -12
- package/lib/example/view.js +3 -9
- package/lib/explorer.js +37 -43
- package/lib/item/entry/drag/directoryName.js +34 -38
- package/lib/item/entry/drag.js +22 -26
- package/lib/rubbishBin.js +29 -33
- package/package.json +3 -3
- package/src/div/item/entry/directoryName.js +11 -13
- package/src/div/item/entry/fileName.js +9 -10
- package/src/example/view.js +1 -3
- package/src/explorer.js +64 -64
- package/src/item/entry/drag/directoryName.js +57 -57
- package/src/item/entry/drag.js +34 -34
- package/src/rubbishBin.js +46 -46
- package/lib/example/constants.js +0 -13
- package/lib/example/explorer.js +0 -113
- package/lib/example/item/entry/drag/directoryName.js +0 -148
- package/src/example/constants.js +0 -3
- package/src/example/explorer.js +0 -9
- package/src/example/item/entry/drag/directoryName.js +0 -27
package/src/explorer.js
CHANGED
|
@@ -30,6 +30,53 @@ class Explorer extends Element {
|
|
|
30
30
|
return this.mounted;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
dropHandler = (dragElement, aborted, element, done) => {
|
|
34
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
35
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
36
|
+
|
|
37
|
+
if (aborted) {
|
|
38
|
+
markerEntryItemExplorer.removeMarker();
|
|
39
|
+
|
|
40
|
+
done();
|
|
41
|
+
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const dragEntryItem = dragElement; ///
|
|
46
|
+
|
|
47
|
+
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
dragOverHandler = (dragElement, element) => {
|
|
51
|
+
const dragEntryItem = dragElement, ///
|
|
52
|
+
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
53
|
+
dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);
|
|
54
|
+
|
|
55
|
+
if (dragEntryItemExplorerIgnored) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
60
|
+
dragEntryItemName = dragEntryItem.getName();
|
|
61
|
+
|
|
62
|
+
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
63
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
64
|
+
previousMarkerEntryItemPath = markerEntryItemPath, ///
|
|
65
|
+
previousMarkerEntryItemExplorer = markerEntryItemExplorer; ///
|
|
66
|
+
|
|
67
|
+
markerEntryItemPath = dragEntryItemName;///
|
|
68
|
+
|
|
69
|
+
markerEntryItemExplorer = this; ///
|
|
70
|
+
|
|
71
|
+
if ((markerEntryItemExplorer !== previousMarkerEntryItemExplorer) || (markerEntryItemPath !== previousMarkerEntryItemPath)) {
|
|
72
|
+
const dragEntryItemType = dragEntryItem.getType();
|
|
73
|
+
|
|
74
|
+
previousMarkerEntryItemExplorer.removeMarker();
|
|
75
|
+
|
|
76
|
+
markerEntryItemExplorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
33
80
|
getExplorer() {
|
|
34
81
|
const explorer = this; ///
|
|
35
82
|
|
|
@@ -129,6 +176,23 @@ class Explorer extends Element {
|
|
|
129
176
|
return directoryPaths;
|
|
130
177
|
}
|
|
131
178
|
|
|
179
|
+
dropDragEntryItem(dragEntryItem, done) {
|
|
180
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
181
|
+
dragEntryItemPath = dragEntryItem.getPath(),
|
|
182
|
+
markerEntryItemPath = markerEntryItem.getPath(),
|
|
183
|
+
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
184
|
+
sourceEntryPath = sourceEntryPathFromDragEntryItemPath(dragEntryItemPath),
|
|
185
|
+
targetEntryPath = targetEntryPathFromMarkerEntryItemPath(markerEntryItemPath),
|
|
186
|
+
pathMaps = dragEntryItem.getPathMaps(sourceEntryPath, targetEntryPath),
|
|
187
|
+
explorer = dragEntryItemExplorer; ///
|
|
188
|
+
|
|
189
|
+
this.moveDragEntryItems(pathMaps, explorer, () => {
|
|
190
|
+
this.removeMarker();
|
|
191
|
+
|
|
192
|
+
done();
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
132
196
|
moveDragEntryItem(pathMap, explorer) {
|
|
133
197
|
const { entryDirectory } = pathMap;
|
|
134
198
|
|
|
@@ -251,70 +315,6 @@ class Explorer extends Element {
|
|
|
251
315
|
this.removeEventListener(eventType, handler, element);
|
|
252
316
|
}
|
|
253
317
|
|
|
254
|
-
dropHandler(dragElement, aborted, element, done) {
|
|
255
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
256
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
257
|
-
|
|
258
|
-
if (aborted) {
|
|
259
|
-
markerEntryItemExplorer.removeMarker();
|
|
260
|
-
|
|
261
|
-
done();
|
|
262
|
-
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
const dragEntryItem = dragElement; ///
|
|
267
|
-
|
|
268
|
-
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
dragOverHandler(dragElement, element) {
|
|
272
|
-
const dragEntryItem = dragElement, ///
|
|
273
|
-
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
274
|
-
dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);
|
|
275
|
-
|
|
276
|
-
if (dragEntryItemExplorerIgnored) {
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
281
|
-
dragEntryItemName = dragEntryItem.getName();
|
|
282
|
-
|
|
283
|
-
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
284
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
285
|
-
previousMarkerEntryItemPath = markerEntryItemPath, ///
|
|
286
|
-
previousMarkerEntryItemExplorer = markerEntryItemExplorer; ///
|
|
287
|
-
|
|
288
|
-
markerEntryItemPath = dragEntryItemName;///
|
|
289
|
-
|
|
290
|
-
markerEntryItemExplorer = this; ///
|
|
291
|
-
|
|
292
|
-
if ((markerEntryItemExplorer !== previousMarkerEntryItemExplorer) || (markerEntryItemPath !== previousMarkerEntryItemPath)) {
|
|
293
|
-
const dragEntryItemType = dragEntryItem.getType();
|
|
294
|
-
|
|
295
|
-
previousMarkerEntryItemExplorer.removeMarker();
|
|
296
|
-
|
|
297
|
-
markerEntryItemExplorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
dropDragEntryItem(dragEntryItem, done) {
|
|
302
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
303
|
-
dragEntryItemPath = dragEntryItem.getPath(),
|
|
304
|
-
markerEntryItemPath = markerEntryItem.getPath(),
|
|
305
|
-
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
306
|
-
sourceEntryPath = sourceEntryPathFromDragEntryItemPath(dragEntryItemPath),
|
|
307
|
-
targetEntryPath = targetEntryPathFromMarkerEntryItemPath(markerEntryItemPath),
|
|
308
|
-
pathMaps = dragEntryItem.getPathMaps(sourceEntryPath, targetEntryPath),
|
|
309
|
-
explorer = dragEntryItemExplorer; ///
|
|
310
|
-
|
|
311
|
-
this.moveDragEntryItems(pathMaps, explorer, () => {
|
|
312
|
-
this.removeMarker();
|
|
313
|
-
|
|
314
|
-
done();
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
318
|
didMount() {
|
|
319
319
|
const { onMove, onOpen } = this.properties,
|
|
320
320
|
moveHandler = onMove, ///
|
|
@@ -12,7 +12,62 @@ import { adjustSourceEntryPath, adjustTargetEntryPath } from "../../../utilities
|
|
|
12
12
|
import { FILE_NAME_DRAG_ENTRY_TYPE, FILE_NAME_MARKER_ENTRY_TYPE, DIRECTORY_NAME_DRAG_ENTRY_TYPE, DIRECTORY_NAME_MARKER_ENTRY_TYPE } from "../../../entryTypes";
|
|
13
13
|
|
|
14
14
|
export default class DirectoryNameDragEntryItem extends DragEntryItem {
|
|
15
|
-
|
|
15
|
+
dropHandler = (dragElement, aborted, element, done) => {
|
|
16
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
17
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
18
|
+
|
|
19
|
+
if (aborted) {
|
|
20
|
+
markerEntryItemExplorer.removeMarker();
|
|
21
|
+
|
|
22
|
+
done();
|
|
23
|
+
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const dragEntryItem = dragElement; ///
|
|
28
|
+
|
|
29
|
+
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
dragOverHandler = (dragElement, element) => {
|
|
33
|
+
const collapsed = this.isCollapsed();
|
|
34
|
+
|
|
35
|
+
if (collapsed) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const path = this.getPath(),
|
|
40
|
+
explorer = this.getExplorer(),
|
|
41
|
+
dragEntryItem = dragElement, ///
|
|
42
|
+
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
43
|
+
dragEntryItemExplorerIgnored = explorer.isExplorerIgnored(dragEntryItemExplorer);
|
|
44
|
+
|
|
45
|
+
if (dragEntryItemExplorerIgnored) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
50
|
+
dragEntryItemName = dragEntryItem.getName();
|
|
51
|
+
|
|
52
|
+
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
53
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
54
|
+
previousMarkerEntryItemPath = markerEntryItemPath, ///
|
|
55
|
+
previousMarkerEntryItemExplorer = markerEntryItemExplorer; ///
|
|
56
|
+
|
|
57
|
+
markerEntryItemPath = `${path}/${dragEntryItemName}`;
|
|
58
|
+
|
|
59
|
+
markerEntryItemExplorer = explorer; ///
|
|
60
|
+
|
|
61
|
+
if ((markerEntryItemExplorer !== previousMarkerEntryItemExplorer) || (markerEntryItemPath !== previousMarkerEntryItemPath)) {
|
|
62
|
+
const dragEntryItemType = dragEntryItem.getType();
|
|
63
|
+
|
|
64
|
+
previousMarkerEntryItemExplorer.removeMarker();
|
|
65
|
+
|
|
66
|
+
markerEntryItemExplorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
isBefore(entryItem) {
|
|
16
71
|
let before;
|
|
17
72
|
|
|
18
73
|
const entryItemType = entryItem.getType();
|
|
@@ -101,61 +156,6 @@ export default class DirectoryNameDragEntryItem extends DragEntryItem {
|
|
|
101
156
|
this.setCollapsed(collapsed);
|
|
102
157
|
}
|
|
103
158
|
|
|
104
|
-
dropHandler(dragElement, aborted, element, done) {
|
|
105
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
106
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
107
|
-
|
|
108
|
-
if (aborted) {
|
|
109
|
-
markerEntryItemExplorer.removeMarker();
|
|
110
|
-
|
|
111
|
-
done();
|
|
112
|
-
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const dragEntryItem = dragElement; ///
|
|
117
|
-
|
|
118
|
-
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
dragOverHandler(dragElement, element) {
|
|
122
|
-
const collapsed = this.isCollapsed();
|
|
123
|
-
|
|
124
|
-
if (collapsed) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const path = this.getPath(),
|
|
129
|
-
explorer = this.getExplorer(),
|
|
130
|
-
dragEntryItem = dragElement, ///
|
|
131
|
-
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
132
|
-
dragEntryItemExplorerIgnored = explorer.isExplorerIgnored(dragEntryItemExplorer);
|
|
133
|
-
|
|
134
|
-
if (dragEntryItemExplorerIgnored) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
139
|
-
dragEntryItemName = dragEntryItem.getName();
|
|
140
|
-
|
|
141
|
-
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
142
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
143
|
-
previousMarkerEntryItemPath = markerEntryItemPath, ///
|
|
144
|
-
previousMarkerEntryItemExplorer = markerEntryItemExplorer; ///
|
|
145
|
-
|
|
146
|
-
markerEntryItemPath = `${path}/${dragEntryItemName}`;
|
|
147
|
-
|
|
148
|
-
markerEntryItemExplorer = explorer; ///
|
|
149
|
-
|
|
150
|
-
if ((markerEntryItemExplorer !== previousMarkerEntryItemExplorer) || (markerEntryItemPath !== previousMarkerEntryItemPath)) {
|
|
151
|
-
const dragEntryItemType = dragEntryItem.getType();
|
|
152
|
-
|
|
153
|
-
previousMarkerEntryItemExplorer.removeMarker();
|
|
154
|
-
|
|
155
|
-
markerEntryItemExplorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
159
|
didMount() {
|
|
160
160
|
const { collapsed } = this.properties;
|
|
161
161
|
|
|
@@ -193,7 +193,7 @@ export default class DirectoryNameDragEntryItem extends DragEntryItem {
|
|
|
193
193
|
ToggleButton={ToggleButton}
|
|
194
194
|
DirectoryNameSVG={DirectoryNameSVG}
|
|
195
195
|
/>,
|
|
196
|
-
<EntriesList explorer={explorer}
|
|
196
|
+
<EntriesList explorer={explorer} />
|
|
197
197
|
|
|
198
198
|
]);
|
|
199
199
|
}
|
package/src/item/entry/drag.js
CHANGED
|
@@ -10,7 +10,40 @@ import { dragEntryItemFontSize } from "../../styles";
|
|
|
10
10
|
import { adjustSourceEntryPath, adjustTargetEntryPath } from "../../utilities/pathMap";
|
|
11
11
|
|
|
12
12
|
class DragEntryItem extends EntryItem {
|
|
13
|
-
|
|
13
|
+
startDragHandler = (element) => {
|
|
14
|
+
const path = this.getPath(),
|
|
15
|
+
type = this.getType(),
|
|
16
|
+
explorer = this.getExplorer(),
|
|
17
|
+
dragEntryItemType = type, ///
|
|
18
|
+
markerEntryItemPath = path; ///
|
|
19
|
+
|
|
20
|
+
explorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
stopDragHandler = (dropElement, aborted, element, done) => {
|
|
24
|
+
if (dropElement !== null) {
|
|
25
|
+
done();
|
|
26
|
+
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
31
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
32
|
+
|
|
33
|
+
if (aborted) {
|
|
34
|
+
markerEntryItemExplorer.removeMarker();
|
|
35
|
+
|
|
36
|
+
done();
|
|
37
|
+
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const dragEntryItem = dragElement; ///
|
|
42
|
+
|
|
43
|
+
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getPathMap(sourceEntryPath, targetEntryPath) {
|
|
14
47
|
const name = this.getName();
|
|
15
48
|
|
|
16
49
|
sourceEntryPath = adjustSourceEntryPath(sourceEntryPath, name); ///
|
|
@@ -40,39 +73,6 @@ class DragEntryItem extends EntryItem {
|
|
|
40
73
|
return markerEntryItem;
|
|
41
74
|
}
|
|
42
75
|
|
|
43
|
-
startDragHandler(element) {
|
|
44
|
-
const path = this.getPath(),
|
|
45
|
-
type = this.getType(),
|
|
46
|
-
explorer = this.getExplorer(),
|
|
47
|
-
dragEntryItemType = type, ///
|
|
48
|
-
markerEntryItemPath = path; ///
|
|
49
|
-
|
|
50
|
-
explorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
stopDragHandler(dropElement, aborted, element, done) {
|
|
54
|
-
if (dropElement !== null) {
|
|
55
|
-
done();
|
|
56
|
-
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
61
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
62
|
-
|
|
63
|
-
if (aborted) {
|
|
64
|
-
markerEntryItemExplorer.removeMarker();
|
|
65
|
-
|
|
66
|
-
done();
|
|
67
|
-
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const dragEntryItem = dragElement; ///
|
|
72
|
-
|
|
73
|
-
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
76
|
didMount() {
|
|
77
77
|
this.onStartDrag(this.startDragHandler, this);
|
|
78
78
|
|
package/src/rubbishBin.js
CHANGED
|
@@ -19,6 +19,52 @@ const { forEach } = asynchronousUtilities,
|
|
|
19
19
|
{ REMOVE_EVENT_TYPE } = eventTypes;
|
|
20
20
|
|
|
21
21
|
class RubbishBin extends Element {
|
|
22
|
+
dropHandler = (dragElement, aborted, element, done) => {
|
|
23
|
+
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
24
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
25
|
+
|
|
26
|
+
if (aborted) {
|
|
27
|
+
markerEntryItemExplorer.removeMarker();
|
|
28
|
+
|
|
29
|
+
done();
|
|
30
|
+
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const dragEntryItem = dragElement; ///
|
|
35
|
+
|
|
36
|
+
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
dragOverHandler = (dragElement, element) => {
|
|
40
|
+
const dragEntryItem = dragElement, ///
|
|
41
|
+
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
42
|
+
dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);
|
|
43
|
+
|
|
44
|
+
if (dragEntryItemExplorerIgnored) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const markerEntryItem = this.retrieveMarkerEntryItem();
|
|
49
|
+
|
|
50
|
+
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
51
|
+
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
52
|
+
previousMarkerEntryItemPath = markerEntryItemPath, ///
|
|
53
|
+
previousMarkerEntryItemExplorer = markerEntryItemExplorer; ///
|
|
54
|
+
|
|
55
|
+
markerEntryItemPath = null; ///
|
|
56
|
+
|
|
57
|
+
markerEntryItemExplorer = this; ///
|
|
58
|
+
|
|
59
|
+
if ((markerEntryItemExplorer !== previousMarkerEntryItemExplorer) || (markerEntryItemPath !== previousMarkerEntryItemPath)) {
|
|
60
|
+
const dragEntryItemType = dragEntryItem.getType();
|
|
61
|
+
|
|
62
|
+
previousMarkerEntryItemExplorer.removeMarker();
|
|
63
|
+
|
|
64
|
+
markerEntryItemExplorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
22
68
|
isExplorerIgnored(explorer) {
|
|
23
69
|
const reference = explorer.getReference(),
|
|
24
70
|
ignoredReferences = this.getIgnoredReferences(),
|
|
@@ -178,52 +224,6 @@ class RubbishBin extends Element {
|
|
|
178
224
|
this.removeEventListener(eventType, handler, element);
|
|
179
225
|
}
|
|
180
226
|
|
|
181
|
-
dropHandler(dragElement, aborted, element, done) {
|
|
182
|
-
const markerEntryItem = this.retrieveMarkerEntryItem(),
|
|
183
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer();
|
|
184
|
-
|
|
185
|
-
if (aborted) {
|
|
186
|
-
markerEntryItemExplorer.removeMarker();
|
|
187
|
-
|
|
188
|
-
done();
|
|
189
|
-
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
const dragEntryItem = dragElement; ///
|
|
194
|
-
|
|
195
|
-
markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
dragOverHandler(dragElement, element) {
|
|
199
|
-
const dragEntryItem = dragElement, ///
|
|
200
|
-
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
|
201
|
-
dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);
|
|
202
|
-
|
|
203
|
-
if (dragEntryItemExplorerIgnored) {
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
const markerEntryItem = this.retrieveMarkerEntryItem();
|
|
208
|
-
|
|
209
|
-
let markerEntryItemPath = markerEntryItem.getPath(),
|
|
210
|
-
markerEntryItemExplorer = markerEntryItem.getExplorer(),
|
|
211
|
-
previousMarkerEntryItemPath = markerEntryItemPath, ///
|
|
212
|
-
previousMarkerEntryItemExplorer = markerEntryItemExplorer; ///
|
|
213
|
-
|
|
214
|
-
markerEntryItemPath = null; ///
|
|
215
|
-
|
|
216
|
-
markerEntryItemExplorer = this; ///
|
|
217
|
-
|
|
218
|
-
if ((markerEntryItemExplorer !== previousMarkerEntryItemExplorer) || (markerEntryItemPath !== previousMarkerEntryItemPath)) {
|
|
219
|
-
const dragEntryItemType = dragEntryItem.getType();
|
|
220
|
-
|
|
221
|
-
previousMarkerEntryItemExplorer.removeMarker();
|
|
222
|
-
|
|
223
|
-
markerEntryItemExplorer.addMarker(markerEntryItemPath, dragEntryItemType);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
227
|
dropDragEntryItem(dragEntryItem, done) {
|
|
228
228
|
const dragEntryItemPath = dragEntryItem.getPath(),
|
|
229
229
|
dragEntryItemExplorer = dragEntryItem.getExplorer(),
|
package/lib/example/constants.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "FORWARD_SLASH", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return FORWARD_SLASH;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var FORWARD_SLASH = "/";
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leGFtcGxlL2NvbnN0YW50cy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuZXhwb3J0IGNvbnN0IEZPUldBUkRfU0xBU0ggPSBcIi9cIjtcbiJdLCJuYW1lcyI6WyJGT1JXQVJEX1NMQVNIIl0sIm1hcHBpbmdzIjoiQUFBQSxZQUFZLENBQUM7Ozs7K0JBRUFBLGVBQWE7OztlQUFiQSxhQUFhOzs7QUFBbkIsSUFBTUEsYUFBYSxHQUFHLEdBQUcsQUFBQyJ9
|
package/lib/example/explorer.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "default", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return _class;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
var _index = require("../index");
|
|
12
|
-
var _directoryName = /*#__PURE__*/ _interopRequireDefault(require("./item/entry/drag/directoryName"));
|
|
13
|
-
function _assertThisInitialized(self) {
|
|
14
|
-
if (self === void 0) {
|
|
15
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
16
|
-
}
|
|
17
|
-
return self;
|
|
18
|
-
}
|
|
19
|
-
function _classCallCheck(instance, Constructor) {
|
|
20
|
-
if (!(instance instanceof Constructor)) {
|
|
21
|
-
throw new TypeError("Cannot call a class as a function");
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function _defineProperty(obj, key, value) {
|
|
25
|
-
if (key in obj) {
|
|
26
|
-
Object.defineProperty(obj, key, {
|
|
27
|
-
value: value,
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true,
|
|
30
|
-
writable: true
|
|
31
|
-
});
|
|
32
|
-
} else {
|
|
33
|
-
obj[key] = value;
|
|
34
|
-
}
|
|
35
|
-
return obj;
|
|
36
|
-
}
|
|
37
|
-
function _getPrototypeOf(o) {
|
|
38
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
39
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
40
|
-
};
|
|
41
|
-
return _getPrototypeOf(o);
|
|
42
|
-
}
|
|
43
|
-
function _inherits(subClass, superClass) {
|
|
44
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
45
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
46
|
-
}
|
|
47
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
48
|
-
constructor: {
|
|
49
|
-
value: subClass,
|
|
50
|
-
writable: true,
|
|
51
|
-
configurable: true
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
55
|
-
}
|
|
56
|
-
function _interopRequireDefault(obj) {
|
|
57
|
-
return obj && obj.__esModule ? obj : {
|
|
58
|
-
default: obj
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function _possibleConstructorReturn(self, call) {
|
|
62
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
63
|
-
return call;
|
|
64
|
-
}
|
|
65
|
-
return _assertThisInitialized(self);
|
|
66
|
-
}
|
|
67
|
-
function _setPrototypeOf(o, p) {
|
|
68
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
69
|
-
o.__proto__ = p;
|
|
70
|
-
return o;
|
|
71
|
-
};
|
|
72
|
-
return _setPrototypeOf(o, p);
|
|
73
|
-
}
|
|
74
|
-
var _typeof = function(obj) {
|
|
75
|
-
"@swc/helpers - typeof";
|
|
76
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
77
|
-
};
|
|
78
|
-
function _isNativeReflectConstruct() {
|
|
79
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
80
|
-
if (Reflect.construct.sham) return false;
|
|
81
|
-
if (typeof Proxy === "function") return true;
|
|
82
|
-
try {
|
|
83
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
84
|
-
return true;
|
|
85
|
-
} catch (e) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function _createSuper(Derived) {
|
|
90
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
91
|
-
return function _createSuperInternal() {
|
|
92
|
-
var Super = _getPrototypeOf(Derived), result;
|
|
93
|
-
if (hasNativeReflectConstruct) {
|
|
94
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
95
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
96
|
-
} else {
|
|
97
|
-
result = Super.apply(this, arguments);
|
|
98
|
-
}
|
|
99
|
-
return _possibleConstructorReturn(this, result);
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
var _class = /*#__PURE__*/ function(Explorer) {
|
|
103
|
-
_inherits(_class, Explorer);
|
|
104
|
-
var _super = _createSuper(_class);
|
|
105
|
-
function _class() {
|
|
106
|
-
_classCallCheck(this, _class);
|
|
107
|
-
return _super.apply(this, arguments);
|
|
108
|
-
}
|
|
109
|
-
return _class;
|
|
110
|
-
}(_index.Explorer);
|
|
111
|
-
_defineProperty(_class, "DirectoryNameDragEntryItem", _directoryName.default);
|
|
112
|
-
|
|
113
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leGFtcGxlL2V4cGxvcmVyLmpzIiwiPDxqc3gtY29uZmlnLXByYWdtYS5qcz4+Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBFeHBsb3JlciB9IGZyb20gXCIuLi9pbmRleFwiOyAgLy8vXG5cbmltcG9ydCBEaXJlY3RvcnlOYW1lRHJhZ0VudHJ5SXRlbSBmcm9tIFwiLi9pdGVtL2VudHJ5L2RyYWcvZGlyZWN0b3J5TmFtZVwiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBleHRlbmRzIEV4cGxvcmVyIHtcbiAgc3RhdGljIERpcmVjdG9yeU5hbWVEcmFnRW50cnlJdGVtID0gRGlyZWN0b3J5TmFtZURyYWdFbnRyeUl0ZW07XG59XG4iLCJSZWFjdC5jcmVhdGVFbGVtZW50Il0sIm5hbWVzIjpbIkV4cGxvcmVyIiwiRGlyZWN0b3J5TmFtZURyYWdFbnRyeUl0ZW0iXSwibWFwcGluZ3MiOiJBQUFBLFlBQVksQ0FBQzs7Ozs7Ozs7OztxQkFFWSxVQUFVO2tFQUVJLGlDQUFpQzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBRXpELElBQUEsdUJBQUE7Ozs7Ozs7O0NBRWQsQ0FGNEJBLE1BQVEsU0FBQSxDQUVwQztBQURDLHdCQUFPQyw0QkFBMEIsRUFBR0EsY0FBMEIsUUFBQSxDQUFDIn0=
|