@synerise/ds-table 1.9.10 → 1.9.12
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/README.md +9 -10
- package/dist/Cell/Action/ActionCell.d.ts +2 -2
- package/dist/Cell/Action/ActionCell.js +15 -18
- package/dist/Cell/Action/ActionCell.styles.d.ts +2 -2
- package/dist/Cell/Action/ActionCell.styles.js +10 -11
- package/dist/Cell/Action/ActionCell.types.d.ts +2 -2
- package/dist/Cell/Action/ActionCell.types.js +1 -1
- package/dist/Cell/AvatarLabel/AvatarLabel.d.ts +2 -2
- package/dist/Cell/AvatarLabel/AvatarLabel.js +32 -43
- package/dist/Cell/AvatarLabel/AvatarLabel.styles.d.ts +13 -13
- package/dist/Cell/AvatarLabel/AvatarLabel.styles.js +27 -28
- package/dist/Cell/AvatarLabel/AvatarLabel.types.d.ts +2 -2
- package/dist/Cell/AvatarLabel/AvatarLabel.types.js +1 -1
- package/dist/Cell/Copyable/Copyable.styles.d.ts +2 -2
- package/dist/Cell/Copyable/Copyable.styles.js +9 -15
- package/dist/Cell/Copyable/Copyable.types.d.ts +1 -1
- package/dist/Cell/Copyable/Copyable.types.js +1 -1
- package/dist/Cell/Copyable/CopyableCell.d.ts +2 -2
- package/dist/Cell/Copyable/CopyableCell.js +23 -27
- package/dist/Cell/Editable/EditableCell.d.ts +2 -2
- package/dist/Cell/Editable/EditableCell.js +26 -39
- package/dist/Cell/Editable/EditableCell.styles.d.ts +2 -2
- package/dist/Cell/Editable/EditableCell.styles.js +9 -7
- package/dist/Cell/Editable/EditableCell.types.d.ts +1 -1
- package/dist/Cell/Editable/EditableCell.types.js +1 -1
- package/dist/Cell/FlagLabel/FlagLabelCell.d.ts +2 -2
- package/dist/Cell/FlagLabel/FlagLabelCell.js +15 -14
- package/dist/Cell/FlagLabel/FlagLabelCell.styles.d.ts +1 -1
- package/dist/Cell/FlagLabel/FlagLabelCell.styles.js +6 -3
- package/dist/Cell/FlagLabel/FlagLabelCell.types.d.ts +2 -2
- package/dist/Cell/FlagLabel/FlagLabelCell.types.js +1 -1
- package/dist/Cell/IconLabel/IconLabel.d.ts +2 -2
- package/dist/Cell/IconLabel/IconLabel.js +14 -15
- package/dist/Cell/IconLabel/IconLabel.styles.d.ts +1 -1
- package/dist/Cell/IconLabel/IconLabel.styles.js +7 -6
- package/dist/Cell/IconLabel/IconLabel.types.d.ts +3 -3
- package/dist/Cell/IconLabel/IconLabel.types.js +1 -1
- package/dist/Cell/IconTooltipCell/IconTooltipCell.d.ts +2 -2
- package/dist/Cell/IconTooltipCell/IconTooltipCell.js +18 -23
- package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.d.ts +2 -2
- package/dist/Cell/IconTooltipCell/IconTooltipCell.styles.js +9 -11
- package/dist/Cell/IconTooltipCell/IconTooltipCell.types.d.ts +4 -4
- package/dist/Cell/IconTooltipCell/IconTooltipCell.types.js +1 -1
- package/dist/Cell/InputNumber/InputNumberCell.d.ts +2 -2
- package/dist/Cell/InputNumber/InputNumberCell.js +10 -17
- package/dist/Cell/InputNumber/InputNumberCell.styles.d.ts +1 -1
- package/dist/Cell/InputNumber/InputNumberCell.styles.js +9 -5
- package/dist/Cell/InputNumber/InputNumberCell.types.d.ts +2 -2
- package/dist/Cell/InputNumber/InputNumberCell.types.js +1 -1
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.d.ts +3 -3
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.js +29 -40
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.styles.d.ts +3 -3
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.styles.js +11 -8
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.d.ts +2 -2
- package/dist/Cell/LabelsWithShowMore/LabelsWithShowMore.types.js +1 -1
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.d.ts +2 -2
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.js +35 -64
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +3 -3
- package/dist/Cell/LabelsWithShowMore/Modal/Modal.types.js +1 -1
- package/dist/Cell/Star/StarCell.d.ts +45 -45
- package/dist/Cell/Star/StarCell.js +25 -31
- package/dist/Cell/Star/StarCell.styles.d.ts +2 -2
- package/dist/Cell/Star/StarCell.styles.js +11 -9
- package/dist/Cell/Star/StarCell.types.d.ts +2 -2
- package/dist/Cell/Star/StarCell.types.js +1 -1
- package/dist/Cell/StatusLabel/StatusLabel.d.ts +2 -2
- package/dist/Cell/StatusLabel/StatusLabel.js +17 -19
- package/dist/Cell/StatusLabel/StatusLabel.styles.d.ts +2 -2
- package/dist/Cell/StatusLabel/StatusLabel.styles.js +9 -9
- package/dist/Cell/StatusLabel/StatusLabel.types.d.ts +3 -3
- package/dist/Cell/StatusLabel/StatusLabel.types.js +1 -1
- package/dist/Cell/TagIcon/TagIcon.d.ts +2 -2
- package/dist/Cell/TagIcon/TagIcon.js +9 -13
- package/dist/Cell/TagIcon/TagIcon.styles.d.ts +1 -1
- package/dist/Cell/TagIcon/TagIcon.styles.js +7 -6
- package/dist/Cell/TagIcon/TagIcon.types.d.ts +2 -2
- package/dist/Cell/TagIcon/TagIcon.types.js +1 -1
- package/dist/Cell/TagsGroup/TagsGroup.d.ts +2 -2
- package/dist/Cell/TagsGroup/TagsGroup.js +22 -39
- package/dist/Cell/TagsGroup/TagsGroup.styles.d.ts +2 -2
- package/dist/Cell/TagsGroup/TagsGroup.styles.js +30 -9
- package/dist/Cell/TagsGroup/TagsGroup.types.d.ts +2 -2
- package/dist/Cell/TagsGroup/TagsGroup.types.js +1 -1
- package/dist/Cell/index.d.ts +12 -12
- package/dist/Cell/index.js +28 -14
- package/dist/ColumnSortMenu/SortIcons.d.ts +2 -2
- package/dist/ColumnSortMenu/SortIcons.js +26 -38
- package/dist/ColumnSortMenu/SortRender.styles.d.ts +34 -34
- package/dist/ColumnSortMenu/SortRender.styles.js +13 -10
- package/dist/ColumnSortMenu/SortRenderer.d.ts +2 -2
- package/dist/ColumnSortMenu/SortRenderer.js +74 -108
- package/dist/ColumnSortMenu/TitleWithSort.d.ts +2 -2
- package/dist/ColumnSortMenu/TitleWithSort.js +19 -16
- package/dist/ColumnSortMenu/columnWithSortButtons.d.ts +1 -2
- package/dist/ColumnSortMenu/columnWithSortButtons.js +26 -43
- package/dist/ColumnSortMenu/groupedColumnsSort.d.ts +3 -3
- package/dist/ColumnSortMenu/groupedColumnsSort.js +33 -28
- package/dist/ColumnSortMenu/replaceSortButtons.d.ts +1 -1
- package/dist/ColumnSortMenu/replaceSortButtons.js +14 -15
- package/dist/ColumnSortMenu/useSortState.d.ts +1 -1
- package/dist/ColumnSortMenu/useSortState.js +95 -93
- package/dist/DefaultTable/DefaultTable.d.ts +2 -2
- package/dist/DefaultTable/DefaultTable.js +147 -148
- package/dist/FilterTrigger/FilterTrigger.d.ts +2 -2
- package/dist/FilterTrigger/FilterTrigger.js +42 -67
- package/dist/FilterTrigger/FilterTrigger.styles.d.ts +53 -53
- package/dist/FilterTrigger/FilterTrigger.styles.js +19 -32
- package/dist/FilterTrigger/FilterTrigger.types.d.ts +1 -1
- package/dist/FilterTrigger/FilterTrigger.types.js +1 -1
- package/dist/GroupTable/GroupTable.d.ts +3 -4
- package/dist/GroupTable/GroupTable.js +97 -118
- package/dist/GroupTable/GroupTable.styles.d.ts +25 -25
- package/dist/GroupTable/GroupTable.styles.js +40 -37
- package/dist/GroupTable/GroupTable.types.d.ts +1 -1
- package/dist/GroupTable/GroupTable.types.js +9 -6
- package/dist/GroupTable/GroupTableBody/GroupTableBody.d.ts +1 -1
- package/dist/GroupTable/GroupTableBody/GroupTableBody.js +83 -107
- package/dist/GroupTable/GroupTableBody/GroupTableBody.types.d.ts +3 -3
- package/dist/GroupTable/GroupTableBody/GroupTableBody.types.js +1 -1
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.d.ts +1 -1
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.js +25 -28
- package/dist/GroupTable/GroupTableHeader/GroupTableHeader.types.js +1 -1
- package/dist/InfiniteScroll/BackToTopButton.d.ts +2 -2
- package/dist/InfiniteScroll/BackToTopButton.js +7 -15
- package/dist/InfiniteScroll/BackToTopButton.styles.d.ts +34 -34
- package/dist/InfiniteScroll/BackToTopButton.styles.js +11 -9
- package/dist/InfiniteScroll/ErrorItem.d.ts +1 -1
- package/dist/InfiniteScroll/ErrorItem.js +19 -23
- package/dist/InfiniteScroll/ErrorItem.styles.d.ts +1 -1
- package/dist/InfiniteScroll/ErrorItem.styles.js +6 -3
- package/dist/InfiniteScroll/InfiniteLoaderItem.d.ts +2 -2
- package/dist/InfiniteScroll/InfiniteLoaderItem.js +33 -28
- package/dist/InfiniteScroll/InfiniteLoaderItem.styles.d.ts +1 -1
- package/dist/InfiniteScroll/InfiniteLoaderItem.styles.js +7 -4
- package/dist/InfiniteScroll/InfiniteLoaderItem.types.d.ts +1 -1
- package/dist/InfiniteScroll/InfiniteLoaderItem.types.js +1 -1
- package/dist/InfiniteScroll/LoadingItem.d.ts +1 -1
- package/dist/InfiniteScroll/LoadingItem.js +10 -10
- package/dist/InfiniteScroll/NoMoreItem.d.ts +1 -1
- package/dist/InfiniteScroll/NoMoreItem.js +10 -10
- package/dist/InfiniteScroll/OuterListElement.d.ts +1 -1
- package/dist/InfiniteScroll/OuterListElement.js +45 -58
- package/dist/InfiniteScroll/constants.js +4 -1
- package/dist/InfiniteScroll/utils.d.ts +1 -1
- package/dist/InfiniteScroll/utils.js +15 -12
- package/dist/ItemsMenu/ItemsMenu.d.ts +2 -2
- package/dist/ItemsMenu/ItemsMenu.js +7 -6
- package/dist/ItemsMenu/ItemsMenu.styles.d.ts +1 -1
- package/dist/ItemsMenu/ItemsMenu.styles.js +6 -3
- package/dist/ItemsMenu/ItemsMenu.types.d.ts +1 -1
- package/dist/ItemsMenu/ItemsMenu.types.js +1 -1
- package/dist/RowSelection/RowSelectionColumn.d.ts +3 -3
- package/dist/RowSelection/RowSelectionColumn.js +77 -81
- package/dist/RowSelection/RowSelectionColumn.types.d.ts +3 -3
- package/dist/RowSelection/RowSelectionColumn.types.js +1 -1
- package/dist/RowSelection/index.js +4 -1
- package/dist/Table.d.ts +2 -4
- package/dist/Table.js +94 -129
- package/dist/Table.styles.d.ts +23 -23
- package/dist/Table.styles.js +86 -110
- package/dist/Table.types.d.ts +7 -7
- package/dist/Table.types.js +1 -1
- package/dist/TableHeader/TableHeader.d.ts +2 -2
- package/dist/TableHeader/TableHeader.js +91 -129
- package/dist/TableHeader/TableHeader.types.d.ts +2 -2
- package/dist/TableHeader/TableHeader.types.js +1 -1
- package/dist/TableHeader/TableLimit/TableLimit.d.ts +2 -2
- package/dist/TableHeader/TableLimit/TableLimit.js +44 -36
- package/dist/TableHeader/TableLimit/TableLimit.styles.d.ts +4 -4
- package/dist/TableHeader/TableLimit/TableLimit.styles.js +15 -13
- package/dist/TableHeader/TableLimit/TableLimit.types.d.ts +3 -3
- package/dist/TableHeader/TableLimit/TableLimit.types.js +1 -1
- package/dist/TableHeader/TableLimit/index.js +4 -2
- package/dist/TableHeader/TableSelection.d.ts +2 -2
- package/dist/TableHeader/TableSelection.js +163 -180
- package/dist/TableHeader/TableSelection.types.d.ts +1 -1
- package/dist/TableHeader/TableSelection.types.js +1 -1
- package/dist/TreeTable/TreeTable.d.ts +2 -3
- package/dist/TreeTable/TreeTable.js +51 -78
- package/dist/TreeTable/TreeTable.styles.d.ts +5 -5
- package/dist/TreeTable/TreeTable.styles.js +21 -20
- package/dist/VirtualTable/VirtualTable.d.ts +3 -3
- package/dist/VirtualTable/VirtualTable.js +342 -411
- package/dist/VirtualTable/VirtualTable.styles.d.ts +8 -8
- package/dist/VirtualTable/VirtualTable.styles.js +30 -40
- package/dist/VirtualTable/VirtualTable.types.d.ts +4 -4
- package/dist/VirtualTable/VirtualTable.types.js +1 -1
- package/dist/VirtualTable/VirtualTableRow.d.ts +4 -4
- package/dist/VirtualTable/VirtualTableRow.js +103 -111
- package/dist/VirtualTable/constants.js +8 -3
- package/dist/assets/style/index-tn0RQdqM.css +0 -0
- package/dist/constants/Table.constants.js +11 -6
- package/dist/constants/TableSkeleton.constants.d.ts +1 -1
- package/dist/constants/TableSkeleton.constants.js +48 -100
- package/dist/hooks/useBulkSelection/index.js +4 -1
- package/dist/hooks/useBulkSelection/useBulkSelection.d.ts +1 -1
- package/dist/hooks/useBulkSelection/useBulkSelection.js +55 -40
- package/dist/hooks/useRowKey/index.js +4 -1
- package/dist/hooks/useRowKey/useRowKey.js +11 -11
- package/dist/hooks/useRowStar/index.js +4 -2
- package/dist/hooks/useRowStar/useRowStar.d.ts +1 -1
- package/dist/hooks/useRowStar/useRowStar.js +54 -62
- package/dist/hooks/useRowStar/useRowStar.types.d.ts +2 -2
- package/dist/hooks/useRowStar/useRowStar.types.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -9
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/utils/calculateColumnWidths.d.ts +1 -1
- package/dist/utils/calculateColumnWidths.js +17 -16
- package/dist/utils/calculatePixels.js +11 -12
- package/dist/utils/columnWithCellTooltip.d.ts +1 -1
- package/dist/utils/columnWithCellTooltip.js +18 -15
- package/dist/utils/getChildrenColumnName.js +6 -3
- package/dist/utils/getRecordSelectionStatus.d.ts +1 -1
- package/dist/utils/getRecordSelectionStatus.js +11 -7
- package/dist/utils/getSkeletonProps.d.ts +1 -1
- package/dist/utils/getSkeletonProps.js +26 -36
- package/dist/utils/getValueFromPath.js +9 -6
- package/dist/utils/index.js +23 -9
- package/dist/utils/isGrouped.d.ts +1 -1
- package/dist/utils/isGrouped.js +6 -3
- package/dist/utils/isRecordSelectable.d.ts +1 -1
- package/dist/utils/isRecordSelectable.js +10 -6
- package/dist/utils/locale.d.ts +3 -3
- package/dist/utils/locale.js +115 -111
- package/package.json +31 -31
- package/dist/Cell/TagsGroup/TagsGroup.spec.d.ts +0 -1
- package/dist/ColumnSortMenu/__spec__/groupedColumnsSort.spec.d.ts +0 -1
- package/dist/VirtualTable/VirtualTable.spec.d.ts +0 -1
- package/dist/utils/__specs__/getValueFromPath.spec.d.ts +0 -1
|
@@ -1,43 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _useState2 = useState(value || ''),
|
|
16
|
-
editValue = _useState2[0],
|
|
17
|
-
setEditValue = _useState2[1];
|
|
18
|
-
var enterEditMode = useCallback(function () {
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useMemo } from "react";
|
|
3
|
+
import Icon, { EditNolineS } from "@synerise/ds-icon";
|
|
4
|
+
import { Input } from "@synerise/ds-input";
|
|
5
|
+
import { Value, EditableCell as EditableCell$1 } from "./EditableCell.styles.js";
|
|
6
|
+
const EditableCell = ({
|
|
7
|
+
value,
|
|
8
|
+
onChange,
|
|
9
|
+
placeholder,
|
|
10
|
+
...htmlAttributes
|
|
11
|
+
}) => {
|
|
12
|
+
const [editMode, setEditMode] = useState(false);
|
|
13
|
+
const [editValue, setEditValue] = useState(value || "");
|
|
14
|
+
const enterEditMode = useCallback(() => {
|
|
19
15
|
setEditMode(true);
|
|
20
16
|
}, [setEditMode]);
|
|
21
|
-
|
|
22
|
-
return editMode ?
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
onBlur: function onBlur() {
|
|
31
|
-
setEditMode(false);
|
|
32
|
-
onChange(editValue);
|
|
33
|
-
}
|
|
34
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Value, {
|
|
35
|
-
asPlaceholder: !value
|
|
36
|
-
}, value || placeholder), /*#__PURE__*/React.createElement(Icon, {
|
|
37
|
-
onClick: enterEditMode,
|
|
38
|
-
component: /*#__PURE__*/React.createElement(EditNolineS, null)
|
|
39
|
-
}));
|
|
17
|
+
const render = useMemo(() => {
|
|
18
|
+
return editMode ? /* @__PURE__ */ jsx(Input, { value: editValue, autoFocus: true, resetMargin: true, placeholder, onChange: (event) => setEditValue(event.target.value), onBlur: () => {
|
|
19
|
+
setEditMode(false);
|
|
20
|
+
onChange(editValue);
|
|
21
|
+
} }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx(Value, { asPlaceholder: !value, children: value || placeholder }),
|
|
23
|
+
/* @__PURE__ */ jsx(Icon, { onClick: enterEditMode, component: /* @__PURE__ */ jsx(EditNolineS, {}) })
|
|
24
|
+
] });
|
|
40
25
|
}, [editMode, value, enterEditMode, editValue, setEditValue, onChange, placeholder]);
|
|
41
|
-
return
|
|
26
|
+
return /* @__PURE__ */ jsx(EditableCell$1, { ...htmlAttributes, children: render });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
EditableCell as default
|
|
42
30
|
};
|
|
43
|
-
export default EditableCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EditableCell: import(
|
|
2
|
-
export declare const Value: import(
|
|
1
|
+
export declare const EditableCell: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const Value: import('styled-components').StyledComponent<"span", any, {
|
|
3
3
|
asPlaceholder: boolean;
|
|
4
4
|
}, never>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { IconContainer } from
|
|
3
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { IconContainer } from "@synerise/ds-icon";
|
|
3
|
+
const EditableCell = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "EditableCellstyles__EditableCell",
|
|
5
5
|
componentId: "sc-ahr0lx-0"
|
|
6
6
|
})(["display:flex;align-items:center;justify-content:flex-start;&:hover{", "{opacity:1;visibility:visible;}}", "{transition:all 0.3s ease;opacity:0;visibility:hidden;}"], IconContainer, IconContainer);
|
|
7
|
-
|
|
7
|
+
const Value = /* @__PURE__ */ styled.span.withConfig({
|
|
8
8
|
displayName: "EditableCellstyles__Value",
|
|
9
9
|
componentId: "sc-ahr0lx-1"
|
|
10
|
-
})(["color:", ";"],
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
})(["color:", ";"], (props) => props.asPlaceholder ? props.theme.palette["grey-400"] : "inherit");
|
|
11
|
+
export {
|
|
12
|
+
EditableCell,
|
|
13
|
+
Value
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FlagLabelProps } from './FlagLabelCell.types';
|
|
3
3
|
declare const FlagLabelCell: ({ countryCode, label, ...htmlAttributes }: FlagLabelProps) => React.JSX.Element;
|
|
4
4
|
export default FlagLabelCell;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import DSFlag from "@synerise/ds-flag";
|
|
3
|
+
import { FlagLabel } from "./FlagLabelCell.styles.js";
|
|
4
|
+
const FlagLabelCell = ({
|
|
5
|
+
countryCode,
|
|
6
|
+
label,
|
|
7
|
+
...htmlAttributes
|
|
8
|
+
}) => {
|
|
9
|
+
return /* @__PURE__ */ jsxs(FlagLabel, { ...htmlAttributes, children: [
|
|
10
|
+
/* @__PURE__ */ jsx(DSFlag, { country: countryCode, size: 20 }),
|
|
11
|
+
/* @__PURE__ */ jsx("span", { children: label })
|
|
12
|
+
] });
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
FlagLabelCell as default
|
|
14
16
|
};
|
|
15
|
-
export default FlagLabelCell;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const FlagLabel: import(
|
|
1
|
+
export declare const FlagLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const FlagLabel = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "FlagLabelCellstyles__FlagLabel",
|
|
4
4
|
componentId: "sc-hckhy-0"
|
|
5
|
-
})(["display:flex;align-items:center;justify-content:flex-start;span{margin-left:8px;}"]);
|
|
5
|
+
})(["display:flex;align-items:center;justify-content:flex-start;span{margin-left:8px;}"]);
|
|
6
|
+
export {
|
|
7
|
+
FlagLabel
|
|
8
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CountryCode } from '@synerise/ds-flag/dist/Flag.types';
|
|
2
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
3
|
export type FlagLabelProps = WithHTMLAttributes<HTMLDivElement, {
|
|
4
4
|
countryCode: CountryCode;
|
|
5
5
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IconLabelProps } from './IconLabel.types';
|
|
3
3
|
declare const IconLabelCell: ({ label, icon, disabled, ...htmlAttributes }: IconLabelProps) => React.JSX.Element;
|
|
4
4
|
export default IconLabelCell;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import Icon from "@synerise/ds-icon";
|
|
3
|
+
import { IconLabelCell as IconLabelCell$1 } from "./IconLabel.styles.js";
|
|
4
|
+
const IconLabelCell = ({
|
|
5
|
+
label,
|
|
6
|
+
icon,
|
|
7
|
+
disabled,
|
|
8
|
+
...htmlAttributes
|
|
9
|
+
}) => /* @__PURE__ */ jsxs(IconLabelCell$1, { isDisabled: disabled, ...htmlAttributes, children: [
|
|
10
|
+
icon && /* @__PURE__ */ jsx(Icon, { ...icon }),
|
|
11
|
+
label && /* @__PURE__ */ jsx("span", { children: label })
|
|
12
|
+
] });
|
|
13
|
+
export {
|
|
14
|
+
IconLabelCell as default
|
|
15
15
|
};
|
|
16
|
-
export default IconLabelCell;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { IconContainer } from
|
|
3
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { IconContainer } from "@synerise/ds-icon";
|
|
3
|
+
const IconLabelCell = /* @__PURE__ */ styled.span.withConfig({
|
|
4
4
|
displayName: "IconLabelstyles__IconLabelCell",
|
|
5
5
|
componentId: "sc-1y3fuli-0"
|
|
6
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", " ", "{margin-right:8px;}"],
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", " ", "{margin-right:8px;}"], (props) => props.isDisabled && "opacity: 0.4;", IconContainer);
|
|
7
|
+
export {
|
|
8
|
+
IconLabelCell
|
|
9
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '@synerise/ds-icon';
|
|
3
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
4
4
|
export type IconLabelProps = WithHTMLAttributes<HTMLDivElement, {
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
icon?: IconProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { 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,24 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
className: "main-icon"
|
|
20
|
-
}, icon)), label && /*#__PURE__*/React.createElement(S.Label, null, label), tooltipIcon && /*#__PURE__*/React.createElement(Tooltip, tooltip, /*#__PURE__*/React.createElement(Icon, _extends({
|
|
21
|
-
className: "tooltip-icon"
|
|
22
|
-
}, tooltipIcon))));
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import Icon from "@synerise/ds-icon";
|
|
3
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
4
|
+
import { IconTooltipCell as IconTooltipCell$1, Label } from "./IconTooltipCell.styles.js";
|
|
5
|
+
const IconTooltipCell = ({
|
|
6
|
+
label,
|
|
7
|
+
icon,
|
|
8
|
+
tooltip = {},
|
|
9
|
+
tooltipIcon,
|
|
10
|
+
disabled,
|
|
11
|
+
...htmlAttributes
|
|
12
|
+
}) => /* @__PURE__ */ jsxs(IconTooltipCell$1, { ...htmlAttributes, isDisabled: disabled, children: [
|
|
13
|
+
icon && /* @__PURE__ */ jsx(Icon, { className: "main-icon", ...icon }),
|
|
14
|
+
label && /* @__PURE__ */ jsx(Label, { children: label }),
|
|
15
|
+
tooltipIcon && /* @__PURE__ */ jsx(Tooltip, { ...tooltip, children: /* @__PURE__ */ jsx(Icon, { className: "tooltip-icon", ...tooltipIcon }) })
|
|
16
|
+
] });
|
|
17
|
+
export {
|
|
18
|
+
IconTooltipCell as default
|
|
23
19
|
};
|
|
24
|
-
export default IconTooltipCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const IconTooltipCell: import(
|
|
1
|
+
export declare const IconTooltipCell: import('styled-components').StyledComponent<"span", any, {
|
|
2
2
|
isDisabled?: boolean;
|
|
3
3
|
}, never>;
|
|
4
|
-
export declare const Label: import(
|
|
4
|
+
export declare const Label: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const IconTooltipCell = /* @__PURE__ */ styled.span.withConfig({
|
|
3
3
|
displayName: "IconTooltipCellstyles__IconTooltipCell",
|
|
4
4
|
componentId: "sc-1x4usl8-0"
|
|
5
|
-
})(["display:flex;flex-direction:row;align-items:center;white-space:nowrap;justify-content:flex-start;", " .main-icon{svg{fill:", ";}}.tooltip-icon{svg{fill:", ";}}"],
|
|
6
|
-
|
|
7
|
-
}, function (props) {
|
|
8
|
-
return props.theme.palette['grey-600'];
|
|
9
|
-
}, function (props) {
|
|
10
|
-
return props.theme.palette['grey-400'];
|
|
11
|
-
});
|
|
12
|
-
export var Label = styled.span.withConfig({
|
|
5
|
+
})(["display:flex;flex-direction:row;align-items:center;white-space:nowrap;justify-content:flex-start;", " .main-icon{svg{fill:", ";}}.tooltip-icon{svg{fill:", ";}}"], (props) => props.isDisabled && "opacity: 0.4;", (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-400"]);
|
|
6
|
+
const Label = /* @__PURE__ */ styled.span.withConfig({
|
|
13
7
|
displayName: "IconTooltipCellstyles__Label",
|
|
14
8
|
componentId: "sc-1x4usl8-1"
|
|
15
|
-
})(["margin-left:4px;display:flex;white-space:nowrap;"]);
|
|
9
|
+
})(["margin-left:4px;display:flex;white-space:nowrap;"]);
|
|
10
|
+
export {
|
|
11
|
+
IconTooltipCell,
|
|
12
|
+
Label
|
|
13
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '@synerise/ds-icon';
|
|
3
|
+
import { TooltipProps } from '@synerise/ds-tooltip';
|
|
4
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
5
5
|
export type IconTooltipCellProps = WithHTMLAttributes<HTMLDivElement, {
|
|
6
6
|
label?: ReactNode;
|
|
7
7
|
icon?: IconProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InputNumberCellProps } from './InputNumberCell.types';
|
|
3
3
|
declare const InputNumberCell: ({ inputNumberProps, disabled, ...htmlAttributes }: InputNumberCellProps) => React.JSX.Element;
|
|
4
4
|
export default InputNumberCell;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return /*#__PURE__*/React.createElement(S.InputNumberCell, _extends({}, htmlAttributes, {
|
|
12
|
-
isDisabled: disabled
|
|
13
|
-
}), /*#__PURE__*/React.createElement(InputNumber, _extends({
|
|
14
|
-
raw: true,
|
|
15
|
-
disabled: disabled
|
|
16
|
-
}, inputNumberProps)));
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import InputNumber from "@synerise/ds-input-number";
|
|
3
|
+
import { InputNumberCell as InputNumberCell$1 } from "./InputNumberCell.styles.js";
|
|
4
|
+
const InputNumberCell = ({
|
|
5
|
+
inputNumberProps,
|
|
6
|
+
disabled,
|
|
7
|
+
...htmlAttributes
|
|
8
|
+
}) => /* @__PURE__ */ jsx(InputNumberCell$1, { ...htmlAttributes, isDisabled: disabled, children: /* @__PURE__ */ jsx(InputNumber, { raw: true, disabled, ...inputNumberProps }) });
|
|
9
|
+
export {
|
|
10
|
+
InputNumberCell as default
|
|
17
11
|
};
|
|
18
|
-
export default InputNumberCell;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const InputNumberCell = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "InputNumberCellstyles__InputNumberCell",
|
|
4
4
|
componentId: "sc-iguxfm-0"
|
|
5
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", " max-width:100%;min-width:80px;"],
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", " max-width:100%;min-width:80px;"], (props) => props.isDisabled && `
|
|
6
|
+
opacity: 0.4;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
`);
|
|
9
|
+
export {
|
|
10
|
+
InputNumberCell
|
|
11
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InputNumberProps } from '@synerise/ds-input-number';
|
|
2
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
3
|
export type InputNumberCellProps = WithHTMLAttributes<HTMLDivElement, {
|
|
4
4
|
inputNumberProps?: InputNumberProps;
|
|
5
5
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LabelsWithShowMoreProps } from './LabelsWithShowMore.types';
|
|
3
|
+
import { 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,44 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
setModalVisible = _useState[1];
|
|
18
|
-
var diff = useMemo(function () {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useMemo } from "react";
|
|
3
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
4
|
+
import { CellWrapper, Labels, MoreInfo } from "./LabelsWithShowMore.styles.js";
|
|
5
|
+
import DetailsModal from "./Modal/Modal.js";
|
|
6
|
+
const LabelsWithShowMore = ({
|
|
7
|
+
items,
|
|
8
|
+
numberOfVisibleItems,
|
|
9
|
+
renderItem,
|
|
10
|
+
labelKey,
|
|
11
|
+
texts,
|
|
12
|
+
loading,
|
|
13
|
+
...htmlAttributes
|
|
14
|
+
}) => {
|
|
15
|
+
const [modalVisible, setModalVisible] = useState(false);
|
|
16
|
+
const diff = useMemo(() => {
|
|
19
17
|
return items.length - numberOfVisibleItems;
|
|
20
18
|
}, [items, numberOfVisibleItems]);
|
|
21
|
-
|
|
22
|
-
return items.slice(0, numberOfVisibleItems).map(
|
|
23
|
-
return item[labelKey];
|
|
24
|
-
}).join(', ');
|
|
19
|
+
const labels = useMemo(() => {
|
|
20
|
+
return items.slice(0, numberOfVisibleItems).map((item) => item[labelKey]).join(", ");
|
|
25
21
|
}, [items, labelKey, numberOfVisibleItems]);
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
items: items,
|
|
38
|
-
renderItem: renderItem,
|
|
39
|
-
labelKey: labelKey,
|
|
40
|
-
texts: texts,
|
|
41
|
-
loading: loading
|
|
42
|
-
}));
|
|
22
|
+
return /* @__PURE__ */ jsxs(CellWrapper, { ...htmlAttributes, children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Labels, { children: labels }),
|
|
24
|
+
diff > 0 && /* @__PURE__ */ jsx(Tooltip, { title: `${texts.tooltip}`, children: /* @__PURE__ */ jsxs(MoreInfo, { onClick: () => setModalVisible(true), children: [
|
|
25
|
+
"+",
|
|
26
|
+
diff
|
|
27
|
+
] }) }),
|
|
28
|
+
/* @__PURE__ */ jsx(DetailsModal, { visible: modalVisible, hide: () => setModalVisible(false), items, renderItem, labelKey, texts, loading })
|
|
29
|
+
] });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
LabelsWithShowMore as default
|
|
43
33
|
};
|
|
44
|
-
export default LabelsWithShowMore;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const CellWrapper: import(
|
|
2
|
-
export declare const MoreInfo: import(
|
|
3
|
-
export declare const Labels: import(
|
|
1
|
+
export declare const CellWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const MoreInfo: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const Labels: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const CellWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "LabelsWithShowMorestyles__CellWrapper",
|
|
4
4
|
componentId: "sc-1wfssoi-0"
|
|
5
5
|
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;"]);
|
|
6
|
-
|
|
6
|
+
const MoreInfo = /* @__PURE__ */ styled.div.withConfig({
|
|
7
7
|
displayName: "LabelsWithShowMorestyles__MoreInfo",
|
|
8
8
|
componentId: "sc-1wfssoi-1"
|
|
9
|
-
})(["font-size:11px;margin-left:8px;color:", ";display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;"],
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
export var Labels = styled.span.withConfig({
|
|
9
|
+
})(["font-size:11px;margin-left:8px;color:", ";display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;"], (props) => props.theme.palette["grey-500"]);
|
|
10
|
+
const Labels = /* @__PURE__ */ styled.span.withConfig({
|
|
13
11
|
displayName: "LabelsWithShowMorestyles__Labels",
|
|
14
12
|
componentId: "sc-1wfssoi-2"
|
|
15
|
-
})(["display:block;text-overflow:ellipsis;overflow:hidden;max-width:calc(100% - 32px);"]);
|
|
13
|
+
})(["display:block;text-overflow:ellipsis;overflow:hidden;max-width:calc(100% - 32px);"]);
|
|
14
|
+
export {
|
|
15
|
+
CellWrapper,
|
|
16
|
+
Labels,
|
|
17
|
+
MoreInfo
|
|
18
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
3
|
export type ShowMoreTexts = {
|
|
4
4
|
tooltip: ReactNode;
|
|
5
5
|
searchPlaceholder: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DataSourceType, ModalProps } from './Modal.types';
|
|
3
3
|
declare const DetailsModal: ({ visible, hide, items, texts, renderItem, labelKey, loading, }: ModalProps<DataSourceType>) => React.JSX.Element;
|
|
4
4
|
export default DetailsModal;
|