@fileverse-dev/fortune-react 1.2.95-ydoc → 1.2.95-ydoc-1

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.
@@ -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
- }) => void;
17
+ }, callAfterUpdate?: boolean) => void;
18
18
  setCellError: (row: number, column: number, errorMessage: {
19
19
  title: string;
20
20
  message: string;
@@ -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) {
137
+ setCellValue: function setCellValue(row, column, value, options, callAfterUpdate) {
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);
142
+ return api.setCellValue(draftCtx, row, column, value, cellInput, options, callAfterUpdate);
143
143
  });
144
144
  },
145
145
  setCellError: function setCellError(row, column, errorMessage) {
@@ -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
- }) => void;
24
+ }, callAfterUpdate?: boolean | undefined) => void;
25
25
  setCellError: (row: number, column: number, errorMessage: {
26
26
  title: string;
27
27
  message: string;
@@ -450,6 +450,18 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
450
450
  context.hooks.afterShowGridLinesChange();
451
451
  }
452
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]);
453
465
  useEffect(function () {
454
466
  var _a;
455
467
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.dataVerificationChange) {
@@ -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
- }) => void;
17
+ }, callAfterUpdate?: boolean) => void;
18
18
  setCellError: (row: number, column: number, errorMessage: {
19
19
  title: string;
20
20
  message: string;
@@ -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) {
144
+ setCellValue: function setCellValue(row, column, value, options, callAfterUpdate) {
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);
149
+ return _fortuneCore.api.setCellValue(draftCtx, row, column, value, cellInput, options, callAfterUpdate);
150
150
  });
151
151
  },
152
152
  setCellError: function setCellError(row, column, errorMessage) {
@@ -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
- }) => void;
24
+ }, callAfterUpdate?: boolean | undefined) => void;
25
25
  setCellError: (row: number, column: number, errorMessage: {
26
26
  title: string;
27
27
  message: string;
@@ -459,6 +459,18 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
459
459
  context.hooks.afterShowGridLinesChange();
460
460
  }
461
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]);
462
474
  (0, _react.useEffect)(function () {
463
475
  var _a;
464
476
  if ((_a = context === null || context === void 0 ? void 0 : context.hooks) === null || _a === void 0 ? void 0 : _a.dataVerificationChange) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.95-ydoc",
3
+ "version": "1.2.95-ydoc-1",
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.95-ydoc",
19
+ "@fileverse-dev/fortune-core": "1.2.95-ydoc-1",
20
20
  "@fileverse/ui": "5.0.0",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",