@fileverse-dev/fortune-react 1.2.21 → 1.2.22-patch-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.
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import WorkbookContext from "../../context";
|
|
5
6
|
var NotationBoxes = function NotationBoxes() {
|
|
6
7
|
var _a;
|
|
@@ -31,13 +32,29 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
}, [flowdata, setContext]);
|
|
35
|
+
var handleMouseDownEvent = function handleMouseDownEvent(r, c, rc, commentId) {
|
|
36
|
+
return function (e) {
|
|
37
|
+
var nativeEvent = e.nativeEvent;
|
|
38
|
+
setContext(function (draftContext) {
|
|
39
|
+
if (flowdata) {
|
|
40
|
+
setEditingComment(draftContext, flowdata, r, c);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
onCommentBoxMoveStart(context, refs.globalCache, nativeEvent, {
|
|
44
|
+
r: r,
|
|
45
|
+
c: c,
|
|
46
|
+
rc: rc
|
|
47
|
+
}, commentId);
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
};
|
|
50
|
+
};
|
|
34
51
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
52
|
id: "luckysheet-postil-showBoxs"
|
|
36
53
|
}, _.concat((_a = context.commentBoxes) === null || _a === void 0 ? void 0 : _a.filter(function (v) {
|
|
37
54
|
var _a;
|
|
38
55
|
return (v === null || v === void 0 ? void 0 : v.rc) !== ((_a = context.editingCommentBox) === null || _a === void 0 ? void 0 : _a.rc);
|
|
39
56
|
}), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox, index) {
|
|
40
|
-
var _a
|
|
57
|
+
var _a;
|
|
41
58
|
if (!commentBox) return null;
|
|
42
59
|
var r = commentBox.r,
|
|
43
60
|
c = commentBox.c,
|
|
@@ -90,7 +107,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
90
107
|
height: "100%",
|
|
91
108
|
overflow: "hidden"
|
|
92
109
|
}
|
|
93
|
-
},
|
|
110
|
+
}, "shdsdhsjdhjshdjshdjshdjshjdshdjh", /*#__PURE__*/React.createElement(TextAreaFieldV2, null))));
|
|
94
111
|
}));
|
|
95
112
|
};
|
|
96
113
|
export default NotationBoxes;
|
|
@@ -1654,6 +1654,13 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1654
1654
|
}));
|
|
1655
1655
|
});
|
|
1656
1656
|
}
|
|
1657
|
+
if (name === "currency") {
|
|
1658
|
+
return /*#__PURE__*/React.createElement(CurrencySelector, {
|
|
1659
|
+
cell: cell,
|
|
1660
|
+
defaultTextFormat: defaultFormat[0].text,
|
|
1661
|
+
toolTipText: toolbar["currency-format"]
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1657
1664
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
1658
1665
|
text: tooltip,
|
|
1659
1666
|
placement: "bottom"
|
|
@@ -8,6 +8,7 @@ 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");
|
|
11
12
|
var _context = _interopRequireDefault(require("../../context"));
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
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); }
|
|
@@ -40,13 +41,29 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
}, [flowdata, setContext]);
|
|
44
|
+
var handleMouseDownEvent = function handleMouseDownEvent(r, c, rc, commentId) {
|
|
45
|
+
return function (e) {
|
|
46
|
+
var nativeEvent = e.nativeEvent;
|
|
47
|
+
setContext(function (draftContext) {
|
|
48
|
+
if (flowdata) {
|
|
49
|
+
(0, _fortuneCore.setEditingComment)(draftContext, flowdata, r, c);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
(0, _fortuneCore.onCommentBoxMoveStart)(context, refs.globalCache, nativeEvent, {
|
|
53
|
+
r: r,
|
|
54
|
+
c: c,
|
|
55
|
+
rc: rc
|
|
56
|
+
}, commentId);
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
};
|
|
59
|
+
};
|
|
43
60
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
61
|
id: "luckysheet-postil-showBoxs"
|
|
45
62
|
}, _lodash.default.concat((_a = context.commentBoxes) === null || _a === void 0 ? void 0 : _a.filter(function (v) {
|
|
46
63
|
var _a;
|
|
47
64
|
return (v === null || v === void 0 ? void 0 : v.rc) !== ((_a = context.editingCommentBox) === null || _a === void 0 ? void 0 : _a.rc);
|
|
48
65
|
}), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox, index) {
|
|
49
|
-
var _a
|
|
66
|
+
var _a;
|
|
50
67
|
if (!commentBox) return null;
|
|
51
68
|
var r = commentBox.r,
|
|
52
69
|
c = commentBox.c,
|
|
@@ -99,7 +116,7 @@ var NotationBoxes = function NotationBoxes() {
|
|
|
99
116
|
height: "100%",
|
|
100
117
|
overflow: "hidden"
|
|
101
118
|
}
|
|
102
|
-
},
|
|
119
|
+
}, "shdsdhsjdhjshdjshdjshdjshjdshdjh", /*#__PURE__*/_react.default.createElement(_ui.TextAreaFieldV2, null))));
|
|
103
120
|
}));
|
|
104
121
|
};
|
|
105
122
|
var _default = exports.default = NotationBoxes;
|
|
@@ -1663,6 +1663,13 @@ var Toolbar = function Toolbar(_a) {
|
|
|
1663
1663
|
}));
|
|
1664
1664
|
});
|
|
1665
1665
|
}
|
|
1666
|
+
if (name === "currency") {
|
|
1667
|
+
return /*#__PURE__*/_react.default.createElement(CurrencySelector, {
|
|
1668
|
+
cell: cell,
|
|
1669
|
+
defaultTextFormat: defaultFormat[0].text,
|
|
1670
|
+
toolTipText: toolbar["currency-format"]
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1666
1673
|
return /*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
1667
1674
|
text: tooltip,
|
|
1668
1675
|
placement: "bottom"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.22-patch-1",
|
|
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.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.2.22-patch-1",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-40",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|