@syncfusion/ej2-dropdowns 21.2.8 → 21.2.10

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +32 -6
  2. package/dist/ej2-dropdowns.min.js +2 -2
  3. package/dist/ej2-dropdowns.umd.min.js +2 -2
  4. package/dist/ej2-dropdowns.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-dropdowns.es2015.js +37 -11
  6. package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
  7. package/dist/es6/ej2-dropdowns.es5.js +37 -11
  8. package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
  9. package/dist/global/ej2-dropdowns.min.js +2 -2
  10. package/dist/global/ej2-dropdowns.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +11 -11
  13. package/src/drop-down-base/drop-down-base.js +3 -0
  14. package/src/drop-down-list/drop-down-list.js +5 -5
  15. package/src/list-box/list-box.d.ts +1 -0
  16. package/src/list-box/list-box.js +20 -0
  17. package/src/multi-select/multi-select-model.d.ts +1 -1
  18. package/src/multi-select/multi-select.js +9 -6
  19. package/styles/bootstrap-dark.css +207 -99
  20. package/styles/bootstrap.css +209 -100
  21. package/styles/bootstrap4.css +209 -100
  22. package/styles/bootstrap5-dark.css +207 -99
  23. package/styles/bootstrap5.css +207 -99
  24. package/styles/fabric-dark.css +207 -99
  25. package/styles/fabric.css +209 -100
  26. package/styles/fluent-dark.css +209 -100
  27. package/styles/fluent.css +209 -100
  28. package/styles/highcontrast-light.css +207 -99
  29. package/styles/highcontrast.css +209 -100
  30. package/styles/list-box/_layout.scss +8 -2
  31. package/styles/list-box/_theme.scss +2 -1
  32. package/styles/list-box/bootstrap-dark.css +207 -99
  33. package/styles/list-box/bootstrap.css +209 -100
  34. package/styles/list-box/bootstrap4.css +209 -100
  35. package/styles/list-box/bootstrap5-dark.css +207 -99
  36. package/styles/list-box/bootstrap5.css +207 -99
  37. package/styles/list-box/fabric-dark.css +207 -99
  38. package/styles/list-box/fabric.css +209 -100
  39. package/styles/list-box/fluent-dark.css +209 -100
  40. package/styles/list-box/fluent.css +209 -100
  41. package/styles/list-box/highcontrast-light.css +207 -99
  42. package/styles/list-box/highcontrast.css +209 -100
  43. package/styles/list-box/material-dark.css +207 -99
  44. package/styles/list-box/material.css +209 -100
  45. package/styles/list-box/tailwind-dark.css +209 -100
  46. package/styles/list-box/tailwind.css +209 -100
  47. package/styles/material-dark.css +207 -99
  48. package/styles/material.css +209 -100
  49. package/styles/tailwind-dark.css +209 -100
  50. package/styles/tailwind.css +209 -100
  51. package/.eslintrc.json +0 -259
  52. package/tslint.json +0 -111
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.2.8
3
+ * version : 21.2.10
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.6",
3
+ "_id": "@syncfusion/ej2-dropdowns@21.2.8",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-wSYI3K3YsYxJKmZOBv9bRpRLH76tyVSOJrgdXvuCJIU15b2imLkegMeUGwSJ4IdPUXi+LqNUWWu7uAH6ZzM2ZA==",
5
+ "_integrity": "sha512-vA6PaPiAP2ql4GITUbDTJWRB7BJG90oDPUbuvykJiX56rbACzgi1Zdt5xtbcE5S8SLa4NcYOzXfq2RRjC8bK3w==",
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.6.tgz",
38
- "_shasum": "56982d04447e3b476ffab41971af04671940f76a",
37
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-21.2.8.tgz",
38
+ "_shasum": "84d90cc60579208255733b85609302961579335d",
39
39
  "_spec": "@syncfusion/ej2-dropdowns@*",
40
40
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
41
41
  "author": {
@@ -43,12 +43,12 @@
43
43
  },
44
44
  "bundleDependencies": false,
45
45
  "dependencies": {
46
- "@syncfusion/ej2-base": "~21.2.3",
47
- "@syncfusion/ej2-data": "~21.2.8",
48
- "@syncfusion/ej2-inputs": "~21.2.8",
49
- "@syncfusion/ej2-lists": "~21.2.6",
50
- "@syncfusion/ej2-navigations": "~21.2.8",
51
- "@syncfusion/ej2-popups": "~21.2.4"
46
+ "@syncfusion/ej2-base": "~21.2.9",
47
+ "@syncfusion/ej2-data": "~21.2.9",
48
+ "@syncfusion/ej2-inputs": "~21.2.9",
49
+ "@syncfusion/ej2-lists": "~21.2.9",
50
+ "@syncfusion/ej2-navigations": "~21.2.9",
51
+ "@syncfusion/ej2-popups": "~21.2.10"
52
52
  },
53
53
  "deprecated": false,
54
54
  "description": "Essential JS 2 DropDown Components",
@@ -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.8",
76
+ "version": "21.2.10",
77
77
  "sideEffects": false,
78
78
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
79
79
  }
@@ -1180,6 +1180,9 @@ var DropDownBase = /** @class */ (function (_super) {
1180
1180
  }
1181
1181
  }
1182
1182
  }
1183
+ if (this.getModuleName() === 'listbox' && this.isReact) {
1184
+ this.renderReactTemplates();
1185
+ }
1183
1186
  if (selectedItemValue || itemIndex === 0) {
1184
1187
  this.updateSelection();
1185
1188
  }
@@ -925,7 +925,7 @@ var DropDownList = /** @class */ (function (_super) {
925
925
  this.removeSelection();
926
926
  li.classList.add(dropDownBaseClasses.selected);
927
927
  this.removeHover();
928
- var value = this.getFormattedValue(li.getAttribute('data-value'));
928
+ var value = li.getAttribute('data-value') !== "null" ? this.getFormattedValue(li.getAttribute('data-value')) : null;
929
929
  var selectedData = this.getDataByValue(value);
930
930
  if (!this.initial && !preventSelect && !isNullOrUndefined(e)) {
931
931
  var items = this.detachChanges(selectedData);
@@ -1041,7 +1041,9 @@ var DropDownList = /** @class */ (function (_super) {
1041
1041
  }
1042
1042
  if (Browser.info.name !== 'mozilla') {
1043
1043
  if (this.targetElement()) {
1044
- attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
1044
+ if (this.getModuleName() !== 'combobox') {
1045
+ attributes(this.targetElement(), { 'aria-describedby': this.inputElement.id !== '' ? this.inputElement.id : this.element.id });
1046
+ }
1045
1047
  this.targetElement().removeAttribute('aria-live');
1046
1048
  }
1047
1049
  }
@@ -1094,9 +1096,7 @@ var DropDownList = /** @class */ (function (_super) {
1094
1096
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1095
1097
  var valueCompTemp = compiledString(this.itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, this.valueTempElement);
1096
1098
  if (valueCompTemp && valueCompTemp.length > 0) {
1097
- for (var i = 0; i < valueCompTemp.length; i++) {
1098
- this.valueTempElement.appendChild(valueCompTemp[i]);
1099
- }
1099
+ append(valueCompTemp, this.valueTempElement);
1100
1100
  }
1101
1101
  this.renderReactTemplates();
1102
1102
  };
@@ -132,6 +132,7 @@ export declare class ListBox extends DropDownBase {
132
132
  private toolbarAction;
133
133
  private isDataSourceUpdate;
134
134
  private dragValue;
135
+ private customDraggedItem;
135
136
  /**
136
137
  * Sets the CSS classes to root element of this component, which helps to customize the
137
138
  * complete styles.
@@ -472,6 +472,7 @@ var ListBox = /** @class */ (function (_super) {
472
472
  this.trigger('drag', this.getDragArgs(args));
473
473
  };
474
474
  ListBox.prototype.beforeDragEnd = function (args) {
475
+ var items = [];
475
476
  this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
476
477
  if (this.value.indexOf(this.dragValue) > -1) {
477
478
  args.items = this.getDataByValues(this.value);
@@ -479,7 +480,11 @@ var ListBox = /** @class */ (function (_super) {
479
480
  else {
480
481
  args.items = this.getDataByValues([this.dragValue]);
481
482
  }
483
+ extend(items, args.items);
482
484
  this.trigger('beforeDrop', args);
485
+ if (args.items !== items) {
486
+ this.customDraggedItem = args.items;
487
+ }
483
488
  };
484
489
  ListBox.prototype.dragEnd = function (args) {
485
490
  var _this = this;
@@ -527,6 +532,12 @@ var ListBox = /** @class */ (function (_super) {
527
532
  liColl.splice(toIdx_1, 0, liColl.splice(rIdx, 1)[0]);
528
533
  if (this.allowDragAll) {
529
534
  selectedOptions = this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 ? this.value : [dropValue];
535
+ if (!isNullOrUndefined(this.customDraggedItem)) {
536
+ selectedOptions = [];
537
+ this.customDraggedItem.forEach(function (item) {
538
+ selectedOptions.push(getValue(_this.fields.value, item));
539
+ });
540
+ }
530
541
  selectedOptions.forEach(function (value) {
531
542
  if (value !== dropValue) {
532
543
  var idx = listData.indexOf(_this.getDataByValue(value));
@@ -559,6 +570,12 @@ var ListBox = /** @class */ (function (_super) {
559
570
  sortedData = [].slice.call(listObj.sortedData);
560
571
  selectedOptions = (this.value && Array.prototype.indexOf.call(this.value, dropValue) > -1 && this.allowDragAll)
561
572
  ? this.value : [dropValue];
573
+ if (!isNullOrUndefined(this.customDraggedItem)) {
574
+ selectedOptions = [];
575
+ this.customDraggedItem.forEach(function (item) {
576
+ selectedOptions.push(getValue(_this.fields.value, item));
577
+ });
578
+ }
562
579
  var fListData_1 = [].slice.call(this.listData);
563
580
  var fSortData_1 = [].slice.call(this.sortedData);
564
581
  selectedOptions.forEach(function (value, index) {
@@ -629,6 +646,9 @@ var ListBox = /** @class */ (function (_super) {
629
646
  var dragArgs1 = extend(destArgs, { currentData: listData });
630
647
  dragArgs = extend(dragArgs, { destination: dragArgs1 });
631
648
  }
649
+ if (!isNullOrUndefined(this.customDraggedItem)) {
650
+ dragArgs.items = this.customDraggedItem;
651
+ }
632
652
  this.trigger('drop', dragArgs);
633
653
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
634
654
  var liCollElem = dragArgs.elements;
@@ -1,4 +1,4 @@
1
- import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';import { EventHandler, Property, Event, compile, L10n, EmitType, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, prepend, Complex } from '@syncfusion/ej2-base';import { Search } from '../common/incremental-search';import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined, ModuleDeclaration } from '@syncfusion/ej2-base';import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
1
+ import { DropDownBase, SelectEventArgs, dropDownBaseClasses, PopupEventArgs, FilteringEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, BeforeOpenEventArgs, FilterType, FieldSettings, ResultData } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, FloatLabelType, Input } from '@syncfusion/ej2-inputs';import { attributes, setValue, SanitizeHtmlHelper, getValue } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';import { EventHandler, Property, Event, compile, L10n, EmitType, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, prepend, Complex } from '@syncfusion/ej2-base';import { Search } from '../common/incremental-search';import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined, ModuleDeclaration } from '@syncfusion/ej2-base';import { DataManager, Query, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';import { SortOrder } from '@syncfusion/ej2-lists';import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
2
2
  import {visualMode,MultiSelectChangeEventArgs,RemoveEventArgs,ISelectAllEventArgs,TaggingEventArgs,CustomValueEventArgs} from "./multi-select";
3
3
  import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
4
4
 
@@ -30,7 +30,7 @@ import { Animation, Browser, prepend, Complex } from '@syncfusion/ej2-base';
30
30
  import { Search } from '../common/incremental-search';
31
31
  import { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';
32
32
  import { getUniqueID, formatUnit, isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base';
33
- import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';
33
+ import { DataManager, Query, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';
34
34
  import { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';
35
35
  var FOCUS = 'e-input-focus';
36
36
  var DISABLED = 'e-disabled';
@@ -398,7 +398,12 @@ var MultiSelect = /** @class */ (function (_super) {
398
398
  predicate = predicate.or(field, 'equal', valuecheck[i]);
399
399
  }
400
400
  }
401
- return this.getQuery(this.query).where(predicate);
401
+ if (this.dataSource instanceof DataManager && this.dataSource.adaptor instanceof JsonAdaptor) {
402
+ return new Query().where(predicate);
403
+ }
404
+ else {
405
+ return this.getQuery(this.query).clone().where(predicate);
406
+ }
402
407
  };
403
408
  /* eslint-disable @typescript-eslint/no-unused-vars */
404
409
  MultiSelect.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
@@ -417,7 +422,7 @@ var MultiSelect = /** @class */ (function (_super) {
417
422
  }
418
423
  }
419
424
  var valuecheck = [];
420
- if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {
425
+ if (!isNullOrUndefined(this.value)) {
421
426
  valuecheck = this.presentItemValue(this.ulElement);
422
427
  }
423
428
  if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)
@@ -1932,9 +1937,7 @@ var MultiSelect = /** @class */ (function (_super) {
1932
1937
  // eslint-disable-next-line
1933
1938
  var valueCompTemp = compiledString(itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, chipContent);
1934
1939
  if (valueCompTemp && valueCompTemp.length > 0) {
1935
- for (var i = 0; i < valueCompTemp.length; i++) {
1936
- chipContent.appendChild(valueCompTemp[i]);
1937
- }
1940
+ append(valueCompTemp, chipContent);
1938
1941
  }
1939
1942
  this.renderReactTemplates();
1940
1943
  }