@syncfusion/ej2-filemanager 19.4.42 → 19.4.43
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/CHANGELOG.md +8 -0
- 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 +59 -9
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +59 -9
- 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 +8 -8
- package/src/file-manager/base/interface.d.ts +1 -0
- package/src/file-manager/layout/navigation-pane.d.ts +5 -0
- package/src/file-manager/layout/navigation-pane.js +47 -5
- package/src/file-manager/pop-up/context-menu.d.ts +1 -0
- package/src/file-manager/pop-up/context-menu.js +12 -4
package/dist/global/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version : 19.4.
|
3
|
+
* version : 19.4.43
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@19.4.
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@19.4.42",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512-
|
5
|
+
"_integrity": "sha512-1IPNHqxz6MlyoefNUbo/hxHTHTUB94EcY+G1HCd27JfInXYy9ogD5JcWLVyEr9+DDNDSOq3lqHf/ARKLwmc4NA==",
|
6
6
|
"_location": "/@syncfusion/ej2-filemanager",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -25,8 +25,8 @@
|
|
25
25
|
"/@syncfusion/ej2-richtexteditor",
|
26
26
|
"/@syncfusion/ej2-vue-filemanager"
|
27
27
|
],
|
28
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-19.4.
|
29
|
-
"_shasum": "
|
28
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-filemanager/-/ej2-filemanager-19.4.42.tgz",
|
29
|
+
"_shasum": "10afd89bb64134c599dd1f45f1ef94ed1f1497e0",
|
30
30
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
31
31
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
32
32
|
"author": {
|
@@ -40,9 +40,9 @@
|
|
40
40
|
"@syncfusion/ej2-base": "~19.4.42",
|
41
41
|
"@syncfusion/ej2-buttons": "~19.4.42",
|
42
42
|
"@syncfusion/ej2-data": "~19.4.42",
|
43
|
-
"@syncfusion/ej2-grids": "~19.4.
|
44
|
-
"@syncfusion/ej2-inputs": "~19.4.
|
45
|
-
"@syncfusion/ej2-layouts": "~19.4.
|
43
|
+
"@syncfusion/ej2-grids": "~19.4.43",
|
44
|
+
"@syncfusion/ej2-inputs": "~19.4.43",
|
45
|
+
"@syncfusion/ej2-layouts": "~19.4.43",
|
46
46
|
"@syncfusion/ej2-lists": "~19.4.38",
|
47
47
|
"@syncfusion/ej2-navigations": "~19.4.41",
|
48
48
|
"@syncfusion/ej2-popups": "~19.4.41",
|
@@ -68,6 +68,6 @@
|
|
68
68
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
69
69
|
},
|
70
70
|
"typings": "index.d.ts",
|
71
|
-
"version": "19.4.
|
71
|
+
"version": "19.4.43",
|
72
72
|
"sideEffects": false
|
73
73
|
}
|
@@ -601,6 +601,7 @@ export interface ITreeView extends Component<HTMLElement> {
|
|
601
601
|
duplicateFiles: Function;
|
602
602
|
rootID: string;
|
603
603
|
activeNode: Element;
|
604
|
+
openFileOnContextMenuClick: Function;
|
604
605
|
}
|
605
606
|
/** @hidden */
|
606
607
|
export interface IContextMenu extends Component<HTMLElement> {
|
@@ -21,6 +21,9 @@ export declare class NavigationPane {
|
|
21
21
|
private isRenameParent;
|
22
22
|
private isRightClick;
|
23
23
|
private renameParent;
|
24
|
+
private previousSelected;
|
25
|
+
private isNodeClickCalled;
|
26
|
+
private restrictSelecting;
|
24
27
|
/**
|
25
28
|
* Constructor for the TreeView module
|
26
29
|
*
|
@@ -38,6 +41,8 @@ export declare class NavigationPane {
|
|
38
41
|
private getDropPath;
|
39
42
|
private onDrowNode;
|
40
43
|
private addChild;
|
44
|
+
private onNodeSelecting;
|
45
|
+
openFileOnContextMenuClick(node: HTMLLIElement): void;
|
41
46
|
private onNodeSelected;
|
42
47
|
private onPathDrag;
|
43
48
|
private onNodeExpand;
|
@@ -29,6 +29,12 @@ var NavigationPane = /** @class */ (function () {
|
|
29
29
|
this.isRenameParent = false;
|
30
30
|
this.isRightClick = false;
|
31
31
|
this.renameParent = null;
|
32
|
+
// Specifies the previously selected nodes in the treeview control.
|
33
|
+
this.previousSelected = null;
|
34
|
+
// Specifies whether the nodeClicked event of the treeview control is triggered or not.
|
35
|
+
this.isNodeClickCalled = false;
|
36
|
+
// Specifies whether to restrict node selection in the treeview control.
|
37
|
+
this.restrictSelecting = false;
|
32
38
|
this.parent = parent;
|
33
39
|
this.addEventListener();
|
34
40
|
this.keyConfigs = {
|
@@ -68,6 +74,7 @@ var NavigationPane = /** @class */ (function () {
|
|
68
74
|
hasChildren: 'hasChild', iconCss: '_fm_icon', htmlAttributes: '_fm_htmlAttr', tooltip: 'name'
|
69
75
|
},
|
70
76
|
enableHtmlSanitizer: this.parent.enableHtmlSanitizer,
|
77
|
+
nodeSelecting: this.onNodeSelecting.bind(this),
|
71
78
|
nodeSelected: this.onNodeSelected.bind(this),
|
72
79
|
nodeExpanding: this.onNodeExpand.bind(this),
|
73
80
|
nodeClicked: this.onNodeClicked.bind(this),
|
@@ -173,6 +180,44 @@ var NavigationPane = /** @class */ (function () {
|
|
173
180
|
this.treeObj.addNodes(directories, target, null, prevent);
|
174
181
|
}
|
175
182
|
};
|
183
|
+
// Node Selecting event handler
|
184
|
+
NavigationPane.prototype.onNodeSelecting = function (args) {
|
185
|
+
if (!args.isInteracted && !this.isRightClick && !this.isPathDragged && !this.isRenameParent || this.restrictSelecting) {
|
186
|
+
this.restrictSelecting = false;
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
if (!this.renameParent) {
|
190
|
+
this.parent.activeModule = 'navigationpane';
|
191
|
+
// eslint-disable-next-line
|
192
|
+
var nodeData = this.getTreeData(getValue('id', args.nodeData));
|
193
|
+
var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
194
|
+
delete eventArgs.cancel;
|
195
|
+
this.parent.trigger('fileOpen', eventArgs);
|
196
|
+
args.cancel = eventArgs.cancel;
|
197
|
+
if (args.cancel) {
|
198
|
+
this.restrictSelecting = true;
|
199
|
+
this.treeObj.selectedNodes = this.isNodeClickCalled ? this.previousSelected : this.treeObj.selectedNodes;
|
200
|
+
this.isNodeClickCalled = false;
|
201
|
+
if (!isNOU(this.parent) && !isNOU(this.parent.contextmenuModule)) {
|
202
|
+
this.parent.contextmenuModule.contextMenu.enableItems(['Open'], true);
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
206
|
+
};
|
207
|
+
// Opens the folder while clicking open context menu item in the treeview.
|
208
|
+
NavigationPane.prototype.openFileOnContextMenuClick = function (node) {
|
209
|
+
var data = this.treeObj.getTreeData(node);
|
210
|
+
// eslint-disable-next-line
|
211
|
+
this.parent.selectedItems = [];
|
212
|
+
this.parent.itemData = data;
|
213
|
+
this.activeNode = node;
|
214
|
+
this.parent.activeModule = 'navigationpane';
|
215
|
+
updatePath(node, this.parent.itemData[0], this.parent);
|
216
|
+
read(this.parent, this.isPathDragged ? events.pasteEnd : events.pathChanged, this.parent.path);
|
217
|
+
this.parent.visitedItem = node;
|
218
|
+
this.isPathDragged = this.isRenameParent = this.isRightClick = false;
|
219
|
+
this.treeObj.selectedNodes = [node.getAttribute('data-uid')];
|
220
|
+
};
|
176
221
|
NavigationPane.prototype.onNodeSelected = function (args) {
|
177
222
|
if (this.parent.breadcrumbbarModule && this.parent.breadcrumbbarModule.searchObj && !this.renameParent) {
|
178
223
|
this.parent.breadcrumbbarModule.searchObj.element.value = '';
|
@@ -186,11 +231,6 @@ var NavigationPane = /** @class */ (function () {
|
|
186
231
|
this.parent.activeModule = 'navigationpane';
|
187
232
|
// eslint-disable-next-line
|
188
233
|
var nodeData = this.getTreeData(getValue('id', args.nodeData));
|
189
|
-
if (!this.renameParent) {
|
190
|
-
var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
191
|
-
delete eventArgs.cancel;
|
192
|
-
this.parent.trigger('fileOpen', eventArgs);
|
193
|
-
}
|
194
234
|
this.parent.selectedItems = [];
|
195
235
|
this.parent.itemData = nodeData;
|
196
236
|
updatePath(args.node, this.parent.itemData[0], this.parent);
|
@@ -235,6 +275,8 @@ var NavigationPane = /** @class */ (function () {
|
|
235
275
|
this.activeNode = args.node;
|
236
276
|
if ((args.event.which === 3) && (args.node.getAttribute('data-uid') !== this.treeObj.selectedNodes[0])) {
|
237
277
|
this.isRightClick = true;
|
278
|
+
this.isNodeClickCalled = true;
|
279
|
+
this.previousSelected = this.treeObj.selectedNodes;
|
238
280
|
this.treeObj.selectedNodes = [args.node.getAttribute('data-uid')];
|
239
281
|
}
|
240
282
|
else if (args.node.getAttribute('data-uid') === this.treeObj.selectedNodes[0] && this.parent.selectedItems.length !== 0) {
|
@@ -73,11 +73,11 @@ var ContextMenu = /** @class */ (function () {
|
|
73
73
|
var data;
|
74
74
|
var treeFolder = false;
|
75
75
|
var target = args.event.target;
|
76
|
-
this.menuTarget = target;
|
76
|
+
this.menuTarget = this.targetNodeElement = target;
|
77
77
|
this.currentElement = args.element;
|
78
78
|
if (target.classList.contains('e-spinner-pane')) {
|
79
79
|
target = this.parent.navigationpaneModule.activeNode.getElementsByClassName(CLS.FULLROW)[0];
|
80
|
-
this.menuTarget = target;
|
80
|
+
this.menuTarget = this.targetNodeElement = target;
|
81
81
|
}
|
82
82
|
if (target.classList.contains(CLS.FULLROW)) {
|
83
83
|
this.parent.selectedItems.length = 0;
|
@@ -191,7 +191,7 @@ var ContextMenu = /** @class */ (function () {
|
|
191
191
|
_this.enableItems(_this.disabledItems, false, true);
|
192
192
|
args.cancel = menuOpenArgs.cancel;
|
193
193
|
if (menuOpenArgs.cancel) {
|
194
|
-
_this.menuTarget = _this.currentElement = null;
|
194
|
+
_this.menuTarget = _this.targetNodeElement = _this.currentElement = null;
|
195
195
|
}
|
196
196
|
});
|
197
197
|
};
|
@@ -311,7 +311,12 @@ var ContextMenu = /** @class */ (function () {
|
|
311
311
|
}
|
312
312
|
else {
|
313
313
|
this.parent.notify(events.selectedData, {});
|
314
|
-
|
314
|
+
if (this.parent.activeModule === 'navigationpane' && itemText === 'open') {
|
315
|
+
details = [this.menuItemData];
|
316
|
+
}
|
317
|
+
else {
|
318
|
+
details = this.parent.itemData;
|
319
|
+
}
|
315
320
|
}
|
316
321
|
var eventArgs = {
|
317
322
|
cancel: false,
|
@@ -388,6 +393,9 @@ var ContextMenu = /** @class */ (function () {
|
|
388
393
|
if (_this.parent.visitedItem) {
|
389
394
|
_this.parent.notify(events.openInit, { target: _this.parent.visitedItem });
|
390
395
|
}
|
396
|
+
else if (_this.parent.activeModule === 'navigationpane') {
|
397
|
+
_this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(_this.targetNodeElement, 'li'));
|
398
|
+
}
|
391
399
|
break;
|
392
400
|
case 'details':
|
393
401
|
_this.parent.notify(events.detailsInit, {});
|