@bigbinary/neeto-editor 1.47.63 → 1.47.65

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.
@@ -8,7 +8,7 @@ import Editor from './Editor.js';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
  import '@babel/runtime/helpers/toConsumableArray';
10
10
  import '@babel/runtime/helpers/slicedToArray';
11
- import './chunk-P4uqYK53.js';
11
+ import './chunk-CM96VYfa.js';
12
12
  import './chunk-DmrvuTKK.js';
13
13
  import 'i18next';
14
14
  import '@bigbinary/neeto-icons/TextH1';
@@ -72,9 +72,9 @@ import '@bigbinary/neeto-molecules/DynamicVariables';
72
72
  import '@bigbinary/neeto-image-uploader-frontend';
73
73
  import '@bigbinary/neetoui/Modal';
74
74
  import '@bigbinary/neetoui/Tab';
75
+ import '@bigbinary/neetoui/Toastr';
75
76
  import './chunk-C0acX1wJ.js';
76
77
  import 'zustand/shallow';
77
- import '@bigbinary/neetoui/Toastr';
78
78
  import 'zustand';
79
79
  import './chunk-E-ZsRS8r.js';
80
80
  import '@bigbinary/neeto-icons/LeftAlign';
package/dist/Menu.js CHANGED
@@ -3,7 +3,7 @@ import '@babel/runtime/helpers/toConsumableArray';
3
3
  import '@babel/runtime/helpers/slicedToArray';
4
4
  import 'react';
5
5
  import 'ramda';
6
- export { M as default } from './chunk-P4uqYK53.js';
6
+ export { M as default } from './chunk-CM96VYfa.js';
7
7
  import './chunk-BnpU7flF.js';
8
8
  import 'react/jsx-runtime';
9
9
  import './chunk-DmrvuTKK.js';
@@ -69,9 +69,9 @@ import '@bigbinary/neeto-molecules/DynamicVariables';
69
69
  import '@bigbinary/neeto-image-uploader-frontend';
70
70
  import '@bigbinary/neetoui/Modal';
71
71
  import '@bigbinary/neetoui/Tab';
72
+ import '@bigbinary/neetoui/Toastr';
72
73
  import './chunk-C0acX1wJ.js';
73
74
  import 'zustand/shallow';
74
- import '@bigbinary/neetoui/Toastr';
75
75
  import 'zustand';
76
76
  import './chunk-E-ZsRS8r.js';
77
77
  import '@bigbinary/neeto-icons/LeftAlign';
@@ -67,7 +67,8 @@ import DynamicVariables from '@bigbinary/neeto-molecules/DynamicVariables';
67
67
  import { ImageUploader } from '@bigbinary/neeto-image-uploader-frontend';
68
68
  import Modal from '@bigbinary/neetoui/Modal';
69
69
  import Tab from '@bigbinary/neetoui/Tab';
70
- import { F as File, u as useFileUploader, b as useDropFiles, A as ALLOWED_IMAGE_TYPES, c as ALLOWED_VIDEO_TYPES, e as convertToFileSize, D as DEFAULT_IMAGE_UPLOAD_CONFIG, f as DEFAULT_VIDEO_UPLOAD_CONFIG, V as VIDEO_EMBED_FORM_VALIDATION_SCHEMA, g as getTabs, v as validateUrl } from './chunk-C0acX1wJ.js';
70
+ import Toastr from '@bigbinary/neetoui/Toastr';
71
+ import { F as File, u as useFileUploader, b as useDropFiles, A as ALLOWED_IMAGE_TYPES, c as ALLOWED_VIDEO_TYPES, e as convertToFileSize, D as DEFAULT_IMAGE_UPLOAD_CONFIG, f as DEFAULT_VIDEO_UPLOAD_CONFIG, V as VIDEO_EMBED_FORM_VALIDATION_SCHEMA, g as getTabs, v as validateUrl, d as directUploadsApi } from './chunk-C0acX1wJ.js';
71
72
  import Tooltip from '@bigbinary/neetoui/Tooltip';
72
73
  import Form from '@bigbinary/neetoui/formik/Form';
