@vouchfor/embeds 0.0.0-experiment.5a1b42c → 0.0.0-experiment.5d16720
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/components/Embed/controllers/event-forwarder.d.ts +14 -0
- package/dist/es/components/Embed/controllers/fetcher.d.ts +20 -0
- package/dist/es/components/Embed/controllers/tracking.d.ts +28 -0
- package/dist/es/embeds.js +1234 -13
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/index.d.ts +1 -1
- package/dist/es/utils/env.d.ts +18 -0
- package/dist/es/utils/events.d.ts +2 -0
- package/dist/iife/embeds.iife.js +259 -176
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +5 -3
- package/src/components/Embed/Embed.stories.ts +79 -0
- package/src/components/Embed/controllers/event-forwarder.ts +47 -0
- package/src/components/Embed/controllers/fetcher.ts +115 -0
- package/src/components/Embed/controllers/tracking.ts +261 -0
- package/src/components/Embed/index.ts +208 -0
- package/src/index.ts +1 -1
- package/src/utils/env.ts +78 -0
- package/src/utils/events.ts +13 -0
- package/dist/es/components/InlineEmbed/index.d.ts +0 -17
- package/src/components/InlineEmbed/InlineEmbed.stories.ts +0 -119
- package/src/components/InlineEmbed/index.ts +0 -24
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { Embed } from '..';
|
2
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
3
|
+
type EmbedHost = ReactiveControllerHost & Embed;
|
4
|
+
declare class EventForwardController implements ReactiveController {
|
5
|
+
host: EmbedHost;
|
6
|
+
private _events;
|
7
|
+
private _cleanup;
|
8
|
+
private _forwardElementRef;
|
9
|
+
constructor(host: EmbedHost, events: string[]);
|
10
|
+
register(): import("lit-html/directive.js").DirectiveResult<typeof import("lit-html/directives/ref.js").RefDirective>;
|
11
|
+
hostConnected(): void;
|
12
|
+
hostDisconnected(): void;
|
13
|
+
}
|
14
|
+
export { EventForwardController };
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { Embed } from '..';
|
2
|
+
import type { TemplateInstance } from '@vouchfor/canvas-video';
|
3
|
+
import type { ReactiveControllerHost } from 'lit';
|
4
|
+
type EmbedHost = ReactiveControllerHost & Embed;
|
5
|
+
declare class FetcherController {
|
6
|
+
host: EmbedHost;
|
7
|
+
private _fetching;
|
8
|
+
private _vouch;
|
9
|
+
private _template;
|
10
|
+
set fetching(value: boolean);
|
11
|
+
get fetching(): boolean;
|
12
|
+
set vouch(value: import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | null | undefined);
|
13
|
+
get vouch(): import("@vouchfor/media-player/dist/src/components/MediaPlayer/types").Vouch | null | undefined;
|
14
|
+
set template(value: TemplateInstance | null);
|
15
|
+
get template(): TemplateInstance | null;
|
16
|
+
private getVouch;
|
17
|
+
private getTemplate;
|
18
|
+
constructor(host: EmbedHost);
|
19
|
+
}
|
20
|
+
export { FetcherController };
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import type { Embed } from '..';
|
2
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
3
|
+
type EmbedHost = ReactiveControllerHost & Embed;
|
4
|
+
declare class TrackingController implements ReactiveController {
|
5
|
+
host: EmbedHost;
|
6
|
+
private _tabId;
|
7
|
+
private _clientId;
|
8
|
+
private _visitorId;
|
9
|
+
private _hasPlayed;
|
10
|
+
private _hasLoaded;
|
11
|
+
private _answersViewed;
|
12
|
+
private _streamedTime;
|
13
|
+
private _streamedPrevTimestamp;
|
14
|
+
constructor(host: EmbedHost);
|
15
|
+
private _findVouchId;
|
16
|
+
private _createVisitor;
|
17
|
+
private _getUids;
|
18
|
+
private _getReportingMetadata;
|
19
|
+
private _sendTrackingEvent;
|
20
|
+
private _handleVouchLoaded;
|
21
|
+
private _handlePlay;
|
22
|
+
private _handleVideoPlay;
|
23
|
+
private _handleVideoTimeUpdate;
|
24
|
+
private _handleVideoPause;
|
25
|
+
hostConnected(): void;
|
26
|
+
hostDisconnected(): void;
|
27
|
+
}
|
28
|
+
export { TrackingController };
|