@majoo-ui/react 2.1.0-rc.1 → 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 +52 -31
- package/package.json +2 -2
|
@@ -500,7 +500,7 @@ function HeaderMenuOption(props) {
|
|
|
500
500
|
id: `idx-${index}`,
|
|
501
501
|
label: item.Header,
|
|
502
502
|
value: item.id,
|
|
503
|
-
disabled: index === 0
|
|
503
|
+
disabled: index === 0 || item.disableShowHide
|
|
504
504
|
}, index), row.length !== index + 1 && jsx(Separator, {})]
|
|
505
505
|
}, index))
|
|
506
506
|
})
|
|
@@ -541,7 +541,7 @@ function HeaderMenuOption(props) {
|
|
|
541
541
|
id: `idx-${index}`,
|
|
542
542
|
label: item.Header,
|
|
543
543
|
value: item.id,
|
|
544
|
-
disabled: index === 0
|
|
544
|
+
disabled: index === 0 || item.disableShowHide
|
|
545
545
|
}), row.length !== index + 1 && jsx(Separator, {})]
|
|
546
546
|
}, index))
|
|
547
547
|
})
|
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@majoo-ui/react",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"main": "./index.esm.js",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@floating-ui/react": "^0.19.2",
|
|
38
38
|
"@majoo-ui/core": "1.32.0",
|
|
39
39
|
"@majoo-ui/helpers": "1.30.9",
|
|
40
|
-
"@majoo-ui/icons": "1.40.
|
|
40
|
+
"@majoo-ui/icons": "1.40.3",
|
|
41
41
|
"@monsonjeremy/react-leaflet": "^3.2.2",
|
|
42
42
|
"@radix-ui/react-accordion": "^1.0.0",
|
|
43
43
|
"@radix-ui/react-alert-dialog": "^1.0.3",
|