@bigbinary/neeto-editor 1.28.10 → 1.28.12
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/index.cjs.js +8 -4
- package/index.cjs.js.map +1 -1
- package/index.js +9 -5
- package/index.js.map +1 -1
- package/package.json +8 -8
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNotEmpty, findBy, noop as noop$2, removeBy, findIndexBy, removeById, slugify } from '@bigbinary/neeto-commons-frontend/pure';
|
|
2
|
-
import { pluck, isEmpty as isEmpty$1, isNil, mergeDeepLeft, assoc, mergeRight, concat as concat$3, is,
|
|
2
|
+
import { pluck, isEmpty as isEmpty$1, isNil, mergeDeepLeft, assoc, mergeRight, concat as concat$3, is, not, prop, fromPairs, last, min as min$1 } from 'ramda';
|
|
3
3
|
import * as React$6 from 'react';
|
|
4
4
|
import React__default, { useContext, useState, useRef as useRef$1, useEffect as useEffect$1, useImperativeHandle, createContext, forwardRef as forwardRef$1, cloneElement, useLayoutEffect, useMemo, useCallback } from 'react';
|
|
5
5
|
import { renderToString } from 'react-dom/server';
|
|
@@ -12,6 +12,7 @@ import { useFuncDebounce, useOnClickOutside } from '@bigbinary/neeto-commons-fro
|
|
|
12
12
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
13
13
|
import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
|
|
14
14
|
import { FastField } from 'formik';
|
|
15
|
+
import { createRoot } from 'react-dom/client';
|
|
15
16
|
|
|
16
17
|
// ::- Persistent data structure representing an ordered mapping from
|
|
17
18
|
// strings to values, with some convenient update methods.
|
|
@@ -94879,7 +94880,9 @@ var MediaUploader = function MediaUploader(_ref) {
|
|
|
94879
94880
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
94880
94881
|
closeButton: false,
|
|
94881
94882
|
isOpen: isOpen,
|
|
94882
|
-
|
|
94883
|
+
closeOnEsc: not(isUploading),
|
|
94884
|
+
closeOnOutsideClick: not(isUploading),
|
|
94885
|
+
onClose: handleClose
|
|
94883
94886
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
94884
94887
|
className: "ne-media-uploader"
|
|
94885
94888
|
}, !isNilOrEmpty(tabs) && /*#__PURE__*/React__default.createElement(Tab, null, tabs.map(function (_ref3) {
|
|
@@ -94896,8 +94899,8 @@ var MediaUploader = function MediaUploader(_ref) {
|
|
|
94896
94899
|
className: "ne-media-uploader__content"
|
|
94897
94900
|
}, activeTab === "local" && /*#__PURE__*/React__default.createElement(LocalUploader, {
|
|
94898
94901
|
insertMediaToEditor: insertMediaToEditor,
|
|
94899
|
-
isImage: mediaUploader.image,
|
|
94900
94902
|
setIsUploading: setIsUploading,
|
|
94903
|
+
isImage: mediaUploader.image,
|
|
94901
94904
|
onClose: handleClose
|
|
94902
94905
|
}), activeTab === "link" && /*#__PURE__*/React__default.createElement(URLForm, {
|
|
94903
94906
|
placeholder: t("placeholders.pasteLink"),
|
|
@@ -98675,11 +98678,12 @@ var EditorContent = function EditorContent(_ref) {
|
|
|
98675
98678
|
preTags.forEach(function (preTag) {
|
|
98676
98679
|
var button = document.createElement("div");
|
|
98677
98680
|
button.className = "neeto-editor-codeblock-options";
|
|
98678
|
-
|
|
98681
|
+
var root = createRoot(button);
|
|
98682
|
+
root.render( /*#__PURE__*/React__default.createElement(CopyToClipboardButton, {
|
|
98679
98683
|
size: "small",
|
|
98680
98684
|
style: "text",
|
|
98681
98685
|
value: preTag.textContent
|
|
98682
|
-
})
|
|
98686
|
+
}));
|
|
98683
98687
|
preTag.appendChild(button);
|
|
98684
98688
|
});
|
|
98685
98689
|
};
|