@syncfusion/ej2-dropdowns 25.2.7-130084 → 26.1.35-750253
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +3 -2
- package/{ReadMe.md → README.md} +1 -1
- package/dist/ej2-dropdowns.min.js +10 -1
- package/dist/ej2-dropdowns.umd.min.js +10 -1
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +505 -215
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +498 -207
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +10 -1
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +80 -79
- package/src/auto-complete/auto-complete-model.d.ts +10 -10
- package/src/auto-complete/auto-complete.d.ts +12 -12
- package/src/auto-complete/auto-complete.js +3 -3
- package/src/combo-box/combo-box-model.d.ts +17 -17
- package/src/combo-box/combo-box.d.ts +27 -27
- package/src/combo-box/combo-box.js +25 -10
- package/src/common/interface.js +0 -1
- package/src/common/virtual-scroll.js +1 -0
- package/src/drop-down-base/drop-down-base-model.d.ts +21 -14
- package/src/drop-down-base/drop-down-base.d.ts +43 -17
- package/src/drop-down-base/drop-down-base.js +65 -10
- package/src/drop-down-list/drop-down-list-model.d.ts +3 -3
- package/src/drop-down-list/drop-down-list.d.ts +19 -5
- package/src/drop-down-list/drop-down-list.js +130 -5
- package/src/drop-down-tree/drop-down-tree-model.d.ts +16 -16
- package/src/drop-down-tree/drop-down-tree.d.ts +18 -14
- package/src/drop-down-tree/drop-down-tree.js +52 -38
- package/src/list-box/list-box-model.d.ts +2 -2
- package/src/list-box/list-box.d.ts +2 -2
- package/src/list-box/list-box.js +30 -9
- package/src/mention/mention.js +23 -8
- package/src/multi-select/interface.js +0 -1
- package/src/multi-select/multi-select.d.ts +15 -0
- package/src/multi-select/multi-select.js +135 -12
- package/styles/auto-complete/_bootstrap5.3-definition.scss +2 -0
- package/styles/auto-complete/_fluent2-definition.scss +2 -0
- package/styles/auto-complete/bootstrap-dark.css +5 -2
- package/styles/auto-complete/bootstrap.css +5 -2
- package/styles/auto-complete/bootstrap4.css +6 -2
- package/styles/auto-complete/bootstrap5-dark.css +6 -2
- package/styles/auto-complete/bootstrap5.css +6 -2
- package/styles/auto-complete/fabric-dark.css +3 -1
- package/styles/auto-complete/fabric.css +3 -1
- package/styles/auto-complete/fluent-dark.css +6 -2
- package/styles/auto-complete/fluent.css +6 -2
- package/styles/auto-complete/fluent2.css +1140 -0
- package/styles/auto-complete/fluent2.scss +4 -0
- package/styles/auto-complete/highcontrast-light.css +3 -1
- package/styles/auto-complete/highcontrast.css +3 -1
- package/styles/auto-complete/material-dark.css +16 -5
- package/styles/auto-complete/material.css +16 -5
- package/styles/auto-complete/material3-dark.css +17 -6
- package/styles/auto-complete/material3-dark.scss +1 -1
- package/styles/auto-complete/material3.css +17 -6
- package/styles/auto-complete/material3.scss +1 -1
- package/styles/auto-complete/tailwind-dark.css +16 -5
- package/styles/auto-complete/tailwind.css +16 -5
- package/styles/bootstrap-dark.css +196 -228
- package/styles/bootstrap-dark.scss +28 -8
- package/styles/bootstrap.css +196 -228
- package/styles/bootstrap.scss +28 -8
- package/styles/bootstrap4.css +199 -229
- package/styles/bootstrap4.scss +28 -8
- package/styles/bootstrap5-dark.css +196 -221
- package/styles/bootstrap5-dark.scss +28 -8
- package/styles/bootstrap5.css +196 -221
- package/styles/bootstrap5.scss +28 -8
- package/styles/combo-box/_bootstrap5.3-definition.scss +2 -0
- package/styles/combo-box/_fluent2-definition.scss +2 -0
- package/styles/combo-box/bootstrap-dark.css +5 -2
- package/styles/combo-box/bootstrap.css +5 -2
- package/styles/combo-box/bootstrap4.css +6 -2
- package/styles/combo-box/bootstrap5-dark.css +6 -2
- package/styles/combo-box/bootstrap5.css +6 -2
- package/styles/combo-box/fabric-dark.css +3 -1
- package/styles/combo-box/fabric.css +3 -1
- package/styles/combo-box/fluent-dark.css +6 -2
- package/styles/combo-box/fluent.css +6 -2
- package/styles/combo-box/fluent2.css +1140 -0
- package/styles/combo-box/fluent2.scss +4 -0
- package/styles/combo-box/highcontrast-light.css +3 -1
- package/styles/combo-box/highcontrast.css +3 -1
- package/styles/combo-box/material-dark.css +16 -5
- package/styles/combo-box/material.css +16 -5
- package/styles/combo-box/material3-dark.css +17 -6
- package/styles/combo-box/material3-dark.scss +1 -1
- package/styles/combo-box/material3.css +17 -6
- package/styles/combo-box/material3.scss +1 -1
- package/styles/combo-box/tailwind-dark.css +16 -5
- package/styles/combo-box/tailwind.css +16 -5
- package/styles/drop-down-base/_bds-definition.scss +2 -2
- package/styles/drop-down-base/_bootstrap5.3-definition.scss +117 -0
- package/styles/drop-down-base/_fluent2-definition.scss +134 -0
- package/styles/drop-down-base/_layout.scss +12 -2
- package/styles/drop-down-base/_material3-definition.scss +0 -11
- package/styles/drop-down-base/_theme.scss +2 -11
- package/styles/drop-down-base/bootstrap-dark.css +2 -1
- package/styles/drop-down-base/bootstrap.css +2 -1
- package/styles/drop-down-base/bootstrap4.css +2 -1
- package/styles/drop-down-base/bootstrap5-dark.css +2 -1
- package/styles/drop-down-base/bootstrap5.css +2 -1
- package/styles/drop-down-base/fabric-dark.css +2 -1
- package/styles/drop-down-base/fabric.css +2 -1
- package/styles/drop-down-base/fluent-dark.css +2 -1
- package/styles/drop-down-base/fluent.css +2 -1
- package/styles/drop-down-base/fluent2.css +1447 -0
- package/styles/drop-down-base/fluent2.scss +3 -0
- package/styles/drop-down-base/highcontrast-light.css +2 -1
- package/styles/drop-down-base/highcontrast.css +2 -1
- package/styles/drop-down-base/material-dark.css +2 -1
- package/styles/drop-down-base/material.css +2 -1
- package/styles/drop-down-base/material3-dark.css +9 -2
- package/styles/drop-down-base/material3-dark.scss +1 -1
- package/styles/drop-down-base/material3.css +9 -2
- package/styles/drop-down-base/material3.scss +1 -1
- package/styles/drop-down-base/tailwind-dark.css +2 -1
- package/styles/drop-down-base/tailwind.css +2 -1
- package/styles/drop-down-list/_bootstrap5.3-definition.scss +201 -0
- package/styles/drop-down-list/_fluent2-definition.scss +134 -0
- package/styles/drop-down-list/_layout.scss +5 -3
- package/styles/drop-down-list/_material3-definition.scss +0 -8
- package/styles/drop-down-list/bootstrap-dark.css +38 -3
- package/styles/drop-down-list/bootstrap.css +38 -3
- package/styles/drop-down-list/bootstrap4.css +39 -3
- package/styles/drop-down-list/bootstrap5-dark.css +39 -3
- package/styles/drop-down-list/bootstrap5.css +39 -3
- package/styles/drop-down-list/fabric-dark.css +36 -2
- package/styles/drop-down-list/fabric.css +36 -2
- package/styles/drop-down-list/fluent-dark.css +39 -3
- package/styles/drop-down-list/fluent.css +39 -3
- package/styles/drop-down-list/fluent2.css +1684 -0
- package/styles/drop-down-list/fluent2.scss +9 -0
- package/styles/drop-down-list/highcontrast-light.css +36 -2
- package/styles/drop-down-list/highcontrast.css +36 -2
- package/styles/drop-down-list/icons/_bootstrap5.3.scss +14 -0
- package/styles/drop-down-list/icons/_fluent2.scss +14 -0
- package/styles/drop-down-list/material-dark.css +58 -7
- package/styles/drop-down-list/material.css +72 -9
- package/styles/drop-down-list/material3-dark.css +74 -10
- package/styles/drop-down-list/material3-dark.scss +1 -1
- package/styles/drop-down-list/material3.css +74 -10
- package/styles/drop-down-list/material3.scss +1 -1
- package/styles/drop-down-list/tailwind-dark.css +49 -6
- package/styles/drop-down-list/tailwind.css +49 -6
- package/styles/drop-down-tree/_bds-definition.scss +5 -0
- package/styles/drop-down-tree/_bootstrap4-definition.scss +1 -0
- package/styles/drop-down-tree/_bootstrap5-definition.scss +5 -0
- package/styles/drop-down-tree/_bootstrap5.3-definition.scss +66 -0
- package/styles/drop-down-tree/_fluent-definition.scss +4 -0
- package/styles/drop-down-tree/_fluent2-definition.scss +75 -0
- package/styles/drop-down-tree/_layout.scss +289 -327
- package/styles/drop-down-tree/_material3-definition.scss +3 -5
- package/styles/drop-down-tree/_tailwind-definition.scss +7 -2
- package/styles/drop-down-tree/_theme.scss +24 -41
- package/styles/drop-down-tree/bootstrap-dark.css +63 -29
- package/styles/drop-down-tree/bootstrap.css +63 -29
- package/styles/drop-down-tree/bootstrap4.css +64 -30
- package/styles/drop-down-tree/bootstrap5-dark.css +63 -27
- package/styles/drop-down-tree/bootstrap5.css +63 -27
- package/styles/drop-down-tree/fabric-dark.css +63 -29
- package/styles/drop-down-tree/fabric.css +63 -29
- package/styles/drop-down-tree/fluent-dark.css +71 -35
- package/styles/drop-down-tree/fluent.css +71 -35
- package/styles/drop-down-tree/fluent2.css +1732 -0
- package/styles/drop-down-tree/fluent2.scss +9 -0
- package/styles/drop-down-tree/highcontrast-light.css +63 -29
- package/styles/drop-down-tree/highcontrast.css +63 -23
- package/styles/drop-down-tree/icons/_bootstrap5.3.scss +11 -0
- package/styles/drop-down-tree/icons/_fluent2.scss +14 -0
- package/styles/drop-down-tree/material-dark.css +80 -43
- package/styles/drop-down-tree/material.css +97 -51
- package/styles/drop-down-tree/material3-dark.css +85 -32
- package/styles/drop-down-tree/material3-dark.scss +1 -1
- package/styles/drop-down-tree/material3.css +85 -32
- package/styles/drop-down-tree/material3.scss +1 -1
- package/styles/drop-down-tree/tailwind-dark.css +72 -28
- package/styles/drop-down-tree/tailwind.css +72 -28
- package/styles/fabric-dark.css +194 -227
- package/styles/fabric-dark.scss +28 -8
- package/styles/fabric.css +194 -227
- package/styles/fabric.scss +28 -8
- package/styles/fluent-dark.css +206 -236
- package/styles/fluent-dark.scss +28 -8
- package/styles/fluent.css +206 -236
- package/styles/fluent.scss +28 -8
- package/styles/fluent2.css +4771 -0
- package/styles/fluent2.scss +28 -0
- package/styles/highcontrast-light.css +197 -227
- package/styles/highcontrast-light.scss +28 -8
- package/styles/highcontrast.css +197 -221
- package/styles/highcontrast.scss +28 -8
- package/styles/list-box/_bootstrap-dark-definition.scss +0 -2
- package/styles/list-box/_bootstrap5.3-definition.scss +120 -0
- package/styles/list-box/_fabric-dark-definition.scss +0 -2
- package/styles/list-box/_fluent2-definition.scss +121 -0
- package/styles/list-box/_highcontrast-light-definition.scss +0 -2
- package/styles/list-box/_layout.scss +65 -44
- package/styles/list-box/_material-dark-definition.scss +0 -2
- package/styles/list-box/_tailwind-definition.scss +1 -1
- package/styles/list-box/_theme.scss +36 -65
- package/styles/list-box/bootstrap-dark.css +72 -112
- package/styles/list-box/bootstrap.css +72 -112
- package/styles/list-box/bootstrap4.css +72 -112
- package/styles/list-box/bootstrap5-dark.css +72 -106
- package/styles/list-box/bootstrap5.css +72 -106
- package/styles/list-box/fabric-dark.css +72 -112
- package/styles/list-box/fabric.css +72 -112
- package/styles/list-box/fluent-dark.css +72 -112
- package/styles/list-box/fluent.css +72 -112
- package/styles/list-box/fluent2.css +2029 -0
- package/styles/list-box/fluent2.scss +5 -0
- package/styles/list-box/highcontrast-light.css +72 -112
- package/styles/list-box/highcontrast.css +72 -112
- package/styles/list-box/icons/_bootstrap5.3.scss +25 -0
- package/styles/list-box/icons/_fluent2.scss +25 -0
- package/styles/list-box/material-dark.css +72 -112
- package/styles/list-box/material.css +72 -112
- package/styles/list-box/material3-dark.css +73 -113
- package/styles/list-box/material3-dark.scss +1 -1
- package/styles/list-box/material3.css +73 -113
- package/styles/list-box/material3.scss +1 -1
- package/styles/list-box/tailwind-dark.css +74 -114
- package/styles/list-box/tailwind.css +74 -114
- package/styles/material-dark.css +236 -260
- package/styles/material-dark.scss +28 -8
- package/styles/material.css +253 -284
- package/styles/material.scss +28 -8
- package/styles/material3-dark.css +253 -266
- package/styles/material3-dark.scss +29 -9
- package/styles/material3.css +253 -266
- package/styles/material3.scss +29 -9
- package/styles/mention/_bootstrap5.3-definition.scss +1 -0
- package/styles/mention/_fluent2-definition.scss +1 -0
- package/styles/mention/bootstrap-dark.css +24 -0
- package/styles/mention/bootstrap.css +24 -0
- package/styles/mention/bootstrap4.css +24 -0
- package/styles/mention/bootstrap5-dark.css +24 -0
- package/styles/mention/bootstrap5.css +24 -0
- package/styles/mention/fabric-dark.css +24 -0
- package/styles/mention/fabric.css +24 -0
- package/styles/mention/fluent-dark.css +24 -0
- package/styles/mention/fluent.css +24 -0
- package/styles/mention/fluent2.css +1130 -0
- package/styles/mention/fluent2.scss +6 -0
- package/styles/mention/highcontrast-light.css +24 -0
- package/styles/mention/highcontrast.css +24 -0
- package/styles/mention/material-dark.css +24 -0
- package/styles/mention/material.css +24 -0
- package/styles/mention/material3-dark.css +25 -1
- package/styles/mention/material3-dark.scss +1 -1
- package/styles/mention/material3.css +25 -1
- package/styles/mention/material3.scss +1 -1
- package/styles/mention/tailwind-dark.css +24 -0
- package/styles/mention/tailwind.css +24 -0
- package/styles/multi-select/_bootstrap5.3-definition.scss +230 -0
- package/styles/multi-select/_fluent2-definition.scss +236 -0
- package/styles/multi-select/_layout.scss +32 -38
- package/styles/multi-select/_material3-definition.scss +0 -15
- package/styles/multi-select/_theme.scss +0 -4
- package/styles/multi-select/bootstrap-dark.css +67 -28
- package/styles/multi-select/bootstrap.css +67 -28
- package/styles/multi-select/bootstrap4.css +70 -29
- package/styles/multi-select/bootstrap5-dark.css +67 -28
- package/styles/multi-select/bootstrap5.css +67 -28
- package/styles/multi-select/fabric-dark.css +67 -28
- package/styles/multi-select/fabric.css +67 -28
- package/styles/multi-select/fluent-dark.css +69 -29
- package/styles/multi-select/fluent.css +69 -29
- package/styles/multi-select/fluent2.css +2663 -0
- package/styles/multi-select/fluent2.scss +9 -0
- package/styles/multi-select/highcontrast-light.css +70 -28
- package/styles/multi-select/highcontrast.css +70 -28
- package/styles/multi-select/icons/_bootstrap5.3.scss +26 -0
- package/styles/multi-select/icons/_fluent2.scss +692 -0
- package/styles/multi-select/material-dark.css +88 -32
- package/styles/multi-select/material.css +102 -34
- package/styles/multi-select/material3-dark.css +109 -35
- package/styles/multi-select/material3-dark.scss +1 -1
- package/styles/multi-select/material3.css +109 -35
- package/styles/multi-select/material3.scss +1 -1
- package/styles/multi-select/tailwind-dark.css +67 -28
- package/styles/multi-select/tailwind.css +67 -28
- package/styles/tailwind-dark.css +217 -233
- package/styles/tailwind-dark.scss +28 -8
- package/styles/tailwind.css +217 -233
- package/styles/tailwind.scss +28 -8
- package/CHANGELOG.md +0 -2200
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DataManager,
|
|
1
|
+
import { EventHandler, Touch, isNullOrUndefined, getValue, select, Browser, debounce, Property, ChildProperty, selectAll, compile, L10n, addClass, removeClass, extend, append, setStyleAttribute, prepend, rippleEffect, detach, Complex, Event, NotifyPropertyChanges, Component, classList, closest, KeyboardEvents, attributes, isUndefined, formatUnit, Animation, getUniqueID, remove, SanitizeHtmlHelper, setValue, matches as matches$1, createElement, getComponent } from '@syncfusion/ej2-base';
|
|
2
|
+
import { DataManager, Query, DataUtil, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';
|
|
3
3
|
import { ListBase, Sortable, cssClass, moveTo } from '@syncfusion/ej2-lists';
|
|
4
4
|
import { Skeleton } from '@syncfusion/ej2-notifications';
|
|
5
|
-
import {
|
|
5
|
+
import { hideSpinner, createSpinner, showSpinner, isCollide, Popup, getZindexPartial } from '@syncfusion/ej2-popups';
|
|
6
6
|
import { Input, TextBox } from '@syncfusion/ej2-inputs';
|
|
7
|
-
import {
|
|
7
|
+
import { createCheckBox, Button } from '@syncfusion/ej2-buttons';
|
|
8
8
|
import { TreeView } from '@syncfusion/ej2-navigations';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -13,7 +13,7 @@ import { TreeView } from '@syncfusion/ej2-navigations';
|
|
|
13
13
|
var queryString = '';
|
|
14
14
|
var prevString = '';
|
|
15
15
|
var tempQueryString = '';
|
|
16
|
-
var matches
|
|
16
|
+
var matches = [];
|
|
17
17
|
var activeClass = 'e-active';
|
|
18
18
|
var prevElementId = '';
|
|
19
19
|
/**
|
|
@@ -56,21 +56,21 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
|
|
|
56
56
|
var index;
|
|
57
57
|
queryString = ignoreCase ? queryString.toLowerCase() : queryString;
|
|
58
58
|
if (prevElementId === elementId && prevString === queryString && !refresh) {
|
|
59
|
-
for (var i = 0; i < matches
|
|
60
|
-
if (matches
|
|
59
|
+
for (var i = 0; i < matches.length; i++) {
|
|
60
|
+
if (matches[i].classList.contains(activeClass)) {
|
|
61
61
|
index = i;
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
|
-
if (currentValue && matches
|
|
64
|
+
if (currentValue && matches[i].textContent.toLowerCase() === currentValue.toLowerCase()) {
|
|
65
65
|
index = i;
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
index = index + 1;
|
|
70
70
|
if (isVirtual) {
|
|
71
|
-
return matches
|
|
71
|
+
return matches[index] && matches.length - 1 != index ? matches[index] : matches[matches.length];
|
|
72
72
|
}
|
|
73
|
-
return matches
|
|
73
|
+
return matches[index] ? matches[index] : matches[0];
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
var listItems = items;
|
|
@@ -79,7 +79,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
|
|
|
79
79
|
var item = void 0;
|
|
80
80
|
selectedIndex = selectedIndex ? selectedIndex + 1 : 0;
|
|
81
81
|
var i = selectedIndex;
|
|
82
|
-
matches
|
|
82
|
+
matches = [];
|
|
83
83
|
do {
|
|
84
84
|
if (i === listItems.length) {
|
|
85
85
|
i = -1;
|
|
@@ -93,7 +93,7 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
|
|
|
93
93
|
item = listItems[index];
|
|
94
94
|
text = ignoreCase ? item.innerText.toLowerCase() : item.innerText;
|
|
95
95
|
if (text.substr(0, strLength) === queryString) {
|
|
96
|
-
matches
|
|
96
|
+
matches.push(listItems[index]);
|
|
97
97
|
}
|
|
98
98
|
i++;
|
|
99
99
|
} while (i !== selectedIndex);
|
|
@@ -101,8 +101,8 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
|
|
|
101
101
|
prevElementId = elementId;
|
|
102
102
|
if (isVirtual) {
|
|
103
103
|
var indexUpdated = false;
|
|
104
|
-
for (var i_1 = 0; i_1 < matches
|
|
105
|
-
if (currentValue && matches
|
|
104
|
+
for (var i_1 = 0; i_1 < matches.length; i_1++) {
|
|
105
|
+
if (currentValue && matches[i_1].textContent.toLowerCase() === currentValue.toLowerCase()) {
|
|
106
106
|
index = i_1;
|
|
107
107
|
indexUpdated = true;
|
|
108
108
|
break;
|
|
@@ -111,9 +111,9 @@ function incrementalSearch(keyCode, items, selectedIndex, ignoreCase, elementId,
|
|
|
111
111
|
if (currentValue && indexUpdated) {
|
|
112
112
|
index = index + 1;
|
|
113
113
|
}
|
|
114
|
-
return matches
|
|
114
|
+
return matches[index] ? matches[index] : matches[0];
|
|
115
115
|
}
|
|
116
|
-
return matches
|
|
116
|
+
return matches[0];
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
@@ -176,7 +176,7 @@ function resetIncrementalSearchValues(elementId) {
|
|
|
176
176
|
prevElementId = '';
|
|
177
177
|
prevString = '';
|
|
178
178
|
queryString = '';
|
|
179
|
-
matches
|
|
179
|
+
matches = [];
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
@@ -555,6 +555,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
555
555
|
this.parent.updatevirtualizationList();
|
|
556
556
|
}
|
|
557
557
|
this.parent.getSkeletonCount();
|
|
558
|
+
this.parent.skeletonCount = this.parent.totalItemCount != 0 && this.parent.totalItemCount < (this.parent.itemCount * 2) ? 0 : this.parent.skeletonCount;
|
|
558
559
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
559
560
|
var virtualTrackElement = this.parent.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
560
561
|
if (virtualTrackElement) {
|
|
@@ -790,10 +791,6 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
790
791
|
return VirtualScroll;
|
|
791
792
|
}());
|
|
792
793
|
|
|
793
|
-
/**
|
|
794
|
-
* Common source
|
|
795
|
-
*/
|
|
796
|
-
|
|
797
794
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
798
795
|
var extendStatics = function (d, b) {
|
|
799
796
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -833,6 +830,9 @@ var FieldSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
833
830
|
__decorate([
|
|
834
831
|
Property()
|
|
835
832
|
], FieldSettings.prototype, "htmlAttributes", void 0);
|
|
833
|
+
__decorate([
|
|
834
|
+
Property()
|
|
835
|
+
], FieldSettings.prototype, "disabled", void 0);
|
|
836
836
|
return FieldSettings;
|
|
837
837
|
}(ChildProperty));
|
|
838
838
|
var dropDownBaseClasses = {
|
|
@@ -875,7 +875,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
875
875
|
function DropDownBase(options, element) {
|
|
876
876
|
var _this = _super.call(this, options, element) || this;
|
|
877
877
|
_this.preventChange = false;
|
|
878
|
-
_this.isAngular = false;
|
|
879
878
|
_this.isPreventChange = false;
|
|
880
879
|
_this.isDynamicDataChange = false;
|
|
881
880
|
_this.addedNewItem = false;
|
|
@@ -1086,7 +1085,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1086
1085
|
};
|
|
1087
1086
|
DropDownBase.prototype.l10nUpdate = function (actionFailure) {
|
|
1088
1087
|
var ele = this.getModuleName() === 'listbox' ? this.ulElement : this.list;
|
|
1089
|
-
if (this.noRecordsTemplate !== 'No records found' || this.actionFailureTemplate !== 'Request failed') {
|
|
1088
|
+
if ((!isNullOrUndefined(this.noRecordsTemplate) && this.noRecordsTemplate !== 'No records found') || this.actionFailureTemplate !== 'Request failed') {
|
|
1090
1089
|
var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
|
|
1091
1090
|
var compiledString = void 0;
|
|
1092
1091
|
var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
|
|
@@ -1248,7 +1247,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1248
1247
|
DropDownBase.prototype.getTransformValues = function () {
|
|
1249
1248
|
var translateY = this.viewPortInfo.startIndex * this.listItemHeight;
|
|
1250
1249
|
translateY = translateY - (this.skeletonCount * this.listItemHeight);
|
|
1251
|
-
translateY = this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0 ? 0 : translateY;
|
|
1250
|
+
translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) || this.skeletonCount === 0) ? 0 : translateY;
|
|
1252
1251
|
var styleText = "transform: translate(0px, " + translateY + "px);";
|
|
1253
1252
|
return styleText;
|
|
1254
1253
|
};
|
|
@@ -1393,17 +1392,18 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1393
1392
|
}
|
|
1394
1393
|
element.querySelectorAll('select>option');
|
|
1395
1394
|
}
|
|
1396
|
-
this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss);
|
|
1395
|
+
this.updateFields(fields.text, fields.value, this.fields.groupBy, this.fields.htmlAttributes, this.fields.iconCss, this.fields.disabled);
|
|
1397
1396
|
this.resetList(jsonElement, fields);
|
|
1398
1397
|
};
|
|
1399
|
-
DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss) {
|
|
1398
|
+
DropDownBase.prototype.updateFields = function (text, value, groupBy, htmlAttributes, iconCss, disabled) {
|
|
1400
1399
|
var field = {
|
|
1401
1400
|
'fields': {
|
|
1402
1401
|
text: text,
|
|
1403
1402
|
value: value,
|
|
1404
1403
|
groupBy: !isNullOrUndefined(groupBy) ? groupBy : this.fields && this.fields.groupBy,
|
|
1405
1404
|
htmlAttributes: !isNullOrUndefined(htmlAttributes) ? htmlAttributes : this.fields && this.fields.htmlAttributes,
|
|
1406
|
-
iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss
|
|
1405
|
+
iconCss: !isNullOrUndefined(iconCss) ? iconCss : this.fields && this.fields.iconCss,
|
|
1406
|
+
disabled: !isNullOrUndefined(disabled) ? disabled : this.fields && this.fields.disabled
|
|
1407
1407
|
}
|
|
1408
1408
|
};
|
|
1409
1409
|
this.setProperties(field, true);
|
|
@@ -1774,8 +1774,16 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1774
1774
|
};
|
|
1775
1775
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1776
1776
|
DropDownBase.prototype.postRender = function (listElement, list, bindEvent) {
|
|
1777
|
+
if (this.fields.disabled) {
|
|
1778
|
+
var liCollections = listElement.querySelectorAll('.' + dropDownBaseClasses.li);
|
|
1779
|
+
for (var index = 0; index < liCollections.length; index++) {
|
|
1780
|
+
if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.disabled]) {
|
|
1781
|
+
this.disableListItem(liCollections[index]);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1777
1785
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1778
|
-
var focusItem = listElement.querySelector('.' + dropDownBaseClasses.li);
|
|
1786
|
+
var focusItem = this.fields.disabled ? listElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled') : listElement.querySelector('.' + dropDownBaseClasses.li);
|
|
1779
1787
|
var selectedItem = listElement.querySelector('.' + dropDownBaseClasses.selected);
|
|
1780
1788
|
if (focusItem && !selectedItem) {
|
|
1781
1789
|
focusItem.classList.add(dropDownBaseClasses.focus);
|
|
@@ -1910,9 +1918,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1910
1918
|
break;
|
|
1911
1919
|
}
|
|
1912
1920
|
if (isDownkey) {
|
|
1913
|
-
if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete'))
|
|
1914
|
-
|
|
1915
|
-
}
|
|
1921
|
+
if ((!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.selected) && this.getModuleName() !== 'autocomplete') || (!isNullOrUndefined(liCollections[index]) && liCollections[index].classList.contains(dropDownBaseClasses.focus) && this.getModuleName() === 'autocomplete')) ;
|
|
1916
1922
|
}
|
|
1917
1923
|
}
|
|
1918
1924
|
else {
|
|
@@ -2123,7 +2129,13 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2123
2129
|
*/
|
|
2124
2130
|
DropDownBase.prototype.getIndexByValue = function (value) {
|
|
2125
2131
|
var index;
|
|
2126
|
-
var listItems =
|
|
2132
|
+
var listItems = [];
|
|
2133
|
+
if (this.fields.disabled && this.getModuleName() === 'multiselect' && this.liCollections) {
|
|
2134
|
+
listItems = this.liCollections;
|
|
2135
|
+
}
|
|
2136
|
+
else {
|
|
2137
|
+
listItems = this.getItems();
|
|
2138
|
+
}
|
|
2127
2139
|
for (var i = 0; i < listItems.length; i++) {
|
|
2128
2140
|
if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
|
|
2129
2141
|
index = i;
|
|
@@ -2412,6 +2424,9 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2412
2424
|
this.notify('addItem', { module: 'CheckBoxSelection', item: li });
|
|
2413
2425
|
liCollections.push(li);
|
|
2414
2426
|
if (this.getModuleName() === 'listbox') {
|
|
2427
|
+
if (item.disabled) {
|
|
2428
|
+
li.classList.add('e-disabled');
|
|
2429
|
+
}
|
|
2415
2430
|
this.listData.splice(isListboxEmpty ? this.listData.length : index, 0, item);
|
|
2416
2431
|
if (this.listData.length !== this.sortedData.length) {
|
|
2417
2432
|
this.sortedData = this.listData;
|
|
@@ -2497,18 +2512,53 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2497
2512
|
}
|
|
2498
2513
|
this.addedNewItem = true;
|
|
2499
2514
|
};
|
|
2515
|
+
/**
|
|
2516
|
+
* Checks if the given HTML element is disabled.
|
|
2517
|
+
*
|
|
2518
|
+
* @param {HTMLElement} li - The HTML element to check.
|
|
2519
|
+
* @returns {boolean} - Returns true if the element is disabled, otherwise false.
|
|
2520
|
+
*/
|
|
2521
|
+
DropDownBase.prototype.isDisabledElement = function (li) {
|
|
2522
|
+
if (li && li.classList.contains('e-disabled')) {
|
|
2523
|
+
return true;
|
|
2524
|
+
}
|
|
2525
|
+
return false;
|
|
2526
|
+
};
|
|
2527
|
+
/**
|
|
2528
|
+
* Checks whether the list item at the specified index is disabled.
|
|
2529
|
+
*
|
|
2530
|
+
* @param {number} index - The index of the list item to check.
|
|
2531
|
+
* @returns {boolean} True if the list item is disabled, false otherwise.
|
|
2532
|
+
*/
|
|
2533
|
+
DropDownBase.prototype.isDisabledItemByIndex = function (index) {
|
|
2534
|
+
if (this.fields.disabled && this.liCollections) {
|
|
2535
|
+
return this.isDisabledElement(this.liCollections[index]);
|
|
2536
|
+
}
|
|
2537
|
+
return false;
|
|
2538
|
+
};
|
|
2539
|
+
/**
|
|
2540
|
+
* Disables the given list item.
|
|
2541
|
+
*
|
|
2542
|
+
* @param { HTMLLIElement } li - The list item to disable.
|
|
2543
|
+
* @returns {void}
|
|
2544
|
+
*/
|
|
2545
|
+
DropDownBase.prototype.disableListItem = function (li) {
|
|
2546
|
+
li.classList.add('e-disabled');
|
|
2547
|
+
li.setAttribute('aria-disabled', 'true');
|
|
2548
|
+
li.setAttribute('aria-selected', 'false');
|
|
2549
|
+
};
|
|
2500
2550
|
DropDownBase.prototype.validationAttribute = function (target, hidden) {
|
|
2501
2551
|
var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
|
|
2502
2552
|
hidden.setAttribute('name', name);
|
|
2503
2553
|
target.removeAttribute('name');
|
|
2504
|
-
var attributes
|
|
2505
|
-
for (var i = 0; i < attributes
|
|
2506
|
-
if (!target.getAttribute(attributes
|
|
2554
|
+
var attributes = ['required', 'aria-required', 'form'];
|
|
2555
|
+
for (var i = 0; i < attributes.length; i++) {
|
|
2556
|
+
if (!target.getAttribute(attributes[i])) {
|
|
2507
2557
|
continue;
|
|
2508
2558
|
}
|
|
2509
|
-
var attr = target.getAttribute(attributes
|
|
2510
|
-
hidden.setAttribute(attributes
|
|
2511
|
-
target.removeAttribute(attributes
|
|
2559
|
+
var attr = target.getAttribute(attributes[i]);
|
|
2560
|
+
hidden.setAttribute(attributes[i], attr);
|
|
2561
|
+
target.removeAttribute(attributes[i]);
|
|
2512
2562
|
}
|
|
2513
2563
|
};
|
|
2514
2564
|
DropDownBase.prototype.setZIndex = function () {
|
|
@@ -2580,7 +2630,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2580
2630
|
_super.prototype.destroy.call(this);
|
|
2581
2631
|
};
|
|
2582
2632
|
__decorate([
|
|
2583
|
-
Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
|
|
2633
|
+
Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
|
|
2584
2634
|
], DropDownBase.prototype, "fields", void 0);
|
|
2585
2635
|
__decorate([
|
|
2586
2636
|
Property(null)
|
|
@@ -2645,10 +2695,6 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
2645
2695
|
return DropDownBase;
|
|
2646
2696
|
}(Component));
|
|
2647
2697
|
|
|
2648
|
-
/**
|
|
2649
|
-
* export all modules from current location
|
|
2650
|
-
*/
|
|
2651
|
-
|
|
2652
2698
|
var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
2653
2699
|
var extendStatics = function (d, b) {
|
|
2654
2700
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -2668,8 +2714,6 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2668
2714
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2669
2715
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2670
2716
|
};
|
|
2671
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
2672
|
-
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
2673
2717
|
// don't use space in classnames
|
|
2674
2718
|
var dropDownListClasses = {
|
|
2675
2719
|
root: 'e-dropdownlist',
|
|
@@ -2729,7 +2773,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2729
2773
|
var _this = _super.call(this, options, element) || this;
|
|
2730
2774
|
_this.isListSearched = false;
|
|
2731
2775
|
_this.preventChange = false;
|
|
2732
|
-
_this.isAngular = false;
|
|
2733
2776
|
_this.isTouched = false;
|
|
2734
2777
|
_this.IsScrollerAtEnd = function () {
|
|
2735
2778
|
return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
|
|
@@ -2854,7 +2897,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2854
2897
|
this.removeFocus();
|
|
2855
2898
|
this.list.scrollTop = 0;
|
|
2856
2899
|
if (this.getModuleName() !== 'autocomplete' && !isNullOrUndefined(this.ulElement)) {
|
|
2857
|
-
var li = this.ulElement.querySelector('.' + dropDownListClasses.li);
|
|
2900
|
+
var li = this.fields.disabled ? this.ulElement.querySelector('.' + dropDownListClasses.li + ':not(.e-disabled)') : this.ulElement.querySelector('.' + dropDownListClasses.li);
|
|
2858
2901
|
if (this.enableVirtualization) {
|
|
2859
2902
|
li = this.liCollections[this.skeletonCount];
|
|
2860
2903
|
}
|
|
@@ -3059,7 +3102,32 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3059
3102
|
this.updateValues();
|
|
3060
3103
|
}
|
|
3061
3104
|
};
|
|
3105
|
+
/**
|
|
3106
|
+
* Checks if the given value is disabled.
|
|
3107
|
+
*
|
|
3108
|
+
* @param { string | number | boolean | object } value - The value to check for disablement. Can be a string, number, boolean, or object.
|
|
3109
|
+
* @returns { boolean } A boolean indicating whether the value is disabled.
|
|
3110
|
+
*/
|
|
3111
|
+
DropDownList.prototype.isDisableItemValue = function (value) {
|
|
3112
|
+
if (typeof (value) === 'object') {
|
|
3113
|
+
var objectValue = JSON.parse(JSON.stringify(value))[this.fields.value];
|
|
3114
|
+
return this.isDisabledItemByIndex(this.getIndexByValue(objectValue));
|
|
3115
|
+
}
|
|
3116
|
+
return this.isDisabledItemByIndex(this.getIndexByValue(value));
|
|
3117
|
+
};
|
|
3062
3118
|
DropDownList.prototype.updateValues = function () {
|
|
3119
|
+
if (this.fields.disabled) {
|
|
3120
|
+
if (this.value != null) {
|
|
3121
|
+
this.value = !this.isDisableItemValue(this.value) ? this.value : null;
|
|
3122
|
+
}
|
|
3123
|
+
if (this.text != null) {
|
|
3124
|
+
this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
|
|
3125
|
+
}
|
|
3126
|
+
if (this.index != null) {
|
|
3127
|
+
this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
|
|
3128
|
+
this.activeIndex = this.index;
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3063
3131
|
this.selectedValueInfo = this.viewPortInfo;
|
|
3064
3132
|
if (!isNullOrUndefined(this.value)) {
|
|
3065
3133
|
var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue(((this.fields.value) ? this.fields.value : ''), this.value) : this.value;
|
|
@@ -3252,7 +3320,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3252
3320
|
var target = e.target;
|
|
3253
3321
|
this.keyboardEvent = null;
|
|
3254
3322
|
var li = closest(target, '.' + dropDownBaseClasses.li);
|
|
3255
|
-
if (!this.isValidLI(li)) {
|
|
3323
|
+
if (!this.isValidLI(li) || this.isDisabledElement(li)) {
|
|
3256
3324
|
return;
|
|
3257
3325
|
}
|
|
3258
3326
|
this.setSelection(li, e);
|
|
@@ -3396,7 +3464,14 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3396
3464
|
}
|
|
3397
3465
|
}
|
|
3398
3466
|
else {
|
|
3399
|
-
var li =
|
|
3467
|
+
var li = void 0;
|
|
3468
|
+
if (this.fields.disabled) {
|
|
3469
|
+
var enableLiCollections = this.list.querySelectorAll('.' + dropDownBaseClasses.li + ':not(.e-disabled)');
|
|
3470
|
+
li = incrementalSearch(e.charCode, enableLiCollections, this.activeIndex, true, this.element.id);
|
|
3471
|
+
}
|
|
3472
|
+
else {
|
|
3473
|
+
li = incrementalSearch(e.charCode, this.liCollections, this.activeIndex, true, this.element.id);
|
|
3474
|
+
}
|
|
3400
3475
|
if (!isNullOrUndefined(li)) {
|
|
3401
3476
|
this.setSelection(li, e);
|
|
3402
3477
|
this.setScrollPosition();
|
|
@@ -3526,6 +3601,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3526
3601
|
}
|
|
3527
3602
|
};
|
|
3528
3603
|
DropDownList.prototype.updateUpDownAction = function (e, isVirtualKeyAction) {
|
|
3604
|
+
if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
|
|
3605
|
+
return;
|
|
3606
|
+
}
|
|
3529
3607
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
3530
3608
|
var value_1 = this.getItemData().value;
|
|
3531
3609
|
if (isNullOrUndefined(value_1)) {
|
|
@@ -3636,6 +3714,25 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3636
3714
|
attributes(this.filterInput, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-active')[0].id });
|
|
3637
3715
|
}
|
|
3638
3716
|
}
|
|
3717
|
+
var itemIndex;
|
|
3718
|
+
for (var index = 0; index < this.liCollections.length; index++) {
|
|
3719
|
+
if (this.liCollections[index].classList.contains(dropDownListClasses.focus)
|
|
3720
|
+
|| this.liCollections[index].classList.contains(dropDownListClasses.selected)) {
|
|
3721
|
+
itemIndex = index;
|
|
3722
|
+
break;
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
|
|
3726
|
+
if (this.getModuleName() !== 'autocomplete') {
|
|
3727
|
+
if (this.liCollections.length - 1 === itemIndex && e.action === 'down') {
|
|
3728
|
+
e.action = 'up';
|
|
3729
|
+
}
|
|
3730
|
+
if (itemIndex === 0 && e.action === 'up') {
|
|
3731
|
+
e.action = 'down';
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
this.updateUpDownAction(e);
|
|
3735
|
+
}
|
|
3639
3736
|
e.preventDefault();
|
|
3640
3737
|
};
|
|
3641
3738
|
DropDownList.prototype.updateHomeEndAction = function (e, isVirtualKeyAction) {
|
|
@@ -3736,6 +3833,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3736
3833
|
DropDownList.prototype.selectCurrentItem = function (e) {
|
|
3737
3834
|
if (this.isPopupOpen) {
|
|
3738
3835
|
var li = this.list.querySelector('.' + dropDownListClasses.focus);
|
|
3836
|
+
if (this.isDisabledElement(li)) {
|
|
3837
|
+
return;
|
|
3838
|
+
}
|
|
3739
3839
|
if (li) {
|
|
3740
3840
|
this.setSelection(li, e);
|
|
3741
3841
|
this.isTyped = false;
|
|
@@ -5223,7 +5323,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5223
5323
|
var elementRect = element.getBoundingClientRect();
|
|
5224
5324
|
return (elementRect.top >= 0 && elementRect.left >= 0 && elementRect.bottom <= window.innerHeight && elementRect.right <= window.innerWidth);
|
|
5225
5325
|
};
|
|
5226
|
-
|
|
5227
5326
|
DropDownList.prototype.setSearchBoxPosition = function () {
|
|
5228
5327
|
var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
|
|
5229
5328
|
this.popupObj.element.style.maxHeight = '100%';
|
|
@@ -5343,7 +5442,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5343
5442
|
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
5344
5443
|
}
|
|
5345
5444
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
5346
|
-
|
|
5347
5445
|
}
|
|
5348
5446
|
this.isKeyBoardAction = isScrollerCHanged;
|
|
5349
5447
|
if (this.enableVirtualization && this.fields.groupBy && this.fixedHeaderElement && (keyAction == "down")) {
|
|
@@ -5996,6 +6094,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5996
6094
|
this_1.setEnable();
|
|
5997
6095
|
break;
|
|
5998
6096
|
case 'text':
|
|
6097
|
+
if (this_1.fields.disabled) {
|
|
6098
|
+
newProp.text = newProp.text && !this_1.isDisabledItemByIndex(this_1.getIndexByValue(this_1.getValueByText(newProp.text)))
|
|
6099
|
+
? newProp.text : null;
|
|
6100
|
+
}
|
|
5999
6101
|
if (newProp.text === null) {
|
|
6000
6102
|
this_1.clearAll();
|
|
6001
6103
|
break;
|
|
@@ -6047,6 +6149,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6047
6149
|
}
|
|
6048
6150
|
break;
|
|
6049
6151
|
case 'value':
|
|
6152
|
+
if (this_1.fields.disabled) {
|
|
6153
|
+
newProp.value = newProp.value != null && !this_1.isDisableItemValue(newProp.value) ? newProp.value : null;
|
|
6154
|
+
}
|
|
6050
6155
|
if (newProp.value === null) {
|
|
6051
6156
|
this_1.clearAll();
|
|
6052
6157
|
break;
|
|
@@ -6106,6 +6211,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6106
6211
|
}
|
|
6107
6212
|
break;
|
|
6108
6213
|
case 'index':
|
|
6214
|
+
if (this_1.fields.disabled) {
|
|
6215
|
+
newProp.index = newProp.index != null && !this_1.isDisabledItemByIndex(newProp.index) ? newProp.index : null;
|
|
6216
|
+
}
|
|
6109
6217
|
if (newProp.index === null) {
|
|
6110
6218
|
this_1.clearAll();
|
|
6111
6219
|
break;
|
|
@@ -6423,6 +6531,65 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6423
6531
|
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
6424
6532
|
}
|
|
6425
6533
|
};
|
|
6534
|
+
/**
|
|
6535
|
+
* Method to disable specific item in the popup.
|
|
6536
|
+
*
|
|
6537
|
+
* @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
|
|
6538
|
+
* @returns {void}
|
|
6539
|
+
* @deprecated
|
|
6540
|
+
*/
|
|
6541
|
+
DropDownList.prototype.disableItem = function (item) {
|
|
6542
|
+
if (this.fields.disabled) {
|
|
6543
|
+
if (!this.list) {
|
|
6544
|
+
this.renderList();
|
|
6545
|
+
}
|
|
6546
|
+
var itemIndex = -1;
|
|
6547
|
+
if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
|
|
6548
|
+
if (typeof (item) === 'string') {
|
|
6549
|
+
itemIndex = this.getIndexByValue(item);
|
|
6550
|
+
}
|
|
6551
|
+
else if (typeof item === 'object') {
|
|
6552
|
+
if (item instanceof HTMLLIElement) {
|
|
6553
|
+
for (var index = 0; index < this.liCollections.length; index++) {
|
|
6554
|
+
if (this.liCollections[index] === item) {
|
|
6555
|
+
itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
|
|
6556
|
+
break;
|
|
6557
|
+
}
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
else {
|
|
6561
|
+
var value = JSON.parse(JSON.stringify(item))[this.fields.value];
|
|
6562
|
+
for (var index = 0; index < this.listData.length; index++) {
|
|
6563
|
+
if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
|
|
6564
|
+
itemIndex = this.getIndexByValue(value);
|
|
6565
|
+
break;
|
|
6566
|
+
}
|
|
6567
|
+
}
|
|
6568
|
+
}
|
|
6569
|
+
}
|
|
6570
|
+
else {
|
|
6571
|
+
itemIndex = item;
|
|
6572
|
+
}
|
|
6573
|
+
var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
|
|
6574
|
+
if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
|
|
6575
|
+
var li = this.liCollections[itemIndex];
|
|
6576
|
+
if (li) {
|
|
6577
|
+
this.disableListItem(li);
|
|
6578
|
+
var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
|
|
6579
|
+
parsedData[this.fields.disabled] = true;
|
|
6580
|
+
this.listData[itemIndex] = parsedData;
|
|
6581
|
+
this.dataSource = this.listData;
|
|
6582
|
+
if (li.classList.contains(dropDownListClasses.focus)) {
|
|
6583
|
+
this.removeFocus();
|
|
6584
|
+
}
|
|
6585
|
+
if (li.classList.contains(dropDownListClasses.selected)) {
|
|
6586
|
+
this.clear();
|
|
6587
|
+
}
|
|
6588
|
+
}
|
|
6589
|
+
}
|
|
6590
|
+
}
|
|
6591
|
+
}
|
|
6592
|
+
};
|
|
6426
6593
|
/**
|
|
6427
6594
|
* Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
|
|
6428
6595
|
*
|
|
@@ -6629,10 +6796,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6629
6796
|
return DropDownList;
|
|
6630
6797
|
}(DropDownBase));
|
|
6631
6798
|
|
|
6632
|
-
/**
|
|
6633
|
-
* export all modules from current location
|
|
6634
|
-
*/
|
|
6635
|
-
|
|
6636
6799
|
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
6637
6800
|
var extendStatics = function (d, b) {
|
|
6638
6801
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7037,7 +7200,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7037
7200
|
if (args.text === '') {
|
|
7038
7201
|
_this.isFilteredData = false;
|
|
7039
7202
|
_this.isFilterRestore = true;
|
|
7040
|
-
_this.isFromFilterChange = false;
|
|
7041
7203
|
fields = _this.cloneFields(_this.fields);
|
|
7042
7204
|
}
|
|
7043
7205
|
else if (args.preventDefaultAction) {
|
|
@@ -7122,8 +7284,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7122
7284
|
DropDownTree.prototype.nestedFilter = function (value, filteredFields) {
|
|
7123
7285
|
var matchedDataSource = [];
|
|
7124
7286
|
for (var i = 0; i < this.treeData.length; i++) {
|
|
7125
|
-
|
|
7126
|
-
var filteredChild = this.nestedChildFilter(value, this.treeData[i]);
|
|
7287
|
+
var filteredChild = this.nestedChildFilter(value, this.treeData[parseInt(i.toString(), 10)]);
|
|
7127
7288
|
if (!isNullOrUndefined(filteredChild)) {
|
|
7128
7289
|
matchedDataSource.push(filteredChild);
|
|
7129
7290
|
}
|
|
@@ -7139,8 +7300,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7139
7300
|
else {
|
|
7140
7301
|
var matchedChildren = [];
|
|
7141
7302
|
for (var i = 0; i < children.length; i++) {
|
|
7142
|
-
|
|
7143
|
-
var filteredChild = this.nestedChildFilter(value, children[i]);
|
|
7303
|
+
var filteredChild = this.nestedChildFilter(value, children[parseInt(i.toString(), 10)]);
|
|
7144
7304
|
if (!isNullOrUndefined(filteredChild)) {
|
|
7145
7305
|
matchedChildren.push(filteredChild);
|
|
7146
7306
|
}
|
|
@@ -7167,13 +7327,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7167
7327
|
for (var i = 0; i < matchedData.length; i++) {
|
|
7168
7328
|
if (matchedDataSource.indexOf(matchedData[i]) === -1) {
|
|
7169
7329
|
matchedDataSource.push(matchedData[i]);
|
|
7170
|
-
|
|
7171
|
-
var parentId = matchedData[i][this.fields.parentValue];
|
|
7330
|
+
var parentId = matchedData[parseInt(i.toString(), 10)][this.fields.parentValue];
|
|
7172
7331
|
while (!isNullOrUndefined(parentId)) {
|
|
7173
7332
|
var parent_1 = null;
|
|
7174
7333
|
for (var j = 0; j < this.treeData.length; j++) {
|
|
7175
|
-
|
|
7176
|
-
var value_1 = this.treeData[j][this.fields.value];
|
|
7334
|
+
var value_1 = this.treeData[parseInt(j.toString(), 10)][this.fields.value];
|
|
7177
7335
|
if (!isNullOrUndefined(value_1) && (value_1 === parentId)) {
|
|
7178
7336
|
parent_1 = this.treeData[j];
|
|
7179
7337
|
break;
|
|
@@ -7267,6 +7425,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7267
7425
|
if (formElement) {
|
|
7268
7426
|
EventHandler.remove(formElement, 'reset', this.resetValueHandler);
|
|
7269
7427
|
}
|
|
7428
|
+
this.keyboardModule.destroy();
|
|
7429
|
+
if (this.showSelectAll && this.checkAllParent) {
|
|
7430
|
+
EventHandler.remove(this.checkAllParent, 'mouseup', this.clickHandler);
|
|
7431
|
+
}
|
|
7432
|
+
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
7270
7433
|
};
|
|
7271
7434
|
/* Trigger when the dropdown is clicked */
|
|
7272
7435
|
DropDownTree.prototype.dropDownClick = function (e) {
|
|
@@ -7471,24 +7634,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7471
7634
|
_this.selectAll(true);
|
|
7472
7635
|
}
|
|
7473
7636
|
break;
|
|
7474
|
-
case 'moveRight':
|
|
7475
|
-
case 'moveLeft':
|
|
7476
|
-
case 'shiftDown':
|
|
7477
|
-
case 'moveDown':
|
|
7478
|
-
case 'ctrlDown':
|
|
7479
|
-
case 'csDown':
|
|
7480
|
-
case 'shiftUp':
|
|
7481
|
-
case 'moveUp':
|
|
7482
|
-
case 'ctrlUp':
|
|
7483
|
-
case 'csUp':
|
|
7484
|
-
case 'home':
|
|
7485
|
-
case 'shiftHome':
|
|
7486
|
-
case 'ctrlHome':
|
|
7487
|
-
case 'csHome':
|
|
7488
|
-
case 'end':
|
|
7489
|
-
case 'shiftEnd':
|
|
7490
|
-
case 'ctrlEnd':
|
|
7491
|
-
case 'csEnd':
|
|
7492
7637
|
}
|
|
7493
7638
|
}
|
|
7494
7639
|
else {
|
|
@@ -7541,6 +7686,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7541
7686
|
cancel: false,
|
|
7542
7687
|
event: e
|
|
7543
7688
|
};
|
|
7689
|
+
var focusedElement;
|
|
7544
7690
|
this.trigger('keyPress', eventArgs, function (observedArgs) {
|
|
7545
7691
|
if (!observedArgs.cancel) {
|
|
7546
7692
|
switch (e.action) {
|
|
@@ -7548,9 +7694,10 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7548
7694
|
_this.clickHandler(e);
|
|
7549
7695
|
break;
|
|
7550
7696
|
case 'moveDown':
|
|
7551
|
-
|
|
7697
|
+
focusedElement = _this.treeObj.element.querySelector('li');
|
|
7552
7698
|
focusedElement.focus();
|
|
7553
7699
|
addClass([focusedElement], ['e-node-focus']);
|
|
7700
|
+
break;
|
|
7554
7701
|
}
|
|
7555
7702
|
}
|
|
7556
7703
|
});
|
|
@@ -7709,8 +7856,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7709
7856
|
return remainElement;
|
|
7710
7857
|
};
|
|
7711
7858
|
DropDownTree.prototype.getOverflowVal = function (index) {
|
|
7712
|
-
|
|
7713
|
-
var selectedData = this.getSelectedData(this.value[index]);
|
|
7859
|
+
var selectedData = this.getSelectedData(this.value[parseInt(index.toString(), 10)]);
|
|
7714
7860
|
return getValue(this.treeSettings.loadOnDemand ? this.fields.text : 'text', selectedData);
|
|
7715
7861
|
};
|
|
7716
7862
|
DropDownTree.prototype.updateDelimMode = function () {
|
|
@@ -7756,12 +7902,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7756
7902
|
var name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
|
|
7757
7903
|
this.hiddenElement.setAttribute('name', name);
|
|
7758
7904
|
this.inputEle.removeAttribute('name');
|
|
7759
|
-
var attributes
|
|
7760
|
-
for (var i = 0; i < attributes
|
|
7761
|
-
var attr = this.inputEle.getAttribute(attributes
|
|
7905
|
+
var attributes = ['required', 'aria-required', 'form'];
|
|
7906
|
+
for (var i = 0; i < attributes.length; i++) {
|
|
7907
|
+
var attr = this.inputEle.getAttribute(attributes[i]);
|
|
7762
7908
|
if (attr) {
|
|
7763
|
-
this.hiddenElement.setAttribute(attributes
|
|
7764
|
-
this.inputEle.removeAttribute(attributes
|
|
7909
|
+
this.hiddenElement.setAttribute(attributes[i], attr);
|
|
7910
|
+
this.inputEle.removeAttribute(attributes[i]);
|
|
7765
7911
|
}
|
|
7766
7912
|
}
|
|
7767
7913
|
};
|
|
@@ -8082,8 +8228,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8082
8228
|
var data;
|
|
8083
8229
|
if (this.treeDataType === 1) {
|
|
8084
8230
|
for (var i = 0; i < this.treeItems.length; i++) {
|
|
8085
|
-
|
|
8086
|
-
var text = getValue(this.fields.text, this.treeItems[i]);
|
|
8231
|
+
var text = getValue(this.fields.text, this.treeItems[parseInt(i.toString(), 10)]);
|
|
8087
8232
|
if (!isNullOrUndefined(this.treeItems[i]) && !isNullOrUndefined(text) && text === givenText) {
|
|
8088
8233
|
data = this.treeItems[i];
|
|
8089
8234
|
break;
|
|
@@ -8098,14 +8243,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8098
8243
|
DropDownTree.prototype.getNestedItems = function (data, field, givenText) {
|
|
8099
8244
|
var newData;
|
|
8100
8245
|
for (var i = 0, objlen = data.length; i < objlen; i++) {
|
|
8101
|
-
|
|
8102
|
-
var dataId = getValue(this.fields.text, data[i]);
|
|
8246
|
+
var dataId = getValue(this.fields.text, data[parseInt(i.toString(), 10)]);
|
|
8103
8247
|
if (data[i] && dataId && dataId.toString() === givenText) {
|
|
8104
8248
|
return data[i];
|
|
8105
8249
|
}
|
|
8106
8250
|
else if (typeof field.child === 'string' && !isNullOrUndefined(getValue(field.child, data[i]))) {
|
|
8107
|
-
|
|
8108
|
-
var childData = getValue(field.child, data[i]);
|
|
8251
|
+
var childData = getValue(field.child, data[parseInt(i.toString(), 10)]);
|
|
8109
8252
|
newData = this.getNestedItems(childData, this.getChildType(field), givenText);
|
|
8110
8253
|
if (newData !== undefined) {
|
|
8111
8254
|
break;
|
|
@@ -8113,8 +8256,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8113
8256
|
}
|
|
8114
8257
|
else if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue('child', data[i]))) {
|
|
8115
8258
|
var child = 'child';
|
|
8116
|
-
|
|
8117
|
-
newData = this.getNestedItems(getValue(child, data[i]), this.getChildType(field), givenText);
|
|
8259
|
+
newData = this.getNestedItems(getValue(child, data[parseInt(i.toString(), 10)]), this.getChildType(field), givenText);
|
|
8118
8260
|
if (newData !== undefined) {
|
|
8119
8261
|
break;
|
|
8120
8262
|
}
|
|
@@ -8204,12 +8346,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8204
8346
|
_this.setFooterTemplate();
|
|
8205
8347
|
}
|
|
8206
8348
|
_this.isFirstRender = false;
|
|
8207
|
-
/* eslint-disable */
|
|
8208
8349
|
if (_this.hasTemplate && _this.portals) {
|
|
8209
8350
|
if (_this.treeObj.portals) {
|
|
8210
|
-
_this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) {
|
|
8351
|
+
_this.portals = _this.portals.concat(_this.treeObj.portals.filter(function (item) {
|
|
8352
|
+
return !_this.portals.includes(item);
|
|
8353
|
+
}));
|
|
8211
8354
|
}
|
|
8212
|
-
/* eslint-enable */
|
|
8213
8355
|
if (_this.isReact) {
|
|
8214
8356
|
_this.renderReactTemplates(_this.reactCallBack);
|
|
8215
8357
|
}
|
|
@@ -8232,7 +8374,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8232
8374
|
else {
|
|
8233
8375
|
var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
|
|
8234
8376
|
focusedElement = _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
|
|
8235
|
-
if (oldFocussedNode && oldFocussedNode
|
|
8377
|
+
if (oldFocussedNode && oldFocussedNode !== focusedElement) {
|
|
8236
8378
|
oldFocussedNode.setAttribute('tabindex', '-1');
|
|
8237
8379
|
removeClass([oldFocussedNode], 'e-node-focus');
|
|
8238
8380
|
}
|
|
@@ -8358,8 +8500,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8358
8500
|
var isHeader = closest(target, '.' + HEADER);
|
|
8359
8501
|
var isFooter = closest(target, '.' + FOOTER);
|
|
8360
8502
|
var isScroller = target.classList.contains(DROPDOWN) ? true :
|
|
8361
|
-
(matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
|
|
8362
|
-
if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) &&
|
|
8503
|
+
(matches$1(target, '.e-ddt .e-popup') || matches$1(target, '.e-ddt .e-treeview'));
|
|
8504
|
+
if ((this.isPopupOpen && ((!isNullOrUndefined(this.inputWrapper) &&
|
|
8505
|
+
this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter)) ||
|
|
8363
8506
|
((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
|
|
8364
8507
|
(this.isPopupOpen && (target.classList.contains(CHECKALLPARENT) || target.classList.contains(ALLTEXT)
|
|
8365
8508
|
|| target.classList.contains(CHECKBOXFRAME)))))) {
|
|
@@ -8386,7 +8529,9 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8386
8529
|
removeClass([this.popupDiv], NODATA);
|
|
8387
8530
|
this.hideCheckAll(false);
|
|
8388
8531
|
}
|
|
8389
|
-
|
|
8532
|
+
if (!this.isFilteredData) {
|
|
8533
|
+
this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
|
|
8534
|
+
}
|
|
8390
8535
|
if (this.isFirstRender && this.isRemoteData) {
|
|
8391
8536
|
this.setTreeValue();
|
|
8392
8537
|
this.setTreeText();
|
|
@@ -8482,7 +8627,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8482
8627
|
dataSource: fields.dataSource, value: fields.value, text: fields.text, parentValue: fields.parentValue,
|
|
8483
8628
|
child: (fields.child ? this.cloneChildField(fields.child) : null), hasChildren: fields.hasChildren,
|
|
8484
8629
|
expanded: fields.expanded, iconCss: fields.iconCss, imageUrl: fields.imageUrl, htmlAttributes: fields.htmlAttributes,
|
|
8485
|
-
query: fields.query, selected: fields.selected, selectable: fields.selectable,
|
|
8630
|
+
query: fields.query, selected: fields.selected, selectable: fields.selectable,
|
|
8631
|
+
tableName: fields.tableName, tooltip: fields.tooltip
|
|
8486
8632
|
};
|
|
8487
8633
|
return clonedField;
|
|
8488
8634
|
}
|
|
@@ -8536,7 +8682,8 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8536
8682
|
if ((typeof field.child === 'string') && !isNullOrUndefined(getValue(field.child, this.fields.dataSource[i]))) {
|
|
8537
8683
|
return 2;
|
|
8538
8684
|
}
|
|
8539
|
-
if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) ||
|
|
8685
|
+
if (!isNullOrUndefined(getValue(field.parentValue, this.fields.dataSource[i])) ||
|
|
8686
|
+
!isNullOrUndefined(getValue(field.hasChildren, this.fields.dataSource[i]))) {
|
|
8540
8687
|
return 1;
|
|
8541
8688
|
}
|
|
8542
8689
|
}
|
|
@@ -8685,14 +8832,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8685
8832
|
this.oldValue = this.value ? this.value.slice() : this.value;
|
|
8686
8833
|
}
|
|
8687
8834
|
};
|
|
8688
|
-
DropDownTree.prototype.onNodeExpanded = function (
|
|
8835
|
+
DropDownTree.prototype.onNodeExpanded = function () {
|
|
8689
8836
|
if (this.hasTemplate && this.portals && this.treeObj.portals) {
|
|
8690
8837
|
for (var i = 0; i < this.treeObj.portals.length; i++) {
|
|
8691
8838
|
if (this.portals.indexOf(this.treeObj.portals[i]) === -1) {
|
|
8692
8839
|
this.portals.push(this.treeObj.portals[i]);
|
|
8693
8840
|
}
|
|
8694
8841
|
}
|
|
8695
|
-
/* eslint-enable */
|
|
8696
8842
|
this.renderReactTemplates();
|
|
8697
8843
|
}
|
|
8698
8844
|
};
|
|
@@ -8788,7 +8934,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
8788
8934
|
if (!this.isFilteredData) {
|
|
8789
8935
|
this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
|
|
8790
8936
|
this.isFromFilterChange = false;
|
|
8791
|
-
if (newValues && newValues.length !== 0 && !this.showCheckBox) {
|
|
8937
|
+
if (newValues && newValues.length !== 0 && !this.showCheckBox && !this.ddtCompareValues(this.treeObj.selectedNodes, this.value.slice())) {
|
|
8792
8938
|
this.treeObj.selectedNodes = this.value.slice();
|
|
8793
8939
|
this.treeObj.dataBind();
|
|
8794
8940
|
}
|
|
@@ -9070,7 +9216,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9070
9216
|
};
|
|
9071
9217
|
DropDownTree.prototype.templateComplier = function (template) {
|
|
9072
9218
|
if (template) {
|
|
9073
|
-
// eslint-disable-next-line
|
|
9074
9219
|
try {
|
|
9075
9220
|
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
9076
9221
|
return compile(document.querySelector(template).innerHTML.trim());
|
|
@@ -9156,7 +9301,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9156
9301
|
this.ensurePlaceHolder();
|
|
9157
9302
|
};
|
|
9158
9303
|
DropDownTree.prototype.resetValue = function (isDynamicChange) {
|
|
9159
|
-
if (this.value ===
|
|
9304
|
+
if (Array.isArray(this.value) && this.value.length === 0 && this.text == null) {
|
|
9160
9305
|
return;
|
|
9161
9306
|
}
|
|
9162
9307
|
Input.setValue(null, this.inputEle, this.floatLabelType);
|
|
@@ -9270,9 +9415,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9270
9415
|
DropDownTree.prototype.updateTemplate = function () {
|
|
9271
9416
|
if (this.popupObj) {
|
|
9272
9417
|
this.clearTemplate();
|
|
9273
|
-
/* eslint-disable */
|
|
9274
9418
|
this.portals = [];
|
|
9275
|
-
/* eslint-enable */
|
|
9276
9419
|
this.popupObj.destroy();
|
|
9277
9420
|
if (this.isPopupOpen) {
|
|
9278
9421
|
this.hidePopup();
|
|
@@ -9649,22 +9792,35 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9649
9792
|
detach(this.inputWrapper);
|
|
9650
9793
|
detach(this.popupDiv);
|
|
9651
9794
|
detach(this.hiddenElement);
|
|
9795
|
+
Input.setRipple(false, [this.inputObj]);
|
|
9652
9796
|
this.element.classList.remove('e-input');
|
|
9653
9797
|
if (this.showCheckBox || this.allowMultiSelection) {
|
|
9654
9798
|
this.element.classList.remove(CHIP_INPUT);
|
|
9655
9799
|
}
|
|
9800
|
+
detach(this.inputObj.container);
|
|
9801
|
+
if (this.inputObj.buttons.length) {
|
|
9802
|
+
detach(this.inputObj.buttons[0]);
|
|
9803
|
+
}
|
|
9656
9804
|
this.inputObj = null;
|
|
9657
9805
|
while (this.hiddenElement.options.length > 0) {
|
|
9658
9806
|
this.hiddenElement.remove(0);
|
|
9659
9807
|
}
|
|
9660
9808
|
this.hiddenElement.innerHTML = '';
|
|
9661
9809
|
this.hiddenElement = null;
|
|
9810
|
+
this.inputWrapper.innerHTML = '';
|
|
9662
9811
|
this.inputWrapper = null;
|
|
9663
9812
|
this.popupDiv = null;
|
|
9664
9813
|
this.tree = null;
|
|
9665
9814
|
this.popupObj = null;
|
|
9666
9815
|
this.treeObj = null;
|
|
9667
9816
|
this.overAllClear = null;
|
|
9817
|
+
if (this.chipCollection) {
|
|
9818
|
+
var chipsIcons = selectAll('.e-chips-close', this.chipCollection);
|
|
9819
|
+
for (var _i = 0, chipsIcons_1 = chipsIcons; _i < chipsIcons_1.length; _i++) {
|
|
9820
|
+
var element = chipsIcons_1[_i];
|
|
9821
|
+
EventHandler.remove(element, 'mousedown', this.removeChip);
|
|
9822
|
+
}
|
|
9823
|
+
}
|
|
9668
9824
|
this.chipWrapper = null;
|
|
9669
9825
|
this.chipCollection = null;
|
|
9670
9826
|
this.checkAllParent = null;
|
|
@@ -9723,7 +9879,11 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9723
9879
|
* @returns {void}
|
|
9724
9880
|
*/
|
|
9725
9881
|
DropDownTree.prototype.hidePopup = function () {
|
|
9726
|
-
var eventArgs = { popup: this.popupObj };
|
|
9882
|
+
var eventArgs = { popup: this.popupObj, cancel: false };
|
|
9883
|
+
this.trigger('close', eventArgs);
|
|
9884
|
+
if (eventArgs.cancel) {
|
|
9885
|
+
return;
|
|
9886
|
+
}
|
|
9727
9887
|
this.inputWrapper.classList.remove(ICONANIMATION);
|
|
9728
9888
|
if (this.popupEle) {
|
|
9729
9889
|
addClass([this.popupEle], DDTHIDEICON);
|
|
@@ -9737,7 +9897,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9737
9897
|
addClass([this.inputWrapper], [INPUTFOCUS]);
|
|
9738
9898
|
}
|
|
9739
9899
|
}
|
|
9740
|
-
this.trigger('close', eventArgs);
|
|
9741
9900
|
if (this.destroyPopupOnHide) {
|
|
9742
9901
|
this.isFirstRender = true;
|
|
9743
9902
|
this.destroyPopup();
|
|
@@ -9937,10 +10096,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9937
10096
|
return DropDownTree;
|
|
9938
10097
|
}(Component));
|
|
9939
10098
|
|
|
9940
|
-
/**
|
|
9941
|
-
* export all modules from current location
|
|
9942
|
-
*/
|
|
9943
|
-
|
|
9944
10099
|
var __extends$3 = (undefined && undefined.__extends) || (function () {
|
|
9945
10100
|
var extendStatics = function (d, b) {
|
|
9946
10101
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -9960,8 +10115,6 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
9960
10115
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9961
10116
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9962
10117
|
};
|
|
9963
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
9964
|
-
/// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>
|
|
9965
10118
|
var SPINNER_CLASS = 'e-atc-spinner-icon';
|
|
9966
10119
|
dropDownListClasses.root = 'e-combobox';
|
|
9967
10120
|
var inputObject$1 = {
|
|
@@ -10080,6 +10233,18 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
10080
10233
|
}
|
|
10081
10234
|
};
|
|
10082
10235
|
ComboBox.prototype.updateValues = function () {
|
|
10236
|
+
if (this.fields.disabled) {
|
|
10237
|
+
if (this.value != null) {
|
|
10238
|
+
this.value = !this.isDisableItemValue(this.value) ? this.value : null;
|
|
10239
|
+
}
|
|
10240
|
+
if (this.text != null) {
|
|
10241
|
+
this.text = !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
|
|
10242
|
+
}
|
|
10243
|
+
if (this.index != null) {
|
|
10244
|
+
this.index = !this.isDisabledItemByIndex(this.index) ? this.index : null;
|
|
10245
|
+
this.activeIndex = this.index;
|
|
10246
|
+
}
|
|
10247
|
+
}
|
|
10083
10248
|
if (!isNullOrUndefined(this.value)) {
|
|
10084
10249
|
var currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
10085
10250
|
var li = this.getElementByValue(currentValue);
|
|
@@ -10327,9 +10492,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
10327
10492
|
var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
10328
10493
|
this.itemData = this.getDataByValue(value);
|
|
10329
10494
|
var dataItem = this.getItemData();
|
|
10330
|
-
var setValue
|
|
10495
|
+
var setValue = this.allowObjectBinding ? this.itemData : dataItem.value;
|
|
10331
10496
|
if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {
|
|
10332
|
-
this.setProperties({ 'value': setValue
|
|
10497
|
+
this.setProperties({ 'value': setValue }, !this.allowCustom);
|
|
10333
10498
|
}
|
|
10334
10499
|
};
|
|
10335
10500
|
/**
|
|
@@ -10513,6 +10678,9 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
10513
10678
|
else {
|
|
10514
10679
|
li = this.list.querySelector('.' + dropDownListClasses.focus);
|
|
10515
10680
|
}
|
|
10681
|
+
if (this.isDisabledElement(li)) {
|
|
10682
|
+
return;
|
|
10683
|
+
}
|
|
10516
10684
|
if (li) {
|
|
10517
10685
|
this.setSelection(li, e);
|
|
10518
10686
|
this.isTyped = false;
|
|
@@ -10932,10 +11100,6 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
10932
11100
|
return ComboBox;
|
|
10933
11101
|
}(DropDownList));
|
|
10934
11102
|
|
|
10935
|
-
/**
|
|
10936
|
-
* export all modules from current location
|
|
10937
|
-
*/
|
|
10938
|
-
|
|
10939
11103
|
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
10940
11104
|
var extendStatics = function (d, b) {
|
|
10941
11105
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -10955,8 +11119,6 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
10955
11119
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10956
11120
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10957
11121
|
};
|
|
10958
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
10959
|
-
/// <reference path='../combo-box/combo-box-model.d.ts'/>
|
|
10960
11122
|
dropDownListClasses.root = 'e-autocomplete';
|
|
10961
11123
|
dropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';
|
|
10962
11124
|
/**
|
|
@@ -11414,7 +11576,7 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
11414
11576
|
_super.prototype.render.call(this);
|
|
11415
11577
|
};
|
|
11416
11578
|
__decorate$4([
|
|
11417
|
-
Complex({ value: null, iconCss: null, groupBy: null }, FieldSettings)
|
|
11579
|
+
Complex({ value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
|
|
11418
11580
|
], AutoComplete.prototype, "fields", void 0);
|
|
11419
11581
|
__decorate$4([
|
|
11420
11582
|
Property(true)
|
|
@@ -11467,10 +11629,6 @@ var AutoComplete = /** @__PURE__ @class */ (function (_super) {
|
|
|
11467
11629
|
return AutoComplete;
|
|
11468
11630
|
}(ComboBox));
|
|
11469
11631
|
|
|
11470
|
-
/**
|
|
11471
|
-
* export all modules from current location
|
|
11472
|
-
*/
|
|
11473
|
-
|
|
11474
11632
|
/**
|
|
11475
11633
|
* FloatLable Moduel
|
|
11476
11634
|
* Specifies whether to display the floating label above the input element.
|
|
@@ -11645,8 +11803,6 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
11645
11803
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11646
11804
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11647
11805
|
};
|
|
11648
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
11649
|
-
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
11650
11806
|
var FOCUS = 'e-input-focus';
|
|
11651
11807
|
var DISABLED$1 = 'e-disabled';
|
|
11652
11808
|
var OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';
|
|
@@ -11973,13 +12129,26 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
11973
12129
|
}
|
|
11974
12130
|
else {
|
|
11975
12131
|
if (this.enableVirtualization) {
|
|
11976
|
-
|
|
11977
|
-
|
|
12132
|
+
if (this.fields.disabled) {
|
|
12133
|
+
element = this.ulElement.querySelector('li.'
|
|
12134
|
+
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)' + ':not(.' + DISABLED$1 + ')');
|
|
12135
|
+
}
|
|
12136
|
+
else {
|
|
12137
|
+
element = this.ulElement.querySelector('li.'
|
|
12138
|
+
+ dropDownBaseClasses.li + ':not(.e-virtual-list)' + ':not(.e-hide-listitem)');
|
|
12139
|
+
}
|
|
11978
12140
|
}
|
|
11979
12141
|
else {
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
12142
|
+
if (this.fields.disabled) {
|
|
12143
|
+
element = this.ulElement.querySelector('li.'
|
|
12144
|
+
+ dropDownBaseClasses.li + ':not(.'
|
|
12145
|
+
+ HIDE_LIST + ')' + ':not(.' + DISABLED$1 + ')');
|
|
12146
|
+
}
|
|
12147
|
+
else {
|
|
12148
|
+
element = this.ulElement.querySelector('li.'
|
|
12149
|
+
+ dropDownBaseClasses.li + ':not(.'
|
|
12150
|
+
+ HIDE_LIST + ')');
|
|
12151
|
+
}
|
|
11983
12152
|
}
|
|
11984
12153
|
}
|
|
11985
12154
|
if (element !== null) {
|
|
@@ -12439,9 +12608,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
12439
12608
|
if (filterQuery.queries[queryElements].fn === 'onSkip') {
|
|
12440
12609
|
isSkip = false;
|
|
12441
12610
|
}
|
|
12442
|
-
if (filterQuery.queries[queryElements].fn === 'onTake')
|
|
12443
|
-
|
|
12444
|
-
}
|
|
12611
|
+
if (filterQuery.queries[queryElements].fn === 'onTake') ;
|
|
12445
12612
|
}
|
|
12446
12613
|
var queryTakeValue = 0;
|
|
12447
12614
|
if (filterQuery && filterQuery.queries.length > 0) {
|
|
@@ -13432,7 +13599,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13432
13599
|
this.list.scrollTop = this.virtualListInfo && this.virtualListInfo.startIndex ? this.virtualListInfo.startIndex * this.listItemHeight : 0;
|
|
13433
13600
|
}
|
|
13434
13601
|
isScrollerCHanged = this.isKeyBoardAction;
|
|
13435
|
-
|
|
13436
13602
|
}
|
|
13437
13603
|
this.isKeyBoardAction = isScrollerCHanged;
|
|
13438
13604
|
};
|
|
@@ -13710,6 +13876,21 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13710
13876
|
}
|
|
13711
13877
|
}
|
|
13712
13878
|
}
|
|
13879
|
+
var focusedLi = this.list ? this.list.querySelector('.e-item-focus') : null;
|
|
13880
|
+
if (this.isDisabledElement(focusedLi)) {
|
|
13881
|
+
if (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem):not(.e-disabled)').length === 0) {
|
|
13882
|
+
this.removeFocus();
|
|
13883
|
+
return;
|
|
13884
|
+
}
|
|
13885
|
+
var index = this.getIndexByValue(focusedLi.getAttribute('data-value'));
|
|
13886
|
+
if (index === 0 && this.mode !== 'CheckBox') {
|
|
13887
|
+
position = 1;
|
|
13888
|
+
}
|
|
13889
|
+
if (index === (this.list.querySelectorAll('.e-list-item:not(.e-hide-listitem)').length - 1)) {
|
|
13890
|
+
position = -1;
|
|
13891
|
+
}
|
|
13892
|
+
this.moveByList(position);
|
|
13893
|
+
}
|
|
13713
13894
|
};
|
|
13714
13895
|
MultiSelect.prototype.getElementByValue = function (value) {
|
|
13715
13896
|
var item;
|
|
@@ -13900,7 +14081,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13900
14081
|
}
|
|
13901
14082
|
_this.setProperties({ value: [].concat([], removeVal) }, true);
|
|
13902
14083
|
if (_this.enableVirtualization) {
|
|
13903
|
-
var currentText = index == 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, '') : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], '');
|
|
14084
|
+
var currentText = index == 0 && _this.text.split(_this.delimiterChar) && _this.text.split(_this.delimiterChar).length == 1 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index], '') : index == 0 ? _this.text.replace(_this.text.split(_this.delimiterChar)[index] + _this.delimiterChar, '') : _this.text.replace(_this.delimiterChar + _this.text.split(_this.delimiterChar)[index], '');
|
|
13904
14085
|
_this.setProperties({ text: currentText.toString() }, true);
|
|
13905
14086
|
}
|
|
13906
14087
|
if (element_1 !== null) {
|
|
@@ -15292,7 +15473,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15292
15473
|
}
|
|
15293
15474
|
};
|
|
15294
15475
|
MultiSelect.prototype.addListFocus = function (element) {
|
|
15295
|
-
if (this.enabled && this.isValidLI(element)) {
|
|
15476
|
+
if (this.enabled && (this.isValidLI(element) || (this.fields.disabled && this.isDisabledElement(element)))) {
|
|
15296
15477
|
this.removeFocus();
|
|
15297
15478
|
addClass([element], dropDownBaseClasses.focus);
|
|
15298
15479
|
this.updateAriaActiveDescendant();
|
|
@@ -15883,14 +16064,14 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15883
16064
|
var li;
|
|
15884
16065
|
if (!isNullOrUndefined(this.list)) {
|
|
15885
16066
|
li = this.list.querySelectorAll(state ?
|
|
15886
|
-
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
|
|
15887
|
-
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
|
|
16067
|
+
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
|
|
16068
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
|
|
15888
16069
|
}
|
|
15889
16070
|
if (this.value && this.value.length && event && event.target
|
|
15890
16071
|
&& closest(event.target, '.e-close-hooker') && this.allowFiltering) {
|
|
15891
16072
|
li = this.mainList.querySelectorAll(state ?
|
|
15892
|
-
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-virtual-list)' :
|
|
15893
|
-
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-virtual-list)');
|
|
16073
|
+
'li.e-list-item:not([aria-selected="true"]):not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)' :
|
|
16074
|
+
'li.e-list-item[aria-selected="true"]:not(.e-reorder-hide):not(.e-disabled):not(.e-virtual-list)');
|
|
15894
16075
|
}
|
|
15895
16076
|
if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
15896
16077
|
var target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);
|
|
@@ -16338,9 +16519,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16338
16519
|
this.updateClearButton(newProp.showClearButton);
|
|
16339
16520
|
break;
|
|
16340
16521
|
case 'text':
|
|
16522
|
+
if (this.fields.disabled) {
|
|
16523
|
+
this.text =
|
|
16524
|
+
this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
|
|
16525
|
+
}
|
|
16341
16526
|
this.updateVal(this.value, this.value, 'text');
|
|
16342
16527
|
break;
|
|
16343
16528
|
case 'value':
|
|
16529
|
+
if (this.fields.disabled) {
|
|
16530
|
+
this.removeDisabledItemsValue(this.value);
|
|
16531
|
+
}
|
|
16344
16532
|
this.updateVal(this.value, oldProp.value, 'value');
|
|
16345
16533
|
this.addValidInputClass();
|
|
16346
16534
|
if (!this.closePopupOnSelect && this.isPopupOpen()) {
|
|
@@ -16503,7 +16691,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16503
16691
|
}
|
|
16504
16692
|
return valuecheck;
|
|
16505
16693
|
};
|
|
16506
|
-
|
|
16507
16694
|
MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
|
|
16508
16695
|
var _this = this;
|
|
16509
16696
|
this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
|
|
@@ -16513,7 +16700,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16513
16700
|
_this.updateActionList(ulElement, list, event);
|
|
16514
16701
|
});
|
|
16515
16702
|
};
|
|
16516
|
-
|
|
16517
16703
|
MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
|
|
16518
16704
|
if (!this.list) {
|
|
16519
16705
|
this.onLoadSelect();
|
|
@@ -16589,7 +16775,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16589
16775
|
var animModel = {
|
|
16590
16776
|
name: 'FadeOut',
|
|
16591
16777
|
duration: 100,
|
|
16592
|
-
delay:
|
|
16778
|
+
delay: delay
|
|
16593
16779
|
};
|
|
16594
16780
|
this.customFilterQuery = null;
|
|
16595
16781
|
var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };
|
|
@@ -16912,8 +17098,33 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16912
17098
|
listParent.remove();
|
|
16913
17099
|
return listItemHeight;
|
|
16914
17100
|
};
|
|
17101
|
+
/**
|
|
17102
|
+
* Removes disabled values from the given array.
|
|
17103
|
+
*
|
|
17104
|
+
* @param { number[] | string[] | boolean[] | object[] } value - The array to check.
|
|
17105
|
+
* @returns {void}
|
|
17106
|
+
*/
|
|
17107
|
+
MultiSelect.prototype.removeDisabledItemsValue = function (value) {
|
|
17108
|
+
if (value) {
|
|
17109
|
+
var data = [];
|
|
17110
|
+
var dataIndex = 0;
|
|
17111
|
+
for (var index = 0; index < value.length; index++) {
|
|
17112
|
+
var indexValue = value[index];
|
|
17113
|
+
if (typeof (indexValue) === 'object') {
|
|
17114
|
+
indexValue = JSON.parse(JSON.stringify(indexValue))[this.fields.value];
|
|
17115
|
+
}
|
|
17116
|
+
if ((indexValue != null) && !(this.isDisabledItemByIndex(this.getIndexByValue(indexValue)))) {
|
|
17117
|
+
data[dataIndex++] = value[index];
|
|
17118
|
+
}
|
|
17119
|
+
}
|
|
17120
|
+
this.value = data.length > 0 ? data : null;
|
|
17121
|
+
}
|
|
17122
|
+
};
|
|
16915
17123
|
MultiSelect.prototype.checkInitialValue = function () {
|
|
16916
17124
|
var _this = this;
|
|
17125
|
+
if (this.fields.disabled) {
|
|
17126
|
+
this.removeDisabledItemsValue(this.value);
|
|
17127
|
+
}
|
|
16917
17128
|
var isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)
|
|
16918
17129
|
: !isNullOrUndefined(this.dataSource);
|
|
16919
17130
|
if (!(this.value && this.value.length) &&
|
|
@@ -16952,6 +17163,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16952
17163
|
_super.prototype.render.call(this);
|
|
16953
17164
|
}
|
|
16954
17165
|
}
|
|
17166
|
+
if (this.fields.disabled) {
|
|
17167
|
+
this.text = this.text && !this.isDisabledItemByIndex(this.getIndexByValue(this.getValueByText(this.text))) ? this.text : null;
|
|
17168
|
+
}
|
|
16955
17169
|
if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
|
|
16956
17170
|
this.initialTextUpdate();
|
|
16957
17171
|
}
|
|
@@ -17086,6 +17300,66 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17086
17300
|
this.refreshInputHight();
|
|
17087
17301
|
this.checkPlaceholderSize();
|
|
17088
17302
|
};
|
|
17303
|
+
/**
|
|
17304
|
+
* Method to disable specific item in the popup.
|
|
17305
|
+
*
|
|
17306
|
+
* @param {string | number | object | HTMLLIElement} item - Specifies the item to be disabled.
|
|
17307
|
+
* @returns {void}
|
|
17308
|
+
* @deprecated
|
|
17309
|
+
*/
|
|
17310
|
+
MultiSelect.prototype.disableItem = function (item) {
|
|
17311
|
+
if (this.fields.disabled) {
|
|
17312
|
+
if (!this.list) {
|
|
17313
|
+
this.renderList();
|
|
17314
|
+
}
|
|
17315
|
+
var itemIndex = -1;
|
|
17316
|
+
if (this.liCollections && this.liCollections.length > 0 && this.listData && this.fields.disabled) {
|
|
17317
|
+
if (typeof (item) === 'string') {
|
|
17318
|
+
itemIndex = this.getIndexByValue(item);
|
|
17319
|
+
}
|
|
17320
|
+
else if (typeof item === 'object') {
|
|
17321
|
+
if (item instanceof HTMLLIElement) {
|
|
17322
|
+
for (var index = 0; index < this.liCollections.length; index++) {
|
|
17323
|
+
if (this.liCollections[index] === item) {
|
|
17324
|
+
itemIndex = this.getIndexByValue(item.getAttribute('data-value'));
|
|
17325
|
+
break;
|
|
17326
|
+
}
|
|
17327
|
+
}
|
|
17328
|
+
}
|
|
17329
|
+
else {
|
|
17330
|
+
var value = JSON.parse(JSON.stringify(item))[this.fields.value];
|
|
17331
|
+
for (var index = 0; index < this.listData.length; index++) {
|
|
17332
|
+
if (JSON.parse(JSON.stringify(this.listData[index]))[this.fields.value] === value) {
|
|
17333
|
+
itemIndex = this.getIndexByValue(value);
|
|
17334
|
+
break;
|
|
17335
|
+
}
|
|
17336
|
+
}
|
|
17337
|
+
}
|
|
17338
|
+
}
|
|
17339
|
+
else {
|
|
17340
|
+
itemIndex = item;
|
|
17341
|
+
}
|
|
17342
|
+
var isValidIndex = itemIndex < this.liCollections.length && itemIndex > -1;
|
|
17343
|
+
if (isValidIndex && !(JSON.parse(JSON.stringify(this.listData[itemIndex]))[this.fields.disabled])) {
|
|
17344
|
+
var li = this.liCollections[itemIndex];
|
|
17345
|
+
if (li) {
|
|
17346
|
+
this.disableListItem(li);
|
|
17347
|
+
var parsedData = JSON.parse(JSON.stringify(this.listData[itemIndex]));
|
|
17348
|
+
parsedData[this.fields.disabled] = true;
|
|
17349
|
+
this.listData[itemIndex] = parsedData;
|
|
17350
|
+
if (li.classList.contains(dropDownBaseClasses.focus)) {
|
|
17351
|
+
this.removeFocus();
|
|
17352
|
+
}
|
|
17353
|
+
if (li.classList.contains(HIDE_LIST) || li.classList.contains(dropDownBaseClasses.selected)) {
|
|
17354
|
+
var oldValue = this.value;
|
|
17355
|
+
this.removeDisabledItemsValue(this.value);
|
|
17356
|
+
this.updateVal(this.value, oldValue, 'value');
|
|
17357
|
+
}
|
|
17358
|
+
}
|
|
17359
|
+
}
|
|
17360
|
+
}
|
|
17361
|
+
}
|
|
17362
|
+
};
|
|
17089
17363
|
/**
|
|
17090
17364
|
* Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
|
|
17091
17365
|
*
|
|
@@ -17153,7 +17427,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
17153
17427
|
this.selectAllEventEle = null;
|
|
17154
17428
|
};
|
|
17155
17429
|
__decorate$5([
|
|
17156
|
-
Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)
|
|
17430
|
+
Complex({ text: null, value: null, iconCss: null, groupBy: null, disabled: null }, FieldSettings)
|
|
17157
17431
|
], MultiSelect.prototype, "fields", void 0);
|
|
17158
17432
|
__decorate$5([
|
|
17159
17433
|
Property(false)
|
|
@@ -17538,12 +17812,12 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
|
|
|
17538
17812
|
}
|
|
17539
17813
|
if (!isNullOrUndefined(this.checkWrapper)) {
|
|
17540
17814
|
var checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
|
|
17541
|
-
var selectAll
|
|
17542
|
-
this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll
|
|
17815
|
+
var selectAll = false;
|
|
17816
|
+
this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), args.li, args.e, selectAll);
|
|
17543
17817
|
}
|
|
17544
17818
|
};
|
|
17545
|
-
CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll
|
|
17546
|
-
this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll
|
|
17819
|
+
CheckBoxSelection.prototype.validateCheckNode = function (checkWrap, isCheck, li, e, selectAll) {
|
|
17820
|
+
this.changeState(checkWrap, isCheck ? 'uncheck' : 'check', e, true, selectAll);
|
|
17547
17821
|
};
|
|
17548
17822
|
CheckBoxSelection.prototype.clickHandler = function (e) {
|
|
17549
17823
|
var target;
|
|
@@ -17554,26 +17828,26 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
|
|
|
17554
17828
|
target = e.currentTarget;
|
|
17555
17829
|
}
|
|
17556
17830
|
this.checkWrapper = closest(target, '.' + CHECKBOXWRAP$1);
|
|
17557
|
-
var selectAll
|
|
17831
|
+
var selectAll = true;
|
|
17558
17832
|
if (!isNullOrUndefined(this.checkWrapper)) {
|
|
17559
17833
|
var checkElement = select('.' + CHECKBOXFRAME$1, this.checkWrapper);
|
|
17560
|
-
this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll
|
|
17834
|
+
this.validateCheckNode(this.checkWrapper, checkElement.classList.contains(CHECK$1), null, e, selectAll);
|
|
17561
17835
|
}
|
|
17562
17836
|
e.preventDefault();
|
|
17563
17837
|
};
|
|
17564
|
-
CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll
|
|
17838
|
+
CheckBoxSelection.prototype.changeState = function (wrapper, state, e, isPrevent, selectAll) {
|
|
17565
17839
|
var frameSpan = wrapper.getElementsByClassName(CHECKBOXFRAME$1)[0];
|
|
17566
17840
|
if (state === 'check' && !frameSpan.classList.contains(CHECK$1)) {
|
|
17567
17841
|
frameSpan.classList.remove(INDETERMINATE);
|
|
17568
17842
|
frameSpan.classList.add(CHECK$1);
|
|
17569
|
-
if (selectAll
|
|
17843
|
+
if (selectAll) {
|
|
17570
17844
|
this.parent.selectAllItems(true, e);
|
|
17571
17845
|
this.setLocale(true);
|
|
17572
17846
|
}
|
|
17573
17847
|
}
|
|
17574
17848
|
else if (state === 'uncheck' && (frameSpan.classList.contains(CHECK$1) || frameSpan.classList.contains(INDETERMINATE))) {
|
|
17575
17849
|
removeClass([frameSpan], [CHECK$1, INDETERMINATE]);
|
|
17576
|
-
if (selectAll
|
|
17850
|
+
if (selectAll) {
|
|
17577
17851
|
this.parent.selectAllItems(false, e);
|
|
17578
17852
|
this.setLocale();
|
|
17579
17853
|
}
|
|
@@ -17581,7 +17855,7 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
|
|
|
17581
17855
|
else if (state === 'indeterminate' && !(frameSpan.classList.contains(INDETERMINATE))) {
|
|
17582
17856
|
removeClass([frameSpan], [CHECK$1]);
|
|
17583
17857
|
frameSpan.classList.add(INDETERMINATE);
|
|
17584
|
-
if (selectAll
|
|
17858
|
+
if (selectAll) {
|
|
17585
17859
|
this.parent.selectAllItems(false, e);
|
|
17586
17860
|
this.setLocale();
|
|
17587
17861
|
}
|
|
@@ -17873,10 +18147,6 @@ var CheckBoxSelection = /** @__PURE__ @class */ (function () {
|
|
|
17873
18147
|
return CheckBoxSelection;
|
|
17874
18148
|
}());
|
|
17875
18149
|
|
|
17876
|
-
/**
|
|
17877
|
-
* export all modules from current location
|
|
17878
|
-
*/
|
|
17879
|
-
|
|
17880
18150
|
var __extends$6 = (undefined && undefined.__extends) || (function () {
|
|
17881
18151
|
var extendStatics = function (d, b) {
|
|
17882
18152
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -17896,8 +18166,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
17896
18166
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
17897
18167
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17898
18168
|
};
|
|
17899
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
17900
|
-
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
17901
18169
|
/**
|
|
17902
18170
|
* Defines the Selection settings of List Box.
|
|
17903
18171
|
*/
|
|
@@ -18011,6 +18279,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
18011
18279
|
var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
|
|
18012
18280
|
hiddenSelect.style.visibility = 'hidden';
|
|
18013
18281
|
this.list.classList.add('e-listbox-wrapper');
|
|
18282
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18014
18283
|
this.list.querySelector('.e-list-parent').setAttribute('role', 'presentation');
|
|
18015
18284
|
var groupHdrs = this.list.querySelectorAll('.e-list-group-item');
|
|
18016
18285
|
for (var i = 0; i < groupHdrs.length; i++) {
|
|
@@ -18029,7 +18298,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
18029
18298
|
}
|
|
18030
18299
|
}
|
|
18031
18300
|
else {
|
|
18032
|
-
if (this.initLoad) {
|
|
18301
|
+
if (this.initLoad && this.element.parentElement) {
|
|
18033
18302
|
this.element.parentElement.insertBefore(this.list, this.element);
|
|
18034
18303
|
}
|
|
18035
18304
|
this.list.insertBefore(this.element, this.list.firstChild);
|
|
@@ -18097,6 +18366,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
18097
18366
|
ListBox.prototype.initToolbar = function () {
|
|
18098
18367
|
var pos = this.toolbarSettings.position;
|
|
18099
18368
|
var prevScope = this.element.getAttribute('data-value');
|
|
18369
|
+
this.toolbarSettings.items = isNullOrUndefined(this.toolbarSettings.items) ? [] : this.toolbarSettings.items;
|
|
18100
18370
|
if (this.toolbarSettings.items.length) {
|
|
18101
18371
|
var toolElem = this.createElement('div', { className: 'e-listbox-tool', attrs: { 'role': 'toolbar' } });
|
|
18102
18372
|
var wrapper = this.createElement('div', {
|
|
@@ -18191,7 +18461,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
18191
18461
|
this.spinner = this.createElement('div', { className: 'e-listbox-wrapper' });
|
|
18192
18462
|
}
|
|
18193
18463
|
this.spinner.style.height = formatUnit(this.height);
|
|
18194
|
-
this.element.parentElement
|
|
18464
|
+
if (this.element.parentElement) {
|
|
18465
|
+
this.element.parentElement.insertBefore(this.spinner, this.element.nextSibling);
|
|
18466
|
+
}
|
|
18195
18467
|
createSpinner({ target: this.spinner }, this.createElement);
|
|
18196
18468
|
showSpinner(this.spinner);
|
|
18197
18469
|
};
|
|
@@ -18497,7 +18769,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
18497
18769
|
}
|
|
18498
18770
|
var fListData_1 = [].slice.call(this.listData);
|
|
18499
18771
|
var fSortData_1 = [].slice.call(this.sortedData);
|
|
18500
|
-
selectedOptions.forEach(function (value
|
|
18772
|
+
selectedOptions.forEach(function (value) {
|
|
18501
18773
|
droppedData = _this.getDataByValue(value);
|
|
18502
18774
|
var srcIdx = _this.listData.indexOf(droppedData);
|
|
18503
18775
|
var jsonSrcIdx = _this.jsonData.indexOf(droppedData);
|
|
@@ -19048,6 +19320,10 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19048
19320
|
}
|
|
19049
19321
|
};
|
|
19050
19322
|
ListBox.prototype.clickHandler = function (e) {
|
|
19323
|
+
var li = closest(e.target, '.' + 'e-list-item');
|
|
19324
|
+
if (isNullOrUndefined(li)) {
|
|
19325
|
+
return;
|
|
19326
|
+
}
|
|
19051
19327
|
this.selectHandler(e);
|
|
19052
19328
|
};
|
|
19053
19329
|
ListBox.prototype.checkSelectAll = function () {
|
|
@@ -19540,6 +19816,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19540
19816
|
}
|
|
19541
19817
|
var _loop_3 = function (i) {
|
|
19542
19818
|
if (fListBox.ulElement.childNodes[i].classList.contains('e-disabled')) {
|
|
19819
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
19543
19820
|
flistboxarray = flistboxarray.filter(function (item) { return item !== i; });
|
|
19544
19821
|
tempLiColl.push(fListBox.ulElement.childNodes[i]);
|
|
19545
19822
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -19870,10 +20147,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19870
20147
|
};
|
|
19871
20148
|
ListBox.prototype.dataUpdater = function (dataSource, query, fields) {
|
|
19872
20149
|
this.isDataFetched = false;
|
|
19873
|
-
var backCommand = true;
|
|
19874
20150
|
if (this.targetElement().trim() === '') {
|
|
19875
20151
|
var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
|
|
19876
|
-
|
|
20152
|
+
{
|
|
19877
20153
|
this.remoteCustomValue = false;
|
|
19878
20154
|
if (this.isAngular && this.itemTemplate) {
|
|
19879
20155
|
list = this.renderItems(this.listData, fields);
|
|
@@ -19960,7 +20236,9 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19960
20236
|
});
|
|
19961
20237
|
}
|
|
19962
20238
|
};
|
|
19963
|
-
ListBox.prototype.setSelection = function (
|
|
20239
|
+
ListBox.prototype.setSelection = function (
|
|
20240
|
+
// eslint-disable-next-line max-len
|
|
20241
|
+
values, isSelect, isText, canFocus) {
|
|
19964
20242
|
var _this = this;
|
|
19965
20243
|
if (values === void 0) { values = this.value; }
|
|
19966
20244
|
if (isSelect === void 0) { isSelect = true; }
|
|
@@ -19985,21 +20263,21 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
19985
20263
|
li = _this.list.querySelector('[data-value="' + text + '"]');
|
|
19986
20264
|
}
|
|
19987
20265
|
if (li) {
|
|
19988
|
-
if (_this.selectionSettings.showCheckbox) {
|
|
20266
|
+
if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
|
|
19989
20267
|
liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
|
|
19990
20268
|
}
|
|
19991
20269
|
else {
|
|
19992
20270
|
liselect = li.classList.contains('e-selected');
|
|
19993
20271
|
}
|
|
19994
20272
|
if (!isSelect && liselect || isSelect && !liselect && li) {
|
|
19995
|
-
if (_this.selectionSettings.showCheckbox) {
|
|
20273
|
+
if (_this.selectionSettings.showCheckbox && !li.classList.contains('e-disabled')) {
|
|
19996
20274
|
_this.notify('updatelist', { li: li, module: 'listbox' });
|
|
19997
20275
|
if (canFocus) {
|
|
19998
20276
|
li.focus();
|
|
19999
20277
|
}
|
|
20000
20278
|
}
|
|
20001
20279
|
else {
|
|
20002
|
-
if (isSelect) {
|
|
20280
|
+
if (isSelect && !li.classList.contains('e-disabled')) {
|
|
20003
20281
|
li.classList.add(cssClass.selected);
|
|
20004
20282
|
li.setAttribute('aria-selected', 'true');
|
|
20005
20283
|
if (canFocus) {
|
|
@@ -20033,7 +20311,17 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20033
20311
|
this.checkSelectAll();
|
|
20034
20312
|
};
|
|
20035
20313
|
ListBox.prototype.checkDisabledState = function (inst) {
|
|
20036
|
-
|
|
20314
|
+
if (isNullOrUndefined(inst.ulElement)) {
|
|
20315
|
+
if (!isNullOrUndefined(this.dataSource) && isNullOrUndefined(this.dataSource.length)) {
|
|
20316
|
+
return false;
|
|
20317
|
+
}
|
|
20318
|
+
else {
|
|
20319
|
+
return true;
|
|
20320
|
+
}
|
|
20321
|
+
}
|
|
20322
|
+
else {
|
|
20323
|
+
return inst.ulElement.querySelectorAll('.' + cssClass.li).length === 0;
|
|
20324
|
+
}
|
|
20037
20325
|
};
|
|
20038
20326
|
ListBox.prototype.updateToolBarState = function () {
|
|
20039
20327
|
var _this = this;
|
|
@@ -20271,6 +20559,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
20271
20559
|
}
|
|
20272
20560
|
}
|
|
20273
20561
|
if (newProp.toolbarSettings.items) {
|
|
20562
|
+
oldProp.toolbarSettings.items = isNullOrUndefined(oldProp.toolbarSettings.items) ? [] : oldProp.toolbarSettings.items;
|
|
20274
20563
|
if (oldProp.toolbarSettings && oldProp.toolbarSettings.items.length) {
|
|
20275
20564
|
ele = this.list.parentElement;
|
|
20276
20565
|
ele.parentElement.insertBefore(this.list, ele);
|
|
@@ -20407,10 +20696,6 @@ var listBoxClasses = {
|
|
|
20407
20696
|
clearIcon: 'e-clear-icon'
|
|
20408
20697
|
};
|
|
20409
20698
|
|
|
20410
|
-
/**
|
|
20411
|
-
* export all modules from current location
|
|
20412
|
-
*/
|
|
20413
|
-
|
|
20414
20699
|
var __extends$7 = (undefined && undefined.__extends) || (function () {
|
|
20415
20700
|
var extendStatics = function (d, b) {
|
|
20416
20701
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -20492,12 +20777,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
20492
20777
|
this.setCssClass(newClass, [this.popupObj.element], oldClass);
|
|
20493
20778
|
}
|
|
20494
20779
|
};
|
|
20495
|
-
Mention.prototype.setCssClass = function (cssClass
|
|
20780
|
+
Mention.prototype.setCssClass = function (cssClass, elements, oldClass) {
|
|
20496
20781
|
if (!isNullOrUndefined(oldClass) && oldClass !== '') {
|
|
20497
20782
|
removeClass(elements, oldClass.split(' '));
|
|
20498
20783
|
}
|
|
20499
|
-
if (!isNullOrUndefined(cssClass
|
|
20500
|
-
addClass(elements, cssClass
|
|
20784
|
+
if (!isNullOrUndefined(cssClass) && cssClass !== '') {
|
|
20785
|
+
addClass(elements, cssClass.split(' '));
|
|
20501
20786
|
}
|
|
20502
20787
|
};
|
|
20503
20788
|
Mention.prototype.initializeData = function () {
|
|
@@ -20702,6 +20987,9 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
20702
20987
|
}
|
|
20703
20988
|
};
|
|
20704
20989
|
Mention.prototype.updateUpDownAction = function (e) {
|
|
20990
|
+
if (this.fields.disabled && this.list && this.list.querySelectorAll('.e-list-item:not(.e-disabled)').length === 0) {
|
|
20991
|
+
return;
|
|
20992
|
+
}
|
|
20705
20993
|
var focusEle = this.list.querySelector('.' + dropDownBaseClasses.focus);
|
|
20706
20994
|
if (this.isSelectFocusItem(focusEle)) {
|
|
20707
20995
|
this.setSelection(focusEle, e);
|
|
@@ -20722,6 +21010,17 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
20722
21010
|
this.setSelection(nextItem, e);
|
|
20723
21011
|
}
|
|
20724
21012
|
}
|
|
21013
|
+
var itemIndex;
|
|
21014
|
+
for (var index = 0; index < this.liCollections.length; index++) {
|
|
21015
|
+
if (this.liCollections[index].classList.contains(dropDownBaseClasses.focus)
|
|
21016
|
+
|| this.liCollections[index].classList.contains(dropDownBaseClasses.selected)) {
|
|
21017
|
+
itemIndex = index;
|
|
21018
|
+
break;
|
|
21019
|
+
}
|
|
21020
|
+
}
|
|
21021
|
+
if (itemIndex != null && this.isDisabledElement(this.liCollections[itemIndex])) {
|
|
21022
|
+
this.updateUpDownAction(e);
|
|
21023
|
+
}
|
|
20725
21024
|
if (this.isPopupOpen) {
|
|
20726
21025
|
e.preventDefault();
|
|
20727
21026
|
}
|
|
@@ -20897,7 +21196,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
20897
21196
|
if (!isNullOrUndefined(ulElement)) {
|
|
20898
21197
|
attributes(ulElement, { 'id': this.inputElement.id + '_options', 'role': 'listbox', 'aria-hidden': 'false' });
|
|
20899
21198
|
}
|
|
20900
|
-
var focusItem = ulElement.querySelector('.' + dropDownBaseClasses.li);
|
|
21199
|
+
var focusItem = this.fields.disabled ? ulElement.querySelector('.' + dropDownBaseClasses.li + ':not(.e-disabled)') : ulElement.querySelector('.' + dropDownBaseClasses.li);
|
|
20901
21200
|
if (focusItem) {
|
|
20902
21201
|
focusItem.classList.add(dropDownBaseClasses.selected);
|
|
20903
21202
|
this.selectedLI = focusItem;
|
|
@@ -21126,10 +21425,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
21126
21425
|
}
|
|
21127
21426
|
}
|
|
21128
21427
|
append([_this.list], popupEle_1);
|
|
21129
|
-
if (_this.inputElement.parentElement
|
|
21130
|
-
_this.inputElement.parentElement.
|
|
21131
|
-
if (popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
|
|
21132
|
-
popupEle_1.firstElementChild.setAttribute('aria-owns',
|
|
21428
|
+
if (_this.inputElement.parentElement) {
|
|
21429
|
+
var rteRootElement = _this.inputElement.parentElement.closest('.e-richtexteditor');
|
|
21430
|
+
if (rteRootElement && popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
|
|
21431
|
+
popupEle_1.firstElementChild.setAttribute('aria-owns', rteRootElement.id);
|
|
21133
21432
|
addClass([popupEle_1], 'e-rte-elements');
|
|
21134
21433
|
}
|
|
21135
21434
|
}
|
|
@@ -21432,7 +21731,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
21432
21731
|
Mention.prototype.onMouseClick = function (e) {
|
|
21433
21732
|
var target = e.target;
|
|
21434
21733
|
var li = closest(target, '.' + dropDownBaseClasses.li);
|
|
21435
|
-
if (!this.isValidLI(li)) {
|
|
21734
|
+
if (!this.isValidLI(li) || this.isDisabledElement(li)) {
|
|
21436
21735
|
return;
|
|
21437
21736
|
}
|
|
21438
21737
|
this.isSelected = true;
|
|
@@ -21663,6 +21962,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
21663
21962
|
}
|
|
21664
21963
|
this.isTyped = false;
|
|
21665
21964
|
range.deleteContents();
|
|
21965
|
+
range.startContainer.parentElement.normalize();
|
|
21666
21966
|
var element = this.createElement('div');
|
|
21667
21967
|
element.innerHTML = value;
|
|
21668
21968
|
var frag = document.createDocumentFragment();
|
|
@@ -21688,7 +21988,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
21688
21988
|
var event_1 = new CustomEvent('content-changed', { detail: { click: true } });
|
|
21689
21989
|
this.inputElement.dispatchEvent(event_1);
|
|
21690
21990
|
}
|
|
21691
|
-
|
|
21692
21991
|
this.onChangeEvent(e);
|
|
21693
21992
|
}
|
|
21694
21993
|
};
|
|
@@ -21699,10 +21998,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
21699
21998
|
}
|
|
21700
21999
|
if (this.isContentEditable(this.inputElement)) {
|
|
21701
22000
|
if (Browser.isAndroid) {
|
|
21702
|
-
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '
|
|
22001
|
+
return '<span contenteditable="true" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
|
|
21703
22002
|
}
|
|
21704
22003
|
else {
|
|
21705
|
-
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '
|
|
22004
|
+
return '<span contenteditable="false" class="e-mention-chip">' + showChar + value + '</span>'.concat(typeof this.suffixText === 'string' ? this.suffixText : '');
|
|
21706
22005
|
}
|
|
21707
22006
|
}
|
|
21708
22007
|
else {
|
|
@@ -22059,13 +22358,5 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
22059
22358
|
return Mention;
|
|
22060
22359
|
}(DropDownBase));
|
|
22061
22360
|
|
|
22062
|
-
|
|
22063
|
-
* export all modules from current location
|
|
22064
|
-
*/
|
|
22065
|
-
|
|
22066
|
-
/**
|
|
22067
|
-
* export all modules from current location
|
|
22068
|
-
*/
|
|
22069
|
-
|
|
22070
|
-
export { incrementalSearch, Search, escapeCharRegExp, resetIncrementalSearchValues, highlightSearch, revertHighlightSearch, VirtualScroll, FieldSettings, dropDownBaseClasses, DropDownBase, dropDownListClasses, DropDownList, Fields, TreeSettings, DropDownTree, ComboBox, AutoComplete, MultiSelect, CheckBoxSelection, createFloatLabel, updateFloatLabelState, removeFloating, setPlaceHolder, floatLabelFocus, floatLabelBlur, encodePlaceholder, SelectionSettings, ToolbarSettings, ListBox, Mention };
|
|
22361
|
+
export { AutoComplete, CheckBoxSelection, ComboBox, DropDownBase, DropDownList, DropDownTree, FieldSettings, Fields, ListBox, Mention, MultiSelect, Search, SelectionSettings, ToolbarSettings, TreeSettings, VirtualScroll, createFloatLabel, dropDownBaseClasses, dropDownListClasses, encodePlaceholder, escapeCharRegExp, floatLabelBlur, floatLabelFocus, highlightSearch, incrementalSearch, removeFloating, resetIncrementalSearchValues, revertHighlightSearch, setPlaceHolder, updateFloatLabelState };
|
|
22071
22362
|
//# sourceMappingURL=ej2-dropdowns.es5.js.map
|