@elliemae/ds-pagination 2.3.1 → 3.0.0-alpha.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/dist/cjs/Pagination.js +61 -0
- package/dist/cjs/Pagination.js.map +7 -0
- package/dist/cjs/PaginationDataTestID.js +39 -0
- package/dist/cjs/PaginationDataTestID.js.map +7 -0
- package/dist/cjs/hooks/usePaginationSearch.js +60 -0
- package/dist/cjs/hooks/usePaginationSearch.js.map +7 -0
- package/dist/cjs/index.d.js +27 -0
- package/dist/cjs/index.d.js.map +7 -0
- package/dist/cjs/index.js +28 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/parts/PageNextButton.js +53 -0
- package/dist/cjs/parts/PageNextButton.js.map +7 -0
- package/dist/cjs/parts/PagePrevButton.js +49 -0
- package/dist/cjs/parts/PagePrevButton.js.map +7 -0
- package/dist/cjs/parts/PaginationContent.js +111 -0
- package/dist/cjs/parts/PaginationContent.js.map +7 -0
- package/dist/cjs/parts/Paginator.js +148 -0
- package/dist/cjs/parts/Paginator.js.map +7 -0
- package/dist/cjs/parts/PerPageSelector.js +106 -0
- package/dist/cjs/parts/PerPageSelector.js.map +7 -0
- package/dist/cjs/props.js +82 -0
- package/dist/cjs/props.js.map +7 -0
- package/dist/cjs/styled.js +130 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/Pagination.js +34 -0
- package/dist/esm/Pagination.js.map +7 -0
- package/dist/esm/PaginationDataTestID.js +10 -0
- package/dist/esm/PaginationDataTestID.js.map +7 -0
- package/{esm → dist/esm}/hooks/usePaginationSearch.js +16 -13
- package/dist/esm/hooks/usePaginationSearch.js.map +7 -0
- package/dist/esm/index.d.js +2 -0
- package/dist/esm/index.d.js.map +7 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/parts/PageNextButton.js +24 -0
- package/dist/esm/parts/PageNextButton.js.map +7 -0
- package/dist/esm/parts/PagePrevButton.js +20 -0
- package/dist/esm/parts/PagePrevButton.js.map +7 -0
- package/dist/esm/parts/PaginationContent.js +84 -0
- package/dist/esm/parts/PaginationContent.js.map +7 -0
- package/dist/esm/parts/Paginator.js +124 -0
- package/dist/esm/parts/Paginator.js.map +7 -0
- package/dist/esm/parts/PerPageSelector.js +77 -0
- package/dist/esm/parts/PerPageSelector.js.map +7 -0
- package/dist/esm/props.js +53 -0
- package/dist/esm/props.js.map +7 -0
- package/dist/esm/styled.js +106 -0
- package/dist/esm/styled.js.map +7 -0
- package/package.json +53 -45
- package/cjs/Pagination.js +0 -35
- package/cjs/PaginationDataTestID.js +0 -11
- package/cjs/hooks/usePaginationSearch.js +0 -32
- package/cjs/index.d.js +0 -2
- package/cjs/index.js +0 -10
- package/cjs/parts/PageNextButton.js +0 -33
- package/cjs/parts/PagePrevButton.js +0 -32
- package/cjs/parts/PaginationContent.js +0 -95
- package/cjs/parts/Paginator.js +0 -163
- package/cjs/parts/PerPageSelector.js +0 -110
- package/cjs/props.js +0 -53
- package/cjs/styled.js +0 -57
- package/esm/Pagination.js +0 -26
- package/esm/PaginationDataTestID.js +0 -7
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -1
- package/esm/parts/PageNextButton.js +0 -25
- package/esm/parts/PagePrevButton.js +0 -24
- package/esm/parts/PaginationContent.js +0 -85
- package/esm/parts/Paginator.js +0 -156
- package/esm/parts/PerPageSelector.js +0 -103
- package/esm/props.js +0 -48
- package/esm/styled.js +0 -40
- package/types/Pagination.d.ts +0 -5
- package/types/PaginationDataTestID.d.ts +0 -5
- package/types/hooks/usePaginationSearch.d.ts +0 -1
- package/types/index.d.ts +0 -1
- package/types/parts/PageNextButton.d.ts +0 -3
- package/types/parts/PagePrevButton.d.ts +0 -3
- package/types/parts/PaginationContent.d.ts +0 -3
- package/types/parts/Paginator.d.ts +0 -10
- package/types/parts/PerPageSelector.d.ts +0 -4
- package/types/props.d.ts +0 -20
- package/types/styled.d.ts +0 -10
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
27
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(module2))
|
|
29
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
30
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (module2, isNodeMode) => {
|
|
35
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
36
|
+
};
|
|
37
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
38
|
+
return (module2, temp) => {
|
|
39
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
40
|
+
};
|
|
41
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
42
|
+
var Pagination_exports = {};
|
|
43
|
+
__export(Pagination_exports, {
|
|
44
|
+
DSPagination: () => DSPagination,
|
|
45
|
+
DSPaginationWithSchema: () => DSPaginationWithSchema
|
|
46
|
+
});
|
|
47
|
+
var React = __toESM(require("react"));
|
|
48
|
+
var import_react = __toESM(require("react"));
|
|
49
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
50
|
+
var import_PaginationContent = require("./parts/PaginationContent");
|
|
51
|
+
var import_props = require("./props");
|
|
52
|
+
const DSPagination = (props) => {
|
|
53
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_props.defaultProps);
|
|
54
|
+
(0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_props.propTypes);
|
|
55
|
+
return /* @__PURE__ */ import_react.default.createElement(import_PaginationContent.PaginationContent, __spreadValues({}, propsWithDefault));
|
|
56
|
+
};
|
|
57
|
+
DSPagination.propTypes = import_props.propTypes;
|
|
58
|
+
const DSPaginationWithSchema = (0, import_ds_props_helpers.describe)(DSPagination).description("DSPagination");
|
|
59
|
+
DSPaginationWithSchema.propTypes = import_props.propTypes;
|
|
60
|
+
module.exports = __toCommonJS(Pagination_exports);
|
|
61
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Pagination.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { PaginationContent } from './parts/PaginationContent';\nimport { propTypes, defaultProps } from './props';\nimport { DSPaginationProps } from './index.d';\n\nconst DSPagination: React.ComponentType<DSPaginationProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n return <PaginationContent {...propsWithDefault} />;\n};\n\nDSPagination.propTypes = propTypes;\nconst DSPaginationWithSchema = describe(DSPagination).description('DSPagination');\nDSPaginationWithSchema.propTypes = propTypes;\n\nexport { DSPagination, DSPaginationWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAuF;AACvF,+BAAkC;AAClC,mBAAwC;AAGxC,MAAM,eAAuD,CAAC,UAAU;AACtE,QAAM,mBAAmB,0DAA6B,OAAO;AAC7D,8DAA+B,kBAAkB;AAEjD,SAAO,mDAAC,4CAAD,mBAAuB;AAAA;AAGhC,aAAa,YAAY;AACzB,MAAM,yBAAyB,sCAAS,cAAc,YAAY;AAClE,uBAAuB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var PaginationDataTestID_exports = {};
|
|
29
|
+
__export(PaginationDataTestID_exports, {
|
|
30
|
+
PAGINATION_DATA_TESTID: () => PAGINATION_DATA_TESTID
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
const PAGINATION_DATA_TESTID = {
|
|
34
|
+
PREVIOUS_BUTTON: "data-table-pagination-prev-button",
|
|
35
|
+
NEXT_BUTTON: "data-table-pagination-next-button",
|
|
36
|
+
CONTAINER: "data-table-pagination-container"
|
|
37
|
+
};
|
|
38
|
+
module.exports = __toCommonJS(PaginationDataTestID_exports);
|
|
39
|
+
//# sourceMappingURL=PaginationDataTestID.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/PaginationDataTestID.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export const PAGINATION_DATA_TESTID = {\n PREVIOUS_BUTTON: 'data-table-pagination-prev-button',\n NEXT_BUTTON: 'data-table-pagination-next-button',\n CONTAINER: 'data-table-pagination-container',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var usePaginationSearch_exports = {};
|
|
29
|
+
__export(usePaginationSearch_exports, {
|
|
30
|
+
usePaginationSearch: () => usePaginationSearch
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = require("react");
|
|
34
|
+
const usePaginationSearch = (pageCount, actionRef) => {
|
|
35
|
+
const [searchValue, setSearchValue] = (0, import_react.useState)("");
|
|
36
|
+
const [shouldResetSearchValue, setShouldResetSearchValue] = (0, import_react.useState)(true);
|
|
37
|
+
const timeoutRef = (0, import_react.useRef)(null);
|
|
38
|
+
(0, import_react.useEffect)(() => {
|
|
39
|
+
if (searchValue !== "" && Number.parseInt(searchValue, 10) <= pageCount) {
|
|
40
|
+
actionRef.current.setActiveDescendant(searchValue);
|
|
41
|
+
actionRef.current.scrollOptionIntoView(searchValue);
|
|
42
|
+
}
|
|
43
|
+
}, [searchValue]);
|
|
44
|
+
const onKeyDown = (0, import_react.useCallback)((e) => {
|
|
45
|
+
if (e.code.startsWith("Digit")) {
|
|
46
|
+
if (shouldResetSearchValue)
|
|
47
|
+
setSearchValue(e.key);
|
|
48
|
+
else
|
|
49
|
+
setSearchValue((prevValue) => prevValue + e.key);
|
|
50
|
+
setShouldResetSearchValue(false);
|
|
51
|
+
clearTimeout(timeoutRef.current);
|
|
52
|
+
timeoutRef.current = setTimeout(() => {
|
|
53
|
+
setShouldResetSearchValue(true);
|
|
54
|
+
}, 1e3);
|
|
55
|
+
}
|
|
56
|
+
}, [shouldResetSearchValue]);
|
|
57
|
+
return onKeyDown;
|
|
58
|
+
};
|
|
59
|
+
module.exports = __toCommonJS(usePaginationSearch_exports);
|
|
60
|
+
//# sourceMappingURL=usePaginationSearch.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/usePaginationSearch.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport const usePaginationSearch = (\n pageCount: number,\n actionRef: React.MutableRefObject<any>,\n): React.KeyboardEventHandler => {\n const [searchValue, setSearchValue] = useState('');\n const [shouldResetSearchValue, setShouldResetSearchValue] = useState(true);\n\n const timeoutRef = useRef<NodeJS.Timeout>(null);\n\n useEffect(() => {\n if (searchValue !== '' && Number.parseInt(searchValue, 10) <= pageCount) {\n actionRef.current.setActiveDescendant(searchValue);\n actionRef.current.scrollOptionIntoView(searchValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchValue]);\n\n const onKeyDown = useCallback(\n (e) => {\n if (e.code.startsWith('Digit')) {\n if (shouldResetSearchValue) setSearchValue(e.key);\n else setSearchValue((prevValue) => prevValue + e.key);\n\n setShouldResetSearchValue(false);\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => {\n setShouldResetSearchValue(true);\n }, 1000);\n }\n },\n [shouldResetSearchValue],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyD;AAElD,MAAM,sBAAsB,CACjC,WACA,cAC+B;AAC/B,QAAM,CAAC,aAAa,kBAAkB,2BAAS;AAC/C,QAAM,CAAC,wBAAwB,6BAA6B,2BAAS;AAErE,QAAM,aAAa,yBAAuB;AAE1C,8BAAU,MAAM;AACd,QAAI,gBAAgB,MAAM,OAAO,SAAS,aAAa,OAAO,WAAW;AACvE,gBAAU,QAAQ,oBAAoB;AACtC,gBAAU,QAAQ,qBAAqB;AAAA;AAAA,KAGxC,CAAC;AAEJ,QAAM,YAAY,8BAChB,CAAC,MAAM;AACL,QAAI,EAAE,KAAK,WAAW,UAAU;AAC9B,UAAI;AAAwB,uBAAe,EAAE;AAAA;AACxC,uBAAe,CAAC,cAAc,YAAY,EAAE;AAEjD,gCAA0B;AAC1B,mBAAa,WAAW;AACxB,iBAAW,UAAU,WAAW,MAAM;AACpC,kCAA0B;AAAA,SACzB;AAAA;AAAA,KAGP,CAAC;AAGH,SAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var index_d_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
module.exports = __toCommonJS(index_d_exports);
|
|
27
|
+
//# sourceMappingURL=index.d.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.d.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export interface DSPaginationProps {\n pageCount: number;\n pageIndex?: number;\n canPreviousPage?: boolean;\n canNextPage?: boolean;\n pageSize?: number;\n showPerPageSelector?: boolean;\n perPageOptions?: (number | Record<string, unknown>)[];\n perPageStep?: number;\n minPerPage?: number;\n maxPerPage?: number;\n onPageSizeChange?: (pageSize: number) => void;\n onPreviousPage?: () => void;\n onNextPage?: () => void;\n onPageChange?: (page: number) => void;\n pageDetails?: string[];\n pageDetailsTitle?: string;\n width?: string | number;\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
9
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(module2))
|
|
11
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
12
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (module2, isNodeMode) => {
|
|
17
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
20
|
+
return (module2, temp) => {
|
|
21
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
22
|
+
};
|
|
23
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
24
|
+
var src_exports = {};
|
|
25
|
+
var React = __toESM(require("react"));
|
|
26
|
+
__reExport(src_exports, require("./Pagination"));
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './Pagination';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,wBAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var PageNextButton_exports = {};
|
|
29
|
+
__export(PageNextButton_exports, {
|
|
30
|
+
PageNextButton: () => PageNextButton
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
|
+
var import_PaginationDataTestID = require("../PaginationDataTestID");
|
|
36
|
+
var import_styled = require("../styled");
|
|
37
|
+
const PageNextButton = ({
|
|
38
|
+
onNextPage,
|
|
39
|
+
canNextPage
|
|
40
|
+
}) => /* @__PURE__ */ import_react.default.createElement(import_styled.PreviousNextPageButton, {
|
|
41
|
+
onClick: () => {
|
|
42
|
+
if (canNextPage)
|
|
43
|
+
onNextPage();
|
|
44
|
+
},
|
|
45
|
+
disabled: !canNextPage,
|
|
46
|
+
buttonType: "raw",
|
|
47
|
+
"data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.NEXT_BUTTON,
|
|
48
|
+
HeaderComp: () => "Page"
|
|
49
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ChevronRight, {
|
|
50
|
+
color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"]
|
|
51
|
+
}));
|
|
52
|
+
module.exports = __toCommonJS(PageNextButton_exports);
|
|
53
|
+
//# sourceMappingURL=PageNextButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/PageNextButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { ChevronRight } from '@elliemae/ds-icons';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID';\nimport { PreviousNextPageButton } from '../styled';\nimport { DSPaginationProps } from '../index.d';\n\nexport const PageNextButton: React.ComponentType<Required<Pick<DSPaginationProps, 'onNextPage' | 'canNextPage'>>> = ({\n onNextPage,\n canNextPage,\n}) => (\n <PreviousNextPageButton\n onClick={() => {\n if (canNextPage) onNextPage();\n }}\n disabled={!canNextPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.NEXT_BUTTON}\n HeaderComp={() => 'Page'}\n >\n <ChevronRight color={canNextPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,sBAA6B;AAC7B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAAuG,CAAC;AAAA,EACnH;AAAA,EACA;AAAA,MAEA,mDAAC,sCAAD;AAAA,EACE,SAAS,MAAM;AACb,QAAI;AAAa;AAAA;AAAA,EAEnB,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,mDAAuB;AAAA,EACpC,YAAY,MAAM;AAAA,GAElB,mDAAC,8BAAD;AAAA,EAAc,OAAO,cAAc,CAAC,iBAAiB,SAAS,CAAC,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var PagePrevButton_exports = {};
|
|
29
|
+
__export(PagePrevButton_exports, {
|
|
30
|
+
PagePrevButton: () => PagePrevButton
|
|
31
|
+
});
|
|
32
|
+
var React = __toESM(require("react"));
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
35
|
+
var import_PaginationDataTestID = require("../PaginationDataTestID");
|
|
36
|
+
var import_styled = require("../styled");
|
|
37
|
+
const PagePrevButton = ({ onPreviousPage, canPreviousPage }) => /* @__PURE__ */ import_react.default.createElement(import_styled.PreviousNextPageButton, {
|
|
38
|
+
onClick: () => {
|
|
39
|
+
if (canPreviousPage)
|
|
40
|
+
onPreviousPage();
|
|
41
|
+
},
|
|
42
|
+
disabled: !canPreviousPage,
|
|
43
|
+
buttonType: "raw",
|
|
44
|
+
"data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.PREVIOUS_BUTTON
|
|
45
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ChevronLeft, {
|
|
46
|
+
color: canPreviousPage ? ["brand-primary", "700"] : ["neutral", "500"]
|
|
47
|
+
}));
|
|
48
|
+
module.exports = __toCommonJS(PagePrevButton_exports);
|
|
49
|
+
//# sourceMappingURL=PagePrevButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/PagePrevButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID';\nimport { PreviousNextPageButton } from '../styled';\nimport { DSPaginationProps } from '../index.d';\n\nexport const PagePrevButton: React.ComponentType<\n Required<Pick<DSPaginationProps, 'onPreviousPage' | 'canPreviousPage'>>\n> = ({ onPreviousPage, canPreviousPage }) => (\n <PreviousNextPageButton\n onClick={() => {\n if (canPreviousPage) onPreviousPage();\n }}\n disabled={!canPreviousPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.PREVIOUS_BUTTON}\n >\n <ChevronLeft color={canPreviousPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,sBAA4B;AAC5B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAET,CAAC,EAAE,gBAAgB,sBACrB,mDAAC,sCAAD;AAAA,EACE,SAAS,MAAM;AACb,QAAI;AAAiB;AAAA;AAAA,EAEvB,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,mDAAuB;AAAA,GAEpC,mDAAC,6BAAD;AAAA,EAAa,OAAO,kBAAkB,CAAC,iBAAiB,SAAS,CAAC,WAAW;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
27
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(module2))
|
|
29
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
30
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (module2, isNodeMode) => {
|
|
35
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
36
|
+
};
|
|
37
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
38
|
+
return (module2, temp) => {
|
|
39
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
40
|
+
};
|
|
41
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
42
|
+
var PaginationContent_exports = {};
|
|
43
|
+
__export(PaginationContent_exports, {
|
|
44
|
+
PaginationContent: () => PaginationContent
|
|
45
|
+
});
|
|
46
|
+
var React = __toESM(require("react"));
|
|
47
|
+
var import_react = __toESM(require("react"));
|
|
48
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
49
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
50
|
+
var import_styled = require("../styled");
|
|
51
|
+
var import_PerPageSelector = __toESM(require("./PerPageSelector"));
|
|
52
|
+
var import_Paginator = __toESM(require("./Paginator"));
|
|
53
|
+
var import_PaginationDataTestID = require("../PaginationDataTestID");
|
|
54
|
+
var import_PagePrevButton = require("./PagePrevButton");
|
|
55
|
+
var import_PageNextButton = require("./PageNextButton");
|
|
56
|
+
const PaginationContent = (props) => {
|
|
57
|
+
const {
|
|
58
|
+
pageIndex,
|
|
59
|
+
pageSize,
|
|
60
|
+
canPreviousPage,
|
|
61
|
+
canNextPage,
|
|
62
|
+
onPageSizeChange,
|
|
63
|
+
onNextPage,
|
|
64
|
+
onPreviousPage,
|
|
65
|
+
onPageChange,
|
|
66
|
+
pageCount,
|
|
67
|
+
showPerPageSelector,
|
|
68
|
+
pageDetails,
|
|
69
|
+
pageDetailsTitle,
|
|
70
|
+
perPageOptions,
|
|
71
|
+
maxPerPage,
|
|
72
|
+
perPageStep,
|
|
73
|
+
minPerPage,
|
|
74
|
+
width
|
|
75
|
+
} = props;
|
|
76
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(props);
|
|
77
|
+
return /* @__PURE__ */ import_react.default.createElement(import_styled.PaginationContainer, __spreadValues({
|
|
78
|
+
justifyContent: "center",
|
|
79
|
+
alignItems: "center",
|
|
80
|
+
width: width.toString(),
|
|
81
|
+
"data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.CONTAINER,
|
|
82
|
+
cols: ["minmax(auto, 80%)"]
|
|
83
|
+
}, globalAttributes), /* @__PURE__ */ import_react.default.createElement(import_styled.PaginationWrapper, null, showPerPageSelector && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PerPageSelector.default, {
|
|
84
|
+
pageSize,
|
|
85
|
+
onPageSizeChange,
|
|
86
|
+
perPageOptions,
|
|
87
|
+
maxPerPage,
|
|
88
|
+
perPageStep,
|
|
89
|
+
minPerPage
|
|
90
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_styled.PaginationSeparator, {
|
|
91
|
+
mr: 24
|
|
92
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
|
|
93
|
+
mr: "32px",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
style: { gridAutoFlow: "column" }
|
|
96
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_PagePrevButton.PagePrevButton, {
|
|
97
|
+
canPreviousPage,
|
|
98
|
+
onPreviousPage
|
|
99
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_Paginator.default, {
|
|
100
|
+
pageCount,
|
|
101
|
+
pageIndex,
|
|
102
|
+
onPageChange,
|
|
103
|
+
pageDetails,
|
|
104
|
+
pageDetailsTitle
|
|
105
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_PageNextButton.PageNextButton, {
|
|
106
|
+
canNextPage,
|
|
107
|
+
onNextPage
|
|
108
|
+
}))));
|
|
109
|
+
};
|
|
110
|
+
module.exports = __toCommonJS(PaginationContent_exports);
|
|
111
|
+
//# sourceMappingURL=PaginationContent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/parts/PaginationContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useGetGlobalAttributes } from '@elliemae/ds-props-helpers';\nimport { PaginationContainer, PaginationSeparator, PaginationWrapper } from '../styled';\nimport PerPageSelector from './PerPageSelector';\nimport Paginator from './Paginator';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID';\nimport { PagePrevButton } from './PagePrevButton';\nimport { PageNextButton } from './PageNextButton';\nimport { DSPaginationProps } from '../index.d';\n\nexport const PaginationContent: React.ComponentType<Required<DSPaginationProps>> = (props) => {\n const {\n pageIndex,\n pageSize,\n canPreviousPage,\n canNextPage,\n onPageSizeChange,\n onNextPage,\n onPreviousPage,\n onPageChange,\n pageCount,\n showPerPageSelector,\n pageDetails,\n pageDetailsTitle,\n perPageOptions,\n maxPerPage,\n perPageStep,\n minPerPage,\n width,\n } = props;\n\n const globalAttributes = useGetGlobalAttributes(props);\n\n return (\n <PaginationContainer\n justifyContent=\"center\"\n alignItems=\"center\"\n width={width.toString()}\n data-testid={PAGINATION_DATA_TESTID.CONTAINER}\n cols={['minmax(auto, 80%)']}\n {...globalAttributes}\n >\n <PaginationWrapper>\n {showPerPageSelector && (\n <>\n <PerPageSelector\n pageSize={pageSize}\n onPageSizeChange={onPageSizeChange}\n perPageOptions={perPageOptions}\n maxPerPage={maxPerPage}\n perPageStep={perPageStep}\n minPerPage={minPerPage}\n />\n <PaginationSeparator mr={24} />\n </>\n )}\n <Grid mr=\"32px\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <PagePrevButton canPreviousPage={canPreviousPage} onPreviousPage={onPreviousPage} />\n <Paginator\n pageCount={pageCount}\n pageIndex={pageIndex}\n onPageChange={onPageChange}\n pageDetails={pageDetails}\n pageDetailsTitle={pageDetailsTitle}\n />\n <PageNextButton canNextPage={canNextPage} onNextPage={onNextPage} />\n </Grid>\n </PaginationWrapper>\n </PaginationContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,qBAAqB;AACrB,8BAAuC;AACvC,oBAA4E;AAC5E,6BAA4B;AAC5B,uBAAsB;AACtB,kCAAuC;AACvC,4BAA+B;AAC/B,4BAA+B;AAGxB,MAAM,oBAAsE,CAAC,UAAU;AAC5F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,mBAAmB,oDAAuB;AAEhD,SACE,mDAAC,mCAAD;AAAA,IACE,gBAAe;AAAA,IACf,YAAW;AAAA,IACX,OAAO,MAAM;AAAA,IACb,eAAa,mDAAuB;AAAA,IACpC,MAAM,CAAC;AAAA,KACH,mBAEJ,mDAAC,iCAAD,MACG,uBACC,wFACE,mDAAC,gCAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAEF,mDAAC,mCAAD;AAAA,IAAqB,IAAI;AAAA,OAG7B,mDAAC,qBAAD;AAAA,IAAM,IAAG;AAAA,IAAO,YAAW;AAAA,IAAS,OAAO,EAAE,cAAc;AAAA,KACzD,mDAAC,sCAAD;AAAA,IAAgB;AAAA,IAAkC;AAAA,MAClD,mDAAC,0BAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAEF,mDAAC,sCAAD;AAAA,IAAgB;AAAA,IAA0B;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|