@xyo-network/xl1-react-client-sdk 2.0.9 → 2.0.11
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/README.md +3 -6
- package/dist/browser/client/components/connected/RequestPermissionsButton.d.ts.map +1 -1
- package/dist/browser/client/components/connected/hooks/useConnectAccount.d.ts +1 -1
- package/dist/browser/client/index.mjs +38 -36
- package/dist/browser/client/index.mjs.map +3 -3
- package/dist/browser/index.mjs +38 -36
- package/dist/browser/index.mjs.map +3 -3
- package/package.json +33 -31
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[![logo][]]
|
|
1
|
+
[![logo][]](https://xyo.network)
|
|
2
2
|
|
|
3
3
|
# @xyo-network/xl1-react-client-sdk
|
|
4
4
|
|
|
@@ -191,13 +191,10 @@ See the [LICENSE](./LICENSE) file for license rights and limitations (LGPL-3.0-o
|
|
|
191
191
|
|
|
192
192
|
## Credits
|
|
193
193
|
|
|
194
|
-
[Made with 🔥 and ❄️ by XYO](https://xyo.network)
|
|
195
|
-
|
|
196
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
197
|
-
[logo-link]: https://xyo.network
|
|
194
|
+
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
198
195
|
|
|
199
196
|
[npm-badge]: https://img.shields.io/npm/v/@xyo-network/xl1-react-client-sdk.svg
|
|
200
197
|
[npm-link]: https://www.npmjs.com/package/@xyo-network/xl1-react-client-sdk
|
|
201
|
-
|
|
202
198
|
[license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-react-client-sdk.svg
|
|
203
199
|
[license-link]: ./LICENSE
|
|
200
|
+
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestPermissionsButton.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/connected/RequestPermissionsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAK/C,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,KAEN,MAAM,OAAO,CAAA;AAKd,MAAM,WAAW,6BAA8B,SAAQ,UAAU;IAC/D,WAAW,EAAE,iBAAiB,EAAE,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,
|
|
1
|
+
{"version":3,"file":"RequestPermissionsButton.d.ts","sourceRoot":"","sources":["../../../../../src/client/components/connected/RequestPermissionsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAK/C,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,KAEN,MAAM,OAAO,CAAA;AAKd,MAAM,WAAW,6BAA8B,SAAQ,UAAU;IAC/D,WAAW,EAAE,iBAAiB,EAAE,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAiH5E,CAAA"}
|
|
@@ -9,7 +9,7 @@ export declare const useConnectAccount: (gatewayName?: GatewayName, timeout?: nu
|
|
|
9
9
|
readonly __hex: true;
|
|
10
10
|
} & {
|
|
11
11
|
readonly __address: true;
|
|
12
|
-
}) | import("@xyo-network/address").
|
|
12
|
+
}) | import("@xyo-network/address").XyoQuantAddress | undefined>;
|
|
13
13
|
error: Error | undefined;
|
|
14
14
|
gateway: import("@xyo-network/xl1-sdk").XyoGatewayRunner | null | undefined;
|
|
15
15
|
timedout: boolean;
|
|
@@ -468,7 +468,7 @@ import {
|
|
|
468
468
|
Typography as Typography5
|
|
469
469
|
} from "@mui/material";
|
|
470
470
|
import { ButtonEx as ButtonEx5 } from "@xylabs/react-button";
|
|
471
|
-
import { ErrorRender as
|
|
471
|
+
import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
|
|
472
472
|
import { usePromise as usePromise2 } from "@xylabs/react-promise";
|
|
473
473
|
import { isDefined as isDefined7, isDefinedNotNull as isDefinedNotNull4 } from "@xylabs/sdk-js";
|
|
474
474
|
import {
|
|
@@ -488,7 +488,7 @@ import { useMemo, useState as useState5 } from "react";
|
|
|
488
488
|
// src/client/components/connected/RequestPermissionsButton.tsx
|
|
489
489
|
import { Alert as Alert4, Stack as Stack5 } from "@mui/material";
|
|
490
490
|
import { ButtonEx as ButtonEx4 } from "@xylabs/react-button";
|
|
491
|
-
import {
|
|
491
|
+
import { PopoverErrorRender } from "@xylabs/react-error";
|
|
492
492
|
import { isDefined as isDefined6, isDefinedNotNull as isDefinedNotNull3 } from "@xylabs/sdk-js";
|
|
493
493
|
import {
|
|
494
494
|
useCallback as useCallback3,
|
|
@@ -705,25 +705,27 @@ var RequestPermissionsButton = ({
|
|
|
705
705
|
},
|
|
706
706
|
children: [
|
|
707
707
|
timedout ? /* @__PURE__ */ jsx5(Alert4, { severity: "warning", children: "Wallet not detected." }) : null,
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
"
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
708
|
+
/* @__PURE__ */ jsxs5(Stack5, { direction: "row", sx: { gap: 1, alignItems: "center" }, children: [
|
|
709
|
+
/* @__PURE__ */ jsx5(
|
|
710
|
+
ButtonEx4,
|
|
711
|
+
{
|
|
712
|
+
variant: "contained",
|
|
713
|
+
size: "small",
|
|
714
|
+
disabled: !isDefinedNotNull3(permissionsApi) || requesting,
|
|
715
|
+
busy: isLoading || requesting,
|
|
716
|
+
onClick: handleClick,
|
|
717
|
+
children: hasGranted ? "Review permissions" : /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
718
|
+
"Request",
|
|
719
|
+
" ",
|
|
720
|
+
permissions.length,
|
|
721
|
+
" ",
|
|
722
|
+
"permission",
|
|
723
|
+
permissions.length === 1 ? "" : "s"
|
|
724
|
+
] })
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
/* @__PURE__ */ jsx5(PopoverErrorRender, { error: clientError ?? fetchError ?? requestError, scope: "RequestPermissionsButton" })
|
|
728
|
+
] }),
|
|
727
729
|
/* @__PURE__ */ jsx5(
|
|
728
730
|
PermissionsReviewDialog,
|
|
729
731
|
{
|
|
@@ -841,7 +843,7 @@ var InsertSection = ({
|
|
|
841
843
|
]
|
|
842
844
|
}
|
|
843
845
|
) : null,
|
|
844
|
-
/* @__PURE__ */ jsx6(
|
|
846
|
+
/* @__PURE__ */ jsx6(ErrorRender4, { error: insertError, scope: "DataLakeAddToChainPanel.insert" })
|
|
845
847
|
] });
|
|
846
848
|
var AddToChainSection = ({
|
|
847
849
|
addingToChain,
|
|
@@ -911,7 +913,7 @@ var AddToChainSection = ({
|
|
|
911
913
|
"."
|
|
912
914
|
] }) : null
|
|
913
915
|
] }) : null,
|
|
914
|
-
/* @__PURE__ */ jsx6(
|
|
916
|
+
/* @__PURE__ */ jsx6(ErrorRender4, { error: chainError, scope: "DataLakeAddToChainPanel.addToChain" })
|
|
915
917
|
] });
|
|
916
918
|
var DataLakeAddToChainPanel = ({
|
|
917
919
|
explorerUrl = DEFAULT_EXPLORER_URL,
|
|
@@ -1033,7 +1035,7 @@ var DataLakeAddToChainPanel = ({
|
|
|
1033
1035
|
txHash
|
|
1034
1036
|
}
|
|
1035
1037
|
),
|
|
1036
|
-
/* @__PURE__ */ jsx6(
|
|
1038
|
+
/* @__PURE__ */ jsx6(ErrorRender4, { error: clientError ?? gatewayError ?? void 0, scope: "DataLakeAddToChainPanel.wallet" })
|
|
1037
1039
|
]
|
|
1038
1040
|
}
|
|
1039
1041
|
);
|
|
@@ -1046,7 +1048,7 @@ import {
|
|
|
1046
1048
|
Typography as Typography6
|
|
1047
1049
|
} from "@mui/material";
|
|
1048
1050
|
import { ButtonEx as ButtonEx6 } from "@xylabs/react-button";
|
|
1049
|
-
import { ErrorRender as
|
|
1051
|
+
import { ErrorRender as ErrorRender5 } from "@xylabs/react-error";
|
|
1050
1052
|
import { isDefined as isDefined8, isDefinedNotNull as isDefinedNotNull5 } from "@xylabs/sdk-js";
|
|
1051
1053
|
import { useState as useState6 } from "react";
|
|
1052
1054
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -1129,7 +1131,7 @@ var DataLakeGetButton = ({
|
|
|
1129
1131
|
}
|
|
1130
1132
|
)
|
|
1131
1133
|
] }) : null,
|
|
1132
|
-
/* @__PURE__ */ jsx7(
|
|
1134
|
+
/* @__PURE__ */ jsx7(ErrorRender5, { error: clientError ?? requestError, scope: "DataLakeGetButton" })
|
|
1133
1135
|
]
|
|
1134
1136
|
}
|
|
1135
1137
|
);
|
|
@@ -1195,7 +1197,7 @@ import {
|
|
|
1195
1197
|
Typography as Typography8
|
|
1196
1198
|
} from "@mui/material";
|
|
1197
1199
|
import { ButtonEx as ButtonEx7 } from "@xylabs/react-button";
|
|
1198
|
-
import { ErrorRender as
|
|
1200
|
+
import { ErrorRender as ErrorRender6 } from "@xylabs/react-error";
|
|
1199
1201
|
import { isDefined as isDefined9, isDefinedNotNull as isDefinedNotNull6 } from "@xylabs/sdk-js";
|
|
1200
1202
|
import { useState as useState8 } from "react";
|
|
1201
1203
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
@@ -1278,7 +1280,7 @@ var DataLakeInsertButton = ({
|
|
|
1278
1280
|
}
|
|
1279
1281
|
)
|
|
1280
1282
|
] }) : null,
|
|
1281
|
-
/* @__PURE__ */ jsx9(
|
|
1283
|
+
/* @__PURE__ */ jsx9(ErrorRender6, { error: clientError ?? requestError, scope: "DataLakeInsertButton" })
|
|
1282
1284
|
]
|
|
1283
1285
|
}
|
|
1284
1286
|
);
|
|
@@ -1380,7 +1382,7 @@ import {
|
|
|
1380
1382
|
Typography as Typography10
|
|
1381
1383
|
} from "@mui/material";
|
|
1382
1384
|
import { ButtonEx as ButtonEx8 } from "@xylabs/react-button";
|
|
1383
|
-
import { ErrorRender as
|
|
1385
|
+
import { ErrorRender as ErrorRender7 } from "@xylabs/react-error";
|
|
1384
1386
|
import { isDefined as isDefined10, isDefinedNotNull as isDefinedNotNull7 } from "@xylabs/sdk-js";
|
|
1385
1387
|
import { useState as useState10 } from "react";
|
|
1386
1388
|
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
@@ -1449,7 +1451,7 @@ var DataLakeListButton = ({ timeout, ...props }) => {
|
|
|
1449
1451
|
}
|
|
1450
1452
|
)
|
|
1451
1453
|
] }) : null,
|
|
1452
|
-
/* @__PURE__ */ jsx11(
|
|
1454
|
+
/* @__PURE__ */ jsx11(ErrorRender7, { error: clientError ?? requestError, scope: "DataLakeListButton" })
|
|
1453
1455
|
]
|
|
1454
1456
|
}
|
|
1455
1457
|
);
|
|
@@ -1482,7 +1484,7 @@ import {
|
|
|
1482
1484
|
Typography as Typography11
|
|
1483
1485
|
} from "@mui/material";
|
|
1484
1486
|
import { ButtonEx as ButtonEx9 } from "@xylabs/react-button";
|
|
1485
|
-
import { ErrorRender as
|
|
1487
|
+
import { ErrorRender as ErrorRender8 } from "@xylabs/react-error";
|
|
1486
1488
|
import { isDefined as isDefined11, isDefinedNotNull as isDefinedNotNull8 } from "@xylabs/sdk-js";
|
|
1487
1489
|
import { useState as useState11 } from "react";
|
|
1488
1490
|
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -1548,7 +1550,7 @@ var DataLakeRequestAccessButton = ({
|
|
|
1548
1550
|
] }),
|
|
1549
1551
|
/* @__PURE__ */ jsx12(Typography11, { variant: "body2", sx: { color: "text.secondary" }, children: "If you picked multiple lakes, call `list()` to enumerate all granted ids." })
|
|
1550
1552
|
] }) : null,
|
|
1551
|
-
/* @__PURE__ */ jsx12(
|
|
1553
|
+
/* @__PURE__ */ jsx12(ErrorRender8, { error: clientError ?? requestError, scope: "DataLakeRequestAccessButton" })
|
|
1552
1554
|
]
|
|
1553
1555
|
}
|
|
1554
1556
|
);
|
|
@@ -1753,7 +1755,7 @@ import { useContextEx } from "@xylabs/react-shared";
|
|
|
1753
1755
|
var useProvidedInPageGateways = (required = true) => useContextEx(InPageGatewaysContext, "InPageGateways", required);
|
|
1754
1756
|
|
|
1755
1757
|
// src/client/context/providers/GatewayProvider.tsx
|
|
1756
|
-
import { ErrorRender as
|
|
1758
|
+
import { ErrorRender as ErrorRender9 } from "@xylabs/react-error";
|
|
1757
1759
|
import { isDefinedNotNull as isDefinedNotNull9, isNull as isNull2 } from "@xylabs/sdk-js";
|
|
1758
1760
|
import { useMemo as useMemo6 } from "react";
|
|
1759
1761
|
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
@@ -1812,13 +1814,13 @@ var GatewayProvider = ({ gatewayName, children }) => {
|
|
|
1812
1814
|
clearAll
|
|
1813
1815
|
]);
|
|
1814
1816
|
return /* @__PURE__ */ jsxs15(GatewayContext, { value, children: [
|
|
1815
|
-
/* @__PURE__ */ jsx16(
|
|
1817
|
+
/* @__PURE__ */ jsx16(ErrorRender9, { error: gatewayFromConfigError }),
|
|
1816
1818
|
children
|
|
1817
1819
|
] });
|
|
1818
1820
|
};
|
|
1819
1821
|
|
|
1820
1822
|
// src/client/context/providers/WalletGatewayProvider.tsx
|
|
1821
|
-
import { ErrorRender as
|
|
1823
|
+
import { ErrorRender as ErrorRender10 } from "@xylabs/react-error";
|
|
1822
1824
|
import { useMemo as useMemo7 } from "react";
|
|
1823
1825
|
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1824
1826
|
var WalletGatewayProvider = ({ gatewayName, children }) => {
|
|
@@ -1849,7 +1851,7 @@ var WalletGatewayProvider = ({ gatewayName, children }) => {
|
|
|
1849
1851
|
gateways
|
|
1850
1852
|
]);
|
|
1851
1853
|
return /* @__PURE__ */ jsxs16(GatewayContext, { value, children: [
|
|
1852
|
-
/* @__PURE__ */ jsx17(
|
|
1854
|
+
/* @__PURE__ */ jsx17(ErrorRender10, { error: gatewayFromWalletError }),
|
|
1853
1855
|
children
|
|
1854
1856
|
] });
|
|
1855
1857
|
};
|