@xyo-network/react-chain-blockchain 1.3.7 → 1.3.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/dist/browser/index.mjs +245 -193
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/block/table/cell/BlockNumber.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/BlockNumberChip.d.ts +7 -0
- package/dist/types/components/block/table/cell/BlockNumberChip.d.ts.map +1 -0
- package/dist/types/components/block/table/cell/PayloadCounts.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/Producer.d.ts.map +1 -1
- package/dist/types/components/block/table/cell/TransactionCount.d.ts.map +1 -1
- package/dist/types/components/block/table/row/TableRow.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/components/block/table/cell/BlockNumber.tsx +9 -7
- package/src/components/block/table/cell/BlockNumberChip.tsx +11 -0
- package/src/components/block/table/cell/PayloadCounts.tsx +27 -4
- package/src/components/block/table/cell/Producer.tsx +1 -4
- package/src/components/block/table/cell/TransactionCount.tsx +0 -1
- package/src/components/block/table/head/TableHead.tsx +4 -4
- package/src/components/block/table/row/TableRow.tsx +15 -7
package/dist/browser/index.mjs
CHANGED
|
@@ -955,7 +955,18 @@ var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, tran
|
|
|
955
955
|
|
|
956
956
|
// src/components/block/table/cell/BlockNumber.tsx
|
|
957
957
|
import { Link, TableCell, Tooltip } from "@mui/material";
|
|
958
|
+
import React15 from "react";
|
|
959
|
+
|
|
960
|
+
// src/components/block/table/cell/BlockNumberChip.tsx
|
|
961
|
+
import { Chip as Chip3 } from "@mui/material";
|
|
958
962
|
import React14 from "react";
|
|
963
|
+
var BlockNumberChip = /* @__PURE__ */ __name(({ blockNumber, ...props }) => {
|
|
964
|
+
return /* @__PURE__ */ React14.createElement(Chip3, {
|
|
965
|
+
avatar: /* @__PURE__ */ React14.createElement(React14.Fragment, null),
|
|
966
|
+
label: blockNumber,
|
|
967
|
+
...props
|
|
968
|
+
});
|
|
969
|
+
}, "BlockNumberChip");
|
|
959
970
|
|
|
960
971
|
// src/components/block/table/cell/hooks/useLinkedBlockItem.tsx
|
|
961
972
|
import { useEvent as useEvent2 } from "@xyo-network/react-event";
|
|
@@ -977,32 +988,38 @@ var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
|
|
|
977
988
|
|
|
978
989
|
// src/components/block/table/cell/BlockNumber.tsx
|
|
979
990
|
var BlockNumberTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
980
|
-
const
|
|
981
|
-
const
|
|
982
|
-
return /* @__PURE__ */
|
|
991
|
+
const blockNumber = block?.[0].block;
|
|
992
|
+
const [ref, handleClick] = useLinkedBlockItem("block-number", blockNumber?.toString());
|
|
993
|
+
return /* @__PURE__ */ React15.createElement(TableCell, {
|
|
983
994
|
ref,
|
|
984
995
|
...props
|
|
985
|
-
}, /* @__PURE__ */
|
|
986
|
-
title: `Block Number: ${
|
|
987
|
-
}, /* @__PURE__ */
|
|
988
|
-
title:
|
|
996
|
+
}, /* @__PURE__ */ React15.createElement(Tooltip, {
|
|
997
|
+
title: `Block Number: ${blockNumber}`
|
|
998
|
+
}, /* @__PURE__ */ React15.createElement("span", null, linked && blockNumber !== void 0 ? /* @__PURE__ */ React15.createElement(Link, {
|
|
999
|
+
title: blockNumber?.toString(),
|
|
989
1000
|
onClick: handleClick,
|
|
990
1001
|
sx: {
|
|
991
1002
|
cursor: "pointer"
|
|
992
1003
|
}
|
|
993
|
-
},
|
|
1004
|
+
}, /* @__PURE__ */ React15.createElement(BlockNumberChip, {
|
|
1005
|
+
blockNumber,
|
|
1006
|
+
size: "small"
|
|
1007
|
+
})) : null, !linked && /* @__PURE__ */ React15.createElement(BlockNumberChip, {
|
|
1008
|
+
blockNumber,
|
|
1009
|
+
size: "small"
|
|
1010
|
+
}))));
|
|
994
1011
|
}, "BlockNumberTableCell");
|
|
995
1012
|
|
|
996
1013
|
// src/components/block/table/cell/Hash.tsx
|
|
997
|
-
import { Avatar, Chip as
|
|
1014
|
+
import { Avatar, Chip as Chip4, TableCell as TableCell2, Tooltip as Tooltip2 } from "@mui/material";
|
|
998
1015
|
import { Identicon } from "@xylabs/react-identicon";
|
|
999
1016
|
import { usePayloadRootHash } from "@xyo-network/react-shared";
|
|
1000
|
-
import
|
|
1017
|
+
import React17 from "react";
|
|
1001
1018
|
|
|
1002
1019
|
// src/components/FeatureNotAvailable.tsx
|
|
1003
1020
|
import { Button as Button2, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
|
|
1004
|
-
import
|
|
1005
|
-
var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...props }) => /* @__PURE__ */
|
|
1021
|
+
import React16 from "react";
|
|
1022
|
+
var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...props }) => /* @__PURE__ */ React16.createElement(Dialog, props, /* @__PURE__ */ React16.createElement(DialogTitle, null, `${featureName} Not Available`), /* @__PURE__ */ React16.createElement(DialogContent, null, "This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance."), /* @__PURE__ */ React16.createElement(DialogActions, null, /* @__PURE__ */ React16.createElement(Button2, {
|
|
1006
1023
|
onClick: /* @__PURE__ */ __name((e) => props.onClose?.(e, "backdropClick"), "onClick")
|
|
1007
1024
|
}, "Close"))), "FeatureNotAvailable");
|
|
1008
1025
|
|
|
@@ -1010,19 +1027,19 @@ var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...
|
|
|
1010
1027
|
var BlockHashTableCell = /* @__PURE__ */ __name(({ block, identiconProps, notAvailableDialog, linked, ...props }) => {
|
|
1011
1028
|
const hash = usePayloadRootHash(block?.[0]);
|
|
1012
1029
|
const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
|
|
1013
|
-
const [notAvailable, setNotAvailable] =
|
|
1030
|
+
const [notAvailable, setNotAvailable] = React17.useState(false);
|
|
1014
1031
|
const shortenedHash = hash ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` : "";
|
|
1015
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ React17.createElement(TableCell2, {
|
|
1016
1033
|
ref,
|
|
1017
1034
|
...props
|
|
1018
|
-
}, hash ? /* @__PURE__ */
|
|
1035
|
+
}, hash ? /* @__PURE__ */ React17.createElement(Tooltip2, {
|
|
1019
1036
|
title: `Block Hash: ${hash}`
|
|
1020
|
-
}, /* @__PURE__ */
|
|
1021
|
-
avatar: /* @__PURE__ */
|
|
1037
|
+
}, /* @__PURE__ */ React17.createElement(Chip4, {
|
|
1038
|
+
avatar: /* @__PURE__ */ React17.createElement(Avatar, {
|
|
1022
1039
|
sx: {
|
|
1023
1040
|
background: "white"
|
|
1024
1041
|
}
|
|
1025
|
-
}, /* @__PURE__ */
|
|
1042
|
+
}, /* @__PURE__ */ React17.createElement(Identicon, {
|
|
1026
1043
|
size: 16,
|
|
1027
1044
|
value: hash,
|
|
1028
1045
|
...identiconProps
|
|
@@ -1032,7 +1049,7 @@ var BlockHashTableCell = /* @__PURE__ */ __name(({ block, identiconProps, notAva
|
|
|
1032
1049
|
},
|
|
1033
1050
|
label: shortenedHash,
|
|
1034
1051
|
onClick: linked ? handleClick : () => setNotAvailable(true)
|
|
1035
|
-
})) : null, notAvailableDialog && notAvailable ? /* @__PURE__ */
|
|
1052
|
+
})) : null, notAvailableDialog && notAvailable ? /* @__PURE__ */ React17.createElement(FeatureNotAvailable, {
|
|
1036
1053
|
featureName: "Block Details",
|
|
1037
1054
|
open: notAvailable,
|
|
1038
1055
|
onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
|
|
@@ -1046,39 +1063,40 @@ import { ellipsize } from "@xylabs/eth-address";
|
|
|
1046
1063
|
import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
|
|
1047
1064
|
import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
|
|
1048
1065
|
import { usePayloadRootHash as usePayloadRootHash2 } from "@xyo-network/react-shared";
|
|
1049
|
-
import
|
|
1066
|
+
import React18, { useState as useState10 } from "react";
|
|
1050
1067
|
var BlockJsonViewTableCell = /* @__PURE__ */ __name(({ block, ...props }) => {
|
|
1051
1068
|
const [open, setOpen] = useState10(false);
|
|
1052
1069
|
const onClose = /* @__PURE__ */ __name(() => setOpen(false), "onClose");
|
|
1053
1070
|
const hash = usePayloadRootHash2(block?.[0]);
|
|
1054
1071
|
const title = hash ? `JSON for ${ellipsize(hash, 5)}` : "JSON";
|
|
1055
|
-
return /* @__PURE__ */
|
|
1072
|
+
return /* @__PURE__ */ React18.createElement(TableCell3, props, /* @__PURE__ */ React18.createElement(FlexRow3, {
|
|
1056
1073
|
sx: {
|
|
1057
1074
|
width: "100%"
|
|
1058
1075
|
}
|
|
1059
|
-
}, /* @__PURE__ */
|
|
1076
|
+
}, /* @__PURE__ */ React18.createElement(IconButton2, {
|
|
1060
1077
|
onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
|
|
1061
|
-
}, /* @__PURE__ */
|
|
1078
|
+
}, /* @__PURE__ */ React18.createElement(DataObject, null))), /* @__PURE__ */ React18.createElement(Dialog2, {
|
|
1062
1079
|
open,
|
|
1063
1080
|
onClose
|
|
1064
|
-
}, /* @__PURE__ */
|
|
1081
|
+
}, /* @__PURE__ */ React18.createElement(DialogTitle2, null, title), /* @__PURE__ */ React18.createElement(DialogContent2, null, /* @__PURE__ */ React18.createElement(JsonViewerEx, {
|
|
1065
1082
|
value: block
|
|
1066
|
-
})), /* @__PURE__ */
|
|
1083
|
+
})), /* @__PURE__ */ React18.createElement(DialogActions2, {
|
|
1067
1084
|
sx: {
|
|
1068
1085
|
display: "flex",
|
|
1069
1086
|
flexDirection: "row",
|
|
1070
1087
|
justifyContent: "end"
|
|
1071
1088
|
}
|
|
1072
|
-
}, /* @__PURE__ */
|
|
1089
|
+
}, /* @__PURE__ */ React18.createElement(Button3, {
|
|
1073
1090
|
variant: "contained",
|
|
1074
1091
|
onClick: onClose
|
|
1075
1092
|
}, "Close"))));
|
|
1076
1093
|
}, "BlockJsonViewTableCell");
|
|
1077
1094
|
|
|
1078
1095
|
// src/components/block/table/cell/PayloadCounts.tsx
|
|
1079
|
-
import { Error as Error2 } from "@mui/icons-material";
|
|
1080
|
-
import { Link as Link2, TableCell as TableCell4, Tooltip as Tooltip3 } from "@mui/material";
|
|
1081
|
-
import
|
|
1096
|
+
import { Error as Error2, Public, PublicOff } from "@mui/icons-material";
|
|
1097
|
+
import { Chip as Chip5, Link as Link2, TableCell as TableCell4, Tooltip as Tooltip3 } from "@mui/material";
|
|
1098
|
+
import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
|
|
1099
|
+
import React19 from "react";
|
|
1082
1100
|
var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
1083
1101
|
const [publicPayloads, privatePayloads, error] = usePayloadCountsFromBlock(block);
|
|
1084
1102
|
const data = block && privatePayloads !== void 0 && publicPayloads !== void 0 ? {
|
|
@@ -1087,47 +1105,70 @@ var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...pr
|
|
|
1087
1105
|
block: block[0]._hash
|
|
1088
1106
|
} : void 0;
|
|
1089
1107
|
const [ref, handleClick] = useLinkedBlockItem("payload-counts", data);
|
|
1090
|
-
|
|
1091
|
-
return /* @__PURE__ */ React18.createElement(TableCell4, {
|
|
1108
|
+
return /* @__PURE__ */ React19.createElement(TableCell4, {
|
|
1092
1109
|
ref,
|
|
1093
1110
|
...props
|
|
1094
|
-
}, /* @__PURE__ */
|
|
1111
|
+
}, /* @__PURE__ */ React19.createElement("span", null, error ? /* @__PURE__ */ React19.createElement(Tooltip3, {
|
|
1095
1112
|
title: error.message
|
|
1096
|
-
}, /* @__PURE__ */
|
|
1113
|
+
}, /* @__PURE__ */ React19.createElement(Error2, {
|
|
1097
1114
|
color: "error"
|
|
1098
|
-
})) : null, linked ? /* @__PURE__ */
|
|
1115
|
+
})) : null, linked ? /* @__PURE__ */ React19.createElement(Tooltip3, {
|
|
1116
|
+
title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
|
|
1117
|
+
}, /* @__PURE__ */ React19.createElement(Link2, {
|
|
1099
1118
|
onClick: handleClick,
|
|
1100
1119
|
sx: {
|
|
1101
|
-
cursor: "pointer"
|
|
1120
|
+
cursor: "pointer",
|
|
1121
|
+
display: "inline-flex",
|
|
1122
|
+
gap: 0.5
|
|
1102
1123
|
}
|
|
1103
|
-
},
|
|
1124
|
+
}, /* @__PURE__ */ React19.createElement(Chip5, {
|
|
1125
|
+
avatar: /* @__PURE__ */ React19.createElement(Public, {
|
|
1126
|
+
fontSize: "small"
|
|
1127
|
+
}),
|
|
1128
|
+
label: publicPayloads ?? "--"
|
|
1129
|
+
}), /* @__PURE__ */ React19.createElement(Chip5, {
|
|
1130
|
+
avatar: /* @__PURE__ */ React19.createElement(PublicOff, {
|
|
1131
|
+
fontSize: "small"
|
|
1132
|
+
}),
|
|
1133
|
+
label: privatePayloads ?? "--"
|
|
1134
|
+
}))) : /* @__PURE__ */ React19.createElement(Tooltip3, {
|
|
1135
|
+
title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
|
|
1136
|
+
}, /* @__PURE__ */ React19.createElement(FlexRow4, {
|
|
1137
|
+
gap: 0.5,
|
|
1138
|
+
justifyContent: "left"
|
|
1139
|
+
}, /* @__PURE__ */ React19.createElement(Chip5, {
|
|
1140
|
+
avatar: /* @__PURE__ */ React19.createElement(Public, {
|
|
1141
|
+
fontSize: "small"
|
|
1142
|
+
}),
|
|
1143
|
+
label: publicPayloads ?? "--"
|
|
1144
|
+
}), /* @__PURE__ */ React19.createElement(Chip5, {
|
|
1145
|
+
avatar: /* @__PURE__ */ React19.createElement(PublicOff, {
|
|
1146
|
+
fontSize: "small"
|
|
1147
|
+
}),
|
|
1148
|
+
label: privatePayloads ?? "--"
|
|
1149
|
+
})))));
|
|
1104
1150
|
}, "BlockPayloadCountsTableCell");
|
|
1105
1151
|
|
|
1106
1152
|
// src/components/block/table/cell/Producer.tsx
|
|
1107
1153
|
import { TableCell as TableCell5, Tooltip as Tooltip4 } from "@mui/material";
|
|
1108
|
-
import
|
|
1109
|
-
import React19 from "react";
|
|
1154
|
+
import React20 from "react";
|
|
1110
1155
|
var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, linked, notAvailableDialog, producerChipProps, ...props }) => {
|
|
1111
1156
|
const [ref, handleClick] = useLinkedBlockItem("block-producer", JSON.stringify(block));
|
|
1112
1157
|
const producer = useBlockProducer(block);
|
|
1113
|
-
const [notAvailable, setNotAvailable] =
|
|
1114
|
-
return /* @__PURE__ */
|
|
1158
|
+
const [notAvailable, setNotAvailable] = React20.useState(false);
|
|
1159
|
+
return /* @__PURE__ */ React20.createElement(TableCell5, {
|
|
1115
1160
|
ref,
|
|
1116
1161
|
...props
|
|
1117
|
-
}, /* @__PURE__ */
|
|
1162
|
+
}, /* @__PURE__ */ React20.createElement(Tooltip4, {
|
|
1118
1163
|
title: `Block Producer: ${producer}`
|
|
1119
|
-
}, /* @__PURE__ */
|
|
1120
|
-
sx: {
|
|
1121
|
-
width: "100%"
|
|
1122
|
-
}
|
|
1123
|
-
}, /* @__PURE__ */ React19.createElement(BlockProducerChip, {
|
|
1164
|
+
}, /* @__PURE__ */ React20.createElement(BlockProducerChip, {
|
|
1124
1165
|
sx: {
|
|
1125
1166
|
cursor: "pointer"
|
|
1126
1167
|
},
|
|
1127
1168
|
onClick: linked ? handleClick : () => setNotAvailable(true),
|
|
1128
1169
|
block,
|
|
1129
1170
|
...producerChipProps
|
|
1130
|
-
}))
|
|
1171
|
+
})), notAvailableDialog && notAvailable ? /* @__PURE__ */ React20.createElement(FeatureNotAvailable, {
|
|
1131
1172
|
featureName: "Producer Details",
|
|
1132
1173
|
open: notAvailable,
|
|
1133
1174
|
onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
|
|
@@ -1137,7 +1178,7 @@ var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, linked, notAvailab
|
|
|
1137
1178
|
// src/components/block/table/cell/TransactionCount.tsx
|
|
1138
1179
|
import { Error as Error3 } from "@mui/icons-material";
|
|
1139
1180
|
import { Link as Link3, TableCell as TableCell6, Tooltip as Tooltip5 } from "@mui/material";
|
|
1140
|
-
import
|
|
1181
|
+
import React21, { useMemo as useMemo10 } from "react";
|
|
1141
1182
|
var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
1142
1183
|
const [transactions, error] = useTxsFromBlock(block);
|
|
1143
1184
|
const txHashes = useMemo10(() => transactions?.map(([, hash]) => hash), [
|
|
@@ -1148,21 +1189,21 @@ var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ..
|
|
|
1148
1189
|
block: block[0]._hash
|
|
1149
1190
|
} : void 0;
|
|
1150
1191
|
const [ref, handleClick] = useLinkedBlockItem("transaction-count", data);
|
|
1151
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ React21.createElement(TableCell6, {
|
|
1152
1193
|
ref,
|
|
1153
1194
|
...props
|
|
1154
|
-
}, /* @__PURE__ */
|
|
1195
|
+
}, /* @__PURE__ */ React21.createElement("span", null, error ? /* @__PURE__ */ React21.createElement(Tooltip5, {
|
|
1155
1196
|
title: error.message
|
|
1156
|
-
}, /* @__PURE__ */
|
|
1197
|
+
}, /* @__PURE__ */ React21.createElement(Error3, {
|
|
1157
1198
|
color: "error"
|
|
1158
|
-
})) : null, linked ? /* @__PURE__ */
|
|
1199
|
+
})) : null, linked ? /* @__PURE__ */ React21.createElement(Link3, {
|
|
1159
1200
|
onClick: handleClick,
|
|
1160
1201
|
sx: {
|
|
1161
1202
|
cursor: "pointer"
|
|
1162
1203
|
}
|
|
1163
|
-
}, /* @__PURE__ */
|
|
1204
|
+
}, /* @__PURE__ */ React21.createElement(TransactionCountChip, {
|
|
1164
1205
|
transactions: txHashes
|
|
1165
|
-
})) : /* @__PURE__ */
|
|
1206
|
+
})) : /* @__PURE__ */ React21.createElement(TransactionCountChip, {
|
|
1166
1207
|
transactions: txHashes
|
|
1167
1208
|
})));
|
|
1168
1209
|
}, "BlockTransactionCountTableCell");
|
|
@@ -1171,17 +1212,17 @@ var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ..
|
|
|
1171
1212
|
import { TableCell as TableCell7 } from "@mui/material";
|
|
1172
1213
|
import { FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
|
|
1173
1214
|
import { BWVerification as BWVerification2 } from "@xyo-network/react-boundwitness-plugin";
|
|
1174
|
-
import
|
|
1215
|
+
import React22 from "react";
|
|
1175
1216
|
var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
|
|
1176
1217
|
const [ref, handleClick] = useLinkedBlockItem("block-verification", block?.[0].block.toString());
|
|
1177
|
-
return /* @__PURE__ */
|
|
1218
|
+
return /* @__PURE__ */ React22.createElement(TableCell7, {
|
|
1178
1219
|
ref,
|
|
1179
1220
|
...props
|
|
1180
|
-
}, /* @__PURE__ */
|
|
1221
|
+
}, /* @__PURE__ */ React22.createElement(FlexRow5, {
|
|
1181
1222
|
sx: {
|
|
1182
1223
|
width: "100%"
|
|
1183
1224
|
}
|
|
1184
|
-
}, /* @__PURE__ */
|
|
1225
|
+
}, /* @__PURE__ */ React22.createElement(BWVerification2, {
|
|
1185
1226
|
onClick: linked ? handleClick : void 0,
|
|
1186
1227
|
iconColors: true,
|
|
1187
1228
|
boundwitness: block?.[0]
|
|
@@ -1191,46 +1232,46 @@ var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, ...pro
|
|
|
1191
1232
|
// src/components/block/table/Ex.tsx
|
|
1192
1233
|
import { TableBody } from "@mui/material";
|
|
1193
1234
|
import { TableEx } from "@xyo-network/react-table";
|
|
1194
|
-
import
|
|
1235
|
+
import React24 from "react";
|
|
1195
1236
|
|
|
1196
1237
|
// src/components/block/table/head/TableHead.tsx
|
|
1197
1238
|
import { InfoOutline } from "@mui/icons-material";
|
|
1198
1239
|
import { TableCell as TableCell8, TableHead, TableRow, Tooltip as Tooltip6, Typography as Typography3 } from "@mui/material";
|
|
1199
1240
|
import { FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
|
|
1200
|
-
import
|
|
1241
|
+
import React23 from "react";
|
|
1201
1242
|
var ToolTipTableCell = /* @__PURE__ */ __name(({ children, align, title, ...props }) => {
|
|
1202
|
-
return /* @__PURE__ */
|
|
1243
|
+
return /* @__PURE__ */ React23.createElement(TableCell8, {
|
|
1203
1244
|
title,
|
|
1204
1245
|
...props
|
|
1205
|
-
}, /* @__PURE__ */
|
|
1246
|
+
}, /* @__PURE__ */ React23.createElement(Tooltip6, {
|
|
1206
1247
|
title
|
|
1207
|
-
}, /* @__PURE__ */
|
|
1248
|
+
}, /* @__PURE__ */ React23.createElement(FlexRow6, {
|
|
1208
1249
|
justifyContent: align
|
|
1209
|
-
}, /* @__PURE__ */
|
|
1250
|
+
}, /* @__PURE__ */ React23.createElement(Typography3, {
|
|
1210
1251
|
variant: "body2"
|
|
1211
|
-
}, children), "\xA0", /* @__PURE__ */
|
|
1252
|
+
}, children), "\xA0", /* @__PURE__ */ React23.createElement(InfoOutline, {
|
|
1212
1253
|
fontSize: "small"
|
|
1213
1254
|
}))));
|
|
1214
1255
|
}, "ToolTipTableCell");
|
|
1215
1256
|
var BlockchainTableHead = /* @__PURE__ */ __name(() => {
|
|
1216
|
-
return /* @__PURE__ */
|
|
1217
|
-
|
|
1218
|
-
}, "Block Hash"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
|
|
1219
|
-
align: "center",
|
|
1257
|
+
return /* @__PURE__ */ React23.createElement(TableHead, null, /* @__PURE__ */ React23.createElement(TableRow, null, /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1258
|
+
align: "left",
|
|
1220
1259
|
title: "The block number that is included in the block"
|
|
1221
|
-
}, "Block
|
|
1222
|
-
|
|
1260
|
+
}, "Block"), /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1261
|
+
title: "The hash of the block"
|
|
1262
|
+
}, "Block Hash"), /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1263
|
+
align: "left",
|
|
1264
|
+
title: "The address of the block producer that produced the block"
|
|
1265
|
+
}, "Block Producer"), /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1266
|
+
align: "left",
|
|
1223
1267
|
title: "Count of transactions that are included in the block"
|
|
1224
|
-
}, "Transactions"), /* @__PURE__ */
|
|
1225
|
-
align: "
|
|
1268
|
+
}, "Transactions"), /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1269
|
+
align: "left",
|
|
1226
1270
|
title: "Count of public and private payload counts for the block"
|
|
1227
|
-
}, "Payloads"), /* @__PURE__ */
|
|
1228
|
-
align: "center",
|
|
1229
|
-
title: "The address of the block producer that produced the block"
|
|
1230
|
-
}, "Block Producer"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
|
|
1271
|
+
}, "Payloads"), /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1231
1272
|
align: "center",
|
|
1232
1273
|
title: "The result of the local validation check for the block"
|
|
1233
|
-
}, "Valid"), /* @__PURE__ */
|
|
1274
|
+
}, "Valid"), /* @__PURE__ */ React23.createElement(ToolTipTableCell, {
|
|
1234
1275
|
align: "center",
|
|
1235
1276
|
title: "Link to display the raw JSON of the block"
|
|
1236
1277
|
}, "JSON")));
|
|
@@ -1238,16 +1279,17 @@ var BlockchainTableHead = /* @__PURE__ */ __name(() => {
|
|
|
1238
1279
|
|
|
1239
1280
|
// src/components/block/table/Ex.tsx
|
|
1240
1281
|
var BlockchainTableEx = /* @__PURE__ */ __name(({ ref, children, ...props }) => {
|
|
1241
|
-
return /* @__PURE__ */
|
|
1282
|
+
return /* @__PURE__ */ React24.createElement(TableEx, {
|
|
1242
1283
|
ref,
|
|
1243
1284
|
...props
|
|
1244
|
-
}, /* @__PURE__ */
|
|
1285
|
+
}, /* @__PURE__ */ React24.createElement(BlockchainTableHead, null), /* @__PURE__ */ React24.createElement(TableBody, null, children));
|
|
1245
1286
|
}, "BlockchainTableEx");
|
|
1246
1287
|
BlockchainTableEx.displayName = "BlockchainTableEx";
|
|
1247
1288
|
|
|
1248
1289
|
// src/components/block/table/row/TableRow.tsx
|
|
1249
|
-
import { TableRow as TableRow2 } from "@mui/material";
|
|
1250
|
-
import
|
|
1290
|
+
import { TableRow as TableRow2, useTheme } from "@mui/material";
|
|
1291
|
+
import { alphaCss } from "@xylabs/react-theme";
|
|
1292
|
+
import React25, { useMemo as useMemo11 } from "react";
|
|
1251
1293
|
var BlockChainTableRow = /* @__PURE__ */ __name(({ block, defaultExpanded, linked, sx, ...props }) => {
|
|
1252
1294
|
const linkedTableCellProps = useMemo11(() => ({
|
|
1253
1295
|
block,
|
|
@@ -1261,51 +1303,61 @@ var BlockChainTableRow = /* @__PURE__ */ __name(({ block, defaultExpanded, linke
|
|
|
1261
1303
|
}), [
|
|
1262
1304
|
block
|
|
1263
1305
|
]);
|
|
1264
|
-
|
|
1306
|
+
const theme = useTheme();
|
|
1307
|
+
return /* @__PURE__ */ React25.createElement(TableRow2, {
|
|
1265
1308
|
sx: {
|
|
1266
|
-
overflowY: "scroll",
|
|
1309
|
+
"overflowY": "scroll",
|
|
1310
|
+
"&:hover": {
|
|
1311
|
+
backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.85)
|
|
1312
|
+
},
|
|
1267
1313
|
...sx
|
|
1268
1314
|
},
|
|
1269
1315
|
...props
|
|
1270
|
-
}, /* @__PURE__ */
|
|
1271
|
-
align: "
|
|
1316
|
+
}, /* @__PURE__ */ React25.createElement(BlockNumberTableCell, {
|
|
1317
|
+
align: "left",
|
|
1272
1318
|
...linkedTableCellProps
|
|
1273
|
-
}), /* @__PURE__ */
|
|
1274
|
-
align: "
|
|
1319
|
+
}), /* @__PURE__ */ React25.createElement(BlockHashTableCell, {
|
|
1320
|
+
align: "left",
|
|
1275
1321
|
...linkedTableCellProps
|
|
1276
|
-
}), /* @__PURE__ */
|
|
1277
|
-
align: "
|
|
1322
|
+
}), /* @__PURE__ */ React25.createElement(BlockProducerTableCell, {
|
|
1323
|
+
align: "left",
|
|
1324
|
+
...linkedTableCellProps
|
|
1325
|
+
}), /* @__PURE__ */ React25.createElement(BlockTransactionCountTableCell, {
|
|
1326
|
+
align: "left",
|
|
1278
1327
|
...linkedTableCellProps
|
|
1279
|
-
}), /* @__PURE__ */
|
|
1328
|
+
}), /* @__PURE__ */ React25.createElement(BlockPayloadCountsTableCell, {
|
|
1329
|
+
align: "left",
|
|
1330
|
+
...linkedTableCellProps
|
|
1331
|
+
}), /* @__PURE__ */ React25.createElement(BlockVerificationTableCell, defaultTableCellProps), /* @__PURE__ */ React25.createElement(BlockJsonViewTableCell, defaultTableCellProps));
|
|
1280
1332
|
}, "BlockChainTableRow");
|
|
1281
1333
|
|
|
1282
1334
|
// src/components/chain/controls/PollingControlsFlexbox.tsx
|
|
1283
1335
|
import { Autorenew, Pause } from "@mui/icons-material";
|
|
1284
1336
|
import { Alert as Alert3, AlertTitle as AlertTitle2, Grow, Icon as Icon2, IconButton as IconButton4, Tooltip as Tooltip7 } from "@mui/material";
|
|
1285
1337
|
import { FlexRow as FlexRow7 } from "@xylabs/react-flexbox";
|
|
1286
|
-
import
|
|
1338
|
+
import React30, { memo } from "react";
|
|
1287
1339
|
|
|
1288
1340
|
// src/components/chain/stats/Dialog.tsx
|
|
1289
1341
|
import { QueryStats } from "@mui/icons-material";
|
|
1290
1342
|
import { Dialog as Dialog3, DialogContent as DialogContent3, DialogTitle as DialogTitle3, IconButton as IconButton3 } from "@mui/material";
|
|
1291
|
-
import
|
|
1343
|
+
import React28, { useState as useState11 } from "react";
|
|
1292
1344
|
|
|
1293
1345
|
// src/components/chain/stats/producer/ProducerFlexbox.tsx
|
|
1294
1346
|
import { ListItem, styled, Typography as Typography4 } from "@mui/material";
|
|
1295
1347
|
import { ErrorRender as ErrorRender3 } from "@xylabs/react-error";
|
|
1296
1348
|
import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
|
|
1297
1349
|
import { isChainSummaryProducers } from "@xyo-network/chain-protocol";
|
|
1298
|
-
import
|
|
1350
|
+
import React27, { useMemo as useMemo12 } from "react";
|
|
1299
1351
|
|
|
1300
1352
|
// src/components/chain/stats/producer/Table.tsx
|
|
1301
|
-
import { Table, TableBody as TableBody2, TableCell as TableCell9, TableHead as TableHead2, TableRow as TableRow3, useTheme } from "@mui/material";
|
|
1353
|
+
import { Table, TableBody as TableBody2, TableCell as TableCell9, TableHead as TableHead2, TableRow as TableRow3, useTheme as useTheme2 } from "@mui/material";
|
|
1302
1354
|
import { BlockiesAvatar as BlockiesAvatar2 } from "@xyo-network/react-chain-blockies";
|
|
1303
|
-
import
|
|
1355
|
+
import React26 from "react";
|
|
1304
1356
|
var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) => {
|
|
1305
|
-
const theme =
|
|
1306
|
-
return /* @__PURE__ */
|
|
1357
|
+
const theme = useTheme2();
|
|
1358
|
+
return /* @__PURE__ */ React26.createElement(Table, props, /* @__PURE__ */ React26.createElement(TableHead2, null, /* @__PURE__ */ React26.createElement(TableRow3, null, /* @__PURE__ */ React26.createElement(TableCell9, null, "Address"), /* @__PURE__ */ React26.createElement(TableCell9, null, "Blocks Produced"), /* @__PURE__ */ React26.createElement(TableCell9, null, "Rewards Earned Produced"))), /* @__PURE__ */ React26.createElement(TableBody2, null, producers?.map((producer) => /* @__PURE__ */ React26.createElement(TableRow3, {
|
|
1307
1359
|
key: producer.address
|
|
1308
|
-
}, /* @__PURE__ */
|
|
1360
|
+
}, /* @__PURE__ */ React26.createElement(TableCell9, null, /* @__PURE__ */ React26.createElement(BlockiesAvatar2, {
|
|
1309
1361
|
blockiesOptions: {
|
|
1310
1362
|
seed: producer.address
|
|
1311
1363
|
},
|
|
@@ -1313,7 +1365,7 @@ var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) =
|
|
|
1313
1365
|
height: theme.spacing(2.75),
|
|
1314
1366
|
width: theme.spacing(2.75)
|
|
1315
1367
|
}
|
|
1316
|
-
})), /* @__PURE__ */
|
|
1368
|
+
})), /* @__PURE__ */ React26.createElement(TableCell9, null, producer.blocksProduced.toString()), /* @__PURE__ */ React26.createElement(TableCell9, null, producer.rewardsEarned.toString())))));
|
|
1317
1369
|
}, "ChainProducerStatsTable");
|
|
1318
1370
|
|
|
1319
1371
|
// src/components/chain/stats/producer/ProducerFlexbox.tsx
|
|
@@ -1335,16 +1387,16 @@ var BlockProducerStatsFlexbox = /* @__PURE__ */ __name(({ payload, ...props }) =
|
|
|
1335
1387
|
const producersArray = useMemo12(() => Object.values(producer?.producers ?? {}), [
|
|
1336
1388
|
producer
|
|
1337
1389
|
]);
|
|
1338
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ React27.createElement(FlexCol3, {
|
|
1339
1391
|
alignItems: "start",
|
|
1340
1392
|
gap: 1,
|
|
1341
1393
|
...props
|
|
1342
|
-
}, /* @__PURE__ */
|
|
1394
|
+
}, /* @__PURE__ */ React27.createElement(ErrorRender3, {
|
|
1343
1395
|
error: producerError,
|
|
1344
1396
|
scope: "BlockProducerStatsFlexbox"
|
|
1345
|
-
}), /* @__PURE__ */
|
|
1397
|
+
}), /* @__PURE__ */ React27.createElement(Typography4, {
|
|
1346
1398
|
fontSize: "1rem"
|
|
1347
|
-
}, "Block Producers"), /* @__PURE__ */
|
|
1399
|
+
}, "Block Producers"), /* @__PURE__ */ React27.createElement(ChainProducerStatsTable, {
|
|
1348
1400
|
producers: producersArray
|
|
1349
1401
|
}));
|
|
1350
1402
|
}, "BlockProducerStatsFlexbox");
|
|
@@ -1356,18 +1408,18 @@ var StyledListItem = styled(ListItem)(() => ({
|
|
|
1356
1408
|
// src/components/chain/stats/Dialog.tsx
|
|
1357
1409
|
var ChainAnalyzerStatsDialog = /* @__PURE__ */ __name((props) => {
|
|
1358
1410
|
const { analyzers, statsUpdated } = useChainAnalyzersContext();
|
|
1359
|
-
return /* @__PURE__ */
|
|
1411
|
+
return /* @__PURE__ */ React28.createElement(Dialog3, props, /* @__PURE__ */ React28.createElement(DialogTitle3, null, "Chain Analysis"), /* @__PURE__ */ React28.createElement(DialogContent3, null, !!statsUpdated && Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ React28.createElement("div", {
|
|
1360
1412
|
key: id2
|
|
1361
|
-
}, id2 === "producers" && /* @__PURE__ */
|
|
1413
|
+
}, id2 === "producers" && /* @__PURE__ */ React28.createElement(BlockProducerStatsFlexbox, {
|
|
1362
1414
|
payload: analyzer.result()
|
|
1363
1415
|
})))));
|
|
1364
1416
|
}, "ChainAnalyzerStatsDialog");
|
|
1365
1417
|
var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
|
|
1366
1418
|
const [open, setOpen] = useState11(false);
|
|
1367
1419
|
const handleClose = /* @__PURE__ */ __name(() => setOpen(false), "handleClose");
|
|
1368
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(IconButton3, {
|
|
1369
1421
|
onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
|
|
1370
|
-
}, /* @__PURE__ */
|
|
1422
|
+
}, /* @__PURE__ */ React28.createElement(QueryStats, null)), /* @__PURE__ */ React28.createElement(ChainAnalyzerStatsDialog, {
|
|
1371
1423
|
onClose: handleClose,
|
|
1372
1424
|
open,
|
|
1373
1425
|
...props
|
|
@@ -1376,19 +1428,19 @@ var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
|
|
|
1376
1428
|
|
|
1377
1429
|
// src/components/chain/controls/PulseSvgIcon.tsx
|
|
1378
1430
|
import { createSvgIcon, keyframes, styled as styled2 } from "@mui/material";
|
|
1379
|
-
import
|
|
1380
|
-
var PulseSvgIcon = createSvgIcon(/* @__PURE__ */
|
|
1431
|
+
import React29 from "react";
|
|
1432
|
+
var PulseSvgIcon = createSvgIcon(/* @__PURE__ */ React29.createElement("svg", {
|
|
1381
1433
|
viewBox: "0 0 80 80",
|
|
1382
1434
|
version: "1.1",
|
|
1383
1435
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1384
|
-
}, /* @__PURE__ */
|
|
1436
|
+
}, /* @__PURE__ */ React29.createElement("g", {
|
|
1385
1437
|
transform: "translate(34,34)"
|
|
1386
|
-
}, /* @__PURE__ */
|
|
1438
|
+
}, /* @__PURE__ */ React29.createElement("circle", {
|
|
1387
1439
|
className: "core",
|
|
1388
1440
|
cx: "0",
|
|
1389
1441
|
cy: "0",
|
|
1390
1442
|
r: "6"
|
|
1391
|
-
}), /* @__PURE__ */
|
|
1443
|
+
}), /* @__PURE__ */ React29.createElement("circle", {
|
|
1392
1444
|
className: "radar",
|
|
1393
1445
|
cx: "0",
|
|
1394
1446
|
cy: "0",
|
|
@@ -1452,24 +1504,24 @@ var StyledPulseSvgIcon = styled2(PulseSvgIcon)(({ theme }) => {
|
|
|
1452
1504
|
var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingState, setPollingState }) => {
|
|
1453
1505
|
const paused = pollingState === "paused";
|
|
1454
1506
|
const running = pollingState === "running";
|
|
1455
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ React30.createElement(FlexRow7, {
|
|
1456
1508
|
justifyContent: "space-between",
|
|
1457
1509
|
width: "100%"
|
|
1458
|
-
}, /* @__PURE__ */
|
|
1510
|
+
}, /* @__PURE__ */ React30.createElement(FlexRow7, {
|
|
1459
1511
|
gap: 2
|
|
1460
|
-
}, running && /* @__PURE__ */
|
|
1512
|
+
}, running && /* @__PURE__ */ React30.createElement(IconButton4, {
|
|
1461
1513
|
onClick: /* @__PURE__ */ __name(() => setPollingState?.("paused"), "onClick"),
|
|
1462
1514
|
title: "Pause Block Stream"
|
|
1463
|
-
}, /* @__PURE__ */
|
|
1515
|
+
}, /* @__PURE__ */ React30.createElement(Pause, null)), paused && /* @__PURE__ */ React30.createElement(IconButton4, {
|
|
1464
1516
|
onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick"),
|
|
1465
1517
|
title: "Re-Sync Block Stream"
|
|
1466
|
-
}, /* @__PURE__ */
|
|
1518
|
+
}, /* @__PURE__ */ React30.createElement(Autorenew, null)), /* @__PURE__ */ React30.createElement(ChainAnalyzerStatsDialogFromContext, null)), /* @__PURE__ */ React30.createElement(FlexRow7, {
|
|
1467
1519
|
gap: 2
|
|
1468
|
-
}, /* @__PURE__ */
|
|
1520
|
+
}, /* @__PURE__ */ React30.createElement(Grow, {
|
|
1469
1521
|
in: (blocksBehind ?? 0) > 0
|
|
1470
|
-
}, /* @__PURE__ */
|
|
1522
|
+
}, /* @__PURE__ */ React30.createElement(Tooltip7, {
|
|
1471
1523
|
title: "Click to Re-Sync"
|
|
1472
|
-
}, /* @__PURE__ */
|
|
1524
|
+
}, /* @__PURE__ */ React30.createElement(Alert3, {
|
|
1473
1525
|
sx: {
|
|
1474
1526
|
py: 0,
|
|
1475
1527
|
px: 1,
|
|
@@ -1477,11 +1529,11 @@ var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingStat
|
|
|
1477
1529
|
},
|
|
1478
1530
|
severity: "warning",
|
|
1479
1531
|
onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick")
|
|
1480
|
-
}, /* @__PURE__ */
|
|
1532
|
+
}, /* @__PURE__ */ React30.createElement(AlertTitle2, {
|
|
1481
1533
|
sx: {
|
|
1482
1534
|
mb: 0
|
|
1483
1535
|
}
|
|
1484
|
-
}, "Behind:", " ", blocksBehind)))), /* @__PURE__ */
|
|
1536
|
+
}, "Behind:", " ", blocksBehind)))), /* @__PURE__ */ React30.createElement(Icon2, null, /* @__PURE__ */ React30.createElement(StyledPulseSvgIcon, {
|
|
1485
1537
|
className: running ? "" : "paused"
|
|
1486
1538
|
}))));
|
|
1487
1539
|
}, "PollingControlsFlexbox");
|
|
@@ -1489,9 +1541,9 @@ var MemoizedPollingControlsFlexbox = /* @__PURE__ */ memo(PollingControlsFlexbox
|
|
|
1489
1541
|
|
|
1490
1542
|
// src/components/chain/dialog/Dialog.tsx
|
|
1491
1543
|
import { Button as Button4, Dialog as Dialog4, DialogActions as DialogActions3, DialogContent as DialogContent4 } from "@mui/material";
|
|
1492
|
-
import
|
|
1544
|
+
import React31 from "react";
|
|
1493
1545
|
var TransactionsDialog = /* @__PURE__ */ __name((props) => {
|
|
1494
|
-
return /* @__PURE__ */
|
|
1546
|
+
return /* @__PURE__ */ React31.createElement(Dialog4, props, /* @__PURE__ */ React31.createElement(DialogContent4, null, "Transactions Dialog"), /* @__PURE__ */ React31.createElement(DialogActions3, null, /* @__PURE__ */ React31.createElement(Button4, {
|
|
1495
1547
|
variant: "outlined",
|
|
1496
1548
|
onClick: /* @__PURE__ */ __name((e) => props?.onClose?.(e, "escapeKeyDown"), "onClick")
|
|
1497
1549
|
}, "Close")));
|
|
@@ -1531,9 +1583,9 @@ var useOnBlock = /* @__PURE__ */ __name((initialHeadNumber, onAddBlock, liveHead
|
|
|
1531
1583
|
|
|
1532
1584
|
// src/components/chain/pagination/BlockChainPagination.tsx
|
|
1533
1585
|
import { TablePaginationActions } from "@xyo-network/react-payload-table";
|
|
1534
|
-
import
|
|
1586
|
+
import React32 from "react";
|
|
1535
1587
|
var BlockChainPagination = /* @__PURE__ */ __name(({ count = 0, onPageChange, page, rowsPerPage = 10 }) => {
|
|
1536
|
-
return /* @__PURE__ */
|
|
1588
|
+
return /* @__PURE__ */ React32.createElement(TablePaginationActions, {
|
|
1537
1589
|
count,
|
|
1538
1590
|
onPageChange,
|
|
1539
1591
|
page,
|
|
@@ -1567,11 +1619,11 @@ var useChainPagination = /* @__PURE__ */ __name((pageSize, blockComponents) => {
|
|
|
1567
1619
|
// src/components/chain/render/dynamic/flexbox/variants/Base.tsx
|
|
1568
1620
|
import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
|
|
1569
1621
|
import { FlexCol as FlexCol5 } from "@xylabs/react-flexbox";
|
|
1570
|
-
import
|
|
1622
|
+
import React34 from "react";
|
|
1571
1623
|
|
|
1572
1624
|
// src/components/chain/list/Animated.tsx
|
|
1573
1625
|
import { AnimatedList } from "@xylabs/react-animation";
|
|
1574
|
-
import
|
|
1626
|
+
import React33 from "react";
|
|
1575
1627
|
|
|
1576
1628
|
// src/components/chain/styled/BlockListWrapperFlexbox.tsx
|
|
1577
1629
|
import { styled as styled3 } from "@mui/material";
|
|
@@ -1592,10 +1644,10 @@ var BlockListWrapperFlexBox = styled3(FlexCol4, {
|
|
|
1592
1644
|
|
|
1593
1645
|
// src/components/chain/list/Animated.tsx
|
|
1594
1646
|
var BlockListAnimated = /* @__PURE__ */ __name(({ blockChainRenderComponents }) => {
|
|
1595
|
-
return /* @__PURE__ */
|
|
1647
|
+
return /* @__PURE__ */ React33.createElement(BlockListWrapperFlexBox, {
|
|
1596
1648
|
alignItems: "stretch",
|
|
1597
1649
|
width: "100%"
|
|
1598
|
-
}, /* @__PURE__ */
|
|
1650
|
+
}, /* @__PURE__ */ React33.createElement(AnimatedList, {
|
|
1599
1651
|
fullWidth: true,
|
|
1600
1652
|
items: blockChainRenderComponents
|
|
1601
1653
|
}));
|
|
@@ -1686,25 +1738,25 @@ var useRemoteBlockChainRenderProps = /* @__PURE__ */ __name((chainArchivistModul
|
|
|
1686
1738
|
// src/components/chain/render/dynamic/flexbox/variants/Base.tsx
|
|
1687
1739
|
var DynamicListBase = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
|
|
1688
1740
|
const { errors, blockChainRenderComponents, blocksWhilePaused, pollingState, updatePollingState } = useDynamicBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
|
|
1689
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ React34.createElement(FlexCol5, {
|
|
1690
1742
|
alignItems: "start",
|
|
1691
1743
|
...props
|
|
1692
|
-
}, errors?.map((error) => /* @__PURE__ */
|
|
1744
|
+
}, errors?.map((error) => /* @__PURE__ */ React34.createElement(ErrorRender4, {
|
|
1693
1745
|
error,
|
|
1694
1746
|
key: error?.name,
|
|
1695
1747
|
scope: "DynamicBlockchainRenderFlexboxInner"
|
|
1696
|
-
})), /* @__PURE__ */
|
|
1748
|
+
})), /* @__PURE__ */ React34.createElement(MemoizedPollingControlsFlexbox, {
|
|
1697
1749
|
blocksBehind: blocksWhilePaused?.length,
|
|
1698
1750
|
pollingState,
|
|
1699
1751
|
setPollingState: updatePollingState
|
|
1700
|
-
}), /* @__PURE__ */
|
|
1752
|
+
}), /* @__PURE__ */ React34.createElement(BlockListAnimated, {
|
|
1701
1753
|
blockChainRenderComponents
|
|
1702
1754
|
}));
|
|
1703
1755
|
}, "DynamicListBase");
|
|
1704
1756
|
|
|
1705
1757
|
// src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx
|
|
1706
1758
|
import { ChainProducersAnalyzer } from "@xyo-network/chain-protocol";
|
|
1707
|
-
import
|
|
1759
|
+
import React35, { useMemo as useMemo16 } from "react";
|
|
1708
1760
|
var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
|
|
1709
1761
|
const { chainInformation } = blockChainRenderProps ?? {};
|
|
1710
1762
|
const analyzers = useMemo16(() => {
|
|
@@ -1716,9 +1768,9 @@ var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props })
|
|
|
1716
1768
|
}, [
|
|
1717
1769
|
chainInformation
|
|
1718
1770
|
]);
|
|
1719
|
-
return /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ React35.createElement(ChainAnalyzersProvider, {
|
|
1720
1772
|
analyzers
|
|
1721
|
-
}, /* @__PURE__ */
|
|
1773
|
+
}, /* @__PURE__ */ React35.createElement(ChainPollingProvider, null, /* @__PURE__ */ React35.createElement(DynamicListBase, {
|
|
1722
1774
|
blockChainRenderProps,
|
|
1723
1775
|
...props
|
|
1724
1776
|
})));
|
|
@@ -1726,13 +1778,13 @@ var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props })
|
|
|
1726
1778
|
|
|
1727
1779
|
// src/components/chain/render/dynamic/flexbox/variants/WithRemote.tsx
|
|
1728
1780
|
import { ErrorRender as ErrorRender5 } from "@xylabs/react-error";
|
|
1729
|
-
import
|
|
1781
|
+
import React36 from "react";
|
|
1730
1782
|
var WithRemote = /* @__PURE__ */ __name(({ url, chainArchivistModuleId, blockChainRenderProps: blockChainRenderPropsArg, ...props }) => {
|
|
1731
1783
|
const { error, blockChainRenderProps } = useRemoteBlockChainRenderProps(chainArchivistModuleId, url, blockChainRenderPropsArg);
|
|
1732
|
-
return /* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(ErrorRender5, {
|
|
1733
1785
|
error,
|
|
1734
1786
|
scope: "RemoteChainProviderFlexbox"
|
|
1735
|
-
}), /* @__PURE__ */
|
|
1787
|
+
}), /* @__PURE__ */ React36.createElement(WithAnalysis, {
|
|
1736
1788
|
blockChainRenderProps,
|
|
1737
1789
|
...props
|
|
1738
1790
|
}));
|
|
@@ -1748,7 +1800,7 @@ var DynamicBlockchainRenderFlexbox = {
|
|
|
1748
1800
|
// src/components/chain/render/static/flexbox/variants/Base.tsx
|
|
1749
1801
|
import { ErrorRender as ErrorRender6 } from "@xylabs/react-error";
|
|
1750
1802
|
import { FlexCol as FlexCol6, FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
|
|
1751
|
-
import
|
|
1803
|
+
import React37 from "react";
|
|
1752
1804
|
|
|
1753
1805
|
// src/components/chain/render/static/hooks/useStaticBlockRenderComponents.ts
|
|
1754
1806
|
import { exists } from "@xylabs/exists";
|
|
@@ -1781,31 +1833,31 @@ var useStaticBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blo
|
|
|
1781
1833
|
// src/components/chain/render/static/flexbox/variants/Base.tsx
|
|
1782
1834
|
var StaticListBase = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
|
|
1783
1835
|
const { blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize } = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
|
|
1784
|
-
return /* @__PURE__ */
|
|
1836
|
+
return /* @__PURE__ */ React37.createElement(FlexCol6, {
|
|
1785
1837
|
alignItems: "start",
|
|
1786
1838
|
gap: 2,
|
|
1787
1839
|
width: "100%",
|
|
1788
1840
|
...props
|
|
1789
|
-
}, errors?.map((error) => /* @__PURE__ */
|
|
1841
|
+
}, errors?.map((error) => /* @__PURE__ */ React37.createElement(ErrorRender6, {
|
|
1790
1842
|
error,
|
|
1791
1843
|
key: error.name,
|
|
1792
1844
|
scope: "StaticBlockchainFlexboxInner"
|
|
1793
|
-
})), paginatedBlockComponents?.length ? /* @__PURE__ */
|
|
1845
|
+
})), paginatedBlockComponents?.length ? /* @__PURE__ */ React37.createElement(FlexGrowRow2, {
|
|
1794
1846
|
justifyContent: "space-between",
|
|
1795
1847
|
width: "100%"
|
|
1796
|
-
}, /* @__PURE__ */
|
|
1848
|
+
}, /* @__PURE__ */ React37.createElement(ChainAnalyzerStatsDialogFromContext, null), /* @__PURE__ */ React37.createElement(BlockChainPagination, {
|
|
1797
1849
|
count: blockComponents?.length ?? 0,
|
|
1798
1850
|
onPageChange,
|
|
1799
1851
|
page,
|
|
1800
1852
|
rowsPerPage: pageSize
|
|
1801
|
-
})) : null, /* @__PURE__ */
|
|
1853
|
+
})) : null, /* @__PURE__ */ React37.createElement(BlockListAnimated, {
|
|
1802
1854
|
blockChainRenderComponents: paginatedBlockComponents
|
|
1803
1855
|
}));
|
|
1804
1856
|
}, "StaticListBase");
|
|
1805
1857
|
|
|
1806
1858
|
// src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx
|
|
1807
1859
|
import { ChainProducersAnalyzer as ChainProducersAnalyzer2 } from "@xyo-network/chain-protocol";
|
|
1808
|
-
import
|
|
1860
|
+
import React38, { useMemo as useMemo18 } from "react";
|
|
1809
1861
|
var WithAnalysis2 = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
|
|
1810
1862
|
const { chainInformation } = blockChainRenderProps ?? {};
|
|
1811
1863
|
const analyzers = useMemo18(() => {
|
|
@@ -1817,9 +1869,9 @@ var WithAnalysis2 = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props })
|
|
|
1817
1869
|
}, [
|
|
1818
1870
|
chainInformation
|
|
1819
1871
|
]);
|
|
1820
|
-
return /* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ React38.createElement(ChainAnalyzersProvider, {
|
|
1821
1873
|
analyzers
|
|
1822
|
-
}, /* @__PURE__ */
|
|
1874
|
+
}, /* @__PURE__ */ React38.createElement(StaticListBase, {
|
|
1823
1875
|
blockChainRenderProps,
|
|
1824
1876
|
...props
|
|
1825
1877
|
}));
|
|
@@ -1834,19 +1886,19 @@ var StaticBlockchainRenderFlexBox = {
|
|
|
1834
1886
|
// src/components/payload/builder/Flexbox.tsx
|
|
1835
1887
|
import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
|
|
1836
1888
|
import { JsonViewerEx as JsonViewerEx2 } from "@xyo-network/react-payload-raw-info";
|
|
1837
|
-
import
|
|
1889
|
+
import React39, { useState as useState13 } from "react";
|
|
1838
1890
|
var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild, ...props }) => {
|
|
1839
1891
|
const [payload, setPayload] = useState13();
|
|
1840
1892
|
const onBuildLocal = /* @__PURE__ */ __name((payload2) => {
|
|
1841
1893
|
onBuild?.(payload2);
|
|
1842
1894
|
setPayload(payload2);
|
|
1843
1895
|
}, "onBuildLocal");
|
|
1844
|
-
return /* @__PURE__ */
|
|
1896
|
+
return /* @__PURE__ */ React39.createElement(FlexCol7, {
|
|
1845
1897
|
gap: 2,
|
|
1846
1898
|
...props
|
|
1847
|
-
}, /* @__PURE__ */
|
|
1899
|
+
}, /* @__PURE__ */ React39.createElement(BuilderComponent, {
|
|
1848
1900
|
onBuild: onBuildLocal
|
|
1849
|
-
}), payload && /* @__PURE__ */
|
|
1901
|
+
}), payload && /* @__PURE__ */ React39.createElement(JsonViewerEx2, {
|
|
1850
1902
|
value: payload
|
|
1851
1903
|
}));
|
|
1852
1904
|
}, "PayloadBuilderFlexbox");
|
|
@@ -1854,11 +1906,11 @@ var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild,
|
|
|
1854
1906
|
// src/components/payload/builder/producer-intent/Form.tsx
|
|
1855
1907
|
import { Button as Button5, FormControl as FormControl5 } from "@mui/material";
|
|
1856
1908
|
import { createProducerChainStakeIntent } from "@xyo-network/chain-ethereum";
|
|
1857
|
-
import
|
|
1909
|
+
import React42, { useMemo as useMemo20, useState as useState16 } from "react";
|
|
1858
1910
|
|
|
1859
1911
|
// src/components/payload/fields/BlockNumberTextField.tsx
|
|
1860
1912
|
import { FormControl as FormControl3, FormHelperText as FormHelperText2, TextField as TextField3 } from "@mui/material";
|
|
1861
|
-
import
|
|
1913
|
+
import React40, { useState as useState14 } from "react";
|
|
1862
1914
|
var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumberChanged, onChange, ...props }) => {
|
|
1863
1915
|
const [blockNumber, setBlockNumber] = useState14();
|
|
1864
1916
|
const handleChange = /* @__PURE__ */ __name((e) => {
|
|
@@ -1867,15 +1919,15 @@ var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumber
|
|
|
1867
1919
|
onBlockNumberChanged?.(Number.parseInt(value));
|
|
1868
1920
|
onChange?.(e);
|
|
1869
1921
|
}, "handleChange");
|
|
1870
|
-
return /* @__PURE__ */
|
|
1922
|
+
return /* @__PURE__ */ React40.createElement(FormControl3, {
|
|
1871
1923
|
fullWidth: true
|
|
1872
|
-
}, /* @__PURE__ */
|
|
1924
|
+
}, /* @__PURE__ */ React40.createElement(TextField3, {
|
|
1873
1925
|
error: !!errorMessage,
|
|
1874
1926
|
onChange: handleChange,
|
|
1875
1927
|
type: "number",
|
|
1876
1928
|
value: blockNumber ?? "",
|
|
1877
1929
|
...props
|
|
1878
|
-
}), errorMessage && /* @__PURE__ */
|
|
1930
|
+
}), errorMessage && /* @__PURE__ */ React40.createElement(FormHelperText2, {
|
|
1879
1931
|
sx: {
|
|
1880
1932
|
color: "error.main"
|
|
1881
1933
|
}
|
|
@@ -1885,7 +1937,7 @@ var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumber
|
|
|
1885
1937
|
// src/components/payload/fields/XyoAddressTextField.tsx
|
|
1886
1938
|
import { FormControl as FormControl4, FormHelperText as FormHelperText3, TextField as TextField4 } from "@mui/material";
|
|
1887
1939
|
import { asAddress } from "@xylabs/hex";
|
|
1888
|
-
import
|
|
1940
|
+
import React41, { useMemo as useMemo19, useState as useState15 } from "react";
|
|
1889
1941
|
var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange, resetValue, ...props }) => {
|
|
1890
1942
|
const [address, setAddress] = useState15("");
|
|
1891
1943
|
const [addressError, setAddressError] = useState15();
|
|
@@ -1909,15 +1961,15 @@ var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange,
|
|
|
1909
1961
|
onAddressChanged?.();
|
|
1910
1962
|
}
|
|
1911
1963
|
}, "handleBlur");
|
|
1912
|
-
return /* @__PURE__ */
|
|
1964
|
+
return /* @__PURE__ */ React41.createElement(FormControl4, {
|
|
1913
1965
|
fullWidth: true
|
|
1914
|
-
}, /* @__PURE__ */
|
|
1966
|
+
}, /* @__PURE__ */ React41.createElement(TextField4, {
|
|
1915
1967
|
error: !!addressError,
|
|
1916
1968
|
onBlur: handleBlur,
|
|
1917
1969
|
onChange: handleChange,
|
|
1918
1970
|
value: address,
|
|
1919
1971
|
...props
|
|
1920
|
-
}), addressError && /* @__PURE__ */
|
|
1972
|
+
}), addressError && /* @__PURE__ */ React41.createElement(FormHelperText3, {
|
|
1921
1973
|
sx: {
|
|
1922
1974
|
color: "error.main"
|
|
1923
1975
|
}
|
|
@@ -1950,33 +2002,33 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
1950
2002
|
const onBuildLocal = /* @__PURE__ */ __name(() => {
|
|
1951
2003
|
if (onBuild && intentPayload) onBuild?.(intentPayload);
|
|
1952
2004
|
}, "onBuildLocal");
|
|
1953
|
-
return /* @__PURE__ */
|
|
2005
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FormControl5, {
|
|
1954
2006
|
fullWidth: true
|
|
1955
|
-
}, /* @__PURE__ */
|
|
2007
|
+
}, /* @__PURE__ */ React42.createElement(XyoAddressTextField, {
|
|
1956
2008
|
label: "Delegate",
|
|
1957
2009
|
name: "delegate",
|
|
1958
2010
|
onAddressChanged: setDelegate,
|
|
1959
2011
|
required: true,
|
|
1960
2012
|
size: "small"
|
|
1961
|
-
})), /* @__PURE__ */
|
|
2013
|
+
})), /* @__PURE__ */ React42.createElement(FormControl5, {
|
|
1962
2014
|
fullWidth: true
|
|
1963
|
-
}, /* @__PURE__ */
|
|
2015
|
+
}, /* @__PURE__ */ React42.createElement(BlockNumberTextField, {
|
|
1964
2016
|
errorMessage: blockRangeError?.message,
|
|
1965
2017
|
label: "Expires",
|
|
1966
2018
|
name: "exp",
|
|
1967
2019
|
onBlockNumberChanged: setExp,
|
|
1968
2020
|
required: true,
|
|
1969
2021
|
size: "small"
|
|
1970
|
-
})), /* @__PURE__ */
|
|
2022
|
+
})), /* @__PURE__ */ React42.createElement(FormControl5, {
|
|
1971
2023
|
fullWidth: true
|
|
1972
|
-
}, /* @__PURE__ */
|
|
2024
|
+
}, /* @__PURE__ */ React42.createElement(BlockNumberTextField, {
|
|
1973
2025
|
errorMessage: blockRangeError?.message,
|
|
1974
2026
|
label: "Not Before",
|
|
1975
2027
|
name: "nbf",
|
|
1976
2028
|
onBlockNumberChanged: setNbf,
|
|
1977
2029
|
required: true,
|
|
1978
2030
|
size: "small"
|
|
1979
|
-
})), /* @__PURE__ */
|
|
2031
|
+
})), /* @__PURE__ */ React42.createElement(Button5, {
|
|
1980
2032
|
disabled: !intentPayload,
|
|
1981
2033
|
variant: "contained",
|
|
1982
2034
|
onClick: onBuildLocal
|
|
@@ -1984,12 +2036,12 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
1984
2036
|
}, "ProducerIntentBuilderForm");
|
|
1985
2037
|
|
|
1986
2038
|
// src/components/payload/builder/transfer/Flexbox.tsx
|
|
1987
|
-
import
|
|
2039
|
+
import React45 from "react";
|
|
1988
2040
|
|
|
1989
2041
|
// src/components/payload/builder/transfer/Form.tsx
|
|
1990
2042
|
import { Button as Button6, FormControl as FormControl7 } from "@mui/material";
|
|
1991
2043
|
import { TransferSchema } from "@xyo-network/xl1-model";
|
|
1992
|
-
import
|
|
2044
|
+
import React44, { useMemo as useMemo22, useState as useState18 } from "react";
|
|
1993
2045
|
|
|
1994
2046
|
// src/components/payload/builder/transfer/builder/SingleFlexbox.tsx
|
|
1995
2047
|
import { RemoveCircle } from "@mui/icons-material";
|
|
@@ -1997,7 +2049,7 @@ import { FormControl as FormControl6, Icon as Icon3, IconButton as IconButton5 }
|
|
|
1997
2049
|
import { toHex as toHex3 } from "@xylabs/hex";
|
|
1998
2050
|
import { FlexRow as FlexRow8 } from "@xylabs/react-flexbox";
|
|
1999
2051
|
import { BigIntInput } from "@xyo-network/react-shared";
|
|
2000
|
-
import
|
|
2052
|
+
import React43, { useEffect as useEffect4, useMemo as useMemo21, useState as useState17 } from "react";
|
|
2001
2053
|
var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated, onRemoveTransfer, singleTransfer, ...props }) => {
|
|
2002
2054
|
const [toAddress, setToAddress] = useState17();
|
|
2003
2055
|
const [amount, setAmount] = useState17();
|
|
@@ -2018,29 +2070,29 @@ var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated,
|
|
|
2018
2070
|
}, [
|
|
2019
2071
|
transferAmount
|
|
2020
2072
|
]);
|
|
2021
|
-
return /* @__PURE__ */
|
|
2073
|
+
return /* @__PURE__ */ React43.createElement(FlexRow8, {
|
|
2022
2074
|
alignItems: "start",
|
|
2023
2075
|
gap: 1,
|
|
2024
2076
|
...props
|
|
2025
|
-
}, /* @__PURE__ */
|
|
2077
|
+
}, /* @__PURE__ */ React43.createElement(FormControl6, {
|
|
2026
2078
|
fullWidth: true
|
|
2027
|
-
}, /* @__PURE__ */
|
|
2079
|
+
}, /* @__PURE__ */ React43.createElement(XyoAddressTextField, {
|
|
2028
2080
|
label: "To",
|
|
2029
2081
|
name: "to",
|
|
2030
2082
|
onAddressChanged: setToAddress,
|
|
2031
2083
|
required: true,
|
|
2032
2084
|
size: "small"
|
|
2033
|
-
})), /* @__PURE__ */
|
|
2085
|
+
})), /* @__PURE__ */ React43.createElement(FormControl6, {
|
|
2034
2086
|
fullWidth: true
|
|
2035
|
-
}, /* @__PURE__ */
|
|
2087
|
+
}, /* @__PURE__ */ React43.createElement(BigIntInput.TextField, {
|
|
2036
2088
|
label: "Amount",
|
|
2037
2089
|
name: "amount",
|
|
2038
2090
|
onChangeFixedPoint: setAmount,
|
|
2039
2091
|
required: true,
|
|
2040
2092
|
size: "small"
|
|
2041
|
-
})), /* @__PURE__ */
|
|
2093
|
+
})), /* @__PURE__ */ React43.createElement(IconButton5, {
|
|
2042
2094
|
onClick: /* @__PURE__ */ __name(() => onRemoveTransfer?.(singleTransfer.transferId), "onClick")
|
|
2043
|
-
}, /* @__PURE__ */
|
|
2095
|
+
}, /* @__PURE__ */ React43.createElement(Icon3, null, /* @__PURE__ */ React43.createElement(RemoveCircle, null))));
|
|
2044
2096
|
}, "SingleTransferBuilderFlexbox");
|
|
2045
2097
|
|
|
2046
2098
|
// src/components/payload/builder/transfer/Form.tsx
|
|
@@ -2089,19 +2141,19 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2089
2141
|
return transfer;
|
|
2090
2142
|
}));
|
|
2091
2143
|
}, "onTransferUpdated");
|
|
2092
|
-
return /* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(FormControl7, {
|
|
2093
2145
|
fullWidth: true
|
|
2094
|
-
}, /* @__PURE__ */
|
|
2146
|
+
}, /* @__PURE__ */ React44.createElement(XyoAddressTextField, {
|
|
2095
2147
|
label: "From",
|
|
2096
2148
|
name: "from",
|
|
2097
2149
|
onAddressChanged: setFromAddress,
|
|
2098
2150
|
required: true,
|
|
2099
2151
|
size: "small"
|
|
2100
|
-
})), /* @__PURE__ */
|
|
2152
|
+
})), /* @__PURE__ */ React44.createElement(Button6, {
|
|
2101
2153
|
onClick: onTransferAdded,
|
|
2102
2154
|
size: "small",
|
|
2103
2155
|
variant: "contained"
|
|
2104
|
-
}, "Add Transfer"), transfers.map((transfer) => /* @__PURE__ */
|
|
2156
|
+
}, "Add Transfer"), transfers.map((transfer) => /* @__PURE__ */ React44.createElement(SingleTransferBuilderFlexbox, {
|
|
2105
2157
|
key: transfer.transferId,
|
|
2106
2158
|
onTransferUpdated,
|
|
2107
2159
|
onRemoveTransfer: onTransferRemoved,
|
|
@@ -2109,7 +2161,7 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2109
2161
|
sx: {
|
|
2110
2162
|
width: "100%"
|
|
2111
2163
|
}
|
|
2112
|
-
})), /* @__PURE__ */
|
|
2164
|
+
})), /* @__PURE__ */ React44.createElement(Button6, {
|
|
2113
2165
|
disabled: !transferPayload,
|
|
2114
2166
|
variant: "contained",
|
|
2115
2167
|
onClick: onBuildLocal
|
|
@@ -2117,7 +2169,7 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
|
|
|
2117
2169
|
}, "TransferBuilderForm");
|
|
2118
2170
|
|
|
2119
2171
|
// src/components/payload/builder/transfer/Flexbox.tsx
|
|
2120
|
-
var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /* @__PURE__ */
|
|
2172
|
+
var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /* @__PURE__ */ React45.createElement(PayloadBuilderFlexbox, {
|
|
2121
2173
|
gap: 4,
|
|
2122
2174
|
alignItems: "start",
|
|
2123
2175
|
BuilderComponent: TransferBuilderForm,
|
|
@@ -2144,7 +2196,7 @@ import { usePromise as usePromise7 } from "@xylabs/react-promise";
|
|
|
2144
2196
|
import { MemoryArchivist } from "@xyo-network/archivist-memory";
|
|
2145
2197
|
import { ArchivistConfigSchema } from "@xyo-network/archivist-model";
|
|
2146
2198
|
import { flattenHydratedBlocks } from "@xyo-network/chain-protocol";
|
|
2147
|
-
import
|
|
2199
|
+
import React46, { useEffect as useEffect5 } from "react";
|
|
2148
2200
|
var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
2149
2201
|
const [randomBlockChain] = usePromise7(async () => await buildRandomBlockChain(), []);
|
|
2150
2202
|
const [blockChainRenderProps, blockChainRenderPropsError] = usePromise7(async () => {
|
|
@@ -2184,7 +2236,7 @@ var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
|
2184
2236
|
}
|
|
2185
2237
|
}
|
|
2186
2238
|
};
|
|
2187
|
-
return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */
|
|
2239
|
+
return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */ React46.createElement(Story, props) : /* @__PURE__ */ React46.createElement(CircularProgress, null);
|
|
2188
2240
|
}, "ChainArchivistDecorator");
|
|
2189
2241
|
|
|
2190
2242
|
// src/stories/ChainArchivistDelayedInsertDecorator.tsx
|
|
@@ -2194,7 +2246,7 @@ import { usePromise as usePromise8 } from "@xylabs/react-promise";
|
|
|
2194
2246
|
import { MemoryArchivist as MemoryArchivist2 } from "@xyo-network/archivist-memory";
|
|
2195
2247
|
import { ArchivistConfigSchema as ArchivistConfigSchema2 } from "@xyo-network/archivist-model";
|
|
2196
2248
|
import { flattenHydratedBlock } from "@xyo-network/chain-protocol";
|
|
2197
|
-
import
|
|
2249
|
+
import React47, { useEffect as useEffect6, useState as useState19 } from "react";
|
|
2198
2250
|
var chainArchivistRef;
|
|
2199
2251
|
var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
2200
2252
|
const [firstBlock, setFirstBlock] = useState19();
|
|
@@ -2252,7 +2304,7 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
|
|
|
2252
2304
|
}
|
|
2253
2305
|
}
|
|
2254
2306
|
};
|
|
2255
|
-
return firstBlock ? /* @__PURE__ */
|
|
2307
|
+
return firstBlock ? /* @__PURE__ */ React47.createElement(Story, props) : /* @__PURE__ */ React47.createElement(CircularProgress2, null);
|
|
2256
2308
|
}, "ChainArchivistDelayedInsertDecorator");
|
|
2257
2309
|
|
|
2258
2310
|
// src/stories/ChainInfoContextDecorator.tsx
|
|
@@ -2261,7 +2313,7 @@ import { usePromise as usePromise9 } from "@xylabs/react-promise";
|
|
|
2261
2313
|
import { XyoChainBlockNumberIterator as XyoChainBlockNumberIterator3 } from "@xyo-network/chain-services";
|
|
2262
2314
|
import { findFirstMatching } from "@xyo-network/chain-utils";
|
|
2263
2315
|
import { isBlockBoundWitness as isBlockBoundWitness3 } from "@xyo-network/xl1-model";
|
|
2264
|
-
import
|
|
2316
|
+
import React48 from "react";
|
|
2265
2317
|
var archivistConfig = {
|
|
2266
2318
|
url: "http://localhost:8080",
|
|
2267
2319
|
chainArchivistModuleId: "XYOPublic:XYOChain:Chain"
|
|
@@ -2287,11 +2339,11 @@ var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
|
|
|
2287
2339
|
chainArchivist,
|
|
2288
2340
|
chainInformation
|
|
2289
2341
|
]);
|
|
2290
|
-
return /* @__PURE__ */
|
|
2342
|
+
return /* @__PURE__ */ React48.createElement(ChainInfoProvider, {
|
|
2291
2343
|
chainArchivist,
|
|
2292
2344
|
chainInformation,
|
|
2293
2345
|
chainIterator
|
|
2294
|
-
}, /* @__PURE__ */
|
|
2346
|
+
}, /* @__PURE__ */ React48.createElement(Story, context));
|
|
2295
2347
|
}, "ChainInfoContextDecorator");
|
|
2296
2348
|
export {
|
|
2297
2349
|
BlockChainPagination,
|