@syncfusion/ej2-dropdowns 19.3.48 → 19.4.38

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +1 -1
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +123 -42
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +125 -42
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/combo-box/combo-box.js +2 -2
  14. package/src/common/incremental-search.d.ts +1 -1
  15. package/src/common/incremental-search.js +1 -1
  16. package/src/drop-down-base/drop-down-base.js +17 -0
  17. package/src/drop-down-list/drop-down-list.js +1 -1
  18. package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
  19. package/src/drop-down-tree/drop-down-tree.js +21 -6
  20. package/src/list-box/list-box.d.ts +0 -4
  21. package/src/list-box/list-box.js +0 -3
  22. package/src/multi-select/checkbox-selection.js +1 -1
  23. package/src/multi-select/multi-select-model.d.ts +10 -1
  24. package/src/multi-select/multi-select.d.ts +10 -0
  25. package/src/multi-select/multi-select.js +82 -28
  26. package/styles/auto-complete/_fluent-definition.scss +2 -0
  27. package/styles/bootstrap5-dark.css +12 -5
  28. package/styles/bootstrap5.css +12 -5
  29. package/styles/combo-box/_fluent-definition.scss +2 -0
  30. package/styles/drop-down-base/_fluent-definition.scss +109 -0
  31. package/styles/drop-down-list/_fluent-definition.scss +193 -0
  32. package/styles/drop-down-list/icons/_bootstrap5.scss +0 -1
  33. package/styles/drop-down-list/icons/_fluent.scss +14 -0
  34. package/styles/drop-down-tree/_bootstrap5-definition.scss +59 -58
  35. package/styles/drop-down-tree/_fluent-definition.scss +71 -0
  36. package/styles/drop-down-tree/_layout.scss +12 -4
  37. package/styles/drop-down-tree/_tailwind-definition.scss +1 -0
  38. package/styles/drop-down-tree/bootstrap5-dark.css +11 -4
  39. package/styles/drop-down-tree/bootstrap5.css +11 -4
  40. package/styles/drop-down-tree/icons/_bootstrap5.scss +11 -11
  41. package/styles/drop-down-tree/icons/_fluent.scss +11 -0
  42. package/styles/drop-down-tree/icons/_tailwind-dark.scss +11 -11
  43. package/styles/drop-down-tree/tailwind-dark.css +1 -0
  44. package/styles/drop-down-tree/tailwind.css +1 -0
  45. package/styles/list-box/_bootstrap5-definition.scss +2 -2
  46. package/styles/list-box/_fluent-definition.scss +115 -0
  47. package/styles/list-box/_layout.scss +1 -6
  48. package/styles/list-box/bootstrap5-dark.css +1 -1
  49. package/styles/list-box/bootstrap5.css +1 -1
  50. package/styles/list-box/icons/_fluent.scss +25 -0
  51. package/styles/list-box/icons/_tailwind-dark.scss +2 -2
  52. package/styles/list-box/tailwind-dark.css +3 -3
  53. package/styles/list-box/tailwind.css +1 -1
  54. package/styles/material-dark.css +0 -94
  55. package/styles/material.css +0 -94
  56. package/styles/multi-select/_fluent-definition.scss +214 -0
  57. package/styles/multi-select/_layout.scss +0 -116
  58. package/styles/multi-select/_material-dark-definition.scss +0 -22
  59. package/styles/multi-select/_material-definition.scss +0 -22
  60. package/styles/multi-select/icons/_fluent.scss +27 -0
  61. package/styles/multi-select/material-dark.css +0 -94
  62. package/styles/multi-select/material.css +0 -94
  63. package/styles/tailwind-dark.css +4 -3
  64. package/styles/tailwind.css +2 -1
  65. package/styles/_all.scss +0 -3
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.3.48
3
+ * version : 19.4.38
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@19.3.47",
3
+ "_id": "@syncfusion/ej2-dropdowns@18.34.12",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-80BHmVskObNOXm5mfDPntsER6/i+RQ6fpuov+/D4vOu/709QxiT//IUbVDa5THRYsb1PtL16Wyi+exLRsTdO0w==",
5
+ "_integrity": "sha512-GpZ9oh7UZXwnybsQmiiBdwawlGvjrvCBIG0qtHQ5La0zjOsOKVIYPk3Lu+CvXwLu3FuxLXFCfy5JiBA/AA9WAg==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -33,8 +33,8 @@
33
33
  "/@syncfusion/ej2-spreadsheet",
