@synerise/ds-table 0.46.33 → 0.46.35

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/Cell/Action/ActionCell.types.d.ts +1 -1
  3. package/dist/Cell/AvatarLabel/AvatarLabel.types.d.ts +1 -1
  4. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.d.ts +2 -2
  5. package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +2 -2
  6. package/dist/Cell/Star/StarCell.d.ts +6 -2
  7. package/dist/Cell/Star/StarCell.styles.d.ts +1 -1
  8. package/dist/Cell/StatusLabel/StatusLabel.types.d.ts +1 -1
  9. package/dist/ColumnSortMenu/SortIcons.d.ts +6 -7
  10. package/dist/ColumnSortMenu/SortRenderer.js +4 -8
  11. package/dist/ColumnSortMenu/TitleWithSort.d.ts +3 -3
  12. package/dist/ColumnSortMenu/columnWithSortButtons.d.ts +1 -1
  13. package/dist/ColumnSortMenu/useSortState.d.ts +1 -1
  14. package/dist/ColumnSortMenu/useSortState.js +0 -3
  15. package/dist/DefaultTable/DefaultTable.js +2 -5
  16. package/dist/GroupTable/GroupTable.js +3 -7
  17. package/dist/GroupTable/GroupTable.types.d.ts +3 -3
  18. package/dist/GroupTable/GroupTableBody/GroupTableBody.d.ts +0 -1
  19. package/dist/GroupTable/GroupTableBody/GroupTableBody.js +1 -1
  20. package/dist/GroupTable/GroupTableHeader/GroupTableHeader.d.ts +0 -1
  21. package/dist/InfiniteScroll/InfiniteLoaderItem.js +0 -2
  22. package/dist/RowSelection/RowSelectionColumn.types.d.ts +1 -1
  23. package/dist/Table.js +1 -3
  24. package/dist/Table.types.d.ts +11 -11
  25. package/dist/TableHeader/TableHeader.js +1 -2
  26. package/dist/TableHeader/TableSelection.js +1 -2
  27. package/dist/VirtualTable/VirtualTable.js +2 -2
  28. package/dist/VirtualTable/VirtualTable.styles.d.ts +1 -1
  29. package/dist/hooks/useRowKey/useRowKey.d.ts +1 -1
  30. package/dist/hooks/useRowStar/useRowStar.types.d.ts +2 -2
  31. package/dist/utils/calculatePixels.js +0 -1
  32. package/dist/utils/getValueFromPath.d.ts +1 -1
  33. package/dist/utils/locale.d.ts +1 -1
  34. package/package.json +26 -26
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.46.35](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.34...@synerise/ds-table@0.46.35) (2023-10-02)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-table
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.46.34](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.33...@synerise/ds-table@0.46.34) (2023-09-26)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-table
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.46.33](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.32...@synerise/ds-table@0.46.33) (2023-09-21)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-table
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare type ContentAlign = 'left' | 'right' | 'center';
2
+ export type ContentAlign = 'left' | 'right' | 'center';
3
3
  export interface Props {
4
4
  children: React.ReactNode | React.ReactNode[];
5
5
  gapSize?: number;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare type Props = {
2
+ export type Props = {
3
3
  avatar: React.ReactElement;
4
4
  avatarAction?: () => void;
5
5
  title: string | React.ReactNode;
@@ -1,12 +1,12 @@
1
1
  import * as React from 'react';
2
- export declare type ShowMoreTexts = {
2
+ export type ShowMoreTexts = {
3
3
  tooltip: string | React.ReactNode;
4
4
  searchPlaceholder: string;
5
5
  searchClear: string;
6
6
  modalTitle: string | React.ReactNode;
7
7
  records: string | React.ReactNode;
8
8
  };
9
- export declare type Props<T extends object> = {
9
+ export type Props<T extends object> = {
10
10
  items: T[];
11
11
  numberOfVisibleItems: number;
12
12
  labelKey: string;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { ShowMoreTexts } from '../LabelsWithShowMore.types';
3
- export declare type DataSourceType = object & {
3
+ export type DataSourceType = object & {
4
4
  key: React.ReactText;
5
5
  };
6
- export declare type ModalProps<T extends DataSourceType> = {
6
+ export type ModalProps<T extends DataSourceType> = {
7
7
  visible: boolean;
8
8
  items: T[];
9
9
  hide: () => void;
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
- import { Props } from './StarCell.types';
3
- declare const _default: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<Props>, "children" | "onClick" | "active" | "starTooltip"> & {
2
+ declare const _default: React.ForwardRefExoticComponent<{
3
+ children: ((string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactNodeArray | React.ReactPortal | React.ReactNode[]) & (boolean | React.ReactChild | React.ReactFragment | React.ReactPortal)) | null | undefined;
4
+ onClick?: (() => void) | undefined;
5
+ active?: boolean | undefined;
6
+ starTooltip?: React.ReactNode;
7
+ } & {
4
8
  theme?: any;
5
9
  }>;
6
10
  export default _default;
@@ -7,7 +7,7 @@ export declare const StarredIcon: import("styled-components").StyledComponent<im
7
7
  title?: string | undefined;
8
8
  size?: string | number | undefined;
9
9
  stroke?: boolean | undefined;
10
- onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
10
+ onClick?: import("react").MouseEventHandler<Element> | undefined;
11
11
  component?: import("react").ReactNode;
12
12
  className?: string | undefined;
13
13
  style?: import("react").CSSProperties | undefined;
@@ -1,6 +1,6 @@
1
1
  import { Color, Status } from '@synerise/ds-badge/dist/Badge.types';
2
2
  import * as React from 'react';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  status?: Status;
5
5
  label: string | React.ReactNode;
6
6
  customColor: Color;
@@ -1,18 +1,17 @@
1
1
  import * as React from 'react';
2
- import { ThemeProps } from '@synerise/ds-core';
3
2
  import { ColumnSortOrder } from './useSortState';
4
- export declare const CheckIcon: React.ForwardRefExoticComponent<Pick<{
3
+ export declare const CheckIcon: React.ForwardRefExoticComponent<{
5
4
  isActive: boolean;
6
- } & ThemeProps, "isActive"> & {
5
+ } & {
7
6
  theme?: any;
8
7
  }>;
9
- export declare const DefaultSortIcon: React.ForwardRefExoticComponent<Pick<{
8
+ export declare const DefaultSortIcon: React.ForwardRefExoticComponent<{
10
9
  sortOrder: ColumnSortOrder;
11
- } & ThemeProps, "sortOrder"> & {
10
+ } & {
12
11
  theme?: any;
13
12
  }>;
14
- export declare const StringSortIcon: React.ForwardRefExoticComponent<Pick<{
13
+ export declare const StringSortIcon: React.ForwardRefExoticComponent<{
15
14
  sortOrder: ColumnSortOrder;
16
- } & ThemeProps, "sortOrder"> & {
15
+ } & {
17
16
  theme?: any;
18
17
  }>;
@@ -36,8 +36,7 @@ export var CommonRenderer = function CommonRenderer(_ref) {
36
36
  style: {
37
37
  width: 220
38
38
  }
39
- }, /*#__PURE__*/React.createElement(Menu // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
40
- // @ts-ignore
39
+ }, /*#__PURE__*/React.createElement(Menu // @ts-ignore
41
40
  , {
42
41
  asDropdownMenu: true,
43
42
  onClick: function onClick(_ref2) {
@@ -64,8 +63,7 @@ export var CommonRenderer = function CommonRenderer(_ref) {
64
63
  isActive: columnSortOrder === 'descend'
65
64
  })
66
65
  }, locale.columnSortDescend), !!columnSortOrder && /*#__PURE__*/React.createElement(Menu.Item, {
67
- key: "null" // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
68
- // @ts-ignore
66
+ key: "null" // @ts-ignore
69
67
  ,
70
68
  type: "danger",
71
69
  prefixel: /*#__PURE__*/React.createElement(Icon, {
@@ -107,8 +105,7 @@ export var StringRenderer = function StringRenderer(_ref3) {
107
105
  style: {
108
106
  width: 170
109
107
  }
110
- }, /*#__PURE__*/React.createElement(Menu // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
111
- // @ts-ignore
108
+ }, /*#__PURE__*/React.createElement(Menu // @ts-ignore
112
109
  , {
113
110
  asDropdownMenu: true,
114
111
  onClick: function onClick(_ref4) {
@@ -135,8 +132,7 @@ export var StringRenderer = function StringRenderer(_ref3) {
135
132
  isActive: columnSortOrder === 'descend'
136
133
  })
137
134
  }, locale.columnSortZa), !!columnSortOrder && /*#__PURE__*/React.createElement(Menu.Item, {
138
- key: "null" // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
139
- // @ts-ignore
135
+ key: "null" // @ts-ignore
140
136
  ,
141
137
  type: "danger",
142
138
  prefixel: /*#__PURE__*/React.createElement(Icon, {
@@ -2,13 +2,13 @@ import * as React from 'react';
2
2
  import { ColumnTitleProps } from 'antd/lib/table/interface';
3
3
  import { DSColumnType } from '../Table.types';
4
4
  import { SortStateAPI } from './useSortState';
5
- export declare type SortButtonsRenderer<T> = (sortStateApi: SortStateAPI, column: DSColumnType<T>) => React.ReactElement;
6
- export declare type SortRender<T> = 'default' | 'string' | SortButtonsRenderer<T>;
5
+ export type SortButtonsRenderer<T> = (sortStateApi: SortStateAPI, column: DSColumnType<T>) => React.ReactElement;
6
+ export type SortRender<T> = 'default' | 'string' | SortButtonsRenderer<T>;
7
7
  export interface TitleWithSortOwnProps<T> {
8
8
  column: DSColumnType<T>;
9
9
  sortRender: React.ReactElement;
10
10
  titleProps: ColumnTitleProps<T>;
11
11
  }
12
- export declare type TitleWithSortProps<T> = TitleWithSortOwnProps<T> & React.ComponentPropsWithoutRef<'span'>;
12
+ export type TitleWithSortProps<T> = TitleWithSortOwnProps<T> & React.ComponentPropsWithoutRef<'span'>;
13
13
  export declare const TitleWithSort: <T extends unknown>({ column, sortRender, titleProps, ...spanProps }: TitleWithSortProps<T>) => React.ReactElement;
14
14
  export default TitleWithSort;
@@ -1,6 +1,6 @@
1
1
  import { DSColumnType, OnSortFn } from '../Table.types';
2
2
  import { SortStateAPI } from './useSortState';
3
- export declare const columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn | undefined) => <T extends unknown>(column: DSColumnType<T>) => DSColumnType<T>;
3
+ export declare const columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn) => <T extends unknown>(column: DSColumnType<T>) => DSColumnType<T>;
4
4
  declare const _default: {
5
5
  columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn | undefined) => <T extends unknown>(column: DSColumnType<T>) => DSColumnType<T>;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { DSColumnType, OnSortFn } from '../Table.types';
2
- export declare type ColumnSortOrder = 'descend' | 'ascend' | null;
2
+ export type ColumnSortOrder = 'descend' | 'ascend' | null;
3
3
  export interface ColumnsSortState {
4
4
  [key: string]: {
5
5
  sortOrder: ColumnSortOrder;
@@ -110,17 +110,14 @@ var sortReducer = function sortReducer(state, action) {
110
110
 
111
111
  switch (type) {
112
112
  case 'setSingleOrder':
113
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
114
113
  // @ts-ignore
115
114
  return setSingleOrder(state, action);
116
115
 
117
116
  case 'setMultipleOrder':
118
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
119
117
  // @ts-ignore
120
118
  return setMultipleOrder(state, action);
121
119
 
122
120
  case 'updateColumns':
123
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
124
121
  // @ts-ignore
125
122
  return updateColumns(state, action);
126
123
 
@@ -145,7 +145,6 @@ function DefaultTable(props) {
145
145
  }, [locale, rowKey, selectedRecords, selection]);
146
146
  return (
147
147
  /*#__PURE__*/
148
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
149
148
  // @ts-ignore
150
149
  React.createElement(Table, _extends({}, props, {
151
150
  "data-popup-container": true,
@@ -161,8 +160,7 @@ function DefaultTable(props) {
161
160
  type: "no-results",
162
161
  noSearchResults: true
163
162
  })
164
- }) // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
165
- // @ts-ignore
163
+ }) // @ts-ignore
166
164
  ,
167
165
  title: title,
168
166
  showSorterTooltip: false,
@@ -170,8 +168,7 @@ function DefaultTable(props) {
170
168
  body: {
171
169
  row: RenderRow
172
170
  }
173
- }, decoratedComponents) // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
174
- // @ts-ignore
171
+ }, decoratedComponents) // @ts-ignore
175
172
  ,
176
173
  rowSelection: selection && _objectSpread({}, selection, {
177
174
  selections: selection == null ? void 0 : (_selection$selections = selection.selections) == null ? void 0 : _selection$selections.filter(Boolean),
@@ -123,8 +123,7 @@ function GroupTable(props) {
123
123
  return /*#__PURE__*/React.createElement("div", {
124
124
  className: "ds-table ds-table-cell-size-" + cellSize + " " + (roundedHeader ? 'ds-table-rounded' : '')
125
125
  }, /*#__PURE__*/React.createElement(Table, _extends({}, props, {
126
- dataSource: sortedRowsData // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
127
- // @ts-ignore: FIXME: antd table columns type is not compatible with DS
126
+ dataSource: sortedRowsData // @ts-ignore: FIXME: antd table columns type is not compatible with DS
128
127
  ,
129
128
  columns: decoratedColumns,
130
129
  components: {
@@ -138,8 +137,7 @@ function GroupTable(props) {
138
137
  rowKey: rowKey,
139
138
  allItems: allItems,
140
139
  expanded: expandedGroups.indexOf(record['data-row-key']) >= 0,
141
- expandGroup: toggleExpand // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
142
- // @ts-ignore: FIXME: Type 'DSColumnType<T>[]' is not assignable to type 'GroupColumnsType<T>[]'.
140
+ expandGroup: toggleExpand // @ts-ignore: FIXME: Type 'DSColumnType<T>[]' is not assignable to type 'GroupColumnsType<T>[]'.
143
141
  ,
144
142
  columns: columnsWithCustomSorting,
145
143
  addItem: addItem,
@@ -148,9 +146,7 @@ function GroupTable(props) {
148
146
  });
149
147
  }
150
148
  }
151
- }
152
- /* eslint-disable-next-line @typescript-eslint/ban-ts-ignore */
153
- // @ts-ignore
149
+ } // @ts-ignore
154
150
  ,
155
151
  rowSelection: selection && _objectSpread({}, selection, {
156
152
  columnWidth: 64
@@ -1,14 +1,14 @@
1
1
  import { ColumnsType } from 'antd/lib/table';
2
2
  import * as React from 'react';
3
3
  import { GroupType as GroupByType } from '@synerise/ds-column-manager/dist/ColumnManager.types';
4
- export declare type SortOrderType = 'ascend' | 'descend' | boolean;
5
- export declare type GroupColumnsType<T> = ColumnsType<T> & {
4
+ export type SortOrderType = 'ascend' | 'descend' | boolean;
5
+ export type GroupColumnsType<T> = ColumnsType<T> & {
6
6
  sortOrder: SortOrderType;
7
7
  key: React.ReactText;
8
8
  render: Function;
9
9
  dataIndex: React.ReactText;
10
10
  };
11
- export declare type GroupType<T> = {
11
+ export type GroupType<T> = {
12
12
  column: string;
13
13
  value: React.ReactText | boolean | object;
14
14
  key: React.ReactText;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Props } from './GroupTableBody.types';
3
2
  declare function GroupTableBody<T extends unknown>({ group, columns, rowKey, selection, allItems, expanded, expandGroup, addItem, activeGroup, hideGroupExpander, }: Props<T>): JSX.Element;
4
3
  export default GroupTableBody;
@@ -107,7 +107,7 @@ function GroupTableBody(_ref) {
107
107
  }
108
108
  })), columns == null ? void 0 : columns.map(function (column, index) {
109
109
  return column.dataIndex && /*#__PURE__*/React.createElement(S.SubRow, {
110
- key: index,
110
+ key: column.dataIndex,
111
111
  selected: column.dataIndex === group.children[0].props.record.column,
112
112
  sorted: Boolean(column.sortOrder)
113
113
  }, column.render && column.render(rowRecord[column.dataIndex], rowRecord, index) || rowRecord[column.dataIndex]);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Props } from './GroupTableHeader.types';
3
2
  declare function GroupTableHeader<T extends unknown>({ header, activeColumnKey, sortColumn }: Props<T>): JSX.Element;
4
3
  export default GroupTableHeader;
@@ -18,7 +18,6 @@ var LoadingItem = function LoadingItem() {
18
18
  var NoMoreItem = function NoMoreItem() {
19
19
  return /*#__PURE__*/React.createElement(TableLocaleContext.Consumer, null, function (tableLocale) {
20
20
  return /*#__PURE__*/React.createElement(Alert.InlineAlert, {
21
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
22
21
  // @ts-ignore
23
22
  type: "info",
24
23
  message: tableLocale.infiniteScrollNoMoreData
@@ -34,7 +33,6 @@ var ErrorItem = function ErrorItem(_ref) {
34
33
  display: 'flex'
35
34
  }
36
35
  }, /*#__PURE__*/React.createElement(Alert.InlineAlert, {
37
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
38
36
  // @ts-ignore
39
37
  type: "alert",
40
38
  message: tableLocale.infiniteScrollError
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { TableProps } from 'rc-table/lib/Table';
3
3
  import { DSTableProps } from '../Table.types';
4
- export declare type RowSelectionProps<T> = {
4
+ export type RowSelectionProps<T> = {
5
5
  rowKey: TableProps<T>['rowKey'];
6
6
  independentSelectionExpandedRows?: boolean;
7
7
  selectedRowKeys: React.ReactText[];
package/dist/Table.js CHANGED
@@ -56,8 +56,7 @@ function DSTable(props) {
56
56
 
57
57
  var renderHeader = React.useCallback(function () {
58
58
  var size = selection && (selection == null ? void 0 : selection.selectedRowKeys) && (selection == null ? void 0 : selection.selectedRowKeys.length);
59
- var data = grouped ? // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
60
- // @ts-ignore
59
+ var data = grouped ? // @ts-ignore
61
60
  dataSource == null ? void 0 : dataSource.reduce(function (items, group) {
62
61
  if (group.rows) {
63
62
  return [].concat(items, group.rows);
@@ -132,7 +131,6 @@ function DSTable(props) {
132
131
  color: "#6a7580"
133
132
  })), grouped && dataSource != null && dataSource.length ?
134
133
  /*#__PURE__*/
135
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
136
134
  // @ts-ignore
137
135
  React.createElement(GroupTable, _extends({}, props, {
138
136
  locale: tableLocale,
@@ -6,14 +6,14 @@ import { GroupType } from './GroupTable/GroupTable.types';
6
6
  import { RowStar } from './hooks/useRowStar';
7
7
  import { SortRender } from './ColumnSortMenu/TitleWithSort';
8
8
  import { ColumnSortOrder, ColumnsSortState } from './ColumnSortMenu/useSortState';
9
- export declare type AntTableProps<T> = Omit<TableProps<T>, 'title' | 'subTitle' | 'onSearch' | 'itemsMenu' | 'search' | 'locale' | 'columns'>;
10
- export declare type Selection = {
9
+ export type AntTableProps<T> = Omit<TableProps<T>, 'title' | 'subTitle' | 'onSearch' | 'itemsMenu' | 'search' | 'locale' | 'columns'>;
10
+ export type Selection = {
11
11
  key: string;
12
12
  label: string;
13
13
  onClick: () => void;
14
14
  };
15
- export declare type SelectionItem = typeof DSTable.SELECTION_ALL | typeof DSTable.SELECTION_INVERT | Selection | null | undefined;
16
- export declare type RowSelection<T> = Omit<TableRowSelection<T>, 'selections'> & {
15
+ export type SelectionItem = typeof DSTable.SELECTION_ALL | typeof DSTable.SELECTION_INVERT | Selection | null | undefined;
16
+ export type RowSelection<T> = Omit<TableRowSelection<T>, 'selections'> & {
17
17
  fixed?: boolean;
18
18
  selectedRowKeys: React.ReactText[];
19
19
  selections?: SelectionItem[];
@@ -39,11 +39,11 @@ export interface Filter {
39
39
  };
40
40
  disabled?: boolean;
41
41
  }
42
- export declare type RowType<T> = {
42
+ export type RowType<T> = {
43
43
  key?: string | number;
44
44
  children?: T[];
45
45
  };
46
- export declare type Locale = TableLocale & {
46
+ export type Locale = TableLocale & {
47
47
  selected?: string;
48
48
  emptyText?: string;
49
49
  selectionLimitWarning?: string;
@@ -67,13 +67,13 @@ export declare type Locale = TableLocale & {
67
67
  infiniteScrollBackToTop?: string;
68
68
  unselectAll?: string;
69
69
  };
70
- export declare type DSColumnType<T> = Omit<ColumnType<T>, 'fixed'> & {
70
+ export type DSColumnType<T> = Omit<ColumnType<T>, 'fixed'> & {
71
71
  fixed?: 'left' | 'right';
72
72
  sortRender?: SortRender<T>;
73
73
  childRender?: (value: unknown, row: T, index: number) => React.ReactNode;
74
74
  };
75
- declare type AntTableComponentsType<T> = AntTableProps<T>['components'];
76
- declare type DSTableComponentsType<T> = AntTableComponentsType<T> & {
75
+ type AntTableComponentsType<T> = AntTableProps<T>['components'];
76
+ type DSTableComponentsType<T> = AntTableComponentsType<T> & {
77
77
  body?: (data: T[], info: {
78
78
  scrollbarSize: number;
79
79
  ref: React.Ref<{
@@ -85,11 +85,11 @@ declare type DSTableComponentsType<T> = AntTableComponentsType<T> & {
85
85
  }) => void;
86
86
  }, defaultTableProps?: DSTableProps<T>) => React.ReactNode;
87
87
  };
88
- export declare type SingleColumnSort = {
88
+ export type SingleColumnSort = {
89
89
  columnKey: string;
90
90
  order: ColumnSortOrder;
91
91
  };
92
- export declare type OnSortFn = (singleColumnSort: SingleColumnSort, sortState: ColumnsSortState) => void;
92
+ export type OnSortFn = (singleColumnSort: SingleColumnSort, sortState: ColumnsSortState) => void;
93
93
  export interface DSTableProps<T extends any & GroupType<T>> extends AntTableProps<T> {
94
94
  title?: string | React.ReactNode;
95
95
  hideTitleBar?: boolean;
@@ -8,8 +8,7 @@ import { TableLimit } from './TableLimit';
8
8
 
9
9
  var isTruncated = function isTruncated(element) {
10
10
  return element && element.offsetWidth < element.scrollWidth;
11
- }; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
12
- // @ts-ignore
11
+ }; // @ts-ignore
13
12
 
14
13
 
15
14
  var TableHeader = function TableHeader(_ref) {
@@ -6,8 +6,7 @@ import Tooltip from '@synerise/ds-tooltip';
6
6
  import Icon, { OptionVerticalM } from '@synerise/ds-icon';
7
7
  import * as S from '../Table.styles';
8
8
  import { SELECTION_ALL, SELECTION_INVERT } from '../Table';
9
- import { useRowKey } from '../hooks/useRowKey'; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
10
- // @ts-ignore
9
+ import { useRowKey } from '../hooks/useRowKey'; // @ts-ignore
11
10
 
12
11
  function TableSelection(_ref) {
13
12
  var dataSource = _ref.dataSource,
@@ -290,7 +290,8 @@ function VirtualTable(props) {
290
290
 
291
291
  return renderVirtualList(rawData);
292
292
  }, [cellHeight, createItemData, expandable, getRowKey, infiniteScroll, listInnerElementType, outerElement, scroll.y]);
293
- var columnsSliceStartIndex = Number(!!selection) + Number(!!rowStar);
293
+ var columnsSliceStartIndex = Number(!!selection) + Number(!!rowStar); // eslint-disable-next-line
294
+
294
295
  var scrollValue = !dataSource || (dataSource == null ? void 0 : dataSource.length) === 0 ? undefined : props == null ? void 0 : props.scroll;
295
296
  return /*#__PURE__*/React.createElement(RelativeContainer, {
296
297
  key: "relative-container",
@@ -304,7 +305,6 @@ function VirtualTable(props) {
304
305
  }, /*#__PURE__*/React.createElement(DSTable, _extends({}, props, {
305
306
  scroll: scrollValue,
306
307
  className: classNames(className, 'virtual-table', !!infiniteScroll && 'virtual-table-infinite-scroll') // Remove columns which cause header columns indent
307
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
308
308
  // @ts-ignore
309
309
  ,
310
310
  columns: mergedColumns.slice(columnsSliceStartIndex),
@@ -1,4 +1,4 @@
1
- declare type ColWrapperProps = {
1
+ type ColWrapperProps = {
2
2
  width?: number | null;
3
3
  minWidth?: number | null;
4
4
  maxWidth?: number | null;
@@ -1,4 +1,4 @@
1
- declare type Row = any & {
1
+ type Row = any & {
2
2
  key?: string;
3
3
  };
4
4
  export declare const useRowKey: (rowKey: string | Function | undefined) => {
@@ -9,13 +9,13 @@ export interface RowStar<T> {
9
9
  onChange?: (starredRowKeys: string[], starredKey: string, isStarred: boolean) => void;
10
10
  disableForExpandedRows?: boolean;
11
11
  }
12
- export declare type AnyRecordType = any;
12
+ export type AnyRecordType = any;
13
13
  export interface UseStarredApi {
14
14
  getStarredKeys: () => string[];
15
15
  isStarred: (key: string) => boolean;
16
16
  toggleStarred: (key: string) => string[];
17
17
  getRowStarColumn: (dsTableProps: CreateRowStarColumnProps) => DSColumnType<AnyRecordType>;
18
18
  }
19
- export declare type CreateRowStarColumnProps = DSTableProps<AnyRecordType> & {
19
+ export type CreateRowStarColumnProps = DSTableProps<AnyRecordType> & {
20
20
  getRowKey: (row: AnyRecordType) => React.ReactText | undefined;
21
21
  };
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
2
1
  // @ts-ignore
3
2
  import toPx from 'unit-to-px';
4
3
 
@@ -1 +1 @@
1
- export declare const getValueFromPath: (object: object, valuePath?: string | number | (string | number)[] | undefined) => string | number | boolean;
1
+ export declare const getValueFromPath: (object: object, valuePath?: string | number | (string | number)[]) => string | number | boolean;
@@ -2,5 +2,5 @@ import * as React from 'react';
2
2
  import { IntlShape } from 'react-intl';
3
3
  import { Locale } from '../Table.types';
4
4
  export declare const getDefaultLocale: (intl: IntlShape) => Locale;
5
- export declare const useTableLocale: (intl: IntlShape, locale?: Locale | undefined) => Locale;
5
+ export declare const useTableLocale: (intl: IntlShape, locale?: Locale) => Locale;
6
6
  export declare const TableLocaleContext: React.Context<Locale>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-table",
3
- "version": "0.46.33",
3
+ "version": "0.46.35",
4
4
  "description": "Table UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -32,32 +32,32 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-alert": "^0.7.42",
36
- "@synerise/ds-badge": "^0.6.36",
37
- "@synerise/ds-button": "^0.18.1",
38
- "@synerise/ds-button-group": "^0.6.29",
39
- "@synerise/ds-checkbox": "^0.11.43",
40
- "@synerise/ds-column-manager": "^0.11.9",
41
- "@synerise/ds-data-format": "^0.4.2",
42
- "@synerise/ds-dropdown": "^0.17.79",
35
+ "@synerise/ds-alert": "^0.7.44",
36
+ "@synerise/ds-badge": "^0.6.38",
37
+ "@synerise/ds-button": "^0.18.3",
38
+ "@synerise/ds-button-group": "^0.6.31",
39
+ "@synerise/ds-checkbox": "^0.11.45",
40
+ "@synerise/ds-column-manager": "^0.11.11",
41
+ "@synerise/ds-data-format": "^0.4.3",
42
+ "@synerise/ds-dropdown": "^0.17.81",
43
43
  "@synerise/ds-flag": "^0.4.1",
44
- "@synerise/ds-icon": "^0.58.1",
45
- "@synerise/ds-input": "^0.19.1",
46
- "@synerise/ds-loader": "^0.2.43",
47
- "@synerise/ds-menu": "^0.17.18",
48
- "@synerise/ds-modal": "^0.17.4",
49
- "@synerise/ds-pagination": "^0.7.29",
50
- "@synerise/ds-scrollbar": "^0.6.6",
51
- "@synerise/ds-search": "^0.8.64",
52
- "@synerise/ds-select": "^0.15.19",
53
- "@synerise/ds-skeleton": "^0.3.8",
54
- "@synerise/ds-status": "^0.5.83",
55
- "@synerise/ds-tags": "^0.8.13",
56
- "@synerise/ds-tooltip": "^0.14.3",
57
- "@synerise/ds-typography": "^0.12.10",
58
- "@synerise/ds-utils": "^0.24.15",
44
+ "@synerise/ds-icon": "^0.58.3",
45
+ "@synerise/ds-input": "^0.19.3",
46
+ "@synerise/ds-loader": "^0.2.45",
47
+ "@synerise/ds-menu": "^0.17.20",
48
+ "@synerise/ds-modal": "^0.17.6",
49
+ "@synerise/ds-pagination": "^0.7.31",
50
+ "@synerise/ds-scrollbar": "^0.6.8",
51
+ "@synerise/ds-search": "^0.8.66",
52
+ "@synerise/ds-select": "^0.15.21",
53
+ "@synerise/ds-skeleton": "^0.3.10",
54
+ "@synerise/ds-status": "^0.5.85",
55
+ "@synerise/ds-tags": "^0.8.15",
56
+ "@synerise/ds-tooltip": "^0.14.5",
57
+ "@synerise/ds-typography": "^0.13.1",
58
+ "@synerise/ds-utils": "^0.24.17",
59
59
  "@types/react-window": "^1.8.5",
60
- "classnames": "^2.2.6",
60
+ "classnames": "2.3.2",
61
61
  "copy-to-clipboard": "^3.3.1",
62
62
  "lodash": "^4.17.19",
63
63
  "ramda": "0.27.0",
@@ -73,5 +73,5 @@
73
73
  "react": ">=16.9.0 < 17.0.0",
74
74
  "styled-components": "5.0.1"
75
75
  },
76
- "gitHead": "7df57233258ec34b90c3c92dbe1696788abd6ec6"
76
+ "gitHead": "1c1adf344f447e404a1d6320ad1d3f8486f29f67"
77
77
  }