@startinblox/core 0.18.0 → 0.18.1
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/libs/store/store.js +18 -15
- package/package.json +1 -1
package/dist/libs/store/store.js
CHANGED
|
@@ -573,7 +573,10 @@ class CustomGetter {
|
|
|
573
573
|
this.parentId = parentId;
|
|
574
574
|
this.resource = this.expandProperties({
|
|
575
575
|
...resource
|
|
576
|
-
},
|
|
576
|
+
}, {
|
|
577
|
+
...serverContext,
|
|
578
|
+
...clientContext
|
|
579
|
+
});
|
|
577
580
|
this.resourceId = resourceId;
|
|
578
581
|
this.serverPagination = serverPagination;
|
|
579
582
|
this.serverSearch = serverSearch;
|
|
@@ -617,8 +620,8 @@ class CustomGetter {
|
|
|
617
620
|
if (!this.isFullResource()) {
|
|
618
621
|
// if resource is not complete, fetch it first
|
|
619
622
|
await this.getResource(this.resourceId, {
|
|
620
|
-
...this.
|
|
621
|
-
...this.
|
|
623
|
+
...this.serverContext,
|
|
624
|
+
...this.clientContext
|
|
622
625
|
}, this.parentId);
|
|
623
626
|
}
|
|
624
627
|
while (true) {
|
|
@@ -635,15 +638,15 @@ class CustomGetter {
|
|
|
635
638
|
// end of the path
|
|
636
639
|
if (!value || !value['@id']) return value; // no value or not a resource
|
|
637
640
|
return await this.getResource(value['@id'], {
|
|
638
|
-
...this.
|
|
639
|
-
...this.
|
|
641
|
+
...this.serverContext,
|
|
642
|
+
...this.clientContext
|
|
640
643
|
}, this.parentId || this.resourceId); // return complete resource
|
|
641
644
|
}
|
|
642
645
|
|
|
643
646
|
if (!value) return undefined;
|
|
644
647
|
let resource = await this.getResource(value['@id'], {
|
|
645
|
-
...this.
|
|
646
|
-
...this.
|
|
648
|
+
...this.serverContext,
|
|
649
|
+
...this.clientContext
|
|
647
650
|
}, this.parentId || this.resourceId);
|
|
648
651
|
store.subscribeResourceTo(this.resourceId, value['@id']);
|
|
649
652
|
return resource ? await resource[path2.join('.')] : undefined; // return value
|
|
@@ -733,8 +736,8 @@ class CustomGetter {
|
|
|
733
736
|
if (!permissions) {
|
|
734
737
|
// if no permission, re-fetch data
|
|
735
738
|
await this.getResource(this.resourceId, {
|
|
736
|
-
...this.
|
|
737
|
-
...this.
|
|
739
|
+
...this.serverContext,
|
|
740
|
+
...this.clientContext
|
|
738
741
|
}, this.parentId, true);
|
|
739
742
|
permissions = this.resource[permissionPredicate];
|
|
740
743
|
}
|
|
@@ -749,20 +752,20 @@ class CustomGetter {
|
|
|
749
752
|
}
|
|
750
753
|
getExpandedPredicate(property) {
|
|
751
754
|
return ContextParser.expandTerm(property, {
|
|
752
|
-
...this.
|
|
753
|
-
...this.
|
|
755
|
+
...this.serverContext,
|
|
756
|
+
...this.clientContext
|
|
754
757
|
}, true);
|
|
755
758
|
}
|
|
756
759
|
getCompactedPredicate(property) {
|
|
757
760
|
return ContextParser.compactIri(property, {
|
|
758
|
-
...this.
|
|
759
|
-
...this.
|
|
761
|
+
...this.serverContext,
|
|
762
|
+
...this.clientContext
|
|
760
763
|
}, true);
|
|
761
764
|
}
|
|
762
765
|
getCompactedIri(id) {
|
|
763
766
|
return ContextParser.compactIri(id, {
|
|
764
|
-
...this.
|
|
765
|
-
...this.
|
|
767
|
+
...this.serverContext,
|
|
768
|
+
...this.clientContext
|
|
766
769
|
});
|
|
767
770
|
}
|
|
768
771
|
toString() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/core",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "This is a series of web component respecting both the web components standards and the Linked Data Platform convention.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|