ywana-core8 0.0.199 → 0.0.200
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 +28 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +28 -13
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +28 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +10 -1
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -4,7 +4,7 @@ import { CheckBox } from './checkbox'
|
|
4
4
|
import { Icon } from './icon'
|
5
5
|
import { Text } from './text'
|
6
6
|
import './table.css'
|
7
|
-
import { FORMATS } from '../domain/ContentType'
|
7
|
+
import { FORMATS, TYPES } from '../domain/ContentType'
|
8
8
|
|
9
9
|
const isFunction = value => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
|
10
10
|
|
@@ -152,6 +152,7 @@ const DataTableCell = ({ row, column, cell, editable }) => {
|
|
152
152
|
case "ICON": return <Icon icon={cell} />
|
153
153
|
case "Boolean": return <BooleanCellViewer id={id} value={cell} />
|
154
154
|
case "String": return <StringCellViewer id={id} value={cell} format={format} options={options} />
|
155
|
+
case TYPES.ENTITY: return <EntityCellViewer id={id} value={cell} />
|
155
156
|
default: return cell
|
156
157
|
}
|
157
158
|
}
|
@@ -162,6 +163,14 @@ const DataTableCell = ({ row, column, cell, editable }) => {
|
|
162
163
|
)
|
163
164
|
}
|
164
165
|
|
166
|
+
const EntityCellViewer = ({ id, value }) => {
|
167
|
+
return (
|
168
|
+
<div className='entity-cell-viewer'>
|
169
|
+
{value.map(v => <div>{v}</div>)}
|
170
|
+
</div>
|
171
|
+
)
|
172
|
+
}
|
173
|
+
|
165
174
|
/**
|
166
175
|
* Boolean Cell Viewer
|
167
176
|
*/
|