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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.608",
3
+ "version": "0.0.611",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -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>{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
  &nbsp;
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 label={label} value={value} /> : <ArrayViewer label={label} item={item} value={value} />
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 header"
7
- "nav nav nav"
8
- "menu main aside"
9
- "footer footer footer";
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 { MenuIcon, MenuItem, Icon } from '../../html'
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
- const { files = [], onSelect } = props
9
+
10
+ const { title, files = [] } = props
11
+
10
12
  return (
11
13
  <div className="file-explorer">
12
- <header>header</header>
13
- <nav>nav</nav>
14
- <menu>menu</menu>
14
+ <header>
15
+ {title}
16
+ <nav>
17
+ <Icon icon="info" />
18
+ </nav>
19
+ </header>
15
20
  <main>
16
- <FileIconsView files={files} />
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 FileIconsView = (props) => {
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
- }
@@ -71,7 +71,7 @@ export const Planner = ({ title, events = [], lanes = [], navigation = true, onS
71
71
  if (element) element.scrollIntoView({
72
72
  behavior: 'smooth',
73
73
  block: 'start',
74
- inline: 'start'
74
+ inline: 'start',
75
75
  })
76
76
  }
77
77
 
@@ -30,7 +30,7 @@
30
30
  flex-direction: column;
31
31
  justify-content: center;
32
32
  align-items: center;
33
- overflow: auto;
33
+ overflow: hidden;
34
34
  }
35
35
 
36
36
  .viewer>main>.resizer {
@@ -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={{ icon: 'close', clickable: true, action: onClose }} title={headerTitle} >
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>