ywana-core8 0.0.114 → 0.0.118

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.114",
3
+ "version": "0.0.118",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -6,9 +6,6 @@ menu.table-page>header {
6
6
  padding-right: .5rem;
7
7
  }
8
8
 
9
- menu.table-page>main {
10
- }
11
-
12
9
  main.table-page {
13
10
  display: flex;
14
11
  flex-direction: column;
@@ -90,14 +90,12 @@ export const TablePage = (props) => {
90
90
  }
91
91
 
92
92
  function renderAside() {
93
- if (selected && form) {
93
+ if ((selected && form) ||(pageContext.checked.length > 0)) {
94
94
  const content = new Content(schema, form)
95
95
  return (
96
96
  <aside className="table-page">
97
- <Header icon="local_offer" title={selected.name || "Propiedades"}>
98
- <Icon icon="close" clickable action={closeAside} />
99
- </Header>
100
- <ContentEditor content={content} onChange={change} filter={editorFilter}/>
97
+ <TableRowEditor content={content} filter={editorFilter} onChange={change} onClose={closeAside} />
98
+ <TableSelector onClose={closeAside} />
101
99
  </aside>
102
100
  )
103
101
  }
@@ -127,6 +125,39 @@ export const TablePage = (props) => {
127
125
  )
128
126
  }
129
127
 
128
+ /**
129
+ * TableRowEditor
130
+ */
131
+ const TableRowEditor = (props) => {
132
+ const { name, content, filter, onChange, onClose } = props
133
+ return (
134
+ <div className="table-row-editor">
135
+ <Header icon="local_offer" title={name || "Propiedades"}>
136
+ <Icon icon="close" clickable action={onClose} />
137
+ </Header>
138
+ <main>
139
+ <ContentEditor content={content} onChange={onChange} filter={filter} />
140
+ </main>
141
+ </div>
142
+ )
143
+ }
144
+
145
+ /**
146
+ * Table Selector
147
+ */
148
+ const TableSelector = (props) => {
149
+ return (
150
+ <div className="table-selector">
151
+ <Header title="Selection">
152
+
153
+ </Header>
154
+ <main>
155
+ ...
156
+ </main>
157
+ </div>
158
+ )
159
+ }
160
+
130
161
  /**
131
162
  * Table Queries
132
163
  */
package/src/html/table.js CHANGED
@@ -77,7 +77,7 @@ export const DataTable = (props) => {
77
77
  const sort = sortDir[id] ? sortDir[id] : null
78
78
  return (
79
79
  <th>
80
- {id === "checked" ? <CheckBox onChange={checkAll}/> : <Text>{label}</Text>}
80
+ {id === "checked" ? <CheckBox onChange={checkAll} /> : <Text>{label}</Text>}
81
81
  {sortable ? <Icon icon="arrow_up" size="small" clickable /> : null}
82
82
  </th>
83
83
  )
@@ -115,7 +115,9 @@ const DataTableRow = (props) => {
115
115
  </tr>
116
116
  {row.info && isInfoOpen ? (
117
117
  <tr className="table-row-info">
118
- {isFunction(row.info) ? row.info() : row.info}
118
+ <td colSpan={columns.length + 1}>
119
+ {isFunction(row.info) ? row.info() : row.info}
120
+ </td>
119
121
  </tr>
120
122
  ) : null}
121
123
  </Fragment>