ywana-core8 0.0.480 → 0.0.481
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/db/db.json +14 -0
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +4 -3
- package/src/site/site.test.js +7 -6
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -26,6 +26,7 @@ export const TablePage = (props) => {
|
|
26
26
|
canQuery = false, urlQuery, user,
|
27
27
|
groupBy, validator, scenario,
|
28
28
|
formFilter, tableFilter, editorFilter = false,
|
29
|
+
tableClassName,
|
29
30
|
children
|
30
31
|
} = props
|
31
32
|
|
@@ -152,7 +153,7 @@ export const TablePage = (props) => {
|
|
152
153
|
</menu>
|
153
154
|
) : null}
|
154
155
|
<main key={id} className="table-page">
|
155
|
-
<TableEditor icon={icon} title={name} schema={schema} delay={delay} editable={editable} groupBy={groupBy} filter={tableFilter} actions={tableActions} canDelete={canDelete} />
|
156
|
+
<TableEditor icon={icon} title={name} schema={schema} delay={delay} editable={editable} groupBy={groupBy} filter={tableFilter} actions={tableActions} canDelete={canDelete} className={tableClassName}/>
|
156
157
|
{children ? <article>{children}</article> : null}
|
157
158
|
</main>
|
158
159
|
{renderAside()}
|
@@ -346,7 +347,7 @@ export const TableEditor = (props) => {
|
|
346
347
|
const site = useContext(SiteContext)
|
347
348
|
const [pageContext, setPageContext] = useContext(PageContext)
|
348
349
|
const { all = [], filters } = pageContext
|
349
|
-
const { icon, title, schema, editable, canDelete, filter, actions } = props
|
350
|
+
const { icon, title, schema, editable, canDelete, filter, actions, className } = props
|
350
351
|
const [groupBy, setGroupBy] = useState(props.groupBy)
|
351
352
|
|
352
353
|
function changeGroup(id, value) {
|
@@ -457,7 +458,7 @@ export const TableEditor = (props) => {
|
|
457
458
|
<Header title={title} >
|
458
459
|
<span className="size">{groupSize}</span>
|
459
460
|
</Header>
|
460
|
-
<DataTable {...table} onRowSelection={select} editable={editable} onCheckAll={check} />
|
461
|
+
<DataTable {...table} onRowSelection={select} editable={editable} onCheckAll={check} className={className} />
|
461
462
|
</Fragment>
|
462
463
|
)
|
463
464
|
})
|
package/src/site/site.test.js
CHANGED
@@ -9,6 +9,7 @@ import { Button, DropDown, TextField, TextArea } from '../html'
|
|
9
9
|
import { UploadDialog } from '../widgets/upload/UploadDialog'
|
10
10
|
import { Uploader } from '../widgets/upload/Uploader'
|
11
11
|
import { TabbedTablePage } from '../domain/TabbedTablePage'
|
12
|
+
import { TablePage } from '../domain/TablePage'
|
12
13
|
import { FORMATS, TYPES } from '../domain/ContentType'
|
13
14
|
|
14
15
|
const SiteTest = (prop) => {
|
@@ -115,19 +116,19 @@ const Page2 = (props) => {
|
|
115
116
|
const Page3 = (props) => {
|
116
117
|
|
117
118
|
const schema = {
|
118
|
-
name : { id: "name" , type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: false, column: true , filter: true , like: true, label: "Name" },
|
119
|
-
state : { id: "state" , type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: true , column: true , filter: false , label: "State" , options: [
|
119
|
+
name : { id: "name" , type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: false, grouper: true , column: true , filter: true , like: true, label: "Name" },
|
120
|
+
state : { id: "state" , type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: true , grouper: true , column: true , filter: false , label: "State" , options: [
|
120
121
|
{ label: "Pendiente", value: "NOT_CLASSIFIED" },
|
121
122
|
{ label: "Clasificada", value: "CLASSIFIED"},
|
122
123
|
]},
|
123
|
-
field1: { id: "field1", type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: false, column: true , filter: true , label: "field1" },
|
124
|
-
field2: { id: "field2", type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: false, column: true , filter: true , label: "field2" },
|
125
|
-
field4: { id: "field4", type: TYPES.STRING, format: FORMATS.COLOR, required: true, tab: false, column: true , filter: true , label: "Color" },
|
124
|
+
field1: { id: "field1", type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: false, grouper: true , column: true , filter: true , label: "field1" },
|
125
|
+
field2: { id: "field2", type: TYPES.STRING, format: FORMATS.NONE , required: true, tab: false, grouper: true , column: true , filter: true , label: "field2" },
|
126
|
+
field4: { id: "field4", type: TYPES.STRING, format: FORMATS.COLOR, required: true, tab: false, grouper: true , column: true , filter: true , label: "Color" },
|
126
127
|
}
|
127
128
|
|
128
129
|
return (
|
129
130
|
<Fragment>
|
130
|
-
<
|
131
|
+
<TablePage title="Referencias" schema={schema} host="http://localhost:3000" url="/references" canFilter={true} tableClassName="condensed"/>
|
131
132
|
</Fragment>
|
132
133
|
)
|
133
134
|
}
|