bam32bittheme
Advanced tools
Comparing version 2.1.88 to 2.1.89
@@ -11,2 +11,4 @@ "use strict"; | ||
require("core-js/modules/es.parse-float.js"); | ||
require("core-js/modules/es.regexp.exec.js"); | ||
require("core-js/modules/es.regexp.test.js"); | ||
require("core-js/modules/es.regexp.to-string.js"); | ||
@@ -71,4 +73,7 @@ var _react = _interopRequireWildcard(require("react")); | ||
}; | ||
const isNumeric = value => { | ||
return /^-?\d+(\.\d+)?$/.test(value); // Güvenilir sayı kontrolü için regex | ||
}; | ||
const isNumericColumn = (rows, columnId) => { | ||
return rows.every(row => !isNaN(parseFloat(row[columnId]))); | ||
return rows.every(row => isNumeric(row.getValue(columnId))); | ||
}; | ||
@@ -81,8 +86,8 @@ const tableColumns = (0, _react.useMemo)(() => { | ||
header: column.headerName, | ||
sortingFn: isNumeric ? numericSortingFn : !column.sortingFn ? (rowA, rowB, column) => { | ||
sortingFn: isNumeric ? numericSortingFn : (rowA, rowB, columnId) => { | ||
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 | ||
const valueA = (_rowA$original$column = rowA.original[columnId]) === null || _rowA$original$column === void 0 ? void 0 : _rowA$original$column.toString().toLocaleLowerCase('tr-TR'); | ||
const valueB = (_rowB$original$column = rowB.original[columnId]) === null || _rowB$original$column === void 0 ? void 0 : _rowB$original$column.toString().toLocaleLowerCase('tr-TR'); | ||
return valueA === null || valueA === void 0 ? void 0 : valueA.localeCompare(valueB, 'tr-TR'); | ||
} | ||
}, column); | ||
@@ -89,0 +94,0 @@ }); |
{ | ||
"name": "bam32bittheme", | ||
"version": "2.1.88", | ||
"version": "2.1.89", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "32bit Theme for Material UI v5.x", |
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
1569107
5319