@elliemae/ds-pagination 3.57.0-next.34 → 3.57.0-next.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{Pagination.js → DSPagination.js} +8 -8
- package/dist/cjs/DSPagination.js.map +7 -0
- package/dist/cjs/config/usePagination.js +51 -0
- package/dist/cjs/config/usePagination.js.map +7 -0
- package/dist/cjs/{PaginationDataTestID.js → config/useValidateProps.js} +9 -13
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/{DSPaginationDefinitions.js → constants/index.js} +22 -19
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +29 -18
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/parts/{DSPageNextButton.js → DSPageNextButton/DSPageNextButton.js} +46 -18
- package/dist/cjs/parts/DSPageNextButton/DSPageNextButton.js.map +7 -0
- package/dist/cjs/parts/DSPageNextButton/config/usePageNextButton.js +55 -0
- package/dist/cjs/parts/DSPageNextButton/config/usePageNextButton.js.map +7 -0
- package/dist/cjs/parts/DSPageNextButton/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPageNextButton/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPageNextButton/constants/index.js +48 -0
- package/dist/cjs/parts/DSPageNextButton/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPageNextButton/index.js +41 -0
- package/dist/cjs/parts/DSPageNextButton/index.js.map +7 -0
- package/dist/cjs/parts/DSPageNextButton/react-desc-prop-types.js +51 -0
- package/dist/cjs/parts/DSPageNextButton/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/DSPageNextButton/typescript-testing/slot-props.js +32 -0
- package/dist/cjs/parts/DSPageNextButton/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/{typescript-testing/typescript-page-next-button-valid.js → parts/DSPageNextButton/typescript-testing/typescript-testing.js} +1 -1
- package/dist/cjs/parts/DSPageNextButton/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/cjs/parts/{DSPagePrevButton.js → DSPagePrevButton/DSPagePrevButton.js} +46 -18
- package/dist/cjs/parts/DSPagePrevButton/DSPagePrevButton.js.map +7 -0
- package/dist/cjs/parts/DSPagePrevButton/config/usePagePrevButton.js +55 -0
- package/dist/cjs/parts/DSPagePrevButton/config/usePagePrevButton.js.map +7 -0
- package/dist/cjs/parts/DSPagePrevButton/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPagePrevButton/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPagePrevButton/constants/index.js +48 -0
- package/dist/cjs/parts/DSPagePrevButton/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPagePrevButton/index.js +41 -0
- package/dist/cjs/parts/DSPagePrevButton/index.js.map +7 -0
- package/dist/cjs/parts/DSPagePrevButton/react-desc-prop-types.js +51 -0
- package/dist/cjs/parts/DSPagePrevButton/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/DSPagePrevButton/typescript-testing/slot-props.js +32 -0
- package/dist/cjs/parts/DSPagePrevButton/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/{typescript-testing/typescript-page-prev-button-valid.js → parts/DSPagePrevButton/typescript-testing/typescript-testing.js} +1 -1
- package/dist/cjs/parts/DSPagePrevButton/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/cjs/parts/{DSPaginationContainer.js → DSPaginationContainer/DSPaginationContainer.js} +26 -12
- package/dist/cjs/parts/DSPaginationContainer/DSPaginationContainer.js.map +7 -0
- package/dist/cjs/parts/DSPaginationContainer/config/usePaginationContainer.js +60 -0
- package/dist/cjs/parts/DSPaginationContainer/config/usePaginationContainer.js.map +7 -0
- package/dist/cjs/parts/DSPaginationContainer/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPaginationContainer/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPaginationContainer/constants/index.js +50 -0
- package/dist/cjs/parts/DSPaginationContainer/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPaginationContainer/index.js +41 -0
- package/dist/cjs/parts/DSPaginationContainer/index.js.map +7 -0
- package/dist/cjs/parts/DSPaginationContainer/react-desc-prop-types.js +48 -0
- package/dist/cjs/parts/DSPaginationContainer/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/DSPaginationContainer/typescript-testing/slot-props.js +34 -0
- package/dist/cjs/parts/DSPaginationContainer/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/parts/DSPaginationSeparator/DSPaginationSeparator.js +68 -0
- package/dist/cjs/parts/DSPaginationSeparator/DSPaginationSeparator.js.map +7 -0
- package/dist/cjs/parts/DSPaginationSeparator/config/usePaginationSeparator.js +60 -0
- package/dist/cjs/parts/DSPaginationSeparator/config/usePaginationSeparator.js.map +7 -0
- package/dist/cjs/parts/DSPaginationSeparator/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPaginationSeparator/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPaginationSeparator/constants/index.js +45 -0
- package/dist/cjs/parts/DSPaginationSeparator/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPaginationSeparator/index.js +41 -0
- package/dist/cjs/parts/DSPaginationSeparator/index.js.map +7 -0
- package/dist/cjs/parts/DSPaginationSeparator/react-desc-prop-types.js +46 -0
- package/dist/cjs/parts/DSPaginationSeparator/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/DSPaginator.js +143 -0
- package/dist/cjs/parts/DSPaginator/DSPaginator.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/{createPaginatorHeader.js → config/createPaginatorHeader.js} +7 -3
- package/dist/cjs/parts/DSPaginator/config/createPaginatorHeader.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/{getOptions.js.map → config/getOptions.js.map} +1 -1
- package/dist/cjs/parts/DSPaginator/{useOnElementOnResize.js.map → config/useOnElementOnResize.js.map} +1 -1
- package/dist/cjs/parts/DSPaginator/{usePaginationSearch.js.map → config/usePaginationSearch.js.map} +1 -1
- package/dist/cjs/parts/DSPaginator/{usePaginator.js → config/usePaginator.js} +46 -21
- package/dist/cjs/parts/DSPaginator/config/usePaginator.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPaginator/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/constants/index.js +45 -0
- package/dist/cjs/parts/DSPaginator/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/index.js +7 -112
- package/dist/cjs/parts/DSPaginator/index.js.map +3 -3
- package/dist/cjs/parts/DSPaginator/react-desc-prop-types.js +59 -0
- package/dist/cjs/parts/DSPaginator/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/{styled.js → parts/DSPaginator/styled.js} +9 -41
- package/dist/cjs/parts/DSPaginator/styled.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/typescript-testing/slot-props.js +32 -0
- package/dist/cjs/parts/DSPaginator/typescript-testing/slot-props.js.map +7 -0
- package/dist/cjs/{typescript-testing/typescript-paginator-valid.js → parts/DSPaginator/typescript-testing/typescript-testing.js} +1 -1
- package/dist/cjs/parts/DSPaginator/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/DSPerPageSelector.js +109 -0
- package/dist/cjs/parts/DSPerPageSelector/DSPerPageSelector.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/{getOptions.js.map → config/getOptions.js.map} +1 -1
- package/dist/cjs/parts/DSPerPageSelector/{usePerPageSelector.js → config/usePerPageSelector.js} +29 -19
- package/dist/cjs/parts/DSPerPageSelector/config/usePerPageSelector.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/config/useValidateProps.js +40 -0
- package/dist/cjs/parts/DSPerPageSelector/config/useValidateProps.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/constants/index.js +50 -0
- package/dist/cjs/parts/DSPerPageSelector/constants/index.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/index.js +7 -70
- package/dist/cjs/parts/DSPerPageSelector/index.js.map +3 -3
- package/dist/cjs/parts/DSPerPageSelector/react-desc-prop-types.js +58 -0
- package/dist/cjs/parts/DSPerPageSelector/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/styled.js +90 -0
- package/dist/cjs/parts/DSPerPageSelector/styled.js.map +7 -0
- package/dist/cjs/parts/DSPerPageSelector/typescript-testing/slots-props.js +32 -0
- package/dist/cjs/parts/DSPerPageSelector/typescript-testing/slots-props.js.map +7 -0
- package/dist/cjs/{typescript-testing/typescript-per-page-selector-valid.js → parts/DSPerPageSelector/typescript-testing/typescript-testing.js} +1 -1
- package/dist/cjs/parts/DSPerPageSelector/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/cjs/parts/PaginationContent.js +7 -9
- package/dist/cjs/parts/PaginationContent.js.map +2 -2
- package/dist/cjs/parts/index.js +25 -4
- package/dist/cjs/parts/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +1 -86
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/{Pagination.js → DSPagination.js} +6 -6
- package/dist/esm/DSPagination.js.map +7 -0
- package/dist/esm/config/usePagination.js +21 -0
- package/dist/esm/config/usePagination.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +27 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +45 -13
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/parts/DSPageNextButton/DSPageNextButton.js +74 -0
- package/dist/esm/parts/DSPageNextButton/DSPageNextButton.js.map +7 -0
- package/dist/esm/parts/DSPageNextButton/config/usePageNextButton.js +30 -0
- package/dist/esm/parts/DSPageNextButton/config/usePageNextButton.js.map +7 -0
- package/dist/esm/parts/DSPageNextButton/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPageNextButton/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPageNextButton/constants/index.js +18 -0
- package/dist/esm/parts/DSPageNextButton/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPageNextButton/index.js +11 -0
- package/dist/esm/parts/DSPageNextButton/index.js.map +7 -0
- package/dist/esm/parts/DSPageNextButton/react-desc-prop-types.js +26 -0
- package/dist/esm/parts/DSPageNextButton/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPageNextButton/typescript-testing/slot-props.js +9 -0
- package/dist/esm/parts/DSPageNextButton/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/{typescript-testing/typescript-page-next-button-valid.js → parts/DSPageNextButton/typescript-testing/typescript-testing.js} +1 -1
- package/dist/esm/parts/DSPageNextButton/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/DSPagePrevButton.js +74 -0
- package/dist/esm/parts/DSPagePrevButton/DSPagePrevButton.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/config/usePagePrevButton.js +30 -0
- package/dist/esm/parts/DSPagePrevButton/config/usePagePrevButton.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPagePrevButton/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/constants/index.js +18 -0
- package/dist/esm/parts/DSPagePrevButton/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/index.js +11 -0
- package/dist/esm/parts/DSPagePrevButton/index.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/react-desc-prop-types.js +26 -0
- package/dist/esm/parts/DSPagePrevButton/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPagePrevButton/typescript-testing/slot-props.js +9 -0
- package/dist/esm/parts/DSPagePrevButton/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/{typescript-testing/typescript-page-prev-button-valid.js → parts/DSPagePrevButton/typescript-testing/typescript-testing.js} +1 -1
- package/dist/esm/parts/DSPagePrevButton/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/DSPaginationContainer.js +50 -0
- package/dist/esm/parts/DSPaginationContainer/DSPaginationContainer.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/config/usePaginationContainer.js +38 -0
- package/dist/esm/parts/DSPaginationContainer/config/usePaginationContainer.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPaginationContainer/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/constants/index.js +20 -0
- package/dist/esm/parts/DSPaginationContainer/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/index.js +15 -0
- package/dist/esm/parts/DSPaginationContainer/index.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/react-desc-prop-types.js +18 -0
- package/dist/esm/parts/DSPaginationContainer/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPaginationContainer/typescript-testing/slot-props.js +11 -0
- package/dist/esm/parts/DSPaginationContainer/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/parts/DSPaginationSeparator/DSPaginationSeparator.js +43 -0
- package/dist/esm/parts/DSPaginationSeparator/DSPaginationSeparator.js.map +7 -0
- package/dist/esm/parts/DSPaginationSeparator/config/usePaginationSeparator.js +38 -0
- package/dist/esm/parts/DSPaginationSeparator/config/usePaginationSeparator.js.map +7 -0
- package/dist/esm/parts/DSPaginationSeparator/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPaginationSeparator/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPaginationSeparator/constants/index.js +15 -0
- package/dist/esm/parts/DSPaginationSeparator/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPaginationSeparator/index.js +15 -0
- package/dist/esm/parts/DSPaginationSeparator/index.js.map +7 -0
- package/dist/esm/parts/DSPaginationSeparator/react-desc-prop-types.js +16 -0
- package/dist/esm/parts/DSPaginationSeparator/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPaginator/DSPaginator.js +113 -0
- package/dist/esm/parts/DSPaginator/DSPaginator.js.map +7 -0
- package/dist/esm/parts/DSPaginator/{createPaginatorHeader.js → config/createPaginatorHeader.js} +7 -3
- package/dist/esm/parts/DSPaginator/config/createPaginatorHeader.js.map +7 -0
- package/dist/esm/parts/DSPaginator/{getOptions.js.map → config/getOptions.js.map} +1 -1
- package/dist/esm/parts/DSPaginator/{useOnElementOnResize.js.map → config/useOnElementOnResize.js.map} +1 -1
- package/dist/esm/parts/DSPaginator/{usePaginationSearch.js.map → config/usePaginationSearch.js.map} +1 -1
- package/dist/esm/parts/DSPaginator/{usePaginator.js → config/usePaginator.js} +52 -22
- package/dist/esm/parts/DSPaginator/config/usePaginator.js.map +7 -0
- package/dist/esm/parts/DSPaginator/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPaginator/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPaginator/constants/index.js +15 -0
- package/dist/esm/parts/DSPaginator/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPaginator/index.js +6 -111
- package/dist/esm/parts/DSPaginator/index.js.map +3 -3
- package/dist/esm/parts/DSPaginator/react-desc-prop-types.js +34 -0
- package/dist/esm/parts/DSPaginator/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPaginator/styled.js +60 -0
- package/dist/esm/parts/DSPaginator/styled.js.map +7 -0
- package/dist/esm/parts/DSPaginator/typescript-testing/slot-props.js +9 -0
- package/dist/esm/parts/DSPaginator/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/{typescript-testing/typescript-paginator-valid.js → parts/DSPaginator/typescript-testing/typescript-testing.js} +1 -1
- package/dist/esm/parts/DSPaginator/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/DSPerPageSelector.js +79 -0
- package/dist/esm/parts/DSPerPageSelector/DSPerPageSelector.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/{getOptions.js.map → config/getOptions.js.map} +1 -1
- package/dist/esm/parts/DSPerPageSelector/config/usePerPageSelector.js +55 -0
- package/dist/esm/parts/DSPerPageSelector/config/usePerPageSelector.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/config/useValidateProps.js +10 -0
- package/dist/esm/parts/DSPerPageSelector/config/useValidateProps.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/constants/index.js +20 -0
- package/dist/esm/parts/DSPerPageSelector/constants/index.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/index.js +6 -69
- package/dist/esm/parts/DSPerPageSelector/index.js.map +3 -3
- package/dist/esm/parts/DSPerPageSelector/react-desc-prop-types.js +33 -0
- package/dist/esm/parts/DSPerPageSelector/react-desc-prop-types.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/styled.js +60 -0
- package/dist/esm/parts/DSPerPageSelector/styled.js.map +7 -0
- package/dist/esm/parts/DSPerPageSelector/typescript-testing/slots-props.js +9 -0
- package/dist/esm/parts/DSPerPageSelector/typescript-testing/slots-props.js.map +7 -0
- package/dist/esm/{typescript-testing/typescript-per-page-selector-valid.js → parts/DSPerPageSelector/typescript-testing/typescript-testing.js} +1 -1
- package/dist/esm/parts/DSPerPageSelector/typescript-testing/typescript-testing.js.map +7 -0
- package/dist/esm/parts/PaginationContent.js +7 -9
- package/dist/esm/parts/PaginationContent.js.map +2 -2
- package/dist/esm/parts/index.js +63 -6
- package/dist/esm/parts/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +1 -86
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/types/config/usePagination.d.ts +5 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +29 -0
- package/dist/types/index.d.ts +3 -7
- package/dist/types/parts/DSPageNextButton/DSPageNextButton.d.ts +5 -0
- package/dist/types/parts/DSPageNextButton/config/usePageNextButton.d.ts +377 -0
- package/dist/types/parts/DSPageNextButton/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPageNextButton/constants/index.d.ts +9 -0
- package/dist/types/parts/DSPageNextButton/index.d.ts +3 -0
- package/dist/types/parts/DSPageNextButton/react-desc-prop-types.d.ts +23 -0
- package/dist/types/parts/DSPageNextButton/tests/DSPageNextButton.get-owner-props.test.d.ts +1 -0
- package/dist/types/parts/DSPageNextButton/tests/DSPageNextButton.keyboard.test.d.ts +1 -0
- package/dist/types/parts/DSPageNextButton/tests/utils/NextButtonTestRender.d.ts +2 -0
- package/dist/types/parts/DSPageNextButton/typescript-testing/slot-props.d.ts +1 -0
- package/dist/types/parts/DSPageNextButton/typescript-testing/typescript-testing.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/DSPagePrevButton.d.ts +5 -0
- package/dist/types/parts/DSPagePrevButton/config/usePagePrevButton.d.ts +377 -0
- package/dist/types/parts/DSPagePrevButton/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPagePrevButton/constants/index.d.ts +9 -0
- package/dist/types/parts/DSPagePrevButton/index.d.ts +3 -0
- package/dist/types/parts/DSPagePrevButton/react-desc-prop-types.d.ts +23 -0
- package/dist/types/parts/DSPagePrevButton/tests/DSPagePrevButton.a11y.test.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/tests/DSPagePrevButton.callbacks.test.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/tests/DSPagePrevButton.data-testid.test.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/tests/DSPagePrevButton.export.test.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/tests/DSPagePrevButton.get-owner-props.test.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/tests/DSPagePrevButton.keyboard.test.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/tests/utils/PrevButtonTestRender.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/typescript-testing/slot-props.d.ts +1 -0
- package/dist/types/parts/DSPagePrevButton/typescript-testing/typescript-testing.d.ts +1 -0
- package/dist/types/parts/DSPaginationContainer/DSPaginationContainer.d.ts +5 -0
- package/dist/types/parts/DSPaginationContainer/config/usePaginationContainer.d.ts +377 -0
- package/dist/types/parts/DSPaginationContainer/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPaginationContainer/constants/index.d.ts +11 -0
- package/dist/types/parts/DSPaginationContainer/index.d.ts +3 -0
- package/dist/types/parts/DSPaginationContainer/react-desc-prop-types.d.ts +22 -0
- package/dist/types/parts/DSPaginationContainer/tests/DSPaginationContainer.data-testid.test.d.ts +1 -0
- package/dist/types/parts/DSPaginationContainer/tests/DSPaginationContainer.exports.test.d.ts +1 -0
- package/dist/types/parts/DSPaginationContainer/tests/DSPaginationContainer.get-owner-props.test.d.ts +1 -0
- package/dist/types/parts/DSPaginationContainer/tests/utils/PaginationContainerRender.d.ts +1 -0
- package/dist/types/parts/DSPaginationContainer/typescript-testing/slot-props.d.ts +1 -0
- package/dist/types/parts/DSPaginationSeparator/DSPaginationSeparator.d.ts +7 -0
- package/dist/types/parts/DSPaginationSeparator/config/usePaginationSeparator.d.ts +377 -0
- package/dist/types/parts/DSPaginationSeparator/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPaginationSeparator/constants/index.d.ts +9 -0
- package/dist/types/parts/DSPaginationSeparator/index.d.ts +3 -0
- package/dist/types/parts/DSPaginationSeparator/react-desc-prop-types.d.ts +18 -0
- package/dist/types/parts/DSPaginationSeparator/tests/DSPaginationSeparator.data-testid.test.d.ts +1 -0
- package/dist/types/parts/DSPaginationSeparator/tests/DSPaginationSeparator.exports.test.d.ts +1 -0
- package/dist/types/parts/DSPaginationSeparator/tests/DSPaginationSeparator.get-owner-props.test.d.ts +1 -0
- package/dist/types/parts/DSPaginationSeparator/tests/utils/DSPaginationSeparatorTestRender.d.ts +1 -0
- package/dist/types/parts/DSPaginator/DSPaginator.d.ts +5 -0
- package/dist/types/parts/DSPaginator/{createPaginatorHeader.d.ts → config/createPaginatorHeader.d.ts} +2 -1
- package/dist/types/parts/DSPaginator/config/usePaginator.d.ts +386 -0
- package/dist/types/parts/DSPaginator/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPaginator/constants/index.d.ts +9 -0
- package/dist/types/parts/DSPaginator/index.d.ts +3 -4
- package/dist/types/parts/DSPaginator/react-desc-prop-types.d.ts +27 -0
- package/dist/types/parts/DSPaginator/styled.d.ts +2 -0
- package/dist/types/parts/DSPaginator/tests/DSPaginator.a11y.test.d.ts +1 -0
- package/dist/types/parts/DSPaginator/tests/DSPaginator.data-testid.test.d.ts +1 -0
- package/dist/types/parts/DSPaginator/tests/DSPaginator.exports.test.d.ts +1 -0
- package/dist/types/parts/DSPaginator/tests/DSPaginator.get-owner-props.test.d.ts +1 -0
- package/dist/types/parts/DSPaginator/tests/DSPaginator.keyboard.test.d.ts +1 -0
- package/dist/types/parts/DSPaginator/tests/utils/DSPaginatorTestRender.d.ts +1 -0
- package/dist/types/parts/DSPaginator/typescript-testing/slot-props.d.ts +1 -0
- package/dist/types/parts/DSPaginator/typescript-testing/typescript-testing.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/DSPerPageSelector.d.ts +5 -0
- package/dist/types/parts/DSPerPageSelector/config/usePerPageSelector.d.ts +383 -0
- package/dist/types/parts/DSPerPageSelector/config/useValidateProps.d.ts +3 -0
- package/dist/types/parts/DSPerPageSelector/constants/index.d.ts +13 -0
- package/dist/types/parts/DSPerPageSelector/index.d.ts +3 -4
- package/dist/types/parts/DSPerPageSelector/react-desc-prop-types.d.ts +28 -0
- package/dist/types/parts/DSPerPageSelector/styled.d.ts +2 -0
- package/dist/types/parts/DSPerPageSelector/tests/DSPerPageSelector.a11y.test.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/tests/DSPerPageSelector.data-testid.test.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/tests/DSPerPageSelector.exports.test.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/tests/DSPerPageSelector.get-owner-props.test.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/tests/DSPerPageSelector.keyboard.test.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/tests/utils/PerPageSelectorTestRender.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/typescript-testing/slots-props.d.ts +1 -0
- package/dist/types/parts/DSPerPageSelector/typescript-testing/typescript-testing.d.ts +1 -0
- package/dist/types/parts/index.d.ts +6 -5
- package/dist/types/react-desc-prop-types.d.ts +9 -540
- package/dist/types/tests/DSPagination.data-testid.test.d.ts +1 -0
- package/dist/types/tests/DSPagination.exports.test.d.ts +1 -0
- package/dist/types/tests/DSPagination.get-owner-props.test.d.ts +1 -0
- package/package.json +15 -12
- package/dist/cjs/DSPaginationDefinitions.js.map +0 -7
- package/dist/cjs/Pagination.js.map +0 -7
- package/dist/cjs/PaginationDataTestID.js.map +0 -7
- package/dist/cjs/parts/DSPageNextButton.js.map +0 -7
- package/dist/cjs/parts/DSPagePrevButton.js.map +0 -7
- package/dist/cjs/parts/DSPaginationContainer.js.map +0 -7
- package/dist/cjs/parts/DSPaginator/createPaginatorHeader.js.map +0 -7
- package/dist/cjs/parts/DSPaginator/usePaginator.js.map +0 -7
- package/dist/cjs/parts/DSPerPageSelector/usePerPageSelector.js.map +0 -7
- package/dist/cjs/props.js +0 -85
- package/dist/cjs/props.js.map +0 -7
- package/dist/cjs/styled.js.map +0 -7
- package/dist/cjs/typescript-testing/typescript-page-next-button-valid.js.map +0 -7
- package/dist/cjs/typescript-testing/typescript-page-prev-button-valid.js.map +0 -7
- package/dist/cjs/typescript-testing/typescript-paginator-valid.js.map +0 -7
- package/dist/cjs/typescript-testing/typescript-per-page-selector-valid.js.map +0 -7
- package/dist/esm/DSPaginationDefinitions.js +0 -24
- package/dist/esm/DSPaginationDefinitions.js.map +0 -7
- package/dist/esm/Pagination.js.map +0 -7
- package/dist/esm/PaginationDataTestID.js +0 -14
- package/dist/esm/PaginationDataTestID.js.map +0 -7
- package/dist/esm/parts/DSPageNextButton.js +0 -47
- package/dist/esm/parts/DSPageNextButton.js.map +0 -7
- package/dist/esm/parts/DSPagePrevButton.js +0 -47
- package/dist/esm/parts/DSPagePrevButton.js.map +0 -7
- package/dist/esm/parts/DSPaginationContainer.js +0 -31
- package/dist/esm/parts/DSPaginationContainer.js.map +0 -7
- package/dist/esm/parts/DSPaginator/createPaginatorHeader.js.map +0 -7
- package/dist/esm/parts/DSPaginator/usePaginator.js.map +0 -7
- package/dist/esm/parts/DSPerPageSelector/usePerPageSelector.js +0 -40
- package/dist/esm/parts/DSPerPageSelector/usePerPageSelector.js.map +0 -7
- package/dist/esm/props.js +0 -55
- package/dist/esm/props.js.map +0 -7
- package/dist/esm/styled.js +0 -92
- package/dist/esm/styled.js.map +0 -7
- package/dist/esm/typescript-testing/typescript-page-next-button-valid.js.map +0 -7
- package/dist/esm/typescript-testing/typescript-page-prev-button-valid.js.map +0 -7
- package/dist/esm/typescript-testing/typescript-paginator-valid.js.map +0 -7
- package/dist/esm/typescript-testing/typescript-per-page-selector-valid.js.map +0 -7
- package/dist/types/DSPaginationDefinitions.d.ts +0 -12
- package/dist/types/PaginationDataTestID.d.ts +0 -9
- package/dist/types/parts/DSPageNextButton.d.ts +0 -4
- package/dist/types/parts/DSPagePrevButton.d.ts +0 -4
- package/dist/types/parts/DSPaginationContainer.d.ts +0 -4
- package/dist/types/parts/DSPaginator/usePaginator.d.ts +0 -381
- package/dist/types/parts/DSPerPageSelector/usePerPageSelector.d.ts +0 -377
- package/dist/types/props.d.ts +0 -20
- package/dist/types/styled.d.ts +0 -7
- /package/dist/cjs/parts/DSPaginator/{getOptions.js → config/getOptions.js} +0 -0
- /package/dist/cjs/parts/DSPaginator/{useOnElementOnResize.js → config/useOnElementOnResize.js} +0 -0
- /package/dist/cjs/parts/DSPaginator/{usePaginationSearch.js → config/usePaginationSearch.js} +0 -0
- /package/dist/cjs/parts/DSPerPageSelector/{getOptions.js → config/getOptions.js} +0 -0
- /package/dist/esm/parts/DSPaginator/{getOptions.js → config/getOptions.js} +0 -0
- /package/dist/esm/parts/DSPaginator/{useOnElementOnResize.js → config/useOnElementOnResize.js} +0 -0
- /package/dist/esm/parts/DSPaginator/{usePaginationSearch.js → config/usePaginationSearch.js} +0 -0
- /package/dist/esm/parts/DSPerPageSelector/{getOptions.js → config/getOptions.js} +0 -0
- /package/dist/types/{Pagination.d.ts → DSPagination.d.ts} +0 -0
- /package/dist/types/{typescript-testing/typescript-page-next-button-valid.d.ts → parts/DSPageNextButton/tests/DSPageNextButton.a11y.test.d.ts} +0 -0
- /package/dist/types/{typescript-testing/typescript-page-prev-button-valid.d.ts → parts/DSPageNextButton/tests/DSPageNextButton.callbacks.test.d.ts} +0 -0
- /package/dist/types/{typescript-testing/typescript-paginator-valid.d.ts → parts/DSPageNextButton/tests/DSPageNextButton.data-testid.test.d.ts} +0 -0
- /package/dist/types/{typescript-testing/typescript-per-page-selector-valid.d.ts → parts/DSPageNextButton/tests/DSPageNextButton.export.test.d.ts} +0 -0
- /package/dist/types/parts/DSPaginator/{getOptions.d.ts → config/getOptions.d.ts} +0 -0
- /package/dist/types/parts/DSPaginator/{useOnElementOnResize.d.ts → config/useOnElementOnResize.d.ts} +0 -0
- /package/dist/types/parts/DSPaginator/{usePaginationSearch.d.ts → config/usePaginationSearch.d.ts} +0 -0
- /package/dist/types/parts/DSPerPageSelector/{getOptions.d.ts → config/getOptions.d.ts} +0 -0
|
@@ -28,52 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var react_desc_prop_types_exports = {};
|
|
30
30
|
__export(react_desc_prop_types_exports, {
|
|
31
|
-
DSPageNextButtonPropTypes: () => DSPageNextButtonPropTypes,
|
|
32
|
-
DSPageNextButtonPropTypesSchema: () => DSPageNextButtonPropTypesSchema,
|
|
33
|
-
DSPagePrevButtonPropTypes: () => DSPagePrevButtonPropTypes,
|
|
34
|
-
DSPagePrevButtonPropTypesSchema: () => DSPagePrevButtonPropTypesSchema,
|
|
35
|
-
DSPaginationContainerPropTypes: () => DSPaginationContainerPropTypes,
|
|
36
|
-
DSPaginationContainerPropTypesSchema: () => DSPaginationContainerPropTypesSchema,
|
|
37
31
|
DSPaginationPropTypes: () => DSPaginationPropTypes,
|
|
38
32
|
DSPaginationPropTypesSchema: () => DSPaginationPropTypesSchema,
|
|
39
|
-
|
|
40
|
-
DSPaginationStyledPartPropTypesSchema: () => DSPaginationStyledPartPropTypesSchema,
|
|
41
|
-
DSPaginatorPropTypes: () => DSPaginatorPropTypes,
|
|
42
|
-
DSPaginatorPropTypesSchema: () => DSPaginatorPropTypesSchema,
|
|
43
|
-
DSPerPageSelectorPropTypes: () => DSPerPageSelectorPropTypes,
|
|
44
|
-
DSPerPageSelectorPropTypesSchema: () => DSPerPageSelectorPropTypesSchema,
|
|
45
|
-
defaultProps: () => defaultProps,
|
|
46
|
-
pageNextButtonDefaultProps: () => pageNextButtonDefaultProps,
|
|
47
|
-
pagePrevButtonDefaultProps: () => pagePrevButtonDefaultProps,
|
|
48
|
-
paginatorDefaultProps: () => paginatorDefaultProps,
|
|
49
|
-
perPageSelectorDefaultProps: () => perPageSelectorDefaultProps
|
|
33
|
+
defaultProps: () => defaultProps
|
|
50
34
|
});
|
|
51
35
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
52
36
|
var React = __toESM(require("react"));
|
|
53
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
54
|
-
const perPageSelectorDefaultProps = {
|
|
55
|
-
pageSize: 10,
|
|
56
|
-
onPageSizeChange: () => null,
|
|
57
|
-
perPageStep: 5,
|
|
58
|
-
minPerPage: 0,
|
|
59
|
-
maxPerPage: 100
|
|
60
|
-
};
|
|
61
|
-
const pagePrevButtonDefaultProps = {
|
|
62
|
-
canPreviousPage: true,
|
|
63
|
-
onPreviousPage: () => null
|
|
64
|
-
};
|
|
65
|
-
const pageNextButtonDefaultProps = {
|
|
66
|
-
canNextPage: true,
|
|
67
|
-
onNextPage: () => null
|
|
68
|
-
};
|
|
69
|
-
const paginatorDefaultProps = {
|
|
70
|
-
pageCount: 0,
|
|
71
|
-
isLoadingPageCount: false,
|
|
72
|
-
pageIndex: 1,
|
|
73
|
-
onPageChange: () => null,
|
|
74
|
-
pageDetails: [],
|
|
75
|
-
pageDetailsTitle: ""
|
|
76
|
-
};
|
|
77
38
|
const defaultProps = {
|
|
78
39
|
pageCount: 0,
|
|
79
40
|
pageIndex: 1,
|
|
@@ -116,50 +77,4 @@ const DSPaginationPropTypes = {
|
|
|
116
77
|
isLoadingPageCount: import_ds_props_helpers.PropTypes.bool.description("Whether the page count is loading or not").defaultValue(false)
|
|
117
78
|
};
|
|
118
79
|
const DSPaginationPropTypesSchema = DSPaginationPropTypes;
|
|
119
|
-
const DSPerPageSelectorPropTypes = {
|
|
120
|
-
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
121
|
-
...import_ds_props_helpers.xstyledPropTypes,
|
|
122
|
-
pageSize: import_ds_props_helpers.PropTypes.number.description("The current page size").defaultValue(10),
|
|
123
|
-
onPageSizeChange: import_ds_props_helpers.PropTypes.func.description("Function invoked when the page size changes").defaultValue(() => null),
|
|
124
|
-
perPageOptions: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.object])).description("The available options for page size").defaultValue([10]),
|
|
125
|
-
minPerPage: import_ds_props_helpers.PropTypes.number.description("Min for the per page options").defaultValue(0),
|
|
126
|
-
maxPerPage: import_ds_props_helpers.PropTypes.number.description("Max for the per page options").defaultValue(100),
|
|
127
|
-
perPageStep: import_ds_props_helpers.PropTypes.number.description("Step for the per page options").defaultValue(5)
|
|
128
|
-
};
|
|
129
|
-
const DSPerPageSelectorPropTypesSchema = DSPerPageSelectorPropTypes;
|
|
130
|
-
const DSPagePrevButtonPropTypes = {
|
|
131
|
-
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
132
|
-
...import_ds_props_helpers.xstyledPropTypes,
|
|
133
|
-
canPreviousPage: import_ds_props_helpers.PropTypes.bool.description("Whether the previous button is disabled or not").defaultValue(true),
|
|
134
|
-
onPreviousPage: import_ds_props_helpers.PropTypes.func.description("Function invoked when the previous button is pressed").defaultValue(() => null)
|
|
135
|
-
};
|
|
136
|
-
const DSPagePrevButtonPropTypesSchema = DSPagePrevButtonPropTypes;
|
|
137
|
-
const DSPageNextButtonPropTypes = {
|
|
138
|
-
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
139
|
-
...import_ds_props_helpers.xstyledPropTypes,
|
|
140
|
-
canNextPage: import_ds_props_helpers.PropTypes.bool.description("Whether the next button is disabled or not").defaultValue(true),
|
|
141
|
-
onNextPage: import_ds_props_helpers.PropTypes.func.description("Function invoked when next button is pressed").defaultValue(() => null)
|
|
142
|
-
};
|
|
143
|
-
const DSPageNextButtonPropTypesSchema = DSPageNextButtonPropTypes;
|
|
144
|
-
const DSPaginatorPropTypes = {
|
|
145
|
-
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
146
|
-
...import_ds_props_helpers.xstyledPropTypes,
|
|
147
|
-
pageIndex: import_ds_props_helpers.PropTypes.number.description("Index of the current page, starting from 1").defaultValue(1),
|
|
148
|
-
pageCount: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("How many pages are there"),
|
|
149
|
-
onPageChange: import_ds_props_helpers.PropTypes.func.description("Function invoked when the page changes").defaultValue(() => null),
|
|
150
|
-
isLoadingPageCount: import_ds_props_helpers.PropTypes.bool.description("Whether the page count is loading or not").defaultValue(false),
|
|
151
|
-
pageDetails: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.string).description("Details to provide for each page").defaultValue([]),
|
|
152
|
-
pageDetailsTitle: import_ds_props_helpers.PropTypes.string.description("The title of the details (usually a column of your dataset)").defaultValue("")
|
|
153
|
-
};
|
|
154
|
-
const DSPaginatorPropTypesSchema = DSPaginatorPropTypes;
|
|
155
|
-
const DSPaginationContainerPropTypes = {
|
|
156
|
-
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
157
|
-
...import_ds_props_helpers.xstyledPropTypes
|
|
158
|
-
};
|
|
159
|
-
const DSPaginationContainerPropTypesSchema = DSPaginationContainerPropTypes;
|
|
160
|
-
const DSPaginationStyledPartPropTypes = {
|
|
161
|
-
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
162
|
-
...import_ds_props_helpers.xstyledPropTypes
|
|
163
|
-
};
|
|
164
|
-
const DSPaginationStyledPartPropTypesSchema = DSPaginationStyledPartPropTypes;
|
|
165
80
|
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\nexport namespace DSPaginationT {\n type PropsT<D, R, O, E> = Partial<D> & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n type InternalPropsT<D, R, O, E> = D & R & O & Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> & XstyledProps;\n\n export interface PerPageSelectorDefaultProps {\n pageSize: number;\n onPageSizeChange: (pageSize: number) => void;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n }\n export interface PerPageSelectorOptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface PerPageSelectorRequiredProps {}\n\n export type PerPageSelectorProps = PropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export type PerPageSelectorInternalProps = InternalPropsT<\n PerPageSelectorDefaultProps,\n PerPageSelectorRequiredProps,\n PerPageSelectorOptionalProps,\n HTMLDivElement\n >;\n\n export interface PagePrevButtonDefaultProps {\n canPreviousPage: boolean;\n onPreviousPage: () => void;\n }\n export interface PagePrevButtonOptionalProps {}\n export interface PagePrevButtonRequiredProps {}\n\n export type PagePrevButtonProps = PropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PagePrevButtonInternalProps = InternalPropsT<\n PagePrevButtonDefaultProps,\n PagePrevButtonRequiredProps,\n PagePrevButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PageNextButtonDefaultProps {\n canNextPage: boolean;\n onNextPage: () => void;\n }\n export interface PageNextButtonOptionalProps {}\n export interface PageNextButtonRequiredProps {}\n\n export type PageNextButtonProps = PropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export type PageNextButtonInternalProps = InternalPropsT<\n PageNextButtonDefaultProps,\n PageNextButtonRequiredProps,\n PageNextButtonOptionalProps,\n HTMLButtonElement\n >;\n\n export interface PaginatorDefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n onPageChange: (page: number) => void;\n pageDetails: string[] | readonly string[];\n pageDetailsTitle: string;\n }\n export interface PaginatorOptionalProps {}\n export interface PaginatorRequiredProps {}\n\n export type PaginatorProps = PropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export type PaginatorInternalProps = InternalPropsT<\n PaginatorDefaultProps,\n PaginatorRequiredProps,\n PaginatorOptionalProps,\n HTMLDivElement\n >;\n\n export interface ContainerDefaultProps {}\n export interface ContainerOptionalProps {}\n export interface ContainerRequiredProps {\n children: React.ReactNode;\n }\n\n export type ContainerProps = PropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n export type ContainerInternalProps = InternalPropsT<\n ContainerDefaultProps,\n ContainerRequiredProps,\n ContainerOptionalProps,\n HTMLDivElement\n >;\n\n // LEGACY WAY OF USING THE PAGINATION COMPONENT\n export interface DefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n canPreviousPage: boolean;\n canNextPage: boolean;\n pageSize: number;\n showPerPageSelector: boolean;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n onPageSizeChange: (pageSize: number) => void;\n onPreviousPage: () => void;\n onNextPage: () => void;\n onPageChange: (page: number) => void;\n pageDetails: string[] | readonly string[];\n pageDetailsTitle: string;\n width: string | number;\n }\n export interface OptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface RequiredProps {}\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n}\n\nexport const perPageSelectorDefaultProps: DSPaginationT.PerPageSelectorDefaultProps = {\n pageSize: 10,\n onPageSizeChange: () => null,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n};\n\nexport const pagePrevButtonDefaultProps: DSPaginationT.PagePrevButtonDefaultProps = {\n canPreviousPage: true,\n onPreviousPage: () => null,\n};\n\nexport const pageNextButtonDefaultProps: DSPaginationT.PageNextButtonDefaultProps = {\n canNextPage: true,\n onNextPage: () => null,\n};\n\nexport const paginatorDefaultProps: DSPaginationT.PaginatorDefaultProps = {\n pageCount: 0,\n isLoadingPageCount: false,\n pageIndex: 1,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n};\n\nexport const defaultProps: DSPaginationT.DefaultProps = {\n pageCount: 0,\n pageIndex: 1,\n isLoadingPageCount: false,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: () => null,\n onPreviousPage: () => null,\n onNextPage: () => null,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n\nexport const DSPaginationPropTypes: DSPropTypesSchema<DSPaginationT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n};\n\nexport const DSPaginationPropTypesSchema = DSPaginationPropTypes as unknown as WeakValidationMap<DSPaginationT.Props>;\n\nexport const DSPerPageSelectorPropTypes: DSPropTypesSchema<DSPaginationT.PerPageSelectorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n};\n\nexport const DSPerPageSelectorPropTypesSchema =\n DSPerPageSelectorPropTypes as unknown as WeakValidationMap<DSPaginationT.PerPageSelectorProps>;\n\nexport const DSPagePrevButtonPropTypes: DSPropTypesSchema<DSPaginationT.PagePrevButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n};\n\nexport const DSPagePrevButtonPropTypesSchema =\n DSPagePrevButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PagePrevButtonProps>;\n\nexport const DSPageNextButtonPropTypes: DSPropTypesSchema<DSPaginationT.PageNextButtonProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n};\n\nexport const DSPageNextButtonPropTypesSchema =\n DSPageNextButtonPropTypes as unknown as WeakValidationMap<DSPaginationT.PageNextButtonProps>;\n\nexport const DSPaginatorPropTypes: DSPropTypesSchema<DSPaginationT.PaginatorProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n};\n\nexport const DSPaginatorPropTypesSchema =\n DSPaginatorPropTypes as unknown as WeakValidationMap<DSPaginationT.PaginatorProps>;\n\nexport const DSPaginationContainerPropTypes: DSPropTypesSchema<DSPaginationT.ContainerProps> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationContainerPropTypesSchema =\n DSPaginationContainerPropTypes as unknown as WeakValidationMap<DSPaginationT.ContainerProps>;\n\nexport const DSPaginationStyledPartPropTypes = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationStyledPartPropTypesSchema =\n DSPaginationStyledPartPropTypes as unknown as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\n\nexport namespace DSPaginationT {\n // LEGACY WAY OF USING THE PAGINATION COMPONENT\n export interface DefaultProps {\n pageCount: number | string;\n isLoadingPageCount: boolean;\n pageIndex: number;\n canPreviousPage: boolean;\n canNextPage: boolean;\n pageSize: number;\n showPerPageSelector: boolean;\n perPageStep: number;\n minPerPage: number;\n maxPerPage: number;\n onPageSizeChange: (pageSize: number) => void;\n onPreviousPage: () => void;\n onNextPage: () => void;\n onPageChange: (page: number) => void;\n pageDetails: string[] | readonly string[];\n pageDetailsTitle: string;\n width: string | number;\n }\n export interface OptionalProps {\n perPageOptions?: (number | DSDropdownMenuT.ItemSingleOptions)[];\n }\n export interface RequiredProps {}\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPaginationT.DefaultProps = {\n pageCount: 0,\n pageIndex: 1,\n isLoadingPageCount: false,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: () => null,\n onPreviousPage: () => null,\n onNextPage: () => null,\n onPageChange: () => null,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n\nexport const DSPaginationPropTypes: DSPropTypesSchema<DSPaginationT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n pageCount: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('How many pages are there'),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.object]))\n .description('The available options for page size')\n .defaultValue([10]),\n minPerPage: PropTypes.number.description('Min for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Max for the per page options').defaultValue(100),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n isLoadingPageCount: PropTypes.bool.description('Whether the page count is loading or not').defaultValue(false),\n};\n\nexport const DSPaginationPropTypesSchema = DSPaginationPropTypes as unknown as ValidationMap<DSPaginationT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAuE;AA6ChE,MAAM,eAA2C;AAAA,EACtD,WAAW;AAAA,EACX,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,kBAAkB,MAAM;AAAA,EACxB,gBAAgB,MAAM;AAAA,EACtB,YAAY,MAAM;AAAA,EAClB,cAAc,MAAM;AAAA,EACpB,aAAa,CAAC;AAAA,EACd,kBAAkB;AAAA,EAClB,OAAO;AACT;AAEO,MAAM,wBAAgE;AAAA,EAC3E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,WAAW,kCAAU,OAAO,YAAY,4CAA4C,EAAE,aAAa,CAAC;AAAA,EACpG,WAAW,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,0BAA0B;AAAA,EAC3G,UAAU,kCAAU,OAAO,YAAY,uBAAuB,EAAE,aAAa,EAAE;AAAA,EAC/E,iBAAiB,kCAAU,KAAK,YAAY,gDAAgD,EAAE,aAAa,IAAI;AAAA,EAC/G,aAAa,kCAAU,KAAK,YAAY,4CAA4C,EAAE,aAAa,IAAI;AAAA,EACvG,gBAAgB,kCAAU,KACvB,YAAY,sDAAsD,EAClE,aAAa,MAAM,IAAI;AAAA,EAC1B,cAAc,kCAAU,KAAK,YAAY,wCAAwC,EAAE,aAAa,MAAM,IAAI;AAAA,EAC1G,YAAY,kCAAU,KAAK,YAAY,8CAA8C,EAAE,aAAa,MAAM,IAAI;AAAA,EAC9G,qBAAqB,kCAAU,KAAK,YAAY,mCAAmC,EAAE,aAAa,IAAI;AAAA,EACtG,gBAAgB,kCAAU,QAAQ,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,CAAC,EACxF,YAAY,qCAAqC,EACjD,aAAa,CAAC,EAAE,CAAC;AAAA,EACpB,YAAY,kCAAU,OAAO,YAAY,8BAA8B,EAAE,aAAa,CAAC;AAAA,EACvF,YAAY,kCAAU,OAAO,YAAY,8BAA8B,EAAE,aAAa,GAAG;AAAA,EACzF,aAAa,kCAAU,OAAO,YAAY,+BAA+B,EAAE,aAAa,CAAC;AAAA,EACzF,kBAAkB,kCAAU,KAAK,YAAY,6CAA6C,EAAE,aAAa,MAAM,IAAI;AAAA,EACnH,aAAa,kCAAU,QAAQ,kCAAU,MAAM,EAAE,YAAY,kCAAkC,EAAE,aAAa,CAAC,CAAC;AAAA,EAChH,kBAAkB,kCAAU,OACzB,YAAY,6DAA6D,EACzE,aAAa,EAAE;AAAA,EAClB,OAAO,kCAAU,IAAI,YAAY,2CAA2C,EAAE,aAAa,MAAM;AAAA,EACjG,oBAAoB,kCAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,KAAK;AAC/G;AAEO,MAAM,8BAA8B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { describe
|
|
3
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
|
+
import { usePagination } from "./config/usePagination.js";
|
|
5
|
+
import { DSPaginationName } from "./constants/index.js";
|
|
4
6
|
import { PaginationContent } from "./parts/PaginationContent.js";
|
|
5
|
-
import {
|
|
6
|
-
import { defaultProps, DSPaginationPropTypesSchema } from "./react-desc-prop-types.js";
|
|
7
|
+
import { DSPaginationPropTypesSchema } from "./react-desc-prop-types.js";
|
|
7
8
|
const DSPagination = (props) => {
|
|
8
|
-
const propsWithDefault =
|
|
9
|
-
useValidateTypescriptPropTypes(propsWithDefault, DSPaginationPropTypesSchema, DSPaginationName);
|
|
9
|
+
const { propsWithDefault } = usePagination(props);
|
|
10
10
|
return /* @__PURE__ */ jsx(PaginationContent, { ...propsWithDefault });
|
|
11
11
|
};
|
|
12
12
|
DSPagination.displayName = DSPaginationName;
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
DSPagination,
|
|
17
17
|
DSPaginationWithSchema
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=DSPagination.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSPagination.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { usePagination } from './config/usePagination.js';\nimport { DSPaginationName } from './constants/index.js';\nimport { PaginationContent } from './parts/PaginationContent.js';\nimport type { DSPaginationT } from './react-desc-prop-types.js';\nimport { DSPaginationPropTypesSchema } from './react-desc-prop-types.js';\n\nconst DSPagination: React.ComponentType<DSPaginationT.Props> = (props) => {\n const { propsWithDefault } = usePagination(props);\n return <PaginationContent {...propsWithDefault} />;\n};\n\nDSPagination.displayName = DSPaginationName;\nconst DSPaginationWithSchema = describe(DSPagination).description('DSPagination');\nDSPaginationWithSchema.propTypes = DSPaginationPropTypesSchema;\n\nexport { DSPagination, DSPaginationWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUd;AATT,SAAS,gBAAgB;AACzB,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAElC,SAAS,mCAAmC;AAE5C,MAAM,eAAyD,CAAC,UAAU;AACxE,QAAM,EAAE,iBAAiB,IAAI,cAAc,KAAK;AAChD,SAAO,oBAAC,qBAAmB,GAAG,kBAAkB;AAClD;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY,EAAE,YAAY,cAAc;AAChF,uBAAuB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { useGetXstyledProps, useMemoMergePropsWithDefault } from "@elliemae/ds-props-helpers";
|
|
4
|
+
import { DSPaginationPropTypes, defaultProps } from "../react-desc-prop-types.js";
|
|
5
|
+
import { useValidateProps } from "./useValidateProps.js";
|
|
6
|
+
const usePagination = (propsFromUser) => {
|
|
7
|
+
const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
|
|
8
|
+
useValidateProps(propsWithDefault, DSPaginationPropTypes);
|
|
9
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
10
|
+
return React2.useMemo(
|
|
11
|
+
() => ({
|
|
12
|
+
propsWithDefault,
|
|
13
|
+
xstyledProps
|
|
14
|
+
}),
|
|
15
|
+
[propsWithDefault, xstyledProps]
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
usePagination
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=usePagination.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/usePagination.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\n\nimport { type DSPaginationT, DSPaginationPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const usePagination = (propsFromUser: DSPaginationT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSPaginationT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSPaginationPropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n // const instanceUid = React.useMemo(() => `ds-pagination-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n }),\n [propsWithDefault, xstyledProps],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,oBAAoB,oCAAoC;AAEjE,SAA6B,uBAAuB,oBAAoB;AACxE,SAAS,wBAAwB;AAE1B,MAAM,gBAAgB,CAAC,kBAAuC;AAInE,QAAM,mBAAmB,6BAA0D,eAAe,YAAY;AAC9G,mBAAiB,kBAAkB,qBAAqB;AAIxD,QAAM,eAAe,mBAAmB,gBAAgB;AAWxD,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,YAAY;AAAA,EACjC;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { DSPaginationName } from "../constants/index.js";
|
|
4
|
+
const useValidateProps = (props, propTypes) => {
|
|
5
|
+
useValidateTypescriptPropTypes(props, propTypes, DSPaginationName);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
useValidateProps
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSPaginationT } from '../react-desc-prop-types.js';\nimport { DSPaginationName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSPaginationT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSPaginationName);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,wBAAwB;AAE1B,MAAM,mBAAmB,CAAC,OAAoC,cAA4C;AAE/G,iCAA+B,OAAO,WAAW,gBAAgB;AACnE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
const DSPaginationName = "DSPagination";
|
|
4
|
+
const PAGINATION_SLOTS = {
|
|
5
|
+
ROOT: "root",
|
|
6
|
+
WRAPPER: "wrapper",
|
|
7
|
+
SEPARATOR: "separator",
|
|
8
|
+
PAGINATOR: "paginator",
|
|
9
|
+
PER_PAGE_SELECTOR: "per-page-selector",
|
|
10
|
+
PREVIOUS_BUTTON: "previous-button",
|
|
11
|
+
NEXT_BUTTON: "next-button"
|
|
12
|
+
};
|
|
13
|
+
const PaginationSlots = PAGINATION_SLOTS;
|
|
14
|
+
const PAGINATION_DATA_TESTID = {
|
|
15
|
+
...slotObjectToDataTestIds(DSPaginationName, PaginationSlots),
|
|
16
|
+
PREVIOUS_BUTTON: "data-table-pagination-prev-button",
|
|
17
|
+
NEXT_BUTTON: "data-table-pagination-next-button",
|
|
18
|
+
ROOT: "data-table-pagination-container",
|
|
19
|
+
CONTAINER: "data-table-pagination-container"
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
DSPaginationName,
|
|
23
|
+
PAGINATION_DATA_TESTID,
|
|
24
|
+
PAGINATION_SLOTS,
|
|
25
|
+
PaginationSlots
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSPaginationName = 'DSPagination';\n\n// NEW Convention for Slots\nexport const PAGINATION_SLOTS = {\n ROOT: 'root',\n WRAPPER: 'wrapper',\n SEPARATOR: 'separator',\n PAGINATOR: 'paginator',\n PER_PAGE_SELECTOR: 'per-page-selector',\n PREVIOUS_BUTTON: 'previous-button',\n NEXT_BUTTON: 'next-button',\n};\n// Legacy export for backwards compatibility\nexport const PaginationSlots = PAGINATION_SLOTS;\n\nexport const PAGINATION_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSPaginationName, PaginationSlots),\n PREVIOUS_BUTTON: 'data-table-pagination-prev-button',\n NEXT_BUTTON: 'data-table-pagination-next-button',\n ROOT: 'data-table-pagination-container',\n CONTAINER: 'data-table-pagination-container',\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,mBAAmB;AAGzB,MAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,aAAa;AACf;AAEO,MAAM,kBAAkB;AAExB,MAAM,yBAAyB;AAAA,EACpC,GAAG,wBAAwB,kBAAkB,eAAe;AAAA,EAC5D,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,WAAW;AACb;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,44 +1,76 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DSPaginationStyledPartPropTypesSchema } from "./react-desc-prop-types.js";
|
|
5
|
-
import { PaginationSeparatorName } from "./DSPaginationDefinitions.js";
|
|
6
|
-
DSPaginationSeparator.propTypes = DSPaginationStyledPartPropTypesSchema;
|
|
7
|
-
DSPaginationSeparator.displayName = PaginationSeparatorName;
|
|
8
|
-
const DSPaginationSeparatorWithSchema = describe(DSPaginationSeparator).description("Pagination Separator");
|
|
9
|
-
import { DSPagination, DSPaginationWithSchema } from "./Pagination.js";
|
|
2
|
+
import { DSPagination, DSPaginationWithSchema } from "./DSPagination.js";
|
|
3
|
+
import { DSPaginationName, PaginationSlots, PAGINATION_DATA_TESTID, PAGINATION_SLOTS } from "./constants/index.js";
|
|
10
4
|
import {
|
|
11
5
|
DSPageNextButton,
|
|
12
6
|
DSPageNextButtonWithSchema,
|
|
7
|
+
DSPageNextButtonName,
|
|
8
|
+
PAGE_NEXT_BUTTON_DATA_TESTID,
|
|
9
|
+
PAGE_NEXT_BUTTON_SLOTS,
|
|
13
10
|
DSPagePrevButton,
|
|
14
11
|
DSPagePrevButtonWithSchema,
|
|
12
|
+
DSPagePrevButtonName,
|
|
13
|
+
PAGE_PREV_BUTTON_DATA_TESTID,
|
|
14
|
+
PAGE_PREV_BUTTON_SLOTS,
|
|
15
15
|
DSPaginationContainer,
|
|
16
16
|
DSPaginationContainerWithSchema,
|
|
17
|
+
DSPaginationContainerName,
|
|
18
|
+
PAGINATION_CONTAINER_DATA_TESTID,
|
|
19
|
+
PAGINATION_CONTAINER_SLOTS,
|
|
17
20
|
DSPerPageSelector,
|
|
18
21
|
DSPerPageSelectorWithSchema,
|
|
22
|
+
DSPerPageSelectorName,
|
|
23
|
+
PER_PAGE_SELECTOR_DATA_TESTID,
|
|
24
|
+
PER_PAGE_SELECTOR_SLOTS,
|
|
19
25
|
DSPaginator,
|
|
20
|
-
DSPaginatorWithSchema
|
|
26
|
+
DSPaginatorWithSchema,
|
|
27
|
+
DSPaginatorName,
|
|
28
|
+
PAGINATOR_DATA_TESTID,
|
|
29
|
+
PAGINATOR_SLOTS,
|
|
30
|
+
DSPaginationSeparator,
|
|
31
|
+
DSPaginationSeparatorWithSchema,
|
|
32
|
+
DSPaginationSeparatorName,
|
|
33
|
+
DSPaginationSeparatorName as DSPaginationSeparatorName2,
|
|
34
|
+
PAGINATION_SEPARATOR_DATA_TESTID,
|
|
35
|
+
PAGINATION_SEPARATOR_SLOTS
|
|
21
36
|
} from "./parts/index.js";
|
|
22
|
-
import { DSPaginationSeparator as DSPaginationSeparator2 } from "./styled.js";
|
|
23
|
-
import { DSPaginationName, PaginationSlots } from "./DSPaginationDefinitions.js";
|
|
24
|
-
import { PAGINATION_DATA_TESTID } from "./PaginationDataTestID.js";
|
|
25
37
|
export {
|
|
26
38
|
DSPageNextButton,
|
|
39
|
+
DSPageNextButtonName,
|
|
27
40
|
DSPageNextButtonWithSchema,
|
|
28
41
|
DSPagePrevButton,
|
|
42
|
+
DSPagePrevButtonName,
|
|
29
43
|
DSPagePrevButtonWithSchema,
|
|
30
44
|
DSPagination,
|
|
31
45
|
DSPaginationContainer,
|
|
46
|
+
DSPaginationContainerName,
|
|
32
47
|
DSPaginationContainerWithSchema,
|
|
33
48
|
DSPaginationName,
|
|
34
|
-
|
|
49
|
+
DSPaginationSeparator,
|
|
50
|
+
DSPaginationSeparatorName,
|
|
35
51
|
DSPaginationSeparatorWithSchema,
|
|
36
52
|
DSPaginationWithSchema,
|
|
37
53
|
DSPaginator,
|
|
54
|
+
DSPaginatorName,
|
|
38
55
|
DSPaginatorWithSchema,
|
|
39
56
|
DSPerPageSelector,
|
|
57
|
+
DSPerPageSelectorName,
|
|
40
58
|
DSPerPageSelectorWithSchema,
|
|
59
|
+
PAGE_NEXT_BUTTON_DATA_TESTID,
|
|
60
|
+
PAGE_NEXT_BUTTON_SLOTS,
|
|
61
|
+
PAGE_PREV_BUTTON_DATA_TESTID,
|
|
62
|
+
PAGE_PREV_BUTTON_SLOTS,
|
|
63
|
+
PAGINATION_CONTAINER_DATA_TESTID,
|
|
64
|
+
PAGINATION_CONTAINER_SLOTS,
|
|
41
65
|
PAGINATION_DATA_TESTID,
|
|
66
|
+
PAGINATION_SEPARATOR_DATA_TESTID,
|
|
67
|
+
PAGINATION_SEPARATOR_SLOTS,
|
|
68
|
+
PAGINATION_SLOTS,
|
|
69
|
+
PAGINATOR_DATA_TESTID,
|
|
70
|
+
PAGINATOR_SLOTS,
|
|
71
|
+
PER_PAGE_SELECTOR_DATA_TESTID,
|
|
72
|
+
PER_PAGE_SELECTOR_SLOTS,
|
|
73
|
+
DSPaginationSeparatorName2 as PaginationSeparatorName,
|
|
42
74
|
PaginationSlots
|
|
43
75
|
};
|
|
44
76
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@xstyled/system';\nexport { DSPagination, DSPaginationWithSchema } from './DSPagination.js';\nexport { DSPaginationName, PaginationSlots, PAGINATION_DATA_TESTID, PAGINATION_SLOTS } from './constants/index.js';\nexport type { DSPaginationT } from './react-desc-prop-types.js';\n\nexport {\n DSPageNextButton,\n DSPageNextButtonWithSchema,\n DSPageNextButtonName,\n PAGE_NEXT_BUTTON_DATA_TESTID,\n PAGE_NEXT_BUTTON_SLOTS,\n type DSPageNextButtonT,\n DSPagePrevButton,\n DSPagePrevButtonWithSchema,\n DSPagePrevButtonName,\n PAGE_PREV_BUTTON_DATA_TESTID,\n PAGE_PREV_BUTTON_SLOTS,\n type DSPagePrevButtonT,\n DSPaginationContainer,\n DSPaginationContainerWithSchema,\n DSPaginationContainerName,\n PAGINATION_CONTAINER_DATA_TESTID,\n PAGINATION_CONTAINER_SLOTS,\n type DSPaginationContainerT,\n DSPerPageSelector,\n DSPerPageSelectorWithSchema,\n DSPerPageSelectorName,\n PER_PAGE_SELECTOR_DATA_TESTID,\n PER_PAGE_SELECTOR_SLOTS,\n type DSPerPageSelectorT,\n DSPaginator,\n DSPaginatorWithSchema,\n DSPaginatorName,\n PAGINATOR_DATA_TESTID,\n PAGINATOR_SLOTS,\n type DSPaginatorT,\n DSPaginationSeparator,\n DSPaginationSeparatorWithSchema,\n DSPaginationSeparatorName,\n DSPaginationSeparatorName as PaginationSeparatorName,\n PAGINATION_SEPARATOR_DATA_TESTID,\n PAGINATION_SEPARATOR_SLOTS,\n type DSPaginationSeparatorT,\n} from './parts/index.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,cAAc,8BAA8B;AACrD,SAAS,kBAAkB,iBAAiB,wBAAwB,wBAAwB;AAG5F;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EAC6B,6BAA7BA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;",
|
|
6
|
+
"names": ["DSPaginationSeparatorName"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
|
+
import { styled } from "@elliemae/ds-system";
|
|
5
|
+
import { DSButtonV3 } from "@elliemae/ds-button-v2";
|
|
6
|
+
import { ChevronRight } from "@elliemae/ds-icons";
|
|
7
|
+
import { usePageNextButton } from "./config/usePageNextButton.js";
|
|
8
|
+
import {
|
|
9
|
+
DSPageNextButtonName,
|
|
10
|
+
DSPaginationName,
|
|
11
|
+
PAGE_NEXT_BUTTON_DATA_TESTID,
|
|
12
|
+
PAGE_NEXT_BUTTON_SLOTS
|
|
13
|
+
} from "./constants/index.js";
|
|
14
|
+
import { DSPageNextButtonPropTypesSchema } from "./react-desc-prop-types.js";
|
|
15
|
+
const NextPageButton = styled(DSButtonV3, {
|
|
16
|
+
name: DSPaginationName,
|
|
17
|
+
slot: PAGE_NEXT_BUTTON_SLOTS.PAGE_NEXT_BUTTON,
|
|
18
|
+
preserveLegacyDataTestId: true
|
|
19
|
+
})`
|
|
20
|
+
height: 42px;
|
|
21
|
+
display: grid;
|
|
22
|
+
place-items: center;
|
|
23
|
+
position: relative;
|
|
24
|
+
padding-left: 8px;
|
|
25
|
+
padding-right: 8px;
|
|
26
|
+
border-radius: 0;
|
|
27
|
+
:focus {
|
|
28
|
+
&:after {
|
|
29
|
+
display: block;
|
|
30
|
+
content: ' ';
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
left: 0;
|
|
34
|
+
right: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
border: 2px solid ${({ theme }) => theme.colors.brand[700]};
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
z-index: 7;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
42
|
+
`;
|
|
43
|
+
const DSPageNextButton = (props) => {
|
|
44
|
+
const {
|
|
45
|
+
propsWithDefault: { canNextPage, onNextPage },
|
|
46
|
+
xstyledProps,
|
|
47
|
+
globalAttributes,
|
|
48
|
+
ownerPropsConfig
|
|
49
|
+
} = usePageNextButton(props);
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
NextPageButton,
|
|
52
|
+
{
|
|
53
|
+
disabled: !canNextPage,
|
|
54
|
+
buttonType: "raw",
|
|
55
|
+
"data-testid": PAGE_NEXT_BUTTON_DATA_TESTID.PAGE_NEXT_BUTTON,
|
|
56
|
+
"aria-label": "Go to next page",
|
|
57
|
+
...globalAttributes,
|
|
58
|
+
...xstyledProps,
|
|
59
|
+
...ownerPropsConfig,
|
|
60
|
+
onClick: () => {
|
|
61
|
+
if (canNextPage) onNextPage();
|
|
62
|
+
},
|
|
63
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"] })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
DSPageNextButton.displayName = DSPageNextButtonName;
|
|
68
|
+
const DSPageNextButtonWithSchema = describe(DSPageNextButton);
|
|
69
|
+
DSPageNextButtonWithSchema.propTypes = DSPageNextButtonPropTypesSchema;
|
|
70
|
+
export {
|
|
71
|
+
DSPageNextButton,
|
|
72
|
+
DSPageNextButtonWithSchema
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=DSPageNextButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSPageNextButton/DSPageNextButton.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport React from 'react';\n\nimport { DSButtonV3 } from '@elliemae/ds-button-v2';\nimport { ChevronRight } from '@elliemae/ds-icons';\nimport { usePageNextButton } from './config/usePageNextButton.js';\nimport {\n DSPageNextButtonName,\n DSPaginationName,\n PAGE_NEXT_BUTTON_DATA_TESTID,\n PAGE_NEXT_BUTTON_SLOTS,\n} from './constants/index.js';\nimport { type DSPageNextButtonT, DSPageNextButtonPropTypesSchema } from './react-desc-prop-types.js';\n\nconst NextPageButton = styled(DSButtonV3, {\n name: DSPaginationName,\n slot: PAGE_NEXT_BUTTON_SLOTS.PAGE_NEXT_BUTTON,\n preserveLegacyDataTestId: true,\n})`\n height: 42px;\n display: grid;\n place-items: center;\n position: relative;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 0;\n :focus {\n &:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n }\n }\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n`;\n\nconst DSPageNextButton: React.ComponentType<DSPageNextButtonT.Props> = (props) => {\n const {\n propsWithDefault: { canNextPage, onNextPage },\n xstyledProps,\n globalAttributes,\n ownerPropsConfig,\n } = usePageNextButton(props);\n\n return (\n <NextPageButton\n disabled={!canNextPage}\n buttonType=\"raw\"\n data-testid={PAGE_NEXT_BUTTON_DATA_TESTID.PAGE_NEXT_BUTTON}\n aria-label=\"Go to next page\"\n {...globalAttributes}\n {...xstyledProps}\n {...ownerPropsConfig}\n onClick={() => {\n if (canNextPage) onNextPage();\n }}\n >\n <ChevronRight color={canNextPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </NextPageButton>\n );\n};\n\nDSPageNextButton.displayName = DSPageNextButtonName;\nconst DSPageNextButtonWithSchema = describe(DSPageNextButton);\nDSPageNextButtonWithSchema.propTypes = DSPageNextButtonPropTypesSchema;\n\nexport { DSPageNextButton, DSPageNextButtonWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiEjB;AAjEN,SAAS,gBAAgB;AACzB,SAAS,cAAc;AAGvB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAiC,uCAAuC;AAExE,MAAM,iBAAiB,OAAO,YAAY;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,uBAAuB;AAAA,EAC7B,0BAA0B;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAiByB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAKpD,CAAC,UAAW,MAAM,WAAW,gBAAgB,SAAU;AAAA;AAGnE,MAAM,mBAAiE,CAAC,UAAU;AAChF,QAAM;AAAA,IACJ,kBAAkB,EAAE,aAAa,WAAW;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,kBAAkB,KAAK;AAE3B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,CAAC;AAAA,MACX,YAAW;AAAA,MACX,eAAa,6BAA6B;AAAA,MAC1C,cAAW;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,SAAS,MAAM;AACb,YAAI,YAAa,YAAW;AAAA,MAC9B;AAAA,MAEA,8BAAC,gBAAa,OAAO,cAAc,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK,GAAG;AAAA;AAAA,EACpF;AAEJ;AAEA,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
useGetGlobalAttributes,
|
|
4
|
+
useGetXstyledProps,
|
|
5
|
+
useMemoMergePropsWithDefault,
|
|
6
|
+
useOwnerProps
|
|
7
|
+
} from "@elliemae/ds-props-helpers";
|
|
8
|
+
import React2 from "react";
|
|
9
|
+
import { DSPageNextButtonPropTypesSchema, defaultProps } from "../react-desc-prop-types.js";
|
|
10
|
+
import { useValidateProps } from "./useValidateProps.js";
|
|
11
|
+
const usePageNextButton = (propsFromUser) => {
|
|
12
|
+
const propsWithDefault = useMemoMergePropsWithDefault(propsFromUser, defaultProps);
|
|
13
|
+
useValidateProps(propsWithDefault, DSPageNextButtonPropTypesSchema);
|
|
14
|
+
const xstyledProps = useGetXstyledProps(propsWithDefault);
|
|
15
|
+
const globalAttributes = useGetGlobalAttributes(propsWithDefault);
|
|
16
|
+
const ownerPropsConfig = useOwnerProps(propsWithDefault);
|
|
17
|
+
return React2.useMemo(
|
|
18
|
+
() => ({
|
|
19
|
+
propsWithDefault,
|
|
20
|
+
xstyledProps,
|
|
21
|
+
globalAttributes,
|
|
22
|
+
ownerPropsConfig
|
|
23
|
+
}),
|
|
24
|
+
[propsWithDefault, xstyledProps, globalAttributes, ownerPropsConfig]
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
usePageNextButton
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=usePageNextButton.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSPageNextButton/config/usePageNextButton.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import {\n useGetGlobalAttributes,\n useGetXstyledProps,\n useMemoMergePropsWithDefault,\n useOwnerProps,\n} from '@elliemae/ds-props-helpers';\nimport React from 'react';\n\nimport type { DSButtonV3T } from '@elliemae/ds-button-v2';\nimport { type DSPageNextButtonT, DSPageNextButtonPropTypesSchema, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const usePageNextButton = (propsFromUser: DSPageNextButtonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSPageNextButtonT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSPageNextButtonPropTypesSchema);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // GLOBAL ATTRIBUTES\n // =============================================================================\n const globalAttributes = useGetGlobalAttributes<\n DSPageNextButtonT.InternalProps,\n HTMLButtonElement,\n DSButtonV3T.Props\n >(propsWithDefault);\n // =============================================================================\n // OWNER PROPS CONFIG\n // =============================================================================\n const ownerPropsConfig = useOwnerProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n // const instanceUid = React.useMemo(() => `ds-page-next-button-2-${uid(5)}`, []);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n globalAttributes,\n ownerPropsConfig,\n }),\n [propsWithDefault, xstyledProps, globalAttributes, ownerPropsConfig],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAOA,YAAW;AAGlB,SAAiC,iCAAiC,oBAAoB;AACtF,SAAS,wBAAwB;AAE1B,MAAM,oBAAoB,CAAC,kBAA2C;AAI3E,QAAM,mBAAmB,6BAA8D,eAAe,YAAY;AAClH,mBAAiB,kBAAkB,+BAA+B;AAIlE,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,mBAAmB,uBAIvB,gBAAgB;AAIlB,QAAM,mBAAmB,cAAc,gBAAgB;AAYvD,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,cAAc,kBAAkB,gBAAgB;AAAA,EACrE;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
+
import { DSPageNextButtonName } from "../constants/index.js";
|
|
4
|
+
const useValidateProps = (props, propTypes) => {
|
|
5
|
+
useValidateTypescriptPropTypes(props, propTypes, DSPageNextButtonName);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
useValidateProps
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSPageNextButton/config/useValidateProps.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSPageNextButtonT } from '../react-desc-prop-types.js';\nimport { DSPageNextButtonName } from '../constants/index.js';\n\nexport const useValidateProps = (\n props: DSPageNextButtonT.InternalProps,\n propTypes: ValidationMap<DSPageNextButtonT.Props>,\n): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSPageNextButtonName);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,sCAAsC;AAG/C,SAAS,4BAA4B;AAE9B,MAAM,mBAAmB,CAC9B,OACA,cACS;AAET,iCAA+B,OAAO,WAAW,oBAAoB;AACvE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
import { DSPaginationName } from "../../../constants/index.js";
|
|
4
|
+
const DSPageNextButtonName = "DSPageNextButton";
|
|
5
|
+
const PAGE_NEXT_BUTTON_SLOTS = {
|
|
6
|
+
PAGE_NEXT_BUTTON: "next-button"
|
|
7
|
+
};
|
|
8
|
+
const PAGE_NEXT_BUTTON_DATA_TESTID = {
|
|
9
|
+
...slotObjectToDataTestIds(DSPaginationName, PAGE_NEXT_BUTTON_SLOTS),
|
|
10
|
+
PAGE_NEXT_BUTTON: "data-table-pagination-next-button"
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
DSPageNextButtonName,
|
|
14
|
+
DSPaginationName,
|
|
15
|
+
PAGE_NEXT_BUTTON_DATA_TESTID,
|
|
16
|
+
PAGE_NEXT_BUTTON_SLOTS
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSPageNextButton/constants/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSPaginationName } from '../../../constants/index.js';\nexport { DSPaginationName };\n\nexport const DSPageNextButtonName = 'DSPageNextButton';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PAGE_NEXT_BUTTON_SLOTS = {\n PAGE_NEXT_BUTTON: 'next-button',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PAGE_NEXT_BUTTON_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSPaginationName, PAGE_NEXT_BUTTON_SLOTS),\n PAGE_NEXT_BUTTON: 'data-table-pagination-next-button',\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AACxC,SAAS,wBAAwB;AAG1B,MAAM,uBAAuB;AAG7B,MAAM,yBAAyB;AAAA,EACpC,kBAAkB;AACpB;AAGO,MAAM,+BAA+B;AAAA,EAC1C,GAAG,wBAAwB,kBAAkB,sBAAsB;AAAA,EACnE,kBAAkB;AACpB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DSPageNextButton, DSPageNextButtonWithSchema } from "./DSPageNextButton.js";
|
|
3
|
+
import { DSPageNextButtonName, PAGE_NEXT_BUTTON_DATA_TESTID, PAGE_NEXT_BUTTON_SLOTS } from "./constants/index.js";
|
|
4
|
+
export {
|
|
5
|
+
DSPageNextButton,
|
|
6
|
+
DSPageNextButtonName,
|
|
7
|
+
DSPageNextButtonWithSchema,
|
|
8
|
+
PAGE_NEXT_BUTTON_DATA_TESTID,
|
|
9
|
+
PAGE_NEXT_BUTTON_SLOTS
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSPageNextButton/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSPageNextButton, DSPageNextButtonWithSchema } from './DSPageNextButton.js';\nexport { DSPageNextButtonName, PAGE_NEXT_BUTTON_DATA_TESTID, PAGE_NEXT_BUTTON_SLOTS } from './constants/index.js';\nexport type { DSPageNextButtonT } from './react-desc-prop-types.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,kBAAkB,kCAAkC;AAC7D,SAAS,sBAAsB,8BAA8B,8BAA8B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|