@leankylin-sheet/react 3.1.15 → 3.1.17

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.
package/dist/index.css CHANGED
@@ -578,7 +578,7 @@ html::-webkit-scrollbar-button {
578
578
  cursor: grab;
579
579
  z-index: 20;
580
580
  }
581
- .leankylin-cols-freeze-handle-disabled{
581
+ .leankylin-cols-freeze-handle-disabled {
582
582
  cursor: no-drop;
583
583
  }
584
584
 
@@ -591,7 +591,7 @@ html::-webkit-scrollbar-button {
591
591
  cursor: grab;
592
592
  z-index: 20;
593
593
  }
594
- .leankylin-rows-freeze-handle-disabled{
594
+ .leankylin-rows-freeze-handle-disabled {
595
595
  cursor: no-drop;
596
596
  }
597
597
 
@@ -601,7 +601,12 @@ html::-webkit-scrollbar-button {
601
601
  z-index: 15;
602
602
  cursor: ew-resize;
603
603
  }
604
-
604
+ .luckysheet-postil-show-main {
605
+ cursor: grab;
606
+ }
607
+ .luckysheet-postil-show-main:active {
608
+ cursor: grabbing;
609
+ }
605
610
  /*批注聚焦框 移动 改变大小*/
606
611
  .luckysheet-postil-dialog-move {
607
612
  position: absolute;
@@ -623,14 +628,14 @@ html::-webkit-scrollbar-button {
623
628
 
624
629
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-t {
625
630
  width: 100%;
626
- height: 3px;
631
+ height: 10px;
627
632
  /* border-bottom: 1px solid #000; */
628
633
  left: 0;
629
634
  top: -4px;
630
635
  }
631
636
 
632
637
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-r {
633
- width: 3px;
638
+ width: 10px;
634
639
  height: 100%;
635
640
  /* border-left: 1px solid #000; */
636
641
  right: -4px;
@@ -639,14 +644,14 @@ html::-webkit-scrollbar-button {
639
644
 
640
645
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-b {
641
646
  width: 100%;
642
- height: 3px;
647
+ height: 10px;
643
648
  /* border-top: 1px solid #000; */
644
649
  left: 0;
645
650
  bottom: -4px;
646
651
  }
647
652
 
648
653
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-l {
649
- width: 3px;
654
+ width: 10px;
650
655
  height: 100%;
651
656
  /* border-right: 1px solid #000; */
652
657
  left: -4px;
@@ -672,10 +677,12 @@ html::-webkit-scrollbar-button {
672
677
 
673
678
  .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item {
674
679
  position: absolute;
675
- height: 6px;
676
- width: 6px;
677
- border: 1px solid #0188fb;
680
+ height: 10px;
681
+ width: 10px;
678
682
  pointer-events: all;
683
+ background-color: #3b82f4;
684
+ border: 2px solid #fff;
685
+ border-radius: 50%;
679
686
  }
680
687
 
681
688
  .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item-lt {
@@ -578,7 +578,7 @@ html::-webkit-scrollbar-button {
578
578
  cursor: grab;
579
579
  z-index: 20;
580
580
  }
581
- .leankylin-cols-freeze-handle-disabled{
581
+ .leankylin-cols-freeze-handle-disabled {
582
582
  cursor: no-drop;
583
583
  }
584
584
 
@@ -591,7 +591,7 @@ html::-webkit-scrollbar-button {
591
591
  cursor: grab;
592
592
  z-index: 20;
593
593
  }
594
- .leankylin-rows-freeze-handle-disabled{
594
+ .leankylin-rows-freeze-handle-disabled {
595
595
  cursor: no-drop;
596
596
  }
597
597
 
@@ -601,7 +601,12 @@ html::-webkit-scrollbar-button {
601
601
  z-index: 15;
602
602
  cursor: ew-resize;
603
603
  }
604
-
604
+ .luckysheet-postil-show-main {
605
+ cursor: grab;
606
+ }
607
+ .luckysheet-postil-show-main:active {
608
+ cursor: grabbing;
609
+ }
605
610
  /*批注聚焦框 移动 改变大小*/
606
611
  .luckysheet-postil-dialog-move {
607
612
  position: absolute;
@@ -623,14 +628,14 @@ html::-webkit-scrollbar-button {
623
628
 
624
629
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-t {
625
630
  width: 100%;
626
- height: 3px;
631
+ height: 10px;
627
632
  /* border-bottom: 1px solid #000; */
628
633
  left: 0;
629
634
  top: -4px;
630
635
  }
631
636
 
632
637
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-r {
633
- width: 3px;
638
+ width: 10px;
634
639
  height: 100%;
635
640
  /* border-left: 1px solid #000; */
636
641
  right: -4px;
@@ -639,14 +644,14 @@ html::-webkit-scrollbar-button {
639
644
 
640
645
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-b {
641
646
  width: 100%;
642
- height: 3px;
647
+ height: 10px;
643
648
  /* border-top: 1px solid #000; */
644
649
  left: 0;
645
650
  bottom: -4px;
646
651
  }
647
652
 
648
653
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-l {
649
- width: 3px;
654
+ width: 10px;
650
655
  height: 100%;
651
656
  /* border-right: 1px solid #000; */
652
657
  left: -4px;
@@ -672,10 +677,12 @@ html::-webkit-scrollbar-button {
672
677
 
673
678
  .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item {
674
679
  position: absolute;
675
- height: 6px;
676
- width: 6px;
677
- border: 1px solid #0188fb;
680
+ height: 10px;
681
+ width: 10px;
678
682
  pointer-events: all;
683
+ background-color: #3b82f4;
684
+ border: 2px solid #fff;
685
+ border-radius: 50%;
679
686
  }
680
687
 
681
688
  .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item-lt {
package/dist/index.esm.js CHANGED
@@ -2090,7 +2090,7 @@ var NotationBoxes = function NotationBoxes() {
2090
2090
  var _context$editingComme;
2091
2091
  return (v === null || v === void 0 ? void 0 : v.rc) !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
2092
2092
  }), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox) {
2093
- var _context$editingComme2;
2093
+ var _context$editingComme2, _context$hooks$commen, _context$hooks;
2094
2094
  if (!commentBox) return null;
2095
2095
  var r = commentBox.r,
2096
2096
  c = commentBox.c,
@@ -2131,7 +2131,7 @@ var NotationBoxes = function NotationBoxes() {
2131
2131
  x1: size.fromX,
2132
2132
  y1: size.fromY,
2133
2133
  x2: size.toX,
2134
- y2: size.toY,
2134
+ y2: size.toY + 4,
2135
2135
  stroke: "#333",
2136
2136
  strokeWidth: "1",
2137
2137
  markerEnd: "url(#arrowhead)"
@@ -2141,9 +2141,9 @@ var NotationBoxes = function NotationBoxes() {
2141
2141
  style: {
2142
2142
  width: width,
2143
2143
  height: height,
2144
- color: "#000",
2145
2144
  padding: 5,
2146
- border: "1px solid #000",
2145
+ border: 0,
2146
+ boxShadow: "rgba(0, 0, 0, 0.3) 0px 0px 8px",
2147
2147
  backgroundColor: "rgb(255,255,225)",
2148
2148
  position: "absolute",
2149
2149
  left: left,
@@ -2165,15 +2165,7 @@ var NotationBoxes = function NotationBoxes() {
2165
2165
  }, commentId);
2166
2166
  e.stopPropagation();
2167
2167
  }
2168
- }, /*#__PURE__*/React.createElement("div", {
2169
- className: "luckysheet-postil-dialog-move"
2170
- }, ["t", "r", "b", "l"].map(function (v) {
2171
- return /*#__PURE__*/React.createElement("div", {
2172
- key: v,
2173
- className: "luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-".concat(v),
2174
- "data-type": v
2175
- });
2176
- })), isEditing && ( /*#__PURE__*/React.createElement("div", {
2168
+ }, isEditing && ( /*#__PURE__*/React.createElement("div", {
2177
2169
  className: "luckysheet-postil-dialog-resize"
2178
2170
  }, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (v) {
2179
2171
  return /*#__PURE__*/React.createElement("div", {
@@ -2196,17 +2188,16 @@ var NotationBoxes = function NotationBoxes() {
2196
2188
  height: "100%",
2197
2189
  overflow: "hidden"
2198
2190
  }
2199
- }, /*#__PURE__*/React.createElement(ContentEditable, {
2191
+ }, (_context$hooks$commen = (_context$hooks = context.hooks).commentsPreRender) === null || _context$hooks$commen === void 0 ? void 0 : _context$hooks$commen.call(_context$hooks, r, c), /*#__PURE__*/React.createElement(ContentEditable, {
2200
2192
  id: "comment-editor-".concat(rc),
2201
2193
  autoFocus: autoFocus,
2202
2194
  style: {
2203
2195
  width: "100%",
2204
- height: "100%",
2205
2196
  lineHeight: "20px",
2206
2197
  boxSizing: "border-box",
2207
- textAlign: "center",
2208
2198
  wordBreak: "break-all",
2209
- outline: "none"
2199
+ outline: "none",
2200
+ cursor: "auto"
2210
2201
  },
2211
2202
  allowEdit: context.allowEdit,
2212
2203
  spellCheck: false,
@@ -7406,24 +7397,35 @@ var ContextMenu = function ContextMenu() {
7406
7397
  });
7407
7398
  }
7408
7399
  if (name === "insert-comment") {
7409
- var _flowdata$row_index, _flowdata$row_index$c;
7400
+ var _flowdata$row_index, _flowdata$row_index$c, _flowdata$row_index$c2;
7410
7401
  var flowdata = getFlowdata(context);
7411
7402
  var row_index = selection === null || selection === void 0 ? void 0 : selection.row[0];
7412
7403
  var col_index = selection === null || selection === void 0 ? void 0 : selection.column[0];
7413
- var hasPs = (flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : (_flowdata$row_index$c = _flowdata$row_index[col_index]) === null || _flowdata$row_index$c === void 0 ? void 0 : _flowdata$row_index$c.ps) != null;
7414
- var itemData = hasPs ? [{
7415
- text: "编辑批注",
7416
- onClick: editComment
7404
+ var hasPsValue = !!(flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : (_flowdata$row_index$c = _flowdata$row_index[col_index]) === null || _flowdata$row_index$c === void 0 ? void 0 : (_flowdata$row_index$c2 = _flowdata$row_index$c.ps) === null || _flowdata$row_index$c2 === void 0 ? void 0 : _flowdata$row_index$c2.value);
7405
+ var canAddPs = !hasPsValue;
7406
+ var canEditPs = hasPsValue;
7407
+ var canDeletePs = hasPsValue;
7408
+ var canShowHidePs = hasPsValue;
7409
+ var itemData = [{
7410
+ text: "新建说明",
7411
+ onClick: newComment,
7412
+ show: canAddPs
7417
7413
  }, {
7418
- text: "删除批注",
7419
- onClick: deleteComment
7414
+ text: "编辑说明",
7415
+ onClick: editComment,
7416
+ show: canEditPs
7420
7417
  }, {
7421
- text: "显示/隐藏批注",
7422
- onClick: showHideComment
7423
- }] : [{
7424
- text: "新建批注",
7425
- onClick: newComment
7426
- }];
7418
+ text: "删除说明",
7419
+ onClick: deleteComment,
7420
+ show: canDeletePs
7421
+ }, {
7422
+ text: "显示/隐藏说明",
7423
+ onClick: showHideComment,
7424
+ show: canShowHidePs
7425
+ }].filter(function (item) {
7426
+ var _context$hooks2, _context$hooks3;
7427
+ return ((_context$hooks2 = context.hooks) === null || _context$hooks2 === void 0 ? void 0 : _context$hooks2.showCommentsMenu) ? (_context$hooks3 = context.hooks) === null || _context$hooks3 === void 0 ? void 0 : _context$hooks3.showCommentsMenu(item) : item.show;
7428
+ });
7427
7429
  return itemData.map(function (item) {
7428
7430
  return /*#__PURE__*/React.createElement(Menu, {
7429
7431
  key: item.text,
package/dist/index.js CHANGED
@@ -2100,7 +2100,7 @@ var NotationBoxes = function NotationBoxes() {
2100
2100
  var _context$editingComme;
2101
2101
  return (v === null || v === void 0 ? void 0 : v.rc) !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
2102
2102
  }), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox) {
2103
- var _context$editingComme2;
2103
+ var _context$editingComme2, _context$hooks$commen, _context$hooks;
2104
2104
  if (!commentBox) return null;
2105
2105
  var r = commentBox.r,
2106
2106
  c = commentBox.c,
@@ -2141,7 +2141,7 @@ var NotationBoxes = function NotationBoxes() {
2141
2141
  x1: size.fromX,
2142
2142
  y1: size.fromY,
2143
2143
  x2: size.toX,
2144
- y2: size.toY,
2144
+ y2: size.toY + 4,
2145
2145
  stroke: "#333",
2146
2146
  strokeWidth: "1",
2147
2147
  markerEnd: "url(#arrowhead)"
@@ -2151,9 +2151,9 @@ var NotationBoxes = function NotationBoxes() {
2151
2151
  style: {
2152
2152
  width: width,
2153
2153
  height: height,
2154
- color: "#000",
2155
2154
  padding: 5,
2156
- border: "1px solid #000",
2155
+ border: 0,
2156
+ boxShadow: "rgba(0, 0, 0, 0.3) 0px 0px 8px",
2157
2157
  backgroundColor: "rgb(255,255,225)",
2158
2158
  position: "absolute",
2159
2159
  left: left,
@@ -2175,15 +2175,7 @@ var NotationBoxes = function NotationBoxes() {
2175
2175
  }, commentId);
2176
2176
  e.stopPropagation();
2177
2177
  }
2178
- }, /*#__PURE__*/React__default['default'].createElement("div", {
2179
- className: "luckysheet-postil-dialog-move"
2180
- }, ["t", "r", "b", "l"].map(function (v) {
2181
- return /*#__PURE__*/React__default['default'].createElement("div", {
2182
- key: v,
2183
- className: "luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-".concat(v),
2184
- "data-type": v
2185
- });
2186
- })), isEditing && ( /*#__PURE__*/React__default['default'].createElement("div", {
2178
+ }, isEditing && ( /*#__PURE__*/React__default['default'].createElement("div", {
2187
2179
  className: "luckysheet-postil-dialog-resize"
2188
2180
  }, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (v) {
2189
2181
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -2206,17 +2198,16 @@ var NotationBoxes = function NotationBoxes() {
2206
2198
  height: "100%",
2207
2199
  overflow: "hidden"
2208
2200
  }
2209
- }, /*#__PURE__*/React__default['default'].createElement(ContentEditable, {
2201
+ }, (_context$hooks$commen = (_context$hooks = context.hooks).commentsPreRender) === null || _context$hooks$commen === void 0 ? void 0 : _context$hooks$commen.call(_context$hooks, r, c), /*#__PURE__*/React__default['default'].createElement(ContentEditable, {
2210
2202
  id: "comment-editor-".concat(rc),
2211
2203
  autoFocus: autoFocus,
2212
2204
  style: {
2213
2205
  width: "100%",
2214
- height: "100%",
2215
2206
  lineHeight: "20px",
2216
2207
  boxSizing: "border-box",
2217
- textAlign: "center",
2218
2208
  wordBreak: "break-all",
2219
- outline: "none"
2209
+ outline: "none",
2210
+ cursor: "auto"
2220
2211
  },
2221
2212
  allowEdit: context.allowEdit,
2222
2213
  spellCheck: false,
@@ -7416,24 +7407,35 @@ var ContextMenu = function ContextMenu() {
7416
7407
  });
7417
7408
  }
7418
7409
  if (name === "insert-comment") {
7419
- var _flowdata$row_index, _flowdata$row_index$c;
7410
+ var _flowdata$row_index, _flowdata$row_index$c, _flowdata$row_index$c2;
7420
7411
  var flowdata = core.getFlowdata(context);
7421
7412
  var row_index = selection === null || selection === void 0 ? void 0 : selection.row[0];
7422
7413
  var col_index = selection === null || selection === void 0 ? void 0 : selection.column[0];
7423
- var hasPs = (flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : (_flowdata$row_index$c = _flowdata$row_index[col_index]) === null || _flowdata$row_index$c === void 0 ? void 0 : _flowdata$row_index$c.ps) != null;
7424
- var itemData = hasPs ? [{
7425
- text: "编辑批注",
7426
- onClick: core.editComment
7414
+ var hasPsValue = !!(flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : (_flowdata$row_index$c = _flowdata$row_index[col_index]) === null || _flowdata$row_index$c === void 0 ? void 0 : (_flowdata$row_index$c2 = _flowdata$row_index$c.ps) === null || _flowdata$row_index$c2 === void 0 ? void 0 : _flowdata$row_index$c2.value);
7415
+ var canAddPs = !hasPsValue;
7416
+ var canEditPs = hasPsValue;
7417
+ var canDeletePs = hasPsValue;
7418
+ var canShowHidePs = hasPsValue;
7419
+ var itemData = [{
7420
+ text: "新建说明",
7421
+ onClick: core.newComment,
7422
+ show: canAddPs
7427
7423
  }, {
7428
- text: "删除批注",
7429
- onClick: core.deleteComment
7424
+ text: "编辑说明",
7425
+ onClick: core.editComment,
7426
+ show: canEditPs
7430
7427
  }, {
7431
- text: "显示/隐藏批注",
7432
- onClick: core.showHideComment
7433
- }] : [{
7434
- text: "新建批注",
7435
- onClick: core.newComment
7436
- }];
7428
+ text: "删除说明",
7429
+ onClick: core.deleteComment,
7430
+ show: canDeletePs
7431
+ }, {
7432
+ text: "显示/隐藏说明",
7433
+ onClick: core.showHideComment,
7434
+ show: canShowHidePs
7435
+ }].filter(function (item) {
7436
+ var _context$hooks2, _context$hooks3;
7437
+ return ((_context$hooks2 = context.hooks) === null || _context$hooks2 === void 0 ? void 0 : _context$hooks2.showCommentsMenu) ? (_context$hooks3 = context.hooks) === null || _context$hooks3 === void 0 ? void 0 : _context$hooks3.showCommentsMenu(item) : item.show;
7438
+ });
7437
7439
  return itemData.map(function (item) {
7438
7440
  return /*#__PURE__*/React__default['default'].createElement(Menu, {
7439
7441
  key: item.text,
@@ -578,7 +578,7 @@ html::-webkit-scrollbar-button {
578
578
  cursor: grab;
579
579
  z-index: 20;
580
580
  }
581
- .leankylin-cols-freeze-handle-disabled{
581
+ .leankylin-cols-freeze-handle-disabled {
582
582
  cursor: no-drop;
583
583
  }
584
584
 
@@ -591,7 +591,7 @@ html::-webkit-scrollbar-button {
591
591
  cursor: grab;
592
592
  z-index: 20;
593
593
  }
594
- .leankylin-rows-freeze-handle-disabled{
594
+ .leankylin-rows-freeze-handle-disabled {
595
595
  cursor: no-drop;
596
596
  }
597
597
 
@@ -601,7 +601,12 @@ html::-webkit-scrollbar-button {
601
601
  z-index: 15;
602
602
  cursor: ew-resize;
603
603
  }
604
-
604
+ .luckysheet-postil-show-main {
605
+ cursor: grab;
606
+ }
607
+ .luckysheet-postil-show-main:active {
608
+ cursor: grabbing;
609
+ }
605
610
  /*批注聚焦框 移动 改变大小*/
606
611
  .luckysheet-postil-dialog-move {
607
612
  position: absolute;
@@ -623,14 +628,14 @@ html::-webkit-scrollbar-button {
623
628
 
624
629
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-t {
625
630
  width: 100%;
626
- height: 3px;
631
+ height: 10px;
627
632
  /* border-bottom: 1px solid #000; */
628
633
  left: 0;
629
634
  top: -4px;
630
635
  }
631
636
 
632
637
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-r {
633
- width: 3px;
638
+ width: 10px;
634
639
  height: 100%;
635
640
  /* border-left: 1px solid #000; */
636
641
  right: -4px;
@@ -639,14 +644,14 @@ html::-webkit-scrollbar-button {
639
644
 
640
645
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-b {
641
646
  width: 100%;
642
- height: 3px;
647
+ height: 10px;
643
648
  /* border-top: 1px solid #000; */
644
649
  left: 0;
645
650
  bottom: -4px;
646
651
  }
647
652
 
648
653
  .luckysheet-postil-dialog-move .luckysheet-postil-dialog-move-item-l {
649
- width: 3px;
654
+ width: 10px;
650
655
  height: 100%;
651
656
  /* border-right: 1px solid #000; */
652
657
  left: -4px;
@@ -672,10 +677,12 @@ html::-webkit-scrollbar-button {
672
677
 
673
678
  .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item {
674
679
  position: absolute;
675
- height: 6px;
676
- width: 6px;
677
- border: 1px solid #0188fb;
680
+ height: 10px;
681
+ width: 10px;
678
682
  pointer-events: all;
683
+ background-color: #3b82f4;
684
+ border: 2px solid #fff;
685
+ border-radius: 50%;
679
686
  }
680
687
 
681
688
  .luckysheet-postil-dialog-resize .luckysheet-postil-dialog-resize-item-lt {
package/dist/index.umd.js CHANGED
@@ -105136,7 +105136,7 @@
105136
105136
  var _context$editingComme;
105137
105137
  return (v === null || v === void 0 ? void 0 : v.rc) !== ((_context$editingComme = context.editingCommentBox) === null || _context$editingComme === void 0 ? void 0 : _context$editingComme.rc);
105138
105138
  }), [context.editingCommentBox, context.hoveredCommentBox]).map(function (commentBox) {
105139
- var _context$editingComme2;
105139
+ var _context$editingComme2, _context$hooks$commen, _context$hooks;
105140
105140
  if (!commentBox) return null;
105141
105141
  var r = commentBox.r,
105142
105142
  c = commentBox.c,
@@ -105177,7 +105177,7 @@
105177
105177
  x1: size.fromX,
105178
105178
  y1: size.fromY,
105179
105179
  x2: size.toX,
105180
- y2: size.toY,
105180
+ y2: size.toY + 4,
105181
105181
  stroke: "#333",
105182
105182
  strokeWidth: "1",
105183
105183
  markerEnd: "url(#arrowhead)"
@@ -105187,9 +105187,9 @@
105187
105187
  style: {
105188
105188
  width: width,
105189
105189
  height: height,
105190
- color: "#000",
105191
105190
  padding: 5,
105192
- border: "1px solid #000",
105191
+ border: 0,
105192
+ boxShadow: "rgba(0, 0, 0, 0.3) 0px 0px 8px",
105193
105193
  backgroundColor: "rgb(255,255,225)",
105194
105194
  position: "absolute",
105195
105195
  left: left,
@@ -105211,15 +105211,7 @@
105211
105211
  }, commentId);
105212
105212
  e.stopPropagation();
105213
105213
  }
105214
- }, /*#__PURE__*/React__default['default'].createElement("div", {
105215
- className: "luckysheet-postil-dialog-move"
105216
- }, ["t", "r", "b", "l"].map(function (v) {
105217
- return /*#__PURE__*/React__default['default'].createElement("div", {
105218
- key: v,
105219
- className: "luckysheet-postil-dialog-move-item luckysheet-postil-dialog-move-item-".concat(v),
105220
- "data-type": v
105221
- });
105222
- })), isEditing && ( /*#__PURE__*/React__default['default'].createElement("div", {
105214
+ }, isEditing && ( /*#__PURE__*/React__default['default'].createElement("div", {
105223
105215
  className: "luckysheet-postil-dialog-resize"
105224
105216
  }, ["lt", "mt", "lm", "rm", "rt", "lb", "mb", "rb"].map(function (v) {
105225
105217
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -105242,17 +105234,16 @@
105242
105234
  height: "100%",
105243
105235
  overflow: "hidden"
105244
105236
  }
105245
- }, /*#__PURE__*/React__default['default'].createElement(ContentEditable, {
105237
+ }, (_context$hooks$commen = (_context$hooks = context.hooks).commentsPreRender) === null || _context$hooks$commen === void 0 ? void 0 : _context$hooks$commen.call(_context$hooks, r, c), /*#__PURE__*/React__default['default'].createElement(ContentEditable, {
105246
105238
  id: "comment-editor-".concat(rc),
105247
105239
  autoFocus: autoFocus,
105248
105240
  style: {
105249
105241
  width: "100%",
105250
- height: "100%",
105251
105242
  lineHeight: "20px",
105252
105243
  boxSizing: "border-box",
105253
- textAlign: "center",
105254
105244
  wordBreak: "break-all",
105255
- outline: "none"
105245
+ outline: "none",
105246
+ cursor: "auto"
105256
105247
  },
105257
105248
  allowEdit: context.allowEdit,
105258
105249
  spellCheck: false,
@@ -110452,24 +110443,35 @@
110452
110443
  });
110453
110444
  }
110454
110445
  if (name === "insert-comment") {
110455
- var _flowdata$row_index, _flowdata$row_index$c;
110446
+ var _flowdata$row_index, _flowdata$row_index$c, _flowdata$row_index$c2;
110456
110447
  var flowdata = getFlowdata(context);
110457
110448
  var row_index = selection === null || selection === void 0 ? void 0 : selection.row[0];
110458
110449
  var col_index = selection === null || selection === void 0 ? void 0 : selection.column[0];
110459
- var hasPs = (flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : (_flowdata$row_index$c = _flowdata$row_index[col_index]) === null || _flowdata$row_index$c === void 0 ? void 0 : _flowdata$row_index$c.ps) != null;
110460
- var itemData = hasPs ? [{
110461
- text: "编辑批注",
110462
- onClick: editComment
110450
+ var hasPsValue = !!(flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$row_index = flowdata[row_index]) === null || _flowdata$row_index === void 0 ? void 0 : (_flowdata$row_index$c = _flowdata$row_index[col_index]) === null || _flowdata$row_index$c === void 0 ? void 0 : (_flowdata$row_index$c2 = _flowdata$row_index$c.ps) === null || _flowdata$row_index$c2 === void 0 ? void 0 : _flowdata$row_index$c2.value);
110451
+ var canAddPs = !hasPsValue;
110452
+ var canEditPs = hasPsValue;
110453
+ var canDeletePs = hasPsValue;
110454
+ var canShowHidePs = hasPsValue;
110455
+ var itemData = [{
110456
+ text: "新建说明",
110457
+ onClick: newComment,
110458
+ show: canAddPs
110463
110459
  }, {
110464
- text: "删除批注",
110465
- onClick: deleteComment
110460
+ text: "编辑说明",
110461
+ onClick: editComment,
110462
+ show: canEditPs
110466
110463
  }, {
110467
- text: "显示/隐藏批注",
110468
- onClick: showHideComment
110469
- }] : [{
110470
- text: "新建批注",
110471
- onClick: newComment
110472
- }];
110464
+ text: "删除说明",
110465
+ onClick: deleteComment,
110466
+ show: canDeletePs
110467
+ }, {
110468
+ text: "显示/隐藏说明",
110469
+ onClick: showHideComment,
110470
+ show: canShowHidePs
110471
+ }].filter(function (item) {
110472
+ var _context$hooks2, _context$hooks3;
110473
+ return ((_context$hooks2 = context.hooks) === null || _context$hooks2 === void 0 ? void 0 : _context$hooks2.showCommentsMenu) ? (_context$hooks3 = context.hooks) === null || _context$hooks3 === void 0 ? void 0 : _context$hooks3.showCommentsMenu(item) : item.show;
110474
+ });
110473
110475
  return itemData.map(function (item) {
110474
110476
  return /*#__PURE__*/React__default['default'].createElement(Menu, {
110475
110477
  key: item.text,