@bigbinary/neeto-editor 1.47.68 → 1.47.69
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 +17 -8
- package/dist/Editor.js.map +1 -1
- package/dist/FormikEditor.js +2 -2
- package/dist/Menu.js +2 -2
- package/dist/{chunk-BIK97q64.js → chunk-Bb0y1lai.js} +53 -33
- package/dist/chunk-Bb0y1lai.js.map +1 -0
- package/dist/cjs/Editor.cjs.js +17 -8
- 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-BFpvPDMY.cjs.js → chunk-BwbMuztF.cjs.js} +53 -32
- package/dist/cjs/chunk-BwbMuztF.cjs.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-BIK97q64.js.map +0 -1
- package/dist/cjs/chunk-BFpvPDMY.cjs.js.map +0 -1
package/dist/FormikEditor.js
CHANGED
|
@@ -8,7 +8,7 @@ import Editor from './Editor.js';
|
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
9
9
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
10
10
|
import '@babel/runtime/helpers/slicedToArray';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-Bb0y1lai.js';
|
|
12
12
|
import './chunk-DmrvuTKK.js';
|
|
13
13
|
import 'i18next';
|
|
14
14
|
import '@bigbinary/neeto-icons/TextH1';
|
|
@@ -68,7 +68,6 @@ import '@bigbinary/neeto-icons/Customize';
|
|
|
68
68
|
import '@bigbinary/neeto-icons/Refresh';
|
|
69
69
|
import '@bigbinary/neetoui/Input';
|
|
70
70
|
import 'react-colorful';
|
|
71
|
-
import '@bigbinary/neeto-molecules/DynamicVariables';
|
|
72
71
|
import '@bigbinary/neeto-image-uploader-frontend';
|
|
73
72
|
import '@bigbinary/neetoui/Modal';
|
|
74
73
|
import '@bigbinary/neetoui/Tab';
|
|
@@ -99,6 +98,7 @@ import '@bigbinary/neeto-icons/misc/Danger';
|
|
|
99
98
|
import '@bigbinary/neeto-icons/misc/Megaphone';
|
|
100
99
|
import '@bigbinary/neeto-icons/misc/Success';
|
|
101
100
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
101
|
+
import '@bigbinary/neeto-molecules/DynamicVariables';
|
|
102
102
|
import '@tippyjs/react';
|
|
103
103
|
import './chunk-BtgLcjAt.js';
|
|
104
104
|
import '@tanstack/react-query';
|
package/dist/Menu.js
CHANGED
|
@@ -3,7 +3,7 @@ import '@babel/runtime/helpers/toConsumableArray';
|
|
|
3
3
|
import '@babel/runtime/helpers/slicedToArray';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'ramda';
|
|
6
|
-
export { M as default } from './chunk-
|
|
6
|
+
export { M as default } from './chunk-Bb0y1lai.js';
|
|
7
7
|
import './chunk-BnpU7flF.js';
|
|
8
8
|
import 'react/jsx-runtime';
|
|
9
9
|
import './chunk-DmrvuTKK.js';
|
|
@@ -65,7 +65,6 @@ import '@bigbinary/neeto-icons/Refresh';
|
|
|
65
65
|
import '@bigbinary/neetoui/Input';
|
|
66
66
|
import 'react-colorful';
|
|
67
67
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
68
|
-
import '@bigbinary/neeto-molecules/DynamicVariables';
|
|
69
68
|
import '@bigbinary/neeto-image-uploader-frontend';
|
|
70
69
|
import '@bigbinary/neetoui/Modal';
|
|
71
70
|
import '@bigbinary/neetoui/Tab';
|
|
@@ -97,5 +96,6 @@ import '@bigbinary/neeto-icons/misc/Danger';
|
|
|
97
96
|
import '@bigbinary/neeto-icons/misc/Megaphone';
|
|
98
97
|
import '@bigbinary/neeto-icons/misc/Success';
|
|
99
98
|
import '@bigbinary/neeto-icons/MenuHorizontal';
|
|
99
|
+
import '@bigbinary/neeto-molecules/DynamicVariables';
|
|
100
100
|
import '@tippyjs/react';
|
|
101
101
|
//# sourceMappingURL=Menu.js.map
|
|
@@ -63,7 +63,6 @@ import Refresh from '@bigbinary/neeto-icons/Refresh';
|
|
|
63
63
|
import Input from '@bigbinary/neetoui/Input';
|
|
64
64
|
import { HexColorPicker } from 'react-colorful';
|
|
65
65
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
66
|
-
import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
|
|
67
66
|
import { ImageUploader } from '@bigbinary/neeto-image-uploader-frontend';
|
|
68
67
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
69
68
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
@@ -85,6 +84,7 @@ import Danger from '@bigbinary/neeto-icons/misc/Danger';
|
|
|
85
84
|
import Megaphone from '@bigbinary/neeto-icons/misc/Megaphone';
|
|
86
85
|
import Success from '@bigbinary/neeto-icons/misc/Success';
|
|
87
86
|
import MenuHorizontal from '@bigbinary/neeto-icons/MenuHorizontal';
|
|
87
|
+
import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
|
|
88
88
|
import Tippy from '@tippyjs/react';
|
|
89
89
|
import { D as DEFAULT_EDITOR_OPTIONS } from './chunk-BnpU7flF.js';
|
|
90
90
|
|
|
@@ -17443,6 +17443,53 @@ var useEditorState = function useEditorState(_ref) {
|
|
|
17443
17443
|
}, [editor, neetoKbArticleState === null || neetoKbArticleState === void 0 ? void 0 : neetoKbArticleState.active, handleSelectionUpdate]);
|
|
17444
17444
|
};
|
|
17445
17445
|
|
|
17446
|
+
var MenuDynamicVariables = function MenuDynamicVariables(_ref) {
|
|
17447
|
+
var editor = _ref.editor,
|
|
17448
|
+
_ref$variables = _ref.variables,
|
|
17449
|
+
variables = _ref$variables === void 0 ? [] : _ref$variables,
|
|
17450
|
+
_ref$standalone = _ref.standalone,
|
|
17451
|
+
standalone = _ref$standalone === void 0 ? false : _ref$standalone;
|
|
17452
|
+
var _useTranslation = useTranslation(),
|
|
17453
|
+
t = _useTranslation.t;
|
|
17454
|
+
if (isEmpty(variables)) return null;
|
|
17455
|
+
var handleVariableClick = function handleVariableClick(item) {
|
|
17456
|
+
var category = item.category,
|
|
17457
|
+
categoryLabel = item.categoryLabel,
|
|
17458
|
+
key = item.key,
|
|
17459
|
+
label = item.label;
|
|
17460
|
+
var variableName = category ? "".concat(category, ".").concat(key) : key;
|
|
17461
|
+
var variableLabel = category ? "".concat(categoryLabel || category, ":").concat(label) : label;
|
|
17462
|
+
editor.chain().focus().setVariable({
|
|
17463
|
+
id: variableName,
|
|
17464
|
+
label: variableLabel
|
|
17465
|
+
}).run();
|
|
17466
|
+
};
|
|
17467
|
+
return /*#__PURE__*/jsx("div", {
|
|
17468
|
+
className: "neeto-editor-fixed-menu__variables",
|
|
17469
|
+
"data-cy": "neeto-editor-fixed-menu-variables",
|
|
17470
|
+
style: standalone ? {
|
|
17471
|
+
position: "absolute",
|
|
17472
|
+
right: "0px",
|
|
17473
|
+
top: "8px",
|
|
17474
|
+
bottom: "auto",
|
|
17475
|
+
zIndex: 10
|
|
17476
|
+
} : undefined,
|
|
17477
|
+
children: /*#__PURE__*/jsx(DynamicVariables, {
|
|
17478
|
+
variables: variables,
|
|
17479
|
+
dropdownProps: {
|
|
17480
|
+
buttonSize: "small",
|
|
17481
|
+
buttonProps: {
|
|
17482
|
+
tooltipProps: {
|
|
17483
|
+
content: t("neetoEditor.menu.dynamicVariables"),
|
|
17484
|
+
position: "bottom"
|
|
17485
|
+
}
|
|
17486
|
+
}
|
|
17487
|
+
},
|
|
17488
|
+
onVariableClick: handleVariableClick
|
|
17489
|
+
})
|
|
17490
|
+
});
|
|
17491
|
+
};
|
|
17492
|
+
|
|
17446
17493
|
var _excluded$2 = ["type"];
|
|
17447
17494
|
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; }
|
|
17448
17495
|
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(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; }
|
|
@@ -17493,8 +17540,6 @@ var Fixed = function Fixed(_ref) {
|
|
|
17493
17540
|
}, [editor]);
|
|
17494
17541
|
var menuRef = useRef(null);
|
|
17495
17542
|
var menuContainerRef = useRef(null);
|
|
17496
|
-
var _useTranslation = useTranslation(),
|
|
17497
|
-
t = _useTranslation.t;
|
|
17498
17543
|
var runEditorCommand = useCallback(function (command) {
|
|
17499
17544
|
return function () {
|
|
17500
17545
|
return command(editorRef.current);
|
|
@@ -17567,18 +17612,6 @@ var Fixed = function Fixed(_ref) {
|
|
|
17567
17612
|
}, [menuContainerRef.current, handleResize, menuGroups]);
|
|
17568
17613
|
if (!editor) return null;
|
|
17569
17614
|
var isMediaUploaderActive = options.includes(EDITOR_OPTIONS.IMAGE_UPLOAD) || options.includes(EDITOR_OPTIONS.VIDEO_UPLOAD);
|
|
17570
|
-
var handleVariableClick = function handleVariableClick(item) {
|
|
17571
|
-
var category = item.category,
|
|
17572
|
-
categoryLabel = item.categoryLabel,
|
|
17573
|
-
key = item.key,
|
|
17574
|
-
label = item.label;
|
|
17575
|
-
var variableName = category ? "".concat(category, ".").concat(key) : key;
|
|
17576
|
-
var variableLabel = category ? "".concat(categoryLabel || category, ":").concat(label) : label;
|
|
17577
|
-
editor.chain().focus().setVariable({
|
|
17578
|
-
id: variableName,
|
|
17579
|
-
label: variableLabel
|
|
17580
|
-
}).run();
|
|
17581
|
-
};
|
|
17582
17615
|
return /*#__PURE__*/jsxs("div", {
|
|
17583
17616
|
ref: menuContainerRef,
|
|
17584
17617
|
className: classnames("neeto-editor-fixed-menu", _defineProperty({
|
|
@@ -17603,22 +17636,9 @@ var Fixed = function Fixed(_ref) {
|
|
|
17603
17636
|
editor: editor,
|
|
17604
17637
|
groups: moreMenuItems
|
|
17605
17638
|
})]
|
|
17606
|
-
}),
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
children: /*#__PURE__*/jsx(DynamicVariables, {
|
|
17610
|
-
variables: variables,
|
|
17611
|
-
dropdownProps: {
|
|
17612
|
-
buttonSize: "small",
|
|
17613
|
-
buttonProps: {
|
|
17614
|
-
tooltipProps: {
|
|
17615
|
-
content: t("neetoEditor.menu.dynamicVariables"),
|
|
17616
|
-
position: "bottom"
|
|
17617
|
-
}
|
|
17618
|
-
}
|
|
17619
|
-
},
|
|
17620
|
-
onVariableClick: handleVariableClick
|
|
17621
|
-
})
|
|
17639
|
+
}), /*#__PURE__*/jsx(MenuDynamicVariables, {
|
|
17640
|
+
editor: editor,
|
|
17641
|
+
variables: variables
|
|
17622
17642
|
}), isAddLinkActive && /*#__PURE__*/jsx(LinkAddPopOver, {
|
|
17623
17643
|
editor: editor,
|
|
17624
17644
|
isAddLinkActive: isAddLinkActive,
|
|
@@ -18954,5 +18974,5 @@ var Menu = function Menu(props) {
|
|
|
18954
18974
|
}));
|
|
18955
18975
|
};
|
|
18956
18976
|
|
|
18957
|
-
export { getChangedRanges as A, findChildrenInRange as B, CALLOUT_TYPES as C, DecorationSet as D, Extension as E, getMarksBetween as F, getAttributes as G, highlightFocussedNode as H, InputRule as I, resetFocussedNode as J, findParentNodeClosestToPos as K, BubbleMenu as L, Menu as M, Node as N, getLinkPopoverPosition as O, PasteRule as P, getMarkType as Q, ReactNodeViewRenderer as R, getMarkRange as S, useEditor as T, useEditorState$1 as U,
|
|
18958
|
-
//# sourceMappingURL=chunk-
|
|
18977
|
+
export { getChangedRanges as A, findChildrenInRange as B, CALLOUT_TYPES as C, DecorationSet as D, Extension as E, getMarksBetween as F, getAttributes as G, highlightFocussedNode as H, InputRule as I, resetFocussedNode as J, findParentNodeClosestToPos as K, BubbleMenu as L, Menu as M, Node as N, getLinkPopoverPosition as O, PasteRule as P, getMarkType as Q, ReactNodeViewRenderer as R, getMarkRange as S, useEditor as T, useEditorState$1 as U, MenuDynamicVariables as V, EditorContent as W, MediaUploader as X, LinkAddPopOver as Y, EditorView as Z, Mark as a, markInputRule as b, markPasteRule as c, Decoration as d, callOrReturn as e, getExtensionField as f, getMarkAttributes as g, getNodeType as h, isNodeSelection as i, getNodeAtPosition as j, keydownHandler as k, isNodeActive as l, mergeAttributes as m, nodeInputRule as n, isAtStartOfNode as o, isAtEndOfNode as p, NodeViewWrapper as q, NodeViewContent as r, findChildren as s, textblockTypeInputRule as t, escapeForRegEx as u, ReactRenderer as v, wrappingInputRule as w, EmojiPickerMenu as x, emojiPickerApi as y, combineTransactionSteps as z };
|
|
18978
|
+
//# sourceMappingURL=chunk-Bb0y1lai.js.map
|