@synerise/ds-table 0.46.6 → 0.46.8
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 +19 -0
- package/dist/Table.js +7 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.46.8](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.7...@synerise/ds-table@0.46.8) (2023-04-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **table:** add formatValue to pagination ([d4c9d06](https://github.com/synerise/synerise-design/commit/d4c9d06efa1027a43a4d1475d56a05e6118e4450))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.46.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.6...@synerise/ds-table@0.46.7) (2023-04-14)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @synerise/ds-table
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.46.6](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.5...@synerise/ds-table@0.46.6) (2023-04-05)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @synerise/ds-table
|
package/dist/Table.js
CHANGED
|
@@ -13,6 +13,7 @@ import Icon, { AngleLeftS, AngleRightS, SpinnerM } from '@synerise/ds-icon';
|
|
|
13
13
|
import Button from '@synerise/ds-button';
|
|
14
14
|
import { useIntl } from 'react-intl';
|
|
15
15
|
import Skeleton from '@synerise/ds-skeleton';
|
|
16
|
+
import { useDataFormat } from '@synerise/ds-data-format';
|
|
16
17
|
import * as S from './Table.styles';
|
|
17
18
|
import TableHeader from './TableHeader/TableHeader';
|
|
18
19
|
import DefaultTable from './DefaultTable/DefaultTable';
|
|
@@ -49,6 +50,10 @@ function DSTable(props) {
|
|
|
49
50
|
hideTitlePart = props.hideTitlePart,
|
|
50
51
|
disableColumnNamesLineBreak = props.disableColumnNamesLineBreak;
|
|
51
52
|
var tableLocale = useTableLocale(intl, locale);
|
|
53
|
+
|
|
54
|
+
var _useDataFormat = useDataFormat(),
|
|
55
|
+
formatValue = _useDataFormat.formatValue;
|
|
56
|
+
|
|
52
57
|
var renderHeader = React.useCallback(function () {
|
|
53
58
|
var size = selection && (selection == null ? void 0 : selection.selectedRowKeys) && (selection == null ? void 0 : selection.selectedRowKeys.length);
|
|
54
59
|
var data = grouped ? // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
@@ -82,7 +87,7 @@ function DSTable(props) {
|
|
|
82
87
|
showTotal: function showTotal(total, range) {
|
|
83
88
|
var _tableLocale$paginati, _tableLocale$paginati2;
|
|
84
89
|
|
|
85
|
-
return !hideTitlePart ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("strong", null, range[0]), "-", /*#__PURE__*/React.createElement("strong", null, range[1]), " of
|
|
90
|
+
return !hideTitlePart ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("strong", null, formatValue(range[0])), "-", /*#__PURE__*/React.createElement("strong", null, formatValue(range[1])), " of", ' ', /*#__PURE__*/React.createElement("strong", null, formatValue(total)), ' ', grouped ? tableLocale == null ? void 0 : (_tableLocale$paginati = tableLocale.pagination) == null ? void 0 : _tableLocale$paginati.groups : tableLocale == null ? void 0 : (_tableLocale$paginati2 = tableLocale.pagination) == null ? void 0 : _tableLocale$paginati2.items) : /*#__PURE__*/React.createElement("div", {
|
|
86
91
|
style: {
|
|
87
92
|
width: '150px'
|
|
88
93
|
}
|
|
@@ -113,7 +118,7 @@ function DSTable(props) {
|
|
|
113
118
|
return originalElement;
|
|
114
119
|
}
|
|
115
120
|
}, pagination);
|
|
116
|
-
}, [pagination, grouped, tableLocale, hideTitlePart]);
|
|
121
|
+
}, [pagination, formatValue, grouped, tableLocale, hideTitlePart]);
|
|
117
122
|
return /*#__PURE__*/React.createElement(TableLocaleContext.Provider, {
|
|
118
123
|
value: tableLocale
|
|
119
124
|
}, /*#__PURE__*/React.createElement(S.TableWrapper, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-table",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.8",
|
|
4
4
|
"description": "Table UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"@synerise/ds-alert": "^0.7.28",
|
|
36
36
|
"@synerise/ds-button": "^0.17.12",
|
|
37
37
|
"@synerise/ds-button-group": "^0.6.19",
|
|
38
|
-
"@synerise/ds-checkbox": "^0.11.
|
|
39
|
-
"@synerise/ds-column-manager": "^0.10.
|
|
40
|
-
"@synerise/ds-data-format": "^0.3.
|
|
41
|
-
"@synerise/ds-dropdown": "^0.17.
|
|
38
|
+
"@synerise/ds-checkbox": "^0.11.34",
|
|
39
|
+
"@synerise/ds-column-manager": "^0.10.64",
|
|
40
|
+
"@synerise/ds-data-format": "^0.3.4",
|
|
41
|
+
"@synerise/ds-dropdown": "^0.17.61",
|
|
42
42
|
"@synerise/ds-flag": "^0.4.0",
|
|
43
43
|
"@synerise/ds-icon": "^0.54.0",
|
|
44
44
|
"@synerise/ds-input": "^0.18.37",
|
|
45
|
-
"@synerise/ds-loader": "^0.2.
|
|
45
|
+
"@synerise/ds-loader": "^0.2.35",
|
|
46
46
|
"@synerise/ds-menu": "^0.17.5",
|
|
47
47
|
"@synerise/ds-pagination": "^0.7.19",
|
|
48
|
-
"@synerise/ds-search": "^0.8.
|
|
48
|
+
"@synerise/ds-search": "^0.8.47",
|
|
49
49
|
"@synerise/ds-search-bar": "^0.6.27",
|
|
50
50
|
"@synerise/ds-select": "^0.15.2",
|
|
51
|
-
"@synerise/ds-skeleton": "^0.2.
|
|
52
|
-
"@synerise/ds-status": "^0.5.
|
|
53
|
-
"@synerise/ds-tags": "^0.7.
|
|
51
|
+
"@synerise/ds-skeleton": "^0.2.34",
|
|
52
|
+
"@synerise/ds-status": "^0.5.62",
|
|
53
|
+
"@synerise/ds-tags": "^0.7.18",
|
|
54
54
|
"@synerise/ds-tooltip": "^0.13.0",
|
|
55
55
|
"@synerise/ds-typography": "^0.12.7",
|
|
56
56
|
"@synerise/ds-utils": "^0.19.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"antd": "^4",
|
|
68
68
|
"react": ">=16.9.0 < 17.0.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "7e4f888ca6bd6fe09c94cccedd7ff9bd5985dc4d"
|
|
71
71
|
}
|