ywana-core8 0.0.173 → 0.0.177
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 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +5 -5
- package/src/html/textfield.js +2 -3
package/package.json
CHANGED
@@ -218,7 +218,7 @@ const EntityEditor = ({ field, value = {}, onChange }) => {
|
|
218
218
|
|
219
219
|
return (
|
220
220
|
<div className='entity-editor'>
|
221
|
-
<header
|
221
|
+
<header>∂
|
222
222
|
<Text use='caption'>{label}</Text>
|
223
223
|
</header>
|
224
224
|
<main>
|
@@ -245,8 +245,6 @@ export const StringEditor = ({ field, value = '', onChange, content, outlined })
|
|
245
245
|
return opts
|
246
246
|
}
|
247
247
|
|
248
|
-
console.log('StringEditor: ', label, value, content )
|
249
|
-
|
250
248
|
return (
|
251
249
|
<div className='field-editor string-editor'>
|
252
250
|
{
|
@@ -261,7 +259,7 @@ export const StringEditor = ({ field, value = '', onChange, content, outlined })
|
|
261
259
|
/**
|
262
260
|
* Number Editor
|
263
261
|
*/
|
264
|
-
const NumberEditor = ({ field, value, onChange }) => {
|
262
|
+
const NumberEditor = ({ field, value, onChange, outlined = false }) => {
|
265
263
|
const { id, label, editable = true } = field
|
266
264
|
|
267
265
|
function change(id, value) {
|
@@ -273,9 +271,11 @@ const NumberEditor = ({ field, value, onChange }) => {
|
|
273
271
|
const max = field.max
|
274
272
|
const disabled = !editable
|
275
273
|
|
274
|
+
console.log('NumberEditor: ', label, val, value )
|
275
|
+
|
276
276
|
return (
|
277
277
|
<div className='field-editor number-editor'>
|
278
|
-
<TextField outlined id={id} label={label} type='NUMBER' value={val} max={max} min={min} onChange={change} disabled={disabled} />
|
278
|
+
<TextField outlined={outlined} id={id} label={label} type='NUMBER' value={val} max={max} min={min} onChange={change} disabled={disabled} />
|
279
279
|
</div>
|
280
280
|
)
|
281
281
|
}
|
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>
|
@@ -74,7 +75,6 @@ export const DropDown = (props) => {
|
|
74
75
|
}, [value])
|
75
76
|
|
76
77
|
function change(id, value) {
|
77
|
-
console.log('dropdown change > canFilter:', canFilter, id, value)
|
78
78
|
if (canFilter) {
|
79
79
|
setLabel(value)
|
80
80
|
} else {
|
@@ -105,7 +105,6 @@ export const DropDown = (props) => {
|
|
105
105
|
const canShow = open == true && Array.isArray(options)
|
106
106
|
if (canShow) {
|
107
107
|
const filterActive = canFilter === true && label && label.length > 0
|
108
|
-
console.log('Dropdown filterActive', filterActive, canFilter, label )
|
109
108
|
const items = filterActive ? options.filter(option => option.label.toUpperCase().indexOf(label.toUpperCase()) >= 0) : options
|
110
109
|
const lis = items.map(option => <li key={option.value} value={option.value}>{option.label}</li>)
|
111
110
|
return <menu><ul onClick={select}>{lis}</ul></menu>
|