@syncfusion/ej2-pivotview
Advanced tools
Comparing version 24.2.9 to 25.1.35
@@ -9,16 +9,16 @@ { | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jsdoc/recommended" | ||
"plugin:jsdoc/recommended", | ||
"plugin:security/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"js": true | ||
}, | ||
"ecmaFeatures": { "js": true }, | ||
"ecmaVersion": 2018, | ||
"project": "./tsconfig.json", | ||
"sourceType": "module" | ||
}, | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"@typescript-eslint/tslint", | ||
"eslint-plugin-security", | ||
"jsdoc" | ||
@@ -28,3 +28,26 @@ ], | ||
"use-isnan": "error", | ||
"security/detect-unsafe-regex":"error", | ||
"security/detect-buffer-noassert":"error", | ||
"security/detect-child-process":"error", | ||
"security/detect-disable-mustache-escape":"error", | ||
"security/detect-eval-with-expression":"error", | ||
"security/detect-no-csrf-before-method-override":"error", | ||
"security/detect-non-literal-fs-filename":"error", | ||
"security/detect-non-literal-regexp":"error", | ||
"security/detect-non-literal-require":"error", | ||
"security/detect-object-injection":"error", | ||
"security/detect-possible-timing-attacks":"error", | ||
"security/detect-pseudoRandomBytes":"error", | ||
"security/detect-new-buffer":"error", | ||
"security/detect-bidi-characters":"error", | ||
"@typescript-eslint/no-inferrable-types": "off", | ||
"@typescript-eslint/ban-types": ["warn", { | ||
"types": { | ||
"Object": false, | ||
"object": false, | ||
"{}": false, | ||
"Function": false | ||
} | ||
}], | ||
"jsdoc/check-tag-names": 0, | ||
"@typescript-eslint/tslint/config": [ | ||
@@ -84,3 +107,2 @@ "error", | ||
"no-constant-condition": "error", | ||
"no-case-declarations":"off", | ||
"no-invalid-regexp": "error", | ||
@@ -137,5 +159,16 @@ "curly": "error", | ||
"@typescript-eslint/no-parameter-properties": "error", | ||
"indent": "off", | ||
"@typescript-eslint/indent": [ | ||
"off" | ||
"error", | ||
4, | ||
{ | ||
"CallExpression": { | ||
"arguments": "first" | ||
}, | ||
"FunctionDeclaration": { | ||
"parameters": "first" | ||
}, | ||
"FunctionExpression": { | ||
"parameters": "first" | ||
} | ||
} | ||
], | ||
@@ -165,40 +198,2 @@ "no-debugger": "error", | ||
"jsdoc/check-alignment": "error", | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"jsdoc/valid-types": [ | ||
"off", | ||
{ | ||
"allowEmptyNamepaths": true | ||
} | ||
], | ||
"jsdoc/newline-after-description": "off", | ||
"prefer-const": "off", | ||
"jsdoc/check-tag-names": [ | ||
"error", | ||
{ | ||
"definedTags": [ | ||
"hidden", | ||
"default", | ||
"event", | ||
"deprecated", | ||
"isGenericType", | ||
"isDataSource", | ||
"aspType", | ||
"aspDefaultValueIgnore", | ||
"aspIgnore", | ||
"isEnumeration" | ||
] | ||
} | ||
], | ||
"no-empty": "error", | ||
@@ -205,0 +200,0 @@ "quotes": [ |
@@ -9,93 +9,11 @@ # Changelog | ||
- `#I542318` - When using the server-side engine, the pivot table will now be rendered properly when the value axis is set to "row" and subTotalsPosition is set to "Bottom". | ||
- `#I559899` - The grid and chart modules will now be properly destroyed when we switch views in the Angular Pivot Table. | ||
## 24.2.8 (2024-02-27) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#I555926` - When using the Nextjs project, the pivot table will now render properly in the production environment. | ||
- `#F186589` - The Pivot Table will now be properly rendered when connecting an OLAP cube with no named set. | ||
## 24.2.5 (2024-02-13) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#I542318` - When using the server-side engine, the pivot table will now be rendered properly when the value axis is set to "row" and subTotalsPosition is set to "Bottom". | ||
- `#I548199` - When using the server-side engine, the "SaveAs" toolbar option will now work properly in the pivot table with a CSV data source. | ||
- `#I548188` - Filter dialog members will now be properly sorted for date type fields in the pivot table. | ||
- `#I549549` - The number formatting dialog will not be closed unnecessarily when you click the overlay in the pivot table. | ||
- `#I548580` - When using the server-side engine, drill-through data for calculated field values in the pivot table will now be properly displayed. | ||
## 24.2.4 (2024-02-06) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#I545563` - On demand date formatting will now be applied properly in the pivot table. | ||
- `#I540803` - The pivot table will now be properly rendered while changing the width of the first column with virtualization enabled. | ||
- `#I547664` - The pivot table will now be properly exported as an excel document via the server-side engine. | ||
- `#I548392` - Aggregated values will now be displayed correctly in the OLAP pivot table. | ||
## 24.2.3 (2024-01-31) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#I544455` - When we bind no fields to the value axis using the server-side engine, the static pivot field list will now be rendered properly. | ||
#### New features | ||
- `#F184050` - Added error handling support when fetching data from an OLAP cube using an incorrect MDX query during the pivot table's initial rendering. | ||
- `#I311046` - Added value sorting support to the OLAP cube connected pivot table, which allows to sort individual measures and their aggregated values in both ascending and descending order using code-behind or UI actions at runtime. Check out the [demo](https://ej2.syncfusion.com/demos/#/material3/pivot-table/olap.html) here. | ||
- `#I538753` - Done optimization to improve pivot table rendering performance, when there are large number of fields in the bound data source. | ||
- `#I550925` - Added support for selecting fields using node click in the pivot field list UI. | ||
- Introduced single page mode, which allows only the current view page to be displayed during virtual scrolling operations when virtualization is enabled in the pivot table. It enhances the pivot table’s performance even more during initial rendering and when making UI actions like drill up/down, sorting, filtering, and so on. This is done by rendering only the rows and columns relevant to the current viewport for display in the pivot table. Check out the [demo](https://ej2.syncfusion.com/demos/#/material3/pivot-table/virtual-scrolling.html) here. | ||
## 24.1.47 (2024-01-23) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#F186081` - With virtualization, the pivot table will now be properly displayed when using the mouse wheel to scroll. | ||
- `#I186080` - When "DataCompression" is enabled in the Pivot table, the date formatting will now be properly maintained. | ||
## 24.1.46 (2024-01-17) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#F185974` - The selected node state will now be properly maintained in the filter dialog for the pivot table's date type field. | ||
- `#I539759` - On-demand grouping will now work properly with CSV data source. | ||
## 24.1.45 (2024-01-09) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#F185974` - When using the pivot table and the pivot field list with virtualization, the loading indicator is now properly hidden. | ||
- `#F185974` - The all node check box status will now work properly when you click the "All" text in the member filter dialog. | ||
- `#F185974` - When adding a field via drag and drop in the static field list, the "fieldDrop" event is now properly triggered. | ||
- `#I538805` - The OLAP Pivot table will now work properly while binding calculated fields via code-behind. | ||
## 24.1.44 (2024-01-03) | ||
### PivotTable | ||
#### Bug fixes | ||
- The script error caused by multiple cell selection mode when clicking specific cells has been resolved. | ||
## 24.1.43 (2023-12-27) | ||
### PivotTable | ||
#### Bug fixes | ||
- `#I528347` - The pivot table will now be properly refreshed while dynamically changing its container width. | ||
## 24.1.41 (2023-12-18) | ||
@@ -102,0 +20,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 24.2.9 | ||
* version : 25.1.35 | ||
* 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-pivotview@*", | ||
"_id": "@syncfusion/ej2-pivotview@24.2.8", | ||
"_id": "@syncfusion/ej2-pivotview@24.1.43", | ||
"_inBundle": false, | ||
"_integrity": "sha512-y57mi1coaqjCGXcDEfxP5MJ5wD7/ZbOq5kEVw5gWkkUbwnSa8O5q81PFJyISMrHvJ8EZgwu4lbJleDNITvqviA==", | ||
"_integrity": "sha512-p7LYNPWjDIqg8XMsHnB3Bgdyp+zav+sifZQ2tnBDd2OIzrhNLLF2qIEsRZQE+wzyjEGq2IexquDWUhdHe4hQtA==", | ||
"_location": "/@syncfusion/ej2-pivotview", | ||
@@ -26,6 +26,6 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pivotview/-/ej2-pivotview-24.2.8.tgz", | ||
"_shasum": "64cf94fb60b80ba4c610289b0ec3ec64896c21f0", | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-pivotview/-/ej2-pivotview-24.1.43.tgz", | ||
"_shasum": "69557214be0e5ec393385fb2f47ecf3d3a3a356a", | ||
"_spec": "@syncfusion/ej2-pivotview@*", | ||
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included", | ||
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included", | ||
"author": { | ||
@@ -39,19 +39,19 @@ "name": "Syncfusion Inc." | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~24.2.7", | ||
"@syncfusion/ej2-buttons": "~24.2.7", | ||
"@syncfusion/ej2-calendars": "~24.2.9", | ||
"@syncfusion/ej2-charts": "~24.2.9", | ||
"@syncfusion/ej2-compression": "~24.2.3", | ||
"@syncfusion/ej2-data": "~24.2.3", | ||
"@syncfusion/ej2-dropdowns": "~24.2.9", | ||
"@syncfusion/ej2-excel-export": "~24.2.4", | ||
"@syncfusion/ej2-file-utils": "~24.2.3", | ||
"@syncfusion/ej2-grids": "~24.2.9", | ||
"@syncfusion/ej2-inputs": "~24.2.9", | ||
"@syncfusion/ej2-lists": "~24.2.8", | ||
"@syncfusion/ej2-navigations": "~24.2.8", | ||
"@syncfusion/ej2-pdf-export": "~24.2.3", | ||
"@syncfusion/ej2-popups": "~24.2.9", | ||
"@syncfusion/ej2-splitbuttons": "~24.2.7", | ||
"@syncfusion/ej2-svg-base": "~24.2.3" | ||
"@syncfusion/ej2-base": "~25.1.35", | ||
"@syncfusion/ej2-buttons": "~25.1.35", | ||
"@syncfusion/ej2-calendars": "~25.1.35", | ||
"@syncfusion/ej2-charts": "~25.1.35", | ||
"@syncfusion/ej2-compression": "~25.1.35", | ||
"@syncfusion/ej2-data": "~25.1.35", | ||
"@syncfusion/ej2-dropdowns": "~25.1.35", | ||
"@syncfusion/ej2-excel-export": "~25.1.35", | ||
"@syncfusion/ej2-file-utils": "~25.1.35", | ||
"@syncfusion/ej2-grids": "~25.1.35", | ||
"@syncfusion/ej2-inputs": "~25.1.35", | ||
"@syncfusion/ej2-lists": "~25.1.35", | ||
"@syncfusion/ej2-navigations": "~25.1.35", | ||
"@syncfusion/ej2-pdf-export": "~25.1.35", | ||
"@syncfusion/ej2-popups": "~25.1.35", | ||
"@syncfusion/ej2-splitbuttons": "~25.1.35", | ||
"@syncfusion/ej2-svg-base": "~25.1.35" | ||
}, | ||
@@ -124,4 +124,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "24.2.9", | ||
"version": "25.1.35", | ||
"sideEffects": false | ||
} |
@@ -115,2 +115,5 @@ import { Internationalization, Ajax } from '@syncfusion/ej2-base'; | ||
isExporting: boolean; | ||
/** @hidden */ | ||
measureIndex: number; | ||
private measurePosition; | ||
private showSubTotalsAtTop; | ||
@@ -161,4 +164,2 @@ private showSubTotalsAtBottom; | ||
errorInfo: string | Error; | ||
/** @hidden */ | ||
measureIndex: number; | ||
private colDepth; | ||
@@ -195,2 +196,5 @@ private totalCollection; | ||
private performEngine; | ||
private getValueSortInfo; | ||
private getParentElement; | ||
private reArrangeHeaders; | ||
private getSubTotalsVisibility; | ||
@@ -255,3 +259,3 @@ private frameRowHeader; | ||
updateCalcFields(dataSourceSettings: IDataOptions, lastcalcInfo: ICalculatedFieldSettings): void; | ||
onSort(dataSourceSettings: IDataOptions): void; | ||
onSort(dataSourceSettings: IDataOptions, isValueSort?: boolean): void; | ||
private updateFieldlist; | ||
@@ -443,1 +447,8 @@ updateFieldlistData(name: string, isSelect?: boolean): void; | ||
} | ||
/** @hidden */ | ||
export interface ValueSortInfo { | ||
memberIndex: number; | ||
columnLength: number; | ||
rowLength: number; | ||
isValueSorting: boolean; | ||
} |
@@ -23,4 +23,2 @@ import { OlapEngine } from './engine'; | ||
/** @hidden */ | ||
private static valueSortSettings; | ||
/** @hidden */ | ||
static drilledMembers: IDrillOptions[]; | ||
@@ -62,3 +60,2 @@ /** @hidden */ | ||
private static getDrillQuery; | ||
private static updateValueSortQuery; | ||
static getSlicersQuery(slicers: IFieldOptions[], axis: string): string; | ||
@@ -65,0 +62,0 @@ private static getDimensionQuery; |
@@ -24,3 +24,2 @@ import { extend, isNullOrUndefined } from '@syncfusion/ej2-base'; | ||
this.allowValueFilter = olapEngine.allowValueFilter; | ||
this.valueSortSettings = dataSourceSettings.valueSortSettings ? dataSourceSettings.valueSortSettings : undefined; | ||
this.drilledMembers = olapEngine.updateDrilledItems(dataSourceSettings.drilledMembers); | ||
@@ -62,4 +61,4 @@ this.calculatedFieldSettings = olapEngine.calculatedFieldSettings; | ||
roles: dataSourceSettings.roles | ||
}; | ||
olapEngine.mdxQuery = query.replace(/\&/g, '&').replace(/\>/g, '>').replace(/\</g, '<').replace(/%280/g, '\"').replace(/\'/g, '\''); /* eslint-disable-line */ | ||
}; /* eslint-disable-next-line no-useless-escape*/ | ||
olapEngine.mdxQuery = query.replace(/\&/g, '&').replace(/\>/g, '>').replace(/\</g, '<').replace(/%280/g, '\"').replace(/\'/g, '\''); | ||
// console.log(olapEngine.mdxQuery); | ||
@@ -71,3 +70,5 @@ if (drillInfo) { | ||
this.getTableCellData(args, (this.isPaging && !refPaging ? this.engine.generatePagingData.bind(this.engine) : | ||
this.engine.generateEngine.bind(this.engine)), drillInfo ? { action: drillInfo.action, drillInfo: drillInfo } : { | ||
this.engine.generateEngine.bind(this.engine)), drillInfo ? { | ||
action: drillInfo.action, drillInfo: drillInfo | ||
} : { | ||
dataSourceSettings: dataSourceSettings, action: 'loadTableElements' | ||
@@ -176,4 +177,4 @@ }); | ||
var drillQuery = this.getAttributeDrillQuery(dimensions, measureQuery, axis, drillInfo); | ||
query = (this.valueAxis !== axis ? this.updateValueSortQuery(query, this.valueSortSettings) : query) + | ||
(this.isPaging ? ((drillQuery !== '' ? '-' : '') + drillQuery) : '') + (this.drilledMembers.length > 0 ? '})' : '') + (!this.isPaging ? ((drillQuery !== '' ? '-' : '') + drillQuery) : '') + ')'; | ||
query = query + (this.isPaging ? ((drillQuery !== '' ? '-' : '') + drillQuery) : '') + | ||
(this.drilledMembers.length > 0 ? '})' : '') + (!this.isPaging ? ((drillQuery !== '' ? '-' : '') + drillQuery) : '') + ')'; | ||
} | ||
@@ -218,4 +219,3 @@ return query; | ||
else if (!drillInfo_1[i] && dimensions[i]) { | ||
levelQuery.push(this.getHierarchyQuery(dimensions[i].name, ((this.isPaging && result.level === 2) | ||
|| (!this.isPaging && index > i) ? true : false), dimensions[i].isNamedSet, dimensions[i].isCalculatedField, result.level, false)); | ||
levelQuery.push(this.getHierarchyQuery(dimensions[i].name, ((this.isPaging && result.level === 2) || (!this.isPaging && index > i) ? true : false), dimensions[i].isNamedSet, dimensions[i].isCalculatedField, result.level, false)); | ||
} | ||
@@ -423,25 +423,2 @@ else { | ||
}; | ||
MDXQuery.updateValueSortQuery = function (query, valueSortSettings) { | ||
if (valueSortSettings && valueSortSettings.measure && valueSortSettings.measure !== '') { | ||
var heirarchize = (this.drilledMembers.length > 0 ? 'HIERARCHIZE ({' : ''); | ||
var measure = (this.fieldList[valueSortSettings.measure] && | ||
this.fieldList[valueSortSettings.measure].isCalculatedField ? | ||
this.fieldList[valueSortSettings.measure].tag : valueSortSettings.measure); | ||
switch (valueSortSettings.sortOrder) { | ||
case 'Ascending': | ||
query = query.replace('NON EMPTY ( ' + heirarchize, 'NON EMPTY ( ' + heirarchize + ' ORDER ({'); | ||
query = query + '},(' + measure + '), ASC)'; | ||
// query = query + '},(' + valueSortSettings.measure + '), ' + | ||
// (valueSortSettings.preserveHierarchy ? 'BASC' : 'ASC') + ')'; | ||
break; | ||
case 'Descending': | ||
query = query.replace('NON EMPTY ( ' + heirarchize, 'NON EMPTY ( ' + heirarchize + ' ORDER ({'); | ||
query = query + '},(' + measure + '), DESC)'; | ||
// query = query + '},(' + valueSortSettings.measure + '), ' + | ||
// (valueSortSettings.preserveHierarchy ? 'BDESC' : 'DESC') + ')'; | ||
break; | ||
} | ||
} | ||
return query; | ||
}; | ||
MDXQuery.getSlicersQuery = function (slicers, axis) { | ||
@@ -623,4 +600,3 @@ var _this = this; | ||
var filterQuery = '\nFROM (SELECT Filter(' + filterItem.selectedField + '.AllMembers, ' + | ||
this.getAdvancedFilterCondtions(filterItem.name, filterItem.condition, filterItem.value1, filterItem.value2, filterItem.type, filterItem.measure) + | ||
')) on ' + currentAxis; | ||
this.getAdvancedFilterCondtions(filterItem.name, filterItem.condition, filterItem.value1, filterItem.value2, filterItem.type, filterItem.measure) + ')) on ' + currentAxis; | ||
return filterQuery; | ||
@@ -627,0 +603,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { IDataOptions, IFieldOptions, IFilter, ISort, IFormatSettings, IFieldListOptions, IMembers } from './engine'; | ||
import { IDataOptions, IFieldOptions, IFilter, ISort, IFormatSettings, IFieldListOptions, IMembers, PivotEngine } from './engine'; | ||
import { IDrillOptions, IGroupSettings, FieldItemInfo } from './engine'; | ||
@@ -10,2 +10,3 @@ import { ICalculatedFieldSettings, IGridValues, IAxisSet } from './engine'; | ||
import { SizeF } from '@syncfusion/ej2-pdf-export'; | ||
import { PivotChart } from '../pivotchart/base/pivotchart'; | ||
/** | ||
@@ -38,2 +39,40 @@ * This is a file to perform common utility for OLAP and Relational datasource | ||
private static cloneSortSettings; | ||
/** | ||
* It format the headers of pivot table. | ||
* | ||
* @param {IAxisSet} headerCell - It contains the header cell. | ||
* @param {PivotEngine} engine - It contains the instance of pivot engine. | ||
* @returns {IAxisSet} - It returns the formatted header data as IAxisSet. | ||
* @hidden | ||
*/ | ||
static getFormattedHeader(headerCell: IAxisSet, engine: PivotEngine): IAxisSet; | ||
/** | ||
* It format the members of field. | ||
* | ||
* @param {IMembers} members - It contains the members. | ||
* @param {string} fieldName - It contains the field Name. | ||
* @param {PivotEngine} engine - It contains the instance of pivot engine. | ||
* @returns {IMembers} - It returns the formatted members as IMembers. | ||
* @hidden | ||
*/ | ||
static getFormattedMembers(members: IMembers, fieldName: string, engine: PivotEngine): IMembers; | ||
/** | ||
* It determines whether the specified field is of date type. | ||
* | ||
* @param {string} fieldName - It contains the field Name. | ||
* @param {PivotEngine} engineModule - It contains the instance of pivot engine. | ||
* @returns {boolean} - It returns whether the field is of date type or not. | ||
* @hidden | ||
*/ | ||
static isDateField(fieldName: string, engineModule: PivotEngine): boolean; | ||
/** | ||
* It format the headers of pivot chart. | ||
* | ||
* @param {string[]} values - It contains the headers. | ||
* @param {PivotChart} chartModule - It contains the instance of pivot chart. | ||
* @param {boolean} isColumnHeader - It determines whether the specified header is column or row. | ||
* @returns {string} - It returns the formatted header. | ||
* @hidden | ||
*/ | ||
static formatChartHeaders(values: string[], chartModule: PivotChart, isColumnHeader: boolean): string; | ||
static cloneDrillMemberSettings(collection: IDrillOptions[]): IDrillOptions[]; | ||
@@ -100,2 +139,12 @@ static cloneFormatSettings(collection: IFormatSettings[]): IFormatSettings[]; | ||
static getPageSize(pageSize: PdfPageSize): SizeF; | ||
/** | ||
* | ||
* @param {any} aggreColl - It contains the selected header and its value cell collection, that should be sorted for value sorting. | ||
* @param {string} sortOrder - It denotes the sorting order. | ||
* @returns {IAxisSet[]} - It returns the sorted collection in the provided sort order. | ||
* @hidden */ | ||
static getSortedValue(aggreColl: { | ||
'header': IAxisSet; | ||
'value'?: number; | ||
}[], sortOrder: string): IAxisSet[]; | ||
} |
@@ -171,3 +171,2 @@ import { isNullOrUndefined } from '@syncfusion/ej2-base'; | ||
dateMember: this.cloneDateMembers(fieldlistObj.dateMember), | ||
formattedMembers: this.cloneFormatMembers(fieldlistObj.formattedMembers), | ||
members: this.cloneFormatMembers(fieldlistObj.members), | ||
@@ -431,2 +430,94 @@ formatString: fieldlistObj.formatString, | ||
}; | ||
/** | ||
* It format the headers of pivot table. | ||
* | ||
* @param {IAxisSet} headerCell - It contains the header cell. | ||
* @param {PivotEngine} engine - It contains the instance of pivot engine. | ||
* @returns {IAxisSet} - It returns the formatted header data as IAxisSet. | ||
* @hidden | ||
*/ | ||
PivotUtil.getFormattedHeader = function (headerCell, engine) { | ||
var clonedHeader = PivotUtil.frameHeaderWithKeys(headerCell); | ||
if (clonedHeader.valueSort && clonedHeader.valueSort['axis']) { | ||
var fieldName = clonedHeader.valueSort['axis']; | ||
var isDateType = this.isDateField(fieldName, engine); | ||
clonedHeader.formattedText = isDateType || !engine.formatFields[fieldName] || headerCell.isSum === true ? | ||
clonedHeader.formattedText : engine.getFormattedValue(clonedHeader.actualText, fieldName).formattedText; | ||
} | ||
return clonedHeader; | ||
}; | ||
/** | ||
* It format the members of field. | ||
* | ||
* @param {IMembers} members - It contains the members. | ||
* @param {string} fieldName - It contains the field Name. | ||
* @param {PivotEngine} engine - It contains the instance of pivot engine. | ||
* @returns {IMembers} - It returns the formatted members as IMembers. | ||
* @hidden | ||
*/ | ||
PivotUtil.getFormattedMembers = function (members, fieldName, engine) { | ||
var isDateField = this.isDateField(fieldName, engine); | ||
if (isDateField || engine.groupingFields[fieldName]) { | ||
var fieldMembers = {}; | ||
var keys = Object.keys(members); // eslint-disable-line @typescript-eslint/no-explicit-any | ||
var dateMember = engine.fieldList[fieldName].dateMember; | ||
for (var i = 0, j = keys.length; i < j; i++) { | ||
var values = members[keys[i]]; // eslint-disable-line @typescript-eslint/no-explicit-any | ||
if (isDateField) { | ||
fieldMembers[values.caption] = values; | ||
} | ||
else { | ||
var commonValue = dateMember[values.ordinal - 1].actualText; | ||
fieldMembers[commonValue] = values; | ||
} | ||
} | ||
return fieldMembers; | ||
} | ||
return members; | ||
}; | ||
/** | ||
* It determines whether the specified field is of date type. | ||
* | ||
* @param {string} fieldName - It contains the field Name. | ||
* @param {PivotEngine} engineModule - It contains the instance of pivot engine. | ||
* @returns {boolean} - It returns whether the field is of date type or not. | ||
* @hidden | ||
*/ | ||
PivotUtil.isDateField = function (fieldName, engineModule) { | ||
return (engineModule.formatFields[fieldName] && | ||
(['date', 'dateTime', 'time'].indexOf(engineModule.formatFields[fieldName].type) > -1)); | ||
}; | ||
/** | ||
* It format the headers of pivot chart. | ||
* | ||
* @param {string[]} values - It contains the headers. | ||
* @param {PivotChart} chartModule - It contains the instance of pivot chart. | ||
* @param {boolean} isColumnHeader - It determines whether the specified header is column or row. | ||
* @returns {string} - It returns the formatted header. | ||
* @hidden | ||
*/ | ||
PivotUtil.formatChartHeaders = function (values, chartModule, isColumnHeader) { | ||
var formattedValues = []; | ||
for (var i = 0, j = values.length; i < j; i++) { | ||
var fieldName = isColumnHeader ? ((chartModule.parent.dataSourceSettings.columns.length > 0 && | ||
!isNullOrUndefined(chartModule.parent.dataSourceSettings.columns[i])) ? | ||
chartModule.parent.dataSourceSettings.columns[i].name : undefined) : | ||
(chartModule.parent.dataSourceSettings.rows.length > 0 && | ||
!isNullOrUndefined(chartModule.parent.dataSourceSettings.rows[i])) ? | ||
chartModule.parent.dataSourceSettings.rows[i].name : undefined; | ||
if (!isNullOrUndefined(fieldName)) { | ||
if ((chartModule.engineModule.formatFields[fieldName] && | ||
(['date', 'dateTime', 'time'].indexOf(chartModule.engineModule.formatFields[fieldName].type) > -1))) { | ||
formattedValues.push(values[i]); | ||
} | ||
else { | ||
formattedValues.push(chartModule.engineModule.getFormattedValue(values[i], fieldName).formattedText); | ||
} | ||
} | ||
else { | ||
formattedValues.push(values[i]); | ||
} | ||
} | ||
return formattedValues.join(' - '); | ||
}; | ||
PivotUtil.cloneDrillMemberSettings = function (collection) { | ||
@@ -1108,4 +1199,21 @@ if (collection) { | ||
}; | ||
/** | ||
* | ||
* @param {any} aggreColl - It contains the selected header and its value cell collection, that should be sorted for value sorting. | ||
* @param {string} sortOrder - It denotes the sorting order. | ||
* @returns {IAxisSet[]} - It returns the sorted collection in the provided sort order. | ||
* @hidden */ | ||
PivotUtil.getSortedValue = function (aggreColl, sortOrder) { | ||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ | ||
aggreColl.sort(function (a, b) { | ||
return sortOrder === 'Descending' ? ((b['value'] || b['header']['type'] === 'grand sum' ? b['value'] : 0) - | ||
(a['value'] || a['header']['type'] === 'grand sum' ? a['value'] : 0)) : ((a['value'] || a['header']['type'] === 'grand sum' ? a['value'] : 0) - | ||
(b['value'] || b['header']['type'] === 'grand sum' ? b['value'] : 0)); | ||
}); | ||
return aggreColl.map(function (item) { | ||
return item['header']; | ||
}); | ||
}; | ||
return PivotUtil; | ||
}()); | ||
export { PivotUtil }; |
@@ -118,2 +118,3 @@ import { isNullOrUndefined, removeClass, addClass, SanitizeHtmlHelper } from '@syncfusion/ej2-base'; | ||
var members = PivotUtil.getClonedData(fieldInfo.dateMember); | ||
this.parent.isDateField = PivotUtil.isDateField(fieldName, this.parent.engineModule); | ||
var membersInfo = fieldInfo && fieldInfo.membersOrder ? | ||
@@ -214,5 +215,4 @@ fieldInfo.membersOrder.slice() : []; | ||
var field = engineModule.fieldList[fieldName]; | ||
var members = (engineModule.formatFields[fieldName] && | ||
(['date', 'dateTime', 'time'].indexOf(engineModule.formatFields[fieldName].type) > -1)) ? | ||
field.formattedMembers : field.members; | ||
var members = this.parent.dataType === 'olap' ? field.members : | ||
PivotUtil.getFormattedMembers(field.members, fieldName, engineModule); | ||
for (var _i = 0, _a = filterObj.items; _i < _a.length; _i++) { | ||
@@ -574,4 +574,2 @@ var item = _a[_i]; | ||
var engineModule = this.parent.engineModule; | ||
this.parent.isDateField = engineModule.formatFields[fieldName] && | ||
((['date', 'dateTime', 'time']).indexOf(engineModule.formatFields[fieldName].type) > -1); | ||
var list = []; | ||
@@ -587,3 +585,3 @@ var memberCount = 1; | ||
var member = members_2[_a]; | ||
var memberName = engineModule.formatFields[fieldName] ? member.formattedText : member.actualText.toString(); | ||
var memberName = member.actualText.toString(); | ||
memberName = this.parent.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(memberName) : memberName; | ||
@@ -597,6 +595,7 @@ var actualText = this.parent.enableHtmlSanitizer ? | ||
actualText: actualText, | ||
name: memberName, | ||
name: this.parent.isDateField ? member.formattedText : | ||
engineModule.getFormattedValue(actualText, fieldName).formattedText, | ||
isSelected: isInclude ? false : true | ||
}; | ||
if (filterObj[memberName] !== undefined) { | ||
if (filterObj[this.parent.isDateField ? member.formattedText : memberName] !== undefined) { | ||
obj.isSelected = isInclude ? true : false; | ||
@@ -608,3 +607,3 @@ } | ||
if (!obj.isSelected) { | ||
this.parent.savedTreeFilterPos[memberCount - 1] = memberName; | ||
this.parent.savedTreeFilterPos[memberCount - 1] = this.parent.isDateField ? member.formattedText : memberName; | ||
} | ||
@@ -611,0 +610,0 @@ this.parent.currentTreeItems.push(obj); |
@@ -830,1 +830,9 @@ /** | ||
export declare const FREEZED_CELL: string; | ||
/** @hidden */ | ||
export declare const PIVOT_CONTENT_LOADER: string; | ||
/** @hidden */ | ||
export declare const PIVOT_HIDE_LOADER: string; | ||
/** @hidden */ | ||
export declare const COLLAPSIBLE: string; | ||
/** @hidden */ | ||
export declare const EXPANDABLE: string; |
@@ -830,1 +830,9 @@ /** | ||
export var FREEZED_CELL = 'e-leftfreeze'; | ||
/** @hidden */ | ||
export var PIVOT_CONTENT_LOADER = 'e-pivot-content-loader'; | ||
/** @hidden */ | ||
export var PIVOT_HIDE_LOADER = 'e-hide-loader'; | ||
/** @hidden */ | ||
export var COLLAPSIBLE = 'e-icon-collapsible'; | ||
/** @hidden */ | ||
export var EXPANDABLE = 'e-icon-expandable'; |
@@ -204,2 +204,3 @@ import { createElement, remove, extend, getInstance, select } from '@syncfusion/ej2-base'; | ||
AggregateMenu.prototype.createFieldOptions = function (buttonElement, type) { | ||
var _this = this; | ||
var fieldCaption = buttonElement.getAttribute('data-caption'); | ||
@@ -246,4 +247,8 @@ var summaryType = (type && type !== 'MoreOption') ? type : buttonElement.getAttribute('data-type'); | ||
baseField = (baseField && (baseField.toString() !== 'undefined' && baseField.toString() !== 'null') ? baseField : fieldDataSource[0].value); | ||
fieldItemDataSource = Object.keys(this.parent.engineModule.fieldList[(baseField.toString() !== 'undefined' ? | ||
baseField : fieldDataSource[0].value)].formattedMembers); | ||
var fieldName_1 = baseField.toString() !== 'undefined' ? baseField : fieldDataSource[0].value; | ||
var isDateField_1 = PivotUtil.isDateField(fieldName_1, this.parent.engineModule); | ||
fieldItemDataSource = (this.parent.engineModule.fieldList[fieldName_1].dateMember).map(function (item) { | ||
return isDateField_1 ? item.formattedText : | ||
_this.parent.engineModule.getFormattedValue(item.actualText, fieldName_1).formattedText; | ||
}); | ||
} | ||
@@ -335,3 +340,7 @@ baseItem = (baseItem.toString() !== 'undefined' ? baseItem : fieldItemDataSource[0]); | ||
change: function (args) { | ||
fieldItemDataSource = Object.keys(popupInstance.parent.engineModule.fieldList[args.value].formattedMembers); | ||
var isDateField = PivotUtil.isDateField(args.value, _this.parent.engineModule); | ||
fieldItemDataSource = (popupInstance.parent.engineModule.fieldList[args.value].dateMember).map(function (item) { | ||
return isDateField ? item.formattedText : | ||
_this.parent.engineModule.getFormattedValue(item.actualText, args.value).formattedText; | ||
}); | ||
optionWrapper3.dataSource = fieldItemDataSource; | ||
@@ -338,0 +347,0 @@ optionWrapper3.value = fieldItemDataSource[0]; |
@@ -47,23 +47,2 @@ import { createElement, addClass, removeClass, remove, EventHandler, isNullOrUndefined } from '@syncfusion/ej2-base'; | ||
treeHeader.innerText = this.parent.localeObj.getConstant('allFields'); | ||
var searchWrapper = createElement('div', { | ||
id: this.parent.element.id + '_SearchDiv', attrs: { 'tabindex': '-1' }, | ||
className: cls.FIELD_LIST_SEARCH_CLASS | ||
}); | ||
var searchInput = createElement('input', { attrs: { 'type': 'text' } }); | ||
searchWrapper.appendChild(searchInput); | ||
this.fieldSearch = new TextBox({ | ||
placeholder: this.parent.localeObj.getConstant('search'), | ||
enableRtl: this.parent.enableRtl, | ||
locale: this.parent.locale, | ||
cssClass: cls.FIELD_LIST_SEARCH_INPUT_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), | ||
input: this.textChange.bind(this), | ||
showClearButton: true | ||
}); | ||
this.fieldSearch.isStringTemplate = true; | ||
this.fieldSearch.appendTo(searchInput); | ||
this.fieldSearch.addIcon('append', cls.FIELD_LIST_SEARCH_ICON_CLASS + ' ' + cls.ICON); | ||
var promptDiv = createElement('div', { | ||
className: cls.EMPTY_MEMBER_CLASS + ' ' + cls.ICON_DISABLE | ||
}); | ||
promptDiv.innerText = this.parent.localeObj.getConstant('noMatches'); | ||
var treeOuterDiv = createElement('div', { | ||
@@ -81,2 +60,23 @@ className: cls.FIELD_LIST_TREE_OUTER_DIV_CLASS + ' ' + cls.TREE_CONTAINER | ||
if (this.parent.enableFieldSearching) { | ||
var searchWrapper = createElement('div', { | ||
id: this.parent.element.id + '_SearchDiv', attrs: { 'tabindex': '-1' }, | ||
className: cls.FIELD_LIST_SEARCH_CLASS | ||
}); | ||
var searchInput = createElement('input', { attrs: { 'type': 'text' } }); | ||
searchWrapper.appendChild(searchInput); | ||
this.fieldSearch = new TextBox({ | ||
placeholder: this.parent.localeObj.getConstant('search'), | ||
enableRtl: this.parent.enableRtl, | ||
locale: this.parent.locale, | ||
cssClass: cls.FIELD_LIST_SEARCH_INPUT_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), | ||
input: this.textChange.bind(this), | ||
showClearButton: true | ||
}); | ||
this.fieldSearch.isStringTemplate = true; | ||
this.fieldSearch.appendTo(searchInput); | ||
this.fieldSearch.addIcon('append', cls.FIELD_LIST_SEARCH_ICON_CLASS + ' ' + cls.ICON); | ||
var promptDiv = createElement('div', { | ||
className: cls.EMPTY_MEMBER_CLASS + ' ' + cls.ICON_DISABLE | ||
}); | ||
promptDiv.innerText = this.parent.localeObj.getConstant('noMatches'); | ||
fieldTable.appendChild(searchWrapper); | ||
@@ -128,3 +128,4 @@ fieldTable.appendChild(promptDiv); | ||
fields: { dataSource: this.getTreeData(), id: 'id', text: 'caption', isChecked: 'isSelected', parentID: 'pid', iconCss: 'spriteCssClass' }, | ||
nodeChecked: this.nodeStateChange.bind(this), | ||
nodeClicked: this.nodeStateChange.bind(this), | ||
keyPress: this.nodeStateChange.bind(this), | ||
cssClass: cls.FIELD_LIST_TREE_CLASS + (this.parent.cssClass ? (' ' + this.parent.cssClass) : ''), | ||
@@ -134,3 +135,2 @@ showCheckBox: true, | ||
sortOrder: 'None', | ||
autoCheck: false, | ||
loadOnDemand: this.parent.dataType === 'olap' ? false : true, | ||
@@ -369,3 +369,2 @@ enableRtl: this.parent.enableRtl, | ||
showCheckBox: true, | ||
autoCheck: false, | ||
loadOnDemand: this.parent.dataType === 'olap' ? false : true, | ||
@@ -377,3 +376,4 @@ sortOrder: this.parent.dataType === 'olap' ? 'None' : 'Ascending', | ||
cssClass: this.parent.cssClass, | ||
nodeChecked: this.addNode.bind(this), | ||
nodeClicked: this.addNode.bind(this), | ||
keyPress: this.addNode.bind(this), | ||
drawNode: this.updateTreeNode.bind(this), | ||
@@ -513,4 +513,4 @@ nodeExpanding: this.updateNodeIcon.bind(this), | ||
this.parent.pivotCommon.dataSourceUpdate.control = this.parent.getModuleName() === 'pivotview' ? this.parent : | ||
(this.parent.isPopupView && this.parent.pivotGridModule ? | ||
this.parent.pivotGridModule : this.parent); | ||
(this.parent.isPopupView && this.parent.pivotGridModule ? this.parent.pivotGridModule | ||
: this.parent); | ||
if (this.parent.pivotCommon.nodeStateModified.onStateModified(args, fieldName)) { | ||
@@ -575,72 +575,89 @@ if (this.parent.allowDeferLayoutUpdate) { | ||
var _this = this; | ||
if (!args.isInteracted) { | ||
var id = args.node.getAttribute('data-uid'); | ||
if (this.parent.pivotCommon.filterDialog.dialogPopUp) { | ||
this.parent.pivotCommon.filterDialog.dialogPopUp.close(); | ||
} | ||
var list = this.parent.pivotFieldList; | ||
var selectedNode = list[id]; | ||
if (isNullOrUndefined(selectedNode) || (args.event.target && | ||
(args.event.target.classList.contains(cls.COLLAPSIBLE) || | ||
args.event.target.classList.contains(cls.EXPANDABLE))) || | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
(args.event.key && args.event.key !== 'Enter')) { | ||
return; | ||
} | ||
var node = closest(args.node, '.' + cls.TEXT_CONTENT_CLASS); | ||
if (!isNullOrUndefined(node)) { | ||
var li_1 = closest(node, 'li'); | ||
var id_1 = li_1.getAttribute('data-uid'); | ||
if (this.parent.pivotCommon.filterDialog.dialogPopUp) { | ||
this.parent.pivotCommon.filterDialog.dialogPopUp.close(); | ||
var fieldInfo = PivotUtil.getFieldInfo(id, this.parent); | ||
var control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent; | ||
var parentNode = args.node.closest('.' + cls.FIELD_TREE_PARENT); | ||
var isChecked = false; /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
var getNodeDetails = this.fieldTable.getNode(args.node); | ||
if (args.event && args.event.target && | ||
!args.event.target.classList.contains(cls.CHECK_BOX_FRAME_CLASS)) { | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ | ||
if (getNodeDetails.isChecked === 'true') { | ||
this.fieldTable.uncheckAll([args.node]); | ||
isChecked = false; | ||
} | ||
var list = this.parent.pivotFieldList; | ||
var selectedNode_1 = list[id_1]; | ||
var fieldInfo_1 = PivotUtil.getFieldInfo(id_1, this.parent); | ||
var control_1 = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent; | ||
var parentNode_1 = node.closest('.' + cls.FIELD_TREE_PARENT); | ||
if (args.action === 'check') { | ||
var eventdrop = { | ||
fieldName: id_1, dropField: fieldInfo_1.fieldItem, | ||
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings), | ||
dropAxis: (selectedNode_1.type === 'number' || (selectedNode_1.type === 'CalculatedField' && | ||
selectedNode_1.formula && selectedNode_1.formula.indexOf('Measure') > -1 && | ||
this.parent.dataType === 'olap')) ? 'values' : 'rows', | ||
dropPosition: fieldInfo_1.position, draggedAxis: 'fieldlist', cancel: false | ||
}; | ||
control_1.trigger(events.fieldDrop, eventdrop, function (observedArgs) { | ||
if (!observedArgs.cancel) { | ||
addClass([node.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
if (parentNode_1) { | ||
addClass([parentNode_1.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
} | ||
_this.updateSelectedNodes(li_1, args.action); | ||
var addNode = _this.parent.pivotCommon.dataSourceUpdate.getNewField(id_1, fieldInfo_1.fieldItem); | ||
_this.updateReportSettings(addNode, observedArgs); | ||
_this.updateNodeStateChange(id_1, args, selectedNode_1); | ||
else { | ||
this.fieldTable.checkAll([args.node]); | ||
isChecked = true; | ||
} | ||
} | ||
else { | ||
isChecked = getNodeDetails.isChecked === 'true'; | ||
} | ||
if (isChecked) { | ||
var eventdrop = { | ||
fieldName: id, dropField: fieldInfo.fieldItem, | ||
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings), | ||
dropAxis: (selectedNode.type === 'number' || (selectedNode.type === 'CalculatedField' && | ||
selectedNode.formula && selectedNode.formula.indexOf('Measure') > -1 && | ||
this.parent.dataType === 'olap')) ? 'values' : 'rows', | ||
dropPosition: fieldInfo.position, draggedAxis: 'fieldlist', cancel: false | ||
}; | ||
control.trigger(events.fieldDrop, eventdrop, function (observedArgs) { | ||
if (!observedArgs.cancel) { | ||
addClass([args.node.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
if (parentNode) { | ||
addClass([parentNode.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
} | ||
else { | ||
_this.updateCheckState(selectedNode_1, args.action); | ||
_this.updateSelectedNodes(args.node, 'check'); | ||
var addNode = _this.parent.pivotCommon.dataSourceUpdate.getNewField(id, fieldInfo.fieldItem); | ||
_this.updateReportSettings(addNode, observedArgs); | ||
_this.updateNodeStateChange(id, selectedNode, isChecked); | ||
} | ||
else { | ||
_this.updateCheckState(selectedNode, 'check'); | ||
} | ||
}); | ||
} | ||
else { | ||
var removeFieldArgs = { | ||
cancel: false, fieldName: id, | ||
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings), | ||
fieldItem: fieldInfo.fieldItem, axis: fieldInfo.axis | ||
}; | ||
control.trigger(events.fieldRemove, removeFieldArgs, function (observedArgs) { | ||
if (!observedArgs.cancel) { | ||
removeClass([args.node.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
if (parentNode && isNullOrUndefined(parentNode.querySelector('.' + cls.FIELD_TREE_CHILD + ' .' + cls.NODE_CHECK_CLASS))) { | ||
removeClass([parentNode.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
} | ||
}); | ||
} | ||
else { | ||
var removeFieldArgs = { | ||
cancel: false, fieldName: id_1, | ||
dataSourceSettings: PivotUtil.getClonedDataSourceSettings(this.parent.dataSourceSettings), | ||
fieldItem: fieldInfo_1.fieldItem, axis: fieldInfo_1.axis | ||
}; | ||
control_1.trigger(events.fieldRemove, removeFieldArgs, function (observedArgs) { | ||
if (!observedArgs.cancel) { | ||
removeClass([node.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
if (parentNode_1 && isNullOrUndefined(parentNode_1.querySelector('.' + cls.FIELD_TREE_CHILD + ' .' + cls.NODE_CHECK_CLASS))) { | ||
removeClass([parentNode_1.querySelector('.' + cls.LIST_TEXT_CLASS)], cls.LIST_SELECT_CLASS); | ||
} | ||
_this.updateSelectedNodes(li_1, args.action); | ||
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(id_1); | ||
if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 && | ||
fieldInfo_1 && fieldInfo_1.position < _this.parent.dataSourceSettings.valueIndex && | ||
((_this.parent.dataSourceSettings.valueAxis === 'row' && fieldInfo_1.axis === 'rows') || | ||
(_this.parent.dataSourceSettings.valueAxis === 'column' && fieldInfo_1.axis === 'columns'))) { | ||
control_1.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true); | ||
} | ||
if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) { | ||
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]'); | ||
} | ||
_this.updateNodeStateChange(id_1, args, selectedNode_1); | ||
_this.updateSelectedNodes(args.node, 'uncheck'); | ||
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport(id); | ||
if (_this.parent.dataType === 'pivot' && _this.parent.showValuesButton && _this.parent.dataSourceSettings.values.length > 1 && | ||
fieldInfo && fieldInfo.position < _this.parent.dataSourceSettings.valueIndex && | ||
((_this.parent.dataSourceSettings.valueAxis === 'row' && fieldInfo.axis === 'rows') || | ||
(_this.parent.dataSourceSettings.valueAxis === 'column' && fieldInfo.axis === 'columns'))) { | ||
control.setProperties({ dataSourceSettings: { valueIndex: _this.parent.dataSourceSettings.valueIndex - 1 } }, true); | ||
} | ||
else { | ||
_this.updateCheckState(selectedNode_1, args.action); | ||
if (_this.parent.dataType === 'olap' && _this.parent.dataSourceSettings.values.length === 0) { | ||
_this.parent.pivotCommon.dataSourceUpdate.removeFieldFromReport('[Measures]'); | ||
} | ||
}); | ||
} | ||
_this.updateNodeStateChange(id, selectedNode, isChecked); | ||
} | ||
else { | ||
_this.updateCheckState(selectedNode, 'uncheck'); | ||
} | ||
}); | ||
} | ||
@@ -725,3 +742,3 @@ }; | ||
}; | ||
TreeViewRenderer.prototype.updateNodeStateChange = function (id, args, selectedNode) { | ||
TreeViewRenderer.prototype.updateNodeStateChange = function (id, selectedNode, isChecked) { | ||
if (!this.parent.allowDeferLayoutUpdate) { | ||
@@ -731,5 +748,5 @@ this.parent.updateDataSource(true); | ||
else { | ||
selectedNode.isSelected = args.action === 'check'; | ||
selectedNode.isSelected = isChecked; | ||
if (this.parent.dataType === 'olap') { | ||
this.parent.olapEngineModule.updateFieldlistData(id, args.action === 'check'); | ||
this.parent.olapEngineModule.updateFieldlistData(id, isChecked); | ||
} | ||
@@ -777,10 +794,32 @@ this.updateDataSource(); | ||
var _this = this; | ||
if (!args.isInteracted) { | ||
var id = args.node.getAttribute('data-uid'); | ||
var list = this.parent.pivotFieldList; | ||
var selectedNode = list[id]; | ||
if (isNullOrUndefined(selectedNode) || (args.event.target && | ||
(args.event.target.classList.contains(cls.COLLAPSIBLE) || | ||
args.event.target.classList.contains(cls.EXPANDABLE))) || | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
(args.event.key && args.event.key !== 'Enter')) { | ||
return; | ||
} | ||
var fieldList = this.parent.pivotFieldList; | ||
var selectedNode = fieldList[args.data[0].id.toString()]; | ||
var fieldInfo = PivotUtil.getFieldInfo(selectedNode.id.toString(), this.parent); | ||
var control = this.parent.isPopupView ? this.parent.pivotGridModule : this.parent; | ||
if (args.action === 'check') { | ||
var isChecked = false; /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
var getNodeDetails = this.fieldTable.getNode(args.node); | ||
if (args.event && args.event.target && | ||
!args.event.target.classList.contains(cls.CHECK_BOX_FRAME_CLASS)) { | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ | ||
if (getNodeDetails.isChecked === 'true') { | ||
this.fieldTable.uncheckAll([args.node]); | ||
isChecked = false; | ||
} | ||
else { | ||
this.fieldTable.checkAll([args.node]); | ||
isChecked = true; | ||
} | ||
} | ||
else { | ||
isChecked = getNodeDetails.isChecked === 'true'; | ||
} | ||
if (isChecked) { | ||
var axis = ['filters', 'columns', 'rows', 'values']; | ||
@@ -797,3 +836,3 @@ var eventdrop = { | ||
else { | ||
_this.updateCheckState(selectedNode, args.action); | ||
_this.updateCheckState(selectedNode, 'check'); | ||
} | ||
@@ -819,3 +858,3 @@ }); | ||
else { | ||
_this.updateCheckState(selectedNode, args.action); | ||
_this.updateCheckState(selectedNode, 'uncheck'); | ||
} | ||
@@ -1095,2 +1134,10 @@ }); | ||
this.removeEventListener(); | ||
if (this.editorSearch && !this.editorSearch.isDestroyed) { | ||
this.editorSearch.destroy(); | ||
this.editorSearch = null; | ||
} | ||
if (this.fieldSearch && !this.fieldSearch.isDestroyed) { | ||
this.fieldSearch.destroy(); | ||
this.fieldSearch = null; | ||
} | ||
if (this.fieldTable && !this.fieldTable.isDestroyed) { | ||
@@ -1104,10 +1151,2 @@ this.fieldTable.destroy(); | ||
} | ||
if (this.editorSearch && !this.editorSearch.isDestroyed) { | ||
this.editorSearch.destroy(); | ||
this.editorSearch = null; | ||
} | ||
if (this.fieldSearch && !this.fieldSearch.isDestroyed) { | ||
this.fieldSearch.destroy(); | ||
this.fieldSearch = null; | ||
} | ||
}; | ||
@@ -1114,0 +1153,0 @@ return TreeViewRenderer; |
@@ -49,2 +49,11 @@ import { PivotView } from '../base/pivotview'; | ||
onHorizondalScroll(mHdr: HTMLElement, mCont: HTMLElement): Function; | ||
/** | ||
* It performs while scrolling horizontal scroll bar | ||
* | ||
* @param {number} horiOffset - It contains the horizondal offset translation value of freezed cells. | ||
* @param {boolean} isParentCells - It helps to identify the frozen cells of the parent element. | ||
* @returns {void} | ||
* @hidden | ||
*/ | ||
alignFreezedCells(horiOffset: number, isParentCells: boolean): void; | ||
private onVerticalScroll; | ||
@@ -51,0 +60,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { EventHandler, setStyleAttribute, Browser } from '@syncfusion/ej2-base'; | ||
import { EventHandler, setStyleAttribute, Browser, closest, addClass, removeClass } from '@syncfusion/ej2-base'; | ||
import { contentReady } from '../../common/base/constant'; | ||
@@ -50,13 +50,13 @@ import * as cls from '../../common/base/css-constant'; | ||
EventHandler.add(ele, 'scroll touchmove pointermove', this.onHorizondalScroll(mHdr, mCont), this); | ||
EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(mCont.parentElement), this); | ||
EventHandler.add(mCont.parentElement, 'scroll wheel touchmove pointermove keyup keydown', this.onVerticalScroll(mCont.parentElement, mCont), this); | ||
if (this.isFireFox) { | ||
EventHandler.add(ele, 'mouseup touchend scroll', this.common(mHdr, mCont), this); | ||
EventHandler.add(ele, 'mouseup touchend scroll', this.common(mHdr, mCont, mCont), this); | ||
if (!this.parent.isAdaptive) { | ||
EventHandler.add(mCont.parentElement, 'mouseup touchend scroll', this.common(mHdr, mCont.parentElement), this); | ||
EventHandler.add(mCont.parentElement, 'mouseup touchend scroll', this.common(mHdr, mCont.parentElement, mCont), this); | ||
} | ||
} | ||
else { | ||
EventHandler.add(ele, 'mouseup touchend', this.common(mHdr, mCont), this); | ||
EventHandler.add(ele, 'mouseup touchend', this.common(mHdr, mCont, mCont), this); | ||
if (!this.parent.isAdaptive) { | ||
EventHandler.add(mCont.parentElement, 'mouseup touchend', this.common(mHdr, mCont.parentElement), this); | ||
EventHandler.add(mCont.parentElement, 'mouseup touchend', this.common(mHdr, mCont.parentElement, mCont), this); | ||
} | ||
@@ -159,5 +159,5 @@ } | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
VirtualScroll.prototype.update = function (top, left, e) { | ||
VirtualScroll.prototype.update = function (top, left, e, ele, mHdr, mCont, fCont) { | ||
var _this = this; | ||
var virtualTable = this.parent.element.querySelector('.' + cls.CONTENT_VIRTUALTABLE_DIV); | ||
this.parent.isScrolling = true; | ||
@@ -168,4 +168,6 @@ var engine = this.parent.dataType === 'pivot' ? this.parent.engineModule : this.parent.olapEngineModule; | ||
}; | ||
var enableOptimizedRendering = this.parent.virtualScrollSettings && this.parent.virtualScrollSettings.allowSinglePage && this.parent.dataType === 'pivot'; | ||
if (this.parent.pageSettings && engine.pageSettings) { | ||
if (this.direction === 'vertical') { | ||
var vScrollPos = mCont.parentElement.scrollHeight - (top + mCont.parentElement.offsetHeight); | ||
var rowValues = this.parent.dataType === 'pivot' ? | ||
@@ -175,10 +177,16 @@ (this.parent.dataSourceSettings.valueAxis === 'row' ? this.parent.dataSourceSettings.values.length : 1) : 1; | ||
var section = Math.ceil(top / exactSize); | ||
if ((this.parent.scrollPosObject.vertical === section || | ||
engine.pageSettings.rowPageSize >= engine.rowCount)) { | ||
// this.parent.hideWaitingPopup(); | ||
section += enableOptimizedRendering && vScrollPos <= 0 ? 1 : 0; | ||
if (((this.parent.scrollPosObject.vertical === section || engine.pageSettings.rowPageSize >= engine.rowCount) || | ||
(virtualTable && (virtualTable.scrollHeight < (virtualTable.parentElement.clientHeight * 3)))) && | ||
!enableOptimizedRendering) { | ||
return; | ||
} | ||
this.parent.actionObj.actionName = events.verticalScroll; | ||
if (enableOptimizedRendering && this.parent.grid && this.parent.grid.element.querySelector('.e-spinner-inner')) { | ||
addClass([this.parent.grid.element.querySelector('.e-spinner-inner')], [cls.PIVOT_HIDE_LOADER]); | ||
} | ||
this.parent.actionBeginMethod(); | ||
this.parent.showWaitingPopup(); | ||
if (!enableOptimizedRendering) { | ||
this.parent.showWaitingPopup(); | ||
} | ||
this.parent.scrollPosObject.vertical = section; | ||
@@ -210,2 +218,3 @@ this.parent.pageSettings.currentRowPage = engine.pageSettings.currentRowPage = section > 1 ? section : 1; | ||
else { | ||
var hScrollPos = ele.scrollWidth - (ele.scrollLeft + ele.offsetWidth); | ||
var colValues = this.parent.dataType === 'pivot' ? | ||
@@ -216,9 +225,16 @@ (this.parent.dataSourceSettings.valueAxis === 'column' ? this.parent.dataSourceSettings.values.length : 1) : 1; | ||
var section = Math.ceil(Math.abs(left) / exactSize); | ||
if (this.parent.scrollPosObject.horizontal === section) { | ||
// this.parent.hideWaitingPopup(); | ||
var enableOptimizedRendering_1 = this.parent.virtualScrollSettings && this.parent.virtualScrollSettings.allowSinglePage && this.parent.dataType === 'pivot'; | ||
section += enableOptimizedRendering_1 && hScrollPos <= 0 ? 1 : 0; | ||
if ((this.parent.scrollPosObject.horizontal === section || (virtualTable && (virtualTable.scrollWidth < | ||
(virtualTable.parentElement.clientWidth * 3)))) && !enableOptimizedRendering_1) { | ||
return; | ||
} | ||
this.parent.actionObj.actionName = events.horizontalScroll; | ||
if (enableOptimizedRendering_1 && this.parent.grid && this.parent.grid.element.querySelector('.e-spinner-inner')) { | ||
addClass([this.parent.grid.element.querySelector('.e-spinner-inner')], [cls.PIVOT_HIDE_LOADER]); | ||
} | ||
this.parent.actionBeginMethod(); | ||
this.parent.showWaitingPopup(); | ||
if (!enableOptimizedRendering_1) { | ||
this.parent.showWaitingPopup(); | ||
} | ||
var pivot_1 = this.parent; | ||
@@ -276,8 +292,23 @@ pivot_1.scrollPosObject.horizontal = section; | ||
}; | ||
VirtualScroll.prototype.common = function (mHdr, mCont) { | ||
VirtualScroll.prototype.common = function (mHdr, mCont, fCont) { | ||
var _this = this; | ||
return function (e) { | ||
var ele = _this.parent.isAdaptive ? mCont : | ||
mCont.parentElement.parentElement.querySelector('.' + cls.VIRTUALTABLE_DIV); | ||
_this.update(_this.parent.element.querySelector('.' + cls.GRID_CLASS + ' .' + cls.CONTENT_CLASS).scrollTop * _this.parent.verticalScrollScale, ele.scrollLeft * _this.parent.horizontalScrollScale, e); | ||
closest(mCont, '.' + cls.GRID_CONTENT).querySelector('.' + cls.VIRTUALTABLE_DIV); | ||
var enableOptimizedRendering = _this.parent.virtualScrollSettings && _this.parent.virtualScrollSettings.allowSinglePage && _this.parent.dataType === 'pivot'; | ||
if (enableOptimizedRendering) { | ||
if (_this.direction === 'vertical') { | ||
if (_this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)) { | ||
addClass([fCont], ['e-virtual-pivot-content']); | ||
removeClass([_this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)], [cls.PIVOT_HIDE_LOADER]); | ||
} | ||
} | ||
else { | ||
if (_this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)) { | ||
addClass([mHdr, mCont], ['e-virtual-pivot-content']); | ||
removeClass([_this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)], [cls.PIVOT_HIDE_LOADER]); | ||
} | ||
} | ||
} | ||
_this.update(_this.parent.element.querySelector('.' + cls.GRID_CLASS + ' .' + cls.CONTENT_CLASS).scrollTop * _this.parent.verticalScrollScale, ele.scrollLeft * _this.parent.horizontalScrollScale, e, ele, mHdr, mCont, fCont); | ||
}; | ||
@@ -297,3 +328,3 @@ }; | ||
var timeOutObj; | ||
var ele = this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + cls.VIRTUALTABLE_DIV); | ||
var ele = this.parent.isAdaptive ? mCont : closest(mCont, '.' + cls.GRID_CONTENT).querySelector('.' + cls.VIRTUALTABLE_DIV); | ||
var eleScrollLeft = Math.abs(ele.scrollLeft); | ||
@@ -303,9 +334,4 @@ var left = eleScrollLeft * this.parent.horizontalScrollScale; | ||
horiOffset = this.parent.enableRtl ? horiOffset : -horiOffset; | ||
for (var i = 0, j = this.parent.element.querySelectorAll('.' + cls.FREEZED_CELL); i < j.length; i++) { | ||
if (this.parent.enableRtl) { | ||
j[i].style.right = (Number(horiOffset)) + 'px'; | ||
} | ||
else { | ||
j[i].style.left = (Number(-horiOffset)) + 'px'; | ||
} | ||
if (ele.style.display !== 'none') { | ||
this.alignFreezedCells(horiOffset, false); | ||
} | ||
@@ -319,3 +345,3 @@ return function (e) { | ||
left = e.type === 'touchmove' ? eleScrollLeft : left; | ||
_this.update(mCont.parentElement.scrollTop * _this.parent.verticalScrollScale, left, e); | ||
_this.update(mCont.parentElement.scrollTop * _this.parent.verticalScrollScale, left, e, ele, mHdr, mCont, mCont); | ||
}, 300); | ||
@@ -338,10 +364,3 @@ } | ||
}); | ||
for (var i = 0, j = _this.parent.element.querySelectorAll('.' + cls.FREEZED_CELL); i < j.length; i++) { | ||
if (_this.parent.enableRtl) { | ||
j[i].style.right = (Number(horiOffset)) + 'px'; | ||
} | ||
else { | ||
j[i].style.left = (Number(-horiOffset)) + 'px'; | ||
} | ||
} | ||
_this.alignFreezedCells(horiOffset, false); | ||
} | ||
@@ -357,2 +376,7 @@ var excessMove = _this.parent.scrollPosObject.horizontalSection > left ? | ||
// showSpinner(this.parent.element); | ||
var enableOptimizedRendering = _this.parent.virtualScrollSettings && _this.parent.virtualScrollSettings.allowSinglePage && _this.parent.dataType === 'pivot'; | ||
if (enableOptimizedRendering && _this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)) { | ||
addClass([mHdr, mCont], ['e-virtual-pivot-content']); | ||
removeClass([_this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)], [cls.PIVOT_HIDE_LOADER]); | ||
} | ||
if (left > mHdr.clientWidth) { | ||
@@ -369,3 +393,3 @@ if (_this.parent.scrollPosObject.left < 1) { | ||
} | ||
horiOffset = -((left - (_this.parent.scrollPosObject.horizontalSection + excessMove) - mCont.parentElement.parentElement.querySelector('.' + cls.VIRTUALTABLE_DIV).scrollLeft)); | ||
horiOffset = -((left - (_this.parent.scrollPosObject.horizontalSection + excessMove) - closest(mCont, '.' + cls.GRID_CONTENT).querySelector('.' + cls.VIRTUALTABLE_DIV).scrollLeft)); | ||
var vWidth = (_this.parent.gridSettings.columnWidth * _this.engineModule.columnCount); | ||
@@ -386,10 +410,3 @@ if (vWidth > _this.parent.scrollerBrowserLimit) { | ||
}); | ||
for (var i = 0, j = _this.parent.element.querySelectorAll('.' + cls.FREEZED_CELL); i < j.length; i++) { | ||
if (_this.parent.enableRtl) { | ||
j[i].style.right = (Number(horiOffset)) + 'px'; | ||
} | ||
else { | ||
j[i].style.left = (Number(-horiOffset)) + 'px'; | ||
} | ||
} | ||
_this.alignFreezedCells(horiOffset, false); | ||
_this.parent.scrollPosObject.horizontalSection = _this.parent.scrollPosObject.horizontalSection + excessMove; | ||
@@ -417,10 +434,3 @@ } | ||
}); | ||
for (var i = 0, j = _this.parent.element.querySelectorAll('.' + cls.FREEZED_CELL); i < j.length; i++) { | ||
if (_this.parent.enableRtl) { | ||
j[i].style.right = (Number(horiOffset)) + 'px'; | ||
} | ||
else { | ||
j[i].style.left = (Number(-horiOffset)) + 'px'; | ||
} | ||
} | ||
_this.alignFreezedCells(horiOffset, false); | ||
} | ||
@@ -434,88 +444,125 @@ _this.previousValues.left = left; | ||
}; | ||
VirtualScroll.prototype.onVerticalScroll = function (mCont) { | ||
/** | ||
* It performs while scrolling horizontal scroll bar | ||
* | ||
* @param {number} horiOffset - It contains the horizondal offset translation value of freezed cells. | ||
* @param {boolean} isParentCells - It helps to identify the frozen cells of the parent element. | ||
* @returns {void} | ||
* @hidden | ||
*/ | ||
VirtualScroll.prototype.alignFreezedCells = function (horiOffset, isParentCells) { | ||
for (var i = 0, j = this.parent.element.querySelectorAll('.' + cls.FREEZED_CELL); i < j.length; i++) { | ||
if (isParentCells) { | ||
if (this.parent.enableRtl) { | ||
j[i].style.right = -horiOffset + 'px'; | ||
} | ||
else { | ||
j[i].style.left = horiOffset + 'px'; | ||
} | ||
} | ||
else { | ||
if (this.parent.enableRtl) { | ||
j[i].style.right = (Number(horiOffset)) + 'px'; | ||
} | ||
else { | ||
j[i].style.left = (Number(-horiOffset)) + 'px'; | ||
} | ||
} | ||
} | ||
}; | ||
VirtualScroll.prototype.onVerticalScroll = function (mCont, fCont) { | ||
var _this = this; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
var timeOutObj; | ||
var virtualTableElement = mCont.querySelector('.' + cls.CONTENT_VIRTUALTABLE_DIV) ? | ||
mCont.querySelector('.' + cls.CONTENT_VIRTUALTABLE_DIV) : mCont; | ||
return function (e) { | ||
var top = mCont.scrollTop * _this.parent.verticalScrollScale; | ||
if (e.type === 'wheel' || e.type === 'touchmove' || _this.eventType === 'wheel' || _this.eventType === 'touchmove' || e.type === 'keyup' || e.type === 'keydown') { | ||
var ele_1 = _this.parent.isAdaptive ? mCont : mCont.parentElement.parentElement.querySelector('.' + cls.VIRTUALTABLE_DIV); | ||
clearTimeout(timeOutObj); | ||
timeOutObj = setTimeout(function () { | ||
var scrollLeft = 0; | ||
if (_this.parent.isAdaptive) { | ||
var contentTable = ele_1.querySelector('.' + cls.CONTENT_VIRTUALTABLE_DIV); | ||
scrollLeft = (ele_1.scrollLeft === contentTable.scrollLeft) ? ele_1.scrollLeft : | ||
contentTable.scrollLeft; | ||
} | ||
else { | ||
scrollLeft = ele_1.scrollLeft; | ||
} | ||
_this.update(mCont.scrollTop * _this.parent.verticalScrollScale, scrollLeft * _this.parent.horizontalScrollScale, e); | ||
}, 300); | ||
} | ||
if (_this.previousValues.top === top) { | ||
return; | ||
} | ||
if (_this.parent.scrollPosObject.horizontalSection < 0) { | ||
_this.parent.scrollPosObject.horizontalSection = 0; | ||
} | ||
_this.parent.scrollDirection = _this.direction = 'vertical'; | ||
var vertiOffset = -((top - _this.parent.scrollPosObject.verticalSection - mCont.scrollTop)); | ||
var horiOffset = mCont.querySelector('.' + cls.TABLE).style.transform.split(',')[0].trim(); | ||
if (vertiOffset > _this.parent.virtualDiv.clientHeight) { | ||
vertiOffset = _this.parent.virtualDiv.clientHeight; | ||
} | ||
if (mCont.scrollTop < _this.parent.scrollerBrowserLimit) { | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: 'translate(' + 0 + 'px,' + vertiOffset + 'px)' | ||
}); | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: horiOffset + ',' + vertiOffset + 'px)' | ||
}); | ||
} | ||
var excessMove = _this.parent.scrollPosObject.verticalSection > top ? | ||
-(_this.parent.scrollPosObject.verticalSection - top) : ((top + mCont.clientHeight) - | ||
(_this.parent.scrollPosObject.verticalSection + mCont.querySelector('.' + cls.TABLE).offsetHeight)); | ||
var notLastPage = Math.ceil(_this.parent.scrollPosObject.verticalSection / _this.parent.verticalScrollScale) < | ||
_this.parent.scrollerBrowserLimit; | ||
if (_this.parent.scrollPosObject.verticalSection > top ? true : (excessMove > 1 && notLastPage)) { | ||
// showSpinner(this.parent.element); | ||
if (top > mCont.clientHeight) { | ||
if (_this.parent.scrollPosObject.top < 1) { | ||
_this.parent.scrollPosObject.top = mCont.clientHeight; | ||
} | ||
_this.parent.scrollPosObject.top = _this.parent.scrollPosObject.top - 50; | ||
excessMove = _this.parent.scrollPosObject.verticalSection > top ? | ||
(excessMove - _this.parent.scrollPosObject.top) : (excessMove + _this.parent.scrollPosObject.top); | ||
if (_this.parent.isAdaptive || (virtualTableElement.scrollHeight > (virtualTableElement.parentElement.clientHeight * 3))) { | ||
var top_1 = mCont.scrollTop * _this.parent.verticalScrollScale; | ||
if (e.type === 'wheel' || e.type === 'touchmove' || _this.eventType === 'wheel' || _this.eventType === 'touchmove' || e.type === 'keyup' || e.type === 'keydown') { | ||
var ele_1 = _this.parent.isAdaptive ? mCont : closest(mCont, '.' + cls.GRID_CONTENT).querySelector('.' + cls.VIRTUALTABLE_DIV); | ||
clearTimeout(timeOutObj); | ||
timeOutObj = setTimeout(function () { | ||
var scrollLeft = 0; | ||
if (_this.parent.isAdaptive) { | ||
var contentTable = ele_1.querySelector('.' + cls.CONTENT_VIRTUALTABLE_DIV); | ||
scrollLeft = (ele_1.scrollLeft === contentTable.scrollLeft) ? ele_1.scrollLeft : | ||
contentTable.scrollLeft; | ||
} | ||
else { | ||
scrollLeft = ele_1.scrollLeft; | ||
} | ||
_this.update(mCont.scrollTop * _this.parent.verticalScrollScale, scrollLeft * _this.parent.horizontalScrollScale, e, ele_1, null, mCont, fCont); | ||
}, 300); | ||
} | ||
else { | ||
excessMove = -_this.parent.scrollPosObject.verticalSection; | ||
if (_this.previousValues.top === top_1) { | ||
return; | ||
} | ||
var movableTable = _this.parent.element.querySelector('.' + cls.CONTENT_CLASS).querySelector('.' + cls.TABLE); | ||
vertiOffset = -((top - (_this.parent.scrollPosObject.verticalSection + excessMove) - mCont.scrollTop)); | ||
var vHeight = (_this.parent.gridSettings.rowHeight * _this.engineModule.rowCount + 0.1 | ||
- movableTable.clientHeight); | ||
if (vHeight > _this.parent.scrollerBrowserLimit) { | ||
_this.parent.verticalScrollScale = vHeight / _this.parent.scrollerBrowserLimit; | ||
vHeight = _this.parent.scrollerBrowserLimit; | ||
if (_this.parent.scrollPosObject.horizontalSection < 0) { | ||
_this.parent.scrollPosObject.horizontalSection = 0; | ||
} | ||
if (vertiOffset > vHeight && vertiOffset > top) { | ||
vertiOffset = top; | ||
excessMove = 0; | ||
} | ||
_this.parent.scrollDirection = _this.direction = 'vertical'; | ||
var vertiOffset = -((top_1 - _this.parent.scrollPosObject.verticalSection - mCont.scrollTop)); | ||
var horiOffset = mCont.querySelector('.' + cls.TABLE).style.transform.split(',')[0].trim(); | ||
if (vertiOffset > _this.parent.virtualDiv.clientHeight) { | ||
vertiOffset = _this.parent.virtualDiv.clientHeight; | ||
} | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: 'translate(' + 0 + 'px,' + vertiOffset + 'px)' | ||
}); | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: horiOffset + ',' + vertiOffset + 'px)' | ||
}); | ||
_this.parent.scrollPosObject.verticalSection = _this.parent.scrollPosObject.verticalSection + excessMove; | ||
if (mCont.scrollTop < _this.parent.scrollerBrowserLimit) { | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: 'translate(' + 0 + 'px,' + vertiOffset + 'px)' | ||
}); | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: horiOffset + ',' + vertiOffset + 'px)' | ||
}); | ||
} | ||
var excessMove = _this.parent.scrollPosObject.verticalSection > top_1 ? | ||
-(_this.parent.scrollPosObject.verticalSection - top_1) : ((top_1 + mCont.clientHeight) - | ||
(_this.parent.scrollPosObject.verticalSection + mCont.querySelector('.' + cls.TABLE).offsetHeight)); | ||
var notLastPage = Math.ceil(_this.parent.scrollPosObject.verticalSection / _this.parent.verticalScrollScale) < | ||
_this.parent.scrollerBrowserLimit; | ||
if (_this.parent.scrollPosObject.verticalSection > top_1 ? true : (excessMove > 1 && notLastPage)) { | ||
// showSpinner(this.parent.element); | ||
var enableOptimizedRendering = _this.parent.virtualScrollSettings && _this.parent.virtualScrollSettings.allowSinglePage && _this.parent.dataType === 'pivot'; | ||
if (enableOptimizedRendering && _this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)) { | ||
addClass([fCont], ['e-virtual-pivot-content']); | ||
removeClass([_this.parent.element.querySelector('.' + cls.PIVOT_CONTENT_LOADER)], [cls.PIVOT_HIDE_LOADER]); | ||
} | ||
if (top_1 > mCont.clientHeight) { | ||
if (_this.parent.scrollPosObject.top < 1) { | ||
_this.parent.scrollPosObject.top = mCont.clientHeight; | ||
} | ||
_this.parent.scrollPosObject.top = _this.parent.scrollPosObject.top - 50; | ||
excessMove = _this.parent.scrollPosObject.verticalSection > top_1 ? | ||
(excessMove - _this.parent.scrollPosObject.top) : (excessMove + _this.parent.scrollPosObject.top); | ||
} | ||
else { | ||
excessMove = -_this.parent.scrollPosObject.verticalSection; | ||
} | ||
var movableTable = _this.parent.element.querySelector('.' + cls.CONTENT_CLASS).querySelector('.' + cls.TABLE); | ||
vertiOffset = -((top_1 - (_this.parent.scrollPosObject.verticalSection + excessMove) - mCont.scrollTop)); | ||
var vHeight = (_this.parent.gridSettings.rowHeight * _this.engineModule.rowCount + 0.1 | ||
- movableTable.clientHeight); | ||
if (vHeight > _this.parent.scrollerBrowserLimit) { | ||
_this.parent.verticalScrollScale = vHeight / _this.parent.scrollerBrowserLimit; | ||
vHeight = _this.parent.scrollerBrowserLimit; | ||
} | ||
if (vertiOffset > vHeight && vertiOffset > top_1) { | ||
vertiOffset = top_1; | ||
excessMove = 0; | ||
} | ||
if (vertiOffset > _this.parent.virtualDiv.clientHeight) { | ||
vertiOffset = _this.parent.virtualDiv.clientHeight; | ||
} | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: 'translate(' + 0 + 'px,' + vertiOffset + 'px)' | ||
}); | ||
setStyleAttribute(mCont.querySelector('.' + cls.TABLE), { | ||
transform: horiOffset + ',' + vertiOffset + 'px)' | ||
}); | ||
_this.parent.scrollPosObject.verticalSection = _this.parent.scrollPosObject.verticalSection + excessMove; | ||
} | ||
_this.previousValues.top = top_1; | ||
_this.frozenPreviousValues.top = top_1; | ||
_this.eventType = ''; | ||
} | ||
_this.previousValues.top = top; | ||
_this.frozenPreviousValues.top = top; | ||
_this.eventType = ''; | ||
}; | ||
@@ -522,0 +569,0 @@ }; |
@@ -124,9 +124,3 @@ import { PivotEngine } from '../../base/engine'; | ||
frameStackedHeaders(): ColumnModel[]; | ||
/** | ||
* It is used to configure the last column width. | ||
* | ||
* @param {ColumnModel} column - It contains the column model. | ||
* @returns {void} | ||
* @hidden | ||
*/ | ||
/** @hidden */ | ||
configLastColumnWidth(column: ColumnModel): void; | ||
@@ -133,0 +127,0 @@ /** @hidden */ |
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 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 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 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
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
40360223
354
389206
+ Added@syncfusion/ej2-base@25.1.35(transitive)
+ Added@syncfusion/ej2-buttons@25.1.39(transitive)
+ Added@syncfusion/ej2-calendars@25.1.42(transitive)
+ Added@syncfusion/ej2-charts@25.1.42(transitive)
+ Added@syncfusion/ej2-compression@25.1.35(transitive)
+ Added@syncfusion/ej2-data@25.1.35(transitive)
+ Added@syncfusion/ej2-dropdowns@25.1.41(transitive)
+ Added@syncfusion/ej2-excel-export@25.1.35(transitive)
+ Added@syncfusion/ej2-file-utils@25.1.35(transitive)
+ Added@syncfusion/ej2-grids@25.1.42(transitive)
+ Added@syncfusion/ej2-icons@25.1.35(transitive)
+ Added@syncfusion/ej2-inputs@25.1.42(transitive)
+ Added@syncfusion/ej2-lists@25.1.41(transitive)
+ Added@syncfusion/ej2-navigations@25.1.42(transitive)
+ Added@syncfusion/ej2-notifications@25.1.35(transitive)
+ Added@syncfusion/ej2-pdf-export@25.1.38(transitive)
+ Added@syncfusion/ej2-popups@25.1.42(transitive)
+ Added@syncfusion/ej2-splitbuttons@25.1.38(transitive)
+ Added@syncfusion/ej2-svg-base@25.1.37(transitive)
- Removed@syncfusion/ej2-base@24.2.8(transitive)
- Removed@syncfusion/ej2-buttons@24.2.7(transitive)
- Removed@syncfusion/ej2-calendars@24.2.9(transitive)
- Removed@syncfusion/ej2-charts@24.2.9(transitive)
- Removed@syncfusion/ej2-compression@24.2.3(transitive)
- Removed@syncfusion/ej2-data@24.2.3(transitive)
- Removed@syncfusion/ej2-dropdowns@24.2.9(transitive)
- Removed@syncfusion/ej2-excel-export@24.2.4(transitive)
- Removed@syncfusion/ej2-file-utils@24.2.3(transitive)
- Removed@syncfusion/ej2-grids@24.2.9(transitive)
- Removed@syncfusion/ej2-icons@24.2.3(transitive)
- Removed@syncfusion/ej2-inputs@24.2.9(transitive)
- Removed@syncfusion/ej2-lists@24.2.8(transitive)
- Removed@syncfusion/ej2-navigations@24.2.8(transitive)
- Removed@syncfusion/ej2-notifications@24.2.4(transitive)
- Removed@syncfusion/ej2-pdf-export@24.2.3(transitive)
- Removed@syncfusion/ej2-popups@24.2.10(transitive)
- Removed@syncfusion/ej2-splitbuttons@24.2.7(transitive)
- Removed@syncfusion/ej2-svg-base@24.2.3(transitive)