@ossy/resources 3.5.1 → 3.6.2
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 +5 -5
- package/src/SchemaPresenter.jsx +6 -7
- package/src/VideoResource.jsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/resources",
|
|
3
3
|
"description": "Resource domain — aggregate and events for the Ossy resource model",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./src/index.js",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"src": "./src"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ossy/event-store": "^3.
|
|
26
|
+
"@ossy/event-store": "^3.6.2",
|
|
27
27
|
"@ossy/fold": "^3.4.0",
|
|
28
|
-
"@ossy/platform": "^3.
|
|
29
|
-
"@ossy/schema": "^3.
|
|
28
|
+
"@ossy/platform": "^3.6.2",
|
|
29
|
+
"@ossy/schema": "^3.6.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@ossy/design-system": ">=1.0.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"/src",
|
|
50
50
|
"README.md"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "d81b840c5421995e8ac7550e5b37ae1145abcba9"
|
|
53
53
|
}
|
package/src/SchemaPresenter.jsx
CHANGED
|
@@ -185,18 +185,17 @@ export function SchemaPresenter ({
|
|
|
185
185
|
return <Text>directory</Text>
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
if (isDocumentSchema) {
|
|
191
|
-
return <SchemaViewPresenter resource={resource} projection={projection} resourceId={resourceId} />
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// File envelope is a registered schema, but View must use MIME presenters (image/video/…).
|
|
188
|
+
// File envelope is a registered schema, so this must run before document views
|
|
189
|
+
// or we render Key/ContentType fields instead of the media player.
|
|
195
190
|
const mime = resolveMediaType(resource)
|
|
196
191
|
if (resource.type === '@ossy/platform/schema/file' || isMimeType(mime)) {
|
|
197
192
|
return <MimeViewPresenter resource={resource} projection={projection} resourceId={resourceId} onClose={onClose} />
|
|
198
193
|
}
|
|
199
194
|
|
|
195
|
+
if (isDocumentSchema) {
|
|
196
|
+
return <SchemaViewPresenter resource={resource} projection={projection} resourceId={resourceId} />
|
|
197
|
+
}
|
|
198
|
+
|
|
200
199
|
return <ResourceGenericView resourceId={resourceId} onClose={onClose} />
|
|
201
200
|
}
|
|
202
201
|
|
package/src/VideoResource.jsx
CHANGED
|
@@ -16,7 +16,7 @@ export const VideoResource = ({
|
|
|
16
16
|
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
|
17
17
|
<video
|
|
18
18
|
controls
|
|
19
|
-
src={resource
|
|
19
|
+
src={resource?.content?.src}
|
|
20
20
|
style={{ width: 'auto', height: '400px', margin: 'var(--space-l) auto' }}
|
|
21
21
|
/>
|
|
22
22
|
</div>
|