@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.
Files changed (44) hide show
  1. package/dist/Attachments.js +17 -5
  2. package/dist/Attachments.js.map +1 -1
  3. package/dist/Editor.js +629 -508
  4. package/dist/Editor.js.map +1 -1
  5. package/dist/EditorContent.js +50 -41
  6. package/dist/EditorContent.js.map +1 -1
  7. package/dist/FormikEditor.js +91 -30
  8. package/dist/FormikEditor.js.map +1 -1
  9. package/dist/Menu.js +45 -5
  10. package/dist/Menu.js.map +1 -1
  11. package/dist/{chunk-b39dfdd8.js → chunk-27a003fe.js} +831 -708
  12. package/dist/{chunk-b39dfdd8.js.map → chunk-27a003fe.js.map} +1 -1
  13. package/dist/{chunk-6dabc0b1.js → chunk-54bb591c.js} +66 -43
  14. package/dist/{chunk-6dabc0b1.js.map → chunk-54bb591c.js.map} +1 -1
  15. package/dist/{chunk-52091cdb.js → chunk-91e5e60f.js} +186 -152
  16. package/dist/chunk-91e5e60f.js.map +1 -0
  17. package/dist/{chunk-c1e6a992.js → chunk-eafe8fe4.js} +24 -18
  18. package/dist/{chunk-c1e6a992.js.map → chunk-eafe8fe4.js.map} +1 -1
  19. package/dist/cjs/Attachments.cjs.js +17 -5
  20. package/dist/cjs/Attachments.cjs.js.map +1 -1
  21. package/dist/cjs/Editor.cjs.js +705 -548
  22. package/dist/cjs/Editor.cjs.js.map +1 -1
  23. package/dist/cjs/EditorContent.cjs.js +61 -50
  24. package/dist/cjs/EditorContent.cjs.js.map +1 -1
  25. package/dist/cjs/FormikEditor.cjs.js +94 -33
  26. package/dist/cjs/FormikEditor.cjs.js.map +1 -1
  27. package/dist/cjs/Menu.cjs.js +45 -5
  28. package/dist/cjs/Menu.cjs.js.map +1 -1
  29. package/dist/cjs/{chunk-d12e89fd.cjs.js → chunk-242eea5e.cjs.js} +1033 -874
  30. package/dist/cjs/{chunk-d12e89fd.cjs.js.map → chunk-242eea5e.cjs.js.map} +1 -1
  31. package/dist/cjs/{chunk-d0720eac.cjs.js → chunk-391e4970.cjs.js} +214 -170
  32. package/dist/cjs/chunk-391e4970.cjs.js.map +1 -0
  33. package/dist/cjs/{chunk-3777ae13.cjs.js → chunk-969db227.cjs.js} +88 -60
  34. package/dist/cjs/{chunk-3777ae13.cjs.js.map → chunk-969db227.cjs.js.map} +1 -1
  35. package/dist/cjs/{chunk-76a5f21a.cjs.js → chunk-ae47a2a1.cjs.js} +41 -31
  36. package/dist/cjs/{chunk-76a5f21a.cjs.js.map → chunk-ae47a2a1.cjs.js.map} +1 -1
  37. package/dist/cjs/index.cjs.js +65 -7
  38. package/dist/cjs/index.cjs.js.map +1 -1
  39. package/dist/editor-stats.html +1 -1
  40. package/dist/index.js +65 -7
  41. package/dist/index.js.map +1 -1
  42. package/package.json +4 -3
  43. package/dist/chunk-52091cdb.js.map +0 -1
  44. package/dist/cjs/chunk-d0720eac.cjs.js.map +0 -1
@@ -1,8 +1,7 @@
1
- import _extends$1 from '@babel/runtime/helpers/extends';
2
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
2
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
3
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
- import React__default, { forwardRef, createContext, useRef, useState, useEffect, useContext, memo, useCallback, useMemo } from 'react';
4
+ import React__default, { forwardRef, createContext, useRef, useState, useEffect, useContext, memo, useCallback, useMemo, createElement } from 'react';
6
5
  import { isEmpty, fromPairs, prop, not, assoc, last } from 'ramda';
7
6
  import { n } from './chunk-15c449f1.js';
8
7
  import i18n, { t as t$1 } from 'i18next';
@@ -13,10 +12,36 @@ import classnames from 'classnames';
13
12
  import { Y as YOUTUBE_URL_REGEXP, V as VIMEO_URL_REGEXP, L as LOOM_URL_REGEXP, N as NEETO_RECORD_URL_REGEXP, U as URL_REGEXP, E as EDITOR_OPTIONS, a as UNSPLASH_BASE_URL } from './chunk-edd8b9fe.js';
14
13
  import { hyphenate, isNotPresent, noop, isNotEmpty, findBy } from '@bigbinary/neeto-cist';
15
14
  import 'tippy.js/dist/svg-arrow.css';
16
- import { Smiley, Close, Check, TextBold, TextItalic, Underline, Link, TextCross, Highlight, Quote, Code, CodeBlock, ListDot, ListNumber, Attachment, ImageUpload, Video, MediaVideo, Undo, Redo, Email, Customize, Refresh, Column, MenuHorizontal, File as File$1 } from '@bigbinary/neeto-icons';
17
- import { Modal, Typography, Input, Button as Button$1, Dropdown as Dropdown$1, Label, Avatar, Tooltip, Spinner, Tab, Checkbox } from '@bigbinary/neetoui';
15
+ import Link from '@bigbinary/neeto-icons/Link';
16
+ import Column from '@bigbinary/neeto-icons/Column';
17
+ import Dropdown$1 from '@bigbinary/neetoui/Dropdown';
18
18
  import { useTranslation } from 'react-i18next';
19
+ import Close from '@bigbinary/neeto-icons/Close';
20
+ import Button$1 from '@bigbinary/neetoui/Button';
21
+ import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
19
22
  import { withEventTargetValue } from '@bigbinary/neeto-commons-frontend/utils';
23
+ import Check from '@bigbinary/neeto-icons/Check';
24
+ import Label from '@bigbinary/neetoui/Label';
25
+ import Quote from '@bigbinary/neeto-icons/Quote';
26
+ import Attachment from '@bigbinary/neeto-icons/Attachment';
27
+ import CodeBlock from '@bigbinary/neeto-icons/CodeBlock';
28
+ import Code from '@bigbinary/neeto-icons/Code';
29
+ import Highlight from '@bigbinary/neeto-icons/Highlight';
30
+ import TextBold from '@bigbinary/neeto-icons/TextBold';
31
+ import TextCross from '@bigbinary/neeto-icons/TextCross';
32
+ import TextItalic from '@bigbinary/neeto-icons/TextItalic';
33
+ import Underline from '@bigbinary/neeto-icons/Underline';
34
+ import ListDot from '@bigbinary/neeto-icons/ListDot';
35
+ import ListNumber from '@bigbinary/neeto-icons/ListNumber';
36
+ import ImageUpload from '@bigbinary/neeto-icons/ImageUpload';
37
+ import Video from '@bigbinary/neeto-icons/Video';
38
+ import MediaVideo from '@bigbinary/neeto-icons/MediaVideo';
39
+ import Undo from '@bigbinary/neeto-icons/Undo';
40
+ import Redo from '@bigbinary/neeto-icons/Redo';
41
+ import Email from '@bigbinary/neeto-icons/Email';
42
+ import Avatar from '@bigbinary/neetoui/Avatar';
43
+ import Typography from '@bigbinary/neetoui/Typography';
44
+ import Smiley from '@bigbinary/neeto-icons/Smiley';
20
45
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
21
46
  import _classCallCheck$1 from '@babel/runtime/helpers/classCallCheck';
22
47
  import _createClass$1 from '@babel/runtime/helpers/createClass';
@@ -27,14 +52,24 @@ import _regeneratorRuntime from '@babel/runtime/regenerator';
27
52
  import { Picker } from 'emoji-mart';
28
53
  import axios from 'axios';
29
54
  import { withImmutableActions, useOnClickOutside, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
55
+ import Customize from '@bigbinary/neeto-icons/Customize';
56
+ import Refresh from '@bigbinary/neeto-icons/Refresh';
57
+ import Input from '@bigbinary/neetoui/Input';
30
58
  import { HexColorPicker } from 'react-colorful';
31
59
  import _objectWithoutProperties$1 from '@babel/runtime/helpers/objectWithoutProperties';
32
60
  import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
33
- import { F as File, u as useFileUploader, b as useDropFiles, A as ALLOWED_IMAGE_TYPES, e as ALLOWED_VIDEO_TYPES, f as convertToFileSize, g as DEFAULT_IMAGE_UPLOAD_CONFIG, h as DEFAULT_VIDEO_UPLOAD_CONFIG, p as propTypesExports, i as getTabs } from './chunk-c1e6a992.js';
61
+ import Modal from '@bigbinary/neetoui/Modal';
62
+ import Tab from '@bigbinary/neetoui/Tab';
63
+ import { F as File, u as useFileUploader, b as useDropFiles, A as ALLOWED_IMAGE_TYPES, e as ALLOWED_VIDEO_TYPES, f as convertToFileSize, g as DEFAULT_IMAGE_UPLOAD_CONFIG, h as DEFAULT_VIDEO_UPLOAD_CONFIG, p as propTypesExports, i as getTabs } from './chunk-eafe8fe4.js';
64
+ import Tooltip from '@bigbinary/neetoui/Tooltip';
65
+ import Spinner from '@bigbinary/neetoui/Spinner';
34
66
  import { a as getAugmentedNamespace } from './chunk-65f73e5a.js';
67
+ import Checkbox from '@bigbinary/neetoui/Checkbox';
35
68
  import { shallow } from 'zustand/shallow';
36
69
  import { create } from 'zustand';
70
+ import MenuHorizontal from '@bigbinary/neeto-icons/MenuHorizontal';
37
71
  import Tippy from '@tippyjs/react';
72
+ import File$1 from '@bigbinary/neeto-icons/File';
38
73
 
39
74
  const domIndex = function (node) {
40
75
  for (var index = 0;; index++) {
@@ -12072,33 +12107,39 @@ var EmbedOption = function EmbedOption(_ref) {
12072
12107
  handleClose();
12073
12108
  }
12074
12109
  };
12075
- return /*#__PURE__*/React.createElement(Modal, {
12110
+ return /*#__PURE__*/jsxs(Modal, {
12076
12111
  className: "ne-embed-modal-wrapper",
12077
12112
  initialFocusRef: inputRef,
12078
12113
  isOpen: isEmbedModalOpen,
12079
- onClose: handleClose
12080
- }, /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(Typography, {
12081
- style: "h2"
12082
- }, t("neetoEditor.menu.embedVideo"))), /*#__PURE__*/React.createElement(Modal.Body, {
12083
- className: "ne-embed-modal space-y-2"
12084
- }, /*#__PURE__*/React.createElement(Input, {
12085
- "data-cy": "neeto-editor-embed-input",
12086
- error: error && t("neetoEditor.error.invalidEmbedUrl"),
12087
- label: t("neetoEditor.common.videoUrl"),
12088
- ref: inputRef,
12089
- size: "medium",
12090
- type: "text",
12091
- value: embedUrl,
12092
- onChange: withEventTargetValue(handleChange),
12093
- onKeyDown: handleKeyDown
12094
- })), /*#__PURE__*/React.createElement(Modal.Footer, {
12095
- className: "space-x-2"
12096
- }, /*#__PURE__*/React.createElement(Button$1, {
12097
- "data-cy": "neeto-editor-embed-cancel",
12098
- disabled: error || isEmpty(embedUrl),
12099
- label: t("neetoEditor.common.embed"),
12100
- onClick: handleEmbed
12101
- })));
12114
+ onClose: handleClose,
12115
+ children: [/*#__PURE__*/jsx(Modal.Header, {
12116
+ children: /*#__PURE__*/jsx(Typography, {
12117
+ style: "h2",
12118
+ children: t("neetoEditor.menu.embedVideo")
12119
+ })
12120
+ }), /*#__PURE__*/jsx(Modal.Body, {
12121
+ className: "ne-embed-modal space-y-2",
12122
+ children: /*#__PURE__*/jsx(Input, {
12123
+ "data-cy": "neeto-editor-embed-input",
12124
+ error: error && t("neetoEditor.error.invalidEmbedUrl"),
12125
+ label: t("neetoEditor.common.videoUrl"),
12126
+ ref: inputRef,
12127
+ size: "medium",
12128
+ type: "text",
12129
+ value: embedUrl,
12130
+ onChange: withEventTargetValue(handleChange),
12131
+ onKeyDown: handleKeyDown
12132
+ })
12133
+ }), /*#__PURE__*/jsx(Modal.Footer, {
12134
+ className: "space-x-2",
12135
+ children: /*#__PURE__*/jsx(Button$1, {
12136
+ "data-cy": "neeto-editor-embed-cancel",
12137
+ disabled: error || isEmpty(embedUrl),
12138
+ label: t("neetoEditor.common.embed"),
12139
+ onClick: handleEmbed
12140
+ })
12141
+ })]
12142
+ });
12102
12143
  };
