@seafile/sdoc-editor 2.0.39 → 2.0.40
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.
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "CHART", {
|
|
|
29
29
|
return _elementType.CHART;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
+
exports.CHART_PREVIEW_TYPE = void 0;
|
|
32
33
|
Object.defineProperty(exports, "CHECK_LIST_ITEM", {
|
|
33
34
|
enumerable: true,
|
|
34
35
|
get: function () {
|
|
@@ -567,4 +568,9 @@ const MOUSE_ENTER_EVENT_DISABLED_MAP = exports.MOUSE_ENTER_EVENT_DISABLED_MAP =
|
|
|
567
568
|
[_elementType.HEADER6]: [_elementType.CALL_OUT],
|
|
568
569
|
[_elementType.CALL_OUT]: [_elementType.CALL_OUT]
|
|
569
570
|
};
|
|
570
|
-
const ROOT_ELEMENT_TYPES = exports.ROOT_ELEMENT_TYPES = [_elementType.PARAGRAPH, _elementType.TITLE, _elementType.SUBTITLE, _elementType.CHECK_LIST_ITEM, _elementType.ORDERED_LIST, _elementType.UNORDERED_LIST, _elementType.BLOCKQUOTE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CALL_OUT, _elementType.TABLE, _elementType.CODE_BLOCK, _elementType.IMAGE_BLOCK, _elementType.VIDEO, _elementType.SEATABLE_TABLE, _elementType.SEATABLE_ROW, _elementType.CHART];
|
|
571
|
+
const ROOT_ELEMENT_TYPES = exports.ROOT_ELEMENT_TYPES = [_elementType.PARAGRAPH, _elementType.TITLE, _elementType.SUBTITLE, _elementType.CHECK_LIST_ITEM, _elementType.ORDERED_LIST, _elementType.UNORDERED_LIST, _elementType.BLOCKQUOTE, _elementType.HEADER1, _elementType.HEADER2, _elementType.HEADER3, _elementType.HEADER4, _elementType.HEADER5, _elementType.HEADER6, _elementType.CALL_OUT, _elementType.TABLE, _elementType.CODE_BLOCK, _elementType.IMAGE_BLOCK, _elementType.VIDEO, _elementType.SEATABLE_TABLE, _elementType.SEATABLE_ROW, _elementType.CHART];
|
|
572
|
+
const CHART_PREVIEW_TYPE = exports.CHART_PREVIEW_TYPE = {
|
|
573
|
+
VIEW: 'view',
|
|
574
|
+
EDITOR: 'editor',
|
|
575
|
+
FULL_SCREEN: 'fullScreen'
|
|
576
|
+
};
|
|
@@ -13,6 +13,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
var _reactI18next = require("react-i18next");
|
|
14
14
|
var _seaChart = require("sea-chart");
|
|
15
15
|
var _context = _interopRequireDefault(require("../../../../../context"));
|
|
16
|
+
var _constants = require("../../../constants");
|
|
16
17
|
require("./index.css");
|
|
17
18
|
const ChartEditDialog = _ref => {
|
|
18
19
|
var _window, _window$app, _window$app$state, _window2, _window2$app, _window2$app$state;
|
|
@@ -50,6 +51,9 @@ const ChartEditDialog = _ref => {
|
|
|
50
51
|
collaborators: editor.collaborators || [],
|
|
51
52
|
departments: ((_window = window) === null || _window === void 0 ? void 0 : (_window$app = _window.app) === null || _window$app === void 0 ? void 0 : (_window$app$state = _window$app.state) === null || _window$app$state === void 0 ? void 0 : _window$app$state.departments) || [],
|
|
52
53
|
hideTypeToggle: true,
|
|
54
|
+
canvasStyle: {
|
|
55
|
+
previewType: _constants.CHART_PREVIEW_TYPE.EDITOR
|
|
56
|
+
},
|
|
53
57
|
onChange: onSettingChange
|
|
54
58
|
}), isFullScreen && /*#__PURE__*/_react.default.createElement(_seaChart.View, {
|
|
55
59
|
chart: statItemData,
|
|
@@ -57,7 +61,10 @@ const ChartEditDialog = _ref => {
|
|
|
57
61
|
config: _context.default.getSettings(),
|
|
58
62
|
tables: editor.tables,
|
|
59
63
|
collaborators: editor.collaborators || [],
|
|
60
|
-
departments: ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$app = _window2.app) === null || _window2$app === void 0 ? void 0 : (_window2$app$state = _window2$app.state) === null || _window2$app$state === void 0 ? void 0 : _window2$app$state.departments) || []
|
|
64
|
+
departments: ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$app = _window2.app) === null || _window2$app === void 0 ? void 0 : (_window2$app$state = _window2$app.state) === null || _window2$app$state === void 0 ? void 0 : _window2$app$state.departments) || [],
|
|
65
|
+
canvasStyle: {
|
|
66
|
+
previewType: _constants.CHART_PREVIEW_TYPE.FULL_SCREEN
|
|
67
|
+
}
|
|
61
68
|
})));
|
|
62
69
|
};
|
|
63
70
|
var _default = exports.default = (0, _reactI18next.withTranslation)('sdoc-editor')(ChartEditDialog);
|
|
@@ -17,6 +17,7 @@ var _chartEditDialog = _interopRequireDefault(require("./chart-edit-dialog"));
|
|
|
17
17
|
var _context = _interopRequireDefault(require("../../../../context"));
|
|
18
18
|
var _useScrollContext = require("../../../hooks/use-scroll-context");
|
|
19
19
|
var _helpers = require("./helpers");
|
|
20
|
+
var _constants = require("../../constants");
|
|
20
21
|
require("./render-elem.css");
|
|
21
22
|
const Chart = _ref => {
|
|
22
23
|
var _window, _window$app, _window2, _window2$app, _window2$app$state;
|
|
@@ -115,7 +116,10 @@ const Chart = _ref => {
|
|
|
115
116
|
config: _context.default.getSettings(),
|
|
116
117
|
tables: editor.tables,
|
|
117
118
|
collaborators: editor.collaborators || [],
|
|
118
|
-
departments: ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$app = _window2.app) === null || _window2$app === void 0 ? void 0 : (_window2$app$state = _window2$app.state) === null || _window2$app$state === void 0 ? void 0 : _window2$app$state.departments) || []
|
|
119
|
+
departments: ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$app = _window2.app) === null || _window2$app === void 0 ? void 0 : (_window2$app$state = _window2$app.state) === null || _window2$app$state === void 0 ? void 0 : _window2$app$state.departments) || [],
|
|
120
|
+
canvasStyle: {
|
|
121
|
+
previewType: _constants.CHART_PREVIEW_TYPE.VIEW
|
|
122
|
+
}
|
|
119
123
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
120
124
|
className: "sdoc-chart-view-rect sdoc-chart-view-rect-lt"
|
|
121
125
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a sdoc editor",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"remark-parse": "11.0.0",
|
|
39
39
|
"remark-rehype": "11.0.0",
|
|
40
40
|
"remark-stringify": "11.0.0",
|
|
41
|
-
"sea-chart": "2.0.
|
|
41
|
+
"sea-chart": "2.0.8",
|
|
42
42
|
"slugid": "3.2.0",
|
|
43
43
|
"socket.io-client": "4.8.1",
|
|
44
44
|
"type-of": "2.0.1",
|