@syncfusion/ej2-filemanager 22.2.10 → 23.1.36
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 +4 -69
- 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 +183 -30
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +197 -28
- 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 +16 -16
- package/src/file-manager/actions/toolbar.d.ts +1 -0
- package/src/file-manager/actions/toolbar.js +117 -8
- package/src/file-manager/base/file-manager-model.d.ts +12 -1
- package/src/file-manager/base/file-manager.d.ts +11 -0
- package/src/file-manager/base/file-manager.js +9 -4
- package/src/file-manager/base/interface.d.ts +2 -1
- package/src/file-manager/layout/details-view.d.ts +1 -0
- package/src/file-manager/layout/details-view.js +8 -7
- package/src/file-manager/layout/navigation-pane.js +0 -1
- package/src/file-manager/models/details-view-settings-model.d.ts +1 -1
- package/src/file-manager/models/toolbar-settings-model.d.ts +177 -2
- package/src/file-manager/models/toolbar-settings.d.ts +157 -2
- package/src/file-manager/models/toolbar-settings.js +64 -2
- package/src/file-manager/pop-up/dialog.js +0 -5
- package/styles/file-manager/_material3-definition.scss +1 -1
- package/styles/file-manager/bootstrap-dark.scss +1 -1
- package/styles/file-manager/bootstrap.scss +1 -1
- package/styles/file-manager/bootstrap4.scss +1 -1
- package/styles/file-manager/bootstrap5-dark.scss +1 -1
- package/styles/file-manager/bootstrap5.scss +1 -1
- package/styles/file-manager/fabric-dark.scss +1 -1
- package/styles/file-manager/fabric.scss +1 -1
- package/styles/file-manager/fluent-dark.scss +1 -1
- package/styles/file-manager/fluent.scss +1 -1
- package/styles/file-manager/highcontrast-light.scss +1 -1
- package/styles/file-manager/highcontrast.scss +1 -1
- package/styles/file-manager/material-dark.css +0 -1
- package/styles/file-manager/material-dark.scss +1 -1
- package/styles/file-manager/material.css +0 -1
- package/styles/file-manager/material.scss +1 -1
- package/styles/file-manager/material3-dark.css +1 -2
- package/styles/file-manager/material3-dark.scss +1 -1
- package/styles/file-manager/material3.css +1 -2
- package/styles/file-manager/material3.scss +1 -1
- package/styles/file-manager/tailwind-dark.css +0 -1
- package/styles/file-manager/tailwind-dark.scss +1 -1
- package/styles/file-manager/tailwind.css +0 -1
- package/styles/file-manager/tailwind.scss +1 -1
- package/styles/material-dark.css +0 -1
- package/styles/material.css +0 -1
- package/styles/material3-dark.css +1 -2
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +1 -2
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +0 -1
- package/styles/tailwind.css +0 -1
package/dist/global/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* filename: index.d.ts
|
3
|
-
* version :
|
3
|
+
* version : 23.1.36
|
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@
|
3
|
+
"_id": "@syncfusion/ej2-filemanager@18.26.0",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "sha512
|
5
|
+
"_integrity": "sha512-7hwYtgKq0Jgz+YhlqXvEUPpNUQ2MR9xtMO92G90q4kxa/a3QZk6Efl7pCbAnDbjHM7zFyCmkEjrjMs8XLVbuPg==",
|
6
6
|
"_location": "/@syncfusion/ej2-filemanager",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
@@ -25,10 +25,10 @@
|
|
25
25
|
"/@syncfusion/ej2-richtexteditor",
|
26
26
|
"/@syncfusion/ej2-vue-filemanager"
|
27
27
|
],
|
28
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
29
|
-
"_shasum": "
|
28
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-filemanager/-/ej2-filemanager-18.26.0.tgz",
|
29
|
+
"_shasum": "aaa7376ddda53928417cc660e08379fc44d6dec0",
|
30
30
|
"_spec": "@syncfusion/ej2-filemanager@*",
|
31
|
-
"_where": "/jenkins/workspace/elease-
|
31
|
+
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
32
32
|
"author": {
|
33
33
|
"name": "Syncfusion Inc."
|
34
34
|
},
|
@@ -37,16 +37,16 @@
|
|
37
37
|
},
|
38
38
|
"bundleDependencies": false,
|
39
39
|
"dependencies": {
|
40
|
-
"@syncfusion/ej2-base": "~
|
41
|
-
"@syncfusion/ej2-buttons": "~
|
42
|
-
"@syncfusion/ej2-data": "~
|
43
|
-
"@syncfusion/ej2-grids": "~
|
44
|
-
"@syncfusion/ej2-inputs": "~
|
45
|
-
"@syncfusion/ej2-layouts": "~
|
46
|
-
"@syncfusion/ej2-lists": "~
|
47
|
-
"@syncfusion/ej2-navigations": "~
|
48
|
-
"@syncfusion/ej2-popups": "~
|
49
|
-
"@syncfusion/ej2-splitbuttons": "~
|
40
|
+
"@syncfusion/ej2-base": "~23.1.36",
|
41
|
+
"@syncfusion/ej2-buttons": "~23.1.36",
|
42
|
+
"@syncfusion/ej2-data": "~23.1.36",
|
43
|
+
"@syncfusion/ej2-grids": "~23.1.36",
|
44
|
+
"@syncfusion/ej2-inputs": "~23.1.36",
|
45
|
+
"@syncfusion/ej2-layouts": "~23.1.36",
|
46
|
+
"@syncfusion/ej2-lists": "~23.1.36",
|
47
|
+
"@syncfusion/ej2-navigations": "~23.1.36",
|
48
|
+
"@syncfusion/ej2-popups": "~23.1.36",
|
49
|
+
"@syncfusion/ej2-splitbuttons": "~23.1.36"
|
50
50
|
},
|
51
51
|
"deprecated": false,
|
52
52
|
"description": "Essential JS 2 FileManager Component",
|
@@ -76,6 +76,6 @@
|
|
76
76
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
77
77
|
},
|
78
78
|
"typings": "index.d.ts",
|
79
|
-
"version": "
|
79
|
+
"version": "23.1.36",
|
80
80
|
"sideEffects": false
|
81
81
|
}
|
@@ -1,3 +1,15 @@
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
2
|
+
__assign = Object.assign || function(t) {
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
+
s = arguments[i];
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
+
t[p] = s[p];
|
7
|
+
}
|
8
|
+
return t;
|
9
|
+
};
|
10
|
+
return __assign.apply(this, arguments);
|
11
|
+
};
|
12
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
1
13
|
import { Toolbar as BaseToolbar } from '@syncfusion/ej2-navigations';
|
2
14
|
import { select, isNullOrUndefined as isNOU, closest, selectAll } from '@syncfusion/ej2-base';
|
3
15
|
import { createDialog } from '../pop-up/dialog';
|
@@ -44,6 +56,7 @@ var Toolbar = /** @class */ (function () {
|
|
44
56
|
enableRtl: _this.parent.enableRtl
|
45
57
|
});
|
46
58
|
_this.toolbarObj.isStringTemplate = true;
|
59
|
+
_this.toolbarObj.root = _this.parent.root ? _this.parent.root : _this.parent;
|
47
60
|
_this.toolbarObj.appendTo('#' + _this.parent.element.id + CLS.TOOLBAR_ID);
|
48
61
|
});
|
49
62
|
};
|
@@ -61,6 +74,9 @@ var Toolbar = /** @class */ (function () {
|
|
61
74
|
if (this.parent.isDevice && this.parent.allowMultiSelection) {
|
62
75
|
currItems.push('SelectAll');
|
63
76
|
}
|
77
|
+
if (this.parent.toolbarItems.length > 0) {
|
78
|
+
currItems = this.parent.toolbarItems.map(function (item) { return item.name; });
|
79
|
+
}
|
64
80
|
return currItems;
|
65
81
|
};
|
66
82
|
/* istanbul ignore next */
|
@@ -201,6 +217,10 @@ var Toolbar = /** @class */ (function () {
|
|
201
217
|
}
|
202
218
|
this.hideItems(this.default, true);
|
203
219
|
this.hideStatus();
|
220
|
+
if (this.parent.portals && this.toolbarObj.portals) {
|
221
|
+
this.parent.portals = this.parent.portals.concat(this.toolbarObj.portals);
|
222
|
+
this.parent['renderReactTemplates']();
|
223
|
+
}
|
204
224
|
var btnElement = selectAll('.e-btn', this.toolbarObj.element);
|
205
225
|
var _loop_1 = function (btnCount) {
|
206
226
|
/* istanbul ignore next */
|
@@ -273,10 +293,13 @@ var Toolbar = /** @class */ (function () {
|
|
273
293
|
}
|
274
294
|
for (var i = 0; i < data.length; i++) {
|
275
295
|
var item = void 0;
|
296
|
+
var propItem = void 0;
|
297
|
+
if (this.parent.toolbarItems.length > 0) {
|
298
|
+
propItem = this.getItemModel(this.parent.toolbarItems[parseInt(i.toString(), 10)]);
|
299
|
+
}
|
276
300
|
var itemId = this.getId(data[i]);
|
277
301
|
var itemText = getLocaleText(this.parent, data[i]);
|
278
302
|
var itemTooltip = getLocaleText(this.parent, 'Tooltip-' + data[i]);
|
279
|
-
var spanElement = '<span class="e-tbar-btn-text e-tbar-ddb-text">' + itemText + '</span>';
|
280
303
|
switch (data[i]) {
|
281
304
|
case '|':
|
282
305
|
item = { type: 'Separator' };
|
@@ -284,12 +307,17 @@ var Toolbar = /** @class */ (function () {
|
|
284
307
|
case 'Upload':
|
285
308
|
item = { id: itemId, text: itemText, tooltipText: itemTooltip, prefixIcon: CLS.ICON_UPLOAD, showTextOn: mode };
|
286
309
|
break;
|
287
|
-
case 'SortBy':
|
310
|
+
case 'SortBy': {
|
311
|
+
var spanElement = '<span class="e-tbar-btn-text e-tbar-ddb-text">' + itemText + '</span>';
|
312
|
+
if (propItem && propItem.text) {
|
313
|
+
spanElement = '<span class="e-tbar-btn-text e-tbar-ddb-text">' + propItem.text + '</span>';
|
314
|
+
}
|
288
315
|
item = {
|
289
316
|
id: itemId, tooltipText: itemTooltip,
|
290
317
|
template: '<button id="' + itemId + '" class="e-tbar-btn e-tbtn-txt" tabindex="-1">' + spanElement + '</button>'
|
291
318
|
};
|
292
319
|
break;
|
320
|
+
}
|
293
321
|
case 'Refresh':
|
294
322
|
item = { id: itemId, text: itemText, tooltipText: itemTooltip, prefixIcon: CLS.ICON_REFRESH, showTextOn: mode };
|
295
323
|
break;
|
@@ -299,14 +327,22 @@ var Toolbar = /** @class */ (function () {
|
|
299
327
|
align: 'Right'
|
300
328
|
};
|
301
329
|
break;
|
302
|
-
case 'View':
|
330
|
+
case 'View': {
|
331
|
+
var viewText = void 0;
|
332
|
+
if (propItem && propItem.text) {
|
333
|
+
viewText = propItem.text;
|
334
|
+
}
|
335
|
+
else {
|
336
|
+
viewText = getLocaleText(this.parent, 'View');
|
337
|
+
}
|
303
338
|
item = {
|
304
339
|
id: itemId, tooltipText: itemTooltip, prefixIcon: this.parent.view === 'Details' ? CLS.ICON_GRID : CLS.ICON_LARGE,
|
305
340
|
overflow: 'Show', align: 'Right', text: itemText, showTextOn: 'Overflow',
|
306
341
|
template: '<button id="' + itemId + '" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label=' +
|
307
|
-
|
342
|
+
viewText + '></button>'
|
308
343
|
};
|
309
344
|
break;
|
345
|
+
}
|
310
346
|
case 'Details':
|
311
347
|
item = {
|
312
348
|
id: itemId, tooltipText: itemTooltip, prefixIcon: CLS.ICON_DETAILS, overflow: 'Show', align: 'Right',
|
@@ -338,13 +374,74 @@ var Toolbar = /** @class */ (function () {
|
|
338
374
|
item = { id: itemId, text: itemText, tooltipText: itemTooltip, prefixIcon: CLS.ICON_SELECTALL, showTextOn: mode };
|
339
375
|
break;
|
340
376
|
default:
|
341
|
-
item = { id: itemId, text: itemText, tooltipText: itemTooltip };
|
377
|
+
item = { id: itemId, text: itemText, tooltipText: itemTooltip, template: '' };
|
342
378
|
break;
|
343
379
|
}
|
344
|
-
|
380
|
+
if (this.parent.toolbarItems.length > 0 && propItem) {
|
381
|
+
var mergedItems = __assign({}, item, propItem);
|
382
|
+
items.push(mergedItems);
|
383
|
+
}
|
384
|
+
else {
|
385
|
+
items.push(item);
|
386
|
+
}
|
345
387
|
}
|
346
388
|
return items;
|
347
389
|
};
|
390
|
+
Toolbar.prototype.getItemModel = function (propItem) {
|
391
|
+
var item = {};
|
392
|
+
if (propItem.id) {
|
393
|
+
item.id = propItem.id;
|
394
|
+
}
|
395
|
+
if (propItem.text) {
|
396
|
+
item.text = propItem.text;
|
397
|
+
}
|
398
|
+
if (propItem.tooltipText) {
|
399
|
+
item.tooltipText = propItem.tooltipText;
|
400
|
+
}
|
401
|
+
if (propItem.prefixIcon) {
|
402
|
+
item.prefixIcon = propItem.prefixIcon;
|
403
|
+
}
|
404
|
+
if (propItem.cssClass) {
|
405
|
+
item.cssClass = propItem.cssClass;
|
406
|
+
}
|
407
|
+
if (propItem.showTextOn !== 'Both') {
|
408
|
+
item.showTextOn = propItem.showTextOn;
|
409
|
+
}
|
410
|
+
if (propItem.template) {
|
411
|
+
item.template = propItem.template;
|
412
|
+
}
|
413
|
+
if (propItem.disabled) {
|
414
|
+
item.disabled = propItem.disabled;
|
415
|
+
}
|
416
|
+
if (propItem.width !== 'auto') {
|
417
|
+
item.width = propItem.width;
|
418
|
+
}
|
419
|
+
if (propItem.suffixIcon) {
|
420
|
+
item.suffixIcon = propItem.suffixIcon;
|
421
|
+
}
|
422
|
+
if (propItem.align !== 'Left') {
|
423
|
+
item.align = propItem.align;
|
424
|
+
}
|
425
|
+
if (propItem.overflow !== 'None') {
|
426
|
+
item.overflow = propItem.overflow;
|
427
|
+
}
|
428
|
+
if (propItem.htmlAttributes) {
|
429
|
+
item.htmlAttributes = propItem.htmlAttributes;
|
430
|
+
}
|
431
|
+
if (propItem.type !== 'Button') {
|
432
|
+
item.type = propItem.type;
|
433
|
+
}
|
434
|
+
if (propItem.visible !== true) {
|
435
|
+
item.visible = propItem.visible;
|
436
|
+
}
|
437
|
+
if (propItem.showAlwaysInPopup) {
|
438
|
+
item.showAlwaysInPopup = propItem.showAlwaysInPopup;
|
439
|
+
}
|
440
|
+
if (propItem.tabIndex !== -1) {
|
441
|
+
item.tabIndex = propItem.tabIndex;
|
442
|
+
}
|
443
|
+
return item;
|
444
|
+
};
|
348
445
|
Toolbar.prototype.getId = function (id) {
|
349
446
|
return this.parent.element.id + '_tb_' + id.toLowerCase();
|
350
447
|
};
|
@@ -359,8 +456,19 @@ var Toolbar = /** @class */ (function () {
|
|
359
456
|
};
|
360
457
|
Toolbar.prototype.reRenderToolbar = function (e) {
|
361
458
|
var _this = this;
|
362
|
-
|
363
|
-
|
459
|
+
var itemsToProcess = [];
|
460
|
+
if (this.parent.toolbarItems.length > 0) {
|
461
|
+
itemsToProcess = this.parent.toolbarItems.map(function (item) {
|
462
|
+
return item.name;
|
463
|
+
});
|
464
|
+
}
|
465
|
+
else if (e.newProp.toolbarSettings.items !== undefined) {
|
466
|
+
itemsToProcess = e.newProp.toolbarSettings.items.map(function (item) {
|
467
|
+
return item.trim();
|
468
|
+
});
|
469
|
+
}
|
470
|
+
if (itemsToProcess.length > 0) {
|
471
|
+
this.items = this.toolbarItemData(this.getItems(itemsToProcess));
|
364
472
|
var eventArgs = { items: this.items };
|
365
473
|
this.parent.trigger('toolbarCreate', eventArgs, function (toolbarCreateArgs) {
|
366
474
|
if (_this.buttonObj) {
|
@@ -474,6 +582,7 @@ var Toolbar = /** @class */ (function () {
|
|
474
582
|
this.toolbarObj.refreshOverflow();
|
475
583
|
break;
|
476
584
|
case 'toolbarSettings':
|
585
|
+
case 'toolbarItems':
|
477
586
|
this.reRenderToolbar(e);
|
478
587
|
break;
|
479
588
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Component, EmitType, ModuleDeclaration, isNullOrUndefined, L10n, closest } 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 { 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 } from './interface';import { FileOpenEventArgs, FileSelectEventArgs, MenuClickEventArgs, MenuOpenEventArgs } 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 } 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';
|
1
|
+
import { Component, EmitType, ModuleDeclaration, isNullOrUndefined, L10n, closest, Collection } 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 } from './interface';import { FileOpenEventArgs, FileSelectEventArgs, MenuClickEventArgs, MenuOpenEventArgs } 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 } 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';
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
3
3
|
|
4
4
|
/**
|
@@ -217,6 +217,17 @@ export interface FileManagerModel extends ComponentModel{
|
|
217
217
|
*/
|
218
218
|
toolbarSettings?: ToolbarSettingsModel;
|
219
219
|
|
220
|
+
/**
|
221
|
+
* An array of items that are used to configure File Manager toolbar items.
|
222
|
+
*
|
223
|
+
* @remarks
|
224
|
+
* Use this property if you want to include custom toolbar items along with existing toolbar items. If both `toolbarSettings` and `toolbarItems` are defined, then items will be rendered based on toolbarItems.
|
225
|
+
*
|
226
|
+
* @default []
|
227
|
+
*
|
228
|
+
*/
|
229
|
+
toolbarItems?: ToolbarItemModel[];
|
230
|
+
|
220
231
|
/**
|
221
232
|
* Specifies the upload settings for the file manager.
|
222
233
|
*
|
@@ -3,6 +3,7 @@ import { INotifyPropertyChanged } from '@syncfusion/ej2-base';
|
|
3
3
|
import { Splitter } from '@syncfusion/ej2-layouts';
|
4
4
|
import { Dialog } from '@syncfusion/ej2-popups';
|
5
5
|
import { ToolbarSettingsModel } from '../models/index';
|
6
|
+
import { ToolbarItemModel } from '../models/index';
|
6
7
|
import { NavigationPaneSettingsModel, DetailsViewSettingsModel } from '../models/index';
|
7
8
|
import { AjaxSettingsModel, SearchSettingsModel } from '../models/index';
|
8
9
|
import { Toolbar } from '../actions/toolbar';
|
@@ -334,6 +335,16 @@ export declare class FileManager extends Component<HTMLElement> implements INoti
|
|
334
335
|
* }
|
335
336
|
*/
|
336
337
|
toolbarSettings: ToolbarSettingsModel;
|
338
|
+
/**
|
339
|
+
* An array of items that are used to configure File Manager toolbar items.
|
340
|
+
*
|
341
|
+
* @remarks
|
342
|
+
* Use this property if you want to include custom toolbar items along with existing toolbar items. If both `toolbarSettings` and `toolbarItems` are defined, then items will be rendered based on toolbarItems.
|
343
|
+
*
|
344
|
+
* @default []
|
345
|
+
*
|
346
|
+
*/
|
347
|
+
toolbarItems: ToolbarItemModel[];
|
337
348
|
/**
|
338
349
|
* Specifies the upload settings for the file manager.
|
339
350
|
*
|
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
17
17
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
18
18
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
19
19
|
};
|
20
|
-
import { Component, isNullOrUndefined, L10n, closest } from '@syncfusion/ej2-base';
|
20
|
+
import { Component, isNullOrUndefined, L10n, closest, Collection } from '@syncfusion/ej2-base';
|
21
21
|
import { Property, NotifyPropertyChanges, Complex, select } from '@syncfusion/ej2-base';
|
22
22
|
import { createElement, addClass, removeClass, setStyleAttribute as setAttr, getUniqueID } from '@syncfusion/ej2-base';
|
23
23
|
import { isNullOrUndefined as isNOU, formatUnit, Browser, KeyboardEvents } from '@syncfusion/ej2-base';
|
@@ -26,6 +26,7 @@ import { Splitter } from '@syncfusion/ej2-layouts';
|
|
26
26
|
import { Dialog, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
27
27
|
import { createDialog, createExtDialog } from '../pop-up/dialog';
|
28
28
|
import { ToolbarSettings, AjaxSettings, NavigationPaneSettings, DetailsViewSettings } from '../models/index';
|
29
|
+
import { ToolbarItem } from '../models/index';
|
29
30
|
import { SearchSettings } from '../models/index';
|
30
31
|
import { LargeIconsView } from '../layout/large-icons-view';
|
31
32
|
import { Uploader } from '@syncfusion/ej2-inputs';
|
@@ -782,6 +783,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
782
783
|
this.notify(events.modelChanged, { module: 'largeiconsview', newProp: newProp, oldProp: oldProp });
|
783
784
|
break;
|
784
785
|
case 'toolbarSettings':
|
786
|
+
case 'toolbarItems':
|
785
787
|
this.adjustHeight();
|
786
788
|
this.notify(events.modelChanged, { module: 'toolbar', newProp: newProp, oldProp: oldProp });
|
787
789
|
break;
|
@@ -890,10 +892,10 @@ var FileManager = /** @class */ (function (_super) {
|
|
890
892
|
this.element.innerHTML = '';
|
891
893
|
this.breadCrumbBarNavigation = null;
|
892
894
|
this.activeElements = null;
|
893
|
-
this.virtualizationModule = null;
|
894
895
|
this.virtualDragElement = null;
|
895
896
|
this.visitedItem = null;
|
896
897
|
_super.prototype.destroy.call(this);
|
898
|
+
this.virtualizationModule = null;
|
897
899
|
this.navigationpaneModule = null;
|
898
900
|
this.toolbarModule = null;
|
899
901
|
this.contextmenuModule = null;
|
@@ -958,7 +960,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
958
960
|
* @returns {void}
|
959
961
|
*/
|
960
962
|
FileManager.prototype.disableToolbarItems = function (items) {
|
961
|
-
if (!isNOU(items)) {
|
963
|
+
if (!isNOU(items) && this.toolbarModule) {
|
962
964
|
this.toolbarModule.enableItems(items, false);
|
963
965
|
}
|
964
966
|
};
|
@@ -982,7 +984,7 @@ var FileManager = /** @class */ (function (_super) {
|
|
982
984
|
* @returns {void}
|
983
985
|
*/
|
984
986
|
FileManager.prototype.enableToolbarItems = function (items) {
|
985
|
-
if (!isNOU(items)) {
|
987
|
+
if (!isNOU(items) && this.toolbarModule) {
|
986
988
|
this.toolbarModule.enableItems(items, true);
|
987
989
|
}
|
988
990
|
};
|
@@ -1217,6 +1219,9 @@ var FileManager = /** @class */ (function (_super) {
|
|
1217
1219
|
__decorate([
|
1218
1220
|
Complex({}, ToolbarSettings)
|
1219
1221
|
], FileManager.prototype, "toolbarSettings", void 0);
|
1222
|
+
__decorate([
|
1223
|
+
Collection([], ToolbarItem)
|
1224
|
+
], FileManager.prototype, "toolbarItems", void 0);
|
1220
1225
|
__decorate([
|
1221
1226
|
Complex({}, UploadSettings)
|
1222
1227
|
], FileManager.prototype, "uploadSettings", void 0);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Component, EmitType, L10n } from '@syncfusion/ej2-base';
|
2
2
|
import { Dialog, ButtonPropsModel } from '@syncfusion/ej2-popups';
|
3
3
|
import { FileManagerModel } from '../base/file-manager-model';
|
4
|
-
import { ToolbarSettingsModel, AjaxSettingsModel } from '../models/index';
|
4
|
+
import { ToolbarSettingsModel, AjaxSettingsModel, ToolbarItemModel } from '../models/index';
|
5
5
|
import { DetailsViewSettingsModel } from '../models/details-view-settings-model';
|
6
6
|
import { TreeView, ContextMenu, MenuItemModel, ItemModel } from '@syncfusion/ej2-navigations';
|
7
7
|
import { DetailsView } from '../layout/details-view';
|
@@ -533,6 +533,7 @@ export interface IFileManager extends Component<HTMLElement> {
|
|
533
533
|
feFiles: Object[];
|
534
534
|
ajaxSettings: AjaxSettingsModel;
|
535
535
|
toolbarSettings: ToolbarSettingsModel;
|
536
|
+
toolbarItems: ToolbarItemModel[];
|
536
537
|
detailsViewSettings: DetailsViewSettingsModel;
|
537
538
|
dialogObj: Dialog;
|
538
539
|
viewerObj: Dialog;
|
@@ -152,11 +152,16 @@ var DetailsView = /** @class */ (function () {
|
|
152
152
|
};
|
153
153
|
DetailsView.prototype.reactTemplateRender = function (args) {
|
154
154
|
this.parent["portals"] = args;
|
155
|
+
if (this.parent.portals && this.parent.toolbarModule && this.parent.toolbarModule.toolbarObj &&
|
156
|
+
this.parent.toolbarModule.toolbarObj.portals) {
|
157
|
+
this.parent["portals"] = this.parent["portals"].concat(this.parent.toolbarModule.toolbarObj.portals);
|
158
|
+
}
|
155
159
|
this.parent.notify('renderReactTemplate', this.parent["portals"]);
|
156
160
|
this.parent["renderReactTemplates"]();
|
157
161
|
};
|
158
162
|
/**
|
159
163
|
* Gets the grid height.
|
164
|
+
*
|
160
165
|
* @returns The grid height.
|
161
166
|
* @private
|
162
167
|
*/
|
@@ -223,7 +228,7 @@ var DetailsView = /** @class */ (function () {
|
|
223
228
|
}), allowResizing: false, allowSorting: true, customAttributes: { class: 'e-fe-grid-icon' },
|
224
229
|
headerTemplate: initializeCSPTemplate(function () {
|
225
230
|
return "<span class=\"e-fe-icon e-fe-folder\"></span>";
|
226
|
-
})
|
231
|
+
})
|
227
232
|
};
|
228
233
|
columns.unshift(icon);
|
229
234
|
if (this.parent.showItemCheckBoxes) {
|
@@ -956,8 +961,8 @@ var DetailsView = /** @class */ (function () {
|
|
956
961
|
if (dragLi.getElementsByClassName('e-fe-text')[0]) {
|
957
962
|
name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
|
958
963
|
}
|
959
|
-
else if (dragLi.getElementsByClassName(
|
960
|
-
name = dragLi.getElementsByClassName(
|
964
|
+
else if (dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling) {
|
965
|
+
name = dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
|
961
966
|
}
|
962
967
|
if (dragLi && !dragLi.querySelector('.e-active')) {
|
963
968
|
this.selectRecords([name]);
|
@@ -1179,10 +1184,6 @@ var DetailsView = /** @class */ (function () {
|
|
1179
1184
|
}
|
1180
1185
|
this.parent.visitedItem = args.row;
|
1181
1186
|
if ((!this.parent.enableVirtualization) || (!args.isHeaderCheckboxClicked)) {
|
1182
|
-
if (this.parent.allowMultiSelection && !isNOU(item) && !isNOU(item.querySelector('.e-checkselect'))) {
|
1183
|
-
var checkItem = item.querySelector('.e-checkselect');
|
1184
|
-
checkItem.focus();
|
1185
|
-
}
|
1186
1187
|
this.addFocus(this.gridObj.selectedRowIndex);
|
1187
1188
|
}
|
1188
1189
|
if (!this.parent.isLayoutChange) {
|
@@ -267,7 +267,6 @@ var NavigationPane = /** @class */ (function () {
|
|
267
267
|
this.parent.pathId = getPathId(args.node);
|
268
268
|
this.parent.visitedItem = args.node;
|
269
269
|
}
|
270
|
-
this.expandNodeTarget = null;
|
271
270
|
if (args.node.querySelector('.' + CLS.ICONS) && args.node.querySelector('.' + CLS.LIST_ITEM) === null) {
|
272
271
|
this.expandNodeTarget = 'add';
|
273
272
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Property, ChildProperty, initializeCSPTemplate
|
1
|
+
import { Property, ChildProperty, initializeCSPTemplate } from '@syncfusion/ej2-base';import { ColumnModel } from './index';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* Interface for a class DetailsViewSettings
|