@fileverse-dev/fortune-react 1.2.99-ydoc → 1.3.0

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.
@@ -288,7 +288,7 @@ export var LinkEditCard = function LinkEditCard(_a) {
288
288
  if (isButtonDisabled) return;
289
289
  _.set(refs.globalCache, "linkCard.mouseEnter", false);
290
290
  setContext(function (draftCtx) {
291
- saveHyperlink(draftCtx, r, c, linkText, linkType, linkAddress);
291
+ return saveHyperlink(draftCtx, r, c, linkText, linkType, linkAddress);
292
292
  });
293
293
  },
294
294
  "data-testid": "link-card-cta-insert"
@@ -105,6 +105,7 @@ export var useSmoothScroll = function useSmoothScroll(scrollContainerRef) {
105
105
  autoScrollAnimationId = requestAnimationFrame(autoScroll);
106
106
  }
107
107
  function onMouseDown(e) {
108
+ if (context.luckysheetCellUpdate.length > 0) return;
108
109
  if (e.button !== 0) return;
109
110
  var target = e.target;
110
111
  if (target.tagName === "INPUT" || target.tagName === "BUTTON" || target.tagName === "SELECT" || target.tagName === "TEXTAREA" || target.closest("button") || target.closest("input")) {
@@ -367,5 +368,5 @@ export var useSmoothScroll = function useSmoothScroll(scrollContainerRef) {
367
368
  if (!scrollContainerEl || !horizontalScrollbarEl || !verticalScrollbarEl) return function () {};
368
369
  var unmountScrollEventHandlers = mountScrollEventHandlers(scrollContainerEl, horizontalScrollbarEl, verticalScrollbarEl);
369
370
  return unmountScrollEventHandlers;
370
- }, [context.zoomRatio]);
371
+ }, [context.zoomRatio, context.luckysheetCellUpdate]);
371
372
  };
@@ -14,7 +14,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
14
14
  removeFromLiveQueryList: (subSheetIndex: number, id: string) => void;
15
15
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
16
16
  type?: keyof Cell;
17
- }, callAfterUpdate?: boolean) => void;
17
+ }) => void;
18
18
  setCellError: (row: number, column: number, errorMessage: {
19
19
  title: string;
20
20
  message: string;
@@ -51,7 +51,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
51
51
  getCellsByRange: (range: Selection, options?: api.CommonOptions) => (Cell | null)[][];
52
52
  getHtmlByRange: (range: Range, options?: api.CommonOptions) => string | null;
53
53
  setSelection: (range: Range, options?: api.CommonOptions) => void;
54
- setCellValuesByRange: (data: any[][], range: SingleRange, options?: api.CommonOptions, cellAfter?: boolean) => void;
54
+ setCellValuesByRange: (data: any[][], range: SingleRange, options?: api.CommonOptions) => void;
55
55
  setCellFormatByRange: (attr: keyof Cell, value: any, range: Range | SingleRange, options?: api.CommonOptions) => void;
56
56
  mergeCells: (ranges: Range, type: string, options?: api.CommonOptions) => void;
57
57
  cancelMerge: (ranges: Range, options?: api.CommonOptions) => void;
@@ -134,12 +134,12 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
134
134
  });
135
135
  });
136
136
  },
137
- setCellValue: function setCellValue(row, column, value, options, callAfterUpdate) {
137
+ setCellValue: function setCellValue(row, column, value, options) {
138
138
  if (options === void 0) {
139
139
  options = {};
140
140
  }
141
141
  return setContext(function (draftCtx) {
142
- return api.setCellValue(draftCtx, row, column, value, cellInput, options, callAfterUpdate);
142
+ return api.setCellValue(draftCtx, row, column, value, cellInput, options);
143
143
  });
144
144
  },
145
145
  setCellError: function setCellError(row, column, errorMessage) {
@@ -276,12 +276,12 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
276
276
  return api.setSelection(draftCtx, range, options);
277
277
  });
278
278
  },
