ywana-core8 0.0.170 → 0.0.174
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 +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -3
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +7 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +4 -0
- package/src/html/textfield.css +2 -1
- package/src/html/textfield.js +4 -4
- package/src/html/tree.css +2 -2
package/package.json
CHANGED
@@ -245,6 +245,8 @@ export const StringEditor = ({ field, value = '', onChange, content, outlined })
|
|
245
245
|
return opts
|
246
246
|
}
|
247
247
|
|
248
|
+
console.log('StringEditor: ', label, value )
|
249
|
+
|
248
250
|
return (
|
249
251
|
<div className='field-editor string-editor'>
|
250
252
|
{
|
@@ -271,6 +273,8 @@ const NumberEditor = ({ field, value, onChange }) => {
|
|
271
273
|
const max = field.max
|
272
274
|
const disabled = !editable
|
273
275
|
|
276
|
+
console.log('StringEditor: ', label, val, value )
|
277
|
+
|
274
278
|
return (
|
275
279
|
<div className='field-editor number-editor'>
|
276
280
|
<TextField outlined id={id} label={label} type='NUMBER' value={val} max={max} min={min} onChange={change} disabled={disabled} />
|
package/src/html/textfield.css
CHANGED
package/src/html/textfield.js
CHANGED
@@ -45,10 +45,11 @@ export const TextField = (props) => {
|
|
45
45
|
const labelStyle = label ? "" : "no-label"
|
46
46
|
const style = `${labelStyle} ${borderStyle}`
|
47
47
|
const labelTxt = <Text>{label}</Text>
|
48
|
+
|
48
49
|
return (
|
49
50
|
<div className={`${style}`} onClick={onClick}>
|
50
51
|
<input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly} />
|
51
|
-
{canClear ? <Icon icon="close" clickable size="small" action={clear} /> : null }
|
52
|
+
{canClear && value && value.length > 0 ? <Icon icon="close" clickable size="small" action={clear} /> : null }
|
52
53
|
<span className="bar"></span>
|
53
54
|
{label ? <label>{labelTxt}</label> : null}
|
54
55
|
</div>
|
@@ -68,12 +69,12 @@ export const DropDown = (props) => {
|
|
68
69
|
useEffect(() => {
|
69
70
|
if (Array.isArray(options)) {
|
70
71
|
const option = options.find(option => option.value === value)
|
71
|
-
|
72
|
+
const label = option ? option.label : ""
|
73
|
+
setLabel(label)
|
72
74
|
}
|
73
75
|
}, [value])
|
74
76
|
|
75
77
|
function change(id, value) {
|
76
|
-
console.log('dropdown change > canFilter:', canFilter, id, value)
|
77
78
|
if (canFilter) {
|
78
79
|
setLabel(value)
|
79
80
|
} else {
|
@@ -104,7 +105,6 @@ export const DropDown = (props) => {
|
|
104
105
|
const canShow = open == true && Array.isArray(options)
|
105
106
|
if (canShow) {
|
106
107
|
const filterActive = canFilter === true && label && label.length > 0
|
107
|
-
console.log('Dropdown filterActive', filterActive, canFilter, label )
|
108
108
|
const items = filterActive ? options.filter(option => option.label.toUpperCase().indexOf(label.toUpperCase()) >= 0) : options
|
109
109
|
const lis = items.map(option => <li key={option.value} value={option.value}>{option.label}</li>)
|
110
110
|
return <menu><ul onClick={select}>{lis}</ul></menu>
|
package/src/html/tree.css
CHANGED
@@ -13,12 +13,12 @@
|
|
13
13
|
display: flex;
|
14
14
|
align-items: center;
|
15
15
|
font: 1rem;
|
16
|
-
color:
|
16
|
+
color: var(--text-color-light);
|
17
17
|
}
|
18
18
|
|
19
19
|
.tree-item:hover {
|
20
20
|
cursor: pointer;
|
21
|
-
background-color:
|
21
|
+
background-color: var(--background-color);
|
22
22
|
font-weight: 500;
|
23
23
|
}
|
24
24
|
|