@xyo-network/react-module 2.41.51 → 2.41.53
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/cjs/components/DetailsBox.js +5 -1
- package/dist/cjs/components/DetailsBox.js.map +1 -1
- package/dist/docs.json +9 -9
- package/dist/esm/components/DetailsBox.js +6 -3
- package/dist/esm/components/DetailsBox.js.map +1 -1
- package/dist/types/components/DetailsBox.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/components/DetailsBox.tsx +11 -1
|
@@ -7,10 +7,14 @@ const eth_address_1 = require("@xylabs/eth-address");
|
|
|
7
7
|
const react_crypto_1 = require("@xylabs/react-crypto");
|
|
8
8
|
const react_flexbox_1 = require("@xylabs/react-flexbox");
|
|
9
9
|
const module_1 = require("@xyo-network/module");
|
|
10
|
+
const react_shared_1 = require("@xyo-network/react-shared");
|
|
10
11
|
const ModuleDetailsBox = (_a) => {
|
|
12
|
+
var _b, _c, _d, _e;
|
|
11
13
|
var { module } = _a, props = tslib_1.__rest(_a, ["module"]);
|
|
12
14
|
const wrapper = module ? new module_1.ModuleWrapper(module) : undefined;
|
|
13
|
-
return ((0, jsx_runtime_1.
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexCol, Object.assign({}, props, { children: [(0, jsx_runtime_1.jsx)(react_crypto_1.EthAccountBox, { address: eth_address_1.EthAddress.fromString(wrapper === null || wrapper === void 0 ? void 0 : wrapper.address) }), wrapper === null || wrapper === void 0 ? void 0 : wrapper.queries().map((query) => {
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(react_flexbox_1.FlexRow, { children: query }, query);
|
|
17
|
+
}), (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, { children: [(wrapper === null || wrapper === void 0 ? void 0 : wrapper.queries().find((query) => query.startsWith('network.xyo.query.archivist'))) ? (_b = (0, react_shared_1.findNetworkComponent)('archivist')) === null || _b === void 0 ? void 0 : _b.icon() : null, (wrapper === null || wrapper === void 0 ? void 0 : wrapper.queries().find((query) => query.startsWith('network.xyo.query.diviner'))) ? (_c = (0, react_shared_1.findNetworkComponent)('diviner')) === null || _c === void 0 ? void 0 : _c.icon() : null, (wrapper === null || wrapper === void 0 ? void 0 : wrapper.queries().find((query) => query.startsWith('network.xyo.query.witness'))) ? (_d = (0, react_shared_1.findNetworkComponent)('sentinel')) === null || _d === void 0 ? void 0 : _d.icon() : null, (wrapper === null || wrapper === void 0 ? void 0 : wrapper.queries().find((query) => query.startsWith('network.xyo.query.node'))) ? (_e = (0, react_shared_1.findNetworkComponent)('node')) === null || _e === void 0 ? void 0 : _e.icon() : null] })] })));
|
|
14
18
|
};
|
|
15
19
|
exports.ModuleDetailsBox = ModuleDetailsBox;
|
|
16
20
|
//# sourceMappingURL=DetailsBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsBox.js","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":";;;;;AAAA,qDAAgD;AAChD,uDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"DetailsBox.js","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":";;;;;AAAA,qDAAgD;AAChD,uDAAoD;AACpD,yDAAsE;AACtE,gDAAmD;AACnD,4DAAgE;AAIzD,MAAM,gBAAgB,GAA+C,CAAC,EAAoB,EAAE,EAAE;;QAAxB,EAAE,MAAM,OAAY,EAAP,KAAK,sBAAlB,UAAoB,CAAF;IAC7F,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,sBAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC9D,OAAO,CACL,wBAAC,uBAAO,oBAAK,KAAK,eAChB,uBAAC,4BAAa,IAAC,OAAO,EAAE,wBAAU,CAAC,UAAU,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,GAAI,EAClE,OAAO,aAAP,OAAO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}
|
package/dist/docs.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fileName": "packages/sdk/packages/module/src/ModuleRenderProps.tsx",
|
|
27
27
|
"line": 4,
|
|
28
28
|
"character": 2,
|
|
29
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
29
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/ModuleRenderProps.tsx#L4"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"type": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"fileName": "packages/sdk/packages/module/src/ModuleRenderProps.tsx",
|
|
50
50
|
"line": 3,
|
|
51
51
|
"character": 17,
|
|
52
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
52
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/ModuleRenderProps.tsx#L3"
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
"typeParameters": [
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"fileName": "packages/sdk/packages/module/src/components/CardActions.tsx",
|
|
86
86
|
"line": 7,
|
|
87
87
|
"character": 13,
|
|
88
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
88
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/components/CardActions.tsx#L7"
|
|
89
89
|
}
|
|
90
90
|
],
|
|
91
91
|
"signatures": [
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"fileName": "packages/sdk/packages/module/src/components/CardContent.tsx",
|
|
234
234
|
"line": 10,
|
|
235
235
|
"character": 13,
|
|
236
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
236
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/components/CardContent.tsx#L10"
|
|
237
237
|
}
|
|
238
238
|
],
|
|
239
239
|
"signatures": [
|
|
@@ -514,7 +514,7 @@
|
|
|
514
514
|
"fileName": "packages/sdk/packages/module/src/components/CardHeader.tsx",
|
|
515
515
|
"line": 7,
|
|
516
516
|
"character": 13,
|
|
517
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
517
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/components/CardHeader.tsx#L7"
|
|
518
518
|
}
|
|
519
519
|
],
|
|
520
520
|
"signatures": [
|
|
@@ -817,9 +817,9 @@
|
|
|
817
817
|
"sources": [
|
|
818
818
|
{
|
|
819
819
|
"fileName": "packages/sdk/packages/module/src/components/DetailsBox.tsx",
|
|
820
|
-
"line":
|
|
820
|
+
"line": 9,
|
|
821
821
|
"character": 13,
|
|
822
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
822
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/components/DetailsBox.tsx#L9"
|
|
823
823
|
}
|
|
824
824
|
],
|
|
825
825
|
"signatures": [
|
|
@@ -967,7 +967,7 @@
|
|
|
967
967
|
"fileName": "packages/sdk/packages/module/src/components/TableCell.tsx",
|
|
968
968
|
"line": 8,
|
|
969
969
|
"character": 13,
|
|
970
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
970
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/components/TableCell.tsx#L8"
|
|
971
971
|
}
|
|
972
972
|
],
|
|
973
973
|
"signatures": [
|
|
@@ -1128,7 +1128,7 @@
|
|
|
1128
1128
|
"fileName": "packages/sdk/packages/module/src/index.ts",
|
|
1129
1129
|
"line": 1,
|
|
1130
1130
|
"character": 0,
|
|
1131
|
-
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/
|
|
1131
|
+
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/blob/122473e0821/packages/sdk/packages/module/src/index.ts#L1"
|
|
1132
1132
|
}
|
|
1133
1133
|
]
|
|
1134
1134
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { EthAddress } from '@xylabs/eth-address';
|
|
3
3
|
import { EthAccountBox } from '@xylabs/react-crypto';
|
|
4
|
-
import { FlexCol } from '@xylabs/react-flexbox';
|
|
4
|
+
import { FlexCol, FlexRow } from '@xylabs/react-flexbox';
|
|
5
5
|
import { ModuleWrapper } from '@xyo-network/module';
|
|
6
|
+
import { findNetworkComponent } from '@xyo-network/react-shared';
|
|
6
7
|
export const ModuleDetailsBox = ({ module, ...props }) => {
|
|
7
8
|
const wrapper = module ? new ModuleWrapper(module) : undefined;
|
|
8
|
-
return (
|
|
9
|
+
return (_jsxs(FlexCol, { ...props, children: [_jsx(EthAccountBox, { address: EthAddress.fromString(wrapper?.address) }), wrapper?.queries().map((query) => {
|
|
10
|
+
return _jsx(FlexRow, { children: query }, query);
|
|
11
|
+
}), _jsxs(FlexRow, { children: [wrapper?.queries().find((query) => query.startsWith('network.xyo.query.archivist')) ? findNetworkComponent('archivist')?.icon() : null, wrapper?.queries().find((query) => query.startsWith('network.xyo.query.diviner')) ? findNetworkComponent('diviner')?.icon() : null, wrapper?.queries().find((query) => query.startsWith('network.xyo.query.witness')) ? findNetworkComponent('sentinel')?.icon() : null, wrapper?.queries().find((query) => query.startsWith('network.xyo.query.node')) ? findNetworkComponent('node')?.icon() : null] })] }));
|
|
9
12
|
};
|
|
10
13
|
//# sourceMappingURL=DetailsBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsBox.js","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAgB,OAAO,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"DetailsBox.js","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAgB,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAIhE,MAAM,CAAC,MAAM,gBAAgB,GAA+C,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACnG,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC9D,OAAO,CACL,MAAC,OAAO,OAAK,KAAK,aAChB,KAAC,aAAa,IAAC,OAAO,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,GAAI,EAClE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBAChC,OAAO,KAAC,OAAO,cAAc,KAAK,IAAb,KAAK,CAAmB,CAAA;YAC/C,CAAC,CAAC,EACF,MAAC,OAAO,eACL,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EACtI,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAClI,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EACnI,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,IACrH,IACF,CACX,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsBox.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"DetailsBox.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsBox.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAoB,MAAM,uBAAuB,CAAA;AAItE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG,YAAY,CAgBvE,CAAA"}
|
package/package.json
CHANGED
|
@@ -11,18 +11,19 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@xylabs/eth-address": "^2.7.1",
|
|
14
|
-
"@xylabs/react-button": "^2.16.
|
|
15
|
-
"@xylabs/react-crypto": "^2.16.
|
|
16
|
-
"@xylabs/react-flexbox": "^2.16.
|
|
17
|
-
"@xylabs/react-identicon": "^2.16.
|
|
18
|
-
"@xylabs/react-shared": "^2.16.
|
|
19
|
-
"@xyo-network/archivist": "^2.43.
|
|
20
|
-
"@xyo-network/module": "^2.43.
|
|
14
|
+
"@xylabs/react-button": "^2.16.8",
|
|
15
|
+
"@xylabs/react-crypto": "^2.16.8",
|
|
16
|
+
"@xylabs/react-flexbox": "^2.16.8",
|
|
17
|
+
"@xylabs/react-identicon": "^2.16.8",
|
|
18
|
+
"@xylabs/react-shared": "^2.16.8",
|
|
19
|
+
"@xyo-network/archivist": "^2.43.36",
|
|
20
|
+
"@xyo-network/module": "^2.43.36",
|
|
21
|
+
"@xyo-network/react-shared": "^2.41.53"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"@storybook/react": "^6.5.16",
|
|
24
|
-
"@xylabs/ts-scripts-yarn3": "^2.14.
|
|
25
|
-
"@xylabs/tsconfig-react": "^2.14.
|
|
25
|
+
"@xylabs/ts-scripts-yarn3": "^2.14.14",
|
|
26
|
+
"@xylabs/tsconfig-react": "^2.14.14",
|
|
26
27
|
"require-from-string": "^2.0.2",
|
|
27
28
|
"typescript": "^4.9.5"
|
|
28
29
|
},
|
|
@@ -77,5 +78,5 @@
|
|
|
77
78
|
},
|
|
78
79
|
"sideEffects": false,
|
|
79
80
|
"types": "dist/types/index.d.ts",
|
|
80
|
-
"version": "2.41.
|
|
81
|
+
"version": "2.41.53"
|
|
81
82
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EthAddress } from '@xylabs/eth-address'
|
|
2
2
|
import { EthAccountBox } from '@xylabs/react-crypto'
|
|
3
|
-
import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'
|
|
3
|
+
import { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
4
4
|
import { ModuleWrapper } from '@xyo-network/module'
|
|
5
|
+
import { findNetworkComponent } from '@xyo-network/react-shared'
|
|
5
6
|
|
|
6
7
|
import { ModuleRenderProps } from '../ModuleRenderProps'
|
|
7
8
|
|
|
@@ -10,6 +11,15 @@ export const ModuleDetailsBox: React.FC<ModuleRenderProps & FlexBoxProps> = ({ m
|
|
|
10
11
|
return (
|
|
11
12
|
<FlexCol {...props}>
|
|
12
13
|
<EthAccountBox address={EthAddress.fromString(wrapper?.address)} />
|
|
14
|
+
{wrapper?.queries().map((query) => {
|
|
15
|
+
return <FlexRow key={query}>{query}</FlexRow>
|
|
16
|
+
})}
|
|
17
|
+
<FlexRow>
|
|
18
|
+
{wrapper?.queries().find((query) => query.startsWith('network.xyo.query.archivist')) ? findNetworkComponent('archivist')?.icon() : null}
|
|
19
|
+
{wrapper?.queries().find((query) => query.startsWith('network.xyo.query.diviner')) ? findNetworkComponent('diviner')?.icon() : null}
|
|
20
|
+
{wrapper?.queries().find((query) => query.startsWith('network.xyo.query.witness')) ? findNetworkComponent('sentinel')?.icon() : null}
|
|
21
|
+
{wrapper?.queries().find((query) => query.startsWith('network.xyo.query.node')) ? findNetworkComponent('node')?.icon() : null}
|
|
22
|
+
</FlexRow>
|
|
13
23
|
</FlexCol>
|
|
14
24
|
)
|
|
15
25
|
}
|