@syncfusion/ej2-dropdowns 19.4.40 → 19.4.48
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 +87 -34
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +88 -34
- 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 -12
- 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 +15 -2
- package/src/drop-down-list/drop-down-list.js +1 -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 +69 -25
- 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 +21 -3
- package/styles/bootstrap.css +21 -3
- package/styles/bootstrap4.css +21 -3
- package/styles/bootstrap5-dark.css +33 -9
- package/styles/bootstrap5.css +33 -9
- 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 +21 -3
- package/styles/fabric.css +21 -3
- package/styles/highcontrast-light.css +21 -3
- package/styles/highcontrast.css +21 -3
- package/styles/list-box/_bootstrap-dark-definition.scss +3 -0
- package/styles/list-box/_bootstrap-definition.scss +3 -0
- package/styles/list-box/_bootstrap4-definition.scss +3 -0
- package/styles/list-box/_bootstrap5-definition.scss +5 -2
- package/styles/list-box/_fabric-dark-definition.scss +3 -0
- package/styles/list-box/_fabric-definition.scss +3 -0
- package/styles/list-box/_fluent-definition.scss +118 -0
- package/styles/list-box/_highcontrast-definition.scss +3 -0
- package/styles/list-box/_highcontrast-light-definition.scss +3 -0
- package/styles/list-box/_layout.scss +1 -6
- package/styles/list-box/_material-dark-definition.scss +3 -0
- package/styles/list-box/_material-definition.scss +3 -0
- package/styles/list-box/_tailwind-definition.scss +3 -0
- package/styles/list-box/_theme.scss +8 -0
- package/styles/list-box/bootstrap-dark.css +10 -0
- package/styles/list-box/bootstrap.css +10 -0
- package/styles/list-box/bootstrap4.css +10 -0
- package/styles/list-box/bootstrap5-dark.css +11 -1
- package/styles/list-box/bootstrap5.css +11 -1
- package/styles/list-box/fabric-dark.css +10 -0
- package/styles/list-box/fabric.css +10 -0
- package/styles/list-box/highcontrast-light.css +10 -0
- package/styles/list-box/highcontrast.css +10 -0
- package/styles/list-box/icons/_fluent.scss +25 -0
- package/styles/list-box/icons/_tailwind-dark.scss +2 -2
- package/styles/list-box/material-dark.css +10 -0
- package/styles/list-box/material.css +10 -0
- package/styles/list-box/tailwind-dark.css +13 -3
- package/styles/list-box/tailwind.css +11 -1
- package/styles/material-dark.css +21 -97
- package/styles/material.css +21 -97
- 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 +4 -119
- 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 +11 -3
- package/styles/multi-select/bootstrap.css +11 -3
- package/styles/multi-select/bootstrap4.css +11 -3
- package/styles/multi-select/bootstrap5-dark.css +11 -3
- package/styles/multi-select/bootstrap5.css +11 -3
- package/styles/multi-select/fabric-dark.css +11 -3
- package/styles/multi-select/fabric.css +11 -3
- package/styles/multi-select/highcontrast-light.css +11 -3
- package/styles/multi-select/highcontrast.css +11 -3
- package/styles/multi-select/icons/_fluent.scss +27 -0
- package/styles/multi-select/material-dark.css +11 -97
- package/styles/multi-select/material.css +11 -97
- package/styles/multi-select/tailwind-dark.css +11 -3
- package/styles/multi-select/tailwind.css +11 -3
- package/styles/tailwind-dark.css +25 -6
- package/styles/tailwind.css +23 -4
- 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 };
|
|
@@ -636,7 +636,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
636
636
|
}
|
|
637
637
|
this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
638
638
|
setTimeout(() => {
|
|
639
|
-
if (this.getModuleName() === 'multiselect' && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
639
|
+
if (this.getModuleName() === 'multiselect' && this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
640
640
|
this.updateDataList();
|
|
641
641
|
}
|
|
642
642
|
});
|
|
@@ -770,10 +770,22 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
770
770
|
const groupValue = select(this.groupTemplate, document).innerHTML.trim();
|
|
771
771
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
772
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
|
+
}
|
|
773
779
|
}
|
|
774
780
|
else {
|
|
775
781
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
776
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
|
+
}
|
|
777
789
|
}
|
|
778
790
|
this.renderReactTemplates();
|
|
779
791
|
}
|
|
@@ -1187,7 +1199,8 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1187
1199
|
li.innerText = itemText;
|
|
1188
1200
|
}
|
|
1189
1201
|
if (this.itemTemplate && !isHeader) {
|
|
1190
|
-
const
|
|
1202
|
+
const itemCheck = this.templateCompiler(this.itemTemplate);
|
|
1203
|
+
const compiledString = itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
|
|
1191
1204
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1192
1205
|
const addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);
|
|
1193
1206
|
if (addItemTemplate) {
|
|
@@ -3596,7 +3609,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3596
3609
|
checkCustomValue() {
|
|
3597
3610
|
this.itemData = this.getDataByValue(this.value);
|
|
3598
3611
|
const dataItem = this.getItemData();
|
|
3599
|
-
this.setProperties({ '
|
|
3612
|
+
this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });
|
|
3600
3613
|
}
|
|
3601
3614
|
updateInputFields() {
|
|
3602
3615
|
if (this.getModuleName() === 'dropdownlist') {
|
|
@@ -7441,7 +7454,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7441
7454
|
if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) &&
|
|
7442
7455
|
!isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
|
|
7443
7456
|
const inputValue = this.inputElement.value;
|
|
7444
|
-
const activeItem = Search(inputValue, this.liCollections,
|
|
7457
|
+
const activeItem = Search(inputValue, this.liCollections, this.filterType, true);
|
|
7445
7458
|
const activeElement = activeItem.item;
|
|
7446
7459
|
if (!isNullOrUndefined(activeElement)) {
|
|
7447
7460
|
const count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
@@ -7598,7 +7611,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7598
7611
|
else {
|
|
7599
7612
|
this.activeIndex = null;
|
|
7600
7613
|
this.removeSelection();
|
|
7601
|
-
if (this.liCollections && this.liCollections.length
|
|
7614
|
+
if (this.liCollections && this.liCollections.length > 0 && !this.isCustomFilter) {
|
|
7602
7615
|
this.removeFocus();
|
|
7603
7616
|
}
|
|
7604
7617
|
}
|
|
@@ -8987,7 +9000,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8987
9000
|
this.mainData = list;
|
|
8988
9001
|
this.mainListCollection = this.liCollections;
|
|
8989
9002
|
}
|
|
8990
|
-
else if (
|
|
9003
|
+
else if (isNullOrUndefined(this.mainData) || this.mainData.length === 0) {
|
|
8991
9004
|
this.mainData = list;
|
|
8992
9005
|
}
|
|
8993
9006
|
if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering &&
|
|
@@ -11003,7 +11016,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11003
11016
|
updateActionCompleteData(li, item) {
|
|
11004
11017
|
if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
|
|
11005
11018
|
this.mainList = this.ulElement;
|
|
11006
|
-
|
|
11019
|
+
if (this.hideSelectedItem) {
|
|
11020
|
+
addClass([li], HIDE_LIST);
|
|
11021
|
+
}
|
|
11007
11022
|
}
|
|
11008
11023
|
}
|
|
11009
11024
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -11664,7 +11679,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11664
11679
|
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
11665
11680
|
}
|
|
11666
11681
|
if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
11667
|
-
let target = (event ? event.target : null);
|
|
11682
|
+
let target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
|
|
11668
11683
|
target = (event && event.keyCode === 32) ? list : target;
|
|
11669
11684
|
target = (target && target.classList.contains('e-frame')) ? target.parentElement.parentElement : target;
|
|
11670
11685
|
if (target && target.classList.contains('e-list-group-item')) {
|
|
@@ -12034,6 +12049,17 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12034
12049
|
this.notify('selectAllText', false);
|
|
12035
12050
|
break;
|
|
12036
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;
|
|
12037
12063
|
case 'headerTemplate':
|
|
12038
12064
|
case 'footerTemplate':
|
|
12039
12065
|
this.reInitializePoup();
|
|
@@ -12061,6 +12087,24 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12061
12087
|
}
|
|
12062
12088
|
this.renderPopup();
|
|
12063
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
|
+
;
|
|
12064
12108
|
updateVal(newProp, oldProp, prop) {
|
|
12065
12109
|
if (!this.list) {
|
|
12066
12110
|
this.onLoadSelect();
|
|
@@ -12069,31 +12113,43 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12069
12113
|
this.onLoadSelect();
|
|
12070
12114
|
}
|
|
12071
12115
|
else {
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12116
|
+
let valuecheck = [];
|
|
12117
|
+
if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
|
|
12118
|
+
valuecheck = this.presentItemValue(this.ulElement);
|
|
12075
12119
|
}
|
|
12076
|
-
if (
|
|
12077
|
-
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);
|
|
12078
12125
|
}
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
this.
|
|
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();
|
|
12095
12152
|
}
|
|
12096
|
-
this.checkPlaceholderSize();
|
|
12097
12153
|
}
|
|
12098
12154
|
if (!this.changeOnBlur) {
|
|
12099
12155
|
this.updateValueState(null, newProp, oldProp);
|
|
@@ -13570,9 +13626,6 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
13570
13626
|
args.items = this.getDataByValues([dragValue]);
|
|
13571
13627
|
}
|
|
13572
13628
|
this.trigger('beforeDrop', args);
|
|
13573
|
-
if (args.isDragAll !== null) {
|
|
13574
|
-
this.allowDragAll = args.isDragAll;
|
|
13575
|
-
}
|
|
13576
13629
|
}
|
|
13577
13630
|
dragEnd(args) {
|
|
13578
13631
|
let listData;
|