@startinblox/core 0.19.0-beta.6 → 0.19.0-beta.8
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.js +18 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11270,6 +11270,8 @@ const base_context = {
|
|
|
11270
11270
|
xsd: "http://www.w3.org/2001/XMLSchema#",
|
|
11271
11271
|
geo: "http://www.w3.org/2003/01/geo/wgs84_pos#",
|
|
11272
11272
|
acl: "http://www.w3.org/ns/auth/acl#",
|
|
11273
|
+
hd: "http://cdn.startinblox.com/owl/ttl/vocab.ttl#",
|
|
11274
|
+
sib: "http://cdn.startinblox.com/owl/ttl/vocab.ttl#",
|
|
11273
11275
|
name: "rdfs:label",
|
|
11274
11276
|
deadline: "xsd:dateTime",
|
|
11275
11277
|
lat: "geo:lat",
|
|
@@ -12991,15 +12993,21 @@ const RangeMixin = {
|
|
|
12991
12993
|
async setRangeAttribute(resources) {
|
|
12992
12994
|
if (resources) {
|
|
12993
12995
|
const getRangeValue = async (resource) => {
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
)
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
)
|
|
13002
|
-
|
|
12996
|
+
let res = await store.getData(resource["@id"], this.context || base_context, void 0, void 0, true);
|
|
12997
|
+
if (res === null) {
|
|
12998
|
+
res = resource;
|
|
12999
|
+
}
|
|
13000
|
+
let valuePredicate = store.getExpandedPredicate(this.optionValue.split(/[.]+/)[0], this.context || base_context);
|
|
13001
|
+
const selectedValue = await res[valuePredicate];
|
|
13002
|
+
let value = "";
|
|
13003
|
+
if (this.optionValue.includes("@id") && !selectedValue["@id"])
|
|
13004
|
+
value = `{"@id": "${selectedValue}"}`;
|
|
13005
|
+
else if (typeof selectedValue === "object" && selectedValue["@id"])
|
|
13006
|
+
value = `{"@id": "${selectedValue["@id"]}"}`;
|
|
13007
|
+
else
|
|
13008
|
+
value = selectedValue;
|
|
13009
|
+
let labelPredicate = store.getExpandedPredicate(this.optionLabel.split(/[.]+/).pop(), this.context || base_context);
|
|
13010
|
+
const label = await res[labelPredicate];
|
|
13003
13011
|
return { value, label, selectedValue };
|
|
13004
13012
|
};
|
|
13005
13013
|
this.listAttributes["range"] = await Promise.all(
|
|
@@ -54496,6 +54504,7 @@ const widgetFactory = (tagName, customTemplate, childTemplate = "", callback) =>
|
|
|
54496
54504
|
return cls;
|
|
54497
54505
|
};
|
|
54498
54506
|
export {
|
|
54507
|
+
BaseWidgetMixin,
|
|
54499
54508
|
CounterMixin,
|
|
54500
54509
|
FederationMixin,
|
|
54501
54510
|
FilterMixin,
|