@streamscloud/embeddable 3.0.0 → 3.1.0
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/dist/short-videos/short-video-viewer/mapper.js +3 -1
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +4 -0
- package/dist/short-videos/short-video-viewer/operations.generated.js +6 -0
- package/dist/short-videos/short-video-viewer/operations.graphql +4 -0
- package/dist/short-videos/short-video-viewer/types.d.ts +2 -0
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +2 -2
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +0 -1
- package/dist/short-videos/short-videos-player/operations.generated.d.ts +4 -0
- package/dist/short-videos/short-videos-player/operations.generated.js +6 -0
- package/package.json +1 -1
|
@@ -51,6 +51,8 @@ const mapToShortVideoViewerProductModel = (payload) => {
|
|
|
51
51
|
link: payload.link,
|
|
52
52
|
currency: payload.priceAndAvailability.currency,
|
|
53
53
|
price: payload.priceAndAvailability.price,
|
|
54
|
-
salePrice: effectiveSalePrice?.salePrice ?? null
|
|
54
|
+
salePrice: effectiveSalePrice?.salePrice ?? null,
|
|
55
|
+
brandName: payload.brand?.name ?? null,
|
|
56
|
+
shortDescription: payload.shortDescription ?? null
|
|
55
57
|
};
|
|
56
58
|
};
|
|
@@ -13,11 +13,15 @@ export type ShortVideoViewerPayloadFragment = {
|
|
|
13
13
|
title: string;
|
|
14
14
|
id: string;
|
|
15
15
|
link: string | null;
|
|
16
|
+
shortDescription: string | null;
|
|
16
17
|
media: Array<{
|
|
17
18
|
url: string;
|
|
18
19
|
thumbnailUrl: string | null;
|
|
19
20
|
type: SchemaTypes.MediaType;
|
|
20
21
|
}>;
|
|
22
|
+
brand: {
|
|
23
|
+
name: string;
|
|
24
|
+
} | null;
|
|
21
25
|
priceAndAvailability: {
|
|
22
26
|
currency: SchemaTypes.Currency;
|
|
23
27
|
price: number;
|
|
@@ -44,6 +44,12 @@ export const ShortVideoViewerPayloadFragmentDoc = {
|
|
|
44
44
|
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
45
45
|
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
46
46
|
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
47
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
|
|
48
|
+
{
|
|
49
|
+
kind: 'Field',
|
|
50
|
+
name: { kind: 'Name', value: 'brand' },
|
|
51
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
|
|
52
|
+
},
|
|
47
53
|
{
|
|
48
54
|
kind: 'Field',
|
|
49
55
|
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
@@ -19,7 +19,7 @@ import { GetShortVideosDocument } from './operations.generated';
|
|
|
19
19
|
import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
20
20
|
import { ShortVideosPlayerUiManager } from './ui-manager.svelte';
|
|
21
21
|
import { onMount, untrack } from 'svelte';
|
|
22
|
-
let { input, localization: localizationInit,
|
|
22
|
+
let { input, localization: localizationInit, on } = $props();
|
|
23
23
|
const localization = $derived(new ShortVideosPlayerLocalization(localizationInit));
|
|
24
24
|
let everTouched = $state(false);
|
|
25
25
|
let buffer = $state(input.type === 'provider' ? new PlayerBuffer(input.provider) : null);
|
|
@@ -35,7 +35,7 @@ const initBuffer = (input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
35
35
|
var _a, _b;
|
|
36
36
|
try {
|
|
37
37
|
const { graphqlOrigin, ids, initialId } = input;
|
|
38
|
-
const graphql = createLocalGQLClient(graphqlOrigin, { 'x-initiator': initiator || 'player/short-videos' });
|
|
38
|
+
const graphql = createLocalGQLClient(graphqlOrigin, { 'x-initiator': input.initiator || 'player/short-videos' });
|
|
39
39
|
const payload = yield graphql
|
|
40
40
|
.query(GetShortVideosDocument, {
|
|
41
41
|
input: {
|
|
@@ -19,11 +19,15 @@ export type GetShortVideosQuery = {
|
|
|
19
19
|
title: string;
|
|
20
20
|
id: string;
|
|
21
21
|
link: string | null;
|
|
22
|
+
shortDescription: string | null;
|
|
22
23
|
media: Array<{
|
|
23
24
|
url: string;
|
|
24
25
|
thumbnailUrl: string | null;
|
|
25
26
|
type: SchemaTypes.MediaType;
|
|
26
27
|
}>;
|
|
28
|
+
brand: {
|
|
29
|
+
name: string;
|
|
30
|
+
} | null;
|
|
27
31
|
priceAndAvailability: {
|
|
28
32
|
currency: SchemaTypes.Currency;
|
|
29
33
|
price: number;
|
|
@@ -86,6 +86,12 @@ export const GetShortVideosDocument = {
|
|
|
86
86
|
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
87
87
|
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
88
88
|
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
89
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
|
|
90
|
+
{
|
|
91
|
+
kind: 'Field',
|
|
92
|
+
name: { kind: 'Name', value: 'brand' },
|
|
93
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
|
|
94
|
+
},
|
|
89
95
|
{
|
|
90
96
|
kind: 'Field',
|
|
91
97
|
name: { kind: 'Name', value: 'priceAndAvailability' },
|