@synerise/ds-table 0.46.7 → 0.46.9

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 CHANGED
@@ -3,6 +3,28 @@
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.9](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.46.8...@synerise/ds-table@0.46.9) (2023-04-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **table:** add dependency formatValue to pagination ([a07b86b](https://github.com/synerise/synerise-design/commit/a07b86bb100e66630546889f56d62e71109d1799))
12
+
13
+
14
+
15
+
16
+
17
+ ## [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)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **table:** add formatValue to pagination ([d4c9d06](https://github.com/synerise/synerise-design/commit/d4c9d06efa1027a43a4d1475d56a05e6118e4450))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [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)
7
29
 
8
30
  **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 ", /*#__PURE__*/React.createElement("strong", null, 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", {
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.7",
3
+ "version": "0.46.9",
4
4
  "description": "Table UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -67,5 +67,5 @@
67
67
  "antd": "^4",
68
68
  "react": ">=16.9.0 < 17.0.0"
69
69
  },
70
- "gitHead": "a81aad1ee5bb7249f069115cab0ec06b66ab12b0"
70
+ "gitHead": "e74df036f72d482c3f8716321643db8e87f0cec5"
71
71
  }