@syncfusion/ej2-dropdowns 24.2.3 → 24.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -6
- 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 +69 -15
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +68 -14
- 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 -2
- package/src/auto-complete/auto-complete.d.ts +2 -2
- package/src/combo-box/combo-box-model.d.ts +3 -3
- package/src/combo-box/combo-box.d.ts +3 -3
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/drop-down-list/drop-down-list-model.d.ts +3 -3
- package/src/drop-down-list/drop-down-list.d.ts +3 -3
- package/src/drop-down-list/drop-down-list.js +16 -0
- package/src/drop-down-tree/drop-down-tree.js +0 -3
- package/src/list-box/list-box-model.d.ts +1 -1
- package/src/list-box/list-box.js +8 -1
- package/src/mention/mention.js +4 -1
- package/src/multi-select/multi-select-model.d.ts +3 -3
- package/src/multi-select/multi-select.d.ts +5 -3
- package/src/multi-select/multi-select.js +40 -9
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 24.2.
|
|
3
|
+
* version : 24.2.5
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-dropdowns@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-dropdowns@24.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@24.2.4",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-yO2x7003LTxaPl+OD2C6KP4XQaN6kVuzGVKtSz9vBtS2e3EZZpt8GmtRs1QOmMaR47kqD+Cv2ybUx1E3w13pKg==",
|
|
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.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-24.2.4.tgz",
|
|
38
|
+
"_shasum": "24edaa5bfef0a2fa7ee08492553773b546b45011",
|
|
39
39
|
"_spec": "@syncfusion/ej2-dropdowns@*",
|
|
40
40
|
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
41
41
|
"author": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"bundleDependencies": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@syncfusion/ej2-base": "~24.2.
|
|
46
|
+
"@syncfusion/ej2-base": "~24.2.5",
|
|
47
47
|
"@syncfusion/ej2-data": "~24.2.3",
|
|
48
|
-
"@syncfusion/ej2-inputs": "~24.2.
|
|
49
|
-
"@syncfusion/ej2-lists": "~24.2.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~24.2.
|
|
51
|
-
"@syncfusion/ej2-notifications": "~24.2.
|
|
52
|
-
"@syncfusion/ej2-popups": "~24.2.
|
|
48
|
+
"@syncfusion/ej2-inputs": "~24.2.5",
|
|
49
|
+
"@syncfusion/ej2-lists": "~24.2.4",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~24.2.4",
|
|
51
|
+
"@syncfusion/ej2-notifications": "~24.2.4",
|
|
52
|
+
"@syncfusion/ej2-popups": "~24.2.5"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 DropDown Components",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"module": "./index.js",
|
|
75
75
|
"name": "@syncfusion/ej2-dropdowns",
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "24.2.
|
|
77
|
+
"version": "24.2.5",
|
|
78
78
|
"sideEffects": false,
|
|
79
79
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
80
80
|
}
|
|
@@ -138,7 +138,7 @@ export interface AutoCompleteModel extends ComboBoxModel{
|
|
|
138
138
|
* @private
|
|
139
139
|
|
|
140
140
|
*/
|
|
141
|
-
index?: number;
|
|
141
|
+
index?: number | null;
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* Specifies whether to display the floating label above the input element.
|
|
@@ -193,6 +193,6 @@ export interface AutoCompleteModel extends ComboBoxModel{
|
|
|
193
193
|
* @private
|
|
194
194
|
|
|
195
195
|
*/
|
|
196
|
-
text?: string;
|
|
196
|
+
text?: string | null;
|
|
197
197
|
|
|
198
198
|
}
|
|
@@ -145,7 +145,7 @@ export declare class AutoComplete extends ComboBox {
|
|
|
145
145
|
* @private
|
|
146
146
|
|
|
147
147
|
*/
|
|
148
|
-
index: number;
|
|
148
|
+
index: number | null;
|
|
149
149
|
/**
|
|
150
150
|
* Specifies whether to display the floating label above the input element.
|
|
151
151
|
* Possible values are:
|
|
@@ -195,7 +195,7 @@ export declare class AutoComplete extends ComboBox {
|
|
|
195
195
|
* @private
|
|
196
196
|
|
|
197
197
|
*/
|
|
198
|
-
text: string;
|
|
198
|
+
text: string | null;
|
|
199
199
|
/**
|
|
200
200
|
* * Constructor for creating the widget
|
|
201
201
|
*
|
|
@@ -68,7 +68,7 @@ export interface ComboBoxModel extends DropDownListModel{
|
|
|
68
68
|
* @default null
|
|
69
69
|
|
|
70
70
|
*/
|
|
71
|
-
index?: number;
|
|
71
|
+
index?: number | null;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Specifies whether to show or hide the clear button.
|
|
@@ -221,7 +221,7 @@ export interface ComboBoxModel extends DropDownListModel{
|
|
|
221
221
|
* @default null
|
|
222
222
|
|
|
223
223
|
*/
|
|
224
|
-
text?: string;
|
|
224
|
+
text?: string | null;
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
227
|
* Gets or sets the value of the selected item in the component.
|
|
@@ -230,6 +230,6 @@ export interface ComboBoxModel extends DropDownListModel{
|
|
|
230
230
|
* @isGenericType true
|
|
231
231
|
|
|
232
232
|
*/
|
|
233
|
-
value?: number | string | boolean;
|
|
233
|
+
value?: number | string | boolean | null;
|
|
234
234
|
|
|
235
235
|
}
|
|
@@ -81,7 +81,7 @@ export declare class ComboBox extends DropDownList {
|
|
|
81
81
|
* @default null
|
|
82
82
|
|
|
83
83
|
*/
|
|
84
|
-
index: number;
|
|
84
|
+
index: number | null;
|
|
85
85
|
/**
|
|
86
86
|
* Specifies whether to show or hide the clear button.
|
|
87
87
|
* When the clear button is clicked, `value`, `text`, and `index` properties are reset to null.
|
|
@@ -218,7 +218,7 @@ export declare class ComboBox extends DropDownList {
|
|
|
218
218
|
* @default null
|
|
219
219
|
|
|
220
220
|
*/
|
|
221
|
-
text: string;
|
|
221
|
+
text: string | null;
|
|
222
222
|
/**
|
|
223
223
|
* Gets or sets the value of the selected item in the component.
|
|
224
224
|
*
|
|
@@ -226,7 +226,7 @@ export declare class ComboBox extends DropDownList {
|
|
|
226
226
|
* @isGenericType true
|
|
227
227
|
|
|
228
228
|
*/
|
|
229
|
-
value: number | string | boolean;
|
|
229
|
+
value: number | string | boolean | null;
|
|
230
230
|
/**
|
|
231
231
|
* *Constructor for creating the component
|
|
232
232
|
*
|
|
@@ -278,7 +278,7 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
else {
|
|
281
|
-
if (noDataElement[i] instanceof HTMLElement) {
|
|
281
|
+
if (noDataElement[i] instanceof HTMLElement || noDataElement[i] instanceof Text) {
|
|
282
282
|
ele.appendChild(noDataElement[i]);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
@@ -164,7 +164,7 @@ export interface DropDownListModel extends DropDownBaseModel{
|
|
|
164
164
|
*
|
|
165
165
|
* @default null
|
|
166
166
|
*/
|
|
167
|
-
text?: string;
|
|
167
|
+
text?: string | null;
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* Gets or sets the value of the selected item in the component.
|
|
@@ -172,7 +172,7 @@ export interface DropDownListModel extends DropDownBaseModel{
|
|
|
172
172
|
* @default null
|
|
173
173
|
* @isGenericType true
|
|
174
174
|
*/
|
|
175
|
-
value?: number | string | boolean;
|
|
175
|
+
value?: number | string | boolean | null;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Gets or sets the index of the selected item in the component.
|
|
@@ -183,7 +183,7 @@ export interface DropDownListModel extends DropDownBaseModel{
|
|
|
183
183
|
*
|
|
184
184
|
* @default null
|
|
185
185
|
*/
|
|
186
|
-
index?: number;
|
|
186
|
+
index?: number | null;
|
|
187
187
|
|
|
188
188
|
/**
|
|
189
189
|
* Specifies whether to display the floating label above the input element.
|
|
@@ -286,14 +286,14 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
286
286
|
*
|
|
287
287
|
* @default null
|
|
288
288
|
*/
|
|
289
|
-
text: string;
|
|
289
|
+
text: string | null;
|
|
290
290
|
/**
|
|
291
291
|
* Gets or sets the value of the selected item in the component.
|
|
292
292
|
*
|
|
293
293
|
* @default null
|
|
294
294
|
* @isGenericType true
|
|
295
295
|
*/
|
|
296
|
-
value: number | string | boolean;
|
|
296
|
+
value: number | string | boolean | null;
|
|
297
297
|
/**
|
|
298
298
|
* Gets or sets the index of the selected item in the component.
|
|
299
299
|
*
|
|
@@ -303,7 +303,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
303
303
|
*
|
|
304
304
|
* @default null
|
|
305
305
|
*/
|
|
306
|
-
index: number;
|
|
306
|
+
index: number | null;
|
|
307
307
|
/**
|
|
308
308
|
* Specifies whether to display the floating label above the input element.
|
|
309
309
|
* Possible values are:
|
|
@@ -1238,6 +1238,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1238
1238
|
if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
|
|
1239
1239
|
this.isDocumentClick = true;
|
|
1240
1240
|
var isActive = this.isRequested;
|
|
1241
|
+
if (this.getModuleName() === 'combobox' && this.isTyped) {
|
|
1242
|
+
this.isInteracted = false;
|
|
1243
|
+
}
|
|
1241
1244
|
this.hidePopup(e);
|
|
1242
1245
|
this.isInteracted = false;
|
|
1243
1246
|
if (!isActive) {
|
|
@@ -1926,6 +1929,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1926
1929
|
this.virtualListInfo = null;
|
|
1927
1930
|
}
|
|
1928
1931
|
this.resetList(dataSource, fields, query);
|
|
1932
|
+
if (this.getModuleName() === 'dropdownlist' && this.list.classList.contains(dropDownBaseClasses.noData)) {
|
|
1933
|
+
this.popupContentElement.setAttribute('role', 'status');
|
|
1934
|
+
this.popupContentElement.setAttribute('id', 'no-record');
|
|
1935
|
+
attributes(this.filterInputObj.container, { 'aria-activedescendant': 'no-record' });
|
|
1936
|
+
}
|
|
1929
1937
|
if (this.enableVirtualization && isNoData && !this.list.classList.contains(dropDownBaseClasses.noData)) {
|
|
1930
1938
|
if (!this.list.querySelector('.e-virtual-ddl-content')) {
|
|
1931
1939
|
this.list.appendChild(this.createElement('div', {
|
|
@@ -2474,6 +2482,11 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2474
2482
|
}, 5);
|
|
2475
2483
|
}
|
|
2476
2484
|
attributes(_this.targetElement(), { 'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id });
|
|
2485
|
+
if (_this.getModuleName() !== 'dropdownlist' && _this.list.classList.contains('e-nodata')) {
|
|
2486
|
+
attributes(_this.targetElement(), { 'aria-activedescendant': 'no-record' });
|
|
2487
|
+
_this.popupContentElement.setAttribute('role', 'status');
|
|
2488
|
+
_this.popupContentElement.setAttribute('id', 'no-record');
|
|
2489
|
+
}
|
|
2477
2490
|
_this.inputElement.setAttribute('aria-expanded', 'true');
|
|
2478
2491
|
_this.inputElement.setAttribute('aria-controls', _this.element.id);
|
|
2479
2492
|
var inputParent = _this.isFiltering() ? _this.filterInput.parentElement : _this.inputWrapper.container;
|
|
@@ -3775,6 +3788,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
3775
3788
|
this.clearTemplate();
|
|
3776
3789
|
}
|
|
3777
3790
|
this.hidePopup();
|
|
3791
|
+
if (this.popupObj) {
|
|
3792
|
+
this.popupObj.hide();
|
|
3793
|
+
}
|
|
3778
3794
|
this.unWireEvent();
|
|
3779
3795
|
if (this.list) {
|
|
3780
3796
|
this.unWireListEvents();
|
|
@@ -1944,9 +1944,6 @@ var DropDownTree = /** @class */ (function (_super) {
|
|
|
1944
1944
|
if (this.value === null) {
|
|
1945
1945
|
this.setProperties({ value: [] }, true);
|
|
1946
1946
|
}
|
|
1947
|
-
if (args.node.classList.contains("e-active")) {
|
|
1948
|
-
this.hidePopup();
|
|
1949
|
-
}
|
|
1950
1947
|
}
|
|
1951
1948
|
};
|
|
1952
1949
|
DropDownTree.prototype.updateHiddenValue = function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DropDownBase, dropDownBaseClasses, FilteringEventArgs, SelectEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { EventHandler, closest, removeClass, addClass, Complex, Property, ChildProperty, BaseEventArgs, L10n } from '@syncfusion/ej2-base';import { ModuleDeclaration, NotifyPropertyChanges, getComponent, EmitType, Event, extend, detach, attributes } from '@syncfusion/ej2-base';import { getUniqueID, Browser, formatUnit, isNullOrUndefined, getValue } from '@syncfusion/ej2-base';import { prepend, append } from '@syncfusion/ej2-base';import { cssClass, Sortable, moveTo } from '@syncfusion/ej2-lists';import { Button } from '@syncfusion/ej2-buttons';import { createSpinner, showSpinner, hideSpinner, getZindexPartial } from '@syncfusion/ej2-popups';import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
1
|
+
import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DropDownBase, dropDownBaseClasses, FilteringEventArgs, SelectEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { EventHandler, closest, removeClass, addClass, Complex, Property, ChildProperty, BaseEventArgs, L10n, setValue } from '@syncfusion/ej2-base';import { ModuleDeclaration, NotifyPropertyChanges, getComponent, EmitType, Event, extend, detach, attributes } from '@syncfusion/ej2-base';import { getUniqueID, Browser, formatUnit, isNullOrUndefined, getValue } from '@syncfusion/ej2-base';import { prepend, append } from '@syncfusion/ej2-base';import { cssClass, Sortable, moveTo } from '@syncfusion/ej2-lists';import { Button } from '@syncfusion/ej2-buttons';import { createSpinner, showSpinner, hideSpinner, getZindexPartial } from '@syncfusion/ej2-popups';import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
2
2
|
import {SelectionMode,CheckBoxPosition,ToolBarPosition,BeforeItemRenderEventArgs,ListBoxChangeEventArgs,DropEventArgs,DragEventArgs} from "./list-box";
|
|
3
3
|
import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
|
|
4
4
|
|
package/src/list-box/list-box.js
CHANGED
|
@@ -21,7 +21,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
21
21
|
/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>
|
|
22
22
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
23
23
|
import { DropDownBase, dropDownBaseClasses } from '../drop-down-base/drop-down-base';
|
|
24
|
-
import { EventHandler, closest, removeClass, addClass, Complex, Property, ChildProperty, L10n } from '@syncfusion/ej2-base';
|
|
24
|
+
import { EventHandler, closest, removeClass, addClass, Complex, Property, ChildProperty, L10n, setValue } from '@syncfusion/ej2-base';
|
|
25
25
|
import { NotifyPropertyChanges, getComponent, Event, extend, detach, attributes } from '@syncfusion/ej2-base';
|
|
26
26
|
import { getUniqueID, Browser, formatUnit, isNullOrUndefined, getValue } from '@syncfusion/ej2-base';
|
|
27
27
|
import { prepend, append } from '@syncfusion/ej2-base';
|
|
@@ -125,6 +125,13 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
125
125
|
* @returns {void}
|
|
126
126
|
*/
|
|
127
127
|
ListBox.prototype.render = function () {
|
|
128
|
+
if (this.isAngular && this.allowFiltering) {
|
|
129
|
+
var originalElement = this.element;
|
|
130
|
+
var clonedElement = originalElement.cloneNode(true);
|
|
131
|
+
originalElement.parentNode.replaceChild(clonedElement, originalElement);
|
|
132
|
+
this.element = clonedElement;
|
|
133
|
+
setValue('ej2_instances', [this], this.element);
|
|
134
|
+
}
|
|
128
135
|
this.inputString = '';
|
|
129
136
|
this.initLoad = true;
|
|
130
137
|
this.isCustomFiltering = false;
|
package/src/mention/mention.js
CHANGED
|
@@ -344,7 +344,9 @@ var Mention = /** @class */ (function (_super) {
|
|
|
344
344
|
}
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
if (lastWordRange.includes(this.mentionChar)) {
|
|
348
|
+
this.queryString = lastWordRange.replace(this.mentionChar, '');
|
|
349
|
+
}
|
|
348
350
|
if (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) &&
|
|
349
351
|
this.queryString !== '' && e.keyCode !== 38 && e.keyCode !== 40 && !this.lineBreak) {
|
|
350
352
|
this.searchLists(e);
|
|
@@ -692,6 +694,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
692
694
|
_this.inputElement.parentElement.parentElement.classList.contains('e-richtexteditor')) {
|
|
693
695
|
if (popupEle_1.firstElementChild && popupEle_1.firstElementChild.childElementCount > 0) {
|
|
694
696
|
popupEle_1.firstElementChild.setAttribute('aria-owns', _this.inputElement.parentElement.parentElement.id);
|
|
697
|
+
addClass([popupEle_1], 'e-rte-elements');
|
|
695
698
|
}
|
|
696
699
|
}
|
|
697
700
|
if ((!_this.popupObj || !document.body.contains(_this.popupObj.element)) ||
|
|
@@ -87,7 +87,7 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
87
87
|
/**
|
|
88
88
|
* Defines whether to allow the cross-scripting site or not.
|
|
89
89
|
*
|
|
90
|
-
* @default
|
|
90
|
+
* @default true
|
|
91
91
|
*/
|
|
92
92
|
enableHtmlSanitizer?: boolean;
|
|
93
93
|
|
|
@@ -335,7 +335,7 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
335
335
|
*
|
|
336
336
|
* @default null
|
|
337
337
|
*/
|
|
338
|
-
text?: string;
|
|
338
|
+
text?: string | null;
|
|
339
339
|
|
|
340
340
|
/**
|
|
341
341
|
* Selects the list item which maps the data `value` field in the component.
|
|
@@ -344,7 +344,7 @@ export interface MultiSelectModel extends DropDownBaseModel{
|
|
|
344
344
|
* @default null
|
|
345
345
|
* @isGenericType true
|
|
346
346
|
*/
|
|
347
|
-
value?: number[] | string[] | boolean[];
|
|
347
|
+
value?: number[] | string[] | boolean[] | null;
|
|
348
348
|
|
|
349
349
|
/**
|
|
350
350
|
* Hides the selected item from the list item.
|
|
@@ -49,6 +49,8 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
49
49
|
private previousFilterText;
|
|
50
50
|
private selectedElementID;
|
|
51
51
|
private focusFirstListItem;
|
|
52
|
+
private isCustomRendered;
|
|
53
|
+
private isRemoteSelection;
|
|
52
54
|
/**
|
|
53
55
|
* The `fields` property maps the columns of the data table and binds the data to the component.
|
|
54
56
|
* * text - Maps the text column from data table for each list item.
|
|
@@ -122,7 +124,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
122
124
|
/**
|
|
123
125
|
* Defines whether to allow the cross-scripting site or not.
|
|
124
126
|
*
|
|
125
|
-
* @default
|
|
127
|
+
* @default true
|
|
126
128
|
*/
|
|
127
129
|
enableHtmlSanitizer: boolean;
|
|
128
130
|
/**
|
|
@@ -349,7 +351,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
349
351
|
*
|
|
350
352
|
* @default null
|
|
351
353
|
*/
|
|
352
|
-
text: string;
|
|
354
|
+
text: string | null;
|
|
353
355
|
/**
|
|
354
356
|
* Selects the list item which maps the data `value` field in the component.
|
|
355
357
|
* {% codeBlock src='multiselect/value/index.md' %}{% endcodeBlock %}
|
|
@@ -357,7 +359,7 @@ export declare class MultiSelect extends DropDownBase implements IInput {
|
|
|
357
359
|
* @default null
|
|
358
360
|
* @isGenericType true
|
|
359
361
|
*/
|
|
360
|
-
value: number[] | string[] | boolean[];
|
|
362
|
+
value: number[] | string[] | boolean[] | null;
|
|
361
363
|
/**
|
|
362
364
|
* Hides the selected item from the list item.
|
|
363
365
|
*
|
|
@@ -361,6 +361,11 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
363
|
MultiSelect.prototype.removelastSelection = function (e) {
|
|
364
|
+
var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);
|
|
365
|
+
if (selectedElem !== null) {
|
|
366
|
+
this.removeSelectedChip(e);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
364
369
|
var elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP);
|
|
365
370
|
var value = elements[elements.length - 1].getAttribute('data-value');
|
|
366
371
|
if (!isNullOrUndefined(this.value)) {
|
|
@@ -437,6 +442,12 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
437
442
|
else {
|
|
438
443
|
this.updateActionList(ulElement, list, e);
|
|
439
444
|
}
|
|
445
|
+
if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered && this.inputElement.value && this.inputElement.value !== '') {
|
|
446
|
+
var query = new Query();
|
|
447
|
+
query = this.allowFiltering ? query.where(this.fields.text, 'startswith', this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;
|
|
448
|
+
this.checkForCustomValue(query, this.fields);
|
|
449
|
+
this.isCustomRendered = true;
|
|
450
|
+
}
|
|
440
451
|
if (this.dataSource instanceof DataManager && this.mode === 'CheckBox' && this.allowFiltering) {
|
|
441
452
|
this.removeFocus();
|
|
442
453
|
}
|
|
@@ -458,7 +469,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
458
469
|
if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering &&
|
|
459
470
|
this.inputElement.value && this.inputElement.value !== '') {
|
|
460
471
|
this.checkForCustomValue(this.tempQuery, this.fields);
|
|
461
|
-
|
|
472
|
+
if (this.isCustomRendered) {
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
462
475
|
}
|
|
463
476
|
if (this.value && this.value.length && ((this.mode !== 'CheckBox' && !isNullOrUndefined(this.inputElement) && this.inputElement.value.trim() !== '') ||
|
|
464
477
|
this.mode === 'CheckBox' || ((this.keyCode === 8 || this.keyCode === 46) && this.allowFiltering &&
|
|
@@ -725,12 +738,12 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
725
738
|
};
|
|
726
739
|
MultiSelect.prototype.checkForCustomValue = function (query, fields) {
|
|
727
740
|
var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
|
|
741
|
+
var field = fields ? fields : this.fields;
|
|
728
742
|
if (this.allowCustomValue && dataChecks) {
|
|
729
743
|
var value = this.inputElement.value;
|
|
730
|
-
var field = fields ? fields : this.fields;
|
|
731
744
|
var customData = (!isNullOrUndefined(this.mainData) && this.mainData.length > 0) ?
|
|
732
745
|
this.mainData[0] : this.mainData;
|
|
733
|
-
if (typeof (customData) !== 'string' && typeof (customData) !== 'number' && typeof (customData) !== 'boolean') {
|
|
746
|
+
if (customData && typeof (customData) !== 'string' && typeof (customData) !== 'number' && typeof (customData) !== 'boolean') {
|
|
734
747
|
var dataItem = {};
|
|
735
748
|
setValue(field.text, value, dataItem);
|
|
736
749
|
if (typeof getValue((this.fields.value ? this.fields.value : 'value'), customData)
|
|
@@ -744,7 +757,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
744
757
|
tempData.splice(0, 0, dataItem);
|
|
745
758
|
this.resetList(tempData, field, query);
|
|
746
759
|
}
|
|
747
|
-
else {
|
|
760
|
+
else if (this.listData) {
|
|
748
761
|
var tempData = JSON.parse(JSON.stringify(this.listData));
|
|
749
762
|
tempData.splice(0, 0, this.inputElement.value);
|
|
750
763
|
tempData[0] = (typeof customData === 'number' && !isNaN(parseFloat(tempData[0]))) ?
|
|
@@ -754,6 +767,19 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
754
767
|
this.resetList(tempData, field);
|
|
755
768
|
}
|
|
756
769
|
}
|
|
770
|
+
else if (this.listData && this.mainData && !dataChecks && this.allowCustomValue) {
|
|
771
|
+
if (this.allowFiltering && this.isRemoteSelection && this.remoteCustomValue) {
|
|
772
|
+
this.isRemoteSelection = false;
|
|
773
|
+
this.resetList(this.listData, field, query);
|
|
774
|
+
}
|
|
775
|
+
else if (!this.allowFiltering && this.list) {
|
|
776
|
+
var liCollections = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-hide-listitem)');
|
|
777
|
+
var activeElement = Search(this.targetElement(), liCollections, 'StartsWith', this.ignoreCase);
|
|
778
|
+
if (activeElement && activeElement.item !== null) {
|
|
779
|
+
this.addListFocus(activeElement.item);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
757
783
|
if (this.value && this.value.length) {
|
|
758
784
|
this.refreshSelection();
|
|
759
785
|
}
|
|
@@ -2381,6 +2407,9 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2381
2407
|
else {
|
|
2382
2408
|
var text = this.targetElement();
|
|
2383
2409
|
if (this.allowFiltering) {
|
|
2410
|
+
if (this.allowCustomValue) {
|
|
2411
|
+
this.isRemoteSelection = true;
|
|
2412
|
+
}
|
|
2384
2413
|
var eventArgs_1 = {
|
|
2385
2414
|
preventDefaultAction: false,
|
|
2386
2415
|
text: this.targetElement(),
|
|
@@ -2406,7 +2435,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2406
2435
|
}
|
|
2407
2436
|
else if (this.allowCustomValue) {
|
|
2408
2437
|
var query = new Query();
|
|
2409
|
-
query = (text !== '') ? query.where(this.fields.text, 'startswith', text, this.ignoreCase, this.ignoreAccent) : query;
|
|
2438
|
+
query = this.allowFiltering && (text !== '') ? query.where(this.fields.text, 'startswith', text, this.ignoreCase, this.ignoreAccent) : query;
|
|
2410
2439
|
this.dataUpdater(this.mainData, query, this.fields);
|
|
2411
2440
|
}
|
|
2412
2441
|
else {
|
|
@@ -2448,6 +2477,8 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2448
2477
|
this.focused = true;
|
|
2449
2478
|
this.initial = true;
|
|
2450
2479
|
this.backCommand = true;
|
|
2480
|
+
this.isCustomRendered = false;
|
|
2481
|
+
this.isRemoteSelection = false;
|
|
2451
2482
|
};
|
|
2452
2483
|
MultiSelect.prototype.updateData = function (delimiterChar, e) {
|
|
2453
2484
|
var data = '';
|
|
@@ -2490,7 +2521,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2490
2521
|
if (delim) {
|
|
2491
2522
|
this.updateWrapperText(this.delimiterWrapper, data);
|
|
2492
2523
|
this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
|
|
2493
|
-
this.inputElement.setAttribute('aria-
|
|
2524
|
+
this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
|
|
2494
2525
|
}
|
|
2495
2526
|
var targetEle = e && e.target;
|
|
2496
2527
|
var isClearAll = (targetEle && targetEle.classList.contains('e-close-hooker')) ? true : null;
|
|
@@ -3464,7 +3495,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3464
3495
|
this.hiddenElement.innerHTML = hiddenValue;
|
|
3465
3496
|
this.updateWrapperText(this.delimiterWrapper, wrapperText);
|
|
3466
3497
|
this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));
|
|
3467
|
-
this.inputElement.setAttribute('aria-
|
|
3498
|
+
this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);
|
|
3468
3499
|
this.setProperties({ text: text.toString() }, true);
|
|
3469
3500
|
this.refreshInputHight();
|
|
3470
3501
|
this.refreshPlaceHolder();
|
|
@@ -3980,7 +4011,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
3980
4011
|
}
|
|
3981
4012
|
});
|
|
3982
4013
|
if (this.mode === 'Default' || this.mode === 'Box') {
|
|
3983
|
-
this.inputElement.setAttribute('aria-
|
|
4014
|
+
this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
|
|
3984
4015
|
}
|
|
3985
4016
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
3986
4017
|
this.element.style.display = 'none';
|
|
@@ -4229,7 +4260,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
4229
4260
|
Property(true)
|
|
4230
4261
|
], MultiSelect.prototype, "enabled", void 0);
|
|
4231
4262
|
__decorate([
|
|
4232
|
-
Property(
|
|
4263
|
+
Property(true)
|
|
4233
4264
|
], MultiSelect.prototype, "enableHtmlSanitizer", void 0);
|
|
4234
4265
|
__decorate([
|
|
4235
4266
|
Property([])
|