12103
12144
 
12104
12145
  var fetch = function fetch() {
@@ -12108,8 +12149,8 @@ var emojiPickerApi = {
12108
12149
  fetch: fetch
12109
12150
  };
12110
12151
 
12111
- 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; }
12112
- 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(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; }
12152
+ 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; }
12153
+ 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(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; }
12113
12154
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn$1(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12114
12155
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12115
12156
  var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
@@ -12161,7 +12202,7 @@ var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
12161
12202
  return _createClass$1(EmojiPickerMenu, [{
12162
12203
  key: "componentDidMount",
12163
12204
  value: function componentDidMount() {
12164
- new Picker(_objectSpread$8(_objectSpread$8({}, this.props), {}, {
12205
+ new Picker(_objectSpread$b(_objectSpread$b({}, this.props), {}, {
12165
12206
  onEmojiSelect: this.handleSelect,
12166
12207
  style: {
12167
12208
  maxWidth: "100%"
@@ -12177,7 +12218,7 @@ var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
12177
12218
  }, {
12178
12219
  key: "render",
12179
12220
  value: function render() {
12180
- return /*#__PURE__*/React__default.createElement("div", {
12221
+ return /*#__PURE__*/jsx("div", {
12181
12222
  "data-cy": "neeto-editor-emoji-picker",
12182
12223
  ref: this.ref,
12183
12224
  style: {
@@ -12219,6 +12260,8 @@ var useEditorStore = create(withImmutableActions(function (set) {
12219
12260
  };
12220
12261
  }));
12221
12262
 
12263
+ 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; }
12264
+ 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(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; }
12222
12265
  var MenuButton = function MenuButton(_ref) {
12223
12266
  var icon = _ref.icon,
12224
12267
  command = _ref.command,
@@ -12237,7 +12280,7 @@ var MenuButton = function MenuButton(_ref) {
12237
12280
  isActive = _useEditorStore.isActive,
12238
12281
  _useEditorStore$disab = _useEditorStore.disabled,
12239
12282
  disabled = _useEditorStore$disab === void 0 ? isButtonDisabled : _useEditorStore$disab;
12240
- return /*#__PURE__*/React.createElement(Button$1, _extends$1({
12283
+ return /*#__PURE__*/jsx(Button$1, _objectSpread$a({
12241
12284
  disabled: disabled,
12242
12285
  icon: icon,
12243
12286
  className: "neeto-editor-fixed-menu__item",
@@ -12257,9 +12300,10 @@ var MenuItem$3 = Dropdown$1.MenuItem;
12257
12300
  var SecondaryMenuTarget = function SecondaryMenuTarget(_ref) {
12258
12301
  var Icon = _ref.icon,
12259
12302
  label = _ref.label;
12260
- return /*#__PURE__*/React.createElement(MenuItem$3.Button, {
12261
- "data-cy": "neeto-editor-fixed-menu-".concat(hyphenate(label), "-option")
12262
- }, /*#__PURE__*/React.createElement(Icon, null), " ", label);
12303
+ return /*#__PURE__*/jsxs(MenuItem$3.Button, {
12304
+ "data-cy": "neeto-editor-fixed-menu-".concat(hyphenate(label), "-option"),
12305
+ children: [/*#__PURE__*/jsx(Icon, {}), " ", label]
12306
+ });
12263
12307
  };
12264
12308
 
12265
12309
  var EmojiOption = function EmojiOption(_ref) {
@@ -12270,7 +12314,7 @@ var EmojiOption = function EmojiOption(_ref) {
12270
12314
  _ref$isSecondaryMenu = _ref.isSecondaryMenu,
12271
12315
  isSecondaryMenu = _ref$isSecondaryMenu === void 0 ? false : _ref$isSecondaryMenu,
12272
12316
  label = _ref.label;
12273
- return /*#__PURE__*/React.createElement(Dropdown$1, {
12317
+ return /*#__PURE__*/jsx(Dropdown$1, {
12274
12318
  buttonStyle: "text",
12275
12319
  closeOnSelect: false,
12276
12320
  dropdownProps: {
@@ -12289,7 +12333,7 @@ var EmojiOption = function EmojiOption(_ref) {
12289
12333
  className: "neeto-editor-fixed-menu__item",
12290
12334
  "data-cy": "neeto-editor-fixed-menu-emoji-option"
12291
12335
  },
12292
- customTarget: isSecondaryMenu && /*#__PURE__*/React.createElement(SecondaryMenuTarget, {
12336
+ customTarget: isSecondaryMenu && /*#__PURE__*/jsx(SecondaryMenuTarget, {
12293
12337
  label: label,
12294
12338
  icon: Smiley
12295
12339
  }),
@@ -12301,11 +12345,12 @@ var EmojiOption = function EmojiOption(_ref) {
12301
12345
  return !active;
12302
12346
  });
12303
12347
  isSecondaryMenu && e.stopPropagation();
12304
- }
12305
- }, /*#__PURE__*/React.createElement(EmojiPickerMenu, {
12306
- editor: editor,
12307
- setActive: setActive
12308
- }));
12348
+ },
12349
+ children: /*#__PURE__*/jsx(EmojiPickerMenu, {
12350
+ editor: editor,
12351
+ setActive: setActive
12352
+ })
12353
+ });
12309
12354
  };
12310
12355
  var EmojiOption$1 = /*#__PURE__*/memo(EmojiOption);
12311
12356
 
@@ -12351,27 +12396,28 @@ var LinkOption = function LinkOption(_ref) {
12351
12396
  handleClose();
12352
12397
  }
12353
12398
  };
12354
- return /*#__PURE__*/React.createElement("div", {
12399
+ return /*#__PURE__*/jsxs("div", {
12355
12400
  className: "neeto-editor-bubble-menu__link",
12356
- onKeyDown: handleKeyDown
12357
- }, /*#__PURE__*/React.createElement("input", {
12358
- autoFocus: true,
12359
- className: "neeto-editor-bubble-menu-link__input",
12360
- "data-cy": "neeto-editor-link-input",
12361
- name: "url",
12362
- placeholder: t("neetoEditor.placeholders.linkInput"),
12363
- value: link,
12364
- onChange: function onChange(_ref2) {
12365
- var value = _ref2.target.value;
12366
- return setLink(value);
12367
- }
12368
- }), /*#__PURE__*/React.createElement(Button$1, {
12369
- "data-cy": "neeto-editor-link-cancel-button",
12370
- icon: Close,
12371
- size: "small",
12372
- style: "secondary",
12373
- onClick: handleReset
12374
- }));
12401
+ onKeyDown: handleKeyDown,
12402
+ children: [/*#__PURE__*/jsx("input", {
12403
+ autoFocus: true,
12404
+ className: "neeto-editor-bubble-menu-link__input",
12405
+ "data-cy": "neeto-editor-link-input",
12406
+ name: "url",
12407
+ placeholder: t("neetoEditor.placeholders.linkInput"),
12408
+ value: link,
12409
+ onChange: function onChange(_ref2) {
12410
+ var value = _ref2.target.value;
12411
+ return setLink(value);
12412
+ }
12413
+ }), /*#__PURE__*/jsx(Button$1, {
12414
+ "data-cy": "neeto-editor-link-cancel-button",
12415
+ icon: Close,
12416
+ size: "small",
12417
+ style: "secondary",
12418
+ onClick: handleReset
12419
+ })]
12420
+ });
12375
12421
  };
12376
12422
 
12377
12423
  var TableOption$2 = function TableOption(_ref) {
@@ -12396,46 +12442,54 @@ var TableOption$2 = function TableOption(_ref) {
12396
12442
  setColumns(3);
12397
12443
  handleClose();
12398
12444
  };
12399
- return /*#__PURE__*/React.createElement("div", {
12400
- className: "neeto-editor-bubble-menu__table"
12401
- }, /*#__PURE__*/React.createElement("div", {
12402
- className: "neeto-editor-bubble-menu__table__menu-item"
12403
- }, /*#__PURE__*/React.createElement(Label, {
12404
- className: "neeto-editor-bubble-menu__table__input-label"
12405
- }, t("neetoEditor.menu.rows")), /*#__PURE__*/React.createElement("input", {
12406
- autoFocus: true,
12407
- "data-cy": "neeto-editor-fixed-menu-table-option-input",
12408
- min: "1",
12409
- placeholder: t("neetoEditor.placeholders.rows"),
12410
- type: "number",
12411
- value: rows,
12412
- onChange: withEventTargetValue(setRows)
12413
- })), /*#__PURE__*/React.createElement("div", {
12414
- className: "neeto-editor-bubble-menu__table__menu-item"
12415
- }, /*#__PURE__*/React.createElement(Label, {
12416
- className: "neeto-editor-bubble-menu__table__input-label"
12417
- }, t("neetoEditor.menu.columns")), /*#__PURE__*/React.createElement("input", {
12418
- "data-cy": "neeto-editor-bubble-menu-table-option-input",
12419
- min: "1",
12420
- placeholder: t("neetoEditor.placeholders.columns"),
12421
- type: "number",
12422
- value: columns,
12423
- onChange: withEventTargetValue(setColumns)
12424
- })), /*#__PURE__*/React.createElement("div", {
12425
- className: "neeto-editor-bubble-menu__table__buttons"
12426
- }, /*#__PURE__*/React.createElement(Button$1, {
12427
- "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
12428
- icon: Check,
12429
- style: "secondary",
12430
- onClick: handleSubmit
12431
- }), /*#__PURE__*/React.createElement(Button$1, {
12432
- "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
12433
- icon: Close,
12434
- style: "secondary",
12435
- onClick: handleClose
12436
- })));
12445
+ return /*#__PURE__*/jsxs("div", {
12446
+ className: "neeto-editor-bubble-menu__table",
12447
+ children: [/*#__PURE__*/jsxs("div", {
12448
+ className: "neeto-editor-bubble-menu__table__menu-item",
12449
+ children: [/*#__PURE__*/jsx(Label, {
12450
+ className: "neeto-editor-bubble-menu__table__input-label",
12451
+ children: t("neetoEditor.menu.rows")
12452
+ }), /*#__PURE__*/jsx("input", {
12453
+ autoFocus: true,
12454
+ "data-cy": "neeto-editor-fixed-menu-table-option-input",
12455
+ min: "1",
12456
+ placeholder: t("neetoEditor.placeholders.rows"),
12457
+ type: "number",
12458
+ value: rows,
12459
+ onChange: withEventTargetValue(setRows)
12460
+ })]
12461
+ }), /*#__PURE__*/jsxs("div", {
12462
+ className: "neeto-editor-bubble-menu__table__menu-item",
12463
+ children: [/*#__PURE__*/jsx(Label, {
12464
+ className: "neeto-editor-bubble-menu__table__input-label",
12465
+ children: t("neetoEditor.menu.columns")
12466
+ }), /*#__PURE__*/jsx("input", {
12467
+ "data-cy": "neeto-editor-bubble-menu-table-option-input",
12468
+ min: "1",
12469
+ placeholder: t("neetoEditor.placeholders.columns"),
12470
+ type: "number",
12471
+ value: columns,
12472
+ onChange: withEventTargetValue(setColumns)
12473
+ })]
12474
+ }), /*#__PURE__*/jsxs("div", {
12475
+ className: "neeto-editor-bubble-menu__table__buttons",
12476
+ children: [/*#__PURE__*/jsx(Button$1, {
12477
+ "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
12478
+ icon: Check,
12479
+ style: "secondary",
12480
+ onClick: handleSubmit
12481
+ }), /*#__PURE__*/jsx(Button$1, {
12482
+ "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
12483
+ icon: Close,
12484
+ style: "secondary",
12485
+ onClick: handleClose
12486
+ })]
12487
+ })]
12488
+ });
12437
12489
  };
12438
12490
 
12491
+ 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; }
12492
+ 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(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; }
12439
12493
  var createMenuOptions$2 = function createMenuOptions(_ref) {
12440
12494
  var tooltips = _ref.tooltips,
12441
12495
  editor = _ref.editor,
@@ -12672,10 +12726,9 @@ var renderOptionButton = function renderOptionButton(_ref4) {
12672
12726
  active = _ref4.active,
12673
12727
  optionName = _ref4.optionName,
12674
12728
  highlight = _ref4.highlight;
12675
- return /*#__PURE__*/React.createElement(Button$1, _extends$1({
12729
+ return /*#__PURE__*/jsx(Button$1, _objectSpread$9({
12676
12730
  "data-cy": "neeto-editor-bubble-menu-".concat(optionName, "-option"),
12677
12731
  icon: Icon,
12678
- key: optionName,
12679
12732
  size: "small",
12680
12733
  style: active ? "secondary" : "text",
12681
12734
  tooltipProps: {
@@ -12685,7 +12738,7 @@ var renderOptionButton = function renderOptionButton(_ref4) {
12685
12738
  delay: [500]
12686
12739
  },
12687
12740
  onClick: command
12688
- }, generateFocusProps(highlight)));
12741
+ }, generateFocusProps(highlight)), optionName);
12689
12742
  };
12690
12743
 
12691
12744
  var Menu$4 = Dropdown$1.Menu,
@@ -12698,7 +12751,7 @@ var Mentions = function Mentions(_ref) {
12698
12751
  isSecondaryMenu = _ref$isSecondaryMenu === void 0 ? false : _ref$isSecondaryMenu,
12699
12752
  label = _ref.label;
12700
12753
  if (isEmpty(mentions)) return null;
12701
- return /*#__PURE__*/React.createElement(Dropdown$1, {
12754
+ return /*#__PURE__*/jsx(Dropdown$1, {
12702
12755
  buttonStyle: "text",
12703
12756
  "data-cy": "neeto-editor-mention-option",
12704
12757
  icon: Email,
@@ -12711,36 +12764,40 @@ var Mentions = function Mentions(_ref) {
12711
12764
  },
12712
12765
  className: "neeto-editor-fixed-menu__item"
12713
12766
  },
12714
- customTarget: isSecondaryMenu && /*#__PURE__*/React.createElement(SecondaryMenuTarget, {
12767
+ customTarget: isSecondaryMenu && /*#__PURE__*/jsx(SecondaryMenuTarget, {
12715
12768
  label: label,
12716
12769
  icon: Email
12717
12770
  }),
12718
12771
  onClick: function onClick(e) {
12719
12772
  return isSecondaryMenu && e.stopPropagation();
12720
- }
12721
- }, /*#__PURE__*/React.createElement(Menu$4, null, mentions.map(function (_ref2) {
12722
- var key = _ref2.key,
12723
- name = _ref2.name,
12724
- imageUrl = _ref2.imageUrl;
12725
- return /*#__PURE__*/React.createElement(MenuItem$2.Button, {
12726
- "data-cy": "neeto-editor-mention-option-".concat(key),
12727
- key: key,
12728
- onClick: function onClick() {
12729
- return editor.commands.setMention({
12730
- id: key,
12731
- label: name
12732
- });
12733
- }
12734
- }, /*#__PURE__*/React.createElement(Avatar, {
12735
- size: "small",
12736
- user: {
12737
- name: name,
12738
- imageUrl: imageUrl
12739
- }
12740
- }), /*#__PURE__*/React.createElement(Typography, {
12741
- style: "body2"
12742
- }, name));
12743
- })));
12773
+ },
12774
+ children: /*#__PURE__*/jsx(Menu$4, {
12775
+ children: mentions.map(function (_ref2) {
12776
+ var key = _ref2.key,
12777
+ name = _ref2.name,
12778
+ imageUrl = _ref2.imageUrl;
12779
+ return /*#__PURE__*/jsxs(MenuItem$2.Button, {
12780
+ "data-cy": "neeto-editor-mention-option-".concat(key),
12781
+ onClick: function onClick() {
12782
+ return editor.commands.setMention({
12783
+ id: key,
12784
+ label: name
12785
+ });
12786
+ },
12787
+ children: [/*#__PURE__*/jsx(Avatar, {
12788
+ size: "small",
12789
+ user: {
12790
+ name: name,
12791
+ imageUrl: imageUrl
12792
+ }
12793
+ }), /*#__PURE__*/jsx(Typography, {
12794
+ style: "body2",
12795
+ children: name
12796
+ })]
12797
+ }, key);
12798
+ })
12799
+ })
12800
+ });
12744
12801
  };
12745
12802
  var Mentions$1 = /*#__PURE__*/memo(Mentions);
12746
12803
 
@@ -12784,7 +12841,7 @@ var TextColorOption = function TextColorOption(_ref) {
12784
12841
  setColor(editor.getAttributes("textStyle").color);
12785
12842
  setIsOpen(not);
12786
12843
  };
12787
- return /*#__PURE__*/React.createElement(Dropdown$1, {
12844
+ return /*#__PURE__*/jsx(Dropdown$1, {
12788
12845
  isOpen: isOpen,
12789
12846
  buttonStyle: isOpen || color ? "secondary" : "text",
12790
12847
  icon: Customize,
@@ -12796,56 +12853,59 @@ var TextColorOption = function TextColorOption(_ref) {
12796
12853
  },
12797
12854
  className: "neeto-editor-fixed-menu__item neeto-editor-text-color-option"
12798
12855
  },
12799
- customTarget: isSecondaryMenu && /*#__PURE__*/React.createElement(SecondaryMenuTarget, {
12856
+ customTarget: isSecondaryMenu && /*#__PURE__*/jsx(SecondaryMenuTarget, {
12800
12857
  label: label,
12801
12858
  icon: Customize
12802
12859
  }),
12803
- onClick: openColorPicker
12804
- }, /*#__PURE__*/React.createElement("div", {
12805
- ref: dropdownWrapperRef,
12806
- style: {
12807
- "min-width": "236px"
12808
- },
12809
- onClick: function onClick(e) {
12810
- e.stopPropagation();
12811
- }
12812
- }, /*#__PURE__*/React.createElement(HexColorPicker, {
12813
- color: color || "#000000",
12814
- onChange: setColor
12815
- }), /*#__PURE__*/React.createElement("div", {
12816
- className: "neeto-editor-text-color-option__options-group"
12817
- }, /*#__PURE__*/React.createElement(Input, {
12818
- autoFocus: true,
12819
- className: "neeto-editor-text-color-option__options-group__input",
12820
- placeholder: t("neetoEditor.placeholders.pickColor"),
12821
- size: "small",
12822
- value: color,
12823
- onChange: withEventTargetValue(setColor),
12824
- onClick: function onClick(event) {
12825
- return event.stopPropagation();
12826
- }
12827
- }), /*#__PURE__*/React.createElement(Button$1, {
12828
- icon: Check,
12829
- size: "small",
12830
- onClick: handleSave
12831
- }), /*#__PURE__*/React.createElement(Button$1, {
12832
- icon: Close,
12833
- size: "small",
12834
- style: "text",
12835
- onClick: function onClick() {
12836
- editor.commands.focus();
12837
- setIsOpen(false);
12838
- }
12839
- }), /*#__PURE__*/React.createElement(Button$1, {
12840
- icon: Refresh,
12841
- size: "small",
12842
- style: "text",
12843
- tooltipProps: {
12844
- content: t("neetoEditor.common.resetToDefault"),
12845
- position: "top"
12846
- },
12847
- onClick: handleUnset
12848
- }))));
12860
+ onClick: openColorPicker,
12861
+ children: /*#__PURE__*/jsxs("div", {
12862
+ ref: dropdownWrapperRef,
12863
+ style: {
12864
+ "min-width": "236px"
12865
+ },
12866
+ onClick: function onClick(e) {
12867
+ e.stopPropagation();
12868
+ },
12869
+ children: [/*#__PURE__*/jsx(HexColorPicker, {
12870
+ color: color || "#000000",
12871
+ onChange: setColor
12872
+ }), /*#__PURE__*/jsxs("div", {
12873
+ className: "neeto-editor-text-color-option__options-group",
12874
+ children: [/*#__PURE__*/jsx(Input, {
12875
+ autoFocus: true,
12876
+ className: "neeto-editor-text-color-option__options-group__input",
12877
+ placeholder: t("neetoEditor.placeholders.pickColor"),
12878
+ size: "small",
12879
+ value: color,
12880
+ onChange: withEventTargetValue(setColor),
12881
+ onClick: function onClick(event) {
12882
+ return event.stopPropagation();
12883
+ }
12884
+ }), /*#__PURE__*/jsx(Button$1, {
12885
+ icon: Check,
12886
+ size: "small",
12887
+ onClick: handleSave
12888
+ }), /*#__PURE__*/jsx(Button$1, {
12889
+ icon: Close,
12890
+ size: "small",
12891
+ style: "text",
12892
+ onClick: function onClick() {
12893
+ editor.commands.focus();
12894
+ setIsOpen(false);
12895
+ }
12896
+ }), /*#__PURE__*/jsx(Button$1, {
12897
+ icon: Refresh,
12898
+ size: "small",
12899
+ style: "text",
12900
+ tooltipProps: {
12901
+ content: t("neetoEditor.common.resetToDefault"),
12902
+ position: "top"
12903
+ },
12904
+ onClick: handleUnset
12905
+ })]
12906
+ })]
12907
+ })
12908
+ });
12849
12909
  };
12850
12910
 
12851
12911
  var Options = function Options(_ref) {
@@ -12895,7 +12955,7 @@ var Options = function Options(_ref) {
12895
12955
  }, 1000);
12896
12956
  };
12897
12957
  if (isLinkOptionActive) {
12898
- return /*#__PURE__*/React.createElement(LinkOption, {
12958
+ return /*#__PURE__*/jsx(LinkOption, {
12899
12959
  editor: editor,
12900
12960
  handleAnimateInvalidLink: handleAnimateInvalidLink,
12901
12961
  handleClose: function handleClose() {
@@ -12904,56 +12964,61 @@ var Options = function Options(_ref) {
12904
12964
  });
12905
12965
  }
12906
12966
  if (isTableOptionActive) {
12907
- return /*#__PURE__*/React.createElement(TableOption$2, {
12967
+ return /*#__PURE__*/jsx(TableOption$2, {
12908
12968
  editor: editor,
12909
12969
  handleClose: function handleClose() {
12910
12970
  return setIsTableOptionActive(false);
12911
12971
  }
12912
12972
  });
12913
12973
  }
12914
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Dropdown$1, {
12915
- buttonSize: "small",
12916
- buttonStyle: "text",
12917
- label: nodeType,
12918
- strategy: "fixed"
12919
- }, /*#__PURE__*/React.createElement(Menu, null, dropdownOptions.map(function (_ref2) {
12920
- var optionName = _ref2.optionName,
12921
- command = _ref2.command;
12922
- return /*#__PURE__*/React.createElement(MenuItem.Button, {
12923
- key: optionName,
12924
- onClick: command
12925
- }, optionName);
12926
- }))), fontStyleOptions.map(renderOptionButton), blockStyleOptions.map(renderOptionButton), isTextColorOptionActive && /*#__PURE__*/React.createElement(TextColorOption, {
12927
- editor: editor,
12928
- tooltipContent: tooltips.textColor || t("neetoEditor.menu.textColor")
12929
- }), isEmojiActive && /*#__PURE__*/React.createElement(EmojiOption$1, {
12930
- editor: editor,
12931
- isActive: isEmojiPickerActive,
12932
- setActive: setIsEmojiPickerActive,
12933
- tooltipContent: tooltips.emoji || t("neetoEditor.menu.emoji")
12934
- }), listStyleOptions.map(renderOptionButton), isLinkActive && renderOptionButton({
12935
- Icon: Link,
12936
- command: function command() {
12937
- return setIsLinkOptionActive(true);
12938
- },
12939
- active: editor.isActive("link"),
12940
- optionName: "link",
12941
- highlight: false,
12942
- tooltip: tooltips.link || t("neetoEditor.menu.link")
12943
- }), isTableActive && renderOptionButton({
12944
- Icon: Column,
12945
- command: function command() {
12946
- return setIsTableOptionActive(true);
12947
- },
12948
- active: editor.isActive("table"),
12949
- optionName: "table",
12950
- highlight: false,
12951
- tooltip: tooltips.table || t("neetoEditor.menu.table")
12952
- }), /*#__PURE__*/React.createElement(Mentions$1, {
12953
- editor: editor,
12954
- mentions: mentions,
12955
- tooltipContent: tooltips.mention || t("neetoEditor.menu.mention")
12956
- }), children);
12974
+ return /*#__PURE__*/jsxs(Fragment$1, {
12975
+ children: [/*#__PURE__*/jsx(Dropdown$1, {
12976
+ buttonSize: "small",
12977
+ buttonStyle: "text",
12978
+ label: nodeType,
12979
+ strategy: "fixed",
12980
+ children: /*#__PURE__*/jsx(Menu, {
12981
+ children: dropdownOptions.map(function (_ref2) {
12982
+ var optionName = _ref2.optionName,
12983
+ command = _ref2.command;
12984
+ return /*#__PURE__*/jsx(MenuItem.Button, {
12985
+ onClick: command,
12986
+ children: optionName
12987
+ }, optionName);
12988
+ })
12989
+ })
12990
+ }), fontStyleOptions.map(renderOptionButton), blockStyleOptions.map(renderOptionButton), isTextColorOptionActive && /*#__PURE__*/jsx(TextColorOption, {
12991
+ editor: editor,
12992
+ tooltipContent: tooltips.textColor || t("neetoEditor.menu.textColor")
12993
+ }), isEmojiActive && /*#__PURE__*/jsx(EmojiOption$1, {
12994
+ editor: editor,
12995
+ isActive: isEmojiPickerActive,
12996
+ setActive: setIsEmojiPickerActive,
12997
+ tooltipContent: tooltips.emoji || t("neetoEditor.menu.emoji")
12998
+ }), listStyleOptions.map(renderOptionButton), isLinkActive && renderOptionButton({
12999
+ Icon: Link,
13000
+ command: function command() {
13001
+ return setIsLinkOptionActive(true);
13002
+ },
13003
+ active: editor.isActive("link"),
13004
+ optionName: "link",
13005
+ highlight: false,
13006
+ tooltip: tooltips.link || t("neetoEditor.menu.link")
13007
+ }), isTableActive && renderOptionButton({
13008
+ Icon: Column,
13009
+ command: function command() {
13010
+ return setIsTableOptionActive(true);
13011
+ },
13012
+ active: editor.isActive("table"),
13013
+ optionName: "table",
13014
+ highlight: false,
13015
+ tooltip: tooltips.table || t("neetoEditor.menu.table")
13016
+ }), /*#__PURE__*/jsx(Mentions$1, {
13017
+ editor: editor,
13018
+ mentions: mentions,
13019
+ tooltipContent: tooltips.mention || t("neetoEditor.menu.mention")
13020
+ }), children]
13021
+ });
12957
13022
  };
12958
13023
 
12959
13024
  var Bubble = function Bubble(_ref) {
@@ -12990,89 +13055,102 @@ var Bubble = function Bubble(_ref) {
12990
13055
  if (!editor || !isImageNodeSelected && noTextOptions) {
12991
13056
  return null;
12992
13057
  }
12993
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BubbleMenu, {
12994
- editor: editor,
12995
- className: classnames("neeto-editor-bubble-menu", {
12996
- "neeto-editor-bubble-menu-animate-shake": isInvalidLink
12997
- }),
12998
- tippyOptions: {
12999
- arrow: roundArrow,
13000
- zIndex: 99999,
13001
- onHide: function onHide() {
13002
- setIsLinkOptionActive(false);
13003
- setIsTableOptionActive(false);
13058
+ return /*#__PURE__*/jsx("div", {
13059
+ children: /*#__PURE__*/jsx(BubbleMenu, {
13060
+ editor: editor,
13061
+ className: classnames("neeto-editor-bubble-menu", {
13062
+ "neeto-editor-bubble-menu-animate-shake": isInvalidLink
13063
+ }),
13064
+ tippyOptions: {
13065
+ arrow: roundArrow,
13066
+ zIndex: 99999,
13067
+ onHide: function onHide() {
13068
+ setIsLinkOptionActive(false);
13069
+ setIsTableOptionActive(false);
13070
+ },
13071
+ theme: "neeto-editor-bubble-menu",
13072
+ maxWidth: 500
13004
13073
  },
13005
- theme: "neeto-editor-bubble-menu",
13006
- maxWidth: 500
13007
- }
13008
- }, /*#__PURE__*/React.createElement(Options, {
13009
- attachmentProps: attachmentProps,
13010
- editor: editor,
13011
- isEmojiPickerActive: isEmojiPickerActive,
13012
- isLinkOptionActive: isLinkOptionActive,
13013
- isTableOptionActive: isTableOptionActive,
13014
- mentions: mentions,
13015
- setIsEmbedModalOpen: setIsEmbedModalOpen,
13016
- setIsEmojiPickerActive: setIsEmojiPickerActive,
13017
- setIsInvalidLink: setIsInvalidLink,
13018
- setIsLinkOptionActive: setIsLinkOptionActive,
13019
- setIsTableOptionActive: setIsTableOptionActive,
13020
- setMediaUploader: setMediaUploader,
13021
- tooltips: tooltips,
13022
- options: textOptions
13023
- }, children)));
13074
+ children: /*#__PURE__*/jsx(Options, {
13075
+ attachmentProps: attachmentProps,
13076
+ editor: editor,
13077
+ isEmojiPickerActive: isEmojiPickerActive,
13078
+ isLinkOptionActive: isLinkOptionActive,
13079
+ isTableOptionActive: isTableOptionActive,
13080
+ mentions: mentions,
13081
+ setIsEmbedModalOpen: setIsEmbedModalOpen,
13082
+ setIsEmojiPickerActive: setIsEmojiPickerActive,
13083
+ setIsInvalidLink: setIsInvalidLink,
13084
+ setIsLinkOptionActive: setIsLinkOptionActive,
13085
+ setIsTableOptionActive: setIsTableOptionActive,
13086
+ setMediaUploader: setMediaUploader,
13087
+ tooltips: tooltips,
13088
+ options: textOptions,
13089
+ children: children
13090
+ })
13091
+ })
13092
+ });
13024
13093
  };
13025
13094
 
13026
13095
  var EmptyMenu = function EmptyMenu() {
13027
- return /*#__PURE__*/React.createElement("div", null);
13096
+ return /*#__PURE__*/jsx("div", {});
13028
13097
  };
13029
13098
 
13030
13099
  var Progress = withT(function (_ref) {
13031
13100
  var t = _ref.t,
13032
13101
  queuedFiles = _ref.queuedFiles,
13033
13102
  cancelUpload = _ref.cancelUpload;
13034
- return /*#__PURE__*/React.createElement("div", {
13035
- className: "ne-media-uploader__wrapper"
13036
- }, queuedFiles.map(function (_ref2) {
13037
- var id = _ref2.id,
13038
- filename = _ref2.filename,
13039
- _ref2$progress = _ref2.progress,
13040
- progress = _ref2$progress === void 0 ? 0 : _ref2$progress;
13041
- return /*#__PURE__*/React.createElement("div", {
13042
- className: "ne-media-uploader__media",
13043
- key: id
13044
- }, /*#__PURE__*/React.createElement("div", {
13045
- className: "ne-media-uploader__media__cancel-button-wrapper"
13046
- }, /*#__PURE__*/React.createElement(Button$1, {
13047
- "data-cy": "neeto-editor-image-upload-cancel-button",
13048
- icon: Close,
13049
- iconSize: 18,
13050
- size: "small",
13051
- style: "text",
13052
- onClick: function onClick() {
13053
- return cancelUpload(id);
13054
- }
13055
- })), /*#__PURE__*/React.createElement(File, {
13056
- className: "ne-media-uploader__media__info__icon",
13057
- fileName: filename
13058
- }), /*#__PURE__*/React.createElement("div", {
13059
- className: "ne-media-uploader__media__info"
13060
- }, /*#__PURE__*/React.createElement(Typography, {
13061
- style: "nano"
13062
- }, progress === 100 && t("neetoEditor.localUploader.completed"), progress !== 100 && /*#__PURE__*/React.createElement(React.Fragment, null, progress, "%")), /*#__PURE__*/React.createElement("div", {
13063
- className: "ne-media-uploader__media__progress"
13064
- }, /*#__PURE__*/React.createElement("div", {
13065
- className: "ne-media-uploader__media__progress-bar",
13066
- style: {
13067
- width: "".concat(progress, "%")
13068
- }
13069
- })), /*#__PURE__*/React.createElement(Tooltip, {
13070
- content: filename,
13071
- position: "top"
13072
- }, /*#__PURE__*/React.createElement(Typography, {
13073
- style: "body3"
13074
- }, filename))));
13075
- }));
13103
+ return /*#__PURE__*/jsx("div", {
13104
+ className: "ne-media-uploader__wrapper",
13105
+ children: queuedFiles.map(function (_ref2) {
13106
+ var id = _ref2.id,
13107
+ filename = _ref2.filename,
13108
+ _ref2$progress = _ref2.progress,
13109
+ progress = _ref2$progress === void 0 ? 0 : _ref2$progress;
13110
+ return /*#__PURE__*/jsxs("div", {
13111
+ className: "ne-media-uploader__media",
13112
+ children: [/*#__PURE__*/jsx("div", {
13113
+ className: "ne-media-uploader__media__cancel-button-wrapper",
13114
+ children: /*#__PURE__*/jsx(Button$1, {
13115
+ "data-cy": "neeto-editor-image-upload-cancel-button",
13116
+ icon: Close,
13117
+ iconSize: 18,
13118
+ size: "small",
13119
+ style: "text",
13120
+ onClick: function onClick() {
13121
+ return cancelUpload(id);
13122
+ }
13123
+ })
13124
+ }), /*#__PURE__*/jsx(File, {
13125
+ className: "ne-media-uploader__media__info__icon",
13126
+ fileName: filename
13127
+ }), /*#__PURE__*/jsxs("div", {
13128
+ className: "ne-media-uploader__media__info",
13129
+ children: [/*#__PURE__*/jsxs(Typography, {
13130
+ style: "nano",
13131
+ children: [progress === 100 && t("neetoEditor.localUploader.completed"), progress !== 100 && /*#__PURE__*/jsxs(Fragment$1, {
13132
+ children: [progress, "%"]
13133
+ })]
13134
+ }), /*#__PURE__*/jsx("div", {
13135
+ className: "ne-media-uploader__media__progress",
13136
+ children: /*#__PURE__*/jsx("div", {
13137
+ className: "ne-media-uploader__media__progress-bar",
13138
+ style: {
13139
+ width: "".concat(progress, "%")
13140
+ }
13141
+ })
13142
+ }), /*#__PURE__*/jsx(Tooltip, {
13143
+ content: filename,
13144
+ position: "top",
13145
+ children: /*#__PURE__*/jsx(Typography, {
13146
+ style: "body3",
13147
+ children: filename
13148
+ })
13149
+ })]
13150
+ })]
13151
+ }, id);
13152
+ })
13153
+ });
13076
13154
  });
13077
13155
 
13078
13156
  var LocalUploader = function LocalUploader(_ref) {
@@ -13146,10 +13224,10 @@ var LocalUploader = function LocalUploader(_ref) {
13146
13224
  return _ref4.apply(this, arguments);
13147
13225
  };
13148
13226
  }();
13149
- return !isEmpty(queuedFiles) || isUploading ? /*#__PURE__*/React.createElement(Progress, {
13227
+ return !isEmpty(queuedFiles) || isUploading ? /*#__PURE__*/jsx(Progress, {
13150
13228
  cancelUpload: cancelUpload,
13151
13229
  queuedFiles: queuedFiles
13152
- }) : /*#__PURE__*/React.createElement("div", {
13230
+ }) : /*#__PURE__*/jsxs("div", {
13153
13231
  className: "ne-media-uploader__dnd",
13154
13232
  "data-cy": "neeto-editor-media-uploader-dnd",
13155
13233
  ref: dropTargetRef,
@@ -13157,25 +13235,28 @@ var LocalUploader = function LocalUploader(_ref) {
13157
13235
  onClick: function onClick() {
13158
13236
  var _fileInputRef$current;
13159
13237
  return (_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current === void 0 ? void 0 : _fileInputRef$current.click();
13160
- }
13161
- }, /*#__PURE__*/React.createElement("input", {
13162
- multiple: true,
13163
- className: "ne-media-uploader__dnd-input",
13164
- "data-cy": "neeto-editor-media-uploader-input",
13165
- ref: fileInputRef,
13166
- type: "file",
13167
- accept: isImage ? ALLOWED_IMAGE_TYPES.join(",") : ALLOWED_VIDEO_TYPES.join(","),
13168
- onChange: handleAddFile
13169
- }), /*#__PURE__*/React.createElement(ImageUpload, {
13170
- className: "ne-media-uploader__dnd-icon",
13171
- size: 24
13172
- }), /*#__PURE__*/React.createElement(Typography, {
13173
- style: "body2"
13174
- }, t("neetoEditor.localUploader.dropFilesHere")), /*#__PURE__*/React.createElement(Typography, {
13175
- style: "body3"
13176
- }, t("neetoEditor.localUploader.maxFileSize", {
13177
- entity: convertToFileSize(uploadConfig.restrictions.maxFileSize)
13178
- })));
13238
+ },
13239
+ children: [/*#__PURE__*/jsx("input", {
13240
+ multiple: true,
13241
+ className: "ne-media-uploader__dnd-input",
13242
+ "data-cy": "neeto-editor-media-uploader-input",
13243
+ ref: fileInputRef,
13244
+ type: "file",
13245
+ accept: isImage ? ALLOWED_IMAGE_TYPES.join(",") : ALLOWED_VIDEO_TYPES.join(","),
13246
+ onChange: handleAddFile
13247
+ }), /*#__PURE__*/jsx(ImageUpload, {
13248
+ className: "ne-media-uploader__dnd-icon",
13249
+ size: 24
13250
+ }), /*#__PURE__*/jsx(Typography, {
13251
+ style: "body2",
13252
+ children: t("neetoEditor.localUploader.dropFilesHere")
13253
+ }), /*#__PURE__*/jsx(Typography, {
13254
+ style: "body3",
13255
+ children: t("neetoEditor.localUploader.maxFileSize", {
13256
+ entity: convertToFileSize(uploadConfig.restrictions.maxFileSize)
13257
+ })
13258
+ })]
13259
+ });
13179
13260
  };
13180
13261
 
13181
13262
  var lib = {};
@@ -14052,80 +14133,90 @@ var UnsplashImagePicker = function UnsplashImagePicker(_ref) {
14052
14133
  if (loading || !hasMore) return;
14053
14134
  pageNo > 1 && fetchUnsplashPhotos(pageNo);
14054
14135
  };
14055
- var Loader = /*#__PURE__*/React.createElement("div", {
14056
- className: "neeto-editor-unsplash-gallery__loader"
14057
- }, /*#__PURE__*/React.createElement(Spinner, null));
14058
- return /*#__PURE__*/React.createElement("div", {
14059
- className: "neeto-editor-unsplash-wrapper"
14060
- }, /*#__PURE__*/React.createElement(Input, {
14061
- autoFocus: true,
14062
- className: "neeto-editor-unsplash-search",
14063
- "data-cy": "neeto-editor-unsplash-image-picker-search-input",
14064
- name: "text",
14065
- placeholder: t("neetoEditor.placeholders.searchUnsplash"),
14066
- value: query,
14067
- onChange: function onChange(_ref4) {
14068
- var value = _ref4.target.value;
14069
- setQuery(value);
14070
- }
14071
- }), error && /*#__PURE__*/React.createElement("p", {
14072
- className: "neeto-editor-unsplash-gallery__text",
14073
- "data-cy": "neeto-editor-unsplash-image-picker-error"
14074
- }, t("neetoEditor.unsplash.errorMessage")), !error && !loading && isNotPresent(images) && /*#__PURE__*/React.createElement("p", {
14075
- className: "neeto-editor-unsplash-gallery__text",
14076
- "data-cy": "neeto-editor-unsplash-image-picker-no-results-error"
14077
- }, t("neetoEditor.unsplash.noResults")), !error && /*#__PURE__*/React.createElement("div", {
14078
- className: "neeto-editor-unsplash-container"
14079
- }, /*#__PURE__*/React.createElement(_default, {
14080
- pack: true,
14081
- position: true,
14082
- className: "neeto-editor-unsplash-gallery",
14083
- hasMore: hasMore,
14084
- loadMore: loadMore,
14085
- loader: Loader,
14086
- ref: masonryRef,
14087
- style: {
14088
- width: "100%"
14089
- },
14090
- useWindow: false,
14091
- sizes: [{
14092
- columns: 3,
14093
- gutter: 0
14094
- }, {
14095
- mq: "768px",
14096
- columns: 3,
14097
- gutter: 0
14098
- }, {
14099
- mq: "1024px",
14100
- columns: 3,
14101
- gutter: 0
14102
- }]
14103
- }, images && images.map(function (image, index) {
14104
- return /*#__PURE__*/React.createElement("div", {
14105
- className: "neeto-editor-unsplash-gallery__item",
14106
- "data-cy": "neeto-editor-unsplash-image-picker-result-".concat(index),
14107
- key: index
14108
- }, /*#__PURE__*/React.createElement("div", {
14109
- className: "neeto-editor-unsplash-gallery__item-placeholder",
14110
- style: {
14111
- paddingBottom: "".concat(image.height / image.width * 100, "%")
14112
- }
14113
- }, /*#__PURE__*/React.createElement("div", {
14114
- className: "neeto-editor-unsplash-gallery__item-inner",
14115
- id: "unsplashImage".concat(index)
14116
- }, /*#__PURE__*/React.createElement("img", {
14117
- src: image.urls.regular,
14118
- onClick: function onClick() {
14119
- return onSubmit(image.urls.small);
14136
+ var Loader = /*#__PURE__*/jsx("div", {
14137
+ className: "neeto-editor-unsplash-gallery__loader",
14138
+ children: /*#__PURE__*/jsx(Spinner, {})
14139
+ });
14140
+ return /*#__PURE__*/jsxs("div", {
14141
+ className: "neeto-editor-unsplash-wrapper",
14142
+ children: [/*#__PURE__*/jsx(Input, {
14143
+ autoFocus: true,
14144
+ className: "neeto-editor-unsplash-search",
14145
+ "data-cy": "neeto-editor-unsplash-image-picker-search-input",
14146
+ name: "text",
14147
+ placeholder: t("neetoEditor.placeholders.searchUnsplash"),
14148
+ value: query,
14149
+ onChange: function onChange(_ref4) {
14150
+ var value = _ref4.target.value;
14151
+ setQuery(value);
14120
14152
  }
14121
- }), /*#__PURE__*/React.createElement("a", {
14122
- href: "https://unsplash.com/@".concat(image.user.username),
14123
- rel: "noreferrer",
14124
- target: "_blank"
14125
- }, image.user.name, " "))));
14126
- })), !hasMore && /*#__PURE__*/React.createElement("p", {
14127
- className: "neeto-editor-unsplash-gallery__text"
14128
- }, t("neetoEditor.unsplash.end"))));
14153
+ }), error && /*#__PURE__*/jsx("p", {
14154
+ className: "neeto-editor-unsplash-gallery__text",
14155
+ "data-cy": "neeto-editor-unsplash-image-picker-error",
14156
+ children: t("neetoEditor.unsplash.errorMessage")
14157
+ }), !error && !loading && isNotPresent(images) && /*#__PURE__*/jsx("p", {
14158
+ className: "neeto-editor-unsplash-gallery__text",
14159
+ "data-cy": "neeto-editor-unsplash-image-picker-no-results-error",
14160
+ children: t("neetoEditor.unsplash.noResults")
14161
+ }), !error && /*#__PURE__*/jsxs("div", {
14162
+ className: "neeto-editor-unsplash-container",
14163
+ children: [/*#__PURE__*/jsx(_default, {
14164
+ pack: true,
14165
+ position: true,
14166
+ className: "neeto-editor-unsplash-gallery",
14167
+ hasMore: hasMore,
14168
+ loadMore: loadMore,
14169
+ loader: Loader,
14170
+ ref: masonryRef,
14171
+ style: {
14172
+ width: "100%"
14173
+ },
14174
+ useWindow: false,
14175
+ sizes: [{
14176
+ columns: 3,
14177
+ gutter: 0
14178
+ }, {
14179
+ mq: "768px",
14180
+ columns: 3,
14181
+ gutter: 0
14182
+ }, {
14183
+ mq: "1024px",
14184
+ columns: 3,
14185
+ gutter: 0
14186
+ }],
14187
+ children: images && images.map(function (image, index) {
14188
+ return /*#__PURE__*/jsx("div", {
14189
+ className: "neeto-editor-unsplash-gallery__item",
14190
+ "data-cy": "neeto-editor-unsplash-image-picker-result-".concat(index),
14191
+ children: /*#__PURE__*/jsx("div", {
14192
+ className: "neeto-editor-unsplash-gallery__item-placeholder",
14193
+ style: {
14194
+ paddingBottom: "".concat(image.height / image.width * 100, "%")
14195
+ },
14196
+ children: /*#__PURE__*/jsxs("div", {
14197
+ className: "neeto-editor-unsplash-gallery__item-inner",
14198
+ id: "unsplashImage".concat(index),
14199
+ children: [/*#__PURE__*/jsx("img", {
14200
+ src: image.urls.regular,
14201
+ onClick: function onClick() {
14202
+ return onSubmit(image.urls.small);
14203
+ }
14204
+ }), /*#__PURE__*/jsxs("a", {
14205
+ href: "https://unsplash.com/@".concat(image.user.username),
14206
+ rel: "noreferrer",
14207
+ target: "_blank",
14208
+ children: [image.user.name, " "]
14209
+ })]
14210
+ })
14211
+ })
14212
+ }, index);
14213
+ })
14214
+ }), !hasMore && /*#__PURE__*/jsx("p", {
14215
+ className: "neeto-editor-unsplash-gallery__text",
14216
+ children: t("neetoEditor.unsplash.end")
14217
+ })]
14218
+ })]
14219
+ });
14129
14220
  };
14130
14221
 
14131
14222
  var URLForm = function URLForm(_ref) {
@@ -14149,28 +14240,29 @@ var URLForm = function URLForm(_ref) {
14149
14240
  event.preventDefault();
14150
14241
  URL_REGEXP.test(urlString) ? onSubmit(urlString) : setError(t("neetoEditor.error.invalidUrl"));
14151
14242
  };
14152
- return /*#__PURE__*/React.createElement("div", {
14153
- className: classnames("neeto-editor-url-form__wrapper", _defineProperty({}, className, className))
14154
- }, /*#__PURE__*/React.createElement(Input, {
14155
- autoFocus: true,
14156
- "data-cy": "neeto-editor-media-upload-url-input",
14157
- error: error,
14158
- placeholder: placeholder,
14159
- name: "url",
14160
- value: urlString,
14161
- onChange: function onChange(_ref2) {
14162
- var value = _ref2.target.value;
14163
- return setUrlString(value);
14164
- },
14165
- onFocus: function onFocus() {
14166
- return setError("");
14167
- }
14168
- }), /*#__PURE__*/React.createElement(Button$1, {
14169
- "data-cy": "neeto-editor-media-upload-url-submit",
14170
- disabled: !urlString,
14171
- label: buttonLabel,
14172
- onClick: handleSubmit
14173
- }));
14243
+ return /*#__PURE__*/jsxs("div", {
14244
+ className: classnames("neeto-editor-url-form__wrapper", _defineProperty({}, className, className)),
14245
+ children: [/*#__PURE__*/jsx(Input, {
14246
+ autoFocus: true,
14247
+ "data-cy": "neeto-editor-media-upload-url-input",
14248
+ error: error,
14249
+ placeholder: placeholder,
14250
+ name: "url",
14251
+ value: urlString,
14252
+ onChange: function onChange(_ref2) {
14253
+ var value = _ref2.target.value;
14254
+ return setUrlString(value);
14255
+ },
14256
+ onFocus: function onFocus() {
14257
+ return setError("");
14258
+ }
14259
+ }), /*#__PURE__*/jsx(Button$1, {
14260
+ "data-cy": "neeto-editor-media-upload-url-submit",
14261
+ disabled: !urlString,
14262
+ label: buttonLabel,
14263
+ onClick: handleSubmit
14264
+ })]
14265
+ });
14174
14266
  };
14175
14267
 
14176
14268
  var MediaUploader = function MediaUploader(_ref) {
@@ -14231,41 +14323,46 @@ var MediaUploader = function MediaUploader(_ref) {
14231
14323
  var handleKeydown = function handleKeydown(event) {
14232
14324
  return not(isUploading) && event.key === "Escape" && handleClose();
14233
14325
  };
14234
- return /*#__PURE__*/React.createElement(Modal, {
14326
+ return /*#__PURE__*/jsx(Modal, {
14235
14327
  isOpen: isOpen,
14236
14328
  className: "ne-media-uploader-modal",
14237
14329
  closeButton: false,
14238
14330
  closeOnOutsideClick: not(isUploading),
14239
14331
  onClose: handleClose,
14240
- onKeyDown: handleKeydown
14241
- }, /*#__PURE__*/React.createElement("div", {
14242
- className: "ne-media-uploader"
14243
- }, !isNotPresent(tabs) && /*#__PURE__*/React.createElement(Tab, null, tabs.map(function (_ref3) {
14244
- var key = _ref3.key,
14245
- title = _ref3.title;
14246
- return /*#__PURE__*/React.createElement(Tab.Item, {
14247
- active: activeTab === key,
14248
- "data-cy": "neeto-editor-media-uploader-".concat(key, "-tab"),
14249
- key: key,
14250
- onClick: function onClick() {
14251
- return setActiveTab(key);
14252
- }
14253
- }, title);
14254
- })), /*#__PURE__*/React.createElement("div", {
14255
- className: "ne-media-uploader__content"
14256
- }, activeTab === "local" && /*#__PURE__*/React.createElement(LocalUploader, {
14257
- insertMediaToEditor: insertMediaToEditor,
14258
- setIsUploading: setIsUploading,
14259
- isImage: mediaUploader.image,
14260
- onClose: handleClose
14261
- }), activeTab === "link" && /*#__PURE__*/React.createElement(URLForm, {
14262
- placeholder: t("neetoEditor.placeholders.pasteLink"),
14263
- buttonLabel: mediaUploader.image ? t("neetoEditor.localUploader.uploadImage") : t("neetoEditor.localUploader.uploadVideo"),
14264
- onSubmit: handleSubmit
14265
- }), activeTab === "unsplash" && /*#__PURE__*/React.createElement(UnsplashImagePicker, {
14266
- unsplashApiKey: unsplashApiKey,
14267
- onSubmit: handleSubmit
14268
- }))));
14332
+ onKeyDown: handleKeydown,
14333
+ children: /*#__PURE__*/jsxs("div", {
14334
+ className: "ne-media-uploader",
14335
+ children: [!isNotPresent(tabs) && /*#__PURE__*/jsx(Tab, {
14336
+ children: tabs.map(function (_ref3) {
14337
+ var key = _ref3.key,
14338
+ title = _ref3.title;
14339
+ return /*#__PURE__*/jsx(Tab.Item, {
14340
+ active: activeTab === key,
14341
+ "data-cy": "neeto-editor-media-uploader-".concat(key, "-tab"),
14342
+ onClick: function onClick() {
14343
+ return setActiveTab(key);
14344
+ },
14345
+ children: title
14346
+ }, key);
14347
+ })
14348
+ }), /*#__PURE__*/jsxs("div", {
14349
+ className: "ne-media-uploader__content",
14350
+ children: [activeTab === "local" && /*#__PURE__*/jsx(LocalUploader, {
14351
+ insertMediaToEditor: insertMediaToEditor,
14352
+ setIsUploading: setIsUploading,
14353
+ isImage: mediaUploader.image,
14354
+ onClose: handleClose
14355
+ }), activeTab === "link" && /*#__PURE__*/jsx(URLForm, {
14356
+ placeholder: t("neetoEditor.placeholders.pasteLink"),
14357
+ buttonLabel: mediaUploader.image ? t("neetoEditor.localUploader.uploadImage") : t("neetoEditor.localUploader.uploadVideo"),
14358
+ onSubmit: handleSubmit
14359
+ }), activeTab === "unsplash" && /*#__PURE__*/jsx(UnsplashImagePicker, {
14360
+ unsplashApiKey: unsplashApiKey,
14361
+ onSubmit: handleSubmit
14362
+ })]
14363
+ })]
14364
+ })
14365
+ });
14269
14366
  };
14270
14367
 
14271
14368
  var LinkAddPopOver = function LinkAddPopOver(_ref) {
@@ -14371,126 +14468,132 @@ var LinkAddPopOver = function LinkAddPopOver(_ref) {
14371
14468
  window.removeEventListener("wheel", removePopover);
14372
14469
  };
14373
14470
  }, []);
14374
- return isAddLinkActive ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
14375
- className: "ne-link-arrow fade-in",
14376
- style: {
14377
- top: arrowPosition.top,
14378
- left: arrowPosition.left
14379
- }
14380
- }), /*#__PURE__*/React.createElement("div", {
14381
- className: "ne-link-popover fade-in",
14382
- id: "ne-link-add-popover",
14383
- ref: popoverRef,
14384
- style: popoverStyle
14385
- }, /*#__PURE__*/React.createElement(Input, {
14386
- required: true,
14387
- autoFocus: !isLinkTextPresent,
14388
- "data-cy": "neeto-editor-add-link-text-input",
14389
- label: t("neetoEditor.common.text"),
14390
- placeholder: t("neetoEditor.placeholders.enterText"),
14391
- size: "small",
14392
- style: {
14393
- width: "250px"
14394
- },
14395
- value: linkText,
14396
- onChange: function onChange(_ref2) {
14397
- var value = _ref2.target.value;
14398
- return setLinkText(value);
14399
- },
14400
- onKeyDown: handleKeyDown
14401
- }), /*#__PURE__*/React.createElement(Input, {
14402
- error: error,
14403
- required: true,
14404
- autoFocus: isLinkTextPresent,
14405
- className: "ne-link-popover__url-input",
14406
- "data-cy": "neeto-editor-add-link-url-input",
14407
- label: t("neetoEditor.common.url"),
14408
- placeholder: t("neetoEditor.placeholders.url"),
14409
- size: "small",
14410
- style: {
14411
- width: "250px"
14412
- },
14413
- value: linkUrl,
14414
- onChange: function onChange(_ref3) {
14415
- var value = _ref3.target.value;
14416
- return setLinkUrl(value);
14417
- },
14418
- onFocus: function onFocus() {
14419
- return setError("");
14420
- },
14421
- onKeyDown: handleKeyDown
14422
- }), /*#__PURE__*/React.createElement(Checkbox, {
14423
- checked: openInNewTab,
14424
- className: "ne-link-popover__checkbox",
14425
- "data-cy": "neeto-editor-add-link-open-in-new-tab-switch",
14426
- label: t("neetoEditor.common.openInNewTab"),
14427
- onChange: function onChange() {
14428
- return setOpenInNewTab(not);
14429
- }
14430
- }), /*#__PURE__*/React.createElement("div", {
14431
- className: "ne-link-popover__edit-prompt-buttons"
14432
- }, /*#__PURE__*/React.createElement(Button$1, {
14433
- "data-cy": "neeto-editor-add-link",
14434
- disabled: isSubmitDisabled,
14435
- label: t("neetoEditor.common.done"),
14436
- size: "small",
14437
- onClick: handleAddLink
14438
- }), /*#__PURE__*/React.createElement(Button$1, {
14439
- "data-cy": "neeto-editor-link-popover-cancel",
14440
- label: t("neetoEditor.common.cancel"),
14441
- size: "small",
14442
- style: "text",
14443
- onClick: removePopover
14444
- })))), document.body) : null;
14471
+ return isAddLinkActive ? /*#__PURE__*/createPortal( /*#__PURE__*/jsxs(Fragment$1, {
14472
+ children: [/*#__PURE__*/jsx("div", {
14473
+ className: "ne-link-arrow fade-in",
14474
+ style: {
14475
+ top: arrowPosition.top,
14476
+ left: arrowPosition.left
14477
+ }
14478
+ }), /*#__PURE__*/jsxs("div", {
14479
+ className: "ne-link-popover fade-in",
14480
+ id: "ne-link-add-popover",
14481
+ ref: popoverRef,
14482
+ style: popoverStyle,
14483
+ children: [/*#__PURE__*/jsx(Input, {
14484
+ required: true,
14485
+ autoFocus: !isLinkTextPresent,
14486
+ "data-cy": "neeto-editor-add-link-text-input",
14487
+ label: t("neetoEditor.common.text"),
14488
+ placeholder: t("neetoEditor.placeholders.enterText"),
14489
+ size: "small",
14490
+ style: {
14491
+ width: "250px"
14492
+ },
14493
+ value: linkText,
14494
+ onChange: function onChange(_ref2) {
14495
+ var value = _ref2.target.value;
14496
+ return setLinkText(value);
14497
+ },
14498
+ onKeyDown: handleKeyDown
14499
+ }), /*#__PURE__*/jsx(Input, {
14500
+ error: error,
14501
+ required: true,
14502
+ autoFocus: isLinkTextPresent,
14503
+ className: "ne-link-popover__url-input",
14504
+ "data-cy": "neeto-editor-add-link-url-input",
14505
+ label: t("neetoEditor.common.url"),
14506
+ placeholder: t("neetoEditor.placeholders.url"),
14507
+ size: "small",
14508
+ style: {
14509
+ width: "250px"
14510
+ },
14511
+ value: linkUrl,
14512
+ onChange: function onChange(_ref3) {
14513
+ var value = _ref3.target.value;
14514
+ return setLinkUrl(value);
14515
+ },
14516
+ onFocus: function onFocus() {
14517
+ return setError("");
14518
+ },
14519
+ onKeyDown: handleKeyDown
14520
+ }), /*#__PURE__*/jsx(Checkbox, {
14521
+ checked: openInNewTab,
14522
+ className: "ne-link-popover__checkbox",
14523
+ "data-cy": "neeto-editor-add-link-open-in-new-tab-switch",
14524
+ label: t("neetoEditor.common.openInNewTab"),
14525
+ onChange: function onChange() {
14526
+ return setOpenInNewTab(not);
14527
+ }
14528
+ }), /*#__PURE__*/jsxs("div", {
14529
+ className: "ne-link-popover__edit-prompt-buttons",
14530
+ children: [/*#__PURE__*/jsx(Button$1, {
14531
+ "data-cy": "neeto-editor-add-link",
14532
+ disabled: isSubmitDisabled,
14533
+ label: t("neetoEditor.common.done"),
14534
+ size: "small",
14535
+ onClick: handleAddLink
14536
+ }), /*#__PURE__*/jsx(Button$1, {
14537
+ "data-cy": "neeto-editor-link-popover-cancel",
14538
+ label: t("neetoEditor.common.cancel"),
14539
+ size: "small",
14540
+ style: "text",
14541
+ onClick: removePopover
14542
+ })]
14543
+ })]
14544
+ })]
14545
+ }), document.body) : null;
14445
14546
  };
14446
14547
 
14447
14548
  var _excluded$3 = ["type"];
14448
- 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; }
14449
- 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; }
14549
+ 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; }
14550
+ 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(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; }
14450
14551
  var Menu$3 = Dropdown$1.Menu,
14451
14552
  MenuItem$1 = Dropdown$1.MenuItem;
14452
14553
  var MoreMenu = function MoreMenu(_ref) {
14453
14554
  var groups = _ref.groups,
14454
14555
  editor = _ref.editor;
14455
- return /*#__PURE__*/React.createElement(Dropdown$1, {
14556
+ return /*#__PURE__*/jsx(Dropdown$1, {
14456
14557
  buttonProps: {
14457
14558
  className: "flex-shrink-0"
14458
14559
  },
14459
14560
  buttonStyle: "text",
14460
14561
  icon: MenuHorizontal,
14461
- strategy: "fixed"
14462
- }, /*#__PURE__*/React.createElement(Menu$3, null, groups.map(function (group) {
14463
- return group.map(function (_ref2) {
14464
- var type = _ref2.type,
14465
- props = _objectWithoutProperties$1(_ref2, _excluded$3);
14466
- var Component = MENU_ELEMENTS[type];
14467
- if (type === MENU_ELEMENT_TYPES.BUTTON) {
14468
- var Icon = props.icon;
14469
- return /*#__PURE__*/React.createElement(MenuItem$1.Button, _extends$1({
14470
- "data-cy": "neeto-editor-fixed-menu-".concat(props.optionName, "-option"),
14471
- isActive: editor.isActive(props.optionName),
14472
- key: props.optionName,
14473
- tabIndex: "-1",
14474
- onClick: props.command
14475
- }, _objectSpread$7(_objectSpread$7(_objectSpread$7({}, generateFocusProps(props.highlight)), props), {}, {
14476
- editor: editor
14477
- })), /*#__PURE__*/React.createElement(Icon, null), " ", props.label);
14478
- }
14479
- return /*#__PURE__*/React.createElement(Component, _extends$1({
14480
- key: props.optionName
14481
- }, _objectSpread$7(_objectSpread$7({}, props), {}, {
14482
- editor: editor
14483
- }, generateFocusProps(props.highlight)), {
14484
- isSecondaryMenu: true
14485
- }));
14486
- });
14487
- })));
14562
+ strategy: "fixed",
14563
+ children: /*#__PURE__*/jsx(Menu$3, {
14564
+ children: groups.map(function (group) {
14565
+ return group.map(function (_ref2) {
14566
+ var type = _ref2.type,
14567
+ props = _objectWithoutProperties$1(_ref2, _excluded$3);
14568
+ var Component = MENU_ELEMENTS[type];
14569
+ if (type === MENU_ELEMENT_TYPES.BUTTON) {
14570
+ var Icon = props.icon;
14571
+ return /*#__PURE__*/jsxs(MenuItem$1.Button, _objectSpread$8(_objectSpread$8({
14572
+ "data-cy": "neeto-editor-fixed-menu-".concat(props.optionName, "-option"),
14573
+ isActive: editor.isActive(props.optionName),
14574
+ tabIndex: "-1",
14575
+ onClick: props.command
14576
+ }, _objectSpread$8(_objectSpread$8(_objectSpread$8({}, generateFocusProps(props.highlight)), props), {}, {
14577
+ editor: editor
14578
+ })), {}, {
14579
+ children: [/*#__PURE__*/jsx(Icon, {}), " ", props.label]
14580
+ }), props.optionName);
14581
+ }
14582
+ return /*#__PURE__*/jsx(Component, _objectSpread$8(_objectSpread$8({}, _objectSpread$8(_objectSpread$8({}, props), {}, {
14583
+ editor: editor
14584
+ }, generateFocusProps(props.highlight))), {}, {
14585
+ isSecondaryMenu: true
14586
+ }), props.optionName);
14587
+ });
14588
+ })
14589
+ })
14590
+ });
14488
14591
  };
14489
14592
 
14490
14593
  var EDITOR_MARKS = [EDITOR_OPTIONS.UNDO, EDITOR_OPTIONS.REDO, "fontSizeOptions", EDITOR_OPTIONS.BOLD, EDITOR_OPTIONS.ITALIC, EDITOR_OPTIONS.UNDERLINE, EDITOR_OPTIONS.LINK, EDITOR_OPTIONS.STRIKETHROUGH, EDITOR_OPTIONS.HIGHLIGHT, "bulletList", "orderedList", "blockquote", EDITOR_OPTIONS.CODE, "codeBlock", EDITOR_OPTIONS.TABLE, EDITOR_OPTIONS.ATTACHMENTS, EDITOR_OPTIONS.IMAGE_UPLOAD, EDITOR_OPTIONS.VIDEO_UPLOAD, EDITOR_OPTIONS.VIDEO_EMBED, EDITOR_OPTIONS.TEXT_COLOR, EDITOR_OPTIONS.EMOJI, "mentions"];
14491
14594
 
14492
- 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; }
14493
- 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(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; }
14595
+ 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; }
14596
+ 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; }
14494
14597
  var useEditorState = function useEditorState(_ref) {
14495
14598
  var editor = _ref.editor;
14496
14599
  var _useEditorStore = useEditorStore(function (store) {
@@ -14526,7 +14629,7 @@ var useEditorState = function useEditorState(_ref) {
14526
14629
  var redoOptionState = {
14527
14630
  disabled: !editor.can().redo()
14528
14631
  };
14529
- var updatedMarksState = _objectSpread$6(_objectSpread$6({}, marksState), {}, _defineProperty(_defineProperty({}, EDITOR_OPTIONS.UNDO, undoOptionState), EDITOR_OPTIONS.REDO, redoOptionState));
14632
+ var updatedMarksState = _objectSpread$7(_objectSpread$7({}, marksState), {}, _defineProperty(_defineProperty({}, EDITOR_OPTIONS.UNDO, undoOptionState), EDITOR_OPTIONS.REDO, redoOptionState));
14530
14633
  setMarksState(updatedMarksState);
14531
14634
  }, [marksState, setMarksState]);
14532
14635
  useEffect(function () {
@@ -14544,8 +14647,8 @@ var useEditorState = function useEditorState(_ref) {
14544
14647
  };
14545
14648
 
14546
14649
  var _excluded$2 = ["type"];
14547
- 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; }
14548
- 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(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; }
14650
+ 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; }
14651
+ 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(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; }
14549
14652
  var Fixed = function Fixed(_ref) {
14550
14653
  var editor = _ref.editor,
14551
14654
  options = _ref.options,
@@ -14678,70 +14781,71 @@ var Fixed = function Fixed(_ref) {
14678
14781
  label: variableName
14679
14782
  }).run();
14680
14783
  };
14681
- return /*#__PURE__*/React.createElement("div", {
14784
+ return /*#__PURE__*/jsxs("div", {
14682
14785
  ref: menuContainerRef,
14683
14786
  className: classnames("neeto-editor-fixed-menu", _defineProperty({
14684
14787
  "neeto-editor-fixed-menu--independant": isIndependant
14685
- }, className, className))
14686
- }, /*#__PURE__*/React.createElement("div", {
14687
- className: "neeto-editor-fixed-menu__wrapper",
14688
- "data-cy": "neeto-editor-fixed-menu-wrapper",
14689
- ref: menuRef
14690
- }, menuItems.map(function (group) {
14691
- return group.map(function (_ref2) {
14692
- var type = _ref2.type,
14693
- props = _objectWithoutProperties$1(_ref2, _excluded$2);
14694
- var Component = MENU_ELEMENTS[type];
14695
- if (!Component) return null;
14696
- return /*#__PURE__*/React.createElement(Component, _extends$1({
14697
- key: props.optionName
14698
- }, _objectSpread$5(_objectSpread$5({}, props), {}, {
14699
- editor: editor
14700
- })));
14701
- });
14702
- }), isNotEmpty(moreMenuItems) && /*#__PURE__*/React.createElement(MoreMenu, {
14703
- editor: editor,
14704
- groups: moreMenuItems
14705
- }), children), !isEmpty(variables) && /*#__PURE__*/React.createElement("div", {
14706
- className: "neeto-editor-fixed-menu__variables",
14707
- "data-cy": "neeto-editor-fixed-menu-variables"
14708
- }, /*#__PURE__*/React.createElement(DynamicVariables, {
14709
- variables: variables,
14710
- dropdownProps: {
14711
- buttonSize: "small",
14712
- buttonProps: {
14713
- tooltipProps: {
14714
- content: t("neetoEditor.menu.dynamicVariables"),
14715
- position: "bottom"
14716
- }
14788
+ }, className, className)),
14789
+ children: [/*#__PURE__*/jsxs("div", {
14790
+ className: "neeto-editor-fixed-menu__wrapper",
14791
+ "data-cy": "neeto-editor-fixed-menu-wrapper",
14792
+ ref: menuRef,
14793
+ children: [menuItems.map(function (group) {
14794
+ return group.map(function (_ref2) {
14795
+ var type = _ref2.type,
14796
+ props = _objectWithoutProperties$1(_ref2, _excluded$2);
14797
+ var Component = MENU_ELEMENTS[type];
14798
+ if (!Component) return null;
14799
+ return /*#__PURE__*/jsx(Component, _objectSpread$6({}, _objectSpread$6(_objectSpread$6({}, props), {}, {
14800
+ editor: editor
14801
+ })), props.optionName);
14802
+ });
14803
+ }), isNotEmpty(moreMenuItems) && /*#__PURE__*/jsx(MoreMenu, {
14804
+ editor: editor,
14805
+ groups: moreMenuItems
14806
+ }), children]
14807
+ }), !isEmpty(variables) && /*#__PURE__*/jsx("div", {
14808
+ className: "neeto-editor-fixed-menu__variables",
14809
+ "data-cy": "neeto-editor-fixed-menu-variables",
14810
+ children: /*#__PURE__*/jsx(DynamicVariables, {
14811
+ variables: variables,
14812
+ dropdownProps: {
14813
+ buttonSize: "small",
14814
+ buttonProps: {
14815
+ tooltipProps: {
14816
+ content: t("neetoEditor.menu.dynamicVariables"),
14817
+ position: "bottom"
14818
+ }
14819
+ }
14820
+ },
14821
+ onVariableClick: handleVariableClick
14822
+ })
14823
+ }), isAddLinkActive && /*#__PURE__*/jsx(LinkAddPopOver, {
14824
+ editor: editor,
14825
+ isAddLinkActive: isAddLinkActive,
14826
+ openLinkInNewTab: openLinkInNewTab,
14827
+ setIsAddLinkActive: setIsAddLinkActive
14828
+ }), isMediaUploaderActive && /*#__PURE__*/jsx(MediaUploader, {
14829
+ editor: editor,
14830
+ mediaUploader: mediaUploader,
14831
+ unsplashApiKey: unsplashApiKey,
14832
+ onClose: function onClose() {
14833
+ return setMediaUploader({
14834
+ image: false,
14835
+ video: false
14836
+ });
14717
14837
  }
14718
- },
14719
- onVariableClick: handleVariableClick
14720
- })), isAddLinkActive && /*#__PURE__*/React.createElement(LinkAddPopOver, {
14721
- editor: editor,
14722
- isAddLinkActive: isAddLinkActive,
14723
- openLinkInNewTab: openLinkInNewTab,
14724
- setIsAddLinkActive: setIsAddLinkActive
14725
- }), isMediaUploaderActive && /*#__PURE__*/React.createElement(MediaUploader, {
14726
- editor: editor,
14727
- mediaUploader: mediaUploader,
14728
- unsplashApiKey: unsplashApiKey,
14729
- onClose: function onClose() {
14730
- return setMediaUploader({
14731
- image: false,
14732
- video: false
14733
- });
14734
- }
14735
- }), isEmbedOptionActive && /*#__PURE__*/React.createElement(EmbedOption, {
14736
- editor: editor,
14737
- isEmbedModalOpen: isEmbedModalOpen,
14738
- setIsEmbedModalOpen: setIsEmbedModalOpen
14739
- }));
14838
+ }), isEmbedOptionActive && /*#__PURE__*/jsx(EmbedOption, {
14839
+ editor: editor,
14840
+ isEmbedModalOpen: isEmbedModalOpen,
14841
+ setIsEmbedModalOpen: setIsEmbedModalOpen
14842
+ })]
14843
+ });
14740
14844
  };
14741
14845
 
14742
14846
  var _excluded$1 = ["icon", "onClick", "disabled", "className", "tooltipProps"];
14743
- function ownKeys$4(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; }
14744
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14847
+ 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; }
14848
+ 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(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; }
14745
14849
  var Button = function Button(_ref) {
14746
14850
  var _ref$icon = _ref.icon,
14747
14851
  icon = _ref$icon === void 0 ? null : _ref$icon,
@@ -14753,27 +14857,30 @@ var Button = function Button(_ref) {
14753
14857
  tooltipProps = _ref.tooltipProps,
14754
14858
  otherProps = _objectWithoutProperties$1(_ref, _excluded$1);
14755
14859
  var Icon = icon;
14756
- return /*#__PURE__*/React.createElement(Tooltip, _extends$1({
14860
+ return /*#__PURE__*/jsx(Tooltip, _objectSpread$5(_objectSpread$5({
14757
14861
  disabled: !tooltipProps,
14758
14862
  onClick: function onClick() {
14759
14863
  return _onClick();
14760
14864
  }
14761
- }, tooltipProps), /*#__PURE__*/React.createElement("button", _extends$1({
14762
- className: classnames("ne-headless-btn", _defineProperty({}, className, className)),
14763
- type: "button"
14764
- }, _objectSpread$4({
14765
- disabled: disabled,
14766
- onClick: _onClick
14767
- }, otherProps)), icon && /*#__PURE__*/React.createElement(Icon, {
14768
- "aria-hidden": "true",
14769
- key: "2",
14770
- size: 18
14771
- })));
14865
+ }, tooltipProps), {}, {
14866
+ children: /*#__PURE__*/jsx("button", _objectSpread$5(_objectSpread$5({
14867
+ className: classnames("ne-headless-btn", _defineProperty({}, className, className)),
14868
+ type: "button"
14869
+ }, _objectSpread$5({
14870
+ disabled: disabled,
14871
+ onClick: _onClick
14872
+ }, otherProps)), {}, {
14873
+ children: icon && /*#__PURE__*/jsx(Icon, {
14874
+ "aria-hidden": "true",
14875
+ size: 18
14876
+ }, "2")
14877
+ }))
14878
+ }));
14772
14879
  };
14773
14880
 
14774
14881
  var _excluded = ["icon", "isOpen", "onClose", "children", "className", "onClick", "buttonProps"];
14775
- function ownKeys$3(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; }
14776
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14882
+ function ownKeys$4(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; }
14883
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14777
14884
  var hideOnEsc = {
14778
14885
  name: "hideOnEsc",
14779
14886
  defaultValue: true,
@@ -14813,7 +14920,7 @@ var Dropdown = function Dropdown(_ref2) {
14813
14920
  _useState2 = _slicedToArray(_useState, 2),
14814
14921
  mounted = _useState2[0],
14815
14922
  setMounted = _useState2[1];
14816
- return /*#__PURE__*/React.createElement(Tippy, _extends$1({
14923
+ return /*#__PURE__*/jsx(Tippy, _objectSpread$4(_objectSpread$4({
14817
14924
  hideOnEsc: true,
14818
14925
  interactive: true,
14819
14926
  animation: false,
@@ -14831,9 +14938,10 @@ var Dropdown = function Dropdown(_ref2) {
14831
14938
  trigger: "click",
14832
14939
  visible: isOpen,
14833
14940
  className: classnames("ne-headless-dropdown", _defineProperty({}, className, className)),
14834
- content: mounted && /*#__PURE__*/React.createElement("div", {
14835
- className: "ne-headless-dropdown__popup"
14836
- }, children),
14941
+ content: mounted && /*#__PURE__*/jsx("div", {
14942
+ className: "ne-headless-dropdown__popup",
14943
+ children: children
14944
+ }),
14837
14945
  onClickOutside: onClose,
14838
14946
  onClose: onClose,
14839
14947
  onHidden: function onHidden() {
@@ -14842,10 +14950,14 @@ var Dropdown = function Dropdown(_ref2) {
14842
14950
  onMount: function onMount() {
14843
14951
  return setMounted(true);
14844
14952
  }
14845
- }, otherProps), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, _objectSpread$3({
14846
- icon: icon,
14847
- onClick: onClick
14848
- }, buttonProps))));
14953
+ }, otherProps), {}, {
14954
+ children: /*#__PURE__*/jsx("span", {
14955
+ children: /*#__PURE__*/jsx(Button, _objectSpread$4({}, _objectSpread$4({
14956
+ icon: icon,
14957
+ onClick: onClick
14958
+ }, buttonProps)))
14959
+ })
14960
+ }));
14849
14961
  };
14850
14962
 
14851
14963
  var Emoji = function Emoji(_ref) {
@@ -14853,7 +14965,7 @@ var Emoji = function Emoji(_ref) {
14853
14965
  isActive = _ref.isActive,
14854
14966
  setActive = _ref.setActive,
14855
14967
  tooltipContent = _ref.tooltipContent;
14856
- return /*#__PURE__*/React.createElement(Dropdown, {
14968
+ return /*#__PURE__*/jsx(Dropdown, {
14857
14969
  className: "ne-headless__emoji",
14858
14970
  icon: Smiley,
14859
14971
  isOpen: isActive,
@@ -14872,11 +14984,12 @@ var Emoji = function Emoji(_ref) {
14872
14984
  },
14873
14985
  onClose: function onClose() {
14874
14986
  return setActive(false);
14875
- }
14876
- }, /*#__PURE__*/React.createElement(EmojiPickerMenu, {
14877
- editor: editor,
14878
- setActive: setActive
14879
- }));
14987
+ },
14988
+ children: /*#__PURE__*/jsx(EmojiPickerMenu, {
14989
+ editor: editor,
14990
+ setActive: setActive
14991
+ })
14992
+ });
14880
14993
  };
14881
14994
 
14882
14995
  var Option = function Option(_ref) {
@@ -14889,14 +15002,14 @@ var Option = function Option(_ref) {
14889
15002
  setActive = _ref.setActive,
14890
15003
  tooltip = _ref.tooltip;
14891
15004
  if (optionName === EDITOR_OPTIONS.EMOJI) {
14892
- return /*#__PURE__*/React.createElement(Emoji, {
15005
+ return /*#__PURE__*/jsx(Emoji, {
14893
15006
  editor: editor,
14894
15007
  isActive: isActive,
14895
15008
  setActive: setActive,
14896
15009
  tooltipContent: tooltip || "Emoji"
14897
15010
  });
14898
15011
  }
14899
- return /*#__PURE__*/React.createElement(Button, {
15012
+ return /*#__PURE__*/jsx(Button, {
14900
15013
  className: isActive ? "ne-headless-btn--active" : "",
14901
15014
  disabled: disabled,
14902
15015
  "data-cy": hyphenate(optionName),
@@ -14910,8 +15023,8 @@ var Option = function Option(_ref) {
14910
15023
  });
14911
15024
  };
14912
15025
 
14913
- function ownKeys$2(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; }
14914
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15026
+ function ownKeys$3(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; }
15027
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14915
15028
  var t = i18n.t;
14916
15029
  var createMenuOptions$1 = function createMenuOptions(_ref) {
14917
15030
  var editor = _ref.editor,
@@ -15070,7 +15183,7 @@ var buildOptionsFromAddonCommands$1 = function buildOptionsFromAddonCommands(_re
15070
15183
  var to = editor.state.selection.to;
15071
15184
  return commands.map(function (option) {
15072
15185
  var _option$active;
15073
- return _objectSpread$2(_objectSpread$2({}, option), {}, {
15186
+ return _objectSpread$3(_objectSpread$3({}, option), {}, {
15074
15187
  active: (_option$active = option.active) === null || _option$active === void 0 ? void 0 : _option$active.call(option, {
15075
15188
  editor: editor
15076
15189
  }),
@@ -15112,6 +15225,8 @@ var buildMenuOptions$1 = function buildMenuOptions(_ref3) {
15112
15225
  }).filter(Boolean);
15113
15226
  };
15114
15227
 
15228
+ function ownKeys$2(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; }
15229
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15115
15230
  var Headless = function Headless(_ref) {
15116
15231
  var editor = _ref.editor,
15117
15232
  options = _ref.options,
@@ -15147,24 +15262,25 @@ var Headless = function Headless(_ref) {
15147
15262
  commands: addonCommands
15148
15263
  });
15149
15264
  var allOptions = [].concat(_toConsumableArray(menuOptions), _toConsumableArray(addonCommandOptions));
15150
- return /*#__PURE__*/React.createElement("div", {
15151
- className: classnames("ne-headless", _defineProperty({}, className, className))
15152
- }, allOptions.map(function (option) {
15153
- return /*#__PURE__*/React.createElement(Option, _extends$1({
15265
+ return /*#__PURE__*/jsxs("div", {
15266
+ className: classnames("ne-headless", _defineProperty({}, className, className)),
15267
+ children: [allOptions.map(function (option) {
15268
+ return /*#__PURE__*/createElement(Option, _objectSpread$2({
15269
+ editor: editor,
15270
+ key: option.optionName
15271
+ }, option));
15272
+ }), children, isMediaUploaderActive && /*#__PURE__*/jsx(MediaUploader, {
15154
15273
  editor: editor,
15155
- key: option.optionName
15156
- }, option));
15157
- }), children, isMediaUploaderActive && /*#__PURE__*/React.createElement(MediaUploader, {
15158
- editor: editor,
15159
- mediaUploader: mediaUploader,
15160
- unsplashApiKey: unsplashApiKey,
15161
- onClose: function onClose() {
15162
- return setMediaUploader({
15163
- image: false,
15164
- video: false
15165
- });
15166
- }
15167
- }));
15274
+ mediaUploader: mediaUploader,
15275
+ unsplashApiKey: unsplashApiKey,
15276
+ onClose: function onClose() {
15277
+ return setMediaUploader({
15278
+ image: false,
15279
+ video: false
15280
+ });
15281
+ }
15282
+ })]
15283
+ });
15168
15284
  };
15169
15285
 
15170
15286
  var FONT_SIZE_OPTIONS = [{
@@ -15224,7 +15340,7 @@ var FontSizeOption = function FontSizeOption(_ref) {
15224
15340
  return editor.chain().focus().setNode("paragraph").run();
15225
15341
  })();
15226
15342
  };
15227
- return /*#__PURE__*/React.createElement(Dropdown$1, {
15343
+ return /*#__PURE__*/jsx(Dropdown$1, {
15228
15344
  autoWidth: true,
15229
15345
  label: activeOption === null || activeOption === void 0 ? void 0 : activeOption.label,
15230
15346
  placement: "bottom-start",
@@ -15243,21 +15359,25 @@ var FontSizeOption = function FontSizeOption(_ref) {
15243
15359
  style: "text",
15244
15360
  size: "small",
15245
15361
  className: "neeto-editor-fixed-menu__item neeto-editor-font-size__wrapper"
15246
- }
15247
- }, /*#__PURE__*/React.createElement(Menu$2, null, FONT_SIZE_OPTIONS.map(function (_ref2) {
15248
- var label = _ref2.label,
15249
- value = _ref2.value,
15250
- key = _ref2.key;
15251
- return /*#__PURE__*/React.createElement(MenuItem.Button, {
15252
- "data-cy": "neeto-editor-fixed-menu-font-size-option-".concat(key),
15253
- key: value,
15254
- onClick: function onClick() {
15255
- return handleClick(value);
15256
- }
15257
- }, /*#__PURE__*/React.createElement(Typography, {
15258
- style: key
15259
- }, label));
15260
- })));
15362
+ },
15363
+ children: /*#__PURE__*/jsx(Menu$2, {
15364
+ children: FONT_SIZE_OPTIONS.map(function (_ref2) {
15365
+ var label = _ref2.label,
15366
+ value = _ref2.value,
15367
+ key = _ref2.key;
15368
+ return /*#__PURE__*/jsx(MenuItem.Button, {
15369
+ "data-cy": "neeto-editor-fixed-menu-font-size-option-".concat(key),
15370
+ onClick: function onClick() {
15371
+ return handleClick(value);
15372
+ },
15373
+ children: /*#__PURE__*/jsx(Typography, {
15374
+ style: key,
15375
+ children: label
15376
+ })
15377
+ }, value);
15378
+ })
15379
+ })
15380
+ });
15261
15381
  };
15262
15382
  var FontSizeOption$1 = /*#__PURE__*/memo(FontSizeOption);
15263
15383
 
@@ -15299,7 +15419,7 @@ var TableOption = function TableOption(_ref) {
15299
15419
  isSecondaryMenu && e.stopPropagation();
15300
15420
  setIsOpen(not);
15301
15421
  };
15302
- return /*#__PURE__*/React.createElement(Dropdown$1, {
15422
+ return /*#__PURE__*/jsx(Dropdown$1, {
15303
15423
  isOpen: isOpen,
15304
15424
  buttonStyle: isOpen ? "secondary" : "text",
15305
15425
  closeOnSelect: false,
@@ -15314,42 +15434,45 @@ var TableOption = function TableOption(_ref) {
15314
15434
  },
15315
15435
  className: "neeto-editor-fixed-menu__item"
15316
15436
  },
15317
- customTarget: isSecondaryMenu && /*#__PURE__*/React.createElement(SecondaryMenuTarget, {
15437
+ customTarget: isSecondaryMenu && /*#__PURE__*/jsx(SecondaryMenuTarget, {
15318
15438
  label: label,
15319
15439
  icon: Column
15320
15440
  }),
15321
15441
  onClick: handleDropdownClick,
15322
- onClose: handleClose
15323
- }, /*#__PURE__*/React.createElement(Menu$1, {
15324
- className: "neeto-editor-table__item"
15325
- }, /*#__PURE__*/React.createElement(Input, {
15326
- autoFocus: true,
15327
- "data-cy": "neeto-editor-fixed-menu-table-option-input",
15328
- label: t("neetoEditor.menu.rows"),
15329
- min: "1",
15330
- placeholder: t("neetoEditor.placeholders.rows"),
15331
- size: "small",
15332
- type: "number",
15333
- value: rows,
15334
- onChange: withEventTargetValue(setRows)
15335
- }), /*#__PURE__*/React.createElement(Input, {
15336
- "data-cy": "neeto-editor-fixed-menu-table-option-input",
15337
- label: t("neetoEditor.menu.columns"),
15338
- min: "1",
15339
- placeholder: t("neetoEditor.placeholders.rows"),
15340
- size: "small",
15341
- type: "number",
15342
- value: columns,
15343
- onChange: withEventTargetValue(setColumns)
15344
- }), /*#__PURE__*/React.createElement("div", {
15345
- className: "neeto-editor-table-menu__button"
15346
- }, /*#__PURE__*/React.createElement(Button$1, {
15347
- className: "mt-auto",
15348
- "data-cy": "neeto-editor-fixed-menu-table-option-create-button",
15349
- label: t("neetoEditor.common.create"),
15350
- size: "small",
15351
- onClick: handleSubmit
15352
- }))));
15442
+ onClose: handleClose,
15443
+ children: /*#__PURE__*/jsxs(Menu$1, {
15444
+ className: "neeto-editor-table__item",
15445
+ children: [/*#__PURE__*/jsx(Input, {
15446
+ autoFocus: true,
15447
+ "data-cy": "neeto-editor-fixed-menu-table-option-input",
15448
+ label: t("neetoEditor.menu.rows"),
15449
+ min: "1",
15450
+ placeholder: t("neetoEditor.placeholders.rows"),
15451
+ size: "small",
15452
+ type: "number",
15453
+ value: rows,
15454
+ onChange: withEventTargetValue(setRows)
15455
+ }), /*#__PURE__*/jsx(Input, {
15456
+ "data-cy": "neeto-editor-fixed-menu-table-option-input",
15457
+ label: t("neetoEditor.menu.columns"),
15458
+ min: "1",
15459
+ placeholder: t("neetoEditor.placeholders.rows"),
15460
+ size: "small",
15461
+ type: "number",
15462
+ value: columns,
15463
+ onChange: withEventTargetValue(setColumns)
15464
+ }), /*#__PURE__*/jsx("div", {
15465
+ className: "neeto-editor-table-menu__button",
15466
+ children: /*#__PURE__*/jsx(Button$1, {
15467
+ className: "mt-auto",
15468
+ "data-cy": "neeto-editor-fixed-menu-table-option-create-button",
15469
+ label: t("neetoEditor.common.create"),
15470
+ size: "small",
15471
+ onClick: handleSubmit
15472
+ })
15473
+ })]
15474
+ })
15475
+ });
15353
15476
  };
15354
15477
  var TableOption$1 = /*#__PURE__*/memo(TableOption);
15355
15478
 
@@ -15765,17 +15888,17 @@ var Menu = function Menu(props) {
15765
15888
  document.removeEventListener("keydown", handleKeyDown);
15766
15889
  };
15767
15890
  }, []);
15768
- return /*#__PURE__*/React.createElement(MenuComponent, _extends$1({}, _objectSpread(_objectSpread({}, props), {}, {
15891
+ return /*#__PURE__*/jsx(MenuComponent, _objectSpread(_objectSpread({}, _objectSpread(_objectSpread({}, props), {}, {
15769
15892
  attachmentProps: attachmentProps,
15770
15893
  isEmojiPickerActive: isEmojiPickerActive,
15771
15894
  mediaUploader: mediaUploader,
15772
15895
  setIsEmojiPickerActive: setIsEmojiPickerActive,
15773
15896
  setMediaUploader: setMediaUploader
15774
- }), {
15897
+ })), {}, {
15775
15898
  options: menuOptions,
15776
15899
  unsplashApiKey: editorSecrets.unsplash
15777
15900
  }));
15778
15901
  };
15779
15902
 
15780
15903
  export { resetFocussedNode as A, findParentNodeClosestToPos as B, BubbleMenu as C, DecorationSet as D, Extension as E, getLinkPopoverPosition as F, getMarkType as G, getMarkRange as H, InputRule as I, useEditor as J, EditorContent as K, MediaUploader as L, Menu as M, Node as N, EmbedOption as O, PasteRule as P, EditorView as Q, ReactNodeViewRenderer as R, Mark as a, markInputRule as b, markPasteRule as c, Decoration as d, callOrReturn as e, getExtensionField as f, getMarkAttributes as g, findChildren as h, NodeViewWrapper as i, NodeViewContent as j, keydownHandler as k, escapeForRegEx as l, mergeAttributes as m, nodeInputRule as n, ReactRenderer as o, EmojiPickerMenu as p, emojiPickerApi as q, combineTransactionSteps as r, getChangedRanges as s, textblockTypeInputRule as t, findChildrenInRange as u, validateUrl as v, wrappingInputRule as w, getMarksBetween as x, getAttributes as y, highlightFocussedNode as z };
15781
- //# sourceMappingURL=chunk-b39dfdd8.js.map
15904
+ //# sourceMappingURL=chunk-27a003fe.js.map