ywana-core8 0.0.190 → 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.190",
3
+ "version": "0.0.191",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -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>