34
34
  "/@syncfusion/ej2-vue-dropdowns"
35
35
  ],
36
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-19.3.47.tgz",
37
- "_shasum": "695e0edaacca56306c171fb36cd82230e468ee67",
36
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-18.34.12.tgz",
37
+ "_shasum": "0c4856ee2b4172eae286c065c85c47e0ee581236",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
40
40
  "author": {
@@ -42,12 +42,12 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~19.3.47",
46
- "@syncfusion/ej2-data": "~19.3.47",
47
- "@syncfusion/ej2-inputs": "~19.3.48",
48
- "@syncfusion/ej2-lists": "~19.3.48",
49
- "@syncfusion/ej2-navigations": "~19.3.46",
50
- "@syncfusion/ej2-popups": "~19.3.47"
45
+ "@syncfusion/ej2-base": "~19.4.38",
46
+ "@syncfusion/ej2-data": "~19.4.38",
47
+ "@syncfusion/ej2-inputs": "~19.4.38",
48
+ "@syncfusion/ej2-lists": "~19.4.38",
49
+ "@syncfusion/ej2-navigations": "~19.4.38",
50
+ "@syncfusion/ej2-popups": "~19.4.38"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,6 +72,6 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "19.3.48",
75
+ "version": "19.4.38",
76
76
  "sideEffects": false
77
77
  }
