@fileverse-dev/fortune-react 1.2.90-ydoc-9 → 1.2.90-ydoc-10

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.
@@ -392,10 +392,58 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
392
392
  }, [context, handleRedo, handleUndo, mergedSettings, refs, setContextWithProduce]);
393
393
  useEffect(function () {
394
394
  var _a;
395
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.flvSheetLengthChange) {
396
- context.hooks.flvSheetLengthChange();
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
397
  }
398
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]);
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.dataVerificationChange) {
414
+ context.hooks.dataVerificationChange();
415
+ }
416
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.dataVerification]);
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.liveQueryChange) {
420
+ context.hooks.liveQueryChange();
421
+ }
422
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.liveQueryList]);
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.imageListChange) {
426
+ context.hooks.imageListChange();
427
+ }
428
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.images]);
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.iframeListChange) {
432
+ context.hooks.iframeListChange();
433
+ }
434
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes]);
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.conditionRulesChange) {
438
+ context.hooks.conditionRulesChange();
439
+ }
440
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.conditionRules]);
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.conditionFormatChange) {
444
+ context.hooks.conditionFormatChange();
445
+ }
446
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.luckysheet_conditionformat_save]);
399
447
  useEffect(function () {
400
448
  if (!_.isEmpty(context.luckysheetfile)) {
401
449
  onChange === null || onChange === void 0 ? void 0 : onChange(context.luckysheetfile);
@@ -401,10 +401,58 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
401
401
  }, [context, handleRedo, handleUndo, mergedSettings, refs, setContextWithProduce]);
402
402
  (0, _react.useEffect)(function () {
403
403
  var _a;
404
- if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.flvSheetLengthChange) {
405
- context.hooks.flvSheetLengthChange();
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
406
  }
407
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]);
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.dataVerificationChange) {
423
+ context.hooks.dataVerificationChange();
424
+ }
425
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.dataVerification]);
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.liveQueryChange) {
429
+ context.hooks.liveQueryChange();
430
+ }
431
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.liveQueryList]);
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.imageListChange) {
435
+ context.hooks.imageListChange();
436
+ }
437
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.images]);
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.iframeListChange) {
441
+ context.hooks.iframeListChange();
442
+ }
443
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.iframes]);
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.conditionRulesChange) {
447
+ context.hooks.conditionRulesChange();
448
+ }
449
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.conditionRules]);
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.conditionFormatChange) {
453
+ context.hooks.conditionFormatChange();
454
+ }
455
+ }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.luckysheet_conditionformat_save]);
408
456
  (0, _react.useEffect)(function () {
409
457
  if (!_lodash.default.isEmpty(context.luckysheetfile)) {
410
458
  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.90-ydoc-9",
3
+ "version": "1.2.90-ydoc-10",
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.90-ydoc-9",
19
+ "@fileverse-dev/fortune-core": "1.2.90-ydoc-10",
20
20
  "@fileverse/ui": "^4.1.7-patch-40",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",