@fileverse-dev/fortune-react 1.3.10-yjs-6 → 1.3.10-yjs-7

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.
@@ -535,18 +535,32 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
535
535
  context.hooks.afterOrderChanges();
536
536
  }
537
537
  }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.order]);
538
+ var sheetColorSig = useMemo(function () {
539
+ var _a;
540
+ return ((_a = context === null || context === void 0 ? void 0 : context.luckysheetfile) !== null && _a !== void 0 ? _a : []).map(function (s) {
541
+ var _a;
542
+ return "".concat(s.id, ":").concat((_a = s.color) !== null && _a !== void 0 ? _a : "");
543
+ }).join("|");
544
+ }, [context === null || context === void 0 ? void 0 : context.luckysheetfile]);
538
545
  useEffect(function () {
539
546
  var _a;
540
547
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterColorChanges) {
541
548
  context.hooks.afterColorChanges();
542
549
  }
543
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.color]);
550
+ }, [sheetColorSig]);
551
+ var sheetHideSig = useMemo(function () {
552
+ var _a;
553
+ return ((_a = context === null || context === void 0 ? void 0 : context.luckysheetfile) !== null && _a !== void 0 ? _a : []).map(function (s) {
554
+ var _a;
555
+ return "".concat(s.id, ":").concat((_a = s.hide) !== null && _a !== void 0 ? _a : 0);
556
+ }).join("|");
557
+ }, [context === null || context === void 0 ? void 0 : context.luckysheetfile]);
544
558
  useEffect(function () {
545
559
  var _a;
546
560
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterHideChanges) {
547
561
  context.hooks.afterHideChanges();
548
562
  }
549
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.hide]);
563
+ }, [sheetHideSig]);
550
564
  useEffect(function () {
551
565
  var _a;
552
566
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterConfigChanges) {
@@ -544,18 +544,32 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
544
544
  context.hooks.afterOrderChanges();
545
545
  }
546
546
  }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.order]);
547
+ var sheetColorSig = (0, _react.useMemo)(function () {
548
+ var _a;
549
+ return ((_a = context === null || context === void 0 ? void 0 : context.luckysheetfile) !== null && _a !== void 0 ? _a : []).map(function (s) {
550
+ var _a;
551
+ return "".concat(s.id, ":").concat((_a = s.color) !== null && _a !== void 0 ? _a : "");
552
+ }).join("|");
553
+ }, [context === null || context === void 0 ? void 0 : context.luckysheetfile]);
547
554
  (0, _react.useEffect)(function () {
548
555
  var _a;
549
556
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterColorChanges) {
550
557
  context.hooks.afterColorChanges();
551
558
  }
552
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.color]);
559
+ }, [sheetColorSig]);
560
+ var sheetHideSig = (0, _react.useMemo)(function () {
561
+ var _a;
562
+ return ((_a = context === null || context === void 0 ? void 0 : context.luckysheetfile) !== null && _a !== void 0 ? _a : []).map(function (s) {
563
+ var _a;
564
+ return "".concat(s.id, ":").concat((_a = s.hide) !== null && _a !== void 0 ? _a : 0);
565
+ }).join("|");
566
+ }, [context === null || context === void 0 ? void 0 : context.luckysheetfile]);
553
567
  (0, _react.useEffect)(function () {
554
568
  var _a;
555
569
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterHideChanges) {
556
570
  context.hooks.afterHideChanges();
557
571
  }
558
- }, [currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.hide]);
572
+ }, [sheetHideSig]);
559
573
  (0, _react.useEffect)(function () {
560
574
  var _a;
561
575
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.afterConfigChanges) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.3.10-yjs-6",
3
+ "version": "1.3.10-yjs-7",
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.3.10-yjs-6",
19
+ "@fileverse-dev/fortune-core": "1.3.10-yjs-7",
20
20
  "@fileverse/ui": "5.0.0",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",