@syncfusion/ej2-multicolumn-combobox 28.1.33 → 28.1.39
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.
- package/README.md +1 -1
- package/dist/ej2-multicolumn-combobox.umd.min.js +2 -2
- package/dist/ej2-multicolumn-combobox.umd.min.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es2015.js +62 -30
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +61 -30
- package/dist/es6/ej2-multicolumn-combobox.es5.js.map +1 -1
- package/dist/global/ej2-multicolumn-combobox.min.js +2 -2
- package/dist/global/ej2-multicolumn-combobox.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/multicolumn-combobox/multi-column-combo-box-model.d.ts +1 -1
- package/src/multicolumn-combobox/multi-column-combo-box.d.ts +1 -0
- package/src/multicolumn-combobox/multi-column-combo-box.js +61 -30
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 28.1.
|
|
3
|
+
* version : 28.1.39
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-multicolumn-combobox@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-multicolumn-combobox@
|
|
3
|
+
"_id": "@syncfusion/ej2-multicolumn-combobox@28.1.33",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-iM70wymmPk+g9d2eRD42TPv6mPdb4oEw8WNw3R3qqUul8YfOJ5u6iSinleJmZmd73KAc/gB7rZJVQhQOtT+2JQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-multicolumn-combobox",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-multicolumn-combobox",
|
|
24
24
|
"/@syncfusion/ej2-vue-multicolumn-combobox"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-multicolumn-combobox/-/ej2-multicolumn-combobox-28.1.33.tgz",
|
|
27
|
+
"_shasum": "19ef9d6aefa015269a5b906d8f90c984de767506",
|
|
28
28
|
"_spec": "@syncfusion/ej2-multicolumn-combobox@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~28.1.33",
|
|
39
|
-
"@syncfusion/ej2-grids": "~28.1.
|
|
39
|
+
"@syncfusion/ej2-grids": "~28.1.38"
|
|
40
40
|
},
|
|
41
41
|
"deprecated": false,
|
|
42
42
|
"description": "Essential JS 2 Component",
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
"url": "git+https://github.com/syncfusion/ej2-multicolumn-combobox-component.git"
|
|
58
58
|
},
|
|
59
59
|
"typings": "index.d.ts",
|
|
60
|
-
"version": "28.1.
|
|
60
|
+
"version": "28.1.39",
|
|
61
61
|
"sideEffects": false
|
|
62
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, EventHandler, INotifyPropertyChanged, Property, NotifyPropertyChanges, closest, attributes, append, compile, detach, KeyboardEvents } from '@syncfusion/ej2-base';import { ChildProperty, prepend, Collection, getUniqueID, Complex, isNullOrUndefined as isNOU, select, L10n, Browser } from '@syncfusion/ej2-base';import { formatUnit, addClass, removeClass, NumberFormatOptions, DateFormatOptions, Event, EmitType, AnimationModel, Animation, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DataManager, Query, Group } from '@syncfusion/ej2-data';import { Popup } from '@syncfusion/ej2-popups';import { Grid, Resize, FailureEventArgs, VirtualScroll, Group as GridGroup, Edit, Sort, GridColumnModel } from '@syncfusion/ej2-grids';
|
|
1
|
+
import { Component, EventHandler, INotifyPropertyChanged, Property, NotifyPropertyChanges, closest, attributes, append, compile, detach, KeyboardEvents, getValue } from '@syncfusion/ej2-base';import { ChildProperty, prepend, Collection, getUniqueID, Complex, isNullOrUndefined as isNOU, select, L10n, Browser } from '@syncfusion/ej2-base';import { formatUnit, addClass, removeClass, NumberFormatOptions, DateFormatOptions, Event, EmitType, AnimationModel, Animation, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DataManager, Query, Group } from '@syncfusion/ej2-data';import { Popup } from '@syncfusion/ej2-popups';import { Grid, Resize, FailureEventArgs, VirtualScroll, Group as GridGroup, Edit, Sort, GridColumnModel } from '@syncfusion/ej2-grids';
|
|
2
2
|
import {TextAlign,GridLine,WrapMode,ResizeArgs,DataResult,FilterType,FloatLabelType,SortOrder,SortType,PopupEventArgs,FilteringEventArgs,SelectEventArgs,ChangeEventArgs} from "./multi-column-combo-box";
|
|
3
3
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
4
4
|
|
|
@@ -827,6 +827,7 @@ export declare class MultiColumnComboBox extends Component<HTMLElement> implemen
|
|
|
827
827
|
private setHTMLAttributes;
|
|
828
828
|
private setEnable;
|
|
829
829
|
private setAriaDisabled;
|
|
830
|
+
private updateFieldValue;
|
|
830
831
|
private initValue;
|
|
831
832
|
private updateChangeEvent;
|
|
832
833
|
private updateCurrentValues;
|
|
@@ -52,7 +52,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
52
52
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
import { Component, EventHandler, Property, NotifyPropertyChanges, closest, attributes, append, compile, detach, KeyboardEvents } from '@syncfusion/ej2-base';
|
|
55
|
+
import { Component, EventHandler, Property, NotifyPropertyChanges, closest, attributes, append, compile, detach, KeyboardEvents, getValue } from '@syncfusion/ej2-base';
|
|
56
56
|
import { ChildProperty, prepend, Collection, getUniqueID, Complex, isNullOrUndefined as isNOU, select, L10n, Browser } from '@syncfusion/ej2-base';
|
|
57
57
|
import { formatUnit, addClass, removeClass, Event, Animation } from '@syncfusion/ej2-base';
|
|
58
58
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
@@ -418,8 +418,23 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
418
418
|
};
|
|
419
419
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
420
420
|
MultiColumnComboBox.prototype.isRowMatching = function (data, selectedValue, selectedText) {
|
|
421
|
-
var
|
|
422
|
-
|
|
421
|
+
var flattenData = function (data) {
|
|
422
|
+
var result = [];
|
|
423
|
+
if (data && typeof data === 'object') {
|
|
424
|
+
if (Array.isArray(data)) {
|
|
425
|
+
data.forEach(function (item) { return result.push.apply(result, flattenData(item)); });
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
Object.keys(data).forEach(function (key) { return result.push.apply(result, flattenData(data["" + key])); });
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
else if (data != null) {
|
|
432
|
+
result.push(String(data));
|
|
433
|
+
}
|
|
434
|
+
return result;
|
|
435
|
+
};
|
|
436
|
+
var flattenedValues = flattenData(data);
|
|
437
|
+
return (flattenedValues.indexOf(selectedValue) !== -1 && flattenedValues.indexOf(selectedText) !== -1);
|
|
423
438
|
};
|
|
424
439
|
MultiColumnComboBox.prototype.updateRowSelection = function (args) {
|
|
425
440
|
var _this = this;
|
|
@@ -657,6 +672,10 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
657
672
|
this.inputEle.setAttribute('aria-disabled', value);
|
|
658
673
|
this.inputWrapper.setAttribute('aria-disabled', value);
|
|
659
674
|
};
|
|
675
|
+
MultiColumnComboBox.prototype.updateFieldValue = function (fieldValue, dataObj) {
|
|
676
|
+
var fieldVal = getValue(fieldValue, dataObj).toString();
|
|
677
|
+
return fieldVal;
|
|
678
|
+
};
|
|
660
679
|
MultiColumnComboBox.prototype.initValue = function (isRerender, isValue, isInitial) {
|
|
661
680
|
var _this = this;
|
|
662
681
|
var prevItemData = this.gridObj.getSelectedRecords()[0];
|
|
@@ -682,8 +701,9 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
682
701
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
683
702
|
var dataLists = e.result;
|
|
684
703
|
var filteredData = dataLists.filter(function (item) {
|
|
685
|
-
|
|
686
|
-
!isNOU(_this.value) ? _this.fields.value : _this.fields.text
|
|
704
|
+
var fieldVal = _this.updateFieldValue(isRerender ? (isValue ? _this.fields.value : _this.fields.text) :
|
|
705
|
+
!isNOU(_this.value) ? _this.fields.value : _this.fields.text, item);
|
|
706
|
+
return fieldVal === value_1;
|
|
687
707
|
});
|
|
688
708
|
if (filteredData.length > 0) {
|
|
689
709
|
item = filteredData[0];
|
|
@@ -695,8 +715,9 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
695
715
|
}
|
|
696
716
|
else if (!isNOU(this.dataSource) && this.dataSource instanceof Array) {
|
|
697
717
|
item = this.dataSource.filter(function (data) {
|
|
698
|
-
|
|
699
|
-
!isNOU(_this.value) ? _this.fields.value : _this.fields.text
|
|
718
|
+
var fieldVal = _this.updateFieldValue(isRerender ? (isValue ? _this.fields.value : _this.fields.text) :
|
|
719
|
+
!isNOU(_this.value) ? _this.fields.value : _this.fields.text, data);
|
|
720
|
+
return fieldVal === value_1;
|
|
700
721
|
})[0];
|
|
701
722
|
updateValues(this.dataSource);
|
|
702
723
|
}
|
|
@@ -743,8 +764,9 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
743
764
|
}
|
|
744
765
|
};
|
|
745
766
|
MultiColumnComboBox.prototype.updateChangeEvent = function (item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial) {
|
|
767
|
+
var fieldValue = item ? this.updateFieldValue(this.fields.value, item) : null;
|
|
746
768
|
var ChangeEventArgs = {
|
|
747
|
-
value: item ?
|
|
769
|
+
value: item ? fieldValue : null,
|
|
748
770
|
itemData: { text: currentText, value: currentValue },
|
|
749
771
|
item: this.getDataByValue(this.value),
|
|
750
772
|
previousItemData: prevItemData,
|
|
@@ -757,10 +779,12 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
757
779
|
};
|
|
758
780
|
MultiColumnComboBox.prototype.updateCurrentValues = function (item, dataList) {
|
|
759
781
|
if (!isNOU(item)) {
|
|
760
|
-
|
|
782
|
+
var fieldText = this.updateFieldValue(this.fields.text, item);
|
|
783
|
+
var fieldValue = this.updateFieldValue(this.fields.value, item);
|
|
784
|
+
Input.setValue(fieldText, this.inputEle, this.floatLabelType, this.showClearButton);
|
|
761
785
|
return {
|
|
762
|
-
currentValue:
|
|
763
|
-
currentText:
|
|
786
|
+
currentValue: fieldValue,
|
|
787
|
+
currentText: fieldText,
|
|
764
788
|
currentIndex: dataList.indexOf(item)
|
|
765
789
|
};
|
|
766
790
|
}
|
|
@@ -938,16 +962,16 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
938
962
|
cancel: false
|
|
939
963
|
};
|
|
940
964
|
var selectedRecords = this.gridObj.getSelectedRecords()[0];
|
|
941
|
-
var
|
|
942
|
-
var
|
|
965
|
+
var dataText = selectedRecords ? this.updateFieldValue(this.fields.text, selectedRecords) : '';
|
|
966
|
+
var dataValue = selectedRecords ? this.updateFieldValue(this.fields.value, selectedRecords) : '';
|
|
943
967
|
var ChangeEventArgs = {
|
|
944
968
|
isInteracted: e ? true : false,
|
|
945
969
|
item: selectedRecords,
|
|
946
970
|
itemElement: row,
|
|
947
|
-
itemData: { text:
|
|
971
|
+
itemData: { text: selectedRecords ? dataText : '', value: selectedRecords ? dataValue : '' },
|
|
948
972
|
event: e,
|
|
949
973
|
cancel: false,
|
|
950
|
-
value:
|
|
974
|
+
value: selectedRecords ? dataValue : '',
|
|
951
975
|
previousItemData: { text: this.text, value: this.value },
|
|
952
976
|
previousItemElement: this.previousItemElement
|
|
953
977
|
};
|
|
@@ -957,9 +981,9 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
957
981
|
var event_1 = e;
|
|
958
982
|
var isUpdateVal = event_1.key === 'Enter' || event_1.key === 'Tab' || event_1.shiftKey && event_1.key === 'Tab' || event_1.altKey && event_1.key === 'ArrowUp';
|
|
959
983
|
if (!isKeyNav || (isKeyNav && isUpdateVal)) {
|
|
960
|
-
_this.updateValues(
|
|
984
|
+
_this.updateValues(selectedRecords ? dataValue : '', selectedRecords ? dataText : '', _this.gridObj.selectedRowIndex, ChangeEventArgs);
|
|
961
985
|
}
|
|
962
|
-
Input.setValue(
|
|
986
|
+
Input.setValue(selectedRecords ? dataText : '', _this.inputEle, _this.floatLabelType, _this.showClearButton);
|
|
963
987
|
if (!isKeyNav || (isKeyNav && isUpdateVal)) {
|
|
964
988
|
_this.hidePopup(e);
|
|
965
989
|
}
|
|
@@ -1042,10 +1066,12 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
1042
1066
|
MultiColumnComboBox.prototype.filterDatas = function (dataSource, inputValue) {
|
|
1043
1067
|
var _this = this;
|
|
1044
1068
|
var data = dataSource.filter(function (item) {
|
|
1045
|
-
|
|
1069
|
+
var fieldText = _this.updateFieldValue(_this.fields.text, item);
|
|
1070
|
+
return fieldText.toLowerCase().startsWith(inputValue.toLowerCase());
|
|
1046
1071
|
});
|
|
1047
1072
|
var exactData = dataSource.filter(function (item) {
|
|
1048
|
-
|
|
1073
|
+
var fieldText = _this.updateFieldValue(_this.fields.text, item);
|
|
1074
|
+
return fieldText === inputValue;
|
|
1049
1075
|
});
|
|
1050
1076
|
return { data: data, exactData: exactData };
|
|
1051
1077
|
};
|
|
@@ -1105,7 +1131,8 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
1105
1131
|
});
|
|
1106
1132
|
};
|
|
1107
1133
|
MultiColumnComboBox.prototype.filterData = function (item, filterType, inputValue, fields) {
|
|
1108
|
-
var
|
|
1134
|
+
var dataValue = this.updateFieldValue(fields ? fields.text : this.fields.text, item);
|
|
1135
|
+
var itemValue = dataValue.toLowerCase();
|
|
1109
1136
|
switch (filterType) {
|
|
1110
1137
|
case 'startswith':
|
|
1111
1138
|
return itemValue.startsWith(inputValue);
|
|
@@ -1227,13 +1254,13 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
1227
1254
|
if (!isNOU(this.text)) {
|
|
1228
1255
|
this.updateInputValue(this.text);
|
|
1229
1256
|
}
|
|
1230
|
-
this.
|
|
1257
|
+
var isClearVal = this.inputEle.value === '' ? true : false;
|
|
1258
|
+
this.updateValuesOnInput(e, null, isClearVal);
|
|
1231
1259
|
}
|
|
1232
1260
|
}
|
|
1233
1261
|
};
|
|
1234
1262
|
MultiColumnComboBox.prototype.updateValuesOnInput = function (mouseEvent, keyEvent, isClearValues, isKeyDown) {
|
|
1235
1263
|
var _this = this;
|
|
1236
|
-
if (isClearValues === void 0) { isClearValues = false; }
|
|
1237
1264
|
if (isKeyDown === void 0) { isKeyDown = false; }
|
|
1238
1265
|
var e = mouseEvent ? mouseEvent : keyEvent;
|
|
1239
1266
|
var val = isKeyDown ? this.matchedContent : this.exactMatchedContent;
|
|
@@ -1242,19 +1269,21 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
1242
1269
|
}
|
|
1243
1270
|
this.hidePopup(e);
|
|
1244
1271
|
if (this.matchedRowEle && !isClearValues && val) {
|
|
1245
|
-
var prevOnChange = this.isProtectedOnChange;
|
|
1246
|
-
this.isProtectedOnChange = true;
|
|
1247
1272
|
setTimeout(function () {
|
|
1248
|
-
|
|
1249
|
-
_this.
|
|
1273
|
+
var prevOnChange = _this.isProtectedOnChange;
|
|
1274
|
+
_this.isProtectedOnChange = true;
|
|
1275
|
+
var fieldText = _this.updateFieldValue(_this.fields.text, _this.matchedContent);
|
|
1276
|
+
var fieldValue = _this.updateFieldValue(_this.fields.value, _this.matchedContent);
|
|
1277
|
+
_this.inputEle.value = fieldText;
|
|
1278
|
+
_this.value = fieldValue;
|
|
1250
1279
|
var selectIndex = _this.findIndex(_this.gridObj.currentViewData, _this.matchedContent);
|
|
1251
1280
|
_this.index = selectIndex;
|
|
1252
|
-
_this.text =
|
|
1281
|
+
_this.text = fieldText;
|
|
1253
1282
|
_this.gridObj.selectRow(selectIndex);
|
|
1254
1283
|
_this.selectedGridRow(_this.gridObj.getRowByIndex(selectIndex), e);
|
|
1255
1284
|
_this.previousItemElement = _this.gridObj.getSelectedRows()[0];
|
|
1285
|
+
_this.isProtectedOnChange = prevOnChange;
|
|
1256
1286
|
}, 100);
|
|
1257
|
-
this.isProtectedOnChange = prevOnChange;
|
|
1258
1287
|
}
|
|
1259
1288
|
else {
|
|
1260
1289
|
if (this.isDataFiltered) {
|
|
@@ -1605,7 +1634,8 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
1605
1634
|
var _this = this;
|
|
1606
1635
|
if (!isNOU(this.dataSource) && this.dataSource instanceof Array) {
|
|
1607
1636
|
return this.dataSource.filter(function (item) {
|
|
1608
|
-
|
|
1637
|
+
var fieldValue = _this.updateFieldValue(_this.fields.value, item);
|
|
1638
|
+
return fieldValue === value;
|
|
1609
1639
|
})[0];
|
|
1610
1640
|
}
|
|
1611
1641
|
else if (!isNOU(this.dataSource) && this.dataSource instanceof DataManager) {
|
|
@@ -1613,7 +1643,8 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
|
|
|
1613
1643
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1614
1644
|
var dataLists = e.result;
|
|
1615
1645
|
return dataLists.filter(function (item) {
|
|
1616
|
-
|
|
1646
|
+
var fieldValue = _this.updateFieldValue(_this.fields.value, item);
|
|
1647
|
+
return fieldValue === value;
|
|
1617
1648
|
})[0];
|
|
1618
1649
|
});
|
|
1619
1650
|
}
|