@pie-lib/editable-html 9.3.1-next.39 → 9.3.1-next.53

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.
Files changed (74) hide show
  1. package/lib/editor.js +114 -244
  2. package/lib/editor.js.map +1 -1
  3. package/lib/index.js +5 -51
  4. package/lib/index.js.map +1 -1
  5. package/lib/parse-html.js +6 -5
  6. package/lib/parse-html.js.map +1 -1
  7. package/lib/plugins/characters/custom-popper.js +2 -12
  8. package/lib/plugins/characters/custom-popper.js.map +1 -1
  9. package/lib/plugins/characters/index.js +3 -50
  10. package/lib/plugins/characters/index.js.map +1 -1
  11. package/lib/plugins/characters/utils.js.map +1 -1
  12. package/lib/plugins/image/alt-dialog.js +0 -26
  13. package/lib/plugins/image/alt-dialog.js.map +1 -1
  14. package/lib/plugins/image/component.js +29 -82
  15. package/lib/plugins/image/component.js.map +1 -1
  16. package/lib/plugins/image/image-toolbar.js +7 -45
  17. package/lib/plugins/image/image-toolbar.js.map +1 -1
  18. package/lib/plugins/image/index.js +2 -41
  19. package/lib/plugins/image/index.js.map +1 -1
  20. package/lib/plugins/image/insert-image-handler.js +2 -22
  21. package/lib/plugins/image/insert-image-handler.js.map +1 -1
  22. package/lib/plugins/index.js +13 -34
  23. package/lib/plugins/index.js.map +1 -1
  24. package/lib/plugins/list/index.js +13 -42
  25. package/lib/plugins/list/index.js.map +1 -1
  26. package/lib/plugins/math/index.js +30 -75
  27. package/lib/plugins/math/index.js.map +1 -1
  28. package/lib/plugins/media/index.js +18 -75
  29. package/lib/plugins/media/index.js.map +1 -1
  30. package/lib/plugins/media/media-dialog.js +100 -188
  31. package/lib/plugins/media/media-dialog.js.map +1 -1
  32. package/lib/plugins/media/media-toolbar.js +4 -24
  33. package/lib/plugins/media/media-toolbar.js.map +1 -1
  34. package/lib/plugins/media/media-wrapper.js +5 -29
  35. package/lib/plugins/media/media-wrapper.js.map +1 -1
  36. package/lib/plugins/respArea/drag-in-the-blank/choice.js +10 -50
  37. package/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -1
  38. package/lib/plugins/respArea/drag-in-the-blank/index.js +4 -18
  39. package/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -1
  40. package/lib/plugins/respArea/explicit-constructed-response/index.js +2 -8
  41. package/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -1
  42. package/lib/plugins/respArea/icons/index.js +1 -18
  43. package/lib/plugins/respArea/icons/index.js.map +1 -1
  44. package/lib/plugins/respArea/index.js +1 -47
  45. package/lib/plugins/respArea/index.js.map +1 -1
  46. package/lib/plugins/respArea/inline-dropdown/index.js +1 -8
  47. package/lib/plugins/respArea/inline-dropdown/index.js.map +1 -1
  48. package/lib/plugins/respArea/utils.js +0 -22
  49. package/lib/plugins/respArea/utils.js.map +1 -1
  50. package/lib/plugins/table/icons/index.js +0 -7
  51. package/lib/plugins/table/icons/index.js.map +1 -1
  52. package/lib/plugins/table/index.js +15 -94
  53. package/lib/plugins/table/index.js.map +1 -1
  54. package/lib/plugins/table/table-toolbar.js +11 -43
  55. package/lib/plugins/table/table-toolbar.js.map +1 -1
  56. package/lib/plugins/toolbar/default-toolbar.js +8 -30
  57. package/lib/plugins/toolbar/default-toolbar.js.map +1 -1
  58. package/lib/plugins/toolbar/done-button.js +1 -9
  59. package/lib/plugins/toolbar/done-button.js.map +1 -1
  60. package/lib/plugins/toolbar/editor-and-toolbar.js +18 -48
  61. package/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -1
  62. package/lib/plugins/toolbar/index.js +0 -5
  63. package/lib/plugins/toolbar/index.js.map +1 -1
  64. package/lib/plugins/toolbar/toolbar-buttons.js +8 -39
  65. package/lib/plugins/toolbar/toolbar-buttons.js.map +1 -1
  66. package/lib/plugins/toolbar/toolbar.js +19 -67
  67. package/lib/plugins/toolbar/toolbar.js.map +1 -1
  68. package/lib/plugins/utils.js +0 -15
  69. package/lib/plugins/utils.js.map +1 -1
  70. package/lib/serialization.js +8 -69
  71. package/lib/serialization.js.map +1 -1
  72. package/lib/theme.js.map +1 -1
  73. package/package.json +3 -3
  74. package/src/plugins/media/index.jsx +0 -1
