@syncfusion/ej2-dropdowns 20.4.48 → 20.4.50

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 : 20.4.48
3
+ * version : 20.4.50
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@20.4.43",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.4.49",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-HorUfQln7wRXYTipm53hkzRd3Kcq0TgdgkVZGpPR+O2B0hboQf6mM08hUAgPxgPhUpPBu2PfqIi7rz4IUAnfgQ==",
5
+ "_integrity": "sha512-0kyVOTb2w3LUnY0asuLT6GIzQpkZDYmQOJbxxzRkY/R+LN6eP0TAoQq7SLu1p5PDEmaJmjRdsVlKDe8oHtIEbg==",
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": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.4.43.tgz",
37
- "_shasum": "c69b0e6b9b8c0eedcd2056d2227617175c4a7df5",
36
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.4.49.tgz",
37
+ "_shasum": "579bc8d85a3577d765f3bad0fea9bfd7873ab367",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
40
40
  "author": {
@@ -45,9 +45,9 @@
45
45
  "@syncfusion/ej2-base": "~20.4.48",
46
46
  "@syncfusion/ej2-data": "~20.4.48",
47
47
  "@syncfusion/ej2-inputs": "~20.4.48",
48
- "@syncfusion/ej2-lists": "~20.4.48",
49
- "@syncfusion/ej2-navigations": "~20.4.48",
50
- "@syncfusion/ej2-popups": "~20.4.48"
48
+ "@syncfusion/ej2-lists": "~20.4.50",
49
+ "@syncfusion/ej2-navigations": "~20.4.49",
50
+ "@syncfusion/ej2-popups": "~20.4.49"
51
51
  },
52
52
  "deprecated": false,
53
53
  "description": "Essential JS 2 DropDown Components",
@@ -72,7 +72,7 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.4.48",
75
+ "version": "20.4.50",
76
76
  "sideEffects": false,
77
77
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
78
78
  }
@@ -209,7 +209,7 @@ var DropDownList = /** @class */ (function (_super) {
209
209
  }
210
210
  else {
211
211
  if (this.allowFiltering && this.getModuleName() !== 'autocomplete'
212
- && !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list)) {
212
+ && !isNullOrUndefined(this.actionCompleteData.ulElement) && !isNullOrUndefined(this.actionCompleteData.list) && this.actionCompleteData.list.length > 0) {
213
213
  this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(true), this.actionCompleteData.list);
214
214
  }
215
215
  this.resetFocusElement();
