@fileverse-dev/dsheet 1.0.42 → 1.0.43

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.
@@ -1,6 +1,7 @@
1
1
  import { Sheet, Cell } from '@fileverse-dev/fortune-core';
2
2
  import { RefObject } from 'react';
3
3
  import { WorkbookInstance } from '@fileverse-dev/fortune-react';
4
+ import { ERROR_MESSAGES_FLAG } from '@fileverse-dev/formulajs/crypto-constants';
4
5
 
5
6
  import * as Y from 'yjs';
6
7
  export interface SheetUpdateData {
@@ -20,7 +21,7 @@ export type OnboardingHandlerType = (params: {
20
21
  column: number;
21
22
  };
22
23
  export type DataBlockApiKeyHandlerType = (params: {
23
- data: string;
24
+ data: ErrorMessageHandlerReturnType;
24
25
  sheetEditorRef: React.RefObject<WorkbookInstance | null>;
25
26
  executeStringFunction: (functionCallString: string) => Promise<unknown>;
26
27
  row: number;
@@ -64,3 +65,20 @@ export interface DsheetProps {
64
65
  onDuneChartEmbed?: () => void;
65
66
  onSheetCountChange?: (sheetCount: number) => void;
66
67
  }
68
+ type BaseError = {
69
+ message: string;
70
+ functionName?: string;
71
+ type: string;
72
+ };
73
+ type CustomError = BaseError & {
74
+ type: typeof ERROR_MESSAGES_FLAG.CUSTOM;
75
+ reason: string;
76
+ };
77
+ export type NetworkError = BaseError & {
78
+ type: typeof ERROR_MESSAGES_FLAG.NETWORK_ERROR | typeof ERROR_MESSAGES_FLAG.RATE_LIMIT;
79
+ };
80
+ export type DefaultError = BaseError & {
81
+ reason: string;
82
+ };
83
+ export type ErrorMessageHandlerReturnType = BaseError | CustomError | NetworkError | DefaultError;
84
+ export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/dsheet",
3
3
  "private": false,
4
4
  "description": "DSheet",
5
- "version": "1.0.42",
5
+ "version": "1.0.43",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -34,10 +34,10 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@fileverse-dev/dsheets-templates": "^0.0.17",
37
- "@fileverse-dev/formula-parser": "^0.2.19",
38
- "@fileverse-dev/formulajs": "^4.4.11-mod-64",
39
- "@fileverse-dev/fortune-core": "^1.0.23",
40
- "@fileverse-dev/fortune-react": "^1.0.23",
37
+ "@fileverse-dev/formula-parser": "^0.2.21",
38
+ "@fileverse-dev/formulajs": "^4.4.11-mod-67",
39
+ "@fileverse-dev/fortune-core": "^1.0.25",
40
+ "@fileverse-dev/fortune-react": "^1.0.25",
41
41
  "@fileverse/ui": "^4.1.7-patch-18",
42
42
  "classnames": "^2.5.1",
43
43
  "exceljs": "^4.4.0",