@syncfusion/ej2-dropdowns 21.2.10 → 22.1.34
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 +260 -0
- package/CHANGELOG.md +3 -0
- package/README.md +201 -103
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +125 -34
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +125 -34
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/auto-complete/auto-complete-model.d.ts +2 -1
- package/src/auto-complete/auto-complete.d.ts +2 -1
- package/src/auto-complete/auto-complete.js +1 -1
- package/src/combo-box/combo-box-model.d.ts +6 -3
- package/src/combo-box/combo-box.d.ts +6 -3
- package/src/drop-down-base/drop-down-base-model.d.ts +8 -4
- package/src/drop-down-base/drop-down-base.d.ts +8 -4
- package/src/drop-down-base/drop-down-base.js +18 -7
- package/src/drop-down-list/drop-down-list-model.d.ts +6 -3
- package/src/drop-down-list/drop-down-list.d.ts +6 -3
- package/src/drop-down-list/drop-down-list.js +22 -13
- package/src/drop-down-tree/drop-down-tree-model.d.ts +21 -6
- package/src/drop-down-tree/drop-down-tree.d.ts +55 -62
- package/src/drop-down-tree/drop-down-tree.js +1 -1
- package/src/list-box/list-box.d.ts +14 -0
- package/src/list-box/list-box.js +33 -3
- package/src/mention/mention-model.d.ts +4 -2
- package/src/mention/mention.d.ts +4 -2
- package/src/multi-select/multi-select-model.d.ts +14 -7
- package/src/multi-select/multi-select.d.ts +15 -7
- package/src/multi-select/multi-select.js +50 -9
- package/styles/auto-complete/_material3-dark-definition.scss +1 -0
- package/styles/auto-complete/_material3-definition.scss +2 -0
- package/styles/auto-complete/material3-dark.css +198 -0
- package/styles/auto-complete/material3-dark.scss +5 -0
- package/styles/auto-complete/material3.css +254 -0
- package/styles/auto-complete/material3.scss +5 -0
- package/styles/bootstrap-dark.css +5 -1
- package/styles/bootstrap.css +5 -1
- package/styles/bootstrap4.css +5 -1
- package/styles/bootstrap5-dark.css +5 -1
- package/styles/bootstrap5.css +5 -1
- package/styles/combo-box/_material3-dark-definition.scss +1 -0
- package/styles/combo-box/_material3-definition.scss +2 -0
- package/styles/combo-box/material3-dark.css +198 -0
- package/styles/combo-box/material3-dark.scss +5 -0
- package/styles/combo-box/material3.css +254 -0
- package/styles/combo-box/material3.scss +5 -0
- package/styles/drop-down-base/_layout.scss +3 -1
- package/styles/drop-down-base/_material3-dark-definition.scss +1 -0
- package/styles/drop-down-base/_material3-definition.scss +87 -0
- package/styles/drop-down-base/_theme.scss +10 -0
- package/styles/drop-down-base/bootstrap-dark.css +4 -0
- package/styles/drop-down-base/bootstrap.css +4 -0
- package/styles/drop-down-base/bootstrap4.css +4 -0
- package/styles/drop-down-base/bootstrap5-dark.css +4 -0
- package/styles/drop-down-base/bootstrap5.css +4 -0
- package/styles/drop-down-base/fabric-dark.css +4 -0
- package/styles/drop-down-base/fabric.css +4 -0
- package/styles/drop-down-base/fluent-dark.css +4 -0
- package/styles/drop-down-base/fluent.css +4 -0
- package/styles/drop-down-base/highcontrast-light.css +4 -0
- package/styles/drop-down-base/highcontrast.css +4 -0
- package/styles/drop-down-base/material-dark.css +4 -0
- package/styles/drop-down-base/material.css +4 -0
- package/styles/drop-down-base/material3-dark.css +439 -0
- package/styles/drop-down-base/material3-dark.scss +4 -0
- package/styles/drop-down-base/material3.css +495 -0
- package/styles/drop-down-base/material3.scss +4 -0
- package/styles/drop-down-base/tailwind-dark.css +4 -0
- package/styles/drop-down-base/tailwind.css +4 -0
- package/styles/drop-down-list/_layout.scss +15 -1
- package/styles/drop-down-list/_material3-dark-definition.scss +1 -0
- package/styles/drop-down-list/_material3-definition.scss +180 -0
- package/styles/drop-down-list/icons/_material3-dark.scss +1 -0
- package/styles/drop-down-list/material3-dark.css +503 -0
- package/styles/drop-down-list/material3-dark.scss +9 -0
- package/styles/drop-down-list/material3.css +559 -0
- package/styles/drop-down-list/material3.scss +9 -0
- package/styles/drop-down-tree/_layout.scss +13 -7
- package/styles/drop-down-tree/_material3-dark-definition.scss +1 -0
- package/styles/drop-down-tree/_material3-definition.scss +76 -0
- package/styles/drop-down-tree/_theme.scss +14 -2
- package/styles/drop-down-tree/icons/_material3-dark.scss +1 -0
- package/styles/drop-down-tree/icons/_material3.scss +1 -1
- package/styles/drop-down-tree/material3-dark.css +466 -0
- package/styles/drop-down-tree/material3-dark.scss +10 -0
- package/styles/drop-down-tree/material3.css +522 -0
- package/styles/drop-down-tree/material3.scss +10 -0
- package/styles/fabric-dark.css +5 -1
- package/styles/fabric.css +5 -1
- package/styles/fluent-dark.css +5 -1
- package/styles/fluent.css +5 -1
- package/styles/highcontrast-light.css +5 -1
- package/styles/highcontrast.css +5 -1
- package/styles/list-box/_layout.scss +9 -1
- package/styles/list-box/_material3-dark-definition.scss +1 -0
- package/styles/list-box/_material3-definition.scss +117 -0
- package/styles/list-box/icons/_material3-dark.scss +1 -0
- package/styles/list-box/material3-dark.css +956 -0
- package/styles/list-box/material3-dark.scss +6 -0
- package/styles/list-box/material3.css +1012 -0
- package/styles/list-box/material3.scss +6 -0
- package/styles/material-dark.css +5 -1
- package/styles/material.css +5 -1
- package/styles/material3-dark.css +4664 -0
- package/styles/material3-dark.scss +10 -0
- package/styles/material3.css +4720 -0
- package/styles/material3.scss +10 -0
- package/styles/mention/_material3-dark-definition.scss +1 -0
- package/styles/mention/_material3-definition.scss +1 -0
- package/styles/mention/material3-dark.css +87 -0
- package/styles/mention/material3-dark.scss +7 -0
- package/styles/mention/material3.css +143 -0
- package/styles/mention/material3.scss +7 -0
- package/styles/multi-select/_layout.scss +160 -7
- package/styles/multi-select/_material3-dark-definition.scss +1 -0
- package/styles/multi-select/_material3-definition.scss +246 -0
- package/styles/multi-select/_theme.scss +6 -0
- package/styles/multi-select/bootstrap-dark.css +1 -1
- package/styles/multi-select/bootstrap.css +1 -1
- package/styles/multi-select/bootstrap4.css +1 -1
- package/styles/multi-select/bootstrap5-dark.css +1 -1
- package/styles/multi-select/bootstrap5.css +1 -1
- package/styles/multi-select/fabric-dark.css +1 -1
- package/styles/multi-select/fabric.css +1 -1
- package/styles/multi-select/fluent-dark.css +1 -1
- package/styles/multi-select/fluent.css +1 -1
- package/styles/multi-select/highcontrast-light.css +1 -1
- package/styles/multi-select/highcontrast.css +1 -1
- package/styles/multi-select/icons/_material3-dark.scss +1 -0
- package/styles/multi-select/icons/_material3.scss +3 -4
- package/styles/multi-select/material-dark.css +1 -1
- package/styles/multi-select/material.css +1 -1
- package/styles/multi-select/material3-dark.css +2547 -0
- package/styles/multi-select/material3-dark.scss +10 -0
- package/styles/multi-select/material3.css +2603 -0
- package/styles/multi-select/material3.scss +10 -0
- package/styles/multi-select/tailwind-dark.css +1 -1
- package/styles/multi-select/tailwind.css +1 -1
- package/styles/tailwind-dark.css +5 -1
- package/styles/tailwind.css +5 -1
- package/tslint.json +111 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 22.1.34
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@18.63.0",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-rzvjRsRbQxKUndOXJMiMRTsrKgVpBif5/Hw9QVwm3PzLDRqPxY0OcayRbDnpcillEtHWqypHSLuNh6pEIGP4gg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-18.63.0.tgz",
|
|
38
|
+
"_shasum": "f3fe366fa86013af30e9ceaed909a5788c686393",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~
|
|
47
|
-
"@syncfusion/ej2-data": "~
|
|
48
|
-
"@syncfusion/ej2-inputs": "~
|
|
49
|
-
"@syncfusion/ej2-lists": "~
|
|
50
|
-
"@syncfusion/ej2-navigations": "~
|
|
51
|
-
"@syncfusion/ej2-popups": "~
|
|
46
|
+
"@syncfusion/ej2-base": "~22.1.34",
|
|
47
|
+
"@syncfusion/ej2-data": "~22.1.34",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~22.1.34",
|
|
49
|
+
"@syncfusion/ej2-lists": "~22.1.34",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~22.1.34",
|
|
51
|
+
"@syncfusion/ej2-popups": "~22.1.34"
|
|
52
52
|
},
|
|
53
53
|
"deprecated": false,
|
|
54
54
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"module": "./index.js",
|
|
74
74
|
"name": "@syncfusion/ej2-dropdowns",
|
|
75
75
|
"typings": "index.d.ts",
|
|
76
|
-
"version": "
|
|
76
|
+
"version": "22.1.34",
|
|
77
77
|
"sideEffects": false,
|
|
78
78
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
79
79
|
}
|
|
@@ -162,10 +162,11 @@ export interface AutoCompleteModel extends ComboBoxModel{
|
|
|
162
162
|
* Not applicable to this component.
|
|
163
163
|
*
|
|
164
164
|
* @default null
|
|
165
|
+
* @aspType string
|
|
165
166
|
* @private
|
|
166
167
|
|
|
167
168
|
*/
|
|
168
|
-
valueTemplate?: string;
|
|
169
|
+
valueTemplate?: string | Function;
|
|
169
170
|
|
|
170
171
|
/**
|
|
171
172
|
* Not applicable to this component.
|
|
@@ -167,10 +167,11 @@ export declare class AutoComplete extends ComboBox {
|
|
|
167
167
|
* Not applicable to this component.
|
|
168
168
|
*
|
|
169
169
|
* @default null
|
|
170
|
+
* @aspType string
|
|
170
171
|
* @private
|
|
171
172
|
|
|
172
173
|
*/
|
|
173
|
-
valueTemplate: string;
|
|
174
|
+
valueTemplate: string | Function;
|
|
174
175
|
/**
|
|
175
176
|
* Not applicable to this component.
|
|
176
177
|
*
|
|
@@ -313,7 +313,7 @@ var AutoComplete = /** @class */ (function (_super) {
|
|
|
313
313
|
*/
|
|
314
314
|
AutoComplete.prototype.hidePopup = function (e) {
|
|
315
315
|
_super.prototype.hidePopup.call(this, e);
|
|
316
|
-
this.activeIndex =
|
|
316
|
+
this.activeIndex = null;
|
|
317
317
|
};
|
|
318
318
|
/**
|
|
319
319
|
* Dynamically change the value of properties.
|
|
@@ -106,9 +106,10 @@ export interface ComboBoxModel extends DropDownListModel{
|
|
|
106
106
|
* Not applicable to this component.
|
|
107
107
|
*
|
|
108
108
|
* @default null
|
|
109
|
+
* @aspType string
|
|
109
110
|
* @private
|
|
110
111
|
*/
|
|
111
|
-
valueTemplate?: string;
|
|
112
|
+
valueTemplate?: string | Function;
|
|
112
113
|
|
|
113
114
|
/**
|
|
114
115
|
* Specifies whether to display the floating label above the input element.
|
|
@@ -150,18 +151,20 @@ export interface ComboBoxModel extends DropDownListModel{
|
|
|
150
151
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
151
152
|
*
|
|
152
153
|
* @default null
|
|
154
|
+
* @aspType string
|
|
153
155
|
|
|
154
156
|
*/
|
|
155
|
-
headerTemplate?: string;
|
|
157
|
+
headerTemplate?: string | Function;
|
|
156
158
|
|
|
157
159
|
/**
|
|
158
160
|
* Accepts the template design and assigns it to the footer container of the popup list.
|
|
159
161
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
160
162
|
*
|
|
161
163
|
* @default null
|
|
164
|
+
* @aspType string
|
|
162
165
|
|
|
163
166
|
*/
|
|
164
|
-
footerTemplate?: string;
|
|
167
|
+
footerTemplate?: string | Function;
|
|
165
168
|
|
|
166
169
|
/**
|
|
167
170
|
* Specifies a short hint that describes the expected value of the DropDownList component.
|
|
@@ -114,9 +114,10 @@ export declare class ComboBox extends DropDownList {
|
|
|
114
114
|
* Not applicable to this component.
|
|
115
115
|
*
|
|
116
116
|
* @default null
|
|
117
|
+
* @aspType string
|
|
117
118
|
* @private
|
|
118
119
|
*/
|
|
119
|
-
valueTemplate: string;
|
|
120
|
+
valueTemplate: string | Function;
|
|
120
121
|
/**
|
|
121
122
|
* Specifies whether to display the floating label above the input element.
|
|
122
123
|
* Possible values are:
|
|
@@ -154,17 +155,19 @@ export declare class ComboBox extends DropDownList {
|
|
|
154
155
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
155
156
|
*
|
|
156
157
|
* @default null
|
|
158
|
+
* @aspType string
|
|
157
159
|
|
|
158
160
|
*/
|
|
159
|
-
headerTemplate: string;
|
|
161
|
+
headerTemplate: string | Function;
|
|
160
162
|
/**
|
|
161
163
|
* Accepts the template design and assigns it to the footer container of the popup list.
|
|
162
164
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
163
165
|
*
|
|
164
166
|
* @default null
|
|
167
|
+
* @aspType string
|
|
165
168
|
|
|
166
169
|
*/
|
|
167
|
-
footerTemplate: string;
|
|
170
|
+
footerTemplate: string | Function;
|
|
168
171
|
/**
|
|
169
172
|
* Specifies a short hint that describes the expected value of the DropDownList component.
|
|
170
173
|
*
|
|
@@ -82,35 +82,39 @@ export interface DropDownBaseModel extends ComponentModel{
|
|
|
82
82
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
83
83
|
*
|
|
84
84
|
* @default null
|
|
85
|
+
* @aspType string
|
|
85
86
|
|
|
86
87
|
*/
|
|
87
|
-
itemTemplate?: string;
|
|
88
|
+
itemTemplate?: string | Function;
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
91
|
* Accepts the template design and assigns it to the group headers present in the popup list.
|
|
91
92
|
*
|
|
92
93
|
* @default null
|
|
94
|
+
* @aspType string
|
|
93
95
|
|
|
94
96
|
*/
|
|
95
|
-
groupTemplate?: string;
|
|
97
|
+
groupTemplate?: string | Function;
|
|
96
98
|
|
|
97
99
|
/**
|
|
98
100
|
* Accepts the template design and assigns it to popup list of component
|
|
99
101
|
* when no data is available on the component.
|
|
100
102
|
*
|
|
101
103
|
* @default 'No records found'
|
|
104
|
+
* @aspType string
|
|
102
105
|
|
|
103
106
|
*/
|
|
104
|
-
noRecordsTemplate?: string;
|
|
107
|
+
noRecordsTemplate?: string | Function;
|
|
105
108
|
|
|
106
109
|
/**
|
|
107
110
|
* Accepts the template and assigns it to the popup list content of the component
|
|
108
111
|
* when the data fetch request from the remote server fails.
|
|
109
112
|
*
|
|
110
113
|
* @default 'Request failed'
|
|
114
|
+
* @aspType string
|
|
111
115
|
|
|
112
116
|
*/
|
|
113
|
-
actionFailureTemplate?: string;
|
|
117
|
+
actionFailureTemplate?: string | Function;
|
|
114
118
|
|
|
115
119
|
/**
|
|
116
120
|
* Specifies the `sortOrder` to sort the data source. The available type of sort orders are
|
|
@@ -247,32 +247,36 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
|
|
|
247
247
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
248
248
|
*
|
|
249
249
|
* @default null
|
|
250
|
+
* @aspType string
|
|
250
251
|
|
|
251
252
|
*/
|
|
252
|
-
itemTemplate: string;
|
|
253
|
+
itemTemplate: string | Function;
|
|
253
254
|
/**
|
|
254
255
|
* Accepts the template design and assigns it to the group headers present in the popup list.
|
|
255
256
|
*
|
|
256
257
|
* @default null
|
|
258
|
+
* @aspType string
|
|
257
259
|
|
|
258
260
|
*/
|
|
259
|
-
groupTemplate: string;
|
|
261
|
+
groupTemplate: string | Function;
|
|
260
262
|
/**
|
|
261
263
|
* Accepts the template design and assigns it to popup list of component
|
|
262
264
|
* when no data is available on the component.
|
|
263
265
|
*
|
|
264
266
|
* @default 'No records found'
|
|
267
|
+
* @aspType string
|
|
265
268
|
|
|
266
269
|
*/
|
|
267
|
-
noRecordsTemplate: string;
|
|
270
|
+
noRecordsTemplate: string | Function;
|
|
268
271
|
/**
|
|
269
272
|
* Accepts the template and assigns it to the popup list content of the component
|
|
270
273
|
* when the data fetch request from the remote server fails.
|
|
271
274
|
*
|
|
272
275
|
* @default 'Request failed'
|
|
276
|
+
* @aspType string
|
|
273
277
|
|
|
274
278
|
*/
|
|
275
|
-
actionFailureTemplate: string;
|
|
279
|
+
actionFailureTemplate: string | Function;
|
|
276
280
|
/**
|
|
277
281
|
* Specifies the `sortOrder` to sort the data source. The available type of sort orders are
|
|
278
282
|
* * `None` - The data source is not sorting.
|
|
@@ -219,7 +219,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
219
219
|
};
|
|
220
220
|
DropDownBase.prototype.templateCompiler = function (baseTemplate) {
|
|
221
221
|
var checkTemplate = false;
|
|
222
|
-
if (baseTemplate) {
|
|
222
|
+
if (typeof baseTemplate !== 'function' && baseTemplate) {
|
|
223
223
|
try {
|
|
224
224
|
checkTemplate = (selectAll(baseTemplate, document).length) ? true : false;
|
|
225
225
|
}
|
|
@@ -237,7 +237,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
237
237
|
var templateId = actionFailure ? this.actionFailureTemplateId : this.noRecordsTemplateId;
|
|
238
238
|
ele.innerHTML = '';
|
|
239
239
|
var tempaltecheck = this.templateCompiler(template);
|
|
240
|
-
if (tempaltecheck) {
|
|
240
|
+
if (typeof template !== 'function' && tempaltecheck) {
|
|
241
241
|
compiledString = compile(select(template, document).innerHTML.trim());
|
|
242
242
|
}
|
|
243
243
|
else {
|
|
@@ -603,6 +603,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
603
603
|
DropDownBase.prototype.onActionComplete = function (ulElement, list, e) {
|
|
604
604
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
605
605
|
this.listData = list;
|
|
606
|
+
if (this.getModuleName() !== 'listbox') {
|
|
607
|
+
ulElement.setAttribute('tabindex', '0');
|
|
608
|
+
}
|
|
606
609
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
607
610
|
if (this.isReact) {
|
|
608
611
|
this.clearTemplate(['itemTemplate', 'groupTemplate', 'actionFailureTemplate', 'noRecordsTemplate']);
|
|
@@ -662,7 +665,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
662
665
|
var option = { groupTemplateID: this.groupTemplateId, isStringTemplate: this.isStringTemplate };
|
|
663
666
|
var headerItems = listEle.querySelectorAll('.' + dropDownBaseClasses.group);
|
|
664
667
|
var groupcheck = this.templateCompiler(this.groupTemplate);
|
|
665
|
-
if (groupcheck) {
|
|
668
|
+
if (typeof this.groupTemplate !== 'function' && groupcheck) {
|
|
666
669
|
var groupValue = select(this.groupTemplate, document).innerHTML.trim();
|
|
667
670
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
668
671
|
var tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);
|
|
@@ -799,7 +802,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
799
802
|
option.templateID = this.itemTemplateId;
|
|
800
803
|
option.isStringTemplate = this.isStringTemplate;
|
|
801
804
|
var itemcheck = this.templateCompiler(this.itemTemplate);
|
|
802
|
-
if (itemcheck) {
|
|
805
|
+
if (typeof this.itemTemplate !== 'function' && itemcheck) {
|
|
803
806
|
var itemValue = select(this.itemTemplate, document).innerHTML.trim();
|
|
804
807
|
return ListBase.renderContentTemplate(this.createElement, itemValue, dataSource, fields.properties, option, this);
|
|
805
808
|
}
|
|
@@ -886,7 +889,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
886
889
|
DropDownBase.prototype.dispatchEvent = function (element, type) {
|
|
887
890
|
var evt = document.createEvent('HTMLEvents');
|
|
888
891
|
evt.initEvent(type, false, true);
|
|
889
|
-
element
|
|
892
|
+
if (element) {
|
|
893
|
+
element.dispatchEvent(evt);
|
|
894
|
+
}
|
|
890
895
|
};
|
|
891
896
|
/**
|
|
892
897
|
* To set the current fields
|
|
@@ -1014,7 +1019,12 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1014
1019
|
* @returns {void}
|
|
1015
1020
|
*/
|
|
1016
1021
|
DropDownBase.prototype.render = function (e, isEmptyData) {
|
|
1017
|
-
|
|
1022
|
+
if (this.getModuleName() === 'listbox') {
|
|
1023
|
+
this.list = this.createElement('div', { className: dropDownBaseClasses.content, attrs: { 'tabindex': '0' } });
|
|
1024
|
+
}
|
|
1025
|
+
else {
|
|
1026
|
+
this.list = this.createElement('div', { className: dropDownBaseClasses.content });
|
|
1027
|
+
}
|
|
1018
1028
|
this.list.classList.add(dropDownBaseClasses.root);
|
|
1019
1029
|
this.setFields();
|
|
1020
1030
|
var rippleModel = { duration: 300, selector: '.' + dropDownBaseClasses.li };
|
|
@@ -1103,7 +1113,8 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1103
1113
|
}
|
|
1104
1114
|
if (this.itemTemplate && !isHeader) {
|
|
1105
1115
|
var itemCheck = this.templateCompiler(this.itemTemplate);
|
|
1106
|
-
var compiledString =
|
|
1116
|
+
var compiledString = typeof this.itemTemplate !== 'function' &&
|
|
1117
|
+
itemCheck ? compile(select(this.itemTemplate, document).innerHTML.trim()) : compile(this.itemTemplate);
|
|
1107
1118
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1108
1119
|
var addItemTemplate = compiledString(item, this, 'itemTemplate', this.itemTemplateId, this.isStringTemplate, null, li);
|
|
1109
1120
|
if (addItemTemplate) {
|
|
@@ -107,24 +107,27 @@ export interface DropDownListModel extends DropDownBaseModel{
|
|
|
107
107
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
108
108
|
*
|
|
109
109
|
* @default null
|
|
110
|
+
* @aspType string
|
|
110
111
|
*/
|
|
111
|
-
valueTemplate?: string;
|
|
112
|
+
valueTemplate?: string | Function;
|
|
112
113
|
|
|
113
114
|
/**
|
|
114
115
|
* Accepts the template design and assigns it to the header container of the popup list.
|
|
115
116
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
116
117
|
*
|
|
117
118
|
* @default null
|
|
119
|
+
* @aspType string
|
|
118
120
|
*/
|
|
119
|
-
headerTemplate?: string;
|
|
121
|
+
headerTemplate?: string | Function;
|
|
120
122
|
|
|
121
123
|
/**
|
|
122
124
|
* Accepts the template design and assigns it to the footer container of the popup list.
|
|
123
125
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
124
126
|
*
|
|
125
127
|
* @default null
|
|
128
|
+
* @aspType string
|
|
126
129
|
*/
|
|
127
|
-
footerTemplate?: string;
|
|
130
|
+
footerTemplate?: string | Function;
|
|
128
131
|
|
|
129
132
|
/**
|
|
130
133
|
* When allowFiltering is set to true, show the filter bar (search box) of the component.
|
|
@@ -197,22 +197,25 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
197
197
|
* For EX: We have expression evolution as like ES6 expression string literals.
|
|
198
198
|
*
|
|
199
199
|
* @default null
|
|
200
|
+
* @aspType string
|
|
200
201
|
*/
|
|
201
|
-
valueTemplate: string;
|
|
202
|
+
valueTemplate: string | Function;
|
|
202
203
|
/**
|
|
203
204
|
* Accepts the template design and assigns it to the header container of the popup list.
|
|
204
205
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
205
206
|
*
|
|
206
207
|
* @default null
|
|
208
|
+
* @aspType string
|
|
207
209
|
*/
|
|
208
|
-
headerTemplate: string;
|
|
210
|
+
headerTemplate: string | Function;
|
|
209
211
|
/**
|
|
210
212
|
* Accepts the template design and assigns it to the footer container of the popup list.
|
|
211
213
|
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
|
|
212
214
|
*
|
|
213
215
|
* @default null
|
|
216
|
+
* @aspType string
|
|
214
217
|
*/
|
|
215
|
-
footerTemplate: string;
|
|
218
|
+
footerTemplate: string | Function;
|
|
216
219
|
/**
|
|
217
220
|
* When allowFiltering is set to true, show the filter bar (search box) of the component.
|
|
218
221
|
* The filter action retrieves matched items through the `filtering` event based on
|
|
@@ -722,8 +722,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
722
722
|
startIndex = e.action === 'down' && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1;
|
|
723
723
|
index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index;
|
|
724
724
|
}
|
|
725
|
-
var nextItem =
|
|
726
|
-
|
|
725
|
+
var nextItem = void 0;
|
|
726
|
+
if (this.getModuleName() !== 'autocomplete' || this.getModuleName() === 'autocomplete' && this.isPopupOpen) {
|
|
727
|
+
nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex]
|
|
728
|
+
: this.liCollections[index];
|
|
729
|
+
}
|
|
727
730
|
if (!isNullOrUndefined(nextItem)) {
|
|
728
731
|
this.setSelection(nextItem, e);
|
|
729
732
|
}
|
|
@@ -1041,9 +1044,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1041
1044
|
}
|
|
1042
1045
|
if (Browser.info.name !== 'mozilla') {
|
|
1043
1046
|
if (this.targetElement()) {
|
|
1044
|
-
|
|
1045
|
-
attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
|
|
1046
|
-
}
|
|
1047
|
+
attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
|
|
1047
1048
|
this.targetElement().removeAttribute('aria-live');
|
|
1048
1049
|
}
|
|
1049
1050
|
}
|
|
@@ -1056,7 +1057,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1056
1057
|
};
|
|
1057
1058
|
DropDownList.prototype.dropdownCompiler = function (dropdownTemplate) {
|
|
1058
1059
|
var checkTemplate = false;
|
|
1059
|
-
if (dropdownTemplate) {
|
|
1060
|
+
if (typeof dropdownTemplate !== 'function' && dropdownTemplate) {
|
|
1060
1061
|
try {
|
|
1061
1062
|
checkTemplate = (document.querySelectorAll(dropdownTemplate).length) ? true : false;
|
|
1062
1063
|
}
|
|
@@ -1087,7 +1088,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1087
1088
|
this.valueTempElement.innerHTML = '';
|
|
1088
1089
|
}
|
|
1089
1090
|
var valuecheck = this.dropdownCompiler(this.valueTemplate);
|
|
1090
|
-
if (valuecheck) {
|
|
1091
|
+
if (typeof this.valueTemplate !== 'function' && valuecheck) {
|
|
1091
1092
|
compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());
|
|
1092
1093
|
}
|
|
1093
1094
|
else {
|
|
@@ -1136,7 +1137,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1136
1137
|
var index = this.isSelectCustom ? null : this.activeIndex;
|
|
1137
1138
|
this.setProperties({ 'index': index, 'text': dataItem.text, 'value': dataItem.value }, true);
|
|
1138
1139
|
this.detachChangeEvent(eve);
|
|
1139
|
-
this.dispatchEvent(this.hiddenElement, 'change');
|
|
1140
1140
|
};
|
|
1141
1141
|
DropDownList.prototype.detachChanges = function (value) {
|
|
1142
1142
|
var items;
|
|
@@ -1476,6 +1476,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1476
1476
|
};
|
|
1477
1477
|
DropDownList.prototype.onInput = function (e) {
|
|
1478
1478
|
this.isValidKey = true;
|
|
1479
|
+
if (this.getModuleName() === 'combobox') {
|
|
1480
|
+
this.updateIconState();
|
|
1481
|
+
}
|
|
1479
1482
|
// For filtering works in mobile firefox.
|
|
1480
1483
|
if (Browser.isDevice && Browser.info.name === 'mozilla') {
|
|
1481
1484
|
this.typedString = this.filterInput.value;
|
|
@@ -2146,7 +2149,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2146
2149
|
this.setFields();
|
|
2147
2150
|
this.inputWrapper.container.style.width = formatUnit(this.width);
|
|
2148
2151
|
this.inputWrapper.container.classList.add('e-ddl');
|
|
2149
|
-
|
|
2152
|
+
if (this.floatLabelType === 'Auto') {
|
|
2153
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
2154
|
+
}
|
|
2150
2155
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && this.inputWrapper.container.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never') {
|
|
2151
2156
|
this.inputWrapper.container.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
2152
2157
|
}
|
|
@@ -2222,7 +2227,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2222
2227
|
addClass([this.footer], dropDownListClasses.footer);
|
|
2223
2228
|
}
|
|
2224
2229
|
var footercheck = this.dropdownCompiler(this.footerTemplate);
|
|
2225
|
-
if (footercheck) {
|
|
2230
|
+
if (typeof this.footerTemplate !== 'function' && footercheck) {
|
|
2226
2231
|
compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());
|
|
2227
2232
|
}
|
|
2228
2233
|
else {
|
|
@@ -2245,7 +2250,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2245
2250
|
addClass([this.header], dropDownListClasses.header);
|
|
2246
2251
|
}
|
|
2247
2252
|
var headercheck = this.dropdownCompiler(this.headerTemplate);
|
|
2248
|
-
if (headercheck) {
|
|
2253
|
+
if (typeof this.headerTemplate !== 'function' && headercheck) {
|
|
2249
2254
|
compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());
|
|
2250
2255
|
}
|
|
2251
2256
|
else {
|
|
@@ -2716,7 +2721,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2716
2721
|
}
|
|
2717
2722
|
addClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
|
|
2718
2723
|
this.onFocus(e);
|
|
2719
|
-
|
|
2724
|
+
if (this.floatLabelType === 'Auto') {
|
|
2725
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
2726
|
+
}
|
|
2720
2727
|
};
|
|
2721
2728
|
/**
|
|
2722
2729
|
* Moves the focus from the component if the component is already focused.
|
|
@@ -2734,7 +2741,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2734
2741
|
this.targetElement().blur();
|
|
2735
2742
|
}
|
|
2736
2743
|
removeClass([this.inputWrapper.container], [dropDownListClasses.inputFocus]);
|
|
2737
|
-
|
|
2744
|
+
if (this.floatLabelType === 'Auto' && this.inputElement.value === '') {
|
|
2745
|
+
Input.calculateWidth(this.inputElement, this.inputWrapper.container);
|
|
2746
|
+
}
|
|
2738
2747
|
};
|
|
2739
2748
|
/**
|
|
2740
2749
|
* Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.
|
|
@@ -140,8 +140,9 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
140
140
|
* Dropdown Tree component when the data fetch request from the remote server fails.
|
|
141
141
|
*
|
|
142
142
|
* @default 'The Request Failed'
|
|
143
|
+
* @aspType string
|
|
143
144
|
*/
|
|
144
|
-
actionFailureTemplate?: string;
|
|
145
|
+
actionFailureTemplate?: string | Function;
|
|
145
146
|
|
|
146
147
|
/**
|
|
147
148
|
* When allowFiltering is set to true, it shows the filter bar (search text box) of the component.
|
|
@@ -182,8 +183,9 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
182
183
|
* added to the input instead of the selected item text in the Dropdown Tree when the multi-selection or checkbox support is enabled.
|
|
183
184
|
*
|
|
184
185
|
* @default "${value.length} item(s) selected"
|
|
186
|
+
* @aspType string
|
|
185
187
|
*/
|
|
186
|
-
customTemplate?: string;
|
|
188
|
+
customTemplate?: string | Function;
|
|
187
189
|
|
|
188
190
|
/**
|
|
189
191
|
* Defines the value separator character in the input element when multi-selection or checkbox is enabled in the Dropdown Tree.
|
|
@@ -267,8 +269,12 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
267
269
|
* By default, the footerTemplate will be null and there will be no footer container for the pop-up list.
|
|
268
270
|
*
|
|
269
271
|
* @default null
|
|
272
|
+
* @angularType string | object
|
|
273
|
+
* @reactType string | function | JSX.Element
|
|
274
|
+
* @vueType string | function
|
|
275
|
+
* @aspType string
|
|
270
276
|
*/
|
|
271
|
-
footerTemplate?: string;
|
|
277
|
+
footerTemplate?: string | Function;
|
|
272
278
|
|
|
273
279
|
/**
|
|
274
280
|
* When **ignoreAccent** is set to true, then it ignores the diacritic characters or accents when filtering.
|
|
@@ -287,8 +293,12 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
287
293
|
* By default, the headerTemplate will be null and there will be no header container for the pop-up list.
|
|
288
294
|
*
|
|
289
295
|
* @default null
|
|
296
|
+
* @angularType string | object
|
|
297
|
+
* @reactType string | function | JSX.Element
|
|
298
|
+
* @vueType string | function
|
|
299
|
+
* @aspType string
|
|
290
300
|
*/
|
|
291
|
-
headerTemplate?: string;
|
|
301
|
+
headerTemplate?: string | Function;
|
|
292
302
|
|
|
293
303
|
/**
|
|
294
304
|
* Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.
|
|
@@ -304,8 +314,12 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
304
314
|
* or HTML element ID holding the content.
|
|
305
315
|
*
|
|
306
316
|
* @default null
|
|
317
|
+
* @angularType string | object
|
|
318
|
+
* @reactType string | function | JSX.Element
|
|
319
|
+
* @vueType string | function
|
|
320
|
+
* @aspType string
|
|
307
321
|
*/
|
|
308
|
-
itemTemplate?: string;
|
|
322
|
+
itemTemplate?: string | Function;
|
|
309
323
|
|
|
310
324
|
/**
|
|
311
325
|
* Configures visibility mode for component interaction when allowMultiSelection or checkbox is enabled.
|
|
@@ -323,8 +337,9 @@ export interface DropDownTreeModel extends ComponentModel{
|
|
|
323
337
|
* to be displayed within the pop-up.
|
|
324
338
|
*
|
|
325
339
|
* @default 'No Records Found'
|
|
340
|
+
* @aspType string
|
|
326
341
|
*/
|
|
327
|
-
noRecordsTemplate?: string;
|
|
342
|
+
noRecordsTemplate?: string | Function;
|
|
328
343
|
|
|
329
344
|
/**
|
|
330
345
|
* Specifies a short hint that describes the expected value of the Dropdown Tree component.
|