@fileverse-dev/fortune-react 1.1.92 → 1.1.94
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.
|
@@ -58,13 +58,16 @@ var DataVerification = function DataVerification() {
|
|
|
58
58
|
});
|
|
59
59
|
}, [optionItems]);
|
|
60
60
|
useEffect(function () {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
62
62
|
var selectRow = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.row) === null || _c === void 0 ? void 0 : _c[0];
|
|
63
63
|
var selectCol = (_f = (_e = (_d = context.luckysheet_select_save) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.column) === null || _f === void 0 ? void 0 : _f[0];
|
|
64
64
|
var sheetIndex = getSheetIndex();
|
|
65
|
-
|
|
66
|
-
var
|
|
67
|
-
|
|
65
|
+
console.log('sheetIndex', sheetIndex);
|
|
66
|
+
var dataVerificationInfo = (_h = (_g = context.luckysheetfile[sheetIndex]) === null || _g === void 0 ? void 0 : _g.dataVerification) !== null && _h !== void 0 ? _h : {};
|
|
67
|
+
console.log('dataVerificationInfo', dataVerificationInfo);
|
|
68
|
+
if (!dataVerificationInfo) return;
|
|
69
|
+
var value = (_j = dataVerificationInfo === null || dataVerificationInfo === void 0 ? void 0 : dataVerificationInfo["".concat(selectRow, "_").concat(selectCol)]) === null || _j === void 0 ? void 0 : _j.value1;
|
|
70
|
+
var color = (_k = dataVerificationInfo === null || dataVerificationInfo === void 0 ? void 0 : dataVerificationInfo["".concat(selectRow, "_").concat(selectCol)]) === null || _k === void 0 ? void 0 : _k.color;
|
|
68
71
|
if (value && color) {
|
|
69
72
|
var colorValues = color === null || color === void 0 ? void 0 : color.split(",").map(function (v) {
|
|
70
73
|
return v.trim();
|
|
@@ -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";
|
|
@@ -136,6 +137,7 @@ import SVGIcon from "../SVGIcon";
|
|
|
136
137
|
import { useDialog } from "../../hooks/useDialog";
|
|
137
138
|
import { SplitColumn } from "../SplitColumn";
|
|
138
139
|
import { LocationCondition } from "../LocationCondition";
|
|
140
|
+
import DataVerification from "../DataVerification";
|
|
139
141
|
import ConditionalFormat from "../ConditionFormat";
|
|
140
142
|
import CustomButton from "./CustomButton";
|
|
141
143
|
import { CustomColor } from "./CustomColor";
|
|
@@ -966,6 +968,15 @@ var Toolbar = function Toolbar(_a) {
|
|
|
966
968
|
onClick: function onClick() {
|
|
967
969
|
var _a;
|
|
968
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);
|
|
969
980
|
}
|
|
970
981
|
});
|
|
971
982
|
}
|
|
@@ -67,13 +67,16 @@ var DataVerification = function DataVerification() {
|
|
|
67
67
|
});
|
|
68
68
|
}, [optionItems]);
|
|
69
69
|
(0, _react.useEffect)(function () {
|
|
70
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
71
71
|
var selectRow = (_c = (_b = (_a = context.luckysheet_select_save) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.row) === null || _c === void 0 ? void 0 : _c[0];
|
|
72
72
|
var selectCol = (_f = (_e = (_d = context.luckysheet_select_save) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.column) === null || _f === void 0 ? void 0 : _f[0];
|
|
73
73
|
var sheetIndex = getSheetIndex();
|
|
74
|
-
|
|
75
|
-
var
|
|
76
|
-
|
|
74
|
+
console.log('sheetIndex', sheetIndex);
|
|
75
|
+
var dataVerificationInfo = (_h = (_g = context.luckysheetfile[sheetIndex]) === null || _g === void 0 ? void 0 : _g.dataVerification) !== null && _h !== void 0 ? _h : {};
|
|
76
|
+
console.log('dataVerificationInfo', dataVerificationInfo);
|
|
77
|
+
if (!dataVerificationInfo) return;
|
|
78
|
+
var value = (_j = dataVerificationInfo === null || dataVerificationInfo === void 0 ? void 0 : dataVerificationInfo["".concat(selectRow, "_").concat(selectCol)]) === null || _j === void 0 ? void 0 : _j.value1;
|
|
79
|
+
var color = (_k = dataVerificationInfo === null || dataVerificationInfo === void 0 ? void 0 : dataVerificationInfo["".concat(selectRow, "_").concat(selectCol)]) === null || _k === void 0 ? void 0 : _k.color;
|
|
77
80
|
if (value && color) {
|
|
78
81
|
var colorValues = color === null || color === void 0 ? void 0 : color.split(",").map(function (v) {
|
|
79
82
|
return v.trim();
|
|
@@ -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");
|
|
@@ -19,6 +20,7 @@ var _SVGIcon = _interopRequireDefault(require("../SVGIcon"));
|
|
|
19
20
|
var _useDialog = require("../../hooks/useDialog");
|
|
20
21
|
var _SplitColumn = require("../SplitColumn");
|
|
21
22
|
var _LocationCondition = require("../LocationCondition");
|
|
23
|
+
var _DataVerification = _interopRequireDefault(require("../DataVerification"));
|
|
22
24
|
var _ConditionFormat = _interopRequireDefault(require("../ConditionFormat"));
|
|
23
25
|
var _CustomButton = _interopRequireDefault(require("./CustomButton"));
|
|
24
26
|
var _CustomColor = require("./CustomColor");
|
|
@@ -975,6 +977,15 @@ var Toolbar = function Toolbar(_a) {
|
|
|
975
977
|
onClick: function onClick() {
|
|
976
978
|
var _a;
|
|
977
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);
|
|
978
989
|
}
|
|
979
990
|
});
|
|
980
991
|
}
|
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.94",
|
|
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.94",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|