@elliemae/ds-pagination 3.16.0-next.2 → 3.16.0-next.21

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.
Files changed (136) hide show
  1. package/dist/cjs/DSPaginationDefinitions.js +17 -1
  2. package/dist/cjs/DSPaginationDefinitions.js.map +2 -2
  3. package/dist/cjs/Pagination.js +11 -7
  4. package/dist/cjs/Pagination.js.map +2 -2
  5. package/dist/cjs/PaginationDataTestID.js +7 -1
  6. package/dist/cjs/PaginationDataTestID.js.map +2 -2
  7. package/dist/cjs/index.js +36 -2
  8. package/dist/cjs/index.js.map +3 -3
  9. package/dist/cjs/package.json +7 -0
  10. package/dist/cjs/parts/DSPageNextButton.js +74 -0
  11. package/dist/cjs/parts/DSPageNextButton.js.map +7 -0
  12. package/dist/cjs/parts/DSPagePrevButton.js +74 -0
  13. package/dist/cjs/parts/DSPagePrevButton.js.map +7 -0
  14. package/dist/cjs/parts/DSPaginationContainer.js +61 -0
  15. package/dist/cjs/parts/DSPaginationContainer.js.map +7 -0
  16. package/dist/cjs/parts/DSPaginator/createPaginatorHeader.js +50 -0
  17. package/dist/cjs/parts/DSPaginator/createPaginatorHeader.js.map +7 -0
  18. package/dist/cjs/parts/DSPaginator/getOptions.js +76 -0
  19. package/dist/cjs/parts/DSPaginator/getOptions.js.map +7 -0
  20. package/dist/cjs/parts/DSPaginator/index.js +148 -0
  21. package/dist/cjs/parts/DSPaginator/index.js.map +7 -0
  22. package/dist/cjs/{hooks → parts/DSPaginator}/usePaginationSearch.js +9 -2
  23. package/dist/cjs/parts/DSPaginator/usePaginationSearch.js.map +7 -0
  24. package/dist/cjs/parts/DSPaginator/usePaginator.js +91 -0
  25. package/dist/cjs/parts/DSPaginator/usePaginator.js.map +7 -0
  26. package/dist/cjs/parts/{PagePrevButton.js → DSPerPageSelector/getOptions.js} +25 -22
  27. package/dist/cjs/parts/DSPerPageSelector/getOptions.js.map +7 -0
  28. package/dist/cjs/parts/DSPerPageSelector/index.js +106 -0
  29. package/dist/cjs/parts/DSPerPageSelector/index.js.map +7 -0
  30. package/dist/cjs/parts/DSPerPageSelector/usePerPageSelector.js +72 -0
  31. package/dist/cjs/parts/DSPerPageSelector/usePerPageSelector.js.map +7 -0
  32. package/dist/cjs/parts/PaginationContent.js +41 -52
  33. package/dist/cjs/parts/PaginationContent.js.map +3 -3
  34. package/dist/cjs/parts/index.js +49 -0
  35. package/dist/cjs/parts/index.js.map +7 -0
  36. package/dist/cjs/props.js +85 -0
  37. package/dist/cjs/props.js.map +7 -0
  38. package/dist/cjs/react-desc-prop-types.js +111 -33
  39. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  40. package/dist/cjs/styled.js +21 -27
  41. package/dist/cjs/styled.js.map +2 -2
  42. package/dist/esm/DSPaginationDefinitions.js +13 -1
  43. package/dist/esm/DSPaginationDefinitions.js.map +2 -2
  44. package/dist/esm/Pagination.js +4 -4
  45. package/dist/esm/Pagination.js.map +1 -1
  46. package/dist/esm/PaginationDataTestID.js +3 -1
  47. package/dist/esm/PaginationDataTestID.js.map +2 -2
  48. package/dist/esm/index.js +39 -1
  49. package/dist/esm/index.js.map +3 -3
  50. package/dist/esm/package.json +7 -0
  51. package/dist/esm/parts/DSPageNextButton.js +50 -0
  52. package/dist/esm/parts/DSPageNextButton.js.map +7 -0
  53. package/dist/esm/parts/DSPagePrevButton.js +50 -0
  54. package/dist/esm/parts/DSPagePrevButton.js.map +7 -0
  55. package/dist/esm/parts/DSPaginationContainer.js +31 -0
  56. package/dist/esm/parts/DSPaginationContainer.js.map +7 -0
  57. package/dist/esm/parts/DSPaginator/createPaginatorHeader.js +20 -0
  58. package/dist/esm/parts/DSPaginator/createPaginatorHeader.js.map +7 -0
  59. package/dist/esm/parts/DSPaginator/getOptions.js +46 -0
  60. package/dist/esm/parts/DSPaginator/getOptions.js.map +7 -0
  61. package/dist/esm/parts/DSPaginator/index.js +118 -0
  62. package/dist/esm/parts/DSPaginator/index.js.map +7 -0
  63. package/dist/esm/{hooks → parts/DSPaginator}/usePaginationSearch.js +5 -2
  64. package/dist/esm/parts/DSPaginator/usePaginationSearch.js.map +7 -0
  65. package/dist/esm/parts/DSPaginator/usePaginator.js +61 -0
  66. package/dist/esm/parts/DSPaginator/usePaginator.js.map +7 -0
  67. package/dist/esm/parts/DSPerPageSelector/getOptions.js +22 -0
  68. package/dist/esm/parts/DSPerPageSelector/getOptions.js.map +7 -0
  69. package/dist/esm/parts/DSPerPageSelector/index.js +76 -0
  70. package/dist/esm/parts/DSPerPageSelector/index.js.map +7 -0
  71. package/dist/esm/parts/DSPerPageSelector/usePerPageSelector.js +42 -0
  72. package/dist/esm/parts/DSPerPageSelector/usePerPageSelector.js.map +7 -0
  73. package/dist/esm/parts/PaginationContent.js +37 -52
  74. package/dist/esm/parts/PaginationContent.js.map +2 -2
  75. package/dist/esm/parts/index.js +19 -0
  76. package/dist/esm/parts/index.js.map +7 -0
  77. package/dist/esm/props.js +55 -0
  78. package/dist/esm/props.js.map +7 -0
  79. package/dist/esm/react-desc-prop-types.js +88 -14
  80. package/dist/esm/react-desc-prop-types.js.map +2 -2
  81. package/dist/esm/styled.js +15 -25
  82. package/dist/esm/styled.js.map +2 -2
  83. package/dist/types/DSPaginationDefinitions.d.ts +6 -0
  84. package/dist/types/Pagination.d.ts +2 -2
  85. package/dist/types/PaginationDataTestID.d.ts +2 -0
  86. package/dist/types/index.d.ts +17 -1
  87. package/dist/types/parts/DSPageNextButton.d.ts +4 -0
  88. package/dist/types/parts/DSPagePrevButton.d.ts +4 -0
  89. package/dist/types/parts/DSPaginationContainer.d.ts +4 -0
  90. package/dist/types/parts/DSPaginator/createPaginatorHeader.d.ts +6 -0
  91. package/dist/types/parts/DSPaginator/getOptions.d.ts +7 -0
  92. package/dist/types/parts/DSPaginator/index.d.ts +4 -0
  93. package/dist/types/parts/DSPaginator/usePaginationSearch.d.ts +2 -0
  94. package/dist/types/parts/DSPaginator/usePaginator.d.ts +17 -0
  95. package/dist/types/parts/DSPerPageSelector/getOptions.d.ts +3 -0
  96. package/dist/types/parts/DSPerPageSelector/index.d.ts +4 -0
  97. package/dist/types/parts/DSPerPageSelector/usePerPageSelector.d.ts +13 -0
  98. package/dist/types/parts/PaginationContent.d.ts +1 -1
  99. package/dist/types/parts/index.d.ts +5 -0
  100. package/dist/types/props.d.ts +20 -0
  101. package/dist/types/react-desc-prop-types.d.ts +528 -9
  102. package/dist/types/styled.d.ts +7 -9
  103. package/dist/types/tests/a11y/axe.test.d.ts +1 -0
  104. package/dist/types/tests/callbacks/paginator.test.d.ts +1 -0
  105. package/dist/types/tests/callbacks/per-page-selector.test.d.ts +1 -0
  106. package/dist/types/tests/callbacks/prev-next-buttons.test.d.ts +1 -0
  107. package/dist/types/tests/keyboard/navigation.test.d.ts +1 -0
  108. package/dist/types/tests/keyboard/paginator-search.test.d.ts +1 -0
  109. package/dist/types/tests/render/page-count-loading.test.d.ts +1 -0
  110. package/dist/types/tests/render/paginator.test.d.ts +1 -0
  111. package/dist/types/tests/render/per-page-selector.test.d.ts +1 -0
  112. package/dist/types/tests/render/segmented-paginator.test.d.ts +1 -0
  113. package/dist/types/tests/render/simple.render.test.d.ts +1 -0
  114. package/package.json +18 -12
  115. package/dist/cjs/hooks/usePaginationSearch.js.map +0 -7
  116. package/dist/cjs/parts/PageNextButton.js +0 -52
  117. package/dist/cjs/parts/PageNextButton.js.map +0 -7
  118. package/dist/cjs/parts/PagePrevButton.js.map +0 -7
  119. package/dist/cjs/parts/Paginator.js +0 -162
  120. package/dist/cjs/parts/Paginator.js.map +0 -7
  121. package/dist/cjs/parts/PerPageSelector.js +0 -114
  122. package/dist/cjs/parts/PerPageSelector.js.map +0 -7
  123. package/dist/esm/hooks/usePaginationSearch.js.map +0 -7
  124. package/dist/esm/parts/PageNextButton.js +0 -26
  125. package/dist/esm/parts/PageNextButton.js.map +0 -7
  126. package/dist/esm/parts/PagePrevButton.js +0 -23
  127. package/dist/esm/parts/PagePrevButton.js.map +0 -7
  128. package/dist/esm/parts/Paginator.js +0 -136
  129. package/dist/esm/parts/Paginator.js.map +0 -7
  130. package/dist/esm/parts/PerPageSelector.js +0 -88
  131. package/dist/esm/parts/PerPageSelector.js.map +0 -7
  132. package/dist/types/hooks/usePaginationSearch.d.ts +0 -1
  133. package/dist/types/parts/PageNextButton.d.ts +0 -3
  134. package/dist/types/parts/PagePrevButton.d.ts +0 -3
  135. package/dist/types/parts/Paginator.d.ts +0 -11
  136. package/dist/types/parts/PerPageSelector.d.ts +0 -4
