ywana-core8 0.0.863 → 0.0.865
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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +4 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +4 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/domain/CollectionPage.js +21 -17
- package/src/domain2/CollectionPage.js +0 -1
- package/src/http/client.js +2 -2
- package/src/incubator/{pdfViewer.js → PDFViewer.js} +5 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ywana-core8",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.865",
|
4
4
|
"description": "ywana-core8",
|
5
5
|
"homepage": "https://ywana.github.io/workspace",
|
6
6
|
"author": "Ernesto Roldan Garcia",
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"react-error-overlay": "^6.0.10",
|
41
41
|
"react-image-pan-zoom-rotate": "^1.6.0",
|
42
42
|
"react-notifications-component": "^3.4.1",
|
43
|
-
"react-pdf": "^
|
43
|
+
"react-pdf": "^7.0.3",
|
44
44
|
"react-switch": "^6.0.0",
|
45
45
|
"react-tooltip": "^4.2.21",
|
46
46
|
"resumablejs": "^1.1.0"
|
@@ -306,17 +306,17 @@ export const CollectionTree = (props) => {
|
|
306
306
|
return nodes
|
307
307
|
.sort((a, b) => a.name.localeCompare(b.name))
|
308
308
|
.map(node => {
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
309
|
+
const title = typeof node.name === 'boolean' ? `${node.field} = ${node.name}` : node.title
|
310
|
+
return (
|
311
|
+
<TreeNode key={node.name} icon={null} label={title} open={true}>
|
312
|
+
{node.nodes ? renderNodes(node.nodes) : node.items.map(item => {
|
313
|
+
const selected = pageContext.selected && item.id === pageContext.selected.id
|
314
|
+
const actions = []
|
315
|
+
return <TreeItem icon={icon} key={item.id} id={item.id} label={namer ? namer(item) : item.name} onSelect={select} selected={selected} actions={actions} />
|
316
|
+
})}
|
317
|
+
</TreeNode>
|
318
|
+
)
|
319
|
+
})
|
320
320
|
}
|
321
321
|
|
322
322
|
function search() {
|
@@ -405,7 +405,7 @@ const CollectionEditor = (props) => {
|
|
405
405
|
}
|
406
406
|
if (onChange) onChange(form)
|
407
407
|
setPageContext(Object.assign({}, pageContext))
|
408
|
-
site.notify({ title: "Datos Guardados"
|
408
|
+
site.notify({ title: "Datos Guardados" })
|
409
409
|
}
|
410
410
|
|
411
411
|
function renderTitle() {
|
@@ -435,15 +435,19 @@ const CollectionEditor = (props) => {
|
|
435
435
|
}
|
436
436
|
}
|
437
437
|
|
438
|
+
const hasMenu = canDelete
|
439
|
+
|
438
440
|
return selected && form ? (
|
439
441
|
<Fragment>
|
440
442
|
<Header icon={icon} title={renderTitle()}>
|
441
443
|
<Icon icon="close" clickable action={clear} />
|
442
|
-
|
443
|
-
<
|
444
|
-
|
445
|
-
|
446
|
-
|
444
|
+
{!hasMenu ? null :
|
445
|
+
<MenuIcon align="alignRight">
|
446
|
+
<Menu>
|
447
|
+
{canDelete ? <MenuItem label="Eliminar" onSelect={remove} /> : null}
|
448
|
+
</Menu>
|
449
|
+
</MenuIcon>
|
450
|
+
}
|
447
451
|
<Icon icon="refresh" clickable action={onReload} />
|
448
452
|
{autosave === true ? null : <Button icon="save" label="Guardar Cambios" raised disabled={!canSave()} action={save} />}
|
449
453
|
{renderActions()}
|
package/src/http/client.js
CHANGED
@@ -62,9 +62,9 @@ export const HTTPClient = (domain, securityCtx) => {
|
|
62
62
|
return fetchAsync('PATCH', domain + URL, body, token, headers);
|
63
63
|
},
|
64
64
|
|
65
|
-
DELETE: (URL, headers) => {
|
65
|
+
DELETE: (URL, body, headers) => {
|
66
66
|
const token = securityCtx ? securityCtx.token() : null;
|
67
|
-
return fetchAsync('DELETE', domain + URL,
|
67
|
+
return fetchAsync('DELETE', domain + URL, body, token, headers);
|
68
68
|
}
|
69
69
|
}
|
70
70
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Document, Page } from 'react-pdf
|
1
|
+
import React, {useState} from 'react'
|
2
|
+
import { Document, Page } from 'react-pdf'
|
3
3
|
|
4
4
|
export const PDFViewer = (props) => {
|
5
5
|
|
@@ -24,8 +24,10 @@ export const PDFViewerTest = (props) => {
|
|
24
24
|
|
25
25
|
const base64 = "xx"
|
26
26
|
|
27
|
+
const file = "https://pro.ywanadigital.com/files/20230602102630601/original/files/Label1_7_ok.pdf"
|
28
|
+
|
27
29
|
return (
|
28
|
-
<PDFViewer file={
|
30
|
+
<PDFViewer file={file} />
|
29
31
|
)
|
30
32
|
|
31
33
|
}
|