@synerise/ds-table 1.3.0 → 1.3.2

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 (108) hide show
  1. package/CHANGELOG.md +1202 -3395
  2. package/README.md +6 -6
  3. package/dist/Cell/Action/ActionCell.d.ts +1 -1
  4. package/dist/Cell/Action/ActionCell.styles.d.ts +1 -1
  5. package/dist/Cell/Action/ActionCell.styles.js +0 -2
  6. package/dist/Cell/Action/ActionCell.types.d.ts +2 -2
  7. package/dist/Cell/AvatarLabel/AvatarLabel.d.ts +1 -1
  8. package/dist/Cell/AvatarLabel/AvatarLabel.styles.d.ts +1 -1
  9. package/dist/Cell/AvatarLabel/AvatarLabel.types.d.ts +1 -1
  10. package/dist/Cell/Copyable/Copyable.styles.js +0 -2
  11. package/dist/Cell/Copyable/Copyable.types.d.ts +1 -1
  12. package/dist/Cell/Copyable/CopyableCell.d.ts +1 -1
  13. package/dist/Cell/Copyable/CopyableCell.js +4 -2
  14. package/dist/Cell/Editable/EditableCell.d.ts +1 -1
  15. package/dist/Cell/Editable/EditableCell.js +2 -5
  16. package/dist/Cell/Editable/EditableCell.types.d.ts +1 -1
  17. package/dist/Cell/FlagLabel/FlagLabelCell.d.ts +1 -1
  18. package/dist/Cell/FlagLabel/FlagLabelCell.styles.js +0 -2
  19. package/dist/Cell/FlagLabel/FlagLabelCell.types.d.ts +2 -2
  20. package/dist/Cell/IconLabel/IconLabel.d.ts +1 -1
  21. package/dist/Cell/IconTooltipCell/IconTooltipCell.d.ts +1 -1
  22. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.d.ts +2 -2
  23. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.js +1 -1
  24. package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.d.ts +2 -2
  25. package/dist/Cell/LabelsWithShowMore/Modal/Modal.d.ts +1 -1
  26. package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +2 -2
  27. package/dist/Cell/Star/StarCell.d.ts +1 -1
  28. package/dist/Cell/Star/StarCell.styles.d.ts +1 -1
  29. package/dist/Cell/Star/StarCell.types.d.ts +2 -2
  30. package/dist/Cell/StatusLabel/StatusLabel.types.d.ts +3 -3
  31. package/dist/Cell/TagIcon/TagIcon.d.ts +1 -1
  32. package/dist/Cell/TagIcon/TagIcon.types.d.ts +2 -2
  33. package/dist/Cell/index.d.ts +7 -7
  34. package/dist/Cell/index.js +7 -7
  35. package/dist/ColumnSortMenu/SortIcons.d.ts +1 -1
  36. package/dist/ColumnSortMenu/SortIcons.js +1 -1
  37. package/dist/ColumnSortMenu/SortRenderer.d.ts +4 -4
  38. package/dist/ColumnSortMenu/SortRenderer.js +3 -3
  39. package/dist/ColumnSortMenu/TitleWithSort.d.ts +4 -4
  40. package/dist/ColumnSortMenu/columnWithSortButtons.d.ts +4 -4
  41. package/dist/ColumnSortMenu/columnWithSortButtons.js +1 -1
  42. package/dist/ColumnSortMenu/groupedColumnsSort.d.ts +4 -4
  43. package/dist/ColumnSortMenu/replaceSortButtons.d.ts +1 -1
  44. package/dist/ColumnSortMenu/useSortState.d.ts +2 -2
  45. package/dist/ColumnSortMenu/useSortState.js +1 -4
  46. package/dist/DefaultTable/DefaultTable.d.ts +1 -1
  47. package/dist/DefaultTable/DefaultTable.js +10 -14
  48. package/dist/FilterTrigger/FilterTrigger.d.ts +1 -1
  49. package/dist/FilterTrigger/FilterTrigger.types.d.ts +1 -1
  50. package/dist/GroupTable/GroupTable.d.ts +2 -2
  51. package/dist/GroupTable/GroupTable.js +8 -12
  52. package/dist/GroupTable/GroupTable.styles.js +10 -4
  53. package/dist/GroupTable/GroupTableBody/GroupTableBody.d.ts +2 -2
  54. package/dist/GroupTable/GroupTableBody/GroupTableBody.js +4 -4
  55. package/dist/GroupTable/GroupTableBody/GroupTableBody.types.d.ts +4 -4
  56. package/dist/GroupTable/GroupTableHeader/GroupTableHeader.d.ts +2 -2
  57. package/dist/GroupTable/GroupTableHeader/GroupTableHeader.types.d.ts +1 -1
  58. package/dist/InfiniteScroll/BackToTopButton.d.ts +1 -1
  59. package/dist/InfiniteScroll/ErrorItem.js +1 -1
  60. package/dist/InfiniteScroll/InfiniteLoaderItem.d.ts +1 -1
  61. package/dist/InfiniteScroll/InfiniteLoaderItem.js +2 -2
  62. package/dist/InfiniteScroll/InfiniteLoaderItem.types.d.ts +1 -1
  63. package/dist/InfiniteScroll/OuterListElement.d.ts +1 -1
  64. package/dist/InfiniteScroll/OuterListElement.js +1 -1
  65. package/dist/InfiniteScroll/utils.d.ts +1 -1
  66. package/dist/ItemsMenu/ItemsMenu.d.ts +1 -1
  67. package/dist/ItemsMenu/ItemsMenu.styles.js +0 -2
  68. package/dist/RowSelection/RowSelectionColumn.d.ts +2 -2
  69. package/dist/RowSelection/RowSelectionColumn.js +1 -1
  70. package/dist/RowSelection/RowSelectionColumn.types.d.ts +2 -2
  71. package/dist/Table.d.ts +1 -1
  72. package/dist/Table.js +8 -8
  73. package/dist/Table.styles.d.ts +2 -2
  74. package/dist/Table.styles.js +4 -4
  75. package/dist/Table.types.d.ts +4 -4
  76. package/dist/TableHeader/TableHeader.d.ts +1 -1
  77. package/dist/TableHeader/TableHeader.js +4 -5
  78. package/dist/TableHeader/TableHeader.types.d.ts +2 -2
  79. package/dist/TableHeader/TableLimit/TableLimit.d.ts +1 -1
  80. package/dist/TableHeader/TableLimit/TableLimit.js +2 -2
  81. package/dist/TableHeader/TableLimit/TableLimit.types.d.ts +1 -1
  82. package/dist/TableHeader/TableSelection.js +7 -5
  83. package/dist/TableHeader/TableSelection.types.d.ts +1 -1
  84. package/dist/TreeTable/TreeTable.d.ts +1 -1
  85. package/dist/TreeTable/TreeTable.js +4 -4
  86. package/dist/TreeTable/TreeTable.styles.js +3 -1
  87. package/dist/VirtualTable/VirtualTable.d.ts +2 -2
  88. package/dist/VirtualTable/VirtualTable.js +17 -15
  89. package/dist/VirtualTable/VirtualTable.types.d.ts +1 -1
  90. package/dist/VirtualTable/VirtualTableRow.d.ts +4 -5
  91. package/dist/VirtualTable/VirtualTableRow.js +3 -3
  92. package/dist/constants/TableSkeleton.constants.js +1 -1
  93. package/dist/hooks/useBulkSelection/useBulkSelection.d.ts +1 -1
  94. package/dist/hooks/useBulkSelection/useBulkSelection.js +4 -2
  95. package/dist/hooks/useRowKey/useRowKey.js +6 -3
  96. package/dist/hooks/useRowStar/useRowStar.d.ts +1 -1
  97. package/dist/hooks/useRowStar/useRowStar.js +3 -3
  98. package/dist/hooks/useRowStar/useRowStar.types.d.ts +3 -3
  99. package/dist/index.d.ts +3 -3
  100. package/dist/index.js +2 -2
  101. package/dist/style/index.css +1 -1
  102. package/dist/utils/calculateColumnWidths.d.ts +1 -1
  103. package/dist/utils/calculatePixels.js +1 -3
  104. package/dist/utils/getRecordSelectionStatus.d.ts +1 -1
  105. package/dist/utils/getSkeletonProps.js +4 -2
  106. package/dist/utils/getValueFromPath.js +6 -4
  107. package/dist/utils/locale.d.ts +2 -2
  108. package/package.json +27 -27
package/README.md CHANGED
@@ -156,14 +156,14 @@ Same as `onRow` `onHeaderRow` `onCell` `onHeaderCell`
156
156
  <Table
157
157
  onRow={(record, rowIndex) => {
158
158
  return {
159
- onClick: event => {}, // click row
160
- onDoubleClick: event => {}, // double click row
161
- onContextMenu: event => {}, // right button click row
162
- onMouseEnter: event => {}, // mouse enter row
163
- onMouseLeave: event => {}, // mouse leave row
159
+ onClick: (event) => {}, // click row
160
+ onDoubleClick: (event) => {}, // double click row
161
+ onContextMenu: (event) => {}, // right button click row
162
+ onMouseEnter: (event) => {}, // mouse enter row
163
+ onMouseLeave: (event) => {}, // mouse leave row
164
164
  };
165
165
  }}
166
- onHeaderRow={column => {
166
+ onHeaderRow={(column) => {
167
167
  return {
168
168
  onClick: () => {}, // click header row
169
169
  };
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ActionCellProps } from './ActionCell.types';
2
+ import { type ActionCellProps } from './ActionCell.types';
3
3
  declare const _default: React.MemoExoticComponent<({ children, gapSize, contentAlign, ...htmlAttributes }: ActionCellProps) => React.JSX.Element>;
4
4
  export default _default;
@@ -1,4 +1,4 @@
1
- import { ContentAlign } from './ActionCell.types';
1
+ import { type ContentAlign } from './ActionCell.types';
2
2
  export declare const ActionCell: import("styled-components").StyledComponent<"div", any, {
3
3
  gapSize: number;
4
4
  contentAlign: ContentAlign;
@@ -4,8 +4,6 @@ var align = {
4
4
  right: 'flex-end',
5
5
  center: 'center'
6
6
  };
7
-
8
- // eslint-disable-next-line import/prefer-default-export
9
7
  export var ActionCell = styled.div.withConfig({
10
8
  displayName: "ActionCellstyles__ActionCell",
11
9
  componentId: "sc-d77fu5-0"
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type ReactNode } from 'react';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type ContentAlign = 'left' | 'right' | 'center';
4
4
  export type ActionCellProps = WithHTMLAttributes<HTMLDivElement, {
5
5
  children: ReactNode | ReactNode[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { AvatarLabelProps } from './AvatarLabel.types';
2
+ import { type AvatarLabelProps } from './AvatarLabel.types';
3
3
  declare const AvatarLabel: ({ avatar, avatarAction, avatarLink, title, labels, icon, ellipsis, maxWidth, avatarSize, loader, ...htmlAttributes }: AvatarLabelProps) => React.JSX.Element;
4
4
  export default AvatarLabel;
@@ -7,7 +7,7 @@ export declare const Avatar: import("styled-components").StyledComponent<"div",
7
7
  }, never>;
8
8
  export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
9
9
  export declare const AvatarLink: import("styled-components").StyledComponent<"a", any, {}, never>;
10
- export declare const Title: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
10
+ export declare const Title: import("styled-components").StyledComponent<({ size, className, children, ellipsis, }: {
11
11
  size?: import("@synerise/ds-typography").TextSize | undefined;
12
12
  ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
13
13
  children?: import("react").ReactNode;
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from 'react';
1
+ import { type ReactElement, type ReactNode } from 'react';
2
2
  import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type AvatarLabelProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  avatar: ReactElement;
@@ -1,7 +1,5 @@
1
1
  import styled from 'styled-components';
2
2
  import { IconContainer } from '@synerise/ds-icon';
3
-
4
- // eslint-disable-next-line import/prefer-default-export
5
3
  export var Copyable = styled.div.withConfig({
6
4
  displayName: "Copyablestyles__Copyable",
7
5
  componentId: "sc-bj73sz-0"
@@ -1,4 +1,4 @@
1
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
2
2
  export type CopyableCellProps = WithHTMLAttributes<HTMLDivElement, {
3
3
  value: string;
4
4
  confirmMessage: string;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { CopyableCellProps } from './Copyable.types';
2
+ import { type CopyableCellProps } from './Copyable.types';
3
3
  declare const CopyableCell: ({ value, confirmMessage, tooltipTimeout, ...htmlAttributes }: CopyableCellProps) => React.JSX.Element;
4
4
  export default CopyableCell;
@@ -1,7 +1,7 @@
1
1
  var _excluded = ["value", "confirmMessage", "tooltipTimeout"];
2
2
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
- import React, { useState, useCallback, useEffect } from 'react';
4
3
  import copy from 'copy-to-clipboard';
4
+ import React, { useCallback, useEffect, useState } from 'react';
5
5
  import Icon, { CopyClipboardM } from '@synerise/ds-icon';
6
6
  import Tooltip from '@synerise/ds-tooltip';
7
7
  import * as S from './Copyable.styles';
@@ -24,7 +24,9 @@ var CopyableCell = function CopyableCell(_ref) {
24
24
  };
25
25
  }, [tooltipVisible, setTooltipVisible, tooltipTimeout]);
26
26
  var handleCopy = useCallback(function () {
27
- if (copy(value)) setTooltipVisible(true);
27
+ if (copy(value)) {
28
+ setTooltipVisible(true);
29
+ }
28
30
  }, [value]);
29
31
  return /*#__PURE__*/React.createElement(S.Copyable, htmlAttributes, /*#__PURE__*/React.createElement("span", null, value), /*#__PURE__*/React.createElement(Tooltip, {
30
32
  visible: tooltipVisible,
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { EditableCellProps } from './EditableCell.types';
2
+ import { type EditableCellProps } from './EditableCell.types';
3
3
  declare const EditableCell: ({ value, onChange, placeholder, ...htmlAttributes }: EditableCellProps) => React.JSX.Element;
4
4
  export default EditableCell;
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["value", "onChange", "placeholder"];
2
2
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
- import React, { useMemo, useCallback, useState } from 'react';
3
+ import React, { useCallback, useMemo, useState } from 'react';
4
4
  import Icon, { EditNolineS } from '@synerise/ds-icon';
5
5
  import { Input } from '@synerise/ds-input';
6
6
  import * as S from './EditableCell.styles';
@@ -19,10 +19,7 @@ var EditableCell = function EditableCell(_ref) {
19
19
  setEditMode(true);
20
20
  }, [setEditMode]);
21
21
  var render = useMemo(function () {
22
- return editMode ?
23
- /*#__PURE__*/
24
- // eslint-disable-next-line react/jsx-handler-names
25
- React.createElement(Input, {
22
+ return editMode ? /*#__PURE__*/React.createElement(Input, {
26
23
  value: editValue,
27
24
  autoFocus: true,
28
25
  resetMargin: true,
@@ -1,4 +1,4 @@
1
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
2
2
  export type EditableCellProps = WithHTMLAttributes<HTMLDivElement, {
3
3
  value?: string;
4
4
  onChange: (newValue: string) => void;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { FlagLabelProps } from './FlagLabelCell.types';
2
+ import { type FlagLabelProps } from './FlagLabelCell.types';
3
3
  declare const FlagLabelCell: ({ countryCode, label, ...htmlAttributes }: FlagLabelProps) => React.JSX.Element;
4
4
  export default FlagLabelCell;
@@ -1,6 +1,4 @@
1
1
  import styled from 'styled-components';
2
-
3
- // eslint-disable-next-line import/prefer-default-export
4
2
  export var FlagLabel = styled.div.withConfig({
5
3
  displayName: "FlagLabelCellstyles__FlagLabel",
6
4
  componentId: "sc-hckhy-0"
@@ -1,5 +1,5 @@
1
- import { CountryCode } from '@synerise/ds-flag/dist/Flag.types';
2
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type CountryCode } from '@synerise/ds-flag/dist/Flag.types';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type FlagLabelProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  countryCode: CountryCode;
5
5
  label: string;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { IconLabelProps } from './IconLabel.types';
2
+ import { type IconLabelProps } from './IconLabel.types';
3
3
  declare const IconLabelCell: ({ label, icon, disabled, ...htmlAttributes }: IconLabelProps) => React.JSX.Element;
4
4
  export default IconLabelCell;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { IconTooltipCellProps } from './IconTooltipCell.types';
2
+ import { type IconTooltipCellProps } from './IconTooltipCell.types';
3
3
  declare const IconTooltipCell: ({ label, icon, tooltip, tooltipIcon, disabled, ...htmlAttributes }: IconTooltipCellProps) => React.JSX.Element;
4
4
  export default IconTooltipCell;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { LabelsWithShowMoreProps } from './LabelsWithShowMore.types';
3
- import { DataSourceType } from './Modal/Modal.types';
2
+ import { type LabelsWithShowMoreProps } from './LabelsWithShowMore.types';
3
+ import { type DataSourceType } from './Modal/Modal.types';
4
4
  declare const LabelsWithShowMore: ({ items, numberOfVisibleItems, renderItem, labelKey, texts, loading, ...htmlAttributes }: LabelsWithShowMoreProps<DataSourceType>) => React.JSX.Element;
5
5
  export default LabelsWithShowMore;
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["items", "numberOfVisibleItems", "renderItem", "labelKey", "texts", "loading"];
2
2
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
- import React, { useState, useMemo } from 'react';
3
+ import React, { useMemo, useState } from 'react';
4
4
  import Tooltip from '@synerise/ds-tooltip';
5
5
  import * as S from './LabelsWithShowMore.styles';
6
6
  import DetailsModal from './Modal/Modal';
@@ -1,5 +1,5 @@
1
- import { ReactNode, Component } from 'react';
2
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type Component, type ReactNode } from 'react';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type ShowMoreTexts = {
4
4
  tooltip: ReactNode;
5
5
  searchPlaceholder: string;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { DataSourceType, ModalProps } from './Modal.types';
2
+ import { type DataSourceType, type ModalProps } from './Modal.types';
3
3
  declare const DetailsModal: React.FC<ModalProps<DataSourceType>>;
4
4
  export default DetailsModal;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { ShowMoreTexts } from '../LabelsWithShowMore.types';
1
+ import type React from 'react';
2
+ import { type ShowMoreTexts } from '../LabelsWithShowMore.types';
3
3
  export type DataSourceType = object & {
4
4
  key: React.ReactText;
5
5
  };
@@ -74,7 +74,7 @@ declare const _default: React.ForwardRefExoticComponent<{
74
74
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
75
75
  "aria-flowto"?: string | undefined;
76
76
  "aria-grabbed"?: (boolean | "true" | "false") | undefined;
77
- "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
77
+ "aria-haspopup"?: boolean | "dialog" | "menu" | "tree" | "true" | "false" | "grid" | "listbox" | undefined;
78
78
  "aria-hidden"?: (boolean | "true" | "false") | undefined;
79
79
  "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
80
80
  "aria-keyshortcuts"?: string | undefined;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IconProps } from '@synerise/ds-icon';
2
+ import { type IconProps } from '@synerise/ds-icon';
3
3
  export declare const StarCell: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const StarredIcon: import("styled-components").StyledComponent<({ name, component, className, ...rest }: IconProps) => import("react").JSX.Element, any, import("@synerise/ds-icon").BaseIconProps & Omit<import("react").HTMLAttributes<HTMLDivElement>, keyof import("@synerise/ds-icon").BaseIconProps> & import("@synerise/ds-utils").DataAttributes & {
5
5
  active?: boolean | undefined;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type ReactNode } from 'react';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type StarCellProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  children: ReactNode | ReactNode[];
5
5
  active?: boolean;
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { WithHTMLAttributes } from '@synerise/ds-utils';
3
- import { Color, Status } from '@synerise/ds-badge/dist/Badge.types';
1
+ import { type ReactNode } from 'react';
2
+ import { type Color, type Status } from '@synerise/ds-badge/dist/Badge.types';
3
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
4
4
  export type StatusLabelProps = WithHTMLAttributes<HTMLDivElement, {
5
5
  status?: Status;
6
6
  label: ReactNode;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { TagIconProps } from './TagIcon.types';
2
+ import { type TagIconProps } from './TagIcon.types';
3
3
  declare const TagIconCell: ({ children, disabled, ...htmlAttributes }: TagIconProps) => React.JSX.Element;
4
4
  export default TagIconCell;
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from 'react';
2
- import type { WithHTMLAttributes } from '@synerise/ds-utils';
1
+ import { type ReactNode } from 'react';
2
+ import { type WithHTMLAttributes } from '@synerise/ds-utils';
3
3
  export type TagIconProps = WithHTMLAttributes<HTMLDivElement, {
4
4
  children: ReactNode | ReactNode[];
5
5
  disabled?: boolean;
@@ -1,12 +1,12 @@
1
- import IconLabelCell from './IconLabel/IconLabel';
2
- import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
3
- import StatusLabelCell from './StatusLabel/StatusLabel';
1
+ import ActionCell from './Action/ActionCell';
4
2
  import AvatarLabelCell from './AvatarLabel/AvatarLabel';
5
- import TagIconCell from './TagIcon/TagIcon';
6
- import EditableCell from './Editable/EditableCell';
7
3
  import CopyableCell from './Copyable/CopyableCell';
8
- import ActionCell from './Action/ActionCell';
4
+ import EditableCell from './Editable/EditableCell';
9
5
  import FlagLabelCell from './FlagLabel/FlagLabelCell';
10
- import StarCell from './Star/StarCell';
6
+ import IconLabelCell from './IconLabel/IconLabel';
7
+ import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
11
8
  import LabelsWithShowMore from './LabelsWithShowMore/LabelsWithShowMore';
9
+ import StarCell from './Star/StarCell';
10
+ import StatusLabelCell from './StatusLabel/StatusLabel';
11
+ import TagIconCell from './TagIcon/TagIcon';
12
12
  export { IconLabelCell, IconTooltipCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore, };
@@ -1,12 +1,12 @@
1
- import IconLabelCell from './IconLabel/IconLabel';
2
- import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
3
- import StatusLabelCell from './StatusLabel/StatusLabel';
1
+ import ActionCell from './Action/ActionCell';
4
2
  import AvatarLabelCell from './AvatarLabel/AvatarLabel';
5
- import TagIconCell from './TagIcon/TagIcon';
6
- import EditableCell from './Editable/EditableCell';
7
3
  import CopyableCell from './Copyable/CopyableCell';
8
- import ActionCell from './Action/ActionCell';
4
+ import EditableCell from './Editable/EditableCell';
9
5
  import FlagLabelCell from './FlagLabel/FlagLabelCell';
10
- import StarCell from './Star/StarCell';
6
+ import IconLabelCell from './IconLabel/IconLabel';
7
+ import IconTooltipCell from './IconTooltipCell/IconTooltipCell';
11
8
  import LabelsWithShowMore from './LabelsWithShowMore/LabelsWithShowMore';
9
+ import StarCell from './Star/StarCell';
10
+ import StatusLabelCell from './StatusLabel/StatusLabel';
11
+ import TagIconCell from './TagIcon/TagIcon';
12
12
  export { IconLabelCell, IconTooltipCell, StatusLabelCell, AvatarLabelCell, TagIconCell, EditableCell, CopyableCell, ActionCell, FlagLabelCell, StarCell, LabelsWithShowMore };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ColumnSortOrder } from './useSortState';
2
+ import { type ColumnSortOrder } from './useSortState';
3
3
  export declare const CheckIcon: React.ForwardRefExoticComponent<{
4
4
  isActive: boolean;
5
5
  } & {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { withTheme } from 'styled-components';
3
- import Icon, { CheckS, SortAscendingM, SortDescendingM, ArrangeM, SortAzM, SortZaM } from '@synerise/ds-icon';
3
+ import Icon, { ArrangeM, CheckS, SortAscendingM, SortAzM, SortDescendingM, SortZaM } from '@synerise/ds-icon';
4
4
  var CheckIconBase = function CheckIconBase(_ref) {
5
5
  var isActive = _ref.isActive,
6
6
  theme = _ref.theme;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { DSColumnType, OnSortFn } from '../Table.types';
3
- import { SortStateAPI } from './useSortState';
2
+ import { type DSColumnType, type OnSortFn } from '../Table.types';
3
+ import { type SortStateAPI } from './useSortState';
4
4
  type SortRendererProps<T> = {
5
5
  sortStateApi: SortStateAPI;
6
6
  column: DSColumnType<T>;
7
7
  onSort?: OnSortFn;
8
8
  };
9
- export declare const CommonRenderer: <T extends unknown>({ column, sortStateApi }: SortRendererProps<T>) => React.JSX.Element;
10
- export declare const StringRenderer: <T extends unknown>({ column, sortStateApi }: SortRendererProps<T>) => React.JSX.Element;
9
+ export declare const CommonRenderer: <T>({ column, sortStateApi, }: SortRendererProps<T>) => React.JSX.Element;
10
+ export declare const StringRenderer: <T>({ column, sortStateApi, }: SortRendererProps<T>) => React.JSX.Element;
11
11
  export {};
@@ -1,12 +1,12 @@
1
- import React, { useState } from 'react';
2
1
  import { partial } from 'lodash';
2
+ import React, { useState } from 'react';
3
3
  import Dropdown from '@synerise/ds-dropdown';
4
- import Icon, { Close2M, SortAscendingM, SortDescendingM, SortAzM, SortZaM } from '@synerise/ds-icon';
4
+ import Icon, { Close2M, SortAscendingM, SortAzM, SortDescendingM, SortZaM } from '@synerise/ds-icon';
5
5
  import Menu from '@synerise/ds-menu';
6
6
  import { useTableLocaleContext } from '../utils/locale';
7
+ import { CheckIcon, DefaultSortIcon, StringSortIcon } from './SortIcons';
7
8
  import * as S from './SortRender.styles';
8
9
  import { toSortOrder } from './useSortState';
9
- import { CheckIcon, DefaultSortIcon, StringSortIcon } from './SortIcons';
10
10
  var handleButtonClick = function handleButtonClick(event) {
11
11
  event.stopPropagation();
12
12
  };
@@ -1,7 +1,7 @@
1
+ import { type ColumnTitleProps } from 'antd/lib/table/interface';
1
2
  import React from 'react';
2
- import { ColumnTitleProps } from 'antd/lib/table/interface';
3
- import { DSColumnType } from '../Table.types';
4
- import { SortStateAPI } from './useSortState';
3
+ import { type DSColumnType } from '../Table.types';
4
+ import { type SortStateAPI } from './useSortState';
5
5
  export type SortButtonsRenderer<T> = (sortStateApi: SortStateAPI, column: DSColumnType<T>) => React.ReactElement;
6
6
  export type SortRender<T> = 'default' | 'string' | SortButtonsRenderer<T>;
7
7
  export interface TitleWithSortOwnProps<T> {
@@ -10,5 +10,5 @@ export interface TitleWithSortOwnProps<T> {
10
10
  titleProps: ColumnTitleProps<T>;
11
11
  }
12
12
  export type TitleWithSortProps<T> = TitleWithSortOwnProps<T> & React.ComponentPropsWithoutRef<'span'>;
13
- export declare const TitleWithSort: <T extends unknown>({ column, sortRender, titleProps, ...spanProps }: TitleWithSortProps<T>) => React.ReactElement;
13
+ export declare const TitleWithSort: <T>({ column, sortRender, titleProps, ...spanProps }: TitleWithSortProps<T>) => React.ReactElement;
14
14
  export default TitleWithSort;
@@ -1,7 +1,7 @@
1
- import { DSColumnType, OnSortFn } from '../Table.types';
2
- import { SortStateAPI } from './useSortState';
3
- export declare const columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn) => <T extends unknown>(column: DSColumnType<T>) => DSColumnType<T>;
1
+ import { type DSColumnType, type OnSortFn } from '../Table.types';
2
+ import { type SortStateAPI } from './useSortState';
3
+ export declare const columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn) => <T>(column: DSColumnType<T>) => DSColumnType<T>;
4
4
  declare const _default: {
5
- columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn | undefined) => <T extends unknown>(column: DSColumnType<T>) => DSColumnType<T>;
5
+ columnWithSortButtons: (sortStateApi: SortStateAPI, onSort?: OnSortFn | undefined) => <T>(column: DSColumnType<T>) => DSColumnType<T>;
6
6
  };
7
7
  export default _default;
@@ -1,7 +1,7 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
- import { TitleWithSort } from './TitleWithSort';
4
3
  import { CommonRenderer, StringRenderer } from './SortRenderer';
4
+ import { TitleWithSort } from './TitleWithSort';
5
5
  var getSortRenderer = function getSortRenderer(sortRender, onSort) {
6
6
  if (sortRender === void 0) {
7
7
  sortRender = 'default';
@@ -1,7 +1,7 @@
1
- import { CompareFn } from 'antd/lib/table/interface';
2
- import { GroupType } from '../GroupTable/GroupTable.types';
3
- import { DSColumnType } from '../Table.types';
4
- import { ColumnSortOrder, SortStateAPI } from './useSortState';
1
+ import { type CompareFn } from 'antd/lib/table/interface';
2
+ import { type GroupType } from '../GroupTable/GroupTable.types';
3
+ import { type DSColumnType } from '../Table.types';
4
+ import { type ColumnSortOrder, type SortStateAPI } from './useSortState';
5
5
  export declare const getColumnsWithActiveSorting: <T extends GroupType<T>>(sortStateApi: SortStateAPI, columns?: DSColumnType<T>[] | undefined) => DSColumnType<T>[];
6
6
  export declare const sortRows: <T>(sortOrder: ColumnSortOrder, compareFn: CompareFn<T>, rows: T[]) => T[];
7
7
  export declare const sortDataSourceRows: <T extends GroupType<T>>(sortStateApi: SortStateAPI, sortingColumns?: DSColumnType<T>[] | undefined, dataSource?: readonly T[] | undefined) => readonly T[];
@@ -1,3 +1,3 @@
1
- import type { ReactPortal, ReactNode } from 'react';
1
+ import type { ReactNode, ReactPortal } from 'react';
2
2
  declare const createReplaceButtonsPortal: <T extends Element>(columnTitleElement: T | null, newButtonsNode: ReactNode) => () => ReactPortal | null;
3
3
  export default createReplaceButtonsPortal;
@@ -1,4 +1,4 @@
1
- import { DSColumnType, OnSortFn } from '../Table.types';
1
+ import { type DSColumnType, type OnSortFn } from '../Table.types';
2
2
  export type ColumnSortOrder = 'descend' | 'ascend' | null;
3
3
  export interface ColumnsSortState {
4
4
  [key: string]: {
@@ -13,6 +13,6 @@ export interface SortStateAPI {
13
13
  updateColumnsData: (columns: ColumnsSortState) => void;
14
14
  }
15
15
  export declare const toSortOrder: (value: string | null | undefined) => ColumnSortOrder;
16
- export declare const columnsToSortState: <T extends unknown>(columns?: DSColumnType<T>[]) => ColumnsSortState;
16
+ export declare const columnsToSortState: <T>(columns?: DSColumnType<T>[]) => ColumnsSortState;
17
17
  export declare const useSortState: (initialState: ColumnsSortState | undefined, onSort: OnSortFn | undefined) => SortStateAPI;
18
18
  export default useSortState;
@@ -1,6 +1,6 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
2
  import { groupBy, merge } from 'lodash';
3
+ import React from 'react';
4
4
  export var toSortOrder = function toSortOrder(value) {
5
5
  if (value === 'descend' || value === 'ascend') {
6
6
  return value;
@@ -86,13 +86,10 @@ var sortReducer = function sortReducer(state, action) {
86
86
  var type = action.type;
87
87
  switch (type) {
88
88
  case 'setSingleOrder':
89
- // @ts-ignore
90
89
  return setSingleOrder(state, action);
91
90
  case 'setMultipleOrder':
92
- // @ts-ignore
93
91
  return setMultipleOrder(state, action);
94
92
  case 'updateColumns':
95
- // @ts-ignore
96
93
  return updateColumns(state, action);
97
94
  default:
98
95
  return state;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { DSTableProps, RowType } from '../Table.types';
2
+ import { type DSTableProps, type RowType } from '../Table.types';
3
3
  declare function DefaultTable<T extends object & RowType<T>>(props: DSTableProps<T>): React.JSX.Element;
4
4
  export default DefaultTable;
@@ -1,17 +1,17 @@
1
1
  var _excluded = ["children"];
2
2
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- import React, { useCallback, useEffect, useMemo } from 'react';
5
- import { compact, isEqual } from 'lodash';
6
4
  import Table from 'antd/lib/table';
5
+ import { compact, isEqual } from 'lodash';
6
+ import React, { useCallback, useEffect, useMemo } from 'react';
7
7
  import { FormattedMessage } from 'react-intl';
8
8
  import Result from '@synerise/ds-result';
9
9
  import { usePrevious } from '@synerise/ds-utils';
10
- import { columnsToSortState, useSortState } from '../ColumnSortMenu/useSortState';
11
10
  import { columnWithSortButtons } from '../ColumnSortMenu/columnWithSortButtons';
11
+ import { columnsToSortState, useSortState } from '../ColumnSortMenu/useSortState';
12
+ import { RowSelectionColumn } from '../RowSelection';
12
13
  import { useRowKey } from '../hooks/useRowKey';
13
14
  import { useRowStar } from '../hooks/useRowStar/useRowStar';
14
- import { RowSelectionColumn } from '../RowSelection';
15
15
  import { getChildrenColumnName, isRecordSelectable } from '../utils';
16
16
  function DefaultTable(props) {
17
17
  var _selection$selections;
@@ -53,7 +53,7 @@ function DefaultTable(props) {
53
53
  }
54
54
  }, [columns, previousColumns, sortStateApi]);
55
55
 
56
- // @ts-ignore
56
+ // @ts-expect-error Parameter 'row' implicitly has an 'any' type.ts(7006)
57
57
  var RenderRow = useCallback(function (row) {
58
58
  var children = row.children,
59
59
  rowProps = _objectWithoutPropertiesLoose(row, _excluded);
@@ -64,13 +64,9 @@ function DefaultTable(props) {
64
64
  if (classNameWithLevel) {
65
65
  level = classNameWithLevel.split('-').pop();
66
66
  }
67
- return (
68
- /*#__PURE__*/
69
- // eslint-disable-next-line react/jsx-handler-names
70
- React.createElement("tr", _extends({}, rowProps, {
71
- className: row.className + " ds-table-row " + (level ? "ds-table-row-level-" + level : '')
72
- }), children)
73
- );
67
+ return /*#__PURE__*/React.createElement("tr", _extends({}, rowProps, {
68
+ className: row.className + " ds-table-row " + (level ? "ds-table-row-level-" + level : '')
69
+ }), children);
74
70
  }, []);
75
71
  var prependedColumns = compact([!!rowStar && starColumn]);
76
72
  var decoratedColumns = columns == null ? void 0 : columns.map(function (column) {
@@ -147,7 +143,7 @@ function DefaultTable(props) {
147
143
  locale: _extends({}, locale, {
148
144
  emptyText: emptyData
149
145
  })
150
- // @ts-ignore
146
+ // @ts-expect-error Type mismatch
151
147
  ,
152
148
  title: title,
153
149
  showSorterTooltip: false,
@@ -156,7 +152,7 @@ function DefaultTable(props) {
156
152
  row: RenderRow
157
153
  }
158
154
  }, decoratedComponents)
159
- // @ts-ignore
155
+ // @ts-expect-error Type mismatch
160
156
  ,
161
157
  rowSelection: selection && _extends({}, selection, {
162
158
  selections: selection == null || (_selection$selections = selection.selections) == null ? void 0 : _selection$selections.filter(Boolean),
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { Props } from './FilterTrigger.types';
2
+ import { type Props } from './FilterTrigger.types';
3
3
  declare const _default: React.NamedExoticComponent<Props>;
4
4
  export default _default;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export interface Props {
3
3
  name: string;
4
4
  selected?: {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { DSTableProps } from '../Table.types';
2
+ import { type DSTableProps } from '../Table.types';
3
3
  import '../style/index.less';
4
- import { GroupType } from './GroupTable.types';
4
+ import { type GroupType } from './GroupTable.types';
5
5
  declare function GroupTable<T extends GroupType<T>>(props: DSTableProps<T> & {
6
6
  addItem?: (column: string, value: React.ReactText | boolean | object) => void;
7
7
  hideGroupExpander?: boolean;