ywana-core8 0.0.268 → 0.0.271
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 +13 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +13 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +13 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/css/html.css +8 -0
- package/src/html/table.js +6 -6
- package/src/site/site.js +1 -1
package/package.json
CHANGED
package/src/css/html.css
CHANGED
@@ -34,4 +34,12 @@ body {
|
|
34
34
|
|
35
35
|
td.actions {
|
36
36
|
display: flex;
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* until https://github.com/facebook/create-react-app/issues/11771
|
41
|
+
* gets fixed, let's hide the problem and not address it
|
42
|
+
*/
|
43
|
+
body > iframe[style*="2147483647"]:not([id="webpack-dev-server-client-overlay"]) {
|
44
|
+
display: none;
|
37
45
|
}
|
package/src/html/table.js
CHANGED
@@ -13,7 +13,7 @@ const isFunction = value => value && (Object.prototype.toString.call(value) ===
|
|
13
13
|
*/
|
14
14
|
export const DataTable = (props) => {
|
15
15
|
|
16
|
-
const { columns = [], rows = [], onRowSelection, onSort, onCheckAll, editable, outlined } = props
|
16
|
+
const { columns = [], rows = [], onRowSelection, onSort, onCheckAll, editable, outlined, expanded = false } = props
|
17
17
|
const [sortDir, setSortDir] = useState({})
|
18
18
|
|
19
19
|
function multiSort(array, sortObject = {}) {
|
@@ -103,7 +103,7 @@ export const DataTable = (props) => {
|
|
103
103
|
<tbody>
|
104
104
|
{
|
105
105
|
multiSort(rows, sortDir).map(row => (
|
106
|
-
<DataTableRow key={row.id} row={row} columns={columns} onSelect={select} onDrop={sort} editable={editable} />
|
106
|
+
<DataTableRow key={row.id} row={row} columns={columns} onSelect={select} onDrop={sort} editable={editable} expanded={expanded} />
|
107
107
|
))
|
108
108
|
}
|
109
109
|
</tbody>
|
@@ -117,14 +117,14 @@ export const DataTable = (props) => {
|
|
117
117
|
*/
|
118
118
|
const DataTableRow = (props) => {
|
119
119
|
|
120
|
-
const { row, columns = [], onSelect, editable } = props
|
121
|
-
|
122
|
-
const [isInfoOpen, toggleInfo] = useState(
|
120
|
+
const { row, columns = [], onSelect, editable, expanded = false } = props
|
121
|
+
const { className} = row
|
122
|
+
const [isInfoOpen, toggleInfo] = useState(expanded)
|
123
123
|
const infoIcon = isInfoOpen ? 'expand_more' : 'expand_less'
|
124
124
|
|
125
125
|
return (
|
126
126
|
<Fragment>
|
127
|
-
<tr onClick={ev => onSelect(row, ev)}>
|
127
|
+
<tr className={className} onClick={ev => onSelect(row, ev)}>
|
128
128
|
{columns.map((column, index) => <DataTableCell key={`${column.id}_${index}`} row={row} column={column} cell={row[column.id]} editable={editable} />)}
|
129
129
|
{row.info ? <td><Icon icon={infoIcon} clickable action={() => toggleInfo(!isInfoOpen)} /></td> : <td></td>}
|
130
130
|
</tr>
|
package/src/site/site.js
CHANGED
@@ -93,7 +93,7 @@ export const Site = ({ icon, logo, title, toolbar, children, init, min, lang, di
|
|
93
93
|
return (
|
94
94
|
<SiteProvider siteLang={lang} siteDictionary={dictionary}>
|
95
95
|
<div className="site6">
|
96
|
-
<SiteHeader icon={icon} />
|
96
|
+
<SiteHeader icon={icon} title={title}/>
|
97
97
|
<SiteToolBar >{toolbar}</SiteToolBar>
|
98
98
|
<SiteMenu logo={logo} title={title} min={min} >{children}</SiteMenu>
|
99
99
|
<SitePage init={init}>
|