ywana-core8 0.0.187 → 0.0.191

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.187",
3
+ "version": "0.0.191",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -15,6 +15,9 @@
15
15
  "bugs": {
16
16
  "url": "https://github.com/ywana/ywana-core8/issues"
17
17
  },
18
+ "resolutions": {
19
+ "react-error-overlay": "6.0.9"
20
+ },
18
21
  "peerDependencies": {
19
22
  "react": "17.x",
20
23
  "react-dom": "17.x"
@@ -29,6 +32,7 @@
29
32
  "deep-equal": "^2.0.5",
30
33
  "material-design-icons-iconfont": "^6.1.1",
31
34
  "react-datepicker": "^4.6.0",
35
+ "react-error-overlay": "^6.0.10",
32
36
  "react-notifications": "^1.7.3",
33
37
  "react-switch": "^6.0.0",
34
38
  "resumablejs": "^1.1.0"
package/src/css/theme.css CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  --page-aside-width: 100%;
33
33
  --page-aside-color: #111;
34
- --page-aside-bgcolor: #EEE;
34
+ --page-aside-bgcolor: #FFF;
35
35
 
36
36
  --page-footer-height: 3rem;
37
37
 
@@ -70,8 +70,6 @@ export const TabbedContentEditor = ({ content, filter, grouped = false, onChange
70
70
 
71
71
  const sections = content.sections()
72
72
 
73
- console.log("TabbedContentEditor",sections)
74
-
75
73
  return (
76
74
  <div className='content-editor tabbed'>
77
75
  <Tabs selected={tab} onChange={changeTab}>
@@ -253,7 +251,7 @@ export const StringEditor = ({ field, value = '', onChange, content, outlined })
253
251
  return (
254
252
  <div className='field-editor string-editor'>
255
253
 
256
- { format === FORMATS.HTML ? <Editor id={id} value={value} onChange={change}/> : null}
254
+ { format === FORMATS.HTML ? <Editor id={id} value={value} onChange={change} content={content}/> : null }
257
255
 
258
256
  {
259
257
  format === FORMATS.DATE ? <TextField outlined={outlined} id={id} type="date" label={label} value={value} onChange={change} readOnly={!editable} /> :
@@ -17,7 +17,8 @@ export const FORMATS = {
17
17
  NONE: '',
18
18
  DATE: 'date',
19
19
  EMAIL: 'email',
20
- HTML: 'HTML'
20
+ HTML: 'HTML',
21
+ URL: 'URL'
21
22
  }
22
23
 
23
24
  /**
@@ -95,7 +95,7 @@ export const TablePage = (props) => {
95
95
  if (rowSelected || rowChecked) {
96
96
  return (
97
97
  <aside className="table-page">
98
- {rowSelected ? <TableRowEditor content={new Content(schema, form)} filter={editorFilter} onChange={change} onClose={closeAside} /> : null}
98
+ {rowSelected ? <TableRowEditor content={new Content(schema, form)} filter={editorFilter} onChange={change} onClose={closeAside} editable={editable}/> : null}
99
99
  {rowChecked ? <TableSelector schema={schema} actions={selectionActions} /> : null}
100
100
  </aside>
101
101
  )
@@ -138,14 +138,14 @@ export const TablePage = (props) => {
138
138
  * TableRowEditor
139
139
  */
140
140
  const TableRowEditor = (props) => {
141
- const { name, content, filter, onChange, onClose } = props
141
+ const { name, content, filter, editable, onChange, onClose } = props
142
142
  return (
143
143
  <div className="table-row-editor">
144
144
  <Header icon="local_offer" title={name || "Propiedades"}>
145
145
  <Icon icon="close" clickable action={onClose} />
146
146
  </Header>
147
147
  <main>
148
- <ContentEditor content={content} onChange={onChange} filter={filter} />
148
+ { editable ? <ContentEditor content={content} onChange={onChange} filter={filter} /> : <ContentViewer content={content} />
149
149
  </main>
150
150
  </div>
151
151
  )
@@ -49,7 +49,7 @@ export const TextField = (props) => {
49
49
  return (
50
50
  <div className={`${style}`} onClick={onClick}>
51
51
  <input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly} />
52
- {canClear && value && value.length > 0 ? <Icon icon="close" clickable size="small" action={clear} /> : null }
52
+ {!readOnly && canClear && value && value.length > 0 ? <Icon icon="close" clickable size="small" action={clear} /> : null }
53
53
  <span className="bar"></span>
54
54
  {label ? <label>{labelTxt}</label> : null}
55
55
  </div>