ywana-core8 0.0.203 → 0.0.207
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/dist/index.cjs +44 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +44 -24
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +44 -24
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +5 -5
- package/src/test.js +58 -31
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -76,21 +76,21 @@ export const DataTable = (props) => {
|
|
76
76
|
<tr>
|
77
77
|
{columns.map(({ id, label, type, sortable }) => {
|
78
78
|
const sort = sortDir[id] ? sortDir[id] : null
|
79
|
-
const colspan = type === TYPES.ENTITY ? : 1
|
79
|
+
const [rowspan, colspan] = type === TYPES.ENTITY ? [1, 3] : [2, 1]
|
80
80
|
return (
|
81
|
-
<th rowSpan={
|
81
|
+
<th rowSpan={rowspan} colSpan={colspan}>
|
82
82
|
{id === "checked" ? <CheckBox onChange={checkAll} /> : <Text key={`th_${id}`}>{label}</Text>}
|
83
83
|
{sortable ? <Icon icon="arrow_up" size="small" clickable /> : null}
|
84
84
|
</th>
|
85
85
|
)
|
86
86
|
})}
|
87
|
-
<th></th>
|
87
|
+
<th rowSpan={rowSpan} colSpan={colSpan}></th>
|
88
88
|
</tr>
|
89
|
-
<tr>
|
89
|
+
<tr>
|
90
90
|
{
|
91
91
|
columns
|
92
92
|
.filter(({ type }) => type === TYPES.ENTITY)
|
93
|
-
.map(({ label }) => <th>{label}</th>)
|
93
|
+
.map(({ label }) => [<th>{label}</th>, <th>{label}</th>, <th>{label}</th>])
|
94
94
|
}
|
95
95
|
</tr>
|
96
96
|
</thead>
|
package/src/test.js
CHANGED
@@ -4,38 +4,65 @@ const Test = (props) => {
|
|
4
4
|
|
5
5
|
return (
|
6
6
|
|
7
|
+
<div>
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
<
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
<td>3</td>
|
30
|
-
<td>4</td>
|
31
|
-
<td>5</td>
|
32
|
-
<td>6</td>
|
33
|
-
<td>7</td>
|
34
|
-
<td>8</td>
|
35
|
-
</tr>
|
36
|
-
</tbody>
|
37
|
-
</table>
|
9
|
+
<table>
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th rowspan="2" colspan="1"><div class="checkbox"><input type="checkbox" value=""/><span class="checkmark"></span><label></label></div></th>
|
13
|
+
<th rowspan="2" colspan="1"><span>Estado</span></th>
|
14
|
+
<th rowspan="2" colspan="1"><span>Fecha de Entrada</span></th>
|
15
|
+
<th rowspan="2" colspan="1"><span>Circuito</span></th>
|
16
|
+
<th rowspan="2" colspan="1"><span>Clase de Muestra</span></th>
|
17
|
+
<th rowspan="2" colspan="3"><span>Referencia</span></th>
|
18
|
+
<th rowspan="2" colspan="1"></th>
|
19
|
+
<th></th>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<th>Referencia</th>
|
23
|
+
<th>Referencia</th>
|
24
|
+
<th>Referencia</th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
38
30
|
|
31
|
+
<table border="1">
|
32
|
+
<thead>
|
33
|
+
<tr>
|
34
|
+
<th rowSpan={2}>Uno</th>
|
35
|
+
<th rowSpan={2}>Dos</th>
|
36
|
+
<th rowSpan={2}>Tres</th>
|
37
|
+
<th colspan="4">Cuatro</th>
|
38
|
+
<th rowSpan={2}>Ocho</th>
|
39
|
+
</tr>
|
40
|
+
|
41
|
+
<tr>
|
42
|
+
<th>a</th>
|
43
|
+
<th>b</th>
|
44
|
+
<th>c</th>
|
45
|
+
<th>d</th>
|
46
|
+
</tr>
|
47
|
+
|
48
|
+
</thead>
|
49
|
+
<tbody>
|
50
|
+
|
51
|
+
<tr>
|
52
|
+
<td>1</td>
|
53
|
+
<td>2</td>
|
54
|
+
<td>3</td>
|
55
|
+
<td>4</td>
|
56
|
+
<td>5</td>
|
57
|
+
<td>6</td>
|
58
|
+
<td>7</td>
|
59
|
+
<td>8</td>
|
60
|
+
</tr>
|
61
|
+
</tbody>
|
62
|
+
</table>
|
63
|
+
|
64
|
+
</div>
|
39
65
|
|
40
66
|
)
|
41
|
-
}
|
67
|
+
}
|
68
|
+
|