@fileverse-dev/fortune-react 1.2.46 → 1.2.47

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 { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache, LiveQueryData } from "@fileverse-dev/fortune-core";
2
2
  import { getCryptoPrice } from "../../utils/cryptoApi";
3
3
  import { SetContextOptions } from "../../context";
4
+ import { useDialog } from "../../hooks/useDialog";
4
5
  export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null, refs: any): {
5
6
  applyOp: (ops: Op[]) => void;
6
7
  getCryptoPrice: typeof getCryptoPrice;
@@ -1192,6 +1193,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
1192
1193
  getWorkbookSetContext: () => (recipe: (ctx: Context) => void, options?: SetContextOptions) => void;
1193
1194
  getSettings: () => Required<Settings>;
1194
1195
  getRefs: () => any;
1195
- getShowDialog: () => (content: import("react").ReactNode, type?: "ok" | "yesno" | undefined, title?: import("react").ReactNode, okLabel?: string | undefined, cancelLabel?: string | undefined, onOk?: () => void, onCancel?: () => void) => void;
1196
+ getShowDialog: () => typeof useDialog;
1196
1197
  getSplitColComponent: () => import("react").FC<{}>;
1197
1198
  };
@@ -443,8 +443,7 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
443
443
  return refs;
444
444
  },
445
445
  getShowDialog: function getShowDialog() {
446
- var showDialog = useDialog().showDialog;
447
- return showDialog;
446
+ return useDialog;
448
447
  },
449
448
  getSplitColComponent: function getSplitColComponent() {
450
449
  return SplitColumn;
@@ -1200,7 +1200,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
1200
1200
  getWorkbookSetContext: () => (recipe: (ctx: Context) => void, options?: SetContextOptions | undefined) => void;
1201
1201
  getSettings: () => Required<Settings>;
1202
1202
  getRefs: () => any;
1203
- getShowDialog: () => (content: React.ReactNode, type?: "ok" | "yesno" | undefined, title?: React.ReactNode, okLabel?: string | undefined, cancelLabel?: string | undefined, onOk?: () => void, onCancel?: () => void) => void;
1203
+ getShowDialog: () => typeof import("../../hooks/useDialog").useDialog;
1204
1204
  getSplitColComponent: () => React.FC<{}>;
1205
1205
  }>>;
1206
1206
  export default Workbook;
@@ -1,6 +1,7 @@
1
1
  import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache, LiveQueryData } from "@fileverse-dev/fortune-core";
2
2
  import { getCryptoPrice } from "../../utils/cryptoApi";
3
3
  import { SetContextOptions } from "../../context";
4
+ import { useDialog } from "../../hooks/useDialog";
4
5
  export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required<Settings>, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null, refs: any): {
5
6
  applyOp: (ops: Op[]) => void;
6
7
  getCryptoPrice: typeof getCryptoPrice;
@@ -1192,6 +1193,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
1192
1193
  getWorkbookSetContext: () => (recipe: (ctx: Context) => void, options?: SetContextOptions) => void;
1193
1194
  getSettings: () => Required<Settings>;
1194
1195
  getRefs: () => any;
1195
- getShowDialog: () => (content: import("react").ReactNode, type?: "ok" | "yesno" | undefined, title?: import("react").ReactNode, okLabel?: string | undefined, cancelLabel?: string | undefined, onOk?: () => void, onCancel?: () => void) => void;
1196
+ getShowDialog: () => typeof useDialog;
1196
1197
  getSplitColComponent: () => import("react").FC<{}>;
1197
1198
  };
@@ -450,8 +450,7 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
450
450
  return refs;
451
451
  },
452
452
  getShowDialog: function getShowDialog() {
453
- var showDialog = (0, _useDialog.useDialog)().showDialog;
454
- return showDialog;
453
+ return _useDialog.useDialog;
455
454
  },
456
455
  getSplitColComponent: function getSplitColComponent() {
457
456
  return _SplitColumn.SplitColumn;
@@ -1200,7 +1200,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
1200
1200
  getWorkbookSetContext: () => (recipe: (ctx: Context) => void, options?: SetContextOptions | undefined) => void;
1201
1201
  getSettings: () => Required<Settings>;
1202
1202
  getRefs: () => any;
1203
- getShowDialog: () => (content: React.ReactNode, type?: "ok" | "yesno" | undefined, title?: React.ReactNode, okLabel?: string | undefined, cancelLabel?: string | undefined, onOk?: () => void, onCancel?: () => void) => void;
1203
+ getShowDialog: () => typeof import("../../hooks/useDialog").useDialog;
1204
1204
  getSplitColComponent: () => React.FC<{}>;
1205
1205
  }>>;
1206
1206
  export default Workbook;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.46",
3
+ "version": "1.2.47",
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.45",
19
+ "@fileverse-dev/fortune-core": "1.2.46",
20
20
  "@fileverse/ui": "^4.1.7-patch-40",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",