ywana-core8 0.0.319 → 0.0.320

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.319",
3
+ "version": "0.0.320",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -20,8 +20,15 @@ menu.collection-page>main {
20
20
  overflow:auto;
21
21
  }
22
22
 
23
- .collection-page .content-editor .selected {
24
- /*background-color: #FBFBFB !important;*/
23
+ main.collection-page {
24
+ display: flex;
25
+ flex-direction: column;
26
+ }
27
+
28
+ main.collection-page > article {
29
+ padding: 1rem;
30
+ display: flex;
31
+ resize: vertical;
25
32
  }
26
33
 
27
34
  .collection-page .content-editor>section {
@@ -35,4 +42,6 @@ menu.collection-page>main {
35
42
  border-width: 0 1px 1px 1px;
36
43
  background-color: var(--paper-color);
37
44
  padding: 0 1rem 1rem 1rem;
38
- }
45
+ }
46
+
47
+
@@ -15,7 +15,7 @@ import "./CollectionPage.css"
15
15
  export const CollectionPage = (props) => {
16
16
 
17
17
  const site = useContext(SiteContext)
18
- const { id = "collection", icon, title, name = "Collection 1", schema, url, host, groupBy, editor, field, autosave = false, delay = 1000, actions, levels, onSelect } = props
18
+ const { id = "collection", icon, title, name = "Collection 1", schema, url, host, groupBy, editor, field, autosave = false, delay = 1000, actions, levels, onSelect, children } = props
19
19
  const [pageContext, setPageContext] = useContext(PageContext)
20
20
  const context = CollectionContext(url, field, host)
21
21
 
@@ -59,6 +59,7 @@ export const CollectionPage = (props) => {
59
59
  </menu>
60
60
  <main key={id} className="collection-page">
61
61
  <CollectionEditor icon={icon} schema={schema} layout={editor} autosave={autosave} delay={delay} />
62
+ {children ? <article>{children}</article> : null}
62
63
  </main>
63
64
  </Fragment>
64
65
  )
@@ -18,7 +18,6 @@ main.table-page>header {
18
18
 
19
19
  main.table-page > article {
20
20
  padding: 1rem;
21
- height: 50%;
22
21
  display: flex;
23
22
  resize: vertical;
24
23
  }
@@ -34,7 +34,6 @@ export const TablePage = (props) => {
34
34
  const { selected } = pageContext
35
35
  const timer = useRef(null)
36
36
  const [form, setForm] = useState(selected)
37
- const [showChildren, setShowChildren] = useState(true)
38
37
 
39
38
  useEffect(() => {
40
39
  setForm(selected)
@@ -128,14 +127,9 @@ export const TablePage = (props) => {
128
127
  })
129
128
  }
130
129
 
131
- function toggleChildren() {
132
- setShowChildren(!showChildren)
133
- }
134
-
135
130
  return (
136
131
  <Fragment>
137
132
  <Header className="table-page" title={<Text>{title}</Text>}>
138
- {children ? <Icon icon="info" clickable action={toggleChildren} /> : null}
139
133
  {canAdd ? <Button icon="add" label="Añadir" action={add} raised /> : null}
140
134
  {dev ? (
141
135
  <MenuIcon align="alignRight">
@@ -151,8 +145,8 @@ export const TablePage = (props) => {
151
145
  </menu>
152
146
  ) : null}
153
147
  <main key={id} className="table-page">
154
- {children && showChildren ? <article>{children}</article> : null}
155
148
  <TableEditor icon={icon} title={name} schema={schema} delay={delay} editable={editable} groupBy={groupBy} filter={tableFilter} actions={tableActions} canDelete={canDelete} />
149
+ {children ? <article>{children}</article> : null}
156
150
  </main>
157
151
  {renderAside()}
158
152
  </Fragment>