@syncfusion/ej2-dropdowns 27.1.52 → 27.1.55
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/.eslintrc.json +261 -0
- 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 +105 -37
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +105 -37
- 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 +9 -9
- package/src/drop-down-base/drop-down-base.js +4 -0
- package/src/drop-down-list/drop-down-list.js +2 -2
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/list-box/list-box.js +8 -2
- package/src/multi-select/multi-select.js +90 -32
- package/styles/bootstrap-dark-lite.css +1 -0
- package/styles/bootstrap-dark.css +1 -0
- package/styles/bootstrap-lite.css +1 -0
- package/styles/bootstrap.css +1 -0
- package/styles/bootstrap4-lite.css +1 -0
- package/styles/bootstrap4.css +1 -0
- package/styles/bootstrap5-dark-lite.css +1 -0
- package/styles/bootstrap5-dark.css +1 -0
- package/styles/bootstrap5-lite.css +1 -0
- package/styles/bootstrap5.3-lite.css +1 -0
- package/styles/bootstrap5.3.css +1 -0
- package/styles/bootstrap5.css +1 -0
- package/styles/drop-down-list/_layout.scss +1 -0
- package/styles/drop-down-list/bootstrap-dark.css +1 -0
- package/styles/drop-down-list/bootstrap.css +1 -0
- package/styles/drop-down-list/bootstrap4.css +1 -0
- package/styles/drop-down-list/bootstrap5-dark.css +1 -0
- package/styles/drop-down-list/bootstrap5.3.css +1 -0
- package/styles/drop-down-list/bootstrap5.css +1 -0
- package/styles/drop-down-list/fabric-dark.css +1 -0
- package/styles/drop-down-list/fabric.css +1 -0
- package/styles/drop-down-list/fluent-dark.css +1 -0
- package/styles/drop-down-list/fluent.css +1 -0
- package/styles/drop-down-list/fluent2.css +1 -0
- package/styles/drop-down-list/highcontrast-light.css +1 -0
- package/styles/drop-down-list/highcontrast.css +1 -0
- package/styles/drop-down-list/material-dark.css +1 -0
- package/styles/drop-down-list/material.css +1 -0
- package/styles/drop-down-list/material3-dark.css +1 -0
- package/styles/drop-down-list/material3.css +1 -0
- package/styles/drop-down-list/tailwind-dark.css +1 -0
- package/styles/drop-down-list/tailwind.css +1 -0
- package/styles/fabric-dark-lite.css +1 -0
- package/styles/fabric-dark.css +1 -0
- package/styles/fabric-lite.css +1 -0
- package/styles/fabric.css +1 -0
- package/styles/fluent-dark-lite.css +1 -0
- package/styles/fluent-dark.css +1 -0
- package/styles/fluent-lite.css +1 -0
- package/styles/fluent.css +1 -0
- package/styles/fluent2-lite.css +1 -0
- package/styles/fluent2.css +1 -0
- package/styles/highcontrast-light-lite.css +1 -0
- package/styles/highcontrast-light.css +1 -0
- package/styles/highcontrast-lite.css +1 -0
- package/styles/highcontrast.css +1 -0
- package/styles/material-dark-lite.css +1 -0
- package/styles/material-dark.css +1 -0
- package/styles/material-lite.css +1 -0
- package/styles/material.css +1 -0
- package/styles/material3-dark-lite.css +1 -0
- package/styles/material3-dark.css +1 -0
- package/styles/material3-lite.css +1 -0
- package/styles/material3.css +1 -0
- package/styles/tailwind-dark-lite.css +1 -0
- package/styles/tailwind-dark.css +1 -0
- package/styles/tailwind-lite.css +1 -0
- package/styles/tailwind.css +1 -0
- package/tslint.json +111 -0
|
@@ -2041,6 +2041,10 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2041
2041
|
DropDownBase.prototype.renderItems = function (listData, fields, isCheckBoxUpdate) {
|
|
2042
2042
|
var ulElement;
|
|
2043
2043
|
if (this.itemTemplate && listData) {
|
|
2044
|
+
if (this.getModuleName() === 'multiselect' && this.virtualSelectAll) {
|
|
2045
|
+
this.virtualSelectAllData = listData;
|
|
2046
|
+
listData = listData.slice(this.virtualItemStartIndex, this.virtualItemEndIndex);
|
|
2047
|
+
}
|
|
2044
2048
|
var dataSource = listData;
|
|
2045
2049
|
if (dataSource && fields.groupBy) {
|
|
2046
2050
|
if (this.sortOrder !== 'None') {
|
|
@@ -5127,7 +5131,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5127
5131
|
if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
|
|
5128
5132
|
var value_2 = this.getItemData().value;
|
|
5129
5133
|
var isExist = listData.some(function (data) {
|
|
5130
|
-
return (((typeof data === 'string' || typeof data === 'number') && data === value_2) ||
|
|
5134
|
+
return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value_2) ||
|
|
5131
5135
|
(getValue(_this.fields.value, data) === value_2));
|
|
5132
5136
|
});
|
|
5133
5137
|
if (!isExist) {
|
|
@@ -5432,7 +5436,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5432
5436
|
_this.isNotSearchList = false;
|
|
5433
5437
|
_this.isDocumentClick = false;
|
|
5434
5438
|
_this.destroyPopup();
|
|
5435
|
-
if (_this.isFiltering() && _this.actionCompleteData.list && _this.actionCompleteData.list
|
|
5439
|
+
if (_this.isFiltering() && _this.actionCompleteData.list && _this.actionCompleteData.list.length > 0) {
|
|
5436
5440
|
_this.isActive = true;
|
|
5437
5441
|
if (_this.enableVirtualization) {
|
|
5438
5442
|
_this.onActionComplete(_this.ulElement, _this.listData, null, true);
|
|
@@ -9173,7 +9177,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9173
9177
|
var id = getValue('id', args.data[0]).toString();
|
|
9174
9178
|
this.removeSelectedData(id, true);
|
|
9175
9179
|
}
|
|
9176
|
-
if (!this.isChipDelete && args.isInteracted) {
|
|
9180
|
+
if (!this.isChipDelete && args.isInteracted || (!this.isFilteredData && args.action === 'check' && this.isFromFilterChange)) {
|
|
9177
9181
|
this.setMultiSelect();
|
|
9178
9182
|
this.ensurePlaceHolder();
|
|
9179
9183
|
}
|
|
@@ -14905,7 +14909,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14905
14909
|
var value_1 = this.allowObjectBinding ?
|
|
14906
14910
|
getValue(((this.fields.value) ? this.fields.value : ''), this.value[this.value.length - 1]) :
|
|
14907
14911
|
this.value[this.value.length - 1];
|
|
14908
|
-
var temp =
|
|
14912
|
+
var temp = text;
|
|
14909
14913
|
var textValues = this.text != null && this.text !== '' ? this.text + ',' + temp : temp;
|
|
14910
14914
|
currentText.push(textValues);
|
|
14911
14915
|
this.setProperties({ text: currentText.toString() }, true);
|
|
@@ -14942,12 +14946,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14942
14946
|
removeClass(collection, 'e-disable');
|
|
14943
14947
|
}
|
|
14944
14948
|
};
|
|
14945
|
-
MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length) {
|
|
14949
|
+
MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length, dataValue, text) {
|
|
14946
14950
|
var _this = this;
|
|
14947
14951
|
var list = this.listData;
|
|
14948
14952
|
if (this.initStatus && !isNotTrigger) {
|
|
14949
14953
|
value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
|
|
14950
|
-
var val_2 = this.getDataByValue(value);
|
|
14954
|
+
var val_2 = dataValue ? dataValue : this.getDataByValue(value);
|
|
14951
14955
|
var eventArgs = {
|
|
14952
14956
|
e: eve,
|
|
14953
14957
|
item: element,
|
|
@@ -14981,16 +14985,26 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14981
14985
|
_this.selectedListData = [(_this.getDataByValue(value))];
|
|
14982
14986
|
}
|
|
14983
14987
|
else {
|
|
14984
|
-
if (
|
|
14985
|
-
|
|
14988
|
+
if (dataValue) {
|
|
14989
|
+
if (Array.isArray(_this.selectedListData)) {
|
|
14990
|
+
_this.selectedListData.push(dataValue);
|
|
14991
|
+
}
|
|
14992
|
+
else {
|
|
14993
|
+
_this.selectedListData = [_this.selectedListData, dataValue];
|
|
14994
|
+
}
|
|
14986
14995
|
}
|
|
14987
14996
|
else {
|
|
14988
|
-
|
|
14997
|
+
if (Array.isArray(_this.selectedListData)) {
|
|
14998
|
+
_this.selectedListData.push((_this.getDataByValue(value)));
|
|
14999
|
+
}
|
|
15000
|
+
else {
|
|
15001
|
+
_this.selectedListData = [_this.selectedListData, (_this.getDataByValue(value))];
|
|
15002
|
+
}
|
|
14989
15003
|
}
|
|
14990
15004
|
}
|
|
14991
15005
|
}
|
|
14992
15006
|
if ((_this.enableVirtualization && value) || !_this.enableVirtualization) {
|
|
14993
|
-
_this.updateListSelectEventCallback(value, element, eve);
|
|
15007
|
+
_this.updateListSelectEventCallback(value, element, eve, text);
|
|
14994
15008
|
}
|
|
14995
15009
|
if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== 'CheckBox') {
|
|
14996
15010
|
_super.prototype.scrollStop.call(_this);
|
|
@@ -16104,10 +16118,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16104
16118
|
this.removeValue(value, e, length);
|
|
16105
16119
|
}
|
|
16106
16120
|
};
|
|
16107
|
-
MultiSelect.prototype.updateListSelectEventCallback = function (value, li, e) {
|
|
16121
|
+
MultiSelect.prototype.updateListSelectEventCallback = function (value, li, e, currentText) {
|
|
16108
16122
|
var _this = this;
|
|
16109
16123
|
value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
|
|
16110
|
-
var text = this.getTextByValue(value);
|
|
16124
|
+
var text = currentText ? currentText : this.getTextByValue(value);
|
|
16111
16125
|
if ((this.allowCustomValue || this.allowFiltering) &&
|
|
16112
16126
|
!this.findListElement(this.mainList, 'li', 'data-value', value) &&
|
|
16113
16127
|
(!this.enableVirtualization || (this.enableVirtualization && this.virtualCustomData))) {
|
|
@@ -16954,7 +16968,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16954
16968
|
if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) &&
|
|
16955
16969
|
((!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0) ||
|
|
16956
16970
|
(_this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value)))) {
|
|
16957
|
-
|
|
16971
|
+
var value = obj[_this.fields.value];
|
|
16972
|
+
var text = (obj[_this.fields.text]).toString();
|
|
16973
|
+
_this.dispatchSelect(value, event, null, false, length, obj, text);
|
|
16958
16974
|
}
|
|
16959
16975
|
});
|
|
16960
16976
|
}
|
|
@@ -16964,7 +16980,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16964
16980
|
_this.updateValueState(event, _this.value, _this.tempValues);
|
|
16965
16981
|
_this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
|
|
16966
16982
|
}
|
|
16967
|
-
_this.updateHiddenElement();
|
|
16983
|
+
_this.updateHiddenElement(true);
|
|
16968
16984
|
if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
|
|
16969
16985
|
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
16970
16986
|
if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
|
|
@@ -17134,7 +17150,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17134
17150
|
}
|
|
17135
17151
|
}
|
|
17136
17152
|
};
|
|
17137
|
-
MultiSelect.prototype.updateHiddenElement = function () {
|
|
17153
|
+
MultiSelect.prototype.updateHiddenElement = function (isVirtualSelectAll) {
|
|
17138
17154
|
var _this = this;
|
|
17139
17155
|
var hiddenValue = '';
|
|
17140
17156
|
var wrapperText = '';
|
|
@@ -17143,20 +17159,24 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17143
17159
|
if (this.mode === 'CheckBox') {
|
|
17144
17160
|
this.value.map(function (value, index) {
|
|
17145
17161
|
hiddenValue += '<option selected value ="' + value + '">' + index + '</option>';
|
|
17146
|
-
if (
|
|
17147
|
-
|
|
17148
|
-
|
|
17149
|
-
|
|
17150
|
-
|
|
17162
|
+
if (!isVirtualSelectAll) {
|
|
17163
|
+
if (_this.listData) {
|
|
17164
|
+
data = _this.getTextByValue(value);
|
|
17165
|
+
}
|
|
17166
|
+
else {
|
|
17167
|
+
data = value;
|
|
17168
|
+
}
|
|
17169
|
+
wrapperText += data + _this.delimiterChar + ' ';
|
|
17170
|
+
text.push(data);
|
|
17151
17171
|
}
|
|
17152
|
-
wrapperText += data + _this.delimiterChar + ' ';
|
|
17153
|
-
text.push(data);
|
|
17154
17172
|
});
|
|
17155
17173
|
this.hiddenElement.innerHTML = hiddenValue;
|
|
17156
|
-
|
|
17174
|
+
if (!isVirtualSelectAll) {
|
|
17175
|
+
this.updateWrapperText(this.delimiterWrapper, wrapperText);
|
|
17176
|
+
this.setProperties({ text: text.toString() }, true);
|
|
17177
|
+
}
|
|
17157
17178
|
this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
|
|
17158
17179
|
this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
|
|
17159
|
-
this.setProperties({ text: text.toString() }, true);
|
|
17160
17180
|
this.refreshInputHight();
|
|
17161
17181
|
this.refreshPlaceHolder();
|
|
17162
17182
|
}
|
|
@@ -18185,20 +18205,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18185
18205
|
if (this.isReact) {
|
|
18186
18206
|
this.clearTemplate();
|
|
18187
18207
|
}
|
|
18188
|
-
if (this.popupObj) {
|
|
18208
|
+
if (!isNullOrUndefined(this.popupObj)) {
|
|
18189
18209
|
this.popupObj.hide();
|
|
18210
|
+
this.popupObj.destroy();
|
|
18190
18211
|
}
|
|
18191
18212
|
this.notify(destroy, {});
|
|
18192
18213
|
this.unwireListEvents();
|
|
18193
18214
|
this.unWireEvent();
|
|
18194
|
-
this.list = null;
|
|
18195
|
-
this.popupObj = null;
|
|
18196
|
-
this.mainList = null;
|
|
18197
|
-
this.mainData = null;
|
|
18198
|
-
this.filterParent = null;
|
|
18199
|
-
this.ulElement = null;
|
|
18200
|
-
this.mainListCollection = null;
|
|
18201
|
-
_super.prototype.destroy.call(this);
|
|
18202
18215
|
var temp = ['readonly', 'aria-disabled', 'placeholder', 'aria-label', 'aria-expanded'];
|
|
18203
18216
|
var length = temp.length;
|
|
18204
18217
|
if (!isNullOrUndefined(this.inputElement)) {
|
|
@@ -18220,6 +18233,56 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18220
18233
|
remove(this.overAllWrapper);
|
|
18221
18234
|
}
|
|
18222
18235
|
}
|
|
18236
|
+
if (this.popupWrapper && this.popupWrapper.parentElement) {
|
|
18237
|
+
this.popupWrapper.parentElement.remove();
|
|
18238
|
+
}
|
|
18239
|
+
while (this.searchWrapper && this.searchWrapper.firstChild) {
|
|
18240
|
+
this.searchWrapper.removeChild(this.searchWrapper.firstChild);
|
|
18241
|
+
}
|
|
18242
|
+
if (this.searchWrapper && this.searchWrapper.parentElement) {
|
|
18243
|
+
this.searchWrapper.parentElement.remove();
|
|
18244
|
+
}
|
|
18245
|
+
if (this.viewWrapper && this.viewWrapper.parentElement) {
|
|
18246
|
+
this.viewWrapper.parentElement.remove();
|
|
18247
|
+
}
|
|
18248
|
+
if (this.overAllClear && this.overAllClear.parentElement) {
|
|
18249
|
+
this.overAllClear.parentElement.remove();
|
|
18250
|
+
}
|
|
18251
|
+
if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
|
|
18252
|
+
this.delimiterWrapper.parentElement.remove();
|
|
18253
|
+
}
|
|
18254
|
+
// Remove the select element if it exists
|
|
18255
|
+
var selectElement = this.overAllWrapper.querySelector('select.e-multi-hidden');
|
|
18256
|
+
if (selectElement && selectElement.parentElement) {
|
|
18257
|
+
selectElement.parentElement.remove();
|
|
18258
|
+
}
|
|
18259
|
+
while (this.componentWrapper && this.componentWrapper.firstChild) {
|
|
18260
|
+
this.componentWrapper.removeChild(this.componentWrapper.firstChild);
|
|
18261
|
+
}
|
|
18262
|
+
if (this.componentWrapper && this.componentWrapper.parentElement) {
|
|
18263
|
+
this.componentWrapper.removeAttribute('class');
|
|
18264
|
+
this.componentWrapper.parentElement.remove();
|
|
18265
|
+
}
|
|
18266
|
+
while (this.popupWrapper && this.popupWrapper.firstChild) {
|
|
18267
|
+
this.popupWrapper.removeChild(this.popupWrapper.firstChild);
|
|
18268
|
+
}
|
|
18269
|
+
if (this.inputElement) {
|
|
18270
|
+
var attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
|
|
18271
|
+
'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
|
|
18272
|
+
'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-label', 'aria-hidden', 'tabindex', 'aria-controls',
|
|
18273
|
+
'aria-describedby', 'size', 'role', 'type', 'class'];
|
|
18274
|
+
for (var i = 0; i < attrArray.length; i++) {
|
|
18275
|
+
this.inputElement.removeAttribute(attrArray[i]);
|
|
18276
|
+
}
|
|
18277
|
+
}
|
|
18278
|
+
if (this.inputElement) {
|
|
18279
|
+
this.inputElement.remove();
|
|
18280
|
+
}
|
|
18281
|
+
this.list = null;
|
|
18282
|
+
this.popupObj = null;
|
|
18283
|
+
this.mainData = null;
|
|
18284
|
+
this.filterParent = null;
|
|
18285
|
+
this.ulElement = null;
|
|
18223
18286
|
this.componentWrapper = null;
|
|
18224
18287
|
this.overAllClear = null;
|
|
18225
18288
|
this.overAllWrapper = null;
|
|
@@ -18231,14 +18294,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18231
18294
|
this.popupWrapper = null;
|
|
18232
18295
|
this.inputElement = null;
|
|
18233
18296
|
this.delimiterWrapper = null;
|
|
18234
|
-
this.popupObj = null;
|
|
18235
|
-
this.popupWrapper = null;
|
|
18236
18297
|
this.liCollections = null;
|
|
18237
18298
|
this.header = null;
|
|
18238
18299
|
this.mainList = null;
|
|
18239
18300
|
this.mainListCollection = null;
|
|
18240
18301
|
this.footer = null;
|
|
18241
18302
|
this.selectAllEventEle = null;
|
|
18303
|
+
_super.prototype.destroy.call(this);
|
|
18242
18304
|
};
|
|
18243
18305
|
__decorate$5([
|
|
18244
18306
|
Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
|
|
@@ -19684,6 +19746,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19684
19746
|
liCollElem[i].classList.remove('e-grabbed');
|
|
19685
19747
|
}
|
|
19686
19748
|
}
|
|
19749
|
+
if (this.toolbarSettings.items.length > 0) {
|
|
19750
|
+
this.updateToolBarState();
|
|
19751
|
+
}
|
|
19752
|
+
else if (this.tBListBox && this.tBListBox.toolbarSettings.items.length > 0) {
|
|
19753
|
+
this.tBListBox.updateToolBarState();
|
|
19754
|
+
}
|
|
19687
19755
|
};
|
|
19688
19756
|
ListBox.prototype.updateListItems = function (sourceElem, destElem) {
|
|
19689
19757
|
destElem.innerHTML = '';
|
|
@@ -19769,9 +19837,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19769
19837
|
li.setAttribute('aria-disabled', 'true');
|
|
19770
19838
|
}
|
|
19771
19839
|
});
|
|
19772
|
-
if (this.allowFiltering && this.filterInput.value !== '' && this.toolbarSettings.items.length > 0) {
|
|
19840
|
+
if (this.allowFiltering && this.filterInput && this.filterInput.value !== '' && this.toolbarSettings.items.length > 0) {
|
|
19773
19841
|
var canDisable_1 = false;
|
|
19774
|
-
this.
|
|
19842
|
+
this.ulElement.childNodes.forEach(function (li) { if (!li.classList.contains('e-disabled')) {
|
|
19775
19843
|
canDisable_1 = true;
|
|
19776
19844
|
} });
|
|
19777
19845
|
if (!canDisable_1) {
|