@fluid-topics/ft-viewer 2.2.33 → 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.
- package/build/asset/ft-asset-viewer-context.d.ts +1 -0
- package/build/asset/ft-asset-viewer-context.js +6 -1
- package/build/ft-viewer.light.js +169 -169
- package/build/ft-viewer.min.js +161 -161
- package/build/ud/ft-ud-viewer-context.d.ts +1 -0
- package/build/ud/ft-ud-viewer-context.js +5 -0
- package/package.json +17 -17
|
@@ -12,5 +12,6 @@ export declare class FtAssetViewerContext extends FtLitElementRedux implements F
|
|
|
12
12
|
protected willUpdate(props: PropertyValues<FtAssetViewerContext>): void;
|
|
13
13
|
load(): Promise<void>;
|
|
14
14
|
connectedCallback(): void;
|
|
15
|
+
disconnectedCallback(): void;
|
|
15
16
|
onAuthenticationChange(): void;
|
|
16
17
|
}
|
|
@@ -11,7 +11,7 @@ import { assetViewerStateManagerContext } from "./components/registration";
|
|
|
11
11
|
import { FtAssetViewerStateManager } from "./model/FtAssetViewerStateManager";
|
|
12
12
|
import { property } from "lit/decorators.js";
|
|
13
13
|
import { dispatchViewerLoadError, FtViewerLoadedEvent, } from "../common";
|
|
14
|
-
import { AuthenticationChangeEvent, ftAppInfoStore, } from "@fluid-topics/ft-app-context";
|
|
14
|
+
import { AuthenticationChangeEvent, ftAppInfoStore, ftAppStateManager, } from "@fluid-topics/ft-app-context";
|
|
15
15
|
export class FtAssetViewerContext extends FtLitElementRedux {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
@@ -41,9 +41,14 @@ export class FtAssetViewerContext extends FtLitElementRedux {
|
|
|
41
41
|
}
|
|
42
42
|
connectedCallback() {
|
|
43
43
|
super.connectedCallback();
|
|
44
|
+
ftAppStateManager.knownContexts.register(this);
|
|
44
45
|
this.addStore(ftAppInfoStore);
|
|
45
46
|
this.load();
|
|
46
47
|
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
super.disconnectedCallback();
|
|
50
|
+
ftAppStateManager.knownContexts.unregister(this);
|
|
51
|
+
}
|
|
47
52
|
onAuthenticationChange() {
|
|
48
53
|
this.viewerStateManager.reload();
|
|
49
54
|
}
|