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

react-responsive-pagination

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-pagination - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3-beta.1

8

CHANGELOG.md
# React Responsive Pagination Changelog
## [1.0.3-beta.1](https://github.com/jonelantha/react-responsive-pagination/compare/v1.0.2...v1.0.3-beta.1) (2020-06-16)
### Bug Fixes
* Package Bumps ([b77b160](https://github.com/jonelantha/react-responsive-pagination/commit/b77b160fcc16fac6e2228213679411b29163579b))
* Prevent navigating to '#' on clicks ([a910ac1](https://github.com/jonelantha/react-responsive-pagination/commit/a910ac1e7fafd872dd5ede943336938cb16670f0))
## [1.0.2](https://github.com/jonelantha/react-responsive-pagination/compare/v1.0.1...v1.0.2) (2020-03-24)

@@ -4,0 +12,0 @@

1

lib.cjs/compositions/index.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.narrowToWideCompositions = void 0;
var iterator_1 = require("../helpers/iterator");

@@ -63,0 +64,0 @@ var ranges_1 = require("./ranges");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.narrowToWideRanges = void 0;
var view_1 = require("../view");

@@ -63,0 +64,0 @@ function narrowToWideViewItemRanges(start, end, ellipsisPos) {

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.iteratorNext = exports.lastWhere = exports.zipIterators = void 0;
function zipIterators(xs, ys) {

@@ -43,0 +44,0 @@ var xResult, yResult;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.objectZip = exports.objectUnzip = void 0;
function objectUnzip(object) {

@@ -21,0 +22,0 @@ var entries = Object.entries(object);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWidth = exports.getNonContentWidth = exports.getElementWidth = void 0;
function getElementWidth(element) {

@@ -4,0 +5,0 @@ var style = getComputedStyle(element);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sum = exports.isNumber = void 0;
function isNumber(val) {

@@ -4,0 +5,0 @@ return typeof val === 'number';

@@ -13,7 +13,19 @@ "use strict";

};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;

@@ -20,0 +32,0 @@ };

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;

@@ -8,0 +20,0 @@ };

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.useFoutDetector = void 0;
var react_1 = require("react");

@@ -8,0 +9,0 @@ var resize_observer_polyfill_1 = __importDefault(require("resize-observer-polyfill"));

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.getViewMetrics = void 0;
var object_1 = require("../../../helpers/object");

@@ -57,0 +58,0 @@ var style_1 = require("../../../helpers/style");

27

lib.cjs/renderers/MaxWidthRenderer/useWidthCalculator/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -54,9 +73,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -66,2 +78,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.useWidthCalculator = void 0;
var react_1 = __importStar(require("react"));

@@ -68,0 +81,0 @@ var view_1 = require("../../../view");

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;

@@ -8,0 +20,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createWidthCalculator = void 0;
var totalWidthCalculator_1 = require("./totalWidthCalculator");

@@ -4,0 +5,0 @@ var itemWidthCalculator_1 = require("./itemWidthCalculator");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createItemWidthCalculator = void 0;
function createItemWidthCalculator(_a) {

@@ -4,0 +5,0 @@ var getPageWidth = _a.getPageWidth, getNavWidth = _a.getNavWidth, ellipsisWidth = _a.ellipsisWidth;

@@ -1,2 +0,3 @@

export declare function createNavWidthCalculator(widths: Params): (type: import("../../../../skins").NavType, enabled: boolean) => number;
import { NavType } from '../../../../view';
export declare function createNavWidthCalculator(widths: Params): (type: NavType, enabled: boolean) => number;
declare type Params = {

@@ -3,0 +4,0 @@ previous: {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createNavWidthCalculator = void 0;
function createNavWidthCalculator(widths) {

@@ -4,0 +5,0 @@ return function navWidthCalculator(type, enabled) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createNumberWidthCalculator = void 0;
function createNumberWidthCalculator(widths) {

@@ -4,0 +5,0 @@ return function numberWidthCalculator(num) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPageWidthCalculator = void 0;
function createPageWidthCalculator(_a) {

@@ -4,0 +5,0 @@ var getActivePageWidth = _a.getActivePageWidth, getNormalPageWidth = _a.getNormalPageWidth;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createTotalWidthCalculator = void 0;
var util_1 = require("../../../../helpers/util");

@@ -4,0 +5,0 @@ function createTotalWidthCalculator(_a) {

@@ -1,5 +0,5 @@

/// <reference types="react" />
import { MouseEventHandler } from 'react';
export default function Item({ label, onClick: handleClick, isActive, a11yLabel, a11yHidden, }: Props): JSX.Element;
declare type Props = {
onClick?: () => void;
onClick?: MouseEventHandler<HTMLAnchorElement>;
isActive?: Boolean;

@@ -6,0 +6,0 @@ label: string;

import { SkinItem, NavType } from '.';
import { MouseEventHandler } from 'react';
export declare const createSkinItem: {
page: (page: number, active: boolean, onClick: () => void) => SkinItem;
page: (page: number, active: boolean, onClick: MouseEventHandler<HTMLAnchorElement>) => SkinItem;
ellipsis: (position: string) => SkinItem;
nav: (type: NavType, onClick?: (() => void) | undefined) => SkinItem;
nav: (type: NavType, onClick?: ((event: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>) => void) | undefined) => SkinItem;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSkinItem = void 0;
exports.createSkinItem = {

@@ -4,0 +5,0 @@ page: function (page, active, onClick) { return ({

@@ -1,2 +0,2 @@

import { Ref } from 'react';
import { Ref, MouseEventHandler } from 'react';
export { default as BootstrapSkin } from './BootstrapSkin';

@@ -15,7 +15,7 @@ export { createSkinItem } from './createSkinItem';

label: string;
onClick: () => void;
onClick: MouseEventHandler<HTMLAnchorElement>;
};
declare type Nav = {
type: NavType;
onClick?: () => void;
onClick?: MouseEventHandler<HTMLAnchorElement>;
};

@@ -22,0 +22,0 @@ declare type Ellipsis = {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var BootstrapSkin_1 = require("./BootstrapSkin");
exports.BootstrapSkin = BootstrapSkin_1.default;
Object.defineProperty(exports, "BootstrapSkin", { enumerable: true, get: function () { return BootstrapSkin_1.default; } });
var createSkinItem_1 = require("./createSkinItem");
exports.createSkinItem = createSkinItem_1.createSkinItem;
Object.defineProperty(exports, "createSkinItem", { enumerable: true, get: function () { return createSkinItem_1.createSkinItem; } });

@@ -1,6 +0,6 @@

import { ViewItem, EllipsisPosition } from '.';
import { ViewItem, EllipsisPosition, NavType } from '.';
export declare const createViewItem: {
nav: (type: import("../skins").NavType, page?: number | undefined) => ViewItem;
nav: (type: NavType, page?: number | undefined) => ViewItem;
page: (page: number, active: boolean) => ViewItem;
ellipsis: (position: EllipsisPosition) => ViewItem;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createViewItem = void 0;
exports.createViewItem = {

@@ -4,0 +5,0 @@ nav: function (type, page) { return ({

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var useView_1 = require("./useView");
exports.useView = useView_1.useView;
Object.defineProperty(exports, "useView", { enumerable: true, get: function () { return useView_1.useView; } });
var createViewItem_1 = require("./createViewItem");
exports.createViewItem = createViewItem_1.createViewItem;
Object.defineProperty(exports, "createViewItem", { enumerable: true, get: function () { return createViewItem_1.createViewItem; } });
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useView = void 0;
var react_1 = __importStar(require("react"));

@@ -11,0 +24,0 @@ var viewItemToSkinItem_1 = require("./viewItemToSkinItem");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.viewItemToSkinItem = void 0;
var skins_1 = require("../skins");

@@ -8,3 +9,6 @@ function viewItemToSkinItem(handlePageChange) {

var active = viewItem.active, page_1 = viewItem.page;
return skins_1.createSkinItem.page(page_1, active, function () { return handlePageChange(page_1); });
return skins_1.createSkinItem.page(page_1, active, function (event) {
event.preventDefault();
handlePageChange(page_1);
});
}

@@ -16,3 +20,8 @@ if (viewItem.type === 'ellipsis') {

var page_2 = viewItem.page, type = viewItem.type;
var onClick = page_2 !== undefined ? function () { return handlePageChange(page_2); } : undefined;
var onClick = page_2 !== undefined
? function (event) {
event.preventDefault();
handlePageChange(page_2);
}
: undefined;
return skins_1.createSkinItem.nav(type, onClick);

@@ -19,0 +28,0 @@ }

@@ -1,2 +0,3 @@

export declare function createNavWidthCalculator(widths: Params): (type: import("../../../../skins").NavType, enabled: boolean) => number;
import { NavType } from '../../../../view';
export declare function createNavWidthCalculator(widths: Params): (type: NavType, enabled: boolean) => number;
declare type Params = {

@@ -3,0 +4,0 @@ previous: {

@@ -1,5 +0,5 @@

/// <reference types="react" />
import { MouseEventHandler } from 'react';
export default function Item({ label, onClick: handleClick, isActive, a11yLabel, a11yHidden, }: Props): JSX.Element;
declare type Props = {
onClick?: () => void;
onClick?: MouseEventHandler<HTMLAnchorElement>;
isActive?: Boolean;

@@ -6,0 +6,0 @@ label: string;

import { SkinItem, NavType } from '.';
import { MouseEventHandler } from 'react';
export declare const createSkinItem: {
page: (page: number, active: boolean, onClick: () => void) => SkinItem;
page: (page: number, active: boolean, onClick: MouseEventHandler<HTMLAnchorElement>) => SkinItem;
ellipsis: (position: string) => SkinItem;
nav: (type: NavType, onClick?: (() => void) | undefined) => SkinItem;
nav: (type: NavType, onClick?: ((event: import("react").MouseEvent<HTMLAnchorElement, MouseEvent>) => void) | undefined) => SkinItem;
};

@@ -1,2 +0,2 @@

import { Ref } from 'react';
import { Ref, MouseEventHandler } from 'react';
export { default as BootstrapSkin } from './BootstrapSkin';

@@ -15,7 +15,7 @@ export { createSkinItem } from './createSkinItem';

label: string;
onClick: () => void;
onClick: MouseEventHandler<HTMLAnchorElement>;
};
declare type Nav = {
type: NavType;
onClick?: () => void;
onClick?: MouseEventHandler<HTMLAnchorElement>;
};

@@ -22,0 +22,0 @@ declare type Ellipsis = {

@@ -1,6 +0,6 @@

import { ViewItem, EllipsisPosition } from '.';
import { ViewItem, EllipsisPosition, NavType } from '.';
export declare const createViewItem: {
nav: (type: import("../skins").NavType, page?: number | undefined) => ViewItem;
nav: (type: NavType, page?: number | undefined) => ViewItem;
page: (page: number, active: boolean) => ViewItem;
ellipsis: (position: EllipsisPosition) => ViewItem;
};

@@ -6,3 +6,6 @@ import { createSkinItem } from '../skins';

var active = viewItem.active, page_1 = viewItem.page;
return createSkinItem.page(page_1, active, function () { return handlePageChange(page_1); });
return createSkinItem.page(page_1, active, function (event) {
event.preventDefault();
handlePageChange(page_1);
});
}

@@ -14,3 +17,8 @@ if (viewItem.type === 'ellipsis') {

var page_2 = viewItem.page, type = viewItem.type;
var onClick = page_2 !== undefined ? function () { return handlePageChange(page_2); } : undefined;
var onClick = page_2 !== undefined
? function (event) {
event.preventDefault();
handlePageChange(page_2);
}
: undefined;
return createSkinItem.nav(type, onClick);

@@ -17,0 +25,0 @@ }

{
"name": "react-responsive-pagination",
"version": "1.0.2",
"version": "1.0.3-beta.1",
"description": "React component for responsive pagination",

@@ -46,22 +46,22 @@ "author": "Jon Pollard",

"devDependencies": {
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/react": "^16.9.25",
"@types/react-dom": "^16.9.5",
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"@types/react": "^16.9.36",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.8.0",
"eslint": "^7.2.0",
"eslint-config-react-app": "^5.2.1",
"eslint-plugin-flowtype": "^4.6.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-flowtype": "^5.1.3",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.1",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"rimraf": "^3.0.2",
"semantic-release": "^17.0.4",
"typescript": "^3.8.3"
"semantic-release": "^17.0.8",
"typescript": "^3.9.5"
}
}
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