@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
@@ -18,15 +18,31 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
24
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
29
  var DSPaginationDefinitions_exports = {};
26
30
  __export(DSPaginationDefinitions_exports, {
27
- DSPaginationName: () => DSPaginationName
31
+ DSPaginationName: () => DSPaginationName,
32
+ PageNextButtonName: () => PageNextButtonName,
33
+ PagePrevButtonName: () => PagePrevButtonName,
34
+ PaginationContainerName: () => PaginationContainerName,
35
+ PaginationSeparatorName: () => PaginationSeparatorName,
36
+ PaginatorName: () => PaginatorName,
37
+ PerPageSelectorName: () => PerPageSelectorName
28
38
  });
29
39
  module.exports = __toCommonJS(DSPaginationDefinitions_exports);
30
40
  var React = __toESM(require("react"));
31
41
  const DSPaginationName = "DSPagination";
42
+ const PaginationContainerName = "DSPaginationContainer";
43
+ const PerPageSelectorName = "DSPerPageSelector";
44
+ const PagePrevButtonName = "DSPagePrevButton";
45
+ const PageNextButtonName = "DSPageNextButton";
46
+ const PaginatorName = "DSPaginator";
47
+ const PaginationSeparatorName = "DSPaginationSeparator";
32
48
  //# sourceMappingURL=DSPaginationDefinitions.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSPaginationDefinitions.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export const DSPaginationName = 'DSPagination';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;",
4
+ "sourcesContent": ["export const DSPaginationName = 'DSPagination';\n\nexport const PaginationContainerName = 'DSPaginationContainer';\n\nexport const PerPageSelectorName = 'DSPerPageSelector';\n\nexport const PagePrevButtonName = 'DSPagePrevButton';\n\nexport const PageNextButtonName = 'DSPageNextButton';\n\nexport const PaginatorName = 'DSPaginator';\n\nexport const PaginationSeparatorName = 'DSPaginationSeparator';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;AAEzB,MAAM,0BAA0B;AAEhC,MAAM,sBAAsB;AAE5B,MAAM,qBAAqB;AAE3B,MAAM,qBAAqB;AAE3B,MAAM,gBAAgB;AAEtB,MAAM,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -30,17 +34,17 @@ __export(Pagination_exports, {
30
34
  module.exports = __toCommonJS(Pagination_exports);
31
35
  var React = __toESM(require("react"));
32
36
  var import_jsx_runtime = require("react/jsx-runtime");
33
- var import_ds_utilities = require("@elliemae/ds-utilities");
34
- var import_PaginationContent = require("./parts/PaginationContent");
35
- var import_DSPaginationDefinitions = require("./DSPaginationDefinitions");
36
- var import_react_desc_prop_types = require("./react-desc-prop-types");
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_PaginationContent = require("./parts/PaginationContent.js");
39
+ var import_DSPaginationDefinitions = require("./DSPaginationDefinitions.js");
40
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
37
41
  const DSPagination = (props) => {
38
- const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
39
- (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSPaginationPropTypesSchema, import_DSPaginationDefinitions.DSPaginationName);
42
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
43
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSPaginationPropTypesSchema, import_DSPaginationDefinitions.DSPaginationName);
40
44
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PaginationContent.PaginationContent, { ...propsWithDefault });
41
45
  };
42
46
  DSPagination.propTypes = import_react_desc_prop_types.DSPaginationPropTypesSchema;
43
47
  DSPagination.displayName = import_DSPaginationDefinitions.DSPaginationName;
44
- const DSPaginationWithSchema = (0, import_ds_utilities.describe)(DSPagination).description("DSPagination");
48
+ const DSPaginationWithSchema = (0, import_ds_props_helpers.describe)(DSPagination).description("DSPagination");
45
49
  DSPaginationWithSchema.propTypes = import_react_desc_prop_types.DSPaginationPropTypesSchema;
46
50
  //# sourceMappingURL=Pagination.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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-utilities';\nimport { PaginationContent } from './parts/PaginationContent';\nimport { DSPaginationName } from './DSPaginationDefinitions';\nimport type { DSPaginationT } from './react-desc-prop-types';\nimport { defaultProps, DSPaginationPropTypesSchema } from './react-desc-prop-types';\n\nconst DSPagination: React.ComponentType<DSPaginationT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSPaginationPropTypesSchema, DSPaginationName);\n\n return <PaginationContent {...propsWithDefault} />;\n};\n\nDSPagination.propTypes = DSPaginationPropTypesSchema;\nDSPagination.displayName = DSPaginationName;\nconst DSPaginationWithSchema = describe(DSPagination).description('DSPagination');\nDSPaginationWithSchema.propTypes = DSPaginationPropTypesSchema;\n\nexport { DSPagination, DSPaginationWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWd;AAVT,0BAAuF;AACvF,+BAAkC;AAClC,qCAAiC;AAEjC,mCAA0D;AAE1D,MAAM,eAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,kDAA0D,OAAO,yCAAY;AACtG,0DAA+B,kBAAkB,0DAA6B,+CAAgB;AAE9F,SAAO,4CAAC,8CAAmB,GAAG,kBAAkB;AAClD;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY,EAAE,YAAY,cAAc;AAChF,uBAAuB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { PaginationContent } from './parts/PaginationContent.js';\nimport { DSPaginationName } from './DSPaginationDefinitions.js';\nimport type { DSPaginationT } from './react-desc-prop-types.js';\nimport { defaultProps, DSPaginationPropTypesSchema } from './react-desc-prop-types.js';\n\nconst DSPagination: React.ComponentType<DSPaginationT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, DSPaginationPropTypesSchema, DSPaginationName);\n\n return <PaginationContent {...propsWithDefault} />;\n};\n\nDSPagination.propTypes = DSPaginationPropTypesSchema;\nDSPagination.displayName = DSPaginationName;\nconst DSPaginationWithSchema = describe(DSPagination).description('DSPagination');\nDSPaginationWithSchema.propTypes = DSPaginationPropTypesSchema;\n\nexport { DSPagination, DSPaginationWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWd;AAVT,8BAAuF;AACvF,+BAAkC;AAClC,qCAAiC;AAEjC,mCAA0D;AAE1D,MAAM,eAAyD,CAAC,UAAU;AACxE,QAAM,uBAAmB,sDAA0D,OAAO,yCAAY;AACtG,8DAA+B,kBAAkB,0DAA6B,+CAAgB;AAE9F,SAAO,4CAAC,8CAAmB,GAAG,kBAAkB;AAClD;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY,EAAE,YAAY,cAAc;AAChF,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -31,6 +35,8 @@ var React = __toESM(require("react"));
31
35
  const PAGINATION_DATA_TESTID = {
32
36
  PREVIOUS_BUTTON: "data-table-pagination-prev-button",
33
37
  NEXT_BUTTON: "data-table-pagination-next-button",
34
- CONTAINER: "data-table-pagination-container"
38
+ CONTAINER: "data-table-pagination-container",
39
+ PER_PAGE_SELECTOR: "ds-pagination-per-page-selector",
40
+ PAGINATOR: "ds-pagination-paginator"
35
41
  };
36
42
  //# sourceMappingURL=PaginationDataTestID.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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;AAAA;ACAA,YAAuB;ADAhB,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AACb;",
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 PER_PAGE_SELECTOR: 'ds-pagination-per-page-selector',\n PAGINATOR: 'ds-pagination-paginator',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,WAAW;AACb;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -5,6 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
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
+ };
8
12
  var __copyProps = (to, from, except, desc) => {
9
13
  if (from && typeof from === "object" || typeof from === "function") {
10
14
  for (let key of __getOwnPropNames(from))
@@ -13,14 +17,44 @@ var __copyProps = (to, from, except, desc) => {
13
17
  }
14
18
  return to;
15
19
  };
16
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
26
  mod
20
27
  ));
21
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
29
  var src_exports = {};
30
+ __export(src_exports, {
31
+ DSPageNextButton: () => import_parts.DSPageNextButton,
32
+ DSPageNextButtonWithSchema: () => import_parts.DSPageNextButtonWithSchema,
33
+ DSPagePrevButton: () => import_parts.DSPagePrevButton,
34
+ DSPagePrevButtonWithSchema: () => import_parts.DSPagePrevButtonWithSchema,
35
+ DSPagination: () => import_Pagination.DSPagination,
36
+ DSPaginationContainer: () => import_parts.DSPaginationContainer,
37
+ DSPaginationContainerWithSchema: () => import_parts.DSPaginationContainerWithSchema,
38
+ DSPaginationSeparator: () => import_styled2.DSPaginationSeparator,
39
+ DSPaginationSeparatorWithSchema: () => DSPaginationSeparatorWithSchema,
40
+ DSPaginationWithSchema: () => import_Pagination.DSPaginationWithSchema,
41
+ DSPaginator: () => import_parts.DSPaginator,
42
+ DSPaginatorWithSchema: () => import_parts.DSPaginatorWithSchema,
43
+ DSPerPageSelector: () => import_parts.DSPerPageSelector,
44
+ DSPerPageSelectorWithSchema: () => import_parts.DSPerPageSelectorWithSchema,
45
+ PAGINATION_DATA_TESTID: () => import_PaginationDataTestID.PAGINATION_DATA_TESTID
46
+ });
23
47
  module.exports = __toCommonJS(src_exports);
24
48
  var React = __toESM(require("react"));
25
- __reExport(src_exports, require("./Pagination"), module.exports);
49
+ var import_styled = require("./styled.js");
50
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
51
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
52
+ var import_DSPaginationDefinitions = require("./DSPaginationDefinitions.js");
53
+ var import_Pagination = require("./Pagination.js");
54
+ var import_parts = require("./parts/index.js");
55
+ var import_styled2 = require("./styled.js");
56
+ var import_PaginationDataTestID = require("./PaginationDataTestID.js");
57
+ import_styled.DSPaginationSeparator.propTypes = import_react_desc_prop_types.DSPaginationStyledPartPropTypesSchema;
58
+ import_styled.DSPaginationSeparator.displayName = import_DSPaginationDefinitions.PaginationSeparatorName;
59
+ const DSPaginationSeparatorWithSchema = (0, import_ds_props_helpers.describe)(import_styled.DSPaginationSeparator).description("Pagination Separator");
26
60
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yBAAd;",
6
- "names": []
4
+ "sourcesContent": ["import { DSPaginationSeparator } from './styled.js';\nimport { DSPaginationStyledPartPropTypesSchema } from './react-desc-prop-types.js';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { PaginationSeparatorName } from './DSPaginationDefinitions.js';\n\nDSPaginationSeparator.propTypes = DSPaginationStyledPartPropTypesSchema;\nDSPaginationSeparator.displayName = PaginationSeparatorName;\nconst DSPaginationSeparatorWithSchema = describe(DSPaginationSeparator).description('Pagination Separator');\n\nexport { DSPagination, DSPaginationWithSchema } from './Pagination.js';\nexport {\n DSPageNextButton,\n DSPageNextButtonWithSchema,\n DSPagePrevButton,\n DSPagePrevButtonWithSchema,\n DSPaginationContainer,\n DSPaginationContainerWithSchema,\n DSPerPageSelector,\n DSPerPageSelectorWithSchema,\n DSPaginator,\n DSPaginatorWithSchema,\n} from './parts/index.js';\n\nexport { DSPaginationSeparator } from './styled.js';\n\nexport { DSPaginationSeparatorWithSchema };\n\nexport { PAGINATION_DATA_TESTID } from './PaginationDataTestID.js';\n\nexport type { DSPaginationT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAsC;AACtC,mCAAsD;AACtD,8BAAyB;AACzB,qCAAwC;AAMxC,wBAAqD;AACrD,mBAWO;AAEP,IAAAA,iBAAsC;AAItC,kCAAuC;AAtBvC,oCAAsB,YAAY;AAClC,oCAAsB,cAAc;AACpC,MAAM,sCAAkC,kCAAS,mCAAqB,EAAE,YAAY,sBAAsB;",
6
+ "names": ["import_styled"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -0,0 +1,74 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DSPageNextButton_exports = {};
30
+ __export(DSPageNextButton_exports, {
31
+ DSPageNextButton: () => DSPageNextButton,
32
+ DSPageNextButtonWithSchema: () => DSPageNextButtonWithSchema
33
+ });
34
+ module.exports = __toCommonJS(DSPageNextButton_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_lodash = require("lodash");
38
+ var import_ds_icons = require("@elliemae/ds-icons");
39
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
40
+ var import_PaginationDataTestID = require("../PaginationDataTestID.js");
41
+ var import_styled = require("../styled.js");
42
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
43
+ var import_DSPaginationDefinitions = require("../DSPaginationDefinitions.js");
44
+ const DSPageNextButton = (props) => {
45
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(
46
+ props,
47
+ import_react_desc_prop_types.pageNextButtonDefaultProps
48
+ );
49
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSPageNextButtonPropTypesSchema, import_DSPaginationDefinitions.PageNextButtonName);
50
+ const { canNextPage, onNextPage } = propsWithDefault;
51
+ const globalAttributes = (0, import_lodash.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault), "shape", "size", "type");
52
+ const xstyledAttributes = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ import_styled.PreviousNextPageButton,
55
+ {
56
+ disabled: !canNextPage,
57
+ buttonType: "raw",
58
+ "data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.NEXT_BUTTON,
59
+ "aria-label": "Go to next page",
60
+ ...globalAttributes,
61
+ ...xstyledAttributes,
62
+ onClick: () => {
63
+ if (canNextPage)
64
+ onNextPage();
65
+ },
66
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronRight, { color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"] })
67
+ }
68
+ );
69
+ };
70
+ DSPageNextButton.propTypes = import_react_desc_prop_types.DSPageNextButtonPropTypesSchema;
71
+ DSPageNextButton.displayName = import_DSPaginationDefinitions.PageNextButtonName;
72
+ const DSPageNextButtonWithSchema = (0, import_ds_props_helpers.describe)(DSPageNextButton).description("Per Page Selector");
73
+ DSPageNextButtonWithSchema.propTypes = import_react_desc_prop_types.DSPageNextButtonPropTypesSchema;
74
+ //# sourceMappingURL=DSPageNextButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/parts/DSPageNextButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { omit } from 'lodash';\nimport { ChevronRight } from '@elliemae/ds-icons';\nimport {\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID.js';\nimport { PreviousNextPageButton } from '../styled.js';\nimport { pageNextButtonDefaultProps, DSPageNextButtonPropTypesSchema } from '../react-desc-prop-types.js';\nimport { PageNextButtonName } from '../DSPaginationDefinitions.js';\nimport type { DSPaginationT } from '../react-desc-prop-types.js';\n\nexport const DSPageNextButton: React.ComponentType<DSPaginationT.PageNextButtonProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PageNextButtonInternalProps>(\n props,\n pageNextButtonDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPageNextButtonPropTypesSchema, PageNextButtonName);\n\n const { canNextPage, onNextPage } = propsWithDefault;\n const globalAttributes = omit(useGetGlobalAttributes(propsWithDefault), 'shape', 'size', 'type');\n const xstyledAttributes = useGetXstyledProps(propsWithDefault);\n\n return (\n <PreviousNextPageButton\n disabled={!canNextPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.NEXT_BUTTON}\n aria-label=\"Go to next page\"\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={() => {\n if (canNextPage) onNextPage();\n }}\n >\n <ChevronRight color={canNextPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n );\n};\n\nDSPageNextButton.propTypes = DSPageNextButtonPropTypesSchema;\nDSPageNextButton.displayName = PageNextButtonName;\nexport const DSPageNextButtonWithSchema = describe(DSPageNextButton).description('Per Page Selector');\nDSPageNextButtonWithSchema.propTypes = DSPageNextButtonPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwCjB;AAtCN,oBAAqB;AACrB,sBAA6B;AAC7B,8BAMO;AACP,kCAAuC;AACvC,oBAAuC;AACvC,mCAA4E;AAC5E,qCAAmC;AAG5B,MAAM,mBAA2E,CAAC,UAAU;AACjG,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,8DAA+B,kBAAkB,8DAAiC,iDAAkB;AAEpG,QAAM,EAAE,aAAa,WAAW,IAAI;AACpC,QAAM,uBAAmB,wBAAK,gDAAuB,gBAAgB,GAAG,SAAS,QAAQ,MAAM;AAC/F,QAAM,wBAAoB,4CAAmB,gBAAgB;AAE7D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC;AAAA,MACX,YAAW;AAAA,MACX,eAAa,mDAAuB;AAAA,MACpC,cAAW;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,SAAS,MAAM;AACb,YAAI;AAAa,qBAAW;AAAA,MAC9B;AAAA,MAEA,sDAAC,gCAAa,OAAO,cAAc,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AAAA,EACpF;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AACxB,MAAM,iCAA6B,kCAAS,gBAAgB,EAAE,YAAY,mBAAmB;AACpG,2BAA2B,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,74 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DSPagePrevButton_exports = {};
30
+ __export(DSPagePrevButton_exports, {
31
+ DSPagePrevButton: () => DSPagePrevButton,
32
+ DSPagePrevButtonWithSchema: () => DSPagePrevButtonWithSchema
33
+ });
34
+ module.exports = __toCommonJS(DSPagePrevButton_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_lodash = require("lodash");
38
+ var import_ds_icons = require("@elliemae/ds-icons");
39
+ var import_PaginationDataTestID = require("../PaginationDataTestID.js");
40
+ var import_styled = require("../styled.js");
41
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
42
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
43
+ var import_DSPaginationDefinitions = require("../DSPaginationDefinitions.js");
44
+ const DSPagePrevButton = (props) => {
45
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(
46
+ props,
47
+ import_react_desc_prop_types.pagePrevButtonDefaultProps
48
+ );
49
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(propsWithDefault, import_react_desc_prop_types.DSPagePrevButtonPropTypesSchema, import_DSPaginationDefinitions.PagePrevButtonName);
50
+ const { canPreviousPage, onPreviousPage } = propsWithDefault;
51
+ const globalAttributes = (0, import_lodash.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(propsWithDefault), "shape", "size", "type");
52
+ const xstyledAttributes = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ import_styled.PreviousNextPageButton,
55
+ {
56
+ disabled: !canPreviousPage,
57
+ buttonType: "raw",
58
+ "data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.PREVIOUS_BUTTON,
59
+ "aria-label": "Go to previous page",
60
+ ...globalAttributes,
61
+ ...xstyledAttributes,
62
+ onClick: () => {
63
+ if (canPreviousPage)
64
+ onPreviousPage();
65
+ },
66
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronLeft, { color: canPreviousPage ? ["brand-primary", "700"] : ["neutral", "500"] })
67
+ }
68
+ );
69
+ };
70
+ DSPagePrevButton.propTypes = import_react_desc_prop_types.DSPagePrevButtonPropTypesSchema;
71
+ DSPagePrevButton.displayName = import_DSPaginationDefinitions.PagePrevButtonName;
72
+ const DSPagePrevButtonWithSchema = (0, import_ds_props_helpers.describe)(DSPagePrevButton).description("Per Page Selector");
73
+ DSPagePrevButtonWithSchema.propTypes = import_react_desc_prop_types.DSPagePrevButtonPropTypesSchema;
74
+ //# sourceMappingURL=DSPagePrevButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/parts/DSPagePrevButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { omit } from 'lodash';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID.js';\nimport { PreviousNextPageButton } from '../styled.js';\nimport { pagePrevButtonDefaultProps, DSPagePrevButtonPropTypesSchema } from '../react-desc-prop-types.js';\nimport {\n describe,\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useValidateTypescriptPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { PagePrevButtonName } from '../DSPaginationDefinitions.js';\nimport type { DSPaginationT } from '../react-desc-prop-types.js';\n\nexport const DSPagePrevButton: React.ComponentType<DSPaginationT.PagePrevButtonProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.PagePrevButtonInternalProps>(\n props,\n pagePrevButtonDefaultProps,\n );\n useValidateTypescriptPropTypes(propsWithDefault, DSPagePrevButtonPropTypesSchema, PagePrevButtonName);\n\n const { canPreviousPage, onPreviousPage } = propsWithDefault;\n const globalAttributes = omit(useGetGlobalAttributes(propsWithDefault), 'shape', 'size', 'type');\n const xstyledAttributes = useGetXstyledProps(propsWithDefault);\n\n return (\n <PreviousNextPageButton\n disabled={!canPreviousPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.PREVIOUS_BUTTON}\n aria-label=\"Go to previous page\"\n {...globalAttributes}\n {...xstyledAttributes}\n onClick={() => {\n if (canPreviousPage) onPreviousPage();\n }}\n >\n <ChevronLeft color={canPreviousPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n );\n};\n\nDSPagePrevButton.propTypes = DSPagePrevButtonPropTypesSchema;\nDSPagePrevButton.displayName = PagePrevButtonName;\nexport const DSPagePrevButtonWithSchema = describe(DSPagePrevButton).description('Per Page Selector');\nDSPagePrevButtonWithSchema.propTypes = DSPagePrevButtonPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwCjB;AAtCN,oBAAqB;AACrB,sBAA4B;AAC5B,kCAAuC;AACvC,oBAAuC;AACvC,mCAA4E;AAC5E,8BAMO;AACP,qCAAmC;AAG5B,MAAM,mBAA2E,CAAC,UAAU;AACjG,QAAM,uBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,8DAA+B,kBAAkB,8DAAiC,iDAAkB;AAEpG,QAAM,EAAE,iBAAiB,eAAe,IAAI;AAC5C,QAAM,uBAAmB,wBAAK,gDAAuB,gBAAgB,GAAG,SAAS,QAAQ,MAAM;AAC/F,QAAM,wBAAoB,4CAAmB,gBAAgB;AAE7D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC;AAAA,MACX,YAAW;AAAA,MACX,eAAa,mDAAuB;AAAA,MACpC,cAAW;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,SAAS,MAAM;AACb,YAAI;AAAiB,yBAAe;AAAA,MACtC;AAAA,MAEA,sDAAC,+BAAY,OAAO,kBAAkB,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AAAA,EACvF;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AACxB,MAAM,iCAA6B,kCAAS,gBAAgB,EAAE,YAAY,mBAAmB;AACpG,2BAA2B,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,61 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DSPaginationContainer_exports = {};
30
+ __export(DSPaginationContainer_exports, {
31
+ DSPaginationContainer: () => DSPaginationContainer,
32
+ DSPaginationContainerWithSchema: () => DSPaginationContainerWithSchema
33
+ });
34
+ module.exports = __toCommonJS(DSPaginationContainer_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_lodash = require("lodash");
38
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
39
+ var import_PaginationDataTestID = require("../PaginationDataTestID.js");
40
+ var import_styled = require("../styled.js");
41
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
42
+ var import_DSPaginationDefinitions = require("../DSPaginationDefinitions.js");
43
+ const DSPaginationContainer = (props) => {
44
+ const globalAttributes = (0, import_lodash.omit)((0, import_ds_props_helpers.useGetGlobalAttributes)(props), ["rows", "wrap"]);
45
+ const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(props);
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
+ import_styled.StyledPaginationContainer,
48
+ {
49
+ "data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.CONTAINER,
50
+ ...globalAttributes,
51
+ ...xstyledProps,
52
+ cols: ["minmax(auto, 80%)"],
53
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledPaginationWrapper, { children: props.children })
54
+ }
55
+ );
56
+ };
57
+ DSPaginationContainer.propTypes = import_react_desc_prop_types.DSPaginationContainerPropTypesSchema;
58
+ DSPaginationContainer.displayName = import_DSPaginationDefinitions.PaginationContainerName;
59
+ const DSPaginationContainerWithSchema = (0, import_ds_props_helpers.describe)(DSPaginationContainer).description("Per Page Selector");
60
+ DSPaginationContainerWithSchema.propTypes = import_react_desc_prop_types.DSPaginationContainerPropTypesSchema;
61
+ //# sourceMappingURL=DSPaginationContainer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/parts/DSPaginationContainer.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { omit } from 'lodash';\nimport { describe, useGetGlobalAttributes, useGetXstyledProps } from '@elliemae/ds-props-helpers';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID.js';\nimport { StyledPaginationContainer, StyledPaginationWrapper } from '../styled.js';\nimport { DSPaginationContainerPropTypesSchema } from '../react-desc-prop-types.js';\nimport { PaginationContainerName } from '../DSPaginationDefinitions.js';\nimport type { DSPaginationT } from '../react-desc-prop-types.js';\n\nexport const DSPaginationContainer: React.ComponentType<DSPaginationT.ContainerProps> = (props) => {\n const globalAttributes = omit(useGetGlobalAttributes(props), ['rows', 'wrap']);\n const xstyledProps = useGetXstyledProps(props);\n\n return (\n <StyledPaginationContainer\n data-testid={PAGINATION_DATA_TESTID.CONTAINER}\n {...globalAttributes}\n {...xstyledProps}\n cols={['minmax(auto, 80%)']}\n >\n <StyledPaginationWrapper>{props.children}</StyledPaginationWrapper>\n </StyledPaginationContainer>\n );\n};\n\nDSPaginationContainer.propTypes = DSPaginationContainerPropTypesSchema;\nDSPaginationContainer.displayName = PaginationContainerName;\nexport const DSPaginationContainerWithSchema = describe(DSPaginationContainer).description('Per Page Selector');\nDSPaginationContainerWithSchema.propTypes = DSPaginationContainerPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoBjB;AAnBN,oBAAqB;AACrB,8BAAqE;AACrE,kCAAuC;AACvC,oBAAmE;AACnE,mCAAqD;AACrD,qCAAwC;AAGjC,MAAM,wBAA2E,CAAC,UAAU;AACjG,QAAM,uBAAmB,wBAAK,gDAAuB,KAAK,GAAG,CAAC,QAAQ,MAAM,CAAC;AAC7E,QAAM,mBAAe,4CAAmB,KAAK;AAE7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,mDAAuB;AAAA,MACnC,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,MAAM,CAAC,mBAAmB;AAAA,MAE1B,sDAAC,yCAAyB,gBAAM,UAAS;AAAA;AAAA,EAC3C;AAEJ;AAEA,sBAAsB,YAAY;AAClC,sBAAsB,cAAc;AAC7B,MAAM,sCAAkC,kCAAS,qBAAqB,EAAE,YAAY,mBAAmB;AAC9G,gCAAgC,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,50 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var createPaginatorHeader_exports = {};
30
+ __export(createPaginatorHeader_exports, {
31
+ createPaginatorHeader: () => createPaginatorHeader
32
+ });
33
+ module.exports = __toCommonJS(createPaginatorHeader_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_ds_grid = require("@elliemae/ds-grid");
37
+ var import_styled = require("../../styled.js");
38
+ const createPaginatorHeader = ({ pageDetailsTitle, pageInfoWidth }) => {
39
+ const Comp = () => {
40
+ if (pageDetailsTitle === "")
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "Page" });
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: [`${pageInfoWidth + 50}px`, "8px", "auto"], children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { marginLeft: "8px" }, children: "Page" }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.DSPaginationSeparator, { height: "100%" }),
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pageDetailsTitle })
46
+ ] });
47
+ };
48
+ return Comp;
49
+ };
50
+ //# sourceMappingURL=createPaginatorHeader.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/DSPaginator/createPaginatorHeader.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSPaginationSeparator } from '../../styled.js';\n\ninterface PaginatorHeaderOptions {\n pageDetailsTitle: string;\n pageInfoWidth: number;\n}\n\nexport const createPaginatorHeader = ({ pageDetailsTitle, pageInfoWidth }: PaginatorHeaderOptions) => {\n const Comp = () => {\n if (pageDetailsTitle === '') return <>Page</>;\n\n return (\n <Grid cols={[`${pageInfoWidth + 50}px`, '8px', 'auto']}>\n <span style={{ marginLeft: '8px' }}>Page</span>\n <DSPaginationSeparator height=\"100%\" />\n <span>{pageDetailsTitle}</span>\n </Grid>\n );\n };\n return Comp;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADWiB;AAVxC,qBAAqB;AACrB,oBAAsC;AAO/B,MAAM,wBAAwB,CAAC,EAAE,kBAAkB,cAAc,MAA8B;AACpG,QAAM,OAAO,MAAM;AACjB,QAAI,qBAAqB;AAAI,aAAO,2EAAE,kBAAI;AAE1C,WACE,6CAAC,uBAAK,MAAM,CAAC,GAAG,gBAAgB,QAAQ,OAAO,MAAM,GACnD;AAAA,kDAAC,UAAK,OAAO,EAAE,YAAY,MAAM,GAAG,kBAAI;AAAA,MACxC,4CAAC,uCAAsB,QAAO,QAAO;AAAA,MACrC,4CAAC,UAAM,4BAAiB;AAAA,OAC1B;AAAA,EAEJ;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,76 @@
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
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var getOptions_exports = {};
30
+ __export(getOptions_exports, {
31
+ getOptions: () => getOptions
32
+ });
33
+ module.exports = __toCommonJS(getOptions_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_ds_grid = require("@elliemae/ds-grid");
37
+ var import_ds_icons = require("@elliemae/ds-icons");
38
+ const OptionWithDetails = (props) => {
39
+ const Comp = () => {
40
+ const { pageInfoWidth, pageIndex, index, pageDetails } = props;
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: ["16px", `${pageInfoWidth + 16}px`, "auto"], gutter: "xxs", alignItems: "center", children: [
42
+ pageIndex - 1 === index ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.Checkmark, { size: "s", color: ["brand-primary", "600"] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: index + 1 }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
+ "span",
46
+ {
47
+ style: {
48
+ whiteSpace: "nowrap",
49
+ textOverflow: "ellipsis",
50
+ overflow: "hidden"
51
+ },
52
+ children: pageDetails[index]
53
+ }
54
+ )
55
+ ] });
56
+ };
57
+ return Comp;
58
+ };
59
+ const getOptions = (args) => {
60
+ const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;
61
+ const amountOfPages = typeof pageCount === "string" ? pageIndex + 1 : pageCount;
62
+ const options = new Array(amountOfPages).fill(0).map((_, index) => {
63
+ const option = {
64
+ dsId: (index + 1).toString(),
65
+ label: (index + 1).toString(),
66
+ value: index + 1,
67
+ type: "single"
68
+ };
69
+ if (pageDetails?.length) {
70
+ option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });
71
+ }
72
+ return option;
73
+ });
74
+ return options;
75
+ };
76
+ //# sourceMappingURL=getOptions.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/parts/DSPaginator/getOptions.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Checkmark } from '@elliemae/ds-icons';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu';\n\ninterface OptionWithDetailsT {\n pageInfoWidth: number;\n pageIndex: number;\n index: number;\n pageDetails: string[];\n}\n\nconst OptionWithDetails = (props: OptionWithDetailsT) => {\n const Comp = () => {\n const { pageInfoWidth, pageIndex, index, pageDetails } = props;\n return (\n <Grid cols={['16px', `${pageInfoWidth + 16}px`, 'auto']} gutter=\"xxs\" alignItems=\"center\">\n {pageIndex - 1 === 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 Comp;\n};\n\nexport const getOptions = (args: {\n pageCount: number | string;\n pageIndex: number;\n pageDetails: string[];\n pageInfoWidth: number;\n}): DSDropdownMenuT.ItemSingleOptions[] => {\n const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;\n\n const amountOfPages = typeof pageCount === 'string' ? pageIndex + 1 : pageCount;\n\n const options = new Array(amountOfPages).fill(0).map((_, index) => {\n const option: DSDropdownMenuT.ItemSingleOptions = {\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 = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });\n }\n return option;\n });\n return options;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBjB;AAfN,qBAAqB;AACrB,sBAA0B;AAU1B,MAAM,oBAAoB,CAAC,UAA8B;AACvD,QAAM,OAAO,MAAM;AACjB,UAAM,EAAE,eAAe,WAAW,OAAO,YAAY,IAAI;AACzD,WACE,6CAAC,uBAAK,MAAM,CAAC,QAAQ,GAAG,gBAAgB,QAAQ,MAAM,GAAG,QAAO,OAAM,YAAW,UAC9E;AAAA,kBAAY,MAAM,QAAQ,4CAAC,6BAAU,MAAK,KAAI,OAAO,CAAC,iBAAiB,KAAK,GAAG,IAAK,4CAAC,SAAI;AAAA,MAC1F,4CAAC,UAAM,kBAAQ,GAAE;AAAA,MACjB;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,YAAY;AAAA,YACZ,cAAc;AAAA,YACd,UAAU;AAAA,UACZ;AAAA,UAEC,sBAAY,KAAK;AAAA;AAAA,MACpB;AAAA,OACF;AAAA,EAEJ;AACA,SAAO;AACT;AAEO,MAAM,aAAa,CAAC,SAKgB;AACzC,QAAM,EAAE,WAAW,WAAW,aAAa,cAAc,IAAI;AAE7D,QAAM,gBAAgB,OAAO,cAAc,WAAW,YAAY,IAAI;AAEtE,QAAM,UAAU,IAAI,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,UAAU;AACjE,UAAM,SAA4C;AAAA,MAChD,OAAO,QAAQ,GAAG,SAAS;AAAA,MAC3B,QAAQ,QAAQ,GAAG,SAAS;AAAA,MAC5B,OAAO,QAAQ;AAAA,MACf,MAAM;AAAA,IACR;AACA,QAAI,aAAa,QAAQ;AACvB,aAAO,SAAS,kBAAkB,EAAE,eAAe,WAAW,OAAO,YAAY,CAAC;AAAA,IACpF;AACA,WAAO;AAAA,EACT,CAAC;AACD,SAAO;AACT;",
6
+ "names": []
7
+ }