Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@devexpress/dx-grid-core

Package Overview
Dependencies
Maintainers
9
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-beta.1 to 1.0.0-beta.2

81

dist/dx-grid-core.es.js
/**
* Bundle of @devexpress/dx-grid-core
* Generated: 2017-11-10
* Version: 1.0.0-beta.1
* Generated: 2017-12-14
* Version: 1.0.0-beta.2
* License: https://js.devexpress.com/Licensing

@@ -54,6 +54,6 @@ */

if (keepOther === true) {
nextSorting = Array.from(sorting).slice();
nextSorting = sorting.slice();
}
if (Array.isArray(keepOther)) {
nextSorting = Array.from(sorting).filter(function (columnSorting) {
nextSorting = sorting.slice().filter(function (columnSorting) {
return keepOther.indexOf(columnSorting.columnName) > -1;

@@ -450,3 +450,3 @@ });

var createCompare = function createCompare(sorting, getColumnCompare, getComparableValue) {
return Array.from(sorting).reverse().reduce(function (prevCompare, columnSorting) {
return sorting.slice().reverse().reduce(function (prevCompare, columnSorting) {
var columnName = columnSorting.columnName;

@@ -500,3 +500,3 @@

var _compare = createCompare(sorting, getColumnCompare, getCellValue);
return mergeSort(Array.from(rows), _compare);
return mergeSort(rows.slice(), _compare);
}

@@ -523,3 +523,3 @@

});
var nextState = Array.from(filters);
var nextState = filters.slice();

@@ -630,2 +630,5 @@ if (config) {

var GROUP_KEY_SEPARATOR = '|';
var GROUP_ADD_MODE = 'add';
var GROUP_REMOVE_MODE = 'remove';
var GROUP_REORDER_MODE = 'reorder';

@@ -636,3 +639,3 @@ var groupByColumn = function groupByColumn(state, _ref) {

var grouping = Array.from(state.grouping);
var grouping = state.grouping.slice();
var groupingIndex = grouping.findIndex(function (g) {

@@ -682,3 +685,3 @@ return g.columnName === columnName;

var expandedGroups = Array.from(state.expandedGroups);
var expandedGroups = state.expandedGroups.slice();
var groupKeyIndex = expandedGroups.indexOf(groupKey);

@@ -713,3 +716,3 @@

var result = Array.from(grouping);
var result = grouping.slice();

@@ -722,8 +725,7 @@ if (groupIndex !== -1) {

columnName: columnName,
draft: true,
mode: grouping.length > result.length ? 'reorder' : 'add'
draft: grouping.length > result.length ? GROUP_REORDER_MODE : GROUP_ADD_MODE
});
} else {
result = result.map(function (g) {
return g.columnName === columnName ? { columnName: columnName, draft: true, mode: 'remove' } : g;
return g.columnName === columnName ? { columnName: columnName, draft: GROUP_REMOVE_MODE } : g;
});

@@ -971,3 +973,3 @@ }

var selectedRows = Array.from(selection);
var selectedRows = selection.slice();
var selectedIndex = selectedRows.indexOf(rowId);

@@ -1032,9 +1034,20 @@

var getAvailableSelection = function getAvailableSelection(selection, availableToSelect) {
var availableToSelectSet = new Set(availableToSelect);
return selection.filter(function (selected) {
return availableToSelectSet.has(selected);
var someSelected = function someSelected(_ref) {
var selection = _ref.selection,
availableToSelect = _ref.availableToSelect;
return availableToSelect.length !== 0 && selection.size !== 0 && availableToSelect.some(function (elem) {
return selection.has(elem);
}) && availableToSelect.some(function (elem) {
return !selection.has(elem);
});
};
var allSelected = function allSelected(_ref2) {
var selection = _ref2.selection,
availableToSelect = _ref2.availableToSelect;
return selection.size !== 0 && availableToSelect.length !== 0 && !availableToSelect.some(function (elem) {
return !selection.has(elem);
});
};
var startEditRows = function startEditRows(prevEditingRows, _ref) {

@@ -1063,3 +1076,3 @@ var rowIds = _ref.rowIds;

var result = Array.from(addedRows);
var result = addedRows.slice();
result[rowId] = _extends({}, result[rowId], change);

@@ -1158,3 +1171,3 @@ return result;

var targetColumnIndex = order.indexOf(targetColumnName);
var newOrder = Array.from(order);
var newOrder = order.slice();

@@ -1170,3 +1183,3 @@ newOrder.splice(sourceColumnIndex, 1);

var orderedColumns = function orderedColumns(tableColumns, order) {
var result = Array.from(tableColumns);
var result = tableColumns.slice();

@@ -1332,2 +1345,6 @@ result.sort(function (a, b) {

var isGroupingChange = function isGroupingChange(columnDraftGrouping) {
return columnDraftGrouping.draft === GROUP_REMOVE_MODE || columnDraftGrouping.draft === GROUP_ADD_MODE;
};
var tableColumnsWithDraftGrouping = function tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped) {

@@ -1343,3 +1360,3 @@ return tableColumns.reduce(function (acc, tableColumn) {

return [].concat(toConsumableArray(acc), [tableColumn]);
} else if (columnDraftGrouping.mode === 'remove' || columnDraftGrouping.mode === 'add') {
} else if (isGroupingChange(columnDraftGrouping)) {
return [].concat(toConsumableArray(acc), [_extends({}, tableColumn, {

@@ -1353,7 +1370,7 @@ draft: true

var tableColumnsWithGrouping = function tableColumnsWithGrouping(tableColumns, grouping, draftGrouping, groupIndentColumnWidth, showColumnWhenGrouped) {
var tableColumnsWithGrouping = function tableColumnsWithGrouping(columns, tableColumns, grouping, draftGrouping, indentColumnWidth, showColumnWhenGrouped) {
return [].concat(toConsumableArray(grouping.map(function (columnGrouping) {
var groupedColumn = tableColumns.find(function (tableColumn) {
return tableColumn.type === TABLE_DATA_TYPE && tableColumn.column.name === columnGrouping.columnName;
}).column;
var groupedColumn = columns.find(function (column) {
return column.name === columnGrouping.columnName;
});
return {

@@ -1363,3 +1380,3 @@ key: TABLE_GROUP_TYPE + '_' + groupedColumn.name,

column: groupedColumn,
width: groupIndentColumnWidth
width: indentColumnWidth
};

@@ -1410,3 +1427,3 @@ })), toConsumableArray(tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped)));

var expandedRows = Array.from(prevExpanded);
var expandedRows = prevExpanded.slice();
var expandedIndex = expandedRows.indexOf(rowId);

@@ -1448,4 +1465,4 @@ var isRowExpanded = isExpanded !== undefined ? isExpanded : expandedIndex === -1;

var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, detailToggleCellWidth) {
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: detailToggleCellWidth }].concat(toConsumableArray(tableColumns));
var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, toggleColumnWidth) {
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: toggleColumnWidth }].concat(toConsumableArray(tableColumns));
};

@@ -1504,3 +1521,3 @@

return tableColumns.filter(function (tableColumn) {
return hiddenColumns.indexOf(tableColumn.column.name) === -1;
return tableColumn.type !== TABLE_DATA_TYPE || hiddenColumns.indexOf(tableColumn.column.name) === -1;
});

@@ -1716,3 +1733,3 @@ };

export { getTableRowColumnsWithColSpan, getTableColumnGeometries, getTableTargetColumnIndex, getAnimations, filterActiveAnimations, evalAnimations, getGroupCellTargetIndex, getMessagesFormatter, 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, TABLE_REORDERING_TYPE, changeColumnOrder, orderedColumns, tableHeaderRowsWithReordering, draftOrder, 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, getMessagesFormatter, rowIdGetter, cellValueGetter, setColumnSorting, getColumnSortingDirection, sortedRows, setColumnFilter, getColumnFilterConfig, filteredRows, GROUP_KEY_SEPARATOR, GROUP_ADD_MODE, GROUP_REMOVE_MODE, GROUP_REORDER_MODE, groupByColumn, toggleExpandedGroups, draftGroupingChange, cancelGroupingChange, draftGrouping, groupRowChecker, groupRowLevelKeyGetter, groupedRows, expandedGroupRows, customGroupedRows, customGroupingRowIdGetter, groupingPanelItems, setCurrentPage, setPageSize, paginatedRows, rowsWithPageHeaders, pageCount, rowCount, firstRowOnPage, lastRowOnPage, setRowsSelection, getAvailableToSelect, someSelected, allSelected, startEditRows, stopEditRows, addRow, changeAddedRow, cancelAddedRows, changeRow, cancelChanges, deleteRows, cancelDeletedRows, changedRowsByIds, addedRowsByIds, computedCreateRowChange, getRowChange, TABLE_REORDERING_TYPE, changeColumnOrder, orderedColumns, tableHeaderRowsWithReordering, draftOrder, 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-11-10
* Version: 1.0.0-beta.1
* Generated: 2017-12-14
* Version: 1.0.0-beta.2
* License: https://js.devexpress.com/Licensing

@@ -58,6 +58,6 @@ */

if (keepOther === true) {
nextSorting = Array.from(sorting).slice();
nextSorting = sorting.slice();
}
if (Array.isArray(keepOther)) {
nextSorting = Array.from(sorting).filter(function (columnSorting) {
nextSorting = sorting.slice().filter(function (columnSorting) {
return keepOther.indexOf(columnSorting.columnName) > -1;

@@ -454,3 +454,3 @@ });

var createCompare = function createCompare(sorting, getColumnCompare, getComparableValue) {
return Array.from(sorting).reverse().reduce(function (prevCompare, columnSorting) {
return sorting.slice().reverse().reduce(function (prevCompare, columnSorting) {
var columnName = columnSorting.columnName;

@@ -504,3 +504,3 @@

var _compare = createCompare(sorting, getColumnCompare, getCellValue);
return mergeSort(Array.from(rows), _compare);
return mergeSort(rows.slice(), _compare);
}

@@ -527,3 +527,3 @@

});
var nextState = Array.from(filters);
var nextState = filters.slice();

@@ -634,2 +634,5 @@ if (config) {

var GROUP_KEY_SEPARATOR = '|';
var GROUP_ADD_MODE = 'add';
var GROUP_REMOVE_MODE = 'remove';
var GROUP_REORDER_MODE = 'reorder';

@@ -640,3 +643,3 @@ var groupByColumn = function groupByColumn(state, _ref) {

var grouping = Array.from(state.grouping);
var grouping = state.grouping.slice();
var groupingIndex = grouping.findIndex(function (g) {

@@ -686,3 +689,3 @@ return g.columnName === columnName;

var expandedGroups = Array.from(state.expandedGroups);
var expandedGroups = state.expandedGroups.slice();
var groupKeyIndex = expandedGroups.indexOf(groupKey);

@@ -717,3 +720,3 @@

var result = Array.from(grouping);
var result = grouping.slice();

@@ -726,8 +729,7 @@ if (groupIndex !== -1) {

columnName: columnName,
draft: true,
mode: grouping.length > result.length ? 'reorder' : 'add'
draft: grouping.length > result.length ? GROUP_REORDER_MODE : GROUP_ADD_MODE
});
} else {
result = result.map(function (g) {
return g.columnName === columnName ? { columnName: columnName, draft: true, mode: 'remove' } : g;
return g.columnName === columnName ? { columnName: columnName, draft: GROUP_REMOVE_MODE } : g;
});

@@ -975,3 +977,3 @@ }

var selectedRows = Array.from(selection);
var selectedRows = selection.slice();
var selectedIndex = selectedRows.indexOf(rowId);

@@ -1036,9 +1038,20 @@

var getAvailableSelection = function getAvailableSelection(selection, availableToSelect) {
var availableToSelectSet = new Set(availableToSelect);
return selection.filter(function (selected) {
return availableToSelectSet.has(selected);
var someSelected = function someSelected(_ref) {
var selection = _ref.selection,
availableToSelect = _ref.availableToSelect;
return availableToSelect.length !== 0 && selection.size !== 0 && availableToSelect.some(function (elem) {
return selection.has(elem);
}) && availableToSelect.some(function (elem) {
return !selection.has(elem);
});
};
var allSelected = function allSelected(_ref2) {
var selection = _ref2.selection,
availableToSelect = _ref2.availableToSelect;
return selection.size !== 0 && availableToSelect.length !== 0 && !availableToSelect.some(function (elem) {
return !selection.has(elem);
});
};
var startEditRows = function startEditRows(prevEditingRows, _ref) {

@@ -1067,3 +1080,3 @@ var rowIds = _ref.rowIds;

var result = Array.from(addedRows);
var result = addedRows.slice();
result[rowId] = _extends({}, result[rowId], change);

@@ -1162,3 +1175,3 @@ return result;

var targetColumnIndex = order.indexOf(targetColumnName);
var newOrder = Array.from(order);
var newOrder = order.slice();

@@ -1174,3 +1187,3 @@ newOrder.splice(sourceColumnIndex, 1);

var orderedColumns = function orderedColumns(tableColumns, order) {
var result = Array.from(tableColumns);
var result = tableColumns.slice();

@@ -1336,2 +1349,6 @@ result.sort(function (a, b) {

var isGroupingChange = function isGroupingChange(columnDraftGrouping) {
return columnDraftGrouping.draft === GROUP_REMOVE_MODE || columnDraftGrouping.draft === GROUP_ADD_MODE;
};
var tableColumnsWithDraftGrouping = function tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped) {

@@ -1347,3 +1364,3 @@ return tableColumns.reduce(function (acc, tableColumn) {

return [].concat(toConsumableArray(acc), [tableColumn]);
} else if (columnDraftGrouping.mode === 'remove' || columnDraftGrouping.mode === 'add') {
} else if (isGroupingChange(columnDraftGrouping)) {
return [].concat(toConsumableArray(acc), [_extends({}, tableColumn, {

@@ -1357,7 +1374,7 @@ draft: true

var tableColumnsWithGrouping = function tableColumnsWithGrouping(tableColumns, grouping, draftGrouping, groupIndentColumnWidth, showColumnWhenGrouped) {
var tableColumnsWithGrouping = function tableColumnsWithGrouping(columns, tableColumns, grouping, draftGrouping, indentColumnWidth, showColumnWhenGrouped) {
return [].concat(toConsumableArray(grouping.map(function (columnGrouping) {
var groupedColumn = tableColumns.find(function (tableColumn) {
return tableColumn.type === TABLE_DATA_TYPE && tableColumn.column.name === columnGrouping.columnName;
}).column;
var groupedColumn = columns.find(function (column) {
return column.name === columnGrouping.columnName;
});
return {

@@ -1367,3 +1384,3 @@ key: TABLE_GROUP_TYPE + '_' + groupedColumn.name,

column: groupedColumn,
width: groupIndentColumnWidth
width: indentColumnWidth
};

@@ -1414,3 +1431,3 @@ })), toConsumableArray(tableColumnsWithDraftGrouping(tableColumns, draftGrouping, showColumnWhenGrouped)));

var expandedRows = Array.from(prevExpanded);
var expandedRows = prevExpanded.slice();
var expandedIndex = expandedRows.indexOf(rowId);

@@ -1452,4 +1469,4 @@ var isRowExpanded = isExpanded !== undefined ? isExpanded : expandedIndex === -1;

var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, detailToggleCellWidth) {
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: detailToggleCellWidth }].concat(toConsumableArray(tableColumns));
var tableColumnsWithDetail = function tableColumnsWithDetail(tableColumns, toggleColumnWidth) {
return [{ key: TABLE_DETAIL_TYPE, type: TABLE_DETAIL_TYPE, width: toggleColumnWidth }].concat(toConsumableArray(tableColumns));
};

@@ -1508,3 +1525,3 @@

return tableColumns.filter(function (tableColumn) {
return hiddenColumns.indexOf(tableColumn.column.name) === -1;
return tableColumn.type !== TABLE_DATA_TYPE || hiddenColumns.indexOf(tableColumn.column.name) === -1;
});

@@ -1736,2 +1753,6 @@ };

exports.filteredRows = filteredRows;
exports.GROUP_KEY_SEPARATOR = GROUP_KEY_SEPARATOR;
exports.GROUP_ADD_MODE = GROUP_ADD_MODE;
exports.GROUP_REMOVE_MODE = GROUP_REMOVE_MODE;
exports.GROUP_REORDER_MODE = GROUP_REORDER_MODE;
exports.groupByColumn = groupByColumn;

@@ -1759,3 +1780,4 @@ exports.toggleExpandedGroups = toggleExpandedGroups;

exports.getAvailableToSelect = getAvailableToSelect;
exports.getAvailableSelection = getAvailableSelection;
exports.someSelected = someSelected;
exports.allSelected = allSelected;
exports.startEditRows = startEditRows;

@@ -1762,0 +1784,0 @@ exports.stopEditRows = stopEditRows;

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

@@ -42,3 +42,3 @@ "author": {

"devDependencies": {
"@devexpress/dx-core": "1.0.0-beta.1",
"@devexpress/dx-core": "1.0.0-beta.2",
"babel-core": "^6.26.0",

@@ -51,16 +51,15 @@ "babel-jest": "^21.2.0",

"core-js": "^2.5.1",
"eslint": "^4.10.0",
"eslint": "^4.12.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-filenames": "^1.2.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jest": "^21.3.0",
"eslint-plugin-jest": "^21.4.2",
"jest": "^21.2.1",
"rollup": "0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-license": "^0.5.0",
"seamless-immutable": "^7.1.2"
"rollup-plugin-license": "^0.5.0"
},
"peerDependencies": {
"@devexpress/dx-core": "1.0.0-beta.1"
"@devexpress/dx-core": "1.0.0-beta.2"
}
}

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