nae-react-core-styles
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -133,24 +133,30 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
if (pages < 6) { | ||
for (var i = 0; i < pages; i++) { | ||
_mapPages.push(i + 1); | ||
} | ||
} else { | ||
_mapPages.push(1); | ||
_mapPages.push(1); | ||
_mapPages.push(2); | ||
_mapPages.push(2); | ||
_mapPages.push(3); | ||
_mapPages.push(3); | ||
if (activePage > 3 && activePage < pages - 3) { | ||
_mapPages.push(activePage); | ||
} | ||
_mapPages.push(activePage - 2); | ||
_mapPages.push(pages - 2); | ||
_mapPages.push(activePage - 1); | ||
_mapPages.push(pages - 1); | ||
_mapPages.push(activePage); | ||
_mapPages.push(pages); | ||
} | ||
_mapPages.push(activePage + 1); | ||
_mapPages.push(activePage + 2); | ||
_mapPages.push(pages - 2); | ||
_mapPages.push(pages - 1); | ||
_mapPages.push(pages); | ||
_mapPages = _mapPages.filter(function (value, index, self) { | ||
return self.indexOf(value) === index; | ||
}); | ||
_mapPages = _mapPages.sort(function (a, b) { | ||
return a - b; | ||
}); | ||
setMapPages(_mapPages); | ||
@@ -157,0 +163,0 @@ }; |
@@ -130,24 +130,30 @@ import React, { Fragment, useState, useEffect } from 'react'; | ||
if (pages < 6) { | ||
for (var i = 0; i < pages; i++) { | ||
_mapPages.push(i + 1); | ||
} | ||
} else { | ||
_mapPages.push(1); | ||
_mapPages.push(1); | ||
_mapPages.push(2); | ||
_mapPages.push(2); | ||
_mapPages.push(3); | ||
_mapPages.push(3); | ||
if (activePage > 3 && activePage < pages - 3) { | ||
_mapPages.push(activePage); | ||
} | ||
_mapPages.push(activePage - 2); | ||
_mapPages.push(pages - 2); | ||
_mapPages.push(activePage - 1); | ||
_mapPages.push(pages - 1); | ||
_mapPages.push(activePage); | ||
_mapPages.push(pages); | ||
} | ||
_mapPages.push(activePage + 1); | ||
_mapPages.push(activePage + 2); | ||
_mapPages.push(pages - 2); | ||
_mapPages.push(pages - 1); | ||
_mapPages.push(pages); | ||
_mapPages = _mapPages.filter(function (value, index, self) { | ||
return self.indexOf(value) === index; | ||
}); | ||
_mapPages = _mapPages.sort(function (a, b) { | ||
return a - b; | ||
}); | ||
setMapPages(_mapPages); | ||
@@ -154,0 +160,0 @@ }; |
{ | ||
"name": "nae-react-core-styles", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "NAE core styles", | ||
@@ -5,0 +5,0 @@ "author": "newageerp", |
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
122754
3447