@@ -1,10 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { XstyledProps } from '@elliemae/ds-utilities';
3
- export declare const PaginationContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement> & XstyledProps, never>;
4
- export declare const PaginationWrapper: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
5
- export declare const PaginationSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object, never>;
6
- export declare const PaginationBoldText: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps, never>;
7
- export declare const InvisibleDetail: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
8
- export declare const PaginationDetail: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
9
- export declare const PaginationDropdownButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button").DSButtonT.Props>, import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/system").Theme>, never>;
10
- export declare const PreviousNextPageButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button").DSButtonT.Props>, import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/system").Theme>, never>;
2
+ import type { XstyledProps } from '@elliemae/ds-props-helpers';
3
+ export declare const StyledPaginationContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement> & XstyledProps, never>;
4
+ export declare const StyledPaginationWrapper: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
5
+ export declare const DSPaginationSeparator: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/dist/types/react-desc-prop-types").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, import("@xstyled/util").Props<import("@xstyled/system").Theme> & import("@xstyled/system").TypographyProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").SpaceProps & import("@xstyled/system").BoxShadowProps<import("@xstyled/system").Theme> & import("@xstyled/system").FlexboxesProps<import("@xstyled/system").Theme> & import("@xstyled/system").LayoutProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").ColorProps, never>;
6
+ export declare const InvisibleDiv: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
7
+ export declare const PaginationDropdownButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonT.Props>, import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/system").Theme>, never>;
8
+ export declare const PreviousNextPageButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonT.Props>, import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/system").Theme>, never>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-pagination",
3
- "version": "3.16.0-next.2",
3
+ "version": "3.16.0-next.21",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Pagination",
6
6
  "files": [
@@ -75,18 +75,24 @@
75
75
  "indent": 4
76
76
  },
