@synerise/ds-table 0.57.0 → 0.57.2

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,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.57.2](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.57.1...@synerise/ds-table@0.57.2) (2024-09-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **table:** hide skeleton ([c8866f5](https://github.com/synerise/synerise-design/commit/c8866f5c65825b3fa46cca1ab212bb26e23b3c79))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.57.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.57.0...@synerise/ds-table@0.57.1) (2024-09-18)
18
+
19
+ **Note:** Version bump only for package @synerise/ds-table
20
+
21
+
22
+
23
+
24
+
6
25
  # [0.57.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-table@0.56.8...@synerise/ds-table@0.57.0) (2024-09-17)
7
26
 
8
27
 
package/dist/Table.js CHANGED
@@ -6,7 +6,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
 
7
7
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
8
 
9
- import React, { useMemo } from 'react';
9
+ import React from 'react';
10
10
  import { useIntl } from 'react-intl';
11
11
  import '@synerise/ds-core/dist/js/style';
12
12
  import Icon, { AngleLeftS, AngleRightS, SpinnerM } from '@synerise/ds-icon';
@@ -20,7 +20,6 @@ import DefaultTable from './DefaultTable/DefaultTable';
20
20
  import GroupTable from './GroupTable/GroupTable';
21
21
  import { useTableLocale, TableLocaleContext } from './utils/locale';
22
22
  import { getChildrenColumnName } from './utils/getChildrenColumnName';
23
- import { TableSkeleton } from './TableSkeleton/TableSkeleton';
24
23
  export var SELECTION_ALL = 'SELECTION_ALL';
25
24
  export var SELECTION_INVERT = 'SELECTION_INVERT';
26
25
  var ITEM_RENDER_TYPE = {
@@ -53,9 +52,7 @@ function DSTable(props) {
53
52
  renderSelectionTitle = props.renderSelectionTitle,
54
53
  hideTitlePart = props.hideTitlePart,
55
54
  disableColumnNamesLineBreak = props.disableColumnNamesLineBreak,
56
- expandable = props.expandable,
57
- maxHeight = props.maxHeight,
58
- skeletonProps = props.skeletonProps;
55
+ expandable = props.expandable;
59
56
  var tableLocale = useTableLocale(intl, locale);
60
57
 
61
58
  var _useDataFormat = useDataFormat(),
@@ -129,27 +126,13 @@ function DSTable(props) {
129
126
  }
130
127
  }, pagination);
131
128
  }, [pagination, formatValue, grouped, tableLocale, hideTitlePart]);
132
- var defaultTableContent = useMemo(function () {
133
- return loading && !(dataSource != null && dataSource.length) ? /*#__PURE__*/React.createElement(TableSkeleton, _extends({
134
- maxHeight: maxHeight
135
- }, skeletonProps)) : /*#__PURE__*/React.createElement(DefaultTable, _extends({
136
- scroll: {
137
- x: 'auto'
138
- },
139
- tableLayout: "auto"
140
- }, props, {
141
- locale: tableLocale,
142
- title: renderHeader,
143
- pagination: dataSource != null && dataSource.length && pagination ? footerPagination : false
144
- }));
145
- }, [dataSource == null ? void 0 : dataSource.length, skeletonProps, footerPagination, loading, pagination, props, renderHeader, maxHeight, tableLocale]);
146
129
  return /*#__PURE__*/React.createElement(TableLocaleContext.Provider, {
147
130
  value: tableLocale
148
131
  }, /*#__PURE__*/React.createElement(S.TableWrapper, {
149
132
  className: "ds-table ds-table-cell-size-" + cellSize + " " + (roundedHeader ? 'ds-table-rounded' : ''),
150
133
  hideColumnNames: hideColumnNames,
151
134
  disableColumnNamesLineBreak: disableColumnNamesLineBreak
152
- }, !!(loading && dataSource != null && dataSource.length) && /*#__PURE__*/React.createElement(S.Spinner, {
135
+ }, loading && /*#__PURE__*/React.createElement(S.Spinner, {
153
136
  className: "spinner"
154
137
  }, /*#__PURE__*/React.createElement(Icon, {
155
138
  component: /*#__PURE__*/React.createElement(SpinnerM, null),
@@ -161,7 +144,16 @@ function DSTable(props) {
161
144
  locale: tableLocale,
162
145
  title: renderHeader,
163
146
  pagination: dataSource != null && dataSource.length && pagination ? footerPagination : false
164
- })) : defaultTableContent));
147
+ })) : /*#__PURE__*/React.createElement(DefaultTable, _extends({
148
+ scroll: {
149
+ x: 'auto'
150
+ },
151
+ tableLayout: "auto"
152
+ }, props, {
153
+ locale: tableLocale,
154
+ title: renderHeader,
155
+ pagination: dataSource != null && dataSource.length && pagination ? footerPagination : false
156
+ }))));
165
157
  }
166
158
 
167
159
  DSTable.SELECTION_ALL = SELECTION_ALL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-table",
3
- "version": "0.57.0",
3
+ "version": "0.57.2",
4
4
  "description": "Table UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "synerise/synerise-design",
@@ -38,7 +38,7 @@
38
38
  "@synerise/ds-button": "^0.21.11",
39
39
  "@synerise/ds-button-group": "^0.7.15",
40
40
  "@synerise/ds-checkbox": "^0.12.8",
41
- "@synerise/ds-column-manager": "^0.12.0",
41
+ "@synerise/ds-column-manager": "^0.12.1",
42
42
  "@synerise/ds-data-format": "^0.5.3",
43
43
  "@synerise/ds-dropdown": "^0.18.15",
44
44
  "@synerise/ds-flag": "^0.5.2",
@@ -53,8 +53,8 @@
53
53
  "@synerise/ds-search": "^0.9.11",
54
54
  "@synerise/ds-select": "^0.16.17",
55
55
  "@synerise/ds-skeleton": "^0.6.9",
56
- "@synerise/ds-status": "^0.6.23",
57
- "@synerise/ds-tags": "^0.10.8",
56
+ "@synerise/ds-status": "^0.6.24",
57
+ "@synerise/ds-tags": "^0.10.9",
58
58
  "@synerise/ds-tooltip": "^0.14.41",
59
59
  "@synerise/ds-typography": "^0.15.2",
60
60
  "@synerise/ds-utils": "^0.29.3",
@@ -77,5 +77,5 @@
77
77
  "react-dom": "^16.14.0",
78
78
  "styled-components": "5.0.1"
79
79
  },
80
- "gitHead": "ae3c38b44ca0f9071cd55f7b82c182a99b5710e8"
80
+ "gitHead": "05319fe26fbfd074f4b4a6cd5184a6ea2e9cdb6f"
81
81
  }