@syncfusion/ej2-grids
Advanced tools
Comparing version 26.1.42 to 26.2.4
/*! | ||
* filename: index.d.ts | ||
* version : 26.1.42 | ||
* version : 26.2.4 | ||
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-grids@*", | ||
"_id": "@syncfusion/ej2-grids@26.1.41", | ||
"_id": "@syncfusion/ej2-grids@26.1.42", | ||
"_inBundle": false, | ||
"_integrity": "sha512-IdBkRwi54KOMhd7psOqOaOM+M8niw2W/PR4l7D2Bl5n7lRS+KdYFuxwq1cDfyjaPCauzP7mezDLEIO4sOix+ew==", | ||
"_integrity": "sha512-fhRiZXTkunIUUU2Li3e37oqwgfxGXjQoKy0h6+If1i5XJ8fPJ/jj/uaAcVn1mWDPUZ6mhDcJu4vGc1LfImia7g==", | ||
"_location": "/@syncfusion/ej2-grids", | ||
@@ -32,4 +32,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-grids/-/ej2-grids-26.1.41.tgz", | ||
"_shasum": "a243ca79d75887b97092a23b668d0d740e7fbd21", | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-grids/-/ej2-grids-26.1.42.tgz", | ||
"_shasum": "55349d00dd87ba6e9a1349462401f5ca736800c7", | ||
"_spec": "@syncfusion/ej2-grids@*", | ||
@@ -42,17 +42,17 @@ "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~26.1.42", | ||
"@syncfusion/ej2-buttons": "~26.1.40", | ||
"@syncfusion/ej2-calendars": "~26.1.41", | ||
"@syncfusion/ej2-compression": "~26.1.35", | ||
"@syncfusion/ej2-data": "~26.1.42", | ||
"@syncfusion/ej2-dropdowns": "~26.1.42", | ||
"@syncfusion/ej2-excel-export": "~26.1.35", | ||
"@syncfusion/ej2-file-utils": "~26.1.35", | ||
"@syncfusion/ej2-inputs": "~26.1.42", | ||
"@syncfusion/ej2-lists": "~26.1.35", | ||
"@syncfusion/ej2-navigations": "~26.1.41", | ||
"@syncfusion/ej2-notifications": "~26.1.35", | ||
"@syncfusion/ej2-pdf-export": "~26.1.35", | ||
"@syncfusion/ej2-popups": "~26.1.42", | ||
"@syncfusion/ej2-splitbuttons": "~26.1.35" | ||
"@syncfusion/ej2-base": "~26.2.4", | ||
"@syncfusion/ej2-buttons": "~26.2.4", | ||
"@syncfusion/ej2-calendars": "~26.2.4", | ||
"@syncfusion/ej2-compression": "~26.2.4", | ||
"@syncfusion/ej2-data": "~26.2.4", | ||
"@syncfusion/ej2-dropdowns": "~26.2.4", | ||
"@syncfusion/ej2-excel-export": "~26.2.4", | ||
"@syncfusion/ej2-file-utils": "~26.2.4", | ||
"@syncfusion/ej2-inputs": "~26.2.4", | ||
"@syncfusion/ej2-lists": "~26.2.4", | ||
"@syncfusion/ej2-navigations": "~26.2.4", | ||
"@syncfusion/ej2-notifications": "~26.2.4", | ||
"@syncfusion/ej2-pdf-export": "~26.2.4", | ||
"@syncfusion/ej2-popups": "~26.2.4", | ||
"@syncfusion/ej2-splitbuttons": "~26.2.4" | ||
}, | ||
@@ -83,5 +83,5 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "26.1.42", | ||
"version": "26.2.4", | ||
"sideEffects": false, | ||
"homepage": "https://www.syncfusion.com/javascript-ui-controls" | ||
} |
@@ -21,3 +21,3 @@ import { closest, addClass, select } from '@syncfusion/ej2-base'; | ||
import { DataUtil } from '@syncfusion/ej2-data'; | ||
import { addRemoveEventListener, padZero } from '../base/util'; | ||
import { addRemoveEventListener, padZero, getParentIns } from '../base/util'; | ||
import * as literals from '../base/string-literals'; | ||
@@ -701,3 +701,5 @@ /** | ||
if (gObj.editSettings.template) { | ||
this.parent.destroyTemplate(['editSettingsTemplate']); | ||
var parentIns = getParentIns(this.parent); | ||
parentIns = parentIns.isReact ? parentIns : this.parent; | ||
parentIns.destroyTemplate(['editSettingsTemplate']); | ||
if (this.parent.isReact) { | ||
@@ -752,3 +754,4 @@ this.parent.renderTemplates(); | ||
formObjects[parseInt(i.toString(), 10)].destroy(); | ||
if (this.parent.isReact && this.parent.editSettings.mode === 'Dialog' | ||
var parentIns = getParentIns(this.parent); | ||
if (parentIns.isReact && this.parent.editSettings.mode === 'Dialog' | ||
&& (!isNullOrUndefined(this.parent.editSettings.template) || col.length)) { | ||
@@ -755,0 +758,0 @@ formObjects[parseInt(i.toString(), 10)].element.remove(); |
@@ -51,5 +51,14 @@ import { EventHandler, detach, formatUnit, Browser, closest } from '@syncfusion/ej2-base'; | ||
Resize.prototype.autoFitColumns = function (fName, startRowIndex, endRowIndex) { | ||
var _this = this; | ||
var columnName = (fName === undefined || fName === null || fName.length <= 0) ? | ||
this.parent.getColumns().map(function (x) { return x.field; }) : (typeof fName === 'string') ? [fName] : fName; | ||
this.parent.getColumns().map(function (x) { x.autoFit = true; return x.field; }) : (typeof fName === 'string') ? [fName] : fName; | ||
this.parent.isAutoFitColumns = true; | ||
if (!isNullOrUndefined(fName) && typeof fName == 'object' && fName.length !== 0) { | ||
fName.forEach(function (field) { | ||
_this.parent.getColumnByField(field).autoFit = true; | ||
}); | ||
} | ||
else if (typeof fName === 'string' && fName.trim() !== '') { | ||
this.parent.getColumnByField(fName).autoFit = true; | ||
} | ||
if (this.parent.enableAdaptiveUI) { | ||
@@ -66,5 +75,9 @@ this.parent.element.classList.add('e-grid-autofit'); | ||
} | ||
if (this.parent.resizeSettings.mode === 'Auto') { | ||
if (this.parent.allowResizing && (this.parent.resizeSettings.mode === 'Auto' || (this.parent.resizeSettings.mode === 'Normal' && | ||
!this.parent.autoFit && newarray.length === 0))) { | ||
this.widthService.setWidthToTable(); | ||
} | ||
else if (this.parent.autoFit && this.parent.resizeSettings.mode === 'Auto') { | ||
this.widthService.setWidthToTable(); | ||
} | ||
}; | ||
@@ -71,0 +84,0 @@ Resize.prototype.getCellElementsByColumnIndex = function (columnIndex) { |
@@ -75,3 +75,8 @@ import { IGrid, IAction, IIndex, ISelectedCell } from '../base/interface'; | ||
private chkField; | ||
private selectedRowState; | ||
/** | ||
* @hidden | ||
*/ | ||
selectedRowState: { | ||
[key: number]: boolean; | ||
}; | ||
private unSelectedRowState; | ||
@@ -78,0 +83,0 @@ private totalRecordsCount; |
@@ -12,2 +12,3 @@ import { Column } from '../models/column'; | ||
private evtHandlers; | ||
private widthService; | ||
/** | ||
@@ -14,0 +15,0 @@ * Constructor for the show hide module. |
import { isNullOrUndefined, remove } from '@syncfusion/ej2-base'; | ||
import { iterateArrayOrObject, isGroupAdaptive, isActionPrevent, addRemoveEventListener } from '../base/util'; | ||
import { ColumnWidthService } from '../services/width-controller'; | ||
import * as events from '../base/constant'; | ||
@@ -19,2 +20,3 @@ /** | ||
this.addEventListener(); | ||
this.widthService = new ColumnWidthService(parent); | ||
} | ||
@@ -199,4 +201,9 @@ ShowHide.prototype.addEventListener = function () { | ||
}); | ||
if (this.parent.autoFit && !this.parent.groupSettings.columns.length) { | ||
this.parent.preventAdjustColumns(); | ||
if (!this.parent.groupSettings.columns.length) { | ||
if (this.parent.autoFit) { | ||
this.parent.preventAdjustColumns(); | ||
} | ||
else if (this.parent.allowResizing && this.parent.resizeSettings.mode === 'Normal') { | ||
this.widthService.setWidthToTable(); | ||
} | ||
} | ||
@@ -203,0 +210,0 @@ }; |
@@ -771,2 +771,8 @@ import { IPosition, IGrid, IRow, IExpandedRow, PdfExportProperties, ExcelExportProperties, RowDropEventArgs } from './interface'; | ||
* | ||
* @param { IGrid } grid - Defines grid instance | ||
* @returns { IGrid } returns parent grid instance | ||
*/ | ||
export declare function getParentIns(grid: IGrid): IGrid; | ||
/** | ||
* | ||
* @param { string[] } fields - Defines grouped fields | ||
@@ -773,0 +779,0 @@ * @param { values } values - Defines caption keys |
@@ -11,3 +11,3 @@ import { isNullOrUndefined, extend } from '@syncfusion/ej2-base'; | ||
import { Button } from '@syncfusion/ej2-buttons'; | ||
import { parentsUntil, wrap, measureColumnDepth, appendChildren, addFixedColumnBorder } from '../base/util'; | ||
import { parentsUntil, wrap, measureColumnDepth, appendChildren, addFixedColumnBorder, clearReactVueTemplates } from '../base/util'; | ||
import * as literals from '../base/string-literals'; | ||
@@ -332,2 +332,5 @@ // eslint-disable-next-line valid-jsdoc | ||
} | ||
if ((this.parent.isReact || this.parent.isVue)) { | ||
clearReactVueTemplates(this.parent, ['headerTemplate']); | ||
} | ||
for (var i = 0, len = this.colDepth; i < len; i++) { | ||
@@ -334,0 +337,0 @@ headerRow = rowRenderer.render(rows[parseInt(i.toString(), 10)], columns); |
@@ -212,3 +212,3 @@ import { isNullOrUndefined, extend, addClass, removeClass } from '@syncfusion/ej2-base'; | ||
} | ||
if (isFrozen && this_1.isSpan) { | ||
if (this_1.isSpan) { | ||
var rowsObject = this_1.parent.getRowsObject(); | ||
@@ -219,15 +219,25 @@ var isRtl = this_1.parent.enableRtl; | ||
var prevRowCell = prevRowCells[i - 1]; | ||
var currentRowCell = prevRowCells[parseInt(i.toString(), 10)]; | ||
var nextRowCell = prevRowCells[i + 1]; | ||
var direction = prevRowCells[parseInt(i.toString(), 10)].column.freeze; | ||
if (prevRowCell && (prevRowCell.isRowSpanned || prevRowCell.rowSpanRange > 1) && prevRowCell.visible) { | ||
if (prevRowCell.column.freeze === 'Fixed' && direction === 'Fixed') { | ||
td.classList.add(isRtl ? 'e-removefreezerightborder' : 'e-removefreezeleftborder'); | ||
if (!isRtl && !currentRowCell.isRowSpanned) { | ||
td.classList.add('e-rowcell-firstchild'); | ||
} | ||
else if (!isRtl && i === 1 && direction === 'Left') { | ||
td.classList.add('e-addfreezefirstchildborder'); | ||
if (isFrozen) { | ||
if (prevRowCell.column.freeze === 'Fixed' && direction === 'Fixed') { | ||
td.classList.add(isRtl ? 'e-removefreezerightborder' : 'e-removefreezeleftborder'); | ||
} | ||
else if (!isRtl && i === 1 && direction === 'Left') { | ||
td.classList.add('e-addfreezefirstchildborder'); | ||
} | ||
} | ||
} | ||
if (nextRowCell && (nextRowCell.isRowSpanned || nextRowCell.rowSpanRange > 1) && nextRowCell.visible && | ||
nextRowCell.column.freeze === 'Fixed' && direction === 'Fixed' && cellArgs.colSpan < 2) { | ||
td.classList.add(isRtl ? 'e-removefreezeleftborder' : 'e-removefreezerightborder'); | ||
if (nextRowCell && (nextRowCell.isRowSpanned || nextRowCell.rowSpanRange > 1) && nextRowCell.visible) { | ||
if (isRtl && !currentRowCell.isRowSpanned) { | ||
td.classList.add('e-rowcell-lastchild'); | ||
} | ||
if (isFrozen && nextRowCell.column.freeze === 'Fixed' && direction === 'Fixed' && cellArgs.colSpan < 2) { | ||
td.classList.add(isRtl ? 'e-removefreezeleftborder' : 'e-removefreezerightborder'); | ||
} | ||
} | ||
@@ -234,0 +244,0 @@ } |
@@ -25,5 +25,5 @@ import { IGrid } from '../base/interface'; | ||
getWidth(column: Column): string | number; | ||
getTableWidth(columns: Column[]): number; | ||
getTableWidth(columns: Column[]): number | string; | ||
setWidthToTable(): void; | ||
private isAutoResize; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { isNullOrUndefined } from '@syncfusion/ej2-base'; | ||
import { isNullOrUndefined, addClass } from '@syncfusion/ej2-base'; | ||
import { formatUnit } from '@syncfusion/ej2-base'; | ||
@@ -46,10 +46,21 @@ import { columnWidthChanged, preventFrozenScrollRefresh } from '../base/constant'; | ||
totalColumnsWidth = this.getTableWidth(this.parent.getColumns()); | ||
if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) { | ||
this.setMinwidthBycalculation(totalColumnsWidth); | ||
if (totalColumnsWidth !== 'auto') { | ||
if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) { | ||
this.setMinwidthBycalculation(totalColumnsWidth); | ||
} | ||
if (this.parent.allowResizing && this.parent.element.getBoundingClientRect().width > totalColumnsWidth) { | ||
addClass([this.parent.getHeaderTable(), this.parent.getContentTable()], ['e-tableborder']); | ||
} | ||
} | ||
}; | ||
ColumnWidthService.prototype.setMinwidthBycalculation = function (tWidth) { | ||
var _this = this; | ||
var difference = 0; | ||
var collection = this.parent.getColumns().filter(function (a) { | ||
return isNullOrUndefined(a.width) || a.width === 'auto'; | ||
if (_this.parent.allowResizing) { | ||
return (isNullOrUndefined(a.width) || a.width === 'auto') && isNullOrUndefined(a.maxWidth); | ||
} | ||
else { | ||
return isNullOrUndefined(a.width) || a.width === 'auto'; | ||
} | ||
}); | ||
@@ -101,3 +112,3 @@ if (collection.length) { | ||
this.setWidth(cWidth, columnIndex); | ||
if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) { | ||
if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1 && tgridWidth !== 'auto') { | ||
this.setMinwidthBycalculation(tgridWidth); | ||
@@ -200,5 +211,10 @@ } | ||
ColumnWidthService.prototype.getWidth = function (column) { | ||
if (isNullOrUndefined(column.width) && this.parent.allowResizing | ||
&& isNullOrUndefined(column.minWidth) && !this.isWidthUndefined()) { | ||
column.width = 200; | ||
if (this.parent.allowResizing && isNullOrUndefined(column.width)) { | ||
if (isNullOrUndefined(column.minWidth) && isNullOrUndefined(column.maxWidth) | ||
&& !this.isWidthUndefined()) { | ||
column.width = 200; | ||
} | ||
else if (column.maxWidth) { | ||
column.width = column.maxWidth; | ||
} | ||
} | ||
@@ -212,3 +228,3 @@ if (!column.width) { | ||
} | ||
else if ((column.maxWidth && width > parseInt(column.maxWidth.toString(), 10))) { | ||
else if (column.maxWidth && (column.width === 'auto' || width > parseInt(column.maxWidth.toString(), 10))) { | ||
return column.maxWidth; | ||
@@ -222,12 +238,23 @@ } | ||
var tWidth = 0; | ||
var isAutoColumn = false; | ||
for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) { | ||
var column = columns_1[_i]; | ||
var cWidth = this.getWidth(column); | ||
if (column.width === 'auto') { | ||
cWidth = 0; | ||
if (column.visible !== false) { | ||
var cWidth = this.getWidth(column); | ||
if (column.width === 'auto' || !column.width) { | ||
if (this.parent.allowResizing) { | ||
if (!column.maxWidth) { | ||
isAutoColumn = true; | ||
} | ||
} | ||
else { | ||
cWidth = 0; | ||
} | ||
} | ||
if (cWidth !== null) { | ||
tWidth += parseInt(cWidth.toString(), 10); | ||
} | ||
} | ||
if (column.visible !== false && cWidth !== null) { | ||
tWidth += parseInt(cWidth.toString(), 10); | ||
} | ||
} | ||
tWidth = isAutoColumn ? 'auto' : tWidth; | ||
return tWidth; | ||
@@ -240,3 +267,3 @@ }; | ||
} | ||
tWidth = this.isAutoResize() ? '100%' : tWidth; | ||
tWidth = (this.isAutoResize() || tWidth === 'auto') ? '100%' : tWidth; | ||
this.parent.getHeaderTable().style.width = tWidth; | ||
@@ -243,0 +270,0 @@ this.parent.getContentTable().style.width = tWidth; |
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 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
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
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
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
395388
38197068
+ Added@syncfusion/ej2-base@26.2.10(transitive)
+ Added@syncfusion/ej2-buttons@26.2.10(transitive)
+ Added@syncfusion/ej2-calendars@26.2.12(transitive)
+ Added@syncfusion/ej2-compression@26.2.10(transitive)
+ Added@syncfusion/ej2-data@26.2.14(transitive)
+ Added@syncfusion/ej2-dropdowns@26.2.13(transitive)
+ Added@syncfusion/ej2-excel-export@26.2.11(transitive)
+ Added@syncfusion/ej2-file-utils@26.2.10(transitive)
+ Added@syncfusion/ej2-icons@26.2.10(transitive)
+ Added@syncfusion/ej2-inputs@26.2.14(transitive)
+ Added@syncfusion/ej2-lists@26.2.14(transitive)
+ Added@syncfusion/ej2-navigations@26.2.12(transitive)
+ Added@syncfusion/ej2-notifications@26.2.10(transitive)
+ Added@syncfusion/ej2-pdf-export@26.2.14(transitive)
+ Added@syncfusion/ej2-popups@26.2.11(transitive)
+ Added@syncfusion/ej2-splitbuttons@26.2.10(transitive)
- Removed@syncfusion/ej2-base@26.1.42(transitive)
- Removed@syncfusion/ej2-buttons@26.1.40(transitive)
- Removed@syncfusion/ej2-calendars@26.1.41(transitive)
- Removed@syncfusion/ej2-compression@26.1.35(transitive)
- Removed@syncfusion/ej2-data@26.1.42(transitive)
- Removed@syncfusion/ej2-dropdowns@26.1.42(transitive)
- Removed@syncfusion/ej2-excel-export@26.1.35(transitive)
- Removed@syncfusion/ej2-file-utils@26.1.35(transitive)
- Removed@syncfusion/ej2-icons@26.1.35(transitive)
- Removed@syncfusion/ej2-inputs@26.1.42(transitive)
- Removed@syncfusion/ej2-lists@26.1.35(transitive)
- Removed@syncfusion/ej2-navigations@26.1.41(transitive)
- Removed@syncfusion/ej2-notifications@26.1.35(transitive)
- Removed@syncfusion/ej2-pdf-export@26.1.35(transitive)
- Removed@syncfusion/ej2-popups@26.1.42(transitive)
- Removed@syncfusion/ej2-splitbuttons@26.1.35(transitive)
Updated@syncfusion/ej2-base@~26.2.4
Updated@syncfusion/ej2-data@~26.2.4