@seafile/sdoc-editor 0.1.149 → 0.1.150

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.
@@ -87,6 +87,15 @@ var SeafileAPI = /*#__PURE__*/function () {
87
87
  var url = 'api/v2.1/seadoc/dir/' + docUuid + '/?p=' + p + '&doc_uuid=' + docUuid;
88
88
  return this.req.get(url);
89
89
  }
90
+ }, {
91
+ key: "asyncCopyImages",
92
+ value: function asyncCopyImages(docUuid, originDocUuid, imageList) {
93
+ var url = '/api/v2.1/seadoc/async-copy-images/' + docUuid + '/';
94
+ return this.req.post(url, {
95
+ origin_doc_uuid: originDocUuid,
96
+ image_list: imageList
97
+ });
98
+ }
90
99
  }]);
91
100
  return SeafileAPI;
92
101
  }();
@@ -3,6 +3,7 @@ export var INTERNAL_EVENT = {
3
3
  SET_TABLE_SELECT_RANGE: 'set_table_select_range',
4
4
  HIDDEN_CODE_BLOCK_HOVER_MENU: 'hidden_code_block_hover_menu',
5
5
  ON_MOUSE_ENTER_BLOCK: 'on_mouse_enter_block',
6
- INSERT_ELEMENT: 'insert_element'
6
+ INSERT_ELEMENT: 'insert_element',
7
+ OUTLINE_STATE_CHANGED: 'outline_state_changed'
7
8
  };
8
9
  export var PAGE_EDIT_AREA_WIDTH = 672; // 672 = 794 - 2[borderLeft + borderRight] - 120[paddingLeft + paddingRight]
@@ -1,12 +1,11 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import React, { useCallback, useEffect, useState, useRef } from 'react';
3
- import InsertWebImageDialog from '../../plugins/image/dialogs/insert-web-image-dialog';
4
3
  import CustomTableSizeDialog from '../../plugins/table/dialog/custom-table-size-dialog';
5
4
  import AddLinkDialog from '../../plugins/link/dialog/add-link-dialog';
6
5
  import SelectSdocFileDialog from '../../plugins/sdoc-link/dialog/select-sdoc-file-dialog';
7
6
  import EventBus from '../../../utils/event-bus';
8
7
  import { INTERNAL_EVENT } from '../../../constants';
9
- import { ELEMENT_TYPE, INSERT_POSITION, INSERT_IMAGE_TYPE } from '../../constants';
8
+ import { ELEMENT_TYPE, INSERT_POSITION, LOCAL_IMAGE } from '../../constants';
10
9
  import context from '../../../../context';
11
10
  import { insertImage } from '../../plugins/image/helpers';
