@vincentgraul/react-components 1.0.2 → 1.0.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/build/index.d.ts +8 -0
- package/build/index.js +36 -0
- package/build/match-device/useMatchDevice.d.ts +7 -0
- package/build/match-resolution/useMatchResolution.d.ts +37 -0
- package/build/mount-react-hook/mountReactHook.d.ts +7 -0
- package/build/numbered-pagination/NumberedPagination.d.ts +12 -0
- package/build/pagination/usePagination.d.ts +19 -0
- package/build/scroll-to/useScrollTo.d.ts +5 -0
- package/build/table/Table.d.ts +23 -0
- package/build/visible/useVisible.d.ts +2 -0
- package/package.json +37 -32
- package/build/bundle.d.ts +0 -198
- package/build/bundle.js +0 -37
- package/build/bundle.js.map +0 -1
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as useMatchDevice from "./match-device/useMatchDevice";
|
|
2
|
+
export * as useMatchResolution from "./match-resolution/useMatchResolution";
|
|
3
|
+
export * as useMountReactHook from "./mount-react-hook/mountReactHook";
|
|
4
|
+
export * as NumberedPagination from "./numbered-pagination/NumberedPagination";
|
|
5
|
+
export * as usePagination from "./pagination/usePagination";
|
|
6
|
+
export * as useScrollTo from "./scroll-to/useScrollTo";
|
|
7
|
+
export * as Table from "./table/Table";
|
|
8
|
+
export * as useVisible from "./visible/useVisible";
|
package/build/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("react-components",[],t):"object"==typeof exports?exports["react-components"]=t():e["react-components"]=t()}(this,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{NumberedPagination:()=>n,Table:()=>s,useMatchDevice:()=>r,useMatchResolution:()=>a,useMountReactHook:()=>o,usePagination:()=>i,useScrollTo:()=>l,useVisible:()=>c});var r={};e.r(r),e.d(r,{default:()=>b});var a={};e.r(a),e.d(a,{default:()=>w,defaultBreakpoints:()=>g});var o={};e.r(o),e.d(o,{default:()=>x});var n={};e.r(n),e.d(n,{ArrowPosition:()=>T,default:()=>y});var i={};e.r(i),e.d(i,{default:()=>O});var l={};e.r(l),e.d(l,{default:()=>L});var s={};e.r(s),e.d(s,{Td:()=>F,Th:()=>S,Tr:()=>C,default:()=>k});var c={};e.r(c),e.d(c,{default:()=>U});const d=require("react");var m=e.n(d);const p=require("ua-parser-js");var u=e.n(p);function b(e){const t="undefined"!=typeof window,r=()=>{const t=new(u().UAParser)(e),{type:r}=t.getDevice(),a={isMobile:"mobile"===r,isTablet:"tablet"===r,isMobileOrTablet:!1,isDesktop:!r};return a.isMobileOrTablet=a.isMobile||a.isTablet,a};if(!t)return r();const[a,o]=(0,d.useState)(r());return(0,d.useEffect)((()=>{o(r())}),[e]),a}const g={desktop:"(min-width: 1281px)",laptop:"(min-width: 1025px) and (max-width: 1280px)",laptopOrUpper:"(min-width: 1025px)",laptopOrLower:"(max-width: 1280px)",tablet:"(min-width: 768px) and (max-width: 1024px)",tabletOrUpper:"(min-width: 768px)",tabletOrLower:"(max-width: 1024px)",largeMobile:"(min-width: 481px) and (max-width: 767px)",largeMobileOrUpper:"(min-width: 481px)",largeMobileOrLower:"(max-width: 767px)",mobile:"(min-width: 320px) and (max-width: 480px)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"};function w(e=g,t=""){const r="undefined"!=typeof window,{isDesktop:a,isMobile:o}=b(t),n=e=>r&&window.matchMedia(e).matches,i=()=>({isDesktop:r?n(e.desktop):a,isLaptop:r?n(e.laptop):a,isLaptopOrUpper:r?n(e.laptopOrUpper):a,isLaptopOrLower:!!r&&n(e.laptopOrLower),isTablet:r?n(e.tablet):o,isTabletOrUpper:!!r&&n(e.tabletOrUpper),isTabletOrLower:r?n(e.tabletOrLower):o,isLargeMobile:r?n(e.largeMobile):o,isLargeMobileOrUpper:!!r&&n(e.largeMobileOrUpper),isLargeMobileOrLower:r?n(e.largeMobileOrLower):o,isMobile:r?n(e.mobile):o,isPortrait:!!r&&n(e.portrait),isLandscape:!!r&&n(e.landscape)}),[l,s]=(0,d.useState)(i());return(0,d.useEffect)((()=>{const e=()=>s(i());return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),(0,d.useEffect)((()=>{s(i())}),[e]),{resolution:l,breakpoints:e,match:n}}const f=require("@testing-library/react");function x(e,t={}){let r=null;const{container:a,unmount:o}=(0,f.render)(m().createElement(e,Object.assign({},t),(e=>(r=e,null))));return{container:a,unmount:o,value:r}}const h=require("styled-components");var T,E=e.n(h);function y(e){const{page:t,total:r,items:a,goToFirst:o,goToLeft:n,goToRight:i,goToLast:l,goToPage:s,renderSingleArrow:c,renderDoubleArrow:d,className:p=""}=e;return m().createElement(M,{className:`${p} pagination`},t>1&&m().createElement(m().Fragment,null,d&&m().createElement(v,{className:"pagination-item pagination-item-arrow pagination-item-double-arrow",onClick:()=>o()},d(T.LEFT)),c&&m().createElement(v,{className:"pagination-item pagination-item-arrow pagination-item-single-arrow",onClick:()=>n()},c(T.LEFT))),a.map(((t,r)=>m().createElement(v,{className:"pagination-item pagination-item-number "+(t===e.page?"selected":""),key:r,onClick:()=>s(t)},t))),t<r&&m().createElement(m().Fragment,null,c&&m().createElement(v,{className:"pagination-item pagination-item-arrow pagination-item-single-arrow",onClick:()=>i()},c(T.RIGHT)),d&&m().createElement(v,{className:"pagination-item pagination-item-arrow pagination-item-double-arrow",onClick:()=>l()},d(T.RIGHT))))}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(T||(T={}));const M=E().div`
|
|
2
|
+
display: flex;
|
|
3
|
+
`,v=E().div`
|
|
4
|
+
&:first-child {
|
|
5
|
+
border-width: 1px 1px 1px 1px;
|
|
6
|
+
}
|
|
7
|
+
background-color:
|
|
8
|
+
border-style: solid;
|
|
9
|
+
border-width: 1px 1px 1px 0;
|
|
10
|
+
padding: 0.5rem 1rem 0.5rem 1rem;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
`;function O(e){const{totalRecords:t,itemNeighbours:r=2,minItems:a=5,maxRecordsPerPage:o=10}=e,[n,i]=(0,d.useState)(e.page),[l,s]=(0,d.useState)(0),[c,m]=(0,d.useState)([]);(0,d.useEffect)((()=>{s(Math.ceil(t/o))}),[t,o]),(0,d.useEffect)((()=>{m((()=>{const e=[],t=Math.max(1,Math.min(n-r,l+1-a)),o=Math.min(l,Math.max(a,n+r));for(let r=t;r<=o;r++)e.push(r);return e})())}),[n,l,r,a]);const p=e=>{const t=Math.max(1,Math.min(e,l));i(t)};return{page:n,total:l,items:c,maxRecordsPerPage:o,goToPage:p,goToFirst:()=>{p(1)},goToLeft:()=>{p(n-1)},goToRight:()=>{p(n+1)},goToLast:()=>{p(l)}}}function L(e){return"undefined"==typeof window?{scrollToTop:()=>null}:{scrollToTop:()=>{e.current&&window.scrollTo(0,e.current.offsetTop)}}}function k(e){const{columns:t,records:r,renderHeader:a=(()=>null),renderFooter:o=(()=>null),renderColumnsRow:n=(e=>m().createElement("tr",{className:"table-main-columns-row"},e)),renderColumnsCell:i=((e,t)=>m().createElement(S,{className:"table-main-columns-cell",key:t},e.name)),renderRecordsRow:l=((e,t)=>m().createElement(C,{className:"table-main-records-row",key:t},e)),renderRecordsCell:s=((e,t)=>m().createElement(F,{className:"table-main-records-cell",key:t},e)),renderRecordsEmptyCell:c=(e=>m().createElement(F,{className:"table-main-records-cell",key:e},"X")),renderNoRecords:d=(()=>null),className:p=""}=e;return m().createElement(N,{className:`table ${p}`},a(),0===r.length?d():m().createElement(m().Fragment,null,m().createElement(R,{className:"table-main"},m().createElement("thead",{className:"table-main-columns"},n(t.map(((e,t)=>i(e,`column-${t}`))))),m().createElement(P,{className:"table-main-records"},(()=>{const e=t.map((e=>e.name));return r.map(((t,r)=>{const a=e.map((e=>t[e]));return l(a.map(((e,t)=>e?s(e,`cell-${t}`):c(`cell-${t}`))),`row-${r}`)}))})()))),o())}const N=E().div`
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-flow: column;
|
|
17
|
+
`,R=E().table`
|
|
18
|
+
width: 100%;
|
|
19
|
+
table-layout: fixed;
|
|
20
|
+
border-collapse: collapse;
|
|
21
|
+
`,P=E().tbody`
|
|
22
|
+
user-select: text;
|
|
23
|
+
tr:last-child {
|
|
24
|
+
border: none;
|
|
25
|
+
}
|
|
26
|
+
`,S=E().th`
|
|
27
|
+
padding: 2rem 1rem 1rem 0;
|
|
28
|
+
word-wrap: break-word;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
`,C=E().tr`
|
|
31
|
+
text-align: center;
|
|
32
|
+
border-bottom: 2px solid black;
|
|
33
|
+
`,F=E().td`
|
|
34
|
+
padding: 2rem 1rem 1rem 0;
|
|
35
|
+
word-wrap: break-word;
|
|
36
|
+
`;function U(e){const[t,r]=(0,d.useState)(!1);return(0,d.useEffect)((()=>{const t=new IntersectionObserver((([e])=>(e=>{r(e.isIntersecting)})(e)));return e&&e.current&&t.observe(e.current),()=>{e&&e.current&&t.unobserve(e.current)}}),[e]),t}return t})()));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface Breakpoints {
|
|
2
|
+
desktop: string;
|
|
3
|
+
laptop: string;
|
|
4
|
+
laptopOrUpper: string;
|
|
5
|
+
laptopOrLower: string;
|
|
6
|
+
tablet: string;
|
|
7
|
+
tabletOrUpper: string;
|
|
8
|
+
tabletOrLower: string;
|
|
9
|
+
largeMobile: string;
|
|
10
|
+
largeMobileOrUpper: string;
|
|
11
|
+
largeMobileOrLower: string;
|
|
12
|
+
mobile: string;
|
|
13
|
+
portrait: string;
|
|
14
|
+
landscape: string;
|
|
15
|
+
}
|
|
16
|
+
export interface Resolution {
|
|
17
|
+
isDesktop: boolean;
|
|
18
|
+
isLaptop: boolean;
|
|
19
|
+
isLaptopOrUpper: boolean;
|
|
20
|
+
isLaptopOrLower: boolean;
|
|
21
|
+
isTablet: boolean;
|
|
22
|
+
isTabletOrUpper: boolean;
|
|
23
|
+
isTabletOrLower: boolean;
|
|
24
|
+
isLargeMobile: boolean;
|
|
25
|
+
isLargeMobileOrUpper: boolean;
|
|
26
|
+
isLargeMobileOrLower: boolean;
|
|
27
|
+
isMobile: boolean;
|
|
28
|
+
isPortrait: boolean;
|
|
29
|
+
isLandscape: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface MatchResolution {
|
|
32
|
+
resolution: Resolution;
|
|
33
|
+
breakpoints: Breakpoints;
|
|
34
|
+
match: (query: string) => boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare const defaultBreakpoints: Breakpoints;
|
|
37
|
+
export default function useMatchResolution(breakpoints?: Breakpoints, UA?: string): MatchResolution;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { Pagination } from "../pagination/usePagination";
|
|
3
|
+
export declare enum ArrowPosition {
|
|
4
|
+
LEFT = 0,
|
|
5
|
+
RIGHT = 1
|
|
6
|
+
}
|
|
7
|
+
export interface Props extends Pagination {
|
|
8
|
+
renderSingleArrow?: (position: ArrowPosition) => ReactNode;
|
|
9
|
+
renderDoubleArrow?: (position: ArrowPosition) => ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export default function NumberedPagination(props: Props): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
page: number;
|
|
3
|
+
totalRecords: number;
|
|
4
|
+
maxRecordsPerPage?: number;
|
|
5
|
+
itemNeighbours?: number;
|
|
6
|
+
minItems?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Pagination {
|
|
9
|
+
page: number;
|
|
10
|
+
total: number;
|
|
11
|
+
items: number[];
|
|
12
|
+
maxRecordsPerPage: number;
|
|
13
|
+
goToPage: (page: number) => void;
|
|
14
|
+
goToFirst: () => void;
|
|
15
|
+
goToLeft: () => void;
|
|
16
|
+
goToRight: () => void;
|
|
17
|
+
goToLast: () => void;
|
|
18
|
+
}
|
|
19
|
+
export default function usePagination(props: Props): Pagination;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface Column {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
[field: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface Props<T> {
|
|
8
|
+
columns: Column[];
|
|
9
|
+
records: T[];
|
|
10
|
+
renderHeader?: () => ReactNode;
|
|
11
|
+
renderFooter?: () => ReactNode;
|
|
12
|
+
renderColumnsRow?: (columns: ReactNode) => ReactNode;
|
|
13
|
+
renderColumnsCell?: (column: Column, key: string) => ReactNode;
|
|
14
|
+
renderRecordsRow?: (cells: ReactNode, key: string) => ReactNode;
|
|
15
|
+
renderRecordsCell?: (cell: Primitive, key: string) => ReactNode;
|
|
16
|
+
renderRecordsEmptyCell?: (key: string) => ReactNode;
|
|
17
|
+
renderNoRecords?: () => ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export default function Table<T>(props: Props<T>): JSX.Element;
|
|
21
|
+
export declare const Th: import("styled-components").StyledComponent<"th", any, {}, never>;
|
|
22
|
+
export declare const Tr: import("styled-components").StyledComponent<"tr", any, {}, never>;
|
|
23
|
+
export declare const Td: import("styled-components").StyledComponent<"td", any, {}, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincentgraul/react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"main": "./build/bundle.js",
|
|
5
5
|
"license": "GNU GPLV3",
|
|
6
6
|
"repository": "https://github.com/vincentgraul/react-components.git",
|
|
@@ -20,43 +20,48 @@
|
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"build": "
|
|
23
|
+
"build:dev": "webpack",
|
|
24
|
+
"build:prod": "npm run lint && webpack",
|
|
24
25
|
"storybook": "build-storybook && start-storybook -p 6006",
|
|
25
26
|
"test": "jest",
|
|
26
27
|
"doc": "typedoc",
|
|
27
|
-
"lint": "eslint src"
|
|
28
|
-
"compress": "uglifyjs build/bundle.js -o build/bundle.js --config-file uglifyrc.json"
|
|
28
|
+
"lint": "eslint src"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@testing-library/react": "13.3.0",
|
|
32
|
-
"@types/react": "18.0.15",
|
|
33
|
-
"@types/react-dom": "18.0.6",
|
|
34
|
-
"@types/styled-components": "5.1.25",
|
|
35
|
-
"@types/ua-parser-js": "0.7.36",
|
|
36
|
-
"@vincentgraul/types": "1.0.0",
|
|
37
|
-
"intersection-observer": "0.12.2",
|
|
38
|
-
"react": "18.2.0",
|
|
39
|
-
"react-dom": "18.2.0",
|
|
40
|
-
"styled-components": "5.3.5",
|
|
41
|
-
"ua-parser-js": "1.0.2"
|
|
31
|
+
"@testing-library/react": "^13.3.0",
|
|
32
|
+
"@types/react": "^18.0.15",
|
|
33
|
+
"@types/react-dom": "^18.0.6",
|
|
34
|
+
"@types/styled-components": "^5.1.25",
|
|
35
|
+
"@types/ua-parser-js": "^0.7.36",
|
|
36
|
+
"@vincentgraul/types": "^1.0.0",
|
|
37
|
+
"intersection-observer": "^0.12.2",
|
|
38
|
+
"react": "^18.2.0",
|
|
39
|
+
"react-dom": "^18.2.0",
|
|
40
|
+
"styled-components": "^5.3.5",
|
|
41
|
+
"ua-parser-js": "^1.0.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@babel/core": "7.18.9",
|
|
45
|
-
"@storybook/addon-actions": "6.5.9",
|
|
46
|
-
"@storybook/addon-essentials": "6.5.9",
|
|
47
|
-
"@storybook/addon-links": "6.5.9",
|
|
48
|
-
"@storybook/react": "6.5.9",
|
|
49
|
-
"@types/jest": "28.1.6",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "5.31.0",
|
|
51
|
-
"@typescript-eslint/parser": "5.31.0",
|
|
52
|
-
"babel-loader": "8.2.5",
|
|
53
|
-
"eslint": "8.
|
|
54
|
-
"eslint-config-prettier": "8.5.0",
|
|
55
|
-
"eslint-plugin-prettier": "4.2.1",
|
|
56
|
-
"jest": "28.1.3",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
44
|
+
"@babel/core": "^7.18.9",
|
|
45
|
+
"@storybook/addon-actions": "^6.5.9",
|
|
46
|
+
"@storybook/addon-essentials": "^6.5.9",
|
|
47
|
+
"@storybook/addon-links": "^6.5.9",
|
|
48
|
+
"@storybook/react": "^6.5.9",
|
|
49
|
+
"@types/jest": "^28.1.6",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
|
51
|
+
"@typescript-eslint/parser": "^5.31.0",
|
|
52
|
+
"babel-loader": "^8.2.5",
|
|
53
|
+
"eslint": "^8.21.0",
|
|
54
|
+
"eslint-config-prettier": "^8.5.0",
|
|
55
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
+
"jest": "^28.1.3",
|
|
57
|
+
"jest-environment-jsdom": "^28.1.3",
|
|
58
|
+
"prettier": "^2.7.1",
|
|
59
|
+
"ts-jest": "^28.0.7",
|
|
60
|
+
"typedoc": "^0.23.10",
|
|
61
|
+
"typescript": "^4.7.4",
|
|
62
|
+
"webpack": "^5.74.0",
|
|
63
|
+
"webpack-cli": "^4.10.0",
|
|
64
|
+
"ts-loader": "^9.3.1",
|
|
65
|
+
"webpack-node-externals": "^3.0.0"
|
|
61
66
|
}
|
|
62
67
|
}
|
package/build/bundle.d.ts
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare module "match-device/useMatchDevice" {
|
|
3
|
-
export interface Device {
|
|
4
|
-
isMobile: boolean;
|
|
5
|
-
isTablet: boolean;
|
|
6
|
-
isMobileOrTablet: boolean;
|
|
7
|
-
isDesktop: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* React hook to detect the device (mobile, tablet or desktop) based on the user agent.
|
|
11
|
-
* @public
|
|
12
|
-
* @param UA - The user agent.
|
|
13
|
-
* @returns An object with multiple properties (isMobile, isTablet...) used to detect the device.
|
|
14
|
-
*/
|
|
15
|
-
export default function useMatchDevice(UA: string): Device;
|
|
16
|
-
}
|
|
17
|
-
declare module "match-resolution/useMatchResolution" {
|
|
18
|
-
export interface Breakpoints {
|
|
19
|
-
desktop: string;
|
|
20
|
-
laptop: string;
|
|
21
|
-
laptopOrUpper: string;
|
|
22
|
-
laptopOrLower: string;
|
|
23
|
-
tablet: string;
|
|
24
|
-
tabletOrUpper: string;
|
|
25
|
-
tabletOrLower: string;
|
|
26
|
-
largeMobile: string;
|
|
27
|
-
largeMobileOrUpper: string;
|
|
28
|
-
largeMobileOrLower: string;
|
|
29
|
-
mobile: string;
|
|
30
|
-
portrait: string;
|
|
31
|
-
landscape: string;
|
|
32
|
-
}
|
|
33
|
-
export interface Resolution {
|
|
34
|
-
isDesktop: boolean;
|
|
35
|
-
isLaptop: boolean;
|
|
36
|
-
isLaptopOrUpper: boolean;
|
|
37
|
-
isLaptopOrLower: boolean;
|
|
38
|
-
isTablet: boolean;
|
|
39
|
-
isTabletOrUpper: boolean;
|
|
40
|
-
isTabletOrLower: boolean;
|
|
41
|
-
isLargeMobile: boolean;
|
|
42
|
-
isLargeMobileOrUpper: boolean;
|
|
43
|
-
isLargeMobileOrLower: boolean;
|
|
44
|
-
isMobile: boolean;
|
|
45
|
-
isPortrait: boolean;
|
|
46
|
-
isLandscape: boolean;
|
|
47
|
-
}
|
|
48
|
-
export interface MatchResolution {
|
|
49
|
-
resolution: Resolution;
|
|
50
|
-
breakpoints: Breakpoints;
|
|
51
|
-
match: (query: string) => boolean;
|
|
52
|
-
}
|
|
53
|
-
export const defaultBreakpoints: Breakpoints;
|
|
54
|
-
/**
|
|
55
|
-
* React hook to detect the resolution (desktop, laptop, tablet, mobile...).
|
|
56
|
-
* @public
|
|
57
|
-
* @param breakpoints - List of breakpoints (used for determine when a resolution is a "desktop", a "laptop" etc.).
|
|
58
|
-
* @param UA - The user agent (used for determine the resolution in case of SSR).
|
|
59
|
-
* @returns An object with three properties:
|
|
60
|
-
* - resolution: object with multiple properties (isDesktop, isLaptop...) used for know the current resolution
|
|
61
|
-
* - breakpoints: the breakpoints passed as parameters
|
|
62
|
-
* - match: function used to detect the current resolution with a custom breakpoint
|
|
63
|
-
*/
|
|
64
|
-
export default function useMatchResolution(breakpoints?: Breakpoints, UA?: string): MatchResolution;
|
|
65
|
-
}
|
|
66
|
-
declare module "mount-react-hook/mountReactHook" {
|
|
67
|
-
import { ComponentType } from "react";
|
|
68
|
-
export interface MountedHook {
|
|
69
|
-
container: HTMLElement;
|
|
70
|
-
unmount: () => void;
|
|
71
|
-
value: ObjectLiteral | Primitive;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* React hook to mount a hook in an unit test.
|
|
75
|
-
* @public
|
|
76
|
-
* @param Component - The component to be tested.
|
|
77
|
-
* @param props - Props passed to the component.
|
|
78
|
-
* @returns The component, the value it returns and a function to unmount the component.
|
|
79
|
-
*/
|
|
80
|
-
export default function mountReactHook(Component: ComponentType, props?: ObjectLiteral): MountedHook;
|
|
81
|
-
}
|
|
82
|
-
declare module "pagination/usePagination" {
|
|
83
|
-
export interface Props {
|
|
84
|
-
page: number;
|
|
85
|
-
totalRecords: number;
|
|
86
|
-
maxRecordsPerPage?: number;
|
|
87
|
-
itemNeighbours?: number;
|
|
88
|
-
minItems?: number;
|
|
89
|
-
}
|
|
90
|
-
export interface Pagination {
|
|
91
|
-
page: number;
|
|
92
|
-
total: number;
|
|
93
|
-
items: number[];
|
|
94
|
-
maxRecordsPerPage: number;
|
|
95
|
-
goToPage: (page: number) => void;
|
|
96
|
-
goToFirst: () => void;
|
|
97
|
-
goToLeft: () => void;
|
|
98
|
-
goToRight: () => void;
|
|
99
|
-
goToLast: () => void;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* React hook to manage pagination.
|
|
103
|
-
* @public
|
|
104
|
-
* @param props - An object which multiple properties:
|
|
105
|
-
* - page: the current page
|
|
106
|
-
* - totalRecords: the total number of records
|
|
107
|
-
* - maxRecordsPerPage: the maximum number of records displayed per page
|
|
108
|
-
* - itemNeighbours: the maximum number of items (page indicator) beside the current item
|
|
109
|
-
* - minItems: the minimum of items (page indicator)
|
|
110
|
-
* @returns An object with multiples properties:
|
|
111
|
-
* - page: the current page
|
|
112
|
-
* - total: the total number of pages
|
|
113
|
-
* - items: an array of numbers (represents the page indicators)
|
|
114
|
-
* - maxRecordsPerPage: the maximum number of records displayed per page
|
|
115
|
-
* - some functions to change the page (goToPage, goToFirst...)
|
|
116
|
-
*/
|
|
117
|
-
export default function usePagination(props: Props): Pagination;
|
|
118
|
-
}
|
|
119
|
-
declare module "numbered-pagination/NumberedPagination" {
|
|
120
|
-
import { ReactNode } from "react";
|
|
121
|
-
import { Pagination } from "pagination/usePagination";
|
|
122
|
-
export enum ArrowPosition {
|
|
123
|
-
LEFT = 0,
|
|
124
|
-
RIGHT = 1
|
|
125
|
-
}
|
|
126
|
-
export interface Props extends Pagination {
|
|
127
|
-
renderSingleArrow?: (position: ArrowPosition) => ReactNode;
|
|
128
|
-
renderDoubleArrow?: (position: ArrowPosition) => ReactNode;
|
|
129
|
-
className?: string;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* React component used to display a pagination (with numbers).
|
|
133
|
-
* @public
|
|
134
|
-
* @param props - An object which contains:
|
|
135
|
-
* - properties inherited from the Pagination interface in usePagination hook
|
|
136
|
-
* - some properties to customise the rendering
|
|
137
|
-
* @returns A React component.
|
|
138
|
-
*/
|
|
139
|
-
export default function NumberedPagination(props: Props): JSX.Element;
|
|
140
|
-
}
|
|
141
|
-
declare module "scroll-to/useScrollTo" {
|
|
142
|
-
import { RefObject } from "react";
|
|
143
|
-
export interface ScrollEvents {
|
|
144
|
-
scrollToTop: () => void;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* React hook to scroll to an element.
|
|
148
|
-
* @public
|
|
149
|
-
* @param target - The target where we want to scroll.
|
|
150
|
-
* @returns An object which contains:
|
|
151
|
-
* - scrollToTop: function used to scroll to the top of the element
|
|
152
|
-
*/
|
|
153
|
-
export default function useScrollTo(target: RefObject<HTMLElement>): ScrollEvents;
|
|
154
|
-
}
|
|
155
|
-
declare module "table/Table" {
|
|
156
|
-
import { ReactNode } from "react";
|
|
157
|
-
export interface Column {
|
|
158
|
-
name: string;
|
|
159
|
-
label: string;
|
|
160
|
-
[field: string]: any;
|
|
161
|
-
}
|
|
162
|
-
export interface Props<T> {
|
|
163
|
-
columns: Column[];
|
|
164
|
-
records: T[];
|
|
165
|
-
renderHeader?: () => ReactNode;
|
|
166
|
-
renderFooter?: () => ReactNode;
|
|
167
|
-
renderColumnsRow?: (columns: ReactNode) => ReactNode;
|
|
168
|
-
renderColumnsCell?: (column: Column, key: string) => ReactNode;
|
|
169
|
-
renderRecordsRow?: (cells: ReactNode, key: string) => ReactNode;
|
|
170
|
-
renderRecordsCell?: (cell: Primitive, key: string) => ReactNode;
|
|
171
|
-
renderRecordsEmptyCell?: (key: string) => ReactNode;
|
|
172
|
-
renderNoRecords?: () => ReactNode;
|
|
173
|
-
className?: string;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* React component used to display a data table.
|
|
177
|
-
* @public
|
|
178
|
-
* @param props - An Object which contains:
|
|
179
|
-
* - columns: the table columns
|
|
180
|
-
* - records: the table records
|
|
181
|
-
* - some properties to customise the rendering
|
|
182
|
-
* @returns A React component.
|
|
183
|
-
*/
|
|
184
|
-
export default function Table<T>(props: Props<T>): JSX.Element;
|
|
185
|
-
export const Th: import("styled-components").StyledComponent<"th", any, {}, never>;
|
|
186
|
-
export const Tr: import("styled-components").StyledComponent<"tr", any, {}, never>;
|
|
187
|
-
export const Td: import("styled-components").StyledComponent<"td", any, {}, never>;
|
|
188
|
-
}
|
|
189
|
-
declare module "visible/useVisible" {
|
|
190
|
-
import { RefObject } from "react";
|
|
191
|
-
/**
|
|
192
|
-
* React hook to know if an element is visible.
|
|
193
|
-
* @public
|
|
194
|
-
* @param target - The target where you want to identify its visibility.
|
|
195
|
-
* @returns The visibility of the target.
|
|
196
|
-
*/
|
|
197
|
-
export default function useVisible(target: RefObject<HTMLElement>): boolean;
|
|
198
|
-
}
|
package/build/bundle.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define("match-device/useMatchDevice",["require","exports","react","ua-parser-js"],function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=__importDefault(n),t.default=function(a){var e="undefined"!=typeof window;const t=()=>{const e=new n.default.UAParser(a);var t=e.getDevice()["type"];const r={isMobile:"mobile"===t,isTablet:"tablet"===t,isMobileOrTablet:!1,isDesktop:!t};return r.isMobileOrTablet=r.isMobile||r.isTablet,r};if(!e)return t();const[r,o]=(0,i.useState)(t());return(0,i.useEffect)(()=>{o(t())},[a]),r}}),define("match-resolution/useMatchResolution",["require","exports","react","match-device/useMatchDevice"],function(e,u,d,c){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.defaultBreakpoints=void 0,c=__importDefault(c),u.defaultBreakpoints={desktop:"(min-width: 1281px)",laptop:"(min-width: 1025px) and (max-width: 1280px)",laptopOrUpper:"(min-width: 1025px)",laptopOrLower:"(max-width: 1280px)",tablet:"(min-width: 768px) and (max-width: 1024px)",tabletOrUpper:"(min-width: 768px)",tabletOrLower:"(max-width: 1024px)",largeMobile:"(min-width: 481px) and (max-width: 767px)",largeMobileOrUpper:"(min-width: 481px)",largeMobileOrLower:"(max-width: 767px)",mobile:"(min-width: 320px) and (max-width: 480px)",portrait:"(orientation: portrait)",landscape:"(orientation: landscape)"},u.default=function(e=u.defaultBreakpoints,t=""){const r="undefined"!=typeof window,{isDesktop:a,isMobile:o}=(0,c.default)(t),i=e=>r&&window.matchMedia(e).matches,n=()=>({isDesktop:r?i(e.desktop):a,isLaptop:r?i(e.laptop):a,isLaptopOrUpper:r?i(e.laptopOrUpper):a,isLaptopOrLower:!!r&&i(e.laptopOrLower),isTablet:r?i(e.tablet):o,isTabletOrUpper:!!r&&i(e.tabletOrUpper),isTabletOrLower:r?i(e.tabletOrLower):o,isLargeMobile:r?i(e.largeMobile):o,isLargeMobileOrUpper:!!r&&i(e.largeMobileOrUpper),isLargeMobileOrLower:r?i(e.largeMobileOrLower):o,isMobile:r?i(e.mobile):o,isPortrait:!!r&&i(e.portrait),isLandscape:!!r&&i(e.landscape)}),[l,s]=(0,d.useState)(n());return(0,d.useEffect)(()=>{const e=()=>s(n());return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,d.useEffect)(()=>{s(n())},[e]),{resolution:l,breakpoints:e,match:i}}}),define("mount-react-hook/mountReactHook",["require","exports","react","@testing-library/react"],function(e,t,a,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a=__importDefault(a),t.default=function(e,t={}){let r=null;var{container:e,unmount:t}=(0,o.render)(a.default.createElement(e,Object.assign({},t),e=>(r=e,null)));return{container:e,unmount:t,value:r}}}),define("pagination/usePagination",["require","exports","react"],function(e,t,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{totalRecords:t,itemNeighbours:o=2,minItems:i=5,maxRecordsPerPage:r=10}=e,[n,a]=(0,p.useState)(e.page),[l,s]=(0,p.useState)(0),[u,d]=(0,p.useState)([]),c=((0,p.useEffect)(()=>{s(Math.ceil(t/r))},[t,r]),(0,p.useEffect)(()=>{d((()=>{const t=[];var r=Math.max(1,Math.min(n-o,l+1-i)),a=Math.min(l,Math.max(i,n+o));for(let e=r;e<=a;e++)t.push(e);return t})())},[n,l,o,i]),e=>{e=Math.max(1,Math.min(e,l));a(e)});return{page:n,total:l,items:u,maxRecordsPerPage:r,goToPage:c,goToFirst:()=>{c(1)},goToLeft:()=>{c(n-1)},goToRight:()=>{c(n+1)},goToLast:()=>{c(l)}}}}),define("numbered-pagination/NumberedPagination",["require","exports","react","styled-components"],function(e,t,p,r){"use strict";var m,a;Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowPosition=void 0,p=__importDefault(p),r=__importDefault(r),(a=m=t.ArrowPosition||(t.ArrowPosition={}))[a.LEFT=0]="LEFT",a[a.RIGHT=1]="RIGHT",t.default=function(r){const{page:e,total:t,items:a,goToFirst:o,goToLeft:i,goToRight:n,goToLast:l,goToPage:s,renderSingleArrow:u,renderDoubleArrow:d,className:c=""}=r;return p.default.createElement(f,{className:c+" pagination"},1<e&&p.default.createElement(p.default.Fragment,null,d&&p.default.createElement(b,{className:"pagination-item pagination-item-arrow pagination-item-double-arrow",onClick:()=>o()},d(m.LEFT)),u&&p.default.createElement(b,{className:"pagination-item pagination-item-arrow pagination-item-single-arrow",onClick:()=>i()},u(m.LEFT))),a.map((e,t)=>p.default.createElement(b,{className:"pagination-item pagination-item-number "+(e===r.page?"selected":""),key:t,onClick:()=>s(e)},e)),e<t&&p.default.createElement(p.default.Fragment,null,u&&p.default.createElement(b,{className:"pagination-item pagination-item-arrow pagination-item-single-arrow",onClick:()=>n()},u(m.RIGHT)),d&&p.default.createElement(b,{className:"pagination-item pagination-item-arrow pagination-item-double-arrow",onClick:()=>l()},d(m.RIGHT))))};const f=r.default.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
`,b=r.default.div`
|
|
4
|
-
&:first-child {
|
|
5
|
-
border-width: 1px 1px 1px 1px;
|
|
6
|
-
}
|
|
7
|
-
background-color:
|
|
8
|
-
border-style: solid;
|
|
9
|
-
border-width: 1px 1px 1px 0;
|
|
10
|
-
padding: 0.5rem 1rem 0.5rem 1rem;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
`}),define("scroll-to/useScrollTo",["require","exports"],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"undefined"!=typeof window?{scrollToTop:()=>{e.current&&window.scrollTo(0,e.current.offsetTop)}}:{scrollToTop:()=>null}}}),define("table/Table",["require","exports","react","styled-components"],function(e,p,m,t){"use strict";Object.defineProperty(p,"__esModule",{value:!0}),p.Td=p.Tr=p.Th=void 0,m=__importDefault(m),t=__importDefault(t),p.default=function(e){const{columns:t,records:r,renderHeader:a=()=>null,renderFooter:o=()=>null,renderColumnsRow:i=e=>m.default.createElement("tr",{className:"table-main-columns-row"},e),renderColumnsCell:n=(e,t)=>m.default.createElement(p.Th,{className:"table-main-columns-cell",key:t},e.name),renderRecordsRow:l=(e,t)=>m.default.createElement(p.Tr,{className:"table-main-records-row",key:t},e),renderRecordsCell:s=(e,t)=>m.default.createElement(p.Td,{className:"table-main-records-cell",key:t},e),renderRecordsEmptyCell:u=e=>m.default.createElement(p.Td,{className:"table-main-records-cell",key:e},"X"),renderNoRecords:d=()=>null,className:c=""}=e;return m.default.createElement(f,{className:"table "+c},a(),0===r.length?d():m.default.createElement(m.default.Fragment,null,m.default.createElement(b,{className:"table-main"},m.default.createElement("thead",{className:"table-main-columns"},i(t.map((e,t)=>n(e,"column-"+t)))),m.default.createElement(w,{className:"table-main-records"},(()=>{const a=t.map(e=>e.name);return r.map((t,e)=>{const r=a.map(e=>t[e]);return l(r.map((e,t)=>e?s(e,"cell-"+t):u("cell-"+t)),"row-"+e)})})()))),o())};const f=t.default.div`
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-flow: column;
|
|
17
|
-
`,b=t.default.table`
|
|
18
|
-
width: 100%;
|
|
19
|
-
table-layout: fixed;
|
|
20
|
-
border-collapse: collapse;
|
|
21
|
-
`,w=t.default.tbody`
|
|
22
|
-
user-select: text;
|
|
23
|
-
tr:last-child {
|
|
24
|
-
border: none;
|
|
25
|
-
}
|
|
26
|
-
`;p.Th=t.default.th`
|
|
27
|
-
padding: 2rem 1rem 1rem 0;
|
|
28
|
-
word-wrap: break-word;
|
|
29
|
-
white-space: nowrap;
|
|
30
|
-
`,p.Tr=t.default.tr`
|
|
31
|
-
text-align: center;
|
|
32
|
-
border-bottom: 2px solid black;
|
|
33
|
-
`,p.Td=t.default.td`
|
|
34
|
-
padding: 2rem 1rem 1rem 0;
|
|
35
|
-
word-wrap: break-word;
|
|
36
|
-
`}),define("visible/useVisible",["require","exports","react"],function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){const[e,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const e=new IntersectionObserver(([e])=>{r(e.isIntersecting)});return t&&t.current&&e.observe(t.current),()=>{t&&t.current&&e.unobserve(t.current)}},[t]),e}});
|
|
37
|
-
//# sourceMappingURL=build/bundle.js.map
|
package/build/bundle.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build/bundle.js","sources":["build/bundle.js"],"names":["__importDefault","this","mod","__esModule","default","define","require","exports","react_1","ua_parser_js_1","Object","defineProperty","value","UA","isClientSide","window","compute","parser","UAParser","type","getDevice","device","isMobile","isTablet","isMobileOrTablet","isDesktop","setDevice","useState","useEffect","react_2","useMatchDevice_1","defaultBreakpoints","desktop","laptop","laptopOrUpper","laptopOrLower","tablet","tabletOrUpper","tabletOrLower","largeMobile","largeMobileOrUpper","largeMobileOrLower","mobile","portrait","landscape","breakpoints","match","matchMedia","query","matches","isLaptop","isLaptopOrUpper","isLaptopOrLower","isTabletOrUpper","isTabletOrLower","isLargeMobile","isLargeMobileOrUpper","isLargeMobileOrLower","isPortrait","isLandscape","resolution","setResolution","onResize","addEventListener","removeEventListener","react_3","react_4","Component","props","let","container","unmount","render","createElement","assign","hookValue","react_5","totalRecords","itemNeighbours","minItems","maxRecordsPerPage","page","setPage","total","setTotal","items","setItems","goToPage","Math","ceil","from","max","min","to","i","push","generateItems","currentPage","goToFirst","goToLeft","goToRight","goToLast","react_6","styled_components_1","ArrowPosition","renderSingleArrow","renderDoubleArrow","className","Container","Fragment","Item","onClick","LEFT","map","index","key","RIGHT","div","target","scrollToTop","current","scrollTo","offsetTop","react_7","styled_components_2","Td","Tr","Th","columns","records","renderHeader","renderFooter","renderColumnsRow","renderColumnsCell","column","name","renderRecordsRow","cells","renderRecordsCell","cell","renderRecordsEmptyCell","renderNoRecords","length","Main","TBody","columnNames","record","rowIndex","cellIndex","displayRows","table","tbody","th","tr","td","react_8","isVisible","setVisibility","observer","IntersectionObserver","entry","isIntersecting","observe","unobserve"],"mappings":"AAAA,IAAIA,gBAAmBC,MAAQA,KAAKD,iBAAoB,SAAUE,GAC9D,OAAQA,GAAOA,EAAIC,WAAcD,EAAM,CAAEE,QAAWF,IAExDG,OAAO,8BAA+B,CAAC,UAAW,UAAW,QAAS,gBAAiB,SAAUC,EAASC,EAASC,EAASC,gBAExHC,OAAOC,eAAeJ,EAAS,aAAc,CAAEK,OAAO,IACtDH,EAAiBT,gBAAgBS,GA8BjCF,EAAQH,QAvBR,SAAwBS,GACpB,IAAMC,EAAiC,oBAAXC,OAC5B,MAAMC,EAAU,KACZ,MAAMC,EAAS,IAAIR,EAAeL,QAAQc,SAASL,GACnD,IAAQM,EAASF,EAAOG,YAAhBD,QACR,MAAME,EAAS,CACXC,SAAmB,WAATH,EACVI,SAAmB,WAATJ,EACVK,kBAAkB,EAClBC,WAAYN,GAGhB,OADAE,EAAOG,iBAAmBH,EAAOC,UAAYD,EAAOE,SAC7CF,GAEX,IAAKP,EACD,OAAOE,IAEX,KAAM,CAACK,EAAQK,IAAa,EAAIlB,EAAQmB,UAAU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