@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,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 { Left, Right } from '@bigbinary/neeto-icons';
4
- import { Modal, Typography, Button as Button$1 } from '@bigbinary/neetoui';
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-c1e6a992.js';
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-52091cdb.js';
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__*/React.createElement("img", {
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__*/React.createElement("video", {
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__*/React.createElement("iframe", {
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__*/React.createElement(DocViewer, {
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__*/React.createElement(Typography, null, /*#__PURE__*/React.createElement(Trans, {
68968
- i18nKey: "neetoEditor.attachments.noPreview",
68969
- components: {
68970
- span: /*#__PURE__*/React.createElement("span", {
68971
- className: "ne-attachments-preview__body-download",
68972
- onClick: handleDownload
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__*/React.createElement(Modal, {
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
- }, /*#__PURE__*/React.createElement(Modal.Header, {
68984
- className: "ne-attachments-preview__header"
68985
- }, /*#__PURE__*/React.createElement("div", {
68986
- className: "ne-attachments-preview__header__fileinfo"
68987
- }, /*#__PURE__*/React.createElement(Typography, {
68988
- style: "h3"
68989
- }, truncate(filename, 25)), /*#__PURE__*/React.createElement(Typography, {
68990
- style: "body2"
68991
- }, convertToFileSize(size))), /*#__PURE__*/React.createElement(Button$1, {
68992
- label: t("neetoEditor.common.download"),
68993
- ref: downloadRef,
68994
- style: "link",
68995
- onClick: handleDownload
68996
- })), /*#__PURE__*/React.createElement(Modal.Body, {
68997
- className: "ne-attachments-preview__body"
68998
- }, /*#__PURE__*/React.createElement(Left, {
68999
- className: "ne-attachments-preview__body-left",
69000
- onClick: handleLeftArrowClick
69001
- }), /*#__PURE__*/React.createElement(Right, {
69002
- className: "ne-attachments-preview__body-right",
69003
- onClick: handleRightArrowClick
69004
- }), setPreview()));
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-6dabc0b1.js.map
69031
+ //# sourceMappingURL=chunk-54bb591c.js.map