ywana-core8 0.0.491 → 0.0.494
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 +44 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +15 -3
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +44 -19
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +44 -19
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.css +2 -1
- package/src/html/table.test.js +2 -2
- package/src/site/console.js +16 -0
- package/src/site/site.css +11 -1
- package/src/site/site.js +9 -5
- package/src/site/site.test.js +3 -0
- package/src/site/view.css +2 -1
package/package.json
CHANGED
package/src/html/table.css
CHANGED
package/src/html/table.test.js
CHANGED
@@ -49,8 +49,8 @@ export const TableTest = (prop) => {
|
|
49
49
|
}
|
50
50
|
|
51
51
|
return (
|
52
|
-
|
52
|
+
<div style={{ maxHeight: "20rem", overflow: "hidden", border: "solid 1px red", margin: "2rem" }}>
|
53
53
|
<DataTable {...table} onRowSelection={select} onCheckAll={checkAll}/>
|
54
|
-
|
54
|
+
</div>
|
55
55
|
)
|
56
56
|
}
|
package/src/site/site.css
CHANGED
@@ -115,7 +115,17 @@
|
|
115
115
|
grid-area: footer;
|
116
116
|
min-height: 20rem;
|
117
117
|
background-color: rgb(222, 222, 222);
|
118
|
-
color: #
|
118
|
+
color: #000;
|
119
|
+
}
|
120
|
+
|
121
|
+
.site6>.site-console>main {
|
122
|
+
border: solid 5px red;
|
123
|
+
overflow: scroll;
|
124
|
+
max-height: 40vh;
|
125
|
+
}
|
126
|
+
|
127
|
+
.site6>.site-console>main>div {
|
128
|
+
padding: 1rem;
|
119
129
|
}
|
120
130
|
|
121
131
|
.site6>.site-preview {
|
package/src/site/site.js
CHANGED
@@ -9,20 +9,22 @@ import './site.css'
|
|
9
9
|
|
10
10
|
import { ReactNotifications, Store } from 'react-notifications-component'
|
11
11
|
import 'react-notifications-component/dist/theme.css'
|
12
|
+
import { Console } from './console'
|
12
13
|
|
13
14
|
|
14
15
|
|
15
16
|
/**
|
16
17
|
* Site Provider
|
17
18
|
*/
|
18
|
-
export const SiteProvider = ({ children, siteLang, siteDictionary
|
19
|
+
export const SiteProvider = ({ children, siteLang, siteDictionary }) => {
|
19
20
|
|
20
21
|
const [lang, setLang] = useState(siteLang)
|
21
22
|
const [dictionary, setDictionary] = useState(siteDictionary)
|
22
23
|
const [sideNav, setSideNav] = useState('max')
|
23
24
|
const [showNav, setShowNav] = useState(false)
|
24
25
|
const [info, setInfo] = useState(null)
|
25
|
-
const [
|
26
|
+
const [showConsole, setShowConsole] = useState(true)
|
27
|
+
const [console] = useState(new Console())
|
26
28
|
const [page, setPage] = useState()
|
27
29
|
const [dialog, setDialog] = useState()
|
28
30
|
const [promptDialog, setPromptDialog] = useState()
|
@@ -58,8 +60,10 @@ export const SiteProvider = ({ children, siteLang, siteDictionary, showConsole }
|
|
58
60
|
openInfo: (info) => { setInfo(info) },
|
59
61
|
closeInfo: () => { setInfo(null) },
|
60
62
|
|
63
|
+
showConsole,
|
61
64
|
console,
|
62
|
-
toggleConsole: () => {
|
65
|
+
toggleConsole: () => { setShowConsole(!showConsole) },
|
66
|
+
|
63
67
|
|
64
68
|
breadcrumb,
|
65
69
|
setBreadcrumb,
|
@@ -303,7 +307,7 @@ const SitePreview = () => {
|
|
303
307
|
*/
|
304
308
|
const SiteConsole = () => {
|
305
309
|
const context = useContext(SiteContext)
|
306
|
-
return context.
|
310
|
+
return context.showConsole ? (
|
307
311
|
<footer className="site-console" >
|
308
312
|
<Header>
|
309
313
|
<Tabs>
|
@@ -311,7 +315,7 @@ const SiteConsole = () => {
|
|
311
315
|
</Tabs>
|
312
316
|
</Header>
|
313
317
|
<main>
|
314
|
-
|
318
|
+
{context.console.lines.map(line => <div>{line}</div>)}
|
315
319
|
</main>
|
316
320
|
</footer>
|
317
321
|
) : ''
|
package/src/site/site.test.js
CHANGED
package/src/site/view.css
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
display: flex;
|
11
11
|
align-items: center;
|
12
12
|
background-color: rgb(200,200,200);
|
13
|
-
height: 2rem;
|
13
|
+
min-height: 2rem;
|
14
14
|
padding-left: 1rem;
|
15
15
|
}
|
16
16
|
|
@@ -19,6 +19,7 @@
|
|
19
19
|
}
|
20
20
|
|
21
21
|
.view>nav {
|
22
|
+
min-height: 2rem;
|
22
23
|
display: flex;
|
23
24
|
flex-direction: ;
|
24
25
|
align-items: center;
|