ywana-core8 0.0.223 → 0.0.227
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 +81 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -1
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +80 -49
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +81 -49
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/domain/CollectionPage.js +9 -1
- package/src/domain/TablePage.css +1 -1
- package/src/domain/TablePage.js +4 -3
- package/src/html/index.js +2 -1
- package/src/html/tooltip.css +3 -0
- package/src/html/tooltip.js +17 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ywana-core8",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.227",
|
4
4
|
"description": "ywana-core8",
|
5
5
|
"author": "Ernesto Roldan Garcia",
|
6
6
|
"license": "MIT",
|
@@ -35,6 +35,7 @@
|
|
35
35
|
"react-error-overlay": "^6.0.10",
|
36
36
|
"react-notifications": "^1.7.3",
|
37
37
|
"react-switch": "^6.0.0",
|
38
|
+
"react-tooltip": "^4.2.21",
|
38
39
|
"resumablejs": "^1.1.0"
|
39
40
|
}
|
40
41
|
}
|
@@ -40,12 +40,20 @@ export const CollectionPage = (props) => {
|
|
40
40
|
site.openDialog(<CreateContentDialog label={`${name}`} type={schema} onOK={onOK} />);
|
41
41
|
}
|
42
42
|
|
43
|
+
function renderActions() {
|
44
|
+
return actions.map(element => {
|
45
|
+
const action = () => element.props.action(pageContext)
|
46
|
+
const clone = React.cloneElement(element, { action })
|
47
|
+
return clone
|
48
|
+
})
|
49
|
+
}
|
50
|
+
|
43
51
|
return (
|
44
52
|
<Fragment>
|
45
53
|
<Header className="collection-page" title={<Text>{title}</Text>}>
|
46
54
|
<Button icon="add" label="Add" action={add} />
|
47
55
|
<Button icon="refresh" label="Reload" action={reload} />
|
48
|
-
{
|
56
|
+
{renderActions()}
|
49
57
|
</Header>
|
50
58
|
<menu className="collection-page">
|
51
59
|
<Header title={<Text>Lista de {name}</Text>} >
|
package/src/domain/TablePage.css
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -20,9 +20,10 @@ export const TablePage = (props) => {
|
|
20
20
|
const { id = "table",
|
21
21
|
icon, title, name,
|
22
22
|
schema, url, field,
|
23
|
-
actions = [], dev = false, tableActions, selectionActions = [],
|
24
|
-
editable, canFilter = false, canQuery = false, canAdd = true, canDelete = true,
|
25
23
|
autosave = true, delay = 1000,
|
24
|
+
editable,
|
25
|
+
actions = [], dev = false, tableActions, selectionActions = [],
|
26
|
+
canFilter = false, canQuery = false, canAdd = true, canDelete = true, canEdit = true,
|
26
27
|
groupBy, validator, scenario,
|
27
28
|
formFilter, tableFilter, editorFilter = false
|
28
29
|
} = props
|
@@ -96,7 +97,7 @@ export const TablePage = (props) => {
|
|
96
97
|
if (rowSelected || rowChecked) {
|
97
98
|
return (
|
98
99
|
<aside className="table-page">
|
99
|
-
{rowSelected ? <TableRowEditor content={new Content(schema, form)} filter={editorFilter} onChange={change} onClose={closeAside} editable={
|
100
|
+
{rowSelected ? <TableRowEditor content={new Content(schema, form)} filter={editorFilter} onChange={change} onClose={closeAside} editable={canEdit}/> : null}
|
100
101
|
{rowChecked ? <TableSelector schema={schema} actions={selectionActions} /> : null}
|
101
102
|
</aside>
|
102
103
|
)
|
package/src/html/index.js
CHANGED
@@ -16,4 +16,5 @@ export { Text } from './text'
|
|
16
16
|
export { TextField, DropDown } from './textfield'
|
17
17
|
export { TokenField } from './tokenfield'
|
18
18
|
export { Tree, TreeNode, TreeItem } from './tree'
|
19
|
-
export { Switch } from './switch'
|
19
|
+
export { Switch } from './switch'
|
20
|
+
export { Tooltip } from './tooltip'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import './tooltip.css'
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Tooltip
|
6
|
+
*/
|
7
|
+
export const Tooltip = (props) => {
|
8
|
+
|
9
|
+
const { text = "..." } = props
|
10
|
+
|
11
|
+
return (
|
12
|
+
<ReactTooltip id="filters" effect="solid" className="tooltip">
|
13
|
+
<Text use="body2">{text}</Text>
|
14
|
+
</ReactTooltip>
|
15
|
+
)
|
16
|
+
|
17
|
+
}
|