@fluid-topics/ft-reader-context 2.2.20 → 2.2.24
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/build/ft-reader-context.d.ts +1 -1
- package/build/ft-reader-context.js +12 -6
- package/build/ft-reader-context.light.js +18 -23
- package/build/ft-reader-context.min.js +54 -52
- package/build/store/FtReaderStateManager.js +5 -5
- package/build/store/redux.d.ts +1 -1
- package/build/store/utils/FtOfficialReaderService.d.ts +1 -1
- package/build/store/utils/FtOfficialReaderService.js +2 -2
- package/build/store/utils/FtReaderService.d.ts +2 -2
- package/build/store/utils/FtReaderService.js +4 -3
- package/package.json +7 -5
|
@@ -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
|
}
|
package/build/store/redux.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export declare const createReaderStore: (id: string) => FtReduxStore<FtReaderSta
|
|
|
18
18
|
setTranslationLoading: (state: FtReaderState, action: PayloadAction<FtReaderState["translation"]["isLoading"]>) => void;
|
|
19
19
|
setTranslationError: (state: FtReaderState, action: PayloadAction<FtReaderState["translation"]["isError"]>) => void;
|
|
20
20
|
setTopicsRating: (state: FtReaderState, action: PayloadAction<FtReaderState["topicsRating"]>) => void;
|
|
21
|
-
}, import("
|
|
21
|
+
}, import("@reduxjs/toolkit").UnknownAction>;
|
|
22
22
|
export {};
|
|
@@ -17,7 +17,7 @@ export declare class FtOfficialReaderService extends FtReaderService {
|
|
|
17
17
|
protected makeMapFeedbackRequest(message: string, from?: string): Promise<void>;
|
|
18
18
|
protected makeRateMapRequest(type: FtRatingType | FtRatingTypeKeys, value: number): Promise<void>;
|
|
19
19
|
protected makeRateTopicRequest(tocId: string, type: FtRatingType | FtRatingTypeKeys, value: number): Promise<void>;
|
|
20
|
-
protected makeTopicFeedbackRequest(tocId: string, message: string, from?: string): Promise<void>;
|
|
20
|
+
protected makeTopicFeedbackRequest(tocId: string, message: string, from?: string, metadataFilters?: FtMetadataFilter[]): Promise<void>;
|
|
21
21
|
protected makeUnrateMapRequest(): Promise<void>;
|
|
22
22
|
protected makeUnrateTopicRequest(tocId: string): Promise<void>;
|
|
23
23
|
protected getReaderLinkPrefix(): string;
|
|
@@ -88,8 +88,8 @@ export class FtOfficialReaderService extends FtReaderService {
|
|
|
88
88
|
makeRateTopicRequest(tocId, type, value) {
|
|
89
89
|
return this.api.rateTopic(this.mapId, tocId, type, value);
|
|
90
90
|
}
|
|
91
|
-
makeTopicFeedbackRequest(tocId, message, from) {
|
|
92
|
-
return this.api.sendTopicFeedback(this.mapId, tocId, message, from);
|
|
91
|
+
makeTopicFeedbackRequest(tocId, message, from, metadataFilters) {
|
|
92
|
+
return this.api.sendTopicFeedback(this.mapId, tocId, message, from, metadataFilters);
|
|
93
93
|
}
|
|
94
94
|
makeUnrateMapRequest() {
|
|
95
95
|
return this.api.unrateMap(this.mapId);
|
|
@@ -20,7 +20,7 @@ export declare abstract class FtReaderService extends FtServiceWithCache {
|
|
|
20
20
|
protected abstract makeMapFeedbackRequest(message: string, from?: string): Promise<void>;
|
|
21
21
|
protected abstract makeRateTopicRequest(tocId: string, type: FtRatingType | FtRatingTypeKeys, value: number): Promise<void>;
|
|
22
22
|
protected abstract makeUnrateTopicRequest(tocId: string): Promise<void>;
|
|
23
|
-
protected abstract makeTopicFeedbackRequest(tocId: string, message: string, from?: string): Promise<void>;
|
|
23
|
+
protected abstract makeTopicFeedbackRequest(tocId: string, message: string, from?: string, metadataFilters?: FtMetadataFilter[]): Promise<void>;
|
|
24
24
|
protected abstract getReaderLinkPrefix(): string;
|
|
25
25
|
protected abstract isFeatureAvailable(feature: FtReaderFeatures): boolean;
|
|
26
26
|
private _mapId;
|
|
@@ -73,7 +73,7 @@ export declare abstract class FtReaderService extends FtServiceWithCache {
|
|
|
73
73
|
rateTopic(tocId: string, type: FtRatingType | FtRatingTypeKeys, value: number): Promise<void>;
|
|
74
74
|
unrateTopic(tocId: string): Promise<void>;
|
|
75
75
|
private clearRatingIfNecessary;
|
|
76
|
-
sendTopicFeedback(tocId: string, message: string, from?: string): Promise<void>;
|
|
76
|
+
sendTopicFeedback(tocId: string, message: string, from?: string, metadataFilters?: FtMetadataFilter[]): Promise<void>;
|
|
77
77
|
fontsStylesheet(): string;
|
|
78
78
|
themeStylesheet(): string;
|
|
79
79
|
buildBreadcrumb(tocId: string, translationInput?: FtTranslationSettings): Array<FtReaderBreadcrumb>;
|
|
@@ -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);
|
|
@@ -225,8 +226,8 @@ export class FtReaderService extends FtServiceWithCache {
|
|
|
225
226
|
this.cache.clear("ratingSummary");
|
|
226
227
|
}
|
|
227
228
|
}
|
|
228
|
-
sendTopicFeedback(tocId, message, from) {
|
|
229
|
-
return this.makeTopicFeedbackRequest(tocId, message, from);
|
|
229
|
+
sendTopicFeedback(tocId, message, from, metadataFilters) {
|
|
230
|
+
return this.makeTopicFeedbackRequest(tocId, message, from, metadataFilters);
|
|
230
231
|
}
|
|
231
232
|
fontsStylesheet() {
|
|
232
233
|
return this.api.makeAbsolute(this.api.endpoints.stylesheets.fonts);
|
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.24",
|
|
4
4
|
"description": "Context block for integrated reader components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,14 @@
|
|
|
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-
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.2.24",
|
|
23
|
+
"@fluid-topics/ft-search-context": "2.2.24",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.2.24",
|
|
25
|
+
"@reduxjs/toolkit": "2.12.0",
|
|
24
26
|
"lit": "3.3.3"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"@fluid-topics/public-api": "1.0.
|
|
29
|
+
"@fluid-topics/public-api": "1.0.144"
|
|
28
30
|
},
|
|
29
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "bd579348499e7551334af2e9dda560b9d05b3e41"
|
|
30
32
|
}
|