@majoo-ui/react 1.55.0 → 1.55.1
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.
|
@@ -15,6 +15,7 @@ interface IInputResourceListProps {
|
|
|
15
15
|
counterFooterText: string;
|
|
16
16
|
isLoading: boolean;
|
|
17
17
|
enabledItems?: string[];
|
|
18
|
+
emptyDataMessage?: string;
|
|
18
19
|
value?: IResource[];
|
|
19
20
|
fetchData?(props: {
|
|
20
21
|
query?: string;
|
|
@@ -26,5 +27,5 @@ interface IInputResourceListProps {
|
|
|
26
27
|
title?: string;
|
|
27
28
|
hideSelectAll?: boolean;
|
|
28
29
|
}
|
|
29
|
-
declare function InputResourceList({ data, disabled, onItemCheck, onItemUncheck, searchPlaceholder, counterFooterText, isLoading, enabledItems, value, fetchData, onQueryChange, css, defaultSort, title, hideSelectAll }: IInputResourceListProps): JSX.Element;
|
|
30
|
+
declare function InputResourceList({ data, disabled, onItemCheck, onItemUncheck, searchPlaceholder, counterFooterText, isLoading, enabledItems, emptyDataMessage, value, fetchData, onQueryChange, css, defaultSort, title, hideSelectAll, }: IInputResourceListProps): JSX.Element;
|
|
30
31
|
export default InputResourceList;
|
|
@@ -1123,6 +1123,10 @@ export interface TableProps {
|
|
|
1123
1123
|
* Total amount of the data.
|
|
1124
1124
|
*/
|
|
1125
1125
|
totalData?: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* Total amount of the page.
|
|
1128
|
+
*/
|
|
1129
|
+
totalPage?: number;
|
|
1126
1130
|
/**
|
|
1127
1131
|
* Function executed when pagination or sorter is changed.<br/>
|
|
1128
1132
|
* interface FetchDataParams { <br/>
|
|
@@ -1235,7 +1239,7 @@ export interface TableProps {
|
|
|
1235
1239
|
showDuplicatedData?: boolean;
|
|
1236
1240
|
onRowClick?: (record: Row, index: number) => void;
|
|
1237
1241
|
}
|
|
1238
|
-
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps, isLoading, css, headerCss, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, }: TableProps): JSX.Element;
|
|
1242
|
+
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps, isLoading, css, headerCss, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, }: TableProps): JSX.Element;
|
|
1239
1243
|
export interface TableColumnProps {
|
|
1240
1244
|
/**
|
|
1241
1245
|
* Required if accessor is a function<br/>
|
package/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import React__default, { useState, createContext, useContext, useEffect, useRef,
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createStitches, styled as styled$1 } from '@stitches/react';
|
|
5
5
|
import { foundations } from '@majoo-ui/core';
|
|
6
|
-
import { CloseOutline, UserFilled, CircleQuestionOutline, SearchOutline, CloseFilled, CircleInfoOutline, CaretDownOutline, ChevronUpOutline, ChevronDownOutline, CirclePlusOutline, MinusOutline, PlusOutline, ChevronLgLeftOutline, ChevronLgRightOutline, ChevronLeftOutline, ChevronRightOutline, TimeOutline, CalendarOutline, ArrowLeftOutline, ArrowRightOutline, EllipsisHorizontalOutline, EyeOutline, UploadOutline, ImageOutline, ChevronUpDownOutline, CheckFilled, RemoveOutline, LocationOutline } from '@majoo-ui/icons';
|
|
6
|
+
import { CloseOutline, UserFilled, CircleQuestionOutline, SearchOutline, CloseFilled, CircleInfoOutline, CaretDownOutline, ChevronUpOutline, ChevronDownOutline, CirclePlusOutline, SortingOutline, MinusOutline, PlusOutline, ChevronLgLeftOutline, ChevronLgRightOutline, ChevronLeftOutline, ChevronRightOutline, TimeOutline, CalendarOutline, ArrowLeftOutline, ArrowRightOutline, EllipsisHorizontalOutline, EyeOutline, UploadOutline, ImageOutline, ChevronUpDownOutline, CheckFilled, RemoveOutline, LocationOutline } from '@majoo-ui/icons';
|
|
7
7
|
import { Transition } from 'react-transition-group';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
import { Portal } from '@majoo-ui/helpers';
|
|
@@ -10645,15 +10645,10 @@ InputCreatable.defaultProps = {
|
|
|
10645
10645
|
value: ''
|
|
10646
10646
|
};
|
|
10647
10647
|
|
|
10648
|
-
const SortingIcon = styled(
|
|
10649
|
-
marginTop: 1,
|
|
10648
|
+
const SortingIcon = styled(Flex$1, {
|
|
10650
10649
|
cursor: 'pointer',
|
|
10651
|
-
'
|
|
10652
|
-
|
|
10653
|
-
content: `url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='%23A5ABAB'%3E%3Cpath d='m9.38 3.95 2.462 3.134c.338.43.098 1.166-.38 1.166H6.538c-.478 0-.718-.736-.38-1.166L8.62 3.95c.21-.267.55-.267.76 0zM9.38 14.05l2.462-3.134c.338-.43.098-1.166-.38-1.166H6.538c-.478 0-.718.736-.38 1.166L8.62 14.05c.21.267.55.267.76 0z'/%3E%3C/g%3E%3C/svg%3E")`,
|
|
10654
|
-
margin: '0 $spacing-02 $spacing-01 0',
|
|
10655
|
-
opacity: 1
|
|
10656
|
-
}
|
|
10650
|
+
alignItems: 'center',
|
|
10651
|
+
justifyContent: 'center'
|
|
10657
10652
|
});
|
|
10658
10653
|
|
|
10659
10654
|
function InputResourceList({
|
|
@@ -10665,6 +10660,7 @@ function InputResourceList({
|
|
|
10665
10660
|
counterFooterText = 'kategori dipilih',
|
|
10666
10661
|
isLoading = false,
|
|
10667
10662
|
enabledItems,
|
|
10663
|
+
emptyDataMessage,
|
|
10668
10664
|
value,
|
|
10669
10665
|
fetchData,
|
|
10670
10666
|
onQueryChange,
|
|
@@ -10852,23 +10848,31 @@ function InputResourceList({
|
|
|
10852
10848
|
disabled: disabled
|
|
10853
10849
|
}, void 0), defaultSort && jsxs(Flex$1, Object.assign({
|
|
10854
10850
|
align: "center",
|
|
10855
|
-
gap:
|
|
10851
|
+
gap: 3,
|
|
10856
10852
|
css: {
|
|
10857
10853
|
paddingLeft: !hideSelectAll ? 16 : 0,
|
|
10858
|
-
marginTop: '$spacing-
|
|
10854
|
+
marginTop: '$spacing-05'
|
|
10859
10855
|
}
|
|
10860
10856
|
}, {
|
|
10861
10857
|
children: [!hideSelectAll && jsx(InputCheckbox, {
|
|
10862
10858
|
checked: (value === null || value === void 0 ? void 0 : value.length) === (data === null || data === void 0 ? void 0 : data.length),
|
|
10863
10859
|
indeterminate: Boolean((value === null || value === void 0 ? void 0 : value.length) && (value === null || value === void 0 ? void 0 : value.length) < (data === null || data === void 0 ? void 0 : data.length)),
|
|
10864
|
-
onCheckedChange: toggleCheckAll
|
|
10865
|
-
|
|
10866
|
-
|
|
10860
|
+
onCheckedChange: toggleCheckAll,
|
|
10861
|
+
css: {
|
|
10862
|
+
marginRight: '$spacing-02'
|
|
10863
|
+
}
|
|
10864
|
+
}, void 0), jsx(Heading, Object.assign({
|
|
10865
|
+
heading: "headerTable"
|
|
10867
10866
|
}, {
|
|
10868
|
-
children: title || '
|
|
10869
|
-
}), void 0), jsx(SortingIcon, {
|
|
10867
|
+
children: title || 'Urutkan'
|
|
10868
|
+
}), void 0), jsx(SortingIcon, Object.assign({
|
|
10870
10869
|
onClick: toggleSort
|
|
10871
|
-
},
|
|
10870
|
+
}, {
|
|
10871
|
+
children: jsx(SortingOutline, {
|
|
10872
|
+
size: 16,
|
|
10873
|
+
color: colors$4.iconSecondary
|
|
10874
|
+
}, void 0)
|
|
10875
|
+
}), void 0)]
|
|
10872
10876
|
}), void 0), isLoading && jsx(Flex$1, Object.assign({
|
|
10873
10877
|
justify: "center",
|
|
10874
10878
|
align: "center",
|
|
@@ -10906,10 +10910,12 @@ function InputResourceList({
|
|
|
10906
10910
|
width: '100%'
|
|
10907
10911
|
}
|
|
10908
10912
|
}, {
|
|
10909
|
-
children: jsx(
|
|
10910
|
-
|
|
10913
|
+
children: jsx(Paragraph, Object.assign({
|
|
10914
|
+
paragraph: "shortContentRegular",
|
|
10915
|
+
align: "center",
|
|
10916
|
+
color: "secondary"
|
|
10911
10917
|
}, {
|
|
10912
|
-
children:
|
|
10918
|
+
children: emptyDataMessage || 'Tidak ada data'
|
|
10913
10919
|
}), void 0)
|
|
10914
10920
|
}), void 0), jsx(ConditionalWrapper, Object.assign({
|
|
10915
10921
|
condition: !!fetchData && data.length > 0,
|
|
@@ -18166,7 +18172,7 @@ function PaginationInfo(_ref) {
|
|
|
18166
18172
|
}, `Ditampilkan ${(currentPage - 1) * selectedLimit + 1} - ${selectedLimit * currentPage < totalData ? selectedLimit * currentPage : totalData} dari ${totalData} data`));
|
|
18167
18173
|
}
|
|
18168
18174
|
|
|
18169
|
-
const _excluded$2 = ["limit", "currentPage", "totalData", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions"];
|
|
18175
|
+
const _excluded$2 = ["limit", "currentPage", "totalData", "totalPage", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions"];
|
|
18170
18176
|
var _jsxFileName$h = "/home/alfiantryp/Project/majoo-ui/packages/react/src/components/pagination/Pagination.js";
|
|
18171
18177
|
|
|
18172
18178
|
function Pagination(_ref) {
|
|
@@ -18174,6 +18180,7 @@ function Pagination(_ref) {
|
|
|
18174
18180
|
limit,
|
|
18175
18181
|
currentPage,
|
|
18176
18182
|
totalData,
|
|
18183
|
+
totalPage,
|
|
18177
18184
|
hideDataInfo,
|
|
18178
18185
|
onLimitChange,
|
|
18179
18186
|
onPageChange,
|
|
@@ -18181,9 +18188,9 @@ function Pagination(_ref) {
|
|
|
18181
18188
|
} = _ref,
|
|
18182
18189
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
18183
18190
|
|
|
18184
|
-
const totalPages = Math.ceil(totalData / limit);
|
|
18191
|
+
const totalPages = totalPage || Math.ceil(totalData / limit);
|
|
18185
18192
|
const isMobile = useMediaQuery('(max-width: 700px)');
|
|
18186
|
-
return
|
|
18193
|
+
return /*#__PURE__*/React__default.createElement(Flex$1, _extends({
|
|
18187
18194
|
direction: isMobile ? 'columnReverse' : 'row',
|
|
18188
18195
|
align: "center",
|
|
18189
18196
|
justify: "between",
|
|
@@ -18192,7 +18199,7 @@ function Pagination(_ref) {
|
|
|
18192
18199
|
__self: this,
|
|
18193
18200
|
__source: {
|
|
18194
18201
|
fileName: _jsxFileName$h,
|
|
18195
|
-
lineNumber:
|
|
18202
|
+
lineNumber: 22,
|
|
18196
18203
|
columnNumber: 5
|
|
18197
18204
|
}
|
|
18198
18205
|
}), !hideDataInfo ? /*#__PURE__*/React__default.createElement(PaginationInfo, {
|
|
@@ -18204,14 +18211,14 @@ function Pagination(_ref) {
|
|
|
18204
18211
|
__self: this,
|
|
18205
18212
|
__source: {
|
|
18206
18213
|
fileName: _jsxFileName$h,
|
|
18207
|
-
lineNumber:
|
|
18214
|
+
lineNumber: 24,
|
|
18208
18215
|
columnNumber: 9
|
|
18209
18216
|
}
|
|
18210
18217
|
}) : /*#__PURE__*/React__default.createElement(Box, {
|
|
18211
18218
|
__self: this,
|
|
18212
18219
|
__source: {
|
|
18213
18220
|
fileName: _jsxFileName$h,
|
|
18214
|
-
lineNumber:
|
|
18221
|
+
lineNumber: 32,
|
|
18215
18222
|
columnNumber: 9
|
|
18216
18223
|
}
|
|
18217
18224
|
}), /*#__PURE__*/React__default.createElement(PaginationButton, {
|
|
@@ -18221,23 +18228,17 @@ function Pagination(_ref) {
|
|
|
18221
18228
|
__self: this,
|
|
18222
18229
|
__source: {
|
|
18223
18230
|
fileName: _jsxFileName$h,
|
|
18224
|
-
lineNumber:
|
|
18231
|
+
lineNumber: 35,
|
|
18225
18232
|
columnNumber: 7
|
|
18226
18233
|
}
|
|
18227
|
-
}))
|
|
18228
|
-
__self: this,
|
|
18229
|
-
__source: {
|
|
18230
|
-
fileName: _jsxFileName$h,
|
|
18231
|
-
lineNumber: 37,
|
|
18232
|
-
columnNumber: 5
|
|
18233
|
-
}
|
|
18234
|
-
});
|
|
18234
|
+
}));
|
|
18235
18235
|
}
|
|
18236
18236
|
|
|
18237
18237
|
Pagination.propTypes = {
|
|
18238
18238
|
limit: PropTypes.number,
|
|
18239
18239
|
currentPage: PropTypes.number,
|
|
18240
18240
|
totalData: PropTypes.number,
|
|
18241
|
+
totalPage: PropTypes.number,
|
|
18241
18242
|
hideDataInfo: PropTypes.bool,
|
|
18242
18243
|
onLimitChange: PropTypes.func,
|
|
18243
18244
|
onPageChange: PropTypes.func
|
|
@@ -18920,6 +18921,7 @@ function Table({
|
|
|
18920
18921
|
data: rawData,
|
|
18921
18922
|
keyId = 'id',
|
|
18922
18923
|
pageIndex: controlledPageIndex = 0,
|
|
18924
|
+
totalPage,
|
|
18923
18925
|
totalData = 0,
|
|
18924
18926
|
fetchData,
|
|
18925
18927
|
hideDataInfo = false,
|
|
@@ -18973,7 +18975,7 @@ function Table({
|
|
|
18973
18975
|
manualPagination: !!fetchData,
|
|
18974
18976
|
manualSortBy: !!fetchData,
|
|
18975
18977
|
defaultCanSort: true,
|
|
18976
|
-
pageCount: Math.ceil(totalData / limit),
|
|
18978
|
+
pageCount: totalPage || Math.ceil(totalData / limit),
|
|
18977
18979
|
autoResetSortBy: false,
|
|
18978
18980
|
autoResetExpanded: true,
|
|
18979
18981
|
autoResetPage: false,
|
|
@@ -19017,6 +19019,7 @@ function Table({
|
|
|
19017
19019
|
limit: pageSize,
|
|
19018
19020
|
currentPage: pageIndex + 1,
|
|
19019
19021
|
totalData: totalData,
|
|
19022
|
+
totalPage: totalPage,
|
|
19020
19023
|
onLimitChange: selectedItem => {
|
|
19021
19024
|
if (selectedItem) {
|
|
19022
19025
|
doFetchData(pageIndex, selectedItem);
|
package/index.umd.js
CHANGED
|
@@ -10780,15 +10780,10 @@
|
|
|
10780
10780
|
value: ''
|
|
10781
10781
|
};
|
|
10782
10782
|
|
|
10783
|
-
var SortingIcon = styled(
|
|
10784
|
-
marginTop: 1,
|
|
10783
|
+
var SortingIcon = styled(Flex$1, {
|
|
10785
10784
|
cursor: 'pointer',
|
|
10786
|
-
'
|
|
10787
|
-
|
|
10788
|
-
content: "url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='%23A5ABAB'%3E%3Cpath d='m9.38 3.95 2.462 3.134c.338.43.098 1.166-.38 1.166H6.538c-.478 0-.718-.736-.38-1.166L8.62 3.95c.21-.267.55-.267.76 0zM9.38 14.05l2.462-3.134c.338-.43.098-1.166-.38-1.166H6.538c-.478 0-.718.736-.38 1.166L8.62 14.05c.21.267.55.267.76 0z'/%3E%3C/g%3E%3C/svg%3E\")",
|
|
10789
|
-
margin: '0 $spacing-02 $spacing-01 0',
|
|
10790
|
-
opacity: 1
|
|
10791
|
-
}
|
|
10785
|
+
alignItems: 'center',
|
|
10786
|
+
justifyContent: 'center'
|
|
10792
10787
|
});
|
|
10793
10788
|
|
|
10794
10789
|
function InputResourceList(_a) {
|
|
@@ -10804,6 +10799,7 @@
|
|
|
10804
10799
|
_e = _a.isLoading,
|
|
10805
10800
|
isLoading = _e === void 0 ? false : _e,
|
|
10806
10801
|
enabledItems = _a.enabledItems,
|
|
10802
|
+
emptyDataMessage = _a.emptyDataMessage,
|
|
10807
10803
|
value = _a.value,
|
|
10808
10804
|
fetchData = _a.fetchData,
|
|
10809
10805
|
onQueryChange = _a.onQueryChange,
|
|
@@ -11016,23 +11012,31 @@
|
|
|
11016
11012
|
disabled: disabled
|
|
11017
11013
|
}, void 0), defaultSort && jsxRuntime.jsxs(Flex$1, __assign({
|
|
11018
11014
|
align: "center",
|
|
11019
|
-
gap:
|
|
11015
|
+
gap: 3,
|
|
11020
11016
|
css: {
|
|
11021
11017
|
paddingLeft: !hideSelectAll ? 16 : 0,
|
|
11022
|
-
marginTop: '$spacing-
|
|
11018
|
+
marginTop: '$spacing-05'
|
|
11023
11019
|
}
|
|
11024
11020
|
}, {
|
|
11025
11021
|
children: [!hideSelectAll && jsxRuntime.jsx(InputCheckbox, {
|
|
11026
11022
|
checked: (value === null || value === void 0 ? void 0 : value.length) === (data === null || data === void 0 ? void 0 : data.length),
|
|
11027
11023
|
indeterminate: Boolean((value === null || value === void 0 ? void 0 : value.length) && (value === null || value === void 0 ? void 0 : value.length) < (data === null || data === void 0 ? void 0 : data.length)),
|
|
11028
|
-
onCheckedChange: toggleCheckAll
|
|
11029
|
-
|
|
11030
|
-
|
|
11024
|
+
onCheckedChange: toggleCheckAll,
|
|
11025
|
+
css: {
|
|
11026
|
+
marginRight: '$spacing-02'
|
|
11027
|
+
}
|
|
11028
|
+
}, void 0), jsxRuntime.jsx(Heading, __assign({
|
|
11029
|
+
heading: "headerTable"
|
|
11031
11030
|
}, {
|
|
11032
|
-
children: title || '
|
|
11033
|
-
}), void 0), jsxRuntime.jsx(SortingIcon, {
|
|
11031
|
+
children: title || 'Urutkan'
|
|
11032
|
+
}), void 0), jsxRuntime.jsx(SortingIcon, __assign({
|
|
11034
11033
|
onClick: toggleSort
|
|
11035
|
-
},
|
|
11034
|
+
}, {
|
|
11035
|
+
children: jsxRuntime.jsx(icons.SortingOutline, {
|
|
11036
|
+
size: 16,
|
|
11037
|
+
color: colors$4.iconSecondary
|
|
11038
|
+
}, void 0)
|
|
11039
|
+
}), void 0)]
|
|
11036
11040
|
}), void 0), isLoading && jsxRuntime.jsx(Flex$1, __assign({
|
|
11037
11041
|
justify: "center",
|
|
11038
11042
|
align: "center",
|
|
@@ -11070,10 +11074,12 @@
|
|
|
11070
11074
|
width: '100%'
|
|
11071
11075
|
}
|
|
11072
11076
|
}, {
|
|
11073
|
-
children: jsxRuntime.jsx(
|
|
11074
|
-
|
|
11077
|
+
children: jsxRuntime.jsx(Paragraph, __assign({
|
|
11078
|
+
paragraph: "shortContentRegular",
|
|
11079
|
+
align: "center",
|
|
11080
|
+
color: "secondary"
|
|
11075
11081
|
}, {
|
|
11076
|
-
children:
|
|
11082
|
+
children: emptyDataMessage || 'Tidak ada data'
|
|
11077
11083
|
}), void 0)
|
|
11078
11084
|
}), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
11079
11085
|
condition: !!fetchData && data.length > 0,
|
|
@@ -18471,7 +18477,7 @@
|
|
|
18471
18477
|
}, `Ditampilkan ${(currentPage - 1) * selectedLimit + 1} - ${selectedLimit * currentPage < totalData ? selectedLimit * currentPage : totalData} dari ${totalData} data`));
|
|
18472
18478
|
}
|
|
18473
18479
|
|
|
18474
|
-
const _excluded$2 = ["limit", "currentPage", "totalData", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions"];
|
|
18480
|
+
const _excluded$2 = ["limit", "currentPage", "totalData", "totalPage", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions"];
|
|
18475
18481
|
var _jsxFileName$h = "/home/alfiantryp/Project/majoo-ui/packages/react/src/components/pagination/Pagination.js";
|
|
18476
18482
|
|
|
18477
18483
|
function Pagination(_ref) {
|
|
@@ -18479,6 +18485,7 @@
|
|
|
18479
18485
|
limit,
|
|
18480
18486
|
currentPage,
|
|
18481
18487
|
totalData,
|
|
18488
|
+
totalPage,
|
|
18482
18489
|
hideDataInfo,
|
|
18483
18490
|
onLimitChange,
|
|
18484
18491
|
onPageChange,
|
|
@@ -18486,9 +18493,9 @@
|
|
|
18486
18493
|
} = _ref,
|
|
18487
18494
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
18488
18495
|
|
|
18489
|
-
const totalPages = Math.ceil(totalData / limit);
|
|
18496
|
+
const totalPages = totalPage || Math.ceil(totalData / limit);
|
|
18490
18497
|
const isMobile = useMediaQuery('(max-width: 700px)');
|
|
18491
|
-
return
|
|
18498
|
+
return /*#__PURE__*/React__default["default"].createElement(Flex$1, _extends({
|
|
18492
18499
|
direction: isMobile ? 'columnReverse' : 'row',
|
|
18493
18500
|
align: "center",
|
|
18494
18501
|
justify: "between",
|
|
@@ -18497,7 +18504,7 @@
|
|
|
18497
18504
|
__self: this,
|
|
18498
18505
|
__source: {
|
|
18499
18506
|
fileName: _jsxFileName$h,
|
|
18500
|
-
lineNumber:
|
|
18507
|
+
lineNumber: 22,
|
|
18501
18508
|
columnNumber: 5
|
|
18502
18509
|
}
|
|
18503
18510
|
}), !hideDataInfo ? /*#__PURE__*/React__default["default"].createElement(PaginationInfo, {
|
|
@@ -18509,14 +18516,14 @@
|
|
|
18509
18516
|
__self: this,
|
|
18510
18517
|
__source: {
|
|
18511
18518
|
fileName: _jsxFileName$h,
|
|
18512
|
-
lineNumber:
|
|
18519
|
+
lineNumber: 24,
|
|
18513
18520
|
columnNumber: 9
|
|
18514
18521
|
}
|
|
18515
18522
|
}) : /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
18516
18523
|
__self: this,
|
|
18517
18524
|
__source: {
|
|
18518
18525
|
fileName: _jsxFileName$h,
|
|
18519
|
-
lineNumber:
|
|
18526
|
+
lineNumber: 32,
|
|
18520
18527
|
columnNumber: 9
|
|
18521
18528
|
}
|
|
18522
18529
|
}), /*#__PURE__*/React__default["default"].createElement(PaginationButton, {
|
|
@@ -18526,23 +18533,17 @@
|
|
|
18526
18533
|
__self: this,
|
|
18527
18534
|
__source: {
|
|
18528
18535
|
fileName: _jsxFileName$h,
|
|
18529
|
-
lineNumber:
|
|
18536
|
+
lineNumber: 35,
|
|
18530
18537
|
columnNumber: 7
|
|
18531
18538
|
}
|
|
18532
|
-
}))
|
|
18533
|
-
__self: this,
|
|
18534
|
-
__source: {
|
|
18535
|
-
fileName: _jsxFileName$h,
|
|
18536
|
-
lineNumber: 37,
|
|
18537
|
-
columnNumber: 5
|
|
18538
|
-
}
|
|
18539
|
-
});
|
|
18539
|
+
}));
|
|
18540
18540
|
}
|
|
18541
18541
|
|
|
18542
18542
|
Pagination.propTypes = {
|
|
18543
18543
|
limit: PropTypes__default["default"].number,
|
|
18544
18544
|
currentPage: PropTypes__default["default"].number,
|
|
18545
18545
|
totalData: PropTypes__default["default"].number,
|
|
18546
|
+
totalPage: PropTypes__default["default"].number,
|
|
18546
18547
|
hideDataInfo: PropTypes__default["default"].bool,
|
|
18547
18548
|
onLimitChange: PropTypes__default["default"].func,
|
|
18548
18549
|
onPageChange: PropTypes__default["default"].func
|
|
@@ -19236,6 +19237,7 @@
|
|
|
19236
19237
|
keyId = _b === void 0 ? 'id' : _b,
|
|
19237
19238
|
_c = _a.pageIndex,
|
|
19238
19239
|
controlledPageIndex = _c === void 0 ? 0 : _c,
|
|
19240
|
+
totalPage = _a.totalPage,
|
|
19239
19241
|
_d = _a.totalData,
|
|
19240
19242
|
totalData = _d === void 0 ? 0 : _d,
|
|
19241
19243
|
fetchData = _a.fetchData,
|
|
@@ -19311,7 +19313,7 @@
|
|
|
19311
19313
|
manualPagination: !!fetchData,
|
|
19312
19314
|
manualSortBy: !!fetchData,
|
|
19313
19315
|
defaultCanSort: true,
|
|
19314
|
-
pageCount: Math.ceil(totalData / limit),
|
|
19316
|
+
pageCount: totalPage || Math.ceil(totalData / limit),
|
|
19315
19317
|
autoResetSortBy: false,
|
|
19316
19318
|
autoResetExpanded: true,
|
|
19317
19319
|
autoResetPage: false,
|
|
@@ -19363,6 +19365,7 @@
|
|
|
19363
19365
|
limit: pageSize,
|
|
19364
19366
|
currentPage: pageIndex + 1,
|
|
19365
19367
|
totalData: totalData,
|
|
19368
|
+
totalPage: totalPage,
|
|
19366
19369
|
onLimitChange: function (selectedItem) {
|
|
19367
19370
|
if (selectedItem) {
|
|
19368
19371
|
doFetchData(pageIndex, selectedItem);
|