@elliemae/ds-pagination 3.57.0-next.8 → 3.57.0-rc.0
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 +212 -0
- package/dist/cjs/parts/DSPaginator/DSPaginator.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/{createPaginatorHeader.js → config/createPaginatorHeader.js} +11 -6
- package/dist/cjs/parts/DSPaginator/config/createPaginatorHeader.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/{getOptions.js → config/getOptions.js} +4 -4
- package/dist/cjs/parts/DSPaginator/config/getOptions.js.map +7 -0
- package/dist/cjs/parts/DSPaginator/{usePaginationSearch.js.map → config/usePaginationSearch.js.map} +1 -1
- package/dist/cjs/parts/DSPaginator/{usePaginator.js → config/usePaginator.js} +62 -38
- 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/parts/DSPaginator/styled.js +135 -0
- 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 +125 -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/{styled.js → parts/DSPerPageSelector/styled.js} +36 -41
- 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/parts/{DSPaginator → shared}/useOnElementOnResize.js.map +1 -1
- 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 +182 -0
- package/dist/esm/parts/DSPaginator/DSPaginator.js.map +7 -0
- package/dist/esm/parts/DSPaginator/config/createPaginatorHeader.js +24 -0
- package/dist/esm/parts/DSPaginator/config/createPaginatorHeader.js.map +7 -0
- package/dist/esm/parts/DSPaginator/{getOptions.js → config/getOptions.js} +4 -4
- package/dist/esm/parts/DSPaginator/config/getOptions.js.map +7 -0
- package/dist/esm/parts/DSPaginator/{usePaginationSearch.js.map → config/usePaginationSearch.js.map} +1 -1
- package/dist/esm/parts/DSPaginator/config/usePaginator.js +88 -0
- 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 +105 -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 +95 -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 +87 -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/parts/{DSPaginator → shared}/useOnElementOnResize.js.map +1 -1
- 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/config/createPaginatorHeader.d.ts +8 -0
- package/dist/types/parts/DSPaginator/{getOptions.d.ts → config/getOptions.d.ts} +1 -0
- package/dist/types/parts/DSPaginator/config/usePaginator.d.ts +390 -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 +5 -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 +384 -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 +3 -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 +35 -31
- 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/getOptions.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 +0 -19
- package/dist/esm/parts/DSPaginator/createPaginatorHeader.js.map +0 -7
- package/dist/esm/parts/DSPaginator/getOptions.js.map +0 -7
- package/dist/esm/parts/DSPaginator/usePaginator.js +0 -59
- 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/createPaginatorHeader.d.ts +0 -6
- 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/{usePaginationSearch.js → config/usePaginationSearch.js} +0 -0
- /package/dist/cjs/parts/DSPerPageSelector/{getOptions.js → config/getOptions.js} +0 -0
- /package/dist/cjs/parts/{DSPaginator → shared}/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/esm/parts/{DSPaginator → shared}/useOnElementOnResize.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/{usePaginationSearch.d.ts → config/usePaginationSearch.d.ts} +0 -0
- /package/dist/types/parts/DSPerPageSelector/{getOptions.d.ts → config/getOptions.d.ts} +0 -0
- /package/dist/types/parts/{DSPaginator → shared}/useOnElementOnResize.d.ts +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
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 constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
|
+
DSPaginationName: () => import_constants.DSPaginationName,
|
|
32
|
+
DSPaginationSeparatorName: () => DSPaginationSeparatorName,
|
|
33
|
+
PAGINATION_SEPARATOR_DATA_TESTID: () => PAGINATION_SEPARATOR_DATA_TESTID,
|
|
34
|
+
PAGINATION_SEPARATOR_SLOTS: () => PAGINATION_SEPARATOR_SLOTS
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(constants_exports);
|
|
37
|
+
var React = __toESM(require("react"));
|
|
38
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
39
|
+
var import_constants = require("../../../constants/index.js");
|
|
40
|
+
const DSPaginationSeparatorName = "DSPaginationSeparator";
|
|
41
|
+
const PAGINATION_SEPARATOR_SLOTS = {
|
|
42
|
+
SEPARATOR: "separator"
|
|
43
|
+
};
|
|
44
|
+
const PAGINATION_SEPARATOR_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(import_constants.DSPaginationName, PAGINATION_SEPARATOR_SLOTS);
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPaginationSeparator/constants/index.ts", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\nimport { DSPaginationName } from '../../../constants/index.js';\nexport { DSPaginationName };\n\nexport const DSPaginationSeparatorName = 'DSPaginationSeparator';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const PAGINATION_SEPARATOR_SLOTS = {\n SEPARATOR: 'separator',\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 PAGINATION_SEPARATOR_DATA_TESTID = slotObjectToDataTestIds(DSPaginationName, PAGINATION_SEPARATOR_SLOTS);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AACxC,uBAAiC;AAG1B,MAAM,4BAA4B;AAGlC,MAAM,6BAA6B;AAAA,EACxC,WAAW;AACb;AAGO,MAAM,uCAAmC,0CAAwB,mCAAkB,0BAA0B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 DSPaginationSeparator_exports = {};
|
|
30
|
+
__export(DSPaginationSeparator_exports, {
|
|
31
|
+
DSPaginationSeparator: () => import_DSPaginationSeparator.DSPaginationSeparator,
|
|
32
|
+
DSPaginationSeparatorName: () => import_constants.DSPaginationSeparatorName,
|
|
33
|
+
DSPaginationSeparatorWithSchema: () => import_DSPaginationSeparator.DSPaginationSeparatorWithSchema,
|
|
34
|
+
PAGINATION_SEPARATOR_DATA_TESTID: () => import_constants.PAGINATION_SEPARATOR_DATA_TESTID,
|
|
35
|
+
PAGINATION_SEPARATOR_SLOTS: () => import_constants.PAGINATION_SEPARATOR_SLOTS
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(DSPaginationSeparator_exports);
|
|
38
|
+
var React = __toESM(require("react"));
|
|
39
|
+
var import_DSPaginationSeparator = require("./DSPaginationSeparator.js");
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPaginationSeparator/index.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { DSPaginationSeparator, DSPaginationSeparatorWithSchema } from './DSPaginationSeparator.js';\nexport {\n DSPaginationSeparatorName,\n PAGINATION_SEPARATOR_DATA_TESTID,\n PAGINATION_SEPARATOR_SLOTS,\n} from './constants/index.js';\nexport type { DSPaginationSeparatorT } 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;ACAA,YAAuB;ADAvB,mCAAuE;AACvE,uBAIO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSPaginationSeparatorPropTypes: () => DSPaginationSeparatorPropTypes,
|
|
32
|
+
DSPaginationSeparatorPropTypesSchema: () => DSPaginationSeparatorPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
39
|
+
const defaultProps = {};
|
|
40
|
+
const DSPaginationSeparatorPropTypes = {
|
|
41
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSPaginationName, import_constants.PAGINATION_SEPARATOR_SLOTS),
|
|
42
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
43
|
+
...import_ds_props_helpers.xstyledPropTypes
|
|
44
|
+
};
|
|
45
|
+
const DSPaginationSeparatorPropTypesSchema = DSPaginationSeparatorPropTypes;
|
|
46
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPaginationSeparator/react-desc-prop-types.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport { getPropsPerSlotPropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSPaginationName, PAGINATION_SEPARATOR_SLOTS } from './constants/index.js';\n\nexport declare namespace DSPaginationSeparatorT {\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSPaginationName, typeof PAGINATION_SEPARATOR_SLOTS> {}\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSPaginationSeparatorT.DefaultProps = {};\n\nexport const DSPaginationSeparatorPropTypes: DSPropTypesSchema<DSPaginationSeparatorT.Props> = {\n ...getPropsPerSlotPropTypes(DSPaginationName, PAGINATION_SEPARATOR_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n};\n\nexport const DSPaginationSeparatorPropTypesSchema =\n DSPaginationSeparatorPropTypes as unknown as ValidationMap<DSPaginationSeparatorT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAAsF;AAEtF,uBAA6D;AAwBtD,MAAM,eAAoD,CAAC;AAE3D,MAAM,iCAAkF;AAAA,EAC7F,OAAG,kDAAyB,mCAAkB,2CAA0B;AAAA,EACxE,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,uCACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
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 DSPaginator_exports = {};
|
|
30
|
+
__export(DSPaginator_exports, {
|
|
31
|
+
DSPaginator: () => DSPaginator,
|
|
32
|
+
DSPaginatorWithSchema: () => DSPaginatorWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSPaginator_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_ds_circular_progress_indicator = require("@elliemae/ds-circular-progress-indicator");
|
|
39
|
+
var import_ds_grid = require("@elliemae/ds-grid");
|
|
40
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
41
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
42
|
+
var import_ds_typography = require("@elliemae/ds-typography");
|
|
43
|
+
var import_DSPaginationSeparator = require("../DSPaginationSeparator/index.js");
|
|
44
|
+
var import_createPaginatorHeader = require("./config/createPaginatorHeader.js");
|
|
45
|
+
var import_usePaginator = require("./config/usePaginator.js");
|
|
46
|
+
var import_constants = require("./constants/index.js");
|
|
47
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
48
|
+
var import_styled = require("./styled.js");
|
|
49
|
+
const DSPaginator = (props) => {
|
|
50
|
+
const {
|
|
51
|
+
propsWithDefault: { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle },
|
|
52
|
+
xstyledProps,
|
|
53
|
+
globalAttributes,
|
|
54
|
+
ownerPropsConfig,
|
|
55
|
+
btnRef,
|
|
56
|
+
btnWidth,
|
|
57
|
+
pageInfoWidth,
|
|
58
|
+
options,
|
|
59
|
+
isOpened,
|
|
60
|
+
actionRef,
|
|
61
|
+
widestChildRef,
|
|
62
|
+
pageInfoRef,
|
|
63
|
+
checkMarkRef,
|
|
64
|
+
checkMarkWidth,
|
|
65
|
+
onKeyDown,
|
|
66
|
+
setIsOpened
|
|
67
|
+
} = (0, import_usePaginator.usePaginator)(props);
|
|
68
|
+
const widestTypographyRef = import_react.default.useRef(null);
|
|
69
|
+
const Header = (0, import_react.useMemo)(
|
|
70
|
+
() => (0, import_createPaginatorHeader.createPaginatorHeader)({ pageDetailsTitle, pageInfoWidth, ownerPropsConfig, checkMarkWidth }),
|
|
71
|
+
[pageDetailsTitle, pageInfoWidth, ownerPropsConfig, checkMarkWidth]
|
|
72
|
+
);
|
|
73
|
+
const buttonOnClick = (0, import_react.useMemo)(() => {
|
|
74
|
+
if (globalAttributes.onClick) return globalAttributes.onClick;
|
|
75
|
+
return () => setIsOpened((prev) => !prev);
|
|
76
|
+
}, [globalAttributes.onClick, setIsOpened]);
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
78
|
+
import_styled.StyledDropdown,
|
|
79
|
+
{
|
|
80
|
+
isOpened,
|
|
81
|
+
options,
|
|
82
|
+
selectedOptions: { [pageIndex.toString()]: true },
|
|
83
|
+
onOptionClick: (_, clickedOption) => {
|
|
84
|
+
onPageChange(clickedOption.value);
|
|
85
|
+
setIsOpened(false);
|
|
86
|
+
btnRef.current?.focus();
|
|
87
|
+
},
|
|
88
|
+
onClickOutside: () => {
|
|
89
|
+
setIsOpened(false);
|
|
90
|
+
btnRef.current?.focus();
|
|
91
|
+
},
|
|
92
|
+
customOffset: [-(checkMarkWidth + 7), 2],
|
|
93
|
+
startPlacementPreference: "top-start",
|
|
94
|
+
actionRef,
|
|
95
|
+
onKeyDown,
|
|
96
|
+
minWidth: pageDetails.length !== 0 ? btnWidth + checkMarkWidth + 7 : (
|
|
97
|
+
/**
|
|
98
|
+
* Structure of the width:
|
|
99
|
+
* 16px (left padding)
|
|
100
|
+
* + chevronWidth (size of the chevron icon)
|
|
101
|
+
* + 8px (spacing between chevron and text)
|
|
102
|
+
* + pageCount length in ch
|
|
103
|
+
* + 16px (right padding)
|
|
104
|
+
* + a small scrollbar placeholder (to avoid text wrapping when scrollbars appear)
|
|
105
|
+
* By using `calc()` + `ch` units, the component stays responsive to font-size changes
|
|
106
|
+
* without requiring an extra ref to measure the page count text width.
|
|
107
|
+
*/
|
|
108
|
+
`calc(${checkMarkWidth + 60}px + ${pageCount.toString().length}ch)`
|
|
109
|
+
),
|
|
110
|
+
maxHeight: 300,
|
|
111
|
+
HeaderComp: Header,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
114
|
+
import_styled.PaginationDropdownButtonPaginator,
|
|
115
|
+
{
|
|
116
|
+
buttonType: "raw",
|
|
117
|
+
disabled: isLoadingPageCount,
|
|
118
|
+
innerRef: btnRef,
|
|
119
|
+
"aria-pressed": isOpened,
|
|
120
|
+
"aria-label": `Page ${pageIndex} out of ${pageCount}, ${pageDetails.length !== 0 ? pageDetails[pageIndex - 1] : "\b\b"}. Press to change the current page`,
|
|
121
|
+
"data-testid": import_constants.PAGINATOR_DATA_TESTID.PAGINATOR,
|
|
122
|
+
...globalAttributes,
|
|
123
|
+
...xstyledProps,
|
|
124
|
+
...ownerPropsConfig,
|
|
125
|
+
onClick: buttonOnClick,
|
|
126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { gutter: "xxxs", alignItems: "center", style: { gridAutoFlow: "column" }, children: [
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledPageInfo, { innerRef: pageInfoRef, children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
129
|
+
import_ds_typography.DSTypography,
|
|
130
|
+
{
|
|
131
|
+
id: "typography-page-index",
|
|
132
|
+
variant: "b1",
|
|
133
|
+
as: "span",
|
|
134
|
+
fontWeight: "semibold",
|
|
135
|
+
textAlign: "start",
|
|
136
|
+
children: pageIndex
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
140
|
+
import_ds_typography.DSTypography,
|
|
141
|
+
{
|
|
142
|
+
variant: "b1",
|
|
143
|
+
as: "span",
|
|
144
|
+
className: "typography-page-info-and-detail",
|
|
145
|
+
children: [
|
|
146
|
+
"/ ",
|
|
147
|
+
pageCount
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }),
|
|
152
|
+
isLoadingPageCount && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_circular_progress_indicator.DSCircularIndeterminateIndicator, { ml: "xxxs", mr: "xxxs", size: "xs" }),
|
|
153
|
+
pageDetails.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSPaginationSeparator.DSPaginationSeparator, { height: "12px", ml: "12px", mr: "xxxs", ...ownerPropsConfig }),
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
156
|
+
import_ds_typography.DSTypography,
|
|
157
|
+
{
|
|
158
|
+
className: "typography-page-info-and-detail",
|
|
159
|
+
innerRef: widestTypographyRef,
|
|
160
|
+
mr: "xxs",
|
|
161
|
+
variant: "b1",
|
|
162
|
+
as: "span",
|
|
163
|
+
fontWeight: "semibold",
|
|
164
|
+
textAlign: "start",
|
|
165
|
+
children: pageDetails[pageIndex - 1]
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
] }),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronDown, { ml: "xxxs", color: ["brand-primary", "700"], innerRef: checkMarkRef })
|
|
170
|
+
] })
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_grid.Grid, { style: { position: "relative" }, children: pageDetails.map((pageDetail, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
174
|
+
import_styled.InvisibleDiv,
|
|
175
|
+
{
|
|
176
|
+
innerRef: (el) => {
|
|
177
|
+
if (!el) return;
|
|
178
|
+
if (!widestChildRef.current) {
|
|
179
|
+
widestChildRef.current = el;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (el.offsetWidth > widestChildRef.current.offsetWidth) {
|
|
183
|
+
widestChildRef.current = el;
|
|
184
|
+
}
|
|
185
|
+
if (index === pageDetails.length - 1) {
|
|
186
|
+
widestTypographyRef.current?.style.setProperty("min-width", `${widestChildRef.current?.offsetWidth}px`);
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"data-testid": "ds-pagination-invisible-detail-for-width-calc",
|
|
190
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
191
|
+
import_ds_typography.DSTypography,
|
|
192
|
+
{
|
|
193
|
+
className: "typography-page-info-and-detail",
|
|
194
|
+
mr: "xxs",
|
|
195
|
+
variant: "b1",
|
|
196
|
+
as: "span",
|
|
197
|
+
fontWeight: "semibold",
|
|
198
|
+
textAlign: "start",
|
|
199
|
+
children: pageDetail
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
},
|
|
203
|
+
pageDetail
|
|
204
|
+
)) })
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
DSPaginator.displayName = import_constants.DSPaginatorName;
|
|
210
|
+
const DSPaginatorWithSchema = (0, import_ds_props_helpers.describe)(DSPaginator);
|
|
211
|
+
DSPaginatorWithSchema.propTypes = import_react_desc_prop_types.DSPaginatorPropTypesSchema;
|
|
212
|
+
//# sourceMappingURL=DSPaginator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/parts/DSPaginator/DSPaginator.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React, { useMemo } from 'react';\nimport type { DSButtonT } from '@elliemae/ds-button-v2';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { type DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSPaginationSeparator } from '../DSPaginationSeparator/index.js';\nimport { createPaginatorHeader } from './config/createPaginatorHeader.js';\nimport { usePaginator } from './config/usePaginator.js';\nimport { DSPaginatorName, PAGINATOR_DATA_TESTID } from './constants/index.js';\nimport { DSPaginatorPropTypesSchema, type DSPaginatorT } from './react-desc-prop-types.js';\nimport { InvisibleDiv, PaginationDropdownButtonPaginator, StyledDropdown, StyledPageInfo } from './styled.js';\n\nconst DSPaginator: React.ComponentType<DSPaginatorT.Props> = (props) => {\n const {\n propsWithDefault: { pageIndex, pageCount, isLoadingPageCount, onPageChange, pageDetails, pageDetailsTitle },\n xstyledProps,\n globalAttributes,\n ownerPropsConfig,\n btnRef,\n btnWidth,\n pageInfoWidth,\n options,\n isOpened,\n actionRef,\n widestChildRef,\n pageInfoRef,\n checkMarkRef,\n checkMarkWidth,\n onKeyDown,\n setIsOpened,\n } = usePaginator(props);\n\n const widestTypographyRef = React.useRef<HTMLDivElement>(null);\n\n const Header = useMemo(\n () => createPaginatorHeader({ pageDetailsTitle, pageInfoWidth, ownerPropsConfig, checkMarkWidth }),\n [pageDetailsTitle, pageInfoWidth, ownerPropsConfig, checkMarkWidth],\n );\n\n const buttonOnClick: DSButtonT.Props['onClick'] = useMemo(() => {\n if (globalAttributes.onClick) return globalAttributes.onClick as DSButtonT.Props['onClick'];\n return () => setIsOpened((prev) => !prev);\n }, [globalAttributes.onClick, setIsOpened]);\n\n return (\n <StyledDropdown\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageIndex.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageChange((clickedOption as DSDropdownMenuT.ItemSingleOptions).value as number);\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current?.focus();\n }}\n customOffset={[-(checkMarkWidth + 7), 2]}\n startPlacementPreference=\"top-start\"\n actionRef={actionRef}\n onKeyDown={onKeyDown}\n minWidth={\n pageDetails.length !== 0\n ? btnWidth + checkMarkWidth + 7\n : /**\n * Structure of the width:\n * 16px (left padding)\n * + chevronWidth (size of the chevron icon)\n * + 8px (spacing between chevron and text)\n * + pageCount length in ch\n * + 16px (right padding)\n * + a small scrollbar placeholder (to avoid text wrapping when scrollbars appear)\n * By using `calc()` + `ch` units, the component stays responsive to font-size changes\n * without requiring an extra ref to measure the page count text width.\n */\n\n `calc(${checkMarkWidth + 60}px + ${pageCount.toString().length}ch)`\n }\n maxHeight={300}\n HeaderComp={Header}\n >\n <PaginationDropdownButtonPaginator\n buttonType=\"raw\"\n disabled={isLoadingPageCount}\n innerRef={btnRef}\n aria-pressed={isOpened}\n aria-label={`Page ${pageIndex} out of ${pageCount}, ${\n pageDetails.length !== 0 ? pageDetails[pageIndex - 1] : '\\b\\b'\n }. Press to change the current page`}\n data-testid={PAGINATOR_DATA_TESTID.PAGINATOR}\n {...globalAttributes}\n {...xstyledProps}\n {...ownerPropsConfig}\n onClick={buttonOnClick}\n >\n <Grid gutter=\"xxxs\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <StyledPageInfo innerRef={pageInfoRef}>\n <DSTypography\n /**\n * Pagination uses DSTypography internally, but each typography variant defines\n * its own font-size. When these components are placed inside a styled() wrapper,\n * trying to style them via styled(DSTypography) triggers TypeScript errors\n * because DSTypography exposes \"as\" props and variant-specific overrides.\n *\n * Instead of wrapping DSTypography directly in styled(), we target the\n * underlying rendered elements via className/id. This avoids the TS conflicts\n * while still allowing us to override their font-size reliably.\n */\n id=\"typography-page-index\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageIndex}\n </DSTypography>\n <DSTypography\n variant=\"b1\"\n as=\"span\"\n /**\n * Pagination uses DSTypography internally, but each typography variant defines\n * its own font-size. When these components are placed inside a styled() wrapper,\n * trying to style them via styled(DSTypography) triggers TypeScript errors\n * because DSTypography exposes \"as\" props and variant-specific overrides.\n *\n * Instead of wrapping DSTypography directly in styled(), we target the\n * underlying rendered elements via className/id. This avoids the TS conflicts\n * while still allowing us to override their font-size reliably.\n */ className=\"typography-page-info-and-detail\"\n >\n / {pageCount}\n </DSTypography>\n </StyledPageInfo>\n {isLoadingPageCount && <DSCircularIndeterminateIndicator ml=\"xxxs\" mr=\"xxxs\" size=\"xs\" />}\n {pageDetails.length !== 0 && (\n <>\n <DSPaginationSeparator height=\"12px\" ml=\"12px\" mr=\"xxxs\" {...ownerPropsConfig} />\n <DSTypography\n className=\"typography-page-info-and-detail\"\n innerRef={widestTypographyRef}\n mr=\"xxs\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageDetails[pageIndex - 1]}\n </DSTypography>\n </>\n )}\n <ChevronDown ml=\"xxxs\" color={['brand-primary', '700']} innerRef={checkMarkRef} />\n </Grid>\n </PaginationDropdownButtonPaginator>\n {/* We calculate the length of the longest detail here (this is as per specs) */}\n <Grid style={{ position: 'relative' }}>\n {pageDetails.map((pageDetail, index) => (\n <InvisibleDiv\n innerRef={(el) => {\n if (!el) return;\n if (!widestChildRef.current) {\n widestChildRef.current = el;\n return;\n }\n if (el.offsetWidth > widestChildRef.current.offsetWidth) {\n widestChildRef.current = el;\n }\n if (index === pageDetails.length - 1) {\n widestTypographyRef.current?.style.setProperty('min-width', `${widestChildRef.current?.offsetWidth}px`);\n }\n }}\n data-testid=\"ds-pagination-invisible-detail-for-width-calc\"\n key={pageDetail}\n >\n <DSTypography\n className=\"typography-page-info-and-detail\"\n mr=\"xxs\"\n variant=\"b1\"\n as=\"span\"\n fontWeight=\"semibold\"\n textAlign=\"start\"\n >\n {pageDetail}\n </DSTypography>\n </InvisibleDiv>\n ))}\n </Grid>\n </StyledDropdown>\n );\n};\n\nDSPaginator.displayName = DSPaginatorName;\nconst DSPaginatorWithSchema = describe(DSPaginator);\nDSPaginatorWithSchema.propTypes = DSPaginatorPropTypesSchema;\n\nexport { DSPaginator, DSPaginatorWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqGX;AArGZ,mBAA+B;AAE/B,4CAAiD;AAEjD,qBAAqB;AACrB,sBAA4B;AAC5B,8BAAyB;AACzB,2BAA6B;AAC7B,mCAAsC;AACtC,mCAAsC;AACtC,0BAA6B;AAC7B,uBAAuD;AACvD,mCAA8D;AAC9D,oBAAgG;AAEhG,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM;AAAA,IACJ,kBAAkB,EAAE,WAAW,WAAW,oBAAoB,cAAc,aAAa,iBAAiB;AAAA,IAC1G;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,kCAAa,KAAK;AAEtB,QAAM,sBAAsB,aAAAA,QAAM,OAAuB,IAAI;AAE7D,QAAM,aAAS;AAAA,IACb,UAAM,oDAAsB,EAAE,kBAAkB,eAAe,kBAAkB,eAAe,CAAC;AAAA,IACjG,CAAC,kBAAkB,eAAe,kBAAkB,cAAc;AAAA,EACpE;AAEA,QAAM,oBAA4C,sBAAQ,MAAM;AAC9D,QAAI,iBAAiB,QAAS,QAAO,iBAAiB;AACtD,WAAO,MAAM,YAAY,CAAC,SAAS,CAAC,IAAI;AAAA,EAC1C,GAAG,CAAC,iBAAiB,SAAS,WAAW,CAAC;AAE1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,iBAAiB,EAAE,CAAC,UAAU,SAAS,CAAC,GAAG,KAAK;AAAA,MAChD,eAAe,CAAC,GAAG,kBAAkB;AACnC,qBAAc,cAAoD,KAAe;AACjF,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,gBAAgB,MAAM;AACpB,oBAAY,KAAK;AACjB,eAAO,SAAS,MAAM;AAAA,MACxB;AAAA,MACA,cAAc,CAAC,EAAE,iBAAiB,IAAI,CAAC;AAAA,MACvC,0BAAyB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,UACE,YAAY,WAAW,IACnB,WAAW,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAa5B,QAAQ,iBAAiB,EAAE,QAAQ,UAAU,SAAS,EAAE,MAAM;AAAA;AAAA,MAEpE,WAAW;AAAA,MACX,YAAY;AAAA,MAEZ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,YAAW;AAAA,YACX,UAAU;AAAA,YACV,UAAU;AAAA,YACV,gBAAc;AAAA,YACd,cAAY,QAAQ,SAAS,WAAW,SAAS,KAC/C,YAAY,WAAW,IAAI,YAAY,YAAY,CAAC,IAAI,MAC1D;AAAA,YACA,eAAa,uCAAsB;AAAA,YAClC,GAAG;AAAA,YACH,GAAG;AAAA,YACH,GAAG;AAAA,YACJ,SAAS;AAAA,YAET,uDAAC,uBAAK,QAAO,QAAO,YAAW,UAAS,OAAO,EAAE,cAAc,SAAS,GACtE;AAAA,2DAAC,gCAAe,UAAU,aACxB;AAAA;AAAA,kBAAC;AAAA;AAAA,oBAWC,IAAG;AAAA,oBACH,SAAQ;AAAA,oBACR,IAAG;AAAA,oBACH,YAAW;AAAA,oBACX,WAAU;AAAA,oBAET;AAAA;AAAA,gBACH;AAAA,gBACA;AAAA,kBAAC;AAAA;AAAA,oBACC,SAAQ;AAAA,oBACR,IAAG;AAAA,oBAUC,WAAU;AAAA,oBACf;AAAA;AAAA,sBACI;AAAA;AAAA;AAAA,gBACL;AAAA,iBACF;AAAA,cACC,sBAAsB,4CAAC,0EAAiC,IAAG,QAAO,IAAG,QAAO,MAAK,MAAK;AAAA,cACtF,YAAY,WAAW,KACtB,4EACE;AAAA,4DAAC,sDAAsB,QAAO,QAAO,IAAG,QAAO,IAAG,QAAQ,GAAG,kBAAkB;AAAA,gBAC/E;AAAA,kBAAC;AAAA;AAAA,oBACC,WAAU;AAAA,oBACV,UAAU;AAAA,oBACV,IAAG;AAAA,oBACH,SAAQ;AAAA,oBACR,IAAG;AAAA,oBACH,YAAW;AAAA,oBACX,WAAU;AAAA,oBAET,sBAAY,YAAY,CAAC;AAAA;AAAA,gBAC5B;AAAA,iBACF;AAAA,cAEF,4CAAC,+BAAY,IAAG,QAAO,OAAO,CAAC,iBAAiB,KAAK,GAAG,UAAU,cAAc;AAAA,eAClF;AAAA;AAAA,QACF;AAAA,QAEA,4CAAC,uBAAK,OAAO,EAAE,UAAU,WAAW,GACjC,sBAAY,IAAI,CAAC,YAAY,UAC5B;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,CAAC,OAAO;AAChB,kBAAI,CAAC,GAAI;AACT,kBAAI,CAAC,eAAe,SAAS;AAC3B,+BAAe,UAAU;AACzB;AAAA,cACF;AACA,kBAAI,GAAG,cAAc,eAAe,QAAQ,aAAa;AACvD,+BAAe,UAAU;AAAA,cAC3B;AACA,kBAAI,UAAU,YAAY,SAAS,GAAG;AACpC,oCAAoB,SAAS,MAAM,YAAY,aAAa,GAAG,eAAe,SAAS,WAAW,IAAI;AAAA,cACxG;AAAA,YACF;AAAA,YACA,eAAY;AAAA,YAGZ;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,IAAG;AAAA,gBACH,SAAQ;AAAA,gBACR,IAAG;AAAA,gBACH,YAAW;AAAA,gBACX,WAAU;AAAA,gBAET;AAAA;AAAA,YACH;AAAA;AAAA,UAXK;AAAA,QAYP,CACD,GACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
package/dist/cjs/parts/DSPaginator/{createPaginatorHeader.js → config/createPaginatorHeader.js}
RENAMED
|
@@ -33,14 +33,19 @@ __export(createPaginatorHeader_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(createPaginatorHeader_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var
|
|
37
|
-
var import_styled = require("
|
|
38
|
-
const createPaginatorHeader = ({
|
|
36
|
+
var import_DSPaginationSeparator = require("../../DSPaginationSeparator/index.js");
|
|
37
|
+
var import_styled = require("../styled.js");
|
|
38
|
+
const createPaginatorHeader = ({
|
|
39
|
+
pageDetailsTitle,
|
|
40
|
+
pageInfoWidth,
|
|
41
|
+
ownerPropsConfig,
|
|
42
|
+
checkMarkWidth
|
|
43
|
+
}) => {
|
|
39
44
|
const Comp = () => {
|
|
40
|
-
if (pageDetailsTitle === "") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
45
|
+
if (pageDetailsTitle === "") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.StyledHeader, { children: "Page" });
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.StyledHeader, { cols: [`${pageInfoWidth + checkMarkWidth + 34}px`, "8px", "auto"], children: [
|
|
42
47
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { marginLeft: "8px" }, children: "Page" }),
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DSPaginationSeparator.DSPaginationSeparator, { height: "100%", ...ownerPropsConfig }),
|
|
44
49
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pageDetailsTitle })
|
|
45
50
|
] });
|
|
46
51
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPaginator/config/createPaginatorHeader.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { DSPaginationSeparator } from '../../DSPaginationSeparator/index.js';\nimport { StyledHeader } from '../styled.js';\n\ninterface PaginatorHeaderOptions {\n pageDetailsTitle: string;\n pageInfoWidth: number;\n ownerPropsConfig: Record<string, unknown>;\n checkMarkWidth: number;\n}\n\nexport const createPaginatorHeader = ({\n pageDetailsTitle,\n pageInfoWidth,\n ownerPropsConfig,\n checkMarkWidth,\n}: PaginatorHeaderOptions) => {\n const Comp = () => {\n if (pageDetailsTitle === '') return <StyledHeader>Page</StyledHeader>;\n\n return (\n <StyledHeader cols={[`${pageInfoWidth + checkMarkWidth + 34}px`, '8px', 'auto']}>\n <span style={{ marginLeft: '8px' }}>Page</span>\n <DSPaginationSeparator height=\"100%\" {...ownerPropsConfig} />\n <span>{pageDetailsTitle}</span>\n </StyledHeader>\n );\n };\n return Comp;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBiB;AAjBxC,mCAAsC;AACtC,oBAA6B;AAStB,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA8B;AAC5B,QAAM,OAAO,MAAM;AACjB,QAAI,qBAAqB,GAAI,QAAO,4CAAC,8BAAa,kBAAI;AAEtD,WACE,6CAAC,8BAAa,MAAM,CAAC,GAAG,gBAAgB,iBAAiB,EAAE,MAAM,OAAO,MAAM,GAC5E;AAAA,kDAAC,UAAK,OAAO,EAAE,YAAY,MAAM,GAAG,kBAAI;AAAA,MACxC,4CAAC,sDAAsB,QAAO,QAAQ,GAAG,kBAAkB;AAAA,MAC3D,4CAAC,UAAM,4BAAiB;AAAA,OAC1B;AAAA,EAEJ;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -37,8 +37,8 @@ var import_ds_grid = require("@elliemae/ds-grid");
|
|
|
37
37
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
38
38
|
const OptionWithDetails = (props) => {
|
|
39
39
|
const Comp = () => {
|
|
40
|
-
const { pageInfoWidth, pageIndex, index, pageDetails } = props;
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: [
|
|
40
|
+
const { pageInfoWidth, pageIndex, index, pageDetails, checkMarkWidth } = props;
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, { cols: [`${checkMarkWidth}px`, `${pageInfoWidth + 16}px`, "auto"], gutter: "xxs", alignItems: "center", children: [
|
|
42
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
43
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: index + 1 }),
|
|
44
44
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -57,7 +57,7 @@ const OptionWithDetails = (props) => {
|
|
|
57
57
|
return Comp;
|
|
58
58
|
};
|
|
59
59
|
const getOptions = (args) => {
|
|
60
|
-
const { pageCount, pageIndex, pageDetails, pageInfoWidth } = args;
|
|
60
|
+
const { pageCount, pageIndex, pageDetails, pageInfoWidth, checkMarkWidth } = args;
|
|
61
61
|
const amountOfPages = typeof pageCount === "string" ? pageIndex + 1 : pageCount;
|
|
62
62
|
const options = new Array(amountOfPages).fill(0).map((_, index) => {
|
|
63
63
|
const option = {
|
|
@@ -67,7 +67,7 @@ const getOptions = (args) => {
|
|
|
67
67
|
type: "single"
|
|
68
68
|
};
|
|
69
69
|
if (pageDetails?.length) {
|
|
70
|
-
option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails });
|
|
70
|
+
option.render = OptionWithDetails({ pageInfoWidth, pageIndex, index, pageDetails, checkMarkWidth });
|
|
71
71
|
}
|
|
72
72
|
return option;
|
|
73
73
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPaginator/config/getOptions.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import type { DSDropdownMenuT } from '@elliemae/ds-dropdownmenu-v2';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Checkmark } from '@elliemae/ds-icons';\n\ninterface OptionWithDetailsT {\n pageInfoWidth: number;\n pageIndex: number;\n index: number;\n pageDetails: string[] | readonly string[];\n checkMarkWidth: number;\n}\n\nconst OptionWithDetails = (props: OptionWithDetailsT) => {\n const Comp = () => {\n const { pageInfoWidth, pageIndex, index, pageDetails, checkMarkWidth } = props;\n\n return (\n <Grid cols={[`${checkMarkWidth}px`, `${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[] | readonly string[];\n pageInfoWidth: number;\n checkMarkWidth: number;\n}): DSDropdownMenuT.ItemSingleOptions[] => {\n const { pageCount, pageIndex, pageDetails, pageInfoWidth, checkMarkWidth } = 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, checkMarkWidth });\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;ADiBjB;AAhBN,qBAAqB;AACrB,sBAA0B;AAU1B,MAAM,oBAAoB,CAAC,UAA8B;AACvD,QAAM,OAAO,MAAM;AACjB,UAAM,EAAE,eAAe,WAAW,OAAO,aAAa,eAAe,IAAI;AAEzE,WACE,6CAAC,uBAAK,MAAM,CAAC,GAAG,cAAc,MAAM,GAAG,gBAAgB,EAAE,MAAM,MAAM,GAAG,QAAO,OAAM,YAAW,UAC7F;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,SAMgB;AACzC,QAAM,EAAE,WAAW,WAAW,aAAa,eAAe,eAAe,IAAI;AAE7E,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,aAAa,eAAe,CAAC;AAAA,IACpG;AACA,WAAO;AAAA,EACT,CAAC;AACD,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/parts/DSPaginator/{usePaginationSearch.js.map → config/usePaginationSearch.js.map}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
3
|
+
"sources": ["../../../../../src/parts/DSPaginator/config/usePaginationSearch.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport const usePaginationSearch = (\n pageCount: string | number,\n actionRef: React.MutableRefObject<Record<string, (dsId: string) => void>>,\n): React.KeyboardEventHandler => {\n const [searchValue, setSearchValue] = useState('');\n const [shouldResetSearchValue, setShouldResetSearchValue] = useState(true);\n\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n useEffect(() => {\n if (typeof pageCount === 'string') return;\n\n if (searchValue !== '' && Number.parseInt(searchValue, 10) <= pageCount) {\n actionRef.current.setActiveDescendant(searchValue);\n actionRef.current.scrollOptionIntoView(searchValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchValue]);\n\n const onKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code.startsWith('Digit')) {\n if (shouldResetSearchValue) setSearchValue(e.key);\n else setSearchValue((prevValue) => prevValue + e.key);\n\n setShouldResetSearchValue(false);\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => {\n setShouldResetSearchValue(true);\n }, 1000);\n }\n },\n [shouldResetSearchValue],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyD;AAElD,MAAM,sBAAsB,CACjC,WACA,cAC+B;AAC/B,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,EAAE;AACjD,QAAM,CAAC,wBAAwB,yBAAyB,QAAI,uBAAS,IAAI;AAEzE,QAAM,iBAAa,qBAAuB;AAE1C,8BAAU,MAAM;AACd,QAAI,OAAO,cAAc,SAAU;AAEnC,QAAI,gBAAgB,MAAM,OAAO,SAAS,aAAa,EAAE,KAAK,WAAW;AACvE,gBAAU,QAAQ,oBAAoB,WAAW;AACjD,gBAAU,QAAQ,qBAAqB,WAAW;AAAA,IACpD;AAAA,EAEF,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,gBAAY;AAAA,IAChB,CAAC,MAA2B;AAC1B,UAAI,EAAE,KAAK,WAAW,OAAO,GAAG;AAC9B,YAAI,uBAAwB,gBAAe,EAAE,GAAG;AAAA,YAC3C,gBAAe,CAAC,cAAc,YAAY,EAAE,GAAG;AAEpD,kCAA0B,KAAK;AAC/B,YAAI,WAAW,QAAS,cAAa,WAAW,OAAO;AACvD,mBAAW,UAAU,WAAW,MAAM;AACpC,oCAA0B,IAAI;AAAA,QAChC,GAAG,GAAI;AAAA,MACT;AAAA,IACF;AAAA,IACA,CAAC,sBAAsB;AAAA,EACzB;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
@@ -32,58 +32,82 @@ __export(usePaginator_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(usePaginator_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
|
-
var import_react = require("react");
|
|
36
35
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
37
|
-
var
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
38
|
+
var import_useValidateProps = require("./useValidateProps.js");
|
|
39
|
+
var import_useOnElementOnResize = require("../../shared/useOnElementOnResize.js");
|
|
38
40
|
var import_getOptions = require("./getOptions.js");
|
|
39
|
-
var
|
|
40
|
-
const usePaginator = (
|
|
41
|
-
const
|
|
41
|
+
var import_usePaginationSearch = require("./usePaginationSearch.js");
|
|
42
|
+
const usePaginator = (propsFromUser) => {
|
|
43
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
|
|
44
|
+
(0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSPaginatorPropTypesSchema);
|
|
45
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
|
|
46
|
+
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(
|
|
47
|
+
propsWithDefault
|
|
48
|
+
);
|
|
49
|
+
const ownerPropsConfig = (0, import_ds_props_helpers.useOwnerProps)(propsWithDefault);
|
|
50
|
+
const { pageIndex, pageCount, pageDetails } = propsWithDefault;
|
|
42
51
|
const [isOpened, setIsOpened] = (0, import_react.useState)(false);
|
|
43
|
-
const [detailWidth, setDetailWidth] = (0, import_react.useState)(0);
|
|
44
|
-
const [pageInfoWidth, setPageInfoWidth] = (0, import_react.useState)(0);
|
|
45
52
|
const btnRef = (0, import_react.useRef)(null);
|
|
46
53
|
const actionRef = (0, import_react.useRef)({});
|
|
54
|
+
const widestChildRef = import_react.default.useRef(null);
|
|
55
|
+
const pageInfoRef = import_react.default.useRef(null);
|
|
56
|
+
const checkMarkRef = (0, import_react.useRef)(null);
|
|
47
57
|
const { width: btnWidth } = (0, import_useOnElementOnResize.useOnElementResize)(btnRef);
|
|
58
|
+
const { width: checkMarkWidth } = (0, import_useOnElementOnResize.useOnElementResize)(checkMarkRef);
|
|
59
|
+
const { width: pageInfoWidth } = (0, import_useOnElementOnResize.useOnElementResize)(pageInfoRef);
|
|
60
|
+
const { width: detailWidth } = (0, import_useOnElementOnResize.useOnElementResize)(widestChildRef);
|
|
48
61
|
const options = (0, import_react.useMemo)(
|
|
49
|
-
() => (0, import_getOptions.getOptions)({ pageCount, pageIndex, pageDetails, pageInfoWidth }),
|
|
50
|
-
[pageCount, pageIndex, pageDetails, pageInfoWidth]
|
|
62
|
+
() => (0, import_getOptions.getOptions)({ pageCount, pageIndex, pageDetails, pageInfoWidth, checkMarkWidth }),
|
|
63
|
+
[pageCount, pageIndex, pageDetails, pageInfoWidth, checkMarkWidth]
|
|
51
64
|
);
|
|
52
65
|
const onKeyDown = (0, import_usePaginationSearch.usePaginationSearch)(pageCount, actionRef);
|
|
53
|
-
const globalAttributes = (0, import_ds_props_helpers.useGetGlobalAttributes)(props);
|
|
54
|
-
const xstyledAttributes = (0, import_ds_props_helpers.useGetXstyledProps)(props);
|
|
55
66
|
(0, import_react.useEffect)(() => {
|
|
56
67
|
if (isOpened) {
|
|
57
68
|
actionRef.current.setActiveDescendant(pageIndex.toString());
|
|
58
69
|
actionRef.current.scrollOptionIntoView(pageIndex.toString());
|
|
59
70
|
}
|
|
60
71
|
}, [isOpened]);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
return import_react.default.useMemo(
|
|
73
|
+
() => ({
|
|
74
|
+
propsWithDefault,
|
|
75
|
+
xstyledProps,
|
|
76
|
+
globalAttributes,
|
|
77
|
+
ownerPropsConfig,
|
|
78
|
+
btnRef,
|
|
79
|
+
btnWidth,
|
|
80
|
+
pageInfoWidth,
|
|
81
|
+
pageInfoRef,
|
|
82
|
+
options,
|
|
83
|
+
isOpened,
|
|
84
|
+
detailWidth,
|
|
85
|
+
actionRef,
|
|
86
|
+
widestChildRef,
|
|
87
|
+
checkMarkRef,
|
|
88
|
+
checkMarkWidth,
|
|
89
|
+
setIsOpened,
|
|
90
|
+
onKeyDown
|
|
91
|
+
}),
|
|
92
|
+
[
|
|
93
|
+
propsWithDefault,
|
|
94
|
+
xstyledProps,
|
|
95
|
+
globalAttributes,
|
|
96
|
+
ownerPropsConfig,
|
|
97
|
+
btnRef,
|
|
98
|
+
btnWidth,
|
|
99
|
+
pageInfoWidth,
|
|
100
|
+
options,
|
|
101
|
+
isOpened,
|
|
102
|
+
detailWidth,
|
|
103
|
+
actionRef,
|
|
104
|
+
widestChildRef,
|
|
105
|
+
checkMarkRef,
|
|
106
|
+
checkMarkWidth,
|
|
107
|
+
pageInfoRef,
|
|
108
|
+
setIsOpened,
|
|
109
|
+
onKeyDown
|
|
110
|
+
]
|
|
111
|
+
);
|
|
88
112
|
};
|
|
89
113
|
//# sourceMappingURL=usePaginator.js.map
|