@bigbinary/neeto-editor-frontend 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/.ready +1 -1
- package/dist/Attachments.js +3 -4
- package/dist/Attachments.js.map +1 -1
- package/dist/Editor.js +120 -103
- package/dist/Editor.js.map +1 -1
- package/dist/EditorContent.js +4 -4
- package/dist/EditorContent.js.map +1 -1
- package/dist/FormikEditor.js +7 -7
- package/dist/FormikEditor.js.map +1 -1
- package/dist/Menu.js +3 -4
- package/dist/Menu.js.map +1 -1
- package/dist/{chunk-C4efob7L.js → chunk-BGx6BSFw.js} +82 -82
- package/dist/chunk-BGx6BSFw.js.map +1 -0
- package/dist/{chunk-Cnk9-9SJ.js → chunk-BVW5D3k5.js} +18 -14
- package/dist/chunk-BVW5D3k5.js.map +1 -0
- package/dist/{chunk-CJfLgMJF.js → chunk-BV_wep_Y.js} +4 -5
- package/dist/{chunk-CJfLgMJF.js.map → chunk-BV_wep_Y.js.map} +1 -1
- package/dist/{chunk-jiUuXPs1.js → chunk-BfQ_Kj4i.js} +4 -5
- package/dist/{chunk-jiUuXPs1.js.map → chunk-BfQ_Kj4i.js.map} +1 -1
- package/dist/{chunk-C893rdfW.js → chunk-Byc0nnPW.js} +63 -63
- package/dist/chunk-Byc0nnPW.js.map +1 -0
- package/dist/{chunk-Qg4uQqj3.js → chunk-CTLN7kYv.js} +7 -7
- package/dist/{chunk-Qg4uQqj3.js.map → chunk-CTLN7kYv.js.map} +1 -1
- package/dist/{chunk-9vP3rEtI.js → chunk-CrQm8ki8.js} +9 -9
- package/dist/{chunk-9vP3rEtI.js.map → chunk-CrQm8ki8.js.map} +1 -1
- package/dist/{chunk-CA9DTddx.js → chunk-CxFTIgDS.js} +35 -40
- package/dist/chunk-CxFTIgDS.js.map +1 -0
- package/dist/{chunk-C6Wn4nia.js → chunk-D_Lgx0N7.js} +35 -40
- package/dist/chunk-D_Lgx0N7.js.map +1 -0
- package/dist/{chunk-aCTMceVU.js → chunk-DbtYYDYF.js} +9 -9
- package/dist/{chunk-aCTMceVU.js.map → chunk-DbtYYDYF.js.map} +1 -1
- package/dist/{chunk-Dm4Qt79M.js → chunk-DhFieQe2.js} +82 -82
- package/dist/chunk-DhFieQe2.js.map +1 -0
- package/dist/chunk-Di3ipdfT.js.map +1 -1
- package/dist/{chunk-fDmcpgqx.js → chunk-DxmX0drN.js} +2 -2
- package/dist/{chunk-fDmcpgqx.js.map → chunk-DxmX0drN.js.map} +1 -1
- package/dist/{chunk-2yDx3K8L.js → chunk-MLCxAQf7.js} +63 -63
- package/dist/chunk-MLCxAQf7.js.map +1 -0
- package/dist/{chunk-D3QbacSt.js → chunk-OP-lX765.js} +44 -50
- package/dist/{chunk-D3QbacSt.js.map → chunk-OP-lX765.js.map} +1 -1
- package/dist/chunk-UwzgbfZD.js.map +1 -1
- package/dist/cjs/Attachments.cjs.js +3 -4
- package/dist/cjs/Attachments.cjs.js.map +1 -1
- package/dist/cjs/Editor.cjs.js +168 -152
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/EditorContent.cjs.js +4 -4
- package/dist/cjs/EditorContent.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +7 -7
- package/dist/cjs/FormikEditor.cjs.js.map +1 -1
- package/dist/cjs/Menu.cjs.js +3 -4
- package/dist/cjs/Menu.cjs.js.map +1 -1
- package/dist/cjs/{chunk-WeNbd2ic.cjs.js → chunk--47DtZYn.cjs.js} +82 -83
- package/dist/cjs/chunk--47DtZYn.cjs.js.map +1 -0
- package/dist/cjs/{chunk-CNhef3wf.cjs.js → chunk-9oA3Y9DG.cjs.js} +18 -14
- package/dist/cjs/chunk-9oA3Y9DG.cjs.js.map +1 -0
- package/dist/cjs/{chunk-BL4O70ER.cjs.js → chunk-BAse0j9m.cjs.js} +4 -5
- package/dist/cjs/{chunk-BL4O70ER.cjs.js.map → chunk-BAse0j9m.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-Bm1Dzh4r.cjs.js → chunk-BPLEmkMA.cjs.js} +34 -40
- package/dist/cjs/chunk-BPLEmkMA.cjs.js.map +1 -0
- package/dist/cjs/{chunk-D3Unocnm.cjs.js → chunk-Bde8Sbb1.cjs.js} +44 -51
- package/dist/cjs/{chunk-D3Unocnm.cjs.js.map → chunk-Bde8Sbb1.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-BKvkHB8E.cjs.js → chunk-Bsk_FDUA.cjs.js} +7 -7
- package/dist/cjs/{chunk-BKvkHB8E.cjs.js.map → chunk-Bsk_FDUA.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-DXsX8co9.cjs.js → chunk-BwE6pvh2.cjs.js} +2 -2
- package/dist/cjs/{chunk-DXsX8co9.cjs.js.map → chunk-BwE6pvh2.cjs.js.map} +1 -1
- package/dist/cjs/chunk-BxKa_XOs.cjs.js.map +1 -1
- package/dist/cjs/{chunk-B1X-JIj8.cjs.js → chunk-CHk_Gq2n.cjs.js} +34 -40
- package/dist/cjs/chunk-CHk_Gq2n.cjs.js.map +1 -0
- package/dist/cjs/{chunk-CesnwG-V.cjs.js → chunk-CkdAygKd.cjs.js} +9 -9
- package/dist/cjs/{chunk-CesnwG-V.cjs.js.map → chunk-CkdAygKd.cjs.js.map} +1 -1
- package/dist/cjs/chunk-CohcWDmm.cjs.js.map +1 -1
- package/dist/cjs/{chunk-DBQBe3dq.cjs.js → chunk-CwtiYxqr.cjs.js} +9 -9
- package/dist/cjs/{chunk-DBQBe3dq.cjs.js.map → chunk-CwtiYxqr.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-DRTgn9TG.cjs.js → chunk-D53HfRZd.cjs.js} +62 -63
- package/dist/cjs/chunk-D53HfRZd.cjs.js.map +1 -0
- package/dist/cjs/{chunk-UyXI9oIp.cjs.js → chunk-D86ONI5s.cjs.js} +4 -5
- package/dist/cjs/{chunk-UyXI9oIp.cjs.js.map → chunk-D86ONI5s.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-TCCIxl2A.cjs.js → chunk-D9InNR1-.cjs.js} +62 -63
- package/dist/cjs/chunk-D9InNR1-.cjs.js.map +1 -0
- package/dist/cjs/{chunk-BETPWBif.cjs.js → chunk-DGPpvE8O.cjs.js} +82 -83
- package/dist/cjs/chunk-DGPpvE8O.cjs.js.map +1 -0
- package/dist/cjs/index.cjs.js +10 -10
- package/dist/cjs/utils.cjs.js +3 -3
- package/dist/cjs/v2/Attachments.cjs.js +3 -4
- package/dist/cjs/v2/Attachments.cjs.js.map +1 -1
- package/dist/cjs/v2/Editor.cjs.js +152 -136
- package/dist/cjs/v2/Editor.cjs.js.map +1 -1
- package/dist/cjs/v2/EditorContent.cjs.js +3 -3
- package/dist/cjs/v2/FormikEditor.cjs.js +7 -7
- package/dist/cjs/v2/FormikEditor.cjs.js.map +1 -1
- package/dist/cjs/v2/Menu.cjs.js +3 -4
- package/dist/cjs/v2/Menu.cjs.js.map +1 -1
- package/dist/cjs/v2/index.cjs.js +9 -9
- package/dist/cjs/v2/utils.cjs.js +3 -3
- package/dist/editor-content.min.css +1 -1
- package/dist/editor-output-pdf-email.css +1 -1
- package/dist/editor-output.js +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +10 -10
- package/dist/utils.js +3 -3
- package/dist/v2/Attachments.js +3 -4
- package/dist/v2/Attachments.js.map +1 -1
- package/dist/v2/Editor.js +119 -102
- package/dist/v2/Editor.js.map +1 -1
- package/dist/v2/EditorContent.js +3 -3
- package/dist/v2/FormikEditor.js +7 -7
- package/dist/v2/FormikEditor.js.map +1 -1
- package/dist/v2/Menu.js +3 -4
- package/dist/v2/Menu.js.map +1 -1
- package/dist/v2/editor-content-styles.js +1 -1
- package/dist/v2/editor-content.min.css +1 -1
- package/dist/v2/index.js +9 -9
- package/dist/v2/styles.css +1 -1
- package/dist/v2/styles.js +1 -1
- package/dist/v2/utils.js +3 -3
- package/package.json +103 -102
- package/dist/chunk-2yDx3K8L.js.map +0 -1
- package/dist/chunk-C4efob7L.js.map +0 -1
- package/dist/chunk-C6Wn4nia.js.map +0 -1
- package/dist/chunk-C893rdfW.js.map +0 -1
- package/dist/chunk-CA9DTddx.js.map +0 -1
- package/dist/chunk-Cnk9-9SJ.js.map +0 -1
- package/dist/chunk-Dm4Qt79M.js.map +0 -1
- package/dist/cjs/chunk-B1X-JIj8.cjs.js.map +0 -1
- package/dist/cjs/chunk-BETPWBif.cjs.js.map +0 -1
- package/dist/cjs/chunk-Bm1Dzh4r.cjs.js.map +0 -1
- package/dist/cjs/chunk-CNhef3wf.cjs.js.map +0 -1
- package/dist/cjs/chunk-DRTgn9TG.cjs.js.map +0 -1
- package/dist/cjs/chunk-TCCIxl2A.cjs.js.map +0 -1
- package/dist/cjs/chunk-WeNbd2ic.cjs.js.map +0 -1
|
@@ -52,7 +52,6 @@ import _createClass from '@babel/runtime/helpers/createClass';
|
|
|
52
52
|
import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
|
|
53
53
|
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
54
54
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
55
|
-
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
56
55
|
import { Picker } from 'emoji-mart';
|
|
57
56
|
import { useOnClickOutside, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
58
57
|
import Customize from '@bigbinary/neeto-icons/Customize';
|
|
@@ -64,8 +63,8 @@ import ImageUploader from '@bigbinary/neeto-image-uploader-frontend/ImageUploade
|
|
|
64
63
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
65
64
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
66
65
|
import Toastr from '@bigbinary/neetoui/Toastr';
|
|
67
|
-
import { u as useDropFiles, d as directUploadsApi } from './chunk-
|
|
68
|
-
import { F as File, u as useFileUploader, A as ALLOWED_IMAGE_TYPES, a as ALLOWED_VIDEO_TYPES, c as convertToFileSize, D as DEFAULT_IMAGE_UPLOAD_CONFIG, b as DEFAULT_VIDEO_UPLOAD_CONFIG, V as VIDEO_EMBED_FORM_VALIDATION_SCHEMA, g as getTabs } from './chunk-
|
|
66
|
+
import { u as useDropFiles, d as directUploadsApi } from './chunk-OP-lX765.js';
|
|
67
|
+
import { F as File, u as useFileUploader, A as ALLOWED_IMAGE_TYPES, a as ALLOWED_VIDEO_TYPES, c as convertToFileSize, D as DEFAULT_IMAGE_UPLOAD_CONFIG, b as DEFAULT_VIDEO_UPLOAD_CONFIG, V as VIDEO_EMBED_FORM_VALIDATION_SCHEMA, g as getTabs } from './chunk-D_Lgx0N7.js';
|
|
69
68
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
70
69
|
import Form from '@bigbinary/neetoui/formik/Form';
|
|
71
70
|
import Input$1 from '@bigbinary/neetoui/formik/Input';
|
|
@@ -74,7 +73,7 @@ import Checkbox from '@bigbinary/neetoui/Checkbox';
|
|
|
74
73
|
import { createPortal } from 'react-dom';
|
|
75
74
|
import Checkbox$1 from '@bigbinary/neeto-icons/Checkbox';
|
|
76
75
|
import File$1 from '@bigbinary/neeto-icons/File';
|
|
77
|
-
import {
|
|
76
|
+
import { useShallow } from 'zustand/shallow';
|
|
78
77
|
import Flag from '@bigbinary/neeto-icons/Flag';
|
|
79
78
|
import Info from '@bigbinary/neeto-icons/misc/Info';
|
|
80
79
|
import Warning from '@bigbinary/neeto-icons/misc/Warning';
|
|
@@ -115,6 +114,8 @@ var CALLOUT_TYPES = [{
|
|
|
115
114
|
|
|
116
115
|
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; }
|
|
117
116
|
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), true).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; }
|
|
117
|
+
function _regenerator$2() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2$2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2$2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2$2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2$2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2$2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2$2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2$2(u), _regeneratorDefine2$2(u, o, "Generator"), _regeneratorDefine2$2(u, n, function () { return this; }), _regeneratorDefine2$2(u, "toString", function () { return "[object Generator]"; }), (_regenerator$2 = function _regenerator() { return { w: i, m: f }; })(); }
|
|
118
|
+
function _regeneratorDefine2$2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2$2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2$2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2$2(e, r, n, t); }
|
|
118
119
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
119
120
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
120
121
|
var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
|
|
@@ -126,27 +127,24 @@ var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
126
127
|
}
|
|
127
128
|
_this = _callSuper(this, EmojiPickerMenu, [].concat(args));
|
|
128
129
|
_defineProperty(_this, "ref", /*#__PURE__*/React__default.createRef());
|
|
129
|
-
_defineProperty(_this, "fetchEmojiData", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/
|
|
130
|
+
_defineProperty(_this, "fetchEmojiData", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator$2().m(function _callee() {
|
|
130
131
|
var _yield$emojiPickerApi, data;
|
|
131
|
-
return
|
|
132
|
-
while (1) switch (_context.
|
|
132
|
+
return _regenerator$2().w(function (_context) {
|
|
133
|
+
while (1) switch (_context.p = _context.n) {
|
|
133
134
|
case 0:
|
|
134
|
-
_context.
|
|
135
|
-
_context.
|
|
135
|
+
_context.p = 0;
|
|
136
|
+
_context.n = 1;
|
|
136
137
|
return emojiPickerApi.fetch();
|
|
137
|
-
case
|
|
138
|
-
_yield$emojiPickerApi = _context.
|
|
138
|
+
case 1:
|
|
139
|
+
_yield$emojiPickerApi = _context.v;
|
|
139
140
|
data = _yield$emojiPickerApi.data;
|
|
140
|
-
return _context.
|
|
141
|
-
case
|
|
142
|
-
_context.
|
|
143
|
-
_context.
|
|
144
|
-
return _context.
|
|
145
|
-
case 11:
|
|
146
|
-
case "end":
|
|
147
|
-
return _context.stop();
|
|
141
|
+
return _context.a(2, data);
|
|
142
|
+
case 2:
|
|
143
|
+
_context.p = 2;
|
|
144
|
+
_context.v;
|
|
145
|
+
return _context.a(2, {});
|
|
148
146
|
}
|
|
149
|
-
}, _callee, null, [[0,
|
|
147
|
+
}, _callee, null, [[0, 2]]);
|
|
150
148
|
})));
|
|
151
149
|
_defineProperty(_this, "onKeyDown", function (_ref2) {
|
|
152
150
|
var event = _ref2.event;
|
|
@@ -218,13 +216,13 @@ var MenuButton = function MenuButton(_ref) {
|
|
|
218
216
|
_ref$disabled = _ref.disabled,
|
|
219
217
|
isButtonDisabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
220
218
|
label = _ref.label;
|
|
221
|
-
var _useEditorStore = useEditorStore(function (store) {
|
|
219
|
+
var _useEditorStore = useEditorStore(useShallow(function (store) {
|
|
222
220
|
var _store$marksState, _store$marksState2;
|
|
223
221
|
return {
|
|
224
222
|
isActive: (_store$marksState = store["marksState"]) === null || _store$marksState === void 0 || (_store$marksState = _store$marksState[optionName]) === null || _store$marksState === void 0 ? void 0 : _store$marksState["isActive"],
|
|
225
223
|
disabled: (_store$marksState2 = store["marksState"]) === null || _store$marksState2 === void 0 || (_store$marksState2 = _store$marksState2[optionName]) === null || _store$marksState2 === void 0 ? void 0 : _store$marksState2["disabled"]
|
|
226
224
|
};
|
|
227
|
-
}
|
|
225
|
+
})),
|
|
228
226
|
isActive = _useEditorStore.isActive,
|
|
229
227
|
_useEditorStore$disab = _useEditorStore.disabled,
|
|
230
228
|
disabled = _useEditorStore$disab === void 0 ? isButtonDisabled : _useEditorStore$disab;
|
|
@@ -1247,6 +1245,8 @@ var Progress = withT(function (_ref) {
|
|
|
1247
1245
|
});
|
|
1248
1246
|
});
|
|
1249
1247
|
|
|
1248
|
+
function _regenerator$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2$1(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2$1(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2$1(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2$1(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2$1(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2$1(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2$1(u), _regeneratorDefine2$1(u, o, "Generator"), _regeneratorDefine2$1(u, n, function () { return this; }), _regeneratorDefine2$1(u, "toString", function () { return "[object Generator]"; }), (_regenerator$1 = function _regenerator() { return { w: i, m: f }; })(); }
|
|
1249
|
+
function _regeneratorDefine2$1(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2$1 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2$1(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2$1(e, r, n, t); }
|
|
1250
1250
|
var LocalUploader = function LocalUploader(_ref) {
|
|
1251
1251
|
var isImage = _ref.isImage,
|
|
1252
1252
|
onClose = _ref.onClose,
|
|
@@ -1267,21 +1267,20 @@ var LocalUploader = function LocalUploader(_ref) {
|
|
|
1267
1267
|
cancelUpload = _useFileUploader.cancelUpload,
|
|
1268
1268
|
isUploading = _useFileUploader.isUploading;
|
|
1269
1269
|
var handleFilesDrop = /*#__PURE__*/function () {
|
|
1270
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/
|
|
1270
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator$1().m(function _callee(files) {
|
|
1271
1271
|
var uploadedFiles;
|
|
1272
|
-
return
|
|
1273
|
-
while (1) switch (_context.
|
|
1272
|
+
return _regenerator$1().w(function (_context) {
|
|
1273
|
+
while (1) switch (_context.n) {
|
|
1274
1274
|
case 0:
|
|
1275
1275
|
addFiles(files);
|
|
1276
|
-
_context.
|
|
1276
|
+
_context.n = 1;
|
|
1277
1277
|
return uploadFiles();
|
|
1278
|
-
case
|
|
1279
|
-
uploadedFiles = _context.
|
|
1278
|
+
case 1:
|
|
1279
|
+
uploadedFiles = _context.v;
|
|
1280
1280
|
uploadedFiles.forEach(insertMediaToEditor);
|
|
1281
1281
|
onClose();
|
|
1282
|
-
case
|
|
1283
|
-
|
|
1284
|
-
return _context.stop();
|
|
1282
|
+
case 2:
|
|
1283
|
+
return _context.a(2);
|
|
1285
1284
|
}
|
|
1286
1285
|
}, _callee);
|
|
1287
1286
|
}));
|
|
@@ -1295,22 +1294,21 @@ var LocalUploader = function LocalUploader(_ref) {
|
|
|
1295
1294
|
});
|
|
1296
1295
|
setIsUploading(isUploading);
|
|
1297
1296
|
var handleAddFile = /*#__PURE__*/function () {
|
|
1298
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/
|
|
1297
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator$1().m(function _callee2(_ref3) {
|
|
1299
1298
|
var files, uploadedFiles;
|
|
1300
|
-
return
|
|
1301
|
-
while (1) switch (_context2.
|
|
1299
|
+
return _regenerator$1().w(function (_context2) {
|
|
1300
|
+
while (1) switch (_context2.n) {
|
|
1302
1301
|
case 0:
|
|
1303
1302
|
files = _ref3.target.files;
|
|
1304
1303
|
addFiles(files);
|
|
1305
|
-
_context2.
|
|
1304
|
+
_context2.n = 1;
|
|
1306
1305
|
return uploadFiles();
|
|
1307
|
-
case
|
|
1308
|
-
uploadedFiles = _context2.
|
|
1306
|
+
case 1:
|
|
1307
|
+
uploadedFiles = _context2.v;
|
|
1309
1308
|
uploadedFiles.forEach(insertMediaToEditor);
|
|
1310
1309
|
onClose();
|
|
1311
|
-
case
|
|
1312
|
-
|
|
1313
|
-
return _context2.stop();
|
|
1310
|
+
case 2:
|
|
1311
|
+
return _context2.a(2);
|
|
1314
1312
|
}
|
|
1315
1313
|
}, _callee2);
|
|
1316
1314
|
}));
|
|
@@ -1417,6 +1415,8 @@ var VideoEmbedForm = function VideoEmbedForm(_ref) {
|
|
|
1417
1415
|
});
|
|
1418
1416
|
};
|
|
1419
1417
|
|
|
1418
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
1419
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
1420
1420
|
var MediaUploader = function MediaUploader(_ref) {
|
|
1421
1421
|
var mediaUploader = _ref.mediaUploader,
|
|
1422
1422
|
onClose = _ref.onClose,
|
|
@@ -1470,36 +1470,36 @@ var MediaUploader = function MediaUploader(_ref) {
|
|
|
1470
1470
|
}).run();
|
|
1471
1471
|
};
|
|
1472
1472
|
var onUploadComplete = /*#__PURE__*/function () {
|
|
1473
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/
|
|
1474
|
-
|
|
1475
|
-
|
|
1473
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(file) {
|
|
1474
|
+
var _t;
|
|
1475
|
+
return _regenerator().w(function (_context) {
|
|
1476
|
+
while (1) switch (_context.p = _context.n) {
|
|
1476
1477
|
case 0:
|
|
1477
1478
|
if (!(isNotPresent(file.id) && isNotPresent(file.signedId))) {
|
|
1478
|
-
_context.
|
|
1479
|
+
_context.n = 1;
|
|
1479
1480
|
break;
|
|
1480
1481
|
}
|
|
1481
|
-
return _context.
|
|
1482
|
-
case
|
|
1483
|
-
_context.
|
|
1484
|
-
_context.
|
|
1482
|
+
return _context.a(2);
|
|
1483
|
+
case 1:
|
|
1484
|
+
_context.p = 1;
|
|
1485
|
+
_context.n = 2;
|
|
1485
1486
|
return directUploadsApi.attach({
|
|
1486
1487
|
id: file.id,
|
|
1487
1488
|
signed_id: file.signedId
|
|
1488
1489
|
});
|
|
1489
|
-
case
|
|
1490
|
+
case 2:
|
|
1490
1491
|
insertMediaToEditor(file);
|
|
1491
1492
|
handleClose();
|
|
1492
|
-
_context.
|
|
1493
|
+
_context.n = 4;
|
|
1493
1494
|
break;
|
|
1494
|
-
case
|
|
1495
|
-
_context.
|
|
1496
|
-
|
|
1497
|
-
Toastr.error(
|
|
1498
|
-
case
|
|
1499
|
-
|
|
1500
|
-
return _context.stop();
|
|
1495
|
+
case 3:
|
|
1496
|
+
_context.p = 3;
|
|
1497
|
+
_t = _context.v;
|
|
1498
|
+
Toastr.error(_t);
|
|
1499
|
+
case 4:
|
|
1500
|
+
return _context.a(2);
|
|
1501
1501
|
}
|
|
1502
|
-
}, _callee, null, [[
|
|
1502
|
+
}, _callee, null, [[1, 3]]);
|
|
1503
1503
|
}));
|
|
1504
1504
|
return function onUploadComplete(_x) {
|
|
1505
1505
|
return _ref3.apply(this, arguments);
|
|
@@ -1799,12 +1799,12 @@ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t
|
|
|
1799
1799
|
var useEditorState = function useEditorState(_ref) {
|
|
1800
1800
|
var editor = _ref.editor,
|
|
1801
1801
|
neetoKbArticleState = _ref.neetoKbArticleState;
|
|
1802
|
-
var _useEditorStore = useEditorStore(function (store) {
|
|
1802
|
+
var _useEditorStore = useEditorStore(useShallow(function (store) {
|
|
1803
1803
|
return {
|
|
1804
1804
|
setMarksState: store["setMarksState"],
|
|
1805
1805
|
marksState: store["marksState"]
|
|
1806
1806
|
};
|
|
1807
|
-
}
|
|
1807
|
+
})),
|
|
1808
1808
|
setMarksState = _useEditorStore.setMarksState,
|
|
1809
1809
|
marksState = _useEditorStore.marksState;
|
|
1810
1810
|
var handleSelectionUpdate = useCallback(function (_ref2) {
|
|
@@ -2554,12 +2554,12 @@ var FontSizeOption = function FontSizeOption(_ref) {
|
|
|
2554
2554
|
options = _ref$options === void 0 ? [] : _ref$options;
|
|
2555
2555
|
var dropdownRef = useRef(null);
|
|
2556
2556
|
var lastOption = last(FONT_SIZE_OPTIONS);
|
|
2557
|
-
var _useEditorStore = useEditorStore(function (store) {
|
|
2557
|
+
var _useEditorStore = useEditorStore(useShallow(function (store) {
|
|
2558
2558
|
var _store$marksState;
|
|
2559
2559
|
return {
|
|
2560
2560
|
fontSizeOption: (_store$marksState = store["marksState"]) === null || _store$marksState === void 0 ? void 0 : _store$marksState["fontSizeOption"]
|
|
2561
2561
|
};
|
|
2562
|
-
}
|
|
2562
|
+
})),
|
|
2563
2563
|
_useEditorStore$fontS = _useEditorStore.fontSizeOption,
|
|
2564
2564
|
activeOption = _useEditorStore$fontS === void 0 ? lastOption : _useEditorStore$fontS;
|
|
2565
2565
|
var handleClick = function handleClick(level) {
|
|
@@ -3365,4 +3365,4 @@ var Menu = function Menu(props) {
|
|
|
3365
3365
|
};
|
|
3366
3366
|
|
|
3367
3367
|
export { CALLOUT_TYPES as C, EmojiPickerMenu as E, LinkAddPopOver as L, Menu as M, MenuDynamicVariables as a, MediaUploader as b, getLinkPopoverPosition as g, validateUrl as v };
|
|
3368
|
-
//# sourceMappingURL=chunk-
|
|
3368
|
+
//# sourceMappingURL=chunk-MLCxAQf7.js.map
|