@syncfusion/ej2-filemanager 27.1.52 → 27.1.53
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 +102 -61
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +104 -61
- 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 +11 -11
- package/src/file-manager/base/file-manager-model.d.ts +1 -1
- package/src/file-manager/base/file-manager.js +28 -5
- package/src/file-manager/common/operations.js +57 -44
- package/src/file-manager/common/utility.d.ts +1 -2
- package/src/file-manager/common/utility.js +7 -9
- package/src/file-manager/layout/details-view.js +8 -2
- package/src/file-manager/layout/large-icons-view.js +4 -1
- 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.53
|
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@27.1.
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@27.1.52",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-U0UQRAbfvPPuY5OCEXBnXOQ7iluYVdm4XEPLYmPbGyDdMFcnBlJThLH+vswhSwYthmyajeP0BiwH+WKtr7QD5Q==",
|
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-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.1.
|
28
|
-
"_shasum": "
|
27
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-27.1.52.tgz",
|
28
|
+
"_shasum": "2e674b99a75e0464193ccd790c6f4653f48be4a8",
|
29
29
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
30
30
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
31
31
|
"author": {
|
@@ -36,15 +36,15 @@
|
|
36
36
|
},
|
37
37
|
"bundleDependencies": false,
|
38
38
|
"dependencies": {
|
39
|
-
"@syncfusion/ej2-base": "~27.1.
|
40
|
-
"@syncfusion/ej2-buttons": "~27.1.
|
39
|
+
"@syncfusion/ej2-base": "~27.1.53",
|
40
|
+
"@syncfusion/ej2-buttons": "~27.1.53",
|
41
41
|
"@syncfusion/ej2-data": "~27.1.52",
|
42
|
-
"@syncfusion/ej2-grids": "~27.1.
|
42
|
+
"@syncfusion/ej2-grids": "~27.1.53",
|
43
43
|
"@syncfusion/ej2-inputs": "~27.1.50",
|
44
|
-
"@syncfusion/ej2-layouts": "~27.1.
|
44
|
+
"@syncfusion/ej2-layouts": "~27.1.53",
|
45
45
|
"@syncfusion/ej2-lists": "~27.1.50",
|
46
|
-
"@syncfusion/ej2-navigations": "~27.1.
|
47
|
-
"@syncfusion/ej2-popups": "~27.1.
|
46
|
+
"@syncfusion/ej2-navigations": "~27.1.53",
|
47
|
+
"@syncfusion/ej2-popups": "~27.1.53",
|
48
48
|
"@syncfusion/ej2-splitbuttons": "~27.1.50"
|
49
49
|
},
|
50
50
|
"deprecated": false,
|
@@ -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.53",
|
79
79
|
"sideEffects": false
|
80
80
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Component, EmitType, ModuleDeclaration, isNullOrUndefined, L10n, closest, Collection, detach, selectAll, setStyleAttribute } from '@syncfusion/ej2-base';import { Property, INotifyPropertyChanged, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Event, EventHandler, getValue, setValue } from '@syncfusion/ej2-base';import { Splitter, PanePropertiesModel } from '@syncfusion/ej2-layouts';import { Dialog, createSpinner, hideSpinner, showSpinner, BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';import { createDialog, createExtDialog } from '../pop-up/dialog';import { ToolbarSettings, ToolbarSettingsModel, AjaxSettings, NavigationPaneSettings, DetailsViewSettings } from '../models/index';import { ToolbarItem, ToolbarItemModel } from'../models/index' ;import { NavigationPaneSettingsModel, DetailsViewSettingsModel } from '../models/index';import { AjaxSettingsModel, SearchSettings, SearchSettingsModel } from '../models/index';import { Toolbar } from '../actions/toolbar';import { DetailsView } from '../layout/details-view';import { LargeIconsView } from '../layout/large-icons-view';import { Uploader, UploadingEventArgs, SelectedEventArgs, FileInfo, CancelEventArgs } from '@syncfusion/ej2-inputs';import { UploadSettingsModel } from '../models/upload-settings-model';import { UploadSettings } from '../models/upload-settings';import * as events from './constant';import * as CLS from './classes';import { read, filter, createFolder } from '../common/operations';import { ITreeView, IContextMenu, ViewType, SortOrder, FileDragEventArgs, RetryArgs, ReadArgs, FileSelectionEventArgs } from './interface';import { BeforeSendEventArgs, SuccessEventArgs, FailureEventArgs, FileLoadEventArgs, FolderCreateEventArgs, DeleteEventArgs, RenameEventArgs, MoveEventArgs, SearchEventArgs } from './interface';import { FileOpenEventArgs, FileSelectEventArgs, MenuClickEventArgs, MenuOpenEventArgs, MenuCloseEventArgs } from './interface';import { ToolbarClickEventArgs, ToolbarCreateEventArgs, UploadListCreateArgs } from './interface';import { PopupOpenCloseEventArgs, BeforePopupOpenCloseEventArgs, BeforeDownloadEventArgs, BeforeImageLoadEventArgs } from './interface';import { refresh, getPathObject, getLocaleText, setNextPath, createDeniedDialog, getCssClass } from '../common/utility';import { hasContentAccess, hasUploadAccess, updateLayout, createNewFolder, uploadItem, closePopup } from '../common/utility';import { TreeView as BaseTreeView } from '@syncfusion/ej2-navigations';import { ContextMenuSettingsModel } from '../models/contextMenu-settings-model';import { ContextMenuSettings } from '../models/contextMenu-settings';import { BreadCrumbBar } from '../actions/breadcrumb-bar';import { ContextMenu } from '../pop-up/context-menu';import { defaultLocale } from '../models/default-locale';import { PositionModel } from '@syncfusion/ej2-base/src/draggable-model';import { Virtualization } from '../actions/virtualization';import { SortComparer } from './interface';
|
1
|
+
import { Component, EmitType, ModuleDeclaration, isNullOrUndefined, L10n, closest, Collection, detach, selectAll, setStyleAttribute } from '@syncfusion/ej2-base';import { Property, INotifyPropertyChanged, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Event, EventHandler, getValue, setValue } from '@syncfusion/ej2-base';import { Splitter, PanePropertiesModel } from '@syncfusion/ej2-layouts';import { Dialog, createSpinner, hideSpinner, showSpinner, BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';import { createDialog, createExtDialog } from '../pop-up/dialog';import { ToolbarSettings, ToolbarSettingsModel, AjaxSettings, NavigationPaneSettings, DetailsViewSettings } from '../models/index';import { ToolbarItem, ToolbarItemModel } from'../models/index' ;import { NavigationPaneSettingsModel, DetailsViewSettingsModel } from '../models/index';import { AjaxSettingsModel, SearchSettings, SearchSettingsModel } from '../models/index';import { Toolbar } from '../actions/toolbar';import { DetailsView } from '../layout/details-view';import { LargeIconsView } from '../layout/large-icons-view';import { Uploader, UploadingEventArgs, SelectedEventArgs, FileInfo, CancelEventArgs } from '@syncfusion/ej2-inputs';import { UploadSettingsModel } from '../models/upload-settings-model';import { UploadSettings } from '../models/upload-settings';import * as events from './constant';import * as CLS from './classes';import { read, filter, createFolder } from '../common/operations';import { ITreeView, IContextMenu, ViewType, SortOrder, FileDragEventArgs, RetryArgs, ReadArgs, FileSelectionEventArgs } from './interface';import { BeforeSendEventArgs, SuccessEventArgs, FailureEventArgs, FileLoadEventArgs, FolderCreateEventArgs, DeleteEventArgs, RenameEventArgs, MoveEventArgs, SearchEventArgs } from './interface';import { FileOpenEventArgs, FileSelectEventArgs, MenuClickEventArgs, MenuOpenEventArgs, MenuCloseEventArgs } from './interface';import { ToolbarClickEventArgs, ToolbarCreateEventArgs, UploadListCreateArgs } from './interface';import { PopupOpenCloseEventArgs, BeforePopupOpenCloseEventArgs, BeforeDownloadEventArgs, BeforeImageLoadEventArgs } from './interface';import { refresh, getPathObject, getLocaleText, setNextPath, createDeniedDialog, getCssClass } from '../common/utility';import { hasContentAccess, hasUploadAccess, updateLayout, createNewFolder, uploadItem, closePopup } from '../common/utility';import { TreeView as BaseTreeView } from '@syncfusion/ej2-navigations';import { ColumnModel } from '@syncfusion/ej2-grids';import { ContextMenuSettingsModel } from '../models/contextMenu-settings-model';import { ContextMenuSettings } from '../models/contextMenu-settings';import { BreadCrumbBar } from '../actions/breadcrumb-bar';import { ContextMenu } from '../pop-up/context-menu';import { defaultLocale } from '../models/default-locale';import { PositionModel } from '@syncfusion/ej2-base/src/draggable-model';import { Virtualization } from '../actions/virtualization';import { SortComparer } from './interface';
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
3
3
|
|
4
4
|
/**
|
@@ -804,7 +804,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
804
804
|
*/
|
805
805
|
/* istanbul ignore next */
|
806
806
|
FileManager.prototype.onPropertyChanged = function (newProp, oldProp) {
|
807
|
+
var _this = this;
|
807
808
|
var height;
|
809
|
+
var requiresRefresh = false;
|
808
810
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
809
811
|
var prop = _a[_i];
|
810
812
|
switch (prop) {
|
@@ -815,6 +817,14 @@ var FileManager = /** @class */ (function (_super) {
|
|
815
817
|
this.allowDragAndDrop = newProp.allowDragAndDrop;
|
816
818
|
this.notify(events.modelChanged, { module: 'common', newProp: newProp, oldProp: oldProp });
|
817
819
|
break;
|
820
|
+
case 'showItemCheckBoxes':
|
821
|
+
this.showItemCheckBoxes = newProp.showItemCheckBoxes;
|
822
|
+
this.notify(events.modelChanged, { module: 'common', newProp: newProp, oldProp: oldProp });
|
823
|
+
break;
|
824
|
+
case 'enableVirtualization':
|
825
|
+
this.enableVirtualization = newProp.enableVirtualization;
|
826
|
+
requiresRefresh = true;
|
827
|
+
break;
|
818
828
|
case 'allowMultiSelection':
|
819
829
|
if (this.allowMultiSelection) {
|
820
830
|
addClass([this.element], CLS.CHECK_SELECT);
|
@@ -842,11 +852,11 @@ var FileManager = /** @class */ (function (_super) {
|
|
842
852
|
break;
|
843
853
|
case 'enableRtl':
|
844
854
|
this.enableRtl = newProp.enableRtl;
|
845
|
-
|
855
|
+
requiresRefresh = true;
|
846
856
|
break;
|
847
857
|
case 'rootAliasName':
|
848
858
|
this.rootAliasName = newProp.rootAliasName;
|
849
|
-
|
859
|
+
requiresRefresh = true;
|
850
860
|
break;
|
851
861
|
case 'height':
|
852
862
|
height = !isNOU(newProp.height) ? formatUnit(newProp.height) : newProp.height;
|
@@ -921,11 +931,21 @@ var FileManager = /** @class */ (function (_super) {
|
|
921
931
|
this.notify(events.sortByChange, {});
|
922
932
|
break;
|
923
933
|
case 'sortBy':
|
924
|
-
refresh(this);
|
925
|
-
this.notify(events.sortByChange, {});
|
926
934
|
if (this.view === 'Details') {
|
935
|
+
var columns = this.detailsViewSettings.columns;
|
936
|
+
var isValidSortField = !isNullOrUndefined(columns) &&
|
937
|
+
columns.findIndex(function (col) { return col.field === _this.sortBy; }) !== -1;
|
938
|
+
if (!isValidSortField) {
|
939
|
+
return;
|
940
|
+
}
|
941
|
+
refresh(this);
|
942
|
+
this.notify(events.sortByChange, {});
|
927
943
|
this.notify(events.sortColumn, {});
|
928
944
|
}
|
945
|
+
else {
|
946
|
+
refresh(this);
|
947
|
+
this.notify(events.sortByChange, {});
|
948
|
+
}
|
929
949
|
break;
|
930
950
|
case 'popupTarget':
|
931
951
|
if (this.uploadDialogObj) {
|
@@ -943,10 +963,13 @@ var FileManager = /** @class */ (function (_super) {
|
|
943
963
|
break;
|
944
964
|
case 'fileSystemData':
|
945
965
|
this.fileSystemData = newProp.fileSystemData;
|
946
|
-
|
966
|
+
requiresRefresh = true;
|
947
967
|
break;
|
948
968
|
}
|
949
969
|
}
|
970
|
+
if (requiresRefresh) {
|
971
|
+
this.refresh();
|
972
|
+
}
|
950
973
|
};
|
951
974
|
/* istanbul ignore next */
|
952
975
|
FileManager.prototype.ajaxSettingSetModel = function (newProp) {
|
@@ -846,13 +846,18 @@ function readSuccess(parent, result, event) {
|
|
846
846
|
* @private
|
847
847
|
*/
|
848
848
|
function filterSuccess(parent, result, event, action) {
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
849
|
+
try {
|
850
|
+
if (!isNOU(result.files)) {
|
851
|
+
parent.notify(event, result);
|
852
|
+
var args = { action: action, result: result };
|
853
|
+
parent.trigger('success', args);
|
854
|
+
}
|
855
|
+
else {
|
856
|
+
onFailure(parent, result, action);
|
857
|
+
}
|
853
858
|
}
|
854
|
-
|
855
|
-
|
859
|
+
catch (error) {
|
860
|
+
handleCatchError(parent, error, action);
|
856
861
|
}
|
857
862
|
}
|
858
863
|
/* istanbul ignore next */
|
@@ -866,51 +871,59 @@ function filterSuccess(parent, result, event, action) {
|
|
866
871
|
* @private
|
867
872
|
*/
|
868
873
|
function createSuccess(parent, result, itemName) {
|
869
|
-
|
870
|
-
if (
|
871
|
-
parent.dialogObj.hide();
|
872
|
-
}
|
873
|
-
parent.createdItem = isFileSystemData(parent) ? result.files[result.files.length - 1] : result.files[0];
|
874
|
-
parent.breadcrumbbarModule.searchObj.value = '';
|
875
|
-
var createEventArgs = {
|
876
|
-
folderName: itemName,
|
877
|
-
path: parent.path,
|
878
|
-
parentFolder: parent.itemData
|
879
|
-
};
|
880
|
-
parent.trigger('folderCreate', createEventArgs);
|
881
|
-
var args = { action: 'create', result: result };
|
882
|
-
parent.trigger('success', args);
|
883
|
-
parent.itemData = [getPathObject(parent)];
|
884
|
-
read(parent, events.createEnd, parent.path);
|
885
|
-
}
|
886
|
-
else {
|
887
|
-
if (result.error.code === '400') {
|
874
|
+
try {
|
875
|
+
if (!isNOU(result.files)) {
|
888
876
|
if (parent.dialogObj && parent.dialogObj.visible) {
|
889
|
-
|
890
|
-
var error = getLocaleText(parent, 'Validation-NewFolder-Exists').replace('{0}', '"' + ele.value + '"');
|
891
|
-
ele.parentElement.nextElementSibling.innerHTML = error;
|
892
|
-
}
|
893
|
-
else {
|
894
|
-
var result_2 = {
|
895
|
-
files: null,
|
896
|
-
error: {
|
897
|
-
code: '400',
|
898
|
-
message: getLocaleText(parent, 'Validation-NewFolder-Exists').replace('{0}', '"' + itemName + '"'),
|
899
|
-
fileExists: null
|
900
|
-
}
|
901
|
-
};
|
902
|
-
createDialog(parent, 'Error', result_2);
|
877
|
+
parent.dialogObj.hide();
|
903
878
|
}
|
904
|
-
|
905
|
-
parent.
|
879
|
+
parent.createdItem = isFileSystemData(parent) ? result.files[result.files.length - 1] : result.files[0];
|
880
|
+
parent.breadcrumbbarModule.searchObj.value = '';
|
881
|
+
var createEventArgs = {
|
882
|
+
folderName: itemName,
|
883
|
+
path: parent.path,
|
884
|
+
parentFolder: parent.itemData
|
885
|
+
};
|
886
|
+
parent.trigger('folderCreate', createEventArgs);
|
887
|
+
var args = { action: 'create', result: result };
|
888
|
+
parent.trigger('success', args);
|
889
|
+
parent.itemData = [getPathObject(parent)];
|
890
|
+
read(parent, events.createEnd, parent.path);
|
906
891
|
}
|
907
892
|
else {
|
908
|
-
if (
|
909
|
-
parent.dialogObj.
|
893
|
+
if (result.error.code === '400') {
|
894
|
+
if (parent.dialogObj && parent.dialogObj.visible) {
|
895
|
+
var ele = select('#newname', parent.dialogObj.element);
|
896
|
+
var error = getLocaleText(parent, 'Validation-NewFolder-Exists').replace('{0}', '"' + ele.value + '"');
|
897
|
+
ele.parentElement.nextElementSibling.innerHTML = error;
|
898
|
+
}
|
899
|
+
else {
|
900
|
+
var result_2 = {
|
901
|
+
files: null,
|
902
|
+
error: {
|
903
|
+
code: '400',
|
904
|
+
message: getLocaleText(parent, 'Validation-NewFolder-Exists').replace('{0}', '"' + itemName + '"'),
|
905
|
+
fileExists: null
|
906
|
+
}
|
907
|
+
};
|
908
|
+
createDialog(parent, 'Error', result_2);
|
909
|
+
}
|
910
|
+
var args = { action: 'create', error: result.error };
|
911
|
+
parent.trigger('failure', args);
|
912
|
+
}
|
913
|
+
else {
|
914
|
+
if (parent.dialogObj && parent.dialogObj.visible) {
|
915
|
+
parent.dialogObj.hide();
|
916
|
+
}
|
917
|
+
onFailure(parent, result, 'create');
|
910
918
|
}
|
911
|
-
onFailure(parent, result, 'create');
|
912
919
|
}
|
913
920
|
}
|
921
|
+
catch (error) {
|
922
|
+
if (parent.dialogObj && parent.dialogObj.visible) {
|
923
|
+
parent.dialogObj.hide();
|
924
|
+
}
|
925
|
+
handleCatchError(parent, error, 'create');
|
926
|
+
}
|
914
927
|
}
|
915
928
|
/* istanbul ignore next */
|
916
929
|
/**
|
@@ -455,12 +455,11 @@ export declare function removeItemClass(parent: IFileManager, value: string): vo
|
|
455
455
|
* @param {Element} scrollParent - specifies the scrolling target.
|
456
456
|
* @param {IFileManager} parent - specifies the parent.
|
457
457
|
* @param {string} nodeClass - specifies the node class.
|
458
|
-
* @param {number} screenY - specifies the vertical (Y) coordinate of the mouse cursor position relative to the entire screen.
|
459
458
|
* @param {number} clientY - specifies the vertical (Y) coordinate of the mouse cursor position relative to the target element.
|
460
459
|
* @returns {void}
|
461
460
|
* @private
|
462
461
|
*/
|
463
|
-
export declare function scrollHandler(scrollParent: Element, parent: IFileManager, nodeClass: string,
|
462
|
+
export declare function scrollHandler(scrollParent: Element, parent: IFileManager, nodeClass: string, clientY: number): void;
|
464
463
|
/**
|
465
464
|
* Dragging handler
|
466
465
|
*
|
@@ -602,9 +602,8 @@ export function getSortedData(parent, items) {
|
|
602
602
|
*/
|
603
603
|
export function getObject(parent, key, value) {
|
604
604
|
var currFiles = getValue(parent.pathId[parent.pathId.length - 1], parent.feFiles);
|
605
|
-
var
|
606
|
-
|
607
|
-
return lists[0];
|
605
|
+
var result = currFiles.filter(function (data) { return data[key].toString() === value; });
|
606
|
+
return result.length > 0 ? result[0] : null;
|
608
607
|
}
|
609
608
|
/**
|
610
609
|
* Creates empty element
|
@@ -1289,16 +1288,15 @@ export function removeItemClass(parent, value) {
|
|
1289
1288
|
* @param {Element} scrollParent - specifies the scrolling target.
|
1290
1289
|
* @param {IFileManager} parent - specifies the parent.
|
1291
1290
|
* @param {string} nodeClass - specifies the node class.
|
1292
|
-
* @param {number} screenY - specifies the vertical (Y) coordinate of the mouse cursor position relative to the entire screen.
|
1293
1291
|
* @param {number} clientY - specifies the vertical (Y) coordinate of the mouse cursor position relative to the target element.
|
1294
1292
|
* @returns {void}
|
1295
1293
|
* @private
|
1296
1294
|
*/
|
1297
|
-
export function scrollHandler(scrollParent, parent, nodeClass,
|
1295
|
+
export function scrollHandler(scrollParent, parent, nodeClass, clientY) {
|
1298
1296
|
var position;
|
1299
1297
|
var elementData = scrollParent.getBoundingClientRect();
|
1300
1298
|
var node = select('.' + nodeClass, scrollParent);
|
1301
|
-
if ((
|
1299
|
+
if ((clientY >= (elementData.top + scrollParent.clientHeight - 30)) && !isNullOrUndefined(node)) {
|
1302
1300
|
position = (parent.targetModule === 'navigationpane' || parent.targetModule === 'detailsview') ? node.offsetHeight / 2.5 : node.offsetHeight / 4.5;
|
1303
1301
|
scrollParent.scrollBy(0, position);
|
1304
1302
|
}
|
@@ -1335,7 +1333,7 @@ export function draggingHandler(parent, args) {
|
|
1335
1333
|
/* istanbul ignore next */
|
1336
1334
|
parent.treeExpandTimer = window.setTimeout(function () { parent.notify(events.dragging, args); }, 800);
|
1337
1335
|
scrollParent = parent.navigationpaneModule.treeObj.element.parentElement;
|
1338
|
-
scrollHandler(scrollParent, parent, 'e-level-2', args.event.
|
1336
|
+
scrollHandler(scrollParent, parent, 'e-level-2', args.event.y);
|
1339
1337
|
}
|
1340
1338
|
else if (parent.targetModule === 'detailsview') {
|
1341
1339
|
node = closest(args.target, 'tr');
|
@@ -1347,7 +1345,7 @@ export function draggingHandler(parent, args) {
|
|
1347
1345
|
}
|
1348
1346
|
canDrop = true;
|
1349
1347
|
scrollParent = parent.detailsviewModule.gridObj.element.querySelector('.e-content');
|
1350
|
-
scrollHandler(scrollParent, parent, 'e-row', args.event.
|
1348
|
+
scrollHandler(scrollParent, parent, 'e-row', args.event.y);
|
1351
1349
|
}
|
1352
1350
|
else if (parent.targetModule === 'largeiconsview') {
|
1353
1351
|
node = closest(args.target, 'li');
|
@@ -1356,7 +1354,7 @@ export function draggingHandler(parent, args) {
|
|
1356
1354
|
}
|
1357
1355
|
canDrop = true;
|
1358
1356
|
scrollParent = parent.largeiconsviewModule.element.firstElementChild;
|
1359
|
-
scrollHandler(scrollParent, parent, 'e-large-icon', args.event.
|
1357
|
+
scrollHandler(scrollParent, parent, 'e-large-icon', args.event.y);
|
1360
1358
|
/* istanbul ignore next */
|
1361
1359
|
}
|
1362
1360
|
else if (parent.targetModule === 'breadcrumbbar') {
|
@@ -87,6 +87,7 @@ var DetailsView = /** @class */ (function () {
|
|
87
87
|
}
|
88
88
|
/* istanbul ignore next */
|
89
89
|
DetailsView.prototype.render = function (args) {
|
90
|
+
var _this = this;
|
90
91
|
showSpinner(this.parent.element);
|
91
92
|
if (this.parent.view === 'Details') {
|
92
93
|
removeClass([this.parent.element], CLS.MULTI_SELECT);
|
@@ -94,7 +95,9 @@ var DetailsView = /** @class */ (function () {
|
|
94
95
|
this.checkNameWidth();
|
95
96
|
var columns = this.getColumns();
|
96
97
|
var sortSettings = void 0;
|
97
|
-
|
98
|
+
var isValidSortField = !isNullOrUndefined(columns) &&
|
99
|
+
columns.findIndex(function (col) { return col.field === _this.parent.sortBy; }) !== -1;
|
100
|
+
if (this.parent.isMobile || !isValidSortField) {
|
98
101
|
sortSettings = [];
|
99
102
|
}
|
100
103
|
else {
|
@@ -305,7 +308,9 @@ var DetailsView = /** @class */ (function () {
|
|
305
308
|
if (textEle) {
|
306
309
|
var name_1 = getValue('name', args.data);
|
307
310
|
var type = getValue('type', args.data);
|
308
|
-
|
311
|
+
if (name_1.indexOf(type) !== -1) {
|
312
|
+
textEle.innerHTML = name_1.substr(0, name_1.length - type.length);
|
313
|
+
}
|
309
314
|
}
|
310
315
|
}
|
311
316
|
if (getValue('size', args.data) !== undefined && args.row.querySelector('.e-fe-size')) {
|
@@ -568,6 +573,7 @@ var DetailsView = /** @class */ (function () {
|
|
568
573
|
case 'showHiddenItems':
|
569
574
|
read(this.parent, events.pathChanged, this.parent.path);
|
570
575
|
break;
|
576
|
+
case 'showItemCheckBoxes':
|
571
577
|
case 'allowMultiSelection':
|
572
578
|
if (!isNullOrUndefined(this.gridObj)) {
|
573
579
|
this.currentSelectedItem = this.parent.selectedItems;
|
@@ -269,7 +269,9 @@ var LargeIconsView = /** @class */ (function () {
|
|
269
269
|
var textEle = args.item.querySelector('.' + CLS.LIST_TEXT);
|
270
270
|
var txt = getValue('name', args.curData);
|
271
271
|
var type = getValue('type', args.curData);
|
272
|
-
|
272
|
+
if (txt.indexOf(type) !== -1) {
|
273
|
+
textEle.innerHTML = txt.substr(0, txt.length - type.length);
|
274
|
+
}
|
273
275
|
}
|
274
276
|
this.renderCheckbox(args);
|
275
277
|
var eventArgs = {
|
@@ -637,6 +639,7 @@ var LargeIconsView = /** @class */ (function () {
|
|
637
639
|
read(this.parent, events.pathChanged, this.parent.path);
|
638
640
|
break;
|
639
641
|
case 'allowMultiSelection':
|
642
|
+
case 'showItemCheckBoxes':
|
640
643
|
if (this.parent.view !== 'LargeIcons') {
|
641
644
|
break;
|
642
645
|
}
|
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
|
+
}
|