77
77
  "dependencies": {
78
- "memoize-one": "~6.0.0",
79
- "@elliemae/ds-button": "3.16.0-next.2",
80
- "@elliemae/ds-circular-progress-indicator": "3.16.0-next.2",
81
- "@elliemae/ds-dropdownmenu": "3.16.0-next.2",
82
- "@elliemae/ds-grid": "3.16.0-next.2",
83
- "@elliemae/ds-icons": "3.16.0-next.2",
84
- "@elliemae/ds-system": "3.16.0-next.2",
85
- "@elliemae/ds-truncated-tooltip-text": "3.16.0-next.2",
86
- "@elliemae/ds-utilities": "3.16.0-next.2"
78
+ "@xstyled/system": "~3.7.3",
79
+ "@xstyled/util": "~3.7.0",
80
+ "@elliemae/ds-button-v2": "3.16.0-next.21",
81
+ "@elliemae/ds-circular-progress-indicator": "3.16.0-next.21",
82
+ "@elliemae/ds-dropdownmenu": "3.16.0-next.21",
83
+ "@elliemae/ds-grid": "3.16.0-next.21",
84
+ "@elliemae/ds-icons": "3.16.0-next.21",
85
+ "@elliemae/ds-props-helpers": "3.16.0-next.21",
86
+ "@elliemae/ds-system": "3.16.0-next.21",
87
+ "@elliemae/ds-typography": "3.16.0-next.21",
88
+ "@elliemae/ds-utilities": "3.16.0-next.21"
87
89
  },
88
90
  "devDependencies": {
89
- "styled-components": "~5.3.6",
91
+ "@testing-library/jest-dom": "~5.16.5",
92
+ "@testing-library/react": "~12.1.3",
93
+ "@testing-library/user-event": "~13.5.0",
94
+ "jest-axe": "^7.0.1",
95
+ "styled-components": "~5.3.9",
90
96
  "styled-system": "~5.1.5"
91
97
  },
92
98
  "peerDependencies": {
@@ -107,7 +113,7 @@
107
113
  "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
108
114
  "dts": "node ../../scripts/dts.mjs",
109
115
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
110
- "dev:build": "pnpm --filter {.}... build && pnpm --filter {.}... dts",
116
+ "dev:build": "pnpm --filter {.}... build",
111
117
  "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
112
118
  "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
113
119
  }
