@syncfusion/ej2-multicolumn-combobox 28.2.6 → 28.2.9

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 (76) hide show
  1. package/dist/ej2-multicolumn-combobox.umd.min.js +2 -2
  2. package/dist/ej2-multicolumn-combobox.umd.min.js.map +1 -1
  3. package/dist/es6/ej2-multicolumn-combobox.es2015.js +59 -14
  4. package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
  5. package/dist/es6/ej2-multicolumn-combobox.es5.js +60 -14
  6. package/dist/es6/ej2-multicolumn-combobox.es5.js.map +1 -1
  7. package/dist/global/ej2-multicolumn-combobox.min.js +2 -2
  8. package/dist/global/ej2-multicolumn-combobox.min.js.map +1 -1
  9. package/dist/global/index.d.ts +1 -1
  10. package/package.json +7 -7
  11. package/src/multicolumn-combobox/multi-column-combo-box.d.ts +2 -0
  12. package/src/multicolumn-combobox/multi-column-combo-box.js +59 -13
  13. package/styles/bds-lite.css +8 -0
  14. package/styles/bds.css +8 -0
  15. package/styles/bootstrap-dark-lite.css +8 -0
  16. package/styles/bootstrap-dark.css +8 -0
  17. package/styles/bootstrap-lite.css +8 -0
  18. package/styles/bootstrap.css +8 -0
  19. package/styles/bootstrap4-lite.css +8 -0
  20. package/styles/bootstrap4.css +8 -0
  21. package/styles/bootstrap5-dark-lite.css +8 -0
  22. package/styles/bootstrap5-dark.css +8 -0
  23. package/styles/bootstrap5-lite.css +8 -0
  24. package/styles/bootstrap5.3-lite.css +8 -0
  25. package/styles/bootstrap5.3.css +8 -0
  26. package/styles/bootstrap5.css +8 -0
  27. package/styles/fabric-dark-lite.css +8 -0
  28. package/styles/fabric-dark.css +8 -0
  29. package/styles/fabric-lite.css +8 -0
  30. package/styles/fabric.css +8 -0
  31. package/styles/fluent-dark-lite.css +8 -0
  32. package/styles/fluent-dark.css +8 -0
  33. package/styles/fluent-lite.css +8 -0
  34. package/styles/fluent.css +8 -0
  35. package/styles/fluent2-lite.css +8 -0
  36. package/styles/fluent2.css +8 -0
  37. package/styles/highcontrast-light-lite.css +8 -0
  38. package/styles/highcontrast-light.css +8 -0
  39. package/styles/highcontrast-lite.css +8 -0
  40. package/styles/highcontrast.css +8 -0
  41. package/styles/material-dark-lite.css +8 -0
  42. package/styles/material-dark.css +8 -0
  43. package/styles/material-lite.css +8 -0
  44. package/styles/material.css +8 -0
  45. package/styles/material3-dark-lite.css +8 -0
  46. package/styles/material3-dark.css +8 -0
  47. package/styles/material3-lite.css +8 -0
  48. package/styles/material3.css +8 -0
  49. package/styles/multicolumn-combobox/_layout.scss +7 -0
  50. package/styles/multicolumn-combobox/bds.css +8 -0
  51. package/styles/multicolumn-combobox/bootstrap-dark.css +8 -0
  52. package/styles/multicolumn-combobox/bootstrap.css +8 -0
  53. package/styles/multicolumn-combobox/bootstrap4.css +8 -0
  54. package/styles/multicolumn-combobox/bootstrap5-dark.css +8 -0
  55. package/styles/multicolumn-combobox/bootstrap5.3.css +8 -0
  56. package/styles/multicolumn-combobox/bootstrap5.css +8 -0
  57. package/styles/multicolumn-combobox/fabric-dark.css +8 -0
  58. package/styles/multicolumn-combobox/fabric.css +8 -0
  59. package/styles/multicolumn-combobox/fluent-dark.css +8 -0
  60. package/styles/multicolumn-combobox/fluent.css +8 -0
  61. package/styles/multicolumn-combobox/fluent2.css +8 -0
  62. package/styles/multicolumn-combobox/highcontrast-light.css +8 -0
  63. package/styles/multicolumn-combobox/highcontrast.css +8 -0
  64. package/styles/multicolumn-combobox/material-dark.css +8 -0
  65. package/styles/multicolumn-combobox/material.css +8 -0
  66. package/styles/multicolumn-combobox/material3-dark.css +8 -0
  67. package/styles/multicolumn-combobox/material3.css +8 -0
  68. package/styles/multicolumn-combobox/tailwind-dark.css +8 -0
  69. package/styles/multicolumn-combobox/tailwind.css +8 -0
  70. package/styles/multicolumn-combobox/tailwind3.css +8 -0
  71. package/styles/tailwind-dark-lite.css +8 -0
  72. package/styles/tailwind-dark.css +8 -0
  73. package/styles/tailwind-lite.css +8 -0
  74. package/styles/tailwind.css +8 -0
  75. package/styles/tailwind3-lite.css +8 -0
  76. package/styles/tailwind3.css +8 -0
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty, Event, getUniqueID, isNullOrUndefined, addClass, removeClass, formatUnit, getValue, attributes, prepend, Browser, append, L10n, select, compile, EventHandler, KeyboardEvents, closest, Animation, detach, Complex, Collection, NotifyPropertyChanges, Component } from '@syncfusion/ej2-base';
1
+ import { Property, ChildProperty, Event, getUniqueID, isNullOrUndefined, addClass, removeClass, prepend, formatUnit, getValue, attributes, Browser, append, L10n, select, compile, EventHandler, KeyboardEvents, closest, Animation, detach, Complex, Collection, NotifyPropertyChanges, Component } from '@syncfusion/ej2-base';
2
2
  import { Input } from '@syncfusion/ej2-inputs';
