@majoo-ui/react 1.60.14-rc.2 → 1.60.14-rc.3
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.d.ts +5 -1
- package/index.esm.js +37 -34
- package/index.umd.js +39 -36
- package/package.json +1 -1
|
@@ -1413,8 +1413,12 @@ export interface TableProps {
|
|
|
1413
1413
|
* Set custom table header component
|
|
1414
1414
|
*/
|
|
1415
1415
|
customHeader?: React.ReactNode;
|
|
1416
|
+
/**
|
|
1417
|
+
* Hide table header row.
|
|
1418
|
+
*/
|
|
1419
|
+
hideHeaderRow?: boolean;
|
|
1416
1420
|
}
|
|
1417
|
-
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, onExpand, id, onColumnChange, virtualized, withoutLimit, customHeader, }: TableProps): JSX.Element;
|
|
1421
|
+
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, onExpand, id, onColumnChange, virtualized, withoutLimit, customHeader, hideHeaderRow, }: TableProps): JSX.Element;
|
|
1418
1422
|
export interface TableColumnProps {
|
|
1419
1423
|
/**
|
|
1420
1424
|
* Required if accessor is a function<br/>
|
package/index.esm.js
CHANGED
|
@@ -23266,7 +23266,8 @@ function Table({
|
|
|
23266
23266
|
onColumnChange,
|
|
23267
23267
|
virtualized = true,
|
|
23268
23268
|
withoutLimit = false,
|
|
23269
|
-
customHeader
|
|
23269
|
+
customHeader,
|
|
23270
|
+
hideHeaderRow
|
|
23270
23271
|
}) {
|
|
23271
23272
|
var _a, _b, _c, _d;
|
|
23272
23273
|
const [openMenu, setOpen] = useState(false);
|
|
@@ -23699,41 +23700,43 @@ function Table({
|
|
|
23699
23700
|
if (filteredHeader.length > 0 || filterHeader.length > 0) {
|
|
23700
23701
|
visibleHeaders = visibleHeaders.filter(item => filteredHeader.includes(item.id) || filterHeader.includes(item.id));
|
|
23701
23702
|
}
|
|
23702
|
-
return
|
|
23703
|
-
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23707
|
-
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23711
|
-
|
|
23712
|
-
style: {
|
|
23713
|
-
width: column.colWidth,
|
|
23714
|
-
maxWidth: column.colMaxWidth,
|
|
23715
|
-
minWidth: column.colMinWidth
|
|
23716
|
-
}
|
|
23717
|
-
}]), {
|
|
23718
|
-
css: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss), tableRowData.length === 0 && {
|
|
23719
|
-
position: 'unset !important'
|
|
23720
|
-
})
|
|
23721
|
-
}, {
|
|
23722
|
-
children: typeof headerRender === 'string' ? jsx(TableHeaderCellContainer, Object.assign({
|
|
23723
|
-
isSortedDesc: column.isSortedDesc,
|
|
23724
|
-
unsortable: id ? true : column.unsortable,
|
|
23725
|
-
isToggleable: !!column.onToggle,
|
|
23726
|
-
isToggled: column.isToggled
|
|
23703
|
+
return jsxs(Fragment, {
|
|
23704
|
+
children: [!hideHeaderRow && jsx(TableHeadRow$3, Object.assign({
|
|
23705
|
+
css: cssTableCell
|
|
23706
|
+
}, headerGroup.getHeaderGroupProps(), {
|
|
23707
|
+
children: visibleHeaders.map((column, index) => {
|
|
23708
|
+
const headerRender = column.render('Header');
|
|
23709
|
+
return jsx(TableHeadCell$3, Object.assign({}, column.getHeaderProps(props => [props, !column.unsortable ? column.getSortByToggleProps({
|
|
23710
|
+
title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
|
|
23711
|
+
}) : {
|
|
23712
|
+
onClick: column.onToggle
|
|
23727
23713
|
}, {
|
|
23728
|
-
|
|
23729
|
-
|
|
23714
|
+
style: {
|
|
23715
|
+
width: column.colWidth,
|
|
23716
|
+
maxWidth: column.colMaxWidth,
|
|
23717
|
+
minWidth: column.colMinWidth
|
|
23718
|
+
}
|
|
23719
|
+
}]), {
|
|
23720
|
+
css: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss), tableRowData.length === 0 && {
|
|
23721
|
+
position: 'unset !important'
|
|
23722
|
+
})
|
|
23723
|
+
}, {
|
|
23724
|
+
children: typeof headerRender === 'string' ? jsx(TableHeaderCellContainer, Object.assign({
|
|
23725
|
+
isSortedDesc: column.isSortedDesc,
|
|
23726
|
+
unsortable: id ? true : column.unsortable,
|
|
23727
|
+
isToggleable: !!column.onToggle,
|
|
23728
|
+
isToggled: column.isToggled
|
|
23730
23729
|
}, {
|
|
23731
|
-
children:
|
|
23732
|
-
|
|
23733
|
-
|
|
23734
|
-
|
|
23735
|
-
|
|
23736
|
-
|
|
23730
|
+
children: jsx(TableHeadCellContent, Object.assign({
|
|
23731
|
+
heading: "headerTable"
|
|
23732
|
+
}, {
|
|
23733
|
+
children: headerRender.toUpperCase()
|
|
23734
|
+
}), void 0)
|
|
23735
|
+
}), void 0) : headerRender
|
|
23736
|
+
}), void 0);
|
|
23737
|
+
})
|
|
23738
|
+
}), void 0), customHeader]
|
|
23739
|
+
}, void 0);
|
|
23737
23740
|
})
|
|
23738
23741
|
}), void 0), jsxs(TableBody$3, Object.assign({}, getTableBodyProps(), {
|
|
23739
23742
|
children: [isInfiniteScroll && paddingTop > 0 && jsx("tr", {
|
package/index.umd.js
CHANGED
|
@@ -23655,7 +23655,8 @@
|
|
|
23655
23655
|
virtualized = _v === void 0 ? true : _v,
|
|
23656
23656
|
_w = _a.withoutLimit,
|
|
23657
23657
|
withoutLimit = _w === void 0 ? false : _w,
|
|
23658
|
-
customHeader = _a.customHeader
|
|
23658
|
+
customHeader = _a.customHeader,
|
|
23659
|
+
hideHeaderRow = _a.hideHeaderRow;
|
|
23659
23660
|
var _x = React.useState(false),
|
|
23660
23661
|
openMenu = _x[0],
|
|
23661
23662
|
setOpen = _x[1];
|
|
@@ -24135,43 +24136,45 @@
|
|
|
24135
24136
|
return filteredHeader.includes(item.id) || filterHeader.includes(item.id);
|
|
24136
24137
|
});
|
|
24137
24138
|
}
|
|
24138
|
-
return jsxRuntime.
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24143
|
-
|
|
24144
|
-
return
|
|
24145
|
-
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
children: typeof headerRender === 'string' ? jsxRuntime.jsx(TableHeaderCellContainer, __assign({
|
|
24161
|
-
isSortedDesc: column.isSortedDesc,
|
|
24162
|
-
unsortable: id ? true : column.unsortable,
|
|
24163
|
-
isToggleable: !!column.onToggle,
|
|
24164
|
-
isToggled: column.isToggled
|
|
24139
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
24140
|
+
children: [!hideHeaderRow && jsxRuntime.jsx(TableHeadRow$3, __assign({
|
|
24141
|
+
css: cssTableCell
|
|
24142
|
+
}, headerGroup.getHeaderGroupProps(), {
|
|
24143
|
+
children: visibleHeaders.map(function (column, index) {
|
|
24144
|
+
var headerRender = column.render('Header');
|
|
24145
|
+
return jsxRuntime.jsx(TableHeadCell$3, __assign({}, column.getHeaderProps(function (props) {
|
|
24146
|
+
return [props, !column.unsortable ? column.getSortByToggleProps({
|
|
24147
|
+
title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
|
|
24148
|
+
}) : {
|
|
24149
|
+
onClick: column.onToggle
|
|
24150
|
+
}, {
|
|
24151
|
+
style: {
|
|
24152
|
+
width: column.colWidth,
|
|
24153
|
+
maxWidth: column.colMaxWidth,
|
|
24154
|
+
minWidth: column.colMinWidth
|
|
24155
|
+
}
|
|
24156
|
+
}];
|
|
24157
|
+
}), {
|
|
24158
|
+
css: __assign(__assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss), tableRowData.length === 0 && {
|
|
24159
|
+
position: 'unset !important'
|
|
24160
|
+
})
|
|
24165
24161
|
}, {
|
|
24166
|
-
children: jsxRuntime.jsx(
|
|
24167
|
-
|
|
24162
|
+
children: typeof headerRender === 'string' ? jsxRuntime.jsx(TableHeaderCellContainer, __assign({
|
|
24163
|
+
isSortedDesc: column.isSortedDesc,
|
|
24164
|
+
unsortable: id ? true : column.unsortable,
|
|
24165
|
+
isToggleable: !!column.onToggle,
|
|
24166
|
+
isToggled: column.isToggled
|
|
24168
24167
|
}, {
|
|
24169
|
-
children:
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24168
|
+
children: jsxRuntime.jsx(TableHeadCellContent, __assign({
|
|
24169
|
+
heading: "headerTable"
|
|
24170
|
+
}, {
|
|
24171
|
+
children: headerRender.toUpperCase()
|
|
24172
|
+
}), void 0)
|
|
24173
|
+
}), void 0) : headerRender
|
|
24174
|
+
}), void 0);
|
|
24175
|
+
})
|
|
24176
|
+
}), void 0), customHeader]
|
|
24177
|
+
}, void 0);
|
|
24175
24178
|
})
|
|
24176
24179
|
}), void 0), jsxRuntime.jsxs(TableBody$3, __assign({}, getTableBodyProps(), {
|
|
24177
24180
|
children: [isInfiniteScroll && paddingTop > 0 && jsxRuntime.jsx("tr", {
|