@majoo-ui/react 1.60.14-rc.1 → 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.
@@ -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);
@@ -23694,46 +23695,48 @@ function Table({
23694
23695
  css: headerCss,
23695
23696
  isInfiniteScroll: isInfiniteScroll
23696
23697
  }, {
23697
- children: customHeader ? customHeader : headerGroups.map(headerGroup => {
23698
+ children: headerGroups.map(headerGroup => {
23698
23699
  let visibleHeaders = headerGroup.headers.filter(column => !column.isSubRow);
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 jsx(TableHeadRow$3, Object.assign({
23703
- css: cssTableCell
23704
- }, headerGroup.getHeaderGroupProps(), {
23705
- children: visibleHeaders.map((column, index) => {
23706
- const headerRender = column.render('Header');
23707
- return jsx(TableHeadCell$3, Object.assign({}, column.getHeaderProps(props => [props, !column.unsortable ? column.getSortByToggleProps({
23708
- title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
23709
- }) : {
23710
- onClick: column.onToggle
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
- children: jsx(TableHeadCellContent, Object.assign({
23729
- heading: "headerTable"
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: headerRender.toUpperCase()
23732
- }), void 0)
23733
- }), void 0) : headerRender
23734
- }), void 0);
23735
- })
23736
- }), void 0);
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];
@@ -24126,7 +24127,7 @@
24126
24127
  css: headerCss,
24127
24128
  isInfiniteScroll: isInfiniteScroll
24128
24129
  }, {
24129
- children: customHeader ? customHeader : headerGroups.map(function (headerGroup) {
24130
+ children: headerGroups.map(function (headerGroup) {
24130
24131
  var visibleHeaders = headerGroup.headers.filter(function (column) {
24131
24132
  return !column.isSubRow;
24132
24133
  });
@@ -24135,43 +24136,45 @@
24135
24136
  return filteredHeader.includes(item.id) || filterHeader.includes(item.id);
24136
24137
  });
24137
24138
  }
24138
- return jsxRuntime.jsx(TableHeadRow$3, __assign({
24139
- css: cssTableCell
24140
- }, headerGroup.getHeaderGroupProps(), {
24141
- children: visibleHeaders.map(function (column, index) {
24142
- var headerRender = column.render('Header');
24143
- return jsxRuntime.jsx(TableHeadCell$3, __assign({}, column.getHeaderProps(function (props) {
24144
- return [props, !column.unsortable ? column.getSortByToggleProps({
24145
- title: t('sortColumnTitle', 'Urutkan') || 'Urutkan'
24146
- }) : {
24147
- onClick: column.onToggle
24148
- }, {
24149
- style: {
24150
- width: column.colWidth,
24151
- maxWidth: column.colMaxWidth,
24152
- minWidth: column.colMinWidth
24153
- }
24154
- }];
24155
- }), {
24156
- css: __assign(__assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss), tableRowData.length === 0 && {
24157
- position: 'unset !important'
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(TableHeadCellContent, __assign({
24167
- heading: "headerTable"
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: headerRender.toUpperCase()
24170
- }), void 0)
24171
- }), void 0) : headerRender
24172
- }), void 0);
24173
- })
24174
- }), void 0);
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", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.60.14-rc.1",
3
+ "version": "1.60.14-rc.3",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",