@mirrormedia/lilith-draft-editor 3.0.8 → 3.0.10

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.
@@ -112,7 +112,5 @@ function AnnotationButton(props) {
112
112
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, urlInput, /*#__PURE__*/_react.default.createElement("div", {
113
113
  className: className,
114
114
  onMouseDown: isActive ? removeAnnotation : promptForAnnotation
115
- }, /*#__PURE__*/_react.default.createElement("i", {
116
- className: "far"
117
- }), /*#__PURE__*/_react.default.createElement("span", null, "Annotation")));
115
+ }, /*#__PURE__*/_react.default.createElement("span", null, "Annotation")));
118
116
  }
@@ -103,7 +103,5 @@ function EmbeddedCodeButton(props) {
103
103
  promptForInput();
104
104
  },
105
105
  className: className
106
- }, /*#__PURE__*/_react.default.createElement("i", {
107
- className: "far"
108
- }), /*#__PURE__*/_react.default.createElement("span", null, "Embed")));
106
+ }, /*#__PURE__*/_react.default.createElement("span", null, "Embed")));
109
107
  }
@@ -28,29 +28,30 @@ function ImageButton(props) {
28
28
  setToShowImageSelector(true);
29
29
  };
30
30
 
31
- const onImageSelectorChange = (selectedImagesWithMeta, align) => {
32
- const selected = selectedImagesWithMeta === null || selectedImagesWithMeta === void 0 ? void 0 : selectedImagesWithMeta[0];
33
-
34
- if (!selected) {
31
+ const onImageSelectorChange = (selectedImages, align) => {
32
+ if (selectedImages.length === 0) {
35
33
  setToShowImageSelector(false);
36
- return;
37
34
  }
38
35
 
39
- const contentState = editorState.getCurrentContent();
40
- const contentStateWithEntity = contentState.createEntity('image', 'IMMUTABLE', { ...selected.image,
41
- desc: selected.desc,
42
- url: selected.url,
43
- alignment: align
44
- });
45
- const entityKey = contentStateWithEntity.getLastCreatedEntityKey();
36
+ let newEditorState = editorState;
46
37
 
47
- const newEditorState = _draftJs.EditorState.set(editorState, {
48
- currentContent: contentStateWithEntity
49
- }); // The third parameter here is a space string, not an empty string
50
- // If you set an empty string, you will get an error: Unknown DraftEntity key: null
38
+ for (const selectedImage of selectedImages) {
39
+ const contentState = newEditorState.getCurrentContent();
40
+ const contentStateWithEntity = contentState.createEntity('image', 'IMMUTABLE', { ...selectedImage.image,
41
+ desc: selectedImage.desc,
42
+ url: selectedImage.url,
43
+ alignment: align
44
+ });
45
+ const entityKey = contentStateWithEntity.getLastCreatedEntityKey();
46
+ newEditorState = _draftJs.EditorState.set(newEditorState, {
47
+ currentContent: contentStateWithEntity
48
+ }); // The third parameter here is a space string, not an empty string
49
+ // If you set an empty string, you will get an error: Unknown DraftEntity key: null
51
50
 
51
+ newEditorState = _draftJs.AtomicBlockUtils.insertAtomicBlock(newEditorState, entityKey, ' ');
52
+ }
52
53
 
53
- onChange(_draftJs.AtomicBlockUtils.insertAtomicBlock(newEditorState, entityKey, ' '));
54
+ onChange(newEditorState);
54
55
  setToShowImageSelector(false);
55
56
  };
56
57
 
@@ -58,7 +59,8 @@ function ImageButton(props) {
58
59
  onChange: onImageSelectorChange,
59
60
  enableCaption: true,
60
61
  enableUrl: true,
61
- enableAlignment: true
62
+ enableAlignment: true,
63
+ enableMultiSelect: true
62
64
  }), /*#__PURE__*/_react.default.createElement("div", {
63
65
  className: className,
64
66
  onClick: promptForImageSelector
@@ -142,7 +142,5 @@ function InfoBoxButton(props) {
142
142
  onClick: () => {
143
143
  setToShowInput(true);
144
144
  }
145
- }, /*#__PURE__*/_react.default.createElement("i", {
146
- className: "far"
147
- }), /*#__PURE__*/_react.default.createElement("span", null, "InfoBox")));
145
+ }, /*#__PURE__*/_react.default.createElement("span", null, "InfoBox")));
148
146
  }
@@ -43,6 +43,8 @@ const inlineTagMap = {
43
43
  CODE: ['<code>', '</code>'],
44
44
  default: ['<span>', '</span>'],
45
45
  ITALIC: ['<em>', '</em>'],
46
+ SUP: ['<sup>', '</sup>'],
47
+ SUB: ['<sub>', '</sub>'],
46
48
  UNDERLINE: ['<u>', '</u>']
47
49
  };
48
50
  const defaultEntityTagMap = {
@@ -23,6 +23,10 @@ var _searchBox = require("./search-box");
23
23
 
24
24
  var _pagination = require("./pagination");
25
25
 
26
+ var _button = require("@keystone-ui/button");
27
+
28
+ var _imageUploader = require("./image-uploader");
29
+
26
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
31
 
28
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -77,6 +81,9 @@ const GlobalStyle = (0, _styledComponents.createGlobalStyle)`
77
81
  const ImageSearchBox = (0, _styledComponents.default)(_searchBox.SearchBox)`
78
82
  margin-top: 10px;
79
83
  `;
84
+ const CustomButton = (0, _styledComponents.default)(_button.Button)`
85
+ margin-top: 10px;
86
+ `;
80
87
  const ImageSelectionWrapper = _styledComponents.default.div`
81
88
  overflow: auto;
82
89
  margin-top: 10px;
@@ -89,7 +96,7 @@ const ImageGridsWrapper = _styledComponents.default.div`
89
96
  margin-top: 5px;
90
97
  `;
91
98
  const ImageGridWrapper = _styledComponents.default.div`
92
- flex: 0 0 33.3333%;
99
+ width: 33.3333%;
93
100
  cursor: pointer;
94
101
  padding: 0 10px 10px;
95
102
  `;
@@ -99,7 +106,7 @@ const ImageMetaGridsWrapper = _styledComponents.default.div`
99
106
  overflow: auto;
100
107
  `;
101
108
  const ImageMetaGridWrapper = _styledComponents.default.div`
102
- flex: 0 0 33.3333%;
109
+ width: 33.3333%;
103
110
  cursor: pointer;
104
111
  padding: 0 10px 10px;
105
112
  `;
@@ -107,7 +114,7 @@ const Image = _styledComponents.default.img`
107
114
  display: block;
108
115
  width: 100%;
109
116
  aspect-ratio: 2;
110
- object-fit: cover;
117
+ object-fit: contain;
111
118
  `;
112
119
  const Label = _styledComponents.default.label`
113
120
  display: block;
@@ -287,6 +294,7 @@ function ImageSelector(props) {
287
294
  const [selected, setSelected] = (0, _react.useState)(initialSelected);
288
295
  const [delay, setDelay] = (0, _react.useState)(initialDelay ?? '5');
289
296
  const [align, setAlign] = (0, _react.useState)(initialAlign);
297
+ const [showImageUploader, setShowImageUploader] = (0, _react.useState)(false);
290
298
  const contentWrapperRef = (0, _react.useRef)(null);
291
299
  const pageSize = 18;
292
300
  const options = [{
@@ -336,6 +344,15 @@ function ImageSelector(props) {
336
344
  }
337
345
  };
338
346
 
347
+ const onImageUploaderChange = images => {
348
+ setSelected(prev => prev.concat(images.map(image => ({
349
+ image,
350
+ desc: '',
351
+ url: ''
352
+ }))));
353
+ setShowImageUploader(false);
354
+ };
355
+
339
356
  const onImageMetaChange = imageEntityWithMeta => {
340
357
  if (enableMultiSelect) {
341
358
  const foundIndex = selected.findIndex(ele => {
@@ -438,7 +455,9 @@ function ImageSelector(props) {
438
455
  width: "narrow"
439
456
  }, /*#__PURE__*/_react.default.createElement("div", {
440
457
  ref: contentWrapperRef
441
- }, /*#__PURE__*/_react.default.createElement(ImageSearchBox, {
458
+ }, /*#__PURE__*/_react.default.createElement(CustomButton, {
459
+ onClick: () => setShowImageUploader(true)
460
+ }, "\u4E0A\u50B3\u5716\u7247"), /*#__PURE__*/_react.default.createElement(ImageSearchBox, {
442
461
  onChange: onSearchBoxChange
443
462
  }), /*#__PURE__*/_react.default.createElement(ImageSelectionWrapper, null, /*#__PURE__*/_react.default.createElement("div", null, searchResult), !!selected.length && /*#__PURE__*/_react.default.createElement(SeparationLine, null), /*#__PURE__*/_react.default.createElement(ImageMetaGrids, {
444
463
  imageMetas: selected,
@@ -455,5 +474,7 @@ function ImageSelector(props) {
455
474
  options: options,
456
475
  onChange: onAlignSelectChange,
457
476
  onOpen: onAlignSelectOpen
458
- }))))));
477
+ }))))), showImageUploader && /*#__PURE__*/_react.default.createElement(_imageUploader.ImageUploader, {
478
+ onChange: onImageUploaderChange
479
+ }));
459
480
  }
@@ -0,0 +1,247 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ImageUploader = ImageUploader;
7
+
8
+ var _apollo = require("@keystone-6/core/admin-ui/apollo");
9
+
10
+ var _modals = require("@keystone-ui/modals");
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
13
+
14
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
15
+
16
+ var _fileConvert = require("../utils/file-convert");
17
+
18
+ var _button = require("@keystone-ui/button");
19
+
20
+ var _fields = require("@keystone-ui/fields");
21
+
22
+ var _lodash = _interopRequireDefault(require("lodash"));
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
30
+ const imagesMutation = (0, _apollo.gql)`
31
+ mutation AddPhotos($data: [PhotoCreateInput!]!) {
32
+ photos: createPhotos(data: $data) {
33
+ id
34
+ name
35
+ imageFile {
36
+ url
37
+ width
38
+ height
39
+ }
40
+ resized {
41
+ original
42
+ w480
43
+ w800
44
+ w1200
45
+ w1600
46
+ w2400
47
+ }
48
+ resizedWebp {
49
+ original
50
+ w480
51
+ w800
52
+ w1200
53
+ w1600
54
+ w2400
55
+ }
56
+ }
57
+ }
58
+ `;
59
+ const CustomButton = (0, _styledComponents.default)(_button.Button)`
60
+ margin-top: 10px;
61
+ `;
62
+ const HiddenInput = _styledComponents.default.input`
63
+ display: none;
64
+ `;
65
+ const ImagesWrapper = _styledComponents.default.div`
66
+ overflow: auto;
67
+ margin-top: 10px;
68
+ `;
69
+ const ImageFilesWrapper = _styledComponents.default.div`
70
+ display: flex;
71
+ flex-wrap: wrap;
72
+ overflow: auto;
73
+ `;
74
+ const ImageFileWrapper = _styledComponents.default.div`
75
+ width: 33%;
76
+ cursor: pointer;
77
+ padding: 0 10px 10px;
78
+ `;
79
+ const Image = _styledComponents.default.img`
80
+ display: block;
81
+ width: 100%;
82
+ aspect-ratio: 2;
83
+ object-fit: contain;
84
+ `;
85
+ const ImageName = _styledComponents.default.p`
86
+ text-align: center;
87
+ `;
88
+ const CustomCheckbox = (0, _styledComponents.default)(_fields.Checkbox)`
89
+ display: flex;
90
+ align-items: center;
91
+ cursor: pointer;
92
+ `;
93
+ const Label = _styledComponents.default.label`
94
+ display: block;
95
+ margin: 10px 0;
96
+ font-weight: 600;
97
+ `;
98
+
99
+ const AddImages = ({
100
+ onAddImages
101
+ }) => {
102
+ const inputRef = (0, _react.useRef)(null);
103
+
104
+ const inputChangeHandler = async event => {
105
+ const files = event.target.files;
106
+ event.target.files = null;
107
+ if (!files) return;
108
+ const imagesFiles = await (0, _fileConvert.convertFilesToImageData)(files);
109
+ console.log('imagesFiles', imagesFiles);
110
+ onAddImages(imagesFiles);
111
+ };
112
+
113
+ const onUploadButton = () => {
114
+ var _inputRef$current;
115
+
116
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
117
+ };
118
+
119
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(CustomButton, {
120
+ onClick: onUploadButton
121
+ }, "\u65B0\u589E\u5716\u7247"), /*#__PURE__*/_react.default.createElement(HiddenInput, {
122
+ type: "file",
123
+ multiple: true,
124
+ accept: "image/*",
125
+ ref: inputRef,
126
+ onChange: inputChangeHandler
127
+ }));
128
+ };
129
+
130
+ const ImageFiles = ({
131
+ files,
132
+ onChange
133
+ }) => {
134
+ return /*#__PURE__*/_react.default.createElement(ImageFilesWrapper, null, files.map(file => /*#__PURE__*/_react.default.createElement(ImageFile, {
135
+ key: file.uid,
136
+ file: file,
137
+ onChange: onChange
138
+ })));
139
+ };
140
+
141
+ const ImageFile = ({
142
+ file,
143
+ onChange
144
+ }) => {
145
+ return /*#__PURE__*/_react.default.createElement(ImageFileWrapper, null, /*#__PURE__*/_react.default.createElement(Image, {
146
+ src: file.blobURL
147
+ }), /*#__PURE__*/_react.default.createElement(Label, {
148
+ htmlFor: "name"
149
+ }, "Image Name"), /*#__PURE__*/_react.default.createElement(_fields.TextInput, {
150
+ id: "name",
151
+ type: "text",
152
+ defaultValue: file.name,
153
+ onChange: _lodash.default.debounce(e => {
154
+ onChange({ ...file,
155
+ name: e.target.value
156
+ });
157
+ })
158
+ }), /*#__PURE__*/_react.default.createElement(ImageName, null, file.name), /*#__PURE__*/_react.default.createElement(CustomCheckbox, {
159
+ defaultChecked: file.shouldSetWatermark,
160
+ onChange: _lodash.default.debounce(e => {
161
+ onChange({ ...file,
162
+ shouldSetWatermark: e.target.checked
163
+ });
164
+ })
165
+ }, "\u6D6E\u6C34\u5370"));
166
+ };
167
+
168
+ function ImageUploader({
169
+ onChange
170
+ }) {
171
+ const [files, setFiles] = (0, _react.useState)([]);
172
+ const [addPhotos, {
173
+ data: uploadData,
174
+ loading: uploadLoading,
175
+ error: uploadError
176
+ }] = (0, _apollo.useMutation)(imagesMutation);
177
+
178
+ const onAddImages = rawFiles => {
179
+ const existedImageUids = new Set(files.map(file => file.uid));
180
+ const newFiles = rawFiles.filter(file => !existedImageUids.has(file.uid)).map(rawFile => ({ ...rawFile,
181
+ shouldSetWatermark: true
182
+ }));
183
+ setFiles(prev => prev.concat(newFiles));
184
+ };
185
+
186
+ const onConfirm = async () => {
187
+ if (!files.length) return onChange([]);
188
+ const tasks = files.map(async data => ({ ...data,
189
+ file: await (0, _fileConvert.convertStringToFile)(data.blobURL, data.name, data.type)
190
+ }));
191
+ const data = (await Promise.allSettled(tasks)).filter(function (settledResult) {
192
+ return settledResult.status === 'fulfilled';
193
+ }).map(result => result.value);
194
+ addPhotos({
195
+ variables: {
196
+ data: data.map(d => ({
197
+ name: d.name,
198
+ imageFile: {
199
+ upload: d.file
200
+ },
201
+ waterMark: d.shouldSetWatermark
202
+ }))
203
+ }
204
+ });
205
+ };
206
+
207
+ const onImageFileChang = file => {
208
+ const newFiles = Array.from(files);
209
+ const foundIndex = newFiles.findIndex(ele => ele.uid === file.uid);
210
+
211
+ if (foundIndex !== -1) {
212
+ newFiles[foundIndex] = file;
213
+ setFiles(newFiles);
214
+ }
215
+ };
216
+
217
+ (0, _react.useEffect)(() => {
218
+ var _uploadData$photos;
219
+
220
+ if (uploadData !== null && uploadData !== void 0 && (_uploadData$photos = uploadData.photos) !== null && _uploadData$photos !== void 0 && _uploadData$photos.length) {
221
+ onChange(uploadData.photos);
222
+ }
223
+ }, [uploadData, onChange]);
224
+ return /*#__PURE__*/_react.default.createElement(_modals.DrawerController, {
225
+ isOpen: true
226
+ }, /*#__PURE__*/_react.default.createElement(_modals.Drawer, {
227
+ title: "Upload images",
228
+ actions: {
229
+ cancel: {
230
+ label: 'Cancel',
231
+ action: () => {
232
+ onChange([]);
233
+ }
234
+ },
235
+ confirm: {
236
+ label: 'Confirm',
237
+ action: onConfirm
238
+ }
239
+ },
240
+ width: "narrow"
241
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(AddImages, {
242
+ onAddImages: onAddImages
243
+ }), /*#__PURE__*/_react.default.createElement(ImagesWrapper, null, /*#__PURE__*/_react.default.createElement(ImageFiles, {
244
+ files: files,
245
+ onChange: onImageFileChang
246
+ })), uploadLoading && /*#__PURE__*/_react.default.createElement("div", null, "loading"), uploadError && /*#__PURE__*/_react.default.createElement("div", null, uploadError.message))));
247
+ }
@@ -21,6 +21,10 @@ var _pagination = require("./pagination");
21
21
 
22
22
  var _fields = require("@keystone-ui/fields");
23
23
 
24
+ var _videoUploader = require("./video-uploader");
25
+
26
+ var _button = require("@keystone-ui/button");
27
+
24
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
29
 
26
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -29,9 +33,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
33
 
30
34
  const videosQuery = (0, _apollo.gql)`
31
35
  query Videos($searchText: String!, $take: Int, $skip: Int) {
32
- videosCount(where: { name: { contains: $searchText } })
36
+ videosCount(
37
+ where: { name: { contains: $searchText }, state: { equals: "published" } }
38
+ )
33
39
  videos(
34
- where: { name: { contains: $searchText } }
40
+ where: { name: { contains: $searchText }, state: { equals: "published" } }
35
41
  orderBy: { id: desc }
36
42
  take: $take
37
43
  skip: $skip
@@ -39,6 +45,7 @@ const videosQuery = (0, _apollo.gql)`
39
45
  id
40
46
  name
41
47
  videoSrc
48
+ youtubeUrl
42
49
  file {
43
50
  filename
44
51
  filesize
@@ -70,6 +77,9 @@ const GlobalStyle = (0, _styledComponents.createGlobalStyle)`
70
77
  const VideoSearchBox = (0, _styledComponents.default)(_searchBox.SearchBox)`
71
78
  margin-top: 10px;
72
79
  `;
80
+ const CustomButton = (0, _styledComponents.default)(_button.Button)`
81
+ margin-top: 10px;
82
+ `;
73
83
  const VideoSelectionWrapper = _styledComponents.default.div`
74
84
  overflow: auto;
75
85
  margin-top: 10px;
@@ -80,7 +90,7 @@ const VideoGridsWrapper = _styledComponents.default.div`
80
90
  overflow: auto;
81
91
  `;
82
92
  const VideoGridWrapper = _styledComponents.default.div`
83
- flex: 0 0 33.3333%;
93
+ width: 33.3333%;
84
94
  cursor: pointer;
85
95
  padding: 0 10px 10px;
86
96
  `;
@@ -90,7 +100,7 @@ const VideoMetaGridsWrapper = _styledComponents.default.div`
90
100
  overflow: auto;
91
101
  `;
92
102
  const VideoMetaGridWrapper = _styledComponents.default.div`
93
- flex: 0 0 33.3333%;
103
+ width: 33.3333%;
94
104
  cursor: pointer;
95
105
  padding: 0 10px 10px;
96
106
  `;
@@ -98,7 +108,7 @@ const Video = _styledComponents.default.video`
98
108
  display: block;
99
109
  width: 100%;
100
110
  aspect-ratio: 2;
101
- object-fit: cover;
111
+ object-fit: contain;
102
112
  `;
103
113
  const SeparationLine = _styledComponents.default.div`
104
114
  border: #e1e5e9 1px solid;
@@ -230,6 +240,7 @@ function VideoSelector(props) {
230
240
 
231
241
  const [searchText, setSearchText] = (0, _react.useState)('');
232
242
  const [selected, setSelected] = (0, _react.useState)([]);
243
+ const [showVideoUploader, setShowVideoUploader] = (0, _react.useState)(false);
233
244
  const pageSize = 6;
234
245
  const {
235
246
  onChange
@@ -248,6 +259,14 @@ function VideoSelector(props) {
248
259
  setCurrentPage(1);
249
260
  };
250
261
 
262
+ const onVideoUploaderChange = video => {
263
+ if (video) setSelected(prev => [...prev, {
264
+ video,
265
+ desc: ''
266
+ }]);
267
+ setShowVideoUploader(false);
268
+ };
269
+
251
270
  const onVideoMetaChange = videoEntityWithMeta => {
252
271
  setSelected([videoEntityWithMeta]);
253
272
  };
@@ -325,10 +344,14 @@ function VideoSelector(props) {
325
344
  }
326
345
  },
327
346
  width: "narrow"
328
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(VideoSearchBox, {
347
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(CustomButton, {
348
+ onClick: () => setShowVideoUploader(true)
349
+ }, "\u4E0A\u50B3\u5F71\u7247"), /*#__PURE__*/_react.default.createElement(VideoSearchBox, {
329
350
  onChange: onSearchBoxChange
330
351
  }), /*#__PURE__*/_react.default.createElement(VideoSelectionWrapper, null, /*#__PURE__*/_react.default.createElement("div", null, searchResult), !!selected.length && /*#__PURE__*/_react.default.createElement(SeparationLine, null), /*#__PURE__*/_react.default.createElement(VideoMetaGrids, {
331
352
  videoMetas: selected,
332
353
  onChange: onVideoMetaChange
333
- }))))));
354
+ }))))), showVideoUploader && /*#__PURE__*/_react.default.createElement(_videoUploader.VideoUploader, {
355
+ onChange: onVideoUploaderChange
356
+ }));
334
357
  }