@lvce-editor/explorer-view 2.8.0 → 2.10.0
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.
|
@@ -988,6 +988,9 @@ const fileOrFolderNameMustBeProvided = () => {
|
|
|
988
988
|
return i18nString(FileOrFolderNameMustBeProvider);
|
|
989
989
|
};
|
|
990
990
|
|
|
991
|
+
const List = 1;
|
|
992
|
+
const Input$1 = 2;
|
|
993
|
+
|
|
991
994
|
const getParentFolder = (dirents, index, root) => {
|
|
992
995
|
if (index < 0) {
|
|
993
996
|
return root;
|
|
@@ -1077,7 +1080,8 @@ const acceptCreate = async (state, newDirentType, createFn) => {
|
|
|
1077
1080
|
editingIndex: -1,
|
|
1078
1081
|
focusedIndex: insertIndex + 1,
|
|
1079
1082
|
editingType: None$5,
|
|
1080
|
-
maxLineY: newMaxlineY
|
|
1083
|
+
maxLineY: newMaxlineY,
|
|
1084
|
+
focus: List
|
|
1081
1085
|
};
|
|
1082
1086
|
};
|
|
1083
1087
|
|
|
@@ -1278,7 +1282,8 @@ const acceptRename = async state => {
|
|
|
1278
1282
|
editingType: None$5,
|
|
1279
1283
|
editingIcon: '',
|
|
1280
1284
|
focusedIndex,
|
|
1281
|
-
focused: true
|
|
1285
|
+
focused: true,
|
|
1286
|
+
focus: List
|
|
1282
1287
|
};
|
|
1283
1288
|
};
|
|
1284
1289
|
|
|
@@ -1308,7 +1313,8 @@ const cancelEdit = state => {
|
|
|
1308
1313
|
focused: true,
|
|
1309
1314
|
editingIndex: -1,
|
|
1310
1315
|
editingValue: '',
|
|
1311
|
-
editingType: None$5
|
|
1316
|
+
editingType: None$5,
|
|
1317
|
+
focus: List
|
|
1312
1318
|
};
|
|
1313
1319
|
};
|
|
1314
1320
|
|
|
@@ -2973,6 +2979,12 @@ const getDropHandler = index => {
|
|
|
2973
2979
|
}
|
|
2974
2980
|
};
|
|
2975
2981
|
|
|
2982
|
+
const getFileArray = fileList => {
|
|
2983
|
+
// @ts-ignore
|
|
2984
|
+
const files = [...fileList];
|
|
2985
|
+
return files;
|
|
2986
|
+
};
|
|
2987
|
+
|
|
2976
2988
|
const getFileHandles = async fileIds => {
|
|
2977
2989
|
const files = await invoke('FileSystemHandle.getFileHandles', fileIds);
|
|
2978
2990
|
return files;
|
|
@@ -2996,8 +3008,7 @@ const getFilePaths = async (files, platform) => {
|
|
|
2996
3008
|
|
|
2997
3009
|
const handleDrop = async (state, x, y, fileIds, fileList) => {
|
|
2998
3010
|
try {
|
|
2999
|
-
|
|
3000
|
-
const files = [...fileList];
|
|
3011
|
+
const files = getFileArray(fileList);
|
|
3001
3012
|
const fileHandles = await getFileHandles(fileIds);
|
|
3002
3013
|
const paths = await getFilePaths(files, state.platform);
|
|
3003
3014
|
const index = getIndexFromPosition(state, x, y);
|
|
@@ -3395,8 +3406,6 @@ const handleWorkspaceChange = async state => {
|
|
|
3395
3406
|
return newState;
|
|
3396
3407
|
};
|
|
3397
3408
|
|
|
3398
|
-
const Input$1 = 2;
|
|
3399
|
-
|
|
3400
3409
|
const ExplorerEditBox = FocusExplorerEditBox;
|
|
3401
3410
|
|
|
3402
3411
|
const newDirent = async (state, editingType) => {
|
|
@@ -4014,7 +4023,7 @@ const renderEventListeners = () => {
|
|
|
4014
4023
|
preventDefault: true
|
|
4015
4024
|
}, {
|
|
4016
4025
|
name: HandleEditingInput,
|
|
4017
|
-
params: ['
|
|
4026
|
+
params: ['updateEditingValue', 'event.target.value']
|
|
4018
4027
|
}, {
|
|
4019
4028
|
name: HandleContextMenu,
|
|
4020
4029
|
params: ['handleContextMenu', 'event.button', 'event.clientX', 'event.clientY'],
|