@seafile/sea-email-editor 0.0.2 → 0.0.4

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.
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
- var _constants = require("../../constants");
11
10
  var _classnames = _interopRequireDefault(require("classnames"));
12
- var _components = require("../../components");
11
+ var _components = require("../../../components");
12
+ var _constants = require("../../../constants");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  const MenuDropDown = props => {
15
15
  const {
@@ -11,7 +11,7 @@ var _slateReact = require("slate-react");
11
11
  var _reactImageLightbox = _interopRequireDefault(require("@seafile/react-image-lightbox"));
12
12
  var _helper = require("../helper");
13
13
  require("@seafile/react-image-lightbox/style.css");
14
- require("./style.css");
14
+ require("./index.css");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  const ImagePreviewer = _ref => {
17
17
  let {
@@ -31,11 +31,15 @@ const translateElement = (value, element, path) => {
31
31
  ...(style || {})
32
32
  };
33
33
  if (element.type === _constants.ElementTypes.TABLE_CELL) {
34
- const tablePath = path.slice(0, -2);
35
- const tableElement = findElementByPath(value, tablePath);
36
- const tdIndex = path.at(-1);
37
- const align = tableElement.align[tdIndex] || 'left';
38
- customizeStyle['textAlign'] = align;
34
+ try {
35
+ const tablePath = path.slice(0, -2);
36
+ const tableElement = findElementByPath(value, tablePath);
37
+ const tdIndex = path.at(-1);
38
+ const align = tableElement.align[tdIndex] || 'left';
39
+ customizeStyle['textAlign'] = align;
40
+ } catch {
41
+ //
42
+ }
39
43
  }
40
44
  let styleString = Object.keys(customizeStyle).map(styleKey => `${styleKey.split(/(?=[A-Z])/).join('-').toLowerCase()}: ${customizeStyle[styleKey]};`).join('');
41
45
  styleString = styleString ? ` style="${styleString}"` : '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sea-email-editor",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "dependencies": {