279
- setCellValuesByRange: function setCellValuesByRange(data, range, options, cellAfter) {
279
+ setCellValuesByRange: function setCellValuesByRange(data, range, options) {
280
280
  if (options === void 0) {
281
281
  options = {};
282
282
  }
283
283
  return setContext(function (draftCtx) {
284
- return api.setCellValuesByRange(draftCtx, data, range, cellInput, options, cellAfter);
284
+ return api.setCellValuesByRange(draftCtx, data, range, cellInput, options);
285
285
  });
286
286
  },
287
287
  setCellFormatByRange: function setCellFormatByRange(attr, value, range, options) {
@@ -21,7 +21,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
21
21
  removeFromLiveQueryList: (subSheetIndex: number, id: string) => void;
22
22
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
23
23
  type?: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle | undefined;
24
- }, callAfterUpdate?: boolean | undefined) => void;
24
+ }) => void;
25
25
  setCellError: (row: number, column: number, errorMessage: {
26
26
  title: string;
27
27
  message: string;
@@ -58,7 +58,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
58
58
  getCellsByRange: (range: import("@fileverse-dev/fortune-core").Selection, options?: api.CommonOptions) => (import("@fileverse-dev/fortune-core").Cell | null)[][];
59
59
  getHtmlByRange: (range: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => string | null;
60
60
  setSelection: (range: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
61
- setCellValuesByRange: (data: any[][], range: import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions, cellAfter?: boolean | undefined) => void;
61
+ setCellValuesByRange: (data: any[][], range: import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions) => void;
62
62
  setCellFormatByRange: (attr: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle, value: any, range: import("@fileverse-dev/fortune-core").Range | import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions) => void;
63
63
  mergeCells: (ranges: import("@fileverse-dev/fortune-core").Range, type: string, options?: api.CommonOptions) => void;
64
64
  cancelMerge: (ranges: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
@@ -390,120 +390,6 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
390
390
  refs: refs
391
391
  };
392
392
  }, [context, handleRedo, handleUndo, mergedSettings, refs, setContextWithProduce]);
393
- useEffect(function () {
394
- var _a;
395
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.sheetLengthChange) {
396
- context.hooks.sheetLengthChange();
397
- }
398
- }, [context.luckysheetfile.length]);
399
- var currentSheet = useMemo(function () {
400
- var _a;
401
- return (_a = context === null || context === void 0 ? void 0 : context.luckysheetfile) === null || _a === void 0 ? void 0 : _a.find(function (sheet) {
402
- return sheet.id === (context === null || context === void 0 ? void 0 : context.currentSheetId);
403
- });
404
- }, [context === null || context === void 0 ? void 0 : context.luckysheetfile, context === null || context === void 0 ? void 0 : context.currentSheetId]);
405
- useEffect(function () {
406
- var _a;
407
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.calcChainChange) {
408
- context.hooks.calcChainChange();
409
- }
410
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.calcChain]);
411
- useEffect(function () {
412
- var _a;
413
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterImagesChange) {
414
- context.hooks.afterImagesChange();
415
- }
416
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.images]);
417
- useEffect(function () {
418
- var _a;
419
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterIframesChange) {
420
- context.hooks.afterIframesChange();
421
- }
422
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes]);
423
- useEffect(function () {
424
- var _a;
425
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterFrozenChange) {
426
- context.hooks.afterFrozenChange();
427
- }
428
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.frozen]);
429
- useEffect(function () {
430
- var _a;
431
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterOrderChanges) {
432
- context.hooks.afterOrderChanges();
433
- }
434
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.order]);
435
- useEffect(function () {
436
- var _a;
437
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterConfigChanges) {
438
- context.hooks.afterConfigChanges();
439
- }
440
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.config]);
441
- useEffect(function () {
442
- var _a;
443
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterColRowChanges) {
444
- context.hooks.afterColRowChanges();
445
- }
446
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.row, currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.column]);
447
- useEffect(function () {
448
- var _a;
449
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterShowGridLinesChange) {
450
- context.hooks.afterShowGridLinesChange();
451
- }
452
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.showGridLines]);
453
- useEffect(function () {
454
- var _a;
455
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterNameChanges) {
456
- context.hooks.afterNameChanges();
457
- }
458
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.name]);
459
- useEffect(function () {
460
- var _a;
461
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterStatusChanges) {
462
- context.hooks.afterStatusChanges();
463
- }
464
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.status]);
465
- useEffect(function () {
466
- var _a;
467
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.dataVerificationChange) {
468
- context.hooks.dataVerificationChange();
469
- }
470
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.dataVerification]);
471
- useEffect(function () {
472
- var _a;
473
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.liveQueryChange) {
474
- context.hooks.liveQueryChange();
475
- }
476
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.liveQueryList]);
477
- useEffect(function () {
478
- var _a;
479
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.imageListChange) {
480
- context.hooks.imageListChange();
481
- }
482
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.images]);
483
- useEffect(function () {
484
- var _a;
485
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.iframeListChange) {
486
- context.hooks.iframeListChange();
487
- }
488
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes]);
489
- useEffect(function () {
490
- var _a;
491
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.conditionRulesChange) {
492
- context.hooks.conditionRulesChange();
493
- }
494
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.conditionRules]);
495
- useEffect(function () {
496
- var _a;
497
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.conditionFormatChange) {
498
- context.hooks.conditionFormatChange();
499
- }
500
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.luckysheet_conditionformat_save]);
501
- useEffect(function () {
502
- var _a;
503
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.hyperlinkChange) {
504
- context.hooks.hyperlinkChange();
505
- }
506
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.hyperlink]);
507
393
  useEffect(function () {
508
394
  if (!_.isEmpty(context.luckysheetfile)) {
509
395
  onChange === null || onChange === void 0 ? void 0 : onChange(context.luckysheetfile);
@@ -297,7 +297,7 @@ var LinkEditCard = exports.LinkEditCard = function LinkEditCard(_a) {
297
297
  if (isButtonDisabled) return;
298
298
  _lodash.default.set(refs.globalCache, "linkCard.mouseEnter", false);
299
299
  setContext(function (draftCtx) {
300
- (0, _fortuneCore.saveHyperlink)(draftCtx, r, c, linkText, linkType, linkAddress);
300
+ return (0, _fortuneCore.saveHyperlink)(draftCtx, r, c, linkText, linkType, linkAddress);
301
301
  });
302
302
  },
303
303
  "data-testid": "link-card-cta-insert"
@@ -112,6 +112,7 @@ var useSmoothScroll = exports.useSmoothScroll = function useSmoothScroll(scrollC
112
112
  autoScrollAnimationId = requestAnimationFrame(autoScroll);
113
113
  }
114
114
  function onMouseDown(e) {
115
+ if (context.luckysheetCellUpdate.length > 0) return;
115
116
  if (e.button !== 0) return;
116
117
  var target = e.target;
117
118
  if (target.tagName === "INPUT" || target.tagName === "BUTTON" || target.tagName === "SELECT" || target.tagName === "TEXTAREA" || target.closest("button") || target.closest("input")) {
@@ -374,5 +375,5 @@ var useSmoothScroll = exports.useSmoothScroll = function useSmoothScroll(scrollC
374
375
  if (!scrollContainerEl || !horizontalScrollbarEl || !verticalScrollbarEl) return function () {};
375
376
  var unmountScrollEventHandlers = mountScrollEventHandlers(scrollContainerEl, horizontalScrollbarEl, verticalScrollbarEl);
376
377
  return unmountScrollEventHandlers;
377
- }, [context.zoomRatio]);
378
+ }, [context.zoomRatio, context.luckysheetCellUpdate]);
378
379
  };
@@ -14,7 +14,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
14
14
  removeFromLiveQueryList: (subSheetIndex: number, id: string) => void;
15
15
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
16
16
  type?: keyof Cell;
17
- }, callAfterUpdate?: boolean) => void;
17
+ }) => void;
18
18
  setCellError: (row: number, column: number, errorMessage: {
19
19
  title: string;
20
20
  message: string;
@@ -51,7 +51,7 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
51
51
  getCellsByRange: (range: Selection, options?: api.CommonOptions) => (Cell | null)[][];
52
52
  getHtmlByRange: (range: Range, options?: api.CommonOptions) => string | null;
53
53
  setSelection: (range: Range, options?: api.CommonOptions) => void;
54
- setCellValuesByRange: (data: any[][], range: SingleRange, options?: api.CommonOptions, cellAfter?: boolean) => void;
54
+ setCellValuesByRange: (data: any[][], range: SingleRange, options?: api.CommonOptions) => void;
55
55
  setCellFormatByRange: (attr: keyof Cell, value: any, range: Range | SingleRange, options?: api.CommonOptions) => void;
56
56
  mergeCells: (ranges: Range, type: string, options?: api.CommonOptions) => void;
57
57
  cancelMerge: (ranges: Range, options?: api.CommonOptions) => void;
@@ -141,12 +141,12 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
141
141
  });
