@fluid-topics/ft-reader-context 1.2.20 → 1.2.22

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.
@@ -14,6 +14,7 @@ export declare class FtReaderStateManager {
14
14
  constructor(store: FtReaderReduxStore, serviceProvider: () => Promise<FtReaderService>, clusteringHelperProvider?: (() => ClusteringHelper) | undefined);
15
15
  initService(serviceProvider: () => Promise<FtReaderService>): Promise<void>;
16
16
  setMapId(mapId?: string): Promise<void>;
17
+ setRenderedTopics(tocIds: string[]): void;
17
18
  setVisibleTopics(tocIds: string[]): void;
18
19
  awaitService(): Promise<FtReaderService>;
19
20
  navigateToTopic(tocId?: string, section?: string, pageNumber?: number): Promise<void>;
@@ -31,6 +31,9 @@ export class FtReaderStateManager {
31
31
  await this.reload();
32
32
  }
33
33
  }
34
+ setRenderedTopics(tocIds) {
35
+ this.store.actions.renderedTopics(tocIds);
36
+ }
34
37
  setVisibleTopics(tocIds) {
35
38
  this.store.actions.visibleTopics(tocIds);
36
39
  }
@@ -80,6 +83,8 @@ export class FtReaderStateManager {
80
83
  this.store.actions.currentPage(undefined);
81
84
  this.store.actions.searchInDocumentQuery("");
82
85
  this.store.actions.relatives(undefined);
86
+ this.store.actions.renderedTopics([]);
87
+ this.store.actions.visibleTopics([]);
83
88
  (_a = this.service) === null || _a === void 0 ? void 0 : _a.clear();
84
89
  this.clusteringHelper = undefined;
85
90
  }
@@ -35,6 +35,7 @@ export interface FtReaderState {
35
35
  paginationConfiguration: Optional<FtPaginationConfiguration>;
36
36
  currentPage: Optional<FtReaderPage>;
37
37
  scrollTarget: Optional<FtReaderScrollTarget>;
38
+ renderedTopics: string[];
38
39
  visibleTopics: string[];
39
40
  configuration: Optional<FtReaderConfiguration>;
40
41
  searchInDocumentQuery: Optional<string>;
@@ -3,6 +3,7 @@ export const createReaderStore = (id) => FtReduxStore.get({
3
3
  name: "ft-reader-" + id,
4
4
  initialState: {
5
5
  mapId: undefined,
6
+ renderedTopics: [],
6
7
  visibleTopics: [],
7
8
  map: undefined,
8
9
  toc: undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "Context block for integrated reader components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,13 +19,13 @@
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": "1.2.20",
23
- "@fluid-topics/ft-wc-utils": "1.2.20",
22
+ "@fluid-topics/ft-app-context": "1.2.22",
23
+ "@fluid-topics/ft-wc-utils": "1.2.22",
24
24
  "@reduxjs/toolkit": "^1.6.2",
25
25
  "lit": "3.1.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@fluid-topics/public-api": "1.0.81"
28
+ "@fluid-topics/public-api": "1.0.82"
29
29
  },
30
- "gitHead": "4bd72b4e7b35120c6afe320c6be252f7e7641982"
30
+ "gitHead": "29f6269b3af8af4c82f5ab2228d52b493ac3ddea"
31
31
  }