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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.435",
3
+ "version": "0.0.438",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -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>
@@ -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;
@@ -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: "IMG" },
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
  }
@@ -25,7 +25,6 @@ const TextFieldTest = (prop) => {
25
25
  { label: "NO", value: "false" },
26
26
  ]
27
27
 
28
- console.log(form)
29
28
  return (
30
29
  <>
31
30
  <DropDown id="b1" label="Boolean1" onChange={change} options={options2} value={form.b1} />
@@ -21,7 +21,7 @@ export const EditorBox = (props) => {
21
21
  }
22
22
 
23
23
  function split() {
24
- console.log('TODO: Split Vertical')
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 = " "
@@ -49,7 +49,6 @@ export const UploadIcon = ({ icon = "folder_open", resumable }) => {
49
49
  useEffect(() => {
50
50
  if (resumable && iconElement.current) {
51
51
  resumable.assignBrowse(iconElement.current)
52
- console.log('uploadicon')
53
52
  }
54
53
  }, [iconElement])
55
54
 
@@ -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
  )