dtable-ui-component 5.1.13 → 5.1.14-beta.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.
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _normalizeLongTextValue = _interopRequireDefault(require("./normalize-long-text-value"));
10
+ var _seafileEditor = require("@seafile/seafile-editor");
11
11
  var _LongTextPreview = _interopRequireDefault(require("./widgets/LongTextPreview"));
12
12
  var _ModalPortal = _interopRequireDefault(require("../ModalPortal"));
13
13
  require("./index.css");
@@ -56,7 +56,22 @@ class SimpleLongTextFormatter extends _react.default.Component {
56
56
  if (!value) return {};
57
57
  const valueType = Object.prototype.toString.call(value);
58
58
  if (valueType === '[object String]') {
59
- return (0, _normalizeLongTextValue.default)(value);
59
+ const isMarkdown = true;
60
+ const previewTextNeedSlice = false;
61
+ const {
62
+ previewText,
63
+ images,
64
+ links,
65
+ checklist
66
+ } = (0, _seafileEditor.getPreviewContent)(value, isMarkdown, previewTextNeedSlice);
67
+ const newValue = Object.assign({}, {
68
+ text: value,
69
+ preview: previewText,
70
+ images,
71
+ links,
72
+ checklist
73
+ });
74
+ return newValue;
60
75
  }
61
76
  if (valueType === '[object Object]') {
62
77
  return value;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "dtable-ui-component",
3
- "version": "5.1.13",
3
+ "version": "5.1.14-beta.1",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "2.0.5",
7
7
  "@seafile/seafile-calendar": "0.0.24",
8
- "@seafile/seafile-editor": "~1.0.102",
8
+ "@seafile/seafile-editor": "1.0.122-beta.1",
9
9
  "antd-mobile": "2.3.1",
10
10
  "classnames": "2.3.2",
11
11
  "dayjs": "1.10.7",