142
142
  });
143
143
  },
144
- setCellValue: function setCellValue(row, column, value, options, callAfterUpdate) {
144
+ setCellValue: function setCellValue(row, column, value, options) {
145
145
  if (options === void 0) {
146
146
  options = {};
147
147
  }
148
148
  return setContext(function (draftCtx) {
149
- return _fortuneCore.api.setCellValue(draftCtx, row, column, value, cellInput, options, callAfterUpdate);
149
+ return _fortuneCore.api.setCellValue(draftCtx, row, column, value, cellInput, options);
150
150
  });
151
151
  },
152
152
  setCellError: function setCellError(row, column, errorMessage) {
@@ -283,12 +283,12 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
283
283
  return _fortuneCore.api.setSelection(draftCtx, range, options);
284
284
  });
285
285
  },
286
- setCellValuesByRange: function setCellValuesByRange(data, range, options, cellAfter) {
286
+ setCellValuesByRange: function setCellValuesByRange(data, range, options) {
287
287
  if (options === void 0) {
288
288
  options = {};
289
289
  }
290
290
  return setContext(function (draftCtx) {
291
- return _fortuneCore.api.setCellValuesByRange(draftCtx, data, range, cellInput, options, cellAfter);
291
+ return _fortuneCore.api.setCellValuesByRange(draftCtx, data, range, cellInput, options);
292
292
  });
293
293
  },
294
294
  setCellFormatByRange: function setCellFormatByRange(attr, value, range, options) {
@@ -21,7 +21,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
21
21
  removeFromLiveQueryList: (subSheetIndex: number, id: string) => void;
22
22
  setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & {
23
23
  type?: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle | undefined;
24
- }, callAfterUpdate?: boolean | undefined) => void;
24
+ }) => void;
25
25
  setCellError: (row: number, column: number, errorMessage: {
26
26
  title: string;
27
27
  message: string;
@@ -58,7 +58,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
58
58
  getCellsByRange: (range: import("@fileverse-dev/fortune-core").Selection, options?: api.CommonOptions) => (import("@fileverse-dev/fortune-core").Cell | null)[][];
59
59
  getHtmlByRange: (range: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => string | null;
60
60
  setSelection: (range: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
61
- setCellValuesByRange: (data: any[][], range: import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions, cellAfter?: boolean | undefined) => void;
61
+ setCellValuesByRange: (data: any[][], range: import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions) => void;
62
62
  setCellFormatByRange: (attr: "error" | "rt" | "f" | "m" | "v" | "mc" | "ct" | "qp" | "spl" | "bg" | "lo" | "baseValue" | "baseCurrency" | "baseCurrencyPrice" | "isDataBlockFormula" | "ps" | "hl" | keyof import("@fileverse-dev/fortune-core").CellStyle, value: any, range: import("@fileverse-dev/fortune-core").Range | import("@fileverse-dev/fortune-core").SingleRange, options?: api.CommonOptions) => void;
63
63
  mergeCells: (ranges: import("@fileverse-dev/fortune-core").Range, type: string, options?: api.CommonOptions) => void;
64
64
  cancelMerge: (ranges: import("@fileverse-dev/fortune-core").Range, options?: api.CommonOptions) => void;
@@ -399,120 +399,6 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
399
399
  refs: refs
400
400
  };
401
401
  }, [context, handleRedo, handleUndo, mergedSettings, refs, setContextWithProduce]);
402
- (0, _react.useEffect)(function () {
403
- var _a;
404
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.sheetLengthChange) {
405
- context.hooks.sheetLengthChange();
406
- }
407
- }, [context.luckysheetfile.length]);
408
- var currentSheet = (0, _react.useMemo)(function () {
409
- var _a;
410
- return (_a = context === null || context === void 0 ? void 0 : context.luckysheetfile) === null || _a === void 0 ? void 0 : _a.find(function (sheet) {
411
- return sheet.id === (context === null || context === void 0 ? void 0 : context.currentSheetId);
412
- });
413
- }, [context === null || context === void 0 ? void 0 : context.luckysheetfile, context === null || context === void 0 ? void 0 : context.currentSheetId]);
414
- (0, _react.useEffect)(function () {
415
- var _a;
416
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.calcChainChange) {
417
- context.hooks.calcChainChange();
418
- }
419
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.calcChain]);
420
- (0, _react.useEffect)(function () {
421
- var _a;
422
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterImagesChange) {
423
- context.hooks.afterImagesChange();
424
- }
425
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.images]);
426
- (0, _react.useEffect)(function () {
427
- var _a;
428
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterIframesChange) {
429
- context.hooks.afterIframesChange();
430
- }
431
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes]);
432
- (0, _react.useEffect)(function () {
433
- var _a;
434
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterFrozenChange) {
435
- context.hooks.afterFrozenChange();
436
- }
437
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.frozen]);
438
- (0, _react.useEffect)(function () {
439
- var _a;
440
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterOrderChanges) {
441
- context.hooks.afterOrderChanges();
442
- }
443
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.order]);
444
- (0, _react.useEffect)(function () {
445
- var _a;
446
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterConfigChanges) {
447
- context.hooks.afterConfigChanges();
448
- }
449
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.config]);
450
- (0, _react.useEffect)(function () {
451
- var _a;
452
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterColRowChanges) {
453
- context.hooks.afterColRowChanges();
454
- }
455
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.row, currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.column]);
456
- (0, _react.useEffect)(function () {
457
- var _a;
458
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterShowGridLinesChange) {
459
- context.hooks.afterShowGridLinesChange();
460
- }
461
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.showGridLines]);
462
- (0, _react.useEffect)(function () {
463
- var _a;
464
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterNameChanges) {
465
- context.hooks.afterNameChanges();
466
- }
467
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.name]);
468
- (0, _react.useEffect)(function () {
469
- var _a;
470
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterStatusChanges) {
471
- context.hooks.afterStatusChanges();
472
- }
473
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.status]);
474
- (0, _react.useEffect)(function () {
475
- var _a;
476
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.dataVerificationChange) {
477
- context.hooks.dataVerificationChange();
478
- }
479
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.dataVerification]);
480
- (0, _react.useEffect)(function () {
481
- var _a;
482
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.liveQueryChange) {
483
- context.hooks.liveQueryChange();
484
- }
485
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.liveQueryList]);
486
- (0, _react.useEffect)(function () {
487
- var _a;
488
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.imageListChange) {
489
- context.hooks.imageListChange();
490
- }
491
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.images]);
492
- (0, _react.useEffect)(function () {
493
- var _a;
494
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.iframeListChange) {
495
- context.hooks.iframeListChange();
496
- }
497
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes]);
498
- (0, _react.useEffect)(function () {
499
- var _a;
500
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.conditionRulesChange) {
501
- context.hooks.conditionRulesChange();
502
- }
503
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.conditionRules]);
504
- (0, _react.useEffect)(function () {
505
- var _a;
506
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.conditionFormatChange) {
507
- context.hooks.conditionFormatChange();
508
- }
509
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.luckysheet_conditionformat_save]);
510
- (0, _react.useEffect)(function () {
511
- var _a;
512
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.hyperlinkChange) {
513
- context.hooks.hyperlinkChange();
514
- }
515
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.hyperlink]);
516
402
  (0, _react.useEffect)(function () {
517
403
  if (!_lodash.default.isEmpty(context.luckysheetfile)) {
518
404
  onChange === null || onChange === void 0 ? void 0 : onChange(context.luckysheetfile);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.99-ydoc",
3
+ "version": "1.3.0",
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.99-ydoc",
19
+ "@fileverse-dev/fortune-core": "1.3.0",
20
20
  "@fileverse/ui": "5.0.0",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",