@syncfusion/ej2-dropdowns 21.2.6 → 21.2.8

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 : 21.2.6
3
+ * version : 21.2.8
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.5",
3
+ "_id": "@syncfusion/ej2-dropdowns@21.2.6",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-PtnODhm4SGJFF5FukEKwX8tY8qI/bpJs1B2g/MUdusMmkEV9cBSyrZEyciI4RbfgYEedhn5Qt/OnLLH+wMC9Hw==",
5
+ "_integrity": "sha512-wSYI3K3YsYxJKmZOBv9bRpRLH76tyVSOJrgdXvuCJIU15b2imLkegMeUGwSJ4IdPUXi+LqNUWWu7uAH6ZzM2ZA==",
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.5.tgz",
38
- "_shasum": "95c4a1e11e3c8f5d8e7a0b2f898318195babe024",
37
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-21.2.6.tgz",
38
+ "_shasum": "56982d04447e3b476ffab41971af04671940f76a",
39
39
  "_spec": "@syncfusion/ej2-dropdowns@*",
40
40
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
41
41
  "author": {
@@ -44,10 +44,10 @@
44
44
  "bundleDependencies": false,
45
45
  "dependencies": {
46
46
  "@syncfusion/ej2-base": "~21.2.3",
47
- "@syncfusion/ej2-data": "~21.2.6",
48
- "@syncfusion/ej2-inputs": "~21.2.6",
47
+ "@syncfusion/ej2-data": "~21.2.8",
48
+ "@syncfusion/ej2-inputs": "~21.2.8",
49
49
  "@syncfusion/ej2-lists": "~21.2.6",
50
- "@syncfusion/ej2-navigations": "~21.2.6",
50
+ "@syncfusion/ej2-navigations": "~21.2.8",
51
51
  "@syncfusion/ej2-popups": "~21.2.4"
52
52
  },
53
53
  "deprecated": false,
@@ -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.6",
76
+ "version": "21.2.8",
77
77
  "sideEffects": false,
78
78
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
79
79
  }
@@ -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
  *
@@ -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) && (this.beforePopupOpen || this.isEventCancel))) {
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
- for (var i = 0; i < footerCompTemp.length; i++) {
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
- for (var i = 0; i < headerCompTemp.length; i++) {
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);
@@ -744,6 +744,16 @@ var ListBox = /** @class */ (function (_super) {
744
744
  }
745
745
  this.setSelection(items, state, !isValue);
746
746
  this.updateSelectedOptions();
747
+ var selElems = [];
748
+ for (var i = 0; i < items.length; i++) {
749
+ var liColl = this.list.querySelectorAll('[aria-selected="true"]');
750
+ for (var j = 0; j < liColl.length; j++) {
751
+ if (items[i] === this.getFormattedValue(liColl[j].getAttribute('data-value'))) {
752
+ selElems.push(liColl[j]);
753
+ }
754
+ }
755
+ }
756
+ this.triggerChange(selElems, null);
747
757
  };
748
758
  /**
749
759
  * Based on the state parameter, entire list item will be selected/deselected.
@@ -1962,8 +1972,11 @@ var ListBox = /** @class */ (function (_super) {
1962
1972
  }
1963
1973
  if (typeof (text) === 'string') {
1964
1974
  text = text.split('\\').join('\\\\');
1975
+ li = _this.list.querySelector('[data-value="' + text.replace(/"/g, '\\"') + '"]');
1976
+ }
1977
+ else {
1978
+ li = _this.list.querySelector('[data-value="' + text + '"]');
1965
1979
  }
1966
- li = _this.list.querySelector('[data-value="' + text + '"]');
1967
1980
  if (li) {
1968
1981
  if (_this.selectionSettings.showCheckbox) {
1969
1982
  liselect = li.getElementsByClassName('e-frame')[0].classList.contains('e-check');
@@ -1999,9 +2012,12 @@ var ListBox = /** @class */ (function (_super) {
1999
2012
  ele.innerHTML = '';
2000
2013
  if (this.value) {
2001
2014
  for (var i = 0, len = this.value.length; i < len; i++) {
2002
- innerHTML += '<option selected value="' + this.value[i] + '"></option>';
2015
+ innerHTML += '<option selected>' + this.value[i] + '</option>';
2003
2016
  }
2004
2017
  ele.innerHTML += innerHTML;
2018
+ for (var i = 0, len = ele.childNodes.length; i < len; i++) {
2019
+ ele.childNodes[i].setAttribute('value', this.value[i].toString());
2020
+ }
2005
2021
  }
2006
2022
  this.checkSelectAll();
2007
2023
  };
@@ -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 && this.isTyped) {
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
  }
@@ -2138,9 +2138,7 @@ var MultiSelect = /** @class */ (function (_super) {
2138
2138
  // eslint-disable-next-line
2139
2139
  var elements = compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate, null, this.header);
2140
2140
  if (elements && elements.length > 0) {
2141
- for (var temp = 0; temp < elements.length; temp++) {
2142
- this.header.appendChild(elements[temp]);
2143
- }
2141
+ append(elements, this.header);
2144
2142
  }
2145
2143
  if (this.mode === 'CheckBox' && this.showSelectAll) {
2146
2144
  prepend([this.header], this.popupWrapper);
@@ -2167,9 +2165,7 @@ var MultiSelect = /** @class */ (function (_super) {
2167
2165
  // eslint-disable-next-line
2168
2166
  var elements = compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate, null, this.footer);
2169
2167
  if (elements && elements.length > 0) {
2170
- for (var temp = 0; temp < elements.length; temp++) {
2171
- this.footer.appendChild(elements[temp]);
2172
- }
2168
+ append(elements, this.footer);
2173
2169
  }
2174
2170
  append([this.footer], this.popupWrapper);
2175
2171
  EventHandler.add(this.footer, 'mousedown', this.onListMouseDown, 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
+ }