@syncfusion/ej2-filemanager 27.1.48 → 27.1.51
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/.eslintrc.json +4 -2
- package/dist/ej2-filemanager.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js +2 -2
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +195 -154
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +195 -154
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +2 -2
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +15 -15
- package/src/file-manager/common/operations.js +189 -144
- package/src/file-manager/layout/details-view.js +2 -4
- package/src/file-manager/layout/navigation-pane.js +3 -5
- package/tslint.json +111 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.1.
|
|
3
|
+
* version : 27.1.51
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-filemanager@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-filemanager@
|
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@27.1.50",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-lQcbSmuhubN8h3u3rT6htJR/YPvo8ukcq3fp1W+F7fd6k4rDjkpqdtqkGB7+dI50eR9wlVjWFu70Dpiv3OK3yA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-filemanager",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"/@syncfusion/ej2-richtexteditor",
|
|
25
25
|
"/@syncfusion/ej2-vue-filemanager"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.1.50.tgz",
|
|
28
|
+
"_shasum": "07d479afde33def32353db2fd1079f16ca48dffd",
|
|
29
29
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
|
30
30
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~27.1.
|
|
40
|
-
"@syncfusion/ej2-buttons": "~27.1.
|
|
41
|
-
"@syncfusion/ej2-data": "~27.1.
|
|
42
|
-
"@syncfusion/ej2-grids": "~27.1.
|
|
43
|
-
"@syncfusion/ej2-inputs": "~27.1.
|
|
44
|
-
"@syncfusion/ej2-layouts": "~27.1.
|
|
45
|
-
"@syncfusion/ej2-lists": "~27.1.
|
|
46
|
-
"@syncfusion/ej2-navigations": "~27.1.
|
|
47
|
-
"@syncfusion/ej2-popups": "~27.1.
|
|
48
|
-
"@syncfusion/ej2-splitbuttons": "~27.1.
|
|
39
|
+
"@syncfusion/ej2-base": "~27.1.50",
|
|
40
|
+
"@syncfusion/ej2-buttons": "~27.1.51",
|
|
41
|
+
"@syncfusion/ej2-data": "~27.1.51",
|
|
42
|
+
"@syncfusion/ej2-grids": "~27.1.51",
|
|
43
|
+
"@syncfusion/ej2-inputs": "~27.1.50",
|
|
44
|
+
"@syncfusion/ej2-layouts": "~27.1.51",
|
|
45
|
+
"@syncfusion/ej2-lists": "~27.1.50",
|
|
46
|
+
"@syncfusion/ej2-navigations": "~27.1.51",
|
|
47
|
+
"@syncfusion/ej2-popups": "~27.1.50",
|
|
48
|
+
"@syncfusion/ej2-splitbuttons": "~27.1.50"
|
|
49
49
|
},
|
|
50
50
|
"deprecated": false,
|
|
51
51
|
"description": "Essential JS 2 FileManager Component",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
76
76
|
},
|
|
77
77
|
"typings": "index.d.ts",
|
|
78
|
-
"version": "27.1.
|
|
78
|
+
"version": "27.1.51",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -823,14 +823,7 @@ function readSuccess(parent, result, event) {
|
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
825
|
catch (error) {
|
|
826
|
-
|
|
827
|
-
files: null,
|
|
828
|
-
error: {
|
|
829
|
-
message: error.message,
|
|
830
|
-
fileExists: null
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
onFailure(parent, errorResult, 'read');
|
|
826
|
+
handleCatchError(parent, error, 'read');
|
|
834
827
|
parent.setProperties({ path: parent.oldPath }, true);
|
|
835
828
|
parent.pathNames.pop();
|
|
836
829
|
}
|
|
@@ -929,60 +922,68 @@ function createSuccess(parent, result, itemName) {
|
|
|
929
922
|
* @private
|
|
930
923
|
*/
|
|
931
924
|
function renameSuccess(parent, result) {
|
|
932
|
-
|
|
933
|
-
if (!isNOU(
|
|
934
|
-
parent.dialogObj
|
|
935
|
-
|
|
936
|
-
var args = { action: 'rename', result: result };
|
|
937
|
-
parent.trigger('success', args);
|
|
938
|
-
parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
|
|
939
|
-
var renameEventArgs = {
|
|
940
|
-
newName: parent.renamedItem.name,
|
|
941
|
-
itemData: parent.renamedItem,
|
|
942
|
-
path: parent.path
|
|
943
|
-
};
|
|
944
|
-
parent.trigger('rename', renameEventArgs);
|
|
945
|
-
if (parent.activeModule === 'navigationpane') {
|
|
946
|
-
parent.pathId.pop();
|
|
947
|
-
parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
|
|
948
|
-
read(parent, events.renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
|
|
949
|
-
parent.itemData[0] = parent.renamedItem;
|
|
950
|
-
if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
|
|
951
|
-
parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
|
|
925
|
+
try {
|
|
926
|
+
if (!isNOU(result.files)) {
|
|
927
|
+
if (!isNOU(parent.dialogObj)) {
|
|
928
|
+
parent.dialogObj.hide();
|
|
952
929
|
}
|
|
953
|
-
|
|
954
|
-
parent.
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
930
|
+
var args = { action: 'rename', result: result };
|
|
931
|
+
parent.trigger('success', args);
|
|
932
|
+
parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
|
|
933
|
+
var renameEventArgs = {
|
|
934
|
+
newName: parent.renamedItem.name,
|
|
935
|
+
itemData: parent.renamedItem,
|
|
936
|
+
path: parent.path
|
|
937
|
+
};
|
|
938
|
+
parent.trigger('rename', renameEventArgs);
|
|
939
|
+
if (parent.activeModule === 'navigationpane') {
|
|
940
|
+
parent.pathId.pop();
|
|
941
|
+
parent.itemData = [getValue(parent.pathId[parent.pathId.length - 1], parent.feParent)];
|
|
942
|
+
read(parent, events.renameEndParent, getValue('filterPath', parent.renamedItem).replace(/\\/g, '/'));
|
|
943
|
+
parent.itemData[0] = parent.renamedItem;
|
|
944
|
+
if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
|
|
945
|
+
parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
|
|
946
|
+
}
|
|
947
|
+
read(parent, events.pathChanged, parent.path === '/' ? parent.path : getValue('filterPath', parent.renamedItem).replace(/\\/g, '/') + parent.renamedItem.name + '/');
|
|
948
|
+
parent.renamedItem = null;
|
|
960
949
|
}
|
|
961
950
|
else {
|
|
962
|
-
|
|
963
|
-
|
|
951
|
+
parent.itemData = [getPathObject(parent)];
|
|
952
|
+
if (parent.breadcrumbbarModule.searchObj.value !== '') {
|
|
953
|
+
Search(parent, events.renameEnd, parent.path, parent.searchWord, parent.showHiddenItems, !parent.searchSettings.ignoreCase);
|
|
964
954
|
}
|
|
965
955
|
else {
|
|
966
|
-
|
|
956
|
+
if (parent.isFiltered) {
|
|
957
|
+
filter(parent, events.renameEnd);
|
|
958
|
+
}
|
|
959
|
+
else {
|
|
960
|
+
read(parent, events.renameEnd, parent.path);
|
|
961
|
+
}
|
|
967
962
|
}
|
|
968
963
|
}
|
|
969
964
|
}
|
|
970
|
-
}
|
|
971
|
-
else {
|
|
972
|
-
if (result.error.code === '400' && parent.dialogObj && parent.dialogObj.visible) {
|
|
973
|
-
var ele = select('#rename', parent.dialogObj.element);
|
|
974
|
-
var error = getLocaleText(parent, 'Validation-Rename-Exists').replace('{0}', '"' + parent.currentItemText + '"');
|
|
975
|
-
error = error.replace('{1}', '"' + ele.value + '"');
|
|
976
|
-
ele.parentElement.nextElementSibling.innerHTML = error;
|
|
977
|
-
var args = { action: 'rename', error: result.error };
|
|
978
|
-
parent.trigger('failure', args);
|
|
979
|
-
}
|
|
980
965
|
else {
|
|
981
|
-
if (
|
|
982
|
-
parent.dialogObj.
|
|
966
|
+
if (result.error.code === '400' && parent.dialogObj && parent.dialogObj.visible) {
|
|
967
|
+
var ele = select('#rename', parent.dialogObj.element);
|
|
968
|
+
var error = getLocaleText(parent, 'Validation-Rename-Exists').replace('{0}', '"' + parent.currentItemText + '"');
|
|
969
|
+
error = error.replace('{1}', '"' + ele.value + '"');
|
|
970
|
+
ele.parentElement.nextElementSibling.innerHTML = error;
|
|
971
|
+
var args = { action: 'rename', error: result.error };
|
|
972
|
+
parent.trigger('failure', args);
|
|
983
973
|
}
|
|
984
|
-
|
|
974
|
+
else {
|
|
975
|
+
if (!isNOU(parent.dialogObj)) {
|
|
976
|
+
parent.dialogObj.hide();
|
|
977
|
+
}
|
|
978
|
+
onFailure(parent, result, 'rename');
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
catch (error) {
|
|
983
|
+
if (!isNOU(parent.dialogObj)) {
|
|
984
|
+
parent.dialogObj.hide();
|
|
985
985
|
}
|
|
986
|
+
handleCatchError(parent, error, 'rename');
|
|
986
987
|
}
|
|
987
988
|
}
|
|
988
989
|
/* istanbul ignore next */
|
|
@@ -997,36 +998,41 @@ function renameSuccess(parent, result) {
|
|
|
997
998
|
* @private
|
|
998
999
|
*/
|
|
999
1000
|
function pasteSuccess(parent, result, path, operation) {
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1001
|
+
try {
|
|
1002
|
+
var moveorcopyEventArgs = {
|
|
1003
|
+
itemData: result.files,
|
|
1004
|
+
isCopy: operation === 'copy' ? true : false,
|
|
1005
|
+
path: path,
|
|
1006
|
+
targetData: parent.itemData[0],
|
|
1007
|
+
targetPath: parent.path
|
|
1008
|
+
};
|
|
1009
|
+
parent.trigger('move', moveorcopyEventArgs);
|
|
1010
|
+
if (result.error && result.error.fileExists) {
|
|
1011
|
+
parent.fileLength = 0;
|
|
1012
|
+
if (!isNOU(result.files)) {
|
|
1013
|
+
parent.isPasteError = true;
|
|
1014
|
+
doPasteUpdate(parent, operation, result);
|
|
1015
|
+
}
|
|
1016
|
+
createExtDialog(parent, 'DuplicateItems', result.error.fileExists);
|
|
1017
|
+
if (result.error.code === '404') {
|
|
1018
|
+
createDialog(parent, 'Error', result);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
else if (!result.error && !isNOU(result.files)) {
|
|
1022
|
+
parent.isPasteError = false;
|
|
1012
1023
|
doPasteUpdate(parent, operation, result);
|
|
1013
1024
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1025
|
+
else if (result.error && !isNOU(result.files)) {
|
|
1026
|
+
parent.isPasteError = true;
|
|
1027
|
+
doPasteUpdate(parent, operation, result);
|
|
1016
1028
|
createDialog(parent, 'Error', result);
|
|
1017
1029
|
}
|
|
1030
|
+
else {
|
|
1031
|
+
onFailure(parent, result, operation);
|
|
1032
|
+
}
|
|
1018
1033
|
}
|
|
1019
|
-
|
|
1020
|
-
parent
|
|
1021
|
-
doPasteUpdate(parent, operation, result);
|
|
1022
|
-
}
|
|
1023
|
-
else if (result.error && !isNOU(result.files)) {
|
|
1024
|
-
parent.isPasteError = true;
|
|
1025
|
-
doPasteUpdate(parent, operation, result);
|
|
1026
|
-
createDialog(parent, 'Error', result);
|
|
1027
|
-
}
|
|
1028
|
-
else {
|
|
1029
|
-
onFailure(parent, result, operation);
|
|
1034
|
+
catch (error) {
|
|
1035
|
+
handleCatchError(parent, error, operation);
|
|
1030
1036
|
}
|
|
1031
1037
|
}
|
|
1032
1038
|
/**
|
|
@@ -1039,25 +1045,30 @@ function pasteSuccess(parent, result, path, operation) {
|
|
|
1039
1045
|
* @private
|
|
1040
1046
|
*/
|
|
1041
1047
|
function deleteSuccess(parent, result, path) {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1048
|
+
try {
|
|
1049
|
+
var deleteEventArgs = {
|
|
1050
|
+
itemData: result.files,
|
|
1051
|
+
path: path
|
|
1052
|
+
};
|
|
1053
|
+
parent.trigger('delete', deleteEventArgs);
|
|
1054
|
+
if (!isNOU(result.files)) {
|
|
1055
|
+
parent.setProperties({ path: path }, true);
|
|
1056
|
+
parent.itemData = [getPathObject(parent)];
|
|
1057
|
+
read(parent, events.deleteEnd, parent.path);
|
|
1058
|
+
if (result.error) {
|
|
1059
|
+
onFailure(parent, result, 'delete');
|
|
1060
|
+
}
|
|
1061
|
+
else {
|
|
1062
|
+
var args = { action: 'delete', result: result };
|
|
1063
|
+
parent.trigger('success', args);
|
|
1064
|
+
}
|
|
1053
1065
|
}
|
|
1054
1066
|
else {
|
|
1055
|
-
|
|
1056
|
-
parent.trigger('success', args);
|
|
1067
|
+
onFailure(parent, result, 'delete');
|
|
1057
1068
|
}
|
|
1058
1069
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1070
|
+
catch (error) {
|
|
1071
|
+
handleCatchError(parent, error, 'delete');
|
|
1061
1072
|
}
|
|
1062
1073
|
}
|
|
1063
1074
|
/**
|
|
@@ -1073,13 +1084,18 @@ function deleteSuccess(parent, result, path) {
|
|
|
1073
1084
|
function detailsSuccess(
|
|
1074
1085
|
// eslint:disable-next-line
|
|
1075
1086
|
parent, result, path, operation) {
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1087
|
+
try {
|
|
1088
|
+
if (!isNOU(result.details)) {
|
|
1089
|
+
createDialog(parent, operation, null, result.details);
|
|
1090
|
+
var args = { action: 'details', result: result };
|
|
1091
|
+
parent.trigger('success', args);
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
onFailure(parent, result, 'details');
|
|
1095
|
+
}
|
|
1080
1096
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1097
|
+
catch (error) {
|
|
1098
|
+
handleCatchError(parent, error, 'details');
|
|
1083
1099
|
}
|
|
1084
1100
|
}
|
|
1085
1101
|
/**
|
|
@@ -1126,13 +1142,18 @@ export function Search(parent, event, path, searchString, showHiddenItems, caseS
|
|
|
1126
1142
|
* @private
|
|
1127
1143
|
*/
|
|
1128
1144
|
function searchSuccess(parent, result, event) {
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1145
|
+
try {
|
|
1146
|
+
if (!isNOU(result.files)) {
|
|
1147
|
+
parent.notify(event, result);
|
|
1148
|
+
var args = { action: 'search', result: result };
|
|
1149
|
+
parent.trigger('success', args);
|
|
1150
|
+
}
|
|
1151
|
+
else {
|
|
1152
|
+
onFailure(parent, result, 'search');
|
|
1153
|
+
}
|
|
1133
1154
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1155
|
+
catch (error) {
|
|
1156
|
+
handleCatchError(parent, error, 'search');
|
|
1136
1157
|
}
|
|
1137
1158
|
}
|
|
1138
1159
|
/* istanbul ignore next */
|
|
@@ -1176,49 +1197,73 @@ export function Download(parent, path, items) {
|
|
|
1176
1197
|
parent.element.removeChild(form);
|
|
1177
1198
|
}
|
|
1178
1199
|
else {
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
else {
|
|
1195
|
-
fileName_1 = parent.itemData.length > 1 ? 'files.zip' : getValue('isFile', parent.itemData[0]) ? getValue('name', parent.itemData[0]) : getValue('name', parent.itemData[0]) + '.zip';
|
|
1196
|
-
}
|
|
1197
|
-
},
|
|
1198
|
-
onSuccess: function (e) {
|
|
1199
|
-
parent.trigger('success', downloadArgs);
|
|
1200
|
-
var blob = e;
|
|
1201
|
-
var blobUrl = URL.createObjectURL(blob);
|
|
1202
|
-
var link = document.createElement('a');
|
|
1203
|
-
link.href = blobUrl;
|
|
1204
|
-
link.download = fileName_1;
|
|
1205
|
-
document.body.appendChild(link);
|
|
1206
|
-
link.click();
|
|
1207
|
-
document.body.removeChild(link);
|
|
1208
|
-
},
|
|
1209
|
-
onFailure: function (e) {
|
|
1210
|
-
var result = {
|
|
1211
|
-
error: {
|
|
1212
|
-
code: e.status.toString(),
|
|
1213
|
-
message: getLocaleText(parent, 'Network-Error') + ' ' + parent.ajaxSettings.downloadUrl
|
|
1200
|
+
try {
|
|
1201
|
+
var contentDisposition_1;
|
|
1202
|
+
var fileName_1;
|
|
1203
|
+
var fetch_1 = new Fetch({
|
|
1204
|
+
url: getValue('url', downloadArgs.ajaxSettings),
|
|
1205
|
+
type: getValue('type', downloadArgs.ajaxSettings),
|
|
1206
|
+
contentType: getValue('contentType', downloadArgs.ajaxSettings),
|
|
1207
|
+
responseType: getValue('responseType', downloadArgs.ajaxSettings),
|
|
1208
|
+
beforeSend: getValue('beforeSend', downloadArgs.ajaxSettings),
|
|
1209
|
+
onLoad: function (e) {
|
|
1210
|
+
contentDisposition_1 = e.headers.get('Content-Disposition');
|
|
1211
|
+
if (contentDisposition_1) {
|
|
1212
|
+
var filenameMatch = contentDisposition_1.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/);
|
|
1213
|
+
var extractedFilename = filenameMatch && filenameMatch[1];
|
|
1214
|
+
fileName_1 = extractedFilename ? extractedFilename.replace(/['"]/g, '') : fileName_1;
|
|
1214
1215
|
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1216
|
+
else {
|
|
1217
|
+
fileName_1 = parent.itemData.length > 1 ? 'files.zip' : getValue('isFile', parent.itemData[0]) ? getValue('name', parent.itemData[0]) : getValue('name', parent.itemData[0]) + '.zip';
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
onSuccess: function (e) {
|
|
1221
|
+
parent.trigger('success', downloadArgs);
|
|
1222
|
+
var blob = e;
|
|
1223
|
+
var blobUrl = URL.createObjectURL(blob);
|
|
1224
|
+
var link = document.createElement('a');
|
|
1225
|
+
link.href = blobUrl;
|
|
1226
|
+
link.download = fileName_1;
|
|
1227
|
+
document.body.appendChild(link);
|
|
1228
|
+
link.click();
|
|
1229
|
+
document.body.removeChild(link);
|
|
1230
|
+
},
|
|
1231
|
+
onFailure: function (e) {
|
|
1232
|
+
var result = {
|
|
1233
|
+
error: {
|
|
1234
|
+
code: e.status.toString(),
|
|
1235
|
+
message: getLocaleText(parent, 'Network-Error') + ' ' + parent.ajaxSettings.downloadUrl
|
|
1236
|
+
}
|
|
1237
|
+
};
|
|
1238
|
+
createDialog(parent, 'Error', result);
|
|
1239
|
+
parent.trigger('failure', downloadArgs);
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
fetch_1.send(JSON.stringify(downloadArgs.data));
|
|
1243
|
+
}
|
|
1244
|
+
catch (error) {
|
|
1245
|
+
handleCatchError(parent, error, 'download');
|
|
1246
|
+
}
|
|
1221
1247
|
}
|
|
1222
1248
|
}
|
|
1223
1249
|
});
|
|
1224
1250
|
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Function for on catch handler in File Manager.
|
|
1253
|
+
*
|
|
1254
|
+
* @param {IFileManager} parent - specifies the parent element.
|
|
1255
|
+
* @param {any} error - specifies the catch error.
|
|
1256
|
+
* @param {string} action - specifies the action.
|
|
1257
|
+
* @returns {void}
|
|
1258
|
+
* @private
|
|
1259
|
+
*/
|
|
1260
|
+
function handleCatchError(parent, error, action) {
|
|
1261
|
+
var errorResult = {
|
|
1262
|
+
files: null,
|
|
1263
|
+
error: {
|
|
1264
|
+
message: error.message,
|
|
1265
|
+
fileExists: null
|
|
1266
|
+
}
|
|
1267
|
+
};
|
|
1268
|
+
onFailure(parent, errorResult, action);
|
|
1269
|
+
}
|
|
@@ -1038,10 +1038,7 @@ var DetailsView = /** @class */ (function () {
|
|
|
1038
1038
|
DetailsView.prototype.createDragObj = function () {
|
|
1039
1039
|
var _this = this;
|
|
1040
1040
|
if (this.gridObj) {
|
|
1041
|
-
if (this.parent.allowDragAndDrop) {
|
|
1042
|
-
if (this.dragObj) {
|
|
1043
|
-
this.dragObj.destroy();
|
|
1044
|
-
}
|
|
1041
|
+
if (this.parent.allowDragAndDrop && isNullOrUndefined(this.dragObj)) {
|
|
1045
1042
|
this.dragObj = new Draggable(this.gridObj.element, {
|
|
1046
1043
|
cursorAt: this.parent.dragCursorPosition,
|
|
1047
1044
|
distance: 5,
|
|
@@ -1059,6 +1056,7 @@ var DetailsView = /** @class */ (function () {
|
|
|
1059
1056
|
}
|
|
1060
1057
|
else if (!this.parent.allowDragAndDrop && this.dragObj) {
|
|
1061
1058
|
this.dragObj.destroy();
|
|
1059
|
+
this.dragObj = null;
|
|
1062
1060
|
}
|
|
1063
1061
|
}
|
|
1064
1062
|
};
|
|
@@ -93,10 +93,7 @@ var NavigationPane = /** @class */ (function () {
|
|
|
93
93
|
NavigationPane.prototype.addDragDrop = function () {
|
|
94
94
|
var _this = this;
|
|
95
95
|
if (!this.parent.isMobile && this.treeObj) {
|
|
96
|
-
if (this.parent.allowDragAndDrop) {
|
|
97
|
-
if (this.dragObj) {
|
|
98
|
-
this.dragObj.destroy();
|
|
99
|
-
}
|
|
96
|
+
if (this.parent.allowDragAndDrop && isNOU(this.dragObj)) {
|
|
100
97
|
this.dragObj = new Draggable(this.treeObj.element, {
|
|
101
98
|
cursorAt: this.parent.dragCursorPosition,
|
|
102
99
|
dragTarget: '.' + CLS.FULLROW,
|
|
@@ -114,6 +111,7 @@ var NavigationPane = /** @class */ (function () {
|
|
|
114
111
|
}
|
|
115
112
|
else if (!this.parent.allowDragAndDrop && this.dragObj) {
|
|
116
113
|
this.dragObj.destroy();
|
|
114
|
+
this.dragObj = null;
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
117
|
};
|
|
@@ -623,7 +621,7 @@ var NavigationPane = /** @class */ (function () {
|
|
|
623
621
|
};
|
|
624
622
|
/* istanbul ignore next */
|
|
625
623
|
NavigationPane.prototype.checkDropPath = function (args) {
|
|
626
|
-
if (isFileSystemData(this.parent) && this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane') {
|
|
624
|
+
if (isFileSystemData(this.parent) && (this.parent.path === this.parent.dropPath || this.parent.targetModule === 'navigationpane')) {
|
|
627
625
|
return;
|
|
628
626
|
}
|
|
629
627
|
if (this.parent.hasId) {
|
package/tslint.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rules": {
|
|
3
|
+
"chai-vague-errors": true,
|
|
4
|
+
"use-isnan": true,
|
|
5
|
+
"missing-jsdoc": true,
|
|
6
|
+
"missing-optional-annotation": true,
|
|
7
|
+
"no-backbone-get-set-outside-model": true,
|
|
8
|
+
"no-banned-terms": true,
|
|
9
|
+
"no-constant-condition": true,
|
|
10
|
+
"no-control-regex": true,
|
|
11
|
+
"no-cookies": true,
|
|
12
|
+
"no-delete-expression": true,
|
|
13
|
+
"no-document-write": true,
|
|
14
|
+
"no-document-domain": true,
|
|
15
|
+
"no-disable-auto-sanitization": true,
|
|
16
|
+
"no-duplicate-case": true,
|
|
17
|
+
"no-duplicate-parameter-names": true,
|
|
18
|
+
"no-empty-interfaces": true,
|
|
19
|
+
"no-exec-script": true,
|
|
20
|
+
"no-function-constructor-with-string-args": true,
|
|
21
|
+
"no-function-expression": true,
|
|
22
|
+
"no-invalid-regexp": true,
|
|
23
|
+
"no-for-in": true,
|
|
24
|
+
"member-access": true,
|
|
25
|
+
"no-multiline-string": true,
|
|
26
|
+
"no-multiple-var-decl": true,
|
|
27
|
+
"no-unnecessary-bind": true,
|
|
28
|
+
"no-unnecessary-semicolons": true,
|
|
29
|
+
"no-octal-literal": true,
|
|
30
|
+
"no-regex-spaces": true,
|
|
31
|
+
"no-sparse-arrays": true,
|
|
32
|
+
"no-string-based-set-immediate": true,
|
|
33
|
+
"no-string-based-set-interval": true,
|
|
34
|
+
"no-unused-imports": true,
|
|
35
|
+
"no-with-statement": true,
|
|
36
|
+
"prefer-array-literal": true,
|
|
37
|
+
"promise-must-complete": false,
|
|
38
|
+
"react-no-dangerous-html": true,
|
|
39
|
+
"use-named-parameter": true,
|
|
40
|
+
"valid-typeof": true,
|
|
41
|
+
"max-func-body-length": [true, 100, {
|
|
42
|
+
"ignore-parameters-to-function-regex": "describe"
|
|
43
|
+
}],
|
|
44
|
+
"class-name": true,
|
|
45
|
+
"curly": true,
|
|
46
|
+
"eofline": false,
|
|
47
|
+
"forin": true,
|
|
48
|
+
"indent": [
|
|
49
|
+
true,
|
|
50
|
+
"spaces"
|
|
51
|
+
],
|
|
52
|
+
"label-position": true,
|
|
53
|
+
"max-line-length": [true, 140],
|
|
54
|
+
"no-arg": true,
|
|
55
|
+
"no-console": [true,
|
|
56
|
+
"debug",
|
|
57
|
+
"info",
|
|
58
|
+
"log",
|
|
59
|
+
"time",
|
|
60
|
+
"timeEnd",
|
|
61
|
+
"trace"
|
|
62
|
+
],
|
|
63
|
+
"no-construct": true,
|
|
64
|
+
"no-parameter-properties": true,
|
|
65
|
+
"no-debugger": true,
|
|
66
|
+
"no-duplicate-variable": true,
|
|
67
|
+
"no-empty": true,
|
|
68
|
+
"no-eval": true,
|
|
69
|
+
"no-string-literal": true,
|
|
70
|
+
"no-switch-case-fall-through": true,
|
|
71
|
+
"trailing-comma": true,
|
|
72
|
+
"no-trailing-whitespace": true,
|
|
73
|
+
"no-unused-expression": true,
|
|
74
|
+
"no-use-before-declare": false,
|
|
75
|
+
"no-var-requires": true,
|
|
76
|
+
"one-line": [true,
|
|
77
|
+
"check-open-brace",
|
|
78
|
+
"check-catch",
|
|
79
|
+
"check-else",
|
|
80
|
+
"check-whitespace"
|
|
81
|
+
],
|
|
82
|
+
"no-any": true,
|
|
83
|
+
"no-conditional-assignment": true,
|
|
84
|
+
"no-angle-bracket-type-assertion": false,
|
|
85
|
+
"align": [true, "parameters", "arguments", "statements"],
|
|
86
|
+
"no-empty-line-after-opening-brace": false,
|
|
87
|
+
"typedef-whitespace": [false],
|
|
88
|
+
"ban": true,
|
|
89
|
+
"quotemark": [true, "single"],
|
|
90
|
+
"semicolon": true,
|
|
91
|
+
"triple-equals": [true, "allow-null-check"],
|
|
92
|
+
"typedef": [true,
|
|
93
|
+
"call-signature",
|
|
94
|
+
"parameter",
|
|
95
|
+
"property-declaration",
|
|
96
|
+
"variable-declaration",
|
|
97
|
+
"arrow-parameter",
|
|
98
|
+
"member-variable-declaration"],
|
|
99
|
+
"variable-name": true,
|
|
100
|
+
"whitespace": [true,
|
|
101
|
+
"check-branch",
|
|
102
|
+
"check-decl",
|
|
103
|
+
"check-operator",
|
|
104
|
+
"check-separator",
|
|
105
|
+
"check-type"
|
|
106
|
+
],
|
|
107
|
+
"jsdoc-format": true,
|
|
108
|
+
"no-var-keyword": true,
|
|
109
|
+
"radix": true
|
|
110
|
+
}
|
|
111
|
+
}
|