12
11
  var InsertElementDialog = function InsertElementDialog(_ref) {
@@ -57,7 +56,7 @@ var InsertElementDialog = function InsertElementDialog(_ref) {
57
56
  setSlateNode(slateNode);
58
57
  setElement(element);
59
58
  setDialogType(type);
60
- if (type === INSERT_IMAGE_TYPE.LOCAL_IMAGE) {
59
+ if (type === LOCAL_IMAGE) {
61
60
  setTimeout(function () {
62
61
  uploadLocalImageInputRef.current && uploadLocalImageInputRef.current.click();
63
62
  }, 0);
@@ -89,11 +88,7 @@ var InsertElementDialog = function InsertElementDialog(_ref) {
89
88
  {
90
89
  return /*#__PURE__*/React.createElement(SelectSdocFileDialog, props);
91
90
  }
92
- case INSERT_IMAGE_TYPE.WEB_IMAGE:
93
- {
94
- return /*#__PURE__*/React.createElement(InsertWebImageDialog, props);
95
- }
96
- case INSERT_IMAGE_TYPE.LOCAL_IMAGE:
91
+ case LOCAL_IMAGE:
97
92
  {
98
93
  return /*#__PURE__*/React.createElement("input", {
99
94
  ref: uploadLocalImageInputRef,
@@ -236,10 +236,7 @@ export var INSERT_POSITION = {
236
236
  CURRENT: 'current',
237
237
  AFTER: 'after'
238
238
  };
239
- export var INSERT_IMAGE_TYPE = {
240
- LOCAL_IMAGE: 'local-image',
241
- WEB_IMAGE: 'web-image'
242
- };
239
+ export var LOCAL_IMAGE = 'local-image';
243
240
  export var LIST_ITEM_CORRELATION_TYPE = ['unordered_list', 'ordered_list', 'list-item'];
244
241
  export var LIST_ITEM_SUPPORTED_TRANSFORMATION = ['unordered_list', 'ordered_list', 'left', 'center', 'right', 'blockquote'];
245
242
  export { BLOCKQUOTE, HEADER, TITLE, SUBTITLE, HEADER1, HEADER2, HEADER3, HEADER4, HEADER5, HEADER6, PARAGRAPH, BOLD, ITALIC, UNDERLINE, STRIKETHROUGH, SUPERSCRIPT, SUBSCRIPT, ORDERED_LIST, UNORDERED_LIST, LIST_ITEM, LIST_LIC, CHECK_LIST, CHECK_LIST_ITEM, LINK, HTML, CODE_BLOCK, CODE_LINE, IMAGE, TABLE, TABLE_CELL, TABLE_ROW, FORMULA, COLUMN, TEXT_STYLE, TEXT_STYLE_MORE, BOLD_ITALIC, TEXT_ALIGN, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ELEMENT_TYPE, KEYBOARD, MAC_HOTKEYS, WIN_HOTKEYS, DEFAULT_COLORS, STANDARD_COLORS, DEFAULT_RECENT_USED_LIST, CLEAR_FORMAT, DEFAULT_FONT_COLOR, RECENT_USED_HIGHLIGHT_COLORS_KEY, RECENT_USED_FONT_COLORS_KEY, RECENT_USED_TABLE_CELL_BG_COLORS_KEY, DEFAULT_LAST_USED_FONT_COLOR, DEFAULT_LAST_USED_HIGHLIGHT_COLOR, DEFAULT_LAST_USED_TABLE_CELL_BG_COLOR, FONT_SIZE, DEFAULT_FONT, FONT, GOOGLE_FONT_CLASS, RECENT_USED_FONTS_KEY, SDOC_FONT_SIZE, SDOC_LINK };
@@ -471,4 +471,25 @@ export var isLastNode = function isLastNode(editor, node) {
471
471
  var editorChildren = editor.children || [];
472
472
  var editorChildrenLength = editorChildren.length;
473
473
  return editorChildren[editorChildrenLength - 1] === node;
474
+ };
475
+ export var isHasImg = function isHasImg(editor) {
476
+ var hasImg = false;
477
+ var _iterator5 = _createForOfIteratorHelper(Editor.nodes(editor, {
478
+ at: editor.selection
479
+ })),
480
+ _step5;
481
+ try {
482
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
483
+ var _step5$value = _slicedToArray(_step5.value, 1),
484
+ node = _step5$value[0];
485
+ if ((node === null || node === void 0 ? void 0 : node.type) === 'image') {
486
+ hasImg = true;
487
+ }
488
+ }
489
+ } catch (err) {
490
+ _iterator5.e(err);
491
+ } finally {
492
+ _iterator5.f();
493
+ }
494
+ return hasImg;
474
495
  };
@@ -32,9 +32,11 @@ export var isInsertImageMenuDisabled = function isInsertImageMenuDisabled(editor
32
32
  };
33
33
  export var generateImageNode = function generateImageNode(src) {
34
34
  var element = generateEmptyElement(IMAGE);
35
+ var docUuid = context.getSetting('docUuid');
35
36
  return _objectSpread(_objectSpread({}, element), {}, {
36
37
  data: {
37
- src: src
38
+ src: src,
39
+ origin_doc_uuid: docUuid
38
40
  }
39
41
  });
40
42
  };
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { UncontrolledPopover } from 'reactstrap';
4
4
  import { isInsertImageMenuDisabled } from '../helpers';
5
- import { IMAGE, MENUS_CONFIG_MAP, INSERT_IMAGE_TYPE } from '../../../constants';
5
+ import { IMAGE, MENUS_CONFIG_MAP, LOCAL_IMAGE } from '../../../constants';
6
6
  import DropdownMenuItem from '../../../commons/dropdown-menu-item';
7
7
  import { INTERNAL_EVENT } from '../../../../constants';
8
8
  var ImageMenu = function ImageMenu(_ref) {
@@ -15,16 +15,9 @@ var ImageMenu = function ImageMenu(_ref) {
15
15
  t = _useTranslation.t;
16
16
  var openInsertLocalImage = useCallback(function () {
17
17
  eventBus.dispatch(INTERNAL_EVENT.INSERT_ELEMENT, {
18
- type: INSERT_IMAGE_TYPE.LOCAL_IMAGE
18
+ type: LOCAL_IMAGE
19
19
  });
20
20
  }, [eventBus]);
21
- var openInsertWebImageDialog = useCallback(function () {
22
- eventBus.dispatch(INTERNAL_EVENT.INSERT_ELEMENT, {
23
- type: INSERT_IMAGE_TYPE.WEB_IMAGE
24
- });
25
-
26
- // eslint-disable-next-line react-hooks/exhaustive-deps
27
- }, [eventBus]);
28
21
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownMenuItem, {
29
22
  disabled: disabled,
30
23
  menuConfig: menuConfig,
@@ -41,9 +34,6 @@ var ImageMenu = function ImageMenu(_ref) {
41
34
  }, /*#__PURE__*/React.createElement("div", {
42
35
  className: "sdoc-insert-image-menu-popover-container sdoc-dropdown-menu-container"
43
36
  }, /*#__PURE__*/React.createElement("div", {
44
- className: "sdoc-dropdown-menu-item",
45
- onClick: openInsertWebImageDialog
46
- }, t('Insert_network_image')), /*#__PURE__*/React.createElement("div", {
47
37
  className: "sdoc-dropdown-menu-item",
48
38
  onClick: openInsertLocalImage
49
39
  }, t('Upload_local_image')))));
@@ -1,9 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import { Transforms, Path, Editor, Element } from '@seafile/slate';
3
3
  import context from '../../../../context';
4
- import { insertImage } from './helpers';
4
+ import { insertImage, copyImage } from './helpers';
5
5
  import { focusEditor } from '../../core';
6
- import { INSERT_POSITION } from '../../constants';
6
+ import { INSERT_POSITION, CLIPBOARD_FORMAT_KEY } from '../../constants';
7
7
  var withImage = function withImage(editor) {
8
8
  var isInline = editor.isInline,
9
9
  isVoid = editor.isVoid,
@@ -3,12 +3,17 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
4
  import _inherits from "@babel/runtime/helpers/esm/inherits";
5
5
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
- import { useSelected } from '@seafile/slate-react';
6
+ import { ReactEditor, useSelected } from '@seafile/slate-react';
7
+ import { Transforms } from '@seafile/slate';
7
8
  import React from 'react';
8
9
  import classNames from 'classnames';
9
10
  import { withTranslation } from 'react-i18next';
10
11
  import { getImageURL, updateImage } from './helpers';
11
12
  import ImagePreviewer from './dialogs/image-previewer';
13
+ import toaster from '../../../../components/toast';
14
+ import context from '../../../../context';
15
+ import { getErrorMsg } from '../../../../utils';
16
+ import imagePlaceholder from '../../../assets/images/image-placeholder.png';
12
17
  var Image = /*#__PURE__*/function (_React$Component) {
13
18
  _inherits(Image, _React$Component);
14
19
  var _super = _createSuper(Image);
@@ -82,26 +87,78 @@ var Image = /*#__PURE__*/function (_React$Component) {
82
87
  _this.state = {
83
88
  width: null,
84
89
  isResizing: false,
85
- isShowImagePreview: false
90
+ isShowImagePreview: false,
91
+ isShowImagePlaceholder: false
86
92
  };
87
93
  return _this;
88
94
  }
89
95
  _createClass(Image, [{
90
- key: "render",
91
- value: function render() {
96
+ key: "componentDidMount",
97
+ value: function componentDidMount() {
98
+ var _this2 = this;
99
+ var docUuid = context.getSetting('docUuid');
92
100
  var _this$props2 = this.props,
93
- className = _this$props2.className,
94
- attributes = _this$props2.attributes,
95
101
  element = _this$props2.element,
96
- children = _this$props2.children,
97
- isSelected = _this$props2.isSelected,
98
- t = _this$props2.t;
102
+ editor = _this$props2.editor;
103
+ var data = element.data;
104
+ var origin_doc_uuid = data.origin_doc_uuid,
105
+ src = data.src;
106
+
107
+ // Pictures are copied from other documents
108
+ if (origin_doc_uuid && origin_doc_uuid !== docUuid) {
109
+ this.setState({
110
+ isShowImagePlaceholder: true
111
+ });
112
+ var originDocUuid = origin_doc_uuid;
113
+ var imageList = [src.slice(1)];
114
+ context.copyImage(originDocUuid, imageList).then(function (res) {
115
+ if (res.status === 200) {
116
+ var path = ReactEditor.findPath(editor, element);
117
+ Transforms.setNodes(editor, {
118
+ data: _objectSpread(_objectSpread({}, data), {}, {
119
+ origin_doc_uuid: docUuid
120
+ })
121
+ }, {
122
+ at: path
123
+ });
124
+ _this2.setState({
125
+ isShowImagePlaceholder: false
126
+ });
127
+ }
128
+ }).catch(function (error) {
129
+ var errorMessage = getErrorMsg(error);
130
+ toaster.danger(errorMessage);
131
+ });
132
+ }
133
+ }
134
+ }, {
135
+ key: "render",
136
+ value: function render() {
137
+ var _this$props3 = this.props,
138
+ className = _this$props3.className,
139
+ attributes = _this$props3.attributes,
140
+ element = _this$props3.element,
141
+ children = _this$props3.children,
142
+ isSelected = _this$props3.isSelected,
143
+ t = _this$props3.t;
99
144
  var _this$state = this.state,
100
145
  isResizing = _this$state.isResizing,
101
- isShowImagePreview = _this$state.isShowImagePreview;
146
+ isShowImagePreview = _this$state.isShowImagePreview,
147
+ isShowImagePlaceholder = _this$state.isShowImagePlaceholder;
102
148
  var data = element.data;
103
149
  var imageClassName = isSelected ? 'image-selected' : '';
104
150
  var imageStyle = this.getImageStyle();
151
+ if (isShowImagePlaceholder) {
152
+ return /*#__PURE__*/React.createElement("span", Object.assign({
153
+ className: classNames('sdoc-image-wrapper', className)
154
+ }, attributes), /*#__PURE__*/React.createElement("img", {
155
+ ref: this.setImageRef,
156
+ src: imagePlaceholder,
157
+ style: imageStyle,
158
+ draggable: false,
159
+ alt: ""
160
+ }), children);
161
+ }
105
162
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", Object.assign({
106
163
  className: classNames('sdoc-image-wrapper', className)
107
164
  }, attributes), /*#__PURE__*/React.createElement("img", {
@@ -5,7 +5,7 @@ import { Transforms } from '@seafile/slate';
5
5
  import { insertTable } from '../../plugins/table/helpers';
6
6
  import TableSizePopover from '../../plugins/table/popover/table-size-popover';
7
7
  import { changeToCodeBlock } from '../../plugins/code-block/helpers';
8
- import { ELEMENT_TYPE, INSERT_POSITION, INSERT_IMAGE_TYPE, MENUS_CONFIG_MAP, LIST_ITEM } from '../../constants';
8
+ import { ELEMENT_TYPE, INSERT_POSITION, LOCAL_IMAGE, MENUS_CONFIG_MAP, LIST_ITEM } from '../../constants';
9
9
  import EventBus from '../../../utils/event-bus';
10
10
  import { INTERNAL_EVENT } from '../../../constants';
11
11
  import DropdownMenuItem from '../../commons/dropdown-menu-item';
@@ -19,7 +19,7 @@ var InsertBlockMenu = function InsertBlockMenu(_ref) {
19
19
  Transforms.select(editor, editor.selection.focus);
20
20
  }
21
21
  eventBus.dispatch(INTERNAL_EVENT.INSERT_ELEMENT, {
22
- type: INSERT_IMAGE_TYPE.LOCAL_IMAGE,
22
+ type: LOCAL_IMAGE,
23
23
  insertPosition: insertPosition,
24
24
  slateNode: slateNode
25
25
  });
@@ -1,7 +1,10 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { useCallback, useEffect, useRef, useState } from 'react';
4
+ import { INTERNAL_EVENT } from '../constants';
4
5
  import { useScrollContext } from '../hooks/use-scroll-context';
6
+ import EventBus from '../utils/event-bus';
7
+ import { getOutlineSetting } from '../outline';
5
8
  export default function ArticleContainer(_ref) {
6
9
  var editor = _ref.editor,
7
10
  children = _ref.children;
@@ -18,15 +21,21 @@ export default function ArticleContainer(_ref) {
18
21
  var handleWindowResize = useCallback(function () {
19
22
  var rect = scrollRef.current.getBoundingClientRect();
20
23
  var articleRect = articleRef.current.getBoundingClientRect();
21
- if ((rect.width - articleRect.width) / 2 < 280) {
24
+ // get state from local storage
25
+ var isShowOutline = getOutlineSetting();
26
+ if (isShowOutline && (rect.width - articleRect.width) / 2 < 280) {
22
27
  setContainerStyle({
23
28
  marginLeft: '280px'
24
29
  });
25
30
  } else {
26
31
  setContainerStyle({});
27
32
  }
28
- // eslint-disable-next-line react-hooks/exhaustive-deps
29
- }, []);
33
+ }, [scrollRef]);
34
+ useEffect(function () {
35
+ var eventBus = EventBus.getInstance();
36
+ var unsubscribeOutline = eventBus.subscribe(INTERNAL_EVENT.OUTLINE_STATE_CHANGED, handleWindowResize);
37
+ return unsubscribeOutline;
38
+ }, [handleWindowResize]);
30
39
  useEffect(function () {
31
40
  handleWindowResize();
32
41
  window.addEventListener('resize', handleWindowResize);
@@ -2,9 +2,11 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
3
3
  import { withTranslation } from 'react-i18next';
4
4
  import { UncontrolledTooltip } from 'reactstrap';
5
+ import { INTERNAL_EVENT } from '../constants';
6
+ import EventBus from '../utils/event-bus';
5
7
  import OutlineItem from './outline-item';
6
8
  import './style.css';
7
- var getOutlineSetting = function getOutlineSetting() {
9
+ export var getOutlineSetting = function getOutlineSetting() {
8
10
  var currentValue = localStorage.getItem('sdoc');
9
11
  var config = currentValue ? JSON.parse(currentValue) : {};
10
12
  var _config$outlineOpen = config.outlineOpen,
@@ -25,15 +27,19 @@ var SDocOutline = function SDocOutline(_ref) {
25
27
  _useState2 = _slicedToArray(_useState, 2),
26
28
  isShown = _useState2[0],
27
29
  setIsShown = _useState2[1];
28
- useEffect(function () {
29
- var outlineOpen = getOutlineSetting();
30
- setIsShown(outlineOpen);
31
- // eslint-disable-next-line react-hooks/exhaustive-deps
30
+ var updateOutlineState = useCallback(function (state) {
31
+ setIsShown(state);
32
+ setOutlineSetting(state);
33
+ var eventBus = EventBus.getInstance();
34
+ eventBus.dispatch(INTERNAL_EVENT.OUTLINE_STATE_CHANGED, state);
32
35
  }, []);
36
+ useEffect(function () {
37
+ var outlineState = getOutlineSetting();
38
+ updateOutlineState(outlineState);
39
+ }, [updateOutlineState]);
33
40
  var toggleShow = useCallback(function () {
34
- setIsShown(!isShown);
35
- setOutlineSetting(!isShown);
36
- }, [isShown]);
41
+ updateOutlineState(!isShown);
42
+ }, [isShown, updateOutlineState]);
37
43
  var list = useMemo(function () {
38
44
  return doc.filter(function (item) {
39
45
  return ['header1', 'header2', 'header3'].includes(item.type);
package/dist/context.js CHANGED
@@ -189,6 +189,12 @@ var Context = /*#__PURE__*/function () {
189
189
  var sdocServer = this.getSetting('serviceUrl');
190
190
  return sdocServer + '/api/v2.1/seadoc/file/' + docUuid + '/?doc_uuid=' + docUuid;
191
191
  }
192
+ }, {
193
+ key: "copyImage",
194
+ value: function copyImage(originDocUuid, imageList) {
195
+ var docUuid = this.getSetting('docUuid');
196
+ return this.api.asyncCopyImages(docUuid, originDocUuid, imageList);
197
+ }
192
198
  }]);
193
199
  return Context;
194
200
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "0.1.149",
3
+ "version": "0.1.150",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -1,58 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import React, { useCallback, useState } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
- import { Modal, ModalHeader, ModalBody, ModalFooter, FormGroup, Label, Input, Button } from 'reactstrap';
5
- import { insertImage } from '../helpers';
6
- var InsertWebImageDialog = function InsertWebImageDialog(_ref) {
7
- var editor = _ref.editor,
8
- insertPosition = _ref.insertPosition,
9
- closeDialog = _ref.closeDialog;
10
- var _useTranslation = useTranslation(),
11
- t = _useTranslation.t;
12
- var _useState = useState(''),
13
- _useState2 = _slicedToArray(_useState, 2),
14
- url = _useState2[0],
15
- setUrl = _useState2[1];
16
- var onValueChanged = useCallback(function (event) {
17
- var value = event.target.value;
18
- if (value === url) return;
19
- setUrl(value);
20
-
21
- // eslint-disable-next-line react-hooks/exhaustive-deps
22
- }, [url]);
23
- var onKeyDown = useCallback(function (event) {
24
- if (event.keyCode === 13) {
25
- submit();
26
- return;
27
- }
28
-
29
- // eslint-disable-next-line react-hooks/exhaustive-deps
30
- }, [url]);
31
- var submit = useCallback(function () {
32
- insertImage(editor, url, editor.selection, insertPosition);
33
- closeDialog();
34
-
35
- // eslint-disable-next-line react-hooks/exhaustive-deps
36
- }, [editor, url]);
37
- return /*#__PURE__*/React.createElement(Modal, {
38
- isOpen: true,
39
- toggle: closeDialog,
40
- autoFocus: false
41
- }, /*#__PURE__*/React.createElement(ModalHeader, null, t('Insert_image')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
42
- for: "insert_image"
43
- }, t('Image_address')), /*#__PURE__*/React.createElement(Input, {
44
- id: "insert_image",
45
- autoFocus: true,
46
- value: url,
47
- onChange: onValueChanged,
48
- onKeyDown: onKeyDown
49
- }))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
50
- color: "secondary",
51
- onClick: closeDialog
52
- }, t('Cancel')), /*#__PURE__*/React.createElement(Button, {
53
- color: "primary",
54
- disabled: url.length === 0,
55
- onClick: submit
56
- }, t('Submit'))));
57
- };
58
- export default InsertWebImageDialog;