@syncfusion/ej2-dropdowns 19.4.48 → 19.4.54
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 +20 -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 +82 -35
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +160 -107
- 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 +4 -1
- package/src/drop-down-base/drop-down-base.js +18 -6
- package/src/drop-down-list/drop-down-list.js +106 -71
- package/src/drop-down-tree/drop-down-tree.js +6 -14
- package/src/list-box/list-box.js +4 -3
- package/src/multi-select/multi-select.js +19 -9
- package/styles/bootstrap-dark.css +10 -1
- package/styles/bootstrap.css +10 -1
- package/styles/bootstrap4.css +10 -1
- package/styles/bootstrap5-dark.css +10 -1
- package/styles/bootstrap5.css +10 -1
- package/styles/fabric-dark.css +10 -1
- package/styles/fabric.css +10 -1
- package/styles/highcontrast-light.css +10 -1
- package/styles/highcontrast.css +10 -1
- package/styles/material-dark.css +10 -1
- package/styles/material.css +10 -1
- package/styles/multi-select/_layout.scss +10 -1
- package/styles/multi-select/bootstrap-dark.css +10 -1
- package/styles/multi-select/bootstrap.css +10 -1
- package/styles/multi-select/bootstrap4.css +10 -1
- package/styles/multi-select/bootstrap5-dark.css +10 -1
- package/styles/multi-select/bootstrap5.css +10 -1
- package/styles/multi-select/fabric-dark.css +10 -1
- package/styles/multi-select/fabric.css +10 -1
- package/styles/multi-select/highcontrast-light.css +10 -1
- package/styles/multi-select/highcontrast.css +10 -1
- package/styles/multi-select/material-dark.css +10 -1
- package/styles/multi-select/material.css +10 -1
- package/styles/multi-select/tailwind-dark.css +10 -1
- package/styles/multi-select/tailwind.css +10 -1
- package/styles/tailwind-dark.css +10 -1
- package/styles/tailwind.css +10 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.4.
|
|
3
|
+
* version : 19.4.54
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@19.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@19.4.52",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-v8d4a0WsySLBhChZCdhrgClOsP3repNCtMIjUhwp98d+pzv7z1QiyW2Z0u7eRNbdQPWE4gJZHFrjSInG5AXdUQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"/@syncfusion/ej2-spreadsheet",
|
|
34
34
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
35
35
|
],
|
|
36
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-19.4.
|
|
37
|
-
"_shasum": "
|
|
36
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-19.4.52.tgz",
|
|
37
|
+
"_shasum": "a464a23c5a0d878c17c8759e97fb57ee7995930e",
|
|
38
38
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
39
39
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
40
40
|
"author": {
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
},
|
|
43
43
|
"bundleDependencies": false,
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@syncfusion/ej2-base": "~19.4.
|
|
46
|
-
"@syncfusion/ej2-data": "~19.4.
|
|
47
|
-
"@syncfusion/ej2-inputs": "~19.4.
|
|
48
|
-
"@syncfusion/ej2-lists": "~19.4.
|
|
49
|
-
"@syncfusion/ej2-navigations": "~19.4.
|
|
50
|
-
"@syncfusion/ej2-popups": "~19.4.
|
|
45
|
+
"@syncfusion/ej2-base": "~19.4.52",
|
|
46
|
+
"@syncfusion/ej2-data": "~19.4.54",
|
|
47
|
+
"@syncfusion/ej2-inputs": "~19.4.52",
|
|
48
|
+
"@syncfusion/ej2-lists": "~19.4.52",
|
|
49
|
+
"@syncfusion/ej2-navigations": "~19.4.53",
|
|
50
|
+
"@syncfusion/ej2-popups": "~19.4.53"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"module": "./index.js",
|
|
73
73
|
"name": "@syncfusion/ej2-dropdowns",
|
|
74
74
|
"typings": "index.d.ts",
|
|
75
|
-
"version": "19.4.
|
|
75
|
+
"version": "19.4.54",
|
|
76
76
|
"sideEffects": false
|
|
77
77
|
}
|
|
@@ -216,12 +216,15 @@ var ComboBox = /** @class */ (function (_super) {
|
|
|
216
216
|
};
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
218
218
|
ComboBox.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
|
|
219
|
+
var _this = this;
|
|
219
220
|
_super.prototype.onActionComplete.call(this, ulElement, list, e);
|
|
220
221
|
if (this.isSelectCustom) {
|
|
221
222
|
this.removeSelection();
|
|
222
223
|
}
|
|
223
224
|
if (!this.preventAutoFill && this.getModuleName() === 'combobox' && this.isTyped) {
|
|
224
|
-
|
|
225
|
+
setTimeout(function () {
|
|
226
|
+
_this.inlineSearch();
|
|
227
|
+
});
|
|
225
228
|
}
|
|
226
229
|
};
|
|
227
230
|
ComboBox.prototype.getFocusElement = function () {
|
|
@@ -67,6 +67,7 @@ var HEADERTEMPLATE_PROPERTY = 'HeaderTemplate';
|
|
|
67
67
|
var FOOTERTEMPLATE_PROPERTY = 'FooterTemplate';
|
|
68
68
|
var NORECORDSTEMPLATE_PROPERTY = 'NoRecordsTemplate';
|
|
69
69
|
var ACTIONFAILURETEMPLATE_PROPERTY = 'ActionFailureTemplate';
|
|
70
|
+
var HIDE_GROUPLIST = 'e-hide-group-header';
|
|
70
71
|
/**
|
|
71
72
|
* DropDownBase component will generate the list items based on given data and act as base class to drop-down related components
|
|
72
73
|
*/
|
|
@@ -493,7 +494,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
493
494
|
}
|
|
494
495
|
_this.bindChildItems(localDataArgs.result, ulElement, fields);
|
|
495
496
|
setTimeout(function () {
|
|
496
|
-
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
|
|
497
|
+
if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && (ulElement.children[0].childElementCount > 0 || (_this.fields.groupBy && ulElement.children[1] && ulElement.children[1].childElementCount > 0)))) {
|
|
497
498
|
_this.updateDataList();
|
|
498
499
|
}
|
|
499
500
|
});
|
|
@@ -580,12 +581,23 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
580
581
|
if (this.isReact) {
|
|
581
582
|
this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
|
|
582
583
|
}
|
|
583
|
-
this.list.innerHTML = '';
|
|
584
584
|
this.fixedHeaderElement = isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement : null;
|
|
585
|
-
this.
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
585
|
+
if (this.getModuleName() === 'multiselect' && this.properties.allowCustomValue && this.fields.groupBy) {
|
|
586
|
+
for (var i = 0; i < ulElement.childElementCount; i++) {
|
|
587
|
+
if (ulElement.children[i].classList.contains('e-list-group-item')) {
|
|
588
|
+
if (isNullOrUndefined(ulElement.children[i].innerHTML) || ulElement.children[i].innerHTML == "") {
|
|
589
|
+
addClass([ulElement.children[i]], HIDE_GROUPLIST);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
if (!isNullOrUndefined(this.list)) {
|
|
595
|
+
this.list.innerHTML = '';
|
|
596
|
+
this.list.appendChild(ulElement);
|
|
597
|
+
this.liCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
598
|
+
this.ulElement = this.list.querySelector('ul');
|
|
599
|
+
this.postRender(this.list, list, this.bindEvent);
|
|
600
|
+
}
|
|
589
601
|
};
|
|
590
602
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
591
603
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
@@ -2238,160 +2238,195 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2238
2238
|
* @returns {void}
|
|
2239
2239
|
*/
|
|
2240
2240
|
DropDownList.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
2241
|
+
var _this = this;
|
|
2241
2242
|
if (this.getModuleName() === 'dropdownlist') {
|
|
2242
2243
|
this.checkData(newProp);
|
|
2243
2244
|
this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
|
|
2244
2245
|
}
|
|
2245
|
-
|
|
2246
|
-
var prop = _a[_i];
|
|
2246
|
+
var _loop_1 = function (prop) {
|
|
2247
2247
|
switch (prop) {
|
|
2248
2248
|
case 'query':
|
|
2249
2249
|
case 'dataSource': break;
|
|
2250
2250
|
case 'htmlAttributes':
|
|
2251
|
-
|
|
2251
|
+
this_1.setHTMLAttributes();
|
|
2252
2252
|
break;
|
|
2253
2253
|
case 'width':
|
|
2254
|
-
|
|
2254
|
+
this_1.setEleWidth(newProp.width);
|
|
2255
2255
|
break;
|
|
2256
2256
|
case 'placeholder':
|
|
2257
|
-
Input.setPlaceholder(newProp.placeholder,
|
|
2257
|
+
Input.setPlaceholder(newProp.placeholder, this_1.inputElement);
|
|
2258
2258
|
break;
|
|
2259
2259
|
case 'filterBarPlaceholder':
|
|
2260
|
-
if (
|
|
2261
|
-
Input.setPlaceholder(newProp.filterBarPlaceholder,
|
|
2260
|
+
if (this_1.filterInput) {
|
|
2261
|
+
Input.setPlaceholder(newProp.filterBarPlaceholder, this_1.filterInput);
|
|
2262
2262
|
}
|
|
2263
2263
|
break;
|
|
2264
2264
|
case 'readonly':
|
|
2265
|
-
if (
|
|
2266
|
-
Input.setReadonly(newProp.readonly,
|
|
2265
|
+
if (this_1.getModuleName() !== 'dropdownlist') {
|
|
2266
|
+
Input.setReadonly(newProp.readonly, this_1.inputElement);
|
|
2267
2267
|
}
|
|
2268
|
-
|
|
2268
|
+
this_1.setReadOnly();
|
|
2269
2269
|
break;
|
|
2270
2270
|
case 'cssClass':
|
|
2271
|
-
|
|
2271
|
+
this_1.setCssClass(newProp.cssClass, oldProp.cssClass);
|
|
2272
2272
|
break;
|
|
2273
2273
|
case 'enableRtl':
|
|
2274
|
-
|
|
2274
|
+
this_1.setEnableRtl();
|
|
2275
2275
|
break;
|
|
2276
2276
|
case 'enabled':
|
|
2277
|
-
|
|
2277
|
+
this_1.setEnable();
|
|
2278
2278
|
break;
|
|
2279
2279
|
case 'text':
|
|
2280
2280
|
if (newProp.text === null) {
|
|
2281
|
-
|
|
2281
|
+
this_1.clearAll();
|
|
2282
2282
|
break;
|
|
2283
2283
|
}
|
|
2284
|
-
if (!
|
|
2285
|
-
if (
|
|
2286
|
-
|
|
2284
|
+
if (!this_1.list) {
|
|
2285
|
+
if (this_1.dataSource instanceof DataManager) {
|
|
2286
|
+
this_1.initRemoteRender = true;
|
|
2287
2287
|
}
|
|
2288
|
-
|
|
2288
|
+
this_1.renderList();
|
|
2289
2289
|
}
|
|
2290
|
-
if (!
|
|
2291
|
-
var li =
|
|
2292
|
-
if (!
|
|
2293
|
-
if (
|
|
2294
|
-
|
|
2295
|
-
|
|
2290
|
+
if (!this_1.initRemoteRender) {
|
|
2291
|
+
var li = this_1.getElementByText(newProp.text);
|
|
2292
|
+
if (!this_1.checkValidLi(li)) {
|
|
2293
|
+
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
2294
|
+
this_1.getModuleName() === 'autocomplete' && this_1.listData.length > 100) {
|
|
2295
|
+
this_1.setSelectionData(newProp.text, oldProp.text, 'text');
|
|
2296
|
+
}
|
|
2297
|
+
else if (newProp.text && this_1.dataSource instanceof DataManager) {
|
|
2298
|
+
var listLength_1 = this_1.getItems().length;
|
|
2299
|
+
var checkField = isNullOrUndefined(this_1.fields.text) ? this_1.fields.value : this_1.fields.text;
|
|
2300
|
+
this_1.typedString = '';
|
|
2301
|
+
this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', newProp.text)))
|
|
2302
|
+
.then(function (e) {
|
|
2303
|
+
if (e.result.length > 0) {
|
|
2304
|
+
_this.addItem(e.result, listLength_1);
|
|
2305
|
+
_this.updateValues();
|
|
2306
|
+
}
|
|
2307
|
+
else {
|
|
2308
|
+
_this.setOldText(oldProp.text);
|
|
2309
|
+
}
|
|
2310
|
+
});
|
|
2296
2311
|
}
|
|
2297
2312
|
else {
|
|
2298
|
-
|
|
2313
|
+
this_1.setOldText(oldProp.text);
|
|
2299
2314
|
}
|
|
2300
2315
|
}
|
|
2301
|
-
|
|
2316
|
+
this_1.updateInputFields();
|
|
2302
2317
|
}
|
|
2303
2318
|
break;
|
|
2304
2319
|
case 'value':
|
|
2305
2320
|
if (newProp.value === null) {
|
|
2306
|
-
|
|
2321
|
+
this_1.clearAll();
|
|
2307
2322
|
break;
|
|
2308
2323
|
}
|
|
2309
|
-
|
|
2310
|
-
if (!
|
|
2311
|
-
if (
|
|
2312
|
-
|
|
2324
|
+
this_1.notify('beforeValueChange', { newProp: newProp }); // gird component value type change
|
|
2325
|
+
if (!this_1.list) {
|
|
2326
|
+
if (this_1.dataSource instanceof DataManager) {
|
|
2327
|
+
this_1.initRemoteRender = true;
|
|
2313
2328
|
}
|
|
2314
|
-
|
|
2329
|
+
this_1.renderList();
|
|
2315
2330
|
}
|
|
2316
|
-
if (!
|
|
2317
|
-
var item =
|
|
2318
|
-
if (!
|
|
2319
|
-
if (
|
|
2320
|
-
|
|
2321
|
-
|
|
2331
|
+
if (!this_1.initRemoteRender) {
|
|
2332
|
+
var item = this_1.getElementByValue(newProp.value);
|
|
2333
|
+
if (!this_1.checkValidLi(item)) {
|
|
2334
|
+
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
2335
|
+
this_1.getModuleName() === 'autocomplete' && this_1.listData.length > 100) {
|
|
2336
|
+
this_1.setSelectionData(newProp.value, oldProp.value, 'value');
|
|
2337
|
+
}
|
|
2338
|
+
else if (newProp.value && this_1.dataSource instanceof DataManager) {
|
|
2339
|
+
var listLength_2 = this_1.getItems().length;
|
|
2340
|
+
var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
|
|
2341
|
+
this_1.typedString = '';
|
|
2342
|
+
this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', newProp.value)))
|
|
2343
|
+
.then(function (e) {
|
|
2344
|
+
if (e.result.length > 0) {
|
|
2345
|
+
_this.addItem(e.result, listLength_2);
|
|
2346
|
+
_this.updateValues();
|
|
2347
|
+
}
|
|
2348
|
+
else {
|
|
2349
|
+
_this.setOldValue(oldProp.value);
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2322
2352
|
}
|
|
2323
2353
|
else {
|
|
2324
|
-
|
|
2354
|
+
this_1.setOldValue(oldProp.value);
|
|
2325
2355
|
}
|
|
2326
2356
|
}
|
|
2327
|
-
|
|
2328
|
-
|
|
2357
|
+
this_1.updateInputFields();
|
|
2358
|
+
this_1.preventChange = this_1.isAngular && this_1.preventChange ? !this_1.preventChange : this_1.preventChange;
|
|
2329
2359
|
}
|
|
2330
2360
|
break;
|
|
2331
2361
|
case 'index':
|
|
2332
2362
|
if (newProp.index === null) {
|
|
2333
|
-
|
|
2363
|
+
this_1.clearAll();
|
|
2334
2364
|
break;
|
|
2335
2365
|
}
|
|
2336
|
-
if (!
|
|
2337
|
-
if (
|
|
2338
|
-
|
|
2366
|
+
if (!this_1.list) {
|
|
2367
|
+
if (this_1.dataSource instanceof DataManager) {
|
|
2368
|
+
this_1.initRemoteRender = true;
|
|
2339
2369
|
}
|
|
2340
|
-
|
|
2370
|
+
this_1.renderList();
|
|
2341
2371
|
}
|
|
2342
|
-
if (!
|
|
2343
|
-
var element =
|
|
2344
|
-
if (!
|
|
2345
|
-
if (
|
|
2346
|
-
|
|
2347
|
-
|
|
2372
|
+
if (!this_1.initRemoteRender && this_1.liCollections) {
|
|
2373
|
+
var element = this_1.liCollections[newProp.index];
|
|
2374
|
+
if (!this_1.checkValidLi(element)) {
|
|
2375
|
+
if (this_1.liCollections && this_1.liCollections.length === 100 &&
|
|
2376
|
+
this_1.getModuleName() === 'autocomplete' && this_1.listData.length > 100) {
|
|
2377
|
+
this_1.setSelectionData(newProp.index, oldProp.index, 'index');
|
|
2348
2378
|
}
|
|
2349
2379
|
else {
|
|
2350
|
-
|
|
2380
|
+
this_1.index = oldProp.index;
|
|
2351
2381
|
}
|
|
2352
2382
|
}
|
|
2353
|
-
|
|
2383
|
+
this_1.updateInputFields();
|
|
2354
2384
|
}
|
|
2355
2385
|
break;
|
|
2356
2386
|
case 'footerTemplate':
|
|
2357
|
-
if (
|
|
2358
|
-
|
|
2387
|
+
if (this_1.popupObj) {
|
|
2388
|
+
this_1.setFooterTemplate(this_1.popupObj.element);
|
|
2359
2389
|
}
|
|
2360
2390
|
break;
|
|
2361
2391
|
case 'headerTemplate':
|
|
2362
|
-
if (
|
|
2363
|
-
|
|
2392
|
+
if (this_1.popupObj) {
|
|
2393
|
+
this_1.setHeaderTemplate(this_1.popupObj.element);
|
|
2364
2394
|
}
|
|
2365
2395
|
break;
|
|
2366
2396
|
case 'valueTemplate':
|
|
2367
|
-
if (!isNullOrUndefined(
|
|
2368
|
-
|
|
2397
|
+
if (!isNullOrUndefined(this_1.itemData) && this_1.valueTemplate != null) {
|
|
2398
|
+
this_1.setValueTemplate();
|
|
2369
2399
|
}
|
|
2370
2400
|
break;
|
|
2371
2401
|
case 'allowFiltering':
|
|
2372
|
-
if (
|
|
2373
|
-
|
|
2374
|
-
list:
|
|
2375
|
-
|
|
2376
|
-
|
|
2402
|
+
if (this_1.allowFiltering) {
|
|
2403
|
+
this_1.actionCompleteData = { ulElement: this_1.ulElement,
|
|
2404
|
+
list: this_1.listData, isUpdated: true };
|
|
2405
|
+
this_1.actionData = this_1.actionCompleteData;
|
|
2406
|
+
this_1.updateSelectElementData(this_1.allowFiltering);
|
|
2377
2407
|
}
|
|
2378
2408
|
break;
|
|
2379
2409
|
case 'floatLabelType':
|
|
2380
|
-
Input.removeFloating(
|
|
2381
|
-
Input.addFloating(
|
|
2410
|
+
Input.removeFloating(this_1.inputWrapper);
|
|
2411
|
+
Input.addFloating(this_1.inputElement, newProp.floatLabelType, this_1.placeholder, this_1.createElement);
|
|
2382
2412
|
break;
|
|
2383
2413
|
case 'showClearButton':
|
|
2384
|
-
Input.setClearButton(newProp.showClearButton,
|
|
2385
|
-
|
|
2414
|
+
Input.setClearButton(newProp.showClearButton, this_1.inputElement, this_1.inputWrapper, null, this_1.createElement);
|
|
2415
|
+
this_1.bindClearEvent();
|
|
2386
2416
|
break;
|
|
2387
2417
|
default:
|
|
2388
2418
|
{
|
|
2389
2419
|
// eslint-disable-next-line max-len
|
|
2390
|
-
var ddlProps =
|
|
2391
|
-
_super.prototype.onPropertyChanged.call(
|
|
2420
|
+
var ddlProps = this_1.getPropObject(prop, newProp, oldProp);
|
|
2421
|
+
_super.prototype.onPropertyChanged.call(this_1, ddlProps.newProperty, ddlProps.oldProperty);
|
|
2392
2422
|
}
|
|
2393
2423
|
break;
|
|
2394
2424
|
}
|
|
2425
|
+
};
|
|
2426
|
+
var this_1 = this;
|
|
2427
|
+
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
2428
|
+
var prop = _a[_i];
|
|
2429
|
+
_loop_1(prop);
|
|
2395
2430
|
}
|
|
2396
2431
|
};
|
|
2397
2432
|
DropDownList.prototype.checkValidLi = function (element) {
|
|
@@ -901,13 +901,10 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
901
901
|
var l10nLocale = { overflowCountTemplate: '+${count} more..', totalCountTemplate: '${count} selected' };
|
|
902
902
|
this.l10n = new L10n(this.getLocaleName(), l10nLocale, this.locale);
|
|
903
903
|
var remainContent = this.l10n.getConstant('overflowCountTemplate');
|
|
904
|
+
var totalContent = this.l10n.getConstant('totalCountTemplate');
|
|
904
905
|
var remainElement = this.createElement('span', { className: REMAIN_WRAPPER });
|
|
905
|
-
// eslint-disable-next-line
|
|
906
|
-
var compiledString = compile(remainContent);
|
|
907
|
-
// eslint-disable-next-line
|
|
908
|
-
var totalCompiledString = compile(this.l10n.getConstant('totalCountTemplate'));
|
|
909
|
-
remainElement.appendChild(compiledString({ 'count': this.value.length }, this, 'overflowCountTemplate', null, !this.isStringTemplate)[0]);
|
|
910
906
|
this.overFlowWrapper.appendChild(remainElement);
|
|
907
|
+
remainElement.innerText = remainContent.replace('${count}', this.value.length.toString());
|
|
911
908
|
var remainSize = remainElement.offsetWidth;
|
|
912
909
|
remove(remainElement);
|
|
913
910
|
if (this.showDropDownIcon) {
|
|
@@ -989,7 +986,7 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
989
986
|
}
|
|
990
987
|
}
|
|
991
988
|
if (remaining > 0) {
|
|
992
|
-
this.overFlowWrapper.appendChild(this.updateRemainTemplate(remainElement, remaining,
|
|
989
|
+
this.overFlowWrapper.appendChild(this.updateRemainTemplate(remainElement, remaining, remainContent, totalContent));
|
|
993
990
|
}
|
|
994
991
|
if (this.mode === 'Box' && !this.overFlowWrapper.classList.contains(TOTAL_COUNT_WRAPPER)) {
|
|
995
992
|
addClass([remainElement], REMAIN_COUNT);
|
|
@@ -1001,19 +998,14 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1001
998
|
}
|
|
1002
999
|
this.updateDelimMode();
|
|
1003
1000
|
};
|
|
1004
|
-
DropDownTree.prototype.updateRemainTemplate = function (remainElement, remaining,
|
|
1005
|
-
// eslint-disable-next-line
|
|
1006
|
-
compiledString,
|
|
1007
|
-
// eslint-disable-next-line
|
|
1008
|
-
totalCompiledString) {
|
|
1001
|
+
DropDownTree.prototype.updateRemainTemplate = function (remainElement, remaining, remainContent, totalContent) {
|
|
1009
1002
|
if (this.overFlowWrapper.firstChild && this.overFlowWrapper.firstChild.nodeType === 3 &&
|
|
1010
1003
|
this.overFlowWrapper.firstChild.nodeValue === '') {
|
|
1011
1004
|
this.overFlowWrapper.removeChild(this.overFlowWrapper.firstChild);
|
|
1012
1005
|
}
|
|
1013
1006
|
remainElement.innerHTML = '';
|
|
1014
|
-
remainElement.
|
|
1015
|
-
|
|
1016
|
-
totalCompiledString({ 'count': remaining }, this, 'totalCountTemplate', null, !this.isStringTemplate)[0]);
|
|
1007
|
+
remainElement.innerText = (this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === 'Box')) ?
|
|
1008
|
+
remainContent.replace('${count}', remaining.toString()) : totalContent.replace('${count}', remaining.toString());
|
|
1017
1009
|
if (this.overFlowWrapper.firstChild && (this.overFlowWrapper.firstChild.nodeType === 3 || this.mode === 'Box')) {
|
|
1018
1010
|
removeClass([this.overFlowWrapper], TOTAL_COUNT_WRAPPER);
|
|
1019
1011
|
}
|
package/src/list-box/list-box.js
CHANGED
|
@@ -742,9 +742,10 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
742
742
|
}
|
|
743
743
|
if (objValue === dataValue) {
|
|
744
744
|
itemIdx = this.getIndexByValue(dataValue);
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
745
|
+
var idx = itemIdx === i ? itemIdx : i;
|
|
746
|
+
liCollections.push(liElement[idx]);
|
|
747
|
+
removeIdxes.push(idx);
|
|
748
|
+
removeLiIdxes.push(idx);
|
|
748
749
|
}
|
|
749
750
|
}
|
|
750
751
|
}
|
|
@@ -329,7 +329,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
329
329
|
return ariaAttributes;
|
|
330
330
|
};
|
|
331
331
|
MultiSelect.prototype.updateListARIA = function () {
|
|
332
|
-
|
|
332
|
+
if (!isNullOrUndefined(this.ulElement)) {
|
|
333
|
+
attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
334
|
+
}
|
|
333
335
|
var disableStatus = (this.inputElement.disabled) ? true : false;
|
|
334
336
|
attributes(this.inputElement, this.getAriaAttributes());
|
|
335
337
|
if (disableStatus) {
|
|
@@ -489,7 +491,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
489
491
|
addClass([listEle[0]], dropDownBaseClasses.focus);
|
|
490
492
|
}
|
|
491
493
|
else {
|
|
492
|
-
this.ulElement = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
494
|
+
//EJ2-57588 - for this task, we prevent the ul element cloning ( this.ulElement = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)
|
|
493
495
|
if (!(this.list && this.list.querySelectorAll('.' + dropDownBaseClasses.li).length > 0)) {
|
|
494
496
|
this.l10nUpdate();
|
|
495
497
|
addClass([this.list], dropDownBaseClasses.noData);
|
|
@@ -2463,8 +2465,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2463
2465
|
}
|
|
2464
2466
|
};
|
|
2465
2467
|
MultiSelect.prototype.updateDataList = function () {
|
|
2466
|
-
if (this.mainList && this.ulElement
|
|
2467
|
-
|
|
2468
|
+
if (this.mainList && this.ulElement) {
|
|
2469
|
+
var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;
|
|
2470
|
+
var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount));
|
|
2471
|
+
var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));
|
|
2472
|
+
if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {
|
|
2473
|
+
this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
|
|
2474
|
+
}
|
|
2468
2475
|
}
|
|
2469
2476
|
};
|
|
2470
2477
|
MultiSelect.prototype.isValidLI = function (li) {
|
|
@@ -2813,11 +2820,13 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2813
2820
|
}
|
|
2814
2821
|
};
|
|
2815
2822
|
MultiSelect.prototype.wireListEvents = function () {
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2823
|
+
if (!isNullOrUndefined(this.list)) {
|
|
2824
|
+
EventHandler.add(document, 'mousedown', this.onDocumentClick, this);
|
|
2825
|
+
EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);
|
|
2826
|
+
EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);
|
|
2827
|
+
EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
|
|
2828
|
+
EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
|
|
2829
|
+
}
|
|
2821
2830
|
};
|
|
2822
2831
|
MultiSelect.prototype.unwireListEvents = function () {
|
|
2823
2832
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
@@ -3947,6 +3956,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3947
3956
|
this.mainData = null;
|
|
3948
3957
|
this.filterParent = null;
|
|
3949
3958
|
this.ulElement = null;
|
|
3959
|
+
this.mainListCollection = null;
|
|
3950
3960
|
_super.prototype.destroy.call(this);
|
|
3951
3961
|
var temp = ['readonly', 'aria-disabled', 'aria-placeholder', 'placeholder'];
|
|
3952
3962
|
var length = temp.length;
|
|
@@ -1674,7 +1674,8 @@ ejs-dropdownlist {
|
|
|
1674
1674
|
padding-left: 6px;
|
|
1675
1675
|
}
|
|
1676
1676
|
|
|
1677
|
-
.e-multi-select-list-wrapper .e-hide-listitem
|
|
1677
|
+
.e-multi-select-list-wrapper .e-hide-listitem,
|
|
1678
|
+
.e-multi-select-list-wrapper .e-hide-group-header {
|
|
1678
1679
|
display: none;
|
|
1679
1680
|
}
|
|
1680
1681
|
|
|
@@ -2252,6 +2253,14 @@ ejs-multiselect {
|
|
|
2252
2253
|
width: 16px;
|
|
2253
2254
|
}
|
|
2254
2255
|
|
|
2256
|
+
.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2257
|
+
.e-outline.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2258
|
+
.e-filled.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2259
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon,
|
|
2260
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container.e-input-group :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon {
|
|
2261
|
+
display: none;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2255
2264
|
.e-multi-select-wrapper .e-chips.e-chip-selected .e-chips-close::before {
|
|
2256
2265
|
color: #f0f0f0;
|
|
2257
2266
|
}
|
package/styles/bootstrap.css
CHANGED
|
@@ -1673,7 +1673,8 @@ ejs-dropdownlist {
|
|
|
1673
1673
|
padding-left: 6px;
|
|
1674
1674
|
}
|
|
1675
1675
|
|
|
1676
|
-
.e-multi-select-list-wrapper .e-hide-listitem
|
|
1676
|
+
.e-multi-select-list-wrapper .e-hide-listitem,
|
|
1677
|
+
.e-multi-select-list-wrapper .e-hide-group-header {
|
|
1677
1678
|
display: none;
|
|
1678
1679
|
}
|
|
1679
1680
|
|
|
@@ -2251,6 +2252,14 @@ ejs-multiselect {
|
|
|
2251
2252
|
width: 16px;
|
|
2252
2253
|
}
|
|
2253
2254
|
|
|
2255
|
+
.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2256
|
+
.e-outline.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2257
|
+
.e-filled.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2258
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon,
|
|
2259
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container.e-input-group :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon {
|
|
2260
|
+
display: none;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2254
2263
|
.e-multi-select-wrapper .e-chips.e-chip-selected .e-chips-close::before {
|
|
2255
2264
|
color: #333;
|
|
2256
2265
|
}
|
package/styles/bootstrap4.css
CHANGED
|
@@ -1827,7 +1827,8 @@ ejs-dropdownlist {
|
|
|
1827
1827
|
padding-left: 12px;
|
|
1828
1828
|
}
|
|
1829
1829
|
|
|
1830
|
-
.e-multi-select-list-wrapper .e-hide-listitem
|
|
1830
|
+
.e-multi-select-list-wrapper .e-hide-listitem,
|
|
1831
|
+
.e-multi-select-list-wrapper .e-hide-group-header {
|
|
1831
1832
|
display: none;
|
|
1832
1833
|
}
|
|
1833
1834
|
|
|
@@ -2413,6 +2414,14 @@ ejs-multiselect {
|
|
|
2413
2414
|
width: 16px;
|
|
2414
2415
|
}
|
|
2415
2416
|
|
|
2417
|
+
.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2418
|
+
.e-outline.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2419
|
+
.e-filled.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2420
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon,
|
|
2421
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container.e-input-group :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon {
|
|
2422
|
+
display: none;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2416
2425
|
.e-multi-select-wrapper .e-chips.e-chip-selected .e-chips-close::before {
|
|
2417
2426
|
color: #fff;
|
|
2418
2427
|
}
|
|
@@ -1792,7 +1792,8 @@ ejs-dropdownlist {
|
|
|
1792
1792
|
padding-left: 0;
|
|
1793
1793
|
}
|
|
1794
1794
|
|
|
1795
|
-
.e-multi-select-list-wrapper .e-hide-listitem
|
|
1795
|
+
.e-multi-select-list-wrapper .e-hide-listitem,
|
|
1796
|
+
.e-multi-select-list-wrapper .e-hide-group-header {
|
|
1796
1797
|
display: none;
|
|
1797
1798
|
}
|
|
1798
1799
|
|
|
@@ -2369,6 +2370,14 @@ ejs-multiselect {
|
|
|
2369
2370
|
width: 16px;
|
|
2370
2371
|
}
|
|
2371
2372
|
|
|
2373
|
+
.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2374
|
+
.e-outline.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2375
|
+
.e-filled.e-multiselect.e-control-wrapper.e-input-group.e-readonly .e-clear-icon,
|
|
2376
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon,
|
|
2377
|
+
.e-multiselect.e-readonly.e-control-wrapper.e-input-group.e-control-container.e-input-group :not(.e-disabled).e-multi-select-wrapper:hover .e-clear-icon {
|
|
2378
|
+
display: none;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2372
2381
|
.e-multi-select-wrapper .e-chips.e-chip-selected .e-chips-close::before {
|
|
2373
2382
|
color: #fff;
|
|
2374
2383
|
}
|