@leankylin-sheet/react 7.0.5 → 7.0.6

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
@@ -2330,32 +2330,12 @@ var LinkEditCard = function LinkEditCard(_ref) {
2330
2330
  return m;
2331
2331
  }, [settings === null || settings === void 0 ? void 0 : settings.customLinkTypes]);
2332
2332
  var currentCustomConfig = customLinkTypeMap[linkType];
2333
- var isCustomTypeValid = useMemo(function () {
2334
- if (!currentCustomConfig) return true;
2335
- if (!currentCustomConfig.onSave) return true;
2336
- var next = currentCustomConfig.onSave({
2337
- linkText: linkText,
2338
- linkAddress: linkAddress,
2339
- position: {
2340
- r: r,
2341
- c: c
2342
- },
2343
- origin: function () {
2344
- var o = getCellHyperlink(context, r, c);
2345
- return o ? {
2346
- linkType: o.linkType,
2347
- linkAddress: o.linkAddress,
2348
- payload: o.payload
2349
- } : undefined;
2350
- }()
2351
- });
2352
- return next !== undefined;
2353
- }, [currentCustomConfig, linkText, linkAddress, r, c, context]);
2333
+ var isCustomTypeValid = true;
2354
2334
  var canSubmit = !currentCustomConfig || isCustomTypeValid ? isLinkAddressValid.isValid : false;
2355
2335
  var tooltip = function () {
2356
2336
  var text;
2357
2337
  if (currentCustomConfig) {
2358
- text = isCustomTypeValid ? "" : insertLink.tooltipInfo1 || "";
2338
+ text = "" ;
2359
2339
  } else {
2360
2340
  text = isLinkAddressValid.tooltip;
2361
2341
  }
@@ -2660,7 +2640,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
2660
2640
  })), tooltip))), /*#__PURE__*/React.createElement("div", {
2661
2641
  className: "modal-footer"
2662
2642
  }, renderBottomButton(function () {
2663
- if (!canSubmit) return;
2643
+ if (!canSubmit && !(currentCustomConfig === null || currentCustomConfig === void 0 ? void 0 : currentCustomConfig.onSave)) return;
2664
2644
  _.set(refs.globalCache, "linkCard.mouseEnter", false);
2665
2645
  if (currentCustomConfig === null || currentCustomConfig === void 0 ? void 0 : currentCustomConfig.onSave) {
2666
2646
  var origin = function () {
package/dist/index.js CHANGED
@@ -2340,32 +2340,12 @@ var LinkEditCard = function LinkEditCard(_ref) {
2340
2340
  return m;
2341
2341
  }, [settings === null || settings === void 0 ? void 0 : settings.customLinkTypes]);
2342
2342
  var currentCustomConfig = customLinkTypeMap[linkType];
2343
- var isCustomTypeValid = React.useMemo(function () {
2344
- if (!currentCustomConfig) return true;
2345
- if (!currentCustomConfig.onSave) return true;
2346
- var next = currentCustomConfig.onSave({
2347
- linkText: linkText,
2348
- linkAddress: linkAddress,
2349
- position: {
2350
- r: r,
2351
- c: c
2352
- },
2353
- origin: function () {
2354
- var o = core.getCellHyperlink(context, r, c);
2355
- return o ? {
2356
- linkType: o.linkType,
2357
- linkAddress: o.linkAddress,
2358
- payload: o.payload
2359
- } : undefined;
2360
- }()
2361
- });
2362
- return next !== undefined;
2363
- }, [currentCustomConfig, linkText, linkAddress, r, c, context]);
2343
+ var isCustomTypeValid = true;
2364
2344
  var canSubmit = !currentCustomConfig || isCustomTypeValid ? isLinkAddressValid.isValid : false;
2365
2345
  var tooltip = function () {
2366
2346
  var text;
2367
2347
  if (currentCustomConfig) {
2368
- text = isCustomTypeValid ? "" : insertLink.tooltipInfo1 || "";
2348
+ text = "" ;
2369
2349
  } else {
2370
2350
  text = isLinkAddressValid.tooltip;
2371
2351
  }
@@ -2670,7 +2650,7 @@ var LinkEditCard = function LinkEditCard(_ref) {
2670
2650
  })), tooltip))), /*#__PURE__*/React__default['default'].createElement("div", {
2671
2651
  className: "modal-footer"
2672
2652
  }, renderBottomButton(function () {
2673
- if (!canSubmit) return;
2653
+ if (!canSubmit && !(currentCustomConfig === null || currentCustomConfig === void 0 ? void 0 : currentCustomConfig.onSave)) return;
2674
2654
  ___default['default'].set(refs.globalCache, "linkCard.mouseEnter", false);
2675
2655
  if (currentCustomConfig === null || currentCustomConfig === void 0 ? void 0 : currentCustomConfig.onSave) {
2676
2656
  var origin = function () {
package/dist/index.umd.js CHANGED
@@ -21414,32 +21414,12 @@
21414
21414
  return m;
21415
21415
  }, [settings === null || settings === void 0 ? void 0 : settings.customLinkTypes]);
21416
21416
  var currentCustomConfig = customLinkTypeMap[linkType];
21417
- var isCustomTypeValid = React.useMemo(function () {
21418
- if (!currentCustomConfig) return true;
21419
- if (!currentCustomConfig.onSave) return true;
21420
- var next = currentCustomConfig.onSave({
21421
- linkText: linkText,
21422
- linkAddress: linkAddress,
21423
- position: {
21424
- r: r,
21425
- c: c
21426
- },
21427
- origin: function () {
21428
- var o = core.getCellHyperlink(context, r, c);
21429
- return o ? {
21430
- linkType: o.linkType,
21431
- linkAddress: o.linkAddress,
21432
- payload: o.payload
21433
- } : undefined;
21434
- }()
21435
- });
21436
- return next !== undefined;
21437
- }, [currentCustomConfig, linkText, linkAddress, r, c, context]);
21417
+ var isCustomTypeValid = true;
21438
21418
  var canSubmit = !currentCustomConfig || isCustomTypeValid ? isLinkAddressValid.isValid : false;
21439
21419
  var tooltip = function () {
21440
21420
  var text;
21441
21421
  if (currentCustomConfig) {
21442
- text = isCustomTypeValid ? "" : insertLink.tooltipInfo1 || "";
21422
+ text = "" ;
21443
21423
  } else {
21444
21424
  text = isLinkAddressValid.tooltip;
21445
21425
  }
@@ -21744,7 +21724,7 @@
21744
21724
  })), tooltip))), /*#__PURE__*/React__default['default'].createElement("div", {
21745
21725
  className: "modal-footer"
21746
21726
  }, renderBottomButton(function () {
21747
- if (!canSubmit) return;
21727
+ if (!canSubmit && !(currentCustomConfig === null || currentCustomConfig === void 0 ? void 0 : currentCustomConfig.onSave)) return;
21748
21728
  lodash.set(refs.globalCache, "linkCard.mouseEnter", false);
21749
21729
  if (currentCustomConfig === null || currentCustomConfig === void 0 ? void 0 : currentCustomConfig.onSave) {
21750
21730
  var origin = function () {