@@ -1,101 +1,61 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = exports.MediaDialog = void 0;
9
-
10
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
-
14
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
-
16
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
-
18
12
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
19
-
20
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
21
-
22
14
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
23
-
24
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
25
-
26
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
27
-
28
17
  var _react = _interopRequireDefault(require("react"));
29
-
30
18
  var _propTypes = _interopRequireDefault(require("prop-types"));
31
-
32
19
  var _debug = _interopRequireDefault(require("debug"));
33
-
34
20
  var _renderUi = require("@pie-lib/render-ui");
35
-
36
21
  var _styles = require("@material-ui/core/styles");
37
-
38
22
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
39
-
40
23
  var _Dialog = _interopRequireDefault(require("@material-ui/core/Dialog"));
41
-
42
24
  var _Tabs = _interopRequireDefault(require("@material-ui/core/Tabs"));
43
-
44
25
  var _Tab = _interopRequireDefault(require("@material-ui/core/Tab"));
45
-
46
26
  var _DialogTitle = _interopRequireDefault(require("@material-ui/core/DialogTitle"));
47
-
48
27
  var _DialogContent = _interopRequireDefault(require("@material-ui/core/DialogContent"));
49
-
50
28
  var _DialogContentText = _interopRequireDefault(require("@material-ui/core/DialogContentText"));
51
-
52
29
  var _DialogActions = _interopRequireDefault(require("@material-ui/core/DialogActions"));
53
-
54
30
  var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
55
-
56
31
  var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
57
-
58
32
  var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
59
-
60
33
  var _Delete = _interopRequireDefault(require("@material-ui/icons/Delete"));
61
-
62
34
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
63
-
64
35
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
65
-
66
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
67
-
68
37
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
69
-
70
38
  var log = (0, _debug["default"])('@pie-lib:editable-html:plugins:media:dialog');
71
-
72
39
  var matchYoutubeUrl = function matchYoutubeUrl(url) {
73
40
  if (!url) {
74
41
  return false;
75
42
  }
76
-
77
43
  var p = /^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
78
-
79
44
  if (url.match(p)) {
80
45
  return url.match(p)[1];
81
46
  }
82
-
83
47
  return false;
84
48
  };
