@syncfusion/ej2-dropdowns 27.1.55 → 27.1.57

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 : 27.1.55
3
+ * version : 27.1.57
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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@27.1.52",
3
+ "_id": "@syncfusion/ej2-dropdowns@27.1.55",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-lgrKKbthjGtnEjuwnAZd+5EzMt2JLyNRVUP0+SPCG7vJWyXFle2NiJX0FKIogrUk2Idaif+qtcs9CXIBh8NOBw==",
5
+ "_integrity": "sha512-B/ax0E8IrlPfhCsAF8HX0QlLQDTeTd3uNjLwjXtntV8bVVfri5cff8pnBHoDG6zlp0s+TwMXIqpCi4ckup0J0w==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -36,8 +36,8 @@
36
36
  "/@syncfusion/ej2-spreadsheet",
37
37
  "/@syncfusion/ej2-vue-dropdowns"
38
38
  ],
39
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-27.1.52.tgz",
40
- "_shasum": "f5fe34cbcdf22285b14cce67aba1da75d36b301d",
39
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-27.1.55.tgz",
40
+ "_shasum": "cb7031b887c9448bf0586c68b30a94a722833fcb",
41
41
  "_spec": "@syncfusion/ej2-dropdowns@*",
42
42
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
43
43
  "author": {
@@ -49,9 +49,9 @@
49
49
  "@syncfusion/ej2-data": "~27.1.52",
50
50
  "@syncfusion/ej2-inputs": "~27.1.55",
51
51
  "@syncfusion/ej2-lists": "~27.1.50",
52
- "@syncfusion/ej2-navigations": "~27.1.55",
52
+ "@syncfusion/ej2-navigations": "~27.1.57",
53
53
  "@syncfusion/ej2-notifications": "~27.1.50",
54
- "@syncfusion/ej2-popups": "~27.1.55"
54
+ "@syncfusion/ej2-popups": "~27.1.57"
55
55
  },
56
56
  "deprecated": false,
57
57
  "description": "Essential JS 2 DropDown Components",
@@ -76,7 +76,7 @@
76
76
  "module": "./index.js",
77
77
  "name": "@syncfusion/ej2-dropdowns",
78
78
  "typings": "index.d.ts",
79
- "version": "27.1.55",
79
+ "version": "27.1.57",
80
80
  "sideEffects": false,
81
81
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
82
82
  }
@@ -308,6 +308,7 @@ var AutoComplete = /** @class */ (function (_super) {
308
308
  }
309
309
  else {
310
310
  _super.prototype.setSelection.call(this, li, e);
311
+ this.isFiltered = false;
311
312
  }
312
313
  };
313
314
  AutoComplete.prototype.listOption = function (dataSource, fieldsSettings) {
@@ -292,6 +292,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
292
292
  }[] | string[] | number[] | boolean[];
293
293
  protected firstItem: string | number | boolean | object;
294
294
  protected preventDefActionFilter: boolean;
295
+ protected isDynamicData: boolean;
295
296
  protected virtualListInfo: VirtualInfo;
296
297
  protected viewPortInfo: VirtualInfo;
297
298
  protected selectedValueInfo: VirtualInfo;
