@syncfusion/ej2-filemanager 20.1.52-10459 → 20.1.52-10460
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 +3 -20
- package/CHANGELOG.md +410 -0
- package/README.md +43 -54
- package/dist/ej2-filemanager.umd.min.js +10 -1
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +659 -2353
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +708 -2421
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +10 -1
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/helpers/e2e/filemanagerHelper.js +166 -183
- package/package.json +71 -71
- package/src/file-manager/actions/breadcrumb-bar.js +5 -1
- package/src/file-manager/actions/index.d.ts +0 -1
- package/src/file-manager/actions/index.js +0 -1
- package/src/file-manager/actions/toolbar.d.ts +0 -1
- package/src/file-manager/actions/toolbar.js +17 -129
- package/src/file-manager/base/file-manager-model.d.ts +28 -154
- package/src/file-manager/base/file-manager.d.ts +27 -176
- package/src/file-manager/base/file-manager.js +28 -244
- package/src/file-manager/base/interface.d.ts +3 -329
- package/src/file-manager/base/interface.js +1 -0
- package/src/file-manager/common/operations.d.ts +0 -7
- package/src/file-manager/common/operations.js +185 -830
- package/src/file-manager/common/utility.d.ts +3 -46
- package/src/file-manager/common/utility.js +73 -249
- package/src/file-manager/index.d.ts +0 -1
- package/src/file-manager/index.js +0 -1
- package/src/file-manager/layout/details-view.d.ts +0 -10
- package/src/file-manager/layout/details-view.js +94 -203
- package/src/file-manager/layout/large-icons-view.d.ts +2 -4
- package/src/file-manager/layout/large-icons-view.js +72 -121
- package/src/file-manager/layout/navigation-pane.d.ts +0 -2
- package/src/file-manager/layout/navigation-pane.js +73 -97
- package/src/file-manager/models/column-model.d.ts +5 -23
- package/src/file-manager/models/column.d.ts +2 -21
- package/src/file-manager/models/column.js +0 -6
- package/src/file-manager/models/default-locale.js +1 -0
- package/src/file-manager/models/details-view-settings-model.d.ts +1 -1
- package/src/file-manager/models/details-view-settings.js +3 -8
- package/src/file-manager/models/search-settings.d.ts +0 -5
- package/src/file-manager/models/toolbar-settings-model.d.ts +2 -177
- package/src/file-manager/models/toolbar-settings.d.ts +2 -157
- package/src/file-manager/models/toolbar-settings.js +2 -64
- package/src/file-manager/models/upload-settings-model.d.ts +0 -13
- package/src/file-manager/models/upload-settings.d.ts +0 -12
- package/src/file-manager/models/upload-settings.js +0 -3
- package/src/file-manager/pop-up/context-menu.d.ts +1 -2
- package/src/file-manager/pop-up/context-menu.js +36 -111
- package/src/file-manager/pop-up/dialog.d.ts +2 -1
- package/src/file-manager/pop-up/dialog.js +40 -19
- package/src/global.js +1 -1
- package/styles/bootstrap-dark.css +665 -371
- package/styles/bootstrap-dark.scss +1 -17
- package/styles/bootstrap.css +644 -353
- package/styles/bootstrap.scss +1 -17
- package/styles/bootstrap4.css +680 -381
- package/styles/bootstrap4.scss +1 -17
- package/styles/bootstrap5-dark.css +694 -376
- package/styles/bootstrap5-dark.scss +1 -17
- package/styles/bootstrap5.css +695 -377
- package/styles/bootstrap5.scss +1 -17
- package/styles/fabric-dark.css +642 -358
- package/styles/fabric-dark.scss +1 -17
- package/styles/fabric.css +641 -357
- package/styles/fabric.scss +1 -17
- package/styles/file-manager/_all.scss +1 -1
- package/styles/file-manager/_bootstrap-dark-definition.scss +2 -6
- package/styles/file-manager/_bootstrap-definition.scss +2 -6
- package/styles/file-manager/_bootstrap4-definition.scss +2 -6
- package/styles/file-manager/_bootstrap5-definition.scss +15 -20
- package/styles/file-manager/_fabric-dark-definition.scss +2 -6
- package/styles/file-manager/_fabric-definition.scss +2 -6
- package/styles/file-manager/_fluent-definition.scss +15 -18
- package/styles/file-manager/_highcontrast-definition.scss +2 -6
- package/styles/file-manager/_highcontrast-light-definition.scss +2 -6
- package/styles/file-manager/_layout.scss +932 -369
- package/styles/file-manager/_material-dark-definition.scss +2 -7
- package/styles/file-manager/_material-definition.scss +2 -7
- package/styles/file-manager/_tailwind-definition.scss +16 -20
- package/styles/file-manager/_theme.scss +102 -123
- package/styles/file-manager/bootstrap-dark.css +665 -371
- package/styles/file-manager/bootstrap-dark.scss +1 -2
- package/styles/file-manager/bootstrap.css +644 -353
- package/styles/file-manager/bootstrap.scss +1 -2
- package/styles/file-manager/bootstrap4.css +680 -381
- package/styles/file-manager/bootstrap4.scss +1 -2
- package/styles/file-manager/bootstrap5-dark.css +694 -376
- package/styles/file-manager/bootstrap5-dark.scss +1 -2
- package/styles/file-manager/bootstrap5.css +695 -377
- package/styles/file-manager/bootstrap5.scss +1 -2
- package/styles/file-manager/fabric-dark.css +642 -358
- package/styles/file-manager/fabric-dark.scss +1 -2
- package/styles/file-manager/fabric.css +641 -357
- package/styles/file-manager/fabric.scss +1 -2
- package/styles/file-manager/fluent-dark.css +641 -356
- package/styles/file-manager/fluent-dark.scss +1 -2
- package/styles/file-manager/fluent.css +640 -355
- package/styles/file-manager/fluent.scss +1 -2
- package/styles/file-manager/highcontrast-light.css +644 -354
- package/styles/file-manager/highcontrast-light.scss +1 -2
- package/styles/file-manager/highcontrast.css +647 -377
- package/styles/file-manager/highcontrast.scss +1 -2
- package/styles/file-manager/icons/_bootstrap.scss +1 -0
- package/styles/file-manager/icons/_bootstrap4.scss +1 -0
- package/styles/file-manager/icons/_fabric-dark.scss +1 -0
- package/styles/file-manager/icons/_fabric.scss +1 -0
- package/styles/file-manager/material-dark.css +671 -392
- package/styles/file-manager/material-dark.scss +1 -2
- package/styles/file-manager/material.css +654 -391
- package/styles/file-manager/material.scss +1 -2
- package/styles/file-manager/tailwind-dark.css +667 -350
- package/styles/file-manager/tailwind-dark.scss +1 -2
- package/styles/file-manager/tailwind.css +667 -350
- package/styles/file-manager/tailwind.scss +1 -2
- package/styles/fluent-dark.css +641 -356
- package/styles/fluent-dark.scss +1 -17
- package/styles/fluent.css +640 -355
- package/styles/fluent.scss +1 -17
- package/styles/highcontrast-light.css +644 -354
- package/styles/highcontrast-light.scss +1 -17
- package/styles/highcontrast.css +647 -377
- package/styles/highcontrast.scss +1 -17
- package/styles/material-dark.css +671 -392
- package/styles/material-dark.scss +1 -17
- package/styles/material.css +654 -391
- package/styles/material.scss +1 -17
- package/styles/tailwind-dark.css +667 -350
- package/styles/tailwind-dark.scss +1 -17
- package/styles/tailwind.css +667 -350
- package/styles/tailwind.scss +1 -17
- package/dist/ej2-filemanager.min.js +0 -1
- package/src/file-manager/actions/virtualization.d.ts +0 -93
- package/src/file-manager/actions/virtualization.js +0 -279
- package/styles/bootstrap-dark-lite.css +0 -1058
- package/styles/bootstrap-dark-lite.scss +0 -16
- package/styles/bootstrap-lite.css +0 -1040
- package/styles/bootstrap-lite.scss +0 -16
- package/styles/bootstrap4-lite.css +0 -1068
- package/styles/bootstrap4-lite.scss +0 -16
- package/styles/bootstrap5-dark-lite.css +0 -1078
- package/styles/bootstrap5-dark-lite.scss +0 -16
- package/styles/bootstrap5-lite.css +0 -1078
- package/styles/bootstrap5-lite.scss +0 -16
- package/styles/bootstrap5.3-lite.css +0 -1035
- package/styles/bootstrap5.3-lite.scss +0 -16
- package/styles/bootstrap5.3.css +0 -1603
- package/styles/bootstrap5.3.scss +0 -17
- package/styles/fabric-dark-lite.css +0 -1039
- package/styles/fabric-dark-lite.scss +0 -16
- package/styles/fabric-lite.css +0 -1039
- package/styles/fabric-lite.scss +0 -16
- package/styles/file-manager/_bds-definition.scss +0 -236
- package/styles/file-manager/_bigger.scss +0 -758
- package/styles/file-manager/_bootstrap5.3-definition.scss +0 -242
- package/styles/file-manager/_fluent2-definition.scss +0 -255
- package/styles/file-manager/_fusionnew-definition.scss +0 -241
- package/styles/file-manager/_material3-dark-definition.scss +0 -1
- package/styles/file-manager/_material3-definition.scss +0 -235
- package/styles/file-manager/bootstrap5.3.css +0 -1603
- package/styles/file-manager/bootstrap5.3.scss +0 -17
- package/styles/file-manager/fluent2.css +0 -1886
- package/styles/file-manager/fluent2.scss +0 -17
- package/styles/file-manager/icons/_bds.scss +0 -235
- package/styles/file-manager/icons/_bootstrap5.3.scss +0 -235
- package/styles/file-manager/icons/_fluent2.scss +0 -235
- package/styles/file-manager/icons/_fusionnew.scss +0 -235
- package/styles/file-manager/icons/_material3-dark.scss +0 -1
- package/styles/file-manager/icons/_material3.scss +0 -235
- package/styles/file-manager/material3-dark.css +0 -1633
- package/styles/file-manager/material3-dark.scss +0 -18
- package/styles/file-manager/material3.css +0 -1635
- package/styles/file-manager/material3.scss +0 -18
- package/styles/fluent-dark-lite.css +0 -1037
- package/styles/fluent-dark-lite.scss +0 -16
- package/styles/fluent-lite.css +0 -1036
- package/styles/fluent-lite.scss +0 -16
- package/styles/fluent2-lite.css +0 -1272
- package/styles/fluent2-lite.scss +0 -16
- package/styles/fluent2.css +0 -1886
- package/styles/fluent2.scss +0 -17
- package/styles/highcontrast-light-lite.css +0 -1039
- package/styles/highcontrast-light-lite.scss +0 -16
- package/styles/highcontrast-lite.css +0 -1059
- package/styles/highcontrast-lite.scss +0 -16
- package/styles/material-dark-lite.css +0 -1092
- package/styles/material-dark-lite.scss +0 -16
- package/styles/material-lite.css +0 -1097
- package/styles/material-lite.scss +0 -16
- package/styles/material3-dark-lite.css +0 -1090
- package/styles/material3-dark-lite.scss +0 -16
- package/styles/material3-dark.css +0 -1633
- package/styles/material3-dark.scss +0 -19
- package/styles/material3-lite.css +0 -1092
- package/styles/material3-lite.scss +0 -16
- package/styles/material3.css +0 -1635
- package/styles/material3.scss +0 -19
- package/styles/tailwind-dark-lite.css +0 -1060
- package/styles/tailwind-dark-lite.scss +0 -16
- package/styles/tailwind-lite.css +0 -1060
- package/styles/tailwind-lite.scss +0 -16
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Grid, Resize, ContextMenu, Sort, VirtualScroll } from '@syncfusion/ej2-grids';
|
2
2
|
import { select, KeyboardEvents, EventHandler, getValue, isNullOrUndefined } from '@syncfusion/ej2-base';
|
3
3
|
import { isNullOrUndefined as isNOU, Touch, setValue, addClass, removeClass } from '@syncfusion/ej2-base';
|
4
|
-
import { Internationalization, closest, Draggable
|
4
|
+
import { Internationalization, closest, Draggable } from '@syncfusion/ej2-base';
|
5
5
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
6
6
|
import { hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
7
7
|
import * as events from '../base/constant';
|
@@ -14,7 +14,6 @@ import { cutFiles, addBlur, openSearchFolder, copyFiles, removeActive, pasteHand
|
|
14
14
|
import { hasReadAccess, hasEditAccess, hasDownloadAccess, doRename, getAccessClass, createDeniedDialog, rename } from '../common/index';
|
15
15
|
import { createVirtualDragElement, dragStopHandler, dragStartHandler, draggingHandler, getModule, getFullPath } from '../common/index';
|
16
16
|
import { getDirectoryPath, updateRenamingData, getItemName, doDeleteFiles, doDownloadFiles } from '../common/index';
|
17
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
18
17
|
/**
|
19
18
|
* DetailsView module
|
20
19
|
*/
|
@@ -72,16 +71,15 @@ var DetailsView = /** @class */ (function () {
|
|
72
71
|
home: 'home',
|
73
72
|
moveUp: 'uparrow',
|
74
73
|
del: 'delete',
|
75
|
-
ctrlX:
|
76
|
-
ctrlC:
|
77
|
-
ctrlV:
|
74
|
+
ctrlX: 'ctrl+x',
|
75
|
+
ctrlC: 'ctrl+c',
|
76
|
+
ctrlV: 'ctrl+v',
|
78
77
|
ctrlShiftN: 'ctrl+shift+n',
|
79
78
|
shiftdel: 'shift+delete',
|
80
79
|
ctrlD: 'ctrl+d',
|
81
80
|
f2: 'f2',
|
82
81
|
ctrlA: 'ctrl+a',
|
83
|
-
enter: 'enter'
|
84
|
-
back: 'backspace'
|
82
|
+
enter: 'enter'
|
85
83
|
};
|
86
84
|
}
|
87
85
|
/* istanbul ignore next */
|
@@ -89,6 +87,7 @@ var DetailsView = /** @class */ (function () {
|
|
89
87
|
showSpinner(this.parent.element);
|
90
88
|
if (this.parent.view === 'Details') {
|
91
89
|
removeClass([this.parent.element], CLS.MULTI_SELECT);
|
90
|
+
// eslint-disable-next-line
|
92
91
|
var items = getSortedData(this.parent, args.files);
|
93
92
|
this.checkNameWidth();
|
94
93
|
var columns = this.getColumns();
|
@@ -115,9 +114,6 @@ var DetailsView = /** @class */ (function () {
|
|
115
114
|
},
|
116
115
|
enableRtl: this.parent.enableRtl,
|
117
116
|
pageSettings: { pageSize: 20 },
|
118
|
-
enableVirtualization: this.parent.enableVirtualization,
|
119
|
-
enablePersistence: this.parent.enablePersistence,
|
120
|
-
enableVirtualMaskRow: true,
|
121
117
|
sortSettings: { allowUnsort: false, columns: sortSettings },
|
122
118
|
columns: columns,
|
123
119
|
recordDoubleClick: this.DblClickEvents.bind(this),
|
@@ -127,18 +123,13 @@ var DetailsView = /** @class */ (function () {
|
|
127
123
|
actionBegin: this.onActionBegin.bind(this),
|
128
124
|
headerCellInfo: this.onHeaderCellInfo.bind(this),
|
129
125
|
width: '100%',
|
130
|
-
height: (this.parent.enableVirtualization) ? this.getGridHeight() : 'auto',
|
131
126
|
beforeCopy: function (args) { args.cancel = true; },
|
132
|
-
|
127
|
+
// eslint-disable-next-line
|
128
|
+
load: function (args) {
|
133
129
|
this.focusModule.destroy();
|
134
130
|
},
|
135
131
|
locale: this.parent.locale
|
136
132
|
});
|
137
|
-
if (this.parent.isReact) {
|
138
|
-
this.gridObj.isReact = true;
|
139
|
-
this.gridObj.portals = [];
|
140
|
-
this.gridObj.on('reactTemplateRender', this.reactTemplateRender, this);
|
141
|
-
}
|
142
133
|
this.gridObj.isStringTemplate = true;
|
143
134
|
this.gridObj.appendTo('#' + this.parent.element.id + CLS.GRID_ID);
|
144
135
|
this.wireEvents();
|
@@ -146,30 +137,6 @@ var DetailsView = /** @class */ (function () {
|
|
146
137
|
this.emptyArgs = args;
|
147
138
|
}
|
148
139
|
};
|
149
|
-
DetailsView.prototype.reactTemplateRender = function (args) {
|
150
|
-
this.parent['portals'] = args;
|
151
|
-
if (this.parent.portals && this.parent.toolbarModule && this.parent.toolbarModule.toolbarObj &&
|
152
|
-
this.parent.toolbarModule.toolbarObj.portals) {
|
153
|
-
this.parent['portals'] = this.parent['portals'].concat(this.parent.toolbarModule.toolbarObj.portals);
|
154
|
-
}
|
155
|
-
this.parent.notify('renderReactTemplate', this.parent['portals']);
|
156
|
-
this.parent['renderReactTemplates']();
|
157
|
-
};
|
158
|
-
/**
|
159
|
-
* Gets the grid height.
|
160
|
-
*
|
161
|
-
* @returns {number} - The grid height.
|
162
|
-
* @private
|
163
|
-
*/
|
164
|
-
DetailsView.prototype.getGridHeight = function () {
|
165
|
-
// Get the content pane and breadcrumb bar elements
|
166
|
-
var pane = select('#' + this.parent.element.id + CLS.CONTENT_ID, this.parent.element);
|
167
|
-
var bar = select('#' + this.parent.element.id + CLS.BREADCRUMBBAR_ID, this.parent.element);
|
168
|
-
// The maximum height of the header is 36
|
169
|
-
var headerMaxHeight = 36;
|
170
|
-
// Calculate and return the grid height
|
171
|
-
return (pane.offsetHeight - bar.offsetHeight - headerMaxHeight);
|
172
|
-
};
|
173
140
|
DetailsView.prototype.checkNameWidth = function () {
|
174
141
|
var initialColumn = this.parent.detailsViewSettings.columns;
|
175
142
|
this.isNameWidth = false;
|
@@ -199,48 +166,30 @@ var DetailsView = /** @class */ (function () {
|
|
199
166
|
};
|
200
167
|
DetailsView.prototype.getColumns = function () {
|
201
168
|
var columns;
|
202
|
-
var enableHtmlSanitizer = this.parent.enableHtmlSanitizer;
|
203
169
|
if (this.parent.isMobile) {
|
204
170
|
columns = [
|
205
171
|
{
|
206
172
|
field: 'name', headerText: getLocaleText(this.parent, 'Name'), width: 'auto', minWidth: 120, headerTextAlign: 'Left',
|
207
|
-
template:
|
208
|
-
|
209
|
-
return "<div class=\"e-fe-text\">" + name + "</div><div class=\"e-fe-date\">" + data._fm_modified + "</div><span class=\"e-fe-size\">" + data.size + "</span>";
|
210
|
-
})
|
173
|
+
template: '<div class="e-fe-text">${name}</div><div class="e-fe-date">${_fm_modified}</div>' +
|
174
|
+
'<span class="e-fe-size">${size}</span>'
|
211
175
|
}
|
212
176
|
];
|
213
177
|
}
|
214
178
|
else {
|
215
|
-
columns =
|
179
|
+
columns = JSON.parse(JSON.stringify(this.parent.detailsViewSettings.columns));
|
216
180
|
this.adjustWidth(columns, 'name');
|
217
|
-
var _loop_1 = function (i, len) {
|
218
|
-
columns[i].headerText = getLocaleText(this_1.parent, columns[i].headerText);
|
219
|
-
if (columns[i].field === 'name' && !isNOU(columns[i].template) && !(typeof columns[i].template === 'function')) {
|
220
|
-
var template_1 = columns[i].template;
|
221
|
-
columns[i].template = initializeCSPTemplate(function (data) {
|
222
|
-
var name = enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(data.name) : data.name;
|
223
|
-
return template_1.replace(/\${name}/g, name);
|
224
|
-
});
|
225
|
-
}
|
226
|
-
};
|
227
|
-
var this_1 = this;
|
228
181
|
for (var i = 0, len = columns.length; i < len; i++) {
|
229
|
-
|
182
|
+
columns[i].headerText = getLocaleText(this.parent, columns[i].headerText);
|
230
183
|
}
|
231
184
|
}
|
232
185
|
var iWidth = ((this.parent.isMobile || this.parent.isBigger) ? '54' : '46');
|
233
186
|
var icon = {
|
234
|
-
field: 'type', width: iWidth, minWidth: iWidth,
|
235
|
-
|
236
|
-
|
237
|
-
}), allowResizing: false, allowSorting: true, customAttributes: { class: 'e-fe-grid-icon' },
|
238
|
-
headerTemplate: initializeCSPTemplate(function () {
|
239
|
-
return '<span class=\'e-fe-icon e-fe-folder\'></span>';
|
240
|
-
})
|
187
|
+
field: 'type', width: iWidth, minWidth: iWidth, template: '<span class="e-fe-icon ${_fm_iconClass}"></span>',
|
188
|
+
allowResizing: false, allowSorting: true, customAttributes: { class: 'e-fe-grid-icon' },
|
189
|
+
headerTemplate: '<span class="e-fe-icon e-fe-folder"></span>'
|
241
190
|
};
|
242
191
|
columns.unshift(icon);
|
243
|
-
if (this.parent.
|
192
|
+
if (this.parent.allowMultiSelection) {
|
244
193
|
var cWidth = (this.parent.isBigger ? '36' : '26');
|
245
194
|
var cBox = {
|
246
195
|
type: 'checkbox', width: cWidth, minWidth: cWidth, customAttributes: { class: 'e-fe-checkbox' },
|
@@ -256,10 +205,6 @@ var DetailsView = /** @class */ (function () {
|
|
256
205
|
for (var i = 0, len = columns.length; i < len; i++) {
|
257
206
|
columns[i].disableHtmlEncode = !this.parent.enableHtmlSanitizer;
|
258
207
|
}
|
259
|
-
if (this.parent.enableRangeSelection) {
|
260
|
-
var HiddenName = { field: 'name', visible: false, customAttributes: { class: 'e-drag-text' } };
|
261
|
-
columns.push(HiddenName);
|
262
|
-
}
|
263
208
|
return columns;
|
264
209
|
};
|
265
210
|
DetailsView.prototype.adjustHeight = function () {
|
@@ -299,8 +244,7 @@ var DetailsView = /** @class */ (function () {
|
|
299
244
|
}
|
300
245
|
}
|
301
246
|
if (!this.parent.showFileExtension && getValue('isFile', args.data)) {
|
302
|
-
var
|
303
|
-
var textEle = args.row.querySelector('[title= "' + text + '"]');
|
247
|
+
var textEle = args.row.querySelector('.e-fe-text');
|
304
248
|
if (textEle) {
|
305
249
|
var name_1 = getValue('name', args.data);
|
306
250
|
var type = getValue('type', args.data);
|
@@ -316,15 +260,7 @@ var DetailsView = /** @class */ (function () {
|
|
316
260
|
else {
|
317
261
|
var sizeValue = getValue('size', args.data);
|
318
262
|
var intl = new Internationalization(this.parent.locale);
|
319
|
-
var
|
320
|
-
var columns = this.parent.detailsViewSettings.columns;
|
321
|
-
for (var i = 0; i < columns.length; i++) {
|
322
|
-
if (columns[i].field === 'size') {
|
323
|
-
sizeFormat = !isNullOrUndefined(columns[i].format) ? columns[i].format.toString() : 'n';
|
324
|
-
break;
|
325
|
-
}
|
326
|
-
}
|
327
|
-
var value = intl.formatNumber((sizeValue / 1024), { format: sizeFormat });
|
263
|
+
var value = intl.formatNumber((sizeValue / 1024), { format: 'n' });
|
328
264
|
modifiedSize = value + ' ' + getLocaleText(this.parent, 'KB');
|
329
265
|
}
|
330
266
|
sizeEle.innerHTML = modifiedSize;
|
@@ -334,6 +270,7 @@ var DetailsView = /** @class */ (function () {
|
|
334
270
|
var dateEle = args.row.querySelector('.e-fe-date');
|
335
271
|
var intl = new Internationalization(this.parent.locale);
|
336
272
|
var columns = this.parent.detailsViewSettings.columns;
|
273
|
+
// eslint-disable-next-line
|
337
274
|
var format = void 0;
|
338
275
|
for (var i = 0; i < columns.length; i++) {
|
339
276
|
if (columns[i].field === 'dateModified') {
|
@@ -369,6 +306,7 @@ var DetailsView = /** @class */ (function () {
|
|
369
306
|
var len = rows.length;
|
370
307
|
this.sortSelectedNodes = [];
|
371
308
|
while (len > 0) {
|
309
|
+
// eslint-disable-next-line
|
372
310
|
var data = this.gridObj.getRowsObject()[rows[len - 1]].data;
|
373
311
|
this.sortSelectedNodes.push(getValue(this.parent.hasId ? 'id' : 'name', data));
|
374
312
|
len--;
|
@@ -384,22 +322,15 @@ var DetailsView = /** @class */ (function () {
|
|
384
322
|
}
|
385
323
|
};
|
386
324
|
DetailsView.prototype.onBeforeDataBound = function (args) {
|
387
|
-
var _this = this;
|
388
325
|
showSpinner(this.parent.element);
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
? args.result
|
393
|
-
: this.gridObj.dataSource);
|
394
|
-
args.result = items;
|
395
|
-
}
|
326
|
+
// eslint-disable-next-line
|
327
|
+
var items = getSortedData(this.parent, this.gridObj.dataSource);
|
328
|
+
args.result = items;
|
396
329
|
};
|
397
330
|
/* istanbul ignore next */
|
398
331
|
DetailsView.prototype.onDataBound = function () {
|
399
332
|
this.createDragObj();
|
400
|
-
if (
|
401
|
-
((this.parent.selectedItems.length !== 0 && this.parent.enableVirtualization &&
|
402
|
-
this.element.querySelector('.e-content').scrollTop === 0))) {
|
333
|
+
if (this.parent.selectedItems.length !== 0) {
|
403
334
|
this.selectRecords(this.parent.selectedItems);
|
404
335
|
}
|
405
336
|
if (this.isPasteOperation === true) {
|
@@ -472,6 +403,7 @@ var DetailsView = /** @class */ (function () {
|
|
472
403
|
this.isLoaded = false;
|
473
404
|
};
|
474
405
|
DetailsView.prototype.selectRecords = function (nodes) {
|
406
|
+
// eslint-disable-next-line
|
475
407
|
var gridRecords = this.gridObj.getCurrentViewRecords();
|
476
408
|
var sRecords = [];
|
477
409
|
for (var i = 0, len = gridRecords.length; i < len; i++) {
|
@@ -479,26 +411,24 @@ var DetailsView = /** @class */ (function () {
|
|
479
411
|
if (nodes.indexOf(node) !== -1) {
|
480
412
|
sRecords.push(i);
|
481
413
|
}
|
482
|
-
else if (!this.parent.showFileExtension && !this.parent.hasId && node.includes('.')) {
|
483
|
-
var Str2 = node.split('.').slice(0, -1).join('.');
|
484
|
-
if (nodes.indexOf(Str2) !== -1) {
|
485
|
-
sRecords.push(i);
|
486
|
-
}
|
487
|
-
}
|
488
414
|
}
|
489
415
|
if (sRecords.length !== 0) {
|
490
416
|
this.gridObj.selectRows(sRecords);
|
491
417
|
this.addFocus(this.gridObj.selectedRowIndex);
|
492
418
|
}
|
493
419
|
};
|
420
|
+
// eslint-disable-next-line
|
494
421
|
DetailsView.prototype.addSelection = function (data) {
|
422
|
+
// eslint-disable-next-line
|
495
423
|
var items = this.gridObj.getCurrentViewRecords();
|
424
|
+
// eslint-disable-next-line
|
496
425
|
var rData = [];
|
497
426
|
if (this.parent.hasId) {
|
498
427
|
rData = new DataManager(items).
|
499
428
|
executeLocal(new Query().where('id', 'equal', this.parent.renamedId, false));
|
500
429
|
}
|
501
430
|
else {
|
431
|
+
// eslint-disable-next-line
|
502
432
|
var nData = new DataManager(items).
|
503
433
|
executeLocal(new Query().where('name', 'equal', getValue('name', data), false));
|
504
434
|
if (nData.length > 0) {
|
@@ -516,11 +446,9 @@ var DetailsView = /** @class */ (function () {
|
|
516
446
|
this.gridObj.sortModule.sortColumn(this.parent.sortBy, this.parent.sortOrder);
|
517
447
|
}
|
518
448
|
else {
|
449
|
+
// eslint-disable-next-line
|
519
450
|
this.gridObj.dataSource = getSortedData(this.parent, this.gridObj.dataSource);
|
520
451
|
}
|
521
|
-
if (this.element.querySelector('.e-content').scrollTop !== 0) {
|
522
|
-
this.gridObj.freezeRefresh();
|
523
|
-
}
|
524
452
|
};
|
525
453
|
DetailsView.prototype.onPropertyChanged = function (e) {
|
526
454
|
if (e.module !== this.getModuleName() && e.module !== 'common') {
|
@@ -558,7 +486,6 @@ var DetailsView = /** @class */ (function () {
|
|
558
486
|
}
|
559
487
|
else if (!isNOU(this.gridObj)) {
|
560
488
|
this.gridObj.clearSelection();
|
561
|
-
this.interaction = true;
|
562
489
|
}
|
563
490
|
break;
|
564
491
|
case 'showFileExtension':
|
@@ -585,9 +512,7 @@ var DetailsView = /** @class */ (function () {
|
|
585
512
|
};
|
586
513
|
DetailsView.prototype.onPathChanged = function (args) {
|
587
514
|
this.parent.isCut = false;
|
588
|
-
|
589
|
-
if ((this.parent.breadcrumbbarModule.searchObj.element.value.trim() === '' && this.gridObj) ||
|
590
|
-
(!isNullOrUndefined(pathField) && !isNullOrUndefined(pathField.hideAtMedia) && pathField.hideAtMedia !== '')) {
|
515
|
+
if (this.parent.breadcrumbbarModule.searchObj.element.value.trim() === '' && this.gridObj) {
|
591
516
|
this.parent.searchedItems = [];
|
592
517
|
if (!this.parent.isFiltered) {
|
593
518
|
this.removePathColumn(false);
|
@@ -603,10 +528,6 @@ var DetailsView = /** @class */ (function () {
|
|
603
528
|
showSpinner(this.parent.element);
|
604
529
|
this.parent.setProperties({ selectedItems: [] }, true);
|
605
530
|
this.gridObj.dataSource = getSortedData(this.parent, args.files);
|
606
|
-
this.gridObj.freezeRefresh();
|
607
|
-
if (this.parent.isReact) {
|
608
|
-
this.gridObj.on('reactTemplateRender', this.reactTemplateRender, this);
|
609
|
-
}
|
610
531
|
}
|
611
532
|
this.emptyArgs = args;
|
612
533
|
};
|
@@ -625,6 +546,7 @@ var DetailsView = /** @class */ (function () {
|
|
625
546
|
}
|
626
547
|
};
|
627
548
|
DetailsView.prototype.checkEmptyDiv = function (args) {
|
549
|
+
// eslint-disable-next-line
|
628
550
|
var items = getSortedData(this.parent, args.files);
|
629
551
|
if (items.length === 0 && !isNOU(this.element.querySelector('.' + CLS.GRID_VIEW))) {
|
630
552
|
createEmptyElement(this.parent, this.element, args);
|
@@ -641,18 +563,21 @@ var DetailsView = /** @class */ (function () {
|
|
641
563
|
};
|
642
564
|
DetailsView.prototype.onOpenInit = function () {
|
643
565
|
if (this.parent.activeModule === 'detailsview') {
|
566
|
+
// eslint-disable-next-line
|
644
567
|
var data = this.gridObj.getSelectedRecords()[0];
|
645
568
|
this.openContent(data);
|
646
569
|
}
|
647
570
|
};
|
648
571
|
DetailsView.prototype.DblClickEvents = function (args) {
|
649
572
|
this.gridObj.selectRows([args.rowIndex]);
|
573
|
+
// eslint-disable-next-line
|
650
574
|
var data;
|
651
575
|
if (args.rowData) {
|
652
576
|
data = JSON.parse(JSON.stringify(args.rowData));
|
653
577
|
this.openContent(data);
|
654
578
|
}
|
655
579
|
};
|
580
|
+
// eslint-disable-next-line
|
656
581
|
DetailsView.prototype.openContent = function (data) {
|
657
582
|
var _this = this;
|
658
583
|
if (!hasReadAccess(data)) {
|
@@ -674,7 +599,6 @@ var DetailsView = /** @class */ (function () {
|
|
674
599
|
var val = _this.parent.breadcrumbbarModule.searchObj.element.value;
|
675
600
|
if (val === '' && !_this.parent.isFiltered) {
|
676
601
|
var id = getValue('id', data);
|
677
|
-
_this.parent.oldPath = _this.parent.path;
|
678
602
|
var newPath = _this.parent.path + (isNOU(id) ? name_2 : id) + '/';
|
679
603
|
_this.parent.setProperties({ path: newPath }, true);
|
680
604
|
_this.parent.pathNames.push(name_2);
|
@@ -688,18 +612,12 @@ var DetailsView = /** @class */ (function () {
|
|
688
612
|
_this.parent.isFiltered = false;
|
689
613
|
}
|
690
614
|
_this.element.focus();
|
691
|
-
if (_this.parent.enableVirtualization) {
|
692
|
-
_this.parent.element.querySelector('#' + _this.parent.element.id + CLS.IMG_DIALOG_ID).focus();
|
693
|
-
}
|
694
615
|
}
|
695
616
|
});
|
696
617
|
};
|
697
618
|
/* istanbul ignore next */
|
698
619
|
DetailsView.prototype.onLayoutChange = function (args) {
|
699
620
|
if (this.parent.view === 'Details') {
|
700
|
-
if (this.parent.enableVirtualization) {
|
701
|
-
this.parent.setProperties({ selectedItems: [] }, true);
|
702
|
-
}
|
703
621
|
if (!this.gridObj) {
|
704
622
|
this.render(args);
|
705
623
|
}
|
@@ -744,11 +662,12 @@ var DetailsView = /** @class */ (function () {
|
|
744
662
|
var columnData = JSON.parse(JSON.stringify(this.gridObj.columns));
|
745
663
|
if (columnData[len - 1].field && (columnData[len - 1].field === 'filterPath')) {
|
746
664
|
/* istanbul ignore next */
|
747
|
-
if (
|
665
|
+
if (this.gridObj.sortSettings.columns[0].field === 'filterPath') {
|
748
666
|
if (this.parent.sortOrder !== 'None') {
|
749
667
|
this.gridObj.sortColumn('name', this.parent.sortOrder);
|
750
668
|
}
|
751
669
|
else {
|
670
|
+
// eslint-disable-next-line
|
752
671
|
this.gridObj.dataSource = getSortedData(this.parent, this.gridObj.dataSource);
|
753
672
|
}
|
754
673
|
this.parent.notify(events.sortByChange, {});
|
@@ -937,6 +856,7 @@ var DetailsView = /** @class */ (function () {
|
|
937
856
|
this.parent.off(events.updateSelectionData, this.onUpdateSelectionData);
|
938
857
|
};
|
939
858
|
DetailsView.prototype.onActionFailure = function () { this.interaction = true; };
|
859
|
+
// eslint-disable-next-line
|
940
860
|
DetailsView.prototype.onMenuItemData = function (args) {
|
941
861
|
if (this.parent.activeModule === this.getModuleName()) {
|
942
862
|
this.parent.itemData = [this.gridObj.getRowInfo(args.target).rowData];
|
@@ -964,19 +884,14 @@ var DetailsView = /** @class */ (function () {
|
|
964
884
|
if (!dragLi) {
|
965
885
|
return null;
|
966
886
|
}
|
967
|
-
var name;
|
968
|
-
if (dragLi.getElementsByClassName('e-fe-text')[0]) {
|
969
|
-
name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-fe-text')[0].innerText;
|
970
|
-
}
|
971
|
-
else if (dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling) {
|
972
|
-
name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
|
973
|
-
}
|
887
|
+
var name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
|
974
888
|
if (dragLi && !dragLi.querySelector('.e-active')) {
|
975
889
|
this.selectRecords([name]);
|
976
890
|
}
|
977
891
|
getModule(this.parent, dragLi);
|
978
892
|
this.parent.activeElements = [];
|
979
893
|
this.parent.dragData = [];
|
894
|
+
// eslint-disable-next-line
|
980
895
|
this.parent.dragData = this.gridObj.getSelectedRecords();
|
981
896
|
var dragRow;
|
982
897
|
if (this.parent.dragData.length === 0 && dragLi) {
|
@@ -1037,8 +952,11 @@ var DetailsView = /** @class */ (function () {
|
|
1037
952
|
};
|
1038
953
|
DetailsView.prototype.createDragObj = function () {
|
1039
954
|
var _this = this;
|
1040
|
-
if (this.gridObj) {
|
1041
|
-
if (this.parent.allowDragAndDrop
|
955
|
+
if (!this.parent.isMobile && this.gridObj) {
|
956
|
+
if (this.parent.allowDragAndDrop) {
|
957
|
+
if (this.dragObj) {
|
958
|
+
this.dragObj.destroy();
|
959
|
+
}
|
1042
960
|
this.dragObj = new Draggable(this.gridObj.element, {
|
1043
961
|
cursorAt: this.parent.dragCursorPosition,
|
1044
962
|
distance: 5,
|
@@ -1050,26 +968,28 @@ var DetailsView = /** @class */ (function () {
|
|
1050
968
|
dragStartHandler(_this.parent, args, _this.dragObj);
|
1051
969
|
},
|
1052
970
|
dragStop: dragStopHandler.bind(this, this.parent),
|
1053
|
-
enableAutoScroll:
|
971
|
+
enableAutoScroll: true,
|
1054
972
|
helper: this.dragHelper.bind(this)
|
1055
973
|
});
|
1056
974
|
}
|
1057
975
|
else if (!this.parent.allowDragAndDrop && this.dragObj) {
|
1058
976
|
this.dragObj.destroy();
|
1059
|
-
this.dragObj = null;
|
1060
977
|
}
|
1061
978
|
}
|
1062
979
|
};
|
1063
980
|
DetailsView.prototype.onDropInit = function (args) {
|
1064
981
|
if (this.parent.targetModule === this.getModuleName()) {
|
1065
982
|
/* istanbul ignore next */
|
983
|
+
// eslint-disable-next-line
|
1066
984
|
var cwdData = getValue(this.parent.pathId[this.parent.pathId.length - 1], this.parent.feParent);
|
1067
985
|
if (!args.target.closest('tr')) {
|
1068
986
|
this.parent.dropPath = this.parent.path;
|
1069
987
|
this.parent.dropData = cwdData;
|
1070
988
|
}
|
1071
989
|
else {
|
990
|
+
// eslint-disable-next-line
|
1072
991
|
var info = null;
|
992
|
+
// eslint-disable-next-line
|
1073
993
|
info = this.gridObj.getRowInfo(args.target).rowData;
|
1074
994
|
this.parent.dropPath = info.isFile ? this.parent.path : getFullPath(this.parent, info, this.parent.path);
|
1075
995
|
this.parent.dropData = info.isFile ? cwdData : info;
|
@@ -1085,8 +1005,7 @@ var DetailsView = /** @class */ (function () {
|
|
1085
1005
|
DetailsView.prototype.onpasteEnd = function (args) {
|
1086
1006
|
if (this.parent.view === 'Details') {
|
1087
1007
|
this.isPasteOperation = true;
|
1088
|
-
if (this.parent.path === this.parent.destinationPath ||
|
1089
|
-
this.parent.path === getDirectoryPath(this.parent, args) || this.parent.hasId) {
|
1008
|
+
if (this.parent.path === this.parent.destinationPath || this.parent.path === getDirectoryPath(this.parent, args)) {
|
1090
1009
|
this.onPathChanged(args);
|
1091
1010
|
}
|
1092
1011
|
}
|
@@ -1112,9 +1031,6 @@ var DetailsView = /** @class */ (function () {
|
|
1112
1031
|
}
|
1113
1032
|
this.removeEventListener();
|
1114
1033
|
if (this.gridObj) {
|
1115
|
-
if (this.parent.isReact) {
|
1116
|
-
this.gridObj.off('reactTemplateRender', this.reactTemplateRender);
|
1117
|
-
}
|
1118
1034
|
this.unWireEvents();
|
1119
1035
|
this.gridObj.destroy();
|
1120
1036
|
}
|
@@ -1168,10 +1084,8 @@ var DetailsView = /** @class */ (function () {
|
|
1168
1084
|
}
|
1169
1085
|
}
|
1170
1086
|
var len = rows.length;
|
1171
|
-
if (
|
1172
|
-
|
1173
|
-
}
|
1174
|
-
else if (len > 0) {
|
1087
|
+
if (len > 0) {
|
1088
|
+
// eslint-disable-next-line
|
1175
1089
|
var data = this.gridObj.getRowsObject()[rows[len - 1]].data;
|
1176
1090
|
this.parent.currentItemText = getValue('name', data);
|
1177
1091
|
}
|
@@ -1184,9 +1098,11 @@ var DetailsView = /** @class */ (function () {
|
|
1184
1098
|
}
|
1185
1099
|
}
|
1186
1100
|
this.parent.visitedItem = args.row;
|
1187
|
-
if (
|
1188
|
-
|
1101
|
+
if (this.parent.allowMultiSelection && !isNOU(item) && !isNOU(item.querySelector('.e-checkselect'))) {
|
1102
|
+
var checkItem = item.querySelector('.e-checkselect');
|
1103
|
+
checkItem.focus();
|
1189
1104
|
}
|
1105
|
+
this.addFocus(this.gridObj.selectedRowIndex);
|
1190
1106
|
if (!this.parent.isLayoutChange) {
|
1191
1107
|
this.isInteracted = true;
|
1192
1108
|
}
|
@@ -1201,6 +1117,7 @@ var DetailsView = /** @class */ (function () {
|
|
1201
1117
|
};
|
1202
1118
|
DetailsView.prototype.selectedRecords = function () {
|
1203
1119
|
this.parent.setProperties({ selectedItems: [] }, true);
|
1120
|
+
// eslint-disable-next-line
|
1204
1121
|
var selectedRecords = this.gridSelectNodes();
|
1205
1122
|
var selectSize = 0;
|
1206
1123
|
while (selectSize < selectedRecords.length) {
|
@@ -1254,37 +1171,36 @@ var DetailsView = /** @class */ (function () {
|
|
1254
1171
|
eventName: 'keydown'
|
1255
1172
|
});
|
1256
1173
|
EventHandler.add(this.gridObj.element, 'blur', this.removeFocus, this);
|
1257
|
-
EventHandler.add(this.parent.element, 'focusout', this.onBlur, this);
|
1258
1174
|
};
|
1259
1175
|
DetailsView.prototype.unWireEvents = function () {
|
1260
1176
|
this.wireClickEvent(false);
|
1261
1177
|
this.keyboardModule.destroy();
|
1262
1178
|
this.keyboardDownModule.destroy();
|
1263
1179
|
EventHandler.remove(this.gridObj.element, 'blur', this.removeFocus);
|
1264
|
-
EventHandler.remove(this.parent.element, 'focusout', this.onBlur);
|
1265
1180
|
};
|
1266
1181
|
DetailsView.prototype.wireClickEvent = function (toBind) {
|
1267
|
-
var _this = this;
|
1268
1182
|
if (toBind) {
|
1183
|
+
// eslint-disable-next-line
|
1184
|
+
var proxy_1 = this;
|
1269
1185
|
var ele = this.gridObj.getContent();
|
1270
1186
|
this.clickObj = new Touch(ele, {
|
1271
1187
|
tap: function (eve) {
|
1272
1188
|
if (eve.tapCount === 1 && eve.originalEvent.target.classList.contains('e-content')) {
|
1273
|
-
|
1189
|
+
proxy_1.onClearAllInit();
|
1274
1190
|
}
|
1275
1191
|
},
|
1276
1192
|
tapHold: function (e) {
|
1277
|
-
if (
|
1193
|
+
if (proxy_1.parent.isDevice) {
|
1278
1194
|
e.originalEvent.preventDefault();
|
1279
|
-
if (
|
1280
|
-
setValue('enableSelectMultiTouch',
|
1281
|
-
addClass([
|
1195
|
+
if (proxy_1.parent.allowMultiSelection) {
|
1196
|
+
setValue('enableSelectMultiTouch', proxy_1.parent.allowMultiSelection, proxy_1.gridObj.selectionModule);
|
1197
|
+
addClass([proxy_1.parent.element], CLS.MULTI_SELECT);
|
1282
1198
|
}
|
1283
1199
|
var target = e.originalEvent.target;
|
1284
1200
|
if (target) {
|
1285
1201
|
var row = closest(target, '.' + CLS.ROW);
|
1286
|
-
var index =
|
1287
|
-
|
1202
|
+
var index = proxy_1.gridObj.getRows().indexOf(row);
|
1203
|
+
proxy_1.gridObj.selectRow(index);
|
1288
1204
|
}
|
1289
1205
|
}
|
1290
1206
|
}
|
@@ -1310,24 +1226,12 @@ var DetailsView = /** @class */ (function () {
|
|
1310
1226
|
DetailsView.prototype.removeFocus = function () {
|
1311
1227
|
this.addFocus(null);
|
1312
1228
|
};
|
1313
|
-
DetailsView.prototype.onBlur = function (e) {
|
1314
|
-
if ((e.relatedTarget !== null && closest(e.relatedTarget, '.e-grid') !== e.relatedTarget)) {
|
1315
|
-
return;
|
1316
|
-
}
|
1317
|
-
if (!isNOU(this.gridObj.element)) {
|
1318
|
-
var thElements = this.gridObj.element.querySelectorAll('th');
|
1319
|
-
for (var i = 0; i < thElements.length; i++) {
|
1320
|
-
if (thElements[i].classList.contains('e-focus')) {
|
1321
|
-
this.addFocus(null);
|
1322
|
-
}
|
1323
|
-
}
|
1324
|
-
}
|
1325
|
-
};
|
1326
1229
|
DetailsView.prototype.getFocusedItemIndex = function () {
|
1327
1230
|
return (!isNOU(this.getFocusedItem())) ?
|
1328
|
-
parseInt(this.getFocusedItem().getAttribute('
|
1231
|
+
parseInt(this.getFocusedItem().getAttribute('aria-rowindex'), 10) : null;
|
1329
1232
|
};
|
1330
1233
|
/* istanbul ignore next */
|
1234
|
+
// eslint:disable-next-line
|
1331
1235
|
DetailsView.prototype.keydownHandler = function (e) {
|
1332
1236
|
if (!this.isRendered) {
|
1333
1237
|
return;
|
@@ -1371,23 +1275,26 @@ var DetailsView = /** @class */ (function () {
|
|
1371
1275
|
}
|
1372
1276
|
};
|
1373
1277
|
/* istanbul ignore next */
|
1278
|
+
// eslint:disable-next-line
|
1374
1279
|
DetailsView.prototype.keyupHandler = function (e) {
|
1375
1280
|
if (!this.isRendered) {
|
1376
1281
|
return;
|
1377
1282
|
}
|
1378
1283
|
e.preventDefault();
|
1379
1284
|
var action = e.action;
|
1285
|
+
// eslint-disable-next-line
|
1380
1286
|
var gridItems = getSortedData(this.parent, this.gridObj.dataSource);
|
1381
1287
|
var gridLength = gridItems.length;
|
1288
|
+
var focItem = this.getFocusedItem();
|
1382
1289
|
var focIndex = this.getFocusedItemIndex();
|
1383
1290
|
var selIndex = this.gridObj.selectedRowIndex;
|
1384
1291
|
var selRowIndeces = this.gridObj.getSelectedRowIndexes();
|
1292
|
+
// eslint-disable-next-line
|
1385
1293
|
var rowData;
|
1386
1294
|
var firstItem;
|
1387
1295
|
var lastItem;
|
1388
1296
|
switch (action) {
|
1389
1297
|
case 'altEnter':
|
1390
|
-
this.parent.notify(events.detailsInit, {});
|
1391
1298
|
GetDetails(this.parent, this.parent.selectedItems, this.parent.path, 'details');
|
1392
1299
|
break;
|
1393
1300
|
case 'esc':
|
@@ -1398,19 +1305,12 @@ var DetailsView = /** @class */ (function () {
|
|
1398
1305
|
this.performDelete();
|
1399
1306
|
break;
|
1400
1307
|
case 'enter':
|
1401
|
-
if (this.gridObj.selectedRowIndex === -1
|
1402
|
-
if (!e.target.classList.contains('e-fe-grid-icon')) {
|
1403
|
-
var direction = !e.target.getElementsByClassName('e-ascending').length ? 'Ascending' : 'Descending';
|
1404
|
-
var currentField = this.gridObj.getColumnByUid(e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid')).field;
|
1405
|
-
this.gridObj.sortColumn(currentField, direction);
|
1406
|
-
if (!isNOU(this.getFocusedItem().nextSibling)) {
|
1407
|
-
this.getFocusedItem().nextSibling.setAttribute('tabindex', '0');
|
1408
|
-
}
|
1409
|
-
}
|
1308
|
+
if (this.gridObj.selectedRowIndex === -1) {
|
1410
1309
|
break;
|
1411
1310
|
}
|
1412
1311
|
rowData = this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data;
|
1413
1312
|
if (rowData) {
|
1313
|
+
// eslint-disable-next-line
|
1414
1314
|
var data = JSON.parse(JSON.stringify(rowData));
|
1415
1315
|
this.openContent(data);
|
1416
1316
|
}
|
@@ -1453,7 +1353,7 @@ var DetailsView = /** @class */ (function () {
|
|
1453
1353
|
return;
|
1454
1354
|
}
|
1455
1355
|
else {
|
1456
|
-
this.
|
1356
|
+
this.addFocus(0);
|
1457
1357
|
}
|
1458
1358
|
}
|
1459
1359
|
break;
|
@@ -1525,17 +1425,16 @@ var DetailsView = /** @class */ (function () {
|
|
1525
1425
|
this.parent.setProperties({ selectedItems: lastItem }, true);
|
1526
1426
|
this.selectRecords(lastItem);
|
1527
1427
|
break;
|
1528
|
-
case 'back':
|
1529
|
-
this.parent.traverseBackward();
|
1530
|
-
break;
|
1531
1428
|
}
|
1532
1429
|
};
|
1430
|
+
// eslint-disable-next-line
|
1533
1431
|
DetailsView.prototype.gridSelectNodes = function () {
|
1534
1432
|
return this.gridObj.getSelectedRecords();
|
1535
1433
|
};
|
1536
1434
|
DetailsView.prototype.doDownload = function () {
|
1537
1435
|
if (this.parent.selectedItems.length !== 0) {
|
1538
1436
|
this.parent.itemData = this.gridObj.getSelectedRecords();
|
1437
|
+
// eslint-disable-next-line
|
1539
1438
|
var items = this.parent.itemData;
|
1540
1439
|
for (var i = 0; i < items.length; i++) {
|
1541
1440
|
if (!hasDownloadAccess(items[i])) {
|
@@ -1549,6 +1448,7 @@ var DetailsView = /** @class */ (function () {
|
|
1549
1448
|
DetailsView.prototype.performDelete = function () {
|
1550
1449
|
if (this.parent.selectedItems && this.parent.selectedItems.length > 0) {
|
1551
1450
|
this.parent.itemData = this.gridObj.getSelectedRecords();
|
1451
|
+
// eslint-disable-next-line
|
1552
1452
|
var items = this.parent.itemData;
|
1553
1453
|
for (var i = 0; i < items.length; i++) {
|
1554
1454
|
if (!hasEditAccess(items[i])) {
|
@@ -1566,9 +1466,11 @@ var DetailsView = /** @class */ (function () {
|
|
1566
1466
|
}
|
1567
1467
|
};
|
1568
1468
|
DetailsView.prototype.updateRenameData = function () {
|
1469
|
+
// eslint-disable-next-line
|
1569
1470
|
var data = this.gridSelectNodes()[0];
|
1570
1471
|
updateRenamingData(this.parent, data);
|
1571
1472
|
};
|
1473
|
+
// eslint-disable-next-line
|
1572
1474
|
DetailsView.prototype.shiftMoveMethod = function (gridItems, selIndex, focIndex, selRowIndeces, e) {
|
1573
1475
|
if (!this.parent.allowMultiSelection) {
|
1574
1476
|
this.moveFunction(gridItems, e, selIndex);
|
@@ -1586,6 +1488,7 @@ var DetailsView = /** @class */ (function () {
|
|
1586
1488
|
}
|
1587
1489
|
}
|
1588
1490
|
};
|
1491
|
+
// eslint-disable-next-line
|
1589
1492
|
DetailsView.prototype.moveFunction = function (selectedItems, e, rowIndex) {
|
1590
1493
|
if (!isNOU(this.getFocusedItem()) && this.parent.allowMultiSelection) {
|
1591
1494
|
if (e.action === 'moveDown') {
|
@@ -1632,6 +1535,7 @@ var DetailsView = /** @class */ (function () {
|
|
1632
1535
|
this.gridObj.selectRow(selIndex);
|
1633
1536
|
}
|
1634
1537
|
};
|
1538
|
+
// eslint-disable-next-line
|
1635
1539
|
DetailsView.prototype.ctrlMoveFunction = function (items, e, rowIndex) {
|
1636
1540
|
var nextItem;
|
1637
1541
|
if (!isNOU(this.getFocusedItem())) {
|
@@ -1650,6 +1554,7 @@ var DetailsView = /** @class */ (function () {
|
|
1650
1554
|
}
|
1651
1555
|
this.addFocus(nextItem);
|
1652
1556
|
};
|
1557
|
+
// eslint-disable-next-line
|
1653
1558
|
DetailsView.prototype.checkRowsKey = function (items, indexValue, focIndex, e) {
|
1654
1559
|
if (this.gridObj.checkAllRows === 'Uncheck' || this.gridObj.checkAllRows === 'Intermediate') {
|
1655
1560
|
if (e.action !== 'csHome' && e.action !== 'csEnd') {
|
@@ -1735,31 +1640,6 @@ var DetailsView = /** @class */ (function () {
|
|
1735
1640
|
addClass([itemElement], [CLS.FOCUS, CLS.FOCUSED]);
|
1736
1641
|
}
|
1737
1642
|
};
|
1738
|
-
DetailsView.prototype.addHeaderFocus = function (e) {
|
1739
|
-
var treeFocus = select('.e-row', this.element);
|
1740
|
-
this.gridObj.element.setAttribute('tabindex', '-1');
|
1741
|
-
var nameFocus;
|
1742
|
-
if (!isNOU(e.target) && e.target.classList.contains('e-defaultcursor')) {
|
1743
|
-
this.addFocus(0);
|
1744
|
-
nameFocus = e.target.nextElementSibling;
|
1745
|
-
}
|
1746
|
-
else if (!isNOU(this.gridObj.element.querySelector('.e-focus')) && (this.gridObj.element.querySelector('.e-focus').tagName === 'TH')) {
|
1747
|
-
nameFocus = this.gridObj.element.querySelector('.e-focus').nextElementSibling;
|
1748
|
-
this.addFocus(0);
|
1749
|
-
}
|
1750
|
-
else {
|
1751
|
-
nameFocus = select('th.e-fe-grid-icon', this.element);
|
1752
|
-
}
|
1753
|
-
if (!isNOU(nameFocus)) {
|
1754
|
-
nameFocus.setAttribute('tabindex', '0');
|
1755
|
-
nameFocus.focus();
|
1756
|
-
addClass([nameFocus], [CLS.FOCUS, CLS.FOCUSED]);
|
1757
|
-
treeFocus.setAttribute('tabindex', '0');
|
1758
|
-
if (treeFocus.tabIndex === 0 && nameFocus.tabIndex === 0) {
|
1759
|
-
removeClass([treeFocus], [CLS.FOCUS, CLS.FOCUSED]);
|
1760
|
-
}
|
1761
|
-
}
|
1762
|
-
};
|
1763
1643
|
DetailsView.prototype.getFocusedItem = function () {
|
1764
1644
|
return select('.' + CLS.FOCUSED, this.element);
|
1765
1645
|
};
|
@@ -1773,6 +1653,7 @@ var DetailsView = /** @class */ (function () {
|
|
1773
1653
|
}
|
1774
1654
|
return check;
|
1775
1655
|
};
|
1656
|
+
// eslint-disable-next-line
|
1776
1657
|
DetailsView.prototype.shiftSelectedItem = function (selIndex, selRowIndexes, gridItems, e) {
|
1777
1658
|
if (selIndex === -1) {
|
1778
1659
|
this.gridObj.selectRow(0);
|
@@ -1821,6 +1702,7 @@ var DetailsView = /** @class */ (function () {
|
|
1821
1702
|
}
|
1822
1703
|
}
|
1823
1704
|
};
|
1705
|
+
// eslint-disable-next-line
|
1824
1706
|
DetailsView.prototype.onMethodCall = function (e) {
|
1825
1707
|
if (this.parent.view !== 'Details') {
|
1826
1708
|
return;
|
@@ -1853,8 +1735,11 @@ var DetailsView = /** @class */ (function () {
|
|
1853
1735
|
break;
|
1854
1736
|
}
|
1855
1737
|
};
|
1738
|
+
// eslint-disable-next-line
|
1856
1739
|
DetailsView.prototype.getRecords = function (nodes) {
|
1740
|
+
// eslint-disable-next-line
|
1857
1741
|
var gridRecords = this.gridObj.getCurrentViewRecords();
|
1742
|
+
// eslint-disable-next-line
|
1858
1743
|
var records = [];
|
1859
1744
|
var hasFilter = (this.parent.breadcrumbbarModule.searchObj.element.value !== '' || this.parent.isFiltered) ? true : false;
|
1860
1745
|
var filter = this.parent.hasId ? 'id' : 'name';
|
@@ -1881,10 +1766,12 @@ var DetailsView = /** @class */ (function () {
|
|
1881
1766
|
this.performDelete();
|
1882
1767
|
return;
|
1883
1768
|
}
|
1769
|
+
// eslint-disable-next-line
|
1884
1770
|
var records = this.getRecords(ids);
|
1885
1771
|
if (records.length === 0) {
|
1886
1772
|
return;
|
1887
1773
|
}
|
1774
|
+
// eslint-disable-next-line
|
1888
1775
|
var data = [];
|
1889
1776
|
var newIds = [];
|
1890
1777
|
for (var i = 0; i < records.length; i++) {
|
@@ -1898,10 +1785,12 @@ var DetailsView = /** @class */ (function () {
|
|
1898
1785
|
this.doDownload();
|
1899
1786
|
return;
|
1900
1787
|
}
|
1788
|
+
// eslint-disable-next-line
|
1901
1789
|
var dRecords = this.getRecords(ids);
|
1902
1790
|
if (dRecords.length === 0) {
|
1903
1791
|
return;
|
1904
1792
|
}
|
1793
|
+
// eslint-disable-next-line
|
1905
1794
|
var data = [];
|
1906
1795
|
var newIds = [];
|
1907
1796
|
for (var i = 0; i < dRecords.length; i++) {
|
@@ -1914,6 +1803,7 @@ var DetailsView = /** @class */ (function () {
|
|
1914
1803
|
if (isNOU(id)) {
|
1915
1804
|
return;
|
1916
1805
|
}
|
1806
|
+
// eslint-disable-next-line
|
1917
1807
|
var records = this.getRecords([id]);
|
1918
1808
|
if (records.length > 0) {
|
1919
1809
|
this.openContent(records[0]);
|
@@ -1925,6 +1815,7 @@ var DetailsView = /** @class */ (function () {
|
|
1925
1815
|
this.performRename();
|
1926
1816
|
return;
|
1927
1817
|
}
|
1818
|
+
// eslint-disable-next-line
|
1928
1819
|
var records = this.getRecords([id]);
|
1929
1820
|
if (records.length > 0) {
|
1930
1821
|
updateRenamingData(this.parent, records[0]);
|