@@ -234,7 +234,7 @@ var ComboBox = /** @class */ (function (_super) {
234
234
  if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) &&
235
235
  !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
236
236
  var inputValue = this.inputElement.value;
237
- var activeItem = Search(inputValue, this.liCollections, 'StartsWith', true);
237
+ var activeItem = Search(inputValue, this.liCollections, this.filterType, true);
238
238
  var activeElement = activeItem.item;
239
239
  if (!isNullOrUndefined(activeElement)) {
240
240
  var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
@@ -391,7 +391,7 @@ var ComboBox = /** @class */ (function (_super) {
391
391
  else {
392
392
  this.activeIndex = null;
393
393
  this.removeSelection();
394
- if (this.liCollections && this.liCollections.length < 0) {
394
+ if (this.liCollections && this.liCollections.length > 0 && !this.isCustomFilter) {
395
395
  this.removeFocus();
396
396
  }
397
397
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * IncrementalSearch module file
3
3
  */
4
- export declare type SearchType = 'StartsWith' | 'Equal';
4
+ export declare type SearchType = 'StartsWith' | 'Equal' | 'EndsWith' | 'Contains';
5
5
  /**
6
6
  * Search and focus the list item based on key code matches with list text content
7
7
  *
@@ -83,7 +83,7 @@ export function Search(inputVal, items, searchType, ignoreCase) {
83
83
  for (var i = 0, itemsData = listItems; i < itemsData.length; i++) {
84
84
  var item = itemsData[i];
85
85
  var text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, '');
86
- if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr)) {
86
+ if ((searchType === 'Equal' && text === queryStr) || (searchType === 'StartsWith' && text.substr(0, strLength) === queryStr) || (searchType === 'EndsWith' && text.substr(text.length - queryStr.length) === queryStr) || (searchType === 'Contains' && new RegExp(queryStr, "g").test(text))) {
87
87
  itemData.item = item;
88
88
  itemData.index = i;
89
89
  return { item: item, index: i };
@@ -492,6 +492,11 @@ var DropDownBase = /** @class */ (function (_super) {
492
492
  _this.renderGroupTemplate(ulElement);
493
493
  }
494
494
  _this.bindChildItems(localDataArgs.result, ulElement, fields);
495
+ setTimeout(function () {
496
+ if (_this.getModuleName() === 'multiselect' && _this.itemTemplate != null && (ulElement.childElementCount > 0 && ulElement.children[0].childElementCount > 0)) {
497
+ _this.updateDataList();
498
+ }
499
+ });
495
500
  }
496
501
  });
497
502
  }
@@ -623,10 +628,22 @@ var DropDownBase = /** @class */ (function (_super) {
623
628
  var groupValue = select(this.groupTemplate, document).innerHTML.trim();
624
629
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
625
630
  var tempHeaders = ListBase.renderGroupTemplate(groupValue, dataSource, this.fields.properties, headerItems, option, this);
631
+ //EJ2-55168- Group checkbox is not working with group template
632
+ if (this.isGroupChecking) {
633
+ for (var i = 0; i < tempHeaders.length; i++) {
634
+ this.notify('addItem', { module: 'CheckBoxSelection', item: tempHeaders[i] });
635
+ }
636
+ }
626
637
  }
627
638
  else {
628
639
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
629
640
  var tempHeaders = ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems, option, this);
641
+ //EJ2-55168- Group checkbox is not working with group template
642
+ if (this.isGroupChecking) {
643
+ for (var i = 0; i < tempHeaders.length; i++) {
644
+ this.notify('addItem', { module: 'CheckBoxSelection', item: tempHeaders[i] });
645
+ }
646
+ }
630
647
  }
631
648
  this.renderReactTemplates();
632
649
  }
@@ -703,7 +703,7 @@ var DropDownList = /** @class */ (function (_super) {
703
703
  if (this.isSelectFocusItem(focusEle)) {
704
704
  this.setSelection(focusEle, e);
705
705
  }
706
- else {
706
+ else if (!isNullOrUndefined(this.liCollections)) {
707
707
  var index = e.action === 'down' ? this.activeIndex + 1 : this.activeIndex - 1;
708
708
  var startIndex = 0;
709
709
  if (this.getModuleName() === 'autocomplete') {
@@ -282,6 +282,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
282
282
  private filterDelayTime;
283
283
  private nestedTableUpdate;
284
284
  private clearIconWidth;
285
+ private isClicked;
285
286
  /**
286
287
  * Specifies the template that renders to the popup list content of the
287
288
  * Dropdown Tree component when the data fetch request from the remote server fails.
@@ -164,6 +164,7 @@ var DropDownTree = /** @class */ (function (_super) {
164
164
  // eslint-disable-next-line
165
165
  _this.selectedData = [];
166
166
  _this.filterDelayTime = 300;
167
+ _this.isClicked = false;
167
168
  return _this;
168
169
  }
169
170
  /**
@@ -1135,8 +1136,10 @@ var DropDownTree = /** @class */ (function (_super) {
1135
1136
  }
1136
1137
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP);
1137
1138
  if (!isNOU(this.checkWrapper)) {
1139
+ this.isClicked = true;
1138
1140
  var checkElement = select('.' + CHECKBOXFRAME, this.checkWrapper);
1139
1141
  this.changeState(this.checkWrapper, checkElement.classList.contains(CHECK) ? 'uncheck' : 'check', e);
1142
+ this.isClicked = false;
1140
1143
  }
1141
1144
  e.preventDefault();
1142
1145
  };
@@ -1358,6 +1361,7 @@ var DropDownTree = /** @class */ (function (_super) {
1358
1361
  }
1359
1362
  };
1360
1363
  DropDownTree.prototype.setValidValue = function () {
1364
+ var _this = this;
1361
1365
  if (!this.showCheckBox && !this.allowMultiSelection) {
1362
1366
  Input.setValue(this.text, this.inputEle, this.floatLabelType);
1363
1367
  var id = this.value[0].toString();
@@ -1367,9 +1371,14 @@ var DropDownTree = /** @class */ (function (_super) {
1367
1371
  }
1368
1372
  else {
1369
1373
  if (this.showCheckBox) {
1370
- this.treeObj.checkedNodes = this.value.slice();
1371
- this.treeObj.dataBind();
1372
- this.setMultiSelect();
1374
+ var difference = this.value.filter(function (e) {
1375
+ return _this.treeObj.checkedNodes.indexOf(e) === -1;
1376
+ });
1377
+ if (difference.length > 0 || this.treeSettings.autoCheck) {
1378
+ this.treeObj.checkedNodes = this.value.slice();
1379
+ this.treeObj.dataBind();
1380
+ this.setMultiSelect();
1381
+ }
1373
1382
  }
1374
1383
  else {
1375
1384
  this.treeObj.selectedNodes = this.value.slice();
@@ -1835,7 +1844,7 @@ var DropDownTree = /** @class */ (function (_super) {
1835
1844
  }
1836
1845
  var eventArgs = {
1837
1846
  action: this.showCheckBox ? state : args.action,
1838
- isInteracted: args.isInteracted,
1847
+ isInteracted: this.isClicked ? true : args.isInteracted,
1839
1848
  item: args.node,
1840
1849
  itemData: this.showCheckBox ? checkData[0] : selectData
1841
1850
  };
@@ -1906,6 +1915,7 @@ var DropDownTree = /** @class */ (function (_super) {
1906
1915
  }
1907
1916
  var target = args.event.target;
1908
1917
  if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
1918
+ this.isClicked = true;
1909
1919
  // eslint-disable-next-line
1910
1920
  var getNodeDetails = this.treeObj.getNode(args.node);
1911
1921
  if (getNodeDetails.isChecked === 'true') {
@@ -1914,6 +1924,7 @@ var DropDownTree = /** @class */ (function (_super) {
1914
1924
  else {
1915
1925
  this.treeObj.checkAll([args.node]);
1916
1926
  }
1927
+ this.isClicked = false;
1917
1928
  this.setMultiSelect();
1918
1929
  this.ensurePlaceHolder();
1919
1930
  }
@@ -2406,6 +2417,9 @@ var DropDownTree = /** @class */ (function (_super) {
2406
2417
  this.ensurePlaceHolder();
2407
2418
  };
2408
2419
  DropDownTree.prototype.resetValue = function (isDynamicChange) {
2420
+ if (this.value == [] && this.text == null) {
2421
+ return;
2422
+ }
2409
2423
  Input.setValue(null, this.inputEle, this.floatLabelType);
2410
2424
  if (!isDynamicChange) {
2411
2425
  this.oldValue = this.value;
@@ -2417,7 +2431,8 @@ var DropDownTree = /** @class */ (function (_super) {
2417
2431
  setValue('selectedNodes', [], this.treeObj);
2418
2432
  this.hiddenElement.innerHTML = '';
2419
2433
  if (this.showCheckBox) {
2420
- this.treeObj.uncheckAll();
2434
+ this.treeObj.checkedNodes = [];
2435
+ this.treeObj.dataBind();
2421
2436
  this.setMultiSelect();
2422
2437
  this.clearCheckAll();
2423
2438
  }
@@ -2795,8 +2810,8 @@ var DropDownTree = /** @class */ (function (_super) {
2795
2810
  this.updateTemplate();
2796
2811
  }
2797
2812
  this.treeObj.sortOrder = newProp.sortOrder;
2798
- this.updateValue(this.value);
2799
2813
  this.treeObj.dataBind();
2814
+ this.updateValue(this.value);
2800
2815
  break;
2801
2816
  case 'showDropDownIcon':
2802
2817
  this.updateDropDownIconState(newProp.showDropDownIcon);
@@ -678,10 +678,6 @@ export interface DropEventArgs {
678
678
  * Illustrates whether the current action needs to be prevented or not.
679
679
  */
680
680
  cancel?: boolean;
681
- /**
682
- * Illustrates whether the drag all action needs to be prevented or not.
683
- */
684
- isDragAll?: boolean | null;
685
681
  /**
686
682
  * Returns the selected list items.
687
683
  */
@@ -438,9 +438,6 @@ var ListBox = /** @class */ (function (_super) {
438
438
  args.items = this.getDataByValues([dragValue]);
439
439
  }
440
440
  this.trigger('beforeDrop', args);
441
- if (args.isDragAll !== null) {
442
- this.allowDragAll = args.isDragAll;
443
- }
444
441
  };
445
442
  ListBox.prototype.dragEnd = function (args) {
446
443
  var _this = this;
@@ -148,7 +148,7 @@ var CheckBoxSelection = /** @class */ (function () {
148
148
  }
149
149
  if (this.parent.list.classList.contains('e-nodata') || (this.parent.listData && this.parent.listData.length <= 1 &&
150
150
  !(this.parent.isDynamicDataChange)) || (this.parent.isDynamicDataChange &&
151
- !isNullOrUndefined(this.parent.value) && this.parent.value.length <= 1)) {
151
+ this.parent.listData && this.parent.listData.length <= 1)) {
152
152
  this.checkAllParent.style.display = 'none';
153
153
  }
154
154
  else {
@@ -1,4 +1,4 @@
1
- import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings } 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 } 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 } 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';
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
 
@@ -443,6 +443,15 @@ export interface MultiSelectModel extends DropDownBaseModel{
443
443
  */
444
444
  openOnClick?: boolean;
445
445
 
446
+ /**
447
+ * By default, the typed value is converting into chip or update as value of the component when you press the enter key or select from the popup.
448
+ * If you want to convert the typed value into chip or update as value of the component while focusing out the component, then enable this property.
449
+ * If custom value is enabled, both custom value and value present in the list are converted into tag while focusing out the component; Otherwise, value present in the list is converted into tag while focusing out the component.
450
+ *
451
+ * @default false
452
+ */
453
+ addTagOnBlur?: boolean;
454
+
446
455
  /**
447
456
  * Fires each time when selection changes happened in list items after model and input value get affected.
448
457
  *
@@ -440,6 +440,14 @@ export declare class MultiSelect extends DropDownBase implements IInput {
440
440
  * @default true
441
441
  */
442
442
  openOnClick: boolean;
443
+ /**
444
+ * By default, the typed value is converting into chip or update as value of the component when you press the enter key or select from the popup.
445
+ * If you want to convert the typed value into chip or update as value of the component while focusing out the component, then enable this property.
446
+ * If custom value is enabled, both custom value and value present in the list are converted into tag while focusing out the component; Otherwise, value present in the list is converted into tag while focusing out the component.
447
+ *
448
+ * @default false
449
+ */
450
+ addTagOnBlur: boolean;
443
451
  /**
444
452
  * Fires each time when selection changes happened in list items after model and input value get affected.
445
453
  *
@@ -787,6 +795,8 @@ export declare class MultiSelect extends DropDownBase implements IInput {
787
795
  */
788
796
  onPropertyChanged(newProp: MultiSelectModel, oldProp: MultiSelectModel): void;
789
797
  private reInitializePoup;
798
+ private presentItemValue;
799
+ private addNonPresentItems;
790
800
  private updateVal;
791
801
  /**
792
802
  * Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,
@@ -421,7 +421,7 @@ var MultiSelect = /** @class */ (function (_super) {
421
421
  this.mainData = list;
422
422
  this.mainListCollection = this.liCollections;
423
423
  }
424
- else if (!isNullOrUndefined(this.mainData) && this.mainData.length === 0) {
424
+ else if (isNullOrUndefined(this.mainData) || this.mainData.length === 0) {
425
425
  this.mainData = list;
426
426
  }
427
427
  if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering &&
@@ -815,6 +815,18 @@ var MultiSelect = /** @class */ (function (_super) {
815
815
  }
816
816
  this.inputFocus = false;
817
817
  this.overAllWrapper.classList.remove(FOCUS);
818
+ if (this.addTagOnBlur) {
819
+ var dataChecks = this.getValueByText(this.inputElement.value, this.ignoreCase, this.ignoreAccent);
820
+ var listLiElement = this.findListElement(this.list, 'li', 'data-value', dataChecks);
821
+ var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
822
+ var allowChipAddition = (listLiElement && !listLiElement.classList.contains(className)) ? true : false;
823
+ if (allowChipAddition) {
824
+ this.updateListSelection(listLiElement, eve);
825
+ if (this.mode === 'Delimiter') {
826
+ this.updateDelimeter(this.delimiterChar);
827
+ }
828
+ }
829
+ }
818
830
  this.refreshListItems(null);
819
831
  if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
820
832
  this.updateDelimView();
@@ -1037,6 +1049,13 @@ var MultiSelect = /** @class */ (function (_super) {
1037
1049
  var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
1038
1050
  if (!isNullOrUndefined(focusedItem)) {
1039
1051
  this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);
1052
+ if (this.allowFiltering) {
1053
+ var filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);
1054
+ filterInput && filterInput.setAttribute('aria-activedescendant', focusedItem.id);
1055
+ }
1056
+ else if (this.mode == "CheckBox") {
1057
+ this.overAllWrapper.setAttribute('aria-activedescendant', focusedItem.id);
1058
+ }
1040
1059
  }
1041
1060
  };
1042
1061
  MultiSelect.prototype.homeNavigation = function (isHome) {
@@ -1152,7 +1171,6 @@ var MultiSelect = /** @class */ (function (_super) {
1152
1171
  this.keyAction = true;
1153
1172
  if (document.activeElement.classList.contains(FILTERINPUT)
1154
1173
  || (this.mode === 'CheckBox' && !this.allowFiltering && document.activeElement !== this.list)) {
1155
- this.list.focus();
1156
1174
  EventHandler.add(this.list, 'keydown', this.onKeyDown, this);
1157
1175
  }
1158
1176
  this.updateAriaAttribute();
@@ -2175,7 +2193,7 @@ var MultiSelect = /** @class */ (function (_super) {
2175
2193
  EventHandler.add(this.inputElement, 'input', this.onInput, this);
2176
2194
  }
2177
2195
  EventHandler.add(this.inputElement, 'blur', this.onBlurHandler, this);
2178
- EventHandler.add(this.componentWrapper, 'mousemove', this.mouseIn, this);
2196
+ EventHandler.add(this.componentWrapper, 'mouseover', this.mouseIn, this);
2179
2197
  var formElement = closest(this.inputElement, 'form');
2180
2198
  if (formElement) {
2181
2199
  EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
@@ -2425,7 +2443,9 @@ var MultiSelect = /** @class */ (function (_super) {
2425
2443
  MultiSelect.prototype.updateActionCompleteData = function (li, item) {
2426
2444
  if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {
2427
2445
  this.mainList = this.ulElement;
2428
- addClass([li], HIDE_LIST);
2446
+ if (this.hideSelectedItem) {
2447
+ addClass([li], HIDE_LIST);
2448
+ }
2429
2449
  }
2430
2450
  };
2431
2451
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -2443,7 +2463,7 @@ var MultiSelect = /** @class */ (function (_super) {
2443
2463
  }
2444
2464
  };
2445
2465
  MultiSelect.prototype.updateDataList = function () {
2446
- if (this.mainList && this.ulElement && this.mainList.childElementCount < this.ulElement.childElementCount) {
2466
+ if (this.mainList && this.ulElement && (this.mainList.childElementCount < this.ulElement.childElementCount || ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount)))) {
2447
2467
  this.mainList = this.ulElement.cloneNode ? this.ulElement.cloneNode(true) : this.ulElement;
2448
2468
  }
2449
2469
  };
@@ -3071,7 +3091,7 @@ var MultiSelect = /** @class */ (function (_super) {
3071
3091
  EventHandler.remove(formElement, 'reset', this.resetValueHandler);
3072
3092
  }
3073
3093
  EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);
3074
- EventHandler.remove(this.componentWrapper, 'mousemove', this.mouseIn);
3094
+ EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);
3075
3095
  EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);
3076
3096
  EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);
3077
3097
  EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
@@ -3489,6 +3509,25 @@ var MultiSelect = /** @class */ (function (_super) {
3489
3509
  }
3490
3510
  this.renderPopup();
3491
3511
  };
3512
+ MultiSelect.prototype.presentItemValue = function (ulElement) {
3513
+ var valuecheck = [];
3514
+ for (var i = 0; i < this.value.length; i++) {
3515
+ var checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);
3516
+ if (!checkEle) {
3517
+ valuecheck.push(this.value[i]);
3518
+ }
3519
+ }
3520
+ return valuecheck;
3521
+ };
3522
+ ;
3523
+ MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {
3524
+ var _this = this;
3525
+ this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {
3526
+ _this.addItem(e.result, list.length);
3527
+ _this.updateActionList(ulElement, list, event);
3528
+ });
3529
+ };
3530
+ ;
3492
3531
  MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {
3493
3532
  if (!this.list) {
3494
3533
  this.onLoadSelect();
@@ -3497,31 +3536,43 @@ var MultiSelect = /** @class */ (function (_super) {
3497
3536
  this.onLoadSelect();
3498
3537
  }
3499
3538
  else {
3500
- if (prop === 'text') {
3501
- this.initialTextUpdate();
3502
- newProp = this.value;
3503
- }
3504
- if (isNullOrUndefined(this.value) || this.value.length === 0) {
3505
- this.tempValues = oldProp;
3506
- }
3507
- // eslint-disable-next-line
3508
- if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus
3509
- && this.isPopupOpen() && this.mainData !== this.listData) {
3510
- var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
3511
- this.onActionComplete(list, this.mainData);
3539
+ var valuecheck = [];
3540
+ if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
3541
+ valuecheck = this.presentItemValue(this.ulElement);
3512
3542
  }
3513
- this.initialValueUpdate();
3514
- if (this.mode !== 'Box' && !this.inputFocus) {
3515
- this.updateDelimView();
3543
+ if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
3544
+ && this.listData != null) {
3545
+ this.mainData = null;
3546
+ this.setDynValue = true;
3547
+ this.addNonPresentItems(valuecheck, this.ulElement, this.listData);
3516
3548
  }
3517
- if (!this.inputFocus) {
3518
- this.refreshInputHight();
3519
- }
3520
- this.refreshPlaceHolder();
3521
- if (this.mode !== 'CheckBox' && this.changeOnBlur) {
3522
- this.updateValueState(null, newProp, oldProp);
3549
+ else {
3550
+ if (prop === 'text') {
3551
+ this.initialTextUpdate();
3552
+ newProp = this.value;
3553
+ }
3554
+ if (isNullOrUndefined(this.value) || this.value.length === 0) {
3555
+ this.tempValues = oldProp;
3556
+ }
3557
+ // eslint-disable-next-line
3558
+ if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus
3559
+ && this.isPopupOpen() && this.mainData !== this.listData) {
3560
+ var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
3561
+ this.onActionComplete(list, this.mainData);
3562
+ }
3563
+ this.initialValueUpdate();
3564
+ if (this.mode !== 'Box' && !this.inputFocus) {
3565
+ this.updateDelimView();
3566
+ }
3567
+ if (!this.inputFocus) {
3568
+ this.refreshInputHight();
3569
+ }
3570
+ this.refreshPlaceHolder();
3571
+ if (this.mode !== 'CheckBox' && this.changeOnBlur) {
3572
+ this.updateValueState(null, newProp, oldProp);
3573
+ }
3574
+ this.checkPlaceholderSize();
3523
3575
  }
3524
- this.checkPlaceholderSize();
3525
3576
  }
3526
3577
  if (!this.changeOnBlur) {
3527
3578
  this.updateValueState(null, newProp, oldProp);
@@ -4042,6 +4093,9 @@ var MultiSelect = /** @class */ (function (_super) {
4042
4093
  __decorate([
4043
4094
  Property(true)
4044
4095
  ], MultiSelect.prototype, "openOnClick", void 0);
4096
+ __decorate([
4097
+ Property(false)
4098
+ ], MultiSelect.prototype, "addTagOnBlur", void 0);
4045
4099
  __decorate([
4046
4100
  Event()
4047
4101
  ], MultiSelect.prototype, "change", void 0);
@@ -0,0 +1,2 @@
1
+ //default
2
+ //enddefault
@@ -1136,8 +1136,16 @@ ejs-dropdownlist {
1136
1136
  .e-ddt.e-bigger.e-input-group.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon,
1137
1137
  .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon,
1138
1138
  .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon {
1139
- bottom: 6px;
1140
- right: 33px;
1139
+ bottom: auto;
1140
+ right: 36px;
1141
+ }
1142
+
1143
+ .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon, .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon,
1144
+ .e-ddt.e-bigger.e-input-group.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon,
1145
+ .e-ddt.e-bigger.e-input-group.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon,
1146
+ .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon,
1147
+ .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon {
1148
+ bottom: 0;
1141
1149
  }
1142
1150
 
1143
1151
  .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-chip .e-ddt-icon, .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-text .e-ddt-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-chip .e-ddt-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-text .e-ddt-icon,
@@ -1151,8 +1159,7 @@ ejs-dropdownlist {
1151
1159
  .e-bigger .e-ddt.e-input-group.e-control-wrapper .e-clear-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper .e-clear-icon,
1152
1160
  .e-ddt.e-bigger.e-input-group.e-control-wrapper .e-clear-icon,
1153
1161
  .e-ddt.e-bigger.e-float-input.e-control-wrapper .e-clear-icon {
1154
- min-width: 0;
1155
- padding: 6px;
1162
+ min-height: 36px;
1156
1163
  }
1157
1164
 
1158
1165
  .e-bigger .e-ddt.e-show-chip .e-chips-close,
@@ -3213,7 +3220,7 @@ ejs-listbox {
3213
3220
  .e-listbox-container .e-list-group-item {
3214
3221
  background-color: #343a40;
3215
3222
  border-color: rgba(0, 0, 0, 0.12);
3216
- color: #7b848d;
3223
+ color: #000;
3217
3224
  font-size: 12px;
3218
3225
  }
3219
3226
 
@@ -1136,8 +1136,16 @@ ejs-dropdownlist {
1136
1136
  .e-ddt.e-bigger.e-input-group.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon,
1137
1137
  .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-chip.e-show-dd-icon .e-clear-icon,
1138
1138
  .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-text.e-show-dd-icon .e-clear-icon {
1139
- bottom: 6px;
1140
- right: 33px;
1139
+ bottom: auto;
1140
+ right: 36px;
1141
+ }
1142
+
1143
+ .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon, .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon,
1144
+ .e-ddt.e-bigger.e-input-group.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon,
1145
+ .e-ddt.e-bigger.e-input-group.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon,
1146
+ .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-chip.e-show-chip.e-show-dd-icon .e-clear-icon,
1147
+ .e-ddt.e-bigger.e-float-input.e-control-wrapper.e-show-text.e-show-chip.e-show-dd-icon .e-clear-icon {
1148
+ bottom: 0;
1141
1149
  }
1142
1150
 
1143
1151
  .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-chip .e-ddt-icon, .e-bigger .e-ddt.e-input-group.e-control-wrapper.e-show-text .e-ddt-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-chip .e-ddt-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper.e-show-text .e-ddt-icon,
@@ -1151,8 +1159,7 @@ ejs-dropdownlist {
1151
1159
  .e-bigger .e-ddt.e-input-group.e-control-wrapper .e-clear-icon, .e-bigger .e-ddt.e-float-input.e-control-wrapper .e-clear-icon,
1152
1160
  .e-ddt.e-bigger.e-input-group.e-control-wrapper .e-clear-icon,
1153
1161
  .e-ddt.e-bigger.e-float-input.e-control-wrapper .e-clear-icon {
1154
- min-width: 0;
1155
- padding: 6px;
1162
+ min-height: 36px;
1156
1163
  }
1157
1164
 
1158
1165
  .e-bigger .e-ddt.e-show-chip .e-chips-close,
@@ -3213,7 +3220,7 @@ ejs-listbox {
3213
3220
  .e-listbox-container .e-list-group-item {
3214
3221
  background-color: #e9ecef;
3215
3222
  border-color: rgba(0, 0, 0, 0.12);
3216
- color: #6c757d;
3223
+ color: #000;
3217
3224
  font-size: 12px;
3218
3225
  }
3219
3226
 
@@ -0,0 +1,2 @@
1
+ //default
2
+ //enddefault