ywana-core8 0.0.262 → 0.0.265
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/__reactpreview__/Wrapper.tsx +1 -1
- package/dist/index.cjs +28 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +15 -1
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +28 -15
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +32 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +0 -3
- package/src/domain/TablePage.js +1 -1
- package/src/domain/index.js +1 -1
- package/src/site/site.css +15 -1
- package/src/site/site.js +31 -7
- package/src/site/site.test.js +19 -0
- package/src/widgets/planner/Planner.js +1 -1
package/package.json
CHANGED
@@ -180,9 +180,6 @@ export const FieldEditor = ({ field, onChange, content, outlined = false }) => {
|
|
180
180
|
if (isHidden) {
|
181
181
|
return null
|
182
182
|
} else {
|
183
|
-
|
184
|
-
console.log("FieldEditor: ", label, value1)
|
185
|
-
|
186
183
|
switch (type) {
|
187
184
|
case TYPES.ENTITY:
|
188
185
|
return <EntityEditor field={field} value={value1} onChange={change} />
|
package/src/domain/TablePage.js
CHANGED
@@ -254,7 +254,7 @@ const TableFilters = (props) => {
|
|
254
254
|
/**
|
255
255
|
* Table Editor
|
256
256
|
*/
|
257
|
-
const TableEditor = (props) => {
|
257
|
+
export const TableEditor = (props) => {
|
258
258
|
|
259
259
|
const site = useContext(SiteContext)
|
260
260
|
const [pageContext, setPageContext] = useContext(PageContext)
|
package/src/domain/index.js
CHANGED
@@ -4,4 +4,4 @@ export { ContentEditor, TabbedContentEditor, CollectionEditor, TreededContentEdi
|
|
4
4
|
export { CreateContentDialog } from './CreateContentDialog'
|
5
5
|
export { EditContentDialog } from './EditContentDialog'
|
6
6
|
export { CollectionPage, CollectionContext } from './CollectionPage'
|
7
|
-
export { TablePage } from './TablePage'
|
7
|
+
export { TablePage, TableEditor } from './TablePage'
|
package/src/site/site.css
CHANGED
@@ -15,7 +15,6 @@
|
|
15
15
|
background-color: var(--site-header-bgcolor);
|
16
16
|
display: flex;
|
17
17
|
align-items: center;
|
18
|
-
width: var(--site-menu-width);
|
19
18
|
}
|
20
19
|
|
21
20
|
.site6>nav {
|
@@ -45,6 +44,21 @@
|
|
45
44
|
width: var(--site-menu-width);
|
46
45
|
}
|
47
46
|
|
47
|
+
.site6>menu.max {
|
48
|
+
width: 20rem;
|
49
|
+
}
|
50
|
+
|
51
|
+
.site6>menu>main>.site-menu-item {
|
52
|
+
width: 100%;
|
53
|
+
display: flex;
|
54
|
+
align-items: center;
|
55
|
+
}
|
56
|
+
|
57
|
+
.site6>menu.max>main>.site-menu-item:hover {
|
58
|
+
background-color: rgba(200,200,200,.2);
|
59
|
+
cursor: pointer;
|
60
|
+
}
|
61
|
+
|
48
62
|
.site6>menu>main {
|
49
63
|
flex: 1;
|
50
64
|
overflow-x: hidden;
|
package/src/site/site.js
CHANGED
@@ -4,7 +4,12 @@ import { Tabs, Tab } from '../html/tab'
|
|
4
4
|
import { Header } from '../html/header'
|
5
5
|
import { Page } from './page'
|
6
6
|
import { SiteContext } from './siteContext'
|
7
|
-
|
7
|
+
|
8
|
+
/*
|
9
|
+
import { NotificationManager } from 'react-notifications'
|
10
|
+
import { NotificationContainer } from 'react-notifications'
|
11
|
+
*/
|
12
|
+
|
8
13
|
import './site.css'
|
9
14
|
import 'react-notifications/lib/notifications.css';
|
10
15
|
|
@@ -69,8 +74,8 @@ export const SiteProvider = ({ children, siteLang, siteDictionary, showConsole }
|
|
69
74
|
|
70
75
|
confirm: (message) => window.confirm(message),
|
71
76
|
|
72
|
-
notify: ({title, body}) => {
|
73
|
-
NotificationManager.info(body, title)
|
77
|
+
notify: ({ title, body }) => {
|
78
|
+
//NotificationManager.info(body, title)
|
74
79
|
}
|
75
80
|
}
|
76
81
|
|
@@ -106,6 +111,9 @@ export const Site = ({ icon, logo, title, toolbar, children, init, min, lang, di
|
|
106
111
|
}
|
107
112
|
|
108
113
|
const SiteNotifications = () => {
|
114
|
+
return (
|
115
|
+
<div></div>
|
116
|
+
)
|
109
117
|
return (
|
110
118
|
<NotificationContainer />
|
111
119
|
)
|
@@ -151,17 +159,22 @@ const SiteAside = () => {
|
|
151
159
|
const SiteMenu = ({ logo, title, children, min }) => {
|
152
160
|
|
153
161
|
const context = useContext(SiteContext)
|
154
|
-
const { sideNav, showNav } = context
|
155
|
-
const toggleIcon = sideNav === 'max' ? 'chevron_left' : 'chevron_right'
|
162
|
+
const { sideNav, setSideNav, showNav } = context
|
156
163
|
|
157
164
|
useEffect(() => {
|
158
165
|
if (min) context.setSideNav('min')
|
159
166
|
}, [])
|
160
167
|
|
168
|
+
function toggle() {
|
169
|
+
const next = sideNav === 'max' ? 'min' : 'max'
|
170
|
+
setSideNav(next)
|
171
|
+
}
|
172
|
+
|
161
173
|
const goto = (id) => {
|
162
174
|
context.setShowNav(false)
|
163
175
|
context.goto(id)
|
164
176
|
}
|
177
|
+
|
165
178
|
const sections = children ?
|
166
179
|
Children.toArray(children).reduce((sections, page) => {
|
167
180
|
const section = page.props ? page.props.section : '...'
|
@@ -171,18 +184,29 @@ const SiteMenu = ({ logo, title, children, min }) => {
|
|
171
184
|
return sections
|
172
185
|
}, {}) : {}
|
173
186
|
|
187
|
+
|
188
|
+
const style = sideNav === 'max' ? 'max' : 'min'
|
189
|
+
const toggleIcon = sideNav === 'max' ? 'chevron_left' : 'chevron_right'
|
174
190
|
return (
|
175
|
-
<menu className={
|
191
|
+
<menu className={`${style} ${showNav ? 'show' : ''}`}>
|
176
192
|
<main >
|
177
193
|
{Object.keys(sections).map(title => (
|
178
194
|
<Fragment key={title}>
|
179
195
|
{sections[title].map(({ id, icon = 'info', title }) => {
|
180
|
-
return (
|
196
|
+
return (
|
197
|
+
<div className="site-menu-item" key={id} onClick={() => goto(id)}>
|
198
|
+
<Icon key={id} icon={icon} clickable checked={id === context.page} action={() => goto(id)} />
|
199
|
+
{ sideNav === 'max' ? <label>{title}</label> : null }
|
200
|
+
</div>
|
201
|
+
)
|
181
202
|
})}
|
182
203
|
<div className="section-divider" ></div>
|
183
204
|
</Fragment>
|
184
205
|
))}
|
185
206
|
</main>
|
207
|
+
<footer>
|
208
|
+
<Icon icon={toggleIcon} clickable action={toggle} />
|
209
|
+
</footer>
|
186
210
|
</menu>
|
187
211
|
)
|
188
212
|
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import { Site } from './site'
|
3
|
+
import { Page } from './page'
|
4
|
+
import './site.css'
|
5
|
+
import './page.css'
|
6
|
+
|
7
|
+
const SiteTest = (prop) => {
|
8
|
+
|
9
|
+
return (
|
10
|
+
<Site icon="star" title="Site Test" init={"PAGE1"}>
|
11
|
+
<Page id="PAGE1" section="SECTION1" icon="description" title="Page 1">
|
12
|
+
111
|
13
|
+
</Page>
|
14
|
+
<Page id="PAGE2" section="SECTION1" icon="description" title="Page 2">
|
15
|
+
222
|
16
|
+
</Page>
|
17
|
+
</Site>
|
18
|
+
)
|
19
|
+
}
|
@@ -195,7 +195,7 @@ const PlannerCell = ({ lane, events, date, disabled = false, onAdd, onDelete, on
|
|
195
195
|
return (
|
196
196
|
<div className={`cell ${weekend}`} onDragOver={onDragOver} onDragLeave={onDragLeave} onDrop={drop} onClick={select}>
|
197
197
|
{events.map(event => {
|
198
|
-
const {
|
198
|
+
const { Renderer = EventCard } = event
|
199
199
|
return <Renderer event={event} />
|
200
200
|
})}
|
201
201
|
</div>
|