ywana-core8 0.0.319 → 0.0.322
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 +15 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +18 -4
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +15 -26
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +15 -26
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.css +16 -3
- package/src/domain/CollectionPage.js +2 -1
- package/src/domain/TablePage.css +2 -2
- package/src/domain/TablePage.js +1 -7
package/package.json
CHANGED
@@ -20,8 +20,13 @@ menu.collection-page>main {
|
|
20
20
|
overflow:auto;
|
21
21
|
}
|
22
22
|
|
23
|
-
.collection-page
|
24
|
-
|
23
|
+
main.collection-page {
|
24
|
+
display: flex;
|
25
|
+
flex-direction: column;
|
26
|
+
}
|
27
|
+
|
28
|
+
.collection-page .content-editor {
|
29
|
+
flex: 1;
|
25
30
|
}
|
26
31
|
|
27
32
|
.collection-page .content-editor>section {
|
@@ -35,4 +40,12 @@ menu.collection-page>main {
|
|
35
40
|
border-width: 0 1px 1px 1px;
|
36
41
|
background-color: var(--paper-color);
|
37
42
|
padding: 0 1rem 1rem 1rem;
|
38
|
-
}
|
43
|
+
}
|
44
|
+
|
45
|
+
.collection-page > article {
|
46
|
+
padding: 1rem;
|
47
|
+
display: flex;
|
48
|
+
max-height: 50%;
|
49
|
+
overflow: hidden;
|
50
|
+
}
|
51
|
+
|
@@ -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
|
)
|
package/src/domain/TablePage.css
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -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>
|