@syncfusion/ej2-dropdowns 32.2.8 → 33.1.44
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/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 +490 -139
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +467 -114
- 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 +8 -8
- package/src/combo-box/combo-box.js +3 -0
- package/src/common/virtual-scroll.d.ts +1 -0
- package/src/common/virtual-scroll.js +17 -1
- package/src/drop-down-base/drop-down-base.d.ts +2 -0
- package/src/drop-down-base/drop-down-base.js +42 -0
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +143 -30
- package/src/drop-down-tree/drop-down-tree-model.d.ts +1 -1
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -1
- package/src/mention/mention.js +8 -4
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +254 -79
- package/styles/bds-lite.css +17 -9
- package/styles/bds.css +29 -15
- package/styles/bootstrap-dark-lite.css +17 -9
- package/styles/bootstrap-dark.css +27 -14
- package/styles/bootstrap-lite.css +17 -9
- package/styles/bootstrap.css +27 -14
- package/styles/bootstrap4-lite.css +17 -9
- package/styles/bootstrap4.css +27 -14
- package/styles/bootstrap5-dark-lite.css +17 -9
- package/styles/bootstrap5-dark.css +27 -14
- package/styles/bootstrap5-lite.css +17 -9
- package/styles/bootstrap5.3-lite.css +19 -9
- package/styles/bootstrap5.3.css +29 -14
- package/styles/bootstrap5.css +27 -14
- package/styles/drop-down-base/_bds-definition.scss +2 -2
- package/styles/drop-down-base/_bigger.scss +3 -3
- package/styles/drop-down-base/_bootstrap-dark-definition.scss +3 -3
- package/styles/drop-down-base/_bootstrap-definition.scss +3 -3
- package/styles/drop-down-base/_bootstrap4-definition.scss +3 -3
- package/styles/drop-down-base/_bootstrap5-dark-definition.scss +3 -3
- package/styles/drop-down-base/_bootstrap5-definition.scss +3 -3
- package/styles/drop-down-base/_bootstrap5.3-definition.scss +6 -3
- package/styles/drop-down-base/_fabric-dark-definition.scss +3 -3
- package/styles/drop-down-base/_fabric-definition.scss +3 -3
- package/styles/drop-down-base/_fluent-dark-definition.scss +3 -3
- package/styles/drop-down-base/_fluent-definition.scss +3 -3
- package/styles/drop-down-base/_fluent2-definition.scss +8 -5
- package/styles/drop-down-base/_fusionnew-definition.scss +2 -2
- package/styles/drop-down-base/_highcontrast-definition.scss +3 -3
- package/styles/drop-down-base/_highcontrast-light-definition.scss +3 -3
- package/styles/drop-down-base/_layout.scss +12 -1
- package/styles/drop-down-base/_material-dark-definition.scss +2 -2
- package/styles/drop-down-base/_material-definition.scss +2 -2
- package/styles/drop-down-base/_material3-dark-definition.scss +6 -4
- package/styles/drop-down-base/_material3-definition.scss +6 -4
- package/styles/drop-down-base/_tailwind-dark-definition.scss +4 -4
- package/styles/drop-down-base/_tailwind-definition.scss +4 -4
- package/styles/drop-down-base/_tailwind3-definition.scss +5 -2
- package/styles/drop-down-base/_theme.scss +6 -0
- package/styles/drop-down-base/bds.css +21 -11
- package/styles/drop-down-base/bootstrap-dark.css +19 -10
- package/styles/drop-down-base/bootstrap.css +19 -10
- package/styles/drop-down-base/bootstrap4.css +19 -10
- package/styles/drop-down-base/bootstrap5-dark.css +19 -10
- package/styles/drop-down-base/bootstrap5.3.css +21 -10
- package/styles/drop-down-base/bootstrap5.css +19 -10
- package/styles/drop-down-base/fabric-dark.css +19 -10
- package/styles/drop-down-base/fabric.css +19 -10
- package/styles/drop-down-base/fluent-dark.css +19 -10
- package/styles/drop-down-base/fluent.css +19 -10
- package/styles/drop-down-base/fluent2.css +28 -12
- package/styles/drop-down-base/highcontrast-light.css +19 -10
- package/styles/drop-down-base/highcontrast.css +19 -10
- package/styles/drop-down-base/material-dark.css +17 -9
- package/styles/drop-down-base/material.css +17 -9
- package/styles/drop-down-base/material3-dark.css +19 -9
- package/styles/drop-down-base/material3.css +19 -9
- package/styles/drop-down-base/tailwind-dark.css +21 -11
- package/styles/drop-down-base/tailwind.css +21 -11
- package/styles/drop-down-base/tailwind3.css +19 -9
- package/styles/drop-down-list/bds.css +4 -2
- package/styles/drop-down-list/bootstrap-dark.css +4 -2
- package/styles/drop-down-list/bootstrap.css +4 -2
- package/styles/drop-down-list/bootstrap4.css +4 -2
- package/styles/drop-down-list/bootstrap5-dark.css +4 -2
- package/styles/drop-down-list/bootstrap5.3.css +4 -2
- package/styles/drop-down-list/bootstrap5.css +4 -2
- package/styles/drop-down-list/fabric-dark.css +4 -2
- package/styles/drop-down-list/fabric.css +4 -2
- package/styles/drop-down-list/fluent-dark.css +4 -2
- package/styles/drop-down-list/fluent.css +4 -2
- package/styles/drop-down-list/fluent2.css +4 -2
- package/styles/drop-down-list/highcontrast-light.css +4 -2
- package/styles/drop-down-list/highcontrast.css +4 -2
- package/styles/drop-down-list/material-dark.css +4 -2
- package/styles/drop-down-list/material.css +4 -2
- package/styles/drop-down-list/material3-dark.css +4 -2
- package/styles/drop-down-list/material3.css +4 -2
- package/styles/drop-down-list/tailwind-dark.css +4 -2
- package/styles/drop-down-list/tailwind.css +4 -2
- package/styles/drop-down-list/tailwind3.css +4 -2
- package/styles/drop-down-tree/bds.css +4 -2
- package/styles/drop-down-tree/bootstrap-dark.css +4 -2
- package/styles/drop-down-tree/bootstrap.css +4 -2
- package/styles/drop-down-tree/bootstrap4.css +4 -2
- package/styles/drop-down-tree/bootstrap5-dark.css +4 -2
- package/styles/drop-down-tree/bootstrap5.3.css +4 -2
- package/styles/drop-down-tree/bootstrap5.css +4 -2
- package/styles/drop-down-tree/fabric-dark.css +4 -2
- package/styles/drop-down-tree/fabric.css +4 -2
- package/styles/drop-down-tree/fluent-dark.css +4 -2
- package/styles/drop-down-tree/fluent.css +4 -2
- package/styles/drop-down-tree/fluent2.css +4 -2
- package/styles/drop-down-tree/highcontrast-light.css +4 -2
- package/styles/drop-down-tree/highcontrast.css +4 -2
- package/styles/drop-down-tree/material-dark.css +4 -2
- package/styles/drop-down-tree/material.css +4 -2
- package/styles/drop-down-tree/material3-dark.css +4 -2
- package/styles/drop-down-tree/material3.css +4 -2
- package/styles/drop-down-tree/tailwind-dark.css +4 -2
- package/styles/drop-down-tree/tailwind.css +4 -2
- package/styles/drop-down-tree/tailwind3.css +4 -2
- package/styles/fabric-dark-lite.css +17 -9
- package/styles/fabric-dark.css +27 -14
- package/styles/fabric-lite.css +17 -9
- package/styles/fabric.css +27 -14
- package/styles/fluent-dark-lite.css +17 -9
- package/styles/fluent-dark.css +27 -14
- package/styles/fluent-lite.css +17 -9
- package/styles/fluent.css +27 -14
- package/styles/fluent2-lite.css +24 -10
- package/styles/fluent2.css +36 -16
- package/styles/highcontrast-light-lite.css +17 -9
- package/styles/highcontrast-light.css +27 -14
- package/styles/highcontrast-lite.css +17 -9
- package/styles/highcontrast.css +27 -14
- package/styles/list-box/bds.css +4 -2
- package/styles/list-box/bootstrap-dark.css +4 -2
- package/styles/list-box/bootstrap.css +4 -2
- package/styles/list-box/bootstrap4.css +4 -2
- package/styles/list-box/bootstrap5-dark.css +4 -2
- package/styles/list-box/bootstrap5.3.css +4 -2
- package/styles/list-box/bootstrap5.css +4 -2
- package/styles/list-box/fabric-dark.css +4 -2
- package/styles/list-box/fabric.css +4 -2
- package/styles/list-box/fluent-dark.css +4 -2
- package/styles/list-box/fluent.css +4 -2
- package/styles/list-box/fluent2.css +4 -2
- package/styles/list-box/highcontrast-light.css +4 -2
- package/styles/list-box/highcontrast.css +4 -2
- package/styles/list-box/material-dark.css +4 -2
- package/styles/list-box/material.css +4 -2
- package/styles/list-box/material3-dark.css +4 -2
- package/styles/list-box/material3.css +4 -2
- package/styles/list-box/tailwind-dark.css +4 -2
- package/styles/list-box/tailwind.css +4 -2
- package/styles/list-box/tailwind3.css +4 -2
- package/styles/material-dark-lite.css +17 -9
- package/styles/material-dark.css +25 -13
- package/styles/material-lite.css +17 -9
- package/styles/material.css +25 -13
- package/styles/material3-dark-lite.css +19 -9
- package/styles/material3-dark.css +27 -13
- package/styles/material3-lite.css +19 -9
- package/styles/material3.css +27 -13
- package/styles/mention/bds.css +4 -2
- package/styles/mention/bootstrap-dark.css +4 -2
- package/styles/mention/bootstrap.css +4 -2
- package/styles/mention/bootstrap4.css +4 -2
- package/styles/mention/bootstrap5-dark.css +4 -2
- package/styles/mention/bootstrap5.3.css +4 -2
- package/styles/mention/bootstrap5.css +4 -2
- package/styles/mention/fabric-dark.css +4 -2
- package/styles/mention/fabric.css +4 -2
- package/styles/mention/fluent-dark.css +4 -2
- package/styles/mention/fluent.css +4 -2
- package/styles/mention/fluent2.css +4 -2
- package/styles/mention/highcontrast-light.css +4 -2
- package/styles/mention/highcontrast.css +4 -2
- package/styles/mention/material-dark.css +4 -2
- package/styles/mention/material.css +4 -2
- package/styles/mention/material3-dark.css +4 -2
- package/styles/mention/material3.css +4 -2
- package/styles/mention/tailwind-dark.css +4 -2
- package/styles/mention/tailwind.css +4 -2
- package/styles/mention/tailwind3.css +4 -2
- package/styles/multi-select/bds.css +12 -6
- package/styles/multi-select/bootstrap-dark.css +12 -6
- package/styles/multi-select/bootstrap.css +12 -6
- package/styles/multi-select/bootstrap4.css +12 -6
- package/styles/multi-select/bootstrap5-dark.css +12 -6
- package/styles/multi-select/bootstrap5.3.css +12 -6
- package/styles/multi-select/bootstrap5.css +12 -6
- package/styles/multi-select/fabric-dark.css +12 -6
- package/styles/multi-select/fabric.css +12 -6
- package/styles/multi-select/fluent-dark.css +12 -6
- package/styles/multi-select/fluent.css +12 -6
- package/styles/multi-select/fluent2.css +12 -6
- package/styles/multi-select/highcontrast-light.css +12 -6
- package/styles/multi-select/highcontrast.css +12 -6
- package/styles/multi-select/material-dark.css +12 -6
- package/styles/multi-select/material.css +12 -6
- package/styles/multi-select/material3-dark.css +12 -6
- package/styles/multi-select/material3.css +12 -6
- package/styles/multi-select/tailwind-dark.css +12 -6
- package/styles/multi-select/tailwind.css +12 -6
- package/styles/multi-select/tailwind3.css +12 -6
- package/styles/tailwind-dark-lite.css +17 -9
- package/styles/tailwind-dark.css +29 -15
- package/styles/tailwind-lite.css +17 -9
- package/styles/tailwind.css +29 -15
- package/styles/tailwind3-lite.css +19 -9
- package/styles/tailwind3.css +27 -13
|
@@ -364,7 +364,8 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
364
364
|
this.touchModule = new Touch(this.parent.popupContentElement, {
|
|
365
365
|
scroll: this.popupScrollHandler.bind(this)
|
|
366
366
|
});
|
|
367
|
-
|
|
367
|
+
this.scrollHandler = this.virtualScrollHandler(callback);
|
|
368
|
+
EventHandler.add(this.parent.popupContentElement, 'scroll', this.scrollHandler, this);
|
|
368
369
|
};
|
|
369
370
|
VirtualScroll.prototype.getModuleName = function () {
|
|
370
371
|
return 'VirtualScroll';
|
|
@@ -503,6 +504,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
503
504
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
504
505
|
isListUpdated = false;
|
|
505
506
|
this.parent.appendUncheckList = this.parent.dataSource instanceof DataManager ? this.parent.appendUncheckList : false;
|
|
507
|
+
oldUlElement = null;
|
|
506
508
|
}
|
|
507
509
|
}
|
|
508
510
|
else {
|
|
@@ -518,6 +520,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
518
520
|
this.parent.setCurrentView = false;
|
|
519
521
|
this.parent.resetList(this.parent.dataSource, this.parent.fields, query);
|
|
520
522
|
isListUpdated = false;
|
|
523
|
+
reOrderList = null;
|
|
521
524
|
}
|
|
522
525
|
this.parent.totalItemsCount();
|
|
523
526
|
}
|
|
@@ -533,6 +536,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
533
536
|
if (oldUlElement) {
|
|
534
537
|
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
535
538
|
}
|
|
539
|
+
oldUlElement = null;
|
|
536
540
|
}
|
|
537
541
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
538
542
|
var alreadyAddedData = this.parent.generatedDataObject[index];
|
|
@@ -866,6 +870,18 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
866
870
|
};
|
|
867
871
|
};
|
|
868
872
|
VirtualScroll.prototype.destroy = function () {
|
|
873
|
+
if (this.parent.popupContentElement) {
|
|
874
|
+
EventHandler.remove(this.parent.popupContentElement, 'wheel mousedown', this.popupScrollHandler);
|
|
875
|
+
EventHandler.remove(this.parent.popupContentElement, 'scroll', this.scrollHandler);
|
|
876
|
+
}
|
|
877
|
+
// Destroy touch module
|
|
878
|
+
if (this.touchModule) {
|
|
879
|
+
this.touchModule.destroy();
|
|
880
|
+
this.touchModule = null;
|
|
881
|
+
}
|
|
882
|
+
// Clear references
|
|
883
|
+
this.containerElementRect = null;
|
|
884
|
+
this.scrollHandler = null;
|
|
869
885
|
this.removeEventListener();
|
|
870
886
|
};
|
|
871
887
|
return VirtualScroll;
|
|
@@ -1250,6 +1266,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1250
1266
|
}
|
|
1251
1267
|
}
|
|
1252
1268
|
}
|
|
1269
|
+
ele = null;
|
|
1253
1270
|
};
|
|
1254
1271
|
DropDownBase.prototype.checkAndResetCache = function () {
|
|
1255
1272
|
if (this.isVirtualizationEnabled) {
|
|
@@ -1352,6 +1369,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1352
1369
|
DropDownBase.prototype.UpdateSkeleton = function (isSkeletonCountChange, skeletonCount) {
|
|
1353
1370
|
var isContainSkeleton = this.list.querySelector('.e-virtual-ddl-content');
|
|
1354
1371
|
var isContainVirtualList = this.list.querySelector('.e-virtual-list');
|
|
1372
|
+
if (!this.skeletonInstances) {
|
|
1373
|
+
this.skeletonInstances = [];
|
|
1374
|
+
}
|
|
1355
1375
|
if (isContainSkeleton && (!isContainVirtualList || isSkeletonCountChange) && this.isVirtualizationEnabled) {
|
|
1356
1376
|
var totalSkeletonCount = isSkeletonCountChange ? skeletonCount : this.skeletonCount;
|
|
1357
1377
|
for (var i = 0; i < totalSkeletonCount; i++) {
|
|
@@ -1365,6 +1385,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1365
1385
|
width: '95%',
|
|
1366
1386
|
cssClass: 'e-skeleton-text'
|
|
1367
1387
|
});
|
|
1388
|
+
this.skeletonInstances.push(skeleton);
|
|
1368
1389
|
skeleton.appendTo(this.createElement('div'));
|
|
1369
1390
|
liElement.appendChild(skeleton.element);
|
|
1370
1391
|
if (isContainSkeleton.firstChild) {
|
|
@@ -1397,6 +1418,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1397
1418
|
}
|
|
1398
1419
|
}
|
|
1399
1420
|
};
|
|
1421
|
+
DropDownBase.prototype.destroySkeletons = function () {
|
|
1422
|
+
if (this.skeletonInstances && this.skeletonInstances.length > 0) {
|
|
1423
|
+
this.skeletonInstances.forEach(function (skeleton) {
|
|
1424
|
+
if (skeleton && !skeleton.isDestroyed) {
|
|
1425
|
+
skeleton.destroy();
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
this.skeletonInstances = [];
|
|
1429
|
+
}
|
|
1430
|
+
};
|
|
1400
1431
|
DropDownBase.prototype.getLocaleName = function () {
|
|
1401
1432
|
return 'drop-down-base';
|
|
1402
1433
|
};
|
|
@@ -1530,6 +1561,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1530
1561
|
}
|
|
1531
1562
|
this.updateFields(fields.text, fields.value, isSelectGroupCheck ? fields.groupBy : this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
|
|
1532
1563
|
this.resetList(jsonElement, fields);
|
|
1564
|
+
element = null;
|
|
1565
|
+
group = null;
|
|
1533
1566
|
};
|
|
1534
1567
|
DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss, disabled) {
|
|
1535
1568
|
var field = {
|
|
@@ -2068,6 +2101,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2068
2101
|
this.ulElement = this.list.querySelector('ul');
|
|
2069
2102
|
this.postRender(this.list, list, this.bindEvent);
|
|
2070
2103
|
}
|
|
2104
|
+
else if (this.getModuleName() === 'dropdownlist' && this.isVirtualizationEnabled) {
|
|
2105
|
+
this.list.innerHTML = '';
|
|
2106
|
+
this.createVirtualContent();
|
|
2107
|
+
this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
|
|
2108
|
+
this.updateListElements(this.listData);
|
|
2109
|
+
}
|
|
2071
2110
|
}
|
|
2072
2111
|
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
2073
2112
|
var popupHolder_1 = this.list;
|
|
@@ -2317,6 +2356,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2317
2356
|
}
|
|
2318
2357
|
this.fixedHeaderElement.innerHTML = groupData.innerHTML;
|
|
2319
2358
|
this.renderGroupTemplate(this.fixedHeaderElement);
|
|
2359
|
+
groupData = null;
|
|
2320
2360
|
};
|
|
2321
2361
|
DropDownBase.prototype.updateGroupFixedHeader = function (element, target) {
|
|
2322
2362
|
if (this.fixedHeaderElement && this.list && this.list.parentElement) {
|
|
@@ -2437,6 +2477,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2437
2477
|
this.list.querySelector('.e-virtual-ddl-content').appendChild(ulElement);
|
|
2438
2478
|
this.updateListElements(listData);
|
|
2439
2479
|
}
|
|
2480
|
+
oldUlElement = null;
|
|
2481
|
+
virtualUlElement = null;
|
|
2440
2482
|
}
|
|
2441
2483
|
}
|
|
2442
2484
|
return ulElement;
|
|
@@ -2967,6 +3009,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2967
3009
|
this.updateSelection();
|
|
2968
3010
|
}
|
|
2969
3011
|
this.addedNewItem = true;
|
|
3012
|
+
liCollections = null;
|
|
2970
3013
|
};
|
|
2971
3014
|
/**
|
|
2972
3015
|
* Checks if the given HTML element is disabled.
|
|
@@ -3084,13 +3127,28 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
3084
3127
|
detach(this.list);
|
|
3085
3128
|
}
|
|
3086
3129
|
}
|
|
3130
|
+
if (this.generatedDataObject) {
|
|
3131
|
+
this.generatedDataObject = {};
|
|
3132
|
+
}
|
|
3133
|
+
this.destroySkeletons();
|
|
3087
3134
|
this.liCollections = null;
|
|
3135
|
+
this.incrementalLiCollections = null;
|
|
3136
|
+
this.incrementalUlElement = null;
|
|
3088
3137
|
this.ulElement = null;
|
|
3138
|
+
this.fixedHeaderElement = null;
|
|
3089
3139
|
this.list = null;
|
|
3140
|
+
this.item = null;
|
|
3090
3141
|
this.enableRtlElements = null;
|
|
3091
3142
|
this.groupHeaderItems = null;
|
|
3092
3143
|
this.fiteredGroupHeaderItems = null;
|
|
3093
3144
|
this.rippleFun = null;
|
|
3145
|
+
this.popupContentElement = null;
|
|
3146
|
+
this.virtualListInfo = null;
|
|
3147
|
+
this.viewPortInfo = null;
|
|
3148
|
+
this.selectedValueInfo = null;
|
|
3149
|
+
this.virtualGroupDataSource = null;
|
|
3150
|
+
this.virtualSelectAllData = null;
|
|
3151
|
+
this.incrementalListData = null;
|
|
3094
3152
|
_super.prototype.destroy.call(this);
|
|
3095
3153
|
};
|
|
3096
3154
|
__decorate([
|
|
@@ -3347,6 +3405,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3347
3405
|
else if (floatElement) {
|
|
3348
3406
|
classList(floatElement, ['e-label-bottom'], ['e-label-top']);
|
|
3349
3407
|
}
|
|
3408
|
+
floatElement = null;
|
|
3350
3409
|
}
|
|
3351
3410
|
};
|
|
3352
3411
|
DropDownList.prototype.resetHandler = function (e) {
|
|
@@ -3627,6 +3686,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3627
3686
|
else {
|
|
3628
3687
|
this.setSelection(element, null);
|
|
3629
3688
|
}
|
|
3689
|
+
element = null;
|
|
3630
3690
|
}
|
|
3631
3691
|
else {
|
|
3632
3692
|
this.setSelection(this.liCollections[this.activeIndex], null);
|
|
@@ -3783,7 +3843,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3783
3843
|
if (formElement) {
|
|
3784
3844
|
EventHandler.remove(formElement, 'reset', this.resetValueHandler);
|
|
3785
3845
|
}
|
|
3786
|
-
if (!Browser.isDevice) {
|
|
3846
|
+
if (!Browser.isDevice && !isNullOrUndefined(this.keyboardModule)) {
|
|
3787
3847
|
this.keyboardModule.destroy();
|
|
3788
3848
|
}
|
|
3789
3849
|
if (this.showClearButton) {
|
|
@@ -3904,10 +3964,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3904
3964
|
var delay = 100;
|
|
3905
3965
|
this.closePopup(delay, e);
|
|
3906
3966
|
}
|
|
3967
|
+
li = null;
|
|
3907
3968
|
};
|
|
3908
3969
|
DropDownList.prototype.onMouseOver = function (e) {
|
|
3909
3970
|
var currentLi = closest(e.target, '.' + dropDownBaseClasses.li);
|
|
3910
3971
|
this.setHover(currentLi);
|
|
3972
|
+
currentLi = null;
|
|
3911
3973
|
};
|
|
3912
3974
|
DropDownList.prototype.setHover = function (li) {
|
|
3913
3975
|
if (this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover)) {
|
|
@@ -4045,6 +4107,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4045
4107
|
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
4046
4108
|
this.list.scrollTop = 0;
|
|
4047
4109
|
}
|
|
4110
|
+
li = null;
|
|
4048
4111
|
}
|
|
4049
4112
|
else {
|
|
4050
4113
|
var li = void 0;
|
|
@@ -4059,6 +4122,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4059
4122
|
this.setSelection(li, e);
|
|
4060
4123
|
this.setScrollPosition();
|
|
4061
4124
|
}
|
|
4125
|
+
li = null;
|
|
4062
4126
|
}
|
|
4063
4127
|
}
|
|
4064
4128
|
};
|
|
@@ -4292,6 +4356,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4292
4356
|
this.ulElement = this.list.querySelector('ul');
|
|
4293
4357
|
this.handleVirtualKeyboardActions(e, this.pageCount);
|
|
4294
4358
|
}
|
|
4359
|
+
nextItem = null;
|
|
4295
4360
|
}
|
|
4296
4361
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
4297
4362
|
var value = this.getItemData().value;
|
|
@@ -4328,6 +4393,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4328
4393
|
this.updateUpDownAction(e);
|
|
4329
4394
|
}
|
|
4330
4395
|
e.preventDefault();
|
|
4396
|
+
focusEle = null;
|
|
4331
4397
|
};
|
|
4332
4398
|
DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
|
|
4333
4399
|
if (this.getModuleName() === 'dropdownlist') {
|
|
@@ -4448,6 +4514,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4448
4514
|
}
|
|
4449
4515
|
this.hidePopup(e);
|
|
4450
4516
|
this.focusDropDown(e);
|
|
4517
|
+
li = null;
|
|
4451
4518
|
}
|
|
4452
4519
|
else {
|
|
4453
4520
|
this.showPopup();
|
|
@@ -4645,6 +4712,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4645
4712
|
ulElement = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;
|
|
4646
4713
|
this.actionCompleteData.ulElement = ulElement;
|
|
4647
4714
|
}
|
|
4715
|
+
ulElement = null;
|
|
4648
4716
|
}
|
|
4649
4717
|
};
|
|
4650
4718
|
DropDownList.prototype.updateSelectedItem = function (li, e, preventSelect, isSelection) {
|
|
@@ -4683,6 +4751,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4683
4751
|
this.setSelectOptions(li, e);
|
|
4684
4752
|
}
|
|
4685
4753
|
}
|
|
4754
|
+
li = null;
|
|
4686
4755
|
};
|
|
4687
4756
|
DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {
|
|
4688
4757
|
this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
|
|
@@ -4717,6 +4786,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4717
4786
|
}
|
|
4718
4787
|
this.activeIndex = this.getIndexByValue(value);
|
|
4719
4788
|
}
|
|
4789
|
+
focusedItem = null;
|
|
4720
4790
|
};
|
|
4721
4791
|
DropDownList.prototype.activeItem = function (li) {
|
|
4722
4792
|
if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
|
|
@@ -5439,6 +5509,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5439
5509
|
EventHandler.add(this.filterInput, 'keydown', this.onFilterDown, this);
|
|
5440
5510
|
EventHandler.add(this.filterInput, 'blur', this.onBlurHandler, this);
|
|
5441
5511
|
EventHandler.add(this.filterInput, 'paste', this.pasteHandler, this);
|
|
5512
|
+
parentElement = null;
|
|
5442
5513
|
return this.filterInputObj;
|
|
5443
5514
|
}
|
|
5444
5515
|
else {
|
|
@@ -5602,6 +5673,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5602
5673
|
this.activeIndex = this.getIndexByValue(value);
|
|
5603
5674
|
var element = this.findListElement(this.list, 'li', 'data-value', value);
|
|
5604
5675
|
this.selectedLI = element;
|
|
5676
|
+
element = null;
|
|
5605
5677
|
}
|
|
5606
5678
|
else if (this.enableVirtualization && this.getModuleName() === 'autocomplete') {
|
|
5607
5679
|
this.activeIndex = this.skeletonCount;
|
|
@@ -5647,8 +5719,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5647
5719
|
});
|
|
5648
5720
|
return checkField;
|
|
5649
5721
|
};
|
|
5650
|
-
DropDownList.prototype.checkAndFetchItemData = function (list, value, checkField) {
|
|
5722
|
+
DropDownList.prototype.checkAndFetchItemData = function (list, value, checkField, isOffline) {
|
|
5651
5723
|
var _this = this;
|
|
5724
|
+
if (isOffline === void 0) { isOffline = false; }
|
|
5652
5725
|
var fieldValue = this.fields.value.split('.');
|
|
5653
5726
|
var checkVal = list.some(function (x) {
|
|
5654
5727
|
return isNullOrUndefined(x[checkField]) && fieldValue.length > 1 ?
|
|
@@ -5661,27 +5734,67 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5661
5734
|
});
|
|
5662
5735
|
}
|
|
5663
5736
|
if (!checkVal && this.dataSource instanceof DataManager) {
|
|
5664
|
-
(
|
|
5665
|
-
.
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5737
|
+
if (isOffline) {
|
|
5738
|
+
this.searchOfflineData(value, checkField);
|
|
5739
|
+
}
|
|
5740
|
+
else {
|
|
5741
|
+
(this.dataSource).executeQuery(this.getQuery(this.query).where(new Predicate(checkField, 'equal', value)))
|
|
5742
|
+
.then(function (e) {
|
|
5743
|
+
if (e.result.length > 0) {
|
|
5744
|
+
if (!_this.enableVirtualization) {
|
|
5745
|
+
_this.addItem(e.result, list.length);
|
|
5746
|
+
}
|
|
5747
|
+
else {
|
|
5748
|
+
_this.itemData = e.result[0];
|
|
5749
|
+
var dataItem = _this.getItemData();
|
|
5750
|
+
if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
|
|
5751
|
+
(_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
5752
|
+
_this.setProperties({ text: dataItem.text.toString() });
|
|
5753
|
+
Input.setValue(_this.text, _this.inputElement, _this.floatLabelType, _this.showClearButton);
|
|
5754
|
+
}
|
|
5755
|
+
}
|
|
5756
|
+
_this.updateValues();
|
|
5669
5757
|
}
|
|
5670
5758
|
else {
|
|
5671
|
-
_this.
|
|
5672
|
-
var dataItem = _this.getItemData();
|
|
5673
|
-
if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
|
|
5674
|
-
(_this.value !== dataItem.value && _this.text === dataItem.text)) {
|
|
5675
|
-
_this.setProperties({ text: dataItem.text.toString() });
|
|
5676
|
-
Input.setValue(_this.text, _this.inputElement, _this.floatLabelType, _this.showClearButton);
|
|
5677
|
-
}
|
|
5759
|
+
_this.updateValues();
|
|
5678
5760
|
}
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5761
|
+
});
|
|
5762
|
+
}
|
|
5763
|
+
}
|
|
5764
|
+
else {
|
|
5765
|
+
this.updateValues();
|
|
5766
|
+
}
|
|
5767
|
+
};
|
|
5768
|
+
DropDownList.prototype.searchOfflineData = function (value, checkField) {
|
|
5769
|
+
var _this = this;
|
|
5770
|
+
if (!(this.dataSource instanceof DataManager)) {
|
|
5771
|
+
this.updateValues();
|
|
5772
|
+
return;
|
|
5773
|
+
}
|
|
5774
|
+
var dataManager = this.dataSource;
|
|
5775
|
+
var fullData = dataManager.dataSource.json || [];
|
|
5776
|
+
if (fullData && fullData.length > 0) {
|
|
5777
|
+
var foundItem = fullData.find(function (item) {
|
|
5778
|
+
if (_this.fields.value && _this.fields.value.includes('.')) {
|
|
5779
|
+
var fieldValueArray = _this.fields.value.split('.');
|
|
5780
|
+
var fieldVal = _this.checkFieldValue(item, fieldValueArray);
|
|
5781
|
+
return fieldVal === value;
|
|
5683
5782
|
}
|
|
5783
|
+
return item[checkField] === value;
|
|
5684
5784
|
});
|
|
5785
|
+
if (foundItem) {
|
|
5786
|
+
this.itemData = foundItem;
|
|
5787
|
+
var dataItem = this.getItemData();
|
|
5788
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) ||
|
|
5789
|
+
(this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
5790
|
+
this.setProperties({ text: dataItem.text.toString() });
|
|
5791
|
+
Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
5792
|
+
}
|
|
5793
|
+
this.updateValues();
|
|
5794
|
+
}
|
|
5795
|
+
else {
|
|
5796
|
+
this.updateValues();
|
|
5797
|
+
}
|
|
5685
5798
|
}
|
|
5686
5799
|
else {
|
|
5687
5800
|
this.updateValues();
|
|
@@ -5741,6 +5854,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5741
5854
|
if (!(this.enableVirtualization && isNullOrUndefined(element))) {
|
|
5742
5855
|
this.removeFocus();
|
|
5743
5856
|
}
|
|
5857
|
+
element = null;
|
|
5744
5858
|
};
|
|
5745
5859
|
DropDownList.prototype.updateSelection = function () {
|
|
5746
5860
|
var selectedItem = this.list.querySelector('.' + dropDownBaseClasses.selected);
|
|
@@ -5759,6 +5873,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5759
5873
|
}
|
|
5760
5874
|
this.list.querySelector('.' + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus);
|
|
5761
5875
|
}
|
|
5876
|
+
selectedItem = null;
|
|
5762
5877
|
};
|
|
5763
5878
|
DropDownList.prototype.updateSelectionList = function () {
|
|
5764
5879
|
var selectedItem = this.list && this.list.querySelector('.' + 'e-active');
|
|
@@ -5902,6 +6017,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5902
6017
|
parseInt(getComputedStyle(_this.inputElement).paddingLeft, 10) +
|
|
5903
6018
|
parseInt(getComputedStyle(_this.inputElement.parentElement).borderLeftWidth, 10));
|
|
5904
6019
|
}
|
|
6020
|
+
firstItem = null;
|
|
5905
6021
|
}
|
|
5906
6022
|
_this.createPopup(popupEle_1, offsetValue, left);
|
|
5907
6023
|
_this.popupContentElement = _this.popupObj.element.querySelector('.e-content');
|
|
@@ -6155,6 +6271,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6155
6271
|
}
|
|
6156
6272
|
}
|
|
6157
6273
|
_this.activeStateChange();
|
|
6274
|
+
actionList = null;
|
|
6275
|
+
ulElement = null;
|
|
6158
6276
|
},
|
|
6159
6277
|
targetExitViewport: function () {
|
|
6160
6278
|
if (!Browser.isDevice) {
|
|
@@ -6194,6 +6312,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6194
6312
|
var clearElement = this.filterInput.parentElement.querySelector('.' + dropDownListClasses.clearIcon);
|
|
6195
6313
|
detach(this.filterInput);
|
|
6196
6314
|
clearElement.parentElement.insertBefore(this.filterInput, clearElement);
|
|
6315
|
+
clearElement = null;
|
|
6197
6316
|
};
|
|
6198
6317
|
DropDownList.prototype.setPopupPosition = function (border) {
|
|
6199
6318
|
var offsetValue;
|
|
@@ -6222,6 +6341,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6222
6341
|
}
|
|
6223
6342
|
var inputHeight = this.inputWrapper.container.offsetHeight;
|
|
6224
6343
|
offsetValue = offsetValue + liHeight + popupOffset - ((liHeight - inputHeight) / 2);
|
|
6344
|
+
selectedLI = null;
|
|
6345
|
+
firstItem = null;
|
|
6346
|
+
lastItem = null;
|
|
6225
6347
|
return -offsetValue;
|
|
6226
6348
|
};
|
|
6227
6349
|
DropDownList.prototype.setWidth = function () {
|
|
@@ -6236,6 +6358,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6236
6358
|
width = (parseInt(width, 10) + (parseInt(getComputedStyle(firstItem).textIndent, 10) -
|
|
6237
6359
|
parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) +
|
|
6238
6360
|
parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) * 2) + 'px';
|
|
6361
|
+
firstItem = null;
|
|
6239
6362
|
}
|
|
6240
6363
|
return width;
|
|
6241
6364
|
};
|
|
@@ -6490,7 +6613,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6490
6613
|
EventHandler.remove(this.filterInput, 'blur', this.onBlurHandler);
|
|
6491
6614
|
EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
|
|
6492
6615
|
}
|
|
6493
|
-
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
6616
|
+
if (this.allowFiltering && !isNullOrUndefined(this.filterInput) && this.getModuleName() === 'dropdownlist') {
|
|
6494
6617
|
this.filterInput.removeAttribute('aria-activedescendant');
|
|
6495
6618
|
this.filterInput.removeAttribute('aria-disabled');
|
|
6496
6619
|
this.filterInput.removeAttribute('role');
|
|
@@ -6498,7 +6621,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6498
6621
|
this.filterInput.removeAttribute('autocapitalize');
|
|
6499
6622
|
this.filterInput.removeAttribute('spellcheck');
|
|
6500
6623
|
}
|
|
6501
|
-
if (this.filterInput.parentNode) {
|
|
6624
|
+
if (!isNullOrUndefined(this.filterInput) && this.filterInput.parentNode) {
|
|
6502
6625
|
this.filterInput.parentNode.removeChild(this.filterInput);
|
|
6503
6626
|
var attrs = Array.prototype.slice.call(this.filterInput.attributes);
|
|
6504
6627
|
for (var n = 0; n < attrs.length; n++) {
|
|
@@ -6649,6 +6772,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6649
6772
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6650
6773
|
this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();
|
|
6651
6774
|
}
|
|
6775
|
+
ulElement = null;
|
|
6652
6776
|
};
|
|
6653
6777
|
DropDownList.prototype.destroyPopup = function () {
|
|
6654
6778
|
this.isPopupOpen = false;
|
|
@@ -6855,6 +6979,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6855
6979
|
var listItemHeight = Math.ceil(item.getBoundingClientRect().height) +
|
|
6856
6980
|
parseInt(window.getComputedStyle(item).marginBottom, 10);
|
|
6857
6981
|
listParent.remove();
|
|
6982
|
+
listParent = null;
|
|
6983
|
+
item = null;
|
|
6858
6984
|
return listItemHeight;
|
|
6859
6985
|
};
|
|
6860
6986
|
DropDownList.prototype.setFooterTemplate = function (popupEle) {
|
|
@@ -6908,6 +7034,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6908
7034
|
}
|
|
6909
7035
|
var contentEle = popupEle.querySelector('div.e-content');
|
|
6910
7036
|
popupEle.insertBefore(this.header, contentEle);
|
|
7037
|
+
contentEle = null;
|
|
6911
7038
|
};
|
|
6912
7039
|
/**
|
|
6913
7040
|
* Sets the enabled state to DropDownBase.
|
|
@@ -6972,6 +7099,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6972
7099
|
((props.dataSource instanceof DataManager) || (!isNullOrUndefined(props) && Array.isArray(props.dataSource) &&
|
|
6973
7100
|
!isNullOrUndefined(oldProps) && Array.isArray(oldProps.dataSource) && props.dataSource.length !== oldProps.dataSource.length))) {
|
|
6974
7101
|
this.typedString = '';
|
|
7102
|
+
this.selectData = null;
|
|
6975
7103
|
this.resetList(this.dataSource);
|
|
6976
7104
|
}
|
|
6977
7105
|
if (!this.isCustomFilter && !this.isFilterFocus && document.activeElement !== this.filterInput) {
|
|
@@ -7124,11 +7252,13 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7124
7252
|
return { value: void 0 };
|
|
7125
7253
|
}
|
|
7126
7254
|
if (this_1.enableVirtualization) {
|
|
7255
|
+
var isOfflineMode = this_1.dataSource instanceof DataManager &&
|
|
7256
|
+
this_1.dataSource.dataSource.offline === true;
|
|
7127
7257
|
if (newProp.value && this_1.dataSource instanceof DataManager) {
|
|
7128
7258
|
var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
|
|
7129
7259
|
var value = this_1.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
|
|
7130
7260
|
getValue(checkField, newProp.value) : newProp.value;
|
|
7131
|
-
this_1.checkAndFetchItemData(this_1.listData, value, checkField);
|
|
7261
|
+
this_1.checkAndFetchItemData(this_1.listData, value, checkField, isOfflineMode);
|
|
7132
7262
|
}
|
|
7133
7263
|
this_1.updateValues();
|
|
7134
7264
|
this_1.updateInputFields();
|
|
@@ -7208,6 +7338,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7208
7338
|
}
|
|
7209
7339
|
}
|
|
7210
7340
|
this_1.updateInputFields();
|
|
7341
|
+
element = null;
|
|
7211
7342
|
}
|
|
7212
7343
|
break;
|
|
7213
7344
|
case 'footerTemplate':
|
|
@@ -7299,6 +7430,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7299
7430
|
}
|
|
7300
7431
|
}
|
|
7301
7432
|
};
|
|
7433
|
+
li = null;
|
|
7302
7434
|
};
|
|
7303
7435
|
DropDownList.prototype.updatePopupState = function () {
|
|
7304
7436
|
if (this.beforePopupOpen) {
|
|
@@ -7471,6 +7603,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7471
7603
|
this.setValueTemplate();
|
|
7472
7604
|
}
|
|
7473
7605
|
}
|
|
7606
|
+
element = null;
|
|
7474
7607
|
}
|
|
7475
7608
|
else {
|
|
7476
7609
|
this.resetSelection();
|
|
@@ -7596,6 +7729,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7596
7729
|
this.clear();
|
|
7597
7730
|
}
|
|
7598
7731
|
}
|
|
7732
|
+
li = null;
|
|
7599
7733
|
}
|
|
7600
7734
|
}
|
|
7601
7735
|
}
|
|
@@ -7631,7 +7765,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7631
7765
|
if (this.inputElement) {
|
|
7632
7766
|
var attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
|
|
7633
7767
|
'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
|
|
7634
|
-
'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label'
|
|
7768
|
+
'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-describedby', 'aria-label',
|
|
7769
|
+
'role', 'value', 'style', 'type'];
|
|
7635
7770
|
for (var i = 0; i < attrArray.length; i++) {
|
|
7636
7771
|
this.inputElement.removeAttribute(attrArray[i]);
|
|
7637
7772
|
}
|
|
@@ -7712,6 +7847,43 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7712
7847
|
detach(this.popupObj.element);
|
|
7713
7848
|
this.popupObj.element = null;
|
|
7714
7849
|
}
|
|
7850
|
+
if (this.list) {
|
|
7851
|
+
while (this.list.firstChild) {
|
|
7852
|
+
this.list.removeChild(this.list.firstChild);
|
|
7853
|
+
}
|
|
7854
|
+
if (this.list.parentNode) {
|
|
7855
|
+
this.list.parentNode.removeChild(this.list);
|
|
7856
|
+
}
|
|
7857
|
+
detach(this.list);
|
|
7858
|
+
}
|
|
7859
|
+
if (this.ulElement) {
|
|
7860
|
+
while (this.ulElement.firstChild) {
|
|
7861
|
+
this.ulElement.removeChild(this.ulElement.firstChild);
|
|
7862
|
+
}
|
|
7863
|
+
if (this.ulElement.parentNode) {
|
|
7864
|
+
this.ulElement.parentNode.removeChild(this.ulElement);
|
|
7865
|
+
}
|
|
7866
|
+
detach(this.ulElement);
|
|
7867
|
+
}
|
|
7868
|
+
if (this.actionData && this.actionData.ulElement) {
|
|
7869
|
+
while (this.actionData.ulElement.firstChild) {
|
|
7870
|
+
this.actionData.ulElement.removeChild(this.actionData.ulElement.firstChild);
|
|
7871
|
+
}
|
|
7872
|
+
detach(this.actionData.ulElement);
|
|
7873
|
+
this.actionData.ulElement = null;
|
|
7874
|
+
this.actionData.list = null;
|
|
7875
|
+
this.actionData = null;
|
|
7876
|
+
}
|
|
7877
|
+
if (this.actionCompleteData && this.actionCompleteData.ulElement) {
|
|
7878
|
+
while (this.actionCompleteData.ulElement.firstChild) {
|
|
7879
|
+
this.actionCompleteData.ulElement.removeChild(this.actionCompleteData.ulElement.firstChild);
|
|
7880
|
+
}
|
|
7881
|
+
detach(this.actionCompleteData.ulElement);
|
|
7882
|
+
this.actionCompleteData.ulElement = null;
|
|
7883
|
+
this.actionCompleteData.list = null;
|
|
7884
|
+
this.actionCompleteData = null;
|
|
7885
|
+
}
|
|
7886
|
+
this.listData = null;
|
|
7715
7887
|
this.ulElement = null;
|
|
7716
7888
|
this.list = null;
|
|
7717
7889
|
this.clearIconElement = null;
|
|
@@ -7725,20 +7897,19 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7725
7897
|
this.header = null;
|
|
7726
7898
|
this.previousSelectedLI = null;
|
|
7727
7899
|
this.valueTempElement = null;
|
|
7728
|
-
|
|
7729
|
-
detach(this.actionData.ulElement);
|
|
7730
|
-
}
|
|
7731
|
-
this.actionData.ulElement = null;
|
|
7732
|
-
if (this.actionCompleteData.ulElement) {
|
|
7733
|
-
detach(this.actionCompleteData.ulElement);
|
|
7734
|
-
}
|
|
7735
|
-
this.actionCompleteData.ulElement = null;
|
|
7900
|
+
this.resizer = null;
|
|
7736
7901
|
if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
|
|
7737
7902
|
this.inputElement.onchange = null;
|
|
7738
7903
|
}
|
|
7739
7904
|
if (this.inputElement && !isNullOrUndefined(this.inputElement.onselect)) {
|
|
7740
7905
|
this.inputElement.onselect = null;
|
|
7741
7906
|
}
|
|
7907
|
+
if (this.enableVirtualization) {
|
|
7908
|
+
this.notify('destroy', { module: 'VirtualScroll' });
|
|
7909
|
+
this.virtualGroupDataSource = null;
|
|
7910
|
+
this.viewPortInfo = null;
|
|
7911
|
+
this.selectedValueInfo = null;
|
|
7912
|
+
}
|
|
7742
7913
|
Input.destroy({
|
|
7743
7914
|
element: this.inputElement,
|
|
7744
7915
|
floatLabelType: this.floatLabelType,
|
|
@@ -12334,6 +12505,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
12334
12505
|
break;
|
|
12335
12506
|
case 'allowCustom':
|
|
12336
12507
|
break;
|
|
12508
|
+
case 'placeholder':
|
|
12509
|
+
Input.setPlaceholder(newProp.placeholder, this.inputElement, this.getModuleName());
|
|
12510
|
+
break;
|
|
12337
12511
|
default: {
|
|
12338
12512
|
// eslint-disable-next-line max-len
|
|
12339
12513
|
var comboProps = this.getPropObject(prop, newProp, oldProp);
|
|
@@ -14743,7 +14917,15 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
14743
14917
|
MultiSelect.prototype.setPlaceholderSize = function (downIconWidth) {
|
|
14744
14918
|
if (isNullOrUndefined(this.value) || this.value.length === 0) {
|
|
14745
14919
|
if (this.dropIcon.offsetWidth !== 0) {
|
|
14746
|
-
|
|
14920
|
+
var totalIconWidth = downIconWidth + 10;
|
|
14921
|
+
if (this.showClearButton && this.overAllClear) {
|
|
14922
|
+
var display = this.overAllClear.style.display;
|
|
14923
|
+
this.overAllClear.style.display = 'block';
|
|
14924
|
+
var clearWidth = this.overAllClear.offsetWidth;
|
|
14925
|
+
totalIconWidth += clearWidth;
|
|
14926
|
+
this.overAllClear.style.display = display;
|
|
14927
|
+
}
|
|
14928
|
+
this.searchWrapper.style.width = 'calc(100% - ' + totalIconWidth + 'px)';
|
|
14747
14929
|
}
|
|
14748
14930
|
else {
|
|
14749
14931
|
addClass([this.searchWrapper], CUSTOM_WIDTH);
|
|
@@ -15596,7 +15778,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15596
15778
|
}
|
|
15597
15779
|
}
|
|
15598
15780
|
else {
|
|
15599
|
-
this.
|
|
15781
|
+
var listUl = this.list && this.list.querySelector('ul');
|
|
15782
|
+
var isFullList = this.isReact && this.itemTemplate && listUl != null &&
|
|
15783
|
+
listUl.querySelectorAll('.e-list-item').length === this.mainData.length;
|
|
15784
|
+
this.onActionComplete(isFullList ? listUl : list, this.mainData);
|
|
15600
15785
|
}
|
|
15601
15786
|
this.focusAtLastListItem(data);
|
|
15602
15787
|
if (this.value && this.value.length) {
|
|
@@ -15828,9 +16013,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15828
16013
|
addClass([element], CHIP_SELECTED);
|
|
15829
16014
|
if (element) {
|
|
15830
16015
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
15831
|
-
if (!isNullOrUndefined(this.inputElement) && element.id
|
|
16016
|
+
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
15832
16017
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
15833
16018
|
}
|
|
16019
|
+
var chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16020
|
+
if (chipClose) {
|
|
16021
|
+
chipClose.removeAttribute('aria-hidden');
|
|
16022
|
+
}
|
|
15834
16023
|
}
|
|
15835
16024
|
this.trigger('chipSelection', e);
|
|
15836
16025
|
};
|
|
@@ -16127,10 +16316,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16127
16316
|
if (!isNullOrUndefined(this.chipCollectionWrapper)) {
|
|
16128
16317
|
(this.chipCollectionWrapper.style.display = '');
|
|
16129
16318
|
}
|
|
16130
|
-
if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {
|
|
16319
|
+
if (this.mode === 'Delimiter' || (this.mode === 'CheckBox' && !this.isSelectAllClicked)) {
|
|
16131
16320
|
this.showDelimWrapper();
|
|
16132
16321
|
}
|
|
16133
|
-
this.
|
|
16322
|
+
if (!this.isSelectAllClicked) {
|
|
16323
|
+
this.showOverAllClear();
|
|
16324
|
+
}
|
|
16134
16325
|
}
|
|
16135
16326
|
else {
|
|
16136
16327
|
if (!isNullOrUndefined(this.chipCollectionWrapper)) {
|
|
@@ -16173,7 +16364,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16173
16364
|
temp = this.getOverflowVal(this.value.length - 1);
|
|
16174
16365
|
data += temp;
|
|
16175
16366
|
temp = this.viewWrapper.innerHTML;
|
|
16176
|
-
|
|
16367
|
+
if (!this.isSelectAllClicked) {
|
|
16368
|
+
this.updateWrapperText(this.viewWrapper, data);
|
|
16369
|
+
}
|
|
16177
16370
|
}
|
|
16178
16371
|
if (this.enableVirtualization && this.mode === 'CheckBox') {
|
|
16179
16372
|
var currentText = [];
|
|
@@ -16234,6 +16427,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16234
16427
|
var _this = this;
|
|
16235
16428
|
var list = this.listData;
|
|
16236
16429
|
if (this.initStatus && !isNotTrigger && (!this.allowObjectBinding || (this.allowObjectBinding && value))) {
|
|
16430
|
+
var selectAllArgsLocal_1 = null;
|
|
16237
16431
|
value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
|
|
16238
16432
|
var val_2 = dataValue ? dataValue : this.getDataByValue(value);
|
|
16239
16433
|
var eventArgs = {
|
|
@@ -16250,15 +16444,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16250
16444
|
_this.selectAllEventEle.push(element);
|
|
16251
16445
|
}
|
|
16252
16446
|
if (length === 1) {
|
|
16253
|
-
|
|
16447
|
+
selectAllArgsLocal_1 = {
|
|
16254
16448
|
event: eve,
|
|
16255
16449
|
items: _this.selectAllEventEle,
|
|
16256
16450
|
itemData: _this.selectAllEventData,
|
|
16257
16451
|
isInteracted: eve ? true : false,
|
|
16258
16452
|
isChecked: true
|
|
16259
16453
|
};
|
|
16260
|
-
_this.trigger('selectedAll', args);
|
|
16261
|
-
_this.selectAllEventData = [];
|
|
16262
16454
|
}
|
|
16263
16455
|
if (_this.allowCustomValue && _this.isServerRendered && _this.listData !== list) {
|
|
16264
16456
|
_this.listData = list;
|
|
@@ -16295,6 +16487,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16295
16487
|
if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== 'CheckBox') {
|
|
16296
16488
|
_super.prototype.scrollStop.call(_this);
|
|
16297
16489
|
}
|
|
16490
|
+
if (selectAllArgsLocal_1) {
|
|
16491
|
+
_this.trigger('selectedAll', selectAllArgsLocal_1);
|
|
16492
|
+
_this.selectAllEventData = [];
|
|
16493
|
+
}
|
|
16298
16494
|
}
|
|
16299
16495
|
});
|
|
16300
16496
|
}
|
|
@@ -16307,12 +16503,18 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16307
16503
|
MultiSelect.prototype.removeChipFocus = function () {
|
|
16308
16504
|
var elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP$1 + '.' + CHIP_SELECTED);
|
|
16309
16505
|
removeClass(elements, CHIP_SELECTED);
|
|
16506
|
+
var closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16310
16507
|
if (Browser.isDevice) {
|
|
16311
|
-
var closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16312
16508
|
for (var index = 0; index < closeElements.length; index++) {
|
|
16509
|
+
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16313
16510
|
closeElements[index].style.display = 'none';
|
|
16314
16511
|
}
|
|
16315
16512
|
}
|
|
16513
|
+
else {
|
|
16514
|
+
for (var index = 0; index < closeElements.length; index++) {
|
|
16515
|
+
closeElements[index].setAttribute('aria-hidden', 'true');
|
|
16516
|
+
}
|
|
16517
|
+
}
|
|
16316
16518
|
};
|
|
16317
16519
|
MultiSelect.prototype.onMobileChipInteraction = function (e) {
|
|
16318
16520
|
var chipElem = closest(e.target, '.' + CHIP$1);
|
|
@@ -16353,7 +16555,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16353
16555
|
});
|
|
16354
16556
|
var compiledString;
|
|
16355
16557
|
var chipContent = this.createElement('span', { className: CHIP_CONTENT$1 });
|
|
16356
|
-
var chipClose = this.createElement('span', { className: CHIP_CLOSE$1 });
|
|
16558
|
+
var chipClose = this.createElement('span', { className: CHIP_CLOSE$1, attrs: { 'aria-label': 'delete', 'aria-hidden': 'true', 'tabindex': '-1' } });
|
|
16357
16559
|
if (this.mainData) {
|
|
16358
16560
|
itemData = this.getDataByValue(value);
|
|
16359
16561
|
}
|
|
@@ -17632,6 +17834,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17632
17834
|
};
|
|
17633
17835
|
MultiSelect.prototype.onMouseClick = function (e) {
|
|
17634
17836
|
var _this = this;
|
|
17837
|
+
this.isSelectAllClicked = false;
|
|
17635
17838
|
if (!this.isClearAllItem) {
|
|
17636
17839
|
this.keyCode = null;
|
|
17637
17840
|
this.scrollFocusStatus = false;
|
|
@@ -17710,6 +17913,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17710
17913
|
}
|
|
17711
17914
|
else {
|
|
17712
17915
|
e.preventDefault();
|
|
17916
|
+
if (this.mode !== 'CheckBox' && this.hideSelectedItem && this.value.length === this.listData.length && this.isPopupOpen()) {
|
|
17917
|
+
this.hidePopup(e);
|
|
17918
|
+
}
|
|
17713
17919
|
}
|
|
17714
17920
|
var isFilterData = this.targetElement().trim() !== '' ? true : false;
|
|
17715
17921
|
this.makeTextBoxEmpty();
|
|
@@ -18045,6 +18251,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18045
18251
|
var remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
|
|
18046
18252
|
raminElement.innerText = remainCompildTemp;
|
|
18047
18253
|
this.viewWrapper.appendChild(raminElement);
|
|
18254
|
+
if (this.isSelectAllClicked) {
|
|
18255
|
+
this.showOverAllClear();
|
|
18256
|
+
}
|
|
18048
18257
|
this.renderReactTemplates();
|
|
18049
18258
|
var remainSize = raminElement.offsetWidth;
|
|
18050
18259
|
remove(raminElement);
|
|
@@ -18366,9 +18575,22 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18366
18575
|
index++;
|
|
18367
18576
|
}
|
|
18368
18577
|
if (length > 50) {
|
|
18578
|
+
createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
|
|
18579
|
+
showSpinner(this.filterParent);
|
|
18580
|
+
if (this.popupObj && this.filterParent) {
|
|
18581
|
+
[this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = '0.5'); });
|
|
18582
|
+
this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
|
|
18583
|
+
this.filterParent.style.cursor = 'progress';
|
|
18584
|
+
}
|
|
18369
18585
|
setTimeout(function () {
|
|
18370
|
-
|
|
18371
|
-
|
|
18586
|
+
var dataArray = _this.virtualSelectAllData;
|
|
18587
|
+
var batchSize = 500;
|
|
18588
|
+
var currentIndex = 0;
|
|
18589
|
+
var processBatch = function () {
|
|
18590
|
+
var endIndex = Math.min(currentIndex + batchSize, dataArray.length);
|
|
18591
|
+
var batch = dataArray.slice(currentIndex, endIndex);
|
|
18592
|
+
// Use map on the batch
|
|
18593
|
+
batch.map(function (obj) {
|
|
18372
18594
|
if (_this.value && obj[_this.fields.value] != null && Array.isArray(_this.value) &&
|
|
18373
18595
|
((!_this.allowObjectBinding && _this.value.indexOf(obj[_this.fields.value]) < 0) ||
|
|
18374
18596
|
(_this.allowObjectBinding && !_this.isObjectInArray(obj[_this.fields.value], _this.value)))) {
|
|
@@ -18377,21 +18599,34 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18377
18599
|
_this.dispatchSelect(value, event, null, false, length, obj, text);
|
|
18378
18600
|
}
|
|
18379
18601
|
});
|
|
18380
|
-
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
if (!_this.changeOnBlur) {
|
|
18384
|
-
_this.updateValueState(event, _this.value, _this.tempValues);
|
|
18385
|
-
_this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
|
|
18386
|
-
}
|
|
18387
|
-
_this.updateHiddenElement(true);
|
|
18388
|
-
if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
|
|
18389
|
-
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
18390
|
-
if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
|
|
18391
|
-
li[index - 1].classList.remove('e-item-focus');
|
|
18602
|
+
currentIndex = endIndex;
|
|
18603
|
+
if (currentIndex < dataArray.length) {
|
|
18604
|
+
requestAnimationFrame(processBatch);
|
|
18392
18605
|
}
|
|
18393
|
-
|
|
18394
|
-
|
|
18606
|
+
else {
|
|
18607
|
+
_this.updatedataValueItems(event);
|
|
18608
|
+
_this.isSelectAllLoop = false;
|
|
18609
|
+
if (!_this.changeOnBlur) {
|
|
18610
|
+
_this.updateValueState(event, _this.value, _this.tempValues);
|
|
18611
|
+
_this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
|
|
18612
|
+
}
|
|
18613
|
+
_this.updateHiddenElement(true);
|
|
18614
|
+
if (_this.popupWrapper && li[index - 1] && li[index - 1].classList.contains('e-item-focus')) {
|
|
18615
|
+
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
18616
|
+
if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
|
|
18617
|
+
li[index - 1].classList.remove('e-item-focus');
|
|
18618
|
+
}
|
|
18619
|
+
}
|
|
18620
|
+
_this.checkSelectAll();
|
|
18621
|
+
hideSpinner(_this.filterParent);
|
|
18622
|
+
if (_this.popupObj && _this.filterParent) {
|
|
18623
|
+
[_this.popupObj.element.querySelector('.e-content'), _this.popupObj.element.querySelector('.e-selectall-parent'), _this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
|
|
18624
|
+
_this.filterParent.style.cursor = '';
|
|
18625
|
+
_this.filterParent.querySelector('.e-input').removeAttribute('readonly');
|
|
18626
|
+
}
|
|
18627
|
+
}
|
|
18628
|
+
};
|
|
18629
|
+
processBatch();
|
|
18395
18630
|
}, 0);
|
|
18396
18631
|
}
|
|
18397
18632
|
else if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
|
|
@@ -18405,25 +18640,60 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18405
18640
|
}
|
|
18406
18641
|
else {
|
|
18407
18642
|
if (this.virtualSelectAllData && this.virtualSelectAllData.length > 0) {
|
|
18408
|
-
this.virtualSelectAllData
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18643
|
+
var dataArray_1 = this.virtualSelectAllData;
|
|
18644
|
+
var batchSize_1 = 500;
|
|
18645
|
+
var currentIndex_1 = 0;
|
|
18646
|
+
this.isProcessingVirtualSelectAll = true;
|
|
18647
|
+
createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
|
|
18648
|
+
showSpinner(this.filterParent);
|
|
18649
|
+
if (this.popupObj && this.filterParent) {
|
|
18650
|
+
[this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = '0.5'); });
|
|
18651
|
+
this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
|
|
18652
|
+
this.filterParent.style.cursor = 'progress';
|
|
18653
|
+
}
|
|
18654
|
+
var processBatch_1 = function () {
|
|
18655
|
+
var endIndex = Math.min(currentIndex_1 + batchSize_1, dataArray_1.length);
|
|
18656
|
+
var batch = dataArray_1.slice(currentIndex_1, endIndex);
|
|
18657
|
+
// Use map on the batch
|
|
18658
|
+
batch.map(function (obj) {
|
|
18659
|
+
_this.virtualSelectAll = true;
|
|
18660
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
18661
|
+
_this.removeValue(_this.value[index], event, _this.value.length - index);
|
|
18662
|
+
});
|
|
18663
|
+
currentIndex_1 = endIndex;
|
|
18664
|
+
if (currentIndex_1 < dataArray_1.length) {
|
|
18665
|
+
requestAnimationFrame(processBatch_1);
|
|
18666
|
+
}
|
|
18667
|
+
else {
|
|
18668
|
+
// All batches completed
|
|
18669
|
+
_this.isProcessingVirtualSelectAll = false;
|
|
18670
|
+
hideSpinner(_this.filterParent);
|
|
18671
|
+
if (_this.popupObj && _this.filterParent) {
|
|
18672
|
+
[_this.popupObj.element.querySelector('.e-content'), _this.popupObj.element.querySelector('.e-selectall-parent'), _this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
|
|
18673
|
+
_this.filterParent.querySelector('.e-input').removeAttribute('readonly');
|
|
18674
|
+
_this.filterParent.style.cursor = '';
|
|
18675
|
+
}
|
|
18676
|
+
if (!_this.isSelectAllClicked) {
|
|
18677
|
+
_this.showOverAllClear();
|
|
18678
|
+
}
|
|
18679
|
+
_this.updatedataValueItems(event);
|
|
18680
|
+
if (!_this.changeOnBlur) {
|
|
18681
|
+
_this.updateValueState(event, _this.value, _this.tempValues);
|
|
18682
|
+
_this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;
|
|
18683
|
+
}
|
|
18684
|
+
_this.updateHiddenElement();
|
|
18685
|
+
_this.setProperties({ value: [] }, true);
|
|
18686
|
+
_this.selectedListData = [];
|
|
18687
|
+
_this.virtualSelectAll = false;
|
|
18688
|
+
if (!isNullOrUndefined(_this.viewPortInfo.startIndex) && !isNullOrUndefined(_this.viewPortInfo.endIndex)) {
|
|
18689
|
+
_this.notify('setCurrentViewDataAsync', {
|
|
18690
|
+
component: _this.getModuleName(),
|
|
18691
|
+
module: 'VirtualScroll'
|
|
18692
|
+
});
|
|
18693
|
+
}
|
|
18694
|
+
}
|
|
18695
|
+
};
|
|
18696
|
+
processBatch_1();
|
|
18427
18697
|
}
|
|
18428
18698
|
}
|
|
18429
18699
|
this.checkSelectAll();
|
|
@@ -18452,13 +18722,13 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18452
18722
|
};
|
|
18453
18723
|
this.trigger('beforeSelectAll', beforeSelectArgs);
|
|
18454
18724
|
if ((li && li.length) || (this.enableVirtualization && !state)) {
|
|
18455
|
-
var
|
|
18456
|
-
var
|
|
18725
|
+
var index = 0;
|
|
18726
|
+
var count = 0;
|
|
18457
18727
|
if (this.enableGroupCheckBox) {
|
|
18458
|
-
|
|
18728
|
+
count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;
|
|
18459
18729
|
}
|
|
18460
18730
|
else {
|
|
18461
|
-
|
|
18731
|
+
count = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;
|
|
18462
18732
|
}
|
|
18463
18733
|
if (!beforeSelectArgs.preventSelectEvent) {
|
|
18464
18734
|
if (this.enableVirtualization) {
|
|
@@ -18473,42 +18743,73 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18473
18743
|
}
|
|
18474
18744
|
}
|
|
18475
18745
|
else {
|
|
18476
|
-
while (
|
|
18477
|
-
this.isSelectAllTarget = (length ===
|
|
18478
|
-
this.updateListSelection(li[
|
|
18746
|
+
while (index < length && index <= 50 && index < count) {
|
|
18747
|
+
this.isSelectAllTarget = (length === index + 1);
|
|
18748
|
+
this.updateListSelection(li[index], event, length - index);
|
|
18479
18749
|
if (this.enableGroupCheckBox) {
|
|
18480
|
-
this.findGroupStart(li[
|
|
18750
|
+
this.findGroupStart(li[index]);
|
|
18481
18751
|
}
|
|
18482
|
-
|
|
18752
|
+
index++;
|
|
18483
18753
|
}
|
|
18484
18754
|
if (length > 50) {
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
18755
|
+
createSpinner({ target: this.filterParent, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);
|
|
18756
|
+
showSpinner(this.filterParent);
|
|
18757
|
+
if (this.popupObj && this.filterParent) {
|
|
18758
|
+
[this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = '0.5'); });
|
|
18759
|
+
this.filterParent.querySelector('.e-input').setAttribute('readonly', 'true');
|
|
18760
|
+
this.filterParent.style.cursor = 'progress';
|
|
18761
|
+
}
|
|
18762
|
+
this.isProcessingVirtualSelectAll = !this.isSelectAllClicked;
|
|
18763
|
+
var indexLocal_1 = index; // preserve original index value
|
|
18764
|
+
var maxIndex_1 = Math.min(length, count);
|
|
18765
|
+
// Use two-frame yield to ensure spinner paints before heavy work starts
|
|
18766
|
+
var CHUNK_SIZE_1 = 6;
|
|
18767
|
+
requestAnimationFrame(function () {
|
|
18768
|
+
requestAnimationFrame(function processFrame() {
|
|
18769
|
+
if (!this.list) {
|
|
18770
|
+
return;
|
|
18491
18771
|
}
|
|
18492
|
-
|
|
18493
|
-
|
|
18494
|
-
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18772
|
+
if (indexLocal_1 >= maxIndex_1) {
|
|
18773
|
+
this.isProcessingVirtualSelectAll = !this.isProcessingVirtualSelectAll;
|
|
18774
|
+
this.updatedataValueItems(event);
|
|
18775
|
+
if (!this.changeOnBlur) {
|
|
18776
|
+
this.updateValueState(event, this.value, this.tempValues);
|
|
18777
|
+
this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;
|
|
18778
|
+
}
|
|
18779
|
+
this.updateHiddenElement();
|
|
18780
|
+
if (this.popupWrapper && li[indexLocal_1 - 1] && li[indexLocal_1 - 1].classList.contains('e-item-focus')) {
|
|
18781
|
+
var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];
|
|
18782
|
+
if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {
|
|
18783
|
+
li[indexLocal_1 - 1].classList.remove('e-item-focus');
|
|
18784
|
+
}
|
|
18785
|
+
}
|
|
18786
|
+
hideSpinner(this.filterParent);
|
|
18787
|
+
if (this.popupObj && this.filterParent) {
|
|
18788
|
+
[this.popupObj.element.querySelector('.e-content'), this.popupObj.element.querySelector('.e-selectall-parent'), this.filterParent].forEach(function (el) { return el && (el.style.opacity = ''); });
|
|
18789
|
+
this.filterParent.querySelector('.e-input').removeAttribute('readonly');
|
|
18790
|
+
this.filterParent.style.cursor = '';
|
|
18791
|
+
}
|
|
18792
|
+
return;
|
|
18504
18793
|
}
|
|
18505
|
-
|
|
18506
|
-
|
|
18794
|
+
// process up to CHUNK_SIZE items this frame
|
|
18795
|
+
var processed = 0;
|
|
18796
|
+
while (processed < CHUNK_SIZE_1 && indexLocal_1 < maxIndex_1) {
|
|
18797
|
+
this.isSelectAllTarget = (length === indexLocal_1 + 1);
|
|
18798
|
+
this.updateListSelection(li[indexLocal_1], event, length - indexLocal_1);
|
|
18799
|
+
if (this.enableGroupCheckBox) {
|
|
18800
|
+
this.findGroupStart(li[indexLocal_1]);
|
|
18801
|
+
}
|
|
18802
|
+
indexLocal_1++;
|
|
18803
|
+
processed++;
|
|
18804
|
+
}
|
|
18805
|
+
requestAnimationFrame(processFrame.bind(this));
|
|
18806
|
+
}.bind(_this));
|
|
18807
|
+
});
|
|
18507
18808
|
}
|
|
18508
18809
|
}
|
|
18509
18810
|
}
|
|
18510
18811
|
else {
|
|
18511
|
-
for (var i = 0; i < li.length && i <
|
|
18812
|
+
for (var i = 0; i < li.length && i < count; i++) {
|
|
18512
18813
|
this.removeHover();
|
|
18513
18814
|
var customVal = li[i].getAttribute('data-value');
|
|
18514
18815
|
var value = this.getFormattedValue(customVal);
|
|
@@ -18552,7 +18853,10 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18552
18853
|
this.trigger('selectedAll', args);
|
|
18553
18854
|
}
|
|
18554
18855
|
}
|
|
18555
|
-
this.
|
|
18856
|
+
if (!this.isProcessingVirtualSelectAll &&
|
|
18857
|
+
((!this.isSelectAllClicked) || (this.isSelectAllClicked && (this.enableVirtualization ? length > 30 : length <= 50)))) {
|
|
18858
|
+
this.updatedataValueItems(event);
|
|
18859
|
+
}
|
|
18556
18860
|
this.checkPlaceholderSize();
|
|
18557
18861
|
if (length <= 50 && !beforeSelectArgs.preventSelectEvent) {
|
|
18558
18862
|
if (!this.changeOnBlur) {
|
|
@@ -18645,6 +18949,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18645
18949
|
};
|
|
18646
18950
|
MultiSelect.prototype.selectAllItems = function (state, event) {
|
|
18647
18951
|
var _this = this;
|
|
18952
|
+
this.isSelectAllClicked = state;
|
|
18648
18953
|
if (isNullOrUndefined(this.list)) {
|
|
18649
18954
|
this.selectAllAction = function () {
|
|
18650
18955
|
if (_this.mode === 'CheckBox' && _this.showSelectAll) {
|
|
@@ -19355,7 +19660,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19355
19660
|
}
|
|
19356
19661
|
else {
|
|
19357
19662
|
this.chipCollectionWrapper = this.createElement('span', {
|
|
19358
|
-
className: CHIP_WRAPPER$1
|
|
19663
|
+
className: CHIP_WRAPPER$1, attrs: { role: 'listbox' }
|
|
19359
19664
|
});
|
|
19360
19665
|
this.chipCollectionWrapper.style.display = 'none';
|
|
19361
19666
|
if (this.mode === 'Default') {
|
|
@@ -19929,6 +20234,50 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19929
20234
|
if (this.delimiterWrapper && this.delimiterWrapper.parentElement) {
|
|
19930
20235
|
this.delimiterWrapper.parentElement.remove();
|
|
19931
20236
|
}
|
|
20237
|
+
if (this.hiddenElement) {
|
|
20238
|
+
if (this.hiddenElement.onchange) {
|
|
20239
|
+
this.hiddenElement.onchange = null;
|
|
20240
|
+
}
|
|
20241
|
+
this.hiddenElement.onchange = null;
|
|
20242
|
+
this.hiddenElement.onclick = null;
|
|
20243
|
+
this.hiddenElement.oninput = null;
|
|
20244
|
+
var attrs = Array.prototype.slice.call(this.hiddenElement.attributes);
|
|
20245
|
+
for (var n = 0; n < attrs.length; n++) {
|
|
20246
|
+
this.hiddenElement.removeAttribute(attrs[n].name);
|
|
20247
|
+
}
|
|
20248
|
+
var children = this.hiddenElement.children;
|
|
20249
|
+
for (var i = 0; i < children.length; i++) {
|
|
20250
|
+
var child = children[i];
|
|
20251
|
+
child.onclick = null;
|
|
20252
|
+
child.onchange = null;
|
|
20253
|
+
child.textContent = '';
|
|
20254
|
+
var attr = Array.prototype.slice.call(child.attributes);
|
|
20255
|
+
for (var n = 0; n < attr.length; n++) {
|
|
20256
|
+
child.removeAttribute(attr[n].name);
|
|
20257
|
+
}
|
|
20258
|
+
}
|
|
20259
|
+
var selectedElement = this.hiddenElement.querySelector('option');
|
|
20260
|
+
if (selectedElement) {
|
|
20261
|
+
selectedElement.removeAttribute('value');
|
|
20262
|
+
selectedElement.removeAttribute('selected');
|
|
20263
|
+
selectedElement.text = '';
|
|
20264
|
+
selectedElement.innerHTML = '';
|
|
20265
|
+
selectedElement = null;
|
|
20266
|
+
}
|
|
20267
|
+
while (this.hiddenElement.firstChild) {
|
|
20268
|
+
this.hiddenElement.removeChild(this.hiddenElement.firstChild);
|
|
20269
|
+
}
|
|
20270
|
+
if (this.hiddenElement.attributes) {
|
|
20271
|
+
var attr = Array.prototype.slice.call(this.hiddenElement.attributes);
|
|
20272
|
+
for (var n = 0; n < attr.length; n++) {
|
|
20273
|
+
this.hiddenElement.removeAttribute(attr[n].name);
|
|
20274
|
+
}
|
|
20275
|
+
}
|
|
20276
|
+
if (this.hiddenElement.parentNode) {
|
|
20277
|
+
this.hiddenElement.parentNode.removeChild(this.hiddenElement);
|
|
20278
|
+
}
|
|
20279
|
+
this.hiddenElement.innerHTML = '';
|
|
20280
|
+
}
|
|
19932
20281
|
// Remove the select element if it exists
|
|
19933
20282
|
var selectElement = this.overAllWrapper.querySelector('select.e-multi-hidden');
|
|
19934
20283
|
if (selectElement && selectElement.parentElement) {
|
|
@@ -19948,7 +20297,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19948
20297
|
var attrArray = ['readonly', 'aria-disabled', 'placeholder', 'aria-labelledby',
|
|
19949
20298
|
'aria-expanded', 'autocomplete', 'aria-readonly', 'autocapitalize',
|
|
19950
20299
|
'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-label', 'aria-hidden', 'tabindex', 'aria-controls',
|
|
19951
|
-
'aria-describedby', 'size', 'role', 'type', 'class'];
|
|
20300
|
+
'aria-describedby', 'size', 'role', 'type', 'class', 'aria-activedescendant'];
|
|
19952
20301
|
for (var i = 0; i < attrArray.length; i++) {
|
|
19953
20302
|
this.inputElement.removeAttribute(attrArray[i]);
|
|
19954
20303
|
}
|
|
@@ -23822,8 +24171,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23822
24171
|
return;
|
|
23823
24172
|
}
|
|
23824
24173
|
this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
|
|
23825
|
-
var
|
|
23826
|
-
|
|
24174
|
+
var activeParent = document.activeElement && document.activeElement.parentElement;
|
|
24175
|
+
var isRteImage = activeParent && !!activeParent.querySelector('.e-rte-image');
|
|
24176
|
+
var isBECodeDropdownFocused = activeParent && !!activeParent.querySelector('.e-blockeditor .e-code-block-container .e-input-group.e-input-focus');
|
|
24177
|
+
if (document.activeElement !== this.inputElement && !isRteImage && !isBECodeDropdownFocused) {
|
|
23827
24178
|
this.inputElement.focus();
|
|
23828
24179
|
}
|
|
23829
24180
|
if (this.isContentEditable(this.inputElement)) {
|
|
@@ -23848,7 +24199,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
23848
24199
|
if (!this.requireLeadingSpace && lastWordRange && lastWordRange.includes(this.mentionChar)) {
|
|
23849
24200
|
lastWordRange = this.mentionChar + lastWordRange.split(this.mentionChar).pop();
|
|
23850
24201
|
}
|
|
23851
|
-
if (lastWordRange
|
|
24202
|
+
if (/\s|\u00A0/.test(lastWordRange)) {
|
|
23852
24203
|
return;
|
|
23853
24204
|
}
|
|
23854
24205
|
}
|
|
@@ -24382,7 +24733,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
24382
24733
|
};
|
|
24383
24734
|
Mention.prototype.setHeight = function (popupEle) {
|
|
24384
24735
|
if (this.popupHeight !== 'auto' && this.list) {
|
|
24385
|
-
|
|
24736
|
+
var parentStyle = getComputedStyle(this.list.parentElement);
|
|
24737
|
+
var paddingY = parseInt(parentStyle.paddingTop || '0', 10) + parseInt(parentStyle.paddingBottom || '0', 10);
|
|
24738
|
+
this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2 - paddingY).toString() + 'px'; // due to box-sizing property
|
|
24386
24739
|
popupEle.style.maxHeight = formatUnit(this.popupHeight);
|
|
24387
24740
|
}
|
|
24388
24741
|
else {
|