@syncfusion/ej2-multicolumn-combobox 27.2.2 → 27.2.4

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.2.2
3
+ * version : 27.2.4
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-multicolumn-combobox@*",
3
- "_id": "@syncfusion/ej2-multicolumn-combobox@27.1.50",
3
+ "_id": "@syncfusion/ej2-multicolumn-combobox@27.2.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-EOofLYL5/E3dbDSlmJDXjMWYY7pDlBOWu7XDJgsLZIdRoSpMi0k/qMQXoCkCC6LKhmZzJlv6ft9W+v2BeH5t8Q==",
5
+ "_integrity": "sha512-CkUV8XpzLeT7Q3yc5z5TpX0LW8o/TU3uSkv0MR8iLizOiwey/6vvZuDtMb+109OZSMSHGvE8j1yvaxpHUNFIYw==",
6
6
  "_location": "/@syncfusion/ej2-multicolumn-combobox",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-multicolumn-combobox",
24
24
  "/@syncfusion/ej2-vue-multicolumn-combobox"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-multicolumn-combobox/-/ej2-multicolumn-combobox-27.1.50.tgz",
27
- "_shasum": "ed0fd49d62ea9ae2daa5ff23abfea820aaed40e5",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-multicolumn-combobox/-/ej2-multicolumn-combobox-27.2.3.tgz",
27
+ "_shasum": "31dc86ead9867dad09ea2231e6a0c57b96931507",
28
28
  "_spec": "@syncfusion/ej2-multicolumn-combobox@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
30
30
  "author": {
@@ -36,7 +36,7 @@
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
38
  "@syncfusion/ej2-base": "~27.2.2",
39
- "@syncfusion/ej2-grids": "~27.2.2"
39
+ "@syncfusion/ej2-grids": "~27.2.4"
40
40
  },
41
41
  "deprecated": false,
42
42
  "description": "Essential JS 2 Component",
@@ -57,6 +57,6 @@
57
57
  "url": "git+https://github.com/syncfusion/ej2-multicolumn-combobox-component.git"
58
58
  },
59
59
  "typings": "index.d.ts",
60
- "version": "27.2.2",
60
+ "version": "27.2.4",
61
61
  "sideEffects": false
62
62
  }
@@ -1,5 +1,5 @@
1
- import { Component, EventHandler, INotifyPropertyChanged, Property, NotifyPropertyChanges, closest, attributes, append, compile, detach, KeyboardEvents, isNullOrUndefined } from '@syncfusion/ej2-base';import { ChildProperty, prepend, Collection, getUniqueID, Complex, isNullOrUndefined as isNOU, select, L10n, Browser } from '@syncfusion/ej2-base';import { formatUnit, addClass, removeClass, NumberFormatOptions, DateFormatOptions, Event, EmitType, AnimationModel, Animation, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DataManager, Query, Group } from '@syncfusion/ej2-data';import { Popup } from '@syncfusion/ej2-popups';import { Grid, FailureEventArgs, VirtualScroll, Group as GridGroup, Edit, Sort, GridColumnModel } from '@syncfusion/ej2-grids';
2
- import {TextAlign,GridLine,WrapMode,DataResult,FilterType,FloatLabelType,SortOrder,SortType,PopupEventArgs,FilteringEventArgs,SelectEventArgs,ChangeEventArgs} from "./multi-column-combo-box";
1
+ import { Component, EventHandler, INotifyPropertyChanged, Property, NotifyPropertyChanges, closest, attributes, append, compile, detach, KeyboardEvents, isNullOrUndefined } from '@syncfusion/ej2-base';import { ChildProperty, prepend, Collection, getUniqueID, Complex, isNullOrUndefined as isNOU, select, L10n, Browser } from '@syncfusion/ej2-base';import { formatUnit, addClass, removeClass, NumberFormatOptions, DateFormatOptions, Event, EmitType, AnimationModel, Animation, KeyboardEventArgs } from '@syncfusion/ej2-base';import { Input, InputObject } from '@syncfusion/ej2-inputs';import { DataManager, Query, Group } from '@syncfusion/ej2-data';import { Popup } from '@syncfusion/ej2-popups';import { Grid, Resize, FailureEventArgs, VirtualScroll, Group as GridGroup, Edit, Sort, GridColumnModel } from '@syncfusion/ej2-grids';
2
+ import {TextAlign,GridLine,WrapMode,ResizeArgs,DataResult,FilterType,FloatLabelType,SortOrder,SortType,PopupEventArgs,FilteringEventArgs,SelectEventArgs,ChangeEventArgs} from "./multi-column-combo-box";
3
3
  import {ComponentModel} from '@syncfusion/ej2-base';
4
4
 
5
5
  /**
@@ -167,6 +167,34 @@ export interface GridSettingsModel {
167
167
  */
168
168
  textWrapMode?: WrapMode | string;
169
169
 
170
+ /**
171
+ * Specifies whether resizing of columns is enabled in the popup grid content.
172
+ *
173
+ * @default false
174
+ */
175
+ allowResizing?: boolean;
176
+
177
+ /**
178
+ * Triggers during the column resizing.
179
+ *
180
+ * @event resizing
181
+ */
182
+ resizing?: EmitType<ResizeArgs>;
183
+
184
+ /**
185
+ * Triggers when the column resizing begins.
186
+ *
187
+ * @event resizeStart
188
+ */
189
+ resizeStart?: EmitType<ResizeArgs>;
190
+
191
+ /**
192
+ * Triggers when the column resizing ends.
193
+ *
194
+ * @event resizeStop
195
+ */
196
+ resizeStop?: EmitType<ResizeArgs>;
197
+
170
198
  }
171
199
 
172
200
  /**
@@ -241,6 +241,30 @@ export declare class GridSettings extends ChildProperty<GridSettings> {
241
241
  * @asptype WrapMode
242
242
  */
243
243
  textWrapMode: WrapMode | string;
244
+ /**
245
+ * Specifies whether resizing of columns is enabled in the popup grid content.
246
+ *
247
+ * @default false
248
+ */
249
+ allowResizing: boolean;
250
+ /**
251
+ * Triggers during the column resizing.
252
+ *
253
+ * @event resizing
254
+ */
255
+ resizing: EmitType<ResizeArgs>;
256
+ /**
257
+ * Triggers when the column resizing begins.
258
+ *
259
+ * @event resizeStart
260
+ */
261
+ resizeStart: EmitType<ResizeArgs>;
262
+ /**
263
+ * Triggers when the column resizing ends.
264
+ *
265
+ * @event resizeStop
266
+ */
267
+ resizeStop: EmitType<ResizeArgs>;
244
268
  }
245
269
  export interface PopupEventArgs {
246
270
  /**
@@ -368,6 +392,18 @@ export interface ChangeEventArgs {
368
392
  */
369
393
  item: Object;
370
394
  }
395
+ export interface ResizeArgs {
396
+ /**
397
+ * Defines the details about the column that is currently being resized.
398
+ */
399
+ column: ColumnModel;
400
+ /**
401
+ * Specifies whether to cancel the resizing operation of the columns.
402
+ *
403
+ * @default false
404
+ */
405
+ cancel: boolean;
406
+ }
371
407
  /**
372
408
  * @hidden
373
409
  */
@@ -741,6 +777,7 @@ export declare class MultiColumnComboBox extends Component<HTMLElement> implemen
741
777
  private matchedContent;
742
778
  private isDataFiltered;
743
779
  private isInitialRender;
