@syncfusion/ej2-dropdowns 20.3.59 → 20.4.38
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 +2 -36
- package/dist/ej2-dropdowns.min.js +2 -2
- 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 +527 -336
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +520 -324
- 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/auto-complete/auto-complete-model.d.ts +1 -0
- package/src/auto-complete/auto-complete.d.ts +4 -3
- package/src/auto-complete/auto-complete.js +6 -4
- package/src/combo-box/combo-box.d.ts +4 -4
- package/src/combo-box/combo-box.js +18 -12
- package/src/common/incremental-search.d.ts +3 -4
- package/src/common/incremental-search.js +22 -7
- package/src/drop-down-base/drop-down-base-model.d.ts +0 -18
- package/src/drop-down-base/drop-down-base.d.ts +1 -23
- package/src/drop-down-base/drop-down-base.js +43 -38
- package/src/drop-down-list/drop-down-list-model.d.ts +18 -0
- package/src/drop-down-list/drop-down-list.d.ts +25 -3
- package/src/drop-down-list/drop-down-list.js +100 -46
- package/src/drop-down-tree/drop-down-tree-model.d.ts +15 -1
- package/src/drop-down-tree/drop-down-tree.d.ts +13 -1
- package/src/drop-down-tree/drop-down-tree.js +22 -5
- package/src/list-box/list-box-model.d.ts +18 -0
- package/src/list-box/list-box.d.ts +22 -0
- package/src/list-box/list-box.js +27 -14
- package/src/mention/mention-model.d.ts +2 -2
- package/src/mention/mention.d.ts +4 -1
- package/src/mention/mention.js +66 -27
- package/src/multi-select/checkbox-selection.js +10 -8
- package/src/multi-select/multi-select.d.ts +4 -4
- package/src/multi-select/multi-select.js +207 -160
- package/styles/bootstrap5-dark.css +2 -2
- package/styles/bootstrap5.css +2 -2
- package/styles/drop-down-base/_bootstrap-dark-definition.scss +1 -0
- package/styles/drop-down-base/_bootstrap-definition.scss +1 -0
- package/styles/drop-down-base/_bootstrap4-definition.scss +1 -0
- package/styles/drop-down-base/_bootstrap5-definition.scss +1 -0
- package/styles/drop-down-base/_fabric-dark-definition.scss +1 -0
- package/styles/drop-down-base/_fabric-definition.scss +1 -0
- package/styles/drop-down-base/_fluent-definition.scss +1 -0
- package/styles/drop-down-base/_fusionnew-definition.scss +1 -0
- package/styles/drop-down-base/_highcontrast-definition.scss +1 -0
- package/styles/drop-down-base/_highcontrast-light-definition.scss +1 -0
- package/styles/drop-down-base/_layout.scss +1 -1
- package/styles/drop-down-base/_material-dark-definition.scss +1 -0
- package/styles/drop-down-base/_material-definition.scss +1 -0
- package/styles/drop-down-base/_material3-definition.scss +1 -0
- package/styles/drop-down-base/_tailwind-definition.scss +1 -0
- package/styles/drop-down-base/material-dark.css +1 -1
- package/styles/drop-down-tree/_layout.scss +3 -3
- package/styles/drop-down-tree/bootstrap5-dark.css +2 -2
- package/styles/drop-down-tree/bootstrap5.css +2 -2
- package/styles/material-dark.css +1 -1
- package/.eslintrc.json +0 -244
- package/tslint.json +0 -111
|
@@ -144,7 +144,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
144
144
|
var htmlAttr = _a[_i];
|
|
145
145
|
switch (htmlAttr) {
|
|
146
146
|
case 'class': {
|
|
147
|
-
var updatedClassValue = (this.htmlAttributes[htmlAttr].replace(/\s+/g, ' ')).trim();
|
|
147
|
+
var updatedClassValue = (this.htmlAttributes["" + htmlAttr].replace(/\s+/g, ' ')).trim();
|
|
148
148
|
if (updatedClassValue !== '') {
|
|
149
149
|
addClass([this.overAllWrapper], updatedClassValue.split(' '));
|
|
150
150
|
addClass([this.popupWrapper], updatedClassValue.split(' '));
|
|
@@ -156,7 +156,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
156
156
|
break;
|
|
157
157
|
case 'placeholder':
|
|
158
158
|
if (!this.placeholder) {
|
|
159
|
-
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
159
|
+
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
160
160
|
this.setProperties({ placeholder: this.inputElement.placeholder }, true);
|
|
161
161
|
this.refreshPlaceHolder();
|
|
162
162
|
}
|
|
@@ -166,16 +166,16 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
166
166
|
var validateAttr = ['name', 'required', 'aria-required', 'form'];
|
|
167
167
|
var containerAttr = ['title', 'role', 'style', 'class'];
|
|
168
168
|
if (defaultAttr.indexOf(htmlAttr) > -1) {
|
|
169
|
-
this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
169
|
+
this.element.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
170
170
|
}
|
|
171
171
|
else if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {
|
|
172
|
-
this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
172
|
+
this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
173
173
|
}
|
|
174
174
|
else if (containerAttr.indexOf(htmlAttr) > -1) {
|
|
175
|
-
this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
175
|
+
this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
176
176
|
}
|
|
177
|
-
else if (htmlAttr !== 'size') {
|
|
178
|
-
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
|
|
177
|
+
else if (htmlAttr !== 'size' && !isNullOrUndefined(this.inputElement)) {
|
|
178
|
+
this.inputElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
179
179
|
}
|
|
180
180
|
break;
|
|
181
181
|
}
|
|
@@ -184,11 +184,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
MultiSelect.prototype.updateReadonly = function (state) {
|
|
187
|
-
if (
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
188
|
+
if (state || this.mode === 'CheckBox') {
|
|
189
|
+
this.inputElement.setAttribute('readonly', 'true');
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
this.inputElement.removeAttribute('readonly');
|
|
193
|
+
}
|
|
192
194
|
}
|
|
193
195
|
};
|
|
194
196
|
MultiSelect.prototype.updateClearButton = function (state) {
|
|
@@ -331,8 +333,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
331
333
|
if (!isNullOrUndefined(this.ulElement)) {
|
|
332
334
|
attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
333
335
|
}
|
|
334
|
-
var disableStatus = (this.inputElement.disabled) ? true : false;
|
|
335
|
-
if (!this.isPopupOpen()) {
|
|
336
|
+
var disableStatus = !isNullOrUndefined(this.inputElement) && (this.inputElement.disabled) ? true : false;
|
|
337
|
+
if (!this.isPopupOpen() && !isNullOrUndefined(this.inputElement)) {
|
|
336
338
|
attributes(this.inputElement, this.getAriaAttributes());
|
|
337
339
|
}
|
|
338
340
|
if (disableStatus) {
|
|
@@ -442,7 +444,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
442
444
|
this.checkForCustomValue(this.tempQuery, this.fields);
|
|
443
445
|
return;
|
|
444
446
|
}
|
|
445
|
-
if (this.value && this.value.length && ((this.mode !== 'CheckBox' && this.inputElement.value.trim() !== '') ||
|
|
447
|
+
if (this.value && this.value.length && ((this.mode !== 'CheckBox' && !isNullOrUndefined(this.inputElement) && this.inputElement.value.trim() !== '') ||
|
|
446
448
|
this.mode === 'CheckBox' || ((this.keyCode === 8 || this.keyCode === 46) && this.allowFiltering &&
|
|
447
449
|
this.allowCustomValue && this.dataSource instanceof DataManager && this.inputElement.value === ''))) {
|
|
448
450
|
this.refreshSelection();
|
|
@@ -512,8 +514,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
512
514
|
}
|
|
513
515
|
element.setAttribute('aria-selected', 'true');
|
|
514
516
|
if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
|
|
515
|
-
var ariaValue = element.
|
|
516
|
-
if (
|
|
517
|
+
var ariaValue = element.getElementsByClassName('e-check').length;
|
|
518
|
+
if (ariaValue === 0) {
|
|
517
519
|
var args = {
|
|
518
520
|
module: 'CheckBoxSelection',
|
|
519
521
|
enable: this.mode === 'CheckBox',
|
|
@@ -637,9 +639,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
637
639
|
/**
|
|
638
640
|
* To filter the multiselect data from given data source by using query
|
|
639
641
|
*
|
|
640
|
-
* @param
|
|
641
|
-
* @param
|
|
642
|
-
* @param
|
|
642
|
+
* @param {Object[] | DataManager } dataSource - Set the data source to filter.
|
|
643
|
+
* @param {Query} query - Specify the query to filter the data.
|
|
644
|
+
* @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.
|
|
643
645
|
* @returns {void}
|
|
644
646
|
*/
|
|
645
647
|
MultiSelect.prototype.filter = function (dataSource, query, fields) {
|
|
@@ -906,11 +908,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
906
908
|
}
|
|
907
909
|
};
|
|
908
910
|
MultiSelect.prototype.refreshInputHight = function () {
|
|
909
|
-
if (
|
|
910
|
-
this.
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
911
|
+
if (!isNullOrUndefined(this.searchWrapper)) {
|
|
912
|
+
if ((!this.value || !this.value.length) && (isNullOrUndefined(this.text) || this.text === '')) {
|
|
913
|
+
this.searchWrapper.classList.remove(ZERO_SIZE);
|
|
914
|
+
}
|
|
915
|
+
else {
|
|
916
|
+
this.searchWrapper.classList.add(ZERO_SIZE);
|
|
917
|
+
}
|
|
914
918
|
}
|
|
915
919
|
};
|
|
916
920
|
MultiSelect.prototype.validateValues = function (newValue, oldValue) {
|
|
@@ -1711,7 +1715,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1711
1715
|
HIDE_LIST :
|
|
1712
1716
|
dropDownBaseClasses.selected);
|
|
1713
1717
|
if (this.mode === 'CheckBox') {
|
|
1714
|
-
element2.firstElementChild.setAttribute('aria-checked', 'false');
|
|
1715
1718
|
removeClass([element2.firstElementChild.lastElementChild], 'e-check');
|
|
1716
1719
|
}
|
|
1717
1720
|
}
|
|
@@ -1721,7 +1724,6 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1721
1724
|
HIDE_LIST :
|
|
1722
1725
|
dropDownBaseClasses.selected);
|
|
1723
1726
|
if (this.mode === 'CheckBox') {
|
|
1724
|
-
element2.firstElementChild.setAttribute('aria-checked', 'true');
|
|
1725
1727
|
addClass([element2.firstElementChild.lastElementChild], 'e-check');
|
|
1726
1728
|
}
|
|
1727
1729
|
}
|
|
@@ -1982,109 +1984,111 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1982
1984
|
_super.prototype.render.call(this);
|
|
1983
1985
|
}
|
|
1984
1986
|
if (!this.popupObj) {
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
checkboxFilter.
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
this.
|
|
1995
|
-
|
|
1996
|
-
}
|
|
1997
|
-
append([this.list], this.popupWrapper);
|
|
1998
|
-
if (this.footerTemplate) {
|
|
1999
|
-
this.setFooterTemplate();
|
|
2000
|
-
overAllHeight -= this.footer.offsetHeight;
|
|
2001
|
-
}
|
|
2002
|
-
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
2003
|
-
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2004
|
-
overAllHeight -= this.selectAllHeight;
|
|
2005
|
-
}
|
|
2006
|
-
else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {
|
|
2007
|
-
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2008
|
-
overAllHeight = parseInt(this.popupHeight, 10);
|
|
2009
|
-
}
|
|
2010
|
-
else if (this.mode === 'CheckBox' && !this.showSelectAll) {
|
|
2011
|
-
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2012
|
-
overAllHeight = parseInt(this.popupHeight, 10);
|
|
2013
|
-
if (this.headerTemplate && this.header) {
|
|
1987
|
+
if (!isNullOrUndefined(this.popupWrapper)) {
|
|
1988
|
+
document.body.appendChild(this.popupWrapper);
|
|
1989
|
+
var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);
|
|
1990
|
+
if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {
|
|
1991
|
+
checkboxFilter.remove();
|
|
1992
|
+
this.filterParent = null;
|
|
1993
|
+
}
|
|
1994
|
+
var overAllHeight = parseInt(this.popupHeight, 10);
|
|
1995
|
+
this.popupWrapper.style.visibility = 'hidden';
|
|
1996
|
+
if (this.headerTemplate) {
|
|
1997
|
+
this.setHeaderTemplate();
|
|
2014
1998
|
overAllHeight -= this.header.offsetHeight;
|
|
2015
1999
|
}
|
|
2016
|
-
|
|
2000
|
+
append([this.list], this.popupWrapper);
|
|
2001
|
+
if (this.footerTemplate) {
|
|
2002
|
+
this.setFooterTemplate();
|
|
2017
2003
|
overAllHeight -= this.footer.offsetHeight;
|
|
2018
2004
|
}
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
module: 'CheckBoxSelection',
|
|
2023
|
-
enable: this.mode === 'CheckBox',
|
|
2024
|
-
popupElement: this.popupWrapper
|
|
2025
|
-
};
|
|
2026
|
-
if (this.allowFiltering) {
|
|
2027
|
-
this.notify('searchBox', args);
|
|
2028
|
-
overAllHeight -= this.searchBoxHeight;
|
|
2005
|
+
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
2006
|
+
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2007
|
+
overAllHeight -= this.selectAllHeight;
|
|
2029
2008
|
}
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
this.
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
this.popupObj = new Popup(this.popupWrapper, {
|
|
2040
|
-
width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
|
|
2041
|
-
relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
|
|
2042
|
-
enableRtl: this.enableRtl, zIndex: this.zIndex,
|
|
2043
|
-
close: function () {
|
|
2044
|
-
if (_this.popupObj.element.parentElement) {
|
|
2045
|
-
_this.popupObj.unwireScrollEvents();
|
|
2046
|
-
// For restrict the page scrolling in safari browser
|
|
2047
|
-
var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);
|
|
2048
|
-
if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
|
|
2049
|
-
checkboxFilterInput.blur();
|
|
2050
|
-
}
|
|
2051
|
-
detach(_this.popupObj.element);
|
|
2052
|
-
}
|
|
2053
|
-
},
|
|
2054
|
-
open: function () {
|
|
2055
|
-
_this.popupObj.resolveCollision();
|
|
2056
|
-
if (!_this.isFirstClick) {
|
|
2057
|
-
var ulElement = _this.list.querySelector('ul');
|
|
2058
|
-
if (ulElement) {
|
|
2059
|
-
if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
|
|
2060
|
-
_this.targetElement().trim() !== '')) {
|
|
2061
|
-
_this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
_this.isFirstClick = true;
|
|
2009
|
+
else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {
|
|
2010
|
+
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2011
|
+
overAllHeight = parseInt(this.popupHeight, 10);
|
|
2012
|
+
}
|
|
2013
|
+
else if (this.mode === 'CheckBox' && !this.showSelectAll) {
|
|
2014
|
+
this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2015
|
+
overAllHeight = parseInt(this.popupHeight, 10);
|
|
2016
|
+
if (this.headerTemplate && this.header) {
|
|
2017
|
+
overAllHeight -= this.header.offsetHeight;
|
|
2065
2018
|
}
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
_this.targetElement().trim() !== '')) {
|
|
2069
|
-
_this.loadTemplate();
|
|
2019
|
+
if (this.footerTemplate && this.footer) {
|
|
2020
|
+
overAllHeight -= this.footer.offsetHeight;
|
|
2070
2021
|
}
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2022
|
+
}
|
|
2023
|
+
if (this.mode === 'CheckBox') {
|
|
2024
|
+
var args = {
|
|
2025
|
+
module: 'CheckBoxSelection',
|
|
2026
|
+
enable: this.mode === 'CheckBox',
|
|
2027
|
+
popupElement: this.popupWrapper
|
|
2028
|
+
};
|
|
2029
|
+
if (this.allowFiltering) {
|
|
2030
|
+
this.notify('searchBox', args);
|
|
2031
|
+
overAllHeight -= this.searchBoxHeight;
|
|
2076
2032
|
}
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2033
|
+
addClass([this.popupWrapper], 'e-checkbox');
|
|
2034
|
+
}
|
|
2035
|
+
if (this.popupHeight !== 'auto') {
|
|
2036
|
+
this.list.style.maxHeight = formatUnit(overAllHeight);
|
|
2037
|
+
this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);
|
|
2038
|
+
}
|
|
2039
|
+
else {
|
|
2040
|
+
this.list.style.maxHeight = formatUnit(this.popupHeight);
|
|
2041
|
+
}
|
|
2042
|
+
this.popupObj = new Popup(this.popupWrapper, {
|
|
2043
|
+
width: this.calcPopupWidth(), targetType: 'relative', position: { X: 'left', Y: 'bottom' },
|
|
2044
|
+
relateTo: this.overAllWrapper, collision: { X: 'flip', Y: 'flip' }, offsetY: 1,
|
|
2045
|
+
enableRtl: this.enableRtl, zIndex: this.zIndex,
|
|
2046
|
+
close: function () {
|
|
2047
|
+
if (_this.popupObj.element.parentElement) {
|
|
2048
|
+
_this.popupObj.unwireScrollEvents();
|
|
2049
|
+
// For restrict the page scrolling in safari browser
|
|
2050
|
+
var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);
|
|
2051
|
+
if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {
|
|
2052
|
+
checkboxFilterInput.blur();
|
|
2053
|
+
}
|
|
2054
|
+
detach(_this.popupObj.element);
|
|
2055
|
+
}
|
|
2056
|
+
},
|
|
2057
|
+
open: function () {
|
|
2058
|
+
_this.popupObj.resolveCollision();
|
|
2059
|
+
if (!_this.isFirstClick) {
|
|
2060
|
+
var ulElement = _this.list.querySelector('ul');
|
|
2061
|
+
if (ulElement) {
|
|
2062
|
+
if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
|
|
2063
|
+
_this.targetElement().trim() !== '')) {
|
|
2064
|
+
_this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
_this.isFirstClick = true;
|
|
2068
|
+
}
|
|
2069
|
+
_this.popupObj.wireScrollEvents();
|
|
2070
|
+
if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&
|
|
2071
|
+
_this.targetElement().trim() !== '')) {
|
|
2072
|
+
_this.loadTemplate();
|
|
2073
|
+
}
|
|
2074
|
+
_this.setScrollPosition();
|
|
2075
|
+
if (_this.allowFiltering) {
|
|
2076
|
+
_this.notify('inputFocus', {
|
|
2077
|
+
module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'focus'
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
}, targetExitViewport: function () {
|
|
2081
|
+
if (!Browser.isDevice) {
|
|
2082
|
+
_this.hidePopup();
|
|
2083
|
+
}
|
|
2080
2084
|
}
|
|
2085
|
+
});
|
|
2086
|
+
if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering) {
|
|
2087
|
+
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2081
2088
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });
|
|
2089
|
+
this.popupObj.close();
|
|
2090
|
+
this.popupWrapper.style.visibility = '';
|
|
2085
2091
|
}
|
|
2086
|
-
this.popupObj.close();
|
|
2087
|
-
this.popupWrapper.style.visibility = '';
|
|
2088
2092
|
}
|
|
2089
2093
|
};
|
|
2090
2094
|
MultiSelect.prototype.setHeaderTemplate = function () {
|
|
@@ -2347,7 +2351,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2347
2351
|
var temp;
|
|
2348
2352
|
var tempData = this.listData;
|
|
2349
2353
|
this.listData = this.mainData;
|
|
2350
|
-
this.hiddenElement
|
|
2354
|
+
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
2355
|
+
this.hiddenElement.innerHTML = '';
|
|
2356
|
+
}
|
|
2351
2357
|
if (!isNullOrUndefined(this.value)) {
|
|
2352
2358
|
for (var index = 0; !isNullOrUndefined(this.value[index]); index++) {
|
|
2353
2359
|
var listValue = this.findListElement(((!isNullOrUndefined(this.mainList)) ? this.mainList : this.ulElement), 'li', 'data-value', this.value[index]);
|
|
@@ -2365,7 +2371,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2365
2371
|
data += temp + delimiterChar + ' ';
|
|
2366
2372
|
text.push(temp);
|
|
2367
2373
|
}
|
|
2368
|
-
this.hiddenElement
|
|
2374
|
+
if (!isNullOrUndefined(this.hiddenElement)) {
|
|
2375
|
+
this.hiddenElement.innerHTML += '<option selected value ="' + this.value[index] + '">' + index + '</option>';
|
|
2376
|
+
}
|
|
2369
2377
|
}
|
|
2370
2378
|
}
|
|
2371
2379
|
this.setProperties({ text: text.toString() }, true);
|
|
@@ -2577,10 +2585,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2577
2585
|
selectItems[temp1 - 1].setAttribute('aria-selected', 'false');
|
|
2578
2586
|
if (this.mode === 'CheckBox') {
|
|
2579
2587
|
if (selectedItems && (selectedItems.length > (temp1 - 1))) {
|
|
2580
|
-
selectedItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
|
|
2581
2588
|
removeClass([selectedItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
|
|
2582
2589
|
}
|
|
2583
|
-
selectItems[temp1 - 1].firstElementChild.setAttribute('aria-checked', 'false');
|
|
2584
2590
|
removeClass([selectItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');
|
|
2585
2591
|
}
|
|
2586
2592
|
temp1--;
|
|
@@ -2638,9 +2644,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2638
2644
|
addClass([element], className);
|
|
2639
2645
|
this.updateMainList(false, element.getAttribute('data-value'), mainElement);
|
|
2640
2646
|
element.setAttribute('aria-selected', 'true');
|
|
2641
|
-
if (this.mode === 'CheckBox') {
|
|
2642
|
-
var ariaCheck = element.
|
|
2643
|
-
if (ariaCheck ===
|
|
2647
|
+
if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {
|
|
2648
|
+
var ariaCheck = element.getElementsByClassName('e-check').length;
|
|
2649
|
+
if (ariaCheck === 0) {
|
|
2644
2650
|
this.notify('updatelist', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: this });
|
|
2645
2651
|
}
|
|
2646
2652
|
}
|
|
@@ -2959,9 +2965,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2959
2965
|
if (this.chipCollectionWrapper) {
|
|
2960
2966
|
this.chipCollectionWrapper.style.display = 'none';
|
|
2961
2967
|
}
|
|
2962
|
-
this.viewWrapper
|
|
2963
|
-
|
|
2964
|
-
|
|
2968
|
+
if (!isNullOrUndefined(this.viewWrapper)) {
|
|
2969
|
+
this.viewWrapper.style.display = '';
|
|
2970
|
+
this.viewWrapper.style.width = '';
|
|
2971
|
+
this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
|
|
2972
|
+
}
|
|
2965
2973
|
if (this.value && this.value.length) {
|
|
2966
2974
|
var data = '';
|
|
2967
2975
|
var temp = void 0;
|
|
@@ -3049,8 +3057,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3049
3057
|
}
|
|
3050
3058
|
}
|
|
3051
3059
|
else {
|
|
3052
|
-
this.viewWrapper
|
|
3053
|
-
|
|
3060
|
+
if (!isNullOrUndefined(this.viewWrapper)) {
|
|
3061
|
+
this.viewWrapper.innerHTML = '';
|
|
3062
|
+
this.viewWrapper.style.display = 'none';
|
|
3063
|
+
}
|
|
3054
3064
|
}
|
|
3055
3065
|
};
|
|
3056
3066
|
MultiSelect.prototype.checkClearIconWidth = function () {
|
|
@@ -3123,29 +3133,41 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3123
3133
|
return temp;
|
|
3124
3134
|
};
|
|
3125
3135
|
MultiSelect.prototype.unWireEvent = function () {
|
|
3126
|
-
|
|
3136
|
+
if (!isNullOrUndefined(this.componentWrapper)) {
|
|
3137
|
+
EventHandler.remove(this.componentWrapper, 'mousedown', this.wrapperClick);
|
|
3138
|
+
}
|
|
3127
3139
|
EventHandler.remove(window, 'resize', this.windowResize);
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3140
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
3141
|
+
EventHandler.remove(this.inputElement, 'focus', this.focusInHandler);
|
|
3142
|
+
EventHandler.remove(this.inputElement, 'keydown', this.onKeyDown);
|
|
3143
|
+
if (this.mode !== 'CheckBox') {
|
|
3144
|
+
EventHandler.remove(this.inputElement, 'input', this.onInput);
|
|
3145
|
+
}
|
|
3146
|
+
EventHandler.remove(this.inputElement, 'keyup', this.keyUp);
|
|
3147
|
+
var formElement = closest(this.inputElement, 'form');
|
|
3148
|
+
if (formElement) {
|
|
3149
|
+
EventHandler.remove(formElement, 'reset', this.resetValueHandler);
|
|
3150
|
+
}
|
|
3151
|
+
EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
|
|
3132
3152
|
}
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3153
|
+
if (!isNullOrUndefined(this.componentWrapper)) {
|
|
3154
|
+
EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
|
|
3155
|
+
EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
|
|
3156
|
+
}
|
|
3157
|
+
if (!isNullOrUndefined(this.overAllClear)) {
|
|
3158
|
+
EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
|
|
3159
|
+
}
|
|
3160
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
3161
|
+
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
3137
3162
|
}
|
|
3138
|
-
EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
|
|
3139
|
-
EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
|
|
3140
|
-
EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
|
|
3141
|
-
EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
|
|
3142
|
-
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
3143
3163
|
};
|
|
3144
3164
|
MultiSelect.prototype.selectAllItem = function (state, event, list) {
|
|
3145
3165
|
var li;
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3166
|
+
if (!isNullOrUndefined(this.list)) {
|
|
3167
|
+
li = this.list.querySelectorAll(state ?
|
|
3168
|
+
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide)' :
|
|
3169
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide)');
|
|
3170
|
+
}
|
|
3149
3171
|
if (this.value && this.value.length && event && event.target
|
|
3150
3172
|
&& closest(event.target, '.e-close-hooker') && this.allowFiltering) {
|
|
3151
3173
|
li = this.mainList.querySelectorAll(state ?
|
|
@@ -3647,7 +3669,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3647
3669
|
* Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,
|
|
3648
3670
|
* but you can insert based on the index parameter.
|
|
3649
3671
|
*
|
|
3650
|
-
* @param
|
|
3672
|
+
* @param { Object[] } items - Specifies an array of JSON data or a JSON data.
|
|
3651
3673
|
* @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.
|
|
3652
3674
|
* @returns {void}
|
|
3653
3675
|
*/
|
|
@@ -3958,11 +3980,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3958
3980
|
}
|
|
3959
3981
|
};
|
|
3960
3982
|
MultiSelect.prototype.addValidInputClass = function () {
|
|
3961
|
-
if (
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3983
|
+
if (!isNullOrUndefined(this.overAllWrapper)) {
|
|
3984
|
+
if ((!isNullOrUndefined(this.value) && this.value.length) || this.floatLabelType === 'Always') {
|
|
3985
|
+
addClass([this.overAllWrapper], 'e-valid-input');
|
|
3986
|
+
}
|
|
3987
|
+
else {
|
|
3988
|
+
removeClass([this.overAllWrapper], 'e-valid-input');
|
|
3989
|
+
}
|
|
3966
3990
|
}
|
|
3967
3991
|
};
|
|
3968
3992
|
MultiSelect.prototype.dropDownIcon = function () {
|
|
@@ -4015,13 +4039,17 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4015
4039
|
_super.prototype.destroy.call(this);
|
|
4016
4040
|
var temp = ['readonly', 'aria-disabled', 'placeholder'];
|
|
4017
4041
|
var length = temp.length;
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4042
|
+
if (!isNullOrUndefined(this.inputElement)) {
|
|
4043
|
+
while (length > 0) {
|
|
4044
|
+
this.inputElement.removeAttribute(temp[length - 1]);
|
|
4045
|
+
length--;
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
if (!isNullOrUndefined(this.element)) {
|
|
4049
|
+
this.element.removeAttribute('data-initial-value');
|
|
4050
|
+
this.element.style.display = 'block';
|
|
4021
4051
|
}
|
|
4022
|
-
this.
|
|
4023
|
-
this.element.style.display = 'block';
|
|
4024
|
-
if (this.overAllWrapper.parentElement) {
|
|
4052
|
+
if (this.overAllWrapper && this.overAllWrapper.parentElement) {
|
|
4025
4053
|
if (this.overAllWrapper.parentElement.tagName === this.getNgDirective()) {
|
|
4026
4054
|
remove(this.overAllWrapper);
|
|
4027
4055
|
}
|
|
@@ -4030,6 +4058,25 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4030
4058
|
remove(this.overAllWrapper);
|
|
4031
4059
|
}
|
|
4032
4060
|
}
|
|
4061
|
+
this.componentWrapper = null;
|
|
4062
|
+
this.overAllClear = null;
|
|
4063
|
+
this.overAllWrapper = null;
|
|
4064
|
+
this.hiddenElement = null;
|
|
4065
|
+
this.searchWrapper = null;
|
|
4066
|
+
this.viewWrapper = null;
|
|
4067
|
+
this.chipCollectionWrapper = null;
|
|
4068
|
+
this.targetInputElement = null;
|
|
4069
|
+
this.popupWrapper = null;
|
|
4070
|
+
this.inputElement = null;
|
|
4071
|
+
this.delimiterWrapper = null;
|
|
4072
|
+
this.popupObj = null;
|
|
4073
|
+
this.popupWrapper = null;
|
|
4074
|
+
this.liCollections = null;
|
|
4075
|
+
this.header = null;
|
|
4076
|
+
this.mainList = null;
|
|
4077
|
+
this.mainListCollection = null;
|
|
4078
|
+
this.footer = null;
|
|
4079
|
+
this.selectAllEventEle = null;
|
|
4033
4080
|
};
|
|
4034
4081
|
__decorate([
|
|
4035
4082
|
Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
|
|
@@ -988,10 +988,10 @@ ejs-dropdownlist {
|
|
|
988
988
|
box-shadow: none;
|
|
989
989
|
position: absolute;
|
|
990
990
|
}
|
|
991
|
-
.e-ddt.e-popup .e-active .e-checkbox-wrapper .e-frame:not(.e-check) {
|
|
991
|
+
.e-ddt.e-popup .e-active .e-checkbox-wrapper .e-frame:not(.e-check):not(.e-stop) {
|
|
992
992
|
background-color: #212529;
|
|
993
993
|
}
|
|
994
|
-
.e-ddt.e-popup .e-checkbox-wrapper .e-frame:not(.e-check) {
|
|
994
|
+
.e-ddt.e-popup .e-checkbox-wrapper .e-frame:not(.e-check):not(.e-stop) {
|
|
995
995
|
background-color: transparent;
|
|
996
996
|
}
|
|
997
997
|
.e-ddt.e-popup .e-selectall-parent {
|
package/styles/bootstrap5.css
CHANGED
|
@@ -988,10 +988,10 @@ ejs-dropdownlist {
|
|
|
988
988
|
box-shadow: none;
|
|
989
989
|
position: absolute;
|
|
990
990
|
}
|
|
991
|
-
.e-ddt.e-popup .e-active .e-checkbox-wrapper .e-frame:not(.e-check) {
|
|
991
|
+
.e-ddt.e-popup .e-active .e-checkbox-wrapper .e-frame:not(.e-check):not(.e-stop) {
|
|
992
992
|
background-color: #fff;
|
|
993
993
|
}
|
|
994
|
-
.e-ddt.e-popup .e-checkbox-wrapper .e-frame:not(.e-check) {
|
|
994
|
+
.e-ddt.e-popup .e-checkbox-wrapper .e-frame:not(.e-check):not(.e-stop) {
|
|
995
995
|
background-color: transparent;
|
|
996
996
|
}
|
|
997
997
|
.e-ddt.e-popup .e-selectall-parent {
|
|
@@ -20,6 +20,7 @@ $ddl-list-tap-color: transparent !default;
|
|
|
20
20
|
$ddl-list-header-border-color: 1px $grey-base !default;
|
|
21
21
|
$ddl-list-default-font-color: $grey-dark-font !default;
|
|
22
22
|
$ddl-list-active-border-color: $grey-white !default;
|
|
23
|
+
$mention-popup-bg-color: $grey-white !default;
|
|
23
24
|
$ddl-list-active-font-color: $brand-primary-font !default;
|
|
24
25
|
$mention-active-font-color: $brand-primary !default;
|
|
25
26
|
$ddl-list-active-bg-color: $brand-primary !default;
|
|
@@ -19,6 +19,7 @@ $ddl-list-tap-color: transparent !default;
|
|
|
19
19
|
$ddl-list-header-border-color: 1px $grey-base !default;
|
|
20
20
|
$ddl-list-default-font-color: $grey-light-font !default;
|
|
21
21
|
$ddl-list-active-border-color: $grey-white !default;
|
|
22
|
+
$mention-popup-bg-color: $grey-white !default;
|
|
22
23
|
$ddl-list-active-font-color: $brand-primary-font !default;
|
|
23
24
|
$mention-active-font-color: $brand-primary !default;
|
|
24
25
|
$ddl-list-active-bg-color: $brand-primary !default;
|
|
@@ -16,6 +16,7 @@ $ddl-list-header-bg-color: $white !default;
|
|
|
16
16
|
$ddl-list-tap-color: transparent !default;
|
|
17
17
|
$ddl-list-default-font-color: $gray-900 !default;
|
|
18
18
|
$ddl-list-active-border-color: $white !default;
|
|
19
|
+
$mention-popup-bg-color: $white !default;
|
|
19
20
|
$ddl-list-active-font-color: $primary-font !default;
|
|
20
21
|
$mention-active-font-color: $primary !default;
|
|
21
22
|
$ddl-list-active-bg-color: $primary !default;
|
|
@@ -56,6 +56,7 @@ $ddl-list-header-border-color: $border-light !default;
|
|
|
56
56
|
$ddl-nodata-font-color: $content-text-color !default;
|
|
57
57
|
$ddl-list-default-font-color: $content-text-color !default;
|
|
58
58
|
$ddl-list-active-border-color: $content-bg-color !default;
|
|
59
|
+
$mention-popup-bg-color: $content-bg-color !default;
|
|
59
60
|
$ddl-list-active-font-color: $content-text-color-selected !default;
|
|
60
61
|
$mention-active-font-color: $primary !default;
|
|
61
62
|
$ddl-list-active-bg-color: $content-bg-color-selected !default;
|
|
@@ -22,6 +22,7 @@ $ddl-list-tap-color: transparent !default;
|
|
|
22
22
|
$ddl-list-header-border-color: 1px $neutral-light !default;
|
|
23
23
|
$ddl-list-default-font-color: $neutral-light-font !default;
|
|
24
24
|
$ddl-list-active-border-color: $neutral-quintenary !default;
|
|
25
|
+
$mention-popup-bg-color: $neutral-quintenary !default;
|
|
25
26
|
$ddl-list-active-font-color: $neutral-light-font !default;
|
|
26
27
|
$mention-active-font-color: $theme-primary !default;
|
|
27
28
|
$ddl-list-active-bg-color: $neutral-quintenary !default;
|
|
@@ -21,6 +21,7 @@ $ddl-list-tap-color: transparent !default;
|
|
|
21
21
|
$ddl-list-header-border-color: 1px $neutral-light !default;
|
|
22
22
|
$ddl-list-default-font-color: rgba($neutral-light-font, .87) !default;
|
|
23
23
|
$ddl-list-active-border-color: $neutral-white !default;
|
|
24
|
+
$mention-popup-bg-color: $neutral-white !default;
|
|
24
25
|
$ddl-list-active-font-color: $neutral-light-font !default;
|
|
25
26
|
$mention-active-font-color: $theme-primary !default;
|
|
26
27
|
$ddl-list-active-bg-color: $theme-lighter !default;
|
|
@@ -58,6 +58,7 @@ $ddl-list-header-border-color: $border-light !default;
|
|
|
58
58
|
$ddl-nodata-font-color: $flyout-text-color !default;
|
|
59
59
|
$ddl-list-default-font-color: $flyout-text-color !default;
|
|
60
60
|
$ddl-list-active-border-color: $flyout-bg-color !default;
|
|
61
|
+
$mention-popup-bg-color: $flyout-bg-color !default;
|
|
61
62
|
$ddl-list-active-font-color: $content-text-color !default;
|
|
62
63
|
$mention-active-font-color: $primary !default;
|
|
63
64
|
$ddl-list-active-bg-color: $flyout-bg-color-selected !default;
|