@syncfusion/ej2-dropdowns 21.2.6 → 21.2.10
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 +47 -3
- 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 +62 -29
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +62 -29
- 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/drop-down-base/drop-down-base.js +3 -0
- package/src/drop-down-list/drop-down-list.d.ts +0 -1
- package/src/drop-down-list/drop-down-list.js +9 -14
- package/src/list-box/list-box.d.ts +1 -0
- package/src/list-box/list-box.js +38 -2
- package/src/mention/mention.js +1 -1
- package/src/multi-select/multi-select-model.d.ts +1 -1
- package/src/multi-select/multi-select.js +11 -12
- package/styles/bootstrap-dark.css +207 -99
- package/styles/bootstrap.css +209 -100
- package/styles/bootstrap4.css +209 -100
- package/styles/bootstrap5-dark.css +207 -99
- package/styles/bootstrap5.css +207 -99
- package/styles/fabric-dark.css +207 -99
- package/styles/fabric.css +209 -100
- package/styles/fluent-dark.css +209 -100
- package/styles/fluent.css +209 -100
- package/styles/highcontrast-light.css +207 -99
- package/styles/highcontrast.css +209 -100
- package/styles/list-box/_layout.scss +8 -2
- package/styles/list-box/_theme.scss +2 -1
- package/styles/list-box/bootstrap-dark.css +207 -99
- package/styles/list-box/bootstrap.css +209 -100
- package/styles/list-box/bootstrap4.css +209 -100
- package/styles/list-box/bootstrap5-dark.css +207 -99
- package/styles/list-box/bootstrap5.css +207 -99
- package/styles/list-box/fabric-dark.css +207 -99
- package/styles/list-box/fabric.css +209 -100
- package/styles/list-box/fluent-dark.css +209 -100
- package/styles/list-box/fluent.css +209 -100
- package/styles/list-box/highcontrast-light.css +207 -99
- package/styles/list-box/highcontrast.css +209 -100
- package/styles/list-box/material-dark.css +207 -99
- package/styles/list-box/material.css +209 -100
- package/styles/list-box/tailwind-dark.css +209 -100
- package/styles/list-box/tailwind.css +209 -100
- package/styles/material-dark.css +207 -99
- package/styles/material.css +209 -100
- package/styles/tailwind-dark.css +209 -100
- package/styles/tailwind.css +209 -100
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.2.
|
|
3
|
+
* version : 21.2.10
|
|
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@21.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-dropdowns@21.2.8",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-vA6PaPiAP2ql4GITUbDTJWRB7BJG90oDPUbuvykJiX56rbACzgi1Zdt5xtbcE5S8SLa4NcYOzXfq2RRjC8bK3w==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-dropdowns",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"/@syncfusion/ej2-spreadsheet",
|
|
35
35
|
"/@syncfusion/ej2-vue-dropdowns"
|
|
36
36
|
],
|
|
37
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-21.2.
|
|
38
|
-
"_shasum": "
|
|
37
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-21.2.8.tgz",
|
|
38
|
+
"_shasum": "84d90cc60579208255733b85609302961579335d",
|
|
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": "~21.2.
|
|
47
|
-
"@syncfusion/ej2-data": "~21.2.
|
|
48
|
-
"@syncfusion/ej2-inputs": "~21.2.
|
|
49
|
-
"@syncfusion/ej2-lists": "~21.2.
|
|
50
|
-
"@syncfusion/ej2-navigations": "~21.2.
|
|
51
|
-
"@syncfusion/ej2-popups": "~21.2.
|
|
46
|
+
"@syncfusion/ej2-base": "~21.2.9",
|
|
47
|
+
"@syncfusion/ej2-data": "~21.2.9",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~21.2.9",
|
|
49
|
+
"@syncfusion/ej2-lists": "~21.2.9",
|
|
50
|
+
"@syncfusion/ej2-navigations": "~21.2.9",
|
|
51
|
+
"@syncfusion/ej2-popups": "~21.2.10"
|
|
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": "21.2.
|
|
76
|
+
"version": "21.2.10",
|
|
77
77
|
"sideEffects": false,
|
|
78
78
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
79
79
|
}
|
|
@@ -1180,6 +1180,9 @@ var DropDownBase = /** @class */ (function (_super) {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
+
if (this.getModuleName() === 'listbox' && this.isReact) {
|
|
1184
|
+
this.renderReactTemplates();
|
|
1185
|
+
}
|
|
1183
1186
|
if (selectedItemValue || itemIndex === 0) {
|
|
1184
1187
|
this.updateSelection();
|
|
1185
1188
|
}
|
|
@@ -105,7 +105,6 @@ export declare class DropDownList extends DropDownBase implements IInput {
|
|
|
105
105
|
protected preventChange: boolean;
|
|
106
106
|
protected isAngular: boolean;
|
|
107
107
|
protected selectedElementID: string;
|
|
108
|
-
private isEventCancel;
|
|
109
108
|
/**
|
|
110
109
|
* Sets CSS classes to the root element of the component that allows customization of appearance.
|
|
111
110
|
*
|
|
@@ -925,7 +925,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
925
925
|
this.removeSelection();
|
|
926
926
|
li.classList.add(dropDownBaseClasses.selected);
|
|
927
927
|
this.removeHover();
|
|
928
|
-
var value = this.getFormattedValue(li.getAttribute('data-value'));
|
|
928
|
+
var value = li.getAttribute('data-value') !== "null" ? this.getFormattedValue(li.getAttribute('data-value')) : null;
|
|
929
929
|
var selectedData = this.getDataByValue(value);
|
|
930
930
|
if (!this.initial && !preventSelect && !isNullOrUndefined(e)) {
|
|
931
931
|
var items = this.detachChanges(selectedData);
|
|
@@ -1041,7 +1041,9 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
if (Browser.info.name !== 'mozilla') {
|
|
1043
1043
|
if (this.targetElement()) {
|
|
1044
|
-
|
|
1044
|
+
if (this.getModuleName() !== 'combobox') {
|
|
1045
|
+
attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
|
|
1046
|
+
}
|
|
1045
1047
|
this.targetElement().removeAttribute('aria-live');
|
|
1046
1048
|
}
|
|
1047
1049
|
}
|
|
@@ -1094,9 +1096,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1094
1096
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1095
1097
|
var valueCompTemp = compiledString(this.itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, this.valueTempElement);
|
|
1096
1098
|
if (valueCompTemp && valueCompTemp.length > 0) {
|
|
1097
|
-
|
|
1098
|
-
this.valueTempElement.appendChild(valueCompTemp[i]);
|
|
1099
|
-
}
|
|
1099
|
+
append(valueCompTemp, this.valueTempElement);
|
|
1100
1100
|
}
|
|
1101
1101
|
this.renderReactTemplates();
|
|
1102
1102
|
};
|
|
@@ -1823,7 +1823,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
},
|
|
1825
1825
|
open: function () {
|
|
1826
|
-
EventHandler.remove(document, 'mousedown', _this.onDocumentClick);
|
|
1827
1826
|
EventHandler.add(document, 'mousedown', _this.onDocumentClick, _this);
|
|
1828
1827
|
_this.isPopupOpen = true;
|
|
1829
1828
|
var actionList = _this.actionCompleteData && _this.actionCompleteData.ulElement &&
|
|
@@ -2003,9 +2002,10 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2003
2002
|
DropDownList.prototype.closePopup = function (delay, e) {
|
|
2004
2003
|
var _this = this;
|
|
2005
2004
|
this.isTyped = false;
|
|
2006
|
-
if (!(this.popupObj && document.body.contains(this.popupObj.element) &&
|
|
2005
|
+
if (!(this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen)) {
|
|
2007
2006
|
return;
|
|
2008
2007
|
}
|
|
2008
|
+
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
2009
2009
|
this.isActive = false;
|
|
2010
2010
|
this.filterInputObj = null;
|
|
2011
2011
|
this.isDropDownClick = false;
|
|
@@ -2055,7 +2055,6 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2055
2055
|
var popupInstance = this.popupObj;
|
|
2056
2056
|
var eventArgs = { popup: popupInstance, cancel: false, animation: animModel, event: e || null };
|
|
2057
2057
|
this.trigger('close', eventArgs, function (eventArgs) {
|
|
2058
|
-
_this.isEventCancel = eventArgs.cancel;
|
|
2059
2058
|
if (!isNullOrUndefined(_this.popupObj) &&
|
|
2060
2059
|
!isNullOrUndefined(_this.popupObj.element.querySelector('.e-fixed-head'))) {
|
|
2061
2060
|
var fixedHeader = _this.popupObj.element.querySelector('.e-fixed-head');
|
|
@@ -2232,9 +2231,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2232
2231
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2233
2232
|
var footerCompTemp = compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate, null, this.footer);
|
|
2234
2233
|
if (footerCompTemp && footerCompTemp.length > 0) {
|
|
2235
|
-
|
|
2236
|
-
this.footer.appendChild(footerCompTemp[i]);
|
|
2237
|
-
}
|
|
2234
|
+
append(footerCompTemp, this.footer);
|
|
2238
2235
|
}
|
|
2239
2236
|
append([this.footer], popupEle);
|
|
2240
2237
|
};
|
|
@@ -2257,9 +2254,7 @@ var DropDownList = /** @class */ (function (_super) {
|
|
|
2257
2254
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2258
2255
|
var headerCompTemp = compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate, null, this.header);
|
|
2259
2256
|
if (headerCompTemp && headerCompTemp.length) {
|
|
2260
|
-
|
|
2261
|
-
this.header.appendChild(headerCompTemp[i]);
|
|
2262
|
-
}
|
|
2257
|
+
append(headerCompTemp, this.header);
|
|
2263
2258
|
}
|
|
2264
2259
|
var contentEle = popupEle.querySelector('div.e-content');
|
|
2265
2260
|
popupEle.insertBefore(this.header, contentEle);
|
|
@@ -132,6 +132,7 @@ export declare class ListBox extends DropDownBase {
|
|
|
132
132
|
private toolbarAction;
|
|
133
133
|
private isDataSourceUpdate;
|
|
134
134
|
private dragValue;
|
|
135
|
+
private customDraggedItem;
|
|
135
136
|
/**
|
|
136
137
|
* Sets the CSS classes to root element of this component, which helps to customize the
|
|
137
138
|
* complete styles.
|
package/src/list-box/list-box.js
CHANGED
|
@@ -472,6 +472,7 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
472
472
|
this.trigger('drag', this.getDragArgs(args));
|
|
473
473
|
};
|
|
474
474
|
ListBox.prototype.beforeDragEnd = function (args) {
|
|
475
|
+
var items = [];
|
|
475
476
|
this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
|
|
476
477
|
if (this.value.indexOf(this.dragValue) > -1) {
|
|
477
478
|
args.items = this.getDataByValues(this.value);
|
|
@@ -479,7 +480,11 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
479
480
|
else {
|
|
480
481
|
args.items = this.getDataByValues([this.dragValue]);
|
|
481
482
|
}
|
|
483
|
+
extend(items, args.items);
|
|
482
484
|
this.trigger('beforeDrop', args);
|
|
485
|
+
if (args.items !== items) {
|
|
486
|
+
this.customDraggedItem = args.items;
|
|
487
|
+
}
|
|
483
488
|
};
|
|
484
489
|
ListBox.prototype.dragEnd = function (args) {
|
|
485
490
|
var _this = this;
|
|
@@ -527,6 +532,12 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
527
532
|
liColl.splice(toIdx_1, 0, liColl.splice(rIdx, 1)[0]);
|
|
528
533
|
if (this.allowDragAll) {
|
|
529
534
|
selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
|
|
535
|
+
if (!isNullOrUndefined(this.customDraggedItem)) {
|
|
536
|
+
selectedOptions = [];
|
|
537
|
+
this.customDraggedItem.forEach(function (item) {
|
|
538
|
+
selectedOptions.push(getValue(_this.fields.value, item));
|
|
539
|
+
});
|
|
540
|
+
}
|
|
530
541
|
selectedOptions.forEach(function (value) {
|
|
531
542
|
if (value !== dropValue) {
|
|
532
543
|
var idx = listData.indexOf(_this.getDataByValue(value));
|
|
@@ -559,6 +570,12 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
559
570
|
sortedData = [].slice.call(listObj.sortedData);
|
|
560
571
|
selectedOptions = (this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll)
|
|
561
572
|
? this.value : [dropValue];
|
|
573
|
+
if (!isNullOrUndefined(this.customDraggedItem)) {
|
|
574
|
+
selectedOptions = [];
|
|
575
|
+
this.customDraggedItem.forEach(function (item) {
|
|
576
|
+
selectedOptions.push(getValue(_this.fields.value, item));
|
|
577
|
+
});
|
|
578
|
+
}
|
|
562
579
|
var fListData_1 = [].slice.call(this.listData);
|
|
563
580
|
var fSortData_1 = [].slice.call(this.sortedData);
|
|
564
581
|
selectedOptions.forEach(function (value, index) {
|
|
@@ -629,6 +646,9 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
629
646
|
var dragArgs1 = extend(destArgs, { currentData: listData });
|
|
630
647
|
dragArgs = extend(dragArgs, { destination: dragArgs1 });
|
|
631
648
|
}
|
|
649
|
+
if (!isNullOrUndefined(this.customDraggedItem)) {
|
|
650
|
+
dragArgs.items = this.customDraggedItem;
|
|
651
|
+
}
|
|
632
652
|
this.trigger('drop', dragArgs);
|
|
633
653
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
634
654
|
var liCollElem = dragArgs.elements;
|
|
@@ -744,6 +764,16 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
744
764
|
}
|
|
745
765
|
this.setSelection(items, state, !isValue);
|
|
746
766
|
this.updateSelectedOptions();
|
|
767
|
+
var selElems = [];
|
|
768
|
+
for (var i = 0; i < items.length; i++) {
|
|
769
|
+
var liColl = this.list.querySelectorAll('[aria-selected="true"]');
|
|
770
|
+
for (var j = 0; j < liColl.length; j++) {
|
|
771
|
+
if (items[i] === this.getFormattedValue(liColl[j].getAttribute('data-value'))) {
|
|
772
|
+
selElems.push(liColl[j]);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
this.triggerChange(selElems, null);
|
|
747
777
|
};
|
|
748
778
|
/**
|
|
749
779
|
* Based on the state parameter, entire list item will be selected/deselected.
|
|
@@ -1962,8 +1992,11 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1962
1992
|
}
|
|
1963
1993
|
if (typeof (text) === 'string') {
|
|
1964
1994
|
text = text.split('\\').join('\\\\');
|
|
1995
|
+
li = _this.list.querySelector('[data-value="' + text.replace(/"/g, '\\"') + '"]');
|
|
1996
|
+
}
|
|
1997
|
+
else {
|
|
1998
|
+
li = _this.list.querySelector('[data-value="' + text + '"]');
|
|
1965
1999
|
}
|
|
1966
|
-
li = _this.list.querySelector('[data-value="' + text + '"]');
|
|
1967
2000
|
if (li) {
|
|
1968
2001
|
if (_this.selectionSettings.showCheckbox) {
|
|
1969
2002
|
liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
|
|
@@ -1999,9 +2032,12 @@ var ListBox = /** @class */ (function (_super) {
|
|
|
1999
2032
|
ele.innerHTML = '';
|
|
2000
2033
|
if (this.value) {
|
|
2001
2034
|
for (var i = 0, len = this.value.length; i < len; i++) {
|
|
2002
|
-
innerHTML += '<option selected
|
|
2035
|
+
innerHTML += '<option selected>' + this.value[i] + '</option>';
|
|
2003
2036
|
}
|
|
2004
2037
|
ele.innerHTML += innerHTML;
|
|
2038
|
+
for (var i = 0, len = ele.childNodes.length; i < len; i++) {
|
|
2039
|
+
ele.childNodes[i].setAttribute('value', this.value[i].toString());
|
|
2040
|
+
}
|
|
2005
2041
|
}
|
|
2006
2042
|
this.checkSelectAll();
|
|
2007
2043
|
};
|
package/src/mention/mention.js
CHANGED
|
@@ -841,7 +841,7 @@ var Mention = /** @class */ (function (_super) {
|
|
|
841
841
|
var selectedNodePosition = this.getTriggerCharPosition();
|
|
842
842
|
globalRange = this.range;
|
|
843
843
|
range = document.createRange();
|
|
844
|
-
if (this.getTextRange() && this.getTextRange().lastIndexOf(this.mentionChar) !== -1
|
|
844
|
+
if (this.getTextRange() && this.getTextRange().lastIndexOf(this.mentionChar) !== -1) {
|
|
845
845
|
range.setStart(globalRange.startContainer, selectedNodePosition);
|
|
846
846
|
range.setEnd(globalRange.startContainer, selectedNodePosition);
|
|
847
847
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';import { EventHandler, Property, Event, compile, L10n, EmitType, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, prepend, Complex } from '@syncfusion/ej2-base';import { Search } from '../common/incremental-search';import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined, ModuleDeclaration } from '@syncfusion/ej2-base';import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
|
|
1
|
+
import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';import { EventHandler, Property, Event, compile, L10n, EmitType, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, prepend, Complex } from '@syncfusion/ej2-base';import { Search } from '../common/incremental-search';import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined, ModuleDeclaration } from '@syncfusion/ej2-base';import { DataManager, Query, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
|
|
2
2
|
import {visualMode,MultiSelectChangeEventArgs,RemoveEventArgs,ISelectAllEventArgs,TaggingEventArgs,CustomValueEventArgs} from "./multi-select";
|
|
3
3
|
import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
|
|
4
4
|
|
|
@@ -30,7 +30,7 @@ import { Animation, Browser, prepend, Complex } from '@syncfusion/ej2-base';
|
|
|
30
30
|
import { Search } from '../common/incremental-search';
|
|
31
31
|
import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';
|
|
32
32
|
import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base';
|
|
33
|
-
import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';
|
|
33
|
+
import { DataManager, Query, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';
|
|
34
34
|
import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
|
|
35
35
|
var FOCUS = 'e-input-focus';
|
|
36
36
|
var DISABLED = 'e-disabled';
|
|
@@ -398,7 +398,12 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
398
398
|
predicate = predicate.or(field, 'equal', valuecheck[i]);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
|
|
401
|
+
if (this.dataSource instanceof DataManager && this.dataSource.adaptor instanceof JsonAdaptor) {
|
|
402
|
+
return new Query().where(predicate);
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
return this.getQuery(this.query).clone().where(predicate);
|
|
406
|
+
}
|
|
402
407
|
};
|
|
403
408
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
404
409
|
MultiSelect.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
|
|
@@ -417,7 +422,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
417
422
|
}
|
|
418
423
|
}
|
|
419
424
|
var valuecheck = [];
|
|
420
|
-
if (!isNullOrUndefined(this.value)
|
|
425
|
+
if (!isNullOrUndefined(this.value)) {
|
|
421
426
|
valuecheck = this.presentItemValue(this.ulElement);
|
|
422
427
|
}
|
|
423
428
|
if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
|
|
@@ -1932,9 +1937,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
1932
1937
|
// eslint-disable-next-line
|
|
1933
1938
|
var valueCompTemp = compiledString(itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, chipContent);
|
|
1934
1939
|
if (valueCompTemp && valueCompTemp.length > 0) {
|
|
1935
|
-
|
|
1936
|
-
chipContent.appendChild(valueCompTemp[i]);
|
|
1937
|
-
}
|
|
1940
|
+
append(valueCompTemp, chipContent);
|
|
1938
1941
|
}
|
|
1939
1942
|
this.renderReactTemplates();
|
|
1940
1943
|
}
|
|
@@ -2138,9 +2141,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2138
2141
|
// eslint-disable-next-line
|
|
2139
2142
|
var elements = compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate, null, this.header);
|
|
2140
2143
|
if (elements && elements.length > 0) {
|
|
2141
|
-
|
|
2142
|
-
this.header.appendChild(elements[temp]);
|
|
2143
|
-
}
|
|
2144
|
+
append(elements, this.header);
|
|
2144
2145
|
}
|
|
2145
2146
|
if (this.mode === 'CheckBox' && this.showSelectAll) {
|
|
2146
2147
|
prepend([this.header], this.popupWrapper);
|
|
@@ -2167,9 +2168,7 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
|
2167
2168
|
// eslint-disable-next-line
|
|
2168
2169
|
var elements = compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate, null, this.footer);
|
|
2169
2170
|
if (elements && elements.length > 0) {
|
|
2170
|
-
|
|
2171
|
-
this.footer.appendChild(elements[temp]);
|
|
2172
|
-
}
|
|
2171
|
+
append(elements, this.footer);
|
|
2173
2172
|
}
|
|
2174
2173
|
append([this.footer], this.popupWrapper);
|
|
2175
2174
|
EventHandler.add(this.footer, 'mousedown', this.onListMouseDown, this);
|