@@ -134,6 +134,7 @@ var DropDownBase = /** @class */ (function (_super) {
134
134
  _this.preventPopupOpen = true;
135
135
  _this.virtualSelectAllState = false;
136
136
  _this.CurrentEvent = null;
137
+ _this.isDynamicData = false;
137
138
  _this.virtualListInfo = {
138
139
  currentPageNumber: null,
139
140
  direction: null,
@@ -1522,6 +1523,7 @@ var DropDownBase = /** @class */ (function (_super) {
1522
1523
  }
1523
1524
  }
1524
1525
  else {
1526
+ this.isDynamicData = true;
1525
1527
  this.updateDataSource(updateData, oldProp);
1526
1528
  }
1527
1529
  }
@@ -1962,7 +1962,7 @@ var DropDownList = /** @class */ (function (_super) {
1962
1962
  return;
1963
1963
  }
1964
1964
  _this.isCustomFilter = true;
1965
- _this.customFilterQuery = query.clone();
1965
+ _this.customFilterQuery = query ? query.clone() : query;
1966
1966
  _this.filteringAction(dataSource, query, fields);
1967
1967
  },
1968
1968
  baseEventArgs: e,
@@ -2265,6 +2265,12 @@ var DropDownList = /** @class */ (function (_super) {
2265
2265
  this.updateActionCompleteDataValues(ulElement, list);
2266
2266
  }
2267
2267
  }
2268
+ if (this.isDynamicData) {
2269
+ var currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ?
2270
+ getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
2271
+ this.itemData = this.getDataByValue(currentValue);
2272
+ this.isDynamicData = false;
2273
+ }
2268
2274
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2269
2275
  if ((this.allowCustom || (this.allowFiltering && !this.isValueInList(list, this.value) &&
2270
2276
  this.dataSource instanceof DataManager)) && !this.enableVirtualization) {
@@ -2273,7 +2279,11 @@ var DropDownList = /** @class */ (function (_super) {
2273
2279
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2274
2280
  else if ((this.allowCustom || (this.allowFiltering && this.isValueInList(list, this.value))) &&
2275
2281
  !this.enableVirtualization) {
2276
- this.addNewItem(list, selectedItem);
2282
+ var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
2283
+ var isValidAddition = !isNullOrUndefined(this.value) && selectedItem && selectedItem.getAttribute('data-value') === value.toString();
2284
+ if (isValidAddition) {
2285
+ this.addNewItem(list, selectedItem);
2286
+ }
2277
2287
  }
2278
2288
  if (!isNullOrUndefined(this.itemData) || (isNullOrUndefined(this.itemData) && this.enableVirtualization)) {
2279
2289
  this.getSkeletonCount();
@@ -2289,6 +2289,7 @@ var DropDownTree = /** @class */ (function (_super) {
2289
2289
  }
2290
2290
  };
2291
2291
  DropDownTree.prototype.setMultiSelectValue = function (newValues) {
2292
+ var _this = this;
2292
2293
  if (!this.isFilteredData) {
2293
2294
  this.setProperties({ value: this.isFromFilterChange && newValues && newValues.length === 0 ? this.value : newValues }, true);
2294
2295
  this.isFromFilterChange = false;
@@ -2300,6 +2301,13 @@ var DropDownTree = /** @class */ (function (_super) {
2300
2301
  }
2301
2302
  else {
2302
2303
  var selectedValues = isNOU(this.value) ? [] : this.value;
2304
+ selectedValues = selectedValues.filter(function (selectedValue) {
2305
+ var nodeData = _this.treeObj.getTreeData(selectedValue);
2306
+ if (Array.isArray(nodeData)) {
2307
+ return nodeData.every(function (nodeSelectedData) { return nodeSelectedData.selected; });
2308
+ }
2309
+ return true;
2310
+ });
2303
2311
  for (var i = 0; i < newValues.length; i++) {
2304
2312
  if (isNOU(this.value) || this.value.indexOf(newValues[i]) === -1) {
2305
2313
  selectedValues.push(newValues[i]);
@@ -1980,9 +1980,10 @@ var MultiSelect = /** @class */ (function (_super) {
1980
1980
  else {
1981
1981
  this.updateDelimeter(this.delimiterChar, e);
1982
1982
  }
1983
+ var isFilterData = this.targetElement().trim() !== '' ? true : false;
1983
1984
  this.makeTextBoxEmpty();
1984
1985
  if (this.mode !== 'CheckBox') {
1985
- this.refreshListItems(li.textContent);
1986
+ this.refreshListItems(li.textContent, isFilterData);
1986
1987
  }
1987
1988
  if (!this.changeOnBlur) {
1988
1989
  this.updateValueState(e, this.value, this.tempValues);
@@ -2033,7 +2034,7 @@ var MultiSelect = /** @class */ (function (_super) {
2033
2034
  }
2034
2035
  this.refreshPlaceHolder();
2035
2036
  };
2036
- MultiSelect.prototype.refreshListItems = function (data) {
2037
+ MultiSelect.prototype.refreshListItems = function (data, isFilterData) {
2037
2038
  if ((this.allowFiltering || (this.mode === 'CheckBox' && this.enableSelectionOrder === true)
2038
2039
  || this.allowCustomValue) && this.mainList && this.listData) {
2039
2040
  var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;
@@ -2045,7 +2046,25 @@ var MultiSelect = /** @class */ (function (_super) {
2045
2046
  this.renderItems(this.mainData, this.fields);
2046
2047
  }
2047
2048
  else {
2048
- this.onActionComplete(this.list, this.listData);
2049
+ if (this.allowFiltering && isFilterData) {
2050
+ this.updateInitialData();
2051
+ this.onActionComplete(list, this.mainData);
2052
+ this.isVirtualTrackHeight = false;
2053
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2054
+ if (this.list.getElementsByClassName('e-virtual-ddl')[0]) {
2055
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2056
+ this.list.getElementsByClassName('e-virtual-ddl')[0].style = this.GetVirtualTrackHeight();
2057
+ }
2058
+ else if (!this.list.querySelector('.e-virtual-ddl') && this.skeletonCount > 0) {
2059
+ var virualElement = this.createElement('div', {
2060
+ id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()
2061
+ });
2062
+ this.popupWrapper.querySelector('.e-dropdownbase').appendChild(virualElement);
2063
+ }
2064
+ }
2065
+ else {
2066
+ this.onActionComplete(this.list, this.listData);
2067
+ }
2049
2068
  }
2050
2069
  }
2051
2070
  else {
@@ -2392,7 +2411,7 @@ var MultiSelect = /** @class */ (function (_super) {
2392
2411
  _this.removeIndex++;
2393
2412
  }
2394
2413
  else {
2395
- _this.isRemoveSelection = true;
2414
+ _this.isRemoveSelection = _this.enableVirtualization ? true : _this.isRemoveSelection;
2396
2415
  _this.currentRemoveValue = _this.allowObjectBinding ? getValue(((_this.fields.value) ?
2397
2416
  _this.fields.value : ''), value) : value;
2398
2417
  _this.virtualSelectAll = false;
@@ -3085,7 +3104,7 @@ var MultiSelect = /** @class */ (function (_super) {
3085
3104
  endIndex: this.itemCount
3086
3105
  };
3087
3106
  this.previousStartIndex = 0;
3088
- this.previousEndIndex = 0;
3107
+ this.previousEndIndex = this.itemCount;
3089
3108
  if (this.dataSource instanceof DataManager) {
3090
3109
  if (this.remoteDataCount >= 0) {
3091
3110
  this.totalItemCount = this.dataCount = this.remoteDataCount;
@@ -4016,10 +4035,11 @@ var MultiSelect = /** @class */ (function (_super) {
4016
4035
  else {
4017
4036
  e.preventDefault();
4018
4037
  }
4038
+ var isFilterData = this.targetElement().trim() !== '' ? true : false;
4019
4039
  this.makeTextBoxEmpty();
4020
4040
  this.findGroupStart(target);
4021
4041
  if (this.mode !== 'CheckBox') {
4022
- this.refreshListItems(isNullOrUndefined(li) ? null : li.textContent);
4042
+ this.refreshListItems(isNullOrUndefined(li) ? null : li.textContent, isFilterData);
4023
4043
  }
4024
4044
  }
4025
4045
  else {
package/.eslintrc.json DELETED
@@ -1,261 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es2021": true
5
- },
6
- "extends": [
7
- "eslint:recommended",
8
- "plugin:@typescript-eslint/recommended",
9
- "plugin:jsdoc/recommended",
10
- "plugin:security/recommended"
11
- ],
12
- "parser": "@typescript-eslint/parser",
13
- "parserOptions": {
14
- "ecmaFeatures": { "js": true },
15
- "ecmaVersion": 2018,
16
- "project": "./tsconfig.json",
17
- "sourceType": "module"
18
- },
19
- "ignorePatterns": ["*.d.ts", "*.js"],
20
- "plugins": [
21
- "@typescript-eslint",
22
- "@typescript-eslint/tslint",
23
- "eslint-plugin-security",
24
- "jsdoc"
25
- ],
26
- "rules": {
27
- "use-isnan": "error",
28
- "security/detect-unsafe-regex":"error",
29
- "security/detect-buffer-noassert":"error",
30
- "security/detect-child-process":"error",
31
- "security/detect-disable-mustache-escape":"error",
32
- "security/detect-eval-with-expression":"error",
33
- "security/detect-no-csrf-before-method-override":"error",
34
- "security/detect-non-literal-fs-filename":"error",
35
- "security/detect-non-literal-regexp":"error",
36
- "security/detect-non-literal-require":"error",
37
- "security/detect-object-injection":"error",
38
- "security/detect-possible-timing-attacks":"error",
39
- "security/detect-pseudoRandomBytes":"error",
40
- "security/detect-new-buffer":"error",
41
- "security/detect-bidi-characters":"error",
42
- "@typescript-eslint/no-inferrable-types": "off",
43
- "@typescript-eslint/ban-types": ["warn", {
44
- "types": {
45
- "Object": false,
46
- "object": false,
47
- "{}": false,
48
- "Function": false
49
- }
50
- }],
51
- "jsdoc/check-tag-names": 0,
52
- "@typescript-eslint/tslint/config": [
53
- "error",
54
- {
55
- "rules": {
56
- "ban": true,
57
- "chai-vague-errors": true,
58
- "max-func-body-length": [
59
- true,
60
- 120,
61
- {
62
- "ignore-parameters-to-function-regex": "describe"
63
- }
64
- ],
65
- "missing-jsdoc": true,
66
- "no-backbone-get-set-outside-model": false,
67
- "no-cookies": false,
68
- "no-delete-expression": false,
69
- "no-disable-auto-sanitization": true,
70
- "no-duplicate-case": true,
71
- "no-duplicate-parameter-names": true,
72
- "no-empty-interfaces": false,
73
- "no-exec-script": true,
74
- "no-function-expression": false,
75
- "no-multiple-var-decl": false,
76
- "no-string-based-set-immediate": false,
77
- "no-string-based-set-interval": false,
78
- "no-unnecessary-bind": false,
79
- "no-unused-imports": true,
80
- "no-with-statement": false,
81
- "prefer-array-literal": false,
82
- "typedef": [
83
- true,
84
- "call-signature",
85
- "parameter",
86
- "property-declaration",
87
- "variable-declaration",
88
- "arrow-parameter",
89
- "member-variable-declaration"
90
- ],
91
- "use-named-parameter": false,
92
- "valid-typeof": true,
93
- "whitespace": [
94
- true,
95
- "check-branch",
96
- "check-decl",
97
- "check-operator",
98
- "check-separator",
99
- "check-type"
100
- ]
101
- }
102
- }
103
- ],
104
- "no-control-regex": "error",
105
- "no-constant-condition": "error",
106
- "no-invalid-regexp": "error",
107
- "curly": "error",
108
- "eol-last": [
109
- "error",
110
- "always"
111
- ],
112
- "guard-for-in": "error",
113
- "no-labels": "error",
114
- "max-len": [
115
- "error",
116
- {
117
- "code": 140,
118
- "tabWidth": 4,
119
- "ignoreComments": true,
120
- "ignoreStrings": true,
121
- "ignoreTemplateLiterals": true,
122
- "ignoreRegExpLiterals": true
123
- }
124
- ],
125
- "no-console": [
126
- "error",
127
- {
128
- "allow": [
129
- "warn",
130
- "dir",
131
- "timeLog",
132
- "assert",
133
- "clear",
134
- "count",
135
- "countReset",
136
- "group",
137
- "groupEnd",
138
- "table",
139
- "dirxml",
140
- "error",
141
- "groupCollapsed",
142
- "Console",
143
- "profile",
144
- "profileEnd",
145
- "timeStamp",
146
- "context"
147
- ]
148
- }
149
- ],
150
- "no-redeclare": [
151
- "error",
152
- {
153
- "builtinGlobals": true
154
- }
155
- ],
156
- "@typescript-eslint/no-parameter-properties": "error",
157
- "@typescript-eslint/indent": [
158
- "error",
159
- 4,
160
- {
161
- "CallExpression": {
162
- "arguments": "first"
163
- },
164
- "FunctionDeclaration": {
165
- "parameters": "first"
166
- },
167
- "FunctionExpression": {
168
- "parameters": "first"
169
- }
170
- }
171
- ],
172
- "no-debugger": "error",
173
- "no-eval": "error",
174
- "no-extra-semi": "error",
175
- "no-throw-literal": "error",
176
- "no-fallthrough": "error",
177
- "comma-dangle": [
178
- "error",
179
- "never"
180
- ],
181
- "no-trailing-spaces": "error",
182
- "@typescript-eslint/no-unused-expressions": "error",
183
- "@typescript-eslint/no-var-requires": "error",
184
- "one-var": [
185
- "error",
186
- "never"
187
- ],
188
- "@typescript-eslint/no-explicit-any": "warn",
189
- "no-cond-assign": [
190
- "error",
191
- "always"
192
- ],
193
- "@typescript-eslint/consistent-type-assertions": "off",
194
- "jsdoc/check-alignment": "error",
195
- "no-empty": "error",
196
- "quotes": [
197
- "error",
198
- "single"
199
- ],
200
- "semi": [
201
- "error",
202
- "always"
203
- ],
204
- "eqeqeq": [
205
- "error",
206
- "smart"
207
- ],
208
- "valid-typeof": [
209
- "error",
210
- {
211
- "requireStringLiterals": true
212
- }
213
- ],
214
- "camelcase": [
215
- "error",
216
- {
217
- "properties": "always",
218
- "ignoreDestructuring": true,
219
- "ignoreImports": true
220
- }
221
- ],
222
- "no-irregular-whitespace": [
223
- "error",
224
- {
225
- "skipStrings": true,
226
- "skipComments": true,
227
- "skipRegExps": true,
228
- "skipTemplates": true
229
- }
230
- ],
231
- "valid-jsdoc": [
232
- "error",
233
- {
234
- "prefer": {
235
- "arg": "param",
236
- "argument": "param",
237
- "class": "constructor",
238
- "return": "returns",
239
- "virtual": "abstract"
240
- }
241
- }
242
- ],
243
- "no-var": "error",
244
- "radix": "error"
245
- },
246
- "reportUnusedDisableDirectives": true,
247
- "overrides": [
248
- {
249
- "files": [
250
- "node_modules",
251
- "dist",
252
- "public",
253
- "coverage",
254
- "test-report"
255
- ],
256
- "rules": {
257
- "no-unused-expressions": "off"
258
- }
259
- }
260
- ]
261
- }
package/tslint.json DELETED
@@ -1,111 +0,0 @@
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
- }