@synerise/ds-table-new 1.3.1 → 1.4.0
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 +6 -0
- package/dist/components/Cell/LabelsWithShowMore/LabelsWithShowMore.js +3 -3
- package/dist/components/Cell/LabelsWithShowMore/Modal/Modal.d.ts +1 -1
- package/dist/components/Cell/LabelsWithShowMore/Modal/Modal.js +2 -4
- package/dist/components/Cell/LabelsWithShowMore/Modal/Modal.types.d.ts +1 -1
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
# [1.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.3.1...@synerise/ds-table-new@1.4.0) (2026-05-22)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **modal:** migration from antd ([3588b65](https://github.com/Synerise/synerise-design/commit/3588b65fbe67838fed4ee5125090ad47d334e04b))
|
|
11
|
+
|
|
6
12
|
## [1.3.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-table-new@1.3.0...@synerise/ds-table-new@1.3.1) (2026-05-19)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -12,7 +12,7 @@ const LabelsWithShowMore = ({
|
|
|
12
12
|
loading,
|
|
13
13
|
...htmlAttributes
|
|
14
14
|
}) => {
|
|
15
|
-
const [
|
|
15
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
16
16
|
const diff = useMemo(() => {
|
|
17
17
|
return items.length - numberOfVisibleItems;
|
|
18
18
|
}, [items, numberOfVisibleItems]);
|
|
@@ -21,11 +21,11 @@ const LabelsWithShowMore = ({
|
|
|
21
21
|
}, [items, labelKey, numberOfVisibleItems]);
|
|
22
22
|
return /* @__PURE__ */ jsxs(CellWrapper, { ...htmlAttributes, children: [
|
|
23
23
|
/* @__PURE__ */ jsx(Labels, { children: labels }),
|
|
24
|
-
diff > 0 && /* @__PURE__ */ jsx(Tooltip, { title: `${texts.tooltip}`, children: /* @__PURE__ */ jsxs(MoreInfo, { onClick: () =>
|
|
24
|
+
diff > 0 && /* @__PURE__ */ jsx(Tooltip, { title: `${texts.tooltip}`, children: /* @__PURE__ */ jsxs(MoreInfo, { onClick: () => setIsModalOpen(true), children: [
|
|
25
25
|
"+",
|
|
26
26
|
diff
|
|
27
27
|
] }) }),
|
|
28
|
-
/* @__PURE__ */ jsx(DetailsModal, {
|
|
28
|
+
/* @__PURE__ */ jsx(DetailsModal, { isOpen: isModalOpen, hide: () => setIsModalOpen(false), items, renderItem, labelKey, texts, loading })
|
|
29
29
|
] });
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DataSourceType, ModalProps } from './Modal.types';
|
|
3
|
-
declare const DetailsModal: ({
|
|
3
|
+
declare const DetailsModal: ({ isOpen, hide, items, texts, renderItem, labelKey, loading, }: ModalProps<DataSourceType>) => React.JSX.Element;
|
|
4
4
|
export { DetailsModal };
|
|
@@ -3,7 +3,7 @@ import { useMemo, useCallback } from "react";
|
|
|
3
3
|
import Modal from "@synerise/ds-modal";
|
|
4
4
|
import { VirtualTable } from "../../../../VirtualTable.js";
|
|
5
5
|
const DetailsModal = ({
|
|
6
|
-
|
|
6
|
+
isOpen,
|
|
7
7
|
hide,
|
|
8
8
|
items,
|
|
9
9
|
texts,
|
|
@@ -20,9 +20,7 @@ const DetailsModal = ({
|
|
|
20
20
|
const value = row[labelKey];
|
|
21
21
|
return typeof value === "string" && value.toLowerCase().includes(query.toLowerCase());
|
|
22
22
|
}, [labelKey]);
|
|
23
|
-
return /* @__PURE__ */ jsx(Modal, { size: "small",
|
|
24
|
-
padding: 0
|
|
25
|
-
}, footer: null, children: /* @__PURE__ */ jsx(VirtualTable, { maxHeight: 500, cellHeight: 64, data: items, title: `${items.length} ${texts.records}`, columns, isLoading: loading, hideTitleBar: true, rowKey: "key", matchesSearchQuery, searchProps: {
|
|
23
|
+
return /* @__PURE__ */ jsx(Modal, { size: "small", open: isOpen, title: texts.modalTitle, closable: true, onCancel: hide, bodyFullWidth: true, footer: null, children: /* @__PURE__ */ jsx(VirtualTable, { maxHeight: 500, cellHeight: 64, data: items, title: `${items.length} ${texts.records}`, columns, isLoading: loading, hideTitleBar: true, rowKey: "key", matchesSearchQuery, searchProps: {
|
|
26
24
|
clearTooltip: texts.searchClear,
|
|
27
25
|
placeholder: texts.searchPlaceholder
|
|
28
26
|
}, hideColumnNames: true }) });
|
|
@@ -5,7 +5,7 @@ export type DataSourceType = Record<string, any> & {
|
|
|
5
5
|
key: React.ReactText;
|
|
6
6
|
};
|
|
7
7
|
export type ModalProps<T extends DataSourceType> = {
|
|
8
|
-
|
|
8
|
+
isOpen: boolean;
|
|
9
9
|
items: T[];
|
|
10
10
|
hide: () => void;
|
|
11
11
|
renderItem: (label: string, item: T) => JSX.Element | React.Component;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-table-new",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "TableNew UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -43,28 +43,28 @@
|
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@floating-ui/react": "^0.27.16",
|
|
46
|
-
"@synerise/ds-badge": "^1.0.
|
|
47
|
-
"@synerise/ds-button": "^1.5.
|
|
48
|
-
"@synerise/ds-checkbox": "^1.2.
|
|
49
|
-
"@synerise/ds-copy-icon": "^1.2.
|
|
50
|
-
"@synerise/ds-dropdown": "^1.3.
|
|
46
|
+
"@synerise/ds-badge": "^1.0.54",
|
|
47
|
+
"@synerise/ds-button": "^1.5.30",
|
|
48
|
+
"@synerise/ds-checkbox": "^1.2.31",
|
|
49
|
+
"@synerise/ds-copy-icon": "^1.2.12",
|
|
50
|
+
"@synerise/ds-dropdown": "^1.3.13",
|
|
51
51
|
"@synerise/ds-flag": "^1.0.11",
|
|
52
|
-
"@synerise/ds-icon": "^1.18.
|
|
53
|
-
"@synerise/ds-inline-alert": "^1.1.
|
|
54
|
-
"@synerise/ds-input": "^1.7.
|
|
55
|
-
"@synerise/ds-input-number": "^1.2.
|
|
52
|
+
"@synerise/ds-icon": "^1.18.1",
|
|
53
|
+
"@synerise/ds-inline-alert": "^1.1.24",
|
|
54
|
+
"@synerise/ds-input": "^1.7.8",
|
|
55
|
+
"@synerise/ds-input-number": "^1.2.45",
|
|
56
56
|
"@synerise/ds-loader": "^1.0.16",
|
|
57
|
-
"@synerise/ds-modal": "^1.
|
|
58
|
-
"@synerise/ds-pagination": "^1.0.
|
|
59
|
-
"@synerise/ds-result": "^1.0.
|
|
60
|
-
"@synerise/ds-scrollbar": "^1.
|
|
61
|
-
"@synerise/ds-search": "^1.5.
|
|
62
|
-
"@synerise/ds-skeleton": "^1.0.
|
|
63
|
-
"@synerise/ds-tag": "^1.4.
|
|
64
|
-
"@synerise/ds-tags": "^1.5.
|
|
65
|
-
"@synerise/ds-tooltip": "^1.
|
|
66
|
-
"@synerise/ds-typography": "^1.1.
|
|
67
|
-
"@synerise/ds-utils": "^1.
|
|
57
|
+
"@synerise/ds-modal": "^1.5.0",
|
|
58
|
+
"@synerise/ds-pagination": "^1.0.65",
|
|
59
|
+
"@synerise/ds-result": "^1.0.61",
|
|
60
|
+
"@synerise/ds-scrollbar": "^1.4.0",
|
|
61
|
+
"@synerise/ds-search": "^1.5.25",
|
|
62
|
+
"@synerise/ds-skeleton": "^1.0.55",
|
|
63
|
+
"@synerise/ds-tag": "^1.4.28",
|
|
64
|
+
"@synerise/ds-tags": "^1.5.42",
|
|
65
|
+
"@synerise/ds-tooltip": "^1.5.0",
|
|
66
|
+
"@synerise/ds-typography": "^1.1.23",
|
|
67
|
+
"@synerise/ds-utils": "^1.9.0",
|
|
68
68
|
"@tanstack/react-table": "^8.21.3",
|
|
69
69
|
"@tanstack/react-virtual": "^3.13.12",
|
|
70
70
|
"unit-to-px": "^1.0.5",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"react-intl": ">= 3.12.0 <= 6.8",
|
|
81
81
|
"styled-components": "^5.3.3"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "f257f56d8991010593efd5ea9915335e813671a6"
|
|
84
84
|
}
|