@syncfusion/ej2-dropdowns 19.3.46 → 19.3.55

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.3.46
3
+ * version : 19.3.55
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.45",
3
+ "_id": "@syncfusion/ej2-dropdowns@19.3.53",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-2EMPgizg8Cmh7N4hne4utW+E8CKakCWK8pbmtorIn976QexPgC+SmGr42NFnDu7E93D2AeA3l65sX9JcEDfVNg==",
5
+ "_integrity": "sha512-ZjyBDa3qc3wvK9fFQyOhN5L7kBIGn6alpgr9mrFcS+FJ5hRXn7bfUa8o0KHdB2CkO8Z3pseb09jqdLu45Wd6Ug==",
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.45.tgz",
37
- "_shasum": "0f9f84df782a4f8b78009961f83a2ab7a359058a",
36
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-19.3.53.tgz",
37
+ "_shasum": "ac550d7fba92428ee921ee63f7e6912a9cda3770",
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.43",
46
- "@syncfusion/ej2-data": "~19.3.46",
47
- "@syncfusion/ej2-inputs": "~19.3.44",
48
- "@syncfusion/ej2-lists": "~19.3.45",
49
- "@syncfusion/ej2-navigations": "~19.3.46",
50
- "@syncfusion/ej2-popups": "~19.3.43"
45
+ "@syncfusion/ej2-base": "~19.3.54",
46
+ "@syncfusion/ej2-data": "~19.3.53",
47
+ "@syncfusion/ej2-inputs": "~19.3.53",
48
+ "@syncfusion/ej2-lists": "~19.3.53",
49
+ "@syncfusion/ej2-navigations": "~19.3.54",
50
+ "@syncfusion/ej2-popups": "~19.3.53"
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.46",
75
+ "version": "19.3.55",
76
76
  "sideEffects": false
77
77
  }
@@ -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
  /**
@@ -579,9 +580,6 @@ var DropDownTree = /** @class */ (function (_super) {
579
580
  this.isClearButtonClick = false;
580
581
  return;
581
582
  }
582
- if (!this.wrapText && e.target.classList.contains(CHIP_CLOSE)) {
583
- this.removeChip(e);
584
- }
585
583
  if (this.isPopupOpen) {
586
584
  this.hidePopup();
587
585
  }
@@ -652,7 +650,7 @@ var DropDownTree = /** @class */ (function (_super) {
652
650
  this.trigger('blur');
653
651
  };
654
652
  DropDownTree.prototype.updateView = function () {
655
- if ((!this.showCheckBox && !this.allowMultiSelection) || this.mode === 'Custom') {
653
+ if ((!this.showCheckBox && !this.allowMultiSelection) || this.mode === 'Custom' || this.inputFocus) {
656
654
  return;
657
655
  }
658
656
  if (this.mode !== 'Box') {
@@ -1094,10 +1092,10 @@ var DropDownTree = /** @class */ (function (_super) {
1094
1092
  this.inputWrapper.insertBefore(this.chipWrapper, this.hiddenElement);
1095
1093
  addClass([this.inputWrapper], SHOW_CHIP);
1096
1094
  var isValid = this.getValidMode();
1097
- if (isValid && this.value !== null) {
1095
+ if (isValid && this.value !== null && (this.value && this.value.length !== 0)) {
1098
1096
  addClass([this.inputEle], CHIP_INPUT);
1099
1097
  }
1100
- else if (this.value === null) {
1098
+ else if (this.value === null || (this.value && this.value.length === 0)) {
1101
1099
  addClass([this.chipWrapper], HIDEICON);
1102
1100
  }
1103
1101
  }
@@ -1138,8 +1136,10 @@ var DropDownTree = /** @class */ (function (_super) {
1138
1136
  }
1139
1137
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP);
1140
1138
  if (!isNOU(this.checkWrapper)) {
1139
+ this.isClicked = true;
1141
1140
  var checkElement = select('.' + CHECKBOXFRAME, this.checkWrapper);
1142
1141
  this.changeState(this.checkWrapper, checkElement.classList.contains(CHECK) ? 'uncheck' : 'check', e);
1142
+ this.isClicked = false;
1143
1143
  }
1144
1144
  e.preventDefault();
1145
1145
  };
@@ -1371,7 +1371,6 @@ var DropDownTree = /** @class */ (function (_super) {
1371
1371
  else {
1372
1372
  if (this.showCheckBox) {
1373
1373
  this.treeObj.checkedNodes = this.value.slice();
1374
- setValue('selectedNodes', [], this.treeObj);
1375
1374
  this.treeObj.dataBind();
1376
1375
  this.setMultiSelect();
1377
1376
  }
@@ -1839,7 +1838,7 @@ var DropDownTree = /** @class */ (function (_super) {
1839
1838
  }
1840
1839
  var eventArgs = {
1841
1840
  action: this.showCheckBox ? state : args.action,
1842
- isInteracted: args.isInteracted,
1841
+ isInteracted: this.isClicked ? true : args.isInteracted,
1843
1842
  item: args.node,
1844
1843
  itemData: this.showCheckBox ? checkData[0] : selectData
1845
1844
  };
@@ -1910,6 +1909,7 @@ var DropDownTree = /** @class */ (function (_super) {
1910
1909
  }
1911
1910
  var target = args.event.target;
1912
1911
  if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
1912
+ this.isClicked = true;
1913
1913
  // eslint-disable-next-line
1914
1914
  var getNodeDetails = this.treeObj.getNode(args.node);
1915
1915
  if (getNodeDetails.isChecked === 'true') {
@@ -1918,6 +1918,7 @@ var DropDownTree = /** @class */ (function (_super) {
1918
1918
  else {
1919
1919
  this.treeObj.checkAll([args.node]);
1920
1920
  }
1921
+ this.isClicked = false;
1921
1922
  this.setMultiSelect();
1922
1923
  this.ensurePlaceHolder();
1923
1924
  }
@@ -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 {
@@ -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
  *
@@ -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();
@@ -2921,16 +2933,12 @@ var MultiSelect = /** @class */ (function (_super) {
2921
2933
  l10n = new L10n('dropdowns', l10nLocale, this.locale);
2922
2934
  }
2923
2935
  var remainContent = l10n.getConstant('overflowCountTemplate');
2936
+ var totalContent = l10n.getConstant('totalCountTemplate');
2924
2937
  var raminElement = this.createElement('span', {
2925
2938
  className: REMAIN_WRAPPER
2926
2939
  });
2927
- var compiledString = compile(remainContent);
2928
- var totalCompiledString = compile(l10n.getConstant('totalCountTemplate'));
2929
- // eslint-disable-next-line
2930
- var remainCompildTemp = compiledString({ 'count': this.value.length }, this, 'overflowCountTemplate', null, !this.isStringTemplate, null, raminElement);
2931
- if (remainCompildTemp && remainCompildTemp.length > 0) {
2932
- raminElement.appendChild(remainCompildTemp[0]);
2933
- }
2940
+ var remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());
2941
+ raminElement.innerText = remainCompildTemp;
2934
2942
  this.viewWrapper.appendChild(raminElement);
2935
2943
  this.renderReactTemplates();
2936
2944
  var remainSize = raminElement.offsetWidth;
@@ -2982,9 +2990,9 @@ var MultiSelect = /** @class */ (function (_super) {
2982
2990
  }
2983
2991
  if (remaining > 0) {
2984
2992
  var totalWidth = overAllContainer - downIconWidth - this.clearIconWidth;
2985
- this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, compiledString, totalCompiledString, totalWidth));
2993
+ this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth));
2986
2994
  this.updateRemainWidth(this.viewWrapper, totalWidth);
2987
- this.updateRemainingText(raminElement, downIconWidth, remaining, compiledString, totalCompiledString);
2995
+ this.updateRemainingText(raminElement, downIconWidth, remaining, remainContent, totalContent);
2988
2996
  }
2989
2997
  }
2990
2998
  else {
@@ -3004,17 +3012,14 @@ var MultiSelect = /** @class */ (function (_super) {
3004
3012
  viewWrapper.style.width = totalWidth + 'px';
3005
3013
  }
3006
3014
  };
3007
- MultiSelect.prototype.updateRemainTemplate = function (raminElement, viewWrapper, remaining, compiledString, totalCompiledString, totalWidth) {
3015
+ MultiSelect.prototype.updateRemainTemplate = function (raminElement, viewWrapper, remaining, remainContent, totalContent, totalWidth) {
3008
3016
  if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 && viewWrapper.firstChild.nodeValue === '') {
3009
3017
  viewWrapper.removeChild(viewWrapper.firstChild);
3010
3018
  }
3011
3019
  raminElement.innerHTML = '';
3012
- // eslint-disable-next-line
3013
- var remainTemp = compiledString({ 'count': remaining }, this, 'overflowCountTemplate', null, !this.isStringTemplate, null, raminElement);
3014
- // eslint-disable-next-line
3015
- var totalTemp = totalCompiledString({ 'count': remaining }, this, 'totalCountTemplate', null, !this.isStringTemplate, null, raminElement);
3016
- raminElement.appendChild((viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ?
3017
- remainTemp && remainTemp[0] : totalTemp && totalTemp[0]);
3020
+ var remainTemp = remainContent.replace('${count}', remaining.toString());
3021
+ var totalTemp = totalContent.replace('${count}', remaining.toString());
3022
+ raminElement.innerText = (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ? remainTemp : totalTemp;
3018
3023
  if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {
3019
3024
  viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER);
3020
3025
  }
@@ -3024,7 +3029,7 @@ var MultiSelect = /** @class */ (function (_super) {
3024
3029
  }
3025
3030
  return raminElement;
3026
3031
  };
3027
- MultiSelect.prototype.updateRemainingText = function (raminElement, downIconWidth, remaining, compiledString, totalCompiledString) {
3032
+ MultiSelect.prototype.updateRemainingText = function (raminElement, downIconWidth, remaining, remainContent, totalContent) {
3028
3033
  var overAllContainer = this.componentWrapper.offsetWidth -
3029
3034
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
3030
3035
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
@@ -3043,7 +3048,7 @@ var MultiSelect = /** @class */ (function (_super) {
3043
3048
  wrapperleng = this.viewWrapper.offsetWidth;
3044
3049
  }
3045
3050
  var totalWidth = overAllContainer - downIconWidth;
3046
- this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, compiledString, totalCompiledString, totalWidth);
3051
+ this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth);
3047
3052
  }
3048
3053
  };
3049
3054
  MultiSelect.prototype.getOverflowVal = function (index) {
@@ -4049,6 +4054,9 @@ var MultiSelect = /** @class */ (function (_super) {
4049
4054
  __decorate([
4050
4055
  Property(true)
4051
4056
  ], MultiSelect.prototype, "openOnClick", void 0);
4057
+ __decorate([
4058
+ Property(false)
4059
+ ], MultiSelect.prototype, "addTagOnBlur", void 0);
4052
4060
  __decorate([
4053
4061
  Event()
4054
4062
  ], MultiSelect.prototype, "change", void 0);
@@ -62,6 +62,7 @@
62
62
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
63
63
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
64
64
  background: transparent;
65
+ color: inherit;
65
66
  }
66
67
 
67
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -62,6 +62,7 @@
62
62
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
63
63
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
64
64
  background: transparent;
65
+ color: inherit;
65
66
  }
66
67
 
67
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -453,6 +453,7 @@
453
453
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
454
454
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
455
455
  background: transparent;
456
+ color: inherit;
456
457
  }
457
458
 
458
459
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -453,6 +453,7 @@
453
453
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
454
454
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
455
455
  background: transparent;
456
+ color: inherit;
456
457
  }
457
458
 
458
459
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -62,6 +62,7 @@
62
62
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
63
63
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
64
64
  background: transparent;
65
+ color: inherit;
65
66
  }
66
67
 
67
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -62,6 +62,7 @@
62
62
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
63
63
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
64
64
  background: transparent;
65
+ color: inherit;
65
66
  }
66
67
 
67
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -105,6 +105,7 @@ $ddl-filter-box-shadow: 0 1.5px 5px -2px $ddl-filter-box-shadow-color !default;
105
105
  .e-input-group#{&}.e-control-wrapper.e-ddl .e-input[readonly],
106
106
  .e-float-input#{&}.e-control-wrapper.e-ddl input[readonly] {
107
107
  background: transparent;
108
+ color: inherit;
108
109
  }
109
110
 
110
111
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -119,6 +119,7 @@
119
119
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
120
120
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
121
121
  background: transparent;
122
+ color: inherit;
122
123
  }
123
124
 
124
125
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -119,6 +119,7 @@
119
119
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
120
120
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
121
121
  background: transparent;
122
+ color: inherit;
122
123
  }
123
124
 
124
125
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],