@fileverse-dev/dsheet 1.2.85-ydoc-2 → 1.2.85-ydoc-8

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.
@@ -5,6 +5,7 @@ import { DataBlockApiKeyHandlerType, SheetUpdateData } from '../types';
5
5
 
6
6
  import * as Y from 'yjs';
7
7
  export interface EditorContextType {
8
+ handleOnChangePortalUpdate: (data: Sheet[]) => void;
8
9
  setSelectedTemplate?: React.Dispatch<React.SetStateAction<string>>;
9
10
  setShowSmartContractModal?: React.Dispatch<React.SetStateAction<boolean>>;
10
11
  getDocumentTitle?: () => string;
@@ -0,0 +1,17 @@
1
+ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
2
+
3
+ import * as Y from 'yjs';
4
+ /**
5
+ * Verifies the integrity of sheet data in a YDoc against a given sheet editor instance.
6
+ * This function is used to verify that the sheet data in a YDoc matches the data in a sheet editor instance.
7
+ * @param {Object} options
8
+ * @param {React.RefObject<WorkbookInstance | null>} options.sheetEditorRef - Reference to the sheet editor instance
9
+ * @param {React.RefObject<Y.Doc | null>} options.ydocRef - Reference to the YDoc instance
10
+ * @returns {void}
11
+ */
12
+ export declare const calcChainYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal }: {
13
+ sheetEditorRef: React.RefObject<WorkbookInstance | null>;
14
+ ydocRef: React.RefObject<Y.Doc | null>;
15
+ dsheetId: string;
16
+ handleContentPortal?: any;
17
+ }) => void;
@@ -0,0 +1,17 @@
1
+ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
2
+
3
+ import * as Y from 'yjs';
4
+ /**
5
+ * Verifies the integrity of sheet data in a YDoc against a given sheet editor instance.
6
+ * This function is used to verify that the sheet data in a YDoc matches the data in a sheet editor instance.
7
+ * @param {Object} options
8
+ * @param {React.RefObject<WorkbookInstance | null>} options.sheetEditorRef - Reference to the sheet editor instance
9
+ * @param {React.RefObject<Y.Doc | null>} options.ydocRef - Reference to the YDoc instance
10
+ * @returns {void}
11
+ */
12
+ export declare const conditionFormatYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal }: {
13
+ sheetEditorRef: React.RefObject<WorkbookInstance | null>;
14
+ ydocRef: React.RefObject<Y.Doc | null>;
15
+ dsheetId: string;
16
+ handleContentPortal?: any;
17
+ }) => void;
@@ -0,0 +1,18 @@
1
+ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
2
+
3
+ import * as Y from 'yjs';
4
+ /**
5
+ * Verifies the integrity of sheet data in a YDoc against a given sheet editor instance.
6
+ * This function is used to verify that the sheet data in a YDoc matches the data in a sheet editor instance.
7
+ * @param {Object} options
8
+ * @param {React.RefObject<WorkbookInstance | null>} options.sheetEditorRef - Reference to the sheet editor instance
9
+ * @param {React.RefObject<Y.Doc | null>} options.ydocRef - Reference to the YDoc instance
10
+ * @returns {void}
11
+ */
12
+ export declare const dataBlockListYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal, dataBlockCalcFunction }: {
13
+ sheetEditorRef: React.RefObject<WorkbookInstance | null>;
14
+ ydocRef: React.RefObject<Y.Doc | null>;
15
+ dsheetId: string;
16
+ handleContentPortal?: any;
17
+ dataBlockCalcFunction?: any;
18
+ }) => void;
@@ -0,0 +1,17 @@
1
+ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
2
+
3
+ import * as Y from 'yjs';
4
+ /**
5
+ * Verifies the integrity of sheet data in a YDoc against a given sheet editor instance.
6
+ * This function is used to verify that the sheet data in a YDoc matches the data in a sheet editor instance.
7
+ * @param {Object} options
8
+ * @param {React.RefObject<WorkbookInstance | null>} options.sheetEditorRef - Reference to the sheet editor instance
9
+ * @param {React.RefObject<Y.Doc | null>} options.ydocRef - Reference to the YDoc instance
10
+ * @returns {void}
11
+ */
12
+ export declare const dataVerificationYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal }: {
13
+ sheetEditorRef: React.RefObject<WorkbookInstance | null>;
14
+ ydocRef: React.RefObject<Y.Doc | null>;
15
+ dsheetId: string;
16
+ handleContentPortal?: any;
17
+ }) => void;
@@ -22,5 +22,17 @@ type DiffResult<T> = {
22
22
  removed: T[];
23
23
  updated: UpdatedItem<T>[];
24
24
  };