3
3
  import { DataManager, Query } from '@syncfusion/ej2-data';
4
4
  import { Popup } from '@syncfusion/ej2-popups';
@@ -65,6 +65,7 @@ var NODATA = 'e-nodata';
65
65
  var DISABLED = 'e-disabled';
66
66
  var INPUTFOCUS = 'e-input-focus';
67
67
  var MULTICOLUMNLIST = 'e-multicolumn-list';
68
+ var HIDDENELEMENT = 'e-multicolumn-list-hidden';
68
69
  var MULTICOLUMNGRID = 'e-multicolumn-grid';
69
70
  var MultiColumnGrid = /** @__PURE__ @class */ (function () {
70
71
  function MultiColumnGrid() {
@@ -332,6 +333,24 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
332
333
  this.renderPopup();
333
334
  this.wireEvents();
334
335
  };
336
+ MultiColumnComboBox.prototype.setHiddenValue = function () {
337
+ if (isNullOrUndefined(this.value)) {
338
+ this.hiddenElement.innerHTML = '';
339
+ return;
340
+ }
341
+ var existingOption = this.hiddenElement.querySelector('option');
342
+ if (!isNullOrUndefined(existingOption)) {
343
+ existingOption.textContent = this.text;
344
+ existingOption.setAttribute('value', this.value.toString());
345
+ }
346
+ else if (!isNullOrUndefined(this.hiddenElement)) {
347
+ var newOption = document.createElement('option');
348
+ newOption.text = this.text;
349
+ newOption.setAttribute('value', this.value.toString());
350
+ newOption.setAttribute('selected', '');
351
+ this.hiddenElement.appendChild(newOption);
352
+ }
353
+ };
335
354
  MultiColumnComboBox.prototype.renderGrid = function () {
336
355
  var _this = this;
337
356
  var gridColumns = this.getGridColumns();
@@ -388,10 +407,23 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
388
407
  this.gridObj.appendTo(this.gridEle);
389
408
  };
390
409
  MultiColumnComboBox.prototype.handleActionComplete = function (args) {
410
+ var _this = this;
391
411
  this.trigger('actionComplete', args);
392
412
  if (args.requestType === 'sorting') {
393
413
  this.updateRowSelection(args);
394
414
  }
415
+ if (Array.isArray(args.rows) && this.isDataFiltered) {
416
+ var rows = args.rows;
417
+ var rowHeight_1 = 0;
418
+ rows.forEach(function (row) {
419
+ var rowElement = _this.gridObj.getRowElementByUID(row.uid);
420
+ if (rowElement) {
421
+ rowHeight_1 += rowElement.getBoundingClientRect().height;
422
+ }
423
+ });
424
+ this.popupRowHeight = rowHeight_1 || parseFloat(this.popupHeight);
425
+ this.updateGridHeight(true, true);
426
+ }
395
427
  this.popupObj.refreshPosition();
396
428
  this.gridObj.element.querySelector('.e-content').scrollTop = 0;
397
429
  };
@@ -585,6 +617,20 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
585
617
  this.inputWrapper = this.inputObj.container;
586
618
  this.inputWrapper.classList.add(MULTICOLUMNLIST);
587
619
  this.inputWrapper.setAttribute('spellcheck', 'false');
620
+ this.hiddenElement = this.createElement('select', {
621
+ attrs: {
622
+ 'aria-hidden': 'true',
623
+ 'tabindex': '-1',
624
+ 'class': HIDDENELEMENT
625
+ }
626
+ });
627
+ prepend([this.hiddenElement], this.inputWrapper);
628
+ var name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
629
+ this.hiddenElement.setAttribute('name', name);
630
+ this.inputEle.removeAttribute('name');
631
+ if (!this.hiddenElement.hasAttribute('aria-label')) {
632
+ this.hiddenElement.setAttribute('aria-label', this.getModuleName());
633
+ }
588
634
  if (this.element.tagName === this.getDirective()) {
589
635
  this.element.appendChild(this.inputWrapper);
590
636
  }
@@ -628,7 +674,11 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
628
674
  break;
629
675
  default: {
630
676
  var defaultAttr = ['title', 'id', 'placeholder', 'role', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
631
- if (defaultAttr.indexOf(htmlAttr) > -1) {
677
+ var validateAttr = ['name', 'required'];
678
+ if (validateAttr.indexOf(htmlAttr) > -1 || htmlAttr.indexOf('data') === 0) {
679
+ this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
680
+ }
681
+ else if (defaultAttr.indexOf(htmlAttr) > -1) {
632
682
  if (htmlAttr === 'placeholder') {
633
683
  Input.setPlaceholder(htmlAttributes[htmlAttr], inputEle);
634
684
  }
@@ -803,7 +853,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
803
853
  var popupHeight = this.getSize(false);
804
854
  this.popupEle.style.maxHeight = popupHeight;
805
855
  if (this.footerTemplate) {
806
- this.footer = this.footer ? this.footer : this.popupEle.querySelector('.e-popup-footer');
807
856
  var height = Math.round(this.footer.getBoundingClientRect().height);
808
857
  popupHeight = formatUnit(parseInt(popupHeight, 10) - height + 'px');
809
858
  }
@@ -812,16 +861,15 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
812
861
  this.popupEle.style.visibility = 'hidden';
813
862
  this.isInitialRender = true;
814
863
  };
815
- MultiColumnComboBox.prototype.updateGridHeight = function (isFilter, autoHeight, dataSourceCount) {
864
+ MultiColumnComboBox.prototype.updateGridHeight = function (isFilter, autoHeight) {
816
865
  var height;
817
866
  if (isFilter) {
818
867
  var gridContentEle = this.gridObj.getContent().querySelector('.e-content');
819
868
  var scrollBarHeight = gridContentEle.offsetHeight - gridContentEle.clientHeight;
820
- var totalRowHeight = dataSourceCount * this.popupRowHeight;
821
869
  if (this.fields.groupBy !== '' && !isNullOrUndefined(this.fields.groupBy)) {
822
- totalRowHeight += this.popupRowHeight;
870
+ this.popupRowHeight += this.popupRowHeight;
823
871
  }
824
- height = autoHeight ? (totalRowHeight < this.prevGridHeight ? (totalRowHeight + scrollBarHeight) + 'px' : this.prevGridHeight + 'px') : this.prevGridHeight + 'px';
872
+ height = autoHeight ? (this.popupRowHeight < this.prevGridHeight ? (this.popupRowHeight + scrollBarHeight) + 'px' : this.prevGridHeight + 'px') : this.prevGridHeight + 'px';
825
873
  }
826
874
  else {
827
875
  this.prevGridHeight = this.popupDiv.getBoundingClientRect().height - this.popupDiv.querySelector('.e-gridheader').getBoundingClientRect().height;
@@ -978,6 +1026,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
978
1026
  _this.updateValues(selectedRecords ? dataValue : '', selectedRecords ? dataText : '', _this.gridObj.selectedRowIndex, ChangeEventArgs);
979
1027
  }
980
1028
  Input.setValue(selectedRecords ? dataText : '', _this.inputEle, _this.floatLabelType, _this.showClearButton);
1029
+ _this.setHiddenValue();
981
1030
  if (!isKeyNav || (isKeyNav && isUpdateVal)) {
982
1031
  _this.hidePopup(e);
983
1032
  }
@@ -992,6 +1041,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
992
1041
  this.value = value || this.value;
993
1042
  this.index = this.selectedRowIndex = !isNullOrUndefined(index) ? index : this.index;
994
1043
  this.isProtectedOnChange = prevOnChange;
1044
+ this.setHiddenValue();
995
1045
  if (!isInitial) {
996
1046
  this.triggerChangeEvent(eventArgs);
997
1047
  }
@@ -1121,7 +1171,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1121
1171
  var dataLists = e.result;
1122
1172
  var dataLength = dataLists.length;
1123
1173
  filteredData = dataLists.filter(function (item) { return _this.filterData(item, filterType, inputValue, fields); });
1124
- _this.updateGridDataSource(filteredData, dataLength);
1174
+ _this.updateGridDataSource(filteredData);
1125
1175
  });
1126
1176
  };
1127
1177
  MultiColumnComboBox.prototype.filterData = function (item, filterType, inputValue, fields) {
@@ -1138,12 +1188,8 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1138
1188
  return false;
1139
1189
  }
1140
1190
  };
1141
- MultiColumnComboBox.prototype.updateGridDataSource = function (dataSource, dataLength) {
1142
- var autoHeight = true;
1191
+ MultiColumnComboBox.prototype.updateGridDataSource = function (dataSource) {
1143
1192
  if (dataSource.length > 0) {
1144
- var length_1 = this.dataSource instanceof DataManager ? dataLength
1145
- : this.dataSource.length;
1146
- autoHeight = length_1 !== dataSource.length;
1147
1193
  removeClass([this.popupDiv], [NODATA]);
1148
1194
  var noRecordEle = this.popupDiv.querySelector('.e-no-records');
1149
1195
  if (noRecordEle) {
@@ -1156,7 +1202,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1156
1202
  this.l10nUpdate();
1157
1203
  addClass([this.popupDiv], [NODATA]);
1158
1204
  }
1159
- this.updateGridHeight(true, autoHeight, dataSource.length);
1160
1205
  };
1161
1206
  MultiColumnComboBox.prototype.wireEvents = function () {
1162
1207
  if (!isNullOrUndefined(this.inputObj.buttons[0])) {
@@ -1676,6 +1721,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1676
1721
  this.popupEle = null;
1677
1722
  this.footer = null;
1678
1723
  this.noRecord = null;
1724
+ this.hiddenElement = null;
1679
1725
  _super.prototype.destroy.call(this);
1680
1726
  };
1681
1727
  /**