ywana-core8 0.0.608 → 0.0.611
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 +24 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +5 -11
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +24 -27
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +24 -27
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +3 -1
- package/src/domain/ContentViewer.js +1 -1
- package/src/widgets/explorer/Explorer.css +4 -10
- package/src/widgets/explorer/Explorer.js +13 -14
- package/src/widgets/explorer/Explorer.test.js +1 -10
- package/src/widgets/planner/Planner.js +1 -1
- package/src/widgets/viewer/Viewer.css +1 -1
- package/src/widgets/viewer/Viewer.js +2 -1
package/package.json
CHANGED
@@ -66,9 +66,11 @@ export const CollectionPage = (props) => {
|
|
66
66
|
})
|
67
67
|
}
|
68
68
|
|
69
|
+
const total = all ? all.length : 0
|
70
|
+
const title2 = <><span className="size">{total}</span> {title}</>
|
69
71
|
return (
|
70
72
|
<Fragment>
|
71
|
-
<Header className={`collection-page ${className}`} title={<Text>{
|
73
|
+
<Header className={`collection-page ${className}`} title={<Text>{title2}</Text>}>
|
72
74
|
{canAdd ? <Button icon="add" label="Add" action={add} /> : false}
|
73
75
|
|
74
76
|
<Button icon="refresh" label="Reload" action={reload} />
|
@@ -60,7 +60,7 @@ const FieldViewer = (props) => {
|
|
60
60
|
case TYPES.ENTITY:
|
61
61
|
return <EntityViewer field={field} value={value} />
|
62
62
|
case TYPES.ARRAY:
|
63
|
-
return item === TYPES.STRING ? <ListViewer
|
63
|
+
return item === TYPES.STRING ? <ListViewer field={field} value={value} /> : <ArrayViewer label={label} item={item} value={value} />
|
64
64
|
default:
|
65
65
|
return <div>{label}</div>
|
66
66
|
}
|
@@ -3,19 +3,13 @@
|
|
3
3
|
height: 100%;
|
4
4
|
display: grid;
|
5
5
|
grid-template-areas:
|
6
|
-
"header header
|
7
|
-
"
|
8
|
-
|
9
|
-
|
10
|
-
grid-template-columns: auto 1fr auto;
|
11
|
-
grid-template-rows: auto auto 1fr auto;
|
6
|
+
"header header"
|
7
|
+
"main aside";
|
8
|
+
grid-template-columns: 1fr auto;
|
9
|
+
grid-template-rows: auto 1fr;
|
12
10
|
padding: 2px;
|
13
11
|
}
|
14
12
|
|
15
|
-
.file-explorer>* {
|
16
|
-
margin: 2px;
|
17
|
-
}
|
18
|
-
|
19
13
|
.file-explorer>header {
|
20
14
|
grid-area: header;
|
21
15
|
}
|
@@ -1,22 +1,26 @@
|
|
1
1
|
import React, {useState} from 'react'
|
2
|
-
import {
|
2
|
+
import { Icon } from '../../html'
|
3
3
|
import './Explorer.css'
|
4
4
|
|
5
5
|
/**
|
6
6
|
* File Explorer
|
7
7
|
*/
|
8
8
|
export const FileExplorer = (props) => {
|
9
|
-
|
9
|
+
|
10
|
+
const { title, files = [] } = props
|
11
|
+
|
10
12
|
return (
|
11
13
|
<div className="file-explorer">
|
12
|
-
<header>
|
13
|
-
|
14
|
-
|
14
|
+
<header>
|
15
|
+
{title}
|
16
|
+
<nav>
|
17
|
+
<Icon icon="info" />
|
18
|
+
</nav>
|
19
|
+
</header>
|
15
20
|
<main>
|
16
|
-
<
|
21
|
+
<FilesGrid files={files} />
|
17
22
|
</main>
|
18
23
|
<aside></aside>
|
19
|
-
<footer>footer</footer>
|
20
24
|
</div>
|
21
25
|
)
|
22
26
|
}
|
@@ -24,7 +28,7 @@ export const FileExplorer = (props) => {
|
|
24
28
|
/**
|
25
29
|
* File Icons View
|
26
30
|
*/
|
27
|
-
export const
|
31
|
+
export const FilesGrid = (props) => {
|
28
32
|
const { files = [], onSelect } = props
|
29
33
|
const [selected, setSelected] = useState()
|
30
34
|
|
@@ -59,16 +63,11 @@ const FileIcon = (props) => {
|
|
59
63
|
const style = selected ? 'file-icon--selected' :''
|
60
64
|
return (
|
61
65
|
<div className={`file-icon ${style}`} onClick={select}>
|
62
|
-
<header>
|
63
|
-
{icon? <Icon size="small" icon={icon} /> : null }
|
64
|
-
<MenuIcon size="small">
|
65
|
-
{actions.map(action => <MenuItem icon={action.icon} label={action.label} onSelect={action.execute} />)}
|
66
|
-
</MenuIcon>
|
67
|
-
</header>
|
68
66
|
<picture>
|
69
67
|
<img src={src}></img>
|
70
68
|
</picture>
|
71
69
|
<main>
|
70
|
+
{icon? <Icon size="small" icon={icon} /> : null }
|
72
71
|
<label>{label}</label>
|
73
72
|
</main>
|
74
73
|
{ footer ? <footer>{footer}</footer> : null }
|
@@ -20,16 +20,7 @@ const files = [
|
|
20
20
|
const FileExplorerTest = (props) => {
|
21
21
|
return (
|
22
22
|
<div style={{ padding: "1rem", flex: "1", height: "100%" }}>
|
23
|
-
<FileExplorer files={files} />
|
23
|
+
<FileExplorer title="File Explorer Test" files={files} />
|
24
24
|
</div>
|
25
25
|
)
|
26
26
|
}
|
27
|
-
|
28
|
-
|
29
|
-
const FileIconViewTest = (props) => {
|
30
|
-
return (
|
31
|
-
<div style={{ padding: "1rem", flex: "1", height: "100%" }}>
|
32
|
-
<FileIconsView files={files} />
|
33
|
-
</div>
|
34
|
-
)
|
35
|
-
}
|
@@ -16,7 +16,8 @@ export const Viewer = ({ title, src, info, actions = [], tools = false, onClose
|
|
16
16
|
const headerTitle = <Text use="headline6">{title}</Text>
|
17
17
|
return (
|
18
18
|
<div className="viewer">
|
19
|
-
<Header icon=
|
19
|
+
<Header icon="view" title={headerTitle} >
|
20
|
+
{onClose ? <Icon icon="close" clickable action={onClose} /> : null}
|
20
21
|
{showDetails ? '' : <Icon icon="info" clickable action={toggleDetails} />}
|
21
22
|
{actions}
|
22
23
|
</Header>
|