85
-
86
49
  var matchVimeoUrl = function matchVimeoUrl(url) {
87
50
  return url && /(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(url);
88
51
  };
89
-
90
52
  var matchSoundCloudUrl = function matchSoundCloudUrl(url) {
91
53
  if (!url) {
92
54
  return false;
93
55
  }
94
-
95
56
  var regexp = /^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;
96
57
  return url.match(regexp) && url.match(regexp)[2];
97
58
  };
98
-
99
59
  var makeApiRequest = function makeApiRequest(url) {
100
60
  return new Promise(function (resolve) {
101
61
  try {
@@ -115,71 +75,57 @@ var makeApiRequest = function makeApiRequest(url) {
115
75
  }
116
76
  });
117
77
  };
118
-
119
78
  var typeMap = {
120
79
  video: 'Video',
121
80
  audio: 'Audio'
122
81
  };
123
-
124
82
  var MediaDialog = /*#__PURE__*/function (_React$Component) {
125
83
  (0, _inherits2["default"])(MediaDialog, _React$Component);
126
-
127
84
  var _super = _createSuper(MediaDialog);
128
-
129
85
  function MediaDialog(props) {
130
86
  var _this;
131
-
132
87
  (0, _classCallCheck2["default"])(this, MediaDialog);
133
88
  _this = _super.call(this, props);
134
89
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "formatUrl", function () {
135
90
  var _this$state = _this.state,
136
- url = _this$state.url,
137
- urlToUse = _this$state.urlToUse,
138
- starts = _this$state.starts,
139
- ends = _this$state.ends;
91
+ url = _this$state.url,
92
+ urlToUse = _this$state.urlToUse,
93
+ starts = _this$state.starts,
94
+ ends = _this$state.ends;
140
95
  var isYoutube = matchYoutubeUrl(url);
141
96
  var isVimeo = matchVimeoUrl(url);
142
97
  var formattedUrl = urlToUse;
143
-
144
98
  if ((isYoutube || isVimeo) && urlToUse) {
145
99
  var params = [];
146
100
  var paramName;
147
101
  var paramStart;
148
-
149
102
  switch (true) {
150
103
  case isVimeo:
151
104
  paramName = 't';
152
105
  paramStart = '#';
153
106
  break;
154
-
155
107
  case isYoutube:
156
108
  paramName = 'start';
157
109
  paramStart = '?';
158
110
  break;
159
-
160
111
  default:
161
112
  paramName = 'start';
162
113
  paramStart = '?';
163
114
  }
164
-
165
115
  if (starts) {
166
116
  params.push("".concat(paramName, "=").concat(starts));
167
117
  }
168
-
169
118
  if (ends) {
170
119
  params.push("end=".concat(ends));
171
120
  }
172
-
173
121
  formattedUrl = "".concat(urlToUse).concat(params.length ? paramStart : '').concat(params.join('&'));
174
122
  }
175
-
176
123
  var callback = function callback() {
177
124
  return _this.setState({
178
125
  formattedUrl: formattedUrl,
179
126
  updating: false
180
127
  });
181
128
  };
182
-
183
129
  _this.setState({
184
130
  formattedUrl: null,
185
131
  updating: true
@@ -190,10 +136,8 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
190
136
  });
191
137
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "urlChange", function (e) {
192
138
  var _ref = e.target || {},
193
- value = _ref.value;
194
-
139
+ value = _ref.value;
195
140
  var type = _this.props.type;
196
-
197
141
  if (type && type === 'audio') {
198
142
  if (matchSoundCloudUrl(value)) {
199
143
  makeApiRequest(value).then(function (urlToUse) {
@@ -212,34 +156,26 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
212
156
  var id = match[2];
213
157
  var urlToUse = "https://youtube.com/embed/".concat(id);
214
158
  log('is youtube');
215
-
216
159
  _this.handleStateChange({
217
160
  urlToUse: urlToUse,
218
161
  url: value,
219
162
  invalid: false
220
163
  });
221
-
222
164
  return;
223
165
  }
224
-
225
166
  if (matchVimeoUrl(value)) {
226
167
  var _id = value.replace(/.*vimeo.com\/(.*)/g, '$1');
227
-
228
168
  var _urlToUse2 = "https://player.vimeo.com/video/".concat(_id);
229
-
230
169
  log('is vimeo');
231
-
232
170
  _this.handleStateChange({
233
171
  urlToUse: _urlToUse2,
234
172
  url: value,
235
173
  ends: null,
236
174
  invalid: false
237
175
  });
238
-
239
176
  return;
240
177
  }
241
178
  }
242
-
243
179
  _this.handleStateChange({
244
180
  urlToUse: null,
245
181
  url: null,
@@ -254,25 +190,23 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
254
190
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleDone", function (val) {
255
191
  var handleClose = _this.props.handleClose;
256
192
  var _this$state2 = _this.state,
257
- tabValue = _this$state2.tabValue,
258
- fileUpload = _this$state2.fileUpload;
193
+ tabValue = _this$state2.tabValue,
194
+ fileUpload = _this$state2.fileUpload;
259
195
  var isInsertURL = tabValue === 0;
260
-
261
196
  if (!val) {
262
197
  if (fileUpload.url) {
263
198
  _this.handleRemoveFile();
264
199
  }
265
-
266
200
  handleClose(val);
267
201
  } else if (isInsertURL) {
268
202
  var _this$state3 = _this.state,
269
- ends = _this$state3.ends,
270
- height = _this$state3.height,
271
- url = _this$state3.url,
272
- urlToUse = _this$state3.urlToUse,
273
- formattedUrl = _this$state3.formattedUrl,
274
- starts = _this$state3.starts,
275
- width = _this$state3.width;
203
+ ends = _this$state3.ends,
204
+ height = _this$state3.height,
205
+ url = _this$state3.url,
206
+ urlToUse = _this$state3.urlToUse,
207
+ formattedUrl = _this$state3.formattedUrl,
208
+ starts = _this$state3.starts,
209
+ width = _this$state3.width;
276
210
  handleClose(val, {
277
211
  tag: 'iframe',
278
212
  ends: ends,
@@ -294,111 +228,95 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
294
228
  var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(e) {
295
229
  var fileChosen, reader;
296
230
  return _regenerator["default"].wrap(function _callee$(_context) {
297
- while (1) {
298
- switch (_context.prev = _context.next) {
299
- case 0:
300
- e.preventDefault();
301
-
231
+ while (1) switch (_context.prev = _context.next) {
232
+ case 0:
233
+ e.preventDefault();
234
+ _this.setState({
235
+ fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
236
+ error: null,
237
+ loading: true
238
+ })
239
+ });
240
+ fileChosen = e.target.files[0];
241
+ reader = new FileReader();
242
+ reader.onload = function () {
243
+ var dataURL = reader.result;
302
244
  _this.setState({
303
245
  fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
304
- error: null,
305
- loading: true
246
+ url: dataURL
306
247
  })
307
248
  });
308
-
309
- fileChosen = e.target.files[0];
310
- reader = new FileReader();
311
-
312
- reader.onload = function () {
313
- var dataURL = reader.result;
314
-
315
- _this.setState({
316
- fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
317
- url: dataURL
318
- })
319
- });
320
- };
321
-
322
- reader.readAsDataURL(fileChosen);
323
-
324
- _this.props.uploadSoundSupport.add({
325
- fileChosen: fileChosen,
326
- done: function done(err, src) {
327
- log('done: err:', err);
328
-
329
- if (err) {
330
- //eslint-disable-next-line
331
- console.log(err);
332
-
333
- _this.setState({
334
- fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
335
- loading: false,
336
- error: err
337
- })
338
- });
339
- } else {
340
- _this.setState({
341
- fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
342
- loading: false,
343
- url: src
344
- })
345
- });
346
- }
249
+ };
250
+ reader.readAsDataURL(fileChosen);
251
+ _this.props.uploadSoundSupport.add({
252
+ fileChosen: fileChosen,
253
+ done: function done(err, src) {
254
+ log('done: err:', err);
255
+ if (err) {
256
+ //eslint-disable-next-line
257
+ console.log(err);
258
+ _this.setState({
259
+ fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
260
+ loading: false,
261
+ error: err
262
+ })
263
+ });
264
+ } else {
265
+ _this.setState({
266
+ fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
267
+ loading: false,
268
+ url: src
269
+ })
270
+ });
347
271
  }
348
- });
349
-
350
- case 7:
351
- case "end":
352
- return _context.stop();
353
- }
272
+ }
273
+ });
274
+ case 7:
275
+ case "end":
276
+ return _context.stop();
354
277
  }
355
278
  }, _callee);
356
279
  }));
