@fileverse-dev/fortune-react 1.1.91 → 1.1.93
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.
- package/es/components/Toolbar/index.js +10 -3
- package/es/components/Workbook/api.d.ts +1 -0
- package/es/components/Workbook/api.js +2 -0
- package/es/components/Workbook/index.d.ts +1 -0
- package/lib/components/Toolbar/index.js +10 -3
- package/lib/components/Workbook/api.d.ts +1 -0
- package/lib/components/Workbook/api.js +2 -0
- package/lib/components/Workbook/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -123,6 +123,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
123
123
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
124
124
|
};
|
|
125
125
|
import React, { useContext, useCallback, useRef, useEffect, useState } from "react";
|
|
126
|
+
import ReactDOM from 'react-dom/client';
|
|
126
127
|
import { toolbarItemClickHandler, handleTextBackground, handleTextColor, handleTextSize, normalizedCellAttr, getFlowdata, newComment, editComment, deleteComment, showHideComment, showHideAllComments, autoSelectionFormula, handleSum, locale, handleMerge, handleBorder, toolbarItemSelectedFunc, handleFreeze, insertImage, showImgChooser, updateFormat, handleSort, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, createFilter, clearFilter, applyLocation, insertDuneChart } from "@fileverse-dev/fortune-core";
|
|
127
128
|
import _ from "lodash";
|
|
128
129
|
import { IconButton, LucideIcon, Tooltip, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@fileverse/ui";
|
|
@@ -534,9 +535,6 @@ var Toolbar = function Toolbar(_a) {
|
|
|
534
535
|
subMenu.style.display = "none";
|
|
535
536
|
}, []);
|
|
536
537
|
useEffect(function () {
|
|
537
|
-
window.getDataValidationComponent = function () {
|
|
538
|
-
return /*#__PURE__*/React.createElement(DataVerification, null);
|
|
539
|
-
};
|
|
540
538
|
var handleResize = function handleResize() {
|
|
541
539
|
setIsDesktop(window.innerWidth >= 1280);
|
|
542
540
|
};
|
|
@@ -970,6 +968,15 @@ var Toolbar = function Toolbar(_a) {
|
|
|
970
968
|
onClick: function onClick() {
|
|
971
969
|
var _a;
|
|
972
970
|
(_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
971
|
+
setTimeout(function () {
|
|
972
|
+
var target = document.getElementById('placeholder-data-validation');
|
|
973
|
+
console.log("Target for DataValidation:", target);
|
|
974
|
+
console.log("DataValidationComponent:", DataVerification);
|
|
975
|
+
if (target) {
|
|
976
|
+
var root = ReactDOM.createRoot(target);
|
|
977
|
+
root.render(/*#__PURE__*/React.createElement(DataVerification, null));
|
|
978
|
+
}
|
|
979
|
+
}, 100);
|
|
973
980
|
}
|
|
974
981
|
});
|
|
975
982
|
}
|
|
@@ -4,6 +4,7 @@ import { SetContextOptions } from "../../context";
|
|
|
4
4
|
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): {
|
|
5
5
|
applyOp: (ops: Op[]) => void;
|
|
6
6
|
getCryptoPrice: typeof getCryptoPrice;
|
|
7
|
+
DataVerificationComponent: import("react").FC<{}>;
|
|
7
8
|
getCellValue: (row: number, column: number, options?: api.CommonOptions & {
|
|
8
9
|
type?: keyof Cell;
|
|
9
10
|
}) => any;
|
|
@@ -9,6 +9,7 @@ var __assign = this && this.__assign || function () {
|
|
|
9
9
|
return __assign.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
import { addSheet, api, deleteRowCol, deleteSheet, insertRowCol, opToPatch, createFilterOptions, getSheetIndex, locale, setCaretPosition, newComment } from "@fileverse-dev/fortune-core";
|
|
12
|
+
import DataVerification from "../DataVerification";
|
|
12
13
|
import { applyPatches } from "immer";
|
|
13
14
|
import _ from "lodash";
|
|
14
15
|
import { getCryptoPrice } from "../../utils/cryptoApi";
|
|
@@ -66,6 +67,7 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
|
|
|
66
67
|
});
|
|
67
68
|
},
|
|
68
69
|
getCryptoPrice: getCryptoPrice,
|
|
70
|
+
DataVerificationComponent: DataVerification,
|
|
69
71
|
getCellValue: function getCellValue(row, column, options) {
|
|
70
72
|
if (options === void 0) {
|
|
71
73
|
options = {};
|
|
@@ -11,6 +11,7 @@ type AdditionalProps = {
|
|
|
11
11
|
declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
|
|
12
12
|
applyOp: (ops: Op[]) => void;
|
|
13
13
|
getCryptoPrice: typeof getCryptoPrice;
|
|
14
|
+
DataVerificationComponent: React.FC<{}>;
|
|
14
15
|
getCellValue: (row: number, column: number, options?: api.CommonOptions & {
|
|
15
16
|
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;
|
|
16
17
|
}) => any;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getLucideIcon = exports.default = exports.CurrencySelector = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _client = _interopRequireDefault(require("react-dom/client"));
|
|
9
10
|
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
10
11
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
12
|
var _ui = require("@fileverse/ui");
|
|
@@ -543,9 +544,6 @@ var Toolbar = function Toolbar(_a) {
|
|
|
543
544
|
subMenu.style.display = "none";
|
|
544
545
|
}, []);
|
|
545
546
|
(0, _react.useEffect)(function () {
|
|
546
|
-
window.getDataValidationComponent = function () {
|
|
547
|
-
return /*#__PURE__*/_react.default.createElement(_DataVerification.default, null);
|
|
548
|
-
};
|
|
549
547
|
var handleResize = function handleResize() {
|
|
550
548
|
setIsDesktop(window.innerWidth >= 1280);
|
|
551
549
|
};
|
|
@@ -979,6 +977,15 @@ var Toolbar = function Toolbar(_a) {
|
|
|
979
977
|
onClick: function onClick() {
|
|
980
978
|
var _a;
|
|
981
979
|
(_a = document.getElementById("data-verification-button")) === null || _a === void 0 ? void 0 : _a.click();
|
|
980
|
+
setTimeout(function () {
|
|
981
|
+
var target = document.getElementById('placeholder-data-validation');
|
|
982
|
+
console.log("Target for DataValidation:", target);
|
|
983
|
+
console.log("DataValidationComponent:", _DataVerification.default);
|
|
984
|
+
if (target) {
|
|
985
|
+
var root = _client.default.createRoot(target);
|
|
986
|
+
root.render(/*#__PURE__*/_react.default.createElement(_DataVerification.default, null));
|
|
987
|
+
}
|
|
988
|
+
}, 100);
|
|
982
989
|
}
|
|
983
990
|
});
|
|
984
991
|
}
|
|
@@ -4,6 +4,7 @@ import { SetContextOptions } from "../../context";
|
|
|
4
4
|
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): {
|
|
5
5
|
applyOp: (ops: Op[]) => void;
|
|
6
6
|
getCryptoPrice: typeof getCryptoPrice;
|
|
7
|
+
DataVerificationComponent: import("react").FC<{}>;
|
|
7
8
|
getCellValue: (row: number, column: number, options?: api.CommonOptions & {
|
|
8
9
|
type?: keyof Cell;
|
|
9
10
|
}) => any;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.generateAPIs = generateAPIs;
|
|
7
7
|
var _fortuneCore = require("@fileverse-dev/fortune-core");
|
|
8
|
+
var _DataVerification = _interopRequireDefault(require("../DataVerification"));
|
|
8
9
|
var _immer = require("immer");
|
|
9
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
11
|
var _cryptoApi = require("../../utils/cryptoApi");
|
|
@@ -73,6 +74,7 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
|
|
|
73
74
|
});
|
|
74
75
|
},
|
|
75
76
|
getCryptoPrice: _cryptoApi.getCryptoPrice,
|
|
77
|
+
DataVerificationComponent: _DataVerification.default,
|
|
76
78
|
getCellValue: function getCellValue(row, column, options) {
|
|
77
79
|
if (options === void 0) {
|
|
78
80
|
options = {};
|
|
@@ -11,6 +11,7 @@ type AdditionalProps = {
|
|
|
11
11
|
declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalProps & React.RefAttributes<{
|
|
12
12
|
applyOp: (ops: Op[]) => void;
|
|
13
13
|
getCryptoPrice: typeof getCryptoPrice;
|
|
14
|
+
DataVerificationComponent: React.FC<{}>;
|
|
14
15
|
getCellValue: (row: number, column: number, options?: api.CommonOptions & {
|
|
15
16
|
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;
|
|
16
17
|
}) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.93",
|
|
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.1.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.1.93",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|