@fileverse-dev/fortune-react 1.2.22-patch-1 → 1.2.22-patch-3
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from "react";
|
|
2
2
|
import { getFlowdata, onCommentBoxMoveStart, setEditingComment, showComments } from "@fileverse-dev/fortune-core";
|
|
3
3
|
import _ from "lodash";
|
|
4
|
-
import { TextAreaFieldV2 } from "@fileverse/ui";
|
|
5
4
|
import WorkbookContext from "../../context";
|
|
6
5
|
var NotationBoxes = function NotationBoxes() {
|
|
7
6
|
var _a;
|
|
@@ -54,7 +53,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
54
53
|
var _a;
|
|
55
54
|
return (v === null || v === void 0 ? void 0 : v.rc) !== ((_a = context.editingCommentBox) === null || _a === void 0 ? void 0 : _a.rc);
|
|
56
55
|
}), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox, index) {
|
|
57
|
-
var _a;
|
|
56
|
+
var _a, _b;
|
|
58
57
|
if (!commentBox) return null;
|
|
59
58
|
var r = commentBox.r,
|
|
60
59
|
c = commentBox.c,
|
|
@@ -88,17 +87,6 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
88
87
|
boxShadow: "0 1px 1px #0000002e,0 4px 8px #0000001a"
|
|
89
88
|
},
|
|
90
89
|
onMouseDown: function onMouseDown(e) {
|
|
91
|
-
var nativeEvent = e.nativeEvent;
|
|
92
|
-
setContext(function (draftContext) {
|
|
93
|
-
if (flowdata) {
|
|
94
|
-
setEditingComment(draftContext, flowdata, r, c);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
onCommentBoxMoveStart(context, refs.globalCache, nativeEvent, {
|
|
98
|
-
r: r,
|
|
99
|
-
c: c,
|
|
100
|
-
rc: rc
|
|
101
|
-
}, commentId);
|
|
102
90
|
e.stopPropagation();
|
|
103
91
|
}
|
|
104
92
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -107,7 +95,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
107
95
|
height: "100%",
|
|
108
96
|
overflow: "hidden"
|
|
109
97
|
}
|
|
110
|
-
},
|
|
98
|
+
}, (_b = settings.getCommentCellUI) === null || _b === void 0 ? void 0 : _b.call(settings, r, c, handleMouseDownEvent(r, c, rc, commentId)))));
|
|
111
99
|
}));
|
|
112
100
|
};
|
|
113
101
|
export default NotationBoxes;
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
10
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
|
-
var _ui = require("@fileverse/ui");
|
|
12
11
|
var _context = _interopRequireDefault(require("../../context"));
|
|
13
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -63,7 +62,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
63
62
|
var _a;
|
|
64
63
|
return (v === null || v === void 0 ? void 0 : v.rc) !== ((_a = context.editingCommentBox) === null || _a === void 0 ? void 0 : _a.rc);
|
|
65
64
|
}), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox, index) {
|
|
66
|
-
var _a;
|
|
65
|
+
var _a, _b;
|
|
67
66
|
if (!commentBox) return null;
|
|
68
67
|
var r = commentBox.r,
|
|
69
68
|
c = commentBox.c,
|
|
@@ -97,17 +96,6 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
97
96
|
boxShadow: "0 1px 1px #0000002e,0 4px 8px #0000001a"
|
|
98
97
|
},
|
|
99
98
|
onMouseDown: function onMouseDown(e) {
|
|
100
|
-
var nativeEvent = e.nativeEvent;
|
|
101
|
-
setContext(function (draftContext) {
|
|
102
|
-
if (flowdata) {
|
|
103
|
-
(0, _fortuneCore.setEditingComment)(draftContext, flowdata, r, c);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
(0, _fortuneCore.onCommentBoxMoveStart)(context, refs.globalCache, nativeEvent, {
|
|
107
|
-
r: r,
|
|
108
|
-
c: c,
|
|
109
|
-
rc: rc
|
|
110
|
-
}, commentId);
|
|
111
99
|
e.stopPropagation();
|
|
112
100
|
}
|
|
113
101
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -116,7 +104,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
116
104
|
height: "100%",
|
|
117
105
|
overflow: "hidden"
|
|
118
106
|
}
|
|
119
|
-
},
|
|
107
|
+
}, (_b = settings.getCommentCellUI) === null || _b === void 0 ? void 0 : _b.call(settings, r, c, handleMouseDownEvent(r, c, rc, commentId)))));
|
|
120
108
|
}));
|
|
121
109
|
};
|
|
122
110
|
var _default = exports.default = NotationBoxes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.2.22-patch-
|
|
3
|
+
"version": "1.2.22-patch-3",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.2.22-patch-
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.2.22-patch-3",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-40",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|