357
-
358
280
  return function (_x) {
359
281
  return _ref2.apply(this, arguments);
360
282
  };
361
283
  }());
362
284
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleRemoveFile", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
363
285
  return _regenerator["default"].wrap(function _callee2$(_context2) {
364
- while (1) {
365
- switch (_context2.prev = _context2.next) {
366
- case 0:
367
- _this.props.uploadSoundSupport["delete"](_this.state.fileUpload.url, function (err) {
368
- if (err) {
369
- //eslint-disable-next-line
370
- console.log(err);
371
-
372
- _this.setState({
373
- fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
374
- error: err
375
- })
376
- });
377
- }
378
- }); // we should put it inside uploadSoundSupport.delete but we can leave it here for testing purposes
379
-
380
-
381
- _this.setState({
382
- fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
383
- loading: false,
384
- url: ''
385
- })
386
- });
286
+ while (1) switch (_context2.prev = _context2.next) {
287
+ case 0:
288
+ _this.props.uploadSoundSupport["delete"](_this.state.fileUpload.url, function (err) {
289
+ if (err) {
290
+ //eslint-disable-next-line
291
+ console.log(err);
292
+ _this.setState({
293
+ fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
294
+ error: err
295
+ })
296
+ });
297
+ }
298
+ });
387
299
 
