@syncfusion/ej2-multicolumn-combobox 27.2.4 → 28.1.33

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 (89) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-multicolumn-combobox.umd.min.js +3 -3
  3. package/dist/ej2-multicolumn-combobox.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-multicolumn-combobox.es2015.js +222 -177
  5. package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
  6. package/dist/es6/ej2-multicolumn-combobox.es5.js +263 -178
  7. package/dist/es6/ej2-multicolumn-combobox.es5.js.map +1 -1
  8. package/dist/global/ej2-multicolumn-combobox.min.js +3 -3
  9. package/dist/global/ej2-multicolumn-combobox.min.js.map +1 -1
  10. package/dist/global/index.d.ts +2 -2
  11. package/package.json +8 -8
  12. package/src/global.js +0 -2
  13. package/src/multicolumn-combobox/index.d.ts +1 -2
  14. package/src/multicolumn-combobox/index.js +1 -2
  15. package/src/multicolumn-combobox/multi-column-combo-box-model.d.ts +1 -1
  16. package/src/multicolumn-combobox/multi-column-combo-box.d.ts +5 -0
  17. package/src/multicolumn-combobox/multi-column-combo-box.js +265 -179
  18. package/styles/bds-lite.css +416 -0
  19. package/styles/bds-lite.scss +10 -0
  20. package/styles/bds.css +467 -0
  21. package/styles/bds.scss +11 -0
  22. package/styles/bootstrap-dark-lite.css +3 -0
  23. package/styles/bootstrap-dark.css +3 -0
  24. package/styles/bootstrap-lite.css +3 -0
  25. package/styles/bootstrap.css +3 -0
  26. package/styles/bootstrap4-lite.css +3 -0
  27. package/styles/bootstrap4.css +3 -0
  28. package/styles/bootstrap5-dark-lite.css +3 -0
  29. package/styles/bootstrap5-dark.css +3 -0
  30. package/styles/bootstrap5-lite.css +3 -0
  31. package/styles/bootstrap5.3-lite.css +3 -0
  32. package/styles/bootstrap5.3.css +3 -0
  33. package/styles/bootstrap5.css +3 -0
  34. package/styles/fabric-dark-lite.css +3 -0
  35. package/styles/fabric-dark.css +3 -0
  36. package/styles/fabric-lite.css +3 -0
  37. package/styles/fabric.css +3 -0
  38. package/styles/fluent-dark-lite.css +3 -0
  39. package/styles/fluent-dark.css +3 -0
  40. package/styles/fluent-lite.css +3 -0
  41. package/styles/fluent.css +3 -0
  42. package/styles/fluent2-lite.css +3 -0
  43. package/styles/fluent2.css +3 -0
  44. package/styles/highcontrast-light-lite.css +3 -0
  45. package/styles/highcontrast-light.css +3 -0
  46. package/styles/highcontrast-lite.css +4 -1
  47. package/styles/highcontrast.css +4 -1
  48. package/styles/material-dark-lite.css +3 -0
  49. package/styles/material-dark.css +3 -0
  50. package/styles/material-lite.css +3 -0
  51. package/styles/material.css +3 -0
  52. package/styles/material3-dark-lite.css +3 -0
  53. package/styles/material3-dark.css +3 -0
  54. package/styles/material3-lite.css +3 -0
  55. package/styles/material3.css +3 -0
  56. package/styles/multicolumn-combobox/_layout.scss +3 -0
  57. package/styles/multicolumn-combobox/_tailwind3-definition.scss +32 -0
  58. package/styles/multicolumn-combobox/bds.css +467 -0
  59. package/styles/multicolumn-combobox/bds.scss +11 -0
  60. package/styles/multicolumn-combobox/bootstrap-dark.css +3 -0
  61. package/styles/multicolumn-combobox/bootstrap.css +3 -0
  62. package/styles/multicolumn-combobox/bootstrap4.css +3 -0
  63. package/styles/multicolumn-combobox/bootstrap5-dark.css +3 -0
  64. package/styles/multicolumn-combobox/bootstrap5.3.css +3 -0
  65. package/styles/multicolumn-combobox/bootstrap5.css +3 -0
  66. package/styles/multicolumn-combobox/fabric-dark.css +3 -0
  67. package/styles/multicolumn-combobox/fabric.css +3 -0
  68. package/styles/multicolumn-combobox/fluent-dark.css +3 -0
  69. package/styles/multicolumn-combobox/fluent.css +3 -0
  70. package/styles/multicolumn-combobox/fluent2.css +3 -0
  71. package/styles/multicolumn-combobox/highcontrast-light.css +3 -0
  72. package/styles/multicolumn-combobox/highcontrast.css +4 -1
  73. package/styles/multicolumn-combobox/icons/_tailwind3.scss +6 -0
  74. package/styles/multicolumn-combobox/material-dark.css +3 -0
  75. package/styles/multicolumn-combobox/material.css +3 -0
  76. package/styles/multicolumn-combobox/material3-dark.css +3 -0
  77. package/styles/multicolumn-combobox/material3.css +3 -0
  78. package/styles/multicolumn-combobox/tailwind-dark.css +3 -0
  79. package/styles/multicolumn-combobox/tailwind.css +3 -0
  80. package/styles/multicolumn-combobox/tailwind3.css +375 -0
  81. package/styles/multicolumn-combobox/tailwind3.scss +11 -0
  82. package/styles/tailwind-dark-lite.css +3 -0
  83. package/styles/tailwind-dark.css +3 -0
  84. package/styles/tailwind-lite.css +3 -0
  85. package/styles/tailwind.css +3 -0
  86. package/styles/tailwind3-lite.css +324 -0
  87. package/styles/tailwind3-lite.scss +10 -0
  88. package/styles/tailwind3.css +375 -0
  89. package/styles/tailwind3.scss +11 -0
