semanticdb-core 1.1.45 → 1.1.46
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.
|
@@ -7,11 +7,8 @@ const buildExplainResult = (title, values) => ({
|
|
|
7
7
|
title,
|
|
8
8
|
values,
|
|
9
9
|
});
|
|
10
|
-
const buildExplainResultWithEntities = (title, values, entities = []) => ({
|
|
11
|
-
|
|
12
|
-
values,
|
|
13
|
-
entities,
|
|
14
|
-
});
|
|
10
|
+
const buildExplainResultWithEntities = (title, values, entities = []) => (Object.assign({ title,
|
|
11
|
+
values }, (entities.length > 0 ? { entities } : {})));
|
|
15
12
|
const normalizeExplainLogicformLocale = (locale) => {
|
|
16
13
|
if (locale === exports.DEFAULT_EXPLAIN_LOGICFORM_LOCALE) {
|
|
17
14
|
return locale;
|
|
@@ -286,7 +283,9 @@ const explainEntityID = (logicform, _schemas, locale = exports.DEFAULT_EXPLAIN_L
|
|
|
286
283
|
if (!logicform.entity_id) {
|
|
287
284
|
return buildExplainResult('ID', []);
|
|
288
285
|
}
|
|
289
|
-
return
|
|
286
|
+
return buildExplainResultWithEntities('ID', [logicform.entity_id], [
|
|
287
|
+
{ schema: logicform.schema, id: logicform.entity_id },
|
|
288
|
+
]);
|
|
290
289
|
};
|
|
291
290
|
exports.explainEntityID = explainEntityID;
|
|
292
291
|
const explainPreds = (logicform, _schemas, locale = exports.DEFAULT_EXPLAIN_LOGICFORM_LOCALE) => {
|