@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.
- package/dist/Attachments.js +17 -5
- package/dist/Attachments.js.map +1 -1
- package/dist/Editor.js +629 -508
- package/dist/Editor.js.map +1 -1
- package/dist/EditorContent.js +50 -41
- package/dist/EditorContent.js.map +1 -1
- package/dist/FormikEditor.js +91 -30
- package/dist/FormikEditor.js.map +1 -1
- package/dist/Menu.js +45 -5
- package/dist/Menu.js.map +1 -1
- package/dist/{chunk-b39dfdd8.js → chunk-27a003fe.js} +831 -708
- package/dist/{chunk-b39dfdd8.js.map → chunk-27a003fe.js.map} +1 -1
- package/dist/{chunk-6dabc0b1.js → chunk-54bb591c.js} +66 -43
- package/dist/{chunk-6dabc0b1.js.map → chunk-54bb591c.js.map} +1 -1
- package/dist/{chunk-52091cdb.js → chunk-91e5e60f.js} +186 -152
- package/dist/chunk-91e5e60f.js.map +1 -0
- package/dist/{chunk-c1e6a992.js → chunk-eafe8fe4.js} +24 -18
- package/dist/{chunk-c1e6a992.js.map → chunk-eafe8fe4.js.map} +1 -1
- package/dist/cjs/Attachments.cjs.js +17 -5
- package/dist/cjs/Attachments.cjs.js.map +1 -1
- package/dist/cjs/Editor.cjs.js +705 -548
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/EditorContent.cjs.js +61 -50
- package/dist/cjs/EditorContent.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +94 -33
- package/dist/cjs/FormikEditor.cjs.js.map +1 -1
- package/dist/cjs/Menu.cjs.js +45 -5
- package/dist/cjs/Menu.cjs.js.map +1 -1
- package/dist/cjs/{chunk-d12e89fd.cjs.js → chunk-242eea5e.cjs.js} +1033 -874
- package/dist/cjs/{chunk-d12e89fd.cjs.js.map → chunk-242eea5e.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-d0720eac.cjs.js → chunk-391e4970.cjs.js} +214 -170
- package/dist/cjs/chunk-391e4970.cjs.js.map +1 -0
- package/dist/cjs/{chunk-3777ae13.cjs.js → chunk-969db227.cjs.js} +88 -60
- package/dist/cjs/{chunk-3777ae13.cjs.js.map → chunk-969db227.cjs.js.map} +1 -1
- package/dist/cjs/{chunk-76a5f21a.cjs.js → chunk-ae47a2a1.cjs.js} +41 -31
- package/dist/cjs/{chunk-76a5f21a.cjs.js.map → chunk-ae47a2a1.cjs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +65 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +65 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/chunk-52091cdb.js.map +0 -1
- package/dist/cjs/chunk-d0720eac.cjs.js.map +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React__default, { useState, useMemo, useEffect, useContext, useRef, createElement, createContext, PureComponent } from 'react';
|
|
2
2
|
import { findIndexBy, truncate } from '@bigbinary/neeto-cist';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import Left from '@bigbinary/neeto-icons/Left';
|
|
4
|
+
import Right from '@bigbinary/neeto-icons/Right';
|
|
5
|
+
import Modal from '@bigbinary/neetoui/Modal';
|
|
6
|
+
import Typography from '@bigbinary/neetoui/Typography';
|
|
7
|
+
import Button$1 from '@bigbinary/neetoui/Button';
|
|
5
8
|
import { isEmpty } from 'ramda';
|
|
6
9
|
import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, c as commonjsGlobal } from './chunk-65f73e5a.js';
|
|
7
|
-
import { j as commonjsRequire, P as PropTypes, f as convertToFileSize } from './chunk-
|
|
10
|
+
import { j as commonjsRequire, P as PropTypes, f as convertToFileSize } from './chunk-eafe8fe4.js';
|
|
8
11
|
import require$$1$1 from 'fs';
|
|
9
12
|
import require$$2$1 from 'http';
|
|
10
13
|
import require$$3 from 'https';
|
|
@@ -24,25 +27,37 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
24
27
|
import _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';
|
|
25
28
|
import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
|
|
26
29
|
import { useTranslation, Trans } from 'react-i18next';
|
|
27
|
-
import { d as downloadFile, c as checkPreviewAvailability, a as ATTACHMENTS_PREVIEW_DATA_CY } from './chunk-
|
|
30
|
+
import { d as downloadFile, c as checkPreviewAvailability, a as ATTACHMENTS_PREVIEW_DATA_CY } from './chunk-91e5e60f.js';
|
|
31
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
28
32
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
29
33
|
import '@babel/runtime/helpers/slicedToArray';
|
|
30
34
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
31
35
|
import '@babel/runtime/helpers/asyncToGenerator';
|
|
32
36
|
import 'zustand/shallow';
|
|
33
37
|
import 'axios';
|
|
38
|
+
import '@bigbinary/neetoui/Toastr';
|
|
34
39
|
import '@babel/runtime/helpers/defineProperty';
|
|
35
40
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
36
41
|
import 'zustand';
|
|
37
42
|
import '@babel/runtime/helpers/createClass';
|
|
38
43
|
import '@babel/runtime/helpers/classCallCheck';
|
|
39
44
|
import 'i18next';
|
|
45
|
+
import '@bigbinary/neeto-icons/LeftAlign';
|
|
46
|
+
import '@bigbinary/neeto-icons/CenterAlign';
|
|
47
|
+
import '@bigbinary/neeto-icons/RightAlign';
|
|
48
|
+
import '@bigbinary/neeto-icons/Delete';
|
|
40
49
|
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
41
50
|
import './chunk-edd8b9fe.js';
|
|
42
|
-
import '@babel/runtime/helpers/extends';
|
|
43
51
|
import 'classnames';
|
|
44
52
|
import './chunk-15c449f1.js';
|
|
45
53
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
54
|
+
import '@bigbinary/neeto-icons/MenuVertical';
|
|
55
|
+
import '@bigbinary/neeto-icons/Close';
|
|
56
|
+
import '@bigbinary/neetoui/Dropdown';
|
|
57
|
+
import '@bigbinary/neetoui/Input';
|
|
58
|
+
import '@bigbinary/neetoui/Spinner';
|
|
59
|
+
import '@bigbinary/neetoui/Tooltip';
|
|
60
|
+
import '@bigbinary/neetoui/Alert';
|
|
46
61
|
|
|
47
62
|
var build = {};
|
|
48
63
|
|
|
@@ -68926,12 +68941,12 @@ var Preview = function Preview(_ref) {
|
|
|
68926
68941
|
if (isPreviewAvailable) {
|
|
68927
68942
|
switch (contentType.split("/")[0]) {
|
|
68928
68943
|
case "image":
|
|
68929
|
-
return /*#__PURE__*/
|
|
68944
|
+
return /*#__PURE__*/jsx("img", {
|
|
68930
68945
|
"data-cy": ATTACHMENTS_PREVIEW_DATA_CY,
|
|
68931
68946
|
src: url
|
|
68932
68947
|
});
|
|
68933
68948
|
case "video":
|
|
68934
|
-
return /*#__PURE__*/
|
|
68949
|
+
return /*#__PURE__*/jsx("video", {
|
|
68935
68950
|
controls: true,
|
|
68936
68951
|
"data-cy": ATTACHMENTS_PREVIEW_DATA_CY,
|
|
68937
68952
|
src: url
|
|
@@ -68939,13 +68954,13 @@ var Preview = function Preview(_ref) {
|
|
|
68939
68954
|
case "application":
|
|
68940
68955
|
case "text":
|
|
68941
68956
|
if (contentType === "application/pdf") {
|
|
68942
|
-
return /*#__PURE__*/
|
|
68957
|
+
return /*#__PURE__*/jsx("iframe", {
|
|
68943
68958
|
"data-cy": ATTACHMENTS_PREVIEW_DATA_CY,
|
|
68944
68959
|
src: url,
|
|
68945
68960
|
width: "100%"
|
|
68946
68961
|
});
|
|
68947
68962
|
}
|
|
68948
|
-
return /*#__PURE__*/
|
|
68963
|
+
return /*#__PURE__*/jsx(DocViewer, {
|
|
68949
68964
|
className: "ne-attachments-preview__body-docviewer",
|
|
68950
68965
|
"data-cy": ATTACHMENTS_PREVIEW_DATA_CY,
|
|
68951
68966
|
documents: [{
|
|
@@ -68964,45 +68979,53 @@ var Preview = function Preview(_ref) {
|
|
|
68964
68979
|
return null;
|
|
68965
68980
|
}
|
|
68966
68981
|
}
|
|
68967
|
-
return /*#__PURE__*/
|
|
68968
|
-
|
|
68969
|
-
|
|
68970
|
-
|
|
68971
|
-
|
|
68972
|
-
|
|
68973
|
-
|
|
68974
|
-
|
|
68975
|
-
|
|
68982
|
+
return /*#__PURE__*/jsx(Typography, {
|
|
68983
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
68984
|
+
i18nKey: "neetoEditor.attachments.noPreview",
|
|
68985
|
+
components: {
|
|
68986
|
+
span: /*#__PURE__*/jsx("span", {
|
|
68987
|
+
className: "ne-attachments-preview__body-download",
|
|
68988
|
+
onClick: handleDownload
|
|
68989
|
+
})
|
|
68990
|
+
}
|
|
68991
|
+
})
|
|
68992
|
+
});
|
|
68976
68993
|
};
|
|
68977
|
-
return /*#__PURE__*/
|
|
68994
|
+
return /*#__PURE__*/jsxs(Modal, {
|
|
68978
68995
|
onClose: onClose,
|
|
68979
68996
|
className: "ne-attachments-preview",
|
|
68980
68997
|
isOpen: !isEmpty(selectedAttachment),
|
|
68981
68998
|
size: "fullScreen",
|
|
68982
|
-
onKeyDown: handleKeyDown
|
|
68983
|
-
|
|
68984
|
-
|
|
68985
|
-
|
|
68986
|
-
|
|
68987
|
-
|
|
68988
|
-
|
|
68989
|
-
|
|
68990
|
-
|
|
68991
|
-
|
|
68992
|
-
|
|
68993
|
-
|
|
68994
|
-
|
|
68995
|
-
|
|
68996
|
-
|
|
68997
|
-
|
|
68998
|
-
|
|
68999
|
-
|
|
69000
|
-
|
|
69001
|
-
|
|
69002
|
-
|
|
69003
|
-
|
|
69004
|
-
|
|
68999
|
+
onKeyDown: handleKeyDown,
|
|
69000
|
+
children: [/*#__PURE__*/jsxs(Modal.Header, {
|
|
69001
|
+
className: "ne-attachments-preview__header",
|
|
69002
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
69003
|
+
className: "ne-attachments-preview__header__fileinfo",
|
|
69004
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
69005
|
+
style: "h3",
|
|
69006
|
+
children: truncate(filename, 25)
|
|
69007
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
69008
|
+
style: "body2",
|
|
69009
|
+
children: convertToFileSize(size)
|
|
69010
|
+
})]
|
|
69011
|
+
}), /*#__PURE__*/jsx(Button$1, {
|
|
69012
|
+
label: t("neetoEditor.common.download"),
|
|
69013
|
+
ref: downloadRef,
|
|
69014
|
+
style: "link",
|
|
69015
|
+
onClick: handleDownload
|
|
69016
|
+
})]
|
|
69017
|
+
}), /*#__PURE__*/jsxs(Modal.Body, {
|
|
69018
|
+
className: "ne-attachments-preview__body",
|
|
69019
|
+
children: [/*#__PURE__*/jsx(Left, {
|
|
69020
|
+
className: "ne-attachments-preview__body-left",
|
|
69021
|
+
onClick: handleLeftArrowClick
|
|
69022
|
+
}), /*#__PURE__*/jsx(Right, {
|
|
69023
|
+
className: "ne-attachments-preview__body-right",
|
|
69024
|
+
onClick: handleRightArrowClick
|
|
69025
|
+
}), setPreview()]
|
|
69026
|
+
})]
|
|
69027
|
+
});
|
|
69005
69028
|
};
|
|
69006
69029
|
|
|
69007
69030
|
export { Preview as default };
|
|
69008
|
-
//# sourceMappingURL=chunk-
|
|
69031
|
+
//# sourceMappingURL=chunk-54bb591c.js.map
|