780
+ private remoteDataLength;
744
781
  /**
745
782
  * *Constructor for creating the component
746
783
  *
@@ -774,6 +811,7 @@ export declare class MultiColumnComboBox extends Component<HTMLElement> implemen
774
811
  private persistData;
775
812
  protected render(): void;
776
813
  private renderGrid;
814
+ private handleActionComplete;
777
815
  private isRowMatching;
778
816
  private updateRowSelection;
779
817
  private selectDataRow;
@@ -826,6 +864,7 @@ export declare class MultiColumnComboBox extends Component<HTMLElement> implemen
826
864
  private keyActionHandler;
827
865
  private gridKeyActionHandler;
828
866
  private updateSelectedItem;
867
+ private selectRow;
829
868
  private updateClearIconState;
830
869
  /**
831
870
  * Sets the focus to the component for interaction.component for interaction.
@@ -23,7 +23,7 @@ import { formatUnit, addClass, removeClass, Event, Animation } from '@syncfusion
23
23
  import { Input } from '@syncfusion/ej2-inputs';
24
24
  import { DataManager, Query } from '@syncfusion/ej2-data';
25
25
  import { Popup } from '@syncfusion/ej2-popups';
26
- import { Grid, VirtualScroll, Group as GridGroup, Edit, Sort } from '@syncfusion/ej2-grids';
26
+ import { Grid, Resize, VirtualScroll, Group as GridGroup, Edit, Sort } from '@syncfusion/ej2-grids';
27
27
  var DROPDOWNICON = 'e-input-group-icon e-multicolumn-list-icon e-icons';
28
28
  var CONTENT = 'e-popup-content';
29
29
  var ICONANIMATION = 'e-icon-anim';
@@ -42,7 +42,7 @@ var MultiColumnGrid = /** @class */ (function () {
42
42
  * @private
43
43
  */
44
44
  MultiColumnGrid.prototype.InjectModules = function () {
45
- Grid.Inject(VirtualScroll, GridGroup, Edit, Sort);
45
+ Grid.Inject(VirtualScroll, GridGroup, Edit, Sort, Resize);
46
46
  };
47
47
  return MultiColumnGrid;
48
48
  }());
@@ -196,6 +196,18 @@ var GridSettings = /** @class */ (function (_super) {
196
196
  __decorate([
197
197
  Property(WrapMode.Both)
198
198
  ], GridSettings.prototype, "textWrapMode", void 0);
199
+ __decorate([
200
+ Property(false)
201
+ ], GridSettings.prototype, "allowResizing", void 0);
202
+ __decorate([
203
+ Event()
204
+ ], GridSettings.prototype, "resizing", void 0);
205
+ __decorate([
206
+ Event()
207
+ ], GridSettings.prototype, "resizeStart", void 0);
208
+ __decorate([
209
+ Event()
210
+ ], GridSettings.prototype, "resizeStop", void 0);
199
211
  return GridSettings;
200
212
  }(ChildProperty));
201
213
  export { GridSettings };
@@ -308,24 +320,13 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
308
320
  allowTextWrap: this.gridSettings.allowTextWrap,
309
321
  textWrapSettings: { wrapMode: this.gridSettings.textWrapMode },
310
322
  height: this.popupHeight,
323
+ allowResizing: this.gridSettings.allowResizing,
311
324
  allowMultiSorting: this.sortType.toString().toLowerCase() === 'multiplecolumns' && this.allowSorting,
312
325
  rowTemplate: this.itemTemplate,
313
326
  dataBound: function () { _this.onDataBound(); },
314
327
  actionFailure: function (args) { _this.onActionFailure(args); },
315
328
  actionBegin: function (args) { _this.trigger('actionBegin', args); },
