ywana-core8 0.0.68 → 0.0.72

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.68",
3
+ "version": "0.0.72",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -28,6 +28,7 @@
28
28
  "dependencies": {
29
29
  "deep-equal": "^2.0.5",
30
30
  "material-design-icons-iconfont": "^6.1.1",
31
+ "react-datepicker": "^4.6.0",
31
32
  "resumablejs": "^1.1.0"
32
33
  }
33
34
  }
@@ -25,7 +25,7 @@ export const ContentEditor = ({ content, filter, onChange }) => {
25
25
  {fields
26
26
  .filter(field => field.id !== 'id')
27
27
  .filter(field => filter ? filter(field, content) : true)
28
- .map((field) => <FieldEditor key={field.id} field={field} onChange={change} />)}
28
+ .map((field) => <FieldEditor key={field.id} field={field} onChange={change} outlined={true}/>)}
29
29
  </main>
30
30
  </section>
31
31
  )
@@ -143,7 +143,7 @@ export const TreededContentEditor = ({ content, filter, onChange }) => {
143
143
  </header>
144
144
  <Tree>
145
145
  {nodes.map((node, index) => (
146
- <TreeNode icon="folder" label={node.label} actions={[<Icon small icon="add" clickable action={add} />]}>
146
+ <TreeNode icon="folder" label={node.label} actions={[<Icon size="small" icon="add" clickable action={add} />]}>
147
147
  {
148
148
  value[node.id] ? value[node.id].map((field, index) => <TreeItem icon={field.icon || "description"} label={field.name || field.label} onSelect={() => select(index, field, node)} />) : null
149
149
  }
@@ -362,7 +362,7 @@ export const CollectionEditor = ({ field, value = [], onChange }) => {
362
362
  ...item,
363
363
  id: index,
364
364
  actions: [
365
- <Icon icon='delete' clickable action={() => remove(index)} small />
365
+ <Icon icon='delete' clickable action={() => remove(index)} size="small" />
366
366
  ]
367
367
  }))
368
368
 
@@ -4,12 +4,19 @@
4
4
  export const TYPES = {
5
5
  STRING: 'String',
6
6
  NUMBER: 'Number',
7
- DATE: 'Date',
8
7
  BOOLEAN: 'Boolean',
9
8
  ARRAY: 'Array',
10
9
  ENTITY: 'Object',
11
10
  FUNCTION: 'Function',
12
- EMAIL: 'String'
11
+ }
12
+
13
+ /**
14
+ * FORMATS
15
+ */
16
+ export const FORMATS = {
17
+ NONE: '',
18
+ DATE: 'date',
19
+ EMAIL: 'email',
13
20
  }
14
21
 
15
22
  /**
@@ -1,4 +1,4 @@
1
- export { TYPES, Content } from './ContentType'
1
+ export { TYPES, FORMATS, Content } from './ContentType'
2
2
  export { ContentForm } from './ContentForm'
3
3
  export { ContentEditor, TabbedContentEditor, CollectionEditor, TreededContentEditor, FieldEditor, ListEditor } from './ContentEditor'
4
4
  export { CreateContentDialog } from './CreateContentDialog'
package/src/html/list.css CHANGED
@@ -13,7 +13,6 @@
13
13
  }
14
14
 
15
15
  .list > ul {
16
- flex: 1;
17
16
  overflow: auto;
18
17
  list-style: none;
19
18
  margin: 0;
@@ -24,7 +23,7 @@
24
23
  }
25
24
 
26
25
  .list > ul li {
27
- flex: 1;
26
+ flex: 0;
28
27
  overflow: hidden;
29
28
  min-height: 3rem;
30
29
  padding: .3rem 0.5rem;
package/src/html/tab.js CHANGED
@@ -22,7 +22,7 @@ export const Tabs = (props) => {
22
22
  })
23
23
 
24
24
  return (
25
- <div class="tabs">
25
+ <div className="tabs">
26
26
  {tabs}
27
27
  <div className="tab-filler" />
28
28
  </div>
package/src/html/tree.css CHANGED
@@ -10,7 +10,6 @@
10
10
 
11
11
  .tree-item{
12
12
  margin: 0;
13
- padding: .5rem 0;
14
13
  display: flex;
15
14
  align-items: center;
16
15
  font: 1rem;
@@ -1,6 +1,7 @@
1
1
  .avatar {
2
- border-radius: 100%;
3
2
  background-color: rgba(200,200,200,.1);
3
+ border: solid 3px transparent;
4
+ border-radius: 100%;
4
5
  overflow: hidden;
5
6
  }
6
7
 
@@ -6,7 +6,7 @@ import './Avatar.css'
6
6
  */
7
7
  export const Avatar = (props) => {
8
8
 
9
- const { id, name, src, size="small", clickable=false, action} = props
9
+ const { id, name, className, src, size="small", clickable=false, action} = props
10
10
 
11
11
  function click() {
12
12
  if (clickable) {
@@ -14,10 +14,10 @@ export const Avatar = (props) => {
14
14
  }
15
15
  }
16
16
 
17
- const style = clickable ? 'clickable' : ''
18
- const className= `avatar ${size} ${style}`
17
+ const clickableStyle = clickable ? 'clickable' : ''
18
+ const style = `avatar ${size} ${clickableStyle} ${className}`
19
19
  return (
20
- <div className={className} onClick={click}>
20
+ <div className={style} onClick={click}>
21
21
  { src ? <img src={src} /> : <span>{name}</span>}
22
22
  </div>
23
23
  )