@syncfusion/ej2-grids
Advanced tools
Comparing version 16.2.42 to 16.2.43
@@ -9,5 +9,17 @@ # Changelog | ||
- Passed row data to checkbox filter item template. | ||
- The locale is not properly applied for aggregates is resolved. | ||
- Export cell object is missing on exporting query cell info event argument is resolved. | ||
- `setCellValue` not updated the value when we use frozen columns is resolved. | ||
- Support to provide show all record option in pager dropdown. | ||
- Format is not applying for group caption while using `Urladaptor`. | ||
## 16.2.42 (2018-06-27) | ||
### Grid | ||
#### Bug Fixes | ||
- Batch confirmation dialog is not shown when we use Excel/Checkbox filter in Grid is resolved. | ||
- Excel text filter icon does not update with localization is resolved. | ||
- `setCellValue` not updated the value when we use frozen columns is resolved. | ||
- Provide `cellSaved` event support for getting the edited data while using batch Editing. | ||
@@ -14,0 +26,0 @@ - column size in IE when grouping is not changing like in chrome is resolved. |
@@ -0,1 +1,10 @@ | ||
/*! | ||
* filename: index.d.ts | ||
* version : 16.2.43 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
* Use of this code is subject to the terms of our license. | ||
* A copy of the current license can be obtained at any time by e-mailing | ||
* licensing@syncfusion.com. Any infringement will be prosecuted under | ||
* applicable laws. | ||
*/ | ||
import * as _grids from '@syncfusion/ej2-grids'; | ||
@@ -2,0 +11,0 @@ import * as _base from '@syncfusion/ej2-base'; |
{ | ||
"name": "@syncfusion/ej2-grids", | ||
"version": "16.2.42", | ||
"version": "16.2.43", | ||
"description": "Essential JS 2 Grid Component", | ||
@@ -12,18 +12,17 @@ "author": "Syncfusion Inc.", | ||
"@syncfusion/ej2-base": "~16.2.41", | ||
"@syncfusion/ej2-data": "~16.2.43", | ||
"@syncfusion/ej2-navigations": "~16.2.41", | ||
"@syncfusion/ej2-inputs": "~16.2.43", | ||
"@syncfusion/ej2-calendars": "~16.2.43", | ||
"@syncfusion/ej2-dropdowns": "~16.2.43", | ||
"@syncfusion/ej2-popups": "~16.2.41", | ||
"@syncfusion/ej2-buttons": "~16.2.41", | ||
"@syncfusion/ej2-calendars": "~16.2.41", | ||
"@syncfusion/ej2-compression": "~16.2.41", | ||
"@syncfusion/ej2-data": "~16.2.41", | ||
"@syncfusion/ej2-dropdowns": "~16.2.42", | ||
"@syncfusion/ej2-lists": "~16.2.41", | ||
"@syncfusion/ej2-excel-export": "~16.2.41", | ||
"@syncfusion/ej2-pdf-export": "~16.2.41", | ||
"@syncfusion/ej2-file-utils": "~16.2.41", | ||
"@syncfusion/ej2-inputs": "~16.2.41", | ||
"@syncfusion/ej2-lists": "~16.2.41", | ||
"@syncfusion/ej2-navigations": "~16.2.41", | ||
"@syncfusion/ej2-pdf-export": "~16.2.41", | ||
"@syncfusion/ej2-popups": "~16.2.41", | ||
"@syncfusion/ej2-compression": "~16.2.41", | ||
"@syncfusion/ej2-splitbuttons": "~16.2.41" | ||
}, | ||
"devDependencies": { | ||
"@syncfusion/ej2-build": "*", | ||
"@types/chai": "^3.4.28", | ||
@@ -49,15 +48,3 @@ "@types/es6-promise": "0.0.28", | ||
"url": "https://github.com/syncfusion/ej2-grids.git" | ||
}, | ||
"scripts": { | ||
"test": "gulp ci-test", | ||
"compile": "gulp ci-compile", | ||
"ci-publish": "gulp ci-publish" | ||
}, | ||
"config": { | ||
"ghooks": { | ||
"pre-commit": "gulp pre-commit", | ||
"pre-push": "gulp pre-push", | ||
"commit-msg": "gulp commit-msg" | ||
} | ||
} | ||
} |
@@ -37,3 +37,3 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-base", "../base/enum", "../base/constant", "../renderer/footer-renderer", "../renderer/summary-cell-renderer", "../services/summary-model-generator"], function (require, exports, ej2_base_1, ej2_base_2, enum_1, constant_1, footer_renderer_1, summary_cell_renderer_1, summary_model_generator_1) { | ||
column.setPropertiesSilent({ format: _this.getFormatFromType(column.format, type) }); | ||
column.setFormatter(); | ||
column.setFormatter(_this.parent.locale); | ||
column.setPropertiesSilent({ columnName: column.columnName || column.field }); | ||
@@ -40,0 +40,0 @@ }); |
@@ -192,2 +192,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/row", "../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, row_1, cell_1, row_model_generator_1) { | ||
gObj.trigger(events.batchCancel, args); | ||
rows.splice(this.parent.getMovableRowsObject().length, rows.length); | ||
}; | ||
@@ -262,12 +263,12 @@ BatchEdit.prototype.deleteRecord = function (fieldname, data) { | ||
Object.keys(row.changes).forEach(function (key) { | ||
if (i_1 < frzCols) { | ||
delete mRow.changes[key]; | ||
if (i_1 >= frzCols) { | ||
row.changes[key] = mRow.changes[key]; | ||
} | ||
i_1++; | ||
}); | ||
ej2_base_1.extend(row.changes, mRow.changes); | ||
} | ||
} | ||
else if (mRow.isDirty) { | ||
ej2_base_1.extend(row.changes, mRow.changes); | ||
row.changes = mRow.changes; | ||
row.isDirty = mRow.isDirty; | ||
} | ||
@@ -274,0 +275,0 @@ }; |
@@ -93,3 +93,3 @@ import { L10n } from '@syncfusion/ej2-base'; | ||
private dialogOpen(); | ||
private createCheckbox(value, checked); | ||
private createCheckbox(value, checked, data); | ||
private updateIndeterminatenBtn(); | ||
@@ -96,0 +96,0 @@ private createFilterItems(data, isInitial?); |
@@ -499,3 +499,3 @@ define(["require", "exports", "@syncfusion/ej2-base", "../base/util", "@syncfusion/ej2-base", "@syncfusion/ej2-data", "@syncfusion/ej2-buttons", "../base/constant", "../services/value-formatter", "../base/util", "@syncfusion/ej2-popups", "@syncfusion/ej2-inputs", "@syncfusion/ej2-popups", "../base/util"], function (require, exports, ej2_base_1, util_1, ej2_base_2, ej2_data_1, ej2_buttons_1, events, value_formatter_1, util_2, ej2_popups_1, ej2_inputs_1, ej2_popups_2, util_3) { | ||
}; | ||
CheckBoxFilter.prototype.createCheckbox = function (value, checked) { | ||
CheckBoxFilter.prototype.createCheckbox = function (value, checked, data) { | ||
var elem = checked ? this.cBoxTrue.cloneNode(true) : | ||
@@ -508,5 +508,3 @@ this.cBoxFalse.cloneNode(true); | ||
label.innerHTML = ''; | ||
var args = {}; | ||
args[this.options.field] = value; | ||
util_1.appendChildren(label, this.options.template(args)); | ||
util_1.appendChildren(label, this.options.template(data)); | ||
} | ||
@@ -542,3 +540,5 @@ return elem; | ||
if (data.length) { | ||
var selectAll = util_3.createCboxWithWrap(util_1.getUid('cbox'), this.createCheckbox(this.getLocalizedLabel('SelectAll'), false), 'e-ftrchk'); | ||
var selectAllValue = this.getLocalizedLabel('SelectAll'); | ||
var checkBox = this.createCheckbox(selectAllValue, false, (_a = {}, _a[this.options.field] = selectAllValue, _a)); | ||
var selectAll = util_3.createCboxWithWrap(util_1.getUid('cbox'), checkBox, 'e-ftrchk'); | ||
selectAll.querySelector('.e-frame').classList.add('e-selectall'); | ||
@@ -555,3 +555,4 @@ cBoxes.appendChild(selectAll); | ||
var value = this.valueFormatter.toView(ej2_base_1.getValue(this.options.field, data[i]), this.options.formatFn); | ||
cBoxes.appendChild(util_3.createCboxWithWrap(uid, this.createCheckbox(value, this.getCheckedState(isColFiltered, this.values[uid])), 'e-ftrchk')); | ||
var checkbox = this.createCheckbox(value, this.getCheckedState(isColFiltered, this.values[uid]), ej2_base_1.getValue('dataObj', data[i])); | ||
cBoxes.appendChild(util_3.createCboxWithWrap(uid, checkbox, 'e-ftrchk')); | ||
} | ||
@@ -572,2 +573,3 @@ this.cBox.innerHTML = cBoxes.innerHTML; | ||
ej2_popups_2.hideSpinner(this.spinner); | ||
var _a; | ||
}; | ||
@@ -597,4 +599,9 @@ CheckBoxFilter.prototype.getCheckedState = function (isColFiltered, value) { | ||
lookup[value] = true; | ||
value = isForeignKey ? ej2_base_1.getValue(column.foreignKeyValue, util_2.getForeignData(column, {}, value, foreignKeyData)[0]) : value; | ||
if (isForeignKey) { | ||
var foreignDataObj = util_2.getForeignData(column, {}, value, foreignKeyData)[0]; | ||
ej2_base_1.setValue(events.foreignKeyData, foreignDataObj, json[len]); | ||
value = ej2_base_1.getValue(column.foreignKeyValue, foreignDataObj); | ||
} | ||
ej2_base_1.setValue(field, ej2_base_1.isNullOrUndefined(value) ? null : value, obj); | ||
ej2_base_1.setValue('dataObj', json[len], obj); | ||
result.push(obj); | ||
@@ -607,3 +614,3 @@ } | ||
CheckBoxFilter.getPredicate = function (columns) { | ||
var cols = CheckBoxFilter.getDistinct(columns, 'field').records || []; | ||
var cols = ej2_data_1.DataUtil.distinct(columns, 'field', true) || []; | ||
var collection = []; | ||
@@ -610,0 +617,0 @@ var pred = {}; |
@@ -324,7 +324,8 @@ define(["require", "exports", "../base/constant", "@syncfusion/ej2-excel-export", "@syncfusion/ej2-base", "../actions/data", "./export-helper", "../services/summary-model-generator", "../base/enum", "@syncfusion/ej2-data"], function (require, exports, events, ej2_excel_export_1, ej2_base_1, data_1, export_helper_1, summary_model_generator_1, enum_1, ej2_data_1) { | ||
var excelCellArgs = { data: record[r], column: headerRow.columns[c], foreignKeyData: foreignKeyData }; | ||
var cell = {}; | ||
gObj.trigger(events.excelQueryCellInfo, ej2_base_1.extend(excelCellArgs, { | ||
column: headerRow.columns[c], data: record[r], | ||
value: value, style: undefined, colSpan: 1 | ||
value: value, style: undefined, colSpan: 1, cell: cell | ||
})); | ||
var cell = {}; | ||
cell = excelCellArgs.cell; | ||
cell.index = index + level; | ||
@@ -331,0 +332,0 @@ cell.value = excelCellArgs.value; |
@@ -684,5 +684,6 @@ define(["require", "exports", "../base/constant", "@syncfusion/ej2-pdf-export", "@syncfusion/ej2-pdf-export", "@syncfusion/ej2-pdf-export", "@syncfusion/ej2-pdf-export", "@syncfusion/ej2-pdf-export", "@syncfusion/ej2-pdf-export", "./export-helper", "../actions/data", "../services/summary-model-generator", "@syncfusion/ej2-base", "../base/enum", "@syncfusion/ej2-data", "@syncfusion/ej2-base"], function (require, exports, events, ej2_pdf_export_1, ej2_pdf_export_2, ej2_pdf_export_3, ej2_pdf_export_4, ej2_pdf_export_5, ej2_pdf_export_6, export_helper_1, data_1, summary_model_generator_1, ej2_base_1, enum_1, ej2_data_1, ej2_base_2) { | ||
}; | ||
args.value = this.exportValueFormatter.formatCellValue(args); | ||
gObj.trigger(events.pdfQueryCellInfo, args); | ||
var cell = gridRow.cells.getCell(j + startIndex); | ||
cell.value = this.exportValueFormatter.formatCellValue(args); | ||
cell.value = args.value; | ||
if (!ej2_base_1.isNullOrUndefined(args.style)) { | ||
@@ -689,0 +690,0 @@ this.processCellStyle(cell, args); |
@@ -812,2 +812,6 @@ import { Component, NumberFormatOptions, DateFormatOptions, EmitType, KeyboardEventArgs, L10n } from '@syncfusion/ej2-base'; | ||
colSpan?: number; | ||
/** Defines the cell datas */ | ||
cell?: number | ExcelStyle | { | ||
name: string; | ||
}; | ||
} | ||
@@ -814,0 +818,0 @@ export interface ExcelHeaderQueryCellInfoEventArgs { |
@@ -90,3 +90,3 @@ import { CustomSummaryType } from '../base/type'; | ||
*/ | ||
setFormatter(): void; | ||
setFormatter(cultureName: string): void; | ||
/** | ||
@@ -93,0 +93,0 @@ * @hidden |
@@ -27,4 +27,4 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
AggregateColumn.prototype.setFormatter = function () { | ||
var valueFormatter = new value_formatter_1.ValueFormatter(); | ||
AggregateColumn.prototype.setFormatter = function (cultureName) { | ||
var valueFormatter = new value_formatter_1.ValueFormatter(cultureName); | ||
if (this.format && (this.format.skeleton || this.format.format)) { | ||
@@ -31,0 +31,0 @@ this.formatFn = valueFormatter.getFormatFunction(this.format); |
@@ -44,3 +44,3 @@ import { Property, ChildProperty } from '@syncfusion/ej2-base'; | ||
*/ | ||
pageSizes?: boolean | number[]; | ||
pageSizes?: boolean | (number | string)[]; | ||
@@ -47,0 +47,0 @@ /** |
@@ -37,3 +37,3 @@ import { ChildProperty } from '@syncfusion/ej2-base'; | ||
*/ | ||
pageSizes: boolean | number[]; | ||
pageSizes: boolean | (number | string)[]; | ||
/** | ||
@@ -40,0 +40,0 @@ * Defines the template which renders customized elements in pager instead of default elements. |
import { Pager } from './pager'; | ||
/** | ||
* IPager interface | ||
* @hidden | ||
*/ | ||
export interface IPager { | ||
newProp: { | ||
value: number | string | boolean; | ||
}; | ||
} | ||
/** | ||
* `PagerDropDown` module handles selected pageSize from DropDownList. | ||
@@ -32,3 +41,7 @@ */ | ||
private onChange(e); | ||
private beforeValueChange(prop); | ||
private convertValue(pageSizeValue); | ||
setDropDownValue(prop: string, value: string | number | Object | boolean): void; | ||
addEventListener(): void; | ||
removeEventListener(): void; | ||
/** | ||
@@ -35,0 +48,0 @@ * To destroy the Pagerdropdown |
@@ -24,7 +24,9 @@ define(["require", "exports", "@syncfusion/ej2-base", "@syncfusion/ej2-dropdowns"], function (require, exports, ej2_base_1, ej2_dropdowns_1) { | ||
var pageSizesModule = this.pagerModule.pageSizes; | ||
var pageSizesArray = (pageSizesModule.length ? pageSizesModule : [5, 10, 12, 20]); | ||
var defaultValue = (pageSizesArray).indexOf(this.pagerModule.pageSize) > -1 ? this.pagerModule.pageSize : pageSizesArray[0]; | ||
var pageSizesArray = (pageSizesModule.length ? this.convertValue(pageSizesModule) : | ||
['5', '10', '12', '20', 'All']); | ||
var defaultValue = (pageSizesArray).indexOf(this.pagerModule.pageSize.toString()) > -1 ? this.pagerModule.pageSize | ||
: (pageSizesArray[0] === 'All' ? this.pagerModule.totalRecordsCount : parseInt(pageSizesArray[0], 10)); | ||
this.dropDownListObject = new ej2_dropdowns_1.DropDownList({ | ||
dataSource: pageSizesArray, | ||
value: defaultValue, | ||
value: defaultValue.toString(), | ||
change: this.onChange.bind(this) | ||
@@ -36,8 +38,32 @@ }); | ||
pagerObj.trigger('dropDownChanged', { pageSize: defaultValue }); | ||
this.addEventListener(); | ||
}; | ||
PagerDropDown.prototype.onChange = function (e) { | ||
this.pagerModule.pageSize = this.dropDownListObject.value; | ||
if (this.dropDownListObject.value === 'All') { | ||
this.pagerModule.pageSize = this.pagerModule.totalRecordsCount; | ||
this.pagerCons.innerHTML = this.pagerModule.getLocalizedLabel('pagerAllDropDown'); | ||
e.value = this.pagerModule.pageSize; | ||
} | ||
else { | ||
this.pagerModule.pageSize = parseInt(this.dropDownListObject.value, 10); | ||
if (this.pagerCons.innerHTML !== this.pagerModule.getLocalizedLabel('pagerDropDown')) { | ||
this.pagerCons.innerHTML = this.pagerModule.getLocalizedLabel('pagerDropDown'); | ||
} | ||
} | ||
this.pagerModule.dataBind(); | ||
this.pagerModule.trigger('dropDownChanged', { pageSize: this.dropDownListObject.value }); | ||
}; | ||
PagerDropDown.prototype.beforeValueChange = function (prop) { | ||
if (typeof prop.newProp.value === 'number') { | ||
var val = prop.newProp.value.toString(); | ||
prop.newProp.value = val; | ||
} | ||
}; | ||
PagerDropDown.prototype.convertValue = function (pageSizeValue) { | ||
var item = pageSizeValue; | ||
for (var i = 0; i < item.length; i++) { | ||
item[i] = typeof item[i] === 'number' ? item[i].toString() : item[i]; | ||
} | ||
return item; | ||
}; | ||
PagerDropDown.prototype.setDropDownValue = function (prop, value) { | ||
@@ -48,4 +74,11 @@ if (this.dropDownListObject) { | ||
}; | ||
PagerDropDown.prototype.addEventListener = function () { | ||
this.dropDownListObject.on('beforeValueChange', this.beforeValueChange, this); | ||
}; | ||
PagerDropDown.prototype.removeEventListener = function () { | ||
this.dropDownListObject.off('beforeValueChange', this.beforeValueChange); | ||
}; | ||
PagerDropDown.prototype.destroy = function (args) { | ||
if (this.dropDownListObject && !this.dropDownListObject.isDestroyed) { | ||
this.removeEventListener(); | ||
this.dropDownListObject.destroy(); | ||
@@ -52,0 +85,0 @@ ej2_base_1.remove(this.pagerDropDownDiv); |
@@ -63,3 +63,3 @@ import { Component, ModuleDeclaration, L10n, EmitType, Browser } from '@syncfusion/ej2-base';import { createElement, remove, classList, compile as templateCompiler } from '@syncfusion/ej2-base';import { isNullOrUndefined } from '@syncfusion/ej2-base';import { Property, Event, NotifyPropertyChanges, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { PagerDropDown } from './pager-dropdown';import { NumericContainer } from './numeric-container';import { PagerMessage } from './pager-message';import { ExternalMessage } from './external-message';import { appendChildren } from '../grid/base/util'; | ||
*/ | ||
pageSizes?: boolean | number[]; | ||
pageSizes?: boolean | (number | string)[]; | ||
@@ -66,0 +66,0 @@ /** |
@@ -97,3 +97,3 @@ import { Component, ModuleDeclaration, L10n, EmitType } from '@syncfusion/ej2-base'; | ||
*/ | ||
pageSizes: boolean | number[]; | ||
pageSizes: boolean | (number | string)[]; | ||
/** | ||
@@ -100,0 +100,0 @@ * Defines the template as string or HTML element ID which renders customized elements in pager instead of default elements. |
@@ -33,3 +33,4 @@ var __extends = (this && this.__extends) || (function () { | ||
previousPagerTooltip: 'Go to previous pager', | ||
pagerDropDown: 'Items per page' | ||
pagerDropDown: 'Items per page', | ||
pagerAllDropDown: 'Items' | ||
}; | ||
@@ -36,0 +37,0 @@ _this.containerModule = new numeric_container_1.NumericContainer(_this); |
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 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
5
28459226
324
277559