Socket
Socket
Sign inDemoInstall

@devexpress/dx-grid-core

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devexpress/dx-grid-core - npm Package Compare versions

Comparing version 1.0.0-alpha.13 to 1.0.0-alpha.14

115

dist/dx-grid-core.es.js
/**
* Bundle of @devexpress/dx-grid-core
* Generated: 2017-10-19
* Version: 1.0.0-alpha.13
* Generated: 2017-10-25
* Version: 1.0.0-alpha.14
* License: https://js.devexpress.com/Licensing

@@ -617,2 +617,4 @@ */

var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnIdentity) {
var keyPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
if (!grouping.length) return rows;

@@ -639,4 +641,7 @@

var groupedBy = grouping[0].columnName;
var nestedGrouping = grouping.slice(1);
return [].concat(toConsumableArray(groups.values())).map(function (_ref) {
return [].concat(toConsumableArray(groups.values())).reduce(function (acc, _ref) {
var _acc$push;
var _ref2 = slicedToArray(_ref, 3),

@@ -647,30 +652,78 @@ value = _ref2[0],

return {
value: value,
key: key,
items: groupedRows(items, nestedGrouping, getCellValue, getColumnIdentity)
};
});
var compoundKey = '' + keyPrefix + key;
acc.push((_acc$push = {}, defineProperty(_acc$push, GRID_GROUP_CHECK, true), defineProperty(_acc$push, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_acc$push, 'groupedBy', groupedBy), defineProperty(_acc$push, 'compoundKey', compoundKey), defineProperty(_acc$push, 'key', key), defineProperty(_acc$push, 'value', value), _acc$push));
acc.push.apply(acc, toConsumableArray(groupedRows(items, nestedGrouping, getCellValue, getColumnIdentity, '' + compoundKey + GROUP_KEY_SEPARATOR)));
return acc;
}, []);
};
var expandedGroupRows = function expandedGroupRows(rows, grouping, expandedGroups) {
var keyPrefix = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
if (!grouping.length) return rows;
var groupingColumnNames = grouping.map(function (columnGrouping) {
return columnGrouping.columnName;
});
var currentGroupExpanded = true;
var currentGroupLevel = 0;
return rows.reduce(function (acc, row) {
if (!row[GRID_GROUP_CHECK]) {
if (currentGroupExpanded) acc.push(row);
return acc;
}
var groupLevel = groupingColumnNames.indexOf(row.groupedBy);
if (groupLevel > currentGroupLevel && !currentGroupExpanded) {
return acc;
}
currentGroupExpanded = expandedGroups.has(row.compoundKey);
currentGroupLevel = groupLevel;
acc.push(row);
return acc;
}, []);
};
var customGroupedRows = function customGroupedRows(currentRows, grouping, getChildGroups) {
var rootRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : currentRows;
var keyPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
if (!currentRows) return [];
if (!grouping.length) return currentRows;
var groupedBy = grouping[0].columnName;
var nestedGrouping = grouping.slice(1);
return rows.reduce(function (acc, _ref3) {
var _ref4;
return getChildGroups(currentRows, grouping[0], rootRows).reduce(function (acc, _ref) {
var _acc$push;
var value = _ref3.value,
groupKey = _ref3.key,
items = _ref3.items;
var key = _ref.key,
_ref$value = _ref.value,
value = _ref$value === undefined ? key : _ref$value,
childRows = _ref.childRows;
var groupedBy = grouping[0].columnName;
var key = '' + keyPrefix + groupKey;
var expanded = expandedGroups.has(key);
return [].concat(toConsumableArray(acc), [(_ref4 = {}, defineProperty(_ref4, GRID_GROUP_CHECK, true), defineProperty(_ref4, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_ref4, 'groupedBy', groupedBy), defineProperty(_ref4, 'key', key), defineProperty(_ref4, 'value', value), _ref4)], toConsumableArray(expanded ? expandedGroupRows(items, nestedGrouping, expandedGroups, '' + key + GROUP_KEY_SEPARATOR) : []));
var compoundKey = '' + keyPrefix + key;
acc.push((_acc$push = {}, defineProperty(_acc$push, GRID_GROUP_CHECK, true), defineProperty(_acc$push, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_acc$push, 'groupedBy', groupedBy), defineProperty(_acc$push, 'compoundKey', compoundKey), defineProperty(_acc$push, 'key', key), defineProperty(_acc$push, 'value', value), _acc$push));
acc.push.apply(acc, toConsumableArray(customGroupedRows(childRows, nestedGrouping, getChildGroups, rootRows, '' + compoundKey + GROUP_KEY_SEPARATOR)));
return acc;
}, []);
};
var customGroupingRowIdGetter = function customGroupingRowIdGetter(getRowId, rows) {
var firstRow = rows.find(function (row) {
return !row[GRID_GROUP_CHECK];
});
if (!firstRow || getRowId(firstRow)) {
return getRowId;
}
var map = new Map(rows.filter(function (row) {
return !row[GRID_GROUP_CHECK];
}).map(function (row, rowIndex) {
return [row, rowIndex];
}));
return function (row) {
return map.get(row);
};
};
var groupingPanelItems = function groupingPanelItems(columns, grouping) {

@@ -705,3 +758,3 @@ return grouping.map(function (_ref) {

var rowsWithPageHeaders = function rowsWithPageHeaders(rows, pageSize, getRowLevelKey) {
if (!pageSize) return rows;
if (!pageSize || !getRowLevelKey) return rows;

@@ -715,6 +768,6 @@ var result = rows.slice();

var row = result[currentIndex];
var header = getRowLevelKey ? getRowLevelKey(row) : row._headerKey;
if (header) {
var levelKey = getRowLevelKey(row);
if (levelKey) {
var headerIndex = headerRows.findIndex(function (headerRow) {
return (getRowLevelKey ? getRowLevelKey(headerRow) : row._headerKey) === header;
return getRowLevelKey(headerRow) === levelKey;
});

@@ -822,5 +875,9 @@ if (headerIndex === -1) {

var getAvailableToSelect = function getAvailableToSelect(rows, getRowId, isGroupRow) {
return rows.filter(function (row) {
return (!isGroupRow || !isGroupRow(row)) && !row.type;
}).map(function (row) {
var dataRows = rows;
if (isGroupRow) {
dataRows = dataRows.filter(function (row) {
return !isGroupRow(row);
});
}
return dataRows.map(function (row) {
return getRowId(row);

@@ -1137,3 +1194,3 @@ });

return tableRows.map(function (tableRow) {
if (tableRow.type !== TABLE_DATA_TYPE || !isGroupRow(tableRow.row) && tableRow.row.type !== 'groupRow') {
if (tableRow.type !== TABLE_DATA_TYPE || !isGroupRow(tableRow.row)) {
return tableRow;

@@ -1466,3 +1523,3 @@ }

export { getTableRowColumnsWithColSpan, getTableColumnGeometries, getTableTargetColumnIndex, getAnimations, filterActiveAnimations, evalAnimations, getGroupCellTargetIndex, rowIdGetter, cellValueGetter, setColumnSorting, getColumnSortingDirection, sortedRows, setColumnFilter, getColumnFilterConfig, filteredRows, groupByColumn, toggleExpandedGroups, draftGroupingChange, cancelGroupingChange, draftGrouping, groupRowChecker, groupRowLevelKeyGetter, groupedRows, expandedGroupRows, groupingPanelItems, setCurrentPage, setPageSize, paginatedRows, rowsWithPageHeaders, pageCount, rowCount, firstRowOnPage, lastRowOnPage, setRowsSelection, getAvailableToSelect, getAvailableSelection, startEditRows, stopEditRows, addRow, changeAddedRow, cancelAddedRows, changeRow, cancelChanges, deleteRows, cancelDeletedRows, changedRowsByIds, addedRowsByIds, computedCreateRowChange, getRowChange, setColumnOrder, orderedColumns, tableColumnsWithWidths, changeTableColumnWidths, changeDraftTableColumnWidths, TABLE_EDIT_COMMAND_TYPE, isHeadingEditCommandsTableCell, isEditCommandsTableCell, tableColumnsWithEditing, TABLE_ADDED_TYPE, TABLE_EDIT_TYPE, isEditTableCell, isAddedTableRow, isEditTableRow, tableRowsWithEditing, TABLE_FILTER_TYPE, isFilterTableCell, isFilterTableRow, tableHeaderRowsWithFilter, TABLE_GROUP_TYPE, isGroupTableCell, isGroupIndentTableCell, isGroupTableRow, tableColumnsWithGrouping, tableRowsWithGrouping, TABLE_HEADING_TYPE, isHeadingTableCell, isHeadingTableRow, tableRowsWithHeading, TABLE_DETAIL_TYPE, isDetailRowExpanded, isDetailToggleTableCell, isDetailTableRow, setDetailRowExpanded, tableRowsWithExpandedDetail, tableColumnsWithDetail, TABLE_SELECT_TYPE, isSelectTableCell, isSelectAllTableCell, tableColumnsWithSelection, TABLE_DATA_TYPE, TABLE_NODATA_TYPE, isNoDataTableRow, isDataTableCell, isHeaderStubTableCell, isDataTableRow, tableColumnsWithDataRows, tableRowsWithDataRows, visibleTableColumns, columnChooserItems, toggleColumn };
export { getTableRowColumnsWithColSpan, getTableColumnGeometries, getTableTargetColumnIndex, getAnimations, filterActiveAnimations, evalAnimations, getGroupCellTargetIndex, rowIdGetter, cellValueGetter, setColumnSorting, getColumnSortingDirection, sortedRows, setColumnFilter, getColumnFilterConfig, filteredRows, groupByColumn, toggleExpandedGroups, draftGroupingChange, cancelGroupingChange, draftGrouping, groupRowChecker, groupRowLevelKeyGetter, groupedRows, expandedGroupRows, customGroupedRows, customGroupingRowIdGetter, groupingPanelItems, setCurrentPage, setPageSize, paginatedRows, rowsWithPageHeaders, pageCount, rowCount, firstRowOnPage, lastRowOnPage, setRowsSelection, getAvailableToSelect, getAvailableSelection, startEditRows, stopEditRows, addRow, changeAddedRow, cancelAddedRows, changeRow, cancelChanges, deleteRows, cancelDeletedRows, changedRowsByIds, addedRowsByIds, computedCreateRowChange, getRowChange, setColumnOrder, orderedColumns, tableColumnsWithWidths, changeTableColumnWidths, changeDraftTableColumnWidths, TABLE_EDIT_COMMAND_TYPE, isHeadingEditCommandsTableCell, isEditCommandsTableCell, tableColumnsWithEditing, TABLE_ADDED_TYPE, TABLE_EDIT_TYPE, isEditTableCell, isAddedTableRow, isEditTableRow, tableRowsWithEditing, TABLE_FILTER_TYPE, isFilterTableCell, isFilterTableRow, tableHeaderRowsWithFilter, TABLE_GROUP_TYPE, isGroupTableCell, isGroupIndentTableCell, isGroupTableRow, tableColumnsWithGrouping, tableRowsWithGrouping, TABLE_HEADING_TYPE, isHeadingTableCell, isHeadingTableRow, tableRowsWithHeading, TABLE_DETAIL_TYPE, isDetailRowExpanded, isDetailToggleTableCell, isDetailTableRow, setDetailRowExpanded, tableRowsWithExpandedDetail, tableColumnsWithDetail, TABLE_SELECT_TYPE, isSelectTableCell, isSelectAllTableCell, tableColumnsWithSelection, TABLE_DATA_TYPE, TABLE_NODATA_TYPE, isNoDataTableRow, isDataTableCell, isHeaderStubTableCell, isDataTableRow, tableColumnsWithDataRows, tableRowsWithDataRows, visibleTableColumns, columnChooserItems, toggleColumn };
//# sourceMappingURL=dx-grid-core.es.js.map
/**
* Bundle of @devexpress/dx-grid-core
* Generated: 2017-10-19
* Version: 1.0.0-alpha.13
* Generated: 2017-10-25
* Version: 1.0.0-alpha.14
* License: https://js.devexpress.com/Licensing

@@ -621,2 +621,4 @@ */

var groupedRows = function groupedRows(rows, grouping, getCellValue, getColumnIdentity) {
var keyPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
if (!grouping.length) return rows;

@@ -643,4 +645,7 @@

var groupedBy = grouping[0].columnName;
var nestedGrouping = grouping.slice(1);
return [].concat(toConsumableArray(groups.values())).map(function (_ref) {
return [].concat(toConsumableArray(groups.values())).reduce(function (acc, _ref) {
var _acc$push;
var _ref2 = slicedToArray(_ref, 3),

@@ -651,30 +656,78 @@ value = _ref2[0],

return {
value: value,
key: key,
items: groupedRows(items, nestedGrouping, getCellValue, getColumnIdentity)
};
});
var compoundKey = '' + keyPrefix + key;
acc.push((_acc$push = {}, defineProperty(_acc$push, GRID_GROUP_CHECK, true), defineProperty(_acc$push, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_acc$push, 'groupedBy', groupedBy), defineProperty(_acc$push, 'compoundKey', compoundKey), defineProperty(_acc$push, 'key', key), defineProperty(_acc$push, 'value', value), _acc$push));
acc.push.apply(acc, toConsumableArray(groupedRows(items, nestedGrouping, getCellValue, getColumnIdentity, '' + compoundKey + GROUP_KEY_SEPARATOR)));
return acc;
}, []);
};
var expandedGroupRows = function expandedGroupRows(rows, grouping, expandedGroups) {
var keyPrefix = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
if (!grouping.length) return rows;
var groupingColumnNames = grouping.map(function (columnGrouping) {
return columnGrouping.columnName;
});
var currentGroupExpanded = true;
var currentGroupLevel = 0;
return rows.reduce(function (acc, row) {
if (!row[GRID_GROUP_CHECK]) {
if (currentGroupExpanded) acc.push(row);
return acc;
}
var groupLevel = groupingColumnNames.indexOf(row.groupedBy);
if (groupLevel > currentGroupLevel && !currentGroupExpanded) {
return acc;
}
currentGroupExpanded = expandedGroups.has(row.compoundKey);
currentGroupLevel = groupLevel;
acc.push(row);
return acc;
}, []);
};
var customGroupedRows = function customGroupedRows(currentRows, grouping, getChildGroups) {
var rootRows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : currentRows;
var keyPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
if (!currentRows) return [];
if (!grouping.length) return currentRows;
var groupedBy = grouping[0].columnName;
var nestedGrouping = grouping.slice(1);
return rows.reduce(function (acc, _ref3) {
var _ref4;
return getChildGroups(currentRows, grouping[0], rootRows).reduce(function (acc, _ref) {
var _acc$push;
var value = _ref3.value,
groupKey = _ref3.key,
items = _ref3.items;
var key = _ref.key,
_ref$value = _ref.value,
value = _ref$value === undefined ? key : _ref$value,
childRows = _ref.childRows;
var groupedBy = grouping[0].columnName;
var key = '' + keyPrefix + groupKey;
var expanded = expandedGroups.has(key);
return [].concat(toConsumableArray(acc), [(_ref4 = {}, defineProperty(_ref4, GRID_GROUP_CHECK, true), defineProperty(_ref4, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_ref4, 'groupedBy', groupedBy), defineProperty(_ref4, 'key', key), defineProperty(_ref4, 'value', value), _ref4)], toConsumableArray(expanded ? expandedGroupRows(items, nestedGrouping, expandedGroups, '' + key + GROUP_KEY_SEPARATOR) : []));
var compoundKey = '' + keyPrefix + key;
acc.push((_acc$push = {}, defineProperty(_acc$push, GRID_GROUP_CHECK, true), defineProperty(_acc$push, GRID_GROUP_LEVEL_KEY, GRID_GROUP_TYPE + '_' + groupedBy), defineProperty(_acc$push, 'groupedBy', groupedBy), defineProperty(_acc$push, 'compoundKey', compoundKey), defineProperty(_acc$push, 'key', key), defineProperty(_acc$push, 'value', value), _acc$push));
acc.push.apply(acc, toConsumableArray(customGroupedRows(childRows, nestedGrouping, getChildGroups, rootRows, '' + compoundKey + GROUP_KEY_SEPARATOR)));
return acc;
}, []);
};
var customGroupingRowIdGetter = function customGroupingRowIdGetter(getRowId, rows) {
var firstRow = rows.find(function (row) {
return !row[GRID_GROUP_CHECK];
});
if (!firstRow || getRowId(firstRow)) {
return getRowId;
}
var map = new Map(rows.filter(function (row) {
return !row[GRID_GROUP_CHECK];
}).map(function (row, rowIndex) {
return [row, rowIndex];
}));
return function (row) {
return map.get(row);
};
};
var groupingPanelItems = function groupingPanelItems(columns, grouping) {

@@ -709,3 +762,3 @@ return grouping.map(function (_ref) {

var rowsWithPageHeaders = function rowsWithPageHeaders(rows, pageSize, getRowLevelKey) {
if (!pageSize) return rows;
if (!pageSize || !getRowLevelKey) return rows;

@@ -719,6 +772,6 @@ var result = rows.slice();

var row = result[currentIndex];
var header = getRowLevelKey ? getRowLevelKey(row) : row._headerKey;
if (header) {
var levelKey = getRowLevelKey(row);
if (levelKey) {
var headerIndex = headerRows.findIndex(function (headerRow) {
return (getRowLevelKey ? getRowLevelKey(headerRow) : row._headerKey) === header;
return getRowLevelKey(headerRow) === levelKey;
});

@@ -826,5 +879,9 @@ if (headerIndex === -1) {

var getAvailableToSelect = function getAvailableToSelect(rows, getRowId, isGroupRow) {
return rows.filter(function (row) {
return (!isGroupRow || !isGroupRow(row)) && !row.type;
}).map(function (row) {
var dataRows = rows;
if (isGroupRow) {
dataRows = dataRows.filter(function (row) {
return !isGroupRow(row);
});
}
return dataRows.map(function (row) {
return getRowId(row);

@@ -1141,3 +1198,3 @@ });

return tableRows.map(function (tableRow) {
if (tableRow.type !== TABLE_DATA_TYPE || !isGroupRow(tableRow.row) && tableRow.row.type !== 'groupRow') {
if (tableRow.type !== TABLE_DATA_TYPE || !isGroupRow(tableRow.row)) {
return tableRow;

@@ -1494,2 +1551,4 @@ }

exports.expandedGroupRows = expandedGroupRows;
exports.customGroupedRows = customGroupedRows;
exports.customGroupingRowIdGetter = customGroupingRowIdGetter;
exports.groupingPanelItems = groupingPanelItems;

@@ -1496,0 +1555,0 @@ exports.setCurrentPage = setCurrentPage;

{
"name": "@devexpress/dx-grid-core",
"version": "1.0.0-alpha.13",
"version": "1.0.0-alpha.14",
"description": "Core library for the DevExtreme Reactive Grid component",

@@ -38,7 +38,7 @@ "author": {

"build:watch": "rollup -c rollup.config.js -w",
"lint": "eslint src/**/*",
"lint": "eslint \"src/**\"",
"lint:fix": "yarn run lint -- --fix"
},
"devDependencies": {
"@devexpress/dx-core": "1.0.0-alpha.13",
"@devexpress/dx-core": "1.0.0-alpha.14",
"babel-core": "^6.26.0",

@@ -63,4 +63,4 @@ "babel-jest": "^21.2.0",

"peerDependencies": {
"@devexpress/dx-core": "1.0.0-alpha.13"
"@devexpress/dx-core": "1.0.0-alpha.14"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc