@bigbinary/neeto-editor 1.40.0 → 1.40.1
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/dist/Attachments.js +17 -5
- package/dist/Attachments.js.map +1 -1
- package/dist/Editor.js +629 -508
- package/dist/Editor.js.map +1 -1
- package/dist/EditorContent.js +50 -41
- package/dist/EditorContent.js.map +1 -1
- package/dist/FormikEditor.js +91 -30
- package/dist/FormikEditor.js.map +1 -1
- package/dist/Menu.js +45 -5
- package/dist/Menu.js.map +1 -1
- package/dist/{chunk-b39dfdd8.js → chunk-27a003fe.js} +831 -708
- package/dist/{chunk-b39dfdd8.js.map → chunk-27a003fe.js.map} +1 -1
- package/dist/{chunk-6dabc0b1.js → chunk-54bb591c.js} +66 -43
- package/dist/{chunk-6dabc0b1.js.map → chunk-54bb591c.js.map} +1 -1
- package/dist/{chunk-52091cdb.js → chunk-91e5e60f.js} +186 -152
- package/dist/chunk-91e5e60f.js.map +1 -0
- package/dist/{chunk-c1e6a992.js → chunk-eafe8fe4.js} +24 -18
- package/dist/{chunk-c1e6a992.js.map → chunk-eafe8fe4.js.map} +1 -1
- package/dist/cjs/Attachments.cjs.js +17 -5
- package/dist/cjs/Attachments.cjs.js.map +1 -1
- package/dist/cjs/Editor.cjs.js +705 -548
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/EditorContent.cjs.js +61 -50
- package/dist/cjs/EditorContent.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +94 -33
- package/dist/cjs/FormikEditor.cjs.js.map +1 -1
- package/dist/cjs/Menu.cjs.js +45 -5
- package/dist/cjs/Menu.cjs.js.map +1 -1
- package/dist/cjs/{chunk-d12e89fd.cjs.js → chunk-242eea5e.cjs.js} +1033 -874
- package/dist/cjs/{chunk-d12e89fd.cjs.js.map → chunk-242eea5e.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-d0720eac.cjs.js → chunk-391e4970.cjs.js} +214 -170
- package/dist/cjs/chunk-391e4970.cjs.js.map +1 -0
- package/dist/cjs/{chunk-3777ae13.cjs.js → chunk-969db227.cjs.js} +88 -60
- package/dist/cjs/{chunk-3777ae13.cjs.js.map → chunk-969db227.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-76a5f21a.cjs.js → chunk-ae47a2a1.cjs.js} +41 -31
- package/dist/cjs/{chunk-76a5f21a.cjs.js.map → chunk-ae47a2a1.cjs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +65 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +65 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/chunk-52091cdb.js.map +0 -1
- package/dist/cjs/chunk-d0720eac.cjs.js.map +0 -1
package/dist/cjs/Editor.cjs.js
CHANGED
|
@@ -4,24 +4,29 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
4
4
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
5
5
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
6
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
7
|
-
var React
|
|
8
|
-
var Menu$3 = require('./chunk-
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var Menu$3 = require('./chunk-242eea5e.cjs.js');
|
|
9
9
|
var classnames = require('classnames');
|
|
10
10
|
var constants = require('./chunk-d5fbc51f.cjs.js');
|
|
11
11
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
12
12
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
13
|
-
var
|
|
13
|
+
var Label = require('@bigbinary/neetoui/Label');
|
|
14
14
|
var ramda = require('ramda');
|
|
15
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
15
16
|
var injectCss = require('./chunk-da9ee471.cjs.js');
|
|
16
17
|
var utils = require('./chunk-d8087848.cjs.js');
|
|
17
|
-
var
|
|
18
|
+
var Down = require('@bigbinary/neeto-icons/Down');
|
|
18
19
|
var CopyToClipboardButton = require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
20
|
+
var Dropdown = require('@bigbinary/neetoui/Dropdown');
|
|
21
|
+
var Input = require('@bigbinary/neetoui/Input');
|
|
19
22
|
var reactI18next = require('react-i18next');
|
|
20
23
|
var core$1 = require('./chunk-b4e271bc.cjs.js');
|
|
21
24
|
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
22
25
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
23
26
|
var ReactDOM = require('react-dom');
|
|
24
|
-
var
|
|
27
|
+
var MenuHorizontal = require('@bigbinary/neeto-icons/MenuHorizontal');
|
|
28
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
29
|
+
var FileIcon = require('./chunk-ae47a2a1.cjs.js');
|
|
25
30
|
var tippy = require('tippy.js');
|
|
26
31
|
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
27
32
|
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
@@ -29,22 +34,75 @@ var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstru
|
|
|
29
34
|
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
30
35
|
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
31
36
|
var emojiMart = require('emoji-mart');
|
|
37
|
+
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
32
38
|
var i18n = require('i18next');
|
|
33
39
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
34
|
-
var
|
|
40
|
+
var Toastr = require('@bigbinary/neetoui/Toastr');
|
|
41
|
+
var Close = require('@bigbinary/neeto-icons/Close');
|
|
42
|
+
var Modal = require('@bigbinary/neetoui/Modal');
|
|
43
|
+
var Avatar = require('@bigbinary/neetoui/Avatar');
|
|
44
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
35
45
|
var constants$1 = require('./chunk-8dbdfa81.cjs.js');
|
|
36
46
|
var Tippy = require('@tippyjs/react');
|
|
37
|
-
var
|
|
38
|
-
var
|
|
47
|
+
var Paragraph$1 = require('@bigbinary/neeto-icons/Paragraph');
|
|
48
|
+
var TextH1 = require('@bigbinary/neeto-icons/TextH1');
|
|
49
|
+
var TextH2 = require('@bigbinary/neeto-icons/TextH2');
|
|
50
|
+
var ListDot = require('@bigbinary/neeto-icons/ListDot');
|
|
51
|
+
var ListNumber = require('@bigbinary/neeto-icons/ListNumber');
|
|
52
|
+
var Blockquote$1 = require('@bigbinary/neeto-icons/Blockquote');
|
|
53
|
+
var ImageUpload = require('@bigbinary/neeto-icons/ImageUpload');
|
|
54
|
+
var CodeBlock$2 = require('@bigbinary/neeto-icons/CodeBlock');
|
|
55
|
+
var Smiley = require('@bigbinary/neeto-icons/Smiley');
|
|
56
|
+
var Minus = require('@bigbinary/neeto-icons/Minus');
|
|
57
|
+
var Video = require('@bigbinary/neeto-icons/Video');
|
|
58
|
+
var Text$2 = require('@bigbinary/neeto-icons/Text');
|
|
59
|
+
var Notes = require('@bigbinary/neeto-icons/Notes');
|
|
60
|
+
var MediaVideo = require('@bigbinary/neeto-icons/MediaVideo');
|
|
61
|
+
var Column = require('@bigbinary/neeto-icons/Column');
|
|
62
|
+
var DeleteRow = require('@bigbinary/neeto-icons/DeleteRow');
|
|
63
|
+
var DeleteColumn = require('@bigbinary/neeto-icons/DeleteColumn');
|
|
64
|
+
var DeleteTable = require('@bigbinary/neeto-icons/DeleteTable');
|
|
65
|
+
var InsertRow = require('@bigbinary/neeto-icons/InsertRow');
|
|
66
|
+
var InsertColumn = require('@bigbinary/neeto-icons/InsertColumn');
|
|
67
|
+
var MergeSplit = require('@bigbinary/neeto-icons/MergeSplit');
|
|
68
|
+
var ToggleHeaderRow = require('@bigbinary/neeto-icons/ToggleHeaderRow');
|
|
69
|
+
var Checkbox = require('@bigbinary/neetoui/Checkbox');
|
|
70
|
+
var Form = require('@bigbinary/neetoui/formik/Form');
|
|
71
|
+
var Input$1 = require('@bigbinary/neetoui/formik/Input');
|
|
72
|
+
var Attachments = require('./chunk-391e4970.cjs.js');
|
|
39
73
|
require('tippy.js/dist/svg-arrow.css');
|
|
74
|
+
require('@bigbinary/neeto-icons/Link');
|
|
40
75
|
require('@bigbinary/neeto-commons-frontend/utils');
|
|
76
|
+
require('@bigbinary/neeto-icons/Check');
|
|
77
|
+
require('@bigbinary/neeto-icons/Quote');
|
|
78
|
+
require('@bigbinary/neeto-icons/Attachment');
|
|
79
|
+
require('@bigbinary/neeto-icons/Code');
|
|
80
|
+
require('@bigbinary/neeto-icons/Highlight');
|
|
81
|
+
require('@bigbinary/neeto-icons/TextBold');
|
|
82
|
+
require('@bigbinary/neeto-icons/TextCross');
|
|
83
|
+
require('@bigbinary/neeto-icons/TextItalic');
|
|
84
|
+
require('@bigbinary/neeto-icons/Underline');
|
|
85
|
+
require('@bigbinary/neeto-icons/Undo');
|
|
86
|
+
require('@bigbinary/neeto-icons/Redo');
|
|
87
|
+
require('@bigbinary/neeto-icons/Email');
|
|
41
88
|
require('axios');
|
|
89
|
+
require('@bigbinary/neeto-icons/Customize');
|
|
90
|
+
require('@bigbinary/neeto-icons/Refresh');
|
|
42
91
|
require('react-colorful');
|
|
43
92
|
require('@bigbinary/neeto-molecules/DynamicVariables');
|
|
93
|
+
require('@bigbinary/neetoui/Tab');
|
|
94
|
+
require('@bigbinary/neetoui/Tooltip');
|
|
44
95
|
require('./chunk-1b36f0ca.cjs.js');
|
|
45
96
|
require('zustand/shallow');
|
|
46
97
|
require('zustand');
|
|
98
|
+
require('@bigbinary/neeto-icons/File');
|
|
47
99
|
require('yup');
|
|
100
|
+
require('@bigbinary/neeto-icons/LeftAlign');
|
|
101
|
+
require('@bigbinary/neeto-icons/CenterAlign');
|
|
102
|
+
require('@bigbinary/neeto-icons/RightAlign');
|
|
103
|
+
require('@bigbinary/neeto-icons/Delete');
|
|
104
|
+
require('@bigbinary/neeto-icons/MenuVertical');
|
|
105
|
+
require('@bigbinary/neetoui/Alert');
|
|
48
106
|
|
|
49
107
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
50
108
|
|
|
@@ -70,20 +128,56 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
70
128
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
71
129
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
72
130
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
73
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React
|
|
74
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React
|
|
131
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
132
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
75
133
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
134
|
+
var Label__default = /*#__PURE__*/_interopDefaultLegacy(Label);
|
|
135
|
+
var Down__default = /*#__PURE__*/_interopDefaultLegacy(Down);
|
|
76
136
|
var CopyToClipboardButton__default = /*#__PURE__*/_interopDefaultLegacy(CopyToClipboardButton);
|
|
137
|
+
var Dropdown__default = /*#__PURE__*/_interopDefaultLegacy(Dropdown);
|
|
138
|
+
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
|
|
77
139
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
78
140
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
141
|
+
var MenuHorizontal__default = /*#__PURE__*/_interopDefaultLegacy(MenuHorizontal);
|
|
142
|
+
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
79
143
|
var tippy__default = /*#__PURE__*/_interopDefaultLegacy(tippy);
|
|
80
144
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
81
145
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
82
146
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
83
147
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
84
148
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
85
|
-
var
|
|
149
|
+
var Spinner__default = /*#__PURE__*/_interopDefaultLegacy(Spinner);
|
|
150
|
+
var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
|
|
151
|
+
var Close__default = /*#__PURE__*/_interopDefaultLegacy(Close);
|
|
152
|
+
var Modal__default = /*#__PURE__*/_interopDefaultLegacy(Modal);
|
|
153
|
+
var Avatar__default = /*#__PURE__*/_interopDefaultLegacy(Avatar);
|
|
154
|
+
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
86
155
|
var Tippy__default = /*#__PURE__*/_interopDefaultLegacy(Tippy);
|
|
156
|
+
var Paragraph__default = /*#__PURE__*/_interopDefaultLegacy(Paragraph$1);
|
|
157
|
+
var TextH1__default = /*#__PURE__*/_interopDefaultLegacy(TextH1);
|
|
158
|
+
var TextH2__default = /*#__PURE__*/_interopDefaultLegacy(TextH2);
|
|
159
|
+
var ListDot__default = /*#__PURE__*/_interopDefaultLegacy(ListDot);
|
|
160
|
+
var ListNumber__default = /*#__PURE__*/_interopDefaultLegacy(ListNumber);
|
|
161
|
+
var Blockquote__default = /*#__PURE__*/_interopDefaultLegacy(Blockquote$1);
|
|
162
|
+
var ImageUpload__default = /*#__PURE__*/_interopDefaultLegacy(ImageUpload);
|
|
163
|
+
var CodeBlock__default = /*#__PURE__*/_interopDefaultLegacy(CodeBlock$2);
|
|
164
|
+
var Smiley__default = /*#__PURE__*/_interopDefaultLegacy(Smiley);
|
|
165
|
+
var Minus__default = /*#__PURE__*/_interopDefaultLegacy(Minus);
|
|
166
|
+
var Video__default = /*#__PURE__*/_interopDefaultLegacy(Video);
|
|
167
|
+
var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text$2);
|
|
168
|
+
var Notes__default = /*#__PURE__*/_interopDefaultLegacy(Notes);
|
|
169
|
+
var MediaVideo__default = /*#__PURE__*/_interopDefaultLegacy(MediaVideo);
|
|
170
|
+
var Column__default = /*#__PURE__*/_interopDefaultLegacy(Column);
|
|
171
|
+
var DeleteRow__default = /*#__PURE__*/_interopDefaultLegacy(DeleteRow);
|
|
172
|
+
var DeleteColumn__default = /*#__PURE__*/_interopDefaultLegacy(DeleteColumn);
|
|
173
|
+
var DeleteTable__default = /*#__PURE__*/_interopDefaultLegacy(DeleteTable);
|
|
174
|
+
var InsertRow__default = /*#__PURE__*/_interopDefaultLegacy(InsertRow);
|
|
175
|
+
var InsertColumn__default = /*#__PURE__*/_interopDefaultLegacy(InsertColumn);
|
|
176
|
+
var MergeSplit__default = /*#__PURE__*/_interopDefaultLegacy(MergeSplit);
|
|
177
|
+
var ToggleHeaderRow__default = /*#__PURE__*/_interopDefaultLegacy(ToggleHeaderRow);
|
|
178
|
+
var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
|
|
179
|
+
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
180
|
+
var Input__default$1 = /*#__PURE__*/_interopDefaultLegacy(Input$1);
|
|
87
181
|
|
|
88
182
|
var ErrorWrapper = function ErrorWrapper(_ref) {
|
|
89
183
|
var error = _ref.error,
|
|
@@ -106,18 +200,22 @@ var ErrorWrapper = function ErrorWrapper(_ref) {
|
|
|
106
200
|
if (neetoCist.isNotPresent(message)) return null;
|
|
107
201
|
return message;
|
|
108
202
|
};
|
|
109
|
-
return /*#__PURE__*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
|
|
203
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
204
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
205
|
+
className: wrapperClasses,
|
|
206
|
+
children: children
|
|
207
|
+
}), isError && /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
208
|
+
className: "neeto-ui-input__error",
|
|
209
|
+
"data-cy": "neeto-editor-error-text",
|
|
210
|
+
children: getErrorMessage()
|
|
211
|
+
})]
|
|
212
|
+
});
|
|
115
213
|
};
|
|
116
|
-
var ErrorWrapper$1 = /*#__PURE__*/React
|
|
214
|
+
var ErrorWrapper$1 = /*#__PURE__*/React.memo(ErrorWrapper);
|
|
117
215
|
|
|
118
216
|
var useEditorWarnings = function useEditorWarnings(_ref) {
|
|
119
217
|
var initialValue = _ref.initialValue;
|
|
120
|
-
React
|
|
218
|
+
React.useEffect(function () {
|
|
121
219
|
var isProduction = [process.env.RAILS_ENV, "production"].includes("production");
|
|
122
220
|
if (!isProduction && neetoCist.isNotPresent(initialValue)) {
|
|
123
221
|
// eslint-disable-next-line no-console
|
|
@@ -134,10 +232,13 @@ var CharacterCountWrapper = function CharacterCountWrapper(_ref) {
|
|
|
134
232
|
isActive = _ref.isActive,
|
|
135
233
|
children = _ref.children;
|
|
136
234
|
if (!isActive || !editor) return children;
|
|
137
|
-
return /*#__PURE__*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
235
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
236
|
+
children: [children, /*#__PURE__*/jsxRuntime.jsxs("p", {
|
|
237
|
+
className: "neeto-editor-character-count",
|
|
238
|
+
"data-cy": "neeto-editor-character-count",
|
|
239
|
+
children: [editor.storage.characterCount.characters(), " characters"]
|
|
240
|
+
})]
|
|
241
|
+
});
|
|
141
242
|
};
|
|
142
243
|
|
|
143
244
|
/**
|
|
@@ -5726,14 +5827,14 @@ const CodeBlockLowlight = CodeBlock$1.extend({
|
|
|
5726
5827
|
|
|
5727
5828
|
var SORTED_LANGUAGE_LIST = [].concat(_toConsumableArray__default["default"](core$1.lowlight.listLanguages()), ["html"]).sort();
|
|
5728
5829
|
|
|
5729
|
-
var Menu$2 =
|
|
5730
|
-
MenuItem$1 =
|
|
5830
|
+
var Menu$2 = Dropdown__default["default"].Menu,
|
|
5831
|
+
MenuItem$1 = Dropdown__default["default"].MenuItem;
|
|
5731
5832
|
var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
5732
5833
|
var _node$attrs2, _node$content;
|
|
5733
5834
|
var node = _ref.node,
|
|
5734
5835
|
editor = _ref.editor,
|
|
5735
5836
|
updateAttributes = _ref.updateAttributes;
|
|
5736
|
-
var _useState = React
|
|
5837
|
+
var _useState = React.useState(""),
|
|
5737
5838
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
5738
5839
|
keyword = _useState2[0],
|
|
5739
5840
|
setKeyword = _useState2[1];
|
|
@@ -5750,7 +5851,7 @@ var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
|
5750
5851
|
setKeyword("");
|
|
5751
5852
|
editor === null || editor === void 0 || (_editor$commands = editor.commands) === null || _editor$commands === void 0 || _editor$commands.focus();
|
|
5752
5853
|
};
|
|
5753
|
-
React
|
|
5854
|
+
React.useEffect(function () {
|
|
5754
5855
|
var _node$attrs;
|
|
5755
5856
|
if (ramda.isNil((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.language)) {
|
|
5756
5857
|
// https://github.com/bigbinary/neeto-kb-web/issues/6429
|
|
@@ -5761,50 +5862,56 @@ var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
|
5761
5862
|
}, 0);
|
|
5762
5863
|
}
|
|
5763
5864
|
}, []);
|
|
5764
|
-
return /*#__PURE__*/
|
|
5765
|
-
"data-cy": "neeto-editor-code-block"
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5865
|
+
return /*#__PURE__*/jsxRuntime.jsx(Menu$3.NodeViewWrapper, {
|
|
5866
|
+
"data-cy": "neeto-editor-code-block",
|
|
5867
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("pre", {
|
|
5868
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5869
|
+
className: "neeto-editor-codeblock-options",
|
|
5870
|
+
contentEditable: false,
|
|
5871
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Dropdown__default["default"], {
|
|
5872
|
+
appendTo: function appendTo() {
|
|
5873
|
+
return document.body;
|
|
5874
|
+
},
|
|
5875
|
+
buttonSize: "small",
|
|
5876
|
+
buttonStyle: "secondary",
|
|
5877
|
+
icon: Down__default["default"],
|
|
5878
|
+
label: ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.language) || t("neetoEditor.common.auto"),
|
|
5879
|
+
strategy: "fixed",
|
|
5880
|
+
zIndex: 99999,
|
|
5881
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
5882
|
+
autoFocus: true,
|
|
5883
|
+
className: "neeto-editor-codeblock-options__input",
|
|
5884
|
+
placeholder: t("neetoEditor.placeholders.searchLanguages"),
|
|
5885
|
+
size: "small",
|
|
5886
|
+
value: keyword,
|
|
5887
|
+
onChange: function onChange(e) {
|
|
5888
|
+
return setKeyword(e.target.value);
|
|
5889
|
+
},
|
|
5890
|
+
onClick: function onClick(e) {
|
|
5891
|
+
e.preventDefault();
|
|
5892
|
+
e.stopPropagation();
|
|
5893
|
+
}
|
|
5894
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Menu$2, {
|
|
5895
|
+
className: "neeto-editor-codeblock-options__menu",
|
|
5896
|
+
children: filteredAndSortedLanguageList.map(function (language) {
|
|
5897
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$1.Button, {
|
|
5898
|
+
onClick: function onClick() {
|
|
5899
|
+
return handleLanguageSelect(language);
|
|
5900
|
+
},
|
|
5901
|
+
children: language || t("neetoEditor.common.auto")
|
|
5902
|
+
}, language);
|
|
5903
|
+
})
|
|
5904
|
+
})]
|
|
5905
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton__default["default"], {
|
|
5906
|
+
size: "small",
|
|
5907
|
+
style: "secondary",
|
|
5908
|
+
value: node === null || node === void 0 || (_node$content = node.content) === null || _node$content === void 0 || (_node$content = _node$content.content[0]) === null || _node$content === void 0 ? void 0 : _node$content.text
|
|
5909
|
+
})]
|
|
5910
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Menu$3.NodeViewContent, {
|
|
5911
|
+
as: "code"
|
|
5912
|
+
})]
|
|
5913
|
+
})
|
|
5914
|
+
});
|
|
5808
5915
|
};
|
|
5809
5916
|
|
|
5810
5917
|
var CodeBlock = CodeBlockLowlight.extend({
|
|
@@ -6683,36 +6790,38 @@ var Menu$1 = function Menu(_ref) {
|
|
|
6683
6790
|
}) : deleteNode();
|
|
6684
6791
|
editor.commands.focus();
|
|
6685
6792
|
};
|
|
6686
|
-
return /*#__PURE__*/
|
|
6793
|
+
return /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
|
|
6687
6794
|
buttonProps: {
|
|
6688
6795
|
className: "neeto-editor__image-menu-btn"
|
|
6689
6796
|
},
|
|
6690
6797
|
buttonSize: "large",
|
|
6691
6798
|
buttonStyle: "tertiary",
|
|
6692
6799
|
className: "neeto-editor__image-menu",
|
|
6693
|
-
icon:
|
|
6800
|
+
icon: MenuHorizontal__default["default"],
|
|
6694
6801
|
position: "top",
|
|
6695
|
-
strategy: "fixed"
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
}
|
|
6712
|
-
})
|
|
6713
|
-
})
|
|
6802
|
+
strategy: "fixed",
|
|
6803
|
+
children: menuOptions.map(function (_ref2) {
|
|
6804
|
+
var Icon = _ref2.Icon,
|
|
6805
|
+
optionName = _ref2.optionName,
|
|
6806
|
+
alignPos = _ref2.alignPos;
|
|
6807
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
6808
|
+
"data-cy": "neeto-editor-image-menu-".concat(optionName),
|
|
6809
|
+
icon: Icon,
|
|
6810
|
+
style: alignPos === align ? "secondary" : "text",
|
|
6811
|
+
tooltipProps: {
|
|
6812
|
+
content: optionName,
|
|
6813
|
+
position: "top"
|
|
6814
|
+
},
|
|
6815
|
+
onClick: function onClick() {
|
|
6816
|
+
return handleClick(alignPos);
|
|
6817
|
+
}
|
|
6818
|
+
}, optionName);
|
|
6819
|
+
})
|
|
6820
|
+
});
|
|
6714
6821
|
};
|
|
6715
6822
|
|
|
6823
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6824
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6716
6825
|
var EmbedComponent = function EmbedComponent(_ref) {
|
|
6717
6826
|
var node = _ref.node,
|
|
6718
6827
|
editor = _ref.editor,
|
|
@@ -6737,27 +6846,29 @@ var EmbedComponent = function EmbedComponent(_ref) {
|
|
|
6737
6846
|
})));
|
|
6738
6847
|
editor.commands.focus();
|
|
6739
6848
|
};
|
|
6740
|
-
return /*#__PURE__*/
|
|
6849
|
+
return /*#__PURE__*/jsxRuntime.jsx(Menu$3.NodeViewWrapper, {
|
|
6741
6850
|
className: "neeto-editor__video-wrapper neeto-editor__video--".concat(align),
|
|
6742
|
-
"data-cy": "neeto-editor-video-wrapper"
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6851
|
+
"data-cy": "neeto-editor-video-wrapper",
|
|
6852
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Resizable, {
|
|
6853
|
+
lockAspectRatio: true,
|
|
6854
|
+
className: "neeto-editor__video-iframe",
|
|
6855
|
+
size: {
|
|
6856
|
+
height: height,
|
|
6857
|
+
width: width
|
|
6858
|
+
},
|
|
6859
|
+
onResizeStop: handleResize,
|
|
6860
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Menu$1, {
|
|
6861
|
+
align: align,
|
|
6862
|
+
deleteNode: deleteNode,
|
|
6863
|
+
editor: editor,
|
|
6864
|
+
updateAttributes: updateAttributes
|
|
6865
|
+
}), /*#__PURE__*/jsxRuntime.jsx("iframe", _objectSpread$e({}, node.attrs))]
|
|
6866
|
+
})
|
|
6867
|
+
});
|
|
6757
6868
|
};
|
|
6758
6869
|
|
|
6759
|
-
function ownKeys$
|
|
6760
|
-
function _objectSpread$
|
|
6870
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6871
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6761
6872
|
var Embeds = Menu$3.Node.create({
|
|
6762
6873
|
name: "external-video",
|
|
6763
6874
|
addOptions: function addOptions() {
|
|
@@ -6827,7 +6938,7 @@ var Embeds = Menu$3.Node.create({
|
|
|
6827
6938
|
}, ["div", {
|
|
6828
6939
|
"class": "neeto-editor__video-iframe",
|
|
6829
6940
|
style: "width: ".concat(figwidth, "px; height: ").concat(figheight, "px;")
|
|
6830
|
-
}, ["iframe", Menu$3.mergeAttributes(this.options.HTMLAttributes, _objectSpread$
|
|
6941
|
+
}, ["iframe", Menu$3.mergeAttributes(this.options.HTMLAttributes, _objectSpread$d({}, HTMLAttributes))]]];
|
|
6831
6942
|
},
|
|
6832
6943
|
addNodeView: function addNodeView() {
|
|
6833
6944
|
return Menu$3.ReactNodeViewRenderer(EmbedComponent);
|
|
@@ -7098,8 +7209,8 @@ function Suggestion({ pluginKey = SuggestionPluginKey, editor, char = '@', allow
|
|
|
7098
7209
|
return plugin;
|
|
7099
7210
|
}
|
|
7100
7211
|
|
|
7101
|
-
function ownKeys$
|
|
7102
|
-
function _objectSpread$
|
|
7212
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7213
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7103
7214
|
var EmojiPickerPluginKey = new utils.PluginKey("emoji-picker");
|
|
7104
7215
|
var EmojiPicker = Menu$3.Node.create({
|
|
7105
7216
|
name: "emojiPicker",
|
|
@@ -7153,7 +7264,7 @@ var EmojiPicker = Menu$3.Node.create({
|
|
|
7153
7264
|
};
|
|
7154
7265
|
},
|
|
7155
7266
|
addProseMirrorPlugins: function addProseMirrorPlugins() {
|
|
7156
|
-
return [Suggestion(_objectSpread$
|
|
7267
|
+
return [Suggestion(_objectSpread$c({
|
|
7157
7268
|
editor: this.editor
|
|
7158
7269
|
}, this.options.suggestion))];
|
|
7159
7270
|
}
|
|
@@ -7349,26 +7460,29 @@ var EmojiSuggestionMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
7349
7460
|
if (ramda.isEmpty(this.state.emojiSuggestions)) {
|
|
7350
7461
|
return null;
|
|
7351
7462
|
}
|
|
7352
|
-
return /*#__PURE__*/
|
|
7353
|
-
className: "neeto-editor-emoji-suggestion"
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7463
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7464
|
+
className: "neeto-editor-emoji-suggestion",
|
|
7465
|
+
children: [this.state.isLoading && /*#__PURE__*/jsxRuntime.jsx(Spinner__default["default"], {}), !this.state.isLoading && (neetoCist.isNotEmpty(this.state.emojiSuggestions) ? this.state.emojiSuggestions.map(function (emoji, index) {
|
|
7466
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7467
|
+
"data-cy": "neeto-editor-emoji-suggestion-".concat(emoji.id),
|
|
7468
|
+
className: classnames__default["default"]("neeto-editor-emoji-suggestion__item", {
|
|
7469
|
+
"neeto-editor-emoji-suggestion__item--selected": index === _this2.state.selectedIndex
|
|
7470
|
+
}),
|
|
7471
|
+
onClick: function onClick() {
|
|
7472
|
+
return _this2.selectItem(index);
|
|
7473
|
+
},
|
|
7474
|
+
children: emoji.skins[0]["native"]
|
|
7475
|
+
}, emoji.id);
|
|
7476
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
7477
|
+
children: "No results"
|
|
7478
|
+
}))]
|
|
7479
|
+
});
|
|
7366
7480
|
}
|
|
7367
7481
|
}]);
|
|
7368
7482
|
}(React__default["default"].Component);
|
|
7369
7483
|
|
|
7370
|
-
function ownKeys$
|
|
7371
|
-
function _objectSpread$
|
|
7484
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7485
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7372
7486
|
var EmojiSuggestionPluginKey = new utils.PluginKey("emoji-suggestion");
|
|
7373
7487
|
var EmojiSuggestion = Menu$3.Node.create({
|
|
7374
7488
|
name: "emojiSuggestion",
|
|
@@ -7447,7 +7561,7 @@ var EmojiSuggestion = Menu$3.Node.create({
|
|
|
7447
7561
|
};
|
|
7448
7562
|
},
|
|
7449
7563
|
addProseMirrorPlugins: function addProseMirrorPlugins() {
|
|
7450
|
-
return [Suggestion(_objectSpread$
|
|
7564
|
+
return [Suggestion(_objectSpread$b({
|
|
7451
7565
|
editor: this.editor
|
|
7452
7566
|
}, this.options.suggestion))];
|
|
7453
7567
|
}
|
|
@@ -7521,7 +7635,7 @@ var EmojiSuggestion$1 = EmojiSuggestion.configure({
|
|
|
7521
7635
|
var ImagePreviewModal = function ImagePreviewModal(_ref) {
|
|
7522
7636
|
var previewUrl = _ref.previewUrl,
|
|
7523
7637
|
setPreviewUrl = _ref.setPreviewUrl;
|
|
7524
|
-
var _useState = React
|
|
7638
|
+
var _useState = React.useState(true),
|
|
7525
7639
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
7526
7640
|
isLoading = _useState2[0],
|
|
7527
7641
|
setIsLoading = _useState2[1];
|
|
@@ -7532,37 +7646,41 @@ var ImagePreviewModal = function ImagePreviewModal(_ref) {
|
|
|
7532
7646
|
setIsLoading(true);
|
|
7533
7647
|
setPreviewUrl(null);
|
|
7534
7648
|
};
|
|
7535
|
-
return /*#__PURE__*/
|
|
7649
|
+
return /*#__PURE__*/jsxRuntime.jsx(Modal__default["default"], {
|
|
7536
7650
|
className: "image-preview-neeto-ui-modal",
|
|
7537
7651
|
closeButton: false,
|
|
7538
7652
|
isOpen: neetoCist.isPresent(previewUrl),
|
|
7539
7653
|
size: "fullScreen",
|
|
7540
|
-
onClose: handleClose
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7654
|
+
onClose: handleClose,
|
|
7655
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7656
|
+
children: [isLoading || ramda.isNil(previewUrl) ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7657
|
+
className: "spinner-wrapper",
|
|
7658
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner__default["default"], {
|
|
7659
|
+
className: "spinner",
|
|
7660
|
+
theme: "light"
|
|
7661
|
+
})
|
|
7662
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
7663
|
+
className: "image-preview-neeto-ui-modal__close-btn",
|
|
7664
|
+
icon: Close__default["default"],
|
|
7665
|
+
style: "secondary",
|
|
7666
|
+
onClick: handleClose,
|
|
7667
|
+
onKeyDown: function onKeyDown(e) {
|
|
7668
|
+
return e.key === "Escape" && handleClose;
|
|
7669
|
+
}
|
|
7670
|
+
}), /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
7671
|
+
alt: "Preview",
|
|
7672
|
+
src: previewUrl,
|
|
7673
|
+
className: classnames__default["default"]({
|
|
7674
|
+
"display-none": isLoading || ramda.isNil(previewUrl)
|
|
7675
|
+
}),
|
|
7676
|
+
onLoad: handleImageLoad
|
|
7677
|
+
})]
|
|
7678
|
+
})
|
|
7679
|
+
});
|
|
7562
7680
|
};
|
|
7563
7681
|
|
|
7564
|
-
function ownKeys$
|
|
7565
|
-
function _objectSpread$
|
|
7682
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7683
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7566
7684
|
var ImageComponent = function ImageComponent(_ref) {
|
|
7567
7685
|
var _node$content, _figureRef$current;
|
|
7568
7686
|
var node = _ref.node,
|
|
@@ -7575,15 +7693,15 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
7575
7693
|
figheight = _node$attrs.figheight,
|
|
7576
7694
|
figwidth = _node$attrs.figwidth,
|
|
7577
7695
|
align = _node$attrs.align;
|
|
7578
|
-
var _useState = React
|
|
7696
|
+
var _useState = React.useState(figwidth || 0),
|
|
7579
7697
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
7580
7698
|
captionWidth = _useState2[0],
|
|
7581
7699
|
setCaptionWidth = _useState2[1];
|
|
7582
|
-
var _useState3 = React
|
|
7700
|
+
var _useState3 = React.useState(null),
|
|
7583
7701
|
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
7584
7702
|
previewUrl = _useState4[0],
|
|
7585
7703
|
setPreviewUrl = _useState4[1];
|
|
7586
|
-
var figureRef = React
|
|
7704
|
+
var figureRef = React.useRef(null);
|
|
7587
7705
|
var view = editor.view;
|
|
7588
7706
|
var height = figheight;
|
|
7589
7707
|
var width = figwidth;
|
|
@@ -7608,50 +7726,54 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
7608
7726
|
editor.commands.focus();
|
|
7609
7727
|
};
|
|
7610
7728
|
if (neetoCist.isNotPresent(src)) return null;
|
|
7611
|
-
return /*#__PURE__*/
|
|
7729
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Menu$3.NodeViewWrapper, {
|
|
7612
7730
|
className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align),
|
|
7613
|
-
"data-cy": "neeto-editor-image-wrapper"
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7731
|
+
"data-cy": "neeto-editor-image-wrapper",
|
|
7732
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("figure", {
|
|
7733
|
+
ref: figureRef,
|
|
7734
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Menu$1, {
|
|
7735
|
+
align: align,
|
|
7736
|
+
deleteNode: deleteNode,
|
|
7737
|
+
editor: editor,
|
|
7738
|
+
updateAttributes: updateAttributes
|
|
7739
|
+
}), src ? /*#__PURE__*/jsxRuntime.jsx(Resizable, {
|
|
7740
|
+
lockAspectRatio: true,
|
|
7741
|
+
className: "neeto-editor__image",
|
|
7742
|
+
minWidth: "100px",
|
|
7743
|
+
size: {
|
|
7744
|
+
height: height,
|
|
7745
|
+
width: width
|
|
7746
|
+
},
|
|
7747
|
+
onResizeStop: handleResizeStop,
|
|
7748
|
+
onResize: function onResize(_event, _direction, ref) {
|
|
7749
|
+
return setCaptionWidth(ref.offsetWidth);
|
|
7750
|
+
},
|
|
7751
|
+
children: /*#__PURE__*/jsxRuntime.jsx("img", _objectSpread$a(_objectSpread$a({}, _objectSpread$a(_objectSpread$a({}, node.attrs), {}, {
|
|
7752
|
+
src: src
|
|
7753
|
+
})), {}, {
|
|
7754
|
+
alt: caption,
|
|
7755
|
+
onClick: function onClick(e) {
|
|
7756
|
+
e.stopPropagation();
|
|
7757
|
+
setPreviewUrl(src);
|
|
7758
|
+
}
|
|
7759
|
+
}))
|
|
7760
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7761
|
+
className: "neeto-editor__image-placeholder",
|
|
7762
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner__default["default"], {})
|
|
7763
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Menu$3.NodeViewContent, {
|
|
7764
|
+
as: "figcaption",
|
|
7765
|
+
className: classnames__default["default"]({
|
|
7766
|
+
"is-empty": ramda.isEmpty(caption)
|
|
7767
|
+
}),
|
|
7768
|
+
style: {
|
|
7769
|
+
width: "".concat(captionWidth, "px")
|
|
7770
|
+
}
|
|
7771
|
+
})]
|
|
7772
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ImagePreviewModal, {
|
|
7773
|
+
previewUrl: previewUrl,
|
|
7774
|
+
setPreviewUrl: setPreviewUrl
|
|
7775
|
+
})]
|
|
7776
|
+
});
|
|
7655
7777
|
};
|
|
7656
7778
|
|
|
7657
7779
|
var _excluded$4 = ["caption"];
|
|
@@ -7675,7 +7797,7 @@ var upload = /*#__PURE__*/function () {
|
|
|
7675
7797
|
response = _context.sent;
|
|
7676
7798
|
return _context.abrupt("return", ((_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.blob_url) || response.blob_url);
|
|
7677
7799
|
case 6:
|
|
7678
|
-
|
|
7800
|
+
Toastr__default["default"].error(i18n.t("neetoEditor.error.imageSizeIsShouldBeLess", {
|
|
7679
7801
|
limit: initializers.globalProps.endUserUploadedFileSizeLimitInMb
|
|
7680
7802
|
}));
|
|
7681
7803
|
return _context.abrupt("return", "");
|
|
@@ -7900,8 +8022,8 @@ var FigCaption = Menu$3.Node.create({
|
|
|
7900
8022
|
}
|
|
7901
8023
|
});
|
|
7902
8024
|
|
|
7903
|
-
function ownKeys$
|
|
7904
|
-
function _objectSpread$
|
|
8025
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8026
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7905
8027
|
var KeyboardShortcuts = function KeyboardShortcuts(_ref) {
|
|
7906
8028
|
var onSubmit = _ref.onSubmit,
|
|
7907
8029
|
shortcuts = _ref.shortcuts,
|
|
@@ -7910,7 +8032,7 @@ var KeyboardShortcuts = function KeyboardShortcuts(_ref) {
|
|
|
7910
8032
|
name: "keyboard-shortcuts",
|
|
7911
8033
|
addKeyboardShortcuts: function addKeyboardShortcuts() {
|
|
7912
8034
|
var _this = this;
|
|
7913
|
-
return _objectSpread$
|
|
8035
|
+
return _objectSpread$9({
|
|
7914
8036
|
"Mod-Enter": function ModEnter() {
|
|
7915
8037
|
onSubmit === null || onSubmit === void 0 || onSubmit(_this.editor.getHTML());
|
|
7916
8038
|
return true;
|
|
@@ -10039,8 +10161,8 @@ const Link$1 = Menu$3.Mark.create({
|
|
|
10039
10161
|
|
|
10040
10162
|
var LINK_MARKDOWN_INPUT_REGEX = /(?:^|\s)\[([^\]]*)?\]\((\S+)(?: ["“](.+)["”])?\)$/i;
|
|
10041
10163
|
|
|
10042
|
-
function ownKeys$
|
|
10043
|
-
function _objectSpread$
|
|
10164
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10165
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10044
10166
|
var linkInputRule = function linkInputRule(config) {
|
|
10045
10167
|
var defaultMarkInputRule = Menu$3.markInputRule(config);
|
|
10046
10168
|
return new Menu$3.InputRule({
|
|
@@ -10061,7 +10183,7 @@ var Link = Link$1.extend({
|
|
|
10061
10183
|
inclusive: false,
|
|
10062
10184
|
addAttributes: function addAttributes() {
|
|
10063
10185
|
var _this$parent;
|
|
10064
|
-
return _objectSpread$
|
|
10186
|
+
return _objectSpread$8(_objectSpread$8({}, (_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.call(this)), {}, {
|
|
10065
10187
|
title: {
|
|
10066
10188
|
"default": null
|
|
10067
10189
|
}
|
|
@@ -10367,45 +10489,50 @@ var MentionList = /*#__PURE__*/function (_React$Component) {
|
|
|
10367
10489
|
var _this2 = this;
|
|
10368
10490
|
var selectedIndex = this.state.selectedIndex;
|
|
10369
10491
|
var items = this.props.items;
|
|
10370
|
-
var Menu =
|
|
10371
|
-
MenuItem =
|
|
10492
|
+
var Menu = Dropdown__default["default"].Menu,
|
|
10493
|
+
MenuItem = Dropdown__default["default"].MenuItem;
|
|
10372
10494
|
if (ramda.isEmpty(items)) {
|
|
10373
|
-
return /*#__PURE__*/
|
|
10374
|
-
className: "neeto-editor-mentions__wrapper"
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10495
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
10496
|
+
className: "neeto-editor-mentions__wrapper",
|
|
10497
|
+
children: /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
10498
|
+
className: "neeto-editor-mentions__item",
|
|
10499
|
+
children: i18n.t("neetoEditor.error.noResults")
|
|
10500
|
+
})
|
|
10501
|
+
});
|
|
10378
10502
|
}
|
|
10379
|
-
return /*#__PURE__*/
|
|
10380
|
-
className: "neeto-ui-dropdown__popup"
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10503
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
10504
|
+
className: "neeto-ui-dropdown__popup",
|
|
10505
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Menu, {
|
|
10506
|
+
className: "neeto-editor-mentions__wrapper",
|
|
10507
|
+
"data-cy": "neeto-editor-mention-list",
|
|
10508
|
+
ref: this.mentionRef,
|
|
10509
|
+
children: items.map(function (_ref2, index) {
|
|
10510
|
+
var key = _ref2.key,
|
|
10511
|
+
name = _ref2.name,
|
|
10512
|
+
imageUrl = _ref2.imageUrl;
|
|
10513
|
+
return /*#__PURE__*/jsxRuntime.jsxs(MenuItem.Button, {
|
|
10514
|
+
"data-cy": "neeto-editor-mention-list-".concat(name),
|
|
10515
|
+
type: "button",
|
|
10516
|
+
className: classnames__default["default"]("neeto-editor-mentions__item", {
|
|
10517
|
+
active: index === selectedIndex
|
|
10518
|
+
}),
|
|
10519
|
+
onClick: function onClick() {
|
|
10520
|
+
return _this2.selectItem(index);
|
|
10521
|
+
},
|
|
10522
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Avatar__default["default"], {
|
|
10523
|
+
size: "small",
|
|
10524
|
+
user: {
|
|
10525
|
+
name: name,
|
|
10526
|
+
imageUrl: imageUrl
|
|
10527
|
+
}
|
|
10528
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
10529
|
+
style: "body2",
|
|
10530
|
+
children: name
|
|
10531
|
+
})]
|
|
10532
|
+
}, key);
|
|
10533
|
+
})
|
|
10534
|
+
})
|
|
10535
|
+
});
|
|
10409
10536
|
}
|
|
10410
10537
|
}]);
|
|
10411
10538
|
}(React__default["default"].Component);
|
|
@@ -10425,8 +10552,8 @@ var createMentionSuggestions = function createMentionSuggestions() {
|
|
|
10425
10552
|
};
|
|
10426
10553
|
|
|
10427
10554
|
var _excluded$3 = ["suggestion"];
|
|
10428
|
-
function ownKeys$
|
|
10429
|
-
function _objectSpread$
|
|
10555
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10556
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10430
10557
|
var suggestion$1 = {
|
|
10431
10558
|
render: function render() {
|
|
10432
10559
|
var reactRenderer;
|
|
@@ -10502,8 +10629,8 @@ var Mention = {
|
|
|
10502
10629
|
var _ref3$suggestion = _ref3.suggestion,
|
|
10503
10630
|
suggestionConfig = _ref3$suggestion === void 0 ? {} : _ref3$suggestion,
|
|
10504
10631
|
otherConfig = _objectWithoutProperties__default["default"](_ref3, _excluded$3);
|
|
10505
|
-
return Mentions.configure(_objectSpread$
|
|
10506
|
-
suggestion: _objectSpread$
|
|
10632
|
+
return Mentions.configure(_objectSpread$7(_objectSpread$7({}, otherConfig), {}, {
|
|
10633
|
+
suggestion: _objectSpread$7(_objectSpread$7({}, suggestion$1), suggestionConfig)
|
|
10507
10634
|
}));
|
|
10508
10635
|
}
|
|
10509
10636
|
};
|
|
@@ -10601,6 +10728,8 @@ var SelectionDecoration = Document.extend({
|
|
|
10601
10728
|
}
|
|
10602
10729
|
});
|
|
10603
10730
|
|
|
10731
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10732
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10604
10733
|
function _callSuper$1(t, o, e) { return o = _getPrototypeOf__default["default"](o), _possibleConstructorReturn__default["default"](t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf__default["default"](t).constructor) : o.apply(t, e)); }
|
|
10605
10734
|
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10606
10735
|
var Menu = /*#__PURE__*/function (_React$Component) {
|
|
@@ -10717,76 +10846,83 @@ var Menu = /*#__PURE__*/function (_React$Component) {
|
|
|
10717
10846
|
activeMenuIndex = _this$props6.activeMenuIndex;
|
|
10718
10847
|
var selectedIndex = this.state.selectedIndex;
|
|
10719
10848
|
var isCurrentMenuActive = menuIndex === activeMenuIndex;
|
|
10720
|
-
return /*#__PURE__*/
|
|
10849
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
10721
10850
|
className: "neeto-editor-slash-commands__wrapper",
|
|
10722
|
-
ref: this.menuRef
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10851
|
+
ref: this.menuRef,
|
|
10852
|
+
children: items.map(function (item, index) {
|
|
10853
|
+
var isLeafNode = neetoCist.isNotPresent(item.items);
|
|
10854
|
+
var nodeElement = /*#__PURE__*/React.createElement(MenuItem, {
|
|
10855
|
+
index: index,
|
|
10856
|
+
item: item,
|
|
10857
|
+
key: item.title,
|
|
10858
|
+
selectItem: function selectItem() {
|
|
10859
|
+
return isLeafNode && _this2.selectItem(index);
|
|
10860
|
+
},
|
|
10861
|
+
selectedIndex: isCurrentMenuActive ? selectedIndex : -1,
|
|
10862
|
+
onHover: function onHover() {
|
|
10863
|
+
return _this2.setState({
|
|
10864
|
+
selectedIndex: index
|
|
10865
|
+
});
|
|
10866
|
+
}
|
|
10867
|
+
});
|
|
10868
|
+
if (isLeafNode) return nodeElement;
|
|
10869
|
+
return /*#__PURE__*/jsxRuntime.jsx(Tippy__default["default"], {
|
|
10870
|
+
interactive: true,
|
|
10871
|
+
placement: "right",
|
|
10872
|
+
visible: selectedIndex === index,
|
|
10873
|
+
content: /*#__PURE__*/jsxRuntime.jsx(Menu, _objectSpread$6(_objectSpread$6({}, _this2.props), {}, {
|
|
10874
|
+
items: item.items,
|
|
10875
|
+
menuIndex: menuIndex + 1
|
|
10876
|
+
})),
|
|
10877
|
+
onCreate: function onCreate(_ref) {
|
|
10878
|
+
var popper = _ref.popper;
|
|
10879
|
+
return popper.style.width = "max-content";
|
|
10880
|
+
},
|
|
10881
|
+
onHide: function onHide() {
|
|
10882
|
+
_this2.isSubmenuOpened = false;
|
|
10883
|
+
},
|
|
10884
|
+
onShow: function onShow() {
|
|
10885
|
+
_this2.isSubmenuOpened = true;
|
|
10886
|
+
},
|
|
10887
|
+
children: nodeElement
|
|
10888
|
+
}, item.title);
|
|
10889
|
+
})
|
|
10890
|
+
});
|
|
10761
10891
|
}
|
|
10762
10892
|
}]);
|
|
10763
10893
|
}(React__default["default"].Component); // eslint-disable-next-line react/display-name
|
|
10764
|
-
var MenuItem = /*#__PURE__*/React
|
|
10894
|
+
var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
10765
10895
|
var item = _ref2.item,
|
|
10766
10896
|
selectedIndex = _ref2.selectedIndex,
|
|
10767
10897
|
index = _ref2.index,
|
|
10768
10898
|
selectItem = _ref2.selectItem,
|
|
10769
10899
|
onHover = _ref2.onHover;
|
|
10770
10900
|
var Icon = item.Icon;
|
|
10771
|
-
return /*#__PURE__*/
|
|
10901
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
10772
10902
|
"data-cy": "neeto-editor-command-list-item-".concat(index),
|
|
10773
10903
|
ref: ref,
|
|
10774
10904
|
className: classnames__default["default"]("neeto-editor-slash-commands__item", {
|
|
10775
10905
|
active: index === selectedIndex
|
|
10776
10906
|
}),
|
|
10777
10907
|
onClick: selectItem,
|
|
10778
|
-
onMouseEnter: onHover
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10908
|
+
onMouseEnter: onHover,
|
|
10909
|
+
children: [Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
10910
|
+
size: 20
|
|
10911
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
10912
|
+
className: "neeto-editor-slash-commands__item-content",
|
|
10913
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("h5", {
|
|
10914
|
+
"data-cy": "neeto-editor-command-list-item-block-heading",
|
|
10915
|
+
children: item.title
|
|
10916
|
+
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
10917
|
+
"data-cy": "neeto-editor-command-list-item-block-description",
|
|
10918
|
+
children: item.description
|
|
10919
|
+
})]
|
|
10920
|
+
})]
|
|
10921
|
+
});
|
|
10788
10922
|
});
|
|
10789
10923
|
|
|
10924
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10925
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10790
10926
|
function _callSuper(t, o, e) { return o = _getPrototypeOf__default["default"](o), _possibleConstructorReturn__default["default"](t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf__default["default"](t).constructor) : o.apply(t, e)); }
|
|
10791
10927
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10792
10928
|
var CommandsList = /*#__PURE__*/function (_React$Component) {
|
|
@@ -10815,7 +10951,7 @@ var CommandsList = /*#__PURE__*/function (_React$Component) {
|
|
|
10815
10951
|
return _createClass__default["default"](CommandsList, [{
|
|
10816
10952
|
key: "render",
|
|
10817
10953
|
value: function render() {
|
|
10818
|
-
return /*#__PURE__*/
|
|
10954
|
+
return /*#__PURE__*/jsxRuntime.jsx(Menu, _objectSpread$5(_objectSpread$5({}, this.props), {}, {
|
|
10819
10955
|
activeMenuIndex: this.state.activeMenuIndex,
|
|
10820
10956
|
items: this.props.items,
|
|
10821
10957
|
menuIndex: 0,
|
|
@@ -10829,7 +10965,7 @@ var MENU_ITEMS = [{
|
|
|
10829
10965
|
optionName: constants.EDITOR_OPTIONS.PARAGRAPH,
|
|
10830
10966
|
title: i18n.t("neetoEditor.menu.normalText"),
|
|
10831
10967
|
description: i18n.t("neetoEditor.menu.normalTextDescription"),
|
|
10832
|
-
Icon:
|
|
10968
|
+
Icon: Paragraph__default["default"],
|
|
10833
10969
|
command: function command(_ref) {
|
|
10834
10970
|
var editor = _ref.editor,
|
|
10835
10971
|
range = _ref.range;
|
|
@@ -10839,7 +10975,7 @@ var MENU_ITEMS = [{
|
|
|
10839
10975
|
optionName: constants.EDITOR_OPTIONS.H1,
|
|
10840
10976
|
title: i18n.t("neetoEditor.menu.h1"),
|
|
10841
10977
|
description: i18n.t("neetoEditor.menu.h1Description"),
|
|
10842
|
-
Icon:
|
|
10978
|
+
Icon: TextH1__default["default"],
|
|
10843
10979
|
command: function command(_ref2) {
|
|
10844
10980
|
var editor = _ref2.editor,
|
|
10845
10981
|
range = _ref2.range;
|
|
@@ -10851,7 +10987,7 @@ var MENU_ITEMS = [{
|
|
|
10851
10987
|
optionName: constants.EDITOR_OPTIONS.H2,
|
|
10852
10988
|
title: i18n.t("neetoEditor.menu.h2"),
|
|
10853
10989
|
description: i18n.t("neetoEditor.menu.h2Description"),
|
|
10854
|
-
Icon:
|
|
10990
|
+
Icon: TextH2__default["default"],
|
|
10855
10991
|
command: function command(_ref3) {
|
|
10856
10992
|
var editor = _ref3.editor,
|
|
10857
10993
|
range = _ref3.range;
|
|
@@ -10863,7 +10999,7 @@ var MENU_ITEMS = [{
|
|
|
10863
10999
|
optionName: constants.EDITOR_OPTIONS.H3,
|
|
10864
11000
|
title: i18n.t("neetoEditor.menu.h3"),
|
|
10865
11001
|
description: i18n.t("neetoEditor.menu.h3Description"),
|
|
10866
|
-
Icon:
|
|
11002
|
+
Icon: Text__default["default"],
|
|
10867
11003
|
command: function command(_ref4) {
|
|
10868
11004
|
var editor = _ref4.editor,
|
|
10869
11005
|
range = _ref4.range;
|
|
@@ -10875,7 +11011,7 @@ var MENU_ITEMS = [{
|
|
|
10875
11011
|
optionName: constants.EDITOR_OPTIONS.H4,
|
|
10876
11012
|
title: i18n.t("neetoEditor.menu.h4"),
|
|
10877
11013
|
description: i18n.t("neetoEditor.menu.h4Description"),
|
|
10878
|
-
Icon:
|
|
11014
|
+
Icon: Text__default["default"],
|
|
10879
11015
|
command: function command(_ref5) {
|
|
10880
11016
|
var editor = _ref5.editor,
|
|
10881
11017
|
range = _ref5.range;
|
|
@@ -10887,7 +11023,7 @@ var MENU_ITEMS = [{
|
|
|
10887
11023
|
optionName: constants.EDITOR_OPTIONS.H5,
|
|
10888
11024
|
title: i18n.t("neetoEditor.menu.h5"),
|
|
10889
11025
|
description: i18n.t("neetoEditor.menu.h5Description"),
|
|
10890
|
-
Icon:
|
|
11026
|
+
Icon: Text__default["default"],
|
|
10891
11027
|
command: function command(_ref6) {
|
|
10892
11028
|
var editor = _ref6.editor,
|
|
10893
11029
|
range = _ref6.range;
|
|
@@ -10899,7 +11035,7 @@ var MENU_ITEMS = [{
|
|
|
10899
11035
|
optionName: constants.EDITOR_OPTIONS.H6,
|
|
10900
11036
|
title: i18n.t("neetoEditor.menu.h6"),
|
|
10901
11037
|
description: i18n.t("neetoEditor.menu.h6Description"),
|
|
10902
|
-
Icon:
|
|
11038
|
+
Icon: Text__default["default"],
|
|
10903
11039
|
command: function command(_ref7) {
|
|
10904
11040
|
var editor = _ref7.editor,
|
|
10905
11041
|
range = _ref7.range;
|
|
@@ -10911,7 +11047,7 @@ var MENU_ITEMS = [{
|
|
|
10911
11047
|
optionName: constants.EDITOR_OPTIONS.LIST_ORDERED,
|
|
10912
11048
|
title: i18n.t("neetoEditor.menu.numberedList"),
|
|
10913
11049
|
description: i18n.t("neetoEditor.menu.numberedListDescription"),
|
|
10914
|
-
Icon:
|
|
11050
|
+
Icon: ListNumber__default["default"],
|
|
10915
11051
|
command: function command(_ref8) {
|
|
10916
11052
|
var editor = _ref8.editor,
|
|
10917
11053
|
range = _ref8.range;
|
|
@@ -10921,7 +11057,7 @@ var MENU_ITEMS = [{
|
|
|
10921
11057
|
optionName: constants.EDITOR_OPTIONS.LIST_BULLETS,
|
|
10922
11058
|
title: i18n.t("neetoEditor.menu.bulletList"),
|
|
10923
11059
|
description: i18n.t("neetoEditor.menu.bulletListDescription"),
|
|
10924
|
-
Icon:
|
|
11060
|
+
Icon: ListDot__default["default"],
|
|
10925
11061
|
command: function command(_ref9) {
|
|
10926
11062
|
var editor = _ref9.editor,
|
|
10927
11063
|
range = _ref9.range;
|
|
@@ -10931,19 +11067,19 @@ var MENU_ITEMS = [{
|
|
|
10931
11067
|
optionName: constants.EDITOR_OPTIONS.IMAGE_UPLOAD,
|
|
10932
11068
|
title: i18n.t("neetoEditor.menu.image"),
|
|
10933
11069
|
description: i18n.t("neetoEditor.menu.imageDescription"),
|
|
10934
|
-
Icon:
|
|
11070
|
+
Icon: ImageUpload__default["default"],
|
|
10935
11071
|
command: neetoCist.noop
|
|
10936
11072
|
}, {
|
|
10937
11073
|
optionName: constants.EDITOR_OPTIONS.VIDEO_UPLOAD,
|
|
10938
11074
|
title: i18n.t("neetoEditor.menu.video"),
|
|
10939
11075
|
description: i18n.t("neetoEditor.menu.videoDescription"),
|
|
10940
|
-
Icon:
|
|
11076
|
+
Icon: Video__default["default"],
|
|
10941
11077
|
command: neetoCist.noop
|
|
10942
11078
|
}, {
|
|
10943
11079
|
optionName: constants.EDITOR_OPTIONS.BLOCKQUOTE,
|
|
10944
11080
|
title: i18n.t("neetoEditor.menu.blockQuote"),
|
|
10945
11081
|
description: i18n.t("neetoEditor.menu.blockQuoteDescription"),
|
|
10946
|
-
Icon:
|
|
11082
|
+
Icon: Blockquote__default["default"],
|
|
10947
11083
|
command: function command(_ref10) {
|
|
10948
11084
|
var editor = _ref10.editor,
|
|
10949
11085
|
range = _ref10.range;
|
|
@@ -10953,7 +11089,7 @@ var MENU_ITEMS = [{
|
|
|
10953
11089
|
optionName: constants.EDITOR_OPTIONS.CODE_BLOCK,
|
|
10954
11090
|
title: i18n.t("neetoEditor.menu.codeBlock"),
|
|
10955
11091
|
description: i18n.t("neetoEditor.menu.codeDescription"),
|
|
10956
|
-
Icon:
|
|
11092
|
+
Icon: CodeBlock__default["default"],
|
|
10957
11093
|
command: function command(_ref11) {
|
|
10958
11094
|
var editor = _ref11.editor,
|
|
10959
11095
|
range = _ref11.range;
|
|
@@ -10963,7 +11099,7 @@ var MENU_ITEMS = [{
|
|
|
10963
11099
|
optionName: constants.EDITOR_OPTIONS.EMOJI,
|
|
10964
11100
|
title: i18n.t("neetoEditor.menu.emoji"),
|
|
10965
11101
|
description: i18n.t("neetoEditor.menu.emojiDescription"),
|
|
10966
|
-
Icon:
|
|
11102
|
+
Icon: Smiley__default["default"],
|
|
10967
11103
|
command: function command(_ref12) {
|
|
10968
11104
|
var editor = _ref12.editor,
|
|
10969
11105
|
range = _ref12.range;
|
|
@@ -10973,7 +11109,7 @@ var MENU_ITEMS = [{
|
|
|
10973
11109
|
optionName: constants.EDITOR_OPTIONS.DIVIDER,
|
|
10974
11110
|
title: i18n.t("neetoEditor.menu.divider"),
|
|
10975
11111
|
description: i18n.t("neetoEditor.menu.dividerDescription"),
|
|
10976
|
-
Icon:
|
|
11112
|
+
Icon: Minus__default["default"],
|
|
10977
11113
|
command: function command(_ref13) {
|
|
10978
11114
|
var editor = _ref13.editor,
|
|
10979
11115
|
range = _ref13.range;
|
|
@@ -10983,13 +11119,13 @@ var MENU_ITEMS = [{
|
|
|
10983
11119
|
optionName: constants.EDITOR_OPTIONS.VIDEO_EMBED,
|
|
10984
11120
|
title: i18n.t("neetoEditor.menu.embed"),
|
|
10985
11121
|
description: i18n.t("neetoEditor.menu.embedDescription"),
|
|
10986
|
-
Icon:
|
|
11122
|
+
Icon: MediaVideo__default["default"],
|
|
10987
11123
|
command: neetoCist.noop
|
|
10988
11124
|
}, {
|
|
10989
11125
|
optionName: constants.EDITOR_OPTIONS.PASTE_UNFORMATTED,
|
|
10990
11126
|
title: i18n.t("neetoEditor.menu.pasteUnformatted"),
|
|
10991
11127
|
description: i18n.t("neetoEditor.menu.pasteUnformattedDescription"),
|
|
10992
|
-
Icon:
|
|
11128
|
+
Icon: Notes__default["default"],
|
|
10993
11129
|
command: function command(_ref14) {
|
|
10994
11130
|
var editor = _ref14.editor,
|
|
10995
11131
|
range = _ref14.range;
|
|
@@ -10999,7 +11135,7 @@ var MENU_ITEMS = [{
|
|
|
10999
11135
|
optionName: constants.EDITOR_OPTIONS.TABLE,
|
|
11000
11136
|
title: i18n.t("neetoEditor.menu.table"),
|
|
11001
11137
|
description: i18n.t("neetoEditor.menu.tableDescription"),
|
|
11002
|
-
Icon:
|
|
11138
|
+
Icon: Column__default["default"],
|
|
11003
11139
|
command: function command(_ref15) {
|
|
11004
11140
|
var editor = _ref15.editor,
|
|
11005
11141
|
range = _ref15.range;
|
|
@@ -14095,11 +14231,11 @@ var VideoComponent = function VideoComponent(_ref) {
|
|
|
14095
14231
|
vidheight = _node$attrs.vidheight,
|
|
14096
14232
|
vidwidth = _node$attrs.vidwidth,
|
|
14097
14233
|
align = _node$attrs.align;
|
|
14098
|
-
var _useState = React
|
|
14234
|
+
var _useState = React.useState(vidwidth || 0),
|
|
14099
14235
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
14100
14236
|
captionWidth = _useState2[0],
|
|
14101
14237
|
setCaptionWidth = _useState2[1];
|
|
14102
|
-
var figureRef = React
|
|
14238
|
+
var figureRef = React.useRef(null);
|
|
14103
14239
|
var view = editor.view;
|
|
14104
14240
|
var height = vidheight;
|
|
14105
14241
|
var width = vidwidth;
|
|
@@ -14124,42 +14260,45 @@ var VideoComponent = function VideoComponent(_ref) {
|
|
|
14124
14260
|
editor.commands.focus();
|
|
14125
14261
|
};
|
|
14126
14262
|
if (neetoCist.isNotPresent(src)) return null;
|
|
14127
|
-
return /*#__PURE__*/
|
|
14128
|
-
className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align)
|
|
14129
|
-
|
|
14130
|
-
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14140
|
-
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14263
|
+
return /*#__PURE__*/jsxRuntime.jsx(Menu$3.NodeViewWrapper, {
|
|
14264
|
+
className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align),
|
|
14265
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("figure", {
|
|
14266
|
+
ref: figureRef,
|
|
14267
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Menu$1, {
|
|
14268
|
+
align: align,
|
|
14269
|
+
deleteNode: deleteNode,
|
|
14270
|
+
editor: editor,
|
|
14271
|
+
updateAttributes: updateAttributes
|
|
14272
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Resizable, {
|
|
14273
|
+
lockAspectRatio: true,
|
|
14274
|
+
className: "neeto-editor__image",
|
|
14275
|
+
size: {
|
|
14276
|
+
height: height,
|
|
14277
|
+
width: width
|
|
14278
|
+
},
|
|
14279
|
+
onResizeStop: handleResize,
|
|
14280
|
+
onResize: function onResize(_event, _direction, ref) {
|
|
14281
|
+
return setCaptionWidth(ref.offsetWidth);
|
|
14282
|
+
},
|
|
14283
|
+
children: /*#__PURE__*/jsxRuntime.jsx("video", _objectSpread$1(_objectSpread$1({
|
|
14284
|
+
controls: true
|
|
14285
|
+
}, _objectSpread$1(_objectSpread$1({}, node.attrs), {}, {
|
|
14286
|
+
src: src
|
|
14287
|
+
})), {}, {
|
|
14288
|
+
alt: caption,
|
|
14289
|
+
preload: "metadata"
|
|
14290
|
+
}))
|
|
14291
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Menu$3.NodeViewContent, {
|
|
14292
|
+
as: "figcaption",
|
|
14293
|
+
className: classnames__default["default"]({
|
|
14294
|
+
"is-empty": ramda.isEmpty(caption)
|
|
14295
|
+
}),
|
|
14296
|
+
style: {
|
|
14297
|
+
width: "".concat(captionWidth, "px")
|
|
14298
|
+
}
|
|
14299
|
+
})]
|
|
14300
|
+
})
|
|
14301
|
+
});
|
|
14163
14302
|
};
|
|
14164
14303
|
|
|
14165
14304
|
var _excluded$1 = ["caption"];
|
|
@@ -14386,51 +14525,51 @@ var tableActions = function tableActions(_ref) {
|
|
|
14386
14525
|
command: function command() {
|
|
14387
14526
|
return editor.commands.addRowAfter();
|
|
14388
14527
|
},
|
|
14389
|
-
icon:
|
|
14528
|
+
icon: InsertRow__default["default"]
|
|
14390
14529
|
}, {
|
|
14391
14530
|
label: i18n.t("neetoEditor.table.insertColumn"),
|
|
14392
14531
|
command: function command() {
|
|
14393
14532
|
return editor.commands.addColumnAfter();
|
|
14394
14533
|
},
|
|
14395
|
-
icon:
|
|
14534
|
+
icon: InsertColumn__default["default"]
|
|
14396
14535
|
}, {
|
|
14397
14536
|
label: i18n.t("neetoEditor.table.deleteRow"),
|
|
14398
14537
|
command: function command() {
|
|
14399
14538
|
return editor.chain().focus().deleteRow().run();
|
|
14400
14539
|
},
|
|
14401
|
-
icon:
|
|
14540
|
+
icon: DeleteRow__default["default"],
|
|
14402
14541
|
isVisible: true
|
|
14403
14542
|
}, {
|
|
14404
14543
|
label: i18n.t("neetoEditor.table.deleteColumn"),
|
|
14405
14544
|
command: function command() {
|
|
14406
14545
|
return editor.chain().focus().deleteColumn().run();
|
|
14407
14546
|
},
|
|
14408
|
-
icon:
|
|
14547
|
+
icon: DeleteColumn__default["default"]
|
|
14409
14548
|
}, {
|
|
14410
14549
|
label: i18n.t("neetoEditor.table.mergeSplit"),
|
|
14411
14550
|
command: function command() {
|
|
14412
14551
|
return editor.chain().focus().mergeOrSplit().run();
|
|
14413
14552
|
},
|
|
14414
|
-
icon:
|
|
14553
|
+
icon: MergeSplit__default["default"],
|
|
14415
14554
|
isHidden: !shouldShowMergeCellToggler((_editor$state = editor.state) === null || _editor$state === void 0 ? void 0 : _editor$state.selection)
|
|
14416
14555
|
}, {
|
|
14417
14556
|
label: i18n.t("neetoEditor.table.toggleHeaderRow"),
|
|
14418
14557
|
command: function command() {
|
|
14419
14558
|
return editor.chain().focus().toggleHeaderRow().run();
|
|
14420
14559
|
},
|
|
14421
|
-
icon:
|
|
14560
|
+
icon: ToggleHeaderRow__default["default"]
|
|
14422
14561
|
}, {
|
|
14423
14562
|
label: i18n.t("neetoEditor.table.delete"),
|
|
14424
14563
|
command: function command() {
|
|
14425
14564
|
return editor.commands.deleteTable();
|
|
14426
14565
|
},
|
|
14427
|
-
icon:
|
|
14566
|
+
icon: DeleteTable__default["default"]
|
|
14428
14567
|
}];
|
|
14429
14568
|
};
|
|
14430
14569
|
|
|
14431
14570
|
var TableActionMenu = function TableActionMenu(_ref) {
|
|
14432
14571
|
var editor = _ref.editor;
|
|
14433
|
-
var getReferenceClientRect = React
|
|
14572
|
+
var getReferenceClientRect = React.useCallback(function () {
|
|
14434
14573
|
var _editor$state$selecti, _editor$state, _editor$view$domAtPos;
|
|
14435
14574
|
if (!editor) return new DOMRect(0, 0, 0, 0);
|
|
14436
14575
|
var _ref2 = (_editor$state$selecti = (_editor$state = editor.state) === null || _editor$state === void 0 ? void 0 : _editor$state.selection) !== null && _editor$state$selecti !== void 0 ? _editor$state$selecti : {},
|
|
@@ -14439,11 +14578,11 @@ var TableActionMenu = function TableActionMenu(_ref) {
|
|
|
14439
14578
|
var element = (node === null || node === void 0 ? void 0 : node.nodeType) === 3 ? node === null || node === void 0 ? void 0 : node.parentElement : node;
|
|
14440
14579
|
return (element === null || element === void 0 ? void 0 : element.getBoundingClientRect()) || new DOMRect(0, 0, 0, 0);
|
|
14441
14580
|
}, [editor]);
|
|
14442
|
-
var shouldShow = React
|
|
14581
|
+
var shouldShow = React.useCallback(function () {
|
|
14443
14582
|
return editor === null || editor === void 0 ? void 0 : editor.isActive("table");
|
|
14444
14583
|
}, [editor]);
|
|
14445
14584
|
if (!editor) return null;
|
|
14446
|
-
return /*#__PURE__*/
|
|
14585
|
+
return /*#__PURE__*/jsxRuntime.jsx(Menu$3.BubbleMenu, {
|
|
14447
14586
|
editor: editor,
|
|
14448
14587
|
shouldShow: shouldShow,
|
|
14449
14588
|
className: "neeto-editor-bubble-menu",
|
|
@@ -14461,28 +14600,29 @@ var TableActionMenu = function TableActionMenu(_ref) {
|
|
|
14461
14600
|
getReferenceClientRect: getReferenceClientRect,
|
|
14462
14601
|
plugins: [tippy.sticky],
|
|
14463
14602
|
sticky: "popper"
|
|
14464
|
-
}
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14603
|
+
},
|
|
14604
|
+
children: shouldShow && tableActions({
|
|
14605
|
+
editor: editor
|
|
14606
|
+
}).map(function (_ref3) {
|
|
14607
|
+
var icon = _ref3.icon,
|
|
14608
|
+
label = _ref3.label,
|
|
14609
|
+
command = _ref3.command,
|
|
14610
|
+
isHidden = _ref3.isHidden;
|
|
14611
|
+
return !isHidden && /*#__PURE__*/React.createElement(Button__default["default"], {
|
|
14612
|
+
icon: icon,
|
|
14613
|
+
iconSize: 18,
|
|
14614
|
+
key: label,
|
|
14615
|
+
size: "small",
|
|
14616
|
+
style: "text",
|
|
14617
|
+
tooltipProps: {
|
|
14618
|
+
content: label,
|
|
14619
|
+
position: "top",
|
|
14620
|
+
delay: [500]
|
|
14621
|
+
},
|
|
14622
|
+
onClick: command
|
|
14623
|
+
});
|
|
14624
|
+
})
|
|
14625
|
+
});
|
|
14486
14626
|
};
|
|
14487
14627
|
|
|
14488
14628
|
var LinkPopOver = function LinkPopOver(_ref) {
|
|
@@ -14492,29 +14632,29 @@ var LinkPopOver = function LinkPopOver(_ref) {
|
|
|
14492
14632
|
view = _ref2.view;
|
|
14493
14633
|
var from = editor.state.selection.from;
|
|
14494
14634
|
var initialTextContent = (view === null || view === void 0 || (_view$state = view.state) === null || _view$state === void 0 || (_view$state = _view$state.doc) === null || _view$state === void 0 || (_view$state = _view$state.nodeAt(from)) === null || _view$state === void 0 ? void 0 : _view$state.text) || "";
|
|
14495
|
-
var _useState = React
|
|
14635
|
+
var _useState = React.useState({
|
|
14496
14636
|
top: 0,
|
|
14497
14637
|
left: 0
|
|
14498
14638
|
}),
|
|
14499
14639
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
14500
14640
|
arrowPosition = _useState2[0],
|
|
14501
14641
|
setArrowPosition = _useState2[1];
|
|
14502
|
-
var _useState3 = React
|
|
14642
|
+
var _useState3 = React.useState({
|
|
14503
14643
|
top: 0,
|
|
14504
14644
|
left: 0
|
|
14505
14645
|
}),
|
|
14506
14646
|
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
14507
14647
|
popoverPosition = _useState4[0],
|
|
14508
14648
|
setPopoverPosition = _useState4[1];
|
|
14509
|
-
var _useState5 = React
|
|
14649
|
+
var _useState5 = React.useState(false),
|
|
14510
14650
|
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
14511
14651
|
isEditing = _useState6[0],
|
|
14512
14652
|
setIsEditing = _useState6[1];
|
|
14513
|
-
var _useState7 = React
|
|
14653
|
+
var _useState7 = React.useState(editor === null || editor === void 0 ? void 0 : editor.isActive("link")),
|
|
14514
14654
|
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
14515
14655
|
isLinkActive = _useState8[0],
|
|
14516
14656
|
setIsLinkActive = _useState8[1];
|
|
14517
|
-
var popoverRef = React
|
|
14657
|
+
var popoverRef = React.useRef(null);
|
|
14518
14658
|
var _useTranslation = reactI18next.useTranslation(),
|
|
14519
14659
|
t = _useTranslation.t;
|
|
14520
14660
|
var linkAttributes = editor === null || editor === void 0 ? void 0 : editor.getAttributes("link");
|
|
@@ -14580,7 +14720,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
|
|
|
14580
14720
|
return ramda.equals(event.key, "Escape") && setIsEditing(false);
|
|
14581
14721
|
};
|
|
14582
14722
|
reactUtils.useOnClickOutside(popoverRef, removePopover);
|
|
14583
|
-
React
|
|
14723
|
+
React.useEffect(function () {
|
|
14584
14724
|
window.addEventListener("resize", removePopover);
|
|
14585
14725
|
window.addEventListener("wheel", removePopover);
|
|
14586
14726
|
return function () {
|
|
@@ -14588,7 +14728,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
|
|
|
14588
14728
|
window.removeEventListener("wheel", removePopover);
|
|
14589
14729
|
};
|
|
14590
14730
|
}, []);
|
|
14591
|
-
React
|
|
14731
|
+
React.useEffect(function () {
|
|
14592
14732
|
var isActive = editor === null || editor === void 0 ? void 0 : editor.isActive("link");
|
|
14593
14733
|
setIsLinkActive(isActive);
|
|
14594
14734
|
if (isActive) {
|
|
@@ -14596,7 +14736,7 @@ var LinkPopOver = function LinkPopOver(_ref) {
|
|
|
14596
14736
|
}
|
|
14597
14737
|
}, [view === null || view === void 0 || (_view$state2 = view.state) === null || _view$state2 === void 0 || (_view$state2 = _view$state2.selection) === null || _view$state2 === void 0 || (_view$state2 = _view$state2.$from) === null || _view$state2 === void 0 ? void 0 : _view$state2.pos, isEditing]);
|
|
14598
14738
|
var renderEditingMode = function renderEditingMode() {
|
|
14599
|
-
return /*#__PURE__*/
|
|
14739
|
+
return /*#__PURE__*/jsxRuntime.jsx(Form__default["default"], {
|
|
14600
14740
|
formikProps: {
|
|
14601
14741
|
initialValues: {
|
|
14602
14742
|
textContent: initialTextContent,
|
|
@@ -14605,96 +14745,108 @@ var LinkPopOver = function LinkPopOver(_ref) {
|
|
|
14605
14745
|
},
|
|
14606
14746
|
onSubmit: handleSubmit,
|
|
14607
14747
|
validationSchema: utils.LINK_VALIDATION_SCHEMA
|
|
14748
|
+
},
|
|
14749
|
+
children: function children(_ref5) {
|
|
14750
|
+
var dirty = _ref5.dirty,
|
|
14751
|
+
isSubmitting = _ref5.isSubmitting,
|
|
14752
|
+
setFieldValue = _ref5.setFieldValue,
|
|
14753
|
+
values = _ref5.values;
|
|
14754
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14755
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input__default$1["default"], {
|
|
14756
|
+
required: true,
|
|
14757
|
+
"data-cy": "neeto-editor-edit-link-text-input",
|
|
14758
|
+
label: t("neetoEditor.common.text"),
|
|
14759
|
+
name: "textContent",
|
|
14760
|
+
placeholder: t("neetoEditor.placeholders.enterText"),
|
|
14761
|
+
style: {
|
|
14762
|
+
width: "250px"
|
|
14763
|
+
},
|
|
14764
|
+
onKeyDown: handleKeyDown
|
|
14765
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input__default$1["default"], {
|
|
14766
|
+
autoFocus: true,
|
|
14767
|
+
required: true,
|
|
14768
|
+
className: "ne-link-popover__url-input",
|
|
14769
|
+
"data-cy": "neeto-editor-edit-link-url-input",
|
|
14770
|
+
label: t("neetoEditor.common.url"),
|
|
14771
|
+
name: "urlString",
|
|
14772
|
+
placeholder: t("neetoEditor.placeholders.url"),
|
|
14773
|
+
style: {
|
|
14774
|
+
width: "250px"
|
|
14775
|
+
},
|
|
14776
|
+
onKeyDown: handleKeyDown
|
|
14777
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Checkbox__default["default"], {
|
|
14778
|
+
checked: values.openInNewTab,
|
|
14779
|
+
className: "ne-link-popover__checkbox",
|
|
14780
|
+
label: t("neetoEditor.common.openInNewTab"),
|
|
14781
|
+
onChange: function onChange() {
|
|
14782
|
+
setFieldValue("openInNewTab", !values.openInNewTab);
|
|
14783
|
+
}
|
|
14784
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
14785
|
+
className: "ne-link-popover__edit-prompt-buttons",
|
|
14786
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
14787
|
+
"data-cy": "neeto-editor-edit-link",
|
|
14788
|
+
disabled: !dirty,
|
|
14789
|
+
label: t("neetoEditor.menu.link"),
|
|
14790
|
+
loading: isSubmitting,
|
|
14791
|
+
size: "small",
|
|
14792
|
+
type: "submit"
|
|
14793
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
14794
|
+
"data-cy": "neeto-editor-edit-link-cancel",
|
|
14795
|
+
label: t("neetoEditor.common.cancel"),
|
|
14796
|
+
size: "small",
|
|
14797
|
+
style: "text",
|
|
14798
|
+
onClick: function onClick() {
|
|
14799
|
+
return setIsEditing(false);
|
|
14800
|
+
}
|
|
14801
|
+
})]
|
|
14802
|
+
})]
|
|
14803
|
+
});
|
|
14608
14804
|
}
|
|
14609
|
-
}
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
},
|
|
14623
|
-
onKeyDown: handleKeyDown
|
|
14624
|
-
}), /*#__PURE__*/React.createElement(formik.Input, {
|
|
14625
|
-
autoFocus: true,
|
|
14626
|
-
required: true,
|
|
14627
|
-
className: "ne-link-popover__url-input",
|
|
14628
|
-
"data-cy": "neeto-editor-edit-link-url-input",
|
|
14629
|
-
label: t("neetoEditor.common.url"),
|
|
14630
|
-
name: "urlString",
|
|
14631
|
-
placeholder: t("neetoEditor.placeholders.url"),
|
|
14632
|
-
style: {
|
|
14633
|
-
width: "250px"
|
|
14634
|
-
},
|
|
14635
|
-
onKeyDown: handleKeyDown
|
|
14636
|
-
}), /*#__PURE__*/React.createElement(neetoui.Checkbox, {
|
|
14637
|
-
checked: values.openInNewTab,
|
|
14638
|
-
className: "ne-link-popover__checkbox",
|
|
14639
|
-
label: t("neetoEditor.common.openInNewTab"),
|
|
14640
|
-
onChange: function onChange() {
|
|
14641
|
-
setFieldValue("openInNewTab", !values.openInNewTab);
|
|
14642
|
-
}
|
|
14643
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
14644
|
-
className: "ne-link-popover__edit-prompt-buttons"
|
|
14645
|
-
}, /*#__PURE__*/React.createElement(neetoui.Button, {
|
|
14646
|
-
"data-cy": "neeto-editor-edit-link",
|
|
14647
|
-
disabled: !dirty,
|
|
14648
|
-
label: t("neetoEditor.menu.link"),
|
|
14649
|
-
loading: isSubmitting,
|
|
14650
|
-
size: "small",
|
|
14651
|
-
type: "submit"
|
|
14652
|
-
}), /*#__PURE__*/React.createElement(neetoui.Button, {
|
|
14653
|
-
"data-cy": "neeto-editor-edit-link-cancel",
|
|
14654
|
-
label: t("neetoEditor.common.cancel"),
|
|
14805
|
+
});
|
|
14806
|
+
};
|
|
14807
|
+
var renderViewMode = function renderViewMode() {
|
|
14808
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14809
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("a", {
|
|
14810
|
+
href: linkAttributes === null || linkAttributes === void 0 ? void 0 : linkAttributes.href,
|
|
14811
|
+
rel: "noreferrer",
|
|
14812
|
+
target: "_blank",
|
|
14813
|
+
children: linkAttributes === null || linkAttributes === void 0 ? void 0 : linkAttributes.href
|
|
14814
|
+
}), " - ", /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
14815
|
+
className: "ne-link-popover__option-button",
|
|
14816
|
+
"data-cy": "neeto-editor-link-popover-edit",
|
|
14817
|
+
label: t("neetoEditor.common.edit"),
|
|
14655
14818
|
size: "small",
|
|
14656
|
-
style: "
|
|
14819
|
+
style: "link",
|
|
14657
14820
|
onClick: function onClick() {
|
|
14658
|
-
return setIsEditing(
|
|
14659
|
-
}
|
|
14660
|
-
})
|
|
14821
|
+
return setIsEditing(true);
|
|
14822
|
+
}
|
|
14823
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
14824
|
+
children: "|"
|
|
14825
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
14826
|
+
className: "ne-link-popover__option-button",
|
|
14827
|
+
"data-cy": "neeto-editor-link-popover-unlink",
|
|
14828
|
+
label: t("neetoEditor.common.unlink"),
|
|
14829
|
+
size: "small",
|
|
14830
|
+
style: "link",
|
|
14831
|
+
onClick: handleUnlink
|
|
14832
|
+
})]
|
|
14661
14833
|
});
|
|
14662
14834
|
};
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
className: "ne-link-popover__option-button",
|
|
14670
|
-
"data-cy": "neeto-editor-link-popover-edit",
|
|
14671
|
-
label: t("neetoEditor.common.edit"),
|
|
14672
|
-
size: "small",
|
|
14673
|
-
style: "link",
|
|
14674
|
-
onClick: function onClick() {
|
|
14675
|
-
return setIsEditing(true);
|
|
14835
|
+
return /*#__PURE__*/ReactDOM.createPortal(isLinkActive ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14836
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14837
|
+
className: "ne-link-arrow fade-in",
|
|
14838
|
+
style: {
|
|
14839
|
+
top: arrowPosition.top,
|
|
14840
|
+
left: arrowPosition.left
|
|
14676
14841
|
}
|
|
14677
|
-
}), /*#__PURE__*/
|
|
14678
|
-
className: "ne-link-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
};
|
|
14686
|
-
return /*#__PURE__*/ReactDOM.createPortal(isLinkActive ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
14687
|
-
className: "ne-link-arrow fade-in",
|
|
14688
|
-
style: {
|
|
14689
|
-
top: arrowPosition.top,
|
|
14690
|
-
left: arrowPosition.left
|
|
14691
|
-
}
|
|
14692
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
14693
|
-
className: "ne-link-popover fade-in",
|
|
14694
|
-
id: "ne-link-view-popover",
|
|
14695
|
-
ref: popoverRef,
|
|
14696
|
-
style: popoverStyle
|
|
14697
|
-
}, isEditing ? renderEditingMode() : renderViewMode())) : null, document.body);
|
|
14842
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14843
|
+
className: "ne-link-popover fade-in",
|
|
14844
|
+
id: "ne-link-view-popover",
|
|
14845
|
+
ref: popoverRef,
|
|
14846
|
+
style: popoverStyle,
|
|
14847
|
+
children: isEditing ? renderEditingMode() : renderViewMode()
|
|
14848
|
+
})]
|
|
14849
|
+
}) : null, document.body);
|
|
14698
14850
|
};
|
|
14699
14851
|
|
|
14700
14852
|
var _excluded = ["addonCommands", "addons", "attachments", "attachmentsConfig", "autoFocus", "className", "contentClassName", "errorWrapperClassName", "contentAttributes", "menuClassName", "attachmentsClassName", "isMenuIndependent", "defaults", "editorSecrets", "error", "extensions", "hideSlashCommands", "initialValue", "isCharacterCountActive", "keyboardShortcuts", "label", "mentions", "menuType", "placeholder", "required", "rows", "tooltips", "variables", "onChange", "onFocus", "onBlur", "onSubmit", "onChangeAttachments", "children", "openImageInNewTab", "openLinkInNewTab"];
|
|
@@ -14767,11 +14919,11 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14767
14919
|
_ref$openLinkInNewTab = _ref.openLinkInNewTab,
|
|
14768
14920
|
openLinkInNewTab = _ref$openLinkInNewTab === void 0 ? true : _ref$openLinkInNewTab,
|
|
14769
14921
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
14770
|
-
var _useState = React
|
|
14922
|
+
var _useState = React.useState(false),
|
|
14771
14923
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
14772
14924
|
isAttachmentsUploading = _useState2[0],
|
|
14773
14925
|
setIsAttachmentsUploading = _useState2[1];
|
|
14774
|
-
var wrapperRef = React
|
|
14926
|
+
var wrapperRef = React.useRef(null);
|
|
14775
14927
|
var isAttachmentsActive = addons.includes(constants.EDITOR_OPTIONS.ATTACHMENTS);
|
|
14776
14928
|
var isVideoEmbedActive = addons.includes(constants.EDITOR_OPTIONS.VIDEO_EMBED);
|
|
14777
14929
|
var isMediaUploaderActive = addons.includes(constants.EDITOR_OPTIONS.IMAGE_UPLOAD) || addons.includes(constants.EDITOR_OPTIONS.VIDEO_UPLOAD);
|
|
@@ -14779,18 +14931,18 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14779
14931
|
var isBubbleMenuActive = menuType === "bubble";
|
|
14780
14932
|
var isSlashCommandsActive = !hideSlashCommands || isBubbleMenuActive && !hideSlashCommands;
|
|
14781
14933
|
var isPlaceholderActive = !!placeholder;
|
|
14782
|
-
var _useState3 = React
|
|
14934
|
+
var _useState3 = React.useState(false),
|
|
14783
14935
|
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
14784
14936
|
isEmbedModalOpen = _useState4[0],
|
|
14785
14937
|
setIsEmbedModalOpen = _useState4[1];
|
|
14786
|
-
var _useState5 = React
|
|
14938
|
+
var _useState5 = React.useState({
|
|
14787
14939
|
image: false,
|
|
14788
14940
|
video: false
|
|
14789
14941
|
}),
|
|
14790
14942
|
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
14791
14943
|
mediaUploader = _useState6[0],
|
|
14792
14944
|
setMediaUploader = _useState6[1];
|
|
14793
|
-
var addAttachmentsRef = React
|
|
14945
|
+
var addAttachmentsRef = React.useRef(null);
|
|
14794
14946
|
var attachmentProps = {
|
|
14795
14947
|
handleUploadAttachments: function handleUploadAttachments() {
|
|
14796
14948
|
var _addAttachmentsRef$cu;
|
|
@@ -14863,7 +15015,7 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14863
15015
|
});
|
|
14864
15016
|
|
|
14865
15017
|
/* Make editor object available to the parent */
|
|
14866
|
-
React
|
|
15018
|
+
React.useImperativeHandle(ref, function () {
|
|
14867
15019
|
return {
|
|
14868
15020
|
editor: editor,
|
|
14869
15021
|
focus: function focus() {
|
|
@@ -14878,67 +15030,72 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14878
15030
|
if (!this.docView) return;
|
|
14879
15031
|
this.updateStateInner(state, this.state.plugins !== state.plugins);
|
|
14880
15032
|
};
|
|
14881
|
-
return /*#__PURE__*/
|
|
15033
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
14882
15034
|
ref: wrapperRef,
|
|
14883
|
-
className: classnames__default["default"](_defineProperty__default["default"](_defineProperty__default["default"]({}, className, className), "ne-attachments__wrapper", isAttachmentsActive))
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
15035
|
+
className: classnames__default["default"](_defineProperty__default["default"](_defineProperty__default["default"]({}, className, className), "ne-attachments__wrapper", isAttachmentsActive)),
|
|
15036
|
+
children: [label && /*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
15037
|
+
required: required,
|
|
15038
|
+
className: "neeto-ui-mb-2",
|
|
15039
|
+
"data-cy": "".concat(neetoCist.slugify(label), "-editor-label"),
|
|
15040
|
+
children: label
|
|
15041
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ErrorWrapper$1, {
|
|
15042
|
+
error: error,
|
|
15043
|
+
className: errorWrapperClassName,
|
|
15044
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
15045
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Menu$3.Menu, {
|
|
15046
|
+
addonCommands: addonCommands,
|
|
15047
|
+
addons: addons,
|
|
15048
|
+
attachmentProps: attachmentProps,
|
|
15049
|
+
defaults: defaults,
|
|
15050
|
+
editor: editor,
|
|
15051
|
+
editorSecrets: editorSecrets,
|
|
15052
|
+
mentions: mentions,
|
|
15053
|
+
menuType: menuType,
|
|
15054
|
+
openLinkInNewTab: openLinkInNewTab,
|
|
15055
|
+
tooltips: tooltips,
|
|
15056
|
+
variables: variables,
|
|
15057
|
+
className: menuClassName,
|
|
15058
|
+
isIndependant: isMenuIndependent
|
|
15059
|
+
}), children, /*#__PURE__*/jsxRuntime.jsx(Menu$3.EditorContent, _objectSpread({}, _objectSpread({
|
|
15060
|
+
editor: editor
|
|
15061
|
+
}, otherProps))), isMediaUploaderActive && /*#__PURE__*/jsxRuntime.jsx(Menu$3.MediaUploader, {
|
|
15062
|
+
editor: editor,
|
|
15063
|
+
mediaUploader: mediaUploader,
|
|
15064
|
+
unsplashApiKey: editorSecrets === null || editorSecrets === void 0 ? void 0 : editorSecrets.unsplash,
|
|
15065
|
+
onClose: function onClose() {
|
|
15066
|
+
return setMediaUploader({
|
|
15067
|
+
image: false,
|
|
15068
|
+
video: false
|
|
15069
|
+
});
|
|
15070
|
+
}
|
|
15071
|
+
}), isVideoEmbedActive && /*#__PURE__*/jsxRuntime.jsx(Menu$3.EmbedOption, {
|
|
15072
|
+
editor: editor,
|
|
15073
|
+
isEmbedModalOpen: isEmbedModalOpen,
|
|
15074
|
+
setIsEmbedModalOpen: setIsEmbedModalOpen
|
|
15075
|
+
}), isAttachmentsActive && /*#__PURE__*/jsxRuntime.jsx(Attachments.Attachments, {
|
|
15076
|
+
attachments: attachments,
|
|
15077
|
+
config: attachmentsConfig,
|
|
15078
|
+
dragDropRef: wrapperRef,
|
|
15079
|
+
isIndependent: false,
|
|
15080
|
+
ref: addAttachmentsRef,
|
|
15081
|
+
setIsUploading: setIsAttachmentsUploading,
|
|
15082
|
+
className: classnames__default["default"]("ne-attachments--integrated", _defineProperty__default["default"]({}, attachmentsClassName, attachmentsClassName)),
|
|
15083
|
+
onChange: onChangeAttachments
|
|
15084
|
+
}), (editor === null || editor === void 0 ? void 0 : editor.isActive("link")) && /*#__PURE__*/jsxRuntime.jsx(LinkPopOver, {
|
|
15085
|
+
editor: editor
|
|
15086
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TableActionMenu, {
|
|
15087
|
+
editor: editor,
|
|
15088
|
+
appendTo: wrapperRef
|
|
15089
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CharacterCountWrapper, {
|
|
15090
|
+
editor: editor,
|
|
15091
|
+
isActive: isCharacterCountActive
|
|
15092
|
+
})]
|
|
15093
|
+
})
|
|
15094
|
+
})]
|
|
15095
|
+
});
|
|
14939
15096
|
};
|
|
14940
15097
|
Editor.displayName = "NeetoEditor";
|
|
14941
|
-
var Editor$1 = /*#__PURE__*/React
|
|
15098
|
+
var Editor$1 = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Editor));
|
|
14942
15099
|
|
|
14943
15100
|
module.exports = Editor$1;
|
|
14944
15101
|
//# sourceMappingURL=Editor.cjs.js.map
|