73
74
  import Input$1 from '@bigbinary/neetoui/formik/Input';
@@ -17055,10 +17056,36 @@ var MediaUploader = function MediaUploader(_ref) {
17055
17056
  return commands.insertContentAt(safePosition, "<p></p>");
17056
17057
  }).run();
17057
17058
  };
17058
- var handleImageUploadComplete = function handleImageUploadComplete(file) {
17059
- insertMediaToEditor(file);
17060
- handleClose();
17061
- };
17059
+ var handleImageUploadComplete = /*#__PURE__*/function () {
17060
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file) {
17061
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
17062
+ while (1) switch (_context.prev = _context.next) {
17063
+ case 0:
17064
+ _context.prev = 0;
17065
+ _context.next = 3;
17066
+ return directUploadsApi.attach({
17067
+ id: file.id,
17068
+ signed_id: file.signedId
17069
+ });
17070
+ case 3:
17071
+ insertMediaToEditor(file);
17072
+ handleClose();
17073
+ _context.next = 10;
17074
+ break;
17075
+ case 7:
17076
+ _context.prev = 7;
17077
+ _context.t0 = _context["catch"](0);
17078
+ Toastr.error(_context.t0);
17079
+ case 10:
17080
+ case "end":
17081
+ return _context.stop();
17082
+ }
17083
+ }, _callee, null, [[0, 7]]);
17084
+ }));
17085
+ return function handleImageUploadComplete(_x) {
17086
+ return _ref3.apply(this, arguments);
17087
+ };
17088
+ }();
17062
17089
  return /*#__PURE__*/jsx(Modal, {
17063
17090
  isOpen: isOpen,
17064
17091
  className: "ne-media-uploader-modal",
@@ -17080,9 +17107,9 @@ var MediaUploader = function MediaUploader(_ref) {
17080
17107
  children: t("neetoEditor.menu.addImage")
17081
17108
  })
17082
17109
  }), !isNotPresent(tabs) && /*#__PURE__*/jsx(Tab, {
17083
- children: tabs.map(function (_ref3) {
17084
- var key = _ref3.key,
17085
- title = _ref3.title;
17110
+ children: tabs.map(function (_ref4) {
17111
+ var key = _ref4.key,
17112
+ title = _ref4.title;
17086
17113
  return /*#__PURE__*/jsx(Tab.Item, {
17087
17114
  active: activeTab === key,
17088
17115
  "data-cy": "neeto-editor-media-uploader-".concat(key, "-tab"),
@@ -18927,4 +18954,4 @@ var Menu = function Menu(props) {
18927
18954
  };
18928
18955
 
18929
18956
  export { getChangedRanges as A, findChildrenInRange as B, CALLOUT_TYPES as C, DecorationSet as D, Extension as E, getMarksBetween as F, getAttributes as G, highlightFocussedNode as H, InputRule as I, resetFocussedNode as J, findParentNodeClosestToPos as K, BubbleMenu as L, Menu as M, Node as N, getLinkPopoverPosition as O, PasteRule as P, getMarkType as Q, ReactNodeViewRenderer as R, getMarkRange as S, useEditor as T, useEditorState$1 as U, EditorContent as V, MediaUploader as W, LinkAddPopOver as X, EditorView as Y, Mark as a, markInputRule as b, markPasteRule as c, Decoration as d, callOrReturn as e, getExtensionField as f, getMarkAttributes as g, getNodeType as h, isNodeSelection as i, getNodeAtPosition as j, keydownHandler as k, isNodeActive as l, mergeAttributes as m, nodeInputRule as n, isAtStartOfNode as o, isAtEndOfNode as p, NodeViewWrapper as q, NodeViewContent as r, findChildren as s, textblockTypeInputRule as t, escapeForRegEx as u, ReactRenderer as v, wrappingInputRule as w, EmojiPickerMenu as x, emojiPickerApi as y, combineTransactionSteps as z };
18930
- //# sourceMappingURL=chunk-P4uqYK53.js.map
18957
+ //# sourceMappingURL=chunk-CM96VYfa.js.map