@semapps/semantic-data-provider 1.1.3 → 1.2.0
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/index.cjs.js +350 -218
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.ts +2380 -0
- package/dist/index.d.ts +175 -188
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +345 -213
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.tsx +2439 -0
- package/package.json +14 -8
package/dist/index.cjs.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var $bkNnK$ldoconnected = require("@ldo/connected");
|
|
2
|
+
var $bkNnK$ldoconnectedsolid = require("@ldo/connected-solid");
|
|
1
3
|
var $bkNnK$speakingurl = require("speakingurl");
|
|
2
4
|
var $bkNnK$jsonld = require("jsonld");
|
|
3
5
|
var $bkNnK$rdfjsdatamodel = require("@rdfjs/data-model");
|
|
@@ -10,7 +12,7 @@ var $bkNnK$httplinkheader = require("http-link-header");
|
|
|
10
12
|
var $bkNnK$changecase = require("change-case");
|
|
11
13
|
var $bkNnK$react = require("react");
|
|
12
14
|
var $bkNnK$reactjsxruntime = require("react/jsx-runtime");
|
|
13
|
-
var $bkNnK$
|
|
15
|
+
var $bkNnK$tssreactmui = require("tss-react/mui");
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
function $parcel$exportWildcard(dest, source) {
|
|
@@ -38,9 +40,9 @@ function $parcel$interopDefault(a) {
|
|
|
38
40
|
return a && a.__esModule ? a.default : a;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
$parcel$export(module.exports, "dataProvider", () => $
|
|
42
|
-
$parcel$export(module.exports, "buildSparqlQuery", () => $
|
|
43
|
-
$parcel$export(module.exports, "buildBlankNodesQuery", () => $
|
|
43
|
+
$parcel$export(module.exports, "dataProvider", () => $5eeade28ff354aaa$export$2e2bcd8739ae039);
|
|
44
|
+
$parcel$export(module.exports, "buildSparqlQuery", () => $1d6ef12386121fca$export$2e2bcd8739ae039);
|
|
45
|
+
$parcel$export(module.exports, "buildBlankNodesQuery", () => $62e296927bdba02e$export$2e2bcd8739ae039);
|
|
44
46
|
$parcel$export(module.exports, "getUriFromPrefix", () => $108795c3831be99f$export$2e2bcd8739ae039);
|
|
45
47
|
$parcel$export(module.exports, "getPrefixFromUri", () => $8c4c0f0b55649ce6$export$2e2bcd8739ae039);
|
|
46
48
|
$parcel$export(module.exports, "configureUserStorage", () => $89358cee13a17a31$export$2e2bcd8739ae039);
|
|
@@ -58,20 +60,19 @@ $parcel$export(module.exports, "useDataModels", () => $20621bc841a5205a$export$2
|
|
|
58
60
|
$parcel$export(module.exports, "useDataProviderConfig", () => $9def35f4441a9bb2$export$2e2bcd8739ae039);
|
|
59
61
|
$parcel$export(module.exports, "useDataServers", () => $c9933a88e2acc4da$export$2e2bcd8739ae039);
|
|
60
62
|
$parcel$export(module.exports, "useGetCreateContainerUri", () => $32d32215b4e4729f$export$2e2bcd8739ae039);
|
|
61
|
-
$parcel$export(module.exports, "useGetExternalLink", () => $
|
|
63
|
+
$parcel$export(module.exports, "useGetExternalLink", () => $413b0e8af6982264$export$2e2bcd8739ae039);
|
|
62
64
|
$parcel$export(module.exports, "useGetPrefixFromUri", () => $d602250066d4ff3e$export$2e2bcd8739ae039);
|
|
63
|
-
$parcel$export(module.exports, "FilterHandler", () => $
|
|
64
|
-
$parcel$export(module.exports, "GroupedReferenceHandler", () => $
|
|
65
|
-
$parcel$export(module.exports, "ReificationArrayInput", () => $
|
|
65
|
+
$parcel$export(module.exports, "FilterHandler", () => $d7e56c289bd8ceb0$export$2e2bcd8739ae039);
|
|
66
|
+
$parcel$export(module.exports, "GroupedReferenceHandler", () => $62e4c61f126cac5e$export$2e2bcd8739ae039);
|
|
67
|
+
$parcel$export(module.exports, "ReificationArrayInput", () => $ef83a7754e7f8331$export$2e2bcd8739ae039);
|
|
66
68
|
$parcel$export(module.exports, "createWsChannel", () => $84ab912646919f8c$export$28772ab4c256e709);
|
|
67
69
|
$parcel$export(module.exports, "getOrCreateWsChannel", () => $84ab912646919f8c$export$8d60734939c59ced);
|
|
68
70
|
$parcel$export(module.exports, "createSolidNotificationChannel", () => $84ab912646919f8c$export$3edfe18db119b920);
|
|
69
|
-
var $1bc09db736a9cb94$exports = {};
|
|
70
|
-
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
const $6e277d32991a95da$var$fetchResource = async (resourceUri, config)=>{
|
|
75
76
|
const { httpClient: httpClient, jsonContext: jsonContext } = config;
|
|
76
77
|
let { json: data } = await httpClient(resourceUri);
|
|
77
78
|
if (!data) throw new Error(`Not a valid JSON: ${resourceUri}`);
|
|
@@ -81,14 +82,14 @@ const $3db7a4510a668a04$var$fetchResource = async (resourceUri, config)=>{
|
|
|
81
82
|
if (data['@context'] !== jsonContext) data = await (0, ($parcel$interopDefault($bkNnK$jsonld))).compact(data, jsonContext);
|
|
82
83
|
return data;
|
|
83
84
|
};
|
|
84
|
-
var $
|
|
85
|
+
var $6e277d32991a95da$export$2e2bcd8739ae039 = $6e277d32991a95da$var$fetchResource;
|
|
85
86
|
|
|
86
87
|
|
|
87
|
-
const $
|
|
88
|
+
const $aa09e6904cf4399f$var$getOneMethod = (config)=>async (resourceId, params)=>{
|
|
88
89
|
const { resources: resources } = config;
|
|
89
90
|
const dataModel = resources[resourceId];
|
|
90
91
|
if (!dataModel) throw new Error(`Resource ${resourceId} is not mapped in resources file`);
|
|
91
|
-
const data = await (0, $
|
|
92
|
+
const data = await (0, $6e277d32991a95da$export$2e2bcd8739ae039)(params.id, config);
|
|
92
93
|
// Transform single value into array if forceArray is set
|
|
93
94
|
if (dataModel.list?.forceArray) {
|
|
94
95
|
for (const forceArrayItem of dataModel.list?.forceArray || [])if (data[forceArrayItem] && !Array.isArray(data[forceArrayItem])) data[forceArrayItem] = [
|
|
@@ -117,7 +118,7 @@ const $9020b8e3f4a4c1a1$var$getOneMethod = (config)=>async (resourceId, params)=
|
|
|
117
118
|
data: data
|
|
118
119
|
};
|
|
119
120
|
};
|
|
120
|
-
var $
|
|
121
|
+
var $aa09e6904cf4399f$export$2e2bcd8739ae039 = $aa09e6904cf4399f$var$getOneMethod;
|
|
121
122
|
|
|
122
123
|
|
|
123
124
|
const $0edd1f2d07c8231f$var$getUploadsContainerUri = (config, serverKey)=>{
|
|
@@ -168,22 +169,22 @@ var $6fcb30f76390d142$export$2e2bcd8739ae039 = {
|
|
|
168
169
|
};
|
|
169
170
|
|
|
170
171
|
|
|
171
|
-
const $
|
|
172
|
+
const $0a5fcc1f7fc2050f$var$getServerKeyFromType = (type, dataServers)=>{
|
|
172
173
|
return dataServers && Object.keys(dataServers).find((key)=>{
|
|
173
174
|
return dataServers[key][type];
|
|
174
175
|
});
|
|
175
176
|
};
|
|
176
|
-
var $
|
|
177
|
+
var $0a5fcc1f7fc2050f$export$2e2bcd8739ae039 = $0a5fcc1f7fc2050f$var$getServerKeyFromType;
|
|
177
178
|
|
|
178
179
|
|
|
179
180
|
const $6531da3b9e8c524a$var$parseServerKey = (serverKey, dataServers)=>{
|
|
180
181
|
switch(serverKey){
|
|
181
182
|
case '@default':
|
|
182
|
-
return (0, $
|
|
183
|
+
return (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('default', dataServers);
|
|
183
184
|
case '@pod':
|
|
184
|
-
return (0, $
|
|
185
|
+
return (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('pod', dataServers);
|
|
185
186
|
case '@authServer':
|
|
186
|
-
return (0, $
|
|
187
|
+
return (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('authServer', dataServers);
|
|
187
188
|
default:
|
|
188
189
|
return serverKey;
|
|
189
190
|
}
|
|
@@ -197,7 +198,7 @@ const $6531da3b9e8c524a$var$parseServerKeys = (serverKeys, dataServers)=>{
|
|
|
197
198
|
} else if (typeof serverKeys === 'string') {
|
|
198
199
|
if (serverKeys === '@all') return Object.keys(dataServers);
|
|
199
200
|
else if (serverKeys === '@remote') {
|
|
200
|
-
const defaultServerKey = (0, $
|
|
201
|
+
const defaultServerKey = (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('default', dataServers);
|
|
201
202
|
return Object.keys(dataServers).filter((serverKey)=>serverKey !== defaultServerKey);
|
|
202
203
|
} else return [
|
|
203
204
|
$6531da3b9e8c524a$var$parseServerKey(serverKeys, dataServers)
|
|
@@ -234,7 +235,7 @@ const $37c161736d0d7276$var$findContainersWithURIs = (containersUris, dataServer
|
|
|
234
235
|
var $37c161736d0d7276$export$2e2bcd8739ae039 = $37c161736d0d7276$var$findContainersWithURIs;
|
|
235
236
|
|
|
236
237
|
|
|
237
|
-
const $
|
|
238
|
+
const $c1c6dddad031acf6$var$createMethod = (config)=>async (resourceId, params)=>{
|
|
238
239
|
const { dataServers: dataServers, resources: resources, httpClient: httpClient, jsonContext: jsonContext } = config;
|
|
239
240
|
const dataModel = resources[resourceId];
|
|
240
241
|
if (!dataModel) Error(`Resource ${resourceId} is not mapped in resources file`);
|
|
@@ -277,7 +278,7 @@ const $907cbc087f6529e2$var$createMethod = (config)=>async (resourceId, params)=
|
|
|
277
278
|
});
|
|
278
279
|
// Retrieve newly-created resource
|
|
279
280
|
const resourceUri = responseHeaders.get('Location');
|
|
280
|
-
return await (0, $
|
|
281
|
+
return await (0, $aa09e6904cf4399f$export$2e2bcd8739ae039)(config)(resourceId, {
|
|
281
282
|
id: resourceUri
|
|
282
283
|
});
|
|
283
284
|
}
|
|
@@ -292,12 +293,12 @@ const $907cbc087f6529e2$var$createMethod = (config)=>async (resourceId, params)=
|
|
|
292
293
|
`
|
|
293
294
|
});
|
|
294
295
|
// Create must return the new data, so get them from the remote URI
|
|
295
|
-
return await (0, $
|
|
296
|
+
return await (0, $aa09e6904cf4399f$export$2e2bcd8739ae039)(config)(resourceId, {
|
|
296
297
|
id: params.id
|
|
297
298
|
});
|
|
298
299
|
}
|
|
299
300
|
};
|
|
300
|
-
var $
|
|
301
|
+
var $c1c6dddad031acf6$export$2e2bcd8739ae039 = $c1c6dddad031acf6$var$createMethod;
|
|
301
302
|
|
|
302
303
|
|
|
303
304
|
const $566b5adde94810fa$var$deleteMethod = (config)=>async (resourceId, params)=>{
|
|
@@ -314,7 +315,7 @@ const $566b5adde94810fa$var$deleteMethod = (config)=>async (resourceId, params)=
|
|
|
314
315
|
var $566b5adde94810fa$export$2e2bcd8739ae039 = $566b5adde94810fa$var$deleteMethod;
|
|
315
316
|
|
|
316
317
|
|
|
317
|
-
const $
|
|
318
|
+
const $3a3bc87603f934e3$var$deleteManyMethod = (config)=>async (resourceId, params)=>{
|
|
318
319
|
const { httpClient: httpClient } = config;
|
|
319
320
|
const ids = [];
|
|
320
321
|
for (const id of params.ids)try {
|
|
@@ -329,19 +330,19 @@ const $f170294dd29d8bf8$var$deleteManyMethod = (config)=>async (resourceId, para
|
|
|
329
330
|
data: ids
|
|
330
331
|
};
|
|
331
332
|
};
|
|
332
|
-
var $
|
|
333
|
+
var $3a3bc87603f934e3$export$2e2bcd8739ae039 = $3a3bc87603f934e3$var$deleteManyMethod;
|
|
333
334
|
|
|
334
335
|
|
|
335
|
-
const $
|
|
336
|
+
const $5a7f64ef6101d5f8$var$getDataServers = (config)=>()=>{
|
|
336
337
|
return config.dataServers;
|
|
337
338
|
};
|
|
338
|
-
var $
|
|
339
|
+
var $5a7f64ef6101d5f8$export$2e2bcd8739ae039 = $5a7f64ef6101d5f8$var$getDataServers;
|
|
339
340
|
|
|
340
341
|
|
|
341
|
-
const $
|
|
342
|
+
const $2789979a990866f4$var$getDataModels = (config)=>()=>{
|
|
342
343
|
return config.resources;
|
|
343
344
|
};
|
|
344
|
-
var $
|
|
345
|
+
var $2789979a990866f4$export$2e2bcd8739ae039 = $2789979a990866f4$var$getDataModels;
|
|
345
346
|
|
|
346
347
|
|
|
347
348
|
|
|
@@ -359,6 +360,19 @@ const $e6fbab1f303bdb93$var$arrayOf = (value)=>{
|
|
|
359
360
|
var $e6fbab1f303bdb93$export$2e2bcd8739ae039 = $e6fbab1f303bdb93$var$arrayOf;
|
|
360
361
|
|
|
361
362
|
|
|
363
|
+
|
|
364
|
+
// Fetch the selected resources of the provided containers
|
|
365
|
+
// Filter out resources that are provided (can avoid loading a resource twice)
|
|
366
|
+
const $448b8598c73a447a$var$fetchSelectedResources = async (containers, excludedResourcesUris, config)=>{
|
|
367
|
+
let selectedResourcesUris = containers.filter((c)=>c.selectedResources).map((c)=>c.selectedResources).flat();
|
|
368
|
+
// Filter out resources which are already included in the SPARQL query results
|
|
369
|
+
selectedResourcesUris = selectedResourcesUris.filter((uri)=>!excludedResourcesUris.includes(uri));
|
|
370
|
+
const selectedResources = await Promise.all(selectedResourcesUris.map((resourceUri)=>(0, $6e277d32991a95da$export$2e2bcd8739ae039)(resourceUri, config)));
|
|
371
|
+
return selectedResources;
|
|
372
|
+
};
|
|
373
|
+
var $448b8598c73a447a$export$2e2bcd8739ae039 = $448b8598c73a447a$var$fetchSelectedResources;
|
|
374
|
+
|
|
375
|
+
|
|
362
376
|
const $8c999cc29c8d6a6c$var$isValidLDPContainer = (container)=>{
|
|
363
377
|
const resourceType = container.type || container['@type'];
|
|
364
378
|
return Array.isArray(resourceType) ? resourceType.includes('ldp:Container') : resourceType === 'ldp:Container';
|
|
@@ -366,23 +380,24 @@ const $8c999cc29c8d6a6c$var$isValidLDPContainer = (container)=>{
|
|
|
366
380
|
const $8c999cc29c8d6a6c$var$isObject = (val)=>{
|
|
367
381
|
return val != null && typeof val === 'object' && !Array.isArray(val);
|
|
368
382
|
};
|
|
369
|
-
const $8c999cc29c8d6a6c$var$fetchContainers = async (containers, params,
|
|
370
|
-
const
|
|
371
|
-
const jsonResponse = json;
|
|
372
|
-
// If container's context is different, compact it to have an uniform result
|
|
373
|
-
// TODO deep compare if the context is an object
|
|
374
|
-
if (jsonResponse['@context'] !== jsonContext) return (0, ($parcel$interopDefault($bkNnK$jsonld))).compact(jsonResponse, jsonContext);
|
|
375
|
-
return jsonResponse;
|
|
376
|
-
}).then((json)=>{
|
|
377
|
-
if (!$8c999cc29c8d6a6c$var$isValidLDPContainer(json)) throw new Error(`${container.uri} is not a LDP container`);
|
|
378
|
-
return (0, $e6fbab1f303bdb93$export$2e2bcd8739ae039)(json['ldp:contains']).map((resource)=>({
|
|
379
|
-
'@context': json['@context'],
|
|
380
|
-
...resource
|
|
381
|
-
}));
|
|
382
|
-
}));
|
|
383
|
+
const $8c999cc29c8d6a6c$var$fetchContainers = async (containers, params, config)=>{
|
|
384
|
+
const { httpClient: httpClient, jsonContext: jsonContext } = config;
|
|
383
385
|
// Fetch simultaneously all containers
|
|
384
|
-
const results = await Promise.all(
|
|
386
|
+
const results = await Promise.all(containers.filter((c)=>!c.selectedResources).map(async (container)=>{
|
|
387
|
+
let { json: json } = await httpClient(container.uri);
|
|
388
|
+
// If container's context is different, compact it to have an uniform result
|
|
389
|
+
// TODO deep compare if the context is an object
|
|
390
|
+
if (json['@context'] !== jsonContext) json = await (0, ($parcel$interopDefault($bkNnK$jsonld))).compact(json, jsonContext);
|
|
391
|
+
if (!$8c999cc29c8d6a6c$var$isValidLDPContainer(json)) throw new Error(`${container.uri} is not a LDP container`);
|
|
392
|
+
return (0, $e6fbab1f303bdb93$export$2e2bcd8739ae039)(json['ldp:contains']).map((resource)=>({
|
|
393
|
+
'@context': json['@context'],
|
|
394
|
+
...resource
|
|
395
|
+
}));
|
|
396
|
+
}));
|
|
385
397
|
let resources = results.flat();
|
|
398
|
+
// Append selected resources (if any)
|
|
399
|
+
const selectedResources = await (0, $448b8598c73a447a$export$2e2bcd8739ae039)(containers, resources.map((r)=>r.id), config);
|
|
400
|
+
resources = resources.concat(selectedResources);
|
|
386
401
|
resources = resources.map((resource)=>{
|
|
387
402
|
resource.id = resource.id || resource['@id'];
|
|
388
403
|
return resource;
|
|
@@ -444,7 +459,10 @@ const $8c999cc29c8d6a6c$var$fetchContainers = async (containers, params, { httpC
|
|
|
444
459
|
});
|
|
445
460
|
// Sorting
|
|
446
461
|
if (params.sort) resources = resources.sort((a, b)=>{
|
|
447
|
-
|
|
462
|
+
// @ts-expect-error TS(2532): Object is possibly 'undefined'.
|
|
463
|
+
if (params.sort.order === 'ASC') // @ts-expect-error TS(2532): Object is possibly 'undefined'.
|
|
464
|
+
return (a[params.sort.field] ?? '').localeCompare(b[params.sort.field] ?? '');
|
|
465
|
+
// @ts-expect-error TS(2532): Object is possibly 'undefined'.
|
|
448
466
|
return (b[params.sort.field] ?? '').localeCompare(a[params.sort.field] ?? '');
|
|
449
467
|
});
|
|
450
468
|
// Pagination
|
|
@@ -459,7 +477,7 @@ var $8c999cc29c8d6a6c$export$2e2bcd8739ae039 = $8c999cc29c8d6a6c$var$fetchContai
|
|
|
459
477
|
|
|
460
478
|
|
|
461
479
|
|
|
462
|
-
const $
|
|
480
|
+
const $55c8b4103f19d79c$var$getEmbedFrame = (blankNodes)=>{
|
|
463
481
|
let embedFrame = {};
|
|
464
482
|
let predicates;
|
|
465
483
|
if (blankNodes) {
|
|
@@ -470,7 +488,8 @@ const $e5241bff9fc0c9d7$var$getEmbedFrame = (blankNodes)=>{
|
|
|
470
488
|
];
|
|
471
489
|
embedFrame = {
|
|
472
490
|
...embedFrame,
|
|
473
|
-
...predicates.reduce((accumulator
|
|
491
|
+
...predicates.reduce(// @ts-expect-error TS(7006): Parameter 'accumulator' implicitly has an 'any' ty... Remove this comment to see the full error message
|
|
492
|
+
(accumulator, predicate)=>({
|
|
474
493
|
[predicate]: {
|
|
475
494
|
'@embed': '@last',
|
|
476
495
|
...accumulator
|
|
@@ -481,7 +500,7 @@ const $e5241bff9fc0c9d7$var$getEmbedFrame = (blankNodes)=>{
|
|
|
481
500
|
return embedFrame;
|
|
482
501
|
}
|
|
483
502
|
};
|
|
484
|
-
var $
|
|
503
|
+
var $55c8b4103f19d79c$export$2e2bcd8739ae039 = $55c8b4103f19d79c$var$getEmbedFrame;
|
|
485
504
|
|
|
486
505
|
|
|
487
506
|
|
|
@@ -502,22 +521,22 @@ const $108795c3831be99f$var$getUriFromPrefix = (item, ontologies)=>{
|
|
|
502
521
|
var $108795c3831be99f$export$2e2bcd8739ae039 = $108795c3831be99f$var$getUriFromPrefix;
|
|
503
522
|
|
|
504
523
|
|
|
505
|
-
const $
|
|
524
|
+
const $d6253a347864dbab$var$defaultToArray = (value)=>!value ? [] : Array.isArray(value) ? value : [
|
|
506
525
|
value
|
|
507
526
|
];
|
|
508
527
|
// We need to always include the type or React-Admin will not work properly
|
|
509
|
-
const $
|
|
510
|
-
const $
|
|
528
|
+
const $d6253a347864dbab$var$typeQuery = (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('type'));
|
|
529
|
+
const $d6253a347864dbab$var$buildBaseQuery = (predicates, ontologies)=>{
|
|
511
530
|
let baseTriples;
|
|
512
531
|
if (predicates) {
|
|
513
|
-
baseTriples = $
|
|
532
|
+
baseTriples = $d6253a347864dbab$var$defaultToArray(predicates).map((predicate, i)=>(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode((0, $108795c3831be99f$export$2e2bcd8739ae039)(predicate, ontologies)), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${i + 1}`)));
|
|
514
533
|
return {
|
|
515
534
|
construct: [
|
|
516
|
-
$
|
|
535
|
+
$d6253a347864dbab$var$typeQuery,
|
|
517
536
|
...baseTriples
|
|
518
537
|
],
|
|
519
538
|
where: [
|
|
520
|
-
$
|
|
539
|
+
$d6253a347864dbab$var$typeQuery,
|
|
521
540
|
...baseTriples.map((triple)=>({
|
|
522
541
|
type: 'optional',
|
|
523
542
|
patterns: [
|
|
@@ -528,21 +547,22 @@ const $51d7c29cc84f802b$var$buildBaseQuery = (predicates, ontologies)=>{
|
|
|
528
547
|
};
|
|
529
548
|
}
|
|
530
549
|
baseTriples = [
|
|
531
|
-
(0, $bkNnK$rdfjsdatamodel.
|
|
550
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('p1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('o1'))
|
|
532
551
|
];
|
|
533
552
|
return {
|
|
534
553
|
construct: baseTriples,
|
|
535
554
|
where: baseTriples
|
|
536
555
|
};
|
|
537
556
|
};
|
|
538
|
-
var $
|
|
557
|
+
var $d6253a347864dbab$export$2e2bcd8739ae039 = $d6253a347864dbab$var$buildBaseQuery;
|
|
539
558
|
|
|
540
559
|
|
|
560
|
+
// @ts-expect-error TS(7016): Could not find a declaration file for module 'cryp... Remove this comment to see the full error message
|
|
541
561
|
|
|
542
562
|
|
|
543
563
|
|
|
544
564
|
// Transform ['ont:predicate1/ont:predicate2'] to ['ont:predicate1', 'ont:predicate1/ont:predicate2']
|
|
545
|
-
const $
|
|
565
|
+
const $62e296927bdba02e$var$extractNodes = (blankNodes)=>{
|
|
546
566
|
const nodes = [];
|
|
547
567
|
if (blankNodes) {
|
|
548
568
|
for (const predicate of blankNodes)if (predicate.includes('/')) {
|
|
@@ -552,10 +572,10 @@ const $64d4ce40c79d1509$var$extractNodes = (blankNodes)=>{
|
|
|
552
572
|
}
|
|
553
573
|
return nodes;
|
|
554
574
|
};
|
|
555
|
-
const $
|
|
556
|
-
const $
|
|
557
|
-
const $
|
|
558
|
-
const $
|
|
575
|
+
const $62e296927bdba02e$var$generateSparqlVarName = (node)=>(0, ($parcel$interopDefault($bkNnK$cryptojsmd5)))(node);
|
|
576
|
+
const $62e296927bdba02e$var$getParentNode = (node)=>node.includes('/') && node.split('/')[0];
|
|
577
|
+
const $62e296927bdba02e$var$getPredicate = (node)=>node.includes('/') ? node.split('/')[1] : node;
|
|
578
|
+
const $62e296927bdba02e$var$buildUnionQuery = (queries)=>queries.map((q)=>{
|
|
559
579
|
let triples = q.query;
|
|
560
580
|
const firstTriple = queries.find((q2)=>q.parentNode === q2.node);
|
|
561
581
|
if (firstTriple !== undefined) triples = triples.concat(firstTriple.query[0]);
|
|
@@ -564,18 +584,18 @@ const $64d4ce40c79d1509$var$buildUnionQuery = (queries)=>queries.map((q)=>{
|
|
|
564
584
|
triples: triples
|
|
565
585
|
};
|
|
566
586
|
});
|
|
567
|
-
const $
|
|
587
|
+
const $62e296927bdba02e$var$buildBlankNodesQuery = (blankNodes, baseQuery, ontologies)=>{
|
|
568
588
|
const queries = [];
|
|
569
|
-
const nodes = $
|
|
589
|
+
const nodes = $62e296927bdba02e$var$extractNodes(blankNodes);
|
|
570
590
|
if (nodes && ontologies && ontologies.length > 0) {
|
|
571
591
|
for (const node of nodes){
|
|
572
|
-
const parentNode = $
|
|
573
|
-
const predicate = $
|
|
574
|
-
const varName = $
|
|
575
|
-
const parentVarName = parentNode ? $
|
|
592
|
+
const parentNode = $62e296927bdba02e$var$getParentNode(node);
|
|
593
|
+
const predicate = $62e296927bdba02e$var$getPredicate(node);
|
|
594
|
+
const varName = $62e296927bdba02e$var$generateSparqlVarName(node);
|
|
595
|
+
const parentVarName = parentNode ? $62e296927bdba02e$var$generateSparqlVarName(parentNode) : '1';
|
|
576
596
|
const query = [
|
|
577
|
-
(0, $bkNnK$rdfjsdatamodel.
|
|
578
|
-
(0, $bkNnK$rdfjsdatamodel.
|
|
597
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`s${parentVarName}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode((0, $108795c3831be99f$export$2e2bcd8739ae039)(predicate, ontologies)), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`s${varName}`)),
|
|
598
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`s${varName}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`p${varName}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${varName}`))
|
|
579
599
|
];
|
|
580
600
|
queries.push({
|
|
581
601
|
node: node,
|
|
@@ -590,7 +610,7 @@ const $64d4ce40c79d1509$var$buildBlankNodesQuery = (blankNodes, baseQuery, ontol
|
|
|
590
610
|
type: 'union',
|
|
591
611
|
patterns: [
|
|
592
612
|
baseQuery.where,
|
|
593
|
-
...$
|
|
613
|
+
...$62e296927bdba02e$var$buildUnionQuery(queries)
|
|
594
614
|
]
|
|
595
615
|
}
|
|
596
616
|
};
|
|
@@ -600,11 +620,11 @@ const $64d4ce40c79d1509$var$buildBlankNodesQuery = (blankNodes, baseQuery, ontol
|
|
|
600
620
|
where: ''
|
|
601
621
|
};
|
|
602
622
|
};
|
|
603
|
-
var $
|
|
623
|
+
var $62e296927bdba02e$export$2e2bcd8739ae039 = $62e296927bdba02e$var$buildBlankNodesQuery;
|
|
604
624
|
|
|
605
625
|
|
|
606
626
|
|
|
607
|
-
const $
|
|
627
|
+
const $4eb51c383b9eb050$var$buildAutoDetectBlankNodesQuery = (depth, baseQuery)=>{
|
|
608
628
|
const construct = [
|
|
609
629
|
...baseQuery.construct
|
|
610
630
|
];
|
|
@@ -615,7 +635,7 @@ const $3b137d792e8838ac$var$buildAutoDetectBlankNodesQuery = (depth, baseQuery)=
|
|
|
615
635
|
baseQuery.where
|
|
616
636
|
]);
|
|
617
637
|
for(let i = 1; i <= depth; i++){
|
|
618
|
-
construct.push((0, $bkNnK$rdfjsdatamodel.
|
|
638
|
+
construct.push((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${i}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`p${i + 1}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${i + 1}`)));
|
|
619
639
|
whereQueries.push([
|
|
620
640
|
...whereQueries[whereQueries.length - 1],
|
|
621
641
|
{
|
|
@@ -624,11 +644,11 @@ const $3b137d792e8838ac$var$buildAutoDetectBlankNodesQuery = (depth, baseQuery)=
|
|
|
624
644
|
type: 'operation',
|
|
625
645
|
operator: 'isblank',
|
|
626
646
|
args: [
|
|
627
|
-
(0, $bkNnK$rdfjsdatamodel.variable
|
|
647
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${i}`)
|
|
628
648
|
]
|
|
629
649
|
}
|
|
630
650
|
},
|
|
631
|
-
(0, $bkNnK$rdfjsdatamodel.
|
|
651
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${i}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`p${i + 1}`), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable(`o${i + 1}`))
|
|
632
652
|
]);
|
|
633
653
|
}
|
|
634
654
|
where = {
|
|
@@ -642,16 +662,15 @@ const $3b137d792e8838ac$var$buildAutoDetectBlankNodesQuery = (depth, baseQuery)=
|
|
|
642
662
|
where: where
|
|
643
663
|
};
|
|
644
664
|
};
|
|
645
|
-
var $
|
|
665
|
+
var $4eb51c383b9eb050$export$2e2bcd8739ae039 = $4eb51c383b9eb050$var$buildAutoDetectBlankNodesQuery;
|
|
646
666
|
|
|
647
667
|
|
|
648
668
|
|
|
649
669
|
|
|
650
|
-
var $
|
|
651
|
-
const
|
|
652
|
-
const $33c37185da3771a9$var$generator = new $33c37185da3771a9$require$SparqlGenerator({
|
|
670
|
+
var $1d6ef12386121fca$require$SparqlGenerator = $bkNnK$sparqljs.Generator;
|
|
671
|
+
const $1d6ef12386121fca$var$generator = new $1d6ef12386121fca$require$SparqlGenerator({
|
|
653
672
|
});
|
|
654
|
-
const $
|
|
673
|
+
const $1d6ef12386121fca$var$reservedFilterKeys = [
|
|
655
674
|
'q',
|
|
656
675
|
'sparqlWhere',
|
|
657
676
|
'blankNodes',
|
|
@@ -659,7 +678,7 @@ const $33c37185da3771a9$var$reservedFilterKeys = [
|
|
|
659
678
|
'_servers',
|
|
660
679
|
'_predicates'
|
|
661
680
|
];
|
|
662
|
-
const $
|
|
681
|
+
const $1d6ef12386121fca$var$buildSparqlQuery = ({ containersUris: containersUris, params: params, dataModel: dataModel, ontologies: ontologies })=>{
|
|
663
682
|
const blankNodes = params.filter?.blankNodes || dataModel.list?.blankNodes;
|
|
664
683
|
const predicates = params.filter?._predicates || dataModel.list?.predicates;
|
|
665
684
|
const blankNodesDepth = params.filter?.blankNodesDepth ?? dataModel.list?.blankNodesDepth ?? 2;
|
|
@@ -667,7 +686,7 @@ const $33c37185da3771a9$var$buildSparqlQuery = ({ containersUris: containersUris
|
|
|
667
686
|
...dataModel.list?.filter,
|
|
668
687
|
...params.filter
|
|
669
688
|
};
|
|
670
|
-
const baseQuery = (0, $
|
|
689
|
+
const baseQuery = (0, $d6253a347864dbab$export$2e2bcd8739ae039)(predicates, ontologies);
|
|
671
690
|
const sparqlJsParams = {
|
|
672
691
|
queryType: 'CONSTRUCT',
|
|
673
692
|
template: baseQuery.construct,
|
|
@@ -679,17 +698,17 @@ const $33c37185da3771a9$var$buildSparqlQuery = ({ containersUris: containersUris
|
|
|
679
698
|
{
|
|
680
699
|
type: 'values',
|
|
681
700
|
values: containersUris.map((containerUri)=>({
|
|
682
|
-
'?containerUri': $
|
|
701
|
+
'?containerUri': (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode(containerUri)
|
|
683
702
|
}))
|
|
684
703
|
},
|
|
685
|
-
$
|
|
704
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('containerUri'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode('http://www.w3.org/ns/ldp#contains'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1')),
|
|
686
705
|
{
|
|
687
706
|
type: 'filter',
|
|
688
707
|
expression: {
|
|
689
708
|
type: 'operation',
|
|
690
709
|
operator: 'isiri',
|
|
691
710
|
args: [
|
|
692
|
-
$
|
|
711
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1')
|
|
693
712
|
]
|
|
694
713
|
}
|
|
695
714
|
}
|
|
@@ -701,10 +720,10 @@ const $33c37185da3771a9$var$buildSparqlQuery = ({ containersUris: containersUris
|
|
|
701
720
|
{
|
|
702
721
|
"sparqlWhere": {
|
|
703
722
|
"type": "bgp",
|
|
704
|
-
"
|
|
705
|
-
"subject": {"termType": "
|
|
723
|
+
"rdf.quads": [{
|
|
724
|
+
"subject": {"termType": "rdf.variable", "value": "s1"},
|
|
706
725
|
"predicate": {"termType": "NameNode", "value": "http://virtual-assembly.org/ontologies/pair#label"},
|
|
707
|
-
"object": {"termType": "
|
|
726
|
+
"object": {"termType": "rdf.literal", "value": "My Organization"}
|
|
708
727
|
}]
|
|
709
728
|
}
|
|
710
729
|
}
|
|
@@ -721,17 +740,17 @@ const $33c37185da3771a9$var$buildSparqlQuery = ({ containersUris: containersUris
|
|
|
721
740
|
{
|
|
722
741
|
queryType: 'SELECT',
|
|
723
742
|
variables: [
|
|
724
|
-
$
|
|
743
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1')
|
|
725
744
|
],
|
|
726
745
|
where: [
|
|
727
|
-
$
|
|
746
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('p1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('o1')),
|
|
728
747
|
{
|
|
729
748
|
type: 'filter',
|
|
730
749
|
expression: {
|
|
731
750
|
type: 'operation',
|
|
732
751
|
operator: 'isliteral',
|
|
733
752
|
args: [
|
|
734
|
-
$
|
|
753
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('o1')
|
|
735
754
|
]
|
|
736
755
|
}
|
|
737
756
|
},
|
|
@@ -749,12 +768,13 @@ const $33c37185da3771a9$var$buildSparqlQuery = ({ containersUris: containersUris
|
|
|
749
768
|
type: 'operation',
|
|
750
769
|
operator: 'str',
|
|
751
770
|
args: [
|
|
752
|
-
$
|
|
771
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('o1')
|
|
753
772
|
]
|
|
754
773
|
}
|
|
755
774
|
]
|
|
756
775
|
},
|
|
757
|
-
|
|
776
|
+
// @ts-expect-error TS(2554): Expected 1-2 arguments, but got 3.
|
|
777
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).literal(filter.q.toLowerCase(), '', (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode('http://www.w3.org/2001/XMLSchema#string'))
|
|
758
778
|
]
|
|
759
779
|
}
|
|
760
780
|
}
|
|
@@ -767,22 +787,27 @@ const $33c37185da3771a9$var$buildSparqlQuery = ({ containersUris: containersUris
|
|
|
767
787
|
// SPARQL keyword a = filter based on the class of a resource (example => 'a': 'pair:OrganizationType')
|
|
768
788
|
// Other filters are based on a value (example => 'petr:hasAudience': 'http://localhost:3000/audiences/tout-public')
|
|
769
789
|
Object.entries(filter).forEach(([predicate, object])=>{
|
|
770
|
-
if (!$
|
|
790
|
+
if (!$1d6ef12386121fca$var$reservedFilterKeys.includes(predicate)) resourceWhere.unshift((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).quad((0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).variable('s1'), (0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode((0, $108795c3831be99f$export$2e2bcd8739ae039)(predicate, ontologies)), // @ts-expect-error TS(2345): Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message
|
|
791
|
+
(0, ($parcel$interopDefault($bkNnK$rdfjsdatamodel))).namedNode((0, $108795c3831be99f$export$2e2bcd8739ae039)(object, ontologies))));
|
|
771
792
|
});
|
|
772
793
|
}
|
|
773
794
|
// Blank nodes
|
|
774
|
-
const blankNodesQuery = blankNodes ? (0, $
|
|
795
|
+
const blankNodesQuery = blankNodes ? (0, $62e296927bdba02e$export$2e2bcd8739ae039)(blankNodes, baseQuery, ontologies) : (0, $4eb51c383b9eb050$export$2e2bcd8739ae039)(blankNodesDepth, baseQuery);
|
|
775
796
|
if (blankNodesQuery && blankNodesQuery.construct) {
|
|
797
|
+
// @ts-expect-error TS(2769): No overload matches this call.
|
|
776
798
|
resourceWhere = resourceWhere.concat(blankNodesQuery.where);
|
|
799
|
+
// @ts-expect-error TS(2769): No overload matches this call.
|
|
777
800
|
sparqlJsParams.template = sparqlJsParams.template.concat(blankNodesQuery.construct);
|
|
778
801
|
} else resourceWhere.push(baseQuery.where);
|
|
802
|
+
// @ts-expect-error TS(2345): Argument of type '(uad | { type: string; values: ... Remove this comment to see the full error message
|
|
779
803
|
sparqlJsParams.where.push(containerWhere, resourceWhere);
|
|
780
|
-
return $
|
|
804
|
+
return $1d6ef12386121fca$var$generator.stringify(sparqlJsParams);
|
|
781
805
|
};
|
|
782
|
-
var $
|
|
806
|
+
var $1d6ef12386121fca$export$2e2bcd8739ae039 = $1d6ef12386121fca$var$buildSparqlQuery;
|
|
783
807
|
|
|
784
808
|
|
|
785
|
-
|
|
809
|
+
|
|
810
|
+
const $fdadbcf8133b8b4f$var$compare = (a, b)=>{
|
|
786
811
|
switch(typeof a){
|
|
787
812
|
case 'string':
|
|
788
813
|
return a.localeCompare(b);
|
|
@@ -792,17 +817,20 @@ const $1e7a94d745f8597b$var$compare = (a, b)=>{
|
|
|
792
817
|
return 0;
|
|
793
818
|
}
|
|
794
819
|
};
|
|
795
|
-
const $
|
|
796
|
-
const { dataServers: dataServers,
|
|
797
|
-
const dataModel = resources[resourceId];
|
|
798
|
-
|
|
820
|
+
const $fdadbcf8133b8b4f$var$fetchSparqlEndpoints = async (containers, resourceId, params, config)=>{
|
|
821
|
+
const { dataServers: dataServers, httpClient: httpClient, jsonContext: jsonContext, ontologies: ontologies } = config;
|
|
822
|
+
const dataModel = config.resources[resourceId];
|
|
823
|
+
// Find servers to query with SPARQL
|
|
824
|
+
// (Ignore containers with selected resources, they will be fetched below)
|
|
825
|
+
const serversToQuery = containers.filter((c)=>!c.selectedResources).reduce((acc, cur)=>{
|
|
799
826
|
if (!acc.includes(cur.server)) acc.push(cur.server);
|
|
800
827
|
return acc;
|
|
801
828
|
}, []);
|
|
802
|
-
|
|
829
|
+
// Run simultaneous SPARQL queries
|
|
830
|
+
const results = await Promise.all(serversToQuery.map((serverKey)=>new Promise((resolve, reject)=>{
|
|
803
831
|
const blankNodes = params.filter?.blankNodes || dataModel.list?.blankNodes;
|
|
804
|
-
const sparqlQuery = (0, $
|
|
805
|
-
containersUris: containers.filter((c)=>c.server === serverKey).map((c)=>c.uri),
|
|
832
|
+
const sparqlQuery = (0, $1d6ef12386121fca$export$2e2bcd8739ae039)({
|
|
833
|
+
containersUris: containers.filter((c)=>c.server === serverKey && !c.selectedResources).map((c)=>c.uri),
|
|
806
834
|
params: params,
|
|
807
835
|
dataModel: dataModel,
|
|
808
836
|
ontologies: ontologies
|
|
@@ -818,7 +846,7 @@ const $1e7a94d745f8597b$var$fetchSparqlEndpoints = async (containers, resourceId
|
|
|
818
846
|
'@context': jsonContext,
|
|
819
847
|
'@type': dataModel.types,
|
|
820
848
|
'@embed': '@never',
|
|
821
|
-
...(0, $
|
|
849
|
+
...(0, $55c8b4103f19d79c$export$2e2bcd8739ae039)(blankNodes)
|
|
822
850
|
} : {
|
|
823
851
|
'@context': jsonContext,
|
|
824
852
|
'@type': dataModel.types
|
|
@@ -842,25 +870,26 @@ const $1e7a94d745f8597b$var$fetchSparqlEndpoints = async (containers, resourceId
|
|
|
842
870
|
...resource
|
|
843
871
|
})) || []);
|
|
844
872
|
}).catch((e)=>reject(e));
|
|
845
|
-
}));
|
|
846
|
-
//
|
|
847
|
-
let
|
|
848
|
-
|
|
873
|
+
})));
|
|
874
|
+
// Merge results from all SPARQL servers
|
|
875
|
+
let resources = results.flat();
|
|
876
|
+
// Append selected resources to SPARQL query results
|
|
877
|
+
const selectedResources = await (0, $448b8598c73a447a$export$2e2bcd8739ae039)(containers, resources.map((r)=>r.id), config);
|
|
878
|
+
resources = resources.concat(selectedResources);
|
|
879
|
+
if (resources.length === 0) return {
|
|
849
880
|
data: [],
|
|
850
881
|
total: 0
|
|
851
882
|
};
|
|
852
|
-
// Merge all results in one array
|
|
853
|
-
results = [].concat(...results);
|
|
854
883
|
// Add id in addition to @id, as this is what React-Admin expects
|
|
855
|
-
let returnData =
|
|
884
|
+
let returnData = resources.map((item)=>{
|
|
856
885
|
item.id = item.id || item['@id'];
|
|
857
886
|
return item;
|
|
858
887
|
});
|
|
859
888
|
// TODO sort and paginate the results in the SPARQL query to improve performances
|
|
860
889
|
if (params.sort) returnData = returnData.sort((a, b)=>{
|
|
861
890
|
if (a[params.sort.field] !== undefined && b[params.sort.field] !== undefined) {
|
|
862
|
-
if (params.sort.order === 'ASC') return $
|
|
863
|
-
return $
|
|
891
|
+
if (params.sort.order === 'ASC') return $fdadbcf8133b8b4f$var$compare(a[params.sort.field], b[params.sort.field]);
|
|
892
|
+
return $fdadbcf8133b8b4f$var$compare(b[params.sort.field], a[params.sort.field]);
|
|
864
893
|
}
|
|
865
894
|
return 0;
|
|
866
895
|
});
|
|
@@ -870,7 +899,7 @@ const $1e7a94d745f8597b$var$fetchSparqlEndpoints = async (containers, resourceId
|
|
|
870
899
|
total: results.length
|
|
871
900
|
};
|
|
872
901
|
};
|
|
873
|
-
var $
|
|
902
|
+
var $fdadbcf8133b8b4f$export$2e2bcd8739ae039 = $fdadbcf8133b8b4f$var$fetchSparqlEndpoints;
|
|
874
903
|
|
|
875
904
|
|
|
876
905
|
|
|
@@ -904,15 +933,15 @@ const $95cbc03f25caf72a$var$getListMethod = (config)=>async (resourceId, params)
|
|
|
904
933
|
else // Otherwise find the container URIs on the given servers (either in the filter or the data model)
|
|
905
934
|
containers = (0, $047a107b0d203793$export$2e2bcd8739ae039)((0, $e6fbab1f303bdb93$export$2e2bcd8739ae039)(dataModel.types), params?.filter?._servers || dataModel.list?.servers, dataServers);
|
|
906
935
|
if (dataModel.list?.fetchContainer) return (0, $8c999cc29c8d6a6c$export$2e2bcd8739ae039)(containers, params, config);
|
|
907
|
-
else return (0, $
|
|
936
|
+
else return (0, $fdadbcf8133b8b4f$export$2e2bcd8739ae039)(containers, resourceId, params, config);
|
|
908
937
|
};
|
|
909
938
|
var $95cbc03f25caf72a$export$2e2bcd8739ae039 = $95cbc03f25caf72a$var$getListMethod;
|
|
910
939
|
|
|
911
940
|
|
|
912
941
|
|
|
913
|
-
const $
|
|
942
|
+
const $1e120883e96aa282$var$getManyMethod = (config)=>async (resourceId, params)=>{
|
|
914
943
|
const { returnFailedResources: returnFailedResources } = config;
|
|
915
|
-
let returnData = await Promise.all(params.ids.map((id)=>(0, $
|
|
944
|
+
let returnData = await Promise.all(params.ids.map((id)=>(0, $aa09e6904cf4399f$export$2e2bcd8739ae039)(config)(resourceId, {
|
|
916
945
|
id: typeof id === 'object' ? id['@id'] : id
|
|
917
946
|
}).then(({ data: data })=>data).catch(()=>{
|
|
918
947
|
// Catch if one resource fails to load
|
|
@@ -930,19 +959,20 @@ const $e296494b4f6a4f89$var$getManyMethod = (config)=>async (resourceId, params)
|
|
|
930
959
|
data: returnData
|
|
931
960
|
};
|
|
932
961
|
};
|
|
933
|
-
var $
|
|
962
|
+
var $1e120883e96aa282$export$2e2bcd8739ae039 = $1e120883e96aa282$var$getManyMethod;
|
|
934
963
|
|
|
935
964
|
|
|
936
965
|
|
|
937
|
-
const $
|
|
966
|
+
const $7529ad20819ad9cc$var$getManyReferenceMethod = (config)=>async (resourceId, params)=>{
|
|
938
967
|
params.filter = {
|
|
939
968
|
...params.filter,
|
|
940
969
|
[params.target]: params.id
|
|
941
970
|
};
|
|
971
|
+
// @ts-expect-error ts(2790): The operand of a 'delete' operator must be optional.
|
|
942
972
|
delete params.target;
|
|
943
973
|
return await (0, $95cbc03f25caf72a$export$2e2bcd8739ae039)(config)(resourceId, params);
|
|
944
974
|
};
|
|
945
|
-
var $
|
|
975
|
+
var $7529ad20819ad9cc$export$2e2bcd8739ae039 = $7529ad20819ad9cc$var$getManyReferenceMethod;
|
|
946
976
|
|
|
947
977
|
|
|
948
978
|
|
|
@@ -986,7 +1016,7 @@ var $fda69bf2752eb49a$export$2e2bcd8739ae039 = $fda69bf2752eb49a$var$patchMethod
|
|
|
986
1016
|
|
|
987
1017
|
|
|
988
1018
|
// Return the first server matching with the baseUrl
|
|
989
|
-
const $
|
|
1019
|
+
const $68523d444fbb0b63$var$getServerKeyFromUri = (uri, dataServers)=>{
|
|
990
1020
|
if (!uri) throw Error(`No URI provided to getServerKeyFromUri`);
|
|
991
1021
|
return dataServers && Object.keys(dataServers).find((key)=>{
|
|
992
1022
|
if (dataServers[key].pod) // The baseUrl ends with /data so remove this part to match with the webId and webId-related URLs (/inbox, /outbox...)
|
|
@@ -994,12 +1024,12 @@ const $59a07b932dae8600$var$getServerKeyFromUri = (uri, dataServers)=>{
|
|
|
994
1024
|
return uri.startsWith(dataServers[key].baseUrl);
|
|
995
1025
|
});
|
|
996
1026
|
};
|
|
997
|
-
var $
|
|
1027
|
+
var $68523d444fbb0b63$export$2e2bcd8739ae039 = $68523d444fbb0b63$var$getServerKeyFromUri;
|
|
998
1028
|
|
|
999
1029
|
|
|
1000
1030
|
const $ceaafb56f75454f0$var$updateMethod = (config)=>async (resourceId, params)=>{
|
|
1001
1031
|
const { httpClient: httpClient, jsonContext: jsonContext, dataServers: dataServers } = config;
|
|
1002
|
-
const serverKey = (0, $
|
|
1032
|
+
const serverKey = (0, $68523d444fbb0b63$export$2e2bcd8739ae039)(params.id, dataServers);
|
|
1003
1033
|
// Upload files, if there are any
|
|
1004
1034
|
const { updatedRecord: updatedRecord } = await (0, $6fcb30f76390d142$export$2e2bcd8739ae039).upload(params.data, config, serverKey);
|
|
1005
1035
|
params.data = updatedRecord;
|
|
@@ -1020,40 +1050,43 @@ var $ceaafb56f75454f0$export$2e2bcd8739ae039 = $ceaafb56f75454f0$var$updateMetho
|
|
|
1020
1050
|
|
|
1021
1051
|
|
|
1022
1052
|
|
|
1023
|
-
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
|
|
1053
|
+
/**
|
|
1054
|
+
*
|
|
1055
|
+
* @param dataServers Data servers configuration
|
|
1056
|
+
* @param fetchFn The fetch function to use for the actual fetch call, e.g. `fetchUtils.fetchJson` or `fetch`
|
|
1057
|
+
* @returns
|
|
1058
|
+
*/ const $837f5837e4147e21$var$fetchBase = (dataServers, fetchFn)=>(url, options = {})=>{
|
|
1027
1059
|
if (!url) throw new Error(`No URL provided on httpClient call`);
|
|
1028
|
-
const authServerKey = (0, $
|
|
1029
|
-
const serverKey = (0, $
|
|
1030
|
-
const useProxy = serverKey !== authServerKey &&
|
|
1031
|
-
|
|
1060
|
+
const authServerKey = (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('authServer', dataServers);
|
|
1061
|
+
const serverKey = (0, $68523d444fbb0b63$export$2e2bcd8739ae039)(url, dataServers);
|
|
1062
|
+
const useProxy = serverKey !== authServerKey && // The server is different from the auth server.
|
|
1063
|
+
!!dataServers[authServerKey]?.proxyUrl && // A proxy URL is configured on the auth server.
|
|
1064
|
+
dataServers[serverKey]?.noProxy !== true; // The server does not explicitly disable the proxy.
|
|
1065
|
+
const headers = new Headers(options.headers);
|
|
1032
1066
|
switch(options.method){
|
|
1033
1067
|
case 'POST':
|
|
1034
1068
|
case 'PATCH':
|
|
1035
1069
|
case 'PUT':
|
|
1036
|
-
if (!
|
|
1037
|
-
if (!
|
|
1070
|
+
if (!headers.has('Accept')) headers.set('Accept', 'application/ld+json');
|
|
1071
|
+
if (!headers.has('Content-Type')) headers.set('Content-Type', 'application/ld+json');
|
|
1038
1072
|
break;
|
|
1039
1073
|
case 'DELETE':
|
|
1040
1074
|
break;
|
|
1041
1075
|
case 'GET':
|
|
1042
1076
|
default:
|
|
1043
|
-
if (!
|
|
1077
|
+
if (!headers.has('Accept')) headers.set('Accept', 'application/ld+json');
|
|
1044
1078
|
break;
|
|
1045
1079
|
}
|
|
1046
1080
|
if (useProxy) {
|
|
1081
|
+
// To the proxy endpoint, we post the URL, method, headers and body (if any) as multipart/form-data.
|
|
1047
1082
|
const formData = new FormData();
|
|
1048
1083
|
formData.append('id', url);
|
|
1049
1084
|
formData.append('method', options.method || 'GET');
|
|
1050
|
-
formData.append('headers', JSON.stringify(Object.fromEntries(
|
|
1051
|
-
if (options.body)
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
// Post to proxy endpoint with multipart/form-data format
|
|
1056
|
-
return (0, $bkNnK$reactadmin.fetchUtils).fetchJson(dataServers[authServerKey].proxyUrl, {
|
|
1085
|
+
formData.append('headers', JSON.stringify(Object.fromEntries(headers.entries())));
|
|
1086
|
+
if (options.body instanceof File) formData.append('body', options.body, options.body.name);
|
|
1087
|
+
else if (options.body instanceof Blob || typeof options.body === 'string') formData.append('body', options.body);
|
|
1088
|
+
// POST request to proxy endpoint.
|
|
1089
|
+
return fetchFn(dataServers[authServerKey].proxyUrl, {
|
|
1057
1090
|
method: 'POST',
|
|
1058
1091
|
headers: new Headers({
|
|
1059
1092
|
Authorization: `Bearer ${localStorage.getItem('token')}`
|
|
@@ -1061,14 +1094,39 @@ var $ceaafb56f75454f0$export$2e2bcd8739ae039 = $ceaafb56f75454f0$var$updateMetho
|
|
|
1061
1094
|
body: formData
|
|
1062
1095
|
});
|
|
1063
1096
|
}
|
|
1064
|
-
// Add token if the server is the same as the auth server
|
|
1097
|
+
// Add token if the server is the same as the auth server.
|
|
1065
1098
|
if (serverKey === authServerKey) {
|
|
1066
1099
|
const token = localStorage.getItem('token');
|
|
1067
|
-
if (token)
|
|
1100
|
+
if (token) headers.set('Authorization', `Bearer ${token}`);
|
|
1068
1101
|
}
|
|
1069
|
-
|
|
1102
|
+
options.headers = headers;
|
|
1103
|
+
return fetchFn(url, options);
|
|
1070
1104
|
};
|
|
1071
|
-
|
|
1105
|
+
/**
|
|
1106
|
+
* Creates a fetch function that can be used to make calls to the data servers and which returns data formatted as JSON.
|
|
1107
|
+
* It will use the proxy endpoint if available and if the server is different from the auth server.
|
|
1108
|
+
* It will also set the Accept and Content-Type headers to `application/ld+json` for `POST`, `PATCH`, `PUT` and `GET` requests.
|
|
1109
|
+
* @param dataServers Data servers configuration
|
|
1110
|
+
* @returns A function with react-admin's fetchJson signature that can be used to make calls to the data servers.
|
|
1111
|
+
*
|
|
1112
|
+
*/ const $837f5837e4147e21$export$5ff1805767bd358a = (dataServers)=>{
|
|
1113
|
+
const fetchBaseFn = $837f5837e4147e21$var$fetchBase(dataServers, (0, $bkNnK$reactadmin.fetchUtils).fetchJson);
|
|
1114
|
+
return (url, options)=>{
|
|
1115
|
+
return fetchBaseFn(url, options);
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
/**
|
|
1119
|
+
* Creates an authenticated fetch function that can be used to make calls to the data servers.
|
|
1120
|
+
* It will use the proxy endpoint if available and if the server is different from the auth server.
|
|
1121
|
+
* @param dataServers Data servers configuration
|
|
1122
|
+
* @returns A function that can be used to make authenticated fetch calls.
|
|
1123
|
+
*/ const $837f5837e4147e21$export$1ac69e0fa5b5498b = (dataServers)=>{
|
|
1124
|
+
const fetchBaseFn = $837f5837e4147e21$var$fetchBase(dataServers, fetch);
|
|
1125
|
+
const fetchFunction = (url, options)=>{
|
|
1126
|
+
return fetchBaseFn(url, options);
|
|
1127
|
+
};
|
|
1128
|
+
return fetchFunction;
|
|
1129
|
+
};
|
|
1072
1130
|
|
|
1073
1131
|
|
|
1074
1132
|
|
|
@@ -1134,7 +1192,10 @@ const $058bb6151d120fba$var$getTypesFromShapeTree = async (shapeTreeUri)=>{
|
|
|
1134
1192
|
var $058bb6151d120fba$export$2e2bcd8739ae039 = $058bb6151d120fba$var$getTypesFromShapeTree;
|
|
1135
1193
|
|
|
1136
1194
|
|
|
1137
|
-
|
|
1195
|
+
/**
|
|
1196
|
+
* For data server containers, expands types and adds `uri` and `server` properties.
|
|
1197
|
+
* For resources, expands types (if applicable from shape tree information).
|
|
1198
|
+
*/ const $5e24772571dd1677$var$normalizeConfig = async (config)=>{
|
|
1138
1199
|
const newConfig = {
|
|
1139
1200
|
...config
|
|
1140
1201
|
};
|
|
@@ -1186,64 +1247,89 @@ const $fcf4eee3b18e8350$var$getOntologiesFromContext = async (context)=>{
|
|
|
1186
1247
|
var $fcf4eee3b18e8350$export$2e2bcd8739ae039 = $fcf4eee3b18e8350$var$getOntologiesFromContext;
|
|
1187
1248
|
|
|
1188
1249
|
|
|
1189
|
-
|
|
1250
|
+
const $5eeade28ff354aaa$var$dataProvider = (originalConfig)=>{
|
|
1190
1251
|
// Keep in memory for refresh
|
|
1191
|
-
let config
|
|
1192
|
-
...originalConfig
|
|
1193
|
-
};
|
|
1252
|
+
let config;
|
|
1194
1253
|
const prepareConfig = async ()=>{
|
|
1254
|
+
const fetchJson = (0, $837f5837e4147e21$export$5ff1805767bd358a)(originalConfig.dataServers);
|
|
1255
|
+
const authFetchFn = (0, $837f5837e4147e21$export$1ac69e0fa5b5498b)(originalConfig.dataServers);
|
|
1256
|
+
const dataset = (0, $bkNnK$ldoconnected.createConnectedLdoDataset)([
|
|
1257
|
+
(0, $bkNnK$ldoconnectedsolid.solidConnectedPlugin)
|
|
1258
|
+
]);
|
|
1259
|
+
dataset.setContext('solid', {
|
|
1260
|
+
fetch: authFetchFn
|
|
1261
|
+
});
|
|
1262
|
+
config = {
|
|
1263
|
+
...originalConfig,
|
|
1264
|
+
httpClient: fetchJson,
|
|
1265
|
+
authFetch: authFetchFn,
|
|
1266
|
+
dataset: dataset
|
|
1267
|
+
};
|
|
1195
1268
|
config.dataServers ??= {};
|
|
1196
|
-
//
|
|
1197
|
-
|
|
1198
|
-
|
|
1269
|
+
// Load plugins.
|
|
1270
|
+
for (const plugin of config.plugins){
|
|
1271
|
+
if (plugin.transformConfig) try {
|
|
1272
|
+
config = await plugin.transformConfig(config);
|
|
1273
|
+
} catch (error) {
|
|
1274
|
+
console.error('Error setting up data provider plugin', plugin.name, error);
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
// Configure httpClient & authFetch again with possibly updated data servers
|
|
1278
|
+
config.httpClient = (0, $837f5837e4147e21$export$5ff1805767bd358a)(config.dataServers);
|
|
1279
|
+
config.authFetch = (0, $837f5837e4147e21$export$1ac69e0fa5b5498b)(config.dataServers);
|
|
1280
|
+
dataset.setContext('solid', {
|
|
1281
|
+
fetch: config.authFetch
|
|
1282
|
+
});
|
|
1283
|
+
// Create the LDO dataset with the solidConnectedPlugin. It will be used to manage the RDF data.
|
|
1284
|
+
config.dataset = dataset;
|
|
1285
|
+
// Useful for debugging: Attach httpClient & authFetch to global document.
|
|
1286
|
+
// @ts-expect-error TS(2339)
|
|
1199
1287
|
document.httpClient = config.httpClient;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
config.httpClient = (0, $341dff85fe619d85$export$2e2bcd8739ae039)(config.dataServers);
|
|
1288
|
+
// @ts-expect-error TS(2339)
|
|
1289
|
+
document.authFetch = authFetchFn;
|
|
1203
1290
|
if (!config.ontologies && config.jsonContext) config.ontologies = await (0, $fcf4eee3b18e8350$export$2e2bcd8739ae039)(config.jsonContext);
|
|
1204
1291
|
else if (!config.jsonContext && config.ontologies) config.jsonContext = config.ontologies;
|
|
1205
1292
|
else if (!config.jsonContext && !config.ontologies) throw new Error(`Either the JSON context or the ontologies must be set`);
|
|
1206
1293
|
if (!config.returnFailedResources) config.returnFailedResources = false;
|
|
1207
1294
|
config = await (0, $5e24772571dd1677$export$2e2bcd8739ae039)(config);
|
|
1208
|
-
console.
|
|
1295
|
+
console.debug('Config after plugins', config);
|
|
1209
1296
|
};
|
|
1210
1297
|
// Immediately call the preload plugins
|
|
1211
1298
|
const prepareConfigPromise = prepareConfig();
|
|
1212
|
-
const waitForPrepareConfig = (method)=>async (...
|
|
1299
|
+
const waitForPrepareConfig = (method)=>async (...args)=>{
|
|
1213
1300
|
await prepareConfigPromise; // Return immediately if plugins have already been loaded
|
|
1214
|
-
return method(config)(...
|
|
1301
|
+
return method(config)(...args);
|
|
1215
1302
|
};
|
|
1216
1303
|
return {
|
|
1217
1304
|
getList: waitForPrepareConfig((0, $95cbc03f25caf72a$export$2e2bcd8739ae039)),
|
|
1218
|
-
getMany: waitForPrepareConfig((0, $
|
|
1219
|
-
getManyReference: waitForPrepareConfig((0, $
|
|
1220
|
-
getOne: waitForPrepareConfig((0, $
|
|
1221
|
-
create: waitForPrepareConfig((0, $
|
|
1305
|
+
getMany: waitForPrepareConfig((0, $1e120883e96aa282$export$2e2bcd8739ae039)),
|
|
1306
|
+
getManyReference: waitForPrepareConfig((0, $7529ad20819ad9cc$export$2e2bcd8739ae039)),
|
|
1307
|
+
getOne: waitForPrepareConfig((0, $aa09e6904cf4399f$export$2e2bcd8739ae039)),
|
|
1308
|
+
create: waitForPrepareConfig((0, $c1c6dddad031acf6$export$2e2bcd8739ae039)),
|
|
1222
1309
|
update: waitForPrepareConfig((0, $ceaafb56f75454f0$export$2e2bcd8739ae039)),
|
|
1223
1310
|
updateMany: ()=>{
|
|
1224
1311
|
throw new Error('updateMany is not implemented yet');
|
|
1225
1312
|
},
|
|
1226
1313
|
delete: waitForPrepareConfig((0, $566b5adde94810fa$export$2e2bcd8739ae039)),
|
|
1227
|
-
deleteMany: waitForPrepareConfig((0, $
|
|
1314
|
+
deleteMany: waitForPrepareConfig((0, $3a3bc87603f934e3$export$2e2bcd8739ae039)),
|
|
1228
1315
|
// Custom methods
|
|
1229
1316
|
patch: waitForPrepareConfig((0, $fda69bf2752eb49a$export$2e2bcd8739ae039)),
|
|
1230
|
-
getDataModels: waitForPrepareConfig((0, $
|
|
1231
|
-
getDataServers: waitForPrepareConfig((0, $
|
|
1232
|
-
getLocalDataServers: (0, $
|
|
1233
|
-
fetch: waitForPrepareConfig((c)=>(0, $
|
|
1317
|
+
getDataModels: waitForPrepareConfig((0, $2789979a990866f4$export$2e2bcd8739ae039)),
|
|
1318
|
+
getDataServers: waitForPrepareConfig((0, $5a7f64ef6101d5f8$export$2e2bcd8739ae039)),
|
|
1319
|
+
getLocalDataServers: (0, $5a7f64ef6101d5f8$export$2e2bcd8739ae039)(originalConfig),
|
|
1320
|
+
fetch: waitForPrepareConfig((c)=>(0, $837f5837e4147e21$export$5ff1805767bd358a)(c.dataServers)),
|
|
1321
|
+
authFetch: waitForPrepareConfig((c)=>(0, $837f5837e4147e21$export$1ac69e0fa5b5498b)(c.dataServers)),
|
|
1322
|
+
getDataset: waitForPrepareConfig((c)=>()=>c.dataset),
|
|
1234
1323
|
uploadFile: waitForPrepareConfig((c)=>(rawFile)=>(0, $6fcb30f76390d142$export$a5575dbeeffdad98)(rawFile, c)),
|
|
1235
1324
|
expandTypes: waitForPrepareConfig((c)=>(types)=>(0, $9ab033d1ec46b5da$export$2e2bcd8739ae039)(types, c.jsonContext)),
|
|
1236
1325
|
getConfig: waitForPrepareConfig((c)=>()=>c),
|
|
1237
1326
|
refreshConfig: async ()=>{
|
|
1238
|
-
config = {
|
|
1239
|
-
...originalConfig
|
|
1240
|
-
};
|
|
1241
1327
|
await prepareConfig();
|
|
1242
1328
|
return config;
|
|
1243
1329
|
}
|
|
1244
1330
|
};
|
|
1245
1331
|
};
|
|
1246
|
-
var $
|
|
1332
|
+
var $5eeade28ff354aaa$export$2e2bcd8739ae039 = $5eeade28ff354aaa$var$dataProvider;
|
|
1247
1333
|
|
|
1248
1334
|
|
|
1249
1335
|
|
|
@@ -1260,7 +1346,10 @@ var $8c4c0f0b55649ce6$export$2e2bcd8739ae039 = $8c4c0f0b55649ce6$var$getPrefixFr
|
|
|
1260
1346
|
|
|
1261
1347
|
|
|
1262
1348
|
|
|
1263
|
-
|
|
1349
|
+
/**
|
|
1350
|
+
* Adds `dataServers.user` properties to configuration (baseUrl, sparqlEndpoint, proxyUrl, ...).
|
|
1351
|
+
*/ const $89358cee13a17a31$var$configureUserStorage = ()=>({
|
|
1352
|
+
name: 'configureUserStorage',
|
|
1264
1353
|
transformConfig: async (config)=>{
|
|
1265
1354
|
const token = localStorage.getItem('token');
|
|
1266
1355
|
// If the user is logged in
|
|
@@ -1272,7 +1361,7 @@ const $89358cee13a17a31$var$configureUserStorage = ()=>({
|
|
|
1272
1361
|
const newConfig = {
|
|
1273
1362
|
...config
|
|
1274
1363
|
};
|
|
1275
|
-
newConfig.dataServers
|
|
1364
|
+
newConfig.dataServers[webId] = {
|
|
1276
1365
|
pod: true,
|
|
1277
1366
|
default: true,
|
|
1278
1367
|
authServer: true,
|
|
@@ -1300,6 +1389,7 @@ var $89358cee13a17a31$export$2e2bcd8739ae039 = $89358cee13a17a31$var$configureUs
|
|
|
1300
1389
|
|
|
1301
1390
|
|
|
1302
1391
|
|
|
1392
|
+
|
|
1303
1393
|
const $37dc42f6e1c3b4af$var$getContainerFromDataRegistration = async (dataRegistrationUri, config)=>{
|
|
1304
1394
|
const { json: dataRegistration } = await config.httpClient(dataRegistrationUri, {
|
|
1305
1395
|
headers: new Headers({
|
|
@@ -1333,7 +1423,8 @@ const $37dc42f6e1c3b4af$var$getContainerFromDataRegistration = async (dataRegist
|
|
|
1333
1423
|
'@container': '@language'
|
|
1334
1424
|
}
|
|
1335
1425
|
});
|
|
1336
|
-
const
|
|
1426
|
+
const userStorage = (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('default', config.dataServers);
|
|
1427
|
+
const { baseUrl: baseUrl } = config.dataServers[userStorage];
|
|
1337
1428
|
const containerPath = dataRegistration.id.replace(baseUrl, '');
|
|
1338
1429
|
const container = {
|
|
1339
1430
|
path: containerPath,
|
|
@@ -1359,7 +1450,10 @@ var $37dc42f6e1c3b4af$export$2e2bcd8739ae039 = $37dc42f6e1c3b4af$var$getContaine
|
|
|
1359
1450
|
* Return a function that look if an app (clientId) is registered with an user (webId)
|
|
1360
1451
|
* If not, it redirects to the endpoint provided by the user's authorization agent
|
|
1361
1452
|
* See https://solid.github.io/data-interoperability-panel/specification/#authorization-agent
|
|
1362
|
-
*/ const $c512de108ef5d674$var$fetchAppRegistration = ()=>
|
|
1453
|
+
*/ const $c512de108ef5d674$var$fetchAppRegistration = (pluginConfig = {})=>{
|
|
1454
|
+
const { includeSelectedResources: includeSelectedResources = true } = pluginConfig;
|
|
1455
|
+
return {
|
|
1456
|
+
name: 'fetchAppRegistration',
|
|
1363
1457
|
transformConfig: async (config)=>{
|
|
1364
1458
|
const token = localStorage.getItem('token');
|
|
1365
1459
|
// If the user is logged in
|
|
@@ -1381,15 +1475,27 @@ var $37dc42f6e1c3b4af$export$2e2bcd8739ae039 = $37dc42f6e1c3b4af$var$getContaine
|
|
|
1381
1475
|
const newConfig = {
|
|
1382
1476
|
...config
|
|
1383
1477
|
};
|
|
1384
|
-
// Load
|
|
1478
|
+
// Load access grants concurrently to improve performances
|
|
1385
1479
|
const results = await Promise.all((0, $e6fbab1f303bdb93$export$2e2bcd8739ae039)(appRegistration['interop:hasAccessGrant']).map(async (accessGrantUri)=>{
|
|
1386
1480
|
const { json: accessGrant } = await config.httpClient(accessGrantUri);
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1481
|
+
const container = await (0, $37dc42f6e1c3b4af$export$2e2bcd8739ae039)(accessGrant['interop:hasDataRegistration'], config);
|
|
1482
|
+
container.server = accessGrant['interop:dataOwner'];
|
|
1483
|
+
if (accessGrant['interop:scopeOfGrant'] === 'interop:AllFromRegistry') return container;
|
|
1484
|
+
else if (accessGrant['interop:scopeOfGrant'] === 'interop:SelectedFromRegistry') {
|
|
1485
|
+
if (!includeSelectedResources) return undefined;
|
|
1486
|
+
container.selectedResources = (0, $e6fbab1f303bdb93$export$2e2bcd8739ae039)(accessGrant['interop:hasDataInstance']);
|
|
1487
|
+
return container;
|
|
1488
|
+
}
|
|
1391
1489
|
}));
|
|
1392
|
-
|
|
1490
|
+
// Put data shared by other users in other servers (storages)
|
|
1491
|
+
for (const container of results.flat().filter((i)=>i !== undefined))if (!newConfig.dataServers[container.server]) newConfig.dataServers[container.server] = {
|
|
1492
|
+
pod: true,
|
|
1493
|
+
baseUrl: `${container.server}/data`,
|
|
1494
|
+
containers: [
|
|
1495
|
+
container
|
|
1496
|
+
]
|
|
1497
|
+
};
|
|
1498
|
+
else newConfig.dataServers[container.server].containers.push(container);
|
|
1393
1499
|
return newConfig;
|
|
1394
1500
|
}
|
|
1395
1501
|
}
|
|
@@ -1397,22 +1503,32 @@ var $37dc42f6e1c3b4af$export$2e2bcd8739ae039 = $37dc42f6e1c3b4af$var$getContaine
|
|
|
1397
1503
|
}
|
|
1398
1504
|
return config;
|
|
1399
1505
|
}
|
|
1400
|
-
}
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1401
1508
|
var $c512de108ef5d674$export$2e2bcd8739ae039 = $c512de108ef5d674$var$fetchAppRegistration;
|
|
1402
1509
|
|
|
1403
1510
|
|
|
1404
1511
|
|
|
1405
1512
|
|
|
1406
|
-
|
|
1513
|
+
/**
|
|
1514
|
+
* Plugin to add data registrations to the user containers, by fetching the registry set.
|
|
1515
|
+
*
|
|
1516
|
+
* Requires the `configureUserStorage` plugin.
|
|
1517
|
+
*
|
|
1518
|
+
* @returns {Configuration} The configuration with the data registrations added to `dataServers.user.containers`
|
|
1519
|
+
*/ const $cd772adda3024172$var$fetchDataRegistry = ()=>({
|
|
1520
|
+
name: 'fetchDataRegistry',
|
|
1407
1521
|
transformConfig: async (config)=>{
|
|
1408
1522
|
const token = localStorage.getItem('token');
|
|
1409
1523
|
// If the user is logged in
|
|
1410
1524
|
if (token) {
|
|
1411
|
-
if (!config.dataServers.user) throw new Error(`You must configure the user storage first with the configureUserStorage plugin`);
|
|
1412
1525
|
const payload = (0, ($parcel$interopDefault($bkNnK$jwtdecode)))(token);
|
|
1413
1526
|
const webId = payload.webId || payload.webid; // Currently we must deal with both formats
|
|
1527
|
+
if (!config.dataServers[webId]) throw new Error(`You must configure the user storage first with the configureUserStorage plugin`);
|
|
1414
1528
|
const { json: user } = await config.httpClient(webId);
|
|
1529
|
+
if (!user['interop:hasRegistrySet']) throw new Error(`User ${webId} is missing interop:hasRegistrySet`);
|
|
1415
1530
|
const { json: registrySet } = await config.httpClient(user['interop:hasRegistrySet']);
|
|
1531
|
+
if (!registrySet['interop:hasDataRegistry']) throw new Error(`User ${webId} is missing interop:hasDataRegistry`);
|
|
1416
1532
|
const { json: dataRegistry } = await config.httpClient(registrySet['interop:hasDataRegistry']);
|
|
1417
1533
|
if (dataRegistry['interop:hasDataRegistration']) {
|
|
1418
1534
|
const results = await Promise.all(dataRegistry['interop:hasDataRegistration'].map((dataRegistrationUri)=>{
|
|
@@ -1421,7 +1537,7 @@ const $cd772adda3024172$var$fetchDataRegistry = ()=>({
|
|
|
1421
1537
|
const newConfig = {
|
|
1422
1538
|
...config
|
|
1423
1539
|
};
|
|
1424
|
-
newConfig.dataServers.
|
|
1540
|
+
newConfig.dataServers[webId].containers?.push(...results.flat());
|
|
1425
1541
|
return newConfig;
|
|
1426
1542
|
}
|
|
1427
1543
|
}
|
|
@@ -1436,14 +1552,21 @@ var $cd772adda3024172$export$2e2bcd8739ae039 = $cd772adda3024172$var$fetchDataRe
|
|
|
1436
1552
|
|
|
1437
1553
|
|
|
1438
1554
|
|
|
1439
|
-
|
|
1555
|
+
/**
|
|
1556
|
+
* Plugin to add type indexes to the user containers, by fetching the them.
|
|
1557
|
+
*
|
|
1558
|
+
* Requires the `configureUserStorage` plugin.
|
|
1559
|
+
*
|
|
1560
|
+
* @returns {Configuration} The configuration with the data registrations added to `dataServers.user.containers`
|
|
1561
|
+
*/ const $69d4da9beaa62ac6$var$fetchTypeIndexes = ()=>({
|
|
1562
|
+
name: 'fetchTypeIndexes',
|
|
1440
1563
|
transformConfig: async (config)=>{
|
|
1441
1564
|
const token = localStorage.getItem('token');
|
|
1442
1565
|
// If the user is logged in
|
|
1443
1566
|
if (token) {
|
|
1444
|
-
if (!config.dataServers.user) throw new Error(`You must configure the user storage first with the configureUserStorage plugin`);
|
|
1445
1567
|
const payload = (0, ($parcel$interopDefault($bkNnK$jwtdecode)))(token);
|
|
1446
1568
|
const webId = payload.webId || payload.webid; // Currently we must deal with both formats
|
|
1569
|
+
if (!config.dataServers[webId]) throw new Error(`You must configure the user storage first with the configureUserStorage plugin`);
|
|
1447
1570
|
const { json: user } = await config.httpClient(webId);
|
|
1448
1571
|
const typeRegistrations = {
|
|
1449
1572
|
public: [],
|
|
@@ -1472,17 +1595,17 @@ const $69d4da9beaa62ac6$var$fetchTypeIndexes = ()=>({
|
|
|
1472
1595
|
separateNumbers: true
|
|
1473
1596
|
})
|
|
1474
1597
|
},
|
|
1475
|
-
path: typeRegistration['solid:instanceContainer'].replace(newConfig.dataServers.
|
|
1598
|
+
path: typeRegistration['solid:instanceContainer'].replace(newConfig.dataServers[webId].baseUrl, ''),
|
|
1476
1599
|
types: await (0, $9ab033d1ec46b5da$export$2e2bcd8739ae039)(types, user['@context']),
|
|
1477
1600
|
private: mode === 'private'
|
|
1478
1601
|
};
|
|
1479
|
-
const containerIndex = newConfig.dataServers.
|
|
1602
|
+
const containerIndex = newConfig.dataServers[webId].containers.findIndex((c)=>c.path === container.path);
|
|
1480
1603
|
if (containerIndex !== -1) // If a container with this URI already exist, add type registration information if they are not set
|
|
1481
|
-
newConfig.dataServers.
|
|
1604
|
+
newConfig.dataServers[webId].containers[containerIndex] = {
|
|
1482
1605
|
...container,
|
|
1483
|
-
...newConfig.dataServers.
|
|
1606
|
+
...newConfig.dataServers[webId].containers[containerIndex]
|
|
1484
1607
|
};
|
|
1485
|
-
else newConfig.dataServers.
|
|
1608
|
+
else newConfig.dataServers[webId].containers.push(container);
|
|
1486
1609
|
}
|
|
1487
1610
|
return newConfig;
|
|
1488
1611
|
}
|
|
@@ -1496,6 +1619,7 @@ var $69d4da9beaa62ac6$export$2e2bcd8739ae039 = $69d4da9beaa62ac6$var$fetchTypeIn
|
|
|
1496
1619
|
|
|
1497
1620
|
|
|
1498
1621
|
const $1395e306228d41f2$var$fetchVoidEndpoints = ()=>({
|
|
1622
|
+
name: 'fetchVoidEndpoints',
|
|
1499
1623
|
transformConfig: async (config)=>{
|
|
1500
1624
|
let results = [];
|
|
1501
1625
|
try {
|
|
@@ -1724,12 +1848,12 @@ const $32d32215b4e4729f$var$useGetCreateContainerUri = ()=>{
|
|
|
1724
1848
|
const dataModels = (0, $20621bc841a5205a$export$2e2bcd8739ae039)();
|
|
1725
1849
|
const dataServers = (0, $c9933a88e2acc4da$export$2e2bcd8739ae039)();
|
|
1726
1850
|
const getCreateContainerUri = (0, $bkNnK$react.useCallback)((resourceId)=>{
|
|
1727
|
-
if (!dataModels || !dataServers || !dataModels[resourceId]) return undefined;
|
|
1851
|
+
if (!resourceId || !dataModels || !dataServers || !dataModels[resourceId]) return undefined;
|
|
1728
1852
|
const dataModel = dataModels[resourceId];
|
|
1729
1853
|
if (dataModel.create?.container) return dataModel.create.container;
|
|
1730
1854
|
else if (dataModel.create?.server) return (0, $ff3623bf1421ebcc$export$2e2bcd8739ae039)(dataModel.types, dataModel.create.server, dataServers);
|
|
1731
1855
|
else {
|
|
1732
|
-
const defaultServerKey = (0, $
|
|
1856
|
+
const defaultServerKey = (0, $0a5fcc1f7fc2050f$export$2e2bcd8739ae039)('default', dataServers);
|
|
1733
1857
|
if (!defaultServerKey) throw new Error(`No default dataServer found. You can set explicitly one setting the "default" attribute to true`);
|
|
1734
1858
|
return (0, $ff3623bf1421ebcc$export$2e2bcd8739ae039)(dataModel.types, defaultServerKey, dataServers);
|
|
1735
1859
|
}
|
|
@@ -1767,16 +1891,19 @@ var $63a32f1a35c6f80e$export$2e2bcd8739ae039 = $63a32f1a35c6f80e$var$useDataMode
|
|
|
1767
1891
|
|
|
1768
1892
|
|
|
1769
1893
|
|
|
1770
|
-
const $
|
|
1771
|
-
const $
|
|
1772
|
-
const $
|
|
1894
|
+
const $413b0e8af6982264$var$compute = (externalLinks, record)=>typeof externalLinks === 'function' ? externalLinks(record) : externalLinks;
|
|
1895
|
+
const $413b0e8af6982264$var$isURL = (url)=>typeof url === 'string' && url.startsWith('http');
|
|
1896
|
+
const $413b0e8af6982264$var$useGetExternalLink = (componentExternalLinks)=>{
|
|
1773
1897
|
// Since the externalLinks config is defined only locally, we don't need to wait for VOID endpoints fetching
|
|
1774
1898
|
const dataProvider = (0, $bkNnK$react.useContext)((0, $bkNnK$reactadmin.DataProviderContext));
|
|
1899
|
+
// @ts-expect-error TS(2531): Object is possibly 'null'.
|
|
1775
1900
|
const dataServers = dataProvider.getLocalDataServers();
|
|
1776
1901
|
const serversExternalLinks = (0, $bkNnK$react.useMemo)(()=>{
|
|
1777
1902
|
if (dataServers) return Object.fromEntries(Object.values(dataServers).map((server)=>{
|
|
1778
1903
|
// If externalLinks is not defined in the data server, use external links for non-default servers
|
|
1904
|
+
// @ts-expect-error TS(2571): Object is of type 'unknown'.
|
|
1779
1905
|
const externalLinks = server.externalLinks !== undefined ? server.externalLinks : !server.default;
|
|
1906
|
+
// @ts-expect-error TS(2571): Object is of type 'unknown'.
|
|
1780
1907
|
return [
|
|
1781
1908
|
server.baseUrl,
|
|
1782
1909
|
externalLinks
|
|
@@ -1786,25 +1913,25 @@ const $85e9a897c6d7c14a$var$useGetExternalLink = (componentExternalLinks)=>{
|
|
|
1786
1913
|
dataServers
|
|
1787
1914
|
]);
|
|
1788
1915
|
return (0, $bkNnK$react.useCallback)((record)=>{
|
|
1789
|
-
const computedComponentExternalLinks = $
|
|
1916
|
+
const computedComponentExternalLinks = $413b0e8af6982264$var$compute(componentExternalLinks, record);
|
|
1790
1917
|
// If the component explicitly asks not to display as external links, use an internal link
|
|
1791
1918
|
if (computedComponentExternalLinks === false) return false;
|
|
1792
1919
|
if (!record?.id) return false;
|
|
1793
1920
|
const serverBaseUrl = Object.keys(serversExternalLinks).find((baseUrl)=>record?.id.startsWith(baseUrl));
|
|
1794
1921
|
// If no matching data servers could be found, assume we have an internal link
|
|
1795
1922
|
if (!serverBaseUrl) return false;
|
|
1796
|
-
const computedServerExternalLinks = $
|
|
1923
|
+
const computedServerExternalLinks = $413b0e8af6982264$var$compute(serversExternalLinks[serverBaseUrl], record);
|
|
1797
1924
|
// If the data server explicitly asks not to display as external links, use an internal link
|
|
1798
1925
|
if (computedServerExternalLinks === false) return false;
|
|
1799
|
-
if ($
|
|
1800
|
-
if ($
|
|
1926
|
+
if ($413b0e8af6982264$var$isURL(computedComponentExternalLinks)) return computedComponentExternalLinks;
|
|
1927
|
+
if ($413b0e8af6982264$var$isURL(computedServerExternalLinks)) return computedServerExternalLinks;
|
|
1801
1928
|
return record.id;
|
|
1802
1929
|
}, [
|
|
1803
1930
|
serversExternalLinks,
|
|
1804
1931
|
componentExternalLinks
|
|
1805
1932
|
]);
|
|
1806
1933
|
};
|
|
1807
|
-
var $
|
|
1934
|
+
var $413b0e8af6982264$export$2e2bcd8739ae039 = $413b0e8af6982264$var$useGetExternalLink;
|
|
1808
1935
|
|
|
1809
1936
|
|
|
1810
1937
|
|
|
@@ -1834,7 +1961,7 @@ var $d602250066d4ff3e$export$2e2bcd8739ae039 = $d602250066d4ff3e$var$useGetPrefi
|
|
|
1834
1961
|
* </SingleFieldList>
|
|
1835
1962
|
* </FilterHandler>
|
|
1836
1963
|
* </Show>
|
|
1837
|
-
*/ const $
|
|
1964
|
+
*/ const $d7e56c289bd8ceb0$var$FilterHandler = ({ children: children, record: record, filter: filter, source: source, ...otherProps })=>{
|
|
1838
1965
|
const [filtered, setFiltered] = (0, $bkNnK$react.useState)();
|
|
1839
1966
|
(0, $bkNnK$react.useEffect)(()=>{
|
|
1840
1967
|
if (record && source && Array.isArray(record?.[source])) {
|
|
@@ -1870,7 +1997,7 @@ var $d602250066d4ff3e$export$2e2bcd8739ae039 = $d602250066d4ff3e$var$useGetPrefi
|
|
|
1870
1997
|
})
|
|
1871
1998
|
});
|
|
1872
1999
|
};
|
|
1873
|
-
var $
|
|
2000
|
+
var $d7e56c289bd8ceb0$export$2e2bcd8739ae039 = $d7e56c289bd8ceb0$var$FilterHandler;
|
|
1874
2001
|
|
|
1875
2002
|
|
|
1876
2003
|
|
|
@@ -1937,12 +2064,13 @@ var $f763906f9b20f2d8$export$2e2bcd8739ae039 = $f763906f9b20f2d8$var$FilterHandl
|
|
|
1937
2064
|
* </GroupedReferenceHandler>
|
|
1938
2065
|
*
|
|
1939
2066
|
*
|
|
1940
|
-
*/ const $
|
|
2067
|
+
*/ const $62e4c61f126cac5e$var$GroupedReferenceHandler = ({ children: children, groupReference: groupReference, groupLabel: groupLabel, groupHeader: groupHeader, filterProperty: filterProperty, ...otherProps })=>{
|
|
1941
2068
|
const record = (0, $bkNnK$reactadmin.useRecordContext)();
|
|
1942
2069
|
const { data: data } = (0, $bkNnK$reactadmin.useGetList)(groupReference);
|
|
1943
2070
|
return /*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsx)((0, $bkNnK$reactjsxruntime.Fragment), {
|
|
1944
2071
|
children: data?.map((data, index)=>{
|
|
1945
2072
|
const filter = {};
|
|
2073
|
+
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
1946
2074
|
filter[filterProperty] = data.id;
|
|
1947
2075
|
return /*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsxs)((0, $bkNnK$reactjsxruntime.Fragment), {
|
|
1948
2076
|
children: [
|
|
@@ -1950,7 +2078,7 @@ var $f763906f9b20f2d8$export$2e2bcd8739ae039 = $f763906f9b20f2d8$var$FilterHandl
|
|
|
1950
2078
|
...otherProps,
|
|
1951
2079
|
group: data
|
|
1952
2080
|
}),
|
|
1953
|
-
/*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsx)((0, $
|
|
2081
|
+
/*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsx)((0, $d7e56c289bd8ceb0$export$2e2bcd8739ae039), {
|
|
1954
2082
|
...otherProps,
|
|
1955
2083
|
record: record,
|
|
1956
2084
|
filter: filter,
|
|
@@ -1962,14 +2090,14 @@ var $f763906f9b20f2d8$export$2e2bcd8739ae039 = $f763906f9b20f2d8$var$FilterHandl
|
|
|
1962
2090
|
})
|
|
1963
2091
|
});
|
|
1964
2092
|
};
|
|
1965
|
-
var $
|
|
2093
|
+
var $62e4c61f126cac5e$export$2e2bcd8739ae039 = $62e4c61f126cac5e$var$GroupedReferenceHandler;
|
|
1966
2094
|
|
|
1967
2095
|
|
|
1968
2096
|
|
|
1969
2097
|
|
|
1970
2098
|
|
|
1971
2099
|
|
|
1972
|
-
const $
|
|
2100
|
+
const $ef83a7754e7f8331$var$useReferenceInputStyles = (0, $bkNnK$tssreactmui.makeStyles)()({
|
|
1973
2101
|
form: {
|
|
1974
2102
|
display: 'flex'
|
|
1975
2103
|
},
|
|
@@ -1977,18 +2105,19 @@ const $030f1232f6810456$var$useReferenceInputStyles = (0, ($parcel$interopDefaul
|
|
|
1977
2105
|
paddingRight: '20px'
|
|
1978
2106
|
}
|
|
1979
2107
|
});
|
|
1980
|
-
const $
|
|
2108
|
+
const $ef83a7754e7f8331$var$useHideInputStyles = (0, $bkNnK$tssreactmui.makeStyles)()({
|
|
1981
2109
|
root: {
|
|
1982
2110
|
display: 'none'
|
|
1983
2111
|
}
|
|
1984
2112
|
});
|
|
1985
|
-
const $
|
|
2113
|
+
const $ef83a7754e7f8331$var$ReificationArrayInput = (props)=>{
|
|
1986
2114
|
const { reificationClass: reificationClass, children: children, ...otherProps } = props;
|
|
1987
|
-
const flexFormClasses = $
|
|
1988
|
-
const hideInputStyles = $
|
|
2115
|
+
const { classes: flexFormClasses } = $ef83a7754e7f8331$var$useReferenceInputStyles();
|
|
2116
|
+
const { classes: hideInputStyles } = $ef83a7754e7f8331$var$useHideInputStyles();
|
|
1989
2117
|
return /*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsx)((0, $bkNnK$reactadmin.ArrayInput), {
|
|
1990
2118
|
...otherProps,
|
|
1991
2119
|
children: /*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsxs)((0, $bkNnK$reactadmin.SimpleFormIterator), {
|
|
2120
|
+
// @ts-expect-error TS(2322): Type '{ children: any[]; classes: { form: any; }; ... Remove this comment to see the full error message
|
|
1992
2121
|
classes: {
|
|
1993
2122
|
form: flexFormClasses.form
|
|
1994
2123
|
},
|
|
@@ -2001,13 +2130,14 @@ const $030f1232f6810456$var$ReificationArrayInput = (props)=>{
|
|
|
2001
2130
|
/*#__PURE__*/ (0, $bkNnK$reactjsxruntime.jsx)((0, $bkNnK$reactadmin.TextInput), {
|
|
2002
2131
|
className: hideInputStyles.root,
|
|
2003
2132
|
source: "type",
|
|
2133
|
+
// @ts-expect-error TS(2322): Type '{ className: any; source: string; initialVal... Remove this comment to see the full error message
|
|
2004
2134
|
initialValue: reificationClass
|
|
2005
2135
|
})
|
|
2006
2136
|
]
|
|
2007
2137
|
})
|
|
2008
2138
|
});
|
|
2009
2139
|
};
|
|
2010
|
-
var $
|
|
2140
|
+
var $ef83a7754e7f8331$export$2e2bcd8739ae039 = $ef83a7754e7f8331$var$ReificationArrayInput;
|
|
2011
2141
|
|
|
2012
2142
|
|
|
2013
2143
|
|
|
@@ -2111,6 +2241,8 @@ const $84ab912646919f8c$var$registeredWebSockets = new Map();
|
|
|
2111
2241
|
};
|
|
2112
2242
|
|
|
2113
2243
|
|
|
2244
|
+
var $1bc09db736a9cb94$exports = {};
|
|
2245
|
+
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */
|
|
2114
2246
|
|
|
2115
2247
|
$parcel$exportWildcard(module.exports, $1bc09db736a9cb94$exports);
|
|
2116
2248
|
|