@syncfusion/ej2-inputs 19.2.59 → 19.3.47

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.
Files changed (150) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/ej2-inputs.umd.min.js +2 -2
  3. package/dist/ej2-inputs.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-inputs.es2015.js +346 -606
  5. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  6. package/dist/es6/ej2-inputs.es5.js +358 -623
  7. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  8. package/dist/global/ej2-inputs.min.js +2 -2
  9. package/dist/global/ej2-inputs.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/helpers/e2e/colorpickerHelper.d.ts +23 -0
  12. package/helpers/e2e/colorpickerHelper.js +53 -0
  13. package/package.json +9 -9
  14. package/src/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +1 -4
  15. package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +0 -3
  16. package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +2 -11
  17. package/src/numerictextbox/numerictextbox-model.d.ts +1 -10
  18. package/src/numerictextbox/numerictextbox.d.ts +0 -9
  19. package/src/numerictextbox/numerictextbox.js +51 -95
  20. package/src/slider/slider.d.ts +1 -0
  21. package/src/slider/slider.js +10 -1
  22. package/src/textbox/textbox-model.d.ts +1 -4
  23. package/src/textbox/textbox.d.ts +0 -3
  24. package/src/textbox/textbox.js +90 -112
  25. package/src/uploader/uploader-model.d.ts +1 -26
  26. package/src/uploader/uploader.d.ts +0 -40
  27. package/src/uploader/uploader.js +210 -407
  28. package/styles/bootstrap-dark.css +14 -6
  29. package/styles/bootstrap.css +14 -6
  30. package/styles/bootstrap4.css +22 -12
  31. package/styles/bootstrap5-dark.css +7548 -0
  32. package/styles/bootstrap5-dark.scss +7 -0
  33. package/styles/bootstrap5.css +7548 -0
  34. package/styles/bootstrap5.scss +7 -0
  35. package/styles/color-picker/_bootstrap5-dark-definition.scss +1 -0
  36. package/styles/color-picker/_bootstrap5-definition.scss +134 -0
  37. package/styles/color-picker/_layout.scss +26 -3
  38. package/styles/color-picker/_tailwind-dark-definition.scss +1 -132
  39. package/styles/color-picker/_tailwind-definition.scss +25 -24
  40. package/styles/color-picker/_theme.scss +33 -0
  41. package/styles/color-picker/bootstrap5-dark.css +964 -0
  42. package/styles/color-picker/bootstrap5-dark.scss +11 -0
  43. package/styles/color-picker/bootstrap5.css +964 -0
  44. package/styles/color-picker/bootstrap5.scss +11 -0
  45. package/styles/color-picker/icons/_bootstrap5-dark.scss +1 -0
  46. package/styles/color-picker/icons/_bootstrap5.scss +10 -0
  47. package/styles/fabric-dark.css +15 -7
  48. package/styles/fabric.css +15 -7
  49. package/styles/highcontrast-light.css +15 -7
  50. package/styles/highcontrast.css +16 -8
  51. package/styles/input/_bootstrap5-dark-definition.scss +1 -0
  52. package/styles/input/_bootstrap5-definition.scss +320 -0
  53. package/styles/input/_definition.scss +217 -0
  54. package/styles/input/_fabric-definition.scss +1 -1
  55. package/styles/input/_highcontrast-definition.scss +1 -1
  56. package/styles/input/_layout.scss +196 -157
  57. package/styles/input/_material-dark-definition.scss +133 -120
  58. package/styles/input/_material-definition.scss +1 -0
  59. package/styles/input/_tailwind-dark-definition.scss +1 -315
  60. package/styles/input/_tailwind-definition.scss +50 -47
  61. package/styles/input/_theme.scss +92 -59
  62. package/styles/input/bootstrap-dark.css +12 -3
  63. package/styles/input/bootstrap.css +12 -3
  64. package/styles/input/bootstrap4.css +15 -3
  65. package/styles/input/bootstrap5-dark.css +4670 -0
  66. package/styles/input/bootstrap5-dark.scss +4 -0
  67. package/styles/input/bootstrap5.css +4670 -0
  68. package/styles/input/bootstrap5.scss +4 -0
  69. package/styles/input/fabric-dark.css +12 -3
  70. package/styles/input/fabric.css +13 -4
  71. package/styles/input/highcontrast-light.css +12 -3
  72. package/styles/input/highcontrast.css +13 -4
  73. package/styles/input/icons/_bootstrap5-dark.scss +1 -0
  74. package/styles/input/icons/_bootstrap5.scss +17 -0
  75. package/styles/input/icons/_material-dark.scss +32 -0
  76. package/styles/input/icons/_tailwind-dark.scss +1 -17
  77. package/styles/input/material-dark.css +2320 -201
  78. package/styles/input/material.css +12 -3
  79. package/styles/input/tailwind-dark.css +14 -5
  80. package/styles/input/tailwind.css +14 -5
  81. package/styles/maskedtextbox/_bootstrap5-dark-definition.scss +1 -0
  82. package/styles/maskedtextbox/_bootstrap5-definition.scss +7 -0
  83. package/styles/maskedtextbox/_tailwind-dark-definition.scss +1 -6
  84. package/styles/maskedtextbox/_tailwind-definition.scss +4 -1
  85. package/styles/maskedtextbox/bootstrap5-dark.css +33 -0
  86. package/styles/maskedtextbox/bootstrap5-dark.scss +4 -0
  87. package/styles/maskedtextbox/bootstrap5.css +33 -0
  88. package/styles/maskedtextbox/bootstrap5.scss +4 -0
  89. package/styles/material-dark.css +2337 -218
  90. package/styles/material.css +14 -5
  91. package/styles/numerictextbox/_bootstrap5-dark-definition.scss +1 -0
  92. package/styles/numerictextbox/_bootstrap5-definition.scss +3 -0
  93. package/styles/numerictextbox/_tailwind-dark-definition.scss +1 -5
  94. package/styles/numerictextbox/_tailwind-definition.scss +1 -1
  95. package/styles/numerictextbox/bootstrap5-dark.css +48 -0
  96. package/styles/numerictextbox/bootstrap5-dark.scss +5 -0
  97. package/styles/numerictextbox/bootstrap5.css +48 -0
  98. package/styles/numerictextbox/bootstrap5.scss +5 -0
  99. package/styles/numerictextbox/icons/_bootstrap5-dark.scss +1 -0
  100. package/styles/numerictextbox/icons/_bootstrap5.scss +12 -0
  101. package/styles/numerictextbox/icons/_tailwind-dark.scss +1 -12
  102. package/styles/slider/_bootstrap5-dark-definition.scss +1 -0
  103. package/styles/slider/_bootstrap5-definition.scss +90 -0
  104. package/styles/slider/_fabric-dark-definition.scss +2 -2
  105. package/styles/slider/_layout.scss +294 -69
  106. package/styles/slider/_material-dark-definition.scss +1 -1
  107. package/styles/slider/_tailwind-dark-definition.scss +1 -80
  108. package/styles/slider/_tailwind-definition.scss +32 -27
  109. package/styles/slider/_theme.scss +14 -6
  110. package/styles/slider/bootstrap-dark.css +2 -3
  111. package/styles/slider/bootstrap.css +2 -3
  112. package/styles/slider/bootstrap4.css +7 -9
  113. package/styles/slider/bootstrap5-dark.css +749 -0
  114. package/styles/slider/bootstrap5-dark.scss +5 -0
  115. package/styles/slider/bootstrap5.css +749 -0
  116. package/styles/slider/bootstrap5.scss +5 -0
  117. package/styles/slider/fabric-dark.css +3 -4
  118. package/styles/slider/fabric.css +2 -3
  119. package/styles/slider/highcontrast-light.css +3 -4
  120. package/styles/slider/highcontrast.css +3 -4
  121. package/styles/slider/material-dark.css +16 -16
  122. package/styles/slider/material.css +2 -2
  123. package/styles/slider/tailwind-dark.css +9 -8
  124. package/styles/slider/tailwind.css +7 -3
  125. package/styles/tailwind-dark.css +23 -13
  126. package/styles/tailwind.css +21 -8
  127. package/styles/textbox/_bootstrap5-dark-definition.scss +1 -0
  128. package/styles/textbox/_bootstrap5-definition.scss +0 -0
  129. package/styles/textbox/_tailwind-dark-definition.scss +1 -0
  130. package/styles/textbox/bootstrap5-dark.css +0 -0
  131. package/styles/textbox/bootstrap5-dark.scss +4 -0
  132. package/styles/textbox/bootstrap5.css +0 -0
  133. package/styles/textbox/bootstrap5.scss +4 -0
  134. package/styles/uploader/_bootstrap5-dark-definition.scss +1 -0
  135. package/styles/uploader/_bootstrap5-definition.scss +216 -0
  136. package/styles/uploader/_definition.scss +142 -0
  137. package/styles/uploader/_tailwind-dark-definition.scss +1 -216
  138. package/styles/uploader/_tailwind-definition.scss +21 -21
  139. package/styles/uploader/_theme.scss +2 -2
  140. package/styles/uploader/bootstrap5-dark.css +1079 -0
  141. package/styles/uploader/bootstrap5-dark.scss +6 -0
  142. package/styles/uploader/bootstrap5.css +1079 -0
  143. package/styles/uploader/bootstrap5.scss +6 -0
  144. package/styles/uploader/icons/_bootstrap5-dark.scss +1 -0
  145. package/styles/uploader/icons/_bootstrap5.scss +34 -0
  146. package/styles/uploader/icons/_tailwind-dark.scss +1 -35
  147. package/styles/uploader/material-dark.css +1 -1
  148. package/.eslintrc.json +0 -244
  149. package/styles/color-picker/_icons.scss +0 -10
  150. package/tslint.json +0 -111
@@ -23,7 +23,7 @@ import { NotifyPropertyChanges, detach, append, Animation } from '@syncfusion/ej
23
23
  import { addClass, removeClass, KeyboardEvents, setValue, getValue, ChildProperty } from '@syncfusion/ej2-base';
24
24
  import { Collection, Complex, Browser, Ajax, getUniqueID, closest, remove } from '@syncfusion/ej2-base';
25
25
  import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';
26
- import { updateBlazorTemplate, resetBlazorTemplate, isBlazor, select, selectAll } from '@syncfusion/ej2-base';
26
+ import { select, selectAll } from '@syncfusion/ej2-base';
27
27
  var CONTROL_WRAPPER = 'e-upload e-control-wrapper';
28
28
  var INPUT_WRAPPER = 'e-file-select';
29
29
  var DROP_AREA = 'e-file-drop';
@@ -226,9 +226,7 @@ var Uploader = /** @class */ (function (_super) {
226
226
  this.updateDirectoryAttributes();
227
227
  break;
228
228
  case 'template':
229
- if (!this.isServerBlazor) {
230
- this.clearAll();
231
- }
229
+ this.clearAll();
232
230
  break;
233
231
  case 'minFileSize':
234
232
  case 'maxFileSize':
@@ -329,55 +327,44 @@ var Uploader = /** @class */ (function (_super) {
329
327
  };
330
328
  this.l10n = new L10n('uploader', this.localeText, this.locale);
331
329
  this.preLocaleObj = getValue('currentLocale', this.l10n);
332
- this.isServerBlazor = (isBlazor() && this.isServerRendered) ? true : false;
333
- this.isBlazorTemplate = this.isServerBlazor && this.template !== '' && !isNullOrUndefined(this.template) ? true : false;
334
- this.isBlazorSaveUrl = (this.isServerRendered &&
335
- (this.asyncSettings.saveUrl === '' || isNullOrUndefined(this.asyncSettings.saveUrl))) ? true : false;
336
- if (this.isBlazorSaveUrl && this.sequentialUpload) {
337
- this.sequentialUpload = false;
338
- }
339
- if (!this.isBlazorSaveUrl) {
340
- this.formRendered();
341
- }
342
- if (!this.isServerBlazor) {
343
- this.updateHTMLAttrToElement();
344
- this.checkHTMLAttributes(false);
345
- var ejInstance = getValue('ej2_instances', this.element);
346
- /* istanbul ignore next */
347
- if (this.element.tagName === 'EJS-UPLOADER') {
348
- var inputElement = this.createElement('input', { attrs: { type: 'file' } });
349
- var index = 0;
350
- for (index; index < this.element.attributes.length; index++) {
351
- inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
352
- inputElement.innerHTML = this.element.innerHTML;
353
- }
354
- if (!inputElement.hasAttribute('name')) {
355
- inputElement.setAttribute('name', 'UploadFiles');
356
- }
357
- this.element.appendChild(inputElement);
358
- this.element = inputElement;
359
- setValue('ej2_instances', ejInstance, this.element);
330
+ this.formRendered();
331
+ this.updateHTMLAttrToElement();
332
+ this.checkHTMLAttributes(false);
333
+ var ejInstance = getValue('ej2_instances', this.element);
334
+ /* istanbul ignore next */
335
+ if (this.element.tagName === 'EJS-UPLOADER') {
336
+ var inputElement = this.createElement('input', { attrs: { type: 'file' } });
337
+ var index = 0;
338
+ for (index; index < this.element.attributes.length; index++) {
339
+ inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
340
+ inputElement.innerHTML = this.element.innerHTML;
360
341
  }
361
- /* istanbul ignore next */
362
- if (ejInstance[0].isPureReactComponent) {
363
- if (!isNullOrUndefined(ejInstance[0].props.name)) {
364
- this.element.setAttribute('name', ejInstance[0].props.name);
365
- }
366
- else if (!isNullOrUndefined(ejInstance[0].props.id) && isNullOrUndefined(ejInstance[0].props.name)) {
367
- this.element.setAttribute('name', ejInstance[0].props.id);
368
- }
369
- else {
370
- this.element.setAttribute('name', 'UploadFiles');
371
- }
342
+ if (!inputElement.hasAttribute('name')) {
343
+ inputElement.setAttribute('name', 'UploadFiles');
372
344
  }
373
- if (isNullOrUndefined(this.element.getAttribute('name'))) {
374
- this.element.setAttribute('name', this.element.getAttribute('id'));
345
+ this.element.appendChild(inputElement);
346
+ this.element = inputElement;
347
+ setValue('ej2_instances', ejInstance, this.element);
348
+ }
349
+ /* istanbul ignore next */
350
+ if (ejInstance[0].isPureReactComponent) {
351
+ if (!isNullOrUndefined(ejInstance[0].props.name)) {
352
+ this.element.setAttribute('name', ejInstance[0].props.name);
375
353
  }
376
- if (!this.element.hasAttribute('type')) {
377
- this.element.setAttribute('type', 'file');
354
+ else if (!isNullOrUndefined(ejInstance[0].props.id) && isNullOrUndefined(ejInstance[0].props.name)) {
355
+ this.element.setAttribute('name', ejInstance[0].props.id);
356
+ }
357
+ else {
358
+ this.element.setAttribute('name', 'UploadFiles');
378
359
  }
379
- this.updateDirectoryAttributes();
380
360
  }
361
+ if (isNullOrUndefined(this.element.getAttribute('name'))) {
362
+ this.element.setAttribute('name', this.element.getAttribute('id'));
363
+ }
364
+ if (!this.element.hasAttribute('type')) {
365
+ this.element.setAttribute('type', 'file');
366
+ }
367
+ this.updateDirectoryAttributes();
381
368
  this.keyConfigs = {
382
369
  enter: 'enter'
383
370
  };
@@ -428,29 +415,16 @@ var Uploader = /** @class */ (function (_super) {
428
415
  * @returns {void}
429
416
  */
430
417
  Uploader.prototype.render = function () {
431
- if (!this.isServerBlazor) {
432
- this.renderBrowseButton();
433
- this.initializeUpload();
434
- this.updateHTMLAttrToWrapper();
435
- this.wireEvents();
436
- this.setMultipleSelection();
437
- this.setExtensions(this.allowedExtensions);
438
- this.setRTL();
439
- this.renderPreLoadFiles();
440
- this.setControlStatus();
441
- this.setCSSClass();
442
- }
443
- else {
444
- this.dropAreaWrapper = closest(this.element, '.' + DROP_WRAPPER);
445
- this.uploadWrapper = closest(this.element, '.e-upload.e-control-wrapper');
446
- this.browseButton = this.dropAreaWrapper.querySelector('button.e-upload-browse-btn');
447
- this.setDropArea();
448
- this.renderPreLoadFiles();
449
- this.wireEvents();
450
- }
451
- if (this.isServerBlazor) {
452
- this.renderComplete();
453
- }
418
+ this.renderBrowseButton();
419
+ this.initializeUpload();
420
+ this.updateHTMLAttrToWrapper();
421
+ this.wireEvents();
422
+ this.setMultipleSelection();
423
+ this.setExtensions(this.allowedExtensions);
424
+ this.setRTL();
425
+ this.renderPreLoadFiles();
426
+ this.setControlStatus();
427
+ this.setCSSClass();
454
428
  };
455
429
  Uploader.prototype.renderBrowseButton = function () {
456
430
  this.browseButton = this.createElement('button', { className: 'e-css e-btn', attrs: { 'type': 'button' } });
@@ -467,22 +441,20 @@ var Uploader = /** @class */ (function (_super) {
467
441
  };
468
442
  Uploader.prototype.renderActionButtons = function () {
469
443
  this.element.setAttribute('tabindex', '-1');
470
- if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
471
- this.actionButtons = this.createElement('div', { className: ACTION_BUTTONS });
472
- this.uploadButton = this.createElement('button', { className: UPLOAD_BUTTONS,
473
- attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });
474
- this.clearButton = this.createElement('button', { className: CLEAR_BUTTONS,
475
- attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });
476
- this.actionButtons.appendChild(this.clearButton);
477
- this.actionButtons.appendChild(this.uploadButton);
478
- this.renderButtonTemplates();
479
- this.uploadWrapper.appendChild(this.actionButtons);
480
- this.browseButton.blur();
481
- if (!this.isPreloadFiles) {
482
- this.uploadButton.focus();
483
- }
484
- this.wireActionButtonEvents();
444
+ this.actionButtons = this.createElement('div', { className: ACTION_BUTTONS });
445
+ this.uploadButton = this.createElement('button', { className: UPLOAD_BUTTONS,
446
+ attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });
447
+ this.clearButton = this.createElement('button', { className: CLEAR_BUTTONS,
448
+ attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });
449
+ this.actionButtons.appendChild(this.clearButton);
450
+ this.actionButtons.appendChild(this.uploadButton);
451
+ this.renderButtonTemplates();
452
+ this.uploadWrapper.appendChild(this.actionButtons);
453
+ this.browseButton.blur();
454
+ if (!this.isPreloadFiles) {
455
+ this.uploadButton.focus();
485
456
  }
457
+ this.wireActionButtonEvents();
486
458
  };
487
459
  /* istanbul ignore next */
488
460
  Uploader.prototype.serverActionButtonsEventBind = function (element) {
@@ -497,19 +469,6 @@ var Uploader = /** @class */ (function (_super) {
497
469
  this.checkActionButtonStatus();
498
470
  }
499
471
  };
500
- /* istanbul ignore next */
501
- Uploader.prototype.serverUlElement = function (element) {
502
- if (element) {
503
- if (this.isBlazorSaveUrl || this.isBlazorTemplate) {
504
- this.listParent = element;
505
- this.fileList = [].slice.call(this.listParent.querySelectorAll('li'));
506
- this.serverRemoveIconBindEvent();
507
- if (!this.isForm) {
508
- this.checkAutoUpload(this.filesData);
509
- }
510
- }
511
- }
512
- };
513
472
  Uploader.prototype.wireActionButtonEvents = function () {
514
473
  EventHandler.add(this.uploadButton, 'click', this.uploadButtonClick, this);
515
474
  EventHandler.add(this.clearButton, 'click', this.clearButtonClick, this);
@@ -521,9 +480,7 @@ var Uploader = /** @class */ (function (_super) {
521
480
  Uploader.prototype.removeActionButtons = function () {
522
481
  if (this.actionButtons) {
523
482
  this.unwireActionButtonEvents();
524
- if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
525
- detach(this.actionButtons);
526
- }
483
+ detach(this.actionButtons);
527
484
  this.actionButtons = null;
528
485
  }
529
486
  };
@@ -647,7 +604,7 @@ var Uploader = /** @class */ (function (_super) {
647
604
  if (!dropTextArea) {
648
605
  this.createDropTextHint();
649
606
  }
650
- else if (!this.isServerBlazor) {
607
+ else {
651
608
  dropTextArea.innerHTML = this.localizedTexts('dropFilesHint');
652
609
  }
653
610
  }
@@ -676,11 +633,9 @@ var Uploader = /** @class */ (function (_super) {
676
633
  }
677
634
  };
678
635
  Uploader.prototype.createDropTextHint = function () {
679
- if (!this.isServerBlazor) {
680
- var fileDropArea = this.createElement('span', { className: DROP_AREA });
681
- fileDropArea.innerHTML = this.localizedTexts('dropFilesHint');
682
- this.dropAreaWrapper.appendChild(fileDropArea);
683
- }
636
+ var fileDropArea = this.createElement('span', { className: DROP_AREA });
637
+ fileDropArea.innerHTML = this.localizedTexts('dropFilesHint');
638
+ this.dropAreaWrapper.appendChild(fileDropArea);
684
639
  };
685
640
  Uploader.prototype.updateHTMLAttrToElement = function () {
686
641
  if (!isNullOrUndefined(this.htmlAttributes)) {
@@ -973,9 +928,6 @@ var Uploader = /** @class */ (function (_super) {
973
928
  return;
974
929
  }
975
930
  var selectedElement = args.target.parentElement;
976
- if (this.isBlazorSaveUrl) {
977
- this.fileList = [].slice.call(this.uploadWrapper.querySelectorAll('li'));
978
- }
979
931
  var index = this.fileList.indexOf(selectedElement);
980
932
  var liElement = this.fileList[index];
981
933
  var formUpload = this.isFormUpload();
@@ -1017,27 +969,20 @@ var Uploader = /** @class */ (function (_super) {
1017
969
  if (isNullOrUndefined(selectedElement)) {
1018
970
  return;
1019
971
  }
1020
- if (!this.isBlazorSaveUrl) {
1021
- detach(selectedElement);
1022
- }
972
+ detach(selectedElement);
1023
973
  index = this.fileList.indexOf(selectedElement);
1024
974
  this.fileList.splice(index, 1);
1025
975
  this.filesData.splice(index, 1);
1026
- if (!this.isBlazorSaveUrl) {
1027
- if (this.fileList.length === 0 && !isNullOrUndefined(this.listParent)) {
1028
- detach(this.listParent);
1029
- this.listParent = null;
1030
- this.removeActionButtons();
1031
- }
1032
- if (this.sequentialUpload) {
1033
- /* istanbul ignore next */
1034
- if (index <= this.count) {
1035
- --this.count;
1036
- }
1037
- }
976
+ if (this.fileList.length === 0 && !isNullOrUndefined(this.listParent)) {
977
+ detach(this.listParent);
978
+ this.listParent = null;
979
+ this.removeActionButtons();
1038
980
  }
1039
- else {
1040
- this.interopAdaptor.invokeMethodAsync('removeFileData', index);
981
+ if (this.sequentialUpload) {
982
+ /* istanbul ignore next */
983
+ if (index <= this.count) {
984
+ --this.count;
985
+ }
1041
986
  }
1042
987
  };
1043
988
  Uploader.prototype.removeUploadedFile = function (file, eventArgs, removeDirectly, custom) {
@@ -1048,14 +993,6 @@ var Uploader = /** @class */ (function (_super) {
1048
993
  var formData = new FormData();
1049
994
  ajax.beforeSend = function (e) {
1050
995
  eventArgs.currentRequest = ajax.httpRequest;
1051
- if (isBlazor()) {
1052
- if (_this.currentRequestHeader) {
1053
- _this.updateCustomheader(ajax.httpRequest, _this.currentRequestHeader);
1054
- }
1055
- if (_this.customFormDatas) {
1056
- _this.updateFormData(formData, _this.customFormDatas);
1057
- }
1058
- }
1059
996
  if (!removeDirectly) {
1060
997
  _this.trigger('removing', eventArgs, function (eventArgs) {
1061
998
  if (eventArgs.cancel) {
@@ -1070,15 +1007,6 @@ var Uploader = /** @class */ (function (_super) {
1070
1007
  _this.removingEventCallback(eventArgs, formData, selectedFiles, file);
1071
1008
  }
1072
1009
  };
1073
- if (this.isServerBlazor) {
1074
- var name_1 = this.element.getAttribute('name');
1075
- if (!isNullOrUndefined(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {
1076
- formData.append(name_1, selectedFiles.rawFile, selectedFiles.name);
1077
- }
1078
- else {
1079
- formData.append(name_1, selectedFiles.name);
1080
- }
1081
- }
1082
1010
  ajax.onLoad = function (e) {
1083
1011
  _this.removeCompleted(e, selectedFiles, custom);
1084
1012
  return {};
@@ -1102,15 +1030,13 @@ var Uploader = /** @class */ (function (_super) {
1102
1030
  createSpinner({ target: spinnerTarget, width: '20px' });
1103
1031
  showSpinner(spinnerTarget);
1104
1032
  }
1105
- if (!this.isServerBlazor) {
1106
- if (eventArgs.postRawFile && !isNullOrUndefined(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {
1107
- formData.append(name, selectedFiles.rawFile, selectedFiles.name);
1108
- }
1109
- else {
1110
- formData.append(name, selectedFiles.name);
1111
- }
1112
- this.updateFormData(formData, eventArgs.customFormData);
1033
+ if (eventArgs.postRawFile && !isNullOrUndefined(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {
1034
+ formData.append(name, selectedFiles.rawFile, selectedFiles.name);
1113
1035
  }
1036
+ else {
1037
+ formData.append(name, selectedFiles.name);
1038
+ }
1039
+ this.updateFormData(formData, eventArgs.customFormData);
1114
1040
  };
1115
1041
  /* istanbul ignore next */
1116
1042
  Uploader.prototype.updateFormData = function (formData, customData) {
@@ -1380,10 +1306,6 @@ var Uploader = /** @class */ (function (_super) {
1380
1306
  Uploader.prototype._internalRenderSelect = function (eventArgs, fileData) {
1381
1307
  if (!eventArgs.cancel) {
1382
1308
  /* istanbul ignore next */
1383
- if (isBlazor()) {
1384
- this.currentRequestHeader = eventArgs.currentRequest;
1385
- this.customFormDatas = eventArgs.customFormData;
1386
- }
1387
1309
  this.selectedFiles = this.selectedFiles.concat(fileData);
1388
1310
  this.btnTabIndex = this.disableKeyboardNavigation ? '-1' : '0';
1389
1311
  if (this.showFileList) {
@@ -1405,13 +1327,9 @@ var Uploader = /** @class */ (function (_super) {
1405
1327
  }
1406
1328
  else {
1407
1329
  this.createFileList(fileData, true);
1408
- if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
1409
- this.filesData = this.filesData.concat(fileData);
1410
- }
1330
+ this.filesData = this.filesData.concat(fileData);
1411
1331
  if (!this.isForm || this.allowUpload()) {
1412
- if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
1413
- this.checkAutoUpload(fileData);
1414
- }
1332
+ this.checkAutoUpload(fileData);
1415
1333
  }
1416
1334
  }
1417
1335
  if (!isNullOrUndefined(eventArgs.progressInterval) && eventArgs.progressInterval !== '') {
@@ -1420,9 +1338,6 @@ var Uploader = /** @class */ (function (_super) {
1420
1338
  }
1421
1339
  else {
1422
1340
  this.filesData = this.filesData.concat(fileData);
1423
- if (this.isBlazorSaveUrl) {
1424
- this.interopAdaptor.invokeMethodAsync('updateServerFileData', this.filesData, this.isForm);
1425
- }
1426
1341
  if (this.autoUpload) {
1427
1342
  this.upload(this.filesData, true);
1428
1343
  }
@@ -1447,7 +1362,7 @@ var Uploader = /** @class */ (function (_super) {
1447
1362
  return isFormUpload;
1448
1363
  };
1449
1364
  Uploader.prototype.clearData = function (singleUpload) {
1450
- if (!isNullOrUndefined(this.listParent) && !(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
1365
+ if (!isNullOrUndefined(this.listParent)) {
1451
1366
  detach(this.listParent);
1452
1367
  this.listParent = null;
1453
1368
  }
@@ -1456,12 +1371,7 @@ var Uploader = /** @class */ (function (_super) {
1456
1371
  }
1457
1372
  this.fileList = [];
1458
1373
  this.filesData = [];
1459
- if (this.isBlazorSaveUrl || this.isBlazorTemplate) {
1460
- this.interopAdaptor.invokeMethodAsync('clearAll');
1461
- }
1462
- else {
1463
- this.removeActionButtons();
1464
- }
1374
+ this.removeActionButtons();
1465
1375
  };
1466
1376
  Uploader.prototype.updateSortedFileList = function (filesData) {
1467
1377
  var previousListClone = this.createElement('div', { id: 'clonewrapper' });
@@ -1549,7 +1459,6 @@ var Uploader = /** @class */ (function (_super) {
1549
1459
  };
1550
1460
  Uploader.prototype.createCustomfileList = function (fileData) {
1551
1461
  this.createParentUL();
1552
- resetBlazorTemplate(this.element.id + 'Template', 'Template');
1553
1462
  for (var _i = 0, fileData_1 = fileData; _i < fileData_1.length; _i++) {
1554
1463
  var listItem = fileData_1[_i];
1555
1464
  var listElement = this.createElement('li', { className: FILE, attrs: { 'data-file-name': listItem.name } });
@@ -1578,7 +1487,6 @@ var Uploader = /** @class */ (function (_super) {
1578
1487
  this.fileList.push(listElement);
1579
1488
  }
1580
1489
  this.renderReactTemplates();
1581
- updateBlazorTemplate(this.element.id + 'Template', 'Template', this, false);
1582
1490
  };
1583
1491
  Uploader.prototype.createParentUL = function () {
1584
1492
  if (isNullOrUndefined(this.listParent)) {
@@ -1756,7 +1664,6 @@ var Uploader = /** @class */ (function (_super) {
1756
1664
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1757
1665
  Uploader.prototype.formCustomFileList = function (fileData, files) {
1758
1666
  this.createParentUL();
1759
- resetBlazorTemplate(this.element.id + 'Template', 'Template');
1760
1667
  var fileList = this.createElement('li', { className: FILE });
1761
1668
  fileList.setAttribute('data-files-count', fileData.length + '');
1762
1669
  this.setListToFileInfo(fileData, fileList);
@@ -1789,7 +1696,6 @@ var Uploader = /** @class */ (function (_super) {
1789
1696
  this.listParent.appendChild(fileList);
1790
1697
  this.fileList.push(fileList);
1791
1698
  this.renderReactTemplates();
1792
- updateBlazorTemplate(this.element.id + 'Template', 'Template', this, false);
1793
1699
  };
1794
1700
  /* eslint-disable valid-jsdoc, jsdoc/require-param */
1795
1701
  /**
@@ -1800,106 +1706,100 @@ var Uploader = /** @class */ (function (_super) {
1800
1706
  */
1801
1707
  Uploader.prototype.createFileList = function (fileData, isSelectedFile) {
1802
1708
  /* eslint-enable valid-jsdoc, jsdoc/require-param */
1803
- if (this.isBlazorSaveUrl || this.isBlazorTemplate) {
1804
- var fileListData = (isSelectedFile) ? this.filesData = this.filesData.concat(fileData) : fileData;
1805
- this.interopAdaptor.invokeMethodAsync('createFileList', fileListData, this.isForm);
1709
+ this.createParentUL();
1710
+ if (this.template !== '' && !isNullOrUndefined(this.template)) {
1711
+ if (this.isFormUpload()) {
1712
+ this.uploadWrapper.classList.add(FORM_UPLOAD);
1713
+ this.formCustomFileList(fileData, this.element.files);
1714
+ }
1715
+ else {
1716
+ this.createCustomfileList(fileData);
1717
+ }
1718
+ }
1719
+ else if (this.isFormUpload()) {
1720
+ this.uploadWrapper.classList.add(FORM_UPLOAD);
1721
+ this.formFileList(fileData, this.element.files);
1806
1722
  }
1807
1723
  else {
1808
- this.createParentUL();
1809
- if (this.template !== '' && !isNullOrUndefined(this.template)) {
1810
- if (this.isFormUpload()) {
1811
- this.uploadWrapper.classList.add(FORM_UPLOAD);
1812
- this.formCustomFileList(fileData, this.element.files);
1724
+ for (var _i = 0, fileData_7 = fileData; _i < fileData_7.length; _i++) {
1725
+ var listItem = fileData_7[_i];
1726
+ var liElement = this.createElement('li', {
1727
+ className: FILE,
1728
+ attrs: { 'data-file-name': listItem.name, 'data-files-count': '1' }
1729
+ });
1730
+ var textContainer = this.createElement('span', { className: TEXT_CONTAINER });
1731
+ var textElement = this.createElement('span', { className: FILE_NAME, attrs: { 'title': listItem.name } });
1732
+ textElement.innerHTML = this.getFileNameOnly(listItem.name);
1733
+ var fileExtension = this.createElement('span', { className: FILE_TYPE });
1734
+ var fileType = this.getFileType(listItem.name);
1735
+ fileExtension.innerHTML = '.' + fileType;
1736
+ if (!fileType) {
1737
+ fileExtension.classList.add('e-hidden');
1738
+ }
1739
+ if (!this.enableRtl) {
1740
+ textContainer.appendChild(textElement);
1741
+ textContainer.appendChild(fileExtension);
1813
1742
  }
1814
1743
  else {
1815
- this.createCustomfileList(fileData);
1744
+ var rtlContainer = this.createElement('span', { className: RTL_CONTAINER });
1745
+ rtlContainer.appendChild(fileExtension);
1746
+ rtlContainer.appendChild(textElement);
1747
+ textContainer.appendChild(rtlContainer);
1748
+ }
1749
+ var fileSize = this.createElement('span', { className: FILE_SIZE });
1750
+ fileSize.innerHTML = this.bytesToSize(listItem.size);
1751
+ textContainer.appendChild(fileSize);
1752
+ var statusElement = this.createElement('span', { className: STATUS });
1753
+ textContainer.appendChild(statusElement);
1754
+ statusElement.innerHTML = listItem.status;
1755
+ liElement.appendChild(textContainer);
1756
+ var iconElement = this.createElement('span', { className: ' e-icons',
1757
+ attrs: { 'tabindex': this.btnTabIndex } });
1758
+ /* istanbul ignore next */
1759
+ if (this.browserName === 'msie') {
1760
+ iconElement.classList.add('e-msie');
1761
+ }
1762
+ iconElement.setAttribute('title', this.localizedTexts('remove'));
1763
+ liElement.appendChild(iconElement);
1764
+ EventHandler.add(iconElement, 'click', this.removeFiles, this);
1765
+ if (listItem.statusCode === '2') {
1766
+ statusElement.classList.add(UPLOAD_SUCCESS);
1767
+ iconElement.classList.add(DELETE_ICON);
1768
+ iconElement.setAttribute('title', this.localizedTexts('delete'));
1769
+ }
1770
+ else if (listItem.statusCode !== '1') {
1771
+ statusElement.classList.remove(UPLOAD_SUCCESS);
1772
+ statusElement.classList.add(VALIDATION_FAILS);
1816
1773
  }
1817
- }
1818
- else if (this.isFormUpload()) {
1819
- this.uploadWrapper.classList.add(FORM_UPLOAD);
1820
- this.formFileList(fileData, this.element.files);
1821
- }
1822
- else {
1823
- for (var _i = 0, fileData_7 = fileData; _i < fileData_7.length; _i++) {
1824
- var listItem = fileData_7[_i];
1825
- var liElement = this.createElement('li', {
1826
- className: FILE,
1827
- attrs: { 'data-file-name': listItem.name, 'data-files-count': '1' }
1828
- });
1829
- var textContainer = this.createElement('span', { className: TEXT_CONTAINER });
1830
- var textElement = this.createElement('span', { className: FILE_NAME, attrs: { 'title': listItem.name } });
1831
- textElement.innerHTML = this.getFileNameOnly(listItem.name);
1832
- var fileExtension = this.createElement('span', { className: FILE_TYPE });
1833
- var fileType = this.getFileType(listItem.name);
1834
- fileExtension.innerHTML = '.' + fileType;
1835
- if (!fileType) {
1836
- fileExtension.classList.add('e-hidden');
1837
- }
1838
- if (!this.enableRtl) {
1839
- textContainer.appendChild(textElement);
1840
- textContainer.appendChild(fileExtension);
1841
- }
1842
- else {
1843
- var rtlContainer = this.createElement('span', { className: RTL_CONTAINER });
1844
- rtlContainer.appendChild(fileExtension);
1845
- rtlContainer.appendChild(textElement);
1846
- textContainer.appendChild(rtlContainer);
1847
- }
1848
- var fileSize = this.createElement('span', { className: FILE_SIZE });
1849
- fileSize.innerHTML = this.bytesToSize(listItem.size);
1850
- textContainer.appendChild(fileSize);
1851
- var statusElement = this.createElement('span', { className: STATUS });
1852
- textContainer.appendChild(statusElement);
1853
- statusElement.innerHTML = listItem.status;
1854
- liElement.appendChild(textContainer);
1855
- var iconElement = this.createElement('span', { className: ' e-icons',
1856
- attrs: { 'tabindex': this.btnTabIndex } });
1857
- /* istanbul ignore next */
1858
- if (this.browserName === 'msie') {
1859
- iconElement.classList.add('e-msie');
1860
- }
1861
- iconElement.setAttribute('title', this.localizedTexts('remove'));
1862
- liElement.appendChild(iconElement);
1863
- EventHandler.add(iconElement, 'click', this.removeFiles, this);
1864
- if (listItem.statusCode === '2') {
1865
- statusElement.classList.add(UPLOAD_SUCCESS);
1866
- iconElement.classList.add(DELETE_ICON);
1867
- iconElement.setAttribute('title', this.localizedTexts('delete'));
1868
- }
1869
- else if (listItem.statusCode !== '1') {
1870
- statusElement.classList.remove(UPLOAD_SUCCESS);
1871
- statusElement.classList.add(VALIDATION_FAILS);
1872
- }
1873
- if (this.autoUpload && listItem.statusCode === '1' && this.asyncSettings.saveUrl !== '') {
1874
- statusElement.innerHTML = '';
1875
- }
1876
- if (!iconElement.classList.contains(DELETE_ICON)) {
1877
- iconElement.classList.add(REMOVE_ICON);
1878
- }
1879
- var index = fileData.indexOf(listItem);
1880
- var eventArgs = {
1881
- element: liElement,
1882
- fileInfo: listItem,
1883
- index: index,
1884
- isPreload: this.isPreLoadFile(listItem)
1885
- };
1886
- var eventsArgs = {
1887
- element: liElement,
1888
- fileInfo: listItem,
1889
- index: index,
1890
- isPreload: this.isPreLoadFile(listItem)
1891
- };
1892
- this.trigger('rendering', eventArgs);
1893
- this.trigger('fileListRendering', eventsArgs);
1894
- this.listParent.appendChild(liElement);
1895
- this.fileList.push(liElement);
1896
- this.truncateName(textElement);
1897
- var preventActionComplete = this.flag;
1898
- if (this.isPreLoadFile(listItem)) {
1899
- this.flag = false;
1900
- this.checkActionComplete(true);
1901
- this.flag = preventActionComplete;
1902
- }
1774
+ if (this.autoUpload && listItem.statusCode === '1' && this.asyncSettings.saveUrl !== '') {
1775
+ statusElement.innerHTML = '';
1776
+ }
1777
+ if (!iconElement.classList.contains(DELETE_ICON)) {
1778
+ iconElement.classList.add(REMOVE_ICON);
1779
+ }
1780
+ var index = fileData.indexOf(listItem);
1781
+ var eventArgs = {
1782
+ element: liElement,
1783
+ fileInfo: listItem,
1784
+ index: index,
1785
+ isPreload: this.isPreLoadFile(listItem)
1786
+ };
1787
+ var eventsArgs = {
1788
+ element: liElement,
1789
+ fileInfo: listItem,
1790
+ index: index,
1791
+ isPreload: this.isPreLoadFile(listItem)
1792
+ };
1793
+ this.trigger('rendering', eventArgs);
1794
+ this.trigger('fileListRendering', eventsArgs);
1795
+ this.listParent.appendChild(liElement);
1796
+ this.fileList.push(liElement);
1797
+ this.truncateName(textElement);
1798
+ var preventActionComplete = this.flag;
1799
+ if (this.isPreLoadFile(listItem)) {
1800
+ this.flag = false;
1801
+ this.checkActionComplete(true);
1802
+ this.flag = preventActionComplete;
1903
1803
  }
1904
1804
  }
1905
1805
  }
@@ -1963,18 +1863,8 @@ var Uploader = /** @class */ (function (_super) {
1963
1863
  Uploader.prototype.updateStatus = function (files, status, statusCode, updateLiStatus) {
1964
1864
  if (updateLiStatus === void 0) { updateLiStatus = true; }
1965
1865
  if (!(status === '' || isNullOrUndefined(status)) && !(statusCode === '' || isNullOrUndefined(statusCode))) {
1966
- if (this.isBlazorSaveUrl) {
1967
- for (var i = 0; i < this.filesData.length; i++) {
1968
- if (this.filesData[i].name === files.name) {
1969
- this.filesData[i].status = status;
1970
- this.filesData[i].statusCode = statusCode;
1971
- }
1972
- }
1973
- }
1974
- else {
1975
- files.status = status;
1976
- files.statusCode = statusCode;
1977
- }
1866
+ files.status = status;
1867
+ files.statusCode = statusCode;
1978
1868
  }
1979
1869
  if (updateLiStatus) {
1980
1870
  var li = this.getLiElement(files);
@@ -1989,8 +1879,9 @@ var Uploader = /** @class */ (function (_super) {
1989
1879
  Uploader.prototype.getLiElement = function (files) {
1990
1880
  var index;
1991
1881
  for (var i = 0; i < this.filesData.length; i++) {
1992
- if ((!isNullOrUndefined(this.filesData[i].id) && !isNullOrUndefined(files.id)) ? (this.filesData[i].name === files.name &&
1993
- this.filesData[i].id === files.id) : this.filesData[i].name === files.name) {
1882
+ if (!isNullOrUndefined(files) && ((!isNullOrUndefined(this.filesData[i].id) &&
1883
+ !isNullOrUndefined(files.id)) ? (this.filesData[i].name === files.name &&
1884
+ this.filesData[i].id === files.id) : this.filesData[i].name === files.name)) {
1994
1885
  index = i;
1995
1886
  }
1996
1887
  }
@@ -2082,8 +1973,8 @@ var Uploader = /** @class */ (function (_super) {
2082
1973
  request.httpRequest.abort();
2083
1974
  var formData = new FormData();
2084
1975
  if (files.statusCode === '5') {
2085
- var name_2 = _this.element.getAttribute('name');
2086
- formData.append(name_2, files.name);
1976
+ var name_1 = _this.element.getAttribute('name');
1977
+ formData.append(name_1, files.name);
2087
1978
  formData.append('cancel-uploading', files.name);
2088
1979
  _this.updateFormData(formData, eventArgs.customFormData);
2089
1980
  var ajax = new Ajax(_this.asyncSettings.removeUrl, 'POST', true, null);
@@ -2191,19 +2082,6 @@ var Uploader = /** @class */ (function (_super) {
2191
2082
  };
2192
2083
  return response;
2193
2084
  };
2194
- /* istanbul ignore next */
2195
- Uploader.prototype.serverRemoveIconBindEvent = function () {
2196
- if (this.uploadWrapper && this.isBlazorSaveUrl) {
2197
- var iconElement = [].slice.call(this.uploadWrapper.querySelectorAll('ul li'));
2198
- for (var i = 0; i < iconElement.length; i++) {
2199
- var removeIconEle = (iconElement[i]) ? iconElement[i].querySelector('.e-icons') : null;
2200
- if (removeIconEle) {
2201
- EventHandler.remove(removeIconEle, 'click', this.removeFiles);
2202
- EventHandler.add(removeIconEle, 'click', this.removeFiles, this);
2203
- }
2204
- }
2205
- }
2206
- };
2207
2085
  Uploader.prototype.raiseSuccessEvent = function (e, file) {
2208
2086
  var _this = this;
2209
2087
  var response = e && e.currentTarget ? this.getResponse(e) : null;
@@ -2211,22 +2089,18 @@ var Uploader = /** @class */ (function (_super) {
2211
2089
  var args = {
2212
2090
  e: e, response: response, operation: 'upload', file: this.updateStatus(file, statusMessage, '2', false), statusText: statusMessage
2213
2091
  };
2214
- if (!this.isBlazorSaveUrl) {
2215
- var liElement = this.getLiElement(file);
2216
- if (!isNullOrUndefined(liElement)) {
2217
- var spinnerEle = liElement.querySelector('.' + SPINNER_PANE);
2218
- if (!isNullOrUndefined(spinnerEle)) {
2219
- hideSpinner(liElement);
2220
- detach(spinnerEle);
2221
- }
2092
+ var liElement = this.getLiElement(file);
2093
+ if (!isNullOrUndefined(liElement)) {
2094
+ var spinnerEle = liElement.querySelector('.' + SPINNER_PANE);
2095
+ if (!isNullOrUndefined(spinnerEle)) {
2096
+ hideSpinner(liElement);
2097
+ detach(spinnerEle);
2222
2098
  }
2223
2099
  }
2224
2100
  this.trigger('success', args, function (args) {
2225
2101
  _this.updateStatus(file, args.statusText, '2');
2226
2102
  _this.uploadedFilesData.push(file);
2227
- if (!_this.isBlazorSaveUrl) {
2228
- _this.trigger('change', { file: _this.uploadedFilesData });
2229
- }
2103
+ _this.trigger('change', { file: _this.uploadedFilesData });
2230
2104
  _this.checkActionButtonStatus();
2231
2105
  if (_this.fileList.length > 0) {
2232
2106
  if ((!(_this.getLiElement(file)).classList.contains(RESTRICT_RETRY))) {
@@ -2473,15 +2347,6 @@ var Uploader = /** @class */ (function (_super) {
2473
2347
  ajax.beforeSend = function (e) {
2474
2348
  eventArgs.currentRequest = ajax.httpRequest;
2475
2349
  eventArgs.currentChunkIndex = metaData.chunkIndex;
2476
- /* istanbul ignore next */
2477
- if (isBlazor()) {
2478
- if (_this.currentRequestHeader) {
2479
- _this.updateCustomheader(ajax.httpRequest, _this.currentRequestHeader);
2480
- }
2481
- if (_this.customFormDatas) {
2482
- _this.updateFormData(formData, _this.customFormDatas);
2483
- }
2484
- }
2485
2350
  if (eventArgs.currentChunkIndex === 0) {
2486
2351
  // This event is currently not required but to avoid breaking changes for previous customer, we have included.
2487
2352
  _this.trigger('uploading', eventArgs, function (eventArgs) {
@@ -2580,8 +2445,8 @@ var Uploader = /** @class */ (function (_super) {
2580
2445
  metaData.request.emitError = false;
2581
2446
  response.abort();
2582
2447
  var formData = new FormData();
2583
- var name_3 = _this.element.getAttribute('name');
2584
- formData.append(name_3, metaData.file.name);
2448
+ var name_2 = _this.element.getAttribute('name');
2449
+ formData.append(name_2, metaData.file.name);
2585
2450
  formData.append('cancel-uploading', metaData.file.name);
2586
2451
  formData.append('cancelUploading', metaData.file.name);
2587
2452
  _this.updateFormData(formData, eventArgs.customFormData);
@@ -2963,9 +2828,9 @@ var Uploader = /** @class */ (function (_super) {
2963
2828
  var sortedFileNames = fileNames.sort();
2964
2829
  var sortedFilesData = [];
2965
2830
  for (var _i = 0, sortedFileNames_1 = sortedFileNames; _i < sortedFileNames_1.length; _i++) {
2966
- var name_4 = sortedFileNames_1[_i];
2831
+ var name_3 = sortedFileNames_1[_i];
2967
2832
  for (var i = 0; i < files.length; i++) {
2968
- if (name_4 === files[i].name) {
2833
+ if (name_3 === files[i].name) {
2969
2834
  sortedFilesData.push(files[i]);
2970
2835
  }
2971
2836
  }
@@ -2982,9 +2847,7 @@ var Uploader = /** @class */ (function (_super) {
2982
2847
  Uploader.prototype.destroy = function () {
2983
2848
  this.element.value = null;
2984
2849
  this.clearTemplate();
2985
- if (!(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
2986
- this.clearAll();
2987
- }
2850
+ this.clearAll();
2988
2851
  this.unWireEvents();
2989
2852
  this.unBindDropEvents();
2990
2853
  if (this.multiple) {
@@ -3000,17 +2863,12 @@ var Uploader = /** @class */ (function (_super) {
3000
2863
  var key = attributes_2[_i];
3001
2864
  this.element.removeAttribute(key);
3002
2865
  }
3003
- if (!this.isServerBlazor) {
3004
- if (!isNullOrUndefined(this.uploadWrapper)) {
3005
- this.uploadWrapper.parentElement.appendChild(this.element);
3006
- detach(this.uploadWrapper);
3007
- }
3008
- this.uploadWrapper = null;
3009
- _super.prototype.destroy.call(this);
3010
- }
3011
- else {
3012
- this.uploadWrapper = null;
2866
+ if (!isNullOrUndefined(this.uploadWrapper)) {
2867
+ this.uploadWrapper.parentElement.appendChild(this.element);
2868
+ detach(this.uploadWrapper);
3013
2869
  }
2870
+ this.uploadWrapper = null;
2871
+ _super.prototype.destroy.call(this);
3014
2872
  };
3015
2873
  /**
3016
2874
  * Allows you to call the upload process manually by calling save URL action.
@@ -3036,11 +2894,6 @@ var Uploader = /** @class */ (function (_super) {
3036
2894
  };
3037
2895
  this.trigger('beforeUpload', eventArgs, function (eventArgs) {
3038
2896
  if (!eventArgs.cancel) {
3039
- if (isBlazor()) {
3040
- _this.currentRequestHeader = eventArgs.currentRequest ? eventArgs.currentRequest : _this.currentRequestHeader;
3041
- _this.customFormDatas = (eventArgs.customFormData && eventArgs.customFormData.length > 0) ?
3042
- eventArgs.customFormData : _this.customFormDatas;
3043
- }
3044
2897
  _this.uploadFiles(uploadFiles_1, custom);
3045
2898
  }
3046
2899
  });
@@ -3121,12 +2974,8 @@ var Uploader = /** @class */ (function (_super) {
3121
2974
  return this.filesData[index];
3122
2975
  };
3123
2976
  Uploader.prototype.uploadFiles = function (files, custom) {
3124
- var _this = this;
3125
2977
  var selectedFiles = [];
3126
2978
  if (this.asyncSettings.saveUrl === '' || isNullOrUndefined(this.asyncSettings.saveUrl)) {
3127
- if (this.isServerBlazor) {
3128
- this.interopAdaptor.invokeMethodAsync('GetFileDetails', files);
3129
- }
3130
2979
  return;
3131
2980
  }
3132
2981
  if (!custom || isNullOrUndefined(custom)) {
@@ -3142,23 +2991,8 @@ var Uploader = /** @class */ (function (_super) {
3142
2991
  else {
3143
2992
  selectedFiles = files;
3144
2993
  }
3145
- var _loop_5 = function (i) {
3146
- if (this_3.isServerBlazor && !this_3.checkChunkUpload()) {
3147
- /* istanbul ignore next */
3148
- if (selectedFiles[i] && selectedFiles[i].rawFile instanceof File) {
3149
- this_3.getBase64(selectedFiles[i].rawFile).then(function (data) {
3150
- _this.base64String.push(data);
3151
- _this.uploadFilesRequest(selectedFiles, i, custom);
3152
- });
3153
- }
3154
- }
3155
- else {
3156
- this_3.uploadFilesRequest(selectedFiles, i, custom);
3157
- }
3158
- };
3159
- var this_3 = this;
3160
2994
  for (var i = 0; i < selectedFiles.length; i++) {
3161
- _loop_5(i);
2995
+ this.uploadFilesRequest(selectedFiles, i, custom);
3162
2996
  }
3163
2997
  };
3164
2998
  Uploader.prototype.uploadFilesRequest = function (selectedFiles, i, custom) {
@@ -3168,34 +3002,16 @@ var Uploader = /** @class */ (function (_super) {
3168
3002
  var ajax = new Ajax(this.asyncSettings.saveUrl, 'POST', true, null);
3169
3003
  ajax.emitError = false;
3170
3004
  var getFileData;
3171
- /* istanbul ignore next */
3172
- if (this.isServerBlazor) {
3173
- getFileData = selectedFiles.slice(0);
3174
- cloneFiles.push(getFileData[i].rawFile);
3175
- }
3176
3005
  var eventArgs = {
3177
- fileData: (this.isServerBlazor) ? getFileData[i] : selectedFiles[i],
3006
+ fileData: selectedFiles[i],
3178
3007
  customFormData: [],
3179
3008
  cancel: false
3180
3009
  };
3181
3010
  var formData = new FormData();
3182
3011
  ajax.beforeSend = function (e) {
3183
3012
  eventArgs.currentRequest = ajax.httpRequest;
3184
- /* istanbul ignore next */
3185
- if (isBlazor()) {
3186
- eventArgs.fileData.rawFile = !chunkEnabled ? _this.base64String[i] : eventArgs.fileData.rawFile;
3187
- if (_this.currentRequestHeader) {
3188
- _this.updateCustomheader(ajax.httpRequest, _this.currentRequestHeader);
3189
- }
3190
- if (_this.customFormDatas) {
3191
- _this.updateFormData(formData, _this.customFormDatas);
3192
- }
3193
- }
3194
3013
  _this.trigger('uploading', eventArgs, function (eventArgs) {
3195
3014
  /* istanbul ignore next */
3196
- if (_this.isServerBlazor && !chunkEnabled) {
3197
- selectedFiles[i].rawFile = eventArgs.fileData.rawFile = cloneFiles[i];
3198
- }
3199
3015
  if (eventArgs.cancel) {
3200
3016
  _this.eventCancelByArgs(e, eventArgs, selectedFiles[i]);
3201
3017
  }
@@ -3203,14 +3019,14 @@ var Uploader = /** @class */ (function (_super) {
3203
3019
  });
3204
3020
  };
3205
3021
  if (selectedFiles[i].statusCode === '1') {
3206
- var name_5 = this.element.getAttribute('name');
3207
- formData.append(name_5, selectedFiles[i].rawFile, selectedFiles[i].name);
3022
+ var name_4 = this.element.getAttribute('name');
3023
+ formData.append(name_4, selectedFiles[i].rawFile, selectedFiles[i].name);
3208
3024
  if (chunkEnabled && selectedFiles[i].size > this.asyncSettings.chunkSize) {
3209
3025
  this.chunkUpload(selectedFiles[i], custom, i);
3210
3026
  }
3211
3027
  else {
3212
3028
  ajax.onLoad = function (e) {
3213
- if (eventArgs.cancel && _this.isServerBlazor) {
3029
+ if (eventArgs.cancel) {
3214
3030
  return {};
3215
3031
  }
3216
3032
  else {
@@ -3219,7 +3035,7 @@ var Uploader = /** @class */ (function (_super) {
3219
3035
  }
3220
3036
  };
3221
3037
  ajax.onUploadProgress = function (e) {
3222
- if (eventArgs.cancel && _this.isServerBlazor) {
3038
+ if (eventArgs.cancel) {
3223
3039
  return {};
3224
3040
  }
3225
3041
  else {
@@ -3281,11 +3097,7 @@ var Uploader = /** @class */ (function (_super) {
3281
3097
  };
3282
3098
  this.trigger('beforeRemove', beforeEventArgs, function (beforeEventArgs) {
3283
3099
  if (!beforeEventArgs.cancel) {
3284
- if (isBlazor()) {
3285
- _this.currentRequestHeader = beforeEventArgs.currentRequest;
3286
- _this.customFormDatas = beforeEventArgs.customFormData;
3287
- }
3288
- if (_this.isFormUpload() && !_this.isBlazorSaveUrl) {
3100
+ if (_this.isFormUpload()) {
3289
3101
  eventArgs.filesData = fileData;
3290
3102
  _this.trigger('removing', eventArgs, function (eventArgs) {
3291
3103
  if (!eventArgs.cancel) {
@@ -3312,8 +3124,7 @@ var Uploader = /** @class */ (function (_super) {
3312
3124
  }
3313
3125
  });
3314
3126
  }
3315
- else if (_this.isForm && (isNullOrUndefined(_this.asyncSettings.removeUrl) || _this.asyncSettings.removeUrl === '')
3316
- && !_this.isBlazorSaveUrl) {
3127
+ else if (_this.isForm && (isNullOrUndefined(_this.asyncSettings.removeUrl) || _this.asyncSettings.removeUrl === '')) {
3317
3128
  eventArgs.filesData = _this.getFilesData();
3318
3129
  _this.trigger('removing', eventArgs, function (eventArgs) {
3319
3130
  if (!eventArgs.cancel) {
@@ -3333,7 +3144,7 @@ var Uploader = /** @class */ (function (_super) {
3333
3144
  eventArgs.filesData = removeFiles;
3334
3145
  var removeUrl = _this.asyncSettings.removeUrl;
3335
3146
  var validUrl = (removeUrl === '' || isNullOrUndefined(removeUrl)) ? false : true;
3336
- var _loop_6 = function (files) {
3147
+ var _loop_5 = function (files) {
3337
3148
  var fileUploadedIndex = _this.uploadedFilesData.indexOf(files);
3338
3149
  if ((files.statusCode === '2' || files.statusCode === '4' || (files.statusCode === '0' &&
3339
3150
  fileUploadedIndex !== -1)) && validUrl) {
@@ -3357,7 +3168,7 @@ var Uploader = /** @class */ (function (_super) {
3357
3168
  };
3358
3169
  for (var _i = 0, removeFiles_1 = removeFiles; _i < removeFiles_1.length; _i++) {
3359
3170
  var files = removeFiles_1[_i];
3360
- _loop_6(files);
3171
+ _loop_5(files);
3361
3172
  }
3362
3173
  }
3363
3174
  }
@@ -3371,7 +3182,7 @@ var Uploader = /** @class */ (function (_super) {
3371
3182
  */
3372
3183
  Uploader.prototype.clearAll = function () {
3373
3184
  var _this = this;
3374
- if (isNullOrUndefined(this.listParent) && !(this.isBlazorSaveUrl || this.isBlazorTemplate)) {
3185
+ if (isNullOrUndefined(this.listParent)) {
3375
3186
  if (this.browserName !== 'msie') {
3376
3187
  this.element.value = '';
3377
3188
  }
@@ -3398,19 +3209,11 @@ var Uploader = /** @class */ (function (_super) {
3398
3209
  * @returns {FileInfo[]}
3399
3210
  */
3400
3211
  Uploader.prototype.getFilesData = function (index) {
3401
- if (!this.isServerBlazor) {
3402
- if (isNullOrUndefined(index)) {
3403
- return this.filesData;
3404
- }
3405
- else {
3406
- return this.getSelectedFiles(index);
3407
- }
3212
+ if (isNullOrUndefined(index)) {
3213
+ return this.filesData;
3408
3214
  }
3409
3215
  else {
3410
- for (var i = 0; i < this.filesData.length; i++) {
3411
- this.filesData[i].rawFile = this.base64String[i];
3412
- }
3413
- return this.filesData;
3216
+ return this.getSelectedFiles(index);
3414
3217
  }
3415
3218
  };
3416
3219
  /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */