@bigbinary/neeto-editor 1.38.12 → 1.39.0
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/Editor.js +10 -9
- package/dist/Editor.js.map +1 -1
- package/dist/FormikEditor.js +2 -2
- package/dist/Menu.js +2 -2
- package/dist/{chunk-17c1b4e1.js → chunk-1888361f.js} +2369 -2252
- package/dist/chunk-1888361f.js.map +1 -0
- package/dist/cjs/Editor.cjs.js +10 -9
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +2 -2
- package/dist/cjs/Menu.cjs.js +2 -2
- package/dist/cjs/{chunk-fd7976a0.cjs.js → chunk-bdbd1ab4.cjs.js} +2362 -2245
- package/dist/cjs/chunk-bdbd1ab4.cjs.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-17c1b4e1.js.map +0 -1
- package/dist/cjs/chunk-fd7976a0.cjs.js.map +0 -1
package/dist/Editor.js
CHANGED
|
@@ -4,10 +4,11 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
4
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { useEffect, useState, useRef, forwardRef, useCallback, useImperativeHandle } from 'react';
|
|
7
|
-
import { E as Extension, a as Mark, m as mergeAttributes, b as markInputRule, c as markPasteRule, g as getMarkAttributes, N as Node, D as DecorationSet, d as Decoration, w as wrappingInputRule, t as textblockTypeInputRule, k as keydownHandler, e as callOrReturn, f as getExtensionField, n as nodeInputRule, h as findChildren, i as NodeViewWrapper, j as NodeViewContent, R as ReactNodeViewRenderer, P as PasteRule, v as validateUrl, l as escapeForRegEx, o as ReactRenderer, p as EmojiPickerMenu, q as emojiPickerApi, r as combineTransactionSteps, s as getChangedRanges, u as findChildrenInRange, x as getMarksBetween, y as getAttributes, I as InputRule, z as highlightFocussedNode, A as resetFocussedNode, B as findParentNodeClosestToPos, C as BubbleMenu, F as getLinkPopoverPosition, G as getMarkType, H as getMarkRange, J as useEditor, M as Menu$4, K as EditorContent, L as MediaUploader, O as EmbedOption, Q as EditorView } from './chunk-
|
|
7
|
+
import { E as Extension, a as Mark, m as mergeAttributes, b as markInputRule, c as markPasteRule, g as getMarkAttributes, N as Node, D as DecorationSet, d as Decoration, w as wrappingInputRule, t as textblockTypeInputRule, k as keydownHandler, e as callOrReturn, f as getExtensionField, n as nodeInputRule, h as findChildren, i as NodeViewWrapper, j as NodeViewContent, R as ReactNodeViewRenderer, P as PasteRule, v as validateUrl, l as escapeForRegEx, o as ReactRenderer, p as EmojiPickerMenu, q as emojiPickerApi, r as combineTransactionSteps, s as getChangedRanges, u as findChildrenInRange, x as getMarksBetween, y as getAttributes, I as InputRule, z as highlightFocussedNode, A as resetFocussedNode, B as findParentNodeClosestToPos, C as BubbleMenu, F as getLinkPopoverPosition, G as getMarkType, H as getMarkRange, J as useEditor, M as Menu$4, K as EditorContent, L as MediaUploader, O as EmbedOption, Q as EditorView } from './chunk-1888361f.js';
|
|
8
8
|
import classnames from 'classnames';
|
|
9
9
|
import { C as COMBINED_REGEX, D as DIRECT_UPLOAD_ENDPOINT, E as EDITOR_OPTIONS } from './chunk-edd8b9fe.js';
|
|
10
10
|
import { isNotPresent, isNotEmpty, isPresent, noop as noop$1, slugify } from '@bigbinary/neeto-cist';
|
|
11
|
+
import { useOnClickOutside, useFuncDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
11
12
|
import { Dropdown, Input, Button, Spinner, Modal, Toastr, Avatar, Typography, Checkbox, Label } from '@bigbinary/neetoui';
|
|
12
13
|
import { is, isNil, mergeRight, isEmpty as isEmpty$1, assoc, equals } from 'ramda';
|
|
13
14
|
import { n } from './chunk-15c449f1.js';
|
|
@@ -32,7 +33,6 @@ import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
|
32
33
|
import _extends from '@babel/runtime/helpers/extends';
|
|
33
34
|
import { M as MARGIN_HEIGHT } from './chunk-5bc5e361.js';
|
|
34
35
|
import Tippy from '@tippyjs/react';
|
|
35
|
-
import { useOnClickOutside } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
36
36
|
import { Form, Input as Input$1 } from '@bigbinary/neetoui/formik';
|
|
37
37
|
import { A as Attachments } from './chunk-b66ef3a3.js';
|
|
38
38
|
import 'tippy.js/dist/svg-arrow.css';
|
|
@@ -41,9 +41,9 @@ import 'axios';
|
|
|
41
41
|
import 'react-colorful';
|
|
42
42
|
import '@bigbinary/neeto-molecules/DynamicVariables';
|
|
43
43
|
import './chunk-65f73e5a.js';
|
|
44
|
-
import 'yup';
|
|
45
44
|
import 'zustand/shallow';
|
|
46
45
|
import 'zustand';
|
|
46
|
+
import 'yup';
|
|
47
47
|
|
|
48
48
|
var ErrorWrapper = function ErrorWrapper(_ref) {
|
|
49
49
|
var error = _ref.error,
|
|
@@ -14693,6 +14693,10 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14693
14693
|
},
|
|
14694
14694
|
isDisabled: isAttachmentsUploading
|
|
14695
14695
|
};
|
|
14696
|
+
var debouncedOnChangeHandler = useFuncDebounce(function (_ref2) {
|
|
14697
|
+
var editor = _ref2.editor;
|
|
14698
|
+
return onChange(editor.getHTML());
|
|
14699
|
+
}, 100);
|
|
14696
14700
|
var customExtensions = useCustomExtensions({
|
|
14697
14701
|
placeholder: placeholder,
|
|
14698
14702
|
extensions: extensions,
|
|
@@ -14744,14 +14748,11 @@ var Editor = function Editor(_ref, ref) {
|
|
|
14744
14748
|
parseOptions: {
|
|
14745
14749
|
preserveWhitespace: true
|
|
14746
14750
|
},
|
|
14747
|
-
onCreate: function onCreate(
|
|
14748
|
-
var editor = _ref2.editor;
|
|
14749
|
-
return !autoFocus && setInitialPosition(editor);
|
|
14750
|
-
},
|
|
14751
|
-
onUpdate: function onUpdate(_ref3) {
|
|
14751
|
+
onCreate: function onCreate(_ref3) {
|
|
14752
14752
|
var editor = _ref3.editor;
|
|
14753
|
-
return
|
|
14753
|
+
return !autoFocus && setInitialPosition(editor);
|
|
14754
14754
|
},
|
|
14755
|
+
onUpdate: debouncedOnChangeHandler,
|
|
14755
14756
|
onFocus: onFocus,
|
|
14756
14757
|
onBlur: onBlur
|
|
14757
14758
|
});
|