ywana-core8 0.0.435 → 0.0.438
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 +34 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +18 -18
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +34 -31
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +34 -31
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +0 -2
- package/src/domain/ContentViewer.js +0 -1
- package/src/domain/TablePage.js +0 -2
- package/src/html/table.js +3 -0
- package/src/html/table.test.js +4 -3
- package/src/html/textfield.test.js +0 -1
- package/src/widgets/ide/editor.js +2 -2
- package/src/widgets/upload/UploadArea.js +0 -1
- package/src/widgets/upload/UploadDialog.js +1 -1
package/package.json
CHANGED
@@ -284,8 +284,6 @@ const NumberEditor = ({ field, value, onChange, outlined = false }) => {
|
|
284
284
|
const max = field.max
|
285
285
|
const disabled = !editable
|
286
286
|
|
287
|
-
console.log('NumberEditor: ', label, val, value)
|
288
|
-
|
289
287
|
return (
|
290
288
|
<div className='field-editor number-editor'>
|
291
289
|
<TextField outlined={outlined} id={id} label={label} type='NUMBER' value={val} max={max} min={min} onChange={change} disabled={disabled} />
|
@@ -89,7 +89,6 @@ const EntityViewer = (props) => {
|
|
89
89
|
const ArrayViewer = (props) => {
|
90
90
|
const { label, item, value } = props
|
91
91
|
const columns = Object.keys(item).map(key => item[key]["label"])
|
92
|
-
console.log("ARRAYVIEWER", item, value, columns)
|
93
92
|
return (
|
94
93
|
<div className="array-viewer">
|
95
94
|
<header>
|
package/src/domain/TablePage.js
CHANGED
@@ -227,7 +227,6 @@ const TableQueries = (props) => {
|
|
227
227
|
const [selected, setSelected] = useState()
|
228
228
|
|
229
229
|
function select(query) {
|
230
|
-
console.log("TableQueries.select", query)
|
231
230
|
setSelected(query.id)
|
232
231
|
pageContext.changeFilters(query.filters)
|
233
232
|
setPageContext(Object.assign({}, pageContext))
|
@@ -565,7 +564,6 @@ const TableContext = (url, field, host, urlQuery) => {
|
|
565
564
|
},
|
566
565
|
|
567
566
|
changeFilters(filters) {
|
568
|
-
console.log("TableContext.changeFilters", filters)
|
569
567
|
this.filters = filters
|
570
568
|
},
|
571
569
|
|
package/src/html/table.js
CHANGED
@@ -5,6 +5,7 @@ import { Icon } from './icon'
|
|
5
5
|
import { Text } from './text'
|
6
6
|
import './table.css'
|
7
7
|
import { FORMATS, TYPES } from '../domain/ContentType'
|
8
|
+
import { ColorField } from './color'
|
8
9
|
|
9
10
|
const isFunction = value => value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
|
10
11
|
|
@@ -212,6 +213,8 @@ const StringCellViewer = ({ id, value, format, options }) => {
|
|
212
213
|
let text = option ? option.label : value
|
213
214
|
const locale = window.navigator.userLanguage || window.navigator.language;
|
214
215
|
switch (format) {
|
216
|
+
case FORMATS.COLOR:
|
217
|
+
text = <input type="color" value={text} disabled/>
|
215
218
|
case FORMATS.URL:
|
216
219
|
text = <a href={text} target="download" download >{text}</a>
|
217
220
|
break;
|
package/src/html/table.test.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
|
+
import { FORMATS } from '../domain/ContentType'
|
2
3
|
import { DataTable } from './table'
|
3
4
|
|
4
5
|
const TableTest = (prop) => {
|
@@ -6,7 +7,7 @@ const TableTest = (prop) => {
|
|
6
7
|
const [rows, setRows] = useState(
|
7
8
|
[
|
8
9
|
{ id: 1, checked: false, name: "John Smith", thumb: "https://w7.pngwing.com/pngs/881/826/png-transparent-pikachu-ash-ketchum-pokemon-vrste-pikachu-leaf-flower-meme-thumbnail.png"},
|
9
|
-
{ id: 2, checked: false, name: "Ann Martin" }
|
10
|
+
{ id: 2, checked: false, name: "Ann Martin", color: "#CCFFFF" }
|
10
11
|
]
|
11
12
|
)
|
12
13
|
|
@@ -32,8 +33,8 @@ const TableTest = (prop) => {
|
|
32
33
|
columns : [
|
33
34
|
{ id: "checked", onChange: check },
|
34
35
|
{ id: "name", label: "Name", type: "String", onChange: editCell},
|
35
|
-
{ id: "thumb", label: "Thumb", type: "String", format:
|
36
|
-
|
36
|
+
{ id: "thumb", label: "Thumb", type: "String", format: FORMATS.IMG },
|
37
|
+
{ id: "color", label: "Color", type: "String", format: FORMATS.COLOR },
|
37
38
|
],
|
38
39
|
rows
|
39
40
|
}
|
@@ -21,7 +21,7 @@ export const EditorBox = (props) => {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
function split() {
|
24
|
-
|
24
|
+
// console.log('TODO: Split Vertical')
|
25
25
|
}
|
26
26
|
|
27
27
|
const style = " "
|
@@ -52,7 +52,7 @@ export const Editor = (props) => {
|
|
52
52
|
}
|
53
53
|
|
54
54
|
function split() {
|
55
|
-
console.log('TODO: Split Vertical')
|
55
|
+
// console.log('TODO: Split Vertical')
|
56
56
|
}
|
57
57
|
|
58
58
|
const style = " "
|
@@ -34,7 +34,7 @@ export const UploadDialog = ({ label, target, accept, onSuccess, onComplete, onC
|
|
34
34
|
const title = <Text use="headline6">{label}</Text>
|
35
35
|
return (
|
36
36
|
<Dialog title={title} open={true} onAction={onAction} actions={actions} className={className}>
|
37
|
-
{ disabled ? "" : <Uploader label={label} accept={accept} target={target} onSuccess={success} onComplete={complete} />
|
37
|
+
{ disabled ? "" : <Uploader label={label} accept={accept} target={target} onSuccess={success} onComplete={complete} /> }
|
38
38
|
{children}
|
39
39
|
</Dialog>
|
40
40
|
)
|