@fileverse-dev/fortune-react 1.0.88-patch-7 → 1.0.88-patch-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.
- package/es/components/SheetOverlay/FormulaHint/index.js +3 -3
- package/es/components/SheetOverlay/FormulaHint/use-gnosis-pay.js +12 -8
- package/es/components/SheetOverlay/FormulaHint/utils/utils.d.ts +1 -1
- package/es/components/SheetOverlay/FormulaHint/utils/utils.js +12 -4
- package/es/components/SheetOverlay/FormulaSearch/index.js +5 -2
- package/es/components/SheetOverlay/InputBox.js +5 -1
- package/es/components/index.d.ts +1 -1
- package/es/components/index.js +1 -1
- package/lib/components/SheetOverlay/FormulaHint/index.js +3 -3
- package/lib/components/SheetOverlay/FormulaHint/use-gnosis-pay.js +11 -7
- package/lib/components/SheetOverlay/FormulaHint/utils/utils.d.ts +1 -1
- package/lib/components/SheetOverlay/FormulaHint/utils/utils.js +13 -5
- package/lib/components/SheetOverlay/FormulaSearch/index.js +4 -1
- package/lib/components/SheetOverlay/InputBox.js +5 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +6 -0
- package/package.json +2 -2
|
@@ -211,7 +211,7 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
211
211
|
style: {
|
|
212
212
|
backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
|
|
213
213
|
maxHeight: "318px",
|
|
214
|
-
overflowY: "
|
|
214
|
+
overflowY: "auto"
|
|
215
215
|
}
|
|
216
216
|
}, fn.API_KEY && (/*#__PURE__*/React.createElement("div", {
|
|
217
217
|
style: {
|
|
@@ -286,12 +286,12 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
286
286
|
margin: "0 0 8px 0"
|
|
287
287
|
},
|
|
288
288
|
className: "text-heading-xsm color-text-default"
|
|
289
|
-
}, hasGnosisPayToken ? "Access granted" : "
|
|
289
|
+
}, hasGnosisPayToken ? "Access granted" : "Connect your Gnosis Pay account")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
290
290
|
style: {
|
|
291
291
|
margin: "0 0 8px 0"
|
|
292
292
|
},
|
|
293
293
|
className: "text-body-sm color-text-default"
|
|
294
|
-
}, !hasGnosisPayToken ? "
|
|
294
|
+
}, !hasGnosisPayToken ? "Grant access to your Gnosis Pay account and ensure you're using the same wallet for both Gnosis Pay and dSheet." : " You can now interact with your Gnosis Pay account for the next ".concat(timeFromNowMessage(timeLeft), ". When the timer\u2019s up, just re-grant access and you're good to go!")), /*#__PURE__*/React.createElement(Button, {
|
|
295
295
|
onClick: grantAccess,
|
|
296
296
|
disabled: hasGnosisPayToken || isWrongGnosisPayConnector || isLoading,
|
|
297
297
|
className: "w-full items-center flex gap-1"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { isGnosisPayAccessExpired } from "@fileverse-dev/formulajs/crypto-constants";
|
|
2
3
|
import { GNOSIS_PAY_ACCESS } from "./constants";
|
|
3
|
-
import { formatTimeLeft,
|
|
4
|
+
import { formatTimeLeft, getJwtExpiry } from "./utils/utils";
|
|
4
5
|
var useGnosisPay = function useGnosisPay(fn) {
|
|
5
6
|
var gnosisTokenTokenIntervalRef = useRef(null);
|
|
6
7
|
var _a = useState(false),
|
|
@@ -18,8 +19,8 @@ var useGnosisPay = function useGnosisPay(fn) {
|
|
|
18
19
|
var isWrongGnosisPayConnector = localStorage.getItem("LOGIN_METHOD") !== "walletAddress";
|
|
19
20
|
var handleGnosisPayToken = function handleGnosisPayToken(onDone) {
|
|
20
21
|
if (localStorage.getItem(GNOSIS_PAY_ACCESS)) {
|
|
21
|
-
var access =
|
|
22
|
-
if (!
|
|
22
|
+
var access = localStorage.getItem(GNOSIS_PAY_ACCESS) || "";
|
|
23
|
+
if (!access || isGnosisPayAccessExpired(access)) {
|
|
23
24
|
if (hasGnosisPayToken) {
|
|
24
25
|
setHasGnosisPayToken(false);
|
|
25
26
|
}
|
|
@@ -29,8 +30,8 @@ var useGnosisPay = function useGnosisPay(fn) {
|
|
|
29
30
|
localStorage.removeItem(GNOSIS_PAY_ACCESS);
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
setHasGnosisPayToken(!!access
|
|
33
|
-
setAccessTokenCreatedAt(access
|
|
33
|
+
setHasGnosisPayToken(!!access);
|
|
34
|
+
setAccessTokenCreatedAt(getJwtExpiry(access));
|
|
34
35
|
onDone === null || onDone === void 0 ? void 0 : onDone();
|
|
35
36
|
} else {
|
|
36
37
|
var urlParams = new URLSearchParams(window.location.search);
|
|
@@ -51,11 +52,14 @@ var useGnosisPay = function useGnosisPay(fn) {
|
|
|
51
52
|
useEffect(function () {
|
|
52
53
|
if (accessTokenCreatedAt <= 0) return function () {};
|
|
53
54
|
var interval = setInterval(function () {
|
|
54
|
-
var
|
|
55
|
-
var expiryTimestamp =
|
|
55
|
+
var access = localStorage.getItem(GNOSIS_PAY_ACCESS) || "";
|
|
56
|
+
var expiryTimestamp = getJwtExpiry(access) * 1000;
|
|
56
57
|
var newTimeLeft = expiryTimestamp - Date.now();
|
|
57
58
|
setTimeLeft(formatTimeLeft(newTimeLeft));
|
|
58
|
-
if (
|
|
59
|
+
if (isGnosisPayAccessExpired(localStorage.getItem(GNOSIS_PAY_ACCESS)) || !document.getElementById("gnosis-pay-area")) {
|
|
60
|
+
localStorage.removeItem(GNOSIS_PAY_ACCESS);
|
|
61
|
+
setHasGnosisPayToken(false);
|
|
62
|
+
setAccessTokenCreatedAt(0);
|
|
59
63
|
clearInterval(interval);
|
|
60
64
|
}
|
|
61
65
|
}, 1000);
|
|
@@ -4,14 +4,22 @@ export function formatTimeLeft(msLeft) {
|
|
|
4
4
|
var seconds = String(totalSeconds % 60).padStart(2, "0");
|
|
5
5
|
return "".concat(minutes, ":").concat(seconds);
|
|
6
6
|
}
|
|
7
|
-
export function isExpired(createdAt) {
|
|
8
|
-
var expiryTs = createdAt + 60 * 60 * 1000;
|
|
9
|
-
return Date.now() > expiryTs;
|
|
10
|
-
}
|
|
11
7
|
export function timeFromNowMessage(expiryStr) {
|
|
12
8
|
if (!expiryStr) {
|
|
13
9
|
return "0 minute";
|
|
14
10
|
}
|
|
15
11
|
var mm = expiryStr.split(":").map(Number)[0];
|
|
16
12
|
return "".concat(mm, " minute").concat(mm !== 1 ? "s" : "");
|
|
13
|
+
}
|
|
14
|
+
export function getJwtExpiry(token) {
|
|
15
|
+
var _a;
|
|
16
|
+
try {
|
|
17
|
+
var payloadBase64 = (_a = token === null || token === void 0 ? void 0 : token.split(".")) === null || _a === void 0 ? void 0 : _a[1];
|
|
18
|
+
if (!payloadBase64) return 0;
|
|
19
|
+
var payloadJson = atob(payloadBase64);
|
|
20
|
+
var payload = JSON.parse(payloadJson);
|
|
21
|
+
return typeof payload.exp === "number" ? payload.exp : 0;
|
|
22
|
+
} catch (error) {
|
|
23
|
+
return 0;
|
|
24
|
+
}
|
|
17
25
|
}
|
|
@@ -10,7 +10,7 @@ var __assign = this && this.__assign || function () {
|
|
|
10
10
|
};
|
|
11
11
|
import _ from "lodash";
|
|
12
12
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
13
|
-
import { LucideIcon, Tooltip } from "@fileverse/ui";
|
|
13
|
+
import { cn, LucideIcon, Tooltip } from "@fileverse/ui";
|
|
14
14
|
import { UNFilter } from "./constant";
|
|
15
15
|
import WorkbookContext from "../../../context";
|
|
16
16
|
import "./index.css";
|
|
@@ -160,6 +160,9 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
160
160
|
return /*#__PURE__*/React.createElement("div", {
|
|
161
161
|
key: v.n,
|
|
162
162
|
"data-func": v.n,
|
|
163
|
+
style: {
|
|
164
|
+
cursor: isWrongGnosisPayConnector && v.n === "GNOSISPAY" ? "not-allowed" : "pointer"
|
|
165
|
+
},
|
|
163
166
|
className: "luckysheet-formula-search-item"
|
|
164
167
|
}, /*#__PURE__*/React.createElement("div", {
|
|
165
168
|
style: {
|
|
@@ -177,7 +180,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
177
180
|
width: "16px"
|
|
178
181
|
}
|
|
179
182
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
180
|
-
className: "luckysheet-formula-search-func color-text-default text-body-sm"
|
|
183
|
+
className: cn("luckysheet-formula-search-func color-text-default text-body-sm", isWrongGnosisPayConnector && v.n === "GNOSISPAY" ? "color-text-disabled" : "")
|
|
181
184
|
}, v.n)), /*#__PURE__*/React.createElement("div", {
|
|
182
185
|
style: {
|
|
183
186
|
display: "flex",
|
|
@@ -169,6 +169,8 @@ var InputBox = function InputBox() {
|
|
|
169
169
|
var selectActiveFormula = useCallback(function (e) {
|
|
170
170
|
var _a, _b;
|
|
171
171
|
var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
172
|
+
var isWrongGnosisPayConnector = localStorage.getItem("LOGIN_METHOD") !== "walletAddress";
|
|
173
|
+
if (isWrongGnosisPayConnector && formulaName === "GNOSISPAY") return;
|
|
172
174
|
if (formulaName) {
|
|
173
175
|
insertSelectedFormula(formulaName);
|
|
174
176
|
e.preventDefault();
|
|
@@ -178,8 +180,10 @@ var InputBox = function InputBox() {
|
|
|
178
180
|
var selectActiveFormulaOnClick = useCallback(function (e) {
|
|
179
181
|
var _a, _b;
|
|
180
182
|
if (e.target.className.includes("sign-fortune")) return;
|
|
181
|
-
preText.current = inputRef.current.innerText;
|
|
182
183
|
var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
184
|
+
var isWrongGnosisPayConnector = localStorage.getItem("LOGIN_METHOD") !== "walletAddress";
|
|
185
|
+
if (isWrongGnosisPayConnector && formulaName === "GNOSISPAY") return;
|
|
186
|
+
preText.current = inputRef.current.innerText;
|
|
183
187
|
if (formulaName) {
|
|
184
188
|
insertSelectedFormula(formulaName);
|
|
185
189
|
e.preventDefault();
|
package/es/components/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Workbook from "./Workbook";
|
|
2
|
-
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from "@fileverse-dev/formulajs/crypto-constants";
|
|
2
|
+
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, isGnosisPayAccessExpired, } from "@fileverse-dev/formulajs/crypto-constants";
|
|
3
3
|
export { Workbook };
|
|
4
4
|
export type { WorkbookInstance } from "./Workbook";
|
|
5
5
|
export type { Cell, Sheet } from "@fileverse-dev/fortune-core";
|
package/es/components/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import Workbook from "./Workbook";
|
|
2
|
-
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY } from "@fileverse-dev/formulajs/crypto-constants";
|
|
2
|
+
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, isGnosisPayAccessExpired } from "@fileverse-dev/formulajs/crypto-constants";
|
|
3
3
|
export { Workbook };
|
|
@@ -220,7 +220,7 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
220
220
|
style: {
|
|
221
221
|
backgroundColor: "".concat(fn.BRAND_COLOR ? fn.BRAND_COLOR : "#F8F9FA"),
|
|
222
222
|
maxHeight: "318px",
|
|
223
|
-
overflowY: "
|
|
223
|
+
overflowY: "auto"
|
|
224
224
|
}
|
|
225
225
|
}, fn.API_KEY && (/*#__PURE__*/_react.default.createElement("div", {
|
|
226
226
|
style: {
|
|
@@ -295,12 +295,12 @@ var FormulaHint = function FormulaHint(props) {
|
|
|
295
295
|
margin: "0 0 8px 0"
|
|
296
296
|
},
|
|
297
297
|
className: "text-heading-xsm color-text-default"
|
|
298
|
-
}, hasGnosisPayToken ? "Access granted" : "
|
|
298
|
+
}, hasGnosisPayToken ? "Access granted" : "Connect your Gnosis Pay account")), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", {
|
|
299
299
|
style: {
|
|
300
300
|
margin: "0 0 8px 0"
|
|
301
301
|
},
|
|
302
302
|
className: "text-body-sm color-text-default"
|
|
303
|
-
}, !hasGnosisPayToken ? "
|
|
303
|
+
}, !hasGnosisPayToken ? "Grant access to your Gnosis Pay account and ensure you're using the same wallet for both Gnosis Pay and dSheet." : " You can now interact with your Gnosis Pay account for the next ".concat((0, _utils.timeFromNowMessage)(timeLeft), ". When the timer\u2019s up, just re-grant access and you're good to go!")), /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
304
304
|
onClick: grantAccess,
|
|
305
305
|
disabled: hasGnosisPayToken || isWrongGnosisPayConnector || isLoading,
|
|
306
306
|
className: "w-full items-center flex gap-1"
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _cryptoConstants = require("@fileverse-dev/formulajs/crypto-constants");
|
|
8
9
|
var _constants = require("./constants");
|
|
9
10
|
var _utils = require("./utils/utils");
|
|
10
11
|
var useGnosisPay = function useGnosisPay(fn) {
|
|
@@ -24,8 +25,8 @@ var useGnosisPay = function useGnosisPay(fn) {
|
|
|
24
25
|
var isWrongGnosisPayConnector = localStorage.getItem("LOGIN_METHOD") !== "walletAddress";
|
|
25
26
|
var handleGnosisPayToken = function handleGnosisPayToken(onDone) {
|
|
26
27
|
if (localStorage.getItem(_constants.GNOSIS_PAY_ACCESS)) {
|
|
27
|
-
var access =
|
|
28
|
-
if (!
|
|
28
|
+
var access = localStorage.getItem(_constants.GNOSIS_PAY_ACCESS) || "";
|
|
29
|
+
if (!access || (0, _cryptoConstants.isGnosisPayAccessExpired)(access)) {
|
|
29
30
|
if (hasGnosisPayToken) {
|
|
30
31
|
setHasGnosisPayToken(false);
|
|
31
32
|
}
|
|
@@ -35,8 +36,8 @@ var useGnosisPay = function useGnosisPay(fn) {
|
|
|
35
36
|
localStorage.removeItem(_constants.GNOSIS_PAY_ACCESS);
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
setHasGnosisPayToken(!!access
|
|
39
|
-
setAccessTokenCreatedAt(
|
|
39
|
+
setHasGnosisPayToken(!!access);
|
|
40
|
+
setAccessTokenCreatedAt((0, _utils.getJwtExpiry)(access));
|
|
40
41
|
onDone === null || onDone === void 0 ? void 0 : onDone();
|
|
41
42
|
} else {
|
|
42
43
|
var urlParams = new URLSearchParams(window.location.search);
|
|
@@ -57,11 +58,14 @@ var useGnosisPay = function useGnosisPay(fn) {
|
|
|
57
58
|
(0, _react.useEffect)(function () {
|
|
58
59
|
if (accessTokenCreatedAt <= 0) return function () {};
|
|
59
60
|
var interval = setInterval(function () {
|
|
60
|
-
var
|
|
61
|
-
var expiryTimestamp =
|
|
61
|
+
var access = localStorage.getItem(_constants.GNOSIS_PAY_ACCESS) || "";
|
|
62
|
+
var expiryTimestamp = (0, _utils.getJwtExpiry)(access) * 1000;
|
|
62
63
|
var newTimeLeft = expiryTimestamp - Date.now();
|
|
63
64
|
setTimeLeft((0, _utils.formatTimeLeft)(newTimeLeft));
|
|
64
|
-
if (
|
|
65
|
+
if ((0, _cryptoConstants.isGnosisPayAccessExpired)(localStorage.getItem(_constants.GNOSIS_PAY_ACCESS)) || !document.getElementById("gnosis-pay-area")) {
|
|
66
|
+
localStorage.removeItem(_constants.GNOSIS_PAY_ACCESS);
|
|
67
|
+
setHasGnosisPayToken(false);
|
|
68
|
+
setAccessTokenCreatedAt(0);
|
|
65
69
|
clearInterval(interval);
|
|
66
70
|
}
|
|
67
71
|
}, 1000);
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.formatTimeLeft = formatTimeLeft;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getJwtExpiry = getJwtExpiry;
|
|
8
8
|
exports.timeFromNowMessage = timeFromNowMessage;
|
|
9
9
|
function formatTimeLeft(msLeft) {
|
|
10
10
|
var totalSeconds = Math.max(0, Math.floor(msLeft / 1000));
|
|
@@ -12,14 +12,22 @@ function formatTimeLeft(msLeft) {
|
|
|
12
12
|
var seconds = String(totalSeconds % 60).padStart(2, "0");
|
|
13
13
|
return "".concat(minutes, ":").concat(seconds);
|
|
14
14
|
}
|
|
15
|
-
function isExpired(createdAt) {
|
|
16
|
-
var expiryTs = createdAt + 60 * 60 * 1000;
|
|
17
|
-
return Date.now() > expiryTs;
|
|
18
|
-
}
|
|
19
15
|
function timeFromNowMessage(expiryStr) {
|
|
20
16
|
if (!expiryStr) {
|
|
21
17
|
return "0 minute";
|
|
22
18
|
}
|
|
23
19
|
var mm = expiryStr.split(":").map(Number)[0];
|
|
24
20
|
return "".concat(mm, " minute").concat(mm !== 1 ? "s" : "");
|
|
21
|
+
}
|
|
22
|
+
function getJwtExpiry(token) {
|
|
23
|
+
var _a;
|
|
24
|
+
try {
|
|
25
|
+
var payloadBase64 = (_a = token === null || token === void 0 ? void 0 : token.split(".")) === null || _a === void 0 ? void 0 : _a[1];
|
|
26
|
+
if (!payloadBase64) return 0;
|
|
27
|
+
var payloadJson = atob(payloadBase64);
|
|
28
|
+
var payload = JSON.parse(payloadJson);
|
|
29
|
+
return typeof payload.exp === "number" ? payload.exp : 0;
|
|
30
|
+
} catch (error) {
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
|
25
33
|
}
|
|
@@ -169,6 +169,9 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
169
169
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
170
170
|
key: v.n,
|
|
171
171
|
"data-func": v.n,
|
|
172
|
+
style: {
|
|
173
|
+
cursor: isWrongGnosisPayConnector && v.n === "GNOSISPAY" ? "not-allowed" : "pointer"
|
|
174
|
+
},
|
|
172
175
|
className: "luckysheet-formula-search-item"
|
|
173
176
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
174
177
|
style: {
|
|
@@ -186,7 +189,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
186
189
|
width: "16px"
|
|
187
190
|
}
|
|
188
191
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
-
className: "luckysheet-formula-search-func color-text-default text-body-sm"
|
|
192
|
+
className: (0, _ui.cn)("luckysheet-formula-search-func color-text-default text-body-sm", isWrongGnosisPayConnector && v.n === "GNOSISPAY" ? "color-text-disabled" : "")
|
|
190
193
|
}, v.n)), /*#__PURE__*/_react.default.createElement("div", {
|
|
191
194
|
style: {
|
|
192
195
|
display: "flex",
|
|
@@ -178,6 +178,8 @@ var InputBox = function InputBox() {
|
|
|
178
178
|
var selectActiveFormula = (0, _react.useCallback)(function (e) {
|
|
179
179
|
var _a, _b;
|
|
180
180
|
var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
181
|
+
var isWrongGnosisPayConnector = localStorage.getItem("LOGIN_METHOD") !== "walletAddress";
|
|
182
|
+
if (isWrongGnosisPayConnector && formulaName === "GNOSISPAY") return;
|
|
181
183
|
if (formulaName) {
|
|
182
184
|
insertSelectedFormula(formulaName);
|
|
183
185
|
e.preventDefault();
|
|
@@ -187,8 +189,10 @@ var InputBox = function InputBox() {
|
|
|
187
189
|
var selectActiveFormulaOnClick = (0, _react.useCallback)(function (e) {
|
|
188
190
|
var _a, _b;
|
|
189
191
|
if (e.target.className.includes("sign-fortune")) return;
|
|
190
|
-
preText.current = inputRef.current.innerText;
|
|
191
192
|
var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
193
|
+
var isWrongGnosisPayConnector = localStorage.getItem("LOGIN_METHOD") !== "walletAddress";
|
|
194
|
+
if (isWrongGnosisPayConnector && formulaName === "GNOSISPAY") return;
|
|
195
|
+
preText.current = inputRef.current.innerText;
|
|
192
196
|
if (formulaName) {
|
|
193
197
|
insertSelectedFormula(formulaName);
|
|
194
198
|
e.preventDefault();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Workbook from "./Workbook";
|
|
2
|
-
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, } from "@fileverse-dev/formulajs/crypto-constants";
|
|
2
|
+
export { ERROR_MESSAGES_FLAG, SERVICES_API_KEY, isGnosisPayAccessExpired, } from "@fileverse-dev/formulajs/crypto-constants";
|
|
3
3
|
export { Workbook };
|
|
4
4
|
export type { WorkbookInstance } from "./Workbook";
|
|
5
5
|
export type { Cell, Sheet } from "@fileverse-dev/fortune-core";
|
package/lib/components/index.js
CHANGED
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "Workbook", {
|
|
|
21
21
|
return _Workbook.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "isGnosisPayAccessExpired", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _cryptoConstants.isGnosisPayAccessExpired;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
var _Workbook = _interopRequireDefault(require("./Workbook"));
|
|
25
31
|
var _cryptoConstants = require("@fileverse-dev/formulajs/crypto-constants");
|
|
26
32
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.0.88-patch-
|
|
3
|
+
"version": "1.0.88-patch-8",
|
|
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.0.88-patch-
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.0.88-patch-8",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|