@syncfusion/ej2-dropdowns 32.2.3 → 32.2.6

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 : 32.2.3
3
+ * version : 32.2.4
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-dropdowns",
3
- "version": "32.2.3",
3
+ "version": "32.2.6",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -8,13 +8,13 @@
8
8
  "module": "./index.js",
9
9
  "es2015": "./dist/es6/ej2-dropdowns.es5.js",
10
10
  "dependencies": {
11
- "@syncfusion/ej2-base": "~32.2.3",
11
+ "@syncfusion/ej2-base": "~32.2.6",
12
12
  "@syncfusion/ej2-data": "~32.2.3",
13
13
  "@syncfusion/ej2-inputs": "~32.2.3",
14
- "@syncfusion/ej2-lists": "~32.2.3",
15
- "@syncfusion/ej2-navigations": "~32.2.3",
14
+ "@syncfusion/ej2-lists": "~32.2.6",
15
+ "@syncfusion/ej2-navigations": "~32.2.6",
16
16
  "@syncfusion/ej2-notifications": "~32.2.3",
17
- "@syncfusion/ej2-popups": "~32.2.3"
17
+ "@syncfusion/ej2-popups": "~32.2.6"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -591,6 +591,7 @@ export declare class DropDownList extends DropDownBase implements IInput {
591
591
  }[], e?: Object, isUpdated?: boolean): void;
592
592
  private isValueInList;
593
593
  private checkFieldValue;
594
+ private checkAndFetchItemData;
594
595
  private updateActionCompleteDataValues;
595
596
  private addNewItem;
596
597
  protected updateActionCompleteData(li: HTMLElement, item: {
@@ -2382,37 +2382,10 @@ var DropDownList = /** @class */ (function (_super) {
2382
2382
  this.activeIndex = this.index;
2383
2383
  this.initialRemoteRender = false;
2384
2384
  if (this.value && this.dataSource instanceof DataManager) {
2385
- var checkField_1 = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;
2386
- var value_1 = this.allowObjectBinding && !isNullOrUndefined(this.value) ?
2387
- getValue(checkField_1, this.value) : this.value;
2388
- var fieldValue_1 = this.fields.value.split('.');
2389
- var checkVal = list.some(function (x) {
2390
- return isNullOrUndefined(x[checkField_1]) && fieldValue_1.length > 1 ?
2391
- _this.checkFieldValue(x, fieldValue_1) === value_1 : x[checkField_1] === value_1;
2392
- });
2393
- if (this.enableVirtualization && this.virtualGroupDataSource) {
2394
- checkVal = this.virtualGroupDataSource.some(function (x) {
2395
- return isNullOrUndefined(x[checkField_1]) && fieldValue_1.length > 1 ?
2396
- _this.checkFieldValue(x, fieldValue_1) === value_1 : x[checkField_1] === value_1;
2397
- });
2398
- }
2399
- if (!checkVal && !this.enableVirtualization) {
2400
- this.dataSource.executeQuery(this.getQuery(this.query).where(new Predicate(checkField_1, 'equal', value_1)))
2401
- .then(function (e) {
2402
- if (e.result.length > 0) {
2403
- if (!_this.enableVirtualization) {
2404
- _this.addItem(e.result, list.length);
2405
- }
2406
- _this.updateValues();
2407
- }
2408
- else {
2409
- _this.updateValues();
2410
- }
2411
- });
2412
- }
2413
- else {
2414
- this.updateValues();
2415
- }
2385
+ var checkField = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;
2386
+ var value = this.allowObjectBinding && !isNullOrUndefined(this.value) ?
2387
+ getValue(checkField, this.value) : this.value;
2388
+ this.checkAndFetchItemData(list, value, checkField);
2416
2389
  }
2417
2390
  else {
2418
2391
  this.updateValues();
@@ -2520,6 +2493,46 @@ var DropDownList = /** @class */ (function (_super) {
2520
2493
  });
2521
2494
  return checkField;
2522
2495
  };
2496
+ DropDownList.prototype.checkAndFetchItemData = function (list, value, checkField) {
2497
+ var _this = this;
2498
+ var fieldValue = this.fields.value.split('.');
2499
+ var checkVal = list.some(function (x) {
2500
+ return isNullOrUndefined(x[checkField]) && fieldValue.length > 1 ?
2501
+ _this.checkFieldValue(x, fieldValue) === value : x[checkField] === value;
2502
+ });
2503
+ if (this.enableVirtualization && this.virtualGroupDataSource) {
2504
+ checkVal = this.virtualGroupDataSource.some(function (x) {
2505
+ return isNullOrUndefined(x[checkField]) && fieldValue.length > 1 ?
2506
+ _this.checkFieldValue(x, fieldValue) === value : x[checkField] === value;
2507
+ });
2508
+ }
2509
+ if (!checkVal && this.dataSource instanceof DataManager) {
2510
+ (this.dataSource).executeQuery(this.getQuery(this.query).where(new Predicate(checkField, 'equal', value)))
2511
+ .then(function (e) {
2512
+ if (e.result.length > 0) {
2513
+ if (!_this.enableVirtualization) {
2514
+ _this.addItem(e.result, list.length);
2515
+ }
2516
+ else {
2517
+ _this.itemData = e.result[0];
2518
+ var dataItem = _this.getItemData();
2519
+ if ((_this.value === dataItem.value && _this.text !== dataItem.text) ||
2520
+ (_this.value !== dataItem.value && _this.text === dataItem.text)) {
2521
+ _this.setProperties({ text: dataItem.text.toString() });
2522
+ Input.setValue(_this.text, _this.inputElement, _this.floatLabelType, _this.showClearButton);
2523
+ }
2524
+ }
2525
+ _this.updateValues();
2526
+ }
2527
+ else {
2528
+ _this.updateValues();
2529
+ }
2530
+ });
2531
+ }
2532
+ else {
2533
+ this.updateValues();
2534
+ }
2535
+ };
2523
2536
  DropDownList.prototype.updateActionCompleteDataValues = function (ulElement, list) {
2524
2537
  this.actionCompleteData = { ulElement: ulElement.cloneNode(true), list: list, isUpdated: true };
2525
2538
  if (this.actionData.list !== this.actionCompleteData.list && this.actionCompleteData.ulElement && this.actionCompleteData.list) {
@@ -2529,10 +2542,10 @@ var DropDownList = /** @class */ (function (_super) {
2529
2542
  DropDownList.prototype.addNewItem = function (listData, newElement) {
2530
2543
  var _this = this;
2531
2544
  if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
2532
- var value_2 = this.getItemData().value;
2545
+ var value_1 = this.getItemData().value;
2533
2546
  var isExist = listData.some(function (data) {
2534
- return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value_2) ||
2535
- (getValue(_this.fields.value, data) === value_2));
2547
+ return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value_1) ||
2548
+ (getValue(_this.fields.value, data) === value_1));
2536
2549
  });
2537
2550
  if (!isExist) {
2538
2551
  this.addItem(this.itemData);
@@ -3947,6 +3960,12 @@ var DropDownList = /** @class */ (function (_super) {
3947
3960
  return { value: void 0 };
3948
3961
  }
3949
3962
  if (this_1.enableVirtualization) {
3963
+ if (newProp.value && this_1.dataSource instanceof DataManager) {
3964
+ var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
3965
+ var value = this_1.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
3966
+ getValue(checkField, newProp.value) : newProp.value;
3967
+ this_1.checkAndFetchItemData(this_1.listData, value, checkField);
3968
+ }
3950
3969
  this_1.updateValues();
3951
3970
  this_1.updateInputFields();
3952
3971
  this_1.notify('setCurrentViewDataAsync', {
@@ -3975,9 +3994,9 @@ var DropDownList = /** @class */ (function (_super) {
3975
3994
  var listLength_2 = this_1.getItems().length;
3976
3995
  var checkField = isNullOrUndefined(this_1.fields.value) ? this_1.fields.text : this_1.fields.value;
3977
3996
  this_1.typedString = '';
3978
- var value_3 = this_1.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
3997
+ var value_2 = this_1.allowObjectBinding && !isNullOrUndefined(newProp.value) ?
3979
3998
  getValue(checkField, newProp.value) : newProp.value;
3980
- this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', value_3)))
3999
+ this_1.dataSource.executeQuery(this_1.getQuery(this_1.query).where(new Predicate(checkField, 'equal', value_2)))
3981
4000
  .then(function (e) {
3982
4001
  if (e.result.length > 0) {
3983
4002
  _this.addItem(e.result, listLength_2);
@@ -2,6 +2,9 @@
2
2
  @forward 'ej2-base/styles/definition/material3-dark';
3
3
 
4
4
  //layout variables
5
+ $list-header-bg-color: $transparent !default;
6
+ $list-header-text-color: rgba($content-text-color-alt1) !default;
7
+ $list-header-icon-color: rgba($icon-color) !default;
5
8
  $listbox-font-family: $font-family !default;
6
9
  $listbox-icon-margin-right: 16px !default;
7
10
  $listbox-icon-line-height: 34px !default;
@@ -111,8 +114,8 @@ $listbox-header-border: rgba($border-light) !default;
111
114
  $checkmark-bgcolor: rgba($primary) !default;
112
115
  $checkmark-border-color: transparent !default;
113
116
  $checkmark-color: rgba($primary-text-color) !default;
114
- $listbox-groupheader-text-color: rgba($content-text-color-alt1) !default;
115
- $listbox-groupheader-bg: $content-bg-color-alt2 !default;
117
+ $listbox-groupheader-text-color: $list-header-text-color !default;
118
+ $listbox-groupheader-bg: $list-header-bg-color !default;
116
119
  $listbox-groupheader-border: rgba($content-text-color-alt1) !default;
117
120
  $listbox-groupheader-icon: rgba($icon-color) !default;
118
121
  $listbox-template-multiline-header-color: rgba($content-text-color) !default;
@@ -2,6 +2,9 @@
2
2
  @forward 'ej2-base/styles/definition/material3';
3
3
 
4
4
  //layout variables
5
+ $list-header-bg-color: $transparent !default;
6
+ $list-header-text-color: rgba($content-text-color-alt1) !default;
7
+ $list-header-icon-color: rgba($icon-color) !default;
5
8
  $listbox-font-family: $font-family !default;
6
9
  $listbox-icon-margin-right: 16px !default;
7
10
  $listbox-icon-line-height: 34px !default;
@@ -111,8 +114,8 @@ $listbox-header-border: rgba($border-light) !default;
111
114
  $checkmark-bgcolor: rgba($primary) !default;
112
115
  $checkmark-border-color: transparent !default;
113
116
  $checkmark-color: rgba($primary-text-color) !default;
114
- $listbox-groupheader-text-color: rgba($content-text-color-alt1) !default;
115
- $listbox-groupheader-bg: $content-bg-color-alt2 !default;
117
+ $listbox-groupheader-text-color: $list-header-text-color !default;
118
+ $listbox-groupheader-bg: $list-header-bg-color !default;
116
119
  $listbox-groupheader-border: rgba($content-text-color-alt1) !default;
117
120
  $listbox-groupheader-icon: rgba($icon-color) !default;
118
121
  $listbox-template-multiline-header-color: rgba($content-text-color) !default;
@@ -838,7 +838,7 @@ ejs-listbox {
838
838
  .e-listbox-wrapper .e-list-group-item,
839
839
  .e-listbox-container .e-list-group-item,
840
840
  .e-listboxtool-wrapper .e-list-group-item {
841
- background-color: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.08), rgba(var(--color-sf-primary), 0.08)), rgba(var(--color-sf-surface));
841
+ background-color: transparent;
842
842
  border-color: rgba(var(--color-sf-outline-variant));
843
843
  color: rgba(var(--color-sf-on-surface-variant));
844
844
  font-size: 12px;
@@ -844,7 +844,7 @@ ejs-listbox {
844
844
  .e-listbox-wrapper .e-list-group-item,
845
845
  .e-listbox-container .e-list-group-item,
846
846
  .e-listboxtool-wrapper .e-list-group-item {
847
- background-color: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.08), rgba(var(--color-sf-primary), 0.08)), rgba(var(--color-sf-surface));
847
+ background-color: transparent;
848
848
  border-color: rgba(var(--color-sf-outline-variant));
849
849
  color: rgba(var(--color-sf-on-surface-variant));
850
850
  font-size: 12px;
@@ -5628,7 +5628,7 @@ ejs-listbox {
5628
5628
  .e-listbox-wrapper .e-list-group-item,
5629
5629
  .e-listbox-container .e-list-group-item,
5630
5630
  .e-listboxtool-wrapper .e-list-group-item {
5631
- background-color: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.08), rgba(var(--color-sf-primary), 0.08)), rgba(var(--color-sf-surface));
5631
+ background-color: transparent;
5632
5632
  border-color: rgba(var(--color-sf-outline-variant));
5633
5633
  color: rgba(var(--color-sf-on-surface-variant));
5634
5634
  font-size: 12px;
@@ -7632,7 +7632,7 @@ ejs-listbox {
7632
7632
  .e-listbox-wrapper .e-list-group-item,
7633
7633
  .e-listbox-container .e-list-group-item,
7634
7634
  .e-listboxtool-wrapper .e-list-group-item {
7635
- background-color: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.08), rgba(var(--color-sf-primary), 0.08)), rgba(var(--color-sf-surface));
7635
+ background-color: transparent;
7636
7636
  border-color: rgba(var(--color-sf-outline-variant));
7637
7637
  color: rgba(var(--color-sf-on-surface-variant));
7638
7638
  font-size: 12px;
@@ -5568,7 +5568,7 @@ ejs-listbox {
5568
5568
  .e-listbox-wrapper .e-list-group-item,
5569
5569
  .e-listbox-container .e-list-group-item,
5570
5570
  .e-listboxtool-wrapper .e-list-group-item {
5571
- background-color: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.08), rgba(var(--color-sf-primary), 0.08)), rgba(var(--color-sf-surface));
5571
+ background-color: transparent;
5572
5572
  border-color: rgba(var(--color-sf-outline-variant));
5573
5573
  color: rgba(var(--color-sf-on-surface-variant));
5574
5574
  font-size: 12px;
@@ -7582,7 +7582,7 @@ ejs-listbox {
7582
7582
  .e-listbox-wrapper .e-list-group-item,
7583
7583
  .e-listbox-container .e-list-group-item,
7584
7584
  .e-listboxtool-wrapper .e-list-group-item {
7585
- background-color: linear-gradient(0deg, rgba(var(--color-sf-primary), 0.08), rgba(var(--color-sf-primary), 0.08)), rgba(var(--color-sf-surface));
7585
+ background-color: transparent;
7586
7586
  border-color: rgba(var(--color-sf-outline-variant));
7587
7587
  color: rgba(var(--color-sf-on-surface-variant));
7588
7588
  font-size: 12px;