25
- export declare function diffObjectArrays<T extends Record<string, any>>(oldArr: readonly T[], newArr: readonly T[], getKey: (item: T) => string): DiffResult<T>;
25
+ export declare function diffObjectArrays<T extends Record<string, any>>(oldArr: readonly T[], newArr: readonly T[], getKey?: (item: T) => string): DiffResult<T>;
26
+ type UpdatedEntry<T> = {
27
+ key: string;
28
+ before: T;
29
+ after: T;
30
+ changes: Partial<Record<keyof T, DiffChange<any>>>;
31
+ };
32
+ type ObjectDiffResult<T> = {
33
+ added: Record<string, T>;
34
+ removed: Record<string, T>;
35
+ updated: UpdatedEntry<T>[];
36
+ };
37
+ export declare function diffObjectMap<T extends Record<string, any>>(oldObj: Record<string, T>, newObj: Record<string, T>): ObjectDiffResult<T>;
26
38
  export {};
@@ -0,0 +1,17 @@
1
+ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
2
+
3
+ import * as Y from 'yjs';
4
+ /**
5
+ * Verifies the integrity of sheet data in a YDoc against a given sheet editor instance.
6
+ * This function is used to verify that the sheet data in a YDoc matches the data in a sheet editor instance.
7
+ * @param {Object} options
8
+ * @param {React.RefObject<WorkbookInstance | null>} options.sheetEditorRef - Reference to the sheet editor instance
9
+ * @param {React.RefObject<Y.Doc | null>} options.ydocRef - Reference to the YDoc instance
10
+ * @returns {void}
11
+ */
12
+ export declare const hyperlinkYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal }: {
13
+ sheetEditorRef: React.RefObject<WorkbookInstance | null>;
14
+ ydocRef: React.RefObject<Y.Doc | null>;
15
+ dsheetId: string;
16
+ handleContentPortal?: any;
17
+ }) => void;
@@ -0,0 +1,17 @@
1
+ import { WorkbookInstance } from '@fileverse-dev/fortune-react';
2
+
3
+ import * as Y from 'yjs';
4
+ /**
5
+ * Verifies the integrity of sheet data in a YDoc against a given sheet editor instance.
6
+ * This function is used to verify that the sheet data in a YDoc matches the data in a sheet editor instance.
7
+ * @param {Object} options
8
+ * @param {React.RefObject<WorkbookInstance | null>} options.sheetEditorRef - Reference to the sheet editor instance
9
+ * @param {React.RefObject<Y.Doc | null>} options.ydocRef - Reference to the YDoc instance
10
+ * @returns {void}
11
+ */
12
+ export declare const liveQueryListYdocUpdate: ({ sheetEditorRef, ydocRef, dsheetId, handleContentPortal }: {
13
+ sheetEditorRef: React.RefObject<WorkbookInstance | null>;
14
+ ydocRef: React.RefObject<Y.Doc | null>;
15
+ dsheetId: string;
16
+ handleContentPortal?: any;
17
+ }) => void;
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.2.85-ydoc-2",
5
+ "version": "1.2.85-ydoc-8",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@fileverse-dev/dsheets-templates": "^0.0.29",
37
37
  "@fileverse-dev/formulajs": "4.4.46",
38
- "@fileverse-dev/fortune-react": "1.2.90-ydoc-2",
38
+ "@fileverse-dev/fortune-react": "1.2.90-ydoc-10",
39
39
  "@fileverse/ui": "^4.1.7-patch-40",
40
40
  "classnames": "^2.5.1",
41
41
  "exceljs": "^4.4.0",