ywana-core8 0.0.78 → 0.0.82
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 +33 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +32 -25
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +36 -28
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/domain/ContentEditor.js +3 -1
- package/src/html/index.js +2 -1
- package/src/html/switch.css +0 -0
- package/src/html/switch.js +19 -0
- package/src/html/textfield.js +1 -1
- package/src/site/site.js +2 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ywana-core8",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.82",
|
4
4
|
"description": "ywana-core8",
|
5
5
|
"author": "Ernesto Roldan Garcia",
|
6
6
|
"license": "MIT",
|
@@ -30,6 +30,7 @@
|
|
30
30
|
"material-design-icons-iconfont": "^6.1.1",
|
31
31
|
"react-datepicker": "^4.6.0",
|
32
32
|
"react-notifications": "^1.7.3",
|
33
|
+
"react-switch": "^6.0.0",
|
33
34
|
"resumablejs": "^1.1.0"
|
34
35
|
}
|
35
36
|
}
|
@@ -17,7 +17,9 @@ export const ContentEditor = ({ content, filter, onChange }) => {
|
|
17
17
|
const sections = content.sections()
|
18
18
|
return (
|
19
19
|
<div className='content-editor'>
|
20
|
-
{sections
|
20
|
+
{sections
|
21
|
+
.filter(section => section.fields && 0 < section.fileds.length)
|
22
|
+
.map((section) => {
|
21
23
|
const { title, fields } = section
|
22
24
|
return (
|
23
25
|
<section key={title}>
|
package/src/html/index.js
CHANGED
@@ -15,4 +15,5 @@ export { DataTable } from './table'
|
|
15
15
|
export { Text } from './text'
|
16
16
|
export { TextField, DropDown } from './textfield'
|
17
17
|
export { TokenField } from './tokenfield'
|
18
|
-
export { Tree, TreeNode, TreeItem } from './tree'
|
18
|
+
export { Tree, TreeNode, TreeItem } from './tree'
|
19
|
+
export { Switch } from './switch'
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import RSwitch from 'react-switch'
|
3
|
+
|
4
|
+
export const Switch = (props) => {
|
5
|
+
|
6
|
+
return (
|
7
|
+
<RSwitch {...props}
|
8
|
+
onColor="#86d3ff"
|
9
|
+
onHandleColor="#2693e6"
|
10
|
+
handleDiameter={30}
|
11
|
+
uncheckedIcon={false}
|
12
|
+
checkedIcon={false}
|
13
|
+
boxShadow="0px 1px 5px rgba(0, 0, 0, 0.6)"
|
14
|
+
activeBoxShadow="0px 0px 1px 10px rgba(0, 0, 0, 0.2)"
|
15
|
+
height={20}
|
16
|
+
width={48}
|
17
|
+
className="react-switch"
|
18
|
+
/>
|
19
|
+
}
|
package/src/html/textfield.js
CHANGED
package/src/site/site.js
CHANGED
@@ -69,8 +69,8 @@ export const SiteProvider = ({ children, siteLang, siteDictionary, showConsole }
|
|
69
69
|
|
70
70
|
confirm: (message) => window.confirm(message),
|
71
71
|
|
72
|
-
notify: (title,
|
73
|
-
NotificationManager.info(
|
72
|
+
notify: ({title, body}) => {
|
73
|
+
NotificationManager.info(body, title)
|
74
74
|
}
|
75
75
|
}
|
76
76
|
|