@majoo-ui/react 2.1.0 → 2.1.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.
- package/components/table/Table.esm.js +50 -29
- package/index.esm.css +4 -4
- package/package.json +1 -1
|
@@ -609,6 +609,7 @@ function Table({
|
|
|
609
609
|
showDuplicatedData,
|
|
610
610
|
onRowClick,
|
|
611
611
|
hidePagination = false,
|
|
612
|
+
paginationLabel,
|
|
612
613
|
searchQuery,
|
|
613
614
|
additionalExceptionIds = [],
|
|
614
615
|
expanded: controlledExpanded = {},
|
|
@@ -736,36 +737,56 @@ function Table({
|
|
|
736
737
|
});
|
|
737
738
|
if (fetchData) fetchData(fetchParams);
|
|
738
739
|
};
|
|
739
|
-
const renderFooter = () =>
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
740
|
+
const renderFooter = () => {
|
|
741
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
742
|
+
return jsx(Pagination, {
|
|
743
|
+
hidePagination: hidePagination || isExpandableTree,
|
|
744
|
+
hideInputPageSection: false,
|
|
745
|
+
limit: pageSize,
|
|
746
|
+
currentPage: pageIndex + 1,
|
|
747
|
+
totalData: totalData,
|
|
748
|
+
totalPage: totalPage,
|
|
749
|
+
onLimitChange: selectedItem => {
|
|
750
|
+
if (selectedItem) {
|
|
751
|
+
// always reset page when limit changed
|
|
752
|
+
gotoPage(0);
|
|
753
|
+
doFetchData(0, selectedItem);
|
|
754
|
+
setPageSize(selectedItem);
|
|
755
|
+
setLimit(selectedItem);
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
hideDataInfo: hideDataInfo || isExpandableTree,
|
|
759
|
+
onPageChange: page => {
|
|
760
|
+
doFetchData(page - 1, pageSize);
|
|
761
|
+
gotoPage(page - 1);
|
|
762
|
+
},
|
|
763
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
764
|
+
showingText: (_a = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.showingText) !== null && _a !== void 0 ? _a : t('pagination.showingText', 'Tampilkan:'),
|
|
765
|
+
showingCountText: (_b = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.showingCountText) !== null && _b !== void 0 ? _b : ({
|
|
766
|
+
from,
|
|
767
|
+
to,
|
|
768
|
+
total
|
|
769
|
+
}) => t('pagination.showingCountText', `Ditampilkan ${from} - ${to} dari ${total} data`, {
|
|
770
|
+
from,
|
|
771
|
+
to,
|
|
772
|
+
total
|
|
773
|
+
}),
|
|
774
|
+
dialogShowingText: (_c = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.dialogShowingText) !== null && _c !== void 0 ? _c : t('pagination.dialogShowingText', 'Tampilkan Data'),
|
|
775
|
+
previousButton: (_d = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.previousButton) !== null && _d !== void 0 ? _d : t('pagination.previousButton', 'Sebelumnya'),
|
|
776
|
+
nextButton: (_e = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.nextButton) !== null && _e !== void 0 ? _e : t('pagination.nextButton', 'Selanjutnya'),
|
|
777
|
+
gotoPageText: (_f = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.gotoPageText) !== null && _f !== void 0 ? _f : t('pagination.gotoPageText', 'Ke Halaman'),
|
|
778
|
+
goToPagePlaceholder: (_g = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.goToPagePlaceholder) !== null && _g !== void 0 ? _g : t('pagination.goToPagePlaceholder', 'Contoh: 10'),
|
|
779
|
+
btnCancelText: (_h = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.btnCancelText) !== null && _h !== void 0 ? _h : t('pagination.btnCancelText', 'Batal'),
|
|
780
|
+
btnSubmitText: (_j = paginationLabel === null || paginationLabel === void 0 ? void 0 : paginationLabel.btnSubmitText) !== null && _j !== void 0 ? _j : t('pagination.btnSubmitText', 'Lanjutkan'),
|
|
781
|
+
css: {
|
|
782
|
+
backgroundColor: '$bgWhite',
|
|
783
|
+
padding: '$spacing-04 0',
|
|
784
|
+
'@md': {
|
|
785
|
+
padding: '$spacing-06 $spacing-03'
|
|
786
|
+
}
|
|
766
787
|
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
788
|
+
});
|
|
789
|
+
};
|
|
769
790
|
const renderInfiniteScrollWrapper = children => jsx(ConditionalWrapper, {
|
|
770
791
|
condition: isInfiniteScroll && rawData.length > 0,
|
|
771
792
|
wrapper: children => jsx(InfiniteScroll, {
|
package/index.esm.css
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
.recharts-pie-sector {
|
|
2
|
-
outline: none;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.rdw-option-wrapper {
|
|
6
2
|
padding: 5px;
|
|
7
3
|
min-width: 25px;
|
|
@@ -1049,6 +1045,10 @@
|
|
|
1049
1045
|
counter-reset: ol4;
|
|
1050
1046
|
}
|
|
1051
1047
|
|
|
1048
|
+
.recharts-pie-sector {
|
|
1049
|
+
outline: none;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
1052
|
.ReactCrop {
|
|
1053
1053
|
position: relative;
|
|
1054
1054
|
display: inline-block;
|