@syncfusion/ej2-dropdowns 19.3.56 → 19.4.42
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +91 -33
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +92 -33
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/combo-box/combo-box.js +2 -2
- package/src/common/incremental-search.d.ts +1 -1
- package/src/common/incremental-search.js +1 -1
- package/src/drop-down-base/drop-down-base.js +19 -1
- package/src/list-box/list-box.d.ts +0 -4
- package/src/list-box/list-box.js +0 -3
- package/src/multi-select/multi-select-model.d.ts +1 -1
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +70 -26
- package/styles/auto-complete/_fluent-definition.scss +2 -0
- package/styles/auto-complete/bootstrap5-dark.css +0 -1
- package/styles/auto-complete/bootstrap5.css +0 -1
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap.css +5 -0
- package/styles/bootstrap4.css +5 -0
- package/styles/bootstrap5-dark.css +17 -6
- package/styles/bootstrap5.css +17 -6
- package/styles/combo-box/_fluent-definition.scss +2 -0
- package/styles/combo-box/bootstrap5-dark.css +0 -1
- package/styles/combo-box/bootstrap5.css +0 -1
- package/styles/drop-down-base/_fluent-definition.scss +109 -0
- package/styles/drop-down-list/_bootstrap5-definition.scss +0 -1
- package/styles/drop-down-list/_fluent-definition.scss +193 -0
- package/styles/drop-down-list/bootstrap5-dark.css +0 -1
- package/styles/drop-down-list/bootstrap5.css +0 -1
- package/styles/drop-down-list/icons/_bootstrap5.scss +0 -1
- package/styles/drop-down-list/icons/_fluent.scss +14 -0
- package/styles/drop-down-tree/_bootstrap5-definition.scss +59 -58
- package/styles/drop-down-tree/_fluent-definition.scss +71 -0
- package/styles/drop-down-tree/_layout.scss +12 -4
- package/styles/drop-down-tree/_tailwind-definition.scss +1 -0
- package/styles/drop-down-tree/bootstrap5-dark.css +11 -4
- package/styles/drop-down-tree/bootstrap5.css +11 -4
- package/styles/drop-down-tree/icons/_bootstrap5.scss +11 -11
- package/styles/drop-down-tree/icons/_fluent.scss +11 -0
- package/styles/drop-down-tree/icons/_tailwind-dark.scss +11 -11
- package/styles/drop-down-tree/tailwind-dark.css +1 -0
- package/styles/drop-down-tree/tailwind.css +1 -0
- package/styles/fabric-dark.css +5 -0
- package/styles/fabric.css +5 -0
- package/styles/highcontrast-light.css +5 -0
- package/styles/highcontrast.css +5 -0
- package/styles/list-box/_bootstrap5-definition.scss +2 -2
- package/styles/list-box/_fluent-definition.scss +115 -0
- package/styles/list-box/_layout.scss +1 -6
- package/styles/list-box/bootstrap5-dark.css +1 -1
- package/styles/list-box/bootstrap5.css +1 -1
- package/styles/list-box/icons/_fluent.scss +25 -0
- package/styles/list-box/icons/_tailwind-dark.scss +2 -2
- package/styles/list-box/tailwind-dark.css +3 -3
- package/styles/list-box/tailwind.css +1 -1
- package/styles/material-dark.css +5 -94
- package/styles/material.css +5 -94
- package/styles/multi-select/_bootstrap-dark-definition.scss +1 -0
- package/styles/multi-select/_bootstrap-definition.scss +1 -0
- package/styles/multi-select/_bootstrap4-definition.scss +1 -0
- package/styles/multi-select/_bootstrap5-definition.scss +1 -0
- package/styles/multi-select/_fabric-dark-definition.scss +1 -0
- package/styles/multi-select/_fabric-definition.scss +1 -0
- package/styles/multi-select/_fluent-definition.scss +215 -0
- package/styles/multi-select/_highcontrast-definition.scss +1 -0
- package/styles/multi-select/_highcontrast-light-definition.scss +1 -0
- package/styles/multi-select/_layout.scss +0 -116
- package/styles/multi-select/_material-dark-definition.scss +1 -22
- package/styles/multi-select/_material-definition.scss +1 -22
- package/styles/multi-select/_tailwind-definition.scss +1 -0
- package/styles/multi-select/_theme.scss +5 -0
- package/styles/multi-select/bootstrap-dark.css +5 -0
- package/styles/multi-select/bootstrap.css +5 -0
- package/styles/multi-select/bootstrap4.css +5 -0
- package/styles/multi-select/bootstrap5-dark.css +5 -0
- package/styles/multi-select/bootstrap5.css +5 -0
- package/styles/multi-select/fabric-dark.css +5 -0
- package/styles/multi-select/fabric.css +5 -0
- package/styles/multi-select/highcontrast-light.css +5 -0
- package/styles/multi-select/highcontrast.css +5 -0
- package/styles/multi-select/icons/_fluent.scss +27 -0
- package/styles/multi-select/material-dark.css +5 -94
- package/styles/multi-select/material.css +5 -94
- package/styles/multi-select/tailwind-dark.css +5 -0
- package/styles/multi-select/tailwind.css +5 -0
- package/styles/tailwind-dark.css +9 -3
- package/styles/tailwind.css +7 -1
- package/styles/_all.scss +0 -3
|
@@ -91,7 +91,7 @@ function Search(inputVal, items, searchType, ignoreCase) {
|
|
|
91
91
|
for (let i = 0, itemsData = listItems; i < itemsData.length; i++) {
|
|
92
92
|
const item = itemsData[i];
|
|
93
93
|
const text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
|
|
94
|
-
if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr)) {
|
|
94
|
+
if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, "g").test(text))) {
|
|
95
95
|
itemData.item = item;
|
|
96
96
|
itemData.index = i;
|
|
97
97
|
return { item: item, index: i };
|
|
@@ -635,6 +635,11 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
635
635
|
this.renderGroupTemplate(ulElement);
|
|
636
636
|
}
|
|
637
637
|
this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
638
|
+
setTimeout(() => {
|
|
639
|
+
if (this.getModuleName() === 'multiselect' && this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
640
|
+
this.updateDataList();
|
|
641
|
+
}
|
|
642
|
+
});
|
|
638
643
|
}
|
|
639
644
|
});
|
|
640
645
|
}
|
|
@@ -765,10 +770,22 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
765
770
|
const groupValue = select(this.groupTemplate, document).innerHTML.trim();
|
|
766
771
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
767
772
|
const tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);
|
|
773
|
+
//EJ2-55168- Group checkbox is not working with group template
|
|
774
|
+
if (this.isGroupChecking) {
|
|
775
|
+
for (var i = 0; i < tempHeaders.length; i++) {
|
|
776
|
+
this.notify('addItem', { module: 'CheckBoxSelection', item: tempHeaders[i] });
|
|
777
|
+
}
|
|
778
|
+
}
|
|
768
779
|
}
|
|
769
780
|
else {
|
|
770
781
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
771
782
|
const tempHeaders = ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option, this);
|
|
783
|
+
//EJ2-55168- Group checkbox is not working with group template
|
|
784
|
+
if (this.isGroupChecking) {
|
|
785
|
+
for (var i = 0; i < tempHeaders.length; i++) {
|
|
786
|
+
this.notify('addItem', { module: 'CheckBoxSelection', item: tempHeaders[i] });
|
|
787
|
+
}
|
|
788
|
+
}
|
|
772
789
|
}
|
|
773
790
|
this.renderReactTemplates();
|
|
774
791
|
}
|
|
@@ -1182,7 +1199,8 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1182
1199
|
li.innerText = itemText;
|
|
1183
1200
|
}
|
|
1184
1201
|
if (this.itemTemplate && !isHeader) {
|
|
1185
|
-
const
|
|
1202
|
+
const itemCheck = this.templateCompiler(this.itemTemplate);
|
|
1203
|
+
const compiledString = itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
|
|
1186
1204
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1187
1205
|
const addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);
|
|
1188
1206
|
if (addItemTemplate) {
|
|
@@ -7436,7 +7454,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7436
7454
|
if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) &&
|
|
7437
7455
|
!isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
|
|
7438
7456
|
const inputValue = this.inputElement.value;
|
|
7439
|
-
const activeItem = Search(inputValue, this.liCollections,
|
|
7457
|
+
const activeItem = Search(inputValue, this.liCollections, this.filterType, true);
|
|
7440
7458
|
const activeElement = activeItem.item;
|
|
7441
7459
|
if (!isNullOrUndefined(activeElement)) {
|
|
7442
7460
|
const count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
@@ -7593,7 +7611,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7593
7611
|
else {
|
|
7594
7612
|
this.activeIndex = null;
|
|
7595
7613
|
this.removeSelection();
|
|
7596
|
-
if (this.liCollections && this.liCollections.length
|
|
7614
|
+
if (this.liCollections && this.liCollections.length > 0 && !this.isCustomFilter) {
|
|
7597
7615
|
this.removeFocus();
|
|
7598
7616
|
}
|
|
7599
7617
|
}
|
|
@@ -8982,7 +9000,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8982
9000
|
this.mainData = list;
|
|
8983
9001
|
this.mainListCollection = this.liCollections;
|
|
8984
9002
|
}
|
|
8985
|
-
else if (
|
|
9003
|
+
else if (isNullOrUndefined(this.mainData) || this.mainData.length === 0) {
|
|
8986
9004
|
this.mainData = list;
|
|
8987
9005
|
}
|
|
8988
9006
|
if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering &&
|
|
@@ -10998,7 +11016,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
10998
11016
|
updateActionCompleteData(li, item) {
|
|
10999
11017
|
if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
|
|
11000
11018
|
this.mainList = this.ulElement;
|
|
11001
|
-
|
|
11019
|
+
if (this.hideSelectedItem) {
|
|
11020
|
+
addClass([li], HIDE_LIST);
|
|
11021
|
+
}
|
|
11002
11022
|
}
|
|
11003
11023
|
}
|
|
11004
11024
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -11016,7 +11036,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11016
11036
|
}
|
|
11017
11037
|
}
|
|
11018
11038
|
updateDataList() {
|
|
11019
|
-
if (this.mainList && this.ulElement && this.mainList.childElementCount < this.ulElement.childElementCount) {
|
|
11039
|
+
if (this.mainList && this.ulElement && (this.mainList.childElementCount < this.ulElement.childElementCount || ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount)))) {
|
|
11020
11040
|
this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
11021
11041
|
}
|
|
11022
11042
|
}
|
|
@@ -11659,7 +11679,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11659
11679
|
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
11660
11680
|
}
|
|
11661
11681
|
if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
11662
|
-
let target = (event ? event.target : null);
|
|
11682
|
+
let target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
|
|
11663
11683
|
target = (event && event.keyCode === 32) ? list : target;
|
|
11664
11684
|
target = (target && target.classList.contains('e-frame')) ? target.parentElement.parentElement : target;
|
|
11665
11685
|
if (target && target.classList.contains('e-list-group-item')) {
|
|
@@ -12029,6 +12049,17 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12029
12049
|
this.notify('selectAllText', false);
|
|
12030
12050
|
break;
|
|
12031
12051
|
case 'popupHeight':
|
|
12052
|
+
if (this.popupObj) {
|
|
12053
|
+
let overAllHeight = parseInt(this.popupHeight, 10);
|
|
12054
|
+
if (this.popupHeight !== 'auto') {
|
|
12055
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
12056
|
+
this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
|
|
12057
|
+
}
|
|
12058
|
+
else {
|
|
12059
|
+
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
12060
|
+
}
|
|
12061
|
+
}
|
|
12062
|
+
break;
|
|
12032
12063
|
case 'headerTemplate':
|
|
12033
12064
|
case 'footerTemplate':
|
|
12034
12065
|
this.reInitializePoup();
|
|
@@ -12056,6 +12087,24 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12056
12087
|
}
|
|
12057
12088
|
this.renderPopup();
|
|
12058
12089
|
}
|
|
12090
|
+
presentItemValue(ulElement) {
|
|
12091
|
+
let valuecheck = [];
|
|
12092
|
+
for (let i = 0; i < this.value.length; i++) {
|
|
12093
|
+
let checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);
|
|
12094
|
+
if (!checkEle) {
|
|
12095
|
+
valuecheck.push(this.value[i]);
|
|
12096
|
+
}
|
|
12097
|
+
}
|
|
12098
|
+
return valuecheck;
|
|
12099
|
+
}
|
|
12100
|
+
;
|
|
12101
|
+
addNonPresentItems(valuecheck, ulElement, list, event) {
|
|
12102
|
+
this.dataSource.executeQuery(this.getForQuery(valuecheck)).then((e) => {
|
|
12103
|
+
this.addItem(e.result, list.length);
|
|
12104
|
+
this.updateActionList(ulElement, list, event);
|
|
12105
|
+
});
|
|
12106
|
+
}
|
|
12107
|
+
;
|
|
12059
12108
|
updateVal(newProp, oldProp, prop) {
|
|
12060
12109
|
if (!this.list) {
|
|
12061
12110
|
this.onLoadSelect();
|
|
@@ -12064,31 +12113,43 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12064
12113
|
this.onLoadSelect();
|
|
12065
12114
|
}
|
|
12066
12115
|
else {
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
}
|
|
12071
|
-
if (isNullOrUndefined(this.value) || this.value.length === 0) {
|
|
12072
|
-
this.tempValues = oldProp;
|
|
12073
|
-
}
|
|
12074
|
-
// eslint-disable-next-line
|
|
12075
|
-
if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus
|
|
12076
|
-
&& this.isPopupOpen() && this.mainData !== this.listData) {
|
|
12077
|
-
const list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
|
|
12078
|
-
this.onActionComplete(list, this.mainData);
|
|
12079
|
-
}
|
|
12080
|
-
this.initialValueUpdate();
|
|
12081
|
-
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
12082
|
-
this.updateDelimView();
|
|
12116
|
+
let valuecheck = [];
|
|
12117
|
+
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
12118
|
+
valuecheck = this.presentItemValue(this.ulElement);
|
|
12083
12119
|
}
|
|
12084
|
-
if (!this.
|
|
12085
|
-
this.
|
|
12120
|
+
if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
12121
|
+
&& this.listData != null) {
|
|
12122
|
+
this.mainData = null;
|
|
12123
|
+
this.setDynValue = true;
|
|
12124
|
+
this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
|
|
12086
12125
|
}
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12126
|
+
else {
|
|
12127
|
+
if (prop === 'text') {
|
|
12128
|
+
this.initialTextUpdate();
|
|
12129
|
+
newProp = this.value;
|
|
12130
|
+
}
|
|
12131
|
+
if (isNullOrUndefined(this.value) || this.value.length === 0) {
|
|
12132
|
+
this.tempValues = oldProp;
|
|
12133
|
+
}
|
|
12134
|
+
// eslint-disable-next-line
|
|
12135
|
+
if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus
|
|
12136
|
+
&& this.isPopupOpen() && this.mainData !== this.listData) {
|
|
12137
|
+
const list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
|
|
12138
|
+
this.onActionComplete(list, this.mainData);
|
|
12139
|
+
}
|
|
12140
|
+
this.initialValueUpdate();
|
|
12141
|
+
if (this.mode !== 'Box' && !this.inputFocus) {
|
|
12142
|
+
this.updateDelimView();
|
|
12143
|
+
}
|
|
12144
|
+
if (!this.inputFocus) {
|
|
12145
|
+
this.refreshInputHight();
|
|
12146
|
+
}
|
|
12147
|
+
this.refreshPlaceHolder();
|
|
12148
|
+
if (this.mode !== 'CheckBox' && this.changeOnBlur) {
|
|
12149
|
+
this.updateValueState(null, newProp, oldProp);
|
|
12150
|
+
}
|
|
12151
|
+
this.checkPlaceholderSize();
|
|
12090
12152
|
}
|
|
12091
|
-
this.checkPlaceholderSize();
|
|
12092
12153
|
}
|
|
12093
12154
|
if (!this.changeOnBlur) {
|
|
12094
12155
|
this.updateValueState(null, newProp, oldProp);
|
|
@@ -13565,9 +13626,6 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
13565
13626
|
args.items = this.getDataByValues([dragValue]);
|
|
13566
13627
|
}
|
|
13567
13628
|
this.trigger('beforeDrop', args);
|
|
13568
|
-
if (args.isDragAll !== null) {
|
|
13569
|
-
this.allowDragAll = args.isDragAll;
|
|
13570
|
-
}
|
|
13571
13629
|
}
|
|
13572
13630
|
dragEnd(args) {
|
|
13573
13631
|
let listData;
|