@xyo-network/react-schema 2.25.19 → 2.25.22
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/Property/SchemaProperty.d.ts +7 -0
- package/dist/cjs/components/Property/SchemaProperty.js +34 -0
- package/dist/cjs/components/Property/SchemaProperty.js.map +1 -0
- package/dist/cjs/components/Property/index.d.ts +1 -0
- package/dist/cjs/components/Property/index.js +5 -0
- package/dist/cjs/components/Property/index.js.map +1 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/docs.json +170 -46
- package/dist/esm/components/Property/SchemaProperty.d.ts +7 -0
- package/dist/esm/components/Property/SchemaProperty.js +28 -0
- package/dist/esm/components/Property/SchemaProperty.js.map +1 -0
- package/dist/esm/components/Property/index.d.ts +1 -0
- package/dist/esm/components/Property/index.js +2 -0
- package/dist/esm/components/Property/index.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/package.json +9 -9
- package/src/components/Property/SchemaProperty.stories.tsx +33 -0
- package/src/components/Property/SchemaProperty.tsx +64 -0
- package/src/components/Property/index.ts +1 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PropertyProps } from '@xyo-network/react-property';
|
|
3
|
+
export declare type SchemaPropertyProps = PropertyProps & {
|
|
4
|
+
value?: string;
|
|
5
|
+
viewSchemaUrl?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const SchemaProperty: React.FC<SchemaPropertyProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SchemaProperty = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const NewReleases_1 = tslib_1.__importDefault(require("@mui/icons-material/NewReleases"));
|
|
7
|
+
const OpenInNew_1 = tslib_1.__importDefault(require("@mui/icons-material/OpenInNew"));
|
|
8
|
+
const Verified_1 = tslib_1.__importDefault(require("@mui/icons-material/Verified"));
|
|
9
|
+
const material_1 = require("@mui/material");
|
|
10
|
+
const sdk_react_1 = require("@xylabs/sdk-react");
|
|
11
|
+
const react_property_1 = require("@xyo-network/react-property");
|
|
12
|
+
const utils_1 = require("@xyo-network/utils");
|
|
13
|
+
const react_1 = require("react");
|
|
14
|
+
const useResolveSchema = (schema) => {
|
|
15
|
+
const [entry, setEntry] = (0, react_1.useState)();
|
|
16
|
+
(0, sdk_react_1.useAsyncEffect)(
|
|
17
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
|
+
(mounted) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
if (schema) {
|
|
20
|
+
const entry = yield utils_1.XyoSchemaCache.instance.get(schema);
|
|
21
|
+
if (mounted()) {
|
|
22
|
+
setEntry(entry);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}), [schema]);
|
|
26
|
+
return entry;
|
|
27
|
+
};
|
|
28
|
+
const SchemaProperty = ({ titleProps, value, viewSchemaUrl = 'https://explore.xyo.network/' }) => {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const resolvedSchema = useResolveSchema(value);
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(react_property_1.Property, Object.assign({ flexGrow: 1, title: "Schema", value: value, tip: "Schema sent with the payload", titleProps: titleProps }, { children: [value ? (resolvedSchema === null ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ rel: "noopener noreferrer", size: "small", target: "_blank", href: `${viewSchemaUrl}${value}` }, { children: (0, jsx_runtime_1.jsx)(NewReleases_1.default, { color: "warning", fontSize: "inherit" }) }))) : resolvedSchema === undefined ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ rel: "noopener noreferrer", size: "small", target: "_blank", href: `${viewSchemaUrl}${value}` }, { children: (0, jsx_runtime_1.jsx)(NewReleases_1.default, { color: "disabled", fontSize: "inherit" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ rel: "noopener noreferrer", size: "small", target: "_blank", href: (_b = (_a = resolvedSchema === null || resolvedSchema === void 0 ? void 0 : resolvedSchema.huri) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : '' }, { children: (0, jsx_runtime_1.jsx)(Verified_1.default, { color: "success", fontSize: "inherit" }) })))) : null, value ? ((0, jsx_runtime_1.jsx)(sdk_react_1.LinkEx, Object.assign({ flexGrow: 1, alignItems: "center", href: `${viewSchemaUrl}${value}`, rel: "noopener noreferrer", display: "flex" }, { children: (0, jsx_runtime_1.jsx)(react_property_1.PropertyValue, { value: value, title: "view schema in new window" }) }))) : null, value ? ((0, jsx_runtime_1.jsx)(sdk_react_1.LinkEx, Object.assign({ marginX: 1, alignItems: "center", href: `${viewSchemaUrl}${value}`, target: "_blank", rel: "noopener noreferrer", display: "flex" }, { children: (0, jsx_runtime_1.jsx)(OpenInNew_1.default, { fontSize: "inherit" }) }))) : null] })));
|
|
32
|
+
};
|
|
33
|
+
exports.SchemaProperty = SchemaProperty;
|
|
34
|
+
//# sourceMappingURL=SchemaProperty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaProperty.js","sourceRoot":"","sources":["../../../../src/components/Property/SchemaProperty.tsx"],"names":[],"mappings":";;;;;AAAA,0FAA6D;AAC7D,sFAAyD;AACzD,oFAAuD;AACvD,4CAA0C;AAC1C,iDAA0D;AAC1D,gEAAoF;AAEpF,8CAAwE;AACxE,iCAAgC;AAOhC,MAAM,gBAAgB,GAAG,CAAC,MAAe,EAAE,EAAE;IAC3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,G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AAQ,EAAC,SAAS,GAAG,IAC5C,CACd,CAAC,CAAC,CAAC,CACF,uBAAC,qBAAU,kBAAC,GAAG,EAAC,qBAAqB,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAE,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,IAAI,0CAAE,IAAI,mCAAI,EAAE,gBACvG,uBAAC,kBAAY,IAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,GAAG,IACxC,CACd,CACF,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,kBAAM,kBAAC,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAC,QAAQ,EAAC,IAAI,EAAE,GAAG,aAAa,GAAG,KAAK,EAAE,EAAE,GAAG,EAAC,qBAAqB,EAAC,OAAO,EAAC,MAAM,gBACjH,uBAAC,8BAAa,IAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAC,2BAA2B,GAAG,IAC1D,CACV,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,kBAAM,kBAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAC,QAAQ,EAAC,IAAI,EAAE,GAAG,aAAa,GAAG,KAAK,EAAE,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,OAAO,EAAC,MAAM,gBAChI,uBAAC,mBAAa,IAAC,QAAQ,EAAC,SAAS,GAAG,IAC7B,CACV,CAAC,CAAC,CAAC,IAAI,KACC,CACZ,CAAA;AACH,CAAC,CAAA;AA/BY,QAAA,cAAc,kBA+B1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SchemaProperty';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Property/index.ts"],"names":[],"mappings":";;;AAAA,2DAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0B;AAC1B,qDAA0B"}
|
package/dist/docs.json
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"originalName": "",
|
|
8
8
|
"children": [
|
|
9
9
|
{
|
|
10
|
-
"id":
|
|
10
|
+
"id": 21,
|
|
11
11
|
"name": "SchemaContextState",
|
|
12
12
|
"kind": 256,
|
|
13
13
|
"kindString": "Interface",
|
|
14
14
|
"flags": {},
|
|
15
15
|
"children": [
|
|
16
16
|
{
|
|
17
|
-
"id":
|
|
17
|
+
"id": 26,
|
|
18
18
|
"name": "provided",
|
|
19
19
|
"kind": 1024,
|
|
20
20
|
"kindString": "Property",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"id":
|
|
39
|
+
"id": 22,
|
|
40
40
|
"name": "schema",
|
|
41
41
|
"kind": 1024,
|
|
42
42
|
"kindString": "Property",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
"id":
|
|
67
|
+
"id": 23,
|
|
68
68
|
"name": "schemaList",
|
|
69
69
|
"kind": 1024,
|
|
70
70
|
"kindString": "Property",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
"id":
|
|
98
|
+
"id": 24,
|
|
99
99
|
"name": "setSchema",
|
|
100
100
|
"kind": 1024,
|
|
101
101
|
"kindString": "Property",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
"id":
|
|
134
|
+
"id": 25,
|
|
135
135
|
"name": "setSchemaList",
|
|
136
136
|
"kind": 1024,
|
|
137
137
|
"kindString": "Property",
|
|
@@ -175,11 +175,11 @@
|
|
|
175
175
|
"title": "Properties",
|
|
176
176
|
"kind": 1024,
|
|
177
177
|
"children": [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
26,
|
|
179
|
+
22,
|
|
180
|
+
23,
|
|
181
|
+
24,
|
|
182
|
+
25
|
|
183
183
|
]
|
|
184
184
|
}
|
|
185
185
|
],
|
|
@@ -198,14 +198,14 @@
|
|
|
198
198
|
]
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
|
-
"id":
|
|
201
|
+
"id": 17,
|
|
202
202
|
"name": "SchemaProviderProps",
|
|
203
203
|
"kind": 256,
|
|
204
204
|
"kindString": "Interface",
|
|
205
205
|
"flags": {},
|
|
206
206
|
"children": [
|
|
207
207
|
{
|
|
208
|
-
"id":
|
|
208
|
+
"id": 18,
|
|
209
209
|
"name": "defaultSchema",
|
|
210
210
|
"kind": 1024,
|
|
211
211
|
"kindString": "Property",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
"id":
|
|
228
|
+
"id": 19,
|
|
229
229
|
"name": "knownSchemaList",
|
|
230
230
|
"kind": 1024,
|
|
231
231
|
"kindString": "Property",
|
|
@@ -253,8 +253,8 @@
|
|
|
253
253
|
"title": "Properties",
|
|
254
254
|
"kind": 1024,
|
|
255
255
|
"children": [
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
18,
|
|
257
|
+
19
|
|
258
258
|
]
|
|
259
259
|
}
|
|
260
260
|
],
|
|
@@ -268,6 +268,98 @@
|
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
"id": 1,
|
|
271
|
+
"name": "SchemaPropertyProps",
|
|
272
|
+
"kind": 4194304,
|
|
273
|
+
"kindString": "Type alias",
|
|
274
|
+
"flags": {},
|
|
275
|
+
"sources": [
|
|
276
|
+
{
|
|
277
|
+
"fileName": "schema/src/components/Property/SchemaProperty.tsx",
|
|
278
|
+
"line": 11,
|
|
279
|
+
"character": 12
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"type": {
|
|
283
|
+
"type": "intersection",
|
|
284
|
+
"types": [
|
|
285
|
+
{
|
|
286
|
+
"type": "reference",
|
|
287
|
+
"name": "PropertyProps"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"type": "reflection",
|
|
291
|
+
"declaration": {
|
|
292
|
+
"id": 2,
|
|
293
|
+
"name": "__type",
|
|
294
|
+
"kind": 65536,
|
|
295
|
+
"kindString": "Type literal",
|
|
296
|
+
"flags": {},
|
|
297
|
+
"children": [
|
|
298
|
+
{
|
|
299
|
+
"id": 3,
|
|
300
|
+
"name": "value",
|
|
301
|
+
"kind": 1024,
|
|
302
|
+
"kindString": "Property",
|
|
303
|
+
"flags": {
|
|
304
|
+
"isOptional": true
|
|
305
|
+
},
|
|
306
|
+
"sources": [
|
|
307
|
+
{
|
|
308
|
+
"fileName": "schema/src/components/Property/SchemaProperty.tsx",
|
|
309
|
+
"line": 12,
|
|
310
|
+
"character": 2
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"type": {
|
|
314
|
+
"type": "intrinsic",
|
|
315
|
+
"name": "string"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"id": 4,
|
|
320
|
+
"name": "viewSchemaUrl",
|
|
321
|
+
"kind": 1024,
|
|
322
|
+
"kindString": "Property",
|
|
323
|
+
"flags": {
|
|
324
|
+
"isOptional": true
|
|
325
|
+
},
|
|
326
|
+
"sources": [
|
|
327
|
+
{
|
|
328
|
+
"fileName": "schema/src/components/Property/SchemaProperty.tsx",
|
|
329
|
+
"line": 13,
|
|
330
|
+
"character": 2
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"type": {
|
|
334
|
+
"type": "intrinsic",
|
|
335
|
+
"name": "string"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"groups": [
|
|
340
|
+
{
|
|
341
|
+
"title": "Properties",
|
|
342
|
+
"kind": 1024,
|
|
343
|
+
"children": [
|
|
344
|
+
3,
|
|
345
|
+
4
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"sources": [
|
|
350
|
+
{
|
|
351
|
+
"fileName": "schema/src/components/Property/SchemaProperty.tsx",
|
|
352
|
+
"line": 11,
|
|
353
|
+
"character": 50
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"id": 6,
|
|
271
363
|
"name": "SchemaSelectExProps",
|
|
272
364
|
"kind": 4194304,
|
|
273
365
|
"kindString": "Type alias",
|
|
@@ -293,7 +385,7 @@
|
|
|
293
385
|
}
|
|
294
386
|
},
|
|
295
387
|
{
|
|
296
|
-
"id":
|
|
388
|
+
"id": 8,
|
|
297
389
|
"name": "SchemaContext",
|
|
298
390
|
"kind": 32,
|
|
299
391
|
"kindString": "Variable",
|
|
@@ -315,7 +407,7 @@
|
|
|
315
407
|
"types": [
|
|
316
408
|
{
|
|
317
409
|
"type": "reference",
|
|
318
|
-
"id":
|
|
410
|
+
"id": 21,
|
|
319
411
|
"name": "SchemaContextState"
|
|
320
412
|
},
|
|
321
413
|
{
|
|
@@ -332,7 +424,7 @@
|
|
|
332
424
|
"defaultValue": "..."
|
|
333
425
|
},
|
|
334
426
|
{
|
|
335
|
-
"id":
|
|
427
|
+
"id": 16,
|
|
336
428
|
"name": "SchemaMemoryProvider",
|
|
337
429
|
"kind": 32,
|
|
338
430
|
"kindString": "Variable",
|
|
@@ -354,7 +446,7 @@
|
|
|
354
446
|
"typeArguments": [
|
|
355
447
|
{
|
|
356
448
|
"type": "reference",
|
|
357
|
-
"id":
|
|
449
|
+
"id": 17,
|
|
358
450
|
"name": "SchemaProviderProps"
|
|
359
451
|
}
|
|
360
452
|
],
|
|
@@ -370,7 +462,37 @@
|
|
|
370
462
|
"defaultValue": "..."
|
|
371
463
|
},
|
|
372
464
|
{
|
|
373
|
-
"id":
|
|
465
|
+
"id": 5,
|
|
466
|
+
"name": "SchemaProperty",
|
|
467
|
+
"kind": 32,
|
|
468
|
+
"kindString": "Variable",
|
|
469
|
+
"flags": {
|
|
470
|
+
"isConst": true
|
|
471
|
+
},
|
|
472
|
+
"sources": [
|
|
473
|
+
{
|
|
474
|
+
"fileName": "schema/src/components/Property/SchemaProperty.tsx",
|
|
475
|
+
"line": 33,
|
|
476
|
+
"character": 13
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"type": {
|
|
480
|
+
"type": "reference",
|
|
481
|
+
"typeArguments": [
|
|
482
|
+
{
|
|
483
|
+
"type": "reference",
|
|
484
|
+
"id": 1,
|
|
485
|
+
"name": "SchemaPropertyProps"
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"qualifiedName": "React.FC",
|
|
489
|
+
"package": "@types/react",
|
|
490
|
+
"name": "React.FC"
|
|
491
|
+
},
|
|
492
|
+
"defaultValue": "..."
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"id": 20,
|
|
374
496
|
"name": "SchemaRouteProvider",
|
|
375
497
|
"kind": 32,
|
|
376
498
|
"kindString": "Variable",
|
|
@@ -392,7 +514,7 @@
|
|
|
392
514
|
"typeArguments": [
|
|
393
515
|
{
|
|
394
516
|
"type": "reference",
|
|
395
|
-
"id":
|
|
517
|
+
"id": 17,
|
|
396
518
|
"name": "SchemaProviderProps"
|
|
397
519
|
}
|
|
398
520
|
],
|
|
@@ -408,7 +530,7 @@
|
|
|
408
530
|
"defaultValue": "..."
|
|
409
531
|
},
|
|
410
532
|
{
|
|
411
|
-
"id":
|
|
533
|
+
"id": 7,
|
|
412
534
|
"name": "SchemaSelectEx",
|
|
413
535
|
"kind": 32,
|
|
414
536
|
"kindString": "Variable",
|
|
@@ -427,7 +549,7 @@
|
|
|
427
549
|
"typeArguments": [
|
|
428
550
|
{
|
|
429
551
|
"type": "reference",
|
|
430
|
-
"id":
|
|
552
|
+
"id": 6,
|
|
431
553
|
"name": "SchemaSelectExProps"
|
|
432
554
|
}
|
|
433
555
|
],
|
|
@@ -438,7 +560,7 @@
|
|
|
438
560
|
"defaultValue": "..."
|
|
439
561
|
},
|
|
440
562
|
{
|
|
441
|
-
"id":
|
|
563
|
+
"id": 27,
|
|
442
564
|
"name": "useSchema",
|
|
443
565
|
"kind": 64,
|
|
444
566
|
"kindString": "Function",
|
|
@@ -452,14 +574,14 @@
|
|
|
452
574
|
],
|
|
453
575
|
"signatures": [
|
|
454
576
|
{
|
|
455
|
-
"id":
|
|
577
|
+
"id": 28,
|
|
456
578
|
"name": "useSchema",
|
|
457
579
|
"kind": 4096,
|
|
458
580
|
"kindString": "Call signature",
|
|
459
581
|
"flags": {},
|
|
460
582
|
"parameters": [
|
|
461
583
|
{
|
|
462
|
-
"id":
|
|
584
|
+
"id": 29,
|
|
463
585
|
"name": "required",
|
|
464
586
|
"kind": 32768,
|
|
465
587
|
"kindString": "Parameter",
|
|
@@ -476,7 +598,7 @@
|
|
|
476
598
|
"typeArguments": [
|
|
477
599
|
{
|
|
478
600
|
"type": "reference",
|
|
479
|
-
"id":
|
|
601
|
+
"id": 21,
|
|
480
602
|
"name": "SchemaContextState"
|
|
481
603
|
},
|
|
482
604
|
{
|
|
@@ -492,7 +614,7 @@
|
|
|
492
614
|
]
|
|
493
615
|
},
|
|
494
616
|
{
|
|
495
|
-
"id":
|
|
617
|
+
"id": 9,
|
|
496
618
|
"name": "useSchemaDefinitions",
|
|
497
619
|
"kind": 64,
|
|
498
620
|
"kindString": "Function",
|
|
@@ -506,7 +628,7 @@
|
|
|
506
628
|
],
|
|
507
629
|
"signatures": [
|
|
508
630
|
{
|
|
509
|
-
"id":
|
|
631
|
+
"id": 10,
|
|
510
632
|
"name": "useSchemaDefinitions",
|
|
511
633
|
"kind": 4096,
|
|
512
634
|
"kindString": "Call signature",
|
|
@@ -533,7 +655,7 @@
|
|
|
533
655
|
]
|
|
534
656
|
},
|
|
535
657
|
{
|
|
536
|
-
"id":
|
|
658
|
+
"id": 11,
|
|
537
659
|
"name": "useSchemaList",
|
|
538
660
|
"kind": 64,
|
|
539
661
|
"kindString": "Function",
|
|
@@ -547,14 +669,14 @@
|
|
|
547
669
|
],
|
|
548
670
|
"signatures": [
|
|
549
671
|
{
|
|
550
|
-
"id":
|
|
672
|
+
"id": 12,
|
|
551
673
|
"name": "useSchemaList",
|
|
552
674
|
"kind": 4096,
|
|
553
675
|
"kindString": "Call signature",
|
|
554
676
|
"flags": {},
|
|
555
677
|
"parameters": [
|
|
556
678
|
{
|
|
557
|
-
"id":
|
|
679
|
+
"id": 13,
|
|
558
680
|
"name": "knownSchemaList",
|
|
559
681
|
"kind": 32768,
|
|
560
682
|
"kindString": "Parameter",
|
|
@@ -610,7 +732,7 @@
|
|
|
610
732
|
]
|
|
611
733
|
},
|
|
612
734
|
{
|
|
613
|
-
"id":
|
|
735
|
+
"id": 14,
|
|
614
736
|
"name": "useSchemaStats",
|
|
615
737
|
"kind": 64,
|
|
616
738
|
"kindString": "Function",
|
|
@@ -624,7 +746,7 @@
|
|
|
624
746
|
],
|
|
625
747
|
"signatures": [
|
|
626
748
|
{
|
|
627
|
-
"id":
|
|
749
|
+
"id": 15,
|
|
628
750
|
"name": "useSchemaStats",
|
|
629
751
|
"kind": 4096,
|
|
630
752
|
"kindString": "Call signature",
|
|
@@ -653,35 +775,37 @@
|
|
|
653
775
|
"title": "Interfaces",
|
|
654
776
|
"kind": 256,
|
|
655
777
|
"children": [
|
|
656
|
-
|
|
657
|
-
|
|
778
|
+
21,
|
|
779
|
+
17
|
|
658
780
|
]
|
|
659
781
|
},
|
|
660
782
|
{
|
|
661
783
|
"title": "Type aliases",
|
|
662
784
|
"kind": 4194304,
|
|
663
785
|
"children": [
|
|
664
|
-
1
|
|
786
|
+
1,
|
|
787
|
+
6
|
|
665
788
|
]
|
|
666
789
|
},
|
|
667
790
|
{
|
|
668
791
|
"title": "Variables",
|
|
669
792
|
"kind": 32,
|
|
670
793
|
"children": [
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
794
|
+
8,
|
|
795
|
+
16,
|
|
796
|
+
5,
|
|
797
|
+
20,
|
|
798
|
+
7
|
|
675
799
|
]
|
|
676
800
|
},
|
|
677
801
|
{
|
|
678
802
|
"title": "Functions",
|
|
679
803
|
"kind": 64,
|
|
680
804
|
"children": [
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
805
|
+
27,
|
|
806
|
+
9,
|
|
807
|
+
11,
|
|
808
|
+
14
|
|
685
809
|
]
|
|
686
810
|
}
|
|
687
811
|
],
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PropertyProps } from '@xyo-network/react-property';
|
|
3
|
+
export declare type SchemaPropertyProps = PropertyProps & {
|
|
4
|
+
value?: string;
|
|
5
|
+
viewSchemaUrl?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const SchemaProperty: React.FC<SchemaPropertyProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import NewReleasesIcon from '@mui/icons-material/NewReleases';
|
|
3
|
+
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
|
4
|
+
import VerifiedIcon from '@mui/icons-material/Verified';
|
|
5
|
+
import { IconButton } from '@mui/material';
|
|
6
|
+
import { LinkEx, useAsyncEffect } from '@xylabs/sdk-react';
|
|
7
|
+
import { Property, PropertyValue } from '@xyo-network/react-property';
|
|
8
|
+
import { XyoSchemaCache } from '@xyo-network/utils';
|
|
9
|
+
import { useState } from 'react';
|
|
10
|
+
const useResolveSchema = (schema) => {
|
|
11
|
+
const [entry, setEntry] = useState();
|
|
12
|
+
useAsyncEffect(
|
|
13
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14
|
+
async (mounted) => {
|
|
15
|
+
if (schema) {
|
|
16
|
+
const entry = await XyoSchemaCache.instance.get(schema);
|
|
17
|
+
if (mounted()) {
|
|
18
|
+
setEntry(entry);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, [schema]);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
export const SchemaProperty = ({ titleProps, value, viewSchemaUrl = 'https://explore.xyo.network/' }) => {
|
|
25
|
+
const resolvedSchema = useResolveSchema(value);
|
|
26
|
+
return (_jsxs(Property, { flexGrow: 1, title: "Schema", value: value, tip: "Schema sent with the payload", titleProps: titleProps, children: [value ? (resolvedSchema === null ? (_jsx(IconButton, { rel: "noopener noreferrer", size: "small", target: "_blank", href: `${viewSchemaUrl}${value}`, children: _jsx(NewReleasesIcon, { color: "warning", fontSize: "inherit" }) })) : resolvedSchema === undefined ? (_jsx(IconButton, { rel: "noopener noreferrer", size: "small", target: "_blank", href: `${viewSchemaUrl}${value}`, children: _jsx(NewReleasesIcon, { color: "disabled", fontSize: "inherit" }) })) : (_jsx(IconButton, { rel: "noopener noreferrer", size: "small", target: "_blank", href: resolvedSchema?.huri?.href ?? '', children: _jsx(VerifiedIcon, { color: "success", fontSize: "inherit" }) }))) : null, value ? (_jsx(LinkEx, { flexGrow: 1, alignItems: "center", href: `${viewSchemaUrl}${value}`, rel: "noopener noreferrer", display: "flex", children: _jsx(PropertyValue, { value: value, title: "view schema in new window" }) })) : null, value ? (_jsx(LinkEx, { marginX: 1, alignItems: "center", href: `${viewSchemaUrl}${value}`, target: "_blank", rel: "noopener noreferrer", display: "flex", children: _jsx(OpenInNewIcon, { fontSize: "inherit" }) })) : null] }));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=SchemaProperty.js.map
|
|
@@ -0,0 +1 @@
|
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CAAC,CACP,KAAC,MAAM,IAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAC,QAAQ,EAAC,IAAI,EAAE,GAAG,aAAa,GAAG,KAAK,EAAE,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,EAAC,OAAO,EAAC,MAAM,YAChI,KAAC,aAAa,IAAC,QAAQ,EAAC,SAAS,GAAG,GAC7B,CACV,CAAC,CAAC,CAAC,IAAI,IACC,CACZ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SchemaProperty';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Property/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"@emotion/react": "^11.9.0",
|
|
14
14
|
"@emotion/styled": "^11.8.1",
|
|
15
15
|
"@mui/material": "^5.8.1",
|
|
16
|
-
"@xylabs/sdk-react": "^2.12.
|
|
16
|
+
"@xylabs/sdk-react": "^2.12.10",
|
|
17
17
|
"@xyo-network/api": "^2.20.33",
|
|
18
18
|
"@xyo-network/core": "^2.20.33",
|
|
19
|
-
"@xyo-network/react-archive": "^2.25.
|
|
20
|
-
"@xyo-network/react-archivist-api": "^2.25.
|
|
21
|
-
"@xyo-network/react-shared": "^2.25.
|
|
22
|
-
"@xyo-network/react-theme": "^2.25.
|
|
19
|
+
"@xyo-network/react-archive": "^2.25.22",
|
|
20
|
+
"@xyo-network/react-archivist-api": "^2.25.22",
|
|
21
|
+
"@xyo-network/react-shared": "^2.25.22",
|
|
22
|
+
"@xyo-network/react-theme": "^2.25.22",
|
|
23
23
|
"@xyo-network/utils": "^2.20.33",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"react": "^18.1.0",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"description": "Common React library for all XYO projects that use React",
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/core": "^7.18.
|
|
34
|
-
"@babel/preset-env": "^7.18.
|
|
33
|
+
"@babel/core": "^7.18.2",
|
|
34
|
+
"@babel/preset-env": "^7.18.2",
|
|
35
35
|
"@storybook/addons": "^6.5.5",
|
|
36
36
|
"@storybook/api": "^6.5.5",
|
|
37
37
|
"@storybook/components": "^6.5.5",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@storybook/react": "^6.5.5",
|
|
40
40
|
"@storybook/theming": "^6.5.5",
|
|
41
41
|
"@types/lodash": "^4.14.182",
|
|
42
|
-
"@xylabs/sdk-react": "^2.12.
|
|
42
|
+
"@xylabs/sdk-react": "^2.12.10",
|
|
43
43
|
"@xylabs/ts-scripts": "^1.0.66",
|
|
44
44
|
"@xylabs/tsconfig": "^1.0.13",
|
|
45
45
|
"axios": "^0.27.2",
|
|
@@ -104,6 +104,6 @@
|
|
|
104
104
|
},
|
|
105
105
|
"sideEffects": false,
|
|
106
106
|
"types": "dist/esm/index.d.ts",
|
|
107
|
-
"version": "2.25.
|
|
107
|
+
"version": "2.25.22",
|
|
108
108
|
"packageManager": "yarn@3.1.1"
|
|
109
109
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentStory, Meta } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { appThemeDecorator } from '../../.storybook'
|
|
4
|
+
import { SchemaProperty } from './SchemaProperty'
|
|
5
|
+
|
|
6
|
+
const StorybookEntry: Meta = {
|
|
7
|
+
argTypes: {},
|
|
8
|
+
args: {},
|
|
9
|
+
component: SchemaProperty,
|
|
10
|
+
decorators: [appThemeDecorator],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
page: null,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
title: 'Schema/SchemaProperty',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Template: ComponentStory<typeof SchemaProperty> = (args) => <SchemaProperty {...args} />
|
|
20
|
+
|
|
21
|
+
const Default = Template.bind({})
|
|
22
|
+
Default.args = {}
|
|
23
|
+
|
|
24
|
+
const WithVerfiedValue = Template.bind({})
|
|
25
|
+
WithVerfiedValue.args = { value: 'network.xyo.schema' }
|
|
26
|
+
|
|
27
|
+
const WithUnverfiedValue = Template.bind({})
|
|
28
|
+
WithUnverfiedValue.args = { value: 'network.xyo.blahblah' }
|
|
29
|
+
|
|
30
|
+
export { Default, WithUnverfiedValue, WithVerfiedValue }
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line import/no-default-export
|
|
33
|
+
export default StorybookEntry
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import NewReleasesIcon from '@mui/icons-material/NewReleases'
|
|
2
|
+
import OpenInNewIcon from '@mui/icons-material/OpenInNew'
|
|
3
|
+
import VerifiedIcon from '@mui/icons-material/Verified'
|
|
4
|
+
import { IconButton } from '@mui/material'
|
|
5
|
+
import { LinkEx, useAsyncEffect } from '@xylabs/sdk-react'
|
|
6
|
+
import { Property, PropertyProps, PropertyValue } from '@xyo-network/react-property'
|
|
7
|
+
import { PropertyTitleProps } from '@xyo-network/react-property/dist/esm/components/Title'
|
|
8
|
+
import { XyoSchemaCache, XyoSchemaCacheEntry } from '@xyo-network/utils'
|
|
9
|
+
import { useState } from 'react'
|
|
10
|
+
|
|
11
|
+
export type SchemaPropertyProps = PropertyProps & {
|
|
12
|
+
value?: string
|
|
13
|
+
viewSchemaUrl?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const useResolveSchema = (schema?: string) => {
|
|
17
|
+
const [entry, setEntry] = useState<XyoSchemaCacheEntry | null>()
|
|
18
|
+
useAsyncEffect(
|
|
19
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
20
|
+
async (mounted) => {
|
|
21
|
+
if (schema) {
|
|
22
|
+
const entry = await XyoSchemaCache.instance.get(schema)
|
|
23
|
+
if (mounted()) {
|
|
24
|
+
setEntry(entry)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
[schema]
|
|
29
|
+
)
|
|
30
|
+
return entry
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const SchemaProperty: React.FC<SchemaPropertyProps> = ({ titleProps, value, viewSchemaUrl = 'https://explore.xyo.network/' }) => {
|
|
34
|
+
const resolvedSchema = useResolveSchema(value)
|
|
35
|
+
return (
|
|
36
|
+
<Property flexGrow={1} title="Schema" value={value} tip="Schema sent with the payload" titleProps={titleProps}>
|
|
37
|
+
{value ? (
|
|
38
|
+
resolvedSchema === null ? (
|
|
39
|
+
<IconButton rel="noopener noreferrer" size="small" target="_blank" href={`${viewSchemaUrl}${value}`}>
|
|
40
|
+
<NewReleasesIcon color="warning" fontSize="inherit" />
|
|
41
|
+
</IconButton>
|
|
42
|
+
) : resolvedSchema === undefined ? (
|
|
43
|
+
<IconButton rel="noopener noreferrer" size="small" target="_blank" href={`${viewSchemaUrl}${value}`}>
|
|
44
|
+
<NewReleasesIcon color="disabled" fontSize="inherit" />
|
|
45
|
+
</IconButton>
|
|
46
|
+
) : (
|
|
47
|
+
<IconButton rel="noopener noreferrer" size="small" target="_blank" href={resolvedSchema?.huri?.href ?? ''}>
|
|
48
|
+
<VerifiedIcon color="success" fontSize="inherit" />
|
|
49
|
+
</IconButton>
|
|
50
|
+
)
|
|
51
|
+
) : null}
|
|
52
|
+
{value ? (
|
|
53
|
+
<LinkEx flexGrow={1} alignItems="center" href={`${viewSchemaUrl}${value}`} rel="noopener noreferrer" display="flex">
|
|
54
|
+
<PropertyValue value={value} title="view schema in new window" />
|
|
55
|
+
</LinkEx>
|
|
56
|
+
) : null}
|
|
57
|
+
{value ? (
|
|
58
|
+
<LinkEx marginX={1} alignItems="center" href={`${viewSchemaUrl}${value}`} target="_blank" rel="noopener noreferrer" display="flex">
|
|
59
|
+
<OpenInNewIcon fontSize="inherit" />
|
|
60
|
+
</LinkEx>
|
|
61
|
+
) : null}
|
|
62
|
+
</Property>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SchemaProperty'
|
package/src/components/index.ts
CHANGED