@mirrormedia/lilith-draft-editor 1.1.0-alpha.24 → 1.1.0-alpha.25
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/lib/draft-js/buttons/video.js +3 -2
- package/lib/draft-js/draft-converter/atomic-block-processor.js +1 -0
- package/lib/draft-js/draft-converter/entities.js +3 -0
- package/lib/website/mirrormedia/block-renderer-fn.js +6 -0
- package/lib/website/mirrormedia/selector/video-selector.js +3 -3
- package/package.json +2 -2
|
@@ -38,8 +38,9 @@ function VideoButton(props) {
|
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const contentState = editorState.getCurrentContent();
|
|
42
|
-
|
|
41
|
+
const contentState = editorState.getCurrentContent(); // since 202310, only VIDEO-V2 will be created
|
|
42
|
+
|
|
43
|
+
const contentStateWithEntity = contentState.createEntity('VIDEO-V2', 'IMMUTABLE', {
|
|
43
44
|
video
|
|
44
45
|
});
|
|
45
46
|
const entityKey = contentStateWithEntity.getLastCreatedEntityKey();
|
|
@@ -138,6 +138,7 @@ const processor = {
|
|
|
138
138
|
case _entities.default.SLIDESHOW.type:
|
|
139
139
|
case _entities.default['SLIDESHOW-V2'].type:
|
|
140
140
|
case _entities.default.VIDEO.type:
|
|
141
|
+
case _entities.default['VIDEO-V2'].type:
|
|
141
142
|
case _entities.default.YOUTUBE.type:
|
|
142
143
|
case _entities.default.BACKGROUNDIMAGE.type:
|
|
143
144
|
case _entities.default.BACKGROUNDVIDEO.type:
|
|
@@ -32,6 +32,7 @@ const {
|
|
|
32
32
|
DividerBlock,
|
|
33
33
|
RelatedPostBlock,
|
|
34
34
|
VideoBlock,
|
|
35
|
+
VideoBlockV2,
|
|
35
36
|
AudioBlock,
|
|
36
37
|
YoutubeBlock
|
|
37
38
|
} = _mirrormedia.default.blockRenderers;
|
|
@@ -113,6 +114,11 @@ const AtomicBlock = props => {
|
|
|
113
114
|
return VideoBlock(entity);
|
|
114
115
|
}
|
|
115
116
|
|
|
117
|
+
case 'VIDEO-V2':
|
|
118
|
+
{
|
|
119
|
+
return VideoBlockV2(entity);
|
|
120
|
+
}
|
|
121
|
+
|
|
116
122
|
case 'AUDIO':
|
|
117
123
|
{
|
|
118
124
|
return AudioBlock(entity);
|
|
@@ -34,7 +34,7 @@ const videosQuery = (0, _apollo.gql)`
|
|
|
34
34
|
) {
|
|
35
35
|
id
|
|
36
36
|
name
|
|
37
|
-
|
|
37
|
+
videoSrc
|
|
38
38
|
file {
|
|
39
39
|
filename
|
|
40
40
|
filesize
|
|
@@ -136,7 +136,7 @@ function VideoGrid(props) {
|
|
|
136
136
|
muted: true,
|
|
137
137
|
loop: true
|
|
138
138
|
}, /*#__PURE__*/_react.default.createElement("source", {
|
|
139
|
-
src: video === null || video === void 0 ? void 0 : video.
|
|
139
|
+
src: video === null || video === void 0 ? void 0 : video.videoSrc
|
|
140
140
|
}), /*#__PURE__*/_react.default.createElement("source", {
|
|
141
141
|
src: video === null || video === void 0 ? void 0 : (_video$file = video.file) === null || _video$file === void 0 ? void 0 : _video$file.url
|
|
142
142
|
})));
|
|
@@ -170,7 +170,7 @@ function VideoMetaGrid(props) {
|
|
|
170
170
|
autoPlay: true,
|
|
171
171
|
loop: true
|
|
172
172
|
}, /*#__PURE__*/_react.default.createElement("source", {
|
|
173
|
-
src: video === null || video === void 0 ? void 0 : video.
|
|
173
|
+
src: video === null || video === void 0 ? void 0 : video.videoSrc
|
|
174
174
|
}), /*#__PURE__*/_react.default.createElement("source", {
|
|
175
175
|
src: video === null || video === void 0 ? void 0 : (_video$file2 = video.file) === null || _video$file2 === void 0 ? void 0 : _video$file2.url
|
|
176
176
|
})), /*#__PURE__*/_react.default.createElement(VideoName, null, video === null || video === void 0 ? void 0 : video.name));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirrormedia/lilith-draft-editor",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"draft-js": "^0.11.7",
|
|
26
|
-
"@mirrormedia/lilith-draft-renderer": "1.3.0-alpha.
|
|
26
|
+
"@mirrormedia/lilith-draft-renderer": "1.3.0-alpha.7"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "18.2.0",
|