@fluid-topics/ft-viewer 2.2.21 → 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.
@@ -1,12 +1,14 @@
1
1
  import { Constructor, FtLitElementRedux } from "@fluid-topics/ft-wc-utils";
2
2
  import { FtViewerComponent } from "../../common/FtViewerComponent";
3
3
  import type { FtAssetViewerStateManager as FtAssetViewerStateManagerInternal } from "../model/FtAssetViewerStateManager";
4
+ import { FtAssetViewerService } from "../model/FtAssetViewerService";
4
5
  export type FtAssetViewerStateManager = FtAssetViewerStateManagerInternal;
5
6
  export declare const assetViewerStateManagerContext: {
6
7
  __context__: FtAssetViewerStateManagerInternal;
7
8
  };
8
9
  export interface FtAssetViewerComponentInterface extends FtViewerComponent {
9
10
  viewerStateManager?: FtAssetViewerStateManager;
11
+ service?: FtAssetViewerService;
10
12
  }
11
13
  export type FtAssetViewerComponentType<T extends Constructor<FtLitElementRedux>> = T & Constructor<FtAssetViewerComponentInterface>;
12
14
  export declare const toFtAssetViewerComponent: <T extends Constructor<FtLitElementRedux>>(c: T) => FtAssetViewerComponentType<T>;
@@ -31,6 +31,10 @@ export const toFtAssetViewerComponent = applyMixinOnce(Symbol("toFtAssetViewerCo
31
31
  super.disconnectedCallback();
32
32
  this.removeStore("viewer");
33
33
  }
34
+ get service() {
35
+ var _a;
36
+ return (_a = this.viewerStateManager) === null || _a === void 0 ? void 0 : _a.service;
37
+ }
34
38
  }
35
39
  __decorate([
36
40
  consume({ context: assetViewerStateManagerContext, subscribe: true }),
@@ -8,7 +8,7 @@ export declare class FtAssetViewerContext extends FtLitElementRedux implements F
8
8
  assetId?: string;
9
9
  origin?: FtViewerFileOrigin;
10
10
  viewerStateManager: FtAssetViewerStateManager;
11
- protected render(): import("lit-html").TemplateResult<1>;
11
+ protected render(): import("lit").TemplateResult<1>;
12
12
  protected willUpdate(props: PropertyValues<FtAssetViewerContext>): void;
13
13
  load(): Promise<void>;
14
14
  connectedCallback(): void;
@@ -3,4 +3,5 @@ import { FtViewerFileOrigin } from "../../common";
3
3
  import { FtAssetDescriptor } from "@fluid-topics/public-api";
4
4
  export declare class FtAssetViewerService extends FtServiceWithCache {
5
5
  getAsset(mapId: string, assetId: string, origin: FtViewerFileOrigin): Promise<FtAssetDescriptor>;
6
+ makeAbsolute(endpoint: string): string;
6
7
  }
@@ -9,4 +9,7 @@ export class FtAssetViewerService extends FtServiceWithCache {
9
9
  };
10
10
  return this.cache.get(assetId, loaders[origin]);
11
11
  }
12
+ makeAbsolute(endpoint) {
13
+ return this.api.makeAbsolute(endpoint);
14
+ }
12
15
  }
@@ -14,7 +14,7 @@ export declare class FtViewerContent extends FtViewerContent_base {
14
14
  rotation: number;
15
15
  watermark?: FtWatermark;
16
16
  static styles: import("lit").CSSResult;
17
- protected render(): import("lit-html").TemplateResult<1>;
17
+ protected render(): import("lit").TemplateResult<1>;
18
18
  private renderContent;
19
19
  /***************************************
20
20
  * Image/SVG viewer *
@@ -28,22 +28,22 @@ export declare class FtViewerContent extends FtViewerContent_base {
28
28
  imageHeight?: number;
29
29
  imageWidth?: number;
30
30
  svgContent?: string;
31
- protected renderImageViewer(): import("lit-html").TemplateResult<1>;
31
+ protected renderImageViewer(): import("lit").TemplateResult<1>;
32
32
  protected onImageLoad(): void;
33
33
  protected onSvgLoad(): void;
34
34
  private getImageToViewerRatio;
35
35
  /***************************************
36
36
  * Video viewer *
37
37
  ***************************************/
38
- protected renderVideoViewer(): import("lit-html").TemplateResult<1>;
38
+ protected renderVideoViewer(): import("lit").TemplateResult<1>;
39
39
  /***************************************
40
40
  * PDF viewer *
41
41
  ***************************************/
42
- protected renderPdfViewer(): import("lit-html").TemplateResult<1>;
42
+ protected renderPdfViewer(): import("lit").TemplateResult<1>;
43
43
  /***************************************
44
44
  * Iframe viewer *
45
45
  ***************************************/
46
- protected renderIframeViewer(url: string | undefined): import("lit-html").TemplateResult<1>;
46
+ protected renderIframeViewer(url: string | undefined): import("lit").TemplateResult<1>;
47
47
  protected willUpdate(props: PropertyValues<FtViewerContent>): void;
48
48
  protected updated(props: PropertyValues<FtViewerContent>): void;
49
49
  protected contentAvailableCallback(props: PropertyValues<FtViewerContent>): void;
@@ -5,5 +5,5 @@ export declare class FtViewerDisplayName extends FtViewerComponent {
5
5
  static elementDefinitions: ElementDefinitionsMap;
6
6
  static styles: import("lit").CSSResult;
7
7
  private displayName?;
8
- render(): typeof nothing | import("lit-html").TemplateResult<1>;
8
+ render(): typeof nothing | import("lit").TemplateResult<1>;
9
9
  }
@@ -5,5 +5,5 @@ export declare class FtViewerDocumentTitle extends FtViewerComponent {
5
5
  static elementDefinitions: ElementDefinitionsMap;
6
6
  static styles: import("lit").CSSResult;
7
7
  private documentTitle?;
8
- render(): typeof nothing | import("lit-html").TemplateResult<1>;
8
+ render(): typeof nothing | import("lit").TemplateResult<1>;
9
9
  }
@@ -5,5 +5,5 @@ export declare class FtViewerFilename extends FtViewerComponent {
5
5
  static elementDefinitions: ElementDefinitionsMap;
6
6
  static styles: import("lit").CSSResult;
7
7
  private filename?;
8
- render(): typeof nothing | import("lit-html").TemplateResult<1>;
8
+ render(): typeof nothing | import("lit").TemplateResult<1>;
9
9
  }
@@ -5,5 +5,5 @@ export declare class FtViewerMimeTypeIcon extends FtViewerComponent {
5
5
  static elementDefinitions: ElementDefinitionsMap;
6
6
  mimeType?: string;
7
7
  filename?: string;
8
- render(): typeof nothing | import("lit-html").TemplateResult<1>;
8
+ render(): typeof nothing | import("lit").TemplateResult<1>;
9
9
  }
@@ -10,5 +10,5 @@ export type FtViewerReduxStore = FtReduxStore<FtViewerState, FtViewerStateReduce
10
10
  export declare const createViewerStore: (id: string) => FtReduxStore<FtViewerState, {
11
11
  setZoom: (state: FtViewerState, action: PayloadAction<FtViewerState["contentModifiers"]["zoom"]>) => void;
12
12
  setRotation: (state: FtViewerState, action: PayloadAction<FtViewerState["contentModifiers"]["rotation"]>) => void;
13
- }, import("redux").UnknownAction>;
13
+ }, import("@reduxjs/toolkit").UnknownAction>;
14
14
  export {};