@@ -1,7 +0,0 @@
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;AAAA;ACAA,YAAuB;ADAvB,mBAAyD;AAElD,MAAM,sBAAsB,CACjC,WACA,cAC+B;AAC/B,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,EAAE;AACjD,QAAM,CAAC,wBAAwB,yBAAyB,QAAI,uBAAS,IAAI;AAEzE,QAAM,iBAAa,qBAAuB,IAAI;AAE9C,8BAAU,MAAM;AACd,QAAI,gBAAgB,MAAM,OAAO,SAAS,aAAa,EAAE,KAAK,WAAW;AACvE,gBAAU,QAAQ,oBAAoB,WAAW;AACjD,gBAAU,QAAQ,qBAAqB,WAAW;AAAA,IACpD;AAAA,EAEF,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,gBAAY;AAAA,IAChB,CAAC,MAAM;AACL,UAAI,EAAE,KAAK,WAAW,OAAO,GAAG;AAC9B,YAAI;AAAwB,yBAAe,EAAE,GAAG;AAAA;AAC3C,yBAAe,CAAC,cAAc,YAAY,EAAE,GAAG;AAEpD,kCAA0B,KAAK;AAC/B,qBAAa,WAAW,OAAO;AAC/B,mBAAW,UAAU,WAAW,MAAM;AACpC,oCAA0B,IAAI;AAAA,QAChC,GAAG,GAAI;AAAA,MACT;AAAA,IACF;AAAA,IACA,CAAC,sBAAsB;AAAA,EACzB;AAEA,SAAO;AACT;",
6
- "names": []
7
- }
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
- var PageNextButton_exports = {};
26
- __export(PageNextButton_exports, {
27
- PageNextButton: () => PageNextButton
28
- });
29
- module.exports = __toCommonJS(PageNextButton_exports);
30
- var React = __toESM(require("react"));
31
- var import_jsx_runtime = require("react/jsx-runtime");
32
- var import_ds_icons = require("@elliemae/ds-icons");
33
- var import_PaginationDataTestID = require("../PaginationDataTestID");
34
- var import_styled = require("../styled");
35
- const PageNextButton = ({
36
- onNextPage,
37
- canNextPage
38
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
- import_styled.PreviousNextPageButton,
40
- {
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
- "aria-label": "Go to next page",
49
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronRight, { color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"] })
50
- }
51
- );
52
- //# sourceMappingURL=PageNextButton.js.map
@@ -1,7 +0,0 @@
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 type { DSPaginationT } from '../react-desc-prop-types';\n\nexport const PageNextButton: React.ComponentType<Pick<DSPaginationT.InternalProps, '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 aria-label=\"Go to next 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;AAAA;ACAA,YAAuB;ADoBnB;AAlBJ,sBAA6B;AAC7B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAAuG,CAAC;AAAA,EACnH;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,SAAS,MAAM;AACb,UAAI;AAAa,mBAAW;AAAA,IAC9B;AAAA,IACA,UAAU,CAAC;AAAA,IACX,YAAW;AAAA,IACX,eAAa,mDAAuB;AAAA,IACpC,cAAW;AAAA,IAEX,sDAAC,gCAAa,OAAO,cAAc,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AACpF;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
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 type { DSPaginationT } from '../react-desc-prop-types';\n\nexport const PagePrevButton: React.ComponentType<\n Pick<DSPaginationT.InternalProps, '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 aria-label=\"Go to previous page\"\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;AAAA;ACAA,YAAuB;ADmBnB;AAjBJ,sBAA4B;AAC5B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAET,CAAC,EAAE,gBAAgB,gBAAgB,MACrC;AAAA,EAAC;AAAA;AAAA,IACC,SAAS,MAAM;AACb,UAAI;AAAiB,uBAAe;AAAA,IACtC;AAAA,IACA,UAAU,CAAC;AAAA,IACX,YAAW;AAAA,IACX,eAAa,mDAAuB;AAAA,IACpC,cAAW;AAAA,IAEX,sDAAC,+BAAY,OAAO,kBAAkB,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AACvF;",
6
- "names": []
7
- }
@@ -1,162 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
- var Paginator_exports = {};
26
- __export(Paginator_exports, {
27
- default: () => Paginator_default
28
- });
29
- module.exports = __toCommonJS(Paginator_exports);
30
- var React = __toESM(require("react"));
31
- var import_jsx_runtime = require("react/jsx-runtime");
32
- var import_react = require("react");
33
- var import_ds_icons = require("@elliemae/ds-icons");
34
- var import_ds_utilities = require("@elliemae/ds-utilities");
35
- var import_ds_grid = require("@elliemae/ds-grid");
36
- var import_ds_dropdownmenu = require("@elliemae/ds-dropdownmenu");
37
- var import_ds_truncated_tooltip_text = require("@elliemae/ds-truncated-tooltip-text");
38
- var import_ds_circular_progress_indicator = require("@elliemae/ds-circular-progress-indicator");
39
- var import_styled = require("../styled");
40
- var import_usePaginationSearch = require("../hooks/usePaginationSearch");
41
- const Paginator = (props) => {
42
- const { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle } = props;
43
- const [isOpened, setIsOpened] = (0, import_react.useState)(false);
44
- const btnRef = (0, import_react.useRef)(null);
45
- const pageInfoRef = (0, import_react.useRef)(null);
46
- const { width: btnWidth } = (0, import_ds_utilities.useOnElementResize)(btnRef);
47
- const { width: txtWidth } = (0, import_ds_utilities.useOnElementResize)(pageInfoRef);
48
- const options = (0, import_react.useMemo)(
49
- () => new Array(typeof pageCount === "string" ? pageIndex + 1 : pageCount).fill(0).map((_, index) => {
50
- const option = {
51
- dsId: (index + 1).toString(),
52
- label: (index + 1).toString(),
53
- value: index + 1,
54
- type: "single"
55
- };
56
- if (pageDetails?.length) {
57
- option.render = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["16px", `${txtWidth + 16}px`, "auto"], gutter: "xxs", alignItems: "center", children: [
58
- pageIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Checkmark, { size: "s", color: ["brand-primary", "600"] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: index + 1 }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
- "span",
62
- {
63
- style: {
64
- whiteSpace: "nowrap",
65
- textOverflow: "ellipsis",
66
- overflow: "hidden"
67
- },
68
- children: pageDetails[index]
69
- }
70
- )
71
- ] });
72
- }
73
- return option;
74
- }),
75
- [pageCount, pageDetails, pageIndex, txtWidth]
76
- );
77
- const actionRef = (0, import_react.useRef)({});
78
- (0, import_react.useEffect)(() => {
79
- if (isOpened) {
80
- actionRef.current.setActiveDescendant((pageIndex + 1).toString());
81
- actionRef.current.scrollOptionIntoView((pageIndex + 1).toString());
82
- }
83
- }, [isOpened]);
84
- const [detailWidth, setDetailWidth] = (0, import_react.useState)(0);
85
- (0, import_react.useLayoutEffect)(() => {
86
- const invisibleDetails = [
87
- ...document.body.querySelectorAll('[data-testid="ds-pagination-invisible-detail-for-width-calc"]')
88
- ];
89
- const maxWidth = invisibleDetails.reduce((acc, cur) => Math.max(acc, cur.getBoundingClientRect().width), 0);
90
- setDetailWidth(maxWidth);
91
- }, [pageDetails]);
92
- const onKeyDown = (0, import_usePaginationSearch.usePaginationSearch)(pageCount, actionRef);
93
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationSeparator, {}),
95
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
- import_ds_dropdownmenu.DSDropdownMenuV2,
97
- {
98
- isOpened,
99
- options,
100
- selectedOptions: { [(pageIndex + 1).toString()]: true },
101
- onOptionClick: (_, clickedOption) => {
102
- onPageChange(clickedOption.value);
103
- setIsOpened(false);
104
- btnRef.current?.focus();
105
- },
106
- onClickOutside: () => {
107
- setIsOpened(false);
108
- btnRef.current?.focus();
109
- },
110
- customOffset: [-23, 2],
111
- startPlacementPreference: "top-start",
112
- actionRef,
113
- onKeyDown,
114
- minWidth: pageDetails.length !== 0 ? btnWidth + 23 : pageCount.toString().length * 6 + 90,
115
- maxHeight: 300,
116
- HeaderComp: () => pageDetailsTitle !== "" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: [`${txtWidth + 50}px`, "8px", "auto"], children: [
117
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { marginLeft: "8px" }, children: "Page" }),
118
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationSeparator, { height: "100%" }),
119
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pageDetailsTitle })
120
- ] }) : "Page",
121
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
- import_styled.PaginationDropdownButton,
123
- {
124
- buttonType: "raw",
125
- disabled: isLoadingPageCount,
126
- onClick: () => setIsOpened((prev) => !prev),
127
- innerRef: btnRef,
128
- "aria-label": `Page ${pageIndex + 1} out of ${pageCount}, ${pageDetails.length !== 0 ? pageDetails[pageIndex] : "\b\b"}. Press to change the current page`,
129
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
130
- import_ds_grid.Grid,
131
- {
132
- gutter: "xxs",
133
- alignItems: "center",
134
- cols: pageDetails.length !== 0 ? ["auto", "min-content", "minmax(0px, 70%)", "min-content"] : ["auto", "min-content"],
135
- children: [
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { alignItems: "center", gutter: "xxxs", ref: pageInfoRef, style: { gridAutoFlow: "column" }, children: [
137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationBoldText, { fontSize: "18px", children: pageIndex + 1 }),
138
- " / ",
139
- pageCount
140
- ] }),
141
- isLoadingPageCount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_circular_progress_indicator.DSCircularIndeterminateIndicator, { size: "xs" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
142
- pageDetails.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
143
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationSeparator, { height: "12px", ml: "8px" }),
144
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.PaginationBoldText, { fontSize: "13px", w: detailWidth, mr: "xxs", display: "grid", children: [
145
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_truncated_tooltip_text.SimpleTruncatedTooltipText, { value: pageDetails[pageIndex], children: pageDetails[pageIndex] }),
146
- pageDetails.map((pageDetail) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.InvisibleDetail, { "data-testid": "ds-pagination-invisible-detail-for-width-calc", children: pageDetail }))
147
- ] })
148
- ] }),
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronDown, { color: ["brand-primary", "700"] })
150
- ] })
151
- ]
152
- }
153
- )
154
- }
155
- )
156
- }
157
- ),
158
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationSeparator, {})
159
- ] });
160
- };
161
- var Paginator_default = Paginator;
162
- //# sourceMappingURL=Paginator.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/parts/Paginator.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { Checkmark, ChevronDown } from '@elliemae/ds-icons';\nimport { useOnElementResize } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { InvisibleDetail, PaginationBoldText, PaginationDropdownButton, PaginationSeparator } from '../styled';\nimport { usePaginationSearch } from '../hooks/usePaginationSearch';\n\ninterface PaginatorPropsT {\n pageIndex: number;\n pageCount: number | string;\n isLoadingPageCount: boolean;\n onPageChange: (page: number) => void;\n pageDetails: string[];\n pageDetailsTitle: string;\n}\n\nconst Paginator: React.ComponentType<PaginatorPropsT> = (props) => {\n const { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle } = props;\n\n const [isOpened, setIsOpened] = useState(false);\n\n const btnRef = useRef<HTMLButtonElement>(null);\n const pageInfoRef = useRef<HTMLDivElement>(null);\n\n const { width: btnWidth } = useOnElementResize(btnRef);\n const { width: txtWidth } = useOnElementResize(pageInfoRef);\n\n const options = useMemo(\n () =>\n new Array(typeof pageCount === 'string' ? pageIndex + 1 : pageCount).fill(0).map((_, index) => {\n const option: Record<string, unknown> = {\n dsId: (index + 1).toString(),\n label: (index + 1).toString(),\n value: index + 1,\n type: 'single',\n };\n if (pageDetails?.length) {\n option.render = () => (\n <Grid cols={['16px', `${txtWidth + 16}px`, 'auto']} gutter=\"xxs\" alignItems=\"center\">\n {pageIndex === index ? <Checkmark size=\"s\" color={['brand-primary', '600']} /> : <div />}\n <span>{index + 1}</span>\n <span\n style={{\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n }}\n >\n {pageDetails[index]}\n </span>\n </Grid>\n );\n }\n return option;\n }),\n [pageCount, pageDetails, pageIndex, txtWidth],\n );\n\n const actionRef = useRef<Record<string, (dsId: string) => void>>({});\n\n useEffect(() => {\n if (isOpened) {\n actionRef.current.setActiveDescendant((pageIndex + 1).toString());\n actionRef.current.scrollOptionIntoView((pageIndex + 1).toString());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpened]);\n\n const [detailWidth, setDetailWidth] = useState(0);\n\n useLayoutEffect(() => {\n const invisibleDetails = [\n ...document.body.querySelectorAll('[data-testid=\"ds-pagination-invisible-detail-for-width-calc\"]'),\n ] as HTMLDivElement[];\n const maxWidth = invisibleDetails.reduce((acc, cur) => Math.max(acc, cur.getBoundingClientRect().width), 0);\n setDetailWidth(maxWidth);\n }, [pageDetails]);\n\n const onKeyDown = usePaginationSearch(pageCount, actionRef);\n\n return (\n <>\n <PaginationSeparator />\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [(pageIndex + 1).toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageChange(clickedOption.value);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-23, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n onKeyDown={onKeyDown}\n minWidth={pageDetails.length !== 0 ? btnWidth + 23 : pageCount.toString().length * 6 + 90}\n maxHeight={300}\n HeaderComp={() =>\n pageDetailsTitle !== '' ? (\n <Grid cols={[`${txtWidth + 50}px`, '8px', 'auto']}>\n <span style={{ marginLeft: '8px' }}>Page</span>\n <PaginationSeparator height=\"100%\" />\n <span>{pageDetailsTitle}</span>\n </Grid>\n ) : (\n 'Page'\n )\n }\n >\n <PaginationDropdownButton\n buttonType=\"raw\"\n disabled={isLoadingPageCount}\n onClick={() => setIsOpened((prev) => !prev)}\n innerRef={btnRef}\n aria-label={`Page ${pageIndex + 1} out of ${pageCount}, ${\n pageDetails.length !== 0 ? pageDetails[pageIndex] : '\\b\\b'\n }. Press to change the current page`}\n >\n <Grid\n gutter=\"xxs\"\n alignItems=\"center\"\n cols={\n pageDetails.length !== 0\n ? ['auto', 'min-content', 'minmax(0px, 70%)', 'min-content']\n : ['auto', 'min-content']\n }\n >\n <Grid alignItems=\"center\" gutter=\"xxxs\" ref={pageInfoRef} style={{ gridAutoFlow: 'column' }}>\n <PaginationBoldText fontSize=\"18px\">{pageIndex + 1}</PaginationBoldText> / {pageCount}\n </Grid>\n {isLoadingPageCount ? (\n <DSCircularIndeterminateIndicator size=\"xs\" />\n ) : (\n <>\n {pageDetails.length !== 0 && (\n <>\n <PaginationSeparator height=\"12px\" ml=\"8px\" />\n <PaginationBoldText fontSize=\"13px\" w={detailWidth} mr=\"xxs\" display=\"grid\">\n <SimpleTruncatedTooltipText value={pageDetails[pageIndex]}>\n {pageDetails[pageIndex]}\n </SimpleTruncatedTooltipText>\n {pageDetails.map((pageDetail) => (\n <InvisibleDetail data-testid=\"ds-pagination-invisible-detail-for-width-calc\">\n {pageDetail}\n </InvisibleDetail>\n ))}\n </PaginationBoldText>\n </>\n )}\n <ChevronDown color={['brand-primary', '700']} />\n </>\n )}\n </Grid>\n </PaginationDropdownButton>\n </DSDropdownMenuV2>\n <PaginationSeparator />\n </>\n );\n};\n\nexport default Paginator;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0CX;AAzCZ,mBAA6E;AAC7E,sBAAuC;AACvC,0BAAmC;AACnC,qBAAqB;AACrB,6BAAiC;AACjC,uCAA2C;AAC3C,4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,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
- var PerPageSelector_exports = {};
26
- __export(PerPageSelector_exports, {
27
- default: () => PerPageSelector_default
28
- });
29
- module.exports = __toCommonJS(PerPageSelector_exports);
30
- var React = __toESM(require("react"));
31
- var import_jsx_runtime = require("react/jsx-runtime");
32
- var import_react = require("react");
33
- var import_memoize_one = __toESM(require("memoize-one"));
34
- var import_ds_utilities = require("@elliemae/ds-utilities");
35
- var import_ds_dropdownmenu = require("@elliemae/ds-dropdownmenu");
36
- var import_ds_icons = require("@elliemae/ds-icons");
37
- var import_styled = require("../styled");
38
- const generateOption = (value) => {
39
- if (typeof value === "object") {
40
- return value;
41
- }
42
- return {
43
- dsId: value.toString(),
44
- value,
45
- label: value.toString(),
46
- type: "single"
47
- };
48
- };
49
- const getOptions = (0, import_memoize_one.default)((step, min, max) => {
50
- const options = (0, import_ds_utilities.range)(min, max + step, step).map(generateOption);
51
- return min === 0 ? options.slice(1, options.length) : options;
52
- });
53
- const Header = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "Per Page" });
54
- const PerPageSelector = (props) => {
55
- const [isOpened, setIsOpened] = (0, import_react.useState)(false);
56
- const { pageSize, onPageSizeChange, perPageOptions, maxPerPage, perPageStep, minPerPage } = props;
57
- const options = (0, import_react.useMemo)(() => {
58
- if (perPageOptions)
59
- return perPageOptions.map(generateOption);
60
- return getOptions(perPageStep, minPerPage, maxPerPage);
61
- }, [maxPerPage, minPerPage, perPageOptions, perPageStep]);
62
- const actionRef = (0, import_react.useRef)({});
63
- const btnRef = (0, import_react.useRef)(null);
64
- (0, import_react.useEffect)(() => {
65
- if (isOpened) {
66
- actionRef.current.setActiveDescendant(pageSize.toString());
67
- actionRef.current.scrollOptionIntoView(pageSize.toString());
68
- }
69
- }, [isOpened]);
70
- const width = (0, import_react.useMemo)(() => {
71
- const maxLength = options.reduce((acc, cur) => Math.max(acc, cur?.label?.length ?? 0), 0);
72
- return maxLength * 6 + 90;
73
- }, [options]);
74
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
- import_ds_dropdownmenu.DSDropdownMenuV2,
76
- {
77
- isOpened,
78
- options,
79
- selectedOptions: { [pageSize.toString()]: true },
80
- onOptionClick: (_, clickedOption) => {
81
- onPageSizeChange(clickedOption.value);
82
- setIsOpened(false);
83
- btnRef.current?.focus();
84
- },
85
- onClickOutside: () => {
86
- setIsOpened(false);
87
- btnRef.current?.focus();
88
- },
89
- customOffset: [10, 2],
90
- startPlacementPreference: "top-start",
91
- actionRef,
92
- minWidth: width,
93
- maxHeight: 300,
94
- HeaderComp: Header,
95
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { marginLeft: "32px" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
96
- import_styled.PaginationDropdownButton,
97
- {
98
- buttonType: "raw",
99
- onClick: () => setIsOpened((prev) => !prev),
100
- "aria-pressed": isOpened,
101
- innerRef: btnRef,
102
- "aria-label": `${pageSize} rows per page. Press to select rows per page`,
103
- children: [
104
- pageSize,
105
- " / page",
106
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronDown, { color: ["brand-primary", "700"] })
107
- ]
108
- }
109
- ) })
110
- }
111
- );
112
- };
113
- var PerPageSelector_default = PerPageSelector;
114
- //# sourceMappingURL=PerPageSelector.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/parts/PerPageSelector.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport memoize from 'memoize-one';\nimport { range } from '@elliemae/ds-utilities';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport type { DSPaginationT } from '../react-desc-prop-types';\nimport { PaginationDropdownButton } from '../styled';\n\nconst generateOption = (value: number | Record<string, unknown>) => {\n if (typeof value === 'object') {\n return value;\n }\n return {\n dsId: value.toString(),\n value,\n label: value.toString(),\n type: 'single',\n };\n};\n\nconst getOptions = memoize((step: number, min: number, max: number) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\nconst Header = () => <>{'Per Page'}</>;\n\nconst PerPageSelector: React.ComponentType<\n Pick<\n DSPaginationT.InternalProps,\n 'pageSize' | 'onPageSizeChange' | 'perPageOptions' | 'perPageStep' | 'minPerPage' | 'maxPerPage'\n >\n> = (props) => {\n const [isOpened, setIsOpened] = useState(false);\n const { pageSize, onPageSizeChange, perPageOptions, maxPerPage, perPageStep, minPerPage } = props;\n\n const options = useMemo(() => {\n if (perPageOptions) return perPageOptions.map(generateOption);\n return getOptions(perPageStep, minPerPage, maxPerPage);\n }, [maxPerPage, minPerPage, perPageOptions, perPageStep]);\n\n const actionRef = useRef<Record<string, (dsId: string) => void>>({});\n const btnRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (isOpened) {\n actionRef.current.setActiveDescendant(pageSize.toString());\n actionRef.current.scrollOptionIntoView(pageSize.toString());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpened]);\n\n const width = useMemo(() => {\n const maxLength = options.reduce((acc, cur) => Math.max(acc, (cur?.label as string)?.length ?? 0), 0);\n return maxLength * 6 + 90;\n }, [options]);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageSize.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageSizeChange(clickedOption.value);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[10, 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n minWidth={width}\n maxHeight={300}\n HeaderComp={Header}\n >\n <div style={{ marginLeft: '32px' }}>\n <PaginationDropdownButton\n buttonType=\"raw\"\n onClick={() => setIsOpened((prev) => !prev)}\n aria-pressed={isOpened}\n innerRef={btnRef}\n aria-label={`${pageSize} rows per page. Press to select rows per page`}\n >\n {pageSize} / page\n <ChevronDown color={['brand-primary', '700']} />\n </PaginationDropdownButton>\n </div>\n </DSDropdownMenuV2>\n );\n};\n\nexport default PerPageSelector;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BF;AAzBrB,mBAA4D;AAC5D,yBAAoB;AACpB,0BAAsB;AACtB,6BAAiC;AACjC,sBAA4B;AAE5B,oBAAyC;AAEzC,MAAM,iBAAiB,CAAC,UAA4C;AAClE,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AACA,SAAO;AAAA,IACL,MAAM,MAAM,SAAS;AAAA,IACrB;AAAA,IACA,OAAO,MAAM,SAAS;AAAA,IACtB,MAA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eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,gBAAgB,MAAM;AACpB,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,cAAc,CAAC,IAAI,CAAC;AAAA,MACpB,0BAAyB;AAAA,MACzB;AAAA,MACA,UAAU;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MAEZ,sDAAC,SAAI,OAAO,EAAE,YAAY,OAAO,GAC/B;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX,SAAS,MAAM,YAAY,CAAC,SAAS,CAAC,IAAI;AAAA,UAC1C,gBAAc;AAAA,UACd,UAAU;AAAA,UACV,cAAY,GAAG;AAAA,UAEd;AAAA;AAAA,YAAS;AAAA,YACV,4CAAC,+BAAY,OAAO,CAAC,iBAAiB,KAAK,GAAG;AAAA;AAAA;AAAA,MAChD,GACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,0BAAQ;",
6
- "names": ["memoize"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/usePaginationSearch.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AAElD,MAAM,sBAAsB,CACjC,WACA,cAC+B;AAC/B,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,EAAE;AACjD,QAAM,CAAC,wBAAwB,yBAAyB,IAAI,SAAS,IAAI;AAEzE,QAAM,aAAa,OAAuB,IAAI;AAE9C,YAAU,MAAM;AACd,QAAI,gBAAgB,MAAM,OAAO,SAAS,aAAa,EAAE,KAAK,WAAW;AACvE,gBAAU,QAAQ,oBAAoB,WAAW;AACjD,gBAAU,QAAQ,qBAAqB,WAAW;AAAA,IACpD;AAAA,EAEF,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,YAAY;AAAA,IAChB,CAAC,MAAM;AACL,UAAI,EAAE,KAAK,WAAW,OAAO,GAAG;AAC9B,YAAI;AAAwB,yBAAe,EAAE,GAAG;AAAA;AAC3C,yBAAe,CAAC,cAAc,YAAY,EAAE,GAAG;AAEpD,kCAA0B,KAAK;AAC/B,qBAAa,WAAW,OAAO;AAC/B,mBAAW,UAAU,WAAW,MAAM;AACpC,oCAA0B,IAAI;AAAA,QAChC,GAAG,GAAI;AAAA,MACT;AAAA,IACF;AAAA,IACA,CAAC,sBAAsB;AAAA,EACzB;AAEA,SAAO;AACT;",
6
- "names": []
7
- }
@@ -1,26 +0,0 @@
1
- import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import { ChevronRight } from "@elliemae/ds-icons";
4
- import { PAGINATION_DATA_TESTID } from "../PaginationDataTestID";
5
- import { PreviousNextPageButton } from "../styled";
6
- const PageNextButton = ({
7
- onNextPage,
8
- canNextPage
9
- }) => /* @__PURE__ */ jsx(
10
- PreviousNextPageButton,
11
- {
12
- onClick: () => {
13
- if (canNextPage)
14
- onNextPage();
15
- },
16
- disabled: !canNextPage,
17
- buttonType: "raw",
18
- "data-testid": PAGINATION_DATA_TESTID.NEXT_BUTTON,
19
- "aria-label": "Go to next page",
20
- children: /* @__PURE__ */ jsx(ChevronRight, { color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"] })
21
- }
22
- );
23
- export {
24
- PageNextButton
25
- };
26
- //# sourceMappingURL=PageNextButton.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/PageNextButton.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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 type { DSPaginationT } from '../react-desc-prop-types';\n\nexport const PageNextButton: React.ComponentType<Pick<DSPaginationT.InternalProps, '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 aria-label=\"Go to next page\"\n >\n <ChevronRight color={canNextPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACoBnB;AAlBJ,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,8BAA8B;AAGhC,MAAM,iBAAuG,CAAC;AAAA,EACnH;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,SAAS,MAAM;AACb,UAAI;AAAa,mBAAW;AAAA,IAC9B;AAAA,IACA,UAAU,CAAC;AAAA,IACX,YAAW;AAAA,IACX,eAAa,uBAAuB;AAAA,IACpC,cAAW;AAAA,IAEX,8BAAC,gBAAa,OAAO,cAAc,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AACpF;",
6
- "names": []
7
- }
@@ -1,23 +0,0 @@
1
- import * as React from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import { ChevronLeft } from "@elliemae/ds-icons";
4
- import { PAGINATION_DATA_TESTID } from "../PaginationDataTestID";
5
- import { PreviousNextPageButton } from "../styled";
6
- const PagePrevButton = ({ onPreviousPage, canPreviousPage }) => /* @__PURE__ */ jsx(
7
- PreviousNextPageButton,
8
- {
9
- onClick: () => {
10
- if (canPreviousPage)
11
- onPreviousPage();
12
- },
13
- disabled: !canPreviousPage,
14
- buttonType: "raw",
15
- "data-testid": PAGINATION_DATA_TESTID.PREVIOUS_BUTTON,
16
- "aria-label": "Go to previous page",
17
- children: /* @__PURE__ */ jsx(ChevronLeft, { color: canPreviousPage ? ["brand-primary", "700"] : ["neutral", "500"] })
18
- }
19
- );
20
- export {
21
- PagePrevButton
22
- };
23
- //# sourceMappingURL=PagePrevButton.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/PagePrevButton.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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 type { DSPaginationT } from '../react-desc-prop-types';\n\nexport const PagePrevButton: React.ComponentType<\n Pick<DSPaginationT.InternalProps, '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 aria-label=\"Go to previous page\"\n >\n <ChevronLeft color={canPreviousPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmBnB;AAjBJ,SAAS,mBAAmB;AAC5B,SAAS,8BAA8B;AACvC,SAAS,8BAA8B;AAGhC,MAAM,iBAET,CAAC,EAAE,gBAAgB,gBAAgB,MACrC;AAAA,EAAC;AAAA;AAAA,IACC,SAAS,MAAM;AACb,UAAI;AAAiB,uBAAe;AAAA,IACtC;AAAA,IACA,UAAU,CAAC;AAAA,IACX,YAAW;AAAA,IACX,eAAa,uBAAuB;AAAA,IACpC,cAAW;AAAA,IAEX,8BAAC,eAAY,OAAO,kBAAkB,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AACvF;",
6
- "names": []
7
- }