@fluid-topics/ft-reader-context 2.2.20 → 2.2.21
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.
|
@@ -70,8 +70,8 @@ export class FtReaderStateManager {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
async resolvePage(tocId, pageNumber) {
|
|
73
|
-
var _a;
|
|
74
|
-
var
|
|
73
|
+
var _a, _b;
|
|
74
|
+
var _c;
|
|
75
75
|
const service = await this.awaitService();
|
|
76
76
|
if (pageNumber) {
|
|
77
77
|
return service.getPage(pageNumber, this.getTranslationSettings());
|
|
@@ -79,10 +79,10 @@ export class FtReaderStateManager {
|
|
|
79
79
|
if (!tocId) {
|
|
80
80
|
return service.getPageByTocId("root", this.getTranslationSettings());
|
|
81
81
|
}
|
|
82
|
-
const maybeFilteredTopic = this.store.getState().filteredTocNodes[tocId];
|
|
83
|
-
const nodeIsInToc = ((
|
|
82
|
+
const maybeFilteredTopic = (_a = this.store.getState().filteredTocNodes) === null || _a === void 0 ? void 0 : _a[tocId];
|
|
83
|
+
const nodeIsInToc = ((_b = this.service) === null || _b === void 0 ? void 0 : _b.getTocNodeNow(tocId)) != null;
|
|
84
84
|
if (maybeFilteredTopic && maybeFilteredTopic.reason !== "ACCESS_RIGHTS_FILTER" && !nodeIsInToc) {
|
|
85
|
-
return service.getPageByTocId((
|
|
85
|
+
return service.getPageByTocId((_c = maybeFilteredTopic.closestParent) !== null && _c !== void 0 ? _c : "root", this.getTranslationSettings());
|
|
86
86
|
}
|
|
87
87
|
return service.getPageByTocId(tocId, this.getTranslationSettings());
|
|
88
88
|
}
|
|
@@ -82,8 +82,9 @@ export class FtReaderService extends FtServiceWithCache {
|
|
|
82
82
|
return enrichedToc.translationError;
|
|
83
83
|
}
|
|
84
84
|
async getFilteredTocNodes(translationSettings) {
|
|
85
|
+
var _a;
|
|
85
86
|
const enrichedToc = await this.getEnrichedToc(translationSettings);
|
|
86
|
-
return enrichedToc.filteredTocNodes;
|
|
87
|
+
return (_a = enrichedToc.filteredTocNodes) !== null && _a !== void 0 ? _a : {};
|
|
87
88
|
}
|
|
88
89
|
async getTocNode(tocId, translationSettings) {
|
|
89
90
|
const enrichedToc = await this.getEnrichedToc(translationSettings);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-context",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.21",
|
|
4
4
|
"description": "Context block for integrated reader components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "2.2.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "2.2.
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.2.21",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "2.2.21",
|
|
24
24
|
"lit": "3.3.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@fluid-topics/public-api": "1.0.143"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "633b6db0fae9f56c46c4211bf5bce2c73ef31ecb"
|
|
30
30
|
}
|