@syncfusion/ej2-filemanager 21.1.39 → 21.1.41

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.
@@ -3781,6 +3781,7 @@ class LargeIconsView {
3781
3781
  this.count = 0;
3782
3782
  this.isRendered = true;
3783
3783
  this.tapCount = 0;
3784
+ this.isSelectAllCalled = false;
3784
3785
  this.isPasteOperation = false;
3785
3786
  this.isInteracted = true;
3786
3787
  this.parent = parent;
@@ -4527,6 +4528,9 @@ class LargeIconsView {
4527
4528
  && (e.ctrlKey || target.classList.contains(CHECK))) {
4528
4529
  action = 'unselect';
4529
4530
  }
4531
+ if (e.ctrlKey && e.shiftKey) {
4532
+ this.isSelectAllCalled = true;
4533
+ }
4530
4534
  const fileSelectionArgs = this.triggerSelection(action, item);
4531
4535
  if (fileSelectionArgs.cancel !== true) {
4532
4536
  if ((!this.parent.allowMultiSelection || (!this.multiSelect && (e && !e.ctrlKey)))
@@ -4573,9 +4577,13 @@ class LargeIconsView {
4573
4577
  }
4574
4578
  }
4575
4579
  else {
4580
+ if (this.parent.selectedItems.length === this.itemList.length) {
4581
+ this.isSelectAllCalled = true;
4582
+ }
4576
4583
  this.clearSelection();
4577
4584
  }
4578
4585
  if (!isNullOrUndefined(item)) {
4586
+ this.isSelectAllCalled = false;
4579
4587
  this.updateType(item);
4580
4588
  }
4581
4589
  }
@@ -5138,9 +5146,17 @@ class LargeIconsView {
5138
5146
  }
5139
5147
  triggerSelection(action, item) {
5140
5148
  // eslint-disable-next-line
5141
- const data = this.getItemObject(item);
5149
+ const data = [];
5150
+ if (this.isSelectAllCalled) {
5151
+ for (let i = 0, len = this.itemList.length; i < len; i++) {
5152
+ data[i] = this.getItemObject(this.itemList[i]);
5153
+ }
5154
+ }
5155
+ else {
5156
+ data[0] = this.getItemObject(item);
5157
+ }
5142
5158
  const eventArgs = {
5143
- action: action, fileDetails: data, isInteracted: this.isInteraction, cancel: false, target: item
5159
+ action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteraction, cancel: false, target: this.isSelectAllCalled ? null : item
5144
5160
  };
5145
5161
  this.parent.trigger('fileSelection', eventArgs);
5146
5162
  this.isInteraction = true;
@@ -5148,9 +5164,18 @@ class LargeIconsView {
5148
5164
  }
5149
5165
  triggerSelect(action, item) {
5150
5166
  // eslint-disable-next-line
5151
- const data = this.getItemObject(item);
5152
- this.parent.visitedData = data;
5153
- const eventArgs = { action: action, fileDetails: data, isInteracted: this.isInteracted };
5167
+ const data = [];
5168
+ if (this.isSelectAllCalled) {
5169
+ for (let i = 0, len = this.itemList.length; i < len; i++) {
5170
+ data[i] = this.getItemObject(this.itemList[i]);
5171
+ }
5172
+ this.isSelectAllCalled = false;
5173
+ }
5174
+ else {
5175
+ data[0] = this.getItemObject(item);
5176
+ }
5177
+ this.parent.visitedData = data.length > 1 ? data[data.length - 1] : data[0];
5178
+ const eventArgs = { action: action, fileDetails: data.length > 1 ? data : data[0], isInteracted: this.isInteracted };
5154
5179
  this.parent.trigger('fileSelect', eventArgs);
5155
5180
  this.isInteracted = true;
5156
5181
  }