ywana-core8 0.0.619 → 0.0.622
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 +41 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +18 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +41 -38
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +41 -38
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.css +19 -2
- package/src/domain/CollectionPage.js +8 -3
- package/src/html/button.js +2 -1
package/package.json
CHANGED
@@ -25,12 +25,12 @@ menu.collection-page>main.collection-filters {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
menu.collection-page>.list {
|
28
|
-
overflow:auto;
|
28
|
+
overflow: auto;
|
29
29
|
}
|
30
30
|
|
31
31
|
menu.collection-page>main {
|
32
32
|
flex: 1;
|
33
|
-
overflow:auto;
|
33
|
+
overflow: auto;
|
34
34
|
}
|
35
35
|
|
36
36
|
menu.collection-page>footer>.search-box {
|
@@ -47,4 +47,21 @@ main.collection-page>.content-editor {
|
|
47
47
|
flex: 1;
|
48
48
|
}
|
49
49
|
|
50
|
+
main.collection-page.dock-to-right {
|
51
|
+
display: grid;
|
52
|
+
grid-template-areas: "header header" "main dock" "footer dock";
|
53
|
+
grid-template-columns: 1fr auto;
|
54
|
+
grid-template-rows: auto 1fr auto;
|
55
|
+
}
|
56
|
+
|
57
|
+
main.collection-page.dock-to-right>header {
|
58
|
+
grid-area: header;
|
59
|
+
}
|
60
|
+
|
61
|
+
main.collection-page.dock-to-right>main {
|
62
|
+
grid-area: main;
|
63
|
+
}
|
50
64
|
|
65
|
+
main.collection-page.dock-to-right>article {
|
66
|
+
grid-area: dock;
|
67
|
+
}
|
@@ -24,6 +24,7 @@ export const CollectionPage = (props) => {
|
|
24
24
|
autosave = false, delay = 1000,
|
25
25
|
groupBy, levels, sorter,
|
26
26
|
editor,
|
27
|
+
footer,
|
27
28
|
children
|
28
29
|
} = props
|
29
30
|
|
@@ -88,6 +89,9 @@ export const CollectionPage = (props) => {
|
|
88
89
|
<CollectionEditor icon={icon} schema={schema} layout={editor} autosave={autosave} delay={delay} canDelete={canDelete} canEdit={canEdit} onReload={reloadSelection} />
|
89
90
|
{children ? <article>{children}</article> : null}
|
90
91
|
</main>
|
92
|
+
<footer>
|
93
|
+
{footer}
|
94
|
+
</footer>
|
91
95
|
</Fragment>
|
92
96
|
)
|
93
97
|
}
|
@@ -235,11 +239,12 @@ export const CollectionTree = (props) => {
|
|
235
239
|
let node = nodes.find(n => n.name === field[by])
|
236
240
|
if (!node) {
|
237
241
|
let name = field[by]
|
242
|
+
let title = field[by]
|
238
243
|
if (options) {
|
239
244
|
const opt = options.find(option => option.value === field[by])
|
240
|
-
if (opt)
|
245
|
+
if (opt) title = opt.label
|
241
246
|
}
|
242
|
-
node = { name, items: [], field: by }
|
247
|
+
node = { name, items: [], field: by, title }
|
243
248
|
nodes.push(node)
|
244
249
|
}
|
245
250
|
node.items.push(field)
|
@@ -256,7 +261,7 @@ export const CollectionTree = (props) => {
|
|
256
261
|
|
257
262
|
function renderNodes(nodes) {
|
258
263
|
return nodes.map(node => {
|
259
|
-
const title = typeof node.name === 'boolean' ? `${node.field} = ${node.name}` : node.
|
264
|
+
const title = typeof node.name === 'boolean' ? `${node.field} = ${node.name}` : node.title
|
260
265
|
return (
|
261
266
|
<TreeNode key={node.name} icon={null} label={title} open={true}>
|
262
267
|
{node.nodes ? renderNodes(node.nodes) : node.items.map(item => {
|
package/src/html/button.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { Icon } from './icon'
|
3
|
+
import { Text } from './text'
|
3
4
|
import './button.css'
|
4
5
|
|
5
6
|
/**
|
@@ -20,7 +21,7 @@ export const Button = ({ label, icon, action, disabled = false, outlined, raised
|
|
20
21
|
return (
|
21
22
|
<button className={`btn ${style}`} onClick={click}>
|
22
23
|
{ icon ? <Icon icon={icon} size="small" clickable action={click} /> : null }
|
23
|
-
<
|
24
|
+
<Text>{ label }</Text>
|
24
25
|
</button>
|
25
26
|
)
|
26
27
|
}
|