@leankylin-sheet/react 3.1.22 → 3.1.24

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.esm.js CHANGED
@@ -648,6 +648,9 @@ var ContentEditable = function ContentEditable(_ref) {
648
648
  var fnEmitChange = useCallback(function (__, isBlur) {
649
649
  var html;
650
650
  if (root.current != null) {
651
+ if (root.current.innerHTML === "<br>") {
652
+ root.current.innerHTML = "";
653
+ }
651
654
  html = root.current.innerHTML;
652
655
  }
653
656
  if (onChange && html !== lastHtml.current) {
@@ -2137,6 +2140,9 @@ var NotationBoxes = function NotationBoxes() {
2137
2140
  markerEnd: "url(#arrowhead)"
2138
2141
  })), /*#__PURE__*/React.createElement("div", {
2139
2142
  id: commentId,
2143
+ onDoubleClick: function onDoubleClick(e) {
2144
+ return e.stopPropagation();
2145
+ },
2140
2146
  className: "luckysheet-postil-show-main",
2141
2147
  style: {
2142
2148
  width: width,
@@ -2186,7 +2192,9 @@ var NotationBoxes = function NotationBoxes() {
2186
2192
  style: {
2187
2193
  width: "100%",
2188
2194
  height: "100%",
2189
- overflow: "hidden"
2195
+ overflow: "hidden",
2196
+ display: "flex",
2197
+ flexDirection: "column"
2190
2198
  }
2191
2199
  }, (_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, {
2192
2200
  id: "comment-editor-".concat(rc),
@@ -2194,6 +2202,7 @@ var NotationBoxes = function NotationBoxes() {
2194
2202
  autoFocus: autoFocus,
2195
2203
  style: {
2196
2204
  width: "100%",
2205
+ flex: 1,
2197
2206
  lineHeight: "20px",
2198
2207
  boxSizing: "border-box",
2199
2208
  wordBreak: "break-all",
@@ -2207,10 +2216,6 @@ var NotationBoxes = function NotationBoxes() {
2207
2216
  }), false);
2208
2217
  },
2209
2218
  allowEdit: context.allowEdit,
2210
- onBlur: function onBlur() {
2211
- var _context$hooks$afterU2, _context$hooks3, _flowdata$r2, _flowdata$r2$c;
2212
- return (_context$hooks$afterU2 = (_context$hooks3 = context.hooks).afterUpdateComment) === null || _context$hooks$afterU2 === void 0 ? void 0 : _context$hooks$afterU2.call(_context$hooks3, r, c, flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r2 = flowdata[r]) === null || _flowdata$r2 === void 0 ? void 0 : (_flowdata$r2$c = _flowdata$r2[c]) === null || _flowdata$r2$c === void 0 ? void 0 : _flowdata$r2$c.ps, true);
2213
- },
2214
2219
  spellCheck: false,
2215
2220
  "data-r": r,
2216
2221
  "data-c": c,
package/dist/index.js CHANGED
@@ -658,6 +658,9 @@ var ContentEditable = function ContentEditable(_ref) {
658
658
  var fnEmitChange = React.useCallback(function (__, isBlur) {
659
659
  var html;
660
660
  if (root.current != null) {
661
+ if (root.current.innerHTML === "<br>") {
662
+ root.current.innerHTML = "";
663
+ }
661
664
  html = root.current.innerHTML;
662
665
  }
663
666
  if (onChange && html !== lastHtml.current) {
@@ -2147,6 +2150,9 @@ var NotationBoxes = function NotationBoxes() {
2147
2150
  markerEnd: "url(#arrowhead)"
2148
2151
  })), /*#__PURE__*/React__default['default'].createElement("div", {
2149
2152
  id: commentId,
2153
+ onDoubleClick: function onDoubleClick(e) {
2154
+ return e.stopPropagation();
2155
+ },
2150
2156
  className: "luckysheet-postil-show-main",
2151
2157
  style: {
2152
2158
  width: width,
@@ -2196,7 +2202,9 @@ var NotationBoxes = function NotationBoxes() {
2196
2202
  style: {
2197
2203
  width: "100%",
2198
2204
  height: "100%",
2199
- overflow: "hidden"
2205
+ overflow: "hidden",
2206
+ display: "flex",
2207
+ flexDirection: "column"
2200
2208
  }
2201
2209
  }, (_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, {
2202
2210
  id: "comment-editor-".concat(rc),
@@ -2204,6 +2212,7 @@ var NotationBoxes = function NotationBoxes() {
2204
2212
  autoFocus: autoFocus,
2205
2213
  style: {
2206
2214
  width: "100%",
2215
+ flex: 1,
2207
2216
  lineHeight: "20px",
2208
2217
  boxSizing: "border-box",
2209
2218
  wordBreak: "break-all",
@@ -2217,10 +2226,6 @@ var NotationBoxes = function NotationBoxes() {
2217
2226
  }), false);
2218
2227
  },
2219
2228
  allowEdit: context.allowEdit,
2220
- onBlur: function onBlur() {
2221
- var _context$hooks$afterU2, _context$hooks3, _flowdata$r2, _flowdata$r2$c;
2222
- return (_context$hooks$afterU2 = (_context$hooks3 = context.hooks).afterUpdateComment) === null || _context$hooks$afterU2 === void 0 ? void 0 : _context$hooks$afterU2.call(_context$hooks3, r, c, flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r2 = flowdata[r]) === null || _flowdata$r2 === void 0 ? void 0 : (_flowdata$r2$c = _flowdata$r2[c]) === null || _flowdata$r2$c === void 0 ? void 0 : _flowdata$r2$c.ps, true);
2223
- },
2224
2229
  spellCheck: false,
2225
2230
  "data-r": r,
2226
2231
  "data-c": c,
package/dist/index.umd.js CHANGED
@@ -103694,6 +103694,9 @@
103694
103694
  var fnEmitChange = React.useCallback(function (__, isBlur) {
103695
103695
  var html;
103696
103696
  if (root.current != null) {
103697
+ if (root.current.innerHTML === "<br>") {
103698
+ root.current.innerHTML = "";
103699
+ }
103697
103700
  html = root.current.innerHTML;
103698
103701
  }
103699
103702
  if (onChange && html !== lastHtml.current) {
@@ -105183,6 +105186,9 @@
105183
105186
  markerEnd: "url(#arrowhead)"
105184
105187
  })), /*#__PURE__*/React__default['default'].createElement("div", {
105185
105188
  id: commentId,
105189
+ onDoubleClick: function onDoubleClick(e) {
105190
+ return e.stopPropagation();
105191
+ },
105186
105192
  className: "luckysheet-postil-show-main",
105187
105193
  style: {
105188
105194
  width: width,
@@ -105232,7 +105238,9 @@
105232
105238
  style: {
105233
105239
  width: "100%",
105234
105240
  height: "100%",
105235
- overflow: "hidden"
105241
+ overflow: "hidden",
105242
+ display: "flex",
105243
+ flexDirection: "column"
105236
105244
  }
105237
105245
  }, (_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, {
105238
105246
  id: "comment-editor-".concat(rc),
@@ -105240,6 +105248,7 @@
105240
105248
  autoFocus: autoFocus,
105241
105249
  style: {
105242
105250
  width: "100%",
105251
+ flex: 1,
105243
105252
  lineHeight: "20px",
105244
105253
  boxSizing: "border-box",
105245
105254
  wordBreak: "break-all",
@@ -105253,10 +105262,6 @@
105253
105262
  }), false);
105254
105263
  },
105255
105264
  allowEdit: context.allowEdit,
105256
- onBlur: function onBlur() {
105257
- var _context$hooks$afterU2, _context$hooks3, _flowdata$r2, _flowdata$r2$c;
105258
- return (_context$hooks$afterU2 = (_context$hooks3 = context.hooks).afterUpdateComment) === null || _context$hooks$afterU2 === void 0 ? void 0 : _context$hooks$afterU2.call(_context$hooks3, r, c, flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r2 = flowdata[r]) === null || _flowdata$r2 === void 0 ? void 0 : (_flowdata$r2$c = _flowdata$r2[c]) === null || _flowdata$r2$c === void 0 ? void 0 : _flowdata$r2$c.ps, true);
105259
- },
105260
105265
  spellCheck: false,
105261
105266
  "data-r": r,
105262
105267
  "data-c": c,