@syncfusion/ej2-grids
Advanced tools
Comparing version 16.1.28 to 16.1.29
@@ -9,2 +9,14 @@ # Changelog | ||
- `args.cancel` has included in `rowSelecting` event. | ||
- Dynamically changing filter settings does not update `Filterbar` value and filter status message is resolved. | ||
- Batch edit should close on clicking outside grid and on pressing enter or tab key is resolved. | ||
- `updateRow` method is provided for Normal editing and Dialog editing. | ||
- Duplicate columns added in group drop area issue resolved. | ||
## 16.1.28 (2018-03-09) | ||
### Grid | ||
#### Bug Fixes | ||
- Minimum height for edit dialog is provided. | ||
@@ -16,2 +28,4 @@ - Identity column is not disabled when adding resolved. | ||
## 16.1.24 (2018-02-22) | ||
### Grid | ||
@@ -18,0 +32,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 16.1.26 | ||
* version : 16.1.28 | ||
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"name": "@syncfusion/ej2-grids", | ||
"version": "16.1.28", | ||
"version": "16.1.29", | ||
"description": "Essential JS 2 Grid Component", | ||
@@ -11,9 +11,9 @@ "author": "Syncfusion Inc.", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~16.1.28", | ||
"@syncfusion/ej2-base": "~16.1.29", | ||
"@syncfusion/ej2-data": "~16.1.28", | ||
"@syncfusion/ej2-navigations": "~16.1.28", | ||
"@syncfusion/ej2-inputs": "~16.1.28", | ||
"@syncfusion/ej2-calendars": "~16.1.28", | ||
"@syncfusion/ej2-dropdowns": "~16.1.28", | ||
"@syncfusion/ej2-popups": "~16.1.28", | ||
"@syncfusion/ej2-inputs": "~16.1.29", | ||
"@syncfusion/ej2-calendars": "~16.1.29", | ||
"@syncfusion/ej2-dropdowns": "~16.1.29", | ||
"@syncfusion/ej2-popups": "~16.1.29", | ||
"@syncfusion/ej2-buttons": "~16.1.28", | ||
@@ -20,0 +20,0 @@ "@syncfusion/ej2-lists": "~16.1.28", |
@@ -75,2 +75,3 @@ import { FormValidator } from '@syncfusion/ej2-inputs'; | ||
protected getDataByIndex(index: number): Object; | ||
private keyDownHandler(e); | ||
} |
@@ -24,2 +24,3 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "../base/enum", "../base/util", "../base/constant", "../renderer/row-renderer", "../renderer/cell-renderer", "../models/cell", "../services/row-model-generator"], function (require, exports, ej2_base_1, ej2_base_2, ej2_base_3, enum_1, util_1, events, row_renderer_1, cell_renderer_1, cell_1, row_model_generator_1) { | ||
this.parent.on(events.doubleTap, this.dblClickHandler, this); | ||
this.parent.on(events.keyPressed, this.keyDownHandler, this); | ||
}; | ||
@@ -36,2 +37,3 @@ BatchEdit.prototype.removeEventListener = function () { | ||
this.parent.off(events.doubleTap, this.dblClickHandler); | ||
this.parent.off(events.keyPressed, this.keyDownHandler); | ||
}; | ||
@@ -623,2 +625,3 @@ BatchEdit.prototype.dataBound = function () { | ||
gObj.editModule.destroyForm(); | ||
gObj.isEdit = false; | ||
gObj.editModule.destroyWidgets([column]); | ||
@@ -629,3 +632,2 @@ this.parent.notify(events.tooltipDestroy, {}); | ||
ej2_base_1.removeClass([args.cell], ['e-editedbatchcell', 'e-boolcell']); | ||
gObj.isEdit = false; | ||
if (!ej2_base_3.isNullOrUndefined(args.value) && args.value.toString() === | ||
@@ -642,2 +644,16 @@ (!ej2_base_3.isNullOrUndefined(this.cellDetails.value) ? this.cellDetails.value : '').toString() && !this.isColored) { | ||
}; | ||
BatchEdit.prototype.keyDownHandler = function (e) { | ||
if (e.action === 'tab' && this.parent.isEdit) { | ||
var rowcell = util_1.parentsUntil(e.target, 'e-rowcell'); | ||
if (rowcell) { | ||
var cell = rowcell.querySelector('.e-field'); | ||
if (cell) { | ||
var visibleColumns = this.parent.getVisibleColumns(); | ||
if (visibleColumns[visibleColumns.length - 1].field === cell.getAttribute('name')) { | ||
this.saveCell(); | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
return BatchEdit; | ||
@@ -644,0 +660,0 @@ }()); |
@@ -349,3 +349,3 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-data", "../base/util", "../base/constant", "../services/value-formatter", "../actions/checkbox-filter"], function (require, exports, ej2_base_1, ej2_data_1, util_1, events, value_formatter_1, checkbox_filter_1) { | ||
var deff = new ej2_data_1.Deferred(); | ||
if (args.requestType !== undefined) { | ||
if (args.requestType !== undefined && args.requestType !== 'refresh') { | ||
state.action = args; | ||
@@ -352,0 +352,0 @@ if (args.requestType === 'save' || args.requestType === 'delete') { |
@@ -17,4 +17,5 @@ import { IGrid } from '../base/interface'; | ||
endEdit(): void; | ||
updateRow(index: number, data?: Object): void; | ||
deleteRecord(fieldname?: string, data?: Object): void; | ||
protected startEdit(tr?: Element): void; | ||
} |
@@ -32,2 +32,5 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
DialogEdit.prototype.updateRow = function (index, data) { | ||
_super.prototype.updateRow.call(this, index, data); | ||
}; | ||
DialogEdit.prototype.deleteRecord = function (fieldname, data) { | ||
@@ -34,0 +37,0 @@ _super.prototype.deleteRecord.call(this, fieldname, data); |
@@ -95,3 +95,5 @@ import { FilterSettings } from '../base/grid'; | ||
filterByColumn(fieldName: string, filterOperator: string, filterValue: string | number | Date | boolean, predicate?: string, matchCase?: boolean, ignoreAccent?: boolean, actualFilterValue?: Object, actualOperator?: Object): void; | ||
private applyColumnFormat(filterValue); | ||
private onPropertyChanged(e); | ||
private refreshFilterSettings(); | ||
/** | ||
@@ -98,0 +100,0 @@ * Clears all the filtered rows of the Grid. |
@@ -240,5 +240,3 @@ define(["require", "exports", "@syncfusion/ej2-base", "../base/util", "@syncfusion/ej2-base", "@syncfusion/ej2-data", "../base/constant", "../base/enum", "../renderer/row-renderer", "../models/cell", "../models/row", "../renderer/filter-cell-renderer", "../base/util", "../renderer/filter-menu-renderer", "../actions/checkbox-filter", "../actions/excel-filter"], function (require, exports, ej2_base_1, util_1, ej2_base_2, ej2_data_1, events, enum_1, row_renderer_1, cell_1, row_1, filter_cell_renderer_1, util_2, filter_menu_renderer_1, checkbox_filter_1, excel_filter_1) { | ||
if (!ej2_base_1.isNullOrUndefined(this.column.format)) { | ||
var getFlvalue = (this.column.type === 'date' || this.column.type === 'datetime') ? | ||
new Date(filterValue) : parseFloat(filterValue); | ||
this.values[this.column.field] = this.setFormatForFlColumn(getFlvalue, this.column); | ||
this.applyColumnFormat(filterValue); | ||
} | ||
@@ -250,2 +248,7 @@ else { | ||
}; | ||
Filter.prototype.applyColumnFormat = function (filterValue) { | ||
var getFlvalue = (this.column.type === 'date' || this.column.type === 'datetime') ? | ||
new Date(filterValue) : parseFloat(filterValue); | ||
this.values[this.column.field] = this.setFormatForFlColumn(getFlvalue, this.column); | ||
}; | ||
Filter.prototype.onPropertyChanged = function (e) { | ||
@@ -265,2 +268,3 @@ if (e.module !== this.getModuleName()) { | ||
}); | ||
this.refreshFilterSettings(); | ||
this.updateFilterMsg(); | ||
@@ -283,2 +287,22 @@ } | ||
}; | ||
Filter.prototype.refreshFilterSettings = function () { | ||
if (this.filterSettings.type === 'FilterBar') { | ||
for (var i = 0; i < this.filterSettings.columns.length; i++) { | ||
var filterValue = this.filterSettings.columns[i].value; | ||
filterValue = !ej2_base_1.isNullOrUndefined(filterValue) && filterValue.toString(); | ||
if (!ej2_base_1.isNullOrUndefined(this.column.format)) { | ||
this.applyColumnFormat(filterValue); | ||
} | ||
else { | ||
var key = this.filterSettings.columns[i].field; | ||
this.values[key] = this.filterSettings.columns[i].value; | ||
} | ||
var selector = '[id=\'' + this.filterSettings.columns[i].field + '_filterBarcell\']'; | ||
var filterElement = this.element.querySelector(selector); | ||
if (filterElement) { | ||
filterElement.value = this.filterSettings.columns[i].value; | ||
} | ||
} | ||
} | ||
}; | ||
Filter.prototype.clearFiltering = function () { | ||
@@ -285,0 +309,0 @@ var cols = util_1.getActualPropFromColl(this.filterSettings.columns); |
@@ -74,3 +74,3 @@ import { GroupSettingsModel } from '../base/grid-model'; | ||
private renderGroupDropArea(); | ||
private updateGroupDropArea(); | ||
private updateGroupDropArea(clear?); | ||
private initDragAndDrop(); | ||
@@ -77,0 +77,0 @@ private initializeGHeaderDrag(); |
@@ -342,3 +342,3 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "../base/util", "../base/constant", "../services/aria-service"], function (require, exports, ej2_base_1, ej2_base_2, ej2_base_3, util_1, events, aria_service_1) { | ||
}; | ||
Group.prototype.updateGroupDropArea = function () { | ||
Group.prototype.updateGroupDropArea = function (clear) { | ||
if (this.groupSettings.showDropArea && !this.groupSettings.columns.length) { | ||
@@ -350,4 +350,4 @@ var dragLabel = this.l10n.getConstant('GroupDropArea'); | ||
else { | ||
if (this.element.innerHTML === this.l10n.getConstant('GroupDropArea') && (this.groupSettings.columns.length === 1 | ||
|| !this.isAppliedGroup && !this.isAppliedUnGroup)) { | ||
if ((this.element.innerHTML === this.l10n.getConstant('GroupDropArea') && (this.groupSettings.columns.length === 1 | ||
|| !this.isAppliedGroup && !this.isAppliedUnGroup)) || clear) { | ||
this.element.innerHTML = ''; | ||
@@ -542,29 +542,30 @@ } | ||
this.updateGroupDropArea(); | ||
this.isAppliedUnGroup = false; | ||
} | ||
this.isAppliedUnGroup = false; | ||
}; | ||
Group.prototype.onPropertyChanged = function (e) { | ||
var _this = this; | ||
if (e.module !== this.getModuleName()) { | ||
return; | ||
} | ||
for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) { | ||
var prop = _a[_i]; | ||
var _loop_1 = function (prop) { | ||
switch (prop) { | ||
case 'columns': | ||
var args = void 0; | ||
if (this.contentRefresh) { | ||
if (!this.isAppliedUnGroup) { | ||
if (!this.isAppliedGroup) { | ||
this.updateGroupDropArea(); | ||
for (var i = 0; i < this.groupSettings.columns.length; i++) { | ||
this.colName = this.groupSettings.columns[i]; | ||
var col = this.parent.getColumnByField(this.colName); | ||
col.visible = this.parent.groupSettings.showGroupedColumn; | ||
this.groupAddSortingQuery(this.colName); | ||
if (i < this.groupSettings.columns.length - 1) { | ||
this.addColToGroupDrop(this.groupSettings.columns[i]); | ||
if (this_1.contentRefresh) { | ||
if (!this_1.isAppliedUnGroup) { | ||
if (!this_1.isAppliedGroup) { | ||
this_1.updateGroupDropArea(true); | ||
for (var i = 0; i < this_1.groupSettings.columns.length; i++) { | ||
this_1.colName = this_1.groupSettings.columns[i]; | ||
var col = this_1.parent.getColumnByField(this_1.colName); | ||
col.visible = this_1.parent.groupSettings.showGroupedColumn; | ||
this_1.groupAddSortingQuery(this_1.colName); | ||
if (i < this_1.groupSettings.columns.length - 1) { | ||
this_1.addColToGroupDrop(this_1.groupSettings.columns[i]); | ||
} | ||
} | ||
} | ||
args = { columnName: this.colName, requestType: 'grouping', type: events.actionBegin }; | ||
args = { columnName: this_1.colName, requestType: e.properties[prop].length ? 'grouping' : 'ungrouping', | ||
type: events.actionBegin }; | ||
} | ||
@@ -574,21 +575,33 @@ else { | ||
} | ||
this.parent.notify(events.modelChanged, args); | ||
if (!this_1.groupSettings.showGroupedColumn) { | ||
e.oldProperties[prop].forEach(function (column) { | ||
if (e.properties[prop].indexOf(column) === -1) { | ||
_this.parent.getColumnByField(column).visible = true; | ||
} | ||
}); | ||
} | ||
this_1.parent.notify(events.modelChanged, args); | ||
} | ||
break; | ||
case 'showDropArea': | ||
this.updateGroupDropArea(); | ||
this.groupSettings.showDropArea ? this.element.style.display = '' : this.element.style.display = 'none'; | ||
this_1.updateGroupDropArea(); | ||
this_1.groupSettings.showDropArea ? this_1.element.style.display = '' : this_1.element.style.display = 'none'; | ||
break; | ||
case 'showGroupedColumn': | ||
this.updateGroupedColumn(this.groupSettings.showGroupedColumn); | ||
this.parent.notify(events.modelChanged, { requestType: 'refresh' }); | ||
this_1.updateGroupedColumn(this_1.groupSettings.showGroupedColumn); | ||
this_1.parent.notify(events.modelChanged, { requestType: 'refresh' }); | ||
break; | ||
case 'showUngroupButton': | ||
this.updateButtonVisibility(this.groupSettings.showUngroupButton, 'e-ungroupbutton'); | ||
this_1.updateButtonVisibility(this_1.groupSettings.showUngroupButton, 'e-ungroupbutton'); | ||
break; | ||
case 'showToggleButton': | ||
this.updateButtonVisibility(this.groupSettings.showToggleButton, 'e-togglegroupbutton '); | ||
this.parent.refreshHeader(); | ||
this_1.updateButtonVisibility(this_1.groupSettings.showToggleButton, 'e-togglegroupbutton '); | ||
this_1.parent.refreshHeader(); | ||
break; | ||
} | ||
}; | ||
var this_1 = this; | ||
for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) { | ||
var prop = _a[_i]; | ||
_loop_1(prop); | ||
} | ||
@@ -595,0 +608,0 @@ }; |
@@ -17,4 +17,5 @@ import { IGrid } from '../base/interface'; | ||
endEdit(): void; | ||
updateRow(index: number, data?: Object): void; | ||
deleteRecord(fieldname?: string, data?: Object): void; | ||
protected startEdit(tr?: Element): void; | ||
} |
@@ -32,2 +32,5 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
InlineEdit.prototype.updateRow = function (index, data) { | ||
_super.prototype.updateRow.call(this, index, data); | ||
}; | ||
InlineEdit.prototype.deleteRecord = function (fieldname, data) { | ||
@@ -34,0 +37,0 @@ _super.prototype.deleteRecord.call(this, fieldname, data); |
@@ -30,2 +30,3 @@ import { IGrid, NotifyArgs } from '../base/interface'; | ||
protected startEdit(tr: Element): void; | ||
protected updateRow(index: number, data: Object): void; | ||
protected endEdit(): void; | ||
@@ -32,0 +33,0 @@ private destroyElements(); |
@@ -86,2 +86,12 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "../base/util", "../base/constant", "../renderer/row-renderer"], function (require, exports, ej2_base_1, ej2_base_2, util_1, events, row_renderer_1) { | ||
}; | ||
NormalEdit.prototype.updateRow = function (index, data) { | ||
var gObj = this.parent; | ||
var args = { | ||
requestType: 'save', type: events.actionBegin, data: data, cancel: false, | ||
previousData: gObj.getCurrentViewRecords()[index] | ||
}; | ||
gObj.showSpinner(); | ||
gObj.notify(events.updateData, args); | ||
gObj.refresh(); | ||
}; | ||
NormalEdit.prototype.endEdit = function () { | ||
@@ -88,0 +98,0 @@ var gObj = this.parent; |
@@ -63,2 +63,4 @@ import { IGrid, IAction, IIndex, ISelectedCell } from '../base/interface'; | ||
private focus; | ||
private isCancelDeSelect; | ||
private isPreventCellSelect; | ||
/** | ||
@@ -65,0 +67,0 @@ * Constructor for the Grid selection module |
@@ -539,2 +539,3 @@ import { Component, NumberFormatOptions, DateFormatOptions, EmitType, KeyboardEventArgs, L10n } from '@syncfusion/ej2-base'; | ||
args?: NotifyArgs; | ||
oldProperties?: string[]; | ||
} | ||
@@ -670,2 +671,4 @@ /** | ||
foreignKeyData?: Object; | ||
/** Defines the cancel option value. */ | ||
cancel?: boolean; | ||
} | ||
@@ -715,2 +718,4 @@ export interface RowSelectEventArgs extends RowDeselectEventArgs { | ||
cells?: Element[]; | ||
/** Defines the cancel option value. */ | ||
cancel?: boolean; | ||
} | ||
@@ -717,0 +722,0 @@ export interface CellSelectEventArgs extends CellDeselectEventArgs { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24729133
250761