@syncfusion/ej2-filemanager 21.2.3 → 22.1.34
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 +1 -0
- package/CHANGELOG.md +18 -0
- 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 +58 -22
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +57 -22
- 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 +19 -16
- package/src/file-manager/base/file-manager-model.d.ts +7 -0
- package/src/file-manager/base/file-manager.d.ts +6 -0
- package/src/file-manager/base/file-manager.js +3 -0
- package/src/file-manager/base/interface.d.ts +49 -134
- package/src/file-manager/common/operations.js +16 -2
- package/src/file-manager/common/utility.d.ts +2 -2
- package/src/file-manager/common/utility.js +8 -3
- package/src/file-manager/layout/details-view.js +14 -10
- package/src/file-manager/layout/large-icons-view.js +2 -2
- package/src/file-manager/layout/navigation-pane.js +1 -1
- package/src/file-manager/models/column-model.d.ts +4 -2
- package/src/file-manager/models/column.d.ts +4 -2
- package/src/file-manager/models/details-view-settings-model.d.ts +1 -1
- package/src/file-manager/models/details-view-settings.js +9 -3
- package/src/file-manager/models/search-settings.d.ts +6 -13
- package/src/file-manager/pop-up/context-menu.js +5 -3
- package/src/file-manager/pop-up/dialog.js +1 -0
- package/styles/bootstrap-dark.css +5 -1
- package/styles/bootstrap.css +5 -1
- package/styles/bootstrap4.css +5 -1
- package/styles/bootstrap5-dark.css +5 -1
- package/styles/bootstrap5.css +5 -1
- package/styles/fabric-dark.css +5 -1
- package/styles/fabric.css +5 -1
- package/styles/file-manager/_layout.scss +143 -43
- package/styles/file-manager/_material3-dark-definition.scss +1 -0
- package/styles/file-manager/_material3-definition.scss +260 -0
- package/styles/file-manager/_theme.scss +27 -24
- package/styles/file-manager/bootstrap-dark.css +5 -1
- package/styles/file-manager/bootstrap.css +5 -1
- package/styles/file-manager/bootstrap4.css +5 -1
- package/styles/file-manager/bootstrap5-dark.css +5 -1
- package/styles/file-manager/bootstrap5.css +5 -1
- package/styles/file-manager/fabric-dark.css +5 -1
- package/styles/file-manager/fabric.css +5 -1
- package/styles/file-manager/fluent-dark.css +5 -1
- package/styles/file-manager/fluent.css +5 -1
- package/styles/file-manager/highcontrast-light.css +5 -1
- package/styles/file-manager/highcontrast.css +5 -1
- package/styles/file-manager/icons/_material3-dark.scss +1 -0
- package/styles/file-manager/material-dark.css +5 -1
- package/styles/file-manager/material.css +5 -1
- package/styles/file-manager/material3-dark.css +1621 -0
- package/styles/file-manager/material3-dark.scss +17 -0
- package/styles/file-manager/material3.css +1677 -0
- package/styles/file-manager/material3.scss +17 -0
- package/styles/file-manager/tailwind-dark.css +5 -1
- package/styles/file-manager/tailwind.css +5 -1
- package/styles/fluent-dark.css +5 -1
- package/styles/fluent.css +5 -1
- package/styles/highcontrast-light.css +5 -1
- package/styles/highcontrast.css +5 -1
- package/styles/material-dark.css +5 -1
- package/styles/material.css +5 -1
- package/styles/material3-dark.css +1621 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +1677 -0
- package/styles/material3.scss +3 -0
- package/styles/tailwind-dark.css +5 -1
- package/styles/tailwind.css +5 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Ajax, Browser, ChildProperty, Complex, Component, Draggable, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, Touch, addClass, closest, createElement, detach, extend, formatUnit, getUniqueID, getValue, isNullOrUndefined, isVisible, matches, remove, removeClass, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
1
|
+
import { Ajax, Browser, ChildProperty, Complex, Component, Draggable, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, Touch, addClass, closest, createElement, detach, extend, formatUnit, getUniqueID, getValue, initializeCSPTemplate, isNullOrUndefined, isVisible, matches, remove, removeClass, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
2
2
|
import { Splitter } from '@syncfusion/ej2-layouts';
|
3
3
|
import { Dialog, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
4
4
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
@@ -156,14 +156,20 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
156
156
|
var columnArray = [
|
157
157
|
{
|
158
158
|
field: 'name', headerText: 'Name', minWidth: 120, isPrimaryKey: true,
|
159
|
-
template:
|
159
|
+
template: initializeCSPTemplate(function (data) {
|
160
|
+
return "<span class=\"e-fe-text\">" + data.name + "</span>";
|
161
|
+
}),
|
162
|
+
customAttributes: { class: 'e-fe-grid-name' }
|
160
163
|
},
|
161
164
|
{
|
162
165
|
field: '_fm_modified', headerText: 'DateModified', type: 'dateTime',
|
163
166
|
format: 'MMMM dd, yyyy HH:mm', minWidth: 120, width: '190'
|
164
167
|
},
|
165
168
|
{
|
166
|
-
field: 'size', headerText: 'Size', minWidth: 90, width: '110',
|
169
|
+
field: 'size', headerText: 'Size', minWidth: 90, width: '110',
|
170
|
+
template: initializeCSPTemplate(function (data) {
|
171
|
+
return "<span class=\"e-fe-size\">" + data.size + "</span>";
|
172
|
+
}), format: 'n2'
|
167
173
|
}
|
168
174
|
];
|
169
175
|
/**
|
@@ -1408,10 +1414,15 @@ function setNodeId(result, rootId) {
|
|
1408
1414
|
* @private
|
1409
1415
|
*/
|
1410
1416
|
// eslint-disable-next-line
|
1411
|
-
function setDateObject(args) {
|
1417
|
+
function setDateObject(args, localeString, dateFormat) {
|
1412
1418
|
for (var i = 0; i < args.length; i++) {
|
1413
|
-
|
1414
|
-
|
1419
|
+
var createdDate = new Date(getValue('dateCreated', args[i]));
|
1420
|
+
var modifiedDate = new Date(getValue('dateModified', args[i]));
|
1421
|
+
if (isNullOrUndefined(dateFormat)) {
|
1422
|
+
dateFormat = "MM/dd/yyyy";
|
1423
|
+
}
|
1424
|
+
setValue('_fm_created', localeString.formatDate(createdDate, { format: dateFormat }), args[i]);
|
1425
|
+
setValue('_fm_modified', localeString.formatDate(modifiedDate, { format: dateFormat }), args[i]);
|
1415
1426
|
}
|
1416
1427
|
}
|
1417
1428
|
/**
|
@@ -2442,6 +2453,19 @@ function GetDetails(parent, names, path, operation) {
|
|
2442
2453
|
* @returns {void}
|
2443
2454
|
* @private
|
2444
2455
|
*/
|
2456
|
+
function getDateFormat(parent) {
|
2457
|
+
var columns = parent.detailsViewSettings.columns;
|
2458
|
+
var dateFormat;
|
2459
|
+
for (var i = 0; i < columns.length; i++) {
|
2460
|
+
if (columns[i].field === '_fm_modified') {
|
2461
|
+
if (!isNullOrUndefined(columns[i].format)) {
|
2462
|
+
dateFormat = columns[i].format.toString();
|
2463
|
+
}
|
2464
|
+
break;
|
2465
|
+
}
|
2466
|
+
}
|
2467
|
+
return dateFormat;
|
2468
|
+
}
|
2445
2469
|
function createAjax(
|
2446
2470
|
// eslint-disable-next-line
|
2447
2471
|
parent, data, fn, event, operation, targetPath) {
|
@@ -2503,8 +2527,9 @@ parent, data, fn, event, operation, targetPath) {
|
|
2503
2527
|
}
|
2504
2528
|
}
|
2505
2529
|
}
|
2530
|
+
var intl = new Internationalization(parent.locale);
|
2506
2531
|
if (!isNullOrUndefined(result.files)) {
|
2507
|
-
setDateObject(result.files);
|
2532
|
+
setDateObject(result.files, intl, getDateFormat(parent));
|
2508
2533
|
for (var i = 0, len = result.files.length; i < len; i++) {
|
2509
2534
|
// eslint-disable-next-line
|
2510
2535
|
var item = result.files[i];
|
@@ -3730,6 +3755,7 @@ function onReSubmit(parent) {
|
|
3730
3755
|
var newPath = (parent.activeModule === 'navigationpane') ? getValue('filterPath', parent.itemData[0]).replace(/\\/g, '/') : parent.path;
|
3731
3756
|
parent.renamedId = getValue('id', parent.itemData[0]);
|
3732
3757
|
parent.renamedId = getValue('id', parent.itemData[0]);
|
3758
|
+
parent.renamedId = getValue('id', parent.itemData[0]);
|
3733
3759
|
if (parent.isFile) {
|
3734
3760
|
var oldExtension = (oIndex === -1) ? '' : parent.currentItemText.substr(oIndex);
|
3735
3761
|
var nIndex = text.lastIndexOf('.');
|
@@ -4176,7 +4202,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
4176
4202
|
this.parent.trigger('fileLoad', eventArgs);
|
4177
4203
|
};
|
4178
4204
|
LargeIconsView.prototype.renderCheckbox = function (args) {
|
4179
|
-
if (!this.parent.
|
4205
|
+
if (!this.parent.showItemCheckBoxes) {
|
4180
4206
|
return;
|
4181
4207
|
}
|
4182
4208
|
var checkElement = createCheckBox(createElement, false, {
|
@@ -5239,7 +5265,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
|
|
5239
5265
|
item.focus();
|
5240
5266
|
};
|
5241
5267
|
LargeIconsView.prototype.checkState = function (item, toCheck) {
|
5242
|
-
if (!this.parent.
|
5268
|
+
if (!this.parent.showItemCheckBoxes) {
|
5243
5269
|
return;
|
5244
5270
|
}
|
5245
5271
|
var checkEle = select('.' + FRAME, item);
|
@@ -6152,9 +6178,11 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
|
|
6152
6178
|
this.menuType = 'folder';
|
6153
6179
|
this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.folder.map(function (item) { return item.trim(); }));
|
6154
6180
|
this.contextMenu.dataBind();
|
6155
|
-
|
6156
|
-
|
6157
|
-
this.
|
6181
|
+
if (isTree) {
|
6182
|
+
var selectedTreeNode = select('[data-uid="' + this.parent.navigationpaneModule.treeObj.selectedNodes[0] + '"]', this.parent.navigationpaneModule.treeObj.element);
|
6183
|
+
if (this.parent.pathNames[this.parent.pathNames.length - 1] === selectedTreeNode.querySelector('.e-list-text').innerHTML && this.parent.activeModule === 'navigationpane') {
|
6184
|
+
this.disabledItems.push('Open');
|
6185
|
+
}
|
6158
6186
|
}
|
6159
6187
|
else if (this.parent.selectedItems.length !== 1 && this.parent.activeModule !== 'navigationpane') {
|
6160
6188
|
this.disabledItems.push('Rename', 'Paste');
|
@@ -7747,6 +7775,9 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
|
|
7747
7775
|
__decorate$8([
|
7748
7776
|
Property(true)
|
7749
7777
|
], FileManager.prototype, "allowMultiSelection", void 0);
|
7778
|
+
__decorate$8([
|
7779
|
+
Property(true)
|
7780
|
+
], FileManager.prototype, "showItemCheckBoxes", void 0);
|
7750
7781
|
__decorate$8([
|
7751
7782
|
Complex({}, ContextMenuSettings)
|
7752
7783
|
], FileManager.prototype, "contextMenuSettings", void 0);
|
@@ -8833,7 +8864,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
|
|
8833
8864
|
var selecEventArgs = { action: args.action, fileDetails: nodeData[0], isInteracted: args.isInteracted };
|
8834
8865
|
this.parent.trigger('fileSelect', selecEventArgs);
|
8835
8866
|
}
|
8836
|
-
if (!this.isRightClick
|
8867
|
+
if (!this.isRightClick) {
|
8837
8868
|
var eventArgs = { cancel: false, fileDetails: nodeData[0], module: 'NavigationPane' };
|
8838
8869
|
this.parent.trigger('fileOpen', eventArgs);
|
8839
8870
|
args.cancel = eventArgs.cancel;
|
@@ -9701,13 +9732,14 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9701
9732
|
columns = [
|
9702
9733
|
{
|
9703
9734
|
field: 'name', headerText: getLocaleText(this.parent, 'Name'), width: 'auto', minWidth: 120, headerTextAlign: 'Left',
|
9704
|
-
template:
|
9705
|
-
'<span class
|
9735
|
+
template: initializeCSPTemplate(function (data) {
|
9736
|
+
return "<div class=\"e-fe-text\">" + data.name + "</div><div class=\"e-fe-date\">" + data._fm_modified + "</div>' +\n '<span class=\"e-fe-size\">" + data.size + "</span>";
|
9737
|
+
})
|
9706
9738
|
}
|
9707
9739
|
];
|
9708
9740
|
}
|
9709
9741
|
else {
|
9710
|
-
columns =
|
9742
|
+
columns = extend([], this.parent.detailsViewSettings.columns, null, true);
|
9711
9743
|
this.adjustWidth(columns, 'name');
|
9712
9744
|
for (var i = 0, len = columns.length; i < len; i++) {
|
9713
9745
|
columns[i].headerText = getLocaleText(this.parent, columns[i].headerText);
|
@@ -9715,12 +9747,16 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9715
9747
|
}
|
9716
9748
|
var iWidth = ((this.parent.isMobile || this.parent.isBigger) ? '54' : '46');
|
9717
9749
|
var icon = {
|
9718
|
-
field: 'type', width: iWidth, minWidth: iWidth,
|
9719
|
-
|
9720
|
-
|
9750
|
+
field: 'type', width: iWidth, minWidth: iWidth,
|
9751
|
+
template: initializeCSPTemplate(function (data) {
|
9752
|
+
return "<span class=\"e-fe-icon " + data._fm_iconClass + "\"></span>";
|
9753
|
+
}), allowResizing: false, allowSorting: true, customAttributes: { class: 'e-fe-grid-icon' },
|
9754
|
+
headerTemplate: initializeCSPTemplate(function () {
|
9755
|
+
return "<span class=\"e-fe-icon e-fe-folder\"></span>";
|
9756
|
+
}),
|
9721
9757
|
};
|
9722
9758
|
columns.unshift(icon);
|
9723
|
-
if (this.parent.
|
9759
|
+
if (this.parent.showItemCheckBoxes) {
|
9724
9760
|
var cWidth = (this.parent.isBigger ? '36' : '26');
|
9725
9761
|
var cBox = {
|
9726
9762
|
type: 'checkbox', width: cWidth, minWidth: cWidth, customAttributes: { class: 'e-fe-checkbox' },
|
@@ -9800,8 +9836,6 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
9800
9836
|
}
|
9801
9837
|
}
|
9802
9838
|
var value = intl.formatNumber((sizeValue / 1024), { format: sizeFormat });
|
9803
|
-
var num = Number(value.replace(/,/g, ''));
|
9804
|
-
value = num.toLocaleString(intl.culture);
|
9805
9839
|
modifiedSize = value + ' ' + getLocaleText(this.parent, 'KB');
|
9806
9840
|
}
|
9807
9841
|
sizeEle.innerHTML = modifiedSize;
|
@@ -10865,6 +10899,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
|
|
10865
10899
|
var lastItem;
|
10866
10900
|
switch (action) {
|
10867
10901
|
case 'altEnter':
|
10902
|
+
this.parent.notify(detailsInit, {});
|
10868
10903
|
GetDetails(this.parent, this.parent.selectedItems, this.parent.path, 'details');
|
10869
10904
|
break;
|
10870
10905
|
case 'esc':
|