@syncfusion/ej2-dropdowns 24.1.45 → 24.1.46
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 +24 -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 +89 -17
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +94 -17
- 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-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +9 -2
- package/src/drop-down-tree/drop-down-tree.d.ts +3 -1
- package/src/drop-down-tree/drop-down-tree.js +76 -13
- package/src/mention/mention.js +8 -1
- package/src/multi-select/multi-select.js +1 -1
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap.css +5 -0
- package/styles/bootstrap4.css +5 -0
- package/styles/bootstrap5-dark.css +5 -0
- package/styles/bootstrap5.css +5 -0
- package/styles/drop-down-list/_layout.scss +5 -0
- package/styles/drop-down-list/bootstrap-dark.css +5 -0
- package/styles/drop-down-list/bootstrap.css +5 -0
- package/styles/drop-down-list/bootstrap4.css +5 -0
- package/styles/drop-down-list/bootstrap5-dark.css +5 -0
- package/styles/drop-down-list/bootstrap5.css +5 -0
- package/styles/drop-down-list/fabric-dark.css +5 -0
- package/styles/drop-down-list/fabric.css +5 -0
- package/styles/drop-down-list/fluent-dark.css +5 -0
- package/styles/drop-down-list/fluent.css +5 -0
- package/styles/drop-down-list/highcontrast-light.css +5 -0
- package/styles/drop-down-list/highcontrast.css +5 -0
- package/styles/drop-down-list/material-dark.css +5 -0
- package/styles/drop-down-list/material.css +5 -0
- package/styles/drop-down-list/material3-dark.css +5 -0
- package/styles/drop-down-list/material3.css +5 -0
- package/styles/drop-down-list/tailwind-dark.css +5 -0
- package/styles/drop-down-list/tailwind.css +5 -0
- package/styles/fabric-dark.css +5 -0
- package/styles/fabric.css +5 -0
- package/styles/fluent-dark.css +5 -0
- package/styles/fluent.css +5 -0
- package/styles/highcontrast-light.css +5 -0
- package/styles/highcontrast.css +5 -0
- package/styles/material-dark.css +5 -0
- package/styles/material.css +5 -0
- package/styles/material3-dark.css +5 -0
- package/styles/material3.css +5 -0
- package/styles/tailwind-dark.css +5 -0
- package/styles/tailwind.css +5 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 24.1.
|
|
3
|
+
* version : 24.1.46
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@24.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@24.1.45",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-9Tee0dj1aMn5axMGjUn7hjYgWlXaj+QYybJ8fQGf1xgEos5c40ydWNn26Mx7aiG4ZasQTGTffCTvCYOF6ES9OA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-24.1.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-24.1.45.tgz",
|
|
38
|
+
"_shasum": "793b012671db03deaa00d976f86dde916be7c315",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~24.1.
|
|
46
|
+
"@syncfusion/ej2-base": "~24.1.46",
|
|
47
47
|
"@syncfusion/ej2-data": "~24.1.41",
|
|
48
48
|
"@syncfusion/ej2-inputs": "~24.1.45",
|
|
49
|
-
"@syncfusion/ej2-lists": "~24.1.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~24.1.
|
|
49
|
+
"@syncfusion/ej2-lists": "~24.1.46",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~24.1.46",
|
|
51
51
|
"@syncfusion/ej2-notifications": "~24.1.41",
|
|
52
|
-
"@syncfusion/ej2-popups": "~24.1.
|
|
52
|
+
"@syncfusion/ej2-popups": "~24.1.46"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"module": "./index.js",
|
|
75
75
|
"name": "@syncfusion/ej2-dropdowns",
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "24.1.
|
|
77
|
+
"version": "24.1.46",
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
80
80
|
}
|
|
@@ -567,6 +567,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
567
567
|
protected getFocusElement(): void;
|
|
568
568
|
private isFilterLayout;
|
|
569
569
|
private scrollHandler;
|
|
570
|
+
private isElementInViewport;
|
|
570
571
|
private setSearchBoxPosition;
|
|
571
572
|
private setPopupPosition;
|
|
572
573
|
private setWidth;
|
|
@@ -2594,9 +2594,16 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2594
2594
|
DropDownList.prototype.scrollHandler = function () {
|
|
2595
2595
|
if (Browser.isDevice && ((this.getModuleName() === 'dropdownlist' &&
|
|
2596
2596
|
!this.isFilterLayout()) || (this.getModuleName() === 'combobox' && !this.allowFiltering && this.isDropDownClick))) {
|
|
2597
|
-
this.
|
|
2597
|
+
if (this.element && !(this.isElementInViewport(this.element))) {
|
|
2598
|
+
this.hidePopup();
|
|
2599
|
+
}
|
|
2598
2600
|
}
|
|
2599
2601
|
};
|
|
2602
|
+
DropDownList.prototype.isElementInViewport = function (element) {
|
|
2603
|
+
var elementRect = element.getBoundingClientRect();
|
|
2604
|
+
return (elementRect.top >= 0 && elementRect.left >= 0 && elementRect.bottom <= window.innerHeight && elementRect.right <= window.innerWidth);
|
|
2605
|
+
};
|
|
2606
|
+
;
|
|
2600
2607
|
DropDownList.prototype.setSearchBoxPosition = function () {
|
|
2601
2608
|
var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
|
|
2602
2609
|
this.popupObj.element.style.maxHeight = '100%';
|
|
@@ -3742,7 +3749,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3742
3749
|
if (!this.enabled) {
|
|
3743
3750
|
return;
|
|
3744
3751
|
}
|
|
3745
|
-
if (!this.enableVirtualization && this.getModuleName() === 'combobox') {
|
|
3752
|
+
if (!this.enableVirtualization && (this.getModuleName() === 'combobox' || this.getModuleName() === 'autocomplete')) {
|
|
3746
3753
|
this.isTyped = true;
|
|
3747
3754
|
}
|
|
3748
3755
|
this.hidePopup(e);
|
|
@@ -731,11 +731,13 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
|
|
|
731
731
|
* @returns {void}
|
|
732
732
|
*/
|
|
733
733
|
render(): void;
|
|
734
|
-
private ensureAutoCheck;
|
|
735
734
|
private hideCheckAll;
|
|
736
735
|
private renderFilter;
|
|
737
736
|
private filterChangeHandler;
|
|
737
|
+
private isChildObject;
|
|
738
738
|
private filterHandler;
|
|
739
|
+
private remoteDataFilter;
|
|
740
|
+
private remoteChildFilter;
|
|
739
741
|
private nestedFilter;
|
|
740
742
|
private nestedChildFilter;
|
|
741
743
|
private selfReferencefilter;
|
|
@@ -256,7 +256,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
256
256
|
var popupDiv = select('#' + this.element.id + '_options', document);
|
|
257
257
|
detach(popupDiv ? popupDiv : isTree.parentElement);
|
|
258
258
|
}
|
|
259
|
-
this.ensureAutoCheck();
|
|
260
259
|
if (this.element.tagName === 'INPUT') {
|
|
261
260
|
this.inputEle = this.element;
|
|
262
261
|
if (isNOU(this.inputEle.getAttribute('role'))) {
|
|
@@ -343,11 +342,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
343
342
|
|| this.noRecordsTemplate || this.customTemplate;
|
|
344
343
|
this.renderComplete();
|
|
345
344
|
};
|
|
346
|
-
DropDownTree.prototype.ensureAutoCheck = function () {
|
|
347
|
-
if (this.allowFiltering && this.treeSettings.autoCheck) {
|
|
348
|
-
this.setProperties({ treeSettings: { autoCheck: false } }, true);
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
345
|
DropDownTree.prototype.hideCheckAll = function (flag) {
|
|
352
346
|
var checkAllEle = !isNOU(this.popupEle) ? this.popupEle.querySelector('.' + CHECKALLPARENT) : null;
|
|
353
347
|
if (!isNOU(checkAllEle)) {
|
|
@@ -385,10 +379,21 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
385
379
|
this.filterTimer = window.setTimeout(function () { _this.filterHandler(args.value, args.event); }, this.filterDelayTime);
|
|
386
380
|
}
|
|
387
381
|
};
|
|
382
|
+
DropDownTree.prototype.isChildObject = function () {
|
|
383
|
+
if (typeof this.treeObj.fields.child === 'object') {
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
388
390
|
DropDownTree.prototype.filterHandler = function (value, event) {
|
|
389
391
|
var _this = this;
|
|
390
392
|
this.isFromFilterChange = true;
|
|
391
393
|
if (!this.isFilteredData) {
|
|
394
|
+
if (this.isRemoteData) {
|
|
395
|
+
this.treeObj.expandedNodes = [];
|
|
396
|
+
}
|
|
392
397
|
this.treeData = this.treeObj.getTreeData();
|
|
393
398
|
}
|
|
394
399
|
var filterFields = this.cloneFields(this.fields);
|
|
@@ -418,6 +423,10 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
418
423
|
}
|
|
419
424
|
else {
|
|
420
425
|
if (_this.fields.dataSource instanceof DataManager) {
|
|
426
|
+
fields = _this.remoteDataFilter(value, args.fields);
|
|
427
|
+
fields.child = _this.fields.child;
|
|
428
|
+
_this.treeObj.fields = _this.getTreeFields(args.fields);
|
|
429
|
+
_this.treeObj.dataBind();
|
|
421
430
|
flag = true;
|
|
422
431
|
}
|
|
423
432
|
else {
|
|
@@ -429,6 +438,14 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
429
438
|
if (flag) {
|
|
430
439
|
return;
|
|
431
440
|
}
|
|
441
|
+
if (_this.isRemoteData) {
|
|
442
|
+
if (_this.isChildObject()) {
|
|
443
|
+
fields.child = _this.fields.child;
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
fields = args.fields;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
432
449
|
_this.treeObj.fields = _this.getTreeFields(fields);
|
|
433
450
|
_this.treeObj.dataBind();
|
|
434
451
|
if (_this.hasTemplate && _this.portals && _this.treeObj.portals) {
|
|
@@ -444,6 +461,38 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
444
461
|
}
|
|
445
462
|
});
|
|
446
463
|
};
|
|
464
|
+
DropDownTree.prototype.remoteDataFilter = function (value, filteredFields) {
|
|
465
|
+
var _this = this;
|
|
466
|
+
filteredFields.dataSource = this.treeData.map(function (item) {
|
|
467
|
+
return _this.remoteChildFilter(value, item);
|
|
468
|
+
}).filter(function (filteredChild) {
|
|
469
|
+
return !isNOU(filteredChild);
|
|
470
|
+
});
|
|
471
|
+
return filteredFields;
|
|
472
|
+
};
|
|
473
|
+
DropDownTree.prototype.remoteChildFilter = function (value, node, isChild, isChildFiltering) {
|
|
474
|
+
var children = this.isChildObject() ? node['child'] : node[this.fields.child];
|
|
475
|
+
if (isNOU(children)) {
|
|
476
|
+
return (this.isMatchedNode(value, node, isChild, isChildFiltering)) ? node : null;
|
|
477
|
+
}
|
|
478
|
+
var matchedChildren = [];
|
|
479
|
+
for (var i = 0; i < children.length; i++) {
|
|
480
|
+
var filteredChild = this.remoteChildFilter(value, children[i], true, true);
|
|
481
|
+
if (!isNOU(filteredChild)) {
|
|
482
|
+
matchedChildren.push(filteredChild);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
var filteredItems = Object.assign({}, node);
|
|
486
|
+
isChildFiltering = false;
|
|
487
|
+
if (matchedChildren.length !== 0) {
|
|
488
|
+
filteredItems.child = matchedChildren;
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
filteredItems.child = null;
|
|
492
|
+
filteredItems = (this.isMatchedNode(value, filteredItems)) ? filteredItems : null;
|
|
493
|
+
}
|
|
494
|
+
return filteredItems;
|
|
495
|
+
};
|
|
447
496
|
DropDownTree.prototype.nestedFilter = function (value, filteredFields) {
|
|
448
497
|
// eslint-disable-next-line
|
|
449
498
|
var matchedDataSource = [];
|
|
@@ -525,8 +574,17 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
525
574
|
return filteredFields;
|
|
526
575
|
};
|
|
527
576
|
// eslint-disable-next-line
|
|
528
|
-
DropDownTree.prototype.isMatchedNode = function (value, node) {
|
|
529
|
-
var checkValue
|
|
577
|
+
DropDownTree.prototype.isMatchedNode = function (value, node, isChild, isChildFiltering) {
|
|
578
|
+
var checkValue;
|
|
579
|
+
var isObjectValue = isChild && isChildFiltering && this.isChildObject();
|
|
580
|
+
checkValue = isObjectValue ? node[this.fields.child.text] : node[this.fields.text];
|
|
581
|
+
if (!checkValue) {
|
|
582
|
+
var tempChild = this.fields.child;
|
|
583
|
+
while (!node[tempChild.text]) {
|
|
584
|
+
tempChild = tempChild.child;
|
|
585
|
+
}
|
|
586
|
+
checkValue = node[tempChild.text];
|
|
587
|
+
}
|
|
530
588
|
if (this.ignoreCase) {
|
|
531
589
|
checkValue = checkValue.toLowerCase();
|
|
532
590
|
value = value.toLowerCase();
|
|
@@ -1488,8 +1546,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1488
1546
|
if (this.isFilteredData) {
|
|
1489
1547
|
this.filterObj.value = '';
|
|
1490
1548
|
this.treeObj.fields = this.getTreeFields(this.fields);
|
|
1491
|
-
if (this.isReact)
|
|
1492
|
-
this.refresh();
|
|
1493
1549
|
this.isFilterRestore = true;
|
|
1494
1550
|
this.isFilteredData = false;
|
|
1495
1551
|
this.hideCheckAll(false);
|
|
@@ -1510,12 +1566,18 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1510
1566
|
}
|
|
1511
1567
|
else {
|
|
1512
1568
|
_this.popupEle = _this.popupObj.element;
|
|
1569
|
+
if (_this.isReact && _this.isFilterRestore) {
|
|
1570
|
+
_this.treeObj.refresh();
|
|
1571
|
+
_this.isFilteredData = true;
|
|
1572
|
+
_this.popupEle.removeChild(_this.filterContainer);
|
|
1573
|
+
}
|
|
1513
1574
|
}
|
|
1514
1575
|
}
|
|
1515
1576
|
else {
|
|
1516
1577
|
isCancelled = true;
|
|
1517
1578
|
}
|
|
1518
|
-
if (_this.isFirstRender && !isCancelled) {
|
|
1579
|
+
if (_this.isFirstRender && !isCancelled || _this.isFilteredData) {
|
|
1580
|
+
_this.isFilteredData = false;
|
|
1519
1581
|
prepend([_this.popupDiv], _this.popupEle);
|
|
1520
1582
|
removeClass([_this.popupDiv], DDTHIDEICON);
|
|
1521
1583
|
if (_this.allowFiltering) {
|
|
@@ -1882,6 +1944,9 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1882
1944
|
if (this.value === null) {
|
|
1883
1945
|
this.setProperties({ value: [] }, true);
|
|
1884
1946
|
}
|
|
1947
|
+
if (args.node.classList.contains("e-active")) {
|
|
1948
|
+
this.hidePopup();
|
|
1949
|
+
}
|
|
1885
1950
|
}
|
|
1886
1951
|
};
|
|
1887
1952
|
DropDownTree.prototype.updateHiddenValue = function () {
|
|
@@ -2541,7 +2606,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2541
2606
|
DropDownTree.prototype.updateTreeSettings = function (prop) {
|
|
2542
2607
|
var value = Object.keys(prop.treeSettings)[0];
|
|
2543
2608
|
if (value === 'autoCheck') {
|
|
2544
|
-
this.ensureAutoCheck();
|
|
2545
2609
|
this.treeObj.autoCheck = this.treeSettings.autoCheck;
|
|
2546
2610
|
}
|
|
2547
2611
|
else if (value === 'loadOnDemand') {
|
|
@@ -2662,7 +2726,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
2662
2726
|
this.destroyFilter();
|
|
2663
2727
|
}
|
|
2664
2728
|
}
|
|
2665
|
-
this.ensureAutoCheck();
|
|
2666
2729
|
};
|
|
2667
2730
|
DropDownTree.prototype.updateFilterPlaceHolder = function () {
|
|
2668
2731
|
if (this.filterObj) {
|
package/src/mention/mention.js
CHANGED
|
@@ -305,7 +305,8 @@ var Mention = /** @class */ (function (_super) {
|
|
|
305
305
|
return;
|
|
306
306
|
}
|
|
307
307
|
this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
|
|
308
|
-
|
|
308
|
+
var isRteImage = document.activeElement.parentElement && document.activeElement.parentElement.querySelector('.e-rte-image') ? true : false;
|
|
309
|
+
if (document.activeElement != this.inputElement && !isRteImage) {
|
|
309
310
|
this.inputElement.focus();
|
|
310
311
|
}
|
|
311
312
|
if (this.isContentEditable(this.inputElement)) {
|
|
@@ -1177,6 +1178,12 @@ var Mention = /** @class */ (function (_super) {
|
|
|
1177
1178
|
if (this.isPopupOpen) {
|
|
1178
1179
|
this.hidePopup();
|
|
1179
1180
|
}
|
|
1181
|
+
//New event to update the RichTextEditor value, when a mention item is selected using mouse click action.
|
|
1182
|
+
if (!isNullOrUndefined(e.pointerType) && e.pointerType === 'mouse') {
|
|
1183
|
+
var event_1 = new CustomEvent('content-changed', { detail: { click: true } });
|
|
1184
|
+
this.inputElement.dispatchEvent(event_1);
|
|
1185
|
+
}
|
|
1186
|
+
;
|
|
1180
1187
|
this.onChangeEvent(e);
|
|
1181
1188
|
}
|
|
1182
1189
|
else {
|
|
@@ -3848,10 +3848,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3848
3848
|
if (!args.cancel) {
|
|
3849
3849
|
if (!_this.ulElement) {
|
|
3850
3850
|
_this.beforePopupOpen = true;
|
|
3851
|
-
_super.prototype.render.call(_this, e);
|
|
3852
3851
|
if (_this.mode === 'CheckBox' && Browser.isDevice && _this.allowFiltering) {
|
|
3853
3852
|
_this.notify('popupFullScreen', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });
|
|
3854
3853
|
}
|
|
3854
|
+
_super.prototype.render.call(_this, e);
|
|
3855
3855
|
return;
|
|
3856
3856
|
}
|
|
3857
3857
|
if (_this.mode === 'CheckBox' && Browser.isDevice && _this.allowFiltering) {
|
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.css
CHANGED
package/styles/bootstrap5.css
CHANGED
package/styles/fabric-dark.css
CHANGED
package/styles/fabric.css
CHANGED
package/styles/fluent-dark.css
CHANGED