@@ -3,7 +3,6 @@ import { Input } from '@syncfusion/ej2-inputs';
3
3
  import { DataManager, Query } from '@syncfusion/ej2-data';
4
4
  import { Popup } from '@syncfusion/ej2-popups';
5
5
  import { Grid, VirtualScroll, Group, Edit, Sort, Resize } from '@syncfusion/ej2-grids';
6
- export { Edit, Group, Sort, VirtualScroll } from '@syncfusion/ej2-grids';
7
6
 
8
7
  var __extends = (undefined && undefined.__extends) || (function () {
9
8
  var extendStatics = function (d, b) {
@@ -24,6 +23,41 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
24
23
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
25
24
  return c > 3 && r && Object.defineProperty(target, key, r), r;
26
25
  };
26
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (_) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
27
61
  var DROPDOWNICON = 'e-input-group-icon e-multicolumn-list-icon e-icons';
28
62
  var CONTENT = 'e-popup-content';
29
63
  var ICONANIMATION = 'e-icon-anim';
@@ -256,7 +290,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
256
290
  moveDown: 'downarrow',
257
291
  moveUp: 'uparrow'
258
292
  };
259
- this.matchedRowEle = this.matchedContent = null;
293
+ this.matchedRowEle = this.matchedContent = this.exactMatchedContent = null;
260
294
  this.persistData();
261
295
  };
262
296
  MultiColumnComboBox.prototype.getDirective = function () {
@@ -282,7 +316,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
282
316
  };
283
317
  MultiColumnComboBox.prototype.persistData = function () {
284
318
  if (this.enablePersistence) {
285
- this.element.id = this.element.id + '_wrapper';
319
+ this.element.id += '_wrapper';
286
320
  var data = window.localStorage.getItem(this.getModuleName() + this.element.id);
287
321
  if (!(isNullOrUndefined(data) || (data === ''))) {
288
322
  this.setProperties(JSON.parse(data), true);
@@ -301,6 +335,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
301
335
  MultiColumnComboBox.prototype.renderGrid = function () {
302
336
  var _this = this;
303
337
  var gridColumns = this.getGridColumns();
338
+ var sortOrder = this.sortOrder.toString().toLowerCase();
304
339
  this.gridObj = new Grid({
305
340
  dataSource: this.dataSource,
306
341
  columns: gridColumns,
@@ -323,29 +358,25 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
323
358
  actionFailure: function (args) { _this.onActionFailure(args); },
324
359
  actionBegin: function (args) { _this.trigger('actionBegin', args); },
325
360
  actionComplete: this.handleActionComplete.bind(this),
326
- keyPressed: function (args) {
327
- if (args.key === 'Enter') {
328
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
329
- args.cancel = true;
330
- if (_this.isPopupOpen) {
331
- _this.selectedGridRow(_this.gridObj.getRows()[_this.gridObj.selectedRowIndex], args, true);
332
- _this.hidePopup(args);
333
- _this.focusIn(args);
334
- }
361
+ keyPressed: this.handleKeyPressed.bind(this),
362
+ resizing: function (args) {
363
+ if (_this.gridSettings.resizing) {
364
+ _this.gridSettings.resizing.call(_this, args);
335
365
  }
336
- if (_this.fields.groupBy) {
337
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
338
- args.cancel = true;
339
- _this.gridKeyActionHandler(args, true);
366
+ },
367
+ resizeStart: function (args) {
368
+ if (_this.gridSettings.resizeStart) {
369
+ _this.gridSettings.resizeStart.call(_this, args);
340
370
  }
341
371
  },
342
- resizing: function (args) { _this.gridSettings.resizing(args); },
343
- resizeStart: function (args) { _this.gridSettings.resizeStart(args); },
344
- resizeStop: function (args) { _this.gridSettings.resizeStop(args); }
372
+ resizeStop: function (args) {
373
+ if (_this.gridSettings.resizeStop) {
374
+ _this.gridSettings.resizeStop.call(_this, args);
375
+ }
376
+ }
345
377
  });
346
378
  this.gridEle = this.createElement('div', { id: getUniqueID('grid'), className: MULTICOLUMNGRID });
347
379
  this.updateGroupByField();
348
- var sortOrder = this.sortOrder.toString().toLowerCase();
349
380
  if (gridColumns.length > 0) {
350
381
  // Set first column as primary key to avoid PRIMARY KEY MISSING warning.
351
382
  this.gridObj.columns[0].isPrimaryKey = true;
@@ -364,25 +395,39 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
364
395
  this.popupObj.refreshPosition();
365
396
  this.gridObj.element.querySelector('.e-content').scrollTop = 0;
366
397
  };
398
+ MultiColumnComboBox.prototype.handleKeyPressed = function (args) {
399
+ if (args.key === 'Enter') {
400
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
401
+ args.cancel = true;
402
+ if (this.isPopupOpen) {
403
+ this.selectedGridRow(this.gridObj.getRows()[this.gridObj.selectedRowIndex], args, true);
404
+ this.hidePopup(args);
405
+ this.focusIn(args);
406
+ }
407
+ }
408
+ if (this.fields.groupBy) {
409
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
410
+ args.cancel = true;
411
+ this.gridKeyActionHandler(args, true);
412
+ }
413
+ };
367
414
  /* eslint-disable @typescript-eslint/no-explicit-any */
368
415
  MultiColumnComboBox.prototype.isRowMatching = function (data, selectedValue, selectedText) {
369
416
  var values = Object.values(data).map(String);
370
- var isRowPresent = values.includes(selectedValue) && values.includes(selectedText);
371
- return isRowPresent;
417
+ return values.includes(selectedValue) && values.includes(selectedText);
372
418
  };
373
419
  MultiColumnComboBox.prototype.updateRowSelection = function (args) {
374
420
  var _this = this;
375
421
  if (args) {
376
422
  var dataRows = args.rows;
377
423
  dataRows.forEach(function (row) {
378
- var data = row.data;
379
- var index = row.index;
380
- _this.selectDataRow(data, index);
424
+ _this.selectDataRow(row.data, row.index);
381
425
  });
382
426
  }
383
427
  };
384
428
  MultiColumnComboBox.prototype.selectDataRow = function (data, index) {
385
- var isPresent = this.isRowMatching(data, this.value ? this.value.toString() : '', this.text ? this.text.toString() : '');
429
+ var isPresent = this.isRowMatching(data, this.value ?
430
+ this.value.toString() : '', this.text ? this.text.toString() : '');
386
431
  if (isPresent) {
387
432
  this.gridObj.selectRow(index);
388
433
  var prevOnChange = this.isProtectedOnChange;
@@ -398,30 +443,28 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
398
443
  return Object.keys(obj).every(function (key) { return item[key] === obj[key]; });
399
444
  });
400
445
  };
401
- /* eslint-enable @typescript-eslint/no-explicit-any */
402
446
  MultiColumnComboBox.prototype.getGridColumns = function () {
403
447
  var _this = this;
404
- return this.columns.map(function (column) {
405
- var changeType;
406
- if (column.displayAsCheckBox && !column.format) {
407
- changeType = 'boolean';
408
- }
409
- return {
410
- field: column.field,
411
- headerText: column.header,
412
- width: column.width,
413
- textAlign: column.textAlign === '' && _this.enableRtl ? 'Right' : column.textAlign,
414
- format: column.format,
415
- displayAsCheckBox: column.displayAsCheckBox,
416
- template: column.template,
417
- headerTemplate: column.headerTemplate,
418
- customAttributes: column.customAttributes,
419
- type: changeType
420
- };
448
+ return this.columns.map(function (_a) {
449
+ var field = _a.field, header = _a.header, width = _a.width, textAlign = _a.textAlign, format = _a.format, displayAsCheckBox = _a.displayAsCheckBox, template = _a.template, headerTemplate = _a.headerTemplate, customAttributes = _a.customAttributes;
450
+ return ({
451
+ field: field,
452
+ headerText: header,
453
+ width: width,
454
+ textAlign: textAlign.toString() === '' && _this.enableRtl ? 'Right' : textAlign,
455
+ format: format,
456
+ displayAsCheckBox: displayAsCheckBox,
457
+ template: template,
458
+ headerTemplate: headerTemplate,
459
+ customAttributes: customAttributes,
460
+ type: displayAsCheckBox && !format ? 'boolean' : undefined
461
+ });
421
462
  });
422
463
  };
423
464
  MultiColumnComboBox.prototype.updateGroupByField = function () {
424
- if (this.fields.groupBy !== '' && !isNullOrUndefined(this.fields.groupBy)) {
465
+ var groupByField = this.fields.groupBy;
466
+ var isGroupByValid = groupByField !== '' && !isNullOrUndefined(groupByField);
467
+ if (isGroupByValid) {
425
468
  if (this.sortType.toString().toLowerCase() !== 'multiplecolumns') {
426
469
  this.gridEle.classList.add('e-multicolumn-group');
427
470
  }
@@ -430,10 +473,11 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
430
473
  this.gridObj.allowGrouping = true;
431
474
  this.gridObj.groupSettings = {
432
475
  showDropArea: false,
433
- columns: [this.fields.groupBy],
434
- captionTemplate: (this.groupTemplate && this.fields.groupBy !== '' && !isNullOrUndefined(this.fields.groupBy))
435
- ? this.groupTemplate : '${key}'
476
+ columns: [groupByField]
436
477
  };
478
+ if (this.groupTemplate && isGroupByValid) {
479
+ this.gridObj.groupSettings.captionTemplate = this.groupTemplate;
480
+ }
437
481
  if (this.isVue) {
438
482
  this.gridObj.isVue = this.isVue;
439
483
  }
@@ -443,12 +487,13 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
443
487
  MultiColumnComboBox.prototype.onDataBound = function () {
444
488
  var dataCount = this.dataSource.length;
445
489
  var popupChild = this.popupDiv.querySelector('.' + MULTICOLUMNGRID);
490
+ var hasNoDataClass = this.popupDiv.classList.contains(NODATA);
446
491
  if (dataCount <= 0 && popupChild) {
447
492
  this.l10nUpdate();
448
493
  this.popupDiv.removeChild(this.gridEle);
449
494
  addClass([this.popupDiv], [NODATA]);
450
495
  }
451
- else if (this.popupDiv.classList.contains(NODATA) && dataCount >= 1) {
496
+ else if (hasNoDataClass && dataCount >= 1) {
452
497
  removeClass([this.popupDiv], [NODATA]);
453
498
  var noRecordEle = this.popupDiv.querySelector('.e-no-records');
454
499
  if (noRecordEle) {
@@ -456,8 +501,9 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
456
501
  }
457
502
  }
458
503
  if (this.isInitialRender) {
459
- var rowHeight = !this.popupDiv.classList.contains(NODATA) ? this.popupDiv.querySelector('.e-gridcontent tr') ?
460
- this.popupDiv.querySelector('.e-gridcontent tr').getBoundingClientRect().height : 0 :
504
+ var gridContentRow = this.popupDiv.querySelector('.e-gridcontent tr');
505
+ var rowHeight = !hasNoDataClass ? gridContentRow ?
506
+ gridContentRow.getBoundingClientRect().height : 0 :
461
507
  this.popupDiv.getBoundingClientRect().height;
462
508
  this.popupRowHeight = rowHeight;
463
509
  this.popupObj.hide();
@@ -476,6 +522,16 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
476
522
  addClass([this.popupDiv], [NODATA]);
477
523
  };
478
524
  MultiColumnComboBox.prototype.renderInput = function () {
525
+ var allowedAttributes = ['aria-expanded', 'aria-readOnly', 'aria-disabled', 'autocomplete',
526
+ 'autocapitalize', 'spellcheck', 'tabindex'];
527
+ var setAttributes = function (element, attributes) {
528
+ for (var key in attributes) {
529
+ // eslint-disable-next-line no-prototype-builtins
530
+ if (attributes.hasOwnProperty(key) && allowedAttributes.indexOf(key) !== -1 && isNullOrUndefined(element.getAttribute(key))) {
531
+ element.setAttribute(key, attributes[key]);
532
+ }
533
+ }
534
+ };
479
535
  if (this.element.tagName === 'INPUT') {
480
536
  this.inputEle = this.element;
481
537
  if (isNullOrUndefined(this.inputEle.getAttribute('role'))) {
@@ -484,13 +540,15 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
484
540
  if (isNullOrUndefined(this.inputEle.getAttribute('type'))) {
485
541
  this.inputEle.setAttribute('type', 'text');
486
542
  }
487
- this.inputEle.setAttribute('aria-expanded', 'false');
488
- this.inputEle.setAttribute('aria-readOnly', this.readonly.toString());
489
- this.inputEle.setAttribute('aria-disabled', this.disabled.toString());
490
- this.inputEle.setAttribute('autocomplete', 'off');
491
- this.inputEle.setAttribute('autocapitalize', 'off');
492
- this.inputEle.setAttribute('spellcheck', 'false');
493
- this.inputEle.setAttribute('tabindex', '0');
543
+ setAttributes(this.inputEle, {
544
+ 'aria-expanded': 'false',
545
+ 'aria-readOnly': this.readonly.toString(),
546
+ 'aria-disabled': this.disabled.toString(),
547
+ autocomplete: 'off',
548
+ autocapitalize: 'off',
549
+ spellcheck: 'false',
550
+ tabindex: '0'
551
+ });
494
552
  }
495
553
  else {
496
554
  this.inputEle = this.createElement('input', { attrs: { role: 'textbox', type: 'text' } });
@@ -520,49 +578,53 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
520
578
  this.initValue(null, null, true);
521
579
  }
522
580
  };
523
- /* To calculate the width when change via set model */
524
581
  MultiColumnComboBox.prototype.setElementWidth = function (inputWidth) {
582
+ if (isNullOrUndefined(inputWidth)) {
583
+ return;
584
+ }
525
585
  var ddElement = this.inputWrapper;
526
- if (!isNullOrUndefined(inputWidth)) {
527
- if (typeof inputWidth === 'number') {
528
- ddElement.style.width = formatUnit(inputWidth);
529
- }
530
- else if (typeof inputWidth === 'string') {
531
- ddElement.style.width = (inputWidth.match(/px|%|em/)) ? (inputWidth) : (formatUnit(inputWidth));
532
- }
586
+ if (typeof inputWidth === 'number') {
587
+ ddElement.style.width = formatUnit(inputWidth);
588
+ }
589
+ else if (typeof inputWidth === 'string') {
590
+ ddElement.style.width = inputWidth.match(/px|%|em/) ? inputWidth : formatUnit(inputWidth);
533
591
  }
534
592
  };
535
593
  MultiColumnComboBox.prototype.setHTMLAttributes = function () {
536
- if (Object.keys(this.htmlAttributes).length) {
537
- for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
594
+ var htmlAttributes = this.htmlAttributes;
595
+ var inputEle = this.inputEle;
596
+ if (Object.keys(htmlAttributes).length) {
597
+ for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
538
598
  var htmlAttr = _a[_i];
539
- if (htmlAttr === 'class') {
540
- this.inputWrapper.classList.add(this.htmlAttributes["" + htmlAttr]);
541
- }
542
- else if (htmlAttr === 'disabled') {
543
- this.setProperties({ enabled: false }, true);
544
- this.setEnable();
545
- }
546
- else if (htmlAttr === 'readonly') {
547
- this.setProperties({ readonly: true }, true);
548
- this.dataBind();
549
- }
550
- else if (htmlAttr === 'style') {
551
- this.inputWrapper.setAttribute('style', this.htmlAttributes["" + htmlAttr]);
552
- }
553
- else {
554
- var defaultAttr = ['title', 'id', 'placeholder',
555
- 'role', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
556
- if (defaultAttr.indexOf(htmlAttr) > -1) {
557
- if (htmlAttr === 'placeholder') {
558
- Input.setPlaceholder(this.htmlAttributes["" + htmlAttr], this.inputEle);
599
+ switch (htmlAttr) {
600
+ case 'class':
601
+ this.inputWrapper.classList.add(htmlAttributes[htmlAttr]);
602
+ break;
603
+ case 'disabled':
604
+ this.setProperties({ enabled: false }, true);
605
+ this.setEnable();
606
+ break;
607
+ case 'readonly':
608
+ this.setProperties({ readonly: true }, true);
609
+ this.dataBind();
610
+ break;
611
+ case 'style':
612
+ this.inputWrapper.setAttribute('style', htmlAttributes[htmlAttr]);
613
+ break;
614
+ default: {
615
+ var defaultAttr = ['title', 'id', 'placeholder', 'role', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
616
+ if (defaultAttr.indexOf(htmlAttr) > -1) {
617
+ if (htmlAttr === 'placeholder') {
618
+ Input.setPlaceholder(htmlAttributes[htmlAttr], inputEle);
619
+ }
620
+ else {
621
+ inputEle.setAttribute(htmlAttr, htmlAttributes[htmlAttr]);
622
+ }
559
623
  }
560
624
  else {
561
- this.inputEle.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
625
+ inputEle.setAttribute(htmlAttr, htmlAttributes[htmlAttr]);
562
626
  }
563
- }
564
- else {
565
- this.inputEle.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
627
+ break;
566
628
  }
567
629
  }
568
630
  }
@@ -573,8 +635,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
573
635
  Input.setEnabled(!this.disabled, this.inputEle);
574
636
  if (!this.disabled) {
575
637
  removeClass([this.inputWrapper], DISABLED);
576
- this.inputEle.setAttribute('aria-disabled', 'false');
577
- this.inputWrapper.setAttribute('aria-disabled', 'false');
638
+ this.setAriaDisabled('false');
578
639
  }
579
640
  else {
580
641
  if (this.isPopupOpen) {
@@ -584,10 +645,13 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
584
645
  if (this.inputWrapper && this.inputWrapper.classList.contains(INPUTFOCUS)) {
585
646
  removeClass([this.inputWrapper], [INPUTFOCUS]);
586
647
  }
587
- this.inputEle.setAttribute('aria-disabled', 'true');
588
- this.inputWrapper.setAttribute('aria-disabled', 'true');
648
+ this.setAriaDisabled('true');
589
649
  }
590
650
  };
651
+ MultiColumnComboBox.prototype.setAriaDisabled = function (value) {
652
+ this.inputEle.setAttribute('aria-disabled', value);
653
+ this.inputWrapper.setAttribute('aria-disabled', value);
654
+ };
591
655
  MultiColumnComboBox.prototype.initValue = function (isRerender, isValue, isInitial) {
592
656
  var _this = this;
593
657
  var prevItemData = this.gridObj.getSelectedRecords()[0];
@@ -849,7 +913,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
849
913
  MultiColumnComboBox.prototype.getSize = function (ispopupWidth) {
850
914
  var currentDimension = ispopupWidth ? this.popupWidth : this.popupHeight;
851
915
  var size = formatUnit(currentDimension);
852
- if (size.indexOf('%') > -1) {
916
+ if (size.includes('%')) {
853
917
  var dimensionValue = ispopupWidth ? this.inputWrapper.offsetWidth : document.documentElement.clientHeight;
854
918
  size = (dimensionValue * parseFloat(size) / 100).toString() + 'px';
855
919
  }
@@ -901,8 +965,8 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
901
965
  this.previousItemElement = eventArgs.itemElement;
902
966
  var prevOnChange = this.isProtectedOnChange;
903
967
  this.isProtectedOnChange = true;
904
- this.text = text ? text : this.text;
905
- this.value = value ? value : this.value;
968
+ this.text = text || this.text;
969
+ this.value = value || this.value;
906
970
  this.index = !isNullOrUndefined(index) ? index : this.index;
907
971
  this.isProtectedOnChange = prevOnChange;
908
972
  if (!isInitial) {
@@ -945,44 +1009,56 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
945
1009
  this.updateInputValue(e.target.value);
946
1010
  };
947
1011
  MultiColumnComboBox.prototype.updateInputValue = function (inputValue) {
948
- var _this = this;
949
- var data;
950
- if (this.dataSource instanceof DataManager) {
951
- var query = new Query();
952
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
953
- this.dataSource.executeQuery(query).then(function (result) {
954
- var totaldata = result.result;
955
- data = totaldata.filter(function (item) {
956
- return item[_this.fields.text].toString().toLowerCase().startsWith(inputValue.toLowerCase());
957
- });
958
- _this.selectFilteredRows(data);
959
- });
960
- }
961
- else if (Array.isArray(this.dataSource)) {
962
- data = this.dataSource.filter(function (item) {
963
- return item[_this.fields.text].toString().toLowerCase().startsWith(inputValue.toLowerCase());
1012
+ return __awaiter(this, void 0, void 0, function () {
1013
+ var _a, _b, data, exactData, query, result, totaldata;
1014
+ return __generator(this, function (_c) {
1015
+ switch (_c.label) {
1016
+ case 0:
1017
+ if (!(this.dataSource instanceof DataManager)) return [3 /*break*/, 2];
1018
+ query = new Query();
1019
+ return [4 /*yield*/, this.dataSource.executeQuery(query)];
1020
+ case 1:
1021
+ result = _c.sent();
1022
+ totaldata = result.result;
1023
+ (_a = this.filterDatas(totaldata, inputValue), data = _a.data, exactData = _a.exactData);
1024
+ return [3 /*break*/, 3];
1025
+ case 2:
1026
+ if (Array.isArray(this.dataSource)) {
1027
+ (_b = this.filterDatas(this.dataSource, inputValue), data = _b.data, exactData = _b.exactData);
1028
+ }
1029
+ _c.label = 3;
1030
+ case 3:
1031
+ this.selectFilteredRows(data, exactData);
1032
+ return [2 /*return*/];
1033
+ }
964
1034
  });
965
- this.selectFilteredRows(data);
966
- }
1035
+ });
967
1036
  };
968
- MultiColumnComboBox.prototype.selectFilteredRows = function (data) {
969
- if (data.length > 0) {
970
- this.matchedContent = data[0];
971
- }
972
- else {
973
- this.matchedContent = null;
974
- }
975
- if (this.matchedContent) {
976
- var selectedIndex = this.findIndex(this.gridObj.currentViewData, this.matchedContent);
977
- this.matchedRowEle = this.gridObj.getRowByIndex(selectedIndex);
978
- }
979
- else {
980
- this.matchedRowEle = null;
1037
+ MultiColumnComboBox.prototype.filterDatas = function (dataSource, inputValue) {
1038
+ var _this = this;
1039
+ var data = dataSource.filter(function (item) {
1040
+ return item[_this.fields.text].toString().toLowerCase().startsWith(inputValue.toLowerCase());
1041
+ });
1042
+ var exactData = dataSource.filter(function (item) {
1043
+ return item[_this.fields.text].toString() === inputValue;
1044
+ });
1045
+ return { data: data, exactData: exactData };
1046
+ };
1047
+ MultiColumnComboBox.prototype.selectFilteredRows = function (data, exactData) {
1048
+ if (data.length <= 0) {
1049
+ this.matchedRowEle = this.matchedContent = this.exactMatchedContent = null;
1050
+ return;
981
1051
  }
1052
+ this.matchedContent = data[0];
1053
+ this.exactMatchedContent = exactData[0];
1054
+ var selectedIndex = this.findIndex(this.gridObj.currentViewData, this.matchedContent);
1055
+ this.matchedRowEle = this.gridObj.getRowByIndex(selectedIndex);
982
1056
  };
983
1057
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
984
1058
  MultiColumnComboBox.prototype.filterAction = function (dataSource, inputValue, query, fields) {
985
1059
  var _this = this;
1060
+ var isQuery = query || new Query();
1061
+ var filterType = this.filterType.toString().toLowerCase();
986
1062
  if (isNullOrUndefined(query) && isNullOrUndefined(fields)) {
987
1063
  this.updateGridDataSource(dataSource);
988
1064
  }
@@ -999,14 +1075,12 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
999
1075
  }
1000
1076
  }
1001
1077
  else {
1002
- var isQuery = query || new Query();
1003
1078
  if (dataSource instanceof DataManager) {
1004
1079
  this.filteringHandler(dataSource, inputValue, isQuery, fields);
1005
1080
  }
1006
1081
  else if (Array.isArray(dataSource)) {
1007
- var filterType_1 = this.filterType.toString().toLowerCase();
1008
1082
  var filteredData = dataSource.filter(function (item) {
1009
- return _this.filterData(item, filterType_1, inputValue, fields);
1083
+ return _this.filterData(item, filterType, inputValue, fields);
1010
1084
  });
1011
1085
  this.updateGridDataSource(filteredData);
1012
1086
  }
@@ -1133,28 +1207,36 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1133
1207
  }
1134
1208
  };
1135
1209
  MultiColumnComboBox.prototype.onDocumentClick = function (e) {
1210
+ var target = e.target;
1136
1211
  if (this.disabled || this.readonly || !this.isPopupOpen) {
1137
- if (!(e.target.closest('.e-multicolumn-list'))) {
1212
+ if (!target.closest('.e-multicolumn-list')) {
1138
1213
  this.focusOut();
1139
1214
  }
1140
1215
  return;
1141
1216
  }
1142
- var target = e.target;
1143
1217
  if ((target.classList.contains('e-multicolumn-list-icon') || closest(target, '.e-popup'))) {
1144
1218
  e.preventDefault();
1145
1219
  }
1146
1220
  else {
1147
1221
  if (!target.classList.contains('e-multicolumncombobox') && !target.classList.contains('e-clear-icon')) {
1222
+ if (!isNullOrUndefined(this.text)) {
1223
+ this.updateInputValue(this.text);
1224
+ }
1148
1225
  this.updateValuesOnInput(e);
1149
1226
  }
1150
1227
  }
1151
1228
  };
1152
- MultiColumnComboBox.prototype.updateValuesOnInput = function (mouseEvent, keyEvent, isClearValues) {
1229
+ MultiColumnComboBox.prototype.updateValuesOnInput = function (mouseEvent, keyEvent, isClearValues, isKeyDown) {
1153
1230
  var _this = this;
1154
1231
  if (isClearValues === void 0) { isClearValues = false; }
1232
+ if (isKeyDown === void 0) { isKeyDown = false; }
1155
1233
  var e = mouseEvent ? mouseEvent : keyEvent;
1234
+ var val = isKeyDown ? this.matchedContent : this.exactMatchedContent;
1235
+ if (!val) {
1236
+ this.inputEle.value = this.value = this.index = this.text = null;
1237
+ }
1156
1238
  this.hidePopup(e);
1157
- if (this.matchedRowEle && !isClearValues) {
1239
+ if (this.matchedRowEle && !isClearValues && val) {
1158
1240
  var prevOnChange = this.isProtectedOnChange;
1159
1241
  this.isProtectedOnChange = true;
1160
1242
  setTimeout(function () {
@@ -1238,7 +1320,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1238
1320
  this.updateSelectedItem(e, true, true);
1239
1321
  break;
1240
1322
  case 'enter':
1241
- this.updateValuesOnInput(null, e);
1323
+ this.updateValuesOnInput(null, e, false, true);
1242
1324
  this.focusIn(e);
1243
1325
  break;
1244
1326
  case 'home':
@@ -1248,31 +1330,19 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1248
1330
  }
1249
1331
  };
1250
1332
  MultiColumnComboBox.prototype.gridKeyActionHandler = function (e, isGroup) {
1333
+ var keyActionMap = {
1334
+ 'ArrowDown': 'moveDown',
1335
+ 'ArrowUp': 'moveUp',
1336
+ 'End': 'end',
1337
+ 'Home': 'home',
1338
+ 'Tab': 'tab',
1339
+ 'Escape': 'escape',
1340
+ 'Shift+Tab': 'shiftTab',
1341
+ 'Alt+ArrowUp': 'altUp'
1342
+ };
1251
1343
  if (isGroup) {
1252
- if (e.key === 'ArrowDown') {
1253
- e.action = 'moveDown';
1254
- }
1255
- else if (e.key === 'ArrowUp') {
1256
- e.action = 'moveUp';
1257
- }
1258
- else if (e.key === 'End') {
1259
- e.action = 'end';
1260
- }
1261
- else if (e.key === 'Home') {
1262
- e.action = 'home';
1263
- }
1264
- else if (e.key === 'Tab') {
1265
- e.action = 'tab';
1266
- }
1267
- else if (e.key === 'Escape') {
1268
- e.action = 'escape';
1269
- }
1270
- if (e.shiftKey && e.key === 'Tab') {
1271
- e.action = 'shiftTab';
1272
- }
1273
- if (e.altKey && e.key === 'ArrowUp') {
1274
- e.action = 'altUp';
1275
- }
1344
+ var key = "" + (e.altKey ? 'Alt+' : '') + (e.shiftKey ? 'Shift+' : '') + e.key;
1345
+ e.action = keyActionMap[key] || e.action;
1276
1346
  }
1277
1347
  switch (e.action) {
1278
1348
  case 'escape':
@@ -1340,6 +1410,25 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1340
1410
  clearIconEle.style.display = this.inputEle.value === '' ? 'none' : 'flex';
1341
1411
  }
1342
1412
  };
1413
+ MultiColumnComboBox.prototype.updateDynamicDataSource = function (newDataSource, oldDataSource) {
1414
+ if (this.gridObj) {
1415
+ var dataLength_1;
1416
+ this.gridObj.dataSource = newDataSource;
1417
+ var isRemoteData = oldDataSource instanceof DataManager;
1418
+ if (isRemoteData) {
1419
+ oldDataSource.executeQuery(new Query()).then(function (e) {
1420
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1421
+ dataLength_1 = e.result.length;
1422
+ });
1423
+ }
1424
+ else {
1425
+ dataLength_1 = oldDataSource.length;
1426
+ }
1427
+ if (dataLength_1 === 0) {
1428
+ this.popupDiv.appendChild(this.gridEle);
1429
+ }
1430
+ }
1431
+ };
1343
1432
  /**
1344
1433
  * Sets the focus to the component for interaction.component for interaction.
1345
1434
  *
@@ -1421,11 +1510,12 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1421
1510
  var contentEle = _this.gridObj.getContent();
1422
1511
  if (contentEle) {
1423
1512
  var activeRow = contentEle.querySelector('.e-rowcell.e-active');
1513
+ var firstRow = contentEle.querySelector('.e-row');
1424
1514
  if (activeRow) {
1425
1515
  _this.inputEle.setAttribute('aria-activedescendant', activeRow.parentElement.getAttribute('data-uid'));
1426
1516
  }
1427
- else if (contentEle.querySelector('.e-row')) {
1428
- _this.inputEle.setAttribute('aria-activedescendant', contentEle.querySelector('.e-row').getAttribute('data-uid'));
1517
+ else if (firstRow) {
1518
+ _this.inputEle.setAttribute('aria-activedescendant', firstRow.getAttribute('data-uid'));
1429
1519
  }
1430
1520
  }
1431
1521
  if (!isNullOrUndefined(_this.dataSource) && _this.dataSource instanceof DataManager) {
@@ -1448,24 +1538,21 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1448
1538
  var _this = this;
1449
1539
  var animModel = { name: 'FadeOut', duration: 100 };
1450
1540
  var eventArgs = { popup: this.popupObj, event: e || null, cancel: false, animation: animModel };
1541
+ var target = e ? e.target : null;
1451
1542
  this.trigger('close', eventArgs, function (eventArgs) {
1452
1543
  if (!eventArgs.cancel) {
1453
1544
  _this.isPopupOpen = false;
1454
1545
  removeClass([_this.inputWrapper], [ICONANIMATION]);
1455
1546
  attributes(_this.inputEle, { 'aria-expanded': 'false' });
1456
1547
  _this.popupObj.hide(new Animation(eventArgs.animation));
1457
- _this.inputEle.value = _this.text ? _this.text.toString() : '';
1458
- if (e) {
1459
- var target = e.target;
1460
- if (target && (target.classList.contains('e-multicolumn-list-icon') || target.classList.contains('e-rowcell'))) {
1461
- if (!_this.value) {
1462
- _this.gridObj.refreshColumns();
1463
- }
1464
- setTimeout(function () { _this.focusIn(e); });
1465
- }
1466
- else {
1467
- _this.focusOut();
1548
+ if (target && (target.classList.contains('e-multicolumn-list-icon') || target.classList.contains('e-rowcell'))) {
1549
+ if (!_this.value) {
1550
+ _this.gridObj.refreshColumns();
1468
1551
  }
1552
+ setTimeout(function () { _this.focusIn(e); });
1553
+ }
1554
+ else {
1555
+ _this.focusOut();
1469
1556
  }
1470
1557
  _this.inputEle.removeAttribute('aria-owns');
1471
1558
  _this.inputEle.removeAttribute('aria-activedescendant');
@@ -1673,9 +1760,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1673
1760
  }
1674
1761
  break;
1675
1762
  case 'dataSource':
1676
- if (this.gridObj) {
1677
- this.gridObj.dataSource = newProp.dataSource;
1678
- }
1763
+ this.updateDynamicDataSource(newProp.dataSource, oldProp.dataSource);
1679
1764
  break;
1680
1765
  case 'query':
1681
1766
  if (this.gridObj) {