best-react-pagination 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/.babelrc +0 -7
- package/.editorconfig +0 -9
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -37
- package/.idea/best-react-pagination.iml +0 -9
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/discord.xml +0 -7
- package/.idea/git_toolbox_prj.xml +0 -15
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/.lintstagedrc.json +0 -3
- package/commitlint.config.js +0 -1
- package/index.js +0 -1
- package/tsconfig.json +0 -24
- package/webpack.config.ts +0 -53
package/package.json
CHANGED
package/.babelrc
DELETED
package/.editorconfig
DELETED
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
node: true,
|
|
5
|
-
browser: true,
|
|
6
|
-
es2021: true,
|
|
7
|
-
},
|
|
8
|
-
plugins: ["@typescript-eslint", "react"],
|
|
9
|
-
extends: [
|
|
10
|
-
"eslint:recommended",
|
|
11
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
12
|
-
"plugin:@typescript-eslint/recommended",
|
|
13
|
-
"plugin:react/recommended",
|
|
14
|
-
"plugin:react-hooks/recommended",
|
|
15
|
-
],
|
|
16
|
-
parser: "@typescript-eslint/parser",
|
|
17
|
-
parserOptions: {
|
|
18
|
-
ecmaFeatures: {
|
|
19
|
-
tsconfigRootDir: __dirname,
|
|
20
|
-
project: ["./tsconfig.json"],
|
|
21
|
-
jsx: true,
|
|
22
|
-
},
|
|
23
|
-
ecmaVersion: 2021,
|
|
24
|
-
sourceType: "module",
|
|
25
|
-
},
|
|
26
|
-
ignorePatterns: [".eslintrc.js"],
|
|
27
|
-
rules: {
|
|
28
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
29
|
-
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
|
|
30
|
-
},
|
|
31
|
-
settings: {
|
|
32
|
-
react: {
|
|
33
|
-
pragma: "React",
|
|
34
|
-
version: "detect",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<HTMLCodeStyleSettings>
|
|
4
|
-
<option name="HTML_UNIFORM_INDENT" value="true" />
|
|
5
|
-
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
6
|
-
<option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html" />
|
|
7
|
-
<option name="HTML_ENFORCE_QUOTES" value="true" />
|
|
8
|
-
</HTMLCodeStyleSettings>
|
|
9
|
-
<JSCodeStyleSettings version="0">
|
|
10
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
11
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
12
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
13
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
14
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
15
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
16
|
-
</JSCodeStyleSettings>
|
|
17
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
18
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
19
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
20
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
21
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
22
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
23
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
24
|
-
<option name="SPACE_WITHIN_TYPE_ASSERTION" value="true" />
|
|
25
|
-
<option name="BLACKLIST_IMPORTS" value="rxjs/Rx" />
|
|
26
|
-
</TypeScriptCodeStyleSettings>
|
|
27
|
-
<codeStyleSettings language="HTML">
|
|
28
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
29
|
-
<indentOptions>
|
|
30
|
-
<option name="INDENT_SIZE" value="2" />
|
|
31
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
32
|
-
<option name="TAB_SIZE" value="2" />
|
|
33
|
-
<option name="SMART_TABS" value="true" />
|
|
34
|
-
</indentOptions>
|
|
35
|
-
</codeStyleSettings>
|
|
36
|
-
<codeStyleSettings language="JavaScript">
|
|
37
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
38
|
-
<indentOptions>
|
|
39
|
-
<option name="INDENT_SIZE" value="2" />
|
|
40
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
41
|
-
<option name="TAB_SIZE" value="2" />
|
|
42
|
-
</indentOptions>
|
|
43
|
-
</codeStyleSettings>
|
|
44
|
-
<codeStyleSettings language="TypeScript">
|
|
45
|
-
<option name="RIGHT_MARGIN" value="100" />
|
|
46
|
-
<option name="IF_BRACE_FORCE" value="3" />
|
|
47
|
-
<option name="DOWHILE_BRACE_FORCE" value="3" />
|
|
48
|
-
<option name="WHILE_BRACE_FORCE" value="3" />
|
|
49
|
-
<option name="FOR_BRACE_FORCE" value="3" />
|
|
50
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
51
|
-
<indentOptions>
|
|
52
|
-
<option name="INDENT_SIZE" value="2" />
|
|
53
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
54
|
-
<option name="TAB_SIZE" value="2" />
|
|
55
|
-
</indentOptions>
|
|
56
|
-
</codeStyleSettings>
|
|
57
|
-
</code_scheme>
|
|
58
|
-
</component>
|
package/.idea/discord.xml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="GitToolBoxProjectSettings">
|
|
4
|
-
<option name="commitMessageIssueKeyValidationOverride">
|
|
5
|
-
<BoolValueOverride>
|
|
6
|
-
<option name="enabled" value="true" />
|
|
7
|
-
</BoolValueOverride>
|
|
8
|
-
</option>
|
|
9
|
-
<option name="commitMessageValidationConfigOverride">
|
|
10
|
-
<CommitMessageValidationOverride>
|
|
11
|
-
<option name="enabled" value="true" />
|
|
12
|
-
</CommitMessageValidationOverride>
|
|
13
|
-
</option>
|
|
14
|
-
</component>
|
|
15
|
-
</project>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/best-react-pagination.iml" filepath="$PROJECT_DIR$/.idea/best-react-pagination.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/prettier.xml
DELETED
package/.idea/vcs.xml
DELETED
package/.lintstagedrc.json
DELETED
package/commitlint.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = {extends: ['@commitlint/config-conventional']}
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["best-react-pagination"]=t():e["best-react-pagination"]=t()}(self,(function(){return(()=>{"use strict";var e={708:function(e,t,l){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=s(l(689));t.default=function(e){var t,l=e.paginationStart,s=e.currentIndex,i=e.totalPages,n=e.setIndex,r=e.isDefaultStyles,d=e.wrapperClass,c=void 0===d?"":d,m=e.itemListClass,o=void 0===m?"":m,u=e.itemClass,f=void 0===u?"":u,C=e.selectedItemClass,p=void 0===C?"":C,v=e.disableItemClass,y=void 0===v?"":v,E=e.className,N=[1,2,3,4];!function(e){e.wrapperClass="wrapperClass",e.itemListClass="itemListClass",e.itemClass="itemClass",e.selectedItemClass="selectedItemClass",e.disableItemClass="disableItemClass"}(t||(t={}));var x={wrapperClass:{position:"sticky",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",bottom:0},itemListClass:{padding:"10px 0"},itemClass:{display:"inline",cursor:"pointer",padding:"6px 12px",borderRadius:"4px",margin:"0 2px",backgroundColor:"#45c954"},selectedItemClass:{display:"inline",cursor:"pointer",padding:"6px 12px",borderRadius:"4px",margin:"0 2px",backgroundColor:"#48bbff"},disableItemClass:{display:"inline",cursor:"not-allowed",padding:"6px 12px",borderRadius:"4px",margin:"0 2px"}};return i<=1?a.default.createElement("div",{className:c,style:r?x.wrapperClass:void 0},a.default.createElement("ul",{className:o,style:r?x.itemListClass:void 0},a.default.createElement("li",{className:y,style:r?x.itemClass:void 0},"<<"),a.default.createElement("li",{className:y,style:r?x.itemClass:void 0},">>"))):i>1&&i<4?a.default.createElement("div",{className:c,style:r?x.wrapperClass:void 0},a.default.createElement("ul",{className:o,style:r?x.itemListClass:void 0},[1,2,3].map((function(e){var t=0===l?e-1:e;return s===t?a.default.createElement("li",{className:p,style:r?x.selectedItemClass:void 0,key:e},e):a.default.createElement("li",{className:p,style:r?x.itemClass:void 0,key:e,onClick:function(){return n(t)}},e)})))):4===i?a.default.createElement("div",{className:c,style:r?x.wrapperClass:void 0},a.default.createElement("ul",{className:o,style:r?x.itemListClass:void 0},s>(0===l?0:1)?a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(s-1)}},"<<"):a.default.createElement("li",{className:y,style:r?x.disableItemClass:void 0},"<<"),N.map((function(e){var t=0===l?e-1:e;return s===t?a.default.createElement("li",{className:p,style:r?x.selectedItemClass:void 0,key:e},e):a.default.createElement("li",{className:p,style:r?x.itemClass:void 0,key:e,onClick:function(){return n(t)}},e)})),s<(0===l?3:4)?a.default.createElement("li",{className:f,style:r?x.itemClass:void 0},">>"):a.default.createElement("li",{className:y,style:r?x.disableItemClass:void 0},">>"))):a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:c&&E,style:r?x.wrapperClass:void 0},a.default.createElement("ul",{className:o,style:r?x.itemListClass:void 0},s>(0===l?0:1)?a.default.createElement("li",{style:r?x.itemClass:void 0,onClick:function(){return n(s-1)}},"<<"):a.default.createElement("li",{className:y,style:r?x.disableItemClass:void 0},"<<"),s>(0==l?2:3)?a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(0===l?0:1)}},"1"):null,s<(0===l?3:4)?N.map((function(e){return(0===l?s+1:s===e)?a.default.createElement("li",{className:p,style:r?x.selectedItemClass:void 0,key:e},e):a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(0===l?e-1:e)},key:e},e)})):null,s>(0===l?2:3)?a.default.createElement("li",{className:y,style:r?x.disableItemClass:void 0},"..."):null,s>(0===l?2:3)&&(0===l?s:s-1)<i?a.default.createElement(a.default.Fragment,null,a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(s-1)}},0===l?s:s-1),a.default.createElement("li",{className:p,style:r?x.selectedItemClass:void 0},0===l?s+1:s),s<(0===l?i-1:i)?a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(s+1)}},0===l?s+2:s+1):null):null,s<(0===l?i-3:i-2)?a.default.createElement("li",{className:y,style:r?x.disableItemClass:void 0},"..."):null,s<(0===l?i-3:i-2)?a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(i-1)}},i):null,(0===l?s+1:s)<i?a.default.createElement("li",{className:f,style:r?x.itemClass:void 0,onClick:function(){return n(s+1)}},">>"):a.default.createElement("li",{className:y,style:r?x.disableItemClass:void 0},">>"))))}},689:e=>{e.exports=require("react")}},t={};return function l(s){var a=t[s];if(void 0!==a)return a.exports;var i=t[s]={exports:{}};return e[s].call(i.exports,i,i.exports,l),i.exports}(708)})()}));
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./dist/",
|
|
4
|
-
"noImplicitAny": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"module": "CommonJS",
|
|
7
|
-
"sourceMap": true,
|
|
8
|
-
"target": "ESNext",
|
|
9
|
-
"lib": ["ESNext", "dom"],
|
|
10
|
-
"declaration": true,
|
|
11
|
-
"declarationDir": "dist",
|
|
12
|
-
"jsx": "react",
|
|
13
|
-
"strict": true,
|
|
14
|
-
"allowJs": true,
|
|
15
|
-
"moduleResolution": "node",
|
|
16
|
-
"downlevelIteration": true
|
|
17
|
-
},
|
|
18
|
-
"include": ["./lib/index.tsx"],
|
|
19
|
-
"exclude": [
|
|
20
|
-
"node_modules",
|
|
21
|
-
"dist",
|
|
22
|
-
"test"
|
|
23
|
-
]
|
|
24
|
-
}
|
package/webpack.config.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
import { Configuration } from "webpack";
|
|
3
|
-
const nodeExternals = require("webpack-node-externals");
|
|
4
|
-
const ncp = require("ncp").ncp;
|
|
5
|
-
const fs = require("fs-extra");
|
|
6
|
-
|
|
7
|
-
const libPath = path.resolve(__dirname, "lib");
|
|
8
|
-
const distPath = path.resolve(__dirname, "dist");
|
|
9
|
-
const demoPath = path.resolve(__dirname, "demo");
|
|
10
|
-
|
|
11
|
-
const config: Configuration = {
|
|
12
|
-
entry: path.resolve(libPath, "index.tsx"),
|
|
13
|
-
output: {
|
|
14
|
-
path: distPath,
|
|
15
|
-
filename: "index.js",
|
|
16
|
-
library: "best-react-pagination",
|
|
17
|
-
libraryTarget: "umd",
|
|
18
|
-
clean: true,
|
|
19
|
-
},
|
|
20
|
-
resolve: {
|
|
21
|
-
extensions: [".tsx", ".ts", ".js"],
|
|
22
|
-
},
|
|
23
|
-
externals: [nodeExternals()],
|
|
24
|
-
plugins: [
|
|
25
|
-
{
|
|
26
|
-
apply: (compiler) => {
|
|
27
|
-
compiler.hooks.beforeCompile.tapPromise("Copy file", () => {
|
|
28
|
-
return new Promise<void>((resolve, reject) => {
|
|
29
|
-
fs.emptyDirSync(libPath);
|
|
30
|
-
ncp(demoPath + "/src/Pagination/", libPath, (err: any) => {
|
|
31
|
-
if (err) {
|
|
32
|
-
reject(err);
|
|
33
|
-
}
|
|
34
|
-
console.log("Pagination was copied to ", libPath);
|
|
35
|
-
resolve();
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
module: {
|
|
43
|
-
rules: [
|
|
44
|
-
{
|
|
45
|
-
test: /\.tsx?$/,
|
|
46
|
-
exclude: /(node_modules|bower_components)/,
|
|
47
|
-
use: ["babel-loader", "ts-loader"],
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default config;
|