@fluid-topics/ft-reader-context 2.2.32 → 2.2.34
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.
|
@@ -9,7 +9,7 @@ import { property, query, } from "lit/decorators.js";
|
|
|
9
9
|
import { Debouncer, FtLitElementRedux, jsonPropertyConverter, numberProperty, randomId, redux, } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtReaderStateManager } from "./store/FtReaderStateManager";
|
|
11
11
|
import { styles } from "./ft-reader-context.styles";
|
|
12
|
-
import { AuthenticationChangeEvent, ftAppInfoStore, userAssetsActions, } from "@fluid-topics/ft-app-context";
|
|
12
|
+
import { AuthenticationChangeEvent, ftAppInfoStore, ftAppStateManager, userAssetsActions, } from "@fluid-topics/ft-app-context";
|
|
13
13
|
import { ForbiddenErrorEvent, LoadErrorEvent, MapLoadedEvent, NavigationDoneEvent, NotFoundErrorEvent, TopicRelativeNotFoundEvent, UnauthorizedErrorEvent, VisibleTopicsChangeEvent, } from "./models";
|
|
14
14
|
import { FtSearchContext } from "@fluid-topics/ft-search-context";
|
|
15
15
|
class FluidTopicsReaderServiceImpl {
|
|
@@ -89,6 +89,7 @@ export class FtReaderContext extends FtLitElementRedux {
|
|
|
89
89
|
}
|
|
90
90
|
connectedCallback() {
|
|
91
91
|
super.connectedCallback();
|
|
92
|
+
ftAppStateManager.knownContexts.register(this);
|
|
92
93
|
this.stateManager.setMapId(this.mapId);
|
|
93
94
|
this.stateManager.awaitService().then((service) => {
|
|
94
95
|
const fontsStylesheet = service.fontsStylesheet();
|
|
@@ -104,6 +105,7 @@ export class FtReaderContext extends FtLitElementRedux {
|
|
|
104
105
|
}
|
|
105
106
|
disconnectedCallback() {
|
|
106
107
|
super.disconnectedCallback();
|
|
108
|
+
ftAppStateManager.knownContexts.unregister(this);
|
|
107
109
|
ftAppInfoStore.addEventListener(AuthenticationChangeEvent.eventName, this.updateConfiguration);
|
|
108
110
|
}
|
|
109
111
|
update(props) {
|
|
@@ -197,8 +199,10 @@ export class FtReaderContext extends FtLitElementRedux {
|
|
|
197
199
|
});
|
|
198
200
|
}
|
|
199
201
|
registerComponent(e) {
|
|
202
|
+
var _a;
|
|
203
|
+
var _b;
|
|
200
204
|
e.stopPropagation();
|
|
201
|
-
const component = e.composedPath()[0];
|
|
205
|
+
const component = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.target) !== null && _b !== void 0 ? _b : e.composedPath()[0];
|
|
202
206
|
this.register(component);
|
|
203
207
|
}
|
|
204
208
|
register(component) {
|