tycho-components 0.0.17-SNAPSHOT-2 → 0.0.17-SNAPSHOT-4
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.
|
@@ -4,6 +4,7 @@ type Props<TData> = {
|
|
|
4
4
|
totalElements: number;
|
|
5
5
|
pagination: PaginationState;
|
|
6
6
|
setPagination: (p: PaginationState) => void;
|
|
7
|
+
hideItensPage?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export default function AppPagination<TData>({ totalElements, pagination, setPagination, }: Props<TData>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default function AppPagination<TData>({ totalElements, pagination, setPagination, hideItensPage, }: Props<TData>): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -3,7 +3,7 @@ import { MenuItem, Select } from '@mui/material';
|
|
|
3
3
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
import { IconButton } from 'tycho-storybook';
|
|
5
5
|
import './styles.scss';
|
|
6
|
-
export default function AppPagination({ totalElements, pagination, setPagination, }) {
|
|
6
|
+
export default function AppPagination({ totalElements, pagination, setPagination, hideItensPage, }) {
|
|
7
7
|
const { t } = useTranslation('common');
|
|
8
8
|
const numPages = Math.ceil(totalElements / pagination.pageSize);
|
|
9
9
|
const currentPage = pagination.pageIndex + 1;
|
|
@@ -15,7 +15,7 @@ export default function AppPagination({ totalElements, pagination, setPagination
|
|
|
15
15
|
const setPageIndex = (p) => {
|
|
16
16
|
setPagination({ ...pagination, pageIndex: p });
|
|
17
17
|
};
|
|
18
|
-
return (_jsxs("div", { className: "app-table-pagination", children: [_jsxs("div", { className: "itens-page", children: [_jsx("span", { children: t('table.label.rows-page') }), _jsx(Select, { value: pagination.pageSize, onChange: (e) => setPageSize(e.target.value), children: [10, 25, 50].map((size) => (_jsx(MenuItem, { value: size, children: size }, size))) })] }), _jsx("div", { className: "itens-total", children: _jsx("span", { children: _jsx(Trans, { t: t, i18nKey: "table.label.items", values: {
|
|
18
|
+
return (_jsxs("div", { className: "app-table-pagination", children: [!hideItensPage && (_jsxs("div", { className: "itens-page", children: [_jsx("span", { children: t('table.label.rows-page') }), _jsx(Select, { value: pagination.pageSize, onChange: (e) => setPageSize(e.target.value), children: [10, 25, 50].map((size) => (_jsx(MenuItem, { value: size, children: size }, size))) })] })), _jsx("div", { className: "itens-total", children: _jsx("span", { children: _jsx(Trans, { t: t, i18nKey: "table.label.items", values: {
|
|
19
19
|
first: getFirstElementNumber(),
|
|
20
20
|
last: getLastElementNumber(),
|
|
21
21
|
total: totalElements,
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { default as AppPicture } from './AppPicture';
|
|
|
11
11
|
export { default as AppPlaceholder } from './AppPlaceholder';
|
|
12
12
|
export { default as AppSelect } from './AppSelect';
|
|
13
13
|
export { default as AppTable } from './AppTable';
|
|
14
|
-
export { default as AppListTable } from './AppTable';
|
|
14
|
+
export { default as AppListTable } from './AppTable/AppListTable';
|
|
15
15
|
export { default as AppToast } from './AppToast';
|
|
16
16
|
export { default as CommentComponent } from './Comments';
|
|
17
17
|
export { default as Header } from './Header';
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export { default as AppPicture } from './AppPicture';
|
|
|
11
11
|
export { default as AppPlaceholder } from './AppPlaceholder';
|
|
12
12
|
export { default as AppSelect } from './AppSelect';
|
|
13
13
|
export { default as AppTable } from './AppTable';
|
|
14
|
-
export { default as AppListTable } from './AppTable';
|
|
14
|
+
export { default as AppListTable } from './AppTable/AppListTable';
|
|
15
15
|
export { default as AppToast } from './AppToast';
|
|
16
16
|
export { default as CommentComponent } from './Comments';
|
|
17
17
|
export { default as Header } from './Header';
|