@dhis2-ui/table 10.0.0-alpha.6 → 10.0.0-alpha.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/build/cjs/data-table/__tests__/data-table-cell.test.js +26 -26
- package/build/cjs/data-table/__tests__/data-table-column-header/filter-handle.test.js +3 -3
- package/build/cjs/data-table/__tests__/data-table-column-header/sorter.test.js +2 -2
- package/build/cjs/data-table/__tests__/data-table-column-header.test.js +18 -18
- package/build/cjs/data-table/__tests__/data-table-row/expand-handle-cell.js +3 -3
- package/build/cjs/data-table/__tests__/data-table-row/expanded-row.test.js +6 -6
- package/build/cjs/data-table/__tests__/data-table-row.test.js +13 -13
- package/build/cjs/data-table/__tests__/data-table.test.js +11 -11
- package/build/cjs/data-table/data-table-cell.js +4 -10
- package/build/cjs/data-table/data-table-column-header/data-table-column-header.js +1 -4
- package/build/cjs/data-table/data-table-row/data-table-row.js +1 -4
- package/build/cjs/data-table/data-table.js +3 -8
- package/build/cjs/data-table/table-elements/__tests__/table-body.test.js +5 -5
- package/build/cjs/data-table/table-elements/__tests__/table-data-cell.test.js +19 -19
- package/build/cjs/data-table/table-elements/__tests__/table-foot.test.js +5 -5
- package/build/cjs/data-table/table-elements/__tests__/table-head.test.js +5 -5
- package/build/cjs/data-table/table-elements/__tests__/table-header-cell-action.test.js +6 -6
- package/build/cjs/data-table/table-elements/__tests__/table-header-cell.test.js +20 -20
- package/build/cjs/data-table/table-elements/__tests__/table-row.test.js +7 -7
- package/build/cjs/data-table/table-elements/__tests__/table-scroll-box.test.js +6 -6
- package/build/cjs/data-table/table-elements/__tests__/table-toolbar.test.js +7 -7
- package/build/cjs/data-table/table-elements/__tests__/table.test.js +8 -8
- package/build/cjs/data-table/table-elements/table-body.js +1 -4
- package/build/cjs/data-table/table-elements/table-data-cell/table-data-cell.js +4 -10
- package/build/cjs/data-table/table-elements/table-foot.js +1 -4
- package/build/cjs/data-table/table-elements/table-head.js +0 -3
- package/build/cjs/data-table/table-elements/table-header-cell/table-header-cell.js +5 -12
- package/build/cjs/data-table/table-elements/table-header-cell-action.js +1 -4
- package/build/cjs/data-table/table-elements/table-row.js +1 -4
- package/build/cjs/data-table/table-elements/table-scroll-box.js +3 -8
- package/build/cjs/data-table/table-elements/table-toolbar.js +2 -6
- package/build/cjs/data-table/table-elements/table.js +3 -8
- package/build/cjs/stacked-table/stacked-table-body.js +1 -4
- package/build/cjs/stacked-table/stacked-table-cell-head.js +2 -6
- package/build/cjs/stacked-table/stacked-table-cell.js +3 -6
- package/build/cjs/stacked-table/stacked-table-foot.js +1 -4
- package/build/cjs/stacked-table/stacked-table-head.js +1 -4
- package/build/cjs/stacked-table/stacked-table-row-head.js +1 -4
- package/build/cjs/stacked-table/stacked-table-row.js +1 -4
- package/build/cjs/stacked-table/stacked-table.js +1 -4
- package/build/cjs/stacked-table/stacked-table.test.js +3 -3
- package/build/cjs/table/table-body.js +1 -4
- package/build/cjs/table/table-cell-head.js +1 -4
- package/build/cjs/table/table-cell.js +1 -4
- package/build/cjs/table/table-foot.js +1 -4
- package/build/cjs/table/table-head.js +1 -4
- package/build/cjs/table/table-row-head.js +1 -4
- package/build/cjs/table/table-row.js +1 -4
- package/build/cjs/table/table.js +1 -4
- package/build/es/data-table/__tests__/data-table-cell.test.js +26 -26
- package/build/es/data-table/__tests__/data-table-column-header/filter-handle.test.js +3 -3
- package/build/es/data-table/__tests__/data-table-column-header/sorter.test.js +2 -2
- package/build/es/data-table/__tests__/data-table-column-header.test.js +18 -18
- package/build/es/data-table/__tests__/data-table-row/expand-handle-cell.js +3 -3
- package/build/es/data-table/__tests__/data-table-row/expanded-row.test.js +6 -6
- package/build/es/data-table/__tests__/data-table-row.test.js +13 -13
- package/build/es/data-table/__tests__/data-table.test.js +11 -11
- package/build/es/data-table/data-table-cell.js +4 -10
- package/build/es/data-table/data-table-column-header/data-table-column-header.js +1 -4
- package/build/es/data-table/data-table-row/data-table-row.js +1 -4
- package/build/es/data-table/data-table.js +3 -8
- package/build/es/data-table/table-elements/__tests__/table-body.test.js +5 -5
- package/build/es/data-table/table-elements/__tests__/table-data-cell.test.js +19 -19
- package/build/es/data-table/table-elements/__tests__/table-foot.test.js +5 -5
- package/build/es/data-table/table-elements/__tests__/table-head.test.js +5 -5
- package/build/es/data-table/table-elements/__tests__/table-header-cell-action.test.js +6 -6
- package/build/es/data-table/table-elements/__tests__/table-header-cell.test.js +20 -20
- package/build/es/data-table/table-elements/__tests__/table-row.test.js +7 -7
- package/build/es/data-table/table-elements/__tests__/table-scroll-box.test.js +6 -6
- package/build/es/data-table/table-elements/__tests__/table-toolbar.test.js +7 -7
- package/build/es/data-table/table-elements/__tests__/table.test.js +8 -8
- package/build/es/data-table/table-elements/table-body.js +1 -4
- package/build/es/data-table/table-elements/table-data-cell/table-data-cell.js +4 -10
- package/build/es/data-table/table-elements/table-foot.js +1 -4
- package/build/es/data-table/table-elements/table-head.js +0 -3
- package/build/es/data-table/table-elements/table-header-cell/table-header-cell.js +5 -12
- package/build/es/data-table/table-elements/table-header-cell-action.js +1 -4
- package/build/es/data-table/table-elements/table-row.js +1 -4
- package/build/es/data-table/table-elements/table-scroll-box.js +3 -8
- package/build/es/data-table/table-elements/table-toolbar.js +2 -6
- package/build/es/data-table/table-elements/table.js +3 -8
- package/build/es/stacked-table/stacked-table-body.js +1 -4
- package/build/es/stacked-table/stacked-table-cell-head.js +2 -6
- package/build/es/stacked-table/stacked-table-cell.js +3 -6
- package/build/es/stacked-table/stacked-table-foot.js +1 -4
- package/build/es/stacked-table/stacked-table-head.js +1 -4
- package/build/es/stacked-table/stacked-table-row-head.js +1 -4
- package/build/es/stacked-table/stacked-table-row.js +1 -4
- package/build/es/stacked-table/stacked-table.js +1 -4
- package/build/es/stacked-table/stacked-table.test.js +3 -3
- package/build/es/table/table-body.js +1 -4
- package/build/es/table/table-cell-head.js +1 -4
- package/build/es/table/table-cell.js +1 -4
- package/build/es/table/table-foot.js +1 -4
- package/build/es/table/table-head.js +1 -4
- package/build/es/table/table-row-head.js +1 -4
- package/build/es/table/table-row.js +1 -4
- package/build/es/table/table.js +1 -4
- package/package.json +7 -7
|
@@ -7,40 +7,40 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
7
7
|
describe('<TableScrollBox>', () => {
|
|
8
8
|
it('renders children', () => {
|
|
9
9
|
const children = 'children';
|
|
10
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
10
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableScrollBox.TableScrollBox, null, children));
|
|
11
11
|
expect(wrapper.containsMatchingElement(children)).toBe(true);
|
|
12
12
|
});
|
|
13
13
|
it('accepts a ref', () => {
|
|
14
14
|
const ref = /*#__PURE__*/_react.default.createRef();
|
|
15
|
-
const wrapper = (0, _enzyme.mount)(
|
|
15
|
+
const wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_tableScrollBox.TableScrollBox, {
|
|
16
16
|
ref: ref
|
|
17
17
|
}));
|
|
18
18
|
expect(wrapper.find('div').getDOMNode()).toBe(ref.current);
|
|
19
19
|
});
|
|
20
20
|
it('accepts a className prop', () => {
|
|
21
21
|
const className = 'test';
|
|
22
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
22
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableScrollBox.TableScrollBox, {
|
|
23
23
|
className: className
|
|
24
24
|
}));
|
|
25
25
|
expect(wrapper.find('div').hasClass(className)).toBe(true);
|
|
26
26
|
});
|
|
27
27
|
it('accepts a dataTest prop', () => {
|
|
28
28
|
const dataTest = 'test';
|
|
29
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
29
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableScrollBox.TableScrollBox, {
|
|
30
30
|
dataTest: dataTest
|
|
31
31
|
}));
|
|
32
32
|
expect(wrapper.find('div').prop('data-test')).toBe(dataTest);
|
|
33
33
|
});
|
|
34
34
|
it('accepts a maxHeight prop', () => {
|
|
35
35
|
const maxHeight = '200px';
|
|
36
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
36
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableScrollBox.TableScrollBox, {
|
|
37
37
|
maxHeight: maxHeight
|
|
38
38
|
}));
|
|
39
39
|
expect(wrapper.html()).toContain('max-height: 200px;');
|
|
40
40
|
});
|
|
41
41
|
it('accepts a maxWidth prop', () => {
|
|
42
42
|
const maxWidth = '200px';
|
|
43
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
43
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableScrollBox.TableScrollBox, {
|
|
44
44
|
maxWidth: maxWidth
|
|
45
45
|
}));
|
|
46
46
|
expect(wrapper.html()).toContain('max-width: 200px;');
|
|
@@ -7,36 +7,36 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
7
7
|
describe('<TableToolbar>', () => {
|
|
8
8
|
it('renders children', () => {
|
|
9
9
|
const children = 'children';
|
|
10
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
10
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, null, children));
|
|
11
11
|
expect(wrapper.containsMatchingElement(children)).toBe(true);
|
|
12
12
|
});
|
|
13
13
|
it('accepts a ref', () => {
|
|
14
14
|
const ref = /*#__PURE__*/_react.default.createRef();
|
|
15
|
-
const wrapper = (0, _enzyme.mount)(
|
|
15
|
+
const wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, {
|
|
16
16
|
ref: ref
|
|
17
17
|
}));
|
|
18
18
|
expect(wrapper.find('div').getDOMNode()).toBe(ref.current);
|
|
19
19
|
});
|
|
20
20
|
it('accepts a className prop', () => {
|
|
21
21
|
const className = 'test';
|
|
22
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
22
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, {
|
|
23
23
|
className: className
|
|
24
24
|
}));
|
|
25
25
|
expect(wrapper.find('div').hasClass(className)).toBe(true);
|
|
26
26
|
});
|
|
27
27
|
it('accepts a dataTest prop', () => {
|
|
28
28
|
const dataTest = 'test';
|
|
29
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
29
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, {
|
|
30
30
|
dataTest: dataTest
|
|
31
31
|
}));
|
|
32
32
|
expect(wrapper.find('div').prop('data-test')).toBe(dataTest);
|
|
33
33
|
});
|
|
34
34
|
it('accepts a position prop', () => {
|
|
35
|
-
const wrapperDefault = (0, _enzyme.shallow)(
|
|
36
|
-
const wrapperTop = (0, _enzyme.shallow)(
|
|
35
|
+
const wrapperDefault = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, null));
|
|
36
|
+
const wrapperTop = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, {
|
|
37
37
|
position: "top"
|
|
38
38
|
}));
|
|
39
|
-
const wrapperBottom = (0, _enzyme.shallow)(
|
|
39
|
+
const wrapperBottom = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_tableToolbar.TableToolbar, {
|
|
40
40
|
position: "bottom"
|
|
41
41
|
}));
|
|
42
42
|
expect(wrapperDefault.find('div').hasClass('top')).toBe(true);
|
|
@@ -7,53 +7,53 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
7
7
|
describe('<Table>', () => {
|
|
8
8
|
it('renders children', () => {
|
|
9
9
|
const children = 'children';
|
|
10
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
10
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, null, children));
|
|
11
11
|
expect(wrapper.containsMatchingElement(children)).toBe(true);
|
|
12
12
|
});
|
|
13
13
|
it('accepts a ref', () => {
|
|
14
14
|
const ref = /*#__PURE__*/_react.default.createRef();
|
|
15
|
-
const wrapper = (0, _enzyme.mount)(
|
|
15
|
+
const wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
16
16
|
ref: ref
|
|
17
17
|
}));
|
|
18
18
|
expect(wrapper.find('table').getDOMNode()).toBe(ref.current);
|
|
19
19
|
});
|
|
20
20
|
it('accepts a borderless prop', () => {
|
|
21
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
21
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
22
22
|
borderless: true
|
|
23
23
|
}));
|
|
24
24
|
expect(wrapper.find('table').hasClass('borderless')).toBe(true);
|
|
25
25
|
});
|
|
26
26
|
it('accepts a className prop', () => {
|
|
27
27
|
const className = 'test';
|
|
28
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
28
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
29
29
|
className: className
|
|
30
30
|
}));
|
|
31
31
|
expect(wrapper.find('table').hasClass(className)).toBe(true);
|
|
32
32
|
});
|
|
33
33
|
it('accepts a dataTest prop', () => {
|
|
34
34
|
const dataTest = 'test';
|
|
35
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
35
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
36
36
|
dataTest: dataTest
|
|
37
37
|
}));
|
|
38
38
|
expect(wrapper.find('table').prop('data-test')).toBe(dataTest);
|
|
39
39
|
});
|
|
40
40
|
it('accepts a layout prop', () => {
|
|
41
41
|
const layout = 'fixed';
|
|
42
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
42
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
43
43
|
layout: layout
|
|
44
44
|
}));
|
|
45
45
|
expect(wrapper.html()).toContain(`table-layout: ${layout};`);
|
|
46
46
|
});
|
|
47
47
|
it('accepts a role prop', () => {
|
|
48
48
|
const role = 'test';
|
|
49
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
49
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
50
50
|
role: role
|
|
51
51
|
}));
|
|
52
52
|
expect(wrapper.find('table').prop('role')).toBe(role);
|
|
53
53
|
});
|
|
54
54
|
it('accepts a width prop', () => {
|
|
55
55
|
const width = '200px';
|
|
56
|
-
const wrapper = (0, _enzyme.shallow)(
|
|
56
|
+
const wrapper = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_table.Table, {
|
|
57
57
|
width: width
|
|
58
58
|
}));
|
|
59
59
|
expect(wrapper.html()).toContain(`width: ${width};`);
|
|
@@ -17,7 +17,7 @@ const TableBody = exports.TableBody = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
17
17
|
let {
|
|
18
18
|
children,
|
|
19
19
|
className,
|
|
20
|
-
dataTest,
|
|
20
|
+
dataTest = 'dhis2-uicore-tablebody',
|
|
21
21
|
role,
|
|
22
22
|
loading,
|
|
23
23
|
...props
|
|
@@ -35,9 +35,6 @@ const TableBody = exports.TableBody = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
35
35
|
}, ["tbody.__jsx-style-dynamic-selector{position:relative;}", ".loading.__jsx-style-dynamic-selector:before{content:'';position:absolute;top:0;bottom:0;inset-inline-start:0;inset-inline-end:0;background-color:rgba(255,255,255,0.8);}", `.loading.__jsx-style-dynamic-selector:after{content:'';position:absolute;top:calc(50% - 24px);inset-inline-start:calc(50% - 24px);width:48px;height:48px;border:6px solid rgba(110,122,138,0.15);border-bottom-color:${_uiConstants.colors.blue600};border-radius:50%;-webkit-animation:rotation-__jsx-style-dynamic-selector 1s linear infinite;animation:rotation-__jsx-style-dynamic-selector 1s linear infinite;}`, "@-webkit-keyframes rotation-__jsx-style-dynamic-selector{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}", "@keyframes rotation-__jsx-style-dynamic-selector{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}100%{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}"]));
|
|
36
36
|
});
|
|
37
37
|
TableBody.displayName = 'TableBody';
|
|
38
|
-
TableBody.defaultProps = {
|
|
39
|
-
dataTest: 'dhis2-uicore-tablebody'
|
|
40
|
-
};
|
|
41
38
|
TableBody.propTypes = {
|
|
42
39
|
/** Should be `<TableRow>` components */
|
|
43
40
|
children: _propTypes.default.node,
|
|
@@ -24,23 +24,23 @@ const TableDataCell = exports.TableDataCell = /*#__PURE__*/(0, _react.forwardRef
|
|
|
24
24
|
var _rtlCorrespondingAlig;
|
|
25
25
|
let {
|
|
26
26
|
active,
|
|
27
|
-
align,
|
|
27
|
+
align = 'left',
|
|
28
28
|
backgroundColor,
|
|
29
29
|
bordered,
|
|
30
30
|
children,
|
|
31
31
|
className,
|
|
32
32
|
colSpan,
|
|
33
|
-
dataTest,
|
|
33
|
+
dataTest = 'dhis2-uicore-tabledatacel',
|
|
34
34
|
error,
|
|
35
35
|
large,
|
|
36
|
-
left,
|
|
36
|
+
left = 'auto',
|
|
37
37
|
muted,
|
|
38
38
|
role,
|
|
39
39
|
rowSpan,
|
|
40
40
|
scope,
|
|
41
41
|
staticStyle,
|
|
42
42
|
valid,
|
|
43
|
-
width,
|
|
43
|
+
width = 'auto',
|
|
44
44
|
onClick,
|
|
45
45
|
...props
|
|
46
46
|
} = _ref;
|
|
@@ -70,12 +70,6 @@ const TableDataCell = exports.TableDataCell = /*#__PURE__*/(0, _react.forwardRef
|
|
|
70
70
|
}, [`td.__jsx-style-dynamic-selector{inset-inline-start:${left};text-align:${align};width:${width};background-color:${backgroundColor || _uiConstants.colors.white};}`, `.__jsx-style-dynamic-selector:dir(rtl){text-align:${rtlAlign};}`, `tr.selected>td.__jsx-style-dynamic-selector{background-color:${backgroundColor || _uiConstants.colors.teal100};}`, `tr:hover>td.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || _uiConstants.colors.grey100};}`, `tr:active>td.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || _uiConstants.colors.grey200};}`, `tr.selected:hover>td.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || '#cdeae8'};}`]));
|
|
71
71
|
});
|
|
72
72
|
TableDataCell.displayName = 'TableDataCell';
|
|
73
|
-
TableDataCell.defaultProps = {
|
|
74
|
-
align: 'left',
|
|
75
|
-
dataTest: 'dhis2-uicore-tabledatacel',
|
|
76
|
-
left: 'auto',
|
|
77
|
-
width: 'auto'
|
|
78
|
-
};
|
|
79
73
|
const stylePropType = (0, _propTypes.mutuallyExclusive)(['valid', 'error', 'muted'], _propTypes2.default.bool);
|
|
80
74
|
TableDataCell.propTypes = {
|
|
81
75
|
/** To toggle border color, for example for editing */
|
|
@@ -14,7 +14,7 @@ const TableFoot = exports.TableFoot = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
14
14
|
let {
|
|
15
15
|
children,
|
|
16
16
|
className,
|
|
17
|
-
dataTest,
|
|
17
|
+
dataTest = 'dhis2-uicore-tablefoot',
|
|
18
18
|
role,
|
|
19
19
|
...props
|
|
20
20
|
} = _ref;
|
|
@@ -26,9 +26,6 @@ const TableFoot = exports.TableFoot = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
26
26
|
}), children);
|
|
27
27
|
});
|
|
28
28
|
TableFoot.displayName = 'TableFoot';
|
|
29
|
-
TableFoot.defaultProps = {
|
|
30
|
-
dataTest: 'dhis2-uicore-tablefoot'
|
|
31
|
-
};
|
|
32
29
|
TableFoot.propTypes = {
|
|
33
30
|
/** Should be `<TableRow>` components */
|
|
34
31
|
children: _propTypes.default.node,
|
|
@@ -26,9 +26,6 @@ const TableHead = exports.TableHead = /*#__PURE__*/(0, _react.forwardRef)((_ref,
|
|
|
26
26
|
}), children);
|
|
27
27
|
});
|
|
28
28
|
TableHead.displayName = 'TableHead';
|
|
29
|
-
TableHead.defaultProps = {
|
|
30
|
-
dataTest: 'dhis2-uicore-tablehead'
|
|
31
|
-
};
|
|
32
29
|
TableHead.propTypes = {
|
|
33
30
|
/** Should be `<TableRowHead>` components */
|
|
34
31
|
children: _propTypes.default.node,
|
|
@@ -19,25 +19,25 @@ const AUTO = 'auto';
|
|
|
19
19
|
const TableHeaderCell = exports.TableHeaderCell = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
20
20
|
let {
|
|
21
21
|
active,
|
|
22
|
-
align,
|
|
22
|
+
align = 'left',
|
|
23
23
|
backgroundColor,
|
|
24
24
|
bordered,
|
|
25
25
|
children,
|
|
26
26
|
className,
|
|
27
27
|
colSpan,
|
|
28
|
-
dataTest,
|
|
28
|
+
dataTest = 'dhis2-uicore-tablecell',
|
|
29
29
|
error,
|
|
30
30
|
fixed,
|
|
31
31
|
large,
|
|
32
|
-
left,
|
|
32
|
+
left = AUTO,
|
|
33
33
|
muted,
|
|
34
34
|
rowSpan,
|
|
35
35
|
role,
|
|
36
36
|
scope,
|
|
37
37
|
staticStyle,
|
|
38
|
-
top,
|
|
38
|
+
top = AUTO,
|
|
39
39
|
valid,
|
|
40
|
-
width,
|
|
40
|
+
width = AUTO,
|
|
41
41
|
onClick,
|
|
42
42
|
...props
|
|
43
43
|
} = _ref;
|
|
@@ -68,13 +68,6 @@ const TableHeaderCell = exports.TableHeaderCell = /*#__PURE__*/(0, _react.forwar
|
|
|
68
68
|
}, [`th.__jsx-style-dynamic-selector{inset-inline-start:${left};top:${top};text-align:${align};width:${width};background-color:${backgroundColor || _uiConstants.colors.grey200};}`, `thead th.fixedHorizontally.__jsx-style-dynamic-selector{background-color:${backgroundColor || _uiConstants.colors.grey300};}`, `tbody>tr:hover>th.__jsx-style-dynamic-selector:not(.staticStyle),tfoot>tr:hover>th.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || _uiConstants.colors.grey300};}`, `tbody>tr:active>th.__jsx-style-dynamic-selector:not(.staticStyle){background-color:${backgroundColor || _uiConstants.colors.grey200};}`]));
|
|
69
69
|
});
|
|
70
70
|
TableHeaderCell.displayName = 'TableHeaderCell';
|
|
71
|
-
TableHeaderCell.defaultProps = {
|
|
72
|
-
align: 'left',
|
|
73
|
-
dataTest: 'dhis2-uicore-tablecell',
|
|
74
|
-
left: AUTO,
|
|
75
|
-
width: AUTO,
|
|
76
|
-
top: AUTO
|
|
77
|
-
};
|
|
78
71
|
const stylePropType = (0, _propTypes.mutuallyExclusive)(['valid', 'error', 'muted'], _propTypes2.default.bool);
|
|
79
72
|
TableHeaderCell.propTypes = {
|
|
80
73
|
/** To toggle border color, for example for editing */
|
|
@@ -17,7 +17,7 @@ const TableHeaderCellAction = exports.TableHeaderCellAction = /*#__PURE__*/(0, _
|
|
|
17
17
|
onClick,
|
|
18
18
|
children,
|
|
19
19
|
className,
|
|
20
|
-
dataTest,
|
|
20
|
+
dataTest = 'dhis2-uicore-tableheadercellaction',
|
|
21
21
|
title,
|
|
22
22
|
...props
|
|
23
23
|
} = _ref;
|
|
@@ -33,9 +33,6 @@ const TableHeaderCellAction = exports.TableHeaderCellAction = /*#__PURE__*/(0, _
|
|
|
33
33
|
}, ["button.__jsx-style-dynamic-selector{border:none;padding:0;background:transparent;width:24px;height:24px;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;cursor:pointer;border-radius:4px;margin-inline-start:2px;}", `button.__jsx-style-dynamic-selector:hover,button.__jsx-style-dynamic-selector:focus-visible{background:${_uiConstants.colors.grey400};}`, "button.__jsx-style-dynamic-selector:active,button.__jsx-style-dynamic-selector:focus{outline:none;}"]));
|
|
34
34
|
});
|
|
35
35
|
TableHeaderCellAction.displayName = 'TableHeaderCellAction';
|
|
36
|
-
TableHeaderCellAction.defaultProps = {
|
|
37
|
-
dataTest: 'dhis2-uicore-tableheadercellaction'
|
|
38
|
-
};
|
|
39
36
|
TableHeaderCellAction.propTypes = {
|
|
40
37
|
children: _propTypes.default.node,
|
|
41
38
|
className: _propTypes.default.string,
|
|
@@ -16,7 +16,7 @@ const TableRow = exports.TableRow = /*#__PURE__*/(0, _react.forwardRef)((_ref, r
|
|
|
16
16
|
let {
|
|
17
17
|
children,
|
|
18
18
|
className,
|
|
19
|
-
dataTest,
|
|
19
|
+
dataTest = 'dhis2-uicore-tablerow',
|
|
20
20
|
draggable,
|
|
21
21
|
role,
|
|
22
22
|
selected,
|
|
@@ -35,9 +35,6 @@ const TableRow = exports.TableRow = /*#__PURE__*/(0, _react.forwardRef)((_ref, r
|
|
|
35
35
|
}, ["tbody>tr.draggable.jsx-1820444258,tfoot>tr.draggable.jsx-1820444258{cursor:move;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"]));
|
|
36
36
|
});
|
|
37
37
|
TableRow.displayName = 'TableRow';
|
|
38
|
-
TableRow.defaultProps = {
|
|
39
|
-
dataTest: 'dhis2-uicore-tablerow'
|
|
40
|
-
};
|
|
41
38
|
TableRow.propTypes = {
|
|
42
39
|
/** Should be `<TableDataCell>` or `<TableDataCellHead>` components */
|
|
43
40
|
children: _propTypes.default.node,
|
|
@@ -16,9 +16,9 @@ const TableScrollBox = exports.TableScrollBox = /*#__PURE__*/(0, _react.forwardR
|
|
|
16
16
|
let {
|
|
17
17
|
children,
|
|
18
18
|
className,
|
|
19
|
-
dataTest,
|
|
20
|
-
maxHeight,
|
|
21
|
-
maxWidth,
|
|
19
|
+
dataTest = 'dhis2-uicore-tablescrollbox',
|
|
20
|
+
maxHeight = 'auto',
|
|
21
|
+
maxWidth = 'auto',
|
|
22
22
|
...props
|
|
23
23
|
} = _ref;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
@@ -31,11 +31,6 @@ const TableScrollBox = exports.TableScrollBox = /*#__PURE__*/(0, _react.forwardR
|
|
|
31
31
|
}, [`div.__jsx-style-dynamic-selector{border:1px solid ${_uiConstants.colors.grey300};border-top:none;box-sizing:border-box;max-height:${maxHeight};max-width:${maxWidth};overflow:auto;}`]));
|
|
32
32
|
});
|
|
33
33
|
TableScrollBox.displayName = 'TableScrollBox';
|
|
34
|
-
TableScrollBox.defaultProps = {
|
|
35
|
-
dataTest: 'dhis2-uicore-tablescrollbox',
|
|
36
|
-
maxHeight: 'auto',
|
|
37
|
-
maxWidth: 'auto'
|
|
38
|
-
};
|
|
39
34
|
TableScrollBox.propTypes = {
|
|
40
35
|
children: _propTypes.default.node,
|
|
41
36
|
className: _propTypes.default.string,
|
|
@@ -17,8 +17,8 @@ const TableToolbar = exports.TableToolbar = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
17
17
|
let {
|
|
18
18
|
children,
|
|
19
19
|
className,
|
|
20
|
-
dataTest,
|
|
21
|
-
position,
|
|
20
|
+
dataTest = 'dhis2-uicore-tabletoolbar',
|
|
21
|
+
position = 'top',
|
|
22
22
|
...props
|
|
23
23
|
} = _ref;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
@@ -31,10 +31,6 @@ const TableToolbar = exports.TableToolbar = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
31
31
|
}, [`div.__jsx-style-dynamic-selector{width:100%;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border:1px solid ${_uiConstants.colors.grey300};padding:${_uiConstants.spacers.dp12};}`, "div.top.__jsx-style-dynamic-selector{border-bottom:none;}", "div.bottom.__jsx-style-dynamic-selector{border-top:none;}"]));
|
|
32
32
|
});
|
|
33
33
|
TableToolbar.displayName = 'TableToolbar';
|
|
34
|
-
TableToolbar.defaultProps = {
|
|
35
|
-
dataTest: 'dhis2-uicore-tabletoolbar',
|
|
36
|
-
position: 'top'
|
|
37
|
-
};
|
|
38
34
|
TableToolbar.propTypes = {
|
|
39
35
|
children: _propTypes.default.node,
|
|
40
36
|
className: _propTypes.default.string,
|
|
@@ -17,11 +17,11 @@ const Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) =>
|
|
|
17
17
|
let {
|
|
18
18
|
children,
|
|
19
19
|
className,
|
|
20
|
-
dataTest,
|
|
21
|
-
layout,
|
|
20
|
+
dataTest = 'dhis2-uicore-table',
|
|
21
|
+
layout = 'auto',
|
|
22
22
|
role,
|
|
23
23
|
borderless,
|
|
24
|
-
width,
|
|
24
|
+
width = '100%',
|
|
25
25
|
...props
|
|
26
26
|
} = _ref;
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement("table", _extends({}, props, {
|
|
@@ -37,11 +37,6 @@ const Table = exports.Table = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) =>
|
|
|
37
37
|
}, [`table.__jsx-style-dynamic-selector{table-layout:${layout};border-collapse:separate;border-spacing:0;width:${width};box-sizing:border-box;border:1px solid ${_uiConstants.colors.grey300};}`, "table.borderless.__jsx-style-dynamic-selector{border:none;}"]));
|
|
38
38
|
});
|
|
39
39
|
Table.displayName = 'Table';
|
|
40
|
-
Table.defaultProps = {
|
|
41
|
-
dataTest: 'dhis2-uicore-table',
|
|
42
|
-
width: '100%',
|
|
43
|
-
layout: 'auto'
|
|
44
|
-
};
|
|
45
40
|
Table.propTypes = {
|
|
46
41
|
/**
|
|
47
42
|
* Removes border from the table
|
|
@@ -12,7 +12,7 @@ const StackedTableBody = _ref => {
|
|
|
12
12
|
let {
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
|
-
dataTest
|
|
15
|
+
dataTest = 'dhis2-uicore-stackedtablebody'
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement("tbody", {
|
|
18
18
|
"data-tset": dataTest,
|
|
@@ -26,7 +26,4 @@ StackedTableBody.propTypes = {
|
|
|
26
26
|
children: _propTypes.default.node,
|
|
27
27
|
className: _propTypes.default.string,
|
|
28
28
|
dataTest: _propTypes.default.string
|
|
29
|
-
};
|
|
30
|
-
StackedTableBody.defaultProps = {
|
|
31
|
-
dataTest: 'dhis2-uicore-stackedtablebody'
|
|
32
29
|
};
|
|
@@ -11,10 +11,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const StackedTableCellHead = _ref => {
|
|
13
13
|
let {
|
|
14
|
-
children,
|
|
14
|
+
children = '',
|
|
15
15
|
className,
|
|
16
16
|
colSpan,
|
|
17
|
-
dataTest,
|
|
17
|
+
dataTest = 'dhis2-uicore-stackedtablecellhead',
|
|
18
18
|
rowSpan
|
|
19
19
|
} = _ref;
|
|
20
20
|
return /*#__PURE__*/_react.default.createElement("th", {
|
|
@@ -36,8 +36,4 @@ StackedTableCellHead.propTypes = {
|
|
|
36
36
|
colSpan: _propTypes.default.string,
|
|
37
37
|
dataTest: _propTypes.default.string,
|
|
38
38
|
rowSpan: _propTypes.default.string
|
|
39
|
-
};
|
|
40
|
-
StackedTableCellHead.defaultProps = {
|
|
41
|
-
children: '',
|
|
42
|
-
dataTest: 'dhis2-uicore-stackedtablecellhead'
|
|
43
39
|
};
|
|
@@ -10,14 +10,15 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _contentWithTitle = require("./content-with-title.js");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const defaultHeaderLabels = [];
|
|
13
14
|
const StackedTableCell = _ref => {
|
|
14
15
|
let {
|
|
15
16
|
children,
|
|
16
17
|
className,
|
|
17
18
|
colSpan,
|
|
18
19
|
column,
|
|
19
|
-
dataTest,
|
|
20
|
-
headerLabels,
|
|
20
|
+
dataTest = 'dhis2-uicore-stackedtablecell',
|
|
21
|
+
headerLabels = defaultHeaderLabels,
|
|
21
22
|
hideTitle,
|
|
22
23
|
rowSpan,
|
|
23
24
|
title
|
|
@@ -47,8 +48,4 @@ StackedTableCell.propTypes = {
|
|
|
47
48
|
hideTitle: _propTypes.default.bool,
|
|
48
49
|
rowSpan: _propTypes.default.string,
|
|
49
50
|
title: _propTypes.default.string
|
|
50
|
-
};
|
|
51
|
-
StackedTableCell.defaultProps = {
|
|
52
|
-
dataTest: 'dhis2-uicore-stackedtablecell',
|
|
53
|
-
headerLabels: []
|
|
54
51
|
};
|
|
@@ -12,7 +12,7 @@ const StackedTableFoot = _ref => {
|
|
|
12
12
|
let {
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
|
-
dataTest
|
|
15
|
+
dataTest = 'dhis2-uicore-stackedtablefoot'
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement("tfoot", {
|
|
18
18
|
"data-test": dataTest,
|
|
@@ -26,7 +26,4 @@ StackedTableFoot.propTypes = {
|
|
|
26
26
|
children: _propTypes.default.node,
|
|
27
27
|
className: _propTypes.default.string,
|
|
28
28
|
dataTest: _propTypes.default.string
|
|
29
|
-
};
|
|
30
|
-
StackedTableFoot.defaultProps = {
|
|
31
|
-
dataTest: 'dhis2-uicore-stackedtablefoot'
|
|
32
29
|
};
|
|
@@ -12,7 +12,7 @@ const StackedTableHead = _ref => {
|
|
|
12
12
|
let {
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
|
-
dataTest
|
|
15
|
+
dataTest = 'dhis2-uicore-stackedtablehead'
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement("thead", {
|
|
18
18
|
"data-test": dataTest,
|
|
@@ -26,7 +26,4 @@ StackedTableHead.propTypes = {
|
|
|
26
26
|
children: _propTypes.default.node,
|
|
27
27
|
className: _propTypes.default.string,
|
|
28
28
|
dataTest: _propTypes.default.string
|
|
29
|
-
};
|
|
30
|
-
StackedTableHead.defaultProps = {
|
|
31
|
-
dataTest: 'dhis2-uicore-stackedtablehead'
|
|
32
29
|
};
|
|
@@ -12,7 +12,7 @@ const StackedTableRowHead = _ref => {
|
|
|
12
12
|
let {
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
|
-
dataTest
|
|
15
|
+
dataTest = 'dhis2-uicore-stackedtablerowhead'
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement(_stackedTableRow.StackedTableRow, {
|
|
18
18
|
className: className,
|
|
@@ -24,7 +24,4 @@ StackedTableRowHead.propTypes = {
|
|
|
24
24
|
children: _propTypes.default.node,
|
|
25
25
|
className: _propTypes.default.string,
|
|
26
26
|
dataTest: _propTypes.default.string
|
|
27
|
-
};
|
|
28
|
-
StackedTableRowHead.defaultProps = {
|
|
29
|
-
dataTest: 'dhis2-uicore-stackedtablerowhead'
|
|
30
27
|
};
|
|
@@ -16,7 +16,7 @@ const StackedTableRow = _ref => {
|
|
|
16
16
|
let {
|
|
17
17
|
children,
|
|
18
18
|
className,
|
|
19
|
-
dataTest
|
|
19
|
+
dataTest = 'dhis2-uicore-stackedtablerow'
|
|
20
20
|
} = _ref;
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("tr", {
|
|
22
22
|
"data-test": dataTest,
|
|
@@ -36,7 +36,4 @@ StackedTableRow.propTypes = {
|
|
|
36
36
|
children: _propTypes.default.node,
|
|
37
37
|
className: _propTypes.default.string,
|
|
38
38
|
dataTest: _propTypes.default.string
|
|
39
|
-
};
|
|
40
|
-
StackedTableRow.defaultProps = {
|
|
41
|
-
dataTest: 'dhis2-uicore-stackedtablerow'
|
|
42
39
|
};
|
|
@@ -14,7 +14,7 @@ const StackedTable = _ref => {
|
|
|
14
14
|
let {
|
|
15
15
|
children,
|
|
16
16
|
className,
|
|
17
|
-
dataTest,
|
|
17
|
+
dataTest = 'dhis2-uicore-stackedtable',
|
|
18
18
|
headerLabels
|
|
19
19
|
} = _ref;
|
|
20
20
|
const contextHeaderLabels = (0, _extractHeaderLabels.extractHeaderLabels)(children);
|
|
@@ -35,7 +35,4 @@ StackedTable.propTypes = {
|
|
|
35
35
|
dataTest: _propTypes.default.string,
|
|
36
36
|
/** Labels for columns. Use an empty string for a column without a header. */
|
|
37
37
|
headerLabels: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
38
|
-
};
|
|
39
|
-
StackedTable.defaultProps = {
|
|
40
|
-
dataTest: 'dhis2-uicore-stackedtable'
|
|
41
38
|
};
|
|
@@ -78,7 +78,7 @@ describe('StackedTable', () => {
|
|
|
78
78
|
label: 'Incomplete'
|
|
79
79
|
}];
|
|
80
80
|
it('should add the headerLabels to each cell', () => {
|
|
81
|
-
const table = (0, _enzyme.mount)(
|
|
81
|
+
const table = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(Table, {
|
|
82
82
|
headerLabels: headerLabels,
|
|
83
83
|
bodyLabels: bodyLabels
|
|
84
84
|
}));
|
|
@@ -92,7 +92,7 @@ describe('StackedTable', () => {
|
|
|
92
92
|
it('should not add empty header labels to the body cells', () => {
|
|
93
93
|
const emptyLabelIndex = 2;
|
|
94
94
|
const headerLabelsWithEmpty = [...headerLabels.slice(0, emptyLabelIndex), '', ...headerLabels.slice(emptyLabelIndex + 1)];
|
|
95
|
-
const table = (0, _enzyme.mount)(
|
|
95
|
+
const table = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(Table, {
|
|
96
96
|
headerLabels: headerLabelsWithEmpty,
|
|
97
97
|
bodyLabels: bodyLabels
|
|
98
98
|
}));
|
|
@@ -109,7 +109,7 @@ describe('StackedTable', () => {
|
|
|
109
109
|
...originalHeaderLabel,
|
|
110
110
|
colSpan: `${colSpan}`
|
|
111
111
|
}, ...headerLabels.slice(indexWithColspan + colSpan)];
|
|
112
|
-
const table = (0, _enzyme.mount)(
|
|
112
|
+
const table = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(Table, {
|
|
113
113
|
headerLabels: headerLabelsWithColspan,
|
|
114
114
|
bodyLabels: bodyLabels
|
|
115
115
|
}));
|
|
@@ -11,7 +11,7 @@ const TableBody = _ref => {
|
|
|
11
11
|
let {
|
|
12
12
|
children,
|
|
13
13
|
className,
|
|
14
|
-
dataTest,
|
|
14
|
+
dataTest = 'dhis2-uicore-tablebody',
|
|
15
15
|
role
|
|
16
16
|
} = _ref;
|
|
17
17
|
return /*#__PURE__*/_react.default.createElement("tbody", {
|
|
@@ -21,9 +21,6 @@ const TableBody = _ref => {
|
|
|
21
21
|
}, children);
|
|
22
22
|
};
|
|
23
23
|
exports.TableBody = TableBody;
|
|
24
|
-
TableBody.defaultProps = {
|
|
25
|
-
dataTest: 'dhis2-uicore-tablebody'
|
|
26
|
-
};
|
|
27
24
|
TableBody.propTypes = {
|
|
28
25
|
/** Should be `<TableRow>` components */
|
|
29
26
|
children: _propTypes.default.node,
|
|
@@ -19,7 +19,7 @@ const TableCellHead = _ref => {
|
|
|
19
19
|
dense,
|
|
20
20
|
children,
|
|
21
21
|
className,
|
|
22
|
-
dataTest
|
|
22
|
+
dataTest = 'dhis2-uicore-tablecellhead'
|
|
23
23
|
} = _ref;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("th", {
|
|
25
25
|
colSpan: colSpan,
|
|
@@ -34,9 +34,6 @@ const TableCellHead = _ref => {
|
|
|
34
34
|
}, tableCellHeadStyles));
|
|
35
35
|
};
|
|
36
36
|
exports.TableCellHead = TableCellHead;
|
|
37
|
-
TableCellHead.defaultProps = {
|
|
38
|
-
dataTest: 'dhis2-uicore-tablecellhead'
|
|
39
|
-
};
|
|
40
37
|
TableCellHead.propTypes = {
|
|
41
38
|
children: _propTypes.default.node,
|
|
42
39
|
className: _propTypes.default.string,
|
|
@@ -19,7 +19,7 @@ const TableCell = _ref => {
|
|
|
19
19
|
colSpan,
|
|
20
20
|
rowSpan,
|
|
21
21
|
dense,
|
|
22
|
-
dataTest
|
|
22
|
+
dataTest = 'dhis2-uicore-tablecell'
|
|
23
23
|
} = _ref;
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("td", {
|
|
25
25
|
colSpan: colSpan,
|
|
@@ -34,9 +34,6 @@ const TableCell = _ref => {
|
|
|
34
34
|
}, tableCellStyles));
|
|
35
35
|
};
|
|
36
36
|
exports.TableCell = TableCell;
|
|
37
|
-
TableCell.defaultProps = {
|
|
38
|
-
dataTest: 'dhis2-uicore-tablecell'
|
|
39
|
-
};
|
|
40
37
|
TableCell.propTypes = {
|
|
41
38
|
children: _propTypes.default.node,
|
|
42
39
|
className: _propTypes.default.string,
|