ywana-core8 0.0.204 → 0.0.205

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.204",
3
+ "version": "0.0.205",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
package/src/html/table.js CHANGED
@@ -76,9 +76,9 @@ 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 ? 3 : 1
79
+ const [rowspan, colspan] = type === TYPES.ENTITY ? [1, 3] : [2, 1]
80
80
  return (
81
- <th rowSpan={2} colSpan={colspan}>
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>
@@ -90,7 +90,7 @@ export const DataTable = (props) => {
90
90
  {
91
91
  columns
92
92
  .filter(({ type }) => type === TYPES.ENTITY)
93
- .map(({ label }) => [<th>{label}</th>,<th>{label}</th>,<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
- <table border="1">
9
- <thead>
10
- <tr>
11
- <th rowSpan={2}>Uno</th>
12
- <th rowSpan={2}>Dos</th>
13
- <th rowSpan={2}>Tres</th>
14
- <th colspan="4">Cuatro</th>
15
- <th rowSpan={2}>Ocho</th>
16
- </tr>
17
- <tr>
18
- <th>a</th>
19
- <th>b</th>
20
- <th>c</th>
21
- <th>d</th>
22
- </tr>
23
- </thead>
24
- <tbody>
25
-
26
- <tr>
27
- <td>1</td>
28
- <td>2</td>
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
+