@synerise/ds-table 0.60.2 → 0.60.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/CHANGELOG.md +8 -0
- package/dist/Cell/Action/ActionCell.js +5 -11
- package/dist/Cell/Action/ActionCell.styles.js +2 -1
- package/dist/Cell/AvatarLabel/AvatarLabel.js +10 -18
- package/dist/Cell/Copyable/Copyable.styles.js +2 -1
- package/dist/Cell/Copyable/CopyableCell.js +6 -12
- package/dist/Cell/Editable/EditableCell.js +7 -14
- package/dist/Cell/FlagLabel/FlagLabelCell.js +2 -7
- package/dist/Cell/FlagLabel/FlagLabelCell.styles.js +2 -1
- package/dist/Cell/IconLabel/IconLabel.js +2 -7
- package/dist/Cell/IconLabel/IconLabel.styles.js +2 -1
- package/dist/Cell/IconTooltipCell/IconTooltipCell.js +7 -13
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.js +8 -14
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.js +8 -12
- package/dist/Cell/Star/StarCell.d.ts +4 -3
- package/dist/Cell/Star/StarCell.js +5 -10
- package/dist/Cell/StatusLabel/StatusLabel.js +3 -8
- package/dist/Cell/TagIcon/TagIcon.js +1 -6
- package/dist/Cell/TagIcon/TagIcon.styles.js +2 -1
- package/dist/ColumnSortMenu/SortIcons.js +3 -15
- package/dist/ColumnSortMenu/SortRenderer.js +8 -14
- package/dist/ColumnSortMenu/TitleWithSort.js +3 -7
- package/dist/ColumnSortMenu/columnWithSortButtons.js +0 -10
- package/dist/ColumnSortMenu/groupedColumnsSort.js +2 -15
- package/dist/ColumnSortMenu/replaceSortButtons.js +0 -7
- package/dist/ColumnSortMenu/useSortState.js +4 -40
- package/dist/DefaultTable/DefaultTable.js +26 -50
- package/dist/FilterTrigger/FilterTrigger.js +16 -20
- package/dist/GroupTable/GroupTable.js +24 -40
- package/dist/GroupTable/GroupTable.styles.js +2 -2
- package/dist/GroupTable/GroupTableBody/GroupTableBody.js +12 -17
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.js +6 -7
- package/dist/InfiniteScroll/BackToTopButton.js +0 -1
- package/dist/InfiniteScroll/InfiniteLoaderItem.js +9 -12
- package/dist/InfiniteScroll/OuterListElement.js +7 -25
- package/dist/InfiniteScroll/utils.js +2 -2
- package/dist/ItemsMenu/ItemsMenu.js +0 -2
- package/dist/ItemsMenu/ItemsMenu.styles.js +2 -1
- package/dist/RowSelection/RowSelectionColumn.js +12 -22
- package/dist/Table.js +26 -40
- package/dist/TableHeader/TableHeader.js +21 -28
- package/dist/TableHeader/TableLimit/TableLimit.js +4 -7
- package/dist/TableHeader/TableSelection.js +13 -34
- package/dist/TreeTable/TreeTable.js +9 -11
- package/dist/TreeTable/TreeTable.styles.js +0 -2
- package/dist/VirtualTable/VirtualTable.js +101 -178
- package/dist/VirtualTable/VirtualTable.styles.js +0 -3
- package/dist/VirtualTable/VirtualTableRow.js +10 -26
- package/dist/constants/TableSkeleton.constants.js +0 -1
- package/dist/hooks/useRowKey/useRowKey.js +3 -1
- package/dist/hooks/useRowStar/useRowStar.js +6 -12
- package/dist/utils/calculateColumnWidths.js +0 -5
- package/dist/utils/calculatePixels.js +4 -10
- package/dist/utils/getRecordSelectionStatus.js +2 -3
- package/dist/utils/getSkeletonProps.js +7 -15
- package/dist/utils/getValueFromPath.js +2 -1
- package/dist/utils/isRecordSelectable.js +2 -4
- package/dist/utils/locale.js +0 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.60.3](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.60.2...@synerise/ds-table@0.60.3) (2024-11-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-table
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.60.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.60.1...@synerise/ds-table@0.60.2) (2024-11-21)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
var _excluded = ["children", "gapSize", "contentAlign"];
|
|
2
|
-
|
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
|
|
7
4
|
import React from 'react';
|
|
8
5
|
import * as S from './ActionCell.styles';
|
|
9
6
|
var DEFAULT_GAP_SIZE = 24;
|
|
10
|
-
|
|
11
7
|
var ActionCell = function ActionCell(_ref) {
|
|
12
8
|
var children = _ref.children,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
_ref$gapSize = _ref.gapSize,
|
|
10
|
+
gapSize = _ref$gapSize === void 0 ? DEFAULT_GAP_SIZE : _ref$gapSize,
|
|
11
|
+
_ref$contentAlign = _ref.contentAlign,
|
|
12
|
+
contentAlign = _ref$contentAlign === void 0 ? 'right' : _ref$contentAlign,
|
|
13
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
14
|
return /*#__PURE__*/React.createElement(S.ActionCell, _extends({
|
|
20
15
|
gapSize: gapSize,
|
|
21
16
|
contentAlign: contentAlign
|
|
22
17
|
}, htmlAttributes), children);
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
export default React.memo(ActionCell);
|
|
@@ -3,8 +3,9 @@ var align = {
|
|
|
3
3
|
left: 'flex-start',
|
|
4
4
|
right: 'flex-end',
|
|
5
5
|
center: 'center'
|
|
6
|
-
};
|
|
6
|
+
};
|
|
7
7
|
|
|
8
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
8
9
|
export var ActionCell = styled.div.withConfig({
|
|
9
10
|
displayName: "ActionCellstyles__ActionCell",
|
|
10
11
|
componentId: "d77fu5-0"
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
var _excluded = ["avatar", "avatarAction", "avatarLink", "title", "labels", "icon", "ellipsis", "maxWidth", "avatarSize", "loader"];
|
|
2
|
-
|
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
|
|
7
4
|
import React from 'react';
|
|
8
5
|
import { v4 as uuid } from 'uuid';
|
|
9
6
|
import * as S from './AvatarLabel.styles';
|
|
10
|
-
|
|
11
7
|
var AvatarLabel = function AvatarLabel(_ref) {
|
|
12
8
|
var avatar = _ref.avatar,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
avatarAction = _ref.avatarAction,
|
|
10
|
+
avatarLink = _ref.avatarLink,
|
|
11
|
+
title = _ref.title,
|
|
12
|
+
labels = _ref.labels,
|
|
13
|
+
icon = _ref.icon,
|
|
14
|
+
ellipsis = _ref.ellipsis,
|
|
15
|
+
maxWidth = _ref.maxWidth,
|
|
16
|
+
avatarSize = _ref.avatarSize,
|
|
17
|
+
loader = _ref.loader,
|
|
18
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24
19
|
var titleEllipsisProps = ellipsis ? {
|
|
25
20
|
ellipsis: {
|
|
26
21
|
tooltip: title
|
|
27
22
|
}
|
|
28
23
|
} : {};
|
|
29
|
-
|
|
30
24
|
var handleLinkClick = function handleLinkClick(event) {
|
|
31
25
|
if (event.metaKey || event.ctrlKey) {
|
|
32
26
|
event.stopPropagation();
|
|
@@ -34,7 +28,6 @@ var AvatarLabel = function AvatarLabel(_ref) {
|
|
|
34
28
|
event.preventDefault();
|
|
35
29
|
}
|
|
36
30
|
};
|
|
37
|
-
|
|
38
31
|
var cellContent = /*#__PURE__*/React.createElement(React.Fragment, null, icon && /*#__PURE__*/React.createElement(S.Icon, null, icon), /*#__PURE__*/React.createElement(S.Avatar, {
|
|
39
32
|
clickable: Boolean(avatarAction)
|
|
40
33
|
}, avatar), /*#__PURE__*/React.createElement(S.Description, null, /*#__PURE__*/React.createElement(S.Title, _extends({}, titleEllipsisProps, {
|
|
@@ -56,5 +49,4 @@ var AvatarLabel = function AvatarLabel(_ref) {
|
|
|
56
49
|
onClick: handleLinkClick
|
|
57
50
|
}, cellContent) : cellContent);
|
|
58
51
|
};
|
|
59
|
-
|
|
60
52
|
export default AvatarLabel;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { IconContainer } from '@synerise/ds-icon';
|
|
2
|
+
import { IconContainer } from '@synerise/ds-icon';
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
4
5
|
export var Copyable = styled.div.withConfig({
|
|
5
6
|
displayName: "Copyablestyles__Copyable",
|
|
6
7
|
componentId: "bj73sz-0"
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
var _excluded = ["value", "confirmMessage", "tooltipTimeout"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
6
4
|
import copy from 'copy-to-clipboard';
|
|
7
5
|
import Icon, { CopyClipboardM } from '@synerise/ds-icon';
|
|
8
6
|
import Tooltip from '@synerise/ds-tooltip';
|
|
9
7
|
import * as S from './Copyable.styles';
|
|
10
8
|
var DEFAULT_TIMEOUT = 2000;
|
|
11
|
-
|
|
12
9
|
var CopyableCell = function CopyableCell(_ref) {
|
|
13
10
|
var value = _ref.value,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
confirmMessage = _ref.confirmMessage,
|
|
12
|
+
_ref$tooltipTimeout = _ref.tooltipTimeout,
|
|
13
|
+
tooltipTimeout = _ref$tooltipTimeout === void 0 ? DEFAULT_TIMEOUT : _ref$tooltipTimeout,
|
|
14
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
15
|
var _useState = useState(false),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
tooltipVisible = _useState[0],
|
|
17
|
+
setTooltipVisible = _useState[1];
|
|
23
18
|
useEffect(function () {
|
|
24
19
|
var timer = setTimeout(function () {
|
|
25
20
|
setTooltipVisible(false);
|
|
@@ -40,5 +35,4 @@ var CopyableCell = function CopyableCell(_ref) {
|
|
|
40
35
|
component: /*#__PURE__*/React.createElement(CopyClipboardM, null)
|
|
41
36
|
})));
|
|
42
37
|
};
|
|
43
|
-
|
|
44
38
|
export default CopyableCell;
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
var _excluded = ["value", "onChange", "placeholder"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React, { useMemo, useCallback, useState } from 'react';
|
|
6
4
|
import Icon, { EditNolineS } from '@synerise/ds-icon';
|
|
7
5
|
import { Input } from '@synerise/ds-input';
|
|
8
6
|
import * as S from './EditableCell.styles';
|
|
9
|
-
|
|
10
7
|
var EditableCell = function EditableCell(_ref) {
|
|
11
8
|
var value = _ref.value,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
onChange = _ref.onChange,
|
|
10
|
+
placeholder = _ref.placeholder,
|
|
11
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
12
|
var _useState = useState(false),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
editMode = _useState[0],
|
|
14
|
+
setEditMode = _useState[1];
|
|
20
15
|
var _useState2 = useState(value || ''),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
editValue = _useState2[0],
|
|
17
|
+
setEditValue = _useState2[1];
|
|
24
18
|
var enterEditMode = useCallback(function () {
|
|
25
19
|
setEditMode(true);
|
|
26
20
|
}, [setEditMode]);
|
|
@@ -49,5 +43,4 @@ var EditableCell = function EditableCell(_ref) {
|
|
|
49
43
|
}, [editMode, value, enterEditMode, editValue, setEditValue, onChange, placeholder]);
|
|
50
44
|
return /*#__PURE__*/React.createElement(S.EditableCell, htmlAttributes, render);
|
|
51
45
|
};
|
|
52
|
-
|
|
53
46
|
export default EditableCell;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
var _excluded = ["countryCode", "label"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import DSFlag from '@synerise/ds-flag';
|
|
7
5
|
import * as S from './FlagLabelCell.styles';
|
|
8
|
-
|
|
9
6
|
var FlagLabelCell = function FlagLabelCell(_ref) {
|
|
10
7
|
var countryCode = _ref.countryCode,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
label = _ref.label,
|
|
9
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
10
|
return /*#__PURE__*/React.createElement(S.FlagLabel, htmlAttributes, /*#__PURE__*/React.createElement(DSFlag, {
|
|
15
11
|
country: countryCode,
|
|
16
12
|
size: 20
|
|
17
13
|
}), /*#__PURE__*/React.createElement("span", null, label));
|
|
18
14
|
};
|
|
19
|
-
|
|
20
15
|
export default FlagLabelCell;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
1
|
+
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
3
4
|
export var FlagLabel = styled.div.withConfig({
|
|
4
5
|
displayName: "FlagLabelCellstyles__FlagLabel",
|
|
5
6
|
componentId: "hckhy-0"
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
var _excluded = ["label", "icon"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import Icon from '@synerise/ds-icon';
|
|
7
5
|
import * as S from './IconLabel.styles';
|
|
8
|
-
|
|
9
6
|
var IconLabelCell = function IconLabelCell(_ref) {
|
|
10
7
|
var label = _ref.label,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
icon = _ref.icon,
|
|
9
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
10
|
return /*#__PURE__*/React.createElement(S.IconLabelCell, htmlAttributes, /*#__PURE__*/React.createElement(Icon, icon), /*#__PURE__*/React.createElement("span", null, label));
|
|
15
11
|
};
|
|
16
|
-
|
|
17
12
|
export default IconLabelCell;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { IconContainer } from '@synerise/ds-icon';
|
|
2
|
+
import { IconContainer } from '@synerise/ds-icon';
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
4
5
|
export var IconLabelCell = styled.span.withConfig({
|
|
5
6
|
displayName: "IconLabelstyles__IconLabelCell",
|
|
6
7
|
componentId: "sc-1y3fuli-0"
|
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
var _excluded = ["label", "icon", "tooltip", "tooltipIcon"];
|
|
2
|
-
|
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
|
|
7
4
|
import React from 'react';
|
|
8
5
|
import Icon from '@synerise/ds-icon';
|
|
9
6
|
import Tooltip from '@synerise/ds-tooltip';
|
|
10
7
|
import * as S from './IconTooltipCell.styles';
|
|
11
|
-
|
|
12
8
|
var IconTooltipCell = function IconTooltipCell(_ref) {
|
|
13
9
|
var label = _ref.label,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
_ref$icon = _ref.icon,
|
|
11
|
+
icon = _ref$icon === void 0 ? {} : _ref$icon,
|
|
12
|
+
_ref$tooltip = _ref.tooltip,
|
|
13
|
+
tooltip = _ref$tooltip === void 0 ? {} : _ref$tooltip,
|
|
14
|
+
_ref$tooltipIcon = _ref.tooltipIcon,
|
|
15
|
+
tooltipIcon = _ref$tooltipIcon === void 0 ? {} : _ref$tooltipIcon,
|
|
16
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
17
|
return /*#__PURE__*/React.createElement(S.IconTooltipCell, htmlAttributes, !!icon && /*#__PURE__*/React.createElement(Icon, _extends({
|
|
23
18
|
className: "main-icon"
|
|
24
19
|
}, icon)), !!label && /*#__PURE__*/React.createElement(S.Label, null, label), tooltipIcon && /*#__PURE__*/React.createElement(Tooltip, tooltip, /*#__PURE__*/React.createElement(Icon, _extends({
|
|
25
20
|
className: "tooltip-icon"
|
|
26
21
|
}, tooltipIcon))));
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
export default IconTooltipCell;
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
var _excluded = ["items", "numberOfVisibleItems", "renderItem", "labelKey", "texts", "loading"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React, { useState, useMemo } from 'react';
|
|
6
4
|
import Tooltip from '@synerise/ds-tooltip';
|
|
7
5
|
import * as S from './LabelsWithShowMore.styles';
|
|
8
6
|
import DetailsModal from './Modal/Modal';
|
|
9
|
-
|
|
10
7
|
var LabelsWithShowMore = function LabelsWithShowMore(_ref) {
|
|
11
8
|
var items = _ref.items,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
numberOfVisibleItems = _ref.numberOfVisibleItems,
|
|
10
|
+
renderItem = _ref.renderItem,
|
|
11
|
+
labelKey = _ref.labelKey,
|
|
12
|
+
texts = _ref.texts,
|
|
13
|
+
loading = _ref.loading,
|
|
14
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
15
|
var _useState = useState(false),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
modalVisible = _useState[0],
|
|
17
|
+
setModalVisible = _useState[1];
|
|
23
18
|
var diff = useMemo(function () {
|
|
24
19
|
return items.length - numberOfVisibleItems;
|
|
25
20
|
}, [items, numberOfVisibleItems]);
|
|
@@ -46,5 +41,4 @@ var LabelsWithShowMore = function LabelsWithShowMore(_ref) {
|
|
|
46
41
|
loading: loading
|
|
47
42
|
}));
|
|
48
43
|
};
|
|
49
|
-
|
|
50
44
|
export default LabelsWithShowMore;
|
|
@@ -2,20 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import Modal from '@synerise/ds-modal';
|
|
3
3
|
import SearchInput from '@synerise/ds-search/dist/Elements/SearchInput/SearchInput';
|
|
4
4
|
import VirtualTable from '../../../VirtualTable/VirtualTable';
|
|
5
|
-
|
|
6
5
|
var DetailsModal = function DetailsModal(_ref) {
|
|
7
6
|
var visible = _ref.visible,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
hide = _ref.hide,
|
|
8
|
+
items = _ref.items,
|
|
9
|
+
texts = _ref.texts,
|
|
10
|
+
renderItem = _ref.renderItem,
|
|
11
|
+
labelKey = _ref.labelKey,
|
|
12
|
+
loading = _ref.loading;
|
|
15
13
|
var _React$useState = React.useState(''),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
searchQuery = _React$useState[0],
|
|
15
|
+
setSearchQuery = _React$useState[1];
|
|
19
16
|
var columns = React.useMemo(function () {
|
|
20
17
|
return [{
|
|
21
18
|
dataIndex: labelKey,
|
|
@@ -66,5 +63,4 @@ var DetailsModal = function DetailsModal(_ref) {
|
|
|
66
63
|
hideColumnNames: true
|
|
67
64
|
}));
|
|
68
65
|
};
|
|
69
|
-
|
|
70
66
|
export default DetailsModal;
|
|
@@ -8,12 +8,14 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
8
8
|
suppressContentEditableWarning?: boolean | undefined;
|
|
9
9
|
suppressHydrationWarning?: boolean | undefined;
|
|
10
10
|
accessKey?: string | undefined;
|
|
11
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
11
12
|
autoFocus?: boolean | undefined;
|
|
12
13
|
className?: string | undefined;
|
|
13
14
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
14
15
|
contextMenu?: string | undefined;
|
|
15
16
|
dir?: string | undefined;
|
|
16
17
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
|
+
enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
17
19
|
hidden?: boolean | undefined;
|
|
18
20
|
id?: string | undefined;
|
|
19
21
|
lang?: string | undefined;
|
|
@@ -35,7 +37,6 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
35
37
|
rev?: string | undefined;
|
|
36
38
|
typeof?: string | undefined;
|
|
37
39
|
vocab?: string | undefined;
|
|
38
|
-
autoCapitalize?: string | undefined;
|
|
39
40
|
autoCorrect?: string | undefined;
|
|
40
41
|
autoSave?: string | undefined;
|
|
41
42
|
color?: string | undefined;
|
|
@@ -46,12 +47,12 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
46
47
|
itemRef?: string | undefined;
|
|
47
48
|
results?: number | undefined;
|
|
48
49
|
security?: string | undefined;
|
|
49
|
-
unselectable?: "
|
|
50
|
+
unselectable?: "off" | "on" | undefined;
|
|
50
51
|
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
51
52
|
is?: string | undefined;
|
|
52
53
|
"aria-activedescendant"?: string | undefined;
|
|
53
54
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
54
|
-
"aria-autocomplete"?: "
|
|
55
|
+
"aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
|
|
55
56
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
56
57
|
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
57
58
|
"aria-colcount"?: number | undefined;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
var _excluded = ["children", "active", "onClick", "theme", "starTooltip"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React, { useMemo } from 'react';
|
|
6
4
|
import { withTheme } from 'styled-components';
|
|
7
5
|
import Icon, { StarFillM, StarM } from '@synerise/ds-icon';
|
|
8
6
|
import Tooltip from '@synerise/ds-tooltip/dist/Tooltip';
|
|
9
7
|
import * as S from './StarCell.styles';
|
|
10
|
-
|
|
11
8
|
var StarCell = function StarCell(_ref) {
|
|
12
9
|
var children = _ref.children,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
active = _ref.active,
|
|
11
|
+
onClick = _ref.onClick,
|
|
12
|
+
theme = _ref.theme,
|
|
13
|
+
starTooltip = _ref.starTooltip,
|
|
14
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
15
|
var icon = useMemo(function () {
|
|
20
16
|
return active ? /*#__PURE__*/React.createElement(Icon, {
|
|
21
17
|
component: /*#__PURE__*/React.createElement(StarFillM, null),
|
|
@@ -36,5 +32,4 @@ var StarCell = function StarCell(_ref) {
|
|
|
36
32
|
onClick: onClick
|
|
37
33
|
})), children);
|
|
38
34
|
};
|
|
39
|
-
|
|
40
35
|
export default withTheme(StarCell);
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
var _excluded = ["status", "label", "customColor"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import Badge from '@synerise/ds-badge';
|
|
7
5
|
import * as S from './StatusLabel.styles';
|
|
8
|
-
|
|
9
6
|
var StatusLabelCell = function StatusLabelCell(_ref) {
|
|
10
7
|
var status = _ref.status,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
label = _ref.label,
|
|
9
|
+
customColor = _ref.customColor,
|
|
10
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
11
|
return /*#__PURE__*/React.createElement(S.StatusLabel, htmlAttributes, /*#__PURE__*/React.createElement(Badge, {
|
|
16
12
|
customColor: customColor,
|
|
17
13
|
status: status
|
|
18
14
|
}), /*#__PURE__*/React.createElement(S.Label, null, label));
|
|
19
15
|
};
|
|
20
|
-
|
|
21
16
|
export default StatusLabelCell;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
var _excluded = ["children"];
|
|
2
|
-
|
|
3
2
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import * as S from './TagIcon.styles';
|
|
7
|
-
|
|
8
5
|
var TagIconCell = function TagIconCell(_ref) {
|
|
9
6
|
var children = _ref.children,
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
htmlAttributes = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
8
|
return /*#__PURE__*/React.createElement(S.TagIcon, htmlAttributes, " ", children, " ");
|
|
13
9
|
};
|
|
14
|
-
|
|
15
10
|
export default TagIconCell;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { Tag } from '@synerise/ds-tags/dist/Tag/Tag.styles';
|
|
2
|
+
import { Tag } from '@synerise/ds-tags/dist/Tag/Tag.styles';
|
|
3
3
|
|
|
4
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
4
5
|
export var TagIcon = styled.div.withConfig({
|
|
5
6
|
displayName: "TagIconstyles__TagIcon",
|
|
6
7
|
componentId: "o88sq0-0"
|
|
@@ -1,66 +1,54 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { withTheme } from 'styled-components';
|
|
3
3
|
import Icon, { CheckS, SortAscendingM, SortDescendingM, ArrangeM, SortAzM, SortZaM } from '@synerise/ds-icon';
|
|
4
|
-
|
|
5
4
|
var CheckIconBase = function CheckIconBase(_ref) {
|
|
6
5
|
var isActive = _ref.isActive,
|
|
7
|
-
|
|
6
|
+
theme = _ref.theme;
|
|
8
7
|
return isActive ? /*#__PURE__*/React.createElement(Icon, {
|
|
9
8
|
component: /*#__PURE__*/React.createElement(CheckS, null),
|
|
10
9
|
color: theme.palette['green-500']
|
|
11
10
|
}) : null;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
export var CheckIcon = withTheme(CheckIconBase);
|
|
15
|
-
|
|
16
13
|
var DefaultSortIconBase = function DefaultSortIconBase(_ref2) {
|
|
17
14
|
var sortOrder = _ref2.sortOrder,
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
theme = _ref2.theme;
|
|
20
16
|
if (sortOrder === 'ascend') {
|
|
21
17
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
22
18
|
component: /*#__PURE__*/React.createElement(SortAscendingM, null),
|
|
23
19
|
color: theme.palette['gray-600']
|
|
24
20
|
});
|
|
25
21
|
}
|
|
26
|
-
|
|
27
22
|
if (sortOrder === 'descend') {
|
|
28
23
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
29
24
|
component: /*#__PURE__*/React.createElement(SortDescendingM, null),
|
|
30
25
|
color: theme.palette['gray-600']
|
|
31
26
|
});
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
35
29
|
component: /*#__PURE__*/React.createElement(ArrangeM, null),
|
|
36
30
|
color: theme.palette['gray-600']
|
|
37
31
|
});
|
|
38
32
|
};
|
|
39
|
-
|
|
40
33
|
export var DefaultSortIcon = withTheme(DefaultSortIconBase);
|
|
41
|
-
|
|
42
34
|
var StringSortIconBase = function StringSortIconBase(_ref3) {
|
|
43
35
|
var sortOrder = _ref3.sortOrder,
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
theme = _ref3.theme;
|
|
46
37
|
if (sortOrder === 'ascend') {
|
|
47
38
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
48
39
|
component: /*#__PURE__*/React.createElement(SortAzM, null),
|
|
49
40
|
color: theme.palette['gray-600']
|
|
50
41
|
});
|
|
51
42
|
}
|
|
52
|
-
|
|
53
43
|
if (sortOrder === 'descend') {
|
|
54
44
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
55
45
|
component: /*#__PURE__*/React.createElement(SortZaM, null),
|
|
56
46
|
color: theme.palette['gray-600']
|
|
57
47
|
});
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
61
50
|
component: /*#__PURE__*/React.createElement(ArrangeM, null),
|
|
62
51
|
color: theme.palette['gray-600']
|
|
63
52
|
});
|
|
64
53
|
};
|
|
65
|
-
|
|
66
54
|
export var StringSortIcon = withTheme(StringSortIconBase);
|
|
@@ -7,24 +7,20 @@ import { useTableLocaleContext } from '../utils/locale';
|
|
|
7
7
|
import * as S from './SortRender.styles';
|
|
8
8
|
import { toSortOrder } from './useSortState';
|
|
9
9
|
import { CheckIcon, DefaultSortIcon, StringSortIcon } from './SortIcons';
|
|
10
|
-
|
|
11
10
|
var handleButtonClick = function handleButtonClick(event) {
|
|
12
11
|
event.stopPropagation();
|
|
13
12
|
};
|
|
14
|
-
|
|
15
13
|
export var CommonRenderer = function CommonRenderer(_ref) {
|
|
16
14
|
var column = _ref.column,
|
|
17
|
-
|
|
15
|
+
sortStateApi = _ref.sortStateApi;
|
|
18
16
|
var getColumnSortOrder = sortStateApi.getColumnSortOrder,
|
|
19
|
-
|
|
17
|
+
setColumnSortOrder = sortStateApi.setColumnSortOrder;
|
|
20
18
|
var columnKey = String(column.key);
|
|
21
19
|
var columnSortOrder = column.key ? getColumnSortOrder(columnKey) : null;
|
|
22
20
|
var onSortOrderChange = partial(setColumnSortOrder, columnKey);
|
|
23
|
-
|
|
24
21
|
var _useState = useState(false),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
isDropdownVisible = _useState[0],
|
|
23
|
+
setIsDropdownVisible = _useState[1];
|
|
28
24
|
var locale = useTableLocaleContext();
|
|
29
25
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
30
26
|
onVisibleChange: function onVisibleChange(isVisible) {
|
|
@@ -80,17 +76,15 @@ export var CommonRenderer = function CommonRenderer(_ref) {
|
|
|
80
76
|
};
|
|
81
77
|
export var StringRenderer = function StringRenderer(_ref3) {
|
|
82
78
|
var column = _ref3.column,
|
|
83
|
-
|
|
79
|
+
sortStateApi = _ref3.sortStateApi;
|
|
84
80
|
var getColumnSortOrder = sortStateApi.getColumnSortOrder,
|
|
85
|
-
|
|
81
|
+
setColumnSortOrder = sortStateApi.setColumnSortOrder;
|
|
86
82
|
var columnKey = String(column.key);
|
|
87
83
|
var columnSortOrder = column.key ? getColumnSortOrder(columnKey) : null;
|
|
88
84
|
var onSortOrderChange = partial(setColumnSortOrder, columnKey);
|
|
89
|
-
|
|
90
85
|
var _useState2 = useState(false),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
isDropdownVisible = _useState2[0],
|
|
87
|
+
setIsDropdownVisible = _useState2[1];
|
|
94
88
|
var locale = useTableLocaleContext();
|
|
95
89
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
96
90
|
onVisibleChange: function onVisibleChange(isVisible) {
|