@leankylin-sheet/react 3.1.19 → 3.1.21

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
@@ -2190,6 +2190,7 @@ var NotationBoxes = function NotationBoxes() {
2190
2190
  }
2191
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, {
2192
2192
  id: "comment-editor-".concat(rc),
2193
+ className: "luckysheet-comment-editor",
2193
2194
  autoFocus: autoFocus,
2194
2195
  style: {
2195
2196
  width: "100%",
@@ -2199,7 +2200,17 @@ var NotationBoxes = function NotationBoxes() {
2199
2200
  outline: "none",
2200
2201
  cursor: "auto"
2201
2202
  },
2203
+ onChange: function onChange(newValue) {
2204
+ var _context$hooks$afterU, _context$hooks2, _flowdata$r, _flowdata$r$c;
2205
+ return (_context$hooks$afterU = (_context$hooks2 = context.hooks).afterUpdateComment) === null || _context$hooks$afterU === void 0 ? void 0 : _context$hooks$afterU.call(_context$hooks2, r, c, _objectSpread2(_objectSpread2({}, (flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r = flowdata[r]) === null || _flowdata$r === void 0 ? void 0 : (_flowdata$r$c = _flowdata$r[c]) === null || _flowdata$r$c === void 0 ? void 0 : _flowdata$r$c.ps) || {}), {}, {
2206
+ value: newValue
2207
+ }), false);
2208
+ },
2202
2209
  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
+ },
2203
2214
  spellCheck: false,
2204
2215
  "data-r": r,
2205
2216
  "data-c": c,
@@ -7397,11 +7408,11 @@ var ContextMenu = function ContextMenu() {
7397
7408
  });
7398
7409
  }
7399
7410
  if (name === "insert-comment") {
7400
- var _flowdata$row_index, _flowdata$row_index$c, _flowdata$row_index$c2;
7411
+ var _flowdata$row_index, _flowdata$row_index$c;
7401
7412
  var flowdata = getFlowdata(context);
7402
7413
  var row_index = selection === null || selection === void 0 ? void 0 : selection.row[0];
7403
7414
  var col_index = selection === null || selection === void 0 ? void 0 : selection.column[0];
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);
7415
+ 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$c.ps);
7405
7416
  var canAddPs = !hasPsValue;
7406
7417
  var canEditPs = hasPsValue;
7407
7418
  var canDeletePs = hasPsValue;
package/dist/index.js CHANGED
@@ -2200,6 +2200,7 @@ var NotationBoxes = function NotationBoxes() {
2200
2200
  }
2201
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, {
2202
2202
  id: "comment-editor-".concat(rc),
2203
+ className: "luckysheet-comment-editor",
2203
2204
  autoFocus: autoFocus,
2204
2205
  style: {
2205
2206
  width: "100%",
@@ -2209,7 +2210,17 @@ var NotationBoxes = function NotationBoxes() {
2209
2210
  outline: "none",
2210
2211
  cursor: "auto"
2211
2212
  },
2213
+ onChange: function onChange(newValue) {
2214
+ var _context$hooks$afterU, _context$hooks2, _flowdata$r, _flowdata$r$c;
2215
+ return (_context$hooks$afterU = (_context$hooks2 = context.hooks).afterUpdateComment) === null || _context$hooks$afterU === void 0 ? void 0 : _context$hooks$afterU.call(_context$hooks2, r, c, _objectSpread2(_objectSpread2({}, (flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r = flowdata[r]) === null || _flowdata$r === void 0 ? void 0 : (_flowdata$r$c = _flowdata$r[c]) === null || _flowdata$r$c === void 0 ? void 0 : _flowdata$r$c.ps) || {}), {}, {
2216
+ value: newValue
2217
+ }), false);
2218
+ },
2212
2219
  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
+ },
2213
2224
  spellCheck: false,
2214
2225
  "data-r": r,
2215
2226
  "data-c": c,
@@ -7407,11 +7418,11 @@ var ContextMenu = function ContextMenu() {
7407
7418
  });
7408
7419
  }
7409
7420
  if (name === "insert-comment") {
7410
- var _flowdata$row_index, _flowdata$row_index$c, _flowdata$row_index$c2;
7421
+ var _flowdata$row_index, _flowdata$row_index$c;
7411
7422
  var flowdata = core.getFlowdata(context);
7412
7423
  var row_index = selection === null || selection === void 0 ? void 0 : selection.row[0];
7413
7424
  var col_index = selection === null || selection === void 0 ? void 0 : selection.column[0];
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);
7425
+ 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$c.ps);
7415
7426
  var canAddPs = !hasPsValue;
7416
7427
  var canEditPs = hasPsValue;
7417
7428
  var canDeletePs = hasPsValue;
package/dist/index.umd.js CHANGED
@@ -105236,6 +105236,7 @@
105236
105236
  }
105237
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, {
105238
105238
  id: "comment-editor-".concat(rc),
105239
+ className: "luckysheet-comment-editor",
105239
105240
  autoFocus: autoFocus,
105240
105241
  style: {
105241
105242
  width: "100%",
@@ -105245,7 +105246,17 @@
105245
105246
  outline: "none",
105246
105247
  cursor: "auto"
105247
105248
  },
105249
+ onChange: function onChange(newValue) {
105250
+ var _context$hooks$afterU, _context$hooks2, _flowdata$r, _flowdata$r$c;
105251
+ return (_context$hooks$afterU = (_context$hooks2 = context.hooks).afterUpdateComment) === null || _context$hooks$afterU === void 0 ? void 0 : _context$hooks$afterU.call(_context$hooks2, r, c, _objectSpread2(_objectSpread2({}, (flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r = flowdata[r]) === null || _flowdata$r === void 0 ? void 0 : (_flowdata$r$c = _flowdata$r[c]) === null || _flowdata$r$c === void 0 ? void 0 : _flowdata$r$c.ps) || {}), {}, {
105252
+ value: newValue
105253
+ }), false);
105254
+ },
105248
105255
  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
+ },
105249
105260
  spellCheck: false,
105250
105261
  "data-r": r,
105251
105262
  "data-c": c,
@@ -110443,11 +110454,11 @@
110443
110454
  });
110444
110455
  }
110445
110456
  if (name === "insert-comment") {
110446
- var _flowdata$row_index, _flowdata$row_index$c, _flowdata$row_index$c2;
110457
+ var _flowdata$row_index, _flowdata$row_index$c;
110447
110458
  var flowdata = getFlowdata(context);
110448
110459
  var row_index = selection === null || selection === void 0 ? void 0 : selection.row[0];
110449
110460
  var col_index = selection === null || selection === void 0 ? void 0 : selection.column[0];
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);
110461
+ 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$c.ps);
110451
110462
  var canAddPs = !hasPsValue;
110452
110463
  var canEditPs = hasPsValue;
110453
110464
  var canDeletePs = hasPsValue;