@fileverse-dev/fortune-react 1.0.2-mod-114 → 1.0.2-mod-116
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/dist/components/SheetOverlay/FormulaSearch/constant.d.ts +63 -0
- package/dist/index.esm.js +420 -5
- package/dist/index.js +420 -5
- package/dist/index.umd.js +422 -7
- package/dist/index.umd.min.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -807,10 +807,351 @@ var ContentEditable = function ContentEditable(_ref) {
|
|
|
807
807
|
}));
|
|
808
808
|
};
|
|
809
809
|
|
|
810
|
+
var UNFilter = [{
|
|
811
|
+
API_KEY: "ETHERSCAN_API_KEY",
|
|
812
|
+
LOGO: "https://etherscan.io/images/favicon3.ico",
|
|
813
|
+
BRAND_COLOR: "#F6F7F8",
|
|
814
|
+
BRAND_SECONDARY_COLOR: "#21325B",
|
|
815
|
+
n: "EOA",
|
|
816
|
+
t: 20,
|
|
817
|
+
d: "Fetches address data like transactions, balances, or portfolio info from multiple supported chains.",
|
|
818
|
+
a: "Dynamically queries blockchain data such as transactions and balances by resolving time ranges to block ranges and supporting pagination.",
|
|
819
|
+
p: [{
|
|
820
|
+
name: "addresses",
|
|
821
|
+
detail: "One or more addresses (comma-separated) to query.",
|
|
822
|
+
example: '"vitalik.eth"',
|
|
823
|
+
require: "m",
|
|
824
|
+
type: "string"
|
|
825
|
+
}, {
|
|
826
|
+
name: "categories",
|
|
827
|
+
detail: 'Type of data to fetch. Supported values: "txns", "balance".',
|
|
828
|
+
example: '"txns"',
|
|
829
|
+
require: "m",
|
|
830
|
+
type: "string"
|
|
831
|
+
}, {
|
|
832
|
+
name: "chain",
|
|
833
|
+
detail: 'Blockchain network(s) to query. Supported values: "ethereum", "gnosis", "base". Accepts comma-separated values.',
|
|
834
|
+
example: '"ethereum"',
|
|
835
|
+
require: "m",
|
|
836
|
+
type: "string"
|
|
837
|
+
}, {
|
|
838
|
+
name: "startTime",
|
|
839
|
+
detail: "Used to calculate starting block for transaction queries.",
|
|
840
|
+
example: '"01/01/2024"',
|
|
841
|
+
require: "m",
|
|
842
|
+
type: "string"
|
|
843
|
+
}, {
|
|
844
|
+
name: "endTime",
|
|
845
|
+
detail: "Used to calculate ending block for transaction queries.",
|
|
846
|
+
example: '"01/06/2024"',
|
|
847
|
+
require: "m",
|
|
848
|
+
type: "string"
|
|
849
|
+
}, {
|
|
850
|
+
name: "page",
|
|
851
|
+
detail: "The page number for paginated transaction results. Only used when category is 'txns'. Default is 1",
|
|
852
|
+
example: "1",
|
|
853
|
+
require: "o",
|
|
854
|
+
type: "number"
|
|
855
|
+
}, {
|
|
856
|
+
name: "offset",
|
|
857
|
+
detail: "The number of results to return per page (limit). Only used when category is 'txns'. Default is 10",
|
|
858
|
+
example: "10",
|
|
859
|
+
require: "o",
|
|
860
|
+
type: "number"
|
|
861
|
+
}]
|
|
862
|
+
}, {
|
|
863
|
+
LOGO: "https://files.readme.io/06394e687778e238a6cd43de6e1d7d339043aa50054703f64606369352ef1864-VariantCG-Symbol-Color.png",
|
|
864
|
+
BRAND_COLOR: "#f8fdf8",
|
|
865
|
+
BRAND_SECONDARY_COLOR: "#4bc63d",
|
|
866
|
+
n: "COINGECKO",
|
|
867
|
+
t: 20,
|
|
868
|
+
API_KEY: "COINGECKO_API_KEY",
|
|
869
|
+
d: "Query crypto prices, ecosystem market data, stablecoins, or derivatives from CoinGecko.",
|
|
870
|
+
a: 'Supports querying: "price" for specific tokens "market" for ecosystem categories (ETH, BASE, SOL, GNOSIS, HYPERLIQUID, BITCOIN, PUMP)\n- "stablecoins" for stablecoin categories like "crypto-backed-stablecoin"\n- "derivatives" globally or per exchange.\nPagination is supported for all except single-exchange derivatives.',
|
|
871
|
+
p: [{
|
|
872
|
+
name: "category",
|
|
873
|
+
detail: 'Query type: "price", "market", "stablecoins", or "derivatives".',
|
|
874
|
+
example: '"stablecoins"',
|
|
875
|
+
require: "m"
|
|
876
|
+
}, {
|
|
877
|
+
name: "param1",
|
|
878
|
+
detail: 'If "price" then - eg. "BTC", "ETH", OR any token on coingecko\n\nIf "market": one of "all", "base", "meme", "aiagents", "bitcoin", "ethereum", "hyperliquid", "pump", "solana".\n\nIf "stablecoins": one of "all", "yield-bearing-stablecoins", "crypto-backed-stablecoin".\n\nIf "derivatives": exchange name (e.g., "binance_futures").',
|
|
879
|
+
example: '"yield-bearing-stablecoins"',
|
|
880
|
+
require: "m"
|
|
881
|
+
}, {
|
|
882
|
+
name: "param2",
|
|
883
|
+
detail: 'If "market" and "stablecoins" then eg. "1h", "24h", "7d".',
|
|
884
|
+
example: '"1h,24h,7d"',
|
|
885
|
+
require: "o"
|
|
886
|
+
}]
|
|
887
|
+
}, {
|
|
888
|
+
API_KEY: "DEFILLAMA_API_KEY",
|
|
889
|
+
LOGO: "https://defillama.com/favicon-32x32.png",
|
|
890
|
+
BRAND_COLOR: "#f8f5fc",
|
|
891
|
+
BRAND_SECONDARY_COLOR: "#855dcd",
|
|
892
|
+
n: "DEFILLAMA",
|
|
893
|
+
t: 20,
|
|
894
|
+
d: "Fetches content from Defillama.",
|
|
895
|
+
a: "Retrieves data from Defillama.",
|
|
896
|
+
p: [{
|
|
897
|
+
name: "category",
|
|
898
|
+
detail: "Type of content to fetch. Supports 'protocols', 'yields', 'dex', or 'fees'.",
|
|
899
|
+
example: '"protocols"',
|
|
900
|
+
require: "m",
|
|
901
|
+
type: "string"
|
|
902
|
+
}]
|
|
903
|
+
}, {
|
|
904
|
+
API_KEY: "BASESCAN_API_KEY",
|
|
905
|
+
LOGO: "https://2064089921-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FevP3L0cUvP9xmRefuzCm%2Fuploads%2F2K1pvFsE7JAfcI3LAxYl%2Fbase-logo-in-blue.webp?alt=media&token=32c80439-dbdc-432a-b199-220e012efc3c",
|
|
906
|
+
BRAND_COLOR: "#f1f5ff",
|
|
907
|
+
BRAND_SECONDARY_COLOR: "#2752ff",
|
|
908
|
+
n: "BASE",
|
|
909
|
+
t: 20,
|
|
910
|
+
d: "Fetches Base network data via Basescan: native txns, ERC-20 transfers, ERC-721 transfers, and gas metrics.",
|
|
911
|
+
a: "Pulls on-chain activity for Base (chainid 8453) using Basescan’s API — supports full tx history, token/NFT transfers, gas prices, and pagination.",
|
|
912
|
+
p: [{
|
|
913
|
+
name: "type",
|
|
914
|
+
detail: "Data category: 'all-txns' | 'token-txns' | 'nft-txns' | 'gas'.",
|
|
915
|
+
example: '"token-txns"',
|
|
916
|
+
require: "m",
|
|
917
|
+
type: "string"
|
|
918
|
+
}, {
|
|
919
|
+
name: "chain",
|
|
920
|
+
detail: "Must be 'base'.",
|
|
921
|
+
example: '"base"',
|
|
922
|
+
require: "m",
|
|
923
|
+
type: "string"
|
|
924
|
+
}, {
|
|
925
|
+
name: "address",
|
|
926
|
+
detail: "Target wallet address (only required for txns, token, and nft queries). Not needed for 'gas'.",
|
|
927
|
+
example: '"0x7FD624f3f97A7dd36195E8379F28dB6147C270ff"',
|
|
928
|
+
require: "o",
|
|
929
|
+
type: "string"
|
|
930
|
+
}, {
|
|
931
|
+
name: "startDate",
|
|
932
|
+
detail: "Start date (used to resolve block range). Optional, only applies to txns.",
|
|
933
|
+
example: '"01/01/2024"',
|
|
934
|
+
require: "o",
|
|
935
|
+
type: "string"
|
|
936
|
+
}, {
|
|
937
|
+
name: "endDate",
|
|
938
|
+
detail: "End date (used to resolve block range). Optional, only applies to txns.",
|
|
939
|
+
example: '"07/07/2024"',
|
|
940
|
+
require: "o",
|
|
941
|
+
type: "string"
|
|
942
|
+
}, {
|
|
943
|
+
name: "page",
|
|
944
|
+
detail: "Page number for paginated results. Only applies to txns/token/nft queries.",
|
|
945
|
+
example: "1",
|
|
946
|
+
require: "o",
|
|
947
|
+
type: "number"
|
|
948
|
+
}, {
|
|
949
|
+
name: "offset",
|
|
950
|
+
detail: "Number of items per page (limit). Only applies to txns/token/nft queries.",
|
|
951
|
+
example: "2",
|
|
952
|
+
require: "o",
|
|
953
|
+
type: "number"
|
|
954
|
+
}]
|
|
955
|
+
}, {
|
|
956
|
+
API_KEY: "GNOSIS_API_KEY",
|
|
957
|
+
LOGO: "https://gnosisscan.io/assets/generic/html/favicon-light.ico",
|
|
958
|
+
BRAND_COLOR: "#f6f7f6",
|
|
959
|
+
BRAND_SECONDARY_COLOR: "#133629",
|
|
960
|
+
n: "GNOSIS",
|
|
961
|
+
t: 20,
|
|
962
|
+
d: "Fetches Gnosis Chain data via Gnosisscan: native transactions, ERC-20 token transfers, ERC-721 NFT transfers, and gas metrics.",
|
|
963
|
+
a: "Queries Gnosis Chain (chainid 100) through Gnosisscan’s API to return transaction history, token/NFT transfers, or gas price information. Supports pagination and time-based filtering for transaction types.",
|
|
964
|
+
p: [{
|
|
965
|
+
name: "type",
|
|
966
|
+
detail: "Data category to fetch. Options: 'all-txns', 'token-txns', 'nft-txns', or 'gas'.",
|
|
967
|
+
example: '"nft-txns"',
|
|
968
|
+
require: "m",
|
|
969
|
+
type: "string"
|
|
970
|
+
}, {
|
|
971
|
+
name: "chain",
|
|
972
|
+
detail: "Must be 'gnosis'.",
|
|
973
|
+
example: '"gnosis"',
|
|
974
|
+
require: "m",
|
|
975
|
+
type: "string"
|
|
976
|
+
}, {
|
|
977
|
+
name: "address",
|
|
978
|
+
detail: "Wallet address to query. Required for all types except 'gas'.",
|
|
979
|
+
example: '"0x90830Ed558f12D826370DC52E9D87947A7F18De9"',
|
|
980
|
+
require: "o",
|
|
981
|
+
type: "string"
|
|
982
|
+
}, {
|
|
983
|
+
name: "startDate",
|
|
984
|
+
detail: "Used to resolve starting block for txns.",
|
|
985
|
+
example: '"01/01/2024"',
|
|
986
|
+
require: "o",
|
|
987
|
+
type: "string"
|
|
988
|
+
}, {
|
|
989
|
+
name: "endDate",
|
|
990
|
+
detail: "Used to resolve ending block for txns.",
|
|
991
|
+
example: '"14/06/2025"',
|
|
992
|
+
require: "o",
|
|
993
|
+
type: "string"
|
|
994
|
+
}, {
|
|
995
|
+
name: "page",
|
|
996
|
+
detail: "Page number for paginated transaction results. Applies only to 'txns', 'token-txns', and 'nft-txns'.",
|
|
997
|
+
example: '"1"',
|
|
998
|
+
require: "o",
|
|
999
|
+
type: "number"
|
|
1000
|
+
}, {
|
|
1001
|
+
name: "offset",
|
|
1002
|
+
detail: "Number of results per page (limit). Applies only to 'txns', 'token-txns', and 'nft-txns'.",
|
|
1003
|
+
example: '"50"',
|
|
1004
|
+
require: "o",
|
|
1005
|
+
type: "number"
|
|
1006
|
+
}]
|
|
1007
|
+
}, {
|
|
1008
|
+
API_KEY: "ETHERSCAN_API_KEY",
|
|
1009
|
+
LOGO: "https://etherscan.io/images/favicon3.ico",
|
|
1010
|
+
BRAND_COLOR: "#F6F7F8",
|
|
1011
|
+
BRAND_SECONDARY_COLOR: "#21325B",
|
|
1012
|
+
n: "ETHERSCAN",
|
|
1013
|
+
t: 20,
|
|
1014
|
+
d: "Returns blockchain transaction history for the given address",
|
|
1015
|
+
a: "Retrieves blockchain data for a given chain and address from Etherscan, including txns, token/nft transfers, and gas metrics.",
|
|
1016
|
+
p: [{
|
|
1017
|
+
name: "type",
|
|
1018
|
+
detail: "The type of data to retrieve. Can be 'all-txns', 'token-txns', 'nft-txns', or 'gas'.",
|
|
1019
|
+
example: '"all-txns"',
|
|
1020
|
+
require: "m",
|
|
1021
|
+
type: "string"
|
|
1022
|
+
}, {
|
|
1023
|
+
name: "chain",
|
|
1024
|
+
detail: "The chain name (e.g. 'ethereum', 'base', 'gnosis').",
|
|
1025
|
+
example: '"ethereum"',
|
|
1026
|
+
require: "m",
|
|
1027
|
+
type: "string"
|
|
1028
|
+
}, {
|
|
1029
|
+
name: "address",
|
|
1030
|
+
detail: "Wallet address / Ens name to query",
|
|
1031
|
+
example: '"vitalik.eth"',
|
|
1032
|
+
require: "o",
|
|
1033
|
+
type: "string"
|
|
1034
|
+
}, {
|
|
1035
|
+
name: "startDate",
|
|
1036
|
+
detail: "Used to filter block range.",
|
|
1037
|
+
example: '"01/01/2024"',
|
|
1038
|
+
require: "o",
|
|
1039
|
+
type: "string"
|
|
1040
|
+
}, {
|
|
1041
|
+
name: "endDate",
|
|
1042
|
+
detail: "Used to filter block range.",
|
|
1043
|
+
example: '"01/07/2025"',
|
|
1044
|
+
require: "o",
|
|
1045
|
+
type: "string"
|
|
1046
|
+
}]
|
|
1047
|
+
}, {
|
|
1048
|
+
API_KEY: "SAFE_API_KEY",
|
|
1049
|
+
LOGO: "https://safe-transaction-mainnet.safe.global/static/safe/favicon.png",
|
|
1050
|
+
BRAND_COLOR: "#ebf9f3",
|
|
1051
|
+
BRAND_SECONDARY_COLOR: "#00B460",
|
|
1052
|
+
n: "SAFE",
|
|
1053
|
+
t: 20,
|
|
1054
|
+
d: "Query the list of transactions performed by a Safe address, with optional pagination.",
|
|
1055
|
+
a: "Query the list of transactions performed by a Safe address, with optional pagination.",
|
|
1056
|
+
p: [{
|
|
1057
|
+
name: "address",
|
|
1058
|
+
detail: "The address to query, in hexadecimal format.",
|
|
1059
|
+
example: '"0xe9A6378d8FD4983C2999DB0735f258397E8C2253"',
|
|
1060
|
+
require: "m"
|
|
1061
|
+
}, {
|
|
1062
|
+
name: "utility",
|
|
1063
|
+
detail: "The utility to query, supported values: 'txns'.",
|
|
1064
|
+
example: '"txns"',
|
|
1065
|
+
require: "m"
|
|
1066
|
+
}, {
|
|
1067
|
+
name: "chain",
|
|
1068
|
+
detail: "The chain to query, supported values: 'ethereum', 'gnosis'.",
|
|
1069
|
+
example: '"gnosis"',
|
|
1070
|
+
require: "m"
|
|
1071
|
+
}, {
|
|
1072
|
+
name: "limit",
|
|
1073
|
+
detail: "The number of transactions to return, default is 100.",
|
|
1074
|
+
example: "10",
|
|
1075
|
+
require: "o",
|
|
1076
|
+
repeat: "n"
|
|
1077
|
+
}, {
|
|
1078
|
+
name: "offset",
|
|
1079
|
+
detail: "The number of transactions to skip, default is 0.",
|
|
1080
|
+
example: "0",
|
|
1081
|
+
require: "o",
|
|
1082
|
+
repeat: "n"
|
|
1083
|
+
}]
|
|
1084
|
+
}, {
|
|
1085
|
+
LOGO: "https://cdn.prod.website-files.com/65f94dfd53db8b337c808067/68485baa72714ae58f350ce2_bs-logo.png",
|
|
1086
|
+
BRAND_COLOR: "#f8f8fd",
|
|
1087
|
+
BRAND_SECONDARY_COLOR: "#5353D3",
|
|
1088
|
+
n: "BLOCKSCOUT",
|
|
1089
|
+
t: 20,
|
|
1090
|
+
d: "Returns the onchain information about an address on a provided blockchain. By default on Ethereum mainnet.",
|
|
1091
|
+
a: "Returns the onchain information about an address on a provided blockchain. By default on Ethereum mainnet.",
|
|
1092
|
+
p: [{
|
|
1093
|
+
name: "address",
|
|
1094
|
+
detail: "The address string representing the addresses to check for balance",
|
|
1095
|
+
example: '"vitalik.eth"',
|
|
1096
|
+
require: "m",
|
|
1097
|
+
type: "string"
|
|
1098
|
+
}, {
|
|
1099
|
+
name: "type",
|
|
1100
|
+
detail: "The type of data to query.",
|
|
1101
|
+
example: '"txns"',
|
|
1102
|
+
require: "m",
|
|
1103
|
+
type: "string"
|
|
1104
|
+
}, {
|
|
1105
|
+
name: "chain",
|
|
1106
|
+
detail: "The blockchain to query. By default on Ethereum mainnet.",
|
|
1107
|
+
example: '"ethereum"',
|
|
1108
|
+
require: "o",
|
|
1109
|
+
type: "string"
|
|
1110
|
+
}, {
|
|
1111
|
+
name: "startTimestamp",
|
|
1112
|
+
detail: 'Start date marking the start of the transaction search range. Work with type === "txns"',
|
|
1113
|
+
example: '"01/01/2023"',
|
|
1114
|
+
require: "o",
|
|
1115
|
+
type: "string"
|
|
1116
|
+
}, {
|
|
1117
|
+
name: "endTimestamp",
|
|
1118
|
+
detail: 'End date marking the end of the transaction search range. Work with type === "txns"',
|
|
1119
|
+
example: '"01/05/2024"',
|
|
1120
|
+
require: "o",
|
|
1121
|
+
type: "string"
|
|
1122
|
+
}, {
|
|
1123
|
+
name: "page",
|
|
1124
|
+
detail: 'The page number to return. Work with type === "txns"',
|
|
1125
|
+
example: "1",
|
|
1126
|
+
require: "o",
|
|
1127
|
+
repeat: "n",
|
|
1128
|
+
type: "rangenumber"
|
|
1129
|
+
}, {
|
|
1130
|
+
name: "offset",
|
|
1131
|
+
detail: 'The number of transactions to return per page. Work with type === "txns"',
|
|
1132
|
+
example: "2",
|
|
1133
|
+
require: "o",
|
|
1134
|
+
repeat: "n",
|
|
1135
|
+
type: "rangenumber"
|
|
1136
|
+
}]
|
|
1137
|
+
}];
|
|
1138
|
+
|
|
810
1139
|
var FormulaSearch = function FormulaSearch(props) {
|
|
811
1140
|
var _context$luckysheet_s;
|
|
812
1141
|
var _useContext = React.useContext(WorkbookContext),
|
|
813
|
-
context = _useContext.context
|
|
1142
|
+
context = _useContext.context,
|
|
1143
|
+
isAuthorized = _useContext.settings.isAuthorized;
|
|
1144
|
+
var authedFunction = ["COINGECKO", "ETHERSCAN", "DEFILLAMA", "GNOSIS", "BASE", "EOA", "PNL", "SAFE", "BLOCKSCOUT", "GNOSIS", "LENS", "FARCASTER", "Ethereum"];
|
|
1145
|
+
var filteredDefaultCandidates = context.defaultCandidates.filter(function (item) {
|
|
1146
|
+
return !authedFunction.includes(item.n);
|
|
1147
|
+
});
|
|
1148
|
+
var unfilteredDefaultCandidates = UNFilter.filter(function (item) {
|
|
1149
|
+
return item.n !== "PNL";
|
|
1150
|
+
});
|
|
1151
|
+
var finalDefaultCandidates = !isAuthorized ? filteredDefaultCandidates : context.defaultCandidates.slice(0, 10);
|
|
1152
|
+
var finalFunctionCandidates = isAuthorized ? context.functionCandidates : context.functionCandidates.filter(function (item) {
|
|
1153
|
+
return item.t !== 20;
|
|
1154
|
+
});
|
|
814
1155
|
var firstSelection = (_context$luckysheet_s = context.luckysheet_select_save) === null || _context$luckysheet_s === void 0 ? void 0 : _context$luckysheet_s[0];
|
|
815
1156
|
var hintRef = React.useRef(null);
|
|
816
1157
|
var _useState = React.useState(0),
|
|
@@ -839,7 +1180,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
839
1180
|
style: {
|
|
840
1181
|
top: top
|
|
841
1182
|
}
|
|
842
|
-
}), context.defaultCandidates.length > 0 && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
1183
|
+
}), context.defaultCandidates.length > 0 && (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
843
1184
|
style: {
|
|
844
1185
|
marginBottom: "4px"
|
|
845
1186
|
},
|
|
@@ -848,7 +1189,42 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
848
1189
|
className: "text-helper-sm-bold color-text-secondary"
|
|
849
1190
|
}, "Onchain functions"), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
850
1191
|
className: "text-helper-text-sm color-text-secondary"
|
|
851
|
-
}, "
|
|
1192
|
+
}, "Every onchain function is a native data structure allowing dSheets to read and structure data from smart contracts and APIs.")), !isAuthorized && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
1193
|
+
style: {
|
|
1194
|
+
marginBottom: "8px",
|
|
1195
|
+
backgroundColor: "#F8F9FA"
|
|
1196
|
+
},
|
|
1197
|
+
className: "w-full flex flex-col p-2 gap-1"
|
|
1198
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
1199
|
+
className: "font-semibold"
|
|
1200
|
+
}, "dSheets account required"), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
1201
|
+
className: "text-helper-text-sm color-text-secondary"
|
|
1202
|
+
}, "Use more onchain functions by creating a dSheets account.", " ", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
1203
|
+
className: "sign-fortune",
|
|
1204
|
+
style: {
|
|
1205
|
+
color: "#5C0AFF",
|
|
1206
|
+
cursor: "pointer"
|
|
1207
|
+
},
|
|
1208
|
+
onClick: function onClick(e) {
|
|
1209
|
+
var _document$getElementB;
|
|
1210
|
+
e.stopPropagation();
|
|
1211
|
+
e.preventDefault();
|
|
1212
|
+
console.log("click");
|
|
1213
|
+
(_document$getElementB = document.getElementById("triggerAuth")) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.click();
|
|
1214
|
+
}
|
|
1215
|
+
}, "Signup/Login")), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1216
|
+
className: "flex gap-2 mt-2 mb-2"
|
|
1217
|
+
}, unfilteredDefaultCandidates.map(function (v, index) {
|
|
1218
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
1219
|
+
key: index,
|
|
1220
|
+
src: v.LOGO,
|
|
1221
|
+
alt: "Service Logo",
|
|
1222
|
+
style: {
|
|
1223
|
+
width: "16px",
|
|
1224
|
+
height: "16px"
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
})))))), context.defaultCandidates.length > 0 ? (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, finalDefaultCandidates.map(function (v, index) {
|
|
852
1228
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
853
1229
|
key: v.n,
|
|
854
1230
|
"data-func": v.n,
|
|
@@ -903,7 +1279,7 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
903
1279
|
})))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
904
1280
|
className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm color-text-default"
|
|
905
1281
|
}, v.d));
|
|
906
|
-
}))) : (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null,
|
|
1282
|
+
}))) : (/*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, finalFunctionCandidates.length > 0 && finalFunctionCandidates.map(function (v, index) {
|
|
907
1283
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
908
1284
|
key: v.n,
|
|
909
1285
|
"data-func": v.n,
|
|
@@ -955,7 +1331,45 @@ var FormulaSearch = function FormulaSearch(props) {
|
|
|
955
1331
|
})))))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
956
1332
|
className: "luckysheet-formula-search-detail mt-1 text-helper-text-sm color-text-secondary"
|
|
957
1333
|
}, v.d));
|
|
958
|
-
})
|
|
1334
|
+
}), finalFunctionCandidates.length === 0 && (/*#__PURE__*/React__default['default'].createElement("span", null, !isAuthorized && (/*#__PURE__*/React__default['default'].createElement("div", {
|
|
1335
|
+
style: {
|
|
1336
|
+
marginBottom: "8px",
|
|
1337
|
+
backgroundColor: "#F8F9FA"
|
|
1338
|
+
},
|
|
1339
|
+
className: "w-full flex flex-col p-2 gap-1"
|
|
1340
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
1341
|
+
className: "text-helper-sm-bold",
|
|
1342
|
+
style: {
|
|
1343
|
+
fontWeight: "bold"
|
|
1344
|
+
}
|
|
1345
|
+
}, "dSheets account required"), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
1346
|
+
className: "text-helper-text-sm color-text-secondary"
|
|
1347
|
+
}, "Use more onchain functions by creating a dSheets account.", " ", /*#__PURE__*/React__default['default'].createElement("span", {
|
|
1348
|
+
className: "sign-fortune",
|
|
1349
|
+
style: {
|
|
1350
|
+
color: "#5C0AFF",
|
|
1351
|
+
cursor: "pointer"
|
|
1352
|
+
},
|
|
1353
|
+
onClick: function onClick(e) {
|
|
1354
|
+
var _document$getElementB2;
|
|
1355
|
+
e.stopPropagation();
|
|
1356
|
+
e.preventDefault();
|
|
1357
|
+
console.log("click");
|
|
1358
|
+
(_document$getElementB2 = document.getElementById("triggerAuth")) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.click();
|
|
1359
|
+
}
|
|
1360
|
+
}, "Signup/Login")), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1361
|
+
className: "flex gap-2 mt-2 mb-2"
|
|
1362
|
+
}, unfilteredDefaultCandidates.map(function (v, index) {
|
|
1363
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
1364
|
+
key: index,
|
|
1365
|
+
src: v.LOGO,
|
|
1366
|
+
alt: "Service Logo",
|
|
1367
|
+
style: {
|
|
1368
|
+
width: "16px",
|
|
1369
|
+
height: "16px"
|
|
1370
|
+
}
|
|
1371
|
+
});
|
|
1372
|
+
})))))))), /*#__PURE__*/React__default['default'].createElement("hr", {
|
|
959
1373
|
className: "color-border-default mb-2 mt-4 "
|
|
960
1374
|
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
961
1375
|
style: {
|
|
@@ -1467,6 +1881,7 @@ var InputBox = function InputBox() {
|
|
|
1467
1881
|
}, [getActiveFormula, insertSelectedFormula]);
|
|
1468
1882
|
var selectActiveFormulaOnClick = React.useCallback(function (e) {
|
|
1469
1883
|
var _getActiveFormula2, _getActiveFormula2$qu;
|
|
1884
|
+
if (e.target.className.includes("sign-fortune")) return;
|
|
1470
1885
|
preText.current = inputRef.current.innerText;
|
|
1471
1886
|
var formulaName = (_getActiveFormula2 = getActiveFormula()) === null || _getActiveFormula2 === void 0 ? void 0 : (_getActiveFormula2$qu = _getActiveFormula2.querySelector(".luckysheet-formula-search-func")) === null || _getActiveFormula2$qu === void 0 ? void 0 : _getActiveFormula2$qu.textContent;
|
|
1472
1887
|
if (formulaName) {
|