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

bam32bittheme

Package Overview
Dependencies
Maintainers
0
Versions
379
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bam32bittheme - npm Package Compare versions

Comparing version 2.1.87 to 2.1.88

34

dist/components/Table.js

@@ -10,2 +10,3 @@ "use strict";

exports.default = void 0;
require("core-js/modules/es.parse-float.js");
require("core-js/modules/es.regexp.to-string.js");

@@ -65,14 +66,25 @@ var _react = _interopRequireWildcard(require("react"));

const theme = (0, _react2.useTheme)();
const numericSortingFn = (rowA, rowB, columnId) => {
const a = parseFloat(rowA.getValue(columnId));
const b = parseFloat(rowB.getValue(columnId));
return a > b ? 1 : a < b ? -1 : 0;
};
const isNumericColumn = (rows, columnId) => {
return rows.every(row => !isNaN(parseFloat(row[columnId])));
};
const tableColumns = (0, _react.useMemo)(() => {
return columns === null || columns === void 0 ? void 0 : columns.map(column => _objectSpread({
accessorKey: column.field,
header: column.headerName,
sortingFn: !column.sortingFn ? (rowA, rowB, column) => {
var _rowA$original$column, _rowB$original$column;
const numA = (_rowA$original$column = rowA.original[column]) === null || _rowA$original$column === void 0 ? void 0 : _rowA$original$column.toString().toLocaleLowerCase('tr-TR');
const numB = (_rowB$original$column = rowB.original[column]) === null || _rowB$original$column === void 0 ? void 0 : _rowB$original$column.toString().toLocaleLowerCase('tr-TR');
return numA === null || numA === void 0 ? void 0 : numA.localeCompare(numB, 'tr-TR');
} : column.sortingFn
}, column));
}, [columns]);
return columns === null || columns === void 0 ? void 0 : columns.map(column => {
const isNumeric = isNumericColumn(rows, column.field);
return _objectSpread({
accessorKey: column.field,
header: column.headerName,
sortingFn: isNumeric ? numericSortingFn : !column.sortingFn ? (rowA, rowB, column) => {
var _rowA$original$column, _rowB$original$column;
const numA = (_rowA$original$column = rowA.original[column]) === null || _rowA$original$column === void 0 ? void 0 : _rowA$original$column.toString().toLocaleLowerCase('tr-TR');
const numB = (_rowB$original$column = rowB.original[column]) === null || _rowB$original$column === void 0 ? void 0 : _rowB$original$column.toString().toLocaleLowerCase('tr-TR');
return numA === null || numA === void 0 ? void 0 : numA.localeCompare(numB, 'tr-TR');
} : column.sortingFn
}, column);
});
}, [columns, rows]);
const tableInstance = (0, _materialReactTable.useMaterialReactTable)({

@@ -79,0 +91,0 @@ columns: tableColumns,

{
"name": "bam32bittheme",
"version": "2.1.87",
"version": "2.1.88",
"private": false,

@@ -5,0 +5,0 @@ "description": "32bit Theme for Material UI v5.x",

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