@@ -949,6 +949,9 @@ var DropDownList = /** @class */ (function (_super) {
949
949
  };
950
950
  DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {
951
951
  this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
952
+ if (this.itemData != selectedData) {
953
+ this.previousValue = (!isNullOrUndefined(this.itemData)) ? typeof this.itemData == "object" ? this.checkFieldValue(this.itemData, this.fields.value.split('.')) : this.itemData : null;
954
+ }
952
955
  this.item = li;
953
956
  this.itemData = selectedData;
954
957
  var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);
@@ -288,6 +288,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
288
288
  private nestedTableUpdate;
289
289
  private clearIconWidth;
290
290
  private isClicked;
291
+ private isCheckAllCalled;
291
292
  /**
292
293
  * Specifies the template that renders to the popup list content of the
293
294
  * Dropdown Tree component when the data fetch request from the remote server fails.
@@ -168,6 +168,8 @@ var DropDownTree = /** @class */ (function (_super) {
168
168
  _this.selectedData = [];
169
169
  _this.filterDelayTime = 300;
170
170
  _this.isClicked = false;
171
+ // Specifies if the checkAll method has been called
172
+ _this.isCheckAllCalled = false;
171
173
  return _this;
172
174
  }
173
175
  /**
@@ -1151,6 +1153,7 @@ var DropDownTree = /** @class */ (function (_super) {
1151
1153
  frameSpan.classList.add(CHECK);
1152
1154
  ariaState = 'true';
1153
1155
  if (!this.isReverseUpdate) {
1156
+ this.isCheckAllCalled = true;
1154
1157
  this.treeObj.checkAll();
1155
1158
  if (!this.changeOnBlur) {
1156
1159
  this.triggerChangeEvent(e);
@@ -1956,13 +1959,14 @@ var DropDownTree = /** @class */ (function (_super) {
1956
1959
  var nodes = this.treeObj.element.querySelectorAll('li');
1957
1960
  var checkedNodes = this.treeObj.element.querySelectorAll('li .e-checkbox-wrapper[aria-checked=true]');
1958
1961
  var wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
1959
- if (wrap && args.action === 'uncheck') {
1962
+ if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0)) {
1960
1963
  this.isReverseUpdate = true;
1961
1964
  this.changeState(wrap, 'uncheck');
1962
1965
  this.isReverseUpdate = false;
1963
1966
  }
1964
- else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length) {
1967
+ else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length && this.isCheckAllCalled) {
1965
1968
  this.isReverseUpdate = true;
1969
+ this.isCheckAllCalled = false;
1966
1970
  this.changeState(wrap, 'check');
1967
1971
  this.isReverseUpdate = false;
1968
1972
  }
@@ -2482,6 +2486,7 @@ var DropDownTree = /** @class */ (function (_super) {
2482
2486
  DropDownTree.prototype.selectAllItems = function (state) {
2483
2487
  if (this.showCheckBox) {
2484
2488
  if (state) {
2489
+ this.isCheckAllCalled = true;
2485
2490
  this.treeObj.checkAll();
2486
2491
  }
2487
2492
  else {
@@ -204,7 +204,7 @@ var Mention = /** @class */ (function (_super) {
204
204
  var isNavigation = (e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown'
205
205
  || e.action === 'home' || e.action === 'end');
206
206
  var isTabAction = e.action === 'tab' || e.action === 'close';
207
- if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape') {
207
+ if (this.list === undefined && !this.isRequested && !isTabAction && e.action !== 'escape' && e.action !== 'space') {
208
208
  this.renderList();
209
209
  }
210
210
  if (isNullOrUndefined(this.list) || (!isNullOrUndefined(this.liCollections) &&
@@ -348,11 +348,11 @@ var Mention = /** @class */ (function (_super) {
348
348
  }
349
349
  }
350
350
  else if (this.allowSpaces && this.queryString !== '' && currentRange && currentRange.trim() !== '' && currentRange.replace('\u00a0', ' ').lastIndexOf(' ') < currentRange.length - 1 &&
351
- e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8) {
351
+ e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0)) {
352
352
  this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
353
353
  this.searchLists(e);
354
354
  }
355
- else if (this.queryString === '' && this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40) {
355
+ else if (this.queryString === '' && this.isPopupOpen && e.keyCode !== 38 && e.keyCode !== 40 && this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0)) {
356
356
  this.searchLists(e);
357
357
  if (!this.isListResetted) {
358
358
  this.resetList(this.dataSource, this.fields);
@@ -3027,7 +3027,7 @@ var MultiSelect = /** @class */ (function (_super) {
3027
3027
  overAllContainer = this.componentWrapper.offsetWidth -
3028
3028
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
3029
3029
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
3030
- if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {
3030
+ if ((wrapperleng + downIconWidth + this.clearIconWidth) >= overAllContainer) {
3031
3031
  if (tempData !== undefined && tempData !== '') {
3032
3032
  temp = tempData;
3033
3033
  index = tempIndex + 1;
@@ -3036,7 +3036,7 @@ var MultiSelect = /** @class */ (function (_super) {
3036
3036
  remaining = this.value.length - index;
3037
3037
  wrapperleng = this.viewWrapper.offsetWidth +
3038
3038
  parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
3039
- while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) > overAllContainer) && wrapperleng !== 0
3039
+ while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) >= overAllContainer) && wrapperleng !== 0
3040
3040
  && this.viewWrapper.innerHTML !== '') {
3041
3041
  var textArr = [];
3042
3042
  this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
@@ -3046,7 +3046,7 @@ var MultiSelect = /** @class */ (function (_super) {
3046
3046
  }
3047
3047
  break;
3048
3048
  }
3049
- else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) <= overAllContainer) {
3049
+ else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) < overAllContainer) {
3050
3050
  tempData = data;
3051
3051
  tempIndex = index;
3052
3052
  }
@@ -3239,6 +3239,7 @@ var MultiSelect = /** @class */ (function (_super) {
3239
3239
  else {
3240
3240
  this.updateValue(event, li, state);
3241
3241
  }
3242
+ this.addValidInputClass();
3242
3243
  };
3243
3244
  MultiSelect.prototype.updateValue = function (event, li, state) {
3244
3245
  var _this = this;
package/tslint.json ADDED
@@ -0,0 +1,111 @@
1
+ {
2
+ "rules": {
3
+ "chai-vague-errors": true,
4
+ "use-isnan": true,
5
+ "missing-jsdoc": true,
6
+ "missing-optional-annotation": true,
7
+ "no-backbone-get-set-outside-model": true,
8
+ "no-banned-terms": true,
9
+ "no-constant-condition": true,
10
+ "no-control-regex": true,
11
+ "no-cookies": true,
12
+ "no-delete-expression": true,
13
+ "no-document-write": true,
14
+ "no-document-domain": true,
15
+ "no-disable-auto-sanitization": true,
16
+ "no-duplicate-case": true,
17
+ "no-duplicate-parameter-names": true,
18
+ "no-empty-interfaces": true,
19
+ "no-exec-script": true,
20
+ "no-function-constructor-with-string-args": true,
21
+ "no-function-expression": true,
22
+ "no-invalid-regexp": true,
23
+ "no-for-in": true,
24
+ "member-access": true,
25
+ "no-multiline-string": true,
26
+ "no-multiple-var-decl": true,
27
+ "no-unnecessary-bind": true,
28
+ "no-unnecessary-semicolons": true,
29
+ "no-octal-literal": true,
30
+ "no-regex-spaces": true,
31
+ "no-sparse-arrays": true,
32
+ "no-string-based-set-immediate": true,
33
+ "no-string-based-set-interval": true,
34
+ "no-unused-imports": true,
35
+ "no-with-statement": true,
36
+ "prefer-array-literal": true,
37
+ "promise-must-complete": false,
38
+ "react-no-dangerous-html": true,
39
+ "use-named-parameter": true,
40
+ "valid-typeof": true,
41
+ "max-func-body-length": [true, 100, {
42
+ "ignore-parameters-to-function-regex": "describe"
43
+ }],
44
+ "class-name": true,
45
+ "curly": true,
46
+ "eofline": false,
47
+ "forin": true,
48
+ "indent": [
49
+ true,
50
+ "spaces"
51
+ ],
52
+ "label-position": true,
53
+ "max-line-length": [true, 140],
54
+ "no-arg": true,
55
+ "no-console": [true,
56
+ "debug",
57
+ "info",
58
+ "log",
59
+ "time",
60
+ "timeEnd",
61
+ "trace"
62
+ ],
63
+ "no-construct": true,
64
+ "no-parameter-properties": true,
65
+ "no-debugger": true,
66
+ "no-duplicate-variable": true,
67
+ "no-empty": true,
68
+ "no-eval": true,
69
+ "no-string-literal": true,
70
+ "no-switch-case-fall-through": true,
71
+ "trailing-comma": true,
72
+ "no-trailing-whitespace": true,
73
+ "no-unused-expression": true,
74
+ "no-use-before-declare": false,
75
+ "no-var-requires": true,
76
+ "one-line": [true,
77
+ "check-open-brace",
78
+ "check-catch",
79
+ "check-else",
80
+ "check-whitespace"
81
+ ],
82
+ "no-any": true,
83
+ "no-conditional-assignment": true,
84
+ "no-angle-bracket-type-assertion": false,
85
+ "align": [true, "parameters", "arguments", "statements"],
86
+ "no-empty-line-after-opening-brace": false,
87
+ "typedef-whitespace": [false],
88
+ "ban": true,
89
+ "quotemark": [true, "single"],
90
+ "semicolon": true,
91
+ "triple-equals": [true, "allow-null-check"],
92
+ "typedef": [true,
93
+ "call-signature",
94
+ "parameter",
95
+ "property-declaration",
96
+ "variable-declaration",
97
+ "arrow-parameter",
98
+ "member-variable-declaration"],
99
+ "variable-name": true,
100
+ "whitespace": [true,
101
+ "check-branch",
102
+ "check-decl",
103
+ "check-operator",
104
+ "check-separator",
105
+ "check-type"
106
+ ],
107
+ "jsdoc-format": true,
108
+ "no-var-keyword": true,
109
+ "radix": true
110
+ }
111
+ }