@dhis2-ui/table 8.1.11 → 8.2.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/build/cjs/data-table/__tests__/data-table-row/expanded-row.test.js +2 -2
- package/build/cjs/data-table/data-table-cell.js +23 -22
- package/build/cjs/data-table/data-table-column-header/data-table-column-header.js +60 -57
- package/build/cjs/data-table/data-table-column-header/data-table-column-header.styles.js +1 -1
- package/build/cjs/data-table/data-table-column-header/filter-handle.js +6 -5
- package/build/cjs/data-table/data-table-column-header/sorter.js +9 -8
- package/build/cjs/data-table/data-table-row/data-table-row.js +12 -11
- package/build/cjs/data-table/data-table-row/data-table-row.styles.js +1 -1
- package/build/cjs/data-table/data-table-row/expand-handle-cell.js +15 -12
- package/build/cjs/data-table/data-table-row/expanded-row.js +23 -20
- package/build/cjs/data-table/data-table.js +12 -11
- package/build/cjs/data-table/data-table.stories.e2e.js +1 -1
- package/build/cjs/data-table/data-table.stories.js +147 -145
- package/build/cjs/data-table/table-elements/__tests__/table-data-cell.test.js +3 -3
- package/build/cjs/data-table/table-elements/__tests__/table-header-cell.test.js +4 -4
- package/build/cjs/data-table/table-elements/__tests__/table.test.js +2 -2
- package/build/cjs/data-table/table-elements/index.js +8 -8
- package/build/cjs/data-table/table-elements/table-body.js +21 -18
- package/build/cjs/data-table/table-elements/table-data-cell/table-data-cell.js +40 -37
- package/build/cjs/data-table/table-elements/table-data-cell/table-data-cell.styles.js +1 -1
- package/build/cjs/data-table/table-elements/table-foot.js +15 -12
- package/build/cjs/data-table/table-elements/table-head.js +15 -12
- package/build/cjs/data-table/table-elements/table-header-cell/table-header-cell.js +43 -40
- package/build/cjs/data-table/table-elements/table-header-cell/table-header-cell.styles.js +1 -1
- package/build/cjs/data-table/table-elements/table-header-cell-action.js +20 -17
- package/build/cjs/data-table/table-elements/table-row.js +21 -18
- package/build/cjs/data-table/table-elements/table-scroll-box.js +18 -15
- package/build/cjs/data-table/table-elements/table-toolbar.js +17 -14
- package/build/cjs/data-table/table-elements/table.js +23 -20
- package/build/cjs/data-table/table-elements/table.stories.e2e.js +1 -1
- package/build/cjs/data-table/table-elements/table.stories.internal.js +119 -127
- package/build/cjs/index.js +42 -42
- package/build/cjs/stacked-table/content-with-title.js +14 -11
- package/build/cjs/stacked-table/index.js +10 -10
- package/build/cjs/stacked-table/stacked-table-body.js +13 -10
- package/build/cjs/stacked-table/stacked-table-cell-head.js +20 -17
- package/build/cjs/stacked-table/stacked-table-cell.js +13 -12
- package/build/cjs/stacked-table/stacked-table-foot.js +13 -10
- package/build/cjs/stacked-table/stacked-table-head.js +13 -10
- package/build/cjs/stacked-table/stacked-table-row-head.js +11 -8
- package/build/cjs/stacked-table/stacked-table-row.js +19 -13
- package/build/cjs/stacked-table/stacked-table.js +7 -6
- package/build/cjs/stacked-table/stacked-table.stories.js +3 -20
- package/build/cjs/stacked-table/stacked-table.test.js +24 -15
- package/build/cjs/stacked-table/table-context.js +1 -1
- package/build/cjs/stacked-table/table.js +14 -11
- package/build/cjs/table/index.js +10 -10
- package/build/cjs/table/table-body.js +13 -10
- package/build/cjs/table/table-cell-head.js +22 -19
- package/build/cjs/table/table-cell.js +22 -19
- package/build/cjs/table/table-context.js +1 -1
- package/build/cjs/table/table-foot.js +13 -10
- package/build/cjs/table/table-head.js +13 -10
- package/build/cjs/table/table-row-head.js +15 -12
- package/build/cjs/table/table-row.js +9 -8
- package/build/cjs/table/table.js +19 -16
- package/build/cjs/table/table.stories.js +3 -18
- package/build/es/data-table/__tests__/data-table-row/expanded-row.test.js +2 -2
- package/build/es/data-table/data-table-cell.js +23 -22
- package/build/es/data-table/data-table-column-header/data-table-column-header.js +60 -57
- package/build/es/data-table/data-table-column-header/filter-handle.js +6 -5
- package/build/es/data-table/data-table-column-header/sorter.js +8 -7
- package/build/es/data-table/data-table-row/data-table-row.js +12 -11
- package/build/es/data-table/data-table-row/data-table-row.styles.js +1 -1
- package/build/es/data-table/data-table-row/expand-handle-cell.js +15 -12
- package/build/es/data-table/data-table-row/expanded-row.js +23 -20
- package/build/es/data-table/data-table.js +12 -11
- package/build/es/data-table/data-table.stories.js +146 -144
- package/build/es/data-table/table-elements/__tests__/table-data-cell.test.js +3 -3
- package/build/es/data-table/table-elements/__tests__/table-header-cell.test.js +4 -4
- package/build/es/data-table/table-elements/__tests__/table.test.js +2 -2
- package/build/es/data-table/table-elements/table-body.js +21 -18
- package/build/es/data-table/table-elements/table-data-cell/table-data-cell.js +40 -37
- package/build/es/data-table/table-elements/table-data-cell/table-data-cell.styles.js +1 -1
- package/build/es/data-table/table-elements/table-foot.js +15 -12
- package/build/es/data-table/table-elements/table-head.js +15 -12
- package/build/es/data-table/table-elements/table-header-cell/table-header-cell.js +43 -40
- package/build/es/data-table/table-elements/table-header-cell/table-header-cell.styles.js +1 -1
- package/build/es/data-table/table-elements/table-header-cell-action.js +20 -17
- package/build/es/data-table/table-elements/table-row.js +21 -18
- package/build/es/data-table/table-elements/table-scroll-box.js +18 -15
- package/build/es/data-table/table-elements/table-toolbar.js +17 -14
- package/build/es/data-table/table-elements/table.js +23 -20
- package/build/es/data-table/table-elements/table.stories.internal.js +118 -126
- package/build/es/stacked-table/content-with-title.js +14 -11
- package/build/es/stacked-table/stacked-table-body.js +13 -10
- package/build/es/stacked-table/stacked-table-cell-head.js +20 -17
- package/build/es/stacked-table/stacked-table-cell.js +13 -12
- package/build/es/stacked-table/stacked-table-foot.js +13 -10
- package/build/es/stacked-table/stacked-table-head.js +13 -10
- package/build/es/stacked-table/stacked-table-row-head.js +11 -8
- package/build/es/stacked-table/stacked-table-row.js +19 -13
- package/build/es/stacked-table/stacked-table.js +7 -6
- package/build/es/stacked-table/stacked-table.stories.js +2 -19
- package/build/es/stacked-table/stacked-table.test.js +24 -15
- package/build/es/stacked-table/table.js +14 -11
- package/build/es/table/table-body.js +13 -10
- package/build/es/table/table-cell-head.js +22 -19
- package/build/es/table/table-cell.js +22 -19
- package/build/es/table/table-foot.js +13 -10
- package/build/es/table/table-head.js +13 -10
- package/build/es/table/table-row-head.js +15 -12
- package/build/es/table/table-row.js +9 -8
- package/build/es/table/table.js +19 -16
- package/build/es/table/table.stories.js +2 -17
- package/package.json +3 -3
|
@@ -14,23 +14,7 @@ import { TableScrollBox } from './table-scroll-box.js';
|
|
|
14
14
|
import { TableToolbar } from './table-toolbar.js';
|
|
15
15
|
import { Table } from './table.js';
|
|
16
16
|
const subtitle = 'Used to display information in a standard, effective way.';
|
|
17
|
-
const description =
|
|
18
|
-
Should be used with multiple Table-related child components - see the table and examples below.
|
|
19
|
-
|
|
20
|
-
\`\`\`js
|
|
21
|
-
import {
|
|
22
|
-
Table,
|
|
23
|
-
TableToolbar,
|
|
24
|
-
TableHead,
|
|
25
|
-
TableBody,
|
|
26
|
-
TableFoot,
|
|
27
|
-
TableRow,
|
|
28
|
-
TableDataCell,
|
|
29
|
-
TableHeaderCell,
|
|
30
|
-
TableScrollBox,
|
|
31
|
-
} from '@dhis2/ui'
|
|
32
|
-
\`\`\`
|
|
33
|
-
`;
|
|
17
|
+
const description = "\nShould be used with multiple Table-related child components - see the table and examples below.\n\n```js\nimport {\n Table,\n TableToolbar,\n TableHead,\n TableBody,\n TableFoot,\n TableRow,\n TableDataCell,\n TableHeaderCell,\n TableScrollBox,\n} from '@dhis2/ui'\n```\n";
|
|
34
18
|
export default {
|
|
35
19
|
title: 'Data Display/Table',
|
|
36
20
|
component: Table,
|
|
@@ -83,80 +67,83 @@ export default {
|
|
|
83
67
|
}
|
|
84
68
|
};
|
|
85
69
|
|
|
86
|
-
const BasicTemplate =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, "
|
|
97
|
-
|
|
98
|
-
}, "
|
|
99
|
-
|
|
100
|
-
}, "
|
|
101
|
-
|
|
102
|
-
}, /*#__PURE__*/React.createElement(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, /*#__PURE__*/React.createElement(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}, /*#__PURE__*/React.createElement(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
70
|
+
const BasicTemplate = _ref => {
|
|
71
|
+
let {
|
|
72
|
+
borderedCells,
|
|
73
|
+
largeCells,
|
|
74
|
+
staticCells,
|
|
75
|
+
draggableRows,
|
|
76
|
+
...args
|
|
77
|
+
} = _ref;
|
|
78
|
+
return /*#__PURE__*/React.createElement(Table, args, /*#__PURE__*/React.createElement(TableHead, null, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
79
|
+
large: largeCells
|
|
80
|
+
}, "First name"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
81
|
+
large: largeCells
|
|
82
|
+
}, "Last name"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
83
|
+
large: largeCells
|
|
84
|
+
}, "Incident date"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
85
|
+
large: largeCells
|
|
86
|
+
}, "Last updated"))), /*#__PURE__*/React.createElement(TableBody, null, /*#__PURE__*/React.createElement(TableRow, {
|
|
87
|
+
draggable: draggableRows
|
|
88
|
+
}, /*#__PURE__*/React.createElement(TableDataCell, {
|
|
89
|
+
staticStyle: staticCells,
|
|
90
|
+
large: largeCells,
|
|
91
|
+
bordered: borderedCells
|
|
92
|
+
}, "Onyekachukwu"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
93
|
+
staticStyle: staticCells,
|
|
94
|
+
large: largeCells,
|
|
95
|
+
bordered: borderedCells
|
|
96
|
+
}, "Kariuki"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
97
|
+
staticStyle: staticCells,
|
|
98
|
+
large: largeCells,
|
|
99
|
+
bordered: borderedCells
|
|
100
|
+
}, "02/06/2007"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
101
|
+
staticStyle: staticCells,
|
|
102
|
+
large: largeCells,
|
|
103
|
+
bordered: borderedCells
|
|
104
|
+
}, "05/25/1972")), /*#__PURE__*/React.createElement(TableRow, {
|
|
105
|
+
draggable: draggableRows
|
|
106
|
+
}, /*#__PURE__*/React.createElement(TableDataCell, {
|
|
107
|
+
staticStyle: staticCells,
|
|
108
|
+
large: largeCells,
|
|
109
|
+
bordered: borderedCells
|
|
110
|
+
}, "Kwasi"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
111
|
+
staticStyle: staticCells,
|
|
112
|
+
large: largeCells,
|
|
113
|
+
bordered: borderedCells
|
|
114
|
+
}, "Okafor"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
115
|
+
staticStyle: staticCells,
|
|
116
|
+
large: largeCells,
|
|
117
|
+
bordered: borderedCells
|
|
118
|
+
}, "08/11/2010"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
119
|
+
staticStyle: staticCells,
|
|
120
|
+
large: largeCells,
|
|
121
|
+
bordered: borderedCells
|
|
122
|
+
}, "02/26/1991")), /*#__PURE__*/React.createElement(TableRow, {
|
|
123
|
+
draggable: draggableRows
|
|
124
|
+
}, /*#__PURE__*/React.createElement(TableDataCell, {
|
|
125
|
+
staticStyle: staticCells,
|
|
126
|
+
large: largeCells,
|
|
127
|
+
bordered: borderedCells
|
|
128
|
+
}, "Siyabonga"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
129
|
+
staticStyle: staticCells,
|
|
130
|
+
large: largeCells,
|
|
131
|
+
bordered: borderedCells
|
|
132
|
+
}, "Abiodun"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
133
|
+
staticStyle: staticCells,
|
|
134
|
+
large: largeCells,
|
|
135
|
+
bordered: borderedCells
|
|
136
|
+
}, "07/21/1981"), /*#__PURE__*/React.createElement(TableDataCell, {
|
|
137
|
+
staticStyle: staticCells,
|
|
138
|
+
large: largeCells,
|
|
139
|
+
bordered: borderedCells
|
|
140
|
+
}, "02/06/2007"))), /*#__PURE__*/React.createElement(TableFoot, null, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, {
|
|
141
|
+
staticStyle: staticCells,
|
|
142
|
+
large: largeCells,
|
|
143
|
+
bordered: borderedCells,
|
|
144
|
+
colSpan: "4"
|
|
145
|
+
}, "Footer content"))));
|
|
146
|
+
};
|
|
160
147
|
|
|
161
148
|
export const Default = BasicTemplate.bind({});
|
|
162
149
|
Default.args = {};
|
|
@@ -275,18 +262,20 @@ const SelectableRowsTemplate = args => {
|
|
|
275
262
|
id_2: true
|
|
276
263
|
});
|
|
277
264
|
|
|
278
|
-
const toggleSelected =
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
265
|
+
const toggleSelected = _ref2 => {
|
|
266
|
+
let {
|
|
267
|
+
value,
|
|
268
|
+
checked
|
|
269
|
+
} = _ref2;
|
|
282
270
|
setSelected({ ...selected,
|
|
283
271
|
[value]: checked
|
|
284
272
|
});
|
|
285
273
|
};
|
|
286
274
|
|
|
287
|
-
const toggleAll =
|
|
288
|
-
|
|
289
|
-
|
|
275
|
+
const toggleAll = _ref3 => {
|
|
276
|
+
let {
|
|
277
|
+
checked
|
|
278
|
+
} = _ref3;
|
|
290
279
|
setSelected({
|
|
291
280
|
id_1: checked,
|
|
292
281
|
id_2: checked,
|
|
@@ -331,34 +320,37 @@ const SelectableRowsTemplate = args => {
|
|
|
331
320
|
export const SelectableRows = SelectableRowsTemplate.bind({});
|
|
332
321
|
SelectableRows.args = {};
|
|
333
322
|
|
|
334
|
-
const FixedHeaderTemplate =
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
323
|
+
const FixedHeaderTemplate = _ref4 => {
|
|
324
|
+
let { ...args
|
|
325
|
+
} = _ref4;
|
|
326
|
+
return /*#__PURE__*/React.createElement(TableScrollBox, {
|
|
327
|
+
maxHeight: "350px"
|
|
328
|
+
}, /*#__PURE__*/React.createElement(Table, args, /*#__PURE__*/React.createElement(TableHead, null, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
329
|
+
fixed: true,
|
|
330
|
+
top: "0"
|
|
331
|
+
}, "First name"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
332
|
+
fixed: true,
|
|
333
|
+
top: "0"
|
|
334
|
+
}, "Last name"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
335
|
+
fixed: true,
|
|
336
|
+
top: "0"
|
|
337
|
+
}, "Incident date"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
338
|
+
fixed: true,
|
|
339
|
+
top: "0"
|
|
340
|
+
}, "Last updated"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
341
|
+
fixed: true,
|
|
342
|
+
top: "0"
|
|
343
|
+
}, "Age"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
344
|
+
fixed: true,
|
|
345
|
+
top: "0"
|
|
346
|
+
}, "Registering unit"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
347
|
+
fixed: true,
|
|
348
|
+
top: "0"
|
|
349
|
+
}, "Assigned user"), /*#__PURE__*/React.createElement(TableHeaderCell, {
|
|
350
|
+
fixed: true,
|
|
351
|
+
top: "0"
|
|
352
|
+
}, "Status"))), /*#__PURE__*/React.createElement(TableBody, null, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Onyekachukwu"), /*#__PURE__*/React.createElement(TableDataCell, null, "Kariuki"), /*#__PURE__*/React.createElement(TableDataCell, null, "02/06/2007"), /*#__PURE__*/React.createElement(TableDataCell, null, "05/25/1972"), /*#__PURE__*/React.createElement(TableDataCell, null, "66"), /*#__PURE__*/React.createElement(TableDataCell, null, "Jawi"), /*#__PURE__*/React.createElement(TableDataCell, null, "Sofie Hubert"), /*#__PURE__*/React.createElement(TableDataCell, null, "Incomplete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Kwasi"), /*#__PURE__*/React.createElement(TableDataCell, null, "Okafor"), /*#__PURE__*/React.createElement(TableDataCell, null, "08/11/2010"), /*#__PURE__*/React.createElement(TableDataCell, null, "02/26/1991"), /*#__PURE__*/React.createElement(TableDataCell, null, "38"), /*#__PURE__*/React.createElement(TableDataCell, null, "Mokassie MCHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Dashonte Clarke"), /*#__PURE__*/React.createElement(TableDataCell, null, "Complete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Siyabonga"), /*#__PURE__*/React.createElement(TableDataCell, null, "Abiodun"), /*#__PURE__*/React.createElement(TableDataCell, null, "07/21/1981"), /*#__PURE__*/React.createElement(TableDataCell, null, "02/06/2007"), /*#__PURE__*/React.createElement(TableDataCell, null, "98"), /*#__PURE__*/React.createElement(TableDataCell, null, "Bathurst MCHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Unassigned"), /*#__PURE__*/React.createElement(TableDataCell, null, "Incomplete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Chiyembekezo"), /*#__PURE__*/React.createElement(TableDataCell, null, "Okeke"), /*#__PURE__*/React.createElement(TableDataCell, null, "01/23/1982"), /*#__PURE__*/React.createElement(TableDataCell, null, "07/15/2003"), /*#__PURE__*/React.createElement(TableDataCell, null, "2"), /*#__PURE__*/React.createElement(TableDataCell, null, "Mayolla MCHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Wan Gengxin"), /*#__PURE__*/React.createElement(TableDataCell, null, "Incomplete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Mtendere"), /*#__PURE__*/React.createElement(TableDataCell, null, "Afolayan"), /*#__PURE__*/React.createElement(TableDataCell, null, "08/12/1994"), /*#__PURE__*/React.createElement(TableDataCell, null, "05/12/1972"), /*#__PURE__*/React.createElement(TableDataCell, null, "37"), /*#__PURE__*/React.createElement(TableDataCell, null, "Gbangadu MCHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Gvozden Boskovsky"), /*#__PURE__*/React.createElement(TableDataCell, null, "Complete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Inyene"), /*#__PURE__*/React.createElement(TableDataCell, null, "Okonkwo"), /*#__PURE__*/React.createElement(TableDataCell, null, "04/01/1971"), /*#__PURE__*/React.createElement(TableDataCell, null, "03/16/2000"), /*#__PURE__*/React.createElement(TableDataCell, null, "70"), /*#__PURE__*/React.createElement(TableDataCell, null, "Kunike Barina"), /*#__PURE__*/React.createElement(TableDataCell, null, "Oscar de la Cavaller\xEDa"), /*#__PURE__*/React.createElement(TableDataCell, null, "Complete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Amaka"), /*#__PURE__*/React.createElement(TableDataCell, null, "Pretorius"), /*#__PURE__*/React.createElement(TableDataCell, null, "01/25/1996"), /*#__PURE__*/React.createElement(TableDataCell, null, "09/15/1986"), /*#__PURE__*/React.createElement(TableDataCell, null, "32"), /*#__PURE__*/React.createElement(TableDataCell, null, "Bargbo"), /*#__PURE__*/React.createElement(TableDataCell, null, "Alberto Raya"), /*#__PURE__*/React.createElement(TableDataCell, null, "Incomplete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Meti"), /*#__PURE__*/React.createElement(TableDataCell, null, "Abiodun"), /*#__PURE__*/React.createElement(TableDataCell, null, "10/24/2010"), /*#__PURE__*/React.createElement(TableDataCell, null, "07/26/1989"), /*#__PURE__*/React.createElement(TableDataCell, null, "8"), /*#__PURE__*/React.createElement(TableDataCell, null, "Majihun MCHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Unassigned"), /*#__PURE__*/React.createElement(TableDataCell, null, "Complete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Eshe"), /*#__PURE__*/React.createElement(TableDataCell, null, "Okeke"), /*#__PURE__*/React.createElement(TableDataCell, null, "01/31/1995"), /*#__PURE__*/React.createElement(TableDataCell, null, "01/31/1995"), /*#__PURE__*/React.createElement(TableDataCell, null, "63"), /*#__PURE__*/React.createElement(TableDataCell, null, "Mambiama CHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Shadrias Pearson"), /*#__PURE__*/React.createElement(TableDataCell, null, "Incomplete")), /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableDataCell, null, "Obi"), /*#__PURE__*/React.createElement(TableDataCell, null, "Okafor"), /*#__PURE__*/React.createElement(TableDataCell, null, "06/07/1990"), /*#__PURE__*/React.createElement(TableDataCell, null, "01/03/2006"), /*#__PURE__*/React.createElement(TableDataCell, null, "28"), /*#__PURE__*/React.createElement(TableDataCell, null, "Dalakuru CHP"), /*#__PURE__*/React.createElement(TableDataCell, null, "Anatoliy Shcherbatykh"), /*#__PURE__*/React.createElement(TableDataCell, null, "Incomplete")))));
|
|
353
|
+
};
|
|
362
354
|
|
|
363
355
|
export const FixedHeader = FixedHeaderTemplate.bind({});
|
|
364
356
|
FixedHeader.args = {
|
|
@@ -2,17 +2,20 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { colors } from '@dhis2/ui-constants';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { Fragment } from 'react';
|
|
5
|
-
export const ContentWithTitle =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
export const ContentWithTitle = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
title,
|
|
8
|
+
children
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement(Fragment, null, title && /*#__PURE__*/React.createElement("span", {
|
|
11
|
+
className: _JSXStyle.dynamic([["215664166", [colors.grey700]]]) + " " + "title"
|
|
12
|
+
}, title), /*#__PURE__*/React.createElement("span", {
|
|
13
|
+
className: _JSXStyle.dynamic([["215664166", [colors.grey700]]]) + " " + "content"
|
|
14
|
+
}, children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
15
|
+
id: "215664166",
|
|
16
|
+
dynamic: [colors.grey700]
|
|
17
|
+
}, [".title.__jsx-style-dynamic-selector{display:block;white-space:normal;min-height:24px;font-size:13px;line-height:16px;padding:8px 0 4px;font-weight:normal;color:".concat(colors.grey700, ";}"), ".content.__jsx-style-dynamic-selector{display:block;padding:0 0 8px 0;font-size:14px;line-height:18px;}", ".content.__jsx-style-dynamic-selector:first-child{padding-top:8px;padding-bottom:8px;}"]));
|
|
18
|
+
};
|
|
16
19
|
ContentWithTitle.propTypes = {
|
|
17
20
|
children: PropTypes.node.isRequired,
|
|
18
21
|
title: PropTypes.string
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const StackedTableBody =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
4
|
+
export const StackedTableBody = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
dataTest
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement("tbody", {
|
|
11
|
+
"data-tset": dataTest,
|
|
12
|
+
className: "jsx-4146628131" + " " + (className || "")
|
|
13
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
14
|
+
id: "4146628131"
|
|
15
|
+
}, ["tbody.jsx-4146628131{display:block;}"]));
|
|
16
|
+
};
|
|
14
17
|
StackedTableBody.propTypes = {
|
|
15
18
|
children: PropTypes.node,
|
|
16
19
|
className: PropTypes.string,
|
|
@@ -2,23 +2,26 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { colors } from '@dhis2/ui-constants';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const StackedTableCellHead =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, children
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
export const StackedTableCellHead = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
colSpan,
|
|
10
|
+
dataTest,
|
|
11
|
+
rowSpan
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
14
|
+
colSpan: colSpan,
|
|
15
|
+
rowSpan: rowSpan,
|
|
16
|
+
"data-test": dataTest,
|
|
17
|
+
className: _JSXStyle.dynamic([["178822310", [colors.grey300]]]) + " " + (className || "")
|
|
18
|
+
}, children && /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: _JSXStyle.dynamic([["178822310", [colors.grey300]]])
|
|
20
|
+
}, children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
21
|
+
id: "178822310",
|
|
22
|
+
dynamic: [colors.grey300]
|
|
23
|
+
}, ["th.__jsx-style-dynamic-selector{border-bottom:1px solid ".concat(colors.grey300, ";padding:0 12px;}"), "div.__jsx-style-dynamic-selector{min-height:36px;}"]));
|
|
24
|
+
};
|
|
22
25
|
StackedTableCellHead.propTypes = {
|
|
23
26
|
children: PropTypes.string,
|
|
24
27
|
className: PropTypes.string,
|
|
@@ -3,17 +3,18 @@ import { colors } from '@dhis2/ui-constants';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { ContentWithTitle } from './content-with-title.js';
|
|
6
|
-
export const StackedTableCell =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
export const StackedTableCell = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
colSpan,
|
|
11
|
+
column,
|
|
12
|
+
dataTest,
|
|
13
|
+
headerLabels,
|
|
14
|
+
hideTitle,
|
|
15
|
+
rowSpan,
|
|
16
|
+
title
|
|
17
|
+
} = _ref;
|
|
17
18
|
const cellTitle = title || headerLabels[column] || '';
|
|
18
19
|
const realTitle = hideTitle ? '' : cellTitle;
|
|
19
20
|
return /*#__PURE__*/React.createElement("td", {
|
|
@@ -26,7 +27,7 @@ export const StackedTableCell = ({
|
|
|
26
27
|
}, children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
27
28
|
id: "1368473511",
|
|
28
29
|
dynamic: [colors.grey300]
|
|
29
|
-
}, [
|
|
30
|
+
}, ["td.__jsx-style-dynamic-selector{border-bottom:1px solid ".concat(colors.grey300, ";padding:0 12px;font-size:14px;width:100%;display:block;}"), "td.__jsx-style-dynamic-selector:last-child{border-bottom:0;}"]));
|
|
30
31
|
};
|
|
31
32
|
StackedTableCell.propTypes = {
|
|
32
33
|
children: PropTypes.node,
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const StackedTableFoot =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
4
|
+
export const StackedTableFoot = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
dataTest
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement("tfoot", {
|
|
11
|
+
"data-test": dataTest,
|
|
12
|
+
className: "jsx-3912324960" + " " + (className || "")
|
|
13
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
14
|
+
id: "3912324960"
|
|
15
|
+
}, ["tfoot.jsx-3912324960{display:block;margin-top:32px;}"]));
|
|
16
|
+
};
|
|
14
17
|
StackedTableFoot.propTypes = {
|
|
15
18
|
children: PropTypes.node,
|
|
16
19
|
className: PropTypes.string,
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const StackedTableHead =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
4
|
+
export const StackedTableHead = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
dataTest
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement("thead", {
|
|
11
|
+
"data-test": dataTest,
|
|
12
|
+
className: "jsx-1150407268" + " " + (className || "")
|
|
13
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
14
|
+
id: "1150407268"
|
|
15
|
+
}, ["thead.jsx-1150407268{display:none;}"]));
|
|
16
|
+
};
|
|
14
17
|
StackedTableHead.propTypes = {
|
|
15
18
|
children: PropTypes.node,
|
|
16
19
|
className: PropTypes.string,
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { StackedTableRow } from './stacked-table-row.js';
|
|
4
|
-
export const StackedTableRowHead =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
export const StackedTableRowHead = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
dataTest
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement(StackedTableRow, {
|
|
11
|
+
className: className,
|
|
12
|
+
dataTest: dataTest
|
|
13
|
+
}, children);
|
|
14
|
+
};
|
|
12
15
|
StackedTableRowHead.propTypes = {
|
|
13
16
|
children: PropTypes.node,
|
|
14
17
|
className: PropTypes.string,
|
|
@@ -5,19 +5,25 @@ import React from 'react';
|
|
|
5
5
|
import { addColNumToChildren } from './add-col-num-to-children.js';
|
|
6
6
|
import { supplyHeaderLabelsToChildren } from './supply-header-labels-to-children.js';
|
|
7
7
|
import { Consumer } from './table-context.js';
|
|
8
|
-
export const StackedTableRow =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
8
|
+
export const StackedTableRow = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
dataTest
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
15
|
+
"data-test": dataTest,
|
|
16
|
+
className: _JSXStyle.dynamic([["2003961452", [colors.grey300, colors.white]]]) + " " + (className || "")
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Consumer, null, _ref2 => {
|
|
18
|
+
let {
|
|
19
|
+
headerLabels
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return supplyHeaderLabelsToChildren(headerLabels, addColNumToChildren(children));
|
|
22
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
23
|
+
id: "2003961452",
|
|
24
|
+
dynamic: [colors.grey300, colors.white]
|
|
25
|
+
}, ["tr.__jsx-style-dynamic-selector{min-height:45px;display:block;border:1px solid ".concat(colors.grey300, ";}"), "tr.__jsx-style-dynamic-selector:nth-child(even){background:".concat(colors.white, ";}"), "thead>tr.__jsx-style-dynamic-selector,tbody>tr.__jsx-style-dynamic-selector{min-height:36px;}", "tr.__jsx-style-dynamic-selector+tr.__jsx-style-dynamic-selector{margin-top:32px;}"]));
|
|
26
|
+
};
|
|
21
27
|
StackedTableRow.propTypes = {
|
|
22
28
|
children: PropTypes.node,
|
|
23
29
|
className: PropTypes.string,
|
|
@@ -3,12 +3,13 @@ import React from 'react';
|
|
|
3
3
|
import { extractHeaderLabels } from './extract-header-labels.js';
|
|
4
4
|
import { Provider } from './table-context.js';
|
|
5
5
|
import { Table } from './table.js';
|
|
6
|
-
export const StackedTable =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export const StackedTable = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
dataTest,
|
|
11
|
+
headerLabels
|
|
12
|
+
} = _ref;
|
|
12
13
|
const contextHeaderLabels = extractHeaderLabels(children);
|
|
13
14
|
const context = {
|
|
14
15
|
headerLabels: headerLabels || contextHeaderLabels
|