ywana-core8 0.0.75 → 0.0.76

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.75",
3
+ "version": "0.0.76",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -8,14 +8,11 @@ import { TextField, CheckBox, DropDown, Form } from '../html';
8
8
  export const ContentForm = ({ content, columns = 1, filter, rules, onChange }) => {
9
9
 
10
10
  const form = content.form()
11
- console.log(form)
12
11
 
13
12
  const fields = Object.keys(form)
14
13
  .map(key => form[key])
15
14
  .filter( field => filter ? filter(field) : true)
16
15
 
17
- console.log(fields)
18
-
19
16
  return (
20
17
  <Form className="content-form" columns={columns} outlined={true} onChange={onChange}>
21
18
  { fields.map(field => <ContentFormField key={field.id} {...field} />)}
@@ -41,7 +41,7 @@ export const TextField = (props) => {
41
41
  const labelTxt = <Text>{label}</Text>
42
42
  return (
43
43
  <div className={`${style}`} onClick={onClick}>
44
- <input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly}/>
44
+ <input id={id} type={type} placeholder={placeholder} value={value} required onChange={change} onKeyDown={onKeyPress} onFocus={focus} readOnly={readOnly} onfocus="(this.type='date')" onfocusout="(this.type='text')"/>
45
45
  <span className="bar"></span>
46
46
  { label ? <label>{labelTxt}</label> : null }
47
47
  </div>
package/src/site/site.js CHANGED
@@ -64,8 +64,9 @@ export const SiteProvider = ({ children, siteLang, siteDictionary, showConsole }
64
64
 
65
65
  preview,
66
66
  openPreview: (preview) => { setPreview(preview) },
67
- closePreview: () => { setPreview(null) }
67
+ closePreview: () => { setPreview(null) },
68
68
 
69
+ confirm: (message) => window.confirm(message)
69
70
  }
70
71
 
71
72
  return (