388
- case 2:
389
- case "end":
390
- return _context2.stop();
391
- }
300
+ // we should put it inside uploadSoundSupport.delete but we can leave it here for testing purposes
301
+ _this.setState({
302
+ fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
303
+ loading: false,
304
+ url: ''
305
+ })
306
+ });
307
+ case 2:
308
+ case "end":
309
+ return _context2.stop();
392
310
  }
393
311
  }, _callee2);
394
312
  })));
395
313
  var _src = props.src,
396
- _starts = props.starts,
397
- _ends = props.ends,
398
- _height = props.height,
399
- _url = props.url,
400
- _urlToUse = props.urlToUse,
401
- _width = props.width;
314
+ _starts = props.starts,
315
+ _ends = props.ends,
316
+ _height = props.height,
317
+ _url = props.url,
318
+ _urlToUse = props.urlToUse,
319
+ _width = props.width;
402
320
  _this.state = {
403
321
  ends: _ends || 0,
404
322
  url: _url,
@@ -417,7 +335,6 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
417
335
  };
418
336
  return _this;
419
337
  }
420
-
421
338
  (0, _createClass2["default"])(MediaDialog, [{
422
339
  key: "componentDidMount",
423
340
  value: function componentDidMount() {
@@ -433,25 +350,24 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
433
350
  key: "render",
434
351
  value: function render() {
435
352
  var _this2 = this;
436
-
437
353
  var _this$props = this.props,
438
- classes = _this$props.classes,
439
- open = _this$props.open,
440
- disablePortal = _this$props.disablePortal,
441
- type = _this$props.type,
442
- edit = _this$props.edit,
443
- uploadSoundSupport = _this$props.uploadSoundSupport;
354
+ classes = _this$props.classes,
355
+ open = _this$props.open,
356
+ disablePortal = _this$props.disablePortal,
357
+ type = _this$props.type,
358
+ edit = _this$props.edit,
359
+ uploadSoundSupport = _this$props.uploadSoundSupport;
444
360
  var _this$state4 = this.state,
445
- ends = _this$state4.ends,
446
- height = _this$state4.height,
447
- invalid = _this$state4.invalid,
448
- starts = _this$state4.starts,
449
- width = _this$state4.width,
450
- url = _this$state4.url,
451
- formattedUrl = _this$state4.formattedUrl,
452
- updating = _this$state4.updating,
453
- tabValue = _this$state4.tabValue,
454
- fileUpload = _this$state4.fileUpload;
361
+ ends = _this$state4.ends,
362
+ height = _this$state4.height,
363
+ invalid = _this$state4.invalid,
364
+ starts = _this$state4.starts,
365
+ width = _this$state4.width,
366
+ url = _this$state4.url,
367
+ formattedUrl = _this$state4.formattedUrl,
368
+ updating = _this$state4.updating,
369
+ tabValue = _this$state4.tabValue,
370
+ fileUpload = _this$state4.fileUpload;
455
371
  var isYoutube = matchYoutubeUrl(url);
456
372
  var isInsertURL = tabValue === 0;
457
373
  var isUploadMedia = tabValue === 1;
@@ -584,7 +500,6 @@ var MediaDialog = /*#__PURE__*/function (_React$Component) {
584
500
  }]);
585
501
  return MediaDialog;
586
502
  }(_react["default"].Component);
587
-
588
503
  exports.MediaDialog = MediaDialog;
589
504
  (0, _defineProperty2["default"])(MediaDialog, "propTypes", {
590
505
  classes: _propTypes["default"].object.isRequired,
@@ -605,7 +520,6 @@ exports.MediaDialog = MediaDialog;
605
520
  height: _propTypes["default"].number,
606
521
  width: _propTypes["default"].number
607
522
  });
608
-
609
523
  var styles = function styles() {
610
524
  return {
611
525
  paper: {
@@ -638,8 +552,6 @@ var styles = function styles() {
638
552
  }
639
553
  };
640
554
  };
641
-
642
555
  var _default = (0, _styles.withStyles)(styles)(MediaDialog);
643
-
644
556
  exports["default"] = _default;
645
557
  //# sourceMappingURL=media-dialog.js.map