316
- actionComplete: function (args) {
317
- _this.trigger('actionComplete', args);
318
- if (args.requestType === 'sorting') {
319
- _this.updateRowSelection(args);
320
- }
321
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
322
- var dataRows = args.rows;
323
- if (_this.isDataFiltered && dataRows.length > 0 && _this.inputEle.value !== '' && args.requestType !== 'sorting') {
324
- var firstRowEle = _this.gridObj.getRows()[0];
325
- firstRowEle.classList.add('e-row-focus');
326
- }
327
- _this.popupObj.refreshPosition();
328
- },
329
+ actionComplete: this.handleActionComplete.bind(this),
329
330
  keyPressed: function (args) {
330
331
  if (args.key === 'Enter') {
331
332
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -341,7 +342,10 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
341
342
  args.cancel = true;
342
343
  _this.gridKeyActionHandler(args, true);
343
344
  }
344
- }
345
+ },
346
+ resizing: function (args) { _this.gridSettings.resizing(args); },
347
+ resizeStart: function (args) { _this.gridSettings.resizeStart(args); },
348
+ resizeStop: function (args) { _this.gridSettings.resizeStop(args); }
345
349
  });
346
350
  this.gridEle = this.createElement('div', { id: getUniqueID('grid'), className: MULTICOLUMNGRID });
347
351
  this.updateGroupByField();
@@ -356,6 +360,14 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
356
360
  }
357
361
  this.gridObj.appendTo(this.gridEle);
358
362
  };
363
+ MultiColumnComboBox.prototype.handleActionComplete = function (args) {
364
+ this.trigger('actionComplete', args);
365
+ if (args.requestType === 'sorting') {
366
+ this.updateRowSelection(args);
367
+ }
368
+ this.popupObj.refreshPosition();
369
+ this.gridObj.element.querySelector('.e-content').scrollTop = 0;
370
+ };
359
371
  /* eslint-disable @typescript-eslint/no-explicit-any */
360
372
  MultiColumnComboBox.prototype.isRowMatching = function (data, selectedValue, selectedText) {
361
373
  var values = Object.values(data).map(String);
@@ -456,6 +468,11 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
456
468
  this.popupEle.style.visibility = 'unset';
457
469
  this.isInitialRender = false;
458
470
  }
471
+ var rowElements = this.gridObj.element.querySelectorAll('.e-row');
472
+ if (this.isDataFiltered && rowElements.length > 0 && this.inputEle.value !== '') {
473
+ var firstRowEle = rowElements[0];
474
+ firstRowEle.classList.add('e-row-focus');
475
+ }
459
476
  };
460
477
  MultiColumnComboBox.prototype.onActionFailure = function (args) {
461
478
  this.trigger('actionFailure', args);
@@ -1283,33 +1300,44 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
1283
1300
  }
1284
1301
  };
1285
1302
  MultiColumnComboBox.prototype.updateSelectedItem = function (e, isUpdateIndex, isInputTarget) {
1303
+ var _this = this;
1286
1304
  if (isUpdateIndex === void 0) { isUpdateIndex = true; }
1287
1305
  if (this.isPopupOpen) {
1288
- var index = !this.fields.groupBy ? this.gridObj.selectedRowIndex
1289
- : this.gridObj.selectedRowIndex ? this.gridObj.selectedRowIndex : 0;
1290
- if ((index === -1 && (e.action === 'moveDown' || e.action === 'moveUp')) || (e.action === 'home')) {
1291
- index = 0;
1306
+ var index_1 = this.fields.groupBy ? (this.gridObj.selectedRowIndex || 0) : this.gridObj.selectedRowIndex;
1307
+ var dataLength = this.dataSource instanceof DataManager ? this.remoteDataLength :
1308
+ this.dataSource.length;
1309
+ if ((index_1 === -1 && (e.action === 'moveDown' || e.action === 'moveUp')) || (e.action === 'home')) {
1310
+ index_1 = 0;
1292
1311
  }
1293
- else if ((index >= this.gridObj.getRows().length && e.action === 'moveDown') || (e.action === 'end')) {
1294
- index = this.gridObj.getRows().length - 1;
1312
+ else if ((index_1 >= (dataLength - 1) && e.action === 'moveDown') || (e.action === 'end')) {
1313
+ index_1 = dataLength - 1;
1295
1314
  }
1296
- else if (e.action === 'moveDown' && (index >= 0 && index <= this.gridObj.getRows().length) && (this.fields.groupBy || isInputTarget)) {
1297
- index += 1;
1315
+ else if (e.action === 'moveDown' && (index_1 >= 0 && index_1 <= (dataLength - 1)) && (this.fields.groupBy || isInputTarget)) {
1316
+ index_1 += 1;
1298
1317
  }
1299
- else if (e.action === 'moveUp' && index > 0 && (this.fields.groupBy) || isInputTarget) {
1300
- index -= 1;
1318
+ else if (e.action === 'moveUp' && index_1 > 0 && (this.fields.groupBy) || isInputTarget) {
1319
+ index_1 -= 1;
1301
1320
  }
1302
- this.gridObj.selectRow(index);
1303
- this.gridObj.selectedRowIndex = index;
1304
- var focusedEle = this.gridEle.querySelector('.e-row-focus');
1305
- if (focusedEle) {
1306
- focusedEle.classList.remove('e-row-focus');
1321
+ if (!this.enableVirtualization) {
1322
+ this.selectRow(e, isUpdateIndex, index_1);
1307
1323
  }
1308
- if (isUpdateIndex) {
1309
- this.selectedGridRow(this.gridObj.getRows()[parseInt(index.toString(), 10)], e, true);
1324
+ else {
1325
+ setTimeout(function () { _this.selectRow(e, isUpdateIndex, index_1); });
1310
1326
  }
1311
1327
  }
1312
1328
  };
1329
+ MultiColumnComboBox.prototype.selectRow = function (e, isUpdateIndex, index) {
1330
+ if (isUpdateIndex === void 0) { isUpdateIndex = true; }
1331
+ this.gridObj.selectRow(index);
1332
+ this.gridObj.selectedRowIndex = index;
1333
+ var focusedEle = this.gridEle.querySelector('.e-row-focus');
1334
+ if (focusedEle) {
1335
+ focusedEle.classList.remove('e-row-focus');
1336
+ }
1337
+ if (isUpdateIndex) {
1338
+ this.selectedGridRow(this.gridObj.getRows()[parseInt(index.toString(), 10)], e, true);
1339
+ }
1340
+ };
1313
1341
  MultiColumnComboBox.prototype.updateClearIconState = function () {
1314
1342
  var clearIconEle = this.inputWrapper.querySelector('.e-clear-icon');
1315
1343
  if (clearIconEle) {
@@ -1404,6 +1432,12 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
1404
1432
  _this.inputEle.setAttribute('aria-activedescendant', contentEle.querySelector('.e-row').getAttribute('data-uid'));
1405
1433
  }
1406
1434
  }
1435
+ if (!isNOU(_this.dataSource) && _this.dataSource instanceof DataManager) {
1436
+ _this.dataSource.executeQuery(new Query).then(function (e) {
1437
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1438
+ _this.remoteDataLength = e.result.length;
1439
+ });
1440
+ }
1407
1441
  _this.popupObj.show(new Animation(eventArgs.animation), _this.popupEle);
1408
1442
  }
1409
1443
  });
@@ -1657,6 +1691,7 @@ var MultiColumnComboBox = /** @class */ (function (_super) {
1657
1691
  this.gridObj.gridLines = newProp.gridSettings.gridLines;
1658
1692
  this.gridObj.rowHeight = newProp.gridSettings.rowHeight;
1659
1693
  this.gridObj.enableAltRow = newProp.gridSettings.enableAltRow;
1694
+ this.gridObj.allowResizing = newProp.gridSettings.allowResizing;
1660
1695
  if (!(isNOU(newProp.gridSettings.allowTextWrap))) {
1661
1696
  this.gridObj.allowTextWrap = newProp.gridSettings.allowTextWrap;
1662
1697
  }