ywana-core8 0.0.527 → 0.0.530

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.527",
3
+ "version": "0.0.530",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -17,7 +17,7 @@ export const CollectionPage = (props) => {
17
17
  const site = useContext(SiteContext)
18
18
  const {
19
19
  id = "collection",
20
- icon, title, name = "Collection 1",
20
+ icon, title, name = "Collection 1", className,
21
21
  schema, url, field, host, page, fetching= false,
22
22
  actions = [], onSelect,
23
23
  canFilter = false, canAdd = false, canDelete = false, canEdit = false,
@@ -58,19 +58,19 @@ export const CollectionPage = (props) => {
58
58
 
59
59
  return (
60
60
  <Fragment>
61
- <Header className="collection-page" title={<Text>{title}</Text>}>
61
+ <Header className={`collection-page ${className}`} title={<Text>{title}</Text>}>
62
62
  { canAdd ? <Button icon="add" label="Add" action={add} /> : false }
63
63
  &nbsp;
64
64
  <Button icon="refresh" label="Reload" action={reload} />
65
65
  {renderActions()}
66
66
  </Header>
67
- <menu className="collection-page">
67
+ <menu className={`collection-page ${className}`}>
68
68
  <Header title={<Text>Lista de {name}</Text>} >
69
69
  </Header>
70
70
  {canFilter ? <CollectionFilters schema={schema}/> : null }
71
71
  {levels ? <CollectionTree icon={icon} levels={levels} onSelect={onSelect} sorter={sorter}/> : <CollectionList groupBy={groupBy} onSelect={onSelect}/>}
72
72
  </menu>
73
- <main key={id} className="collection-page">
73
+ <main key={id} className={`collection-page ${className}`}>
74
74
  <CollectionEditor icon={icon} schema={schema} layout={editor} autosave={autosave} delay={delay} />
75
75
  {children ? <article>{children}</article> : null}
76
76
  </main>
@@ -181,6 +181,8 @@ export const FieldEditor = ({ field, onChange, content, outlined = false }) => {
181
181
  return null
182
182
  } else {
183
183
  switch (type) {
184
+ case TYPES.IMAGE:
185
+ return <div className='photo'><img url={value} /></div>
184
186
  case TYPES.ENTITY:
185
187
  return <EntityEditor field={field} value={value1} onChange={change} />
186
188
  case TYPES.STRING: