@syncfusion/ej2-filemanager 28.1.39 → 28.2.4

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.
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty, initializeCSPTemplate, getValue, isNullOrUndefined, matches, select, closest, createElement, setValue, detach, extend, Ajax, Internationalization, Fetch, remove, selectAll, Draggable, KeyboardEvents, EventHandler, Touch, addClass, removeClass, isVisible, getUniqueID, setStyleAttribute, formatUnit, Browser, L10n, Complex, Collection, Event, NotifyPropertyChanges, Component, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
1
+ import { Property, ChildProperty, initializeCSPTemplate, getValue, isNullOrUndefined, matches, select, closest, createElement, setValue, detach, extend, Ajax, Fetch, remove, Internationalization, selectAll, Draggable, KeyboardEvents, EventHandler, Touch, addClass, removeClass, isVisible, getUniqueID, setStyleAttribute, formatUnit, Browser, L10n, Complex, Collection, Event, NotifyPropertyChanges, Component, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
2
2
  import { Splitter } from '@syncfusion/ej2-layouts';
3
3
  import { Dialog, showSpinner, hideSpinner, createSpinner } from '@syncfusion/ej2-popups';
4
4
  import { DataManager, Query, DataUtil } from '@syncfusion/ej2-data';
@@ -1137,7 +1137,7 @@ function searchWordHandler(parent, value, isLayoutChange) {
1137
1137
  if (isFileSystemData(parent)) {
1138
1138
  if (value === '') {
1139
1139
  parent.itemData = parent.fileSystemData;
1140
- read(parent, layoutChange, parent.path);
1140
+ read(parent, isLayoutChange ? layoutChange : search, parent.path);
1141
1141
  }
1142
1142
  else {
1143
1143
  parent.searchSettings.filterType = isNullOrUndefined(parent.searchSettings.filterType) ? 'contains' : parent.searchSettings.filterType;
@@ -1539,20 +1539,15 @@ function setNodeId(result, rootId) {
1539
1539
  * set the date object
1540
1540
  *
1541
1541
  * @param {Object[]} args - specifies the file object.
1542
- * @param {Internationalization} localeString - The internationalization object for formatting dates.
1543
- * @param {string} dateFormat - The date format string.
1544
1542
  * @returns {void}
1545
1543
  * @private
1546
1544
  */
1547
- function setDateObject(args, localeString, dateFormat) {
1545
+ function setDateObject(args) {
1548
1546
  for (var i = 0; i < args.length; i++) {
1549
1547
  var createdDate = new Date(getValue('dateCreated', args[i]));
1550
1548
  var modifiedDate = new Date(getValue('dateModified', args[i]));
1551
- if (isNullOrUndefined(dateFormat)) {
1552
- dateFormat = 'MM/dd/yyyy';
1553
- }
1554
- setValue('_fm_created', localeString.formatDate(createdDate, { format: dateFormat }), args[i]);
1555
- setValue('_fm_modified', localeString.formatDate(modifiedDate, { format: dateFormat }), args[i]);
1549
+ setValue('_fm_created', createdDate, args[i]);
1550
+ setValue('_fm_modified', modifiedDate, args[i]);
1556
1551
  }
1557
1552
  }
1558
1553
  /**
@@ -2670,29 +2665,6 @@ function GetDetails(parent, names, path, operation) {
2670
2665
  var data = { action: operation, path: path, names: names, data: parent.itemData };
2671
2666
  createAjax(parent, data, detailsSuccess, path, operation);
2672
2667
  }
2673
- /**
2674
- * Function for getDateFormat in File Manager.
2675
- *
2676
- * @param {IFileManager} parent - specifies the parent element.
2677
- * @returns {void}
2678
- * @private
2679
- */
2680
- function getDateFormat(parent) {
2681
- var columns = parent.detailsViewSettings.columns;
2682
- var dateFormat;
2683
- if (!columns) {
2684
- return null;
2685
- }
2686
- for (var i = 0; i < columns.length; i++) {
2687
- if (columns[i].field === '_fm_modified') {
2688
- if (!isNullOrUndefined(columns[i].format)) {
2689
- dateFormat = columns[i].format.toString();
2690
- }
2691
- break;
2692
- }
2693
- }
2694
- return dateFormat;
2695
- }
2696
2668
  /**
2697
2669
  * Checks whether fileSystemData is enabled.
2698
2670
  *
@@ -3288,9 +3260,8 @@ function performReadOperation(parent, result, fn, data, event, operation, target
3288
3260
  }
3289
3261
  }
3290
3262
  }
3291
- var intl = new Internationalization(parent.locale);
3292
3263
  if (!isNullOrUndefined(result.files)) {
3293
- setDateObject(result.files, intl, getDateFormat(parent));
3264
+ setDateObject(result.files);
3294
3265
  for (var i = 0, len = result.files.length; i < len; i++) {
3295
3266
  var item = result.files[i];
3296
3267
  setValue('_fm_iconClass', fileType(item), item);