@streamscloud/embeddable 2.5.0 → 2.6.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/core/locale.d.ts +6 -0
- package/dist/core/locale.js +24 -0
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +2 -2
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +3 -2
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +3 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +3 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +3 -2
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/index.d.ts +3 -2
- package/dist/short-videos/short-video-viewer/{short-video-attachments-localization.svelte.d.ts → short-video-attachments-localization.d.ts} +5 -4
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +21 -0
- package/dist/short-videos/short-video-viewer/{short-video-details-localization.svelte.d.ts → short-video-details-localization.d.ts} +7 -6
- package/dist/short-videos/short-video-viewer/short-video-details-localization.js +17 -0
- package/dist/short-videos/short-video-viewer/{short-video-product-localization.svelte.d.ts → short-video-product-localization.d.ts} +2 -1
- package/dist/short-videos/short-video-viewer/short-video-product-localization.js +13 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +14 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.js +17 -0
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +7 -3
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +3 -2
- package/dist/short-videos/short-videos-player/controls.svelte +2 -2
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
- package/dist/short-videos/short-videos-player/index.d.ts +1 -1
- package/dist/short-videos/short-videos-player/index.js +2 -1
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +16 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +13 -0
- package/dist/short-videos/short-videos-player/types.d.ts +3 -3
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +2 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +1 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +3 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +50 -29
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +3 -2
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +4 -2
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +3 -0
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +74 -0
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +11 -0
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +10 -7
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +3 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +6 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +2 -0
- package/dist/streams/layout/element-views/index.d.ts +5 -2
- package/dist/streams/layout/element-views/index.js +1 -0
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +13 -0
- package/dist/streams/layout/element-views/price-stream-element-localization.js +21 -0
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +9 -0
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +7 -0
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +8 -0
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +26 -0
- package/dist/streams/layout/element-views/stream-element-localization.d.ts +15 -0
- package/dist/streams/layout/element-views/stream-element-localization.js +11 -0
- package/dist/streams/layout/elements.d.ts +14 -3
- package/dist/streams/layout/elements.js +1 -1
- package/dist/streams/layout/enums.d.ts +8 -1
- package/dist/streams/layout/enums.js +9 -1
- package/dist/streams/layout/serializer.svelte.js +7 -0
- package/dist/streams/layout/styles.d.ts +4 -0
- package/dist/streams/layout/type-guards.d.ts +4 -2
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +4 -2
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +3 -0
- package/dist/streams/stream-page-viewer/index.d.ts +1 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +9 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +7 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte +4 -2
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +3 -2
- package/dist/streams/stream-player/controls.svelte +46 -3
- package/dist/streams/stream-player/controls.svelte.d.ts +1 -1
- package/dist/streams/stream-player/index.d.ts +2 -2
- package/dist/streams/stream-player/index.js +2 -1
- package/dist/streams/stream-player/stream-overview.svelte +2 -2
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -1
- package/dist/streams/stream-player/stream-player-localization.d.ts +26 -0
- package/dist/streams/stream-player/stream-player-localization.js +31 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +2 -2
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +3 -2
- package/dist/ui/line-clamp/index.d.ts +1 -1
- package/dist/ui/line-clamp/index.js +1 -1
- package/dist/ui/line-clamp/{line-clamp-localization.svelte.d.ts → line-clamp-localization.d.ts} +2 -1
- package/dist/ui/line-clamp/line-clamp-localization.js +19 -0
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +1 -1
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +3 -2
- package/dist/ui/swipe-indicator/index.d.ts +1 -1
- package/dist/ui/swipe-indicator/{swipe-indicator-localization.svelte.d.ts → swipe-indicator-localization.d.ts} +2 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +13 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte +1 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +3 -2
- package/dist/ui/time-ago/index.d.ts +1 -1
- package/dist/ui/time-ago/{time-ago-localization.svelte.d.ts → time-ago-localization.d.ts} +2 -1
- package/dist/ui/time-ago/time-ago-localization.js +55 -0
- package/package.json +1 -1
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +0 -11
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +0 -13
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +0 -10
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +0 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +0 -6
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +0 -8
- package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +0 -8
- package/dist/streams/layout/element-views/stream-element-localization.svelte.js +0 -6
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +0 -13
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +0 -10
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +0 -12
- package/dist/streams/stream-player/stream-player-localization.svelte.js +0 -10
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +0 -15
- package/dist/ui/swipe-indicator/swipe-indicator-localization.svelte.js +0 -6
- package/dist/ui/time-ago/time-ago-localization.svelte.js +0 -39
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Locale } from '../../../core/locale';
|
|
2
|
+
import { type IPriceStreamElementLocalization } from './price-stream-element-localization';
|
|
2
3
|
import type { PriceStreamElementModel } from '../elements';
|
|
3
4
|
import type { StreamLayoutProductPriceModel } from '../models';
|
|
4
5
|
type Props = {
|
|
5
6
|
model: PriceStreamElementModel;
|
|
6
7
|
data: StreamLayoutProductPriceModel;
|
|
7
|
-
localization
|
|
8
|
+
localization: IPriceStreamElementLocalization | Locale;
|
|
8
9
|
};
|
|
9
10
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
10
11
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script lang="ts">import { ShortVideoViewer } from '../../../short-videos/short-video-viewer';
|
|
2
|
+
import { ShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
2
3
|
import { mapToShortVideoViewerModel } from '../models';
|
|
3
|
-
let { data, on } = $props();
|
|
4
|
+
let { data, localization: localizationInit, on } = $props();
|
|
5
|
+
const localization = $derived(new ShortVideoStreamElementLocalization(localizationInit));
|
|
4
6
|
</script>
|
|
5
7
|
|
|
6
|
-
<ShortVideoViewer model={mapToShortVideoViewerModel(data)} autoplay={false} on={on} />
|
|
8
|
+
<ShortVideoViewer model={mapToShortVideoViewerModel(data)} autoplay={false} localization={localization.shortVideoViewerLocalization} on={on} />
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { Locale } from '../../../core/locale';
|
|
2
|
+
import { type IShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
1
3
|
import { type StreamLayoutShortVideoModel } from '../models';
|
|
2
4
|
type Props = {
|
|
3
5
|
data: StreamLayoutShortVideoModel;
|
|
6
|
+
localization: IShortVideoStreamElementLocalization | Locale;
|
|
4
7
|
on?: {
|
|
5
8
|
progress?: (progress: number) => void;
|
|
6
9
|
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script lang="ts">var _a;
|
|
2
|
+
import { StockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
+
import { StockStreamElementLevel } from '../enums';
|
|
4
|
+
import { mapFlexJustifyContent, transformNumericValue } from '../styles-transformer';
|
|
5
|
+
let { model, heightOverrideDdu, localization: localizationInit } = $props();
|
|
6
|
+
const localization = $derived(new StockStreamElementLocalization(localizationInit));
|
|
7
|
+
const height = $derived(heightOverrideDdu || ((_a = model.styles) === null || _a === void 0 ? void 0 : _a.height) || 16);
|
|
8
|
+
const containerStyles = $derived.by(() => {
|
|
9
|
+
var _a;
|
|
10
|
+
const values = [
|
|
11
|
+
`align-items: center;`,
|
|
12
|
+
`height: ${transformNumericValue(height)}; gap: 1cqi;`,
|
|
13
|
+
`justify-content: ${mapFlexJustifyContent((_a = model.styles) === null || _a === void 0 ? void 0 : _a.horizontalAlign)};`
|
|
14
|
+
];
|
|
15
|
+
return values.join('');
|
|
16
|
+
});
|
|
17
|
+
const dotCustomStyles = $derived.by(() => {
|
|
18
|
+
const values = [`height: ${transformNumericValue(height)};`, `width: ${transformNumericValue(height)};`];
|
|
19
|
+
return values.join('');
|
|
20
|
+
});
|
|
21
|
+
const quantityCustomStyles = $derived.by(() => {
|
|
22
|
+
const values = [`font-size: ${transformNumericValue(height * 0.75)};`];
|
|
23
|
+
return values.join('');
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div class="stock-stream-element" style={containerStyles}>
|
|
28
|
+
<div
|
|
29
|
+
class="stock-stream-element__dot"
|
|
30
|
+
style={dotCustomStyles}
|
|
31
|
+
class:stock-stream-element__dot--high={model.level === StockStreamElementLevel.High}
|
|
32
|
+
class:stock-stream-element__dot--medium={model.level === StockStreamElementLevel.Medium}
|
|
33
|
+
class:stock-stream-element__dot--low={model.level === StockStreamElementLevel.Low}
|
|
34
|
+
class:stock-stream-element__dot--out-of-stock={model.level === StockStreamElementLevel.OutOfStock}>
|
|
35
|
+
|
|
36
|
+
</div>
|
|
37
|
+
<div class="stock-stream-element__quantity" style={quantityCustomStyles}>
|
|
38
|
+
{localization.quantity(model.quantity, [StockStreamElementLevel.Low, StockStreamElementLevel.OutOfStock].includes(model.level))}
|
|
39
|
+
{#if model.textAfter}
|
|
40
|
+
{model.textAfter}
|
|
41
|
+
{/if}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<style>@keyframes fadeIn {
|
|
46
|
+
0% {
|
|
47
|
+
opacity: 1;
|
|
48
|
+
}
|
|
49
|
+
50% {
|
|
50
|
+
opacity: 0.4;
|
|
51
|
+
}
|
|
52
|
+
100% {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.stock-stream-element {
|
|
57
|
+
display: flex;
|
|
58
|
+
}
|
|
59
|
+
.stock-stream-element__dot {
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
}
|
|
62
|
+
.stock-stream-element__dot--high {
|
|
63
|
+
background-color: #0cce6b;
|
|
64
|
+
}
|
|
65
|
+
.stock-stream-element__dot--medium {
|
|
66
|
+
background-color: #ffa62b;
|
|
67
|
+
}
|
|
68
|
+
.stock-stream-element__dot--low {
|
|
69
|
+
background-color: #e71d36;
|
|
70
|
+
}
|
|
71
|
+
.stock-stream-element__dot--out-of-stock {
|
|
72
|
+
border: 1px solid #144ab0;
|
|
73
|
+
background-color: #ffffff;
|
|
74
|
+
}</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Locale } from '../../../core/locale';
|
|
2
|
+
import { type IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
+
import type { StockStreamElementModel } from '../elements';
|
|
4
|
+
type Props = {
|
|
5
|
+
model: StockStreamElementModel;
|
|
6
|
+
heightOverrideDdu?: number;
|
|
7
|
+
localization: IStockStreamElementLocalization | Locale;
|
|
8
|
+
};
|
|
9
|
+
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type Cmp = ReturnType<typeof Cmp>;
|
|
11
|
+
export default Cmp;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<script lang="ts">import { AnnotationStreamElementView, ContainerStreamElementView, ImageRefStreamElementView, ImagesStreamElementView, PriceStreamElementView, ShortVideoStreamElementView, SpacerStreamElementView, TextRefStreamElementView, TextStreamElementView, WebViewStreamElementView } from '.';
|
|
2
|
-
import { StreamElementLocalization } from './stream-element-localization
|
|
1
|
+
<script lang="ts">import { AnnotationStreamElementView, ContainerStreamElementView, ImageRefStreamElementView, ImagesStreamElementView, PriceStreamElementView, ShortVideoStreamElementView, SpacerStreamElementView, StockStreamElementView, TextRefStreamElementView, TextStreamElementView, WebViewStreamElementView } from '.';
|
|
2
|
+
import { StreamElementLocalization } from './stream-element-localization';
|
|
3
3
|
import { StreamComponentDataType, StreamElementStyleDirection, StreamElementType } from '../enums';
|
|
4
|
-
let { model, data, constainerDirection = StreamElementStyleDirection.Vertical, localization:
|
|
5
|
-
const localization = $derived(new StreamElementLocalization(
|
|
4
|
+
let { model, data, constainerDirection = StreamElementStyleDirection.Vertical, localization: localizationInit, on } = $props();
|
|
5
|
+
const localization = $derived(new StreamElementLocalization(localizationInit));
|
|
6
6
|
const shortVideoModel = $derived.by(() => {
|
|
7
7
|
if (!data) {
|
|
8
8
|
return null;
|
|
@@ -44,9 +44,7 @@ const productModel = $derived.by(() => {
|
|
|
44
44
|
{#if model.type === StreamElementType.Annotation}
|
|
45
45
|
<AnnotationStreamElementView model={model} />
|
|
46
46
|
{:else if model.type === StreamElementType.Container}
|
|
47
|
-
<ContainerStreamElementView model={model} data={data} localization={
|
|
48
|
-
{:else if model.type === StreamElementType.Spacer}
|
|
49
|
-
<SpacerStreamElementView model={model} parentContainerDirection={constainerDirection} />
|
|
47
|
+
<ContainerStreamElementView model={model} data={data} localization={localizationInit} />
|
|
50
48
|
{:else if model.type === StreamElementType.ImageRef && data}
|
|
51
49
|
<ImageRefStreamElementView model={model} data={data} />
|
|
52
50
|
{:else if model.type === StreamElementType.Images && imagesModel?.length}
|
|
@@ -56,6 +54,7 @@ const productModel = $derived.by(() => {
|
|
|
56
54
|
{:else if model.type === StreamElementType.ShortVideo && shortVideoModel}
|
|
57
55
|
<ShortVideoStreamElementView
|
|
58
56
|
data={shortVideoModel}
|
|
57
|
+
localization={localization.shortVideoElementLocalization}
|
|
59
58
|
on={on
|
|
60
59
|
? {
|
|
61
60
|
progress: (progress: Number) => {
|
|
@@ -63,6 +62,10 @@ const productModel = $derived.by(() => {
|
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
: undefined} />
|
|
65
|
+
{:else if model.type === StreamElementType.Spacer}
|
|
66
|
+
<SpacerStreamElementView model={model} parentContainerDirection={constainerDirection} />
|
|
67
|
+
{:else if model.type === StreamElementType.Stock}
|
|
68
|
+
<StockStreamElementView model={model} localization={localization.stockElementLocalization} />
|
|
66
69
|
{:else if model.type === StreamElementType.Text}
|
|
67
70
|
<TextStreamElementView model={model} />
|
|
68
71
|
{:else if model.type === StreamElementType.TextRef && data}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Locale } from '../../../core/locale';
|
|
2
|
+
import { type IStreamElementLocalization } from './stream-element-localization';
|
|
2
3
|
import type { StreamElementModel } from '../elements';
|
|
3
4
|
import { StreamElementStyleDirection } from '../enums';
|
|
4
5
|
import type { StreamSlotData } from '../slot-data';
|
|
@@ -6,7 +7,7 @@ type Props = {
|
|
|
6
7
|
model: StreamElementModel;
|
|
7
8
|
data: StreamSlotData | null;
|
|
8
9
|
constainerDirection?: StreamElementStyleDirection;
|
|
9
|
-
localization
|
|
10
|
+
localization: IStreamElementLocalization | Locale;
|
|
10
11
|
on?: {
|
|
11
12
|
progress?: (videoId: string, progress: number) => void;
|
|
12
13
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script lang="ts">import { LineClamp } from '../../../ui/line-clamp';
|
|
2
2
|
import { generateTextStyles } from '../styles-transformer';
|
|
3
|
-
let { model } = $props();
|
|
3
|
+
let { model, placeholder } = $props();
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<div class="text-stream-element" style={generateTextStyles(model.styles)}>
|
|
7
|
-
|
|
7
|
+
{#if model.value}
|
|
8
|
+
<LineClamp value={model.value} maxLines={model.styles?.maxLines || 'auto'} />
|
|
9
|
+
{:else if placeholder}
|
|
10
|
+
{@render placeholder()}
|
|
11
|
+
{/if}
|
|
8
12
|
</div>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { TextStreamElementModel } from '../elements';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
2
3
|
type Props = {
|
|
3
4
|
model: TextStreamElementModel;
|
|
5
|
+
placeholder?: Snippet;
|
|
4
6
|
};
|
|
5
7
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
6
8
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -6,8 +6,11 @@ export { default as ImagesStreamElementView } from './cmp.images-stream-element.
|
|
|
6
6
|
export { default as PriceStreamElementView } from './cmp.price-stream-element.svelte';
|
|
7
7
|
export { default as ShortVideoStreamElementView } from './cmp.short-video-stream-element.svelte';
|
|
8
8
|
export { default as SpacerStreamElementView } from './cmp.spacer-stream-element.svelte';
|
|
9
|
+
export { default as StockStreamElementView } from './cmp.stock-stream-element.svelte';
|
|
9
10
|
export { default as TextRefStreamElementView } from './cmp.text-ref-stream-element.svelte';
|
|
10
11
|
export { default as TextStreamElementView } from './cmp.text-stream-element.svelte';
|
|
11
12
|
export { default as WebViewStreamElementView } from './cmp.web-view-stream-element.svelte';
|
|
12
|
-
export type { IStreamElementLocalization } from './stream-element-localization
|
|
13
|
-
export type { IPriceStreamElementLocalization } from './price-stream-element-localization
|
|
13
|
+
export type { IStreamElementLocalization } from './stream-element-localization';
|
|
14
|
+
export type { IPriceStreamElementLocalization } from './price-stream-element-localization';
|
|
15
|
+
export type { IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
16
|
+
export type { IShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
@@ -6,6 +6,7 @@ export { default as ImagesStreamElementView } from './cmp.images-stream-element.
|
|
|
6
6
|
export { default as PriceStreamElementView } from './cmp.price-stream-element.svelte';
|
|
7
7
|
export { default as ShortVideoStreamElementView } from './cmp.short-video-stream-element.svelte';
|
|
8
8
|
export { default as SpacerStreamElementView } from './cmp.spacer-stream-element.svelte';
|
|
9
|
+
export { default as StockStreamElementView } from './cmp.stock-stream-element.svelte';
|
|
9
10
|
export { default as TextRefStreamElementView } from './cmp.text-ref-stream-element.svelte';
|
|
10
11
|
export { default as TextStreamElementView } from './cmp.text-stream-element.svelte';
|
|
11
12
|
export { default as WebViewStreamElementView } from './cmp.web-view-stream-element.svelte';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Locale } from '../../../core/locale';
|
|
2
|
+
import type { IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
+
export interface IPriceStreamElementLocalization {
|
|
4
|
+
saveValue?: (value: string | number) => string;
|
|
5
|
+
beforeValue?: (value: string) => string;
|
|
6
|
+
stockLocalization?: IStockStreamElementLocalization | Locale;
|
|
7
|
+
}
|
|
8
|
+
export declare class PriceStreamElementLocalization {
|
|
9
|
+
saveValue: (value: string | number) => string;
|
|
10
|
+
beforeValue: (value: string) => string;
|
|
11
|
+
stockLocalization: IStockStreamElementLocalization | Locale;
|
|
12
|
+
constructor(init: IPriceStreamElementLocalization | Locale);
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isLocale } from '../../../core/locale';
|
|
2
|
+
export class PriceStreamElementLocalization {
|
|
3
|
+
saveValue;
|
|
4
|
+
beforeValue;
|
|
5
|
+
stockLocalization;
|
|
6
|
+
constructor(init) {
|
|
7
|
+
this.saveValue = isLocale(init) ? loc.saveValue[init] : init.saveValue || loc.saveValue.en;
|
|
8
|
+
this.beforeValue = isLocale(init) ? loc.beforeValue[init] : init.beforeValue || loc.beforeValue.en;
|
|
9
|
+
this.stockLocalization = isLocale(init) ? init : init.stockLocalization || 'en';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const loc = {
|
|
13
|
+
saveValue: {
|
|
14
|
+
en: (value) => `Save ${value}`,
|
|
15
|
+
no: (value) => `Lagre ${value}`
|
|
16
|
+
},
|
|
17
|
+
beforeValue: {
|
|
18
|
+
en: (value) => `Before ${value}`,
|
|
19
|
+
no: (value) => `Før ${value}`
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Locale } from '../../../core/locale';
|
|
2
|
+
import type { IShortVideoViewerLocalization } from '../../../short-videos/short-video-viewer';
|
|
3
|
+
export interface IShortVideoStreamElementLocalization {
|
|
4
|
+
shortVideoViewerLocalization?: IShortVideoViewerLocalization | Locale;
|
|
5
|
+
}
|
|
6
|
+
export declare class ShortVideoStreamElementLocalization {
|
|
7
|
+
shortVideoViewerLocalization: IShortVideoViewerLocalization | Locale;
|
|
8
|
+
constructor(init: IShortVideoStreamElementLocalization | Locale);
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isLocale } from '../../../core/locale';
|
|
2
|
+
export class ShortVideoStreamElementLocalization {
|
|
3
|
+
shortVideoViewerLocalization;
|
|
4
|
+
constructor(init) {
|
|
5
|
+
this.shortVideoViewerLocalization = isLocale(init) ? init : init.shortVideoViewerLocalization || 'en';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Locale } from '../../../core/locale';
|
|
2
|
+
export interface IStockStreamElementLocalization {
|
|
3
|
+
quantity?: (value: number, low: boolean) => string;
|
|
4
|
+
}
|
|
5
|
+
export declare class StockStreamElementLocalization {
|
|
6
|
+
quantity: (value: number, low: boolean) => string;
|
|
7
|
+
constructor(init: IStockStreamElementLocalization | Locale);
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isLocale } from '../../../core/locale';
|
|
2
|
+
export class StockStreamElementLocalization {
|
|
3
|
+
quantity;
|
|
4
|
+
constructor(init) {
|
|
5
|
+
this.quantity = isLocale(init) ? loc.quantity[init] : init.quantity || loc.quantity.en;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
const loc = {
|
|
9
|
+
quantity: {
|
|
10
|
+
en: (value, low) => {
|
|
11
|
+
if (value === 0) {
|
|
12
|
+
return 'Out of stock';
|
|
13
|
+
}
|
|
14
|
+
const plusMark = low || value < 2 ? '' : '+';
|
|
15
|
+
const unit = value === 1 ? 'pc' : 'pcs';
|
|
16
|
+
return `${value}${plusMark} ${unit} in stock`;
|
|
17
|
+
},
|
|
18
|
+
no: (value, low) => {
|
|
19
|
+
if (value === 0) {
|
|
20
|
+
return 'Ikke på lager';
|
|
21
|
+
}
|
|
22
|
+
const plusMark = low || value < 2 ? '' : '+';
|
|
23
|
+
return `${value}${plusMark} stk. på lager`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Locale } from '../../../core/locale';
|
|
2
|
+
import type { IPriceStreamElementLocalization } from './price-stream-element-localization';
|
|
3
|
+
import type { IShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
4
|
+
import type { IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
5
|
+
export interface IStreamElementLocalization {
|
|
6
|
+
priceElementLocalization?: IPriceStreamElementLocalization | Locale;
|
|
7
|
+
stockElementLocalization?: IStockStreamElementLocalization | Locale;
|
|
8
|
+
shortVideoElementLocalization?: IShortVideoStreamElementLocalization | Locale;
|
|
9
|
+
}
|
|
10
|
+
export declare class StreamElementLocalization {
|
|
11
|
+
priceElementLocalization: IPriceStreamElementLocalization | Locale;
|
|
12
|
+
stockElementLocalization: IStockStreamElementLocalization | Locale;
|
|
13
|
+
shortVideoElementLocalization: IShortVideoStreamElementLocalization | Locale;
|
|
14
|
+
constructor(init: IStreamElementLocalization | Locale);
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isLocale } from '../../../core/locale';
|
|
2
|
+
export class StreamElementLocalization {
|
|
3
|
+
priceElementLocalization;
|
|
4
|
+
stockElementLocalization;
|
|
5
|
+
shortVideoElementLocalization;
|
|
6
|
+
constructor(init) {
|
|
7
|
+
this.priceElementLocalization = isLocale(init) ? init : init.priceElementLocalization || 'en';
|
|
8
|
+
this.stockElementLocalization = isLocale(init) ? init : init.stockElementLocalization || 'en';
|
|
9
|
+
this.shortVideoElementLocalization = isLocale(init) ? init : init.shortVideoElementLocalization || 'en';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StreamElementType, ImagesStreamElementMode, AnnotationStreamElementPlacement } from './enums';
|
|
2
|
-
import type { ImageStreamElementStyles, TextStreamElementStyles, ContainerStreamElementStyles, PriceStreamElementStyles, AnnotationStreamElementStyles } from './styles';
|
|
3
|
-
export type StreamElementModel = AnnotationStreamElementModel | ContainerStreamElementModel | ImageRefStreamElementModel | ImagesStreamElementModel | PriceStreamElementModel | SpacerStreamElementModel |
|
|
1
|
+
import { StreamElementType, ImagesStreamElementMode, AnnotationStreamElementPlacement, StockStreamElementLevel } from './enums';
|
|
2
|
+
import type { ImageStreamElementStyles, TextStreamElementStyles, ContainerStreamElementStyles, PriceStreamElementStyles, AnnotationStreamElementStyles, StockStreamElementStyles } from './styles';
|
|
3
|
+
export type StreamElementModel = AnnotationStreamElementModel | ContainerStreamElementModel | ImageRefStreamElementModel | ImagesStreamElementModel | PriceStreamElementModel | ShortVideoStreamElementModel | SpacerStreamElementModel | StockStreamElementModel | TextStreamElementModel | TextRefStreamElementModel | WebViewStreamElementModel;
|
|
4
4
|
export type AnnotationStreamElementModel = {
|
|
5
5
|
type: StreamElementType.Annotation;
|
|
6
6
|
$id: string;
|
|
@@ -38,6 +38,8 @@ export type PriceStreamElementModel = {
|
|
|
38
38
|
name?: string | null;
|
|
39
39
|
excludeBeforePrice: boolean | null;
|
|
40
40
|
includeCurrency: boolean | null;
|
|
41
|
+
textAfter: string | null;
|
|
42
|
+
stock?: StockStreamElementModel | null;
|
|
41
43
|
styles: PriceStreamElementStyles | null;
|
|
42
44
|
};
|
|
43
45
|
export type ShortVideoStreamElementModel = {
|
|
@@ -51,6 +53,15 @@ export type SpacerStreamElementModel = {
|
|
|
51
53
|
name?: string | null;
|
|
52
54
|
value: number | null;
|
|
53
55
|
};
|
|
56
|
+
export type StockStreamElementModel = {
|
|
57
|
+
type: StreamElementType.Stock;
|
|
58
|
+
$id: string;
|
|
59
|
+
name?: string | null;
|
|
60
|
+
level: StockStreamElementLevel;
|
|
61
|
+
quantity: number;
|
|
62
|
+
textAfter: string | null;
|
|
63
|
+
styles: StockStreamElementStyles | null;
|
|
64
|
+
};
|
|
54
65
|
export type TextStreamElementModel = {
|
|
55
66
|
type: StreamElementType.Text;
|
|
56
67
|
$id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { StreamElementType, ImagesStreamElementMode, AnnotationStreamElementPlacement } from './enums';
|
|
1
|
+
import { StreamElementType, ImagesStreamElementMode, AnnotationStreamElementPlacement, StockStreamElementLevel } from './enums';
|
|
@@ -10,8 +10,9 @@ export declare enum StreamElementType {
|
|
|
10
10
|
ImageRef = "IMAGE_REF",
|
|
11
11
|
Images = "IMAGES",
|
|
12
12
|
Price = "PRICE",
|
|
13
|
-
Spacer = "SPACER",
|
|
14
13
|
ShortVideo = "SHORT_VIDEO",
|
|
14
|
+
Spacer = "SPACER",
|
|
15
|
+
Stock = "STOCK",
|
|
15
16
|
Text = "TEXT",
|
|
16
17
|
TextRef = "TEXT_REF",
|
|
17
18
|
WebView = "WEB_VIEW"
|
|
@@ -27,6 +28,12 @@ export declare enum ImagesStreamElementMode {
|
|
|
27
28
|
Gallery = "GALLERY",
|
|
28
29
|
Slider = "SLIDER"
|
|
29
30
|
}
|
|
31
|
+
export declare enum StockStreamElementLevel {
|
|
32
|
+
High = "HIGH",
|
|
33
|
+
Medium = "MEDIUM",
|
|
34
|
+
Low = "LOW",
|
|
35
|
+
OutOfStock = "OUT_OF_STOCK"
|
|
36
|
+
}
|
|
30
37
|
export declare enum StreamElementStyleMediaFit {
|
|
31
38
|
Cover = "COVER",
|
|
32
39
|
Contain = "CONTAIN"
|
|
@@ -12,8 +12,9 @@ export var StreamElementType;
|
|
|
12
12
|
StreamElementType["ImageRef"] = "IMAGE_REF";
|
|
13
13
|
StreamElementType["Images"] = "IMAGES";
|
|
14
14
|
StreamElementType["Price"] = "PRICE";
|
|
15
|
-
StreamElementType["Spacer"] = "SPACER";
|
|
16
15
|
StreamElementType["ShortVideo"] = "SHORT_VIDEO";
|
|
16
|
+
StreamElementType["Spacer"] = "SPACER";
|
|
17
|
+
StreamElementType["Stock"] = "STOCK";
|
|
17
18
|
StreamElementType["Text"] = "TEXT";
|
|
18
19
|
StreamElementType["TextRef"] = "TEXT_REF";
|
|
19
20
|
StreamElementType["WebView"] = "WEB_VIEW";
|
|
@@ -31,6 +32,13 @@ export var ImagesStreamElementMode;
|
|
|
31
32
|
ImagesStreamElementMode["Gallery"] = "GALLERY";
|
|
32
33
|
ImagesStreamElementMode["Slider"] = "SLIDER";
|
|
33
34
|
})(ImagesStreamElementMode || (ImagesStreamElementMode = {}));
|
|
35
|
+
export var StockStreamElementLevel;
|
|
36
|
+
(function (StockStreamElementLevel) {
|
|
37
|
+
StockStreamElementLevel["High"] = "HIGH";
|
|
38
|
+
StockStreamElementLevel["Medium"] = "MEDIUM";
|
|
39
|
+
StockStreamElementLevel["Low"] = "LOW";
|
|
40
|
+
StockStreamElementLevel["OutOfStock"] = "OUT_OF_STOCK";
|
|
41
|
+
})(StockStreamElementLevel || (StockStreamElementLevel = {}));
|
|
34
42
|
export var StreamElementStyleMediaFit;
|
|
35
43
|
(function (StreamElementStyleMediaFit) {
|
|
36
44
|
StreamElementStyleMediaFit["Cover"] = "COVER";
|
|
@@ -59,6 +59,10 @@ const removeElementIdRecursive = (element) => {
|
|
|
59
59
|
delete annotation.$id;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
+
if (element.type === StreamElementType.Price && element.stock) {
|
|
63
|
+
// @ts-expect-error - clearing local data before sending to the server
|
|
64
|
+
delete element.stock.$id;
|
|
65
|
+
}
|
|
62
66
|
};
|
|
63
67
|
export class IdPopulator {
|
|
64
68
|
static populateLayoutIds(layout) {
|
|
@@ -82,5 +86,8 @@ export class IdPopulator {
|
|
|
82
86
|
if (element.type === StreamElementType.ImageRef && element.annotations) {
|
|
83
87
|
element.annotations.forEach((element) => IdPopulator.populateElementId(element));
|
|
84
88
|
}
|
|
89
|
+
if (element.type === StreamElementType.Price && element.stock) {
|
|
90
|
+
IdPopulator.populateElementId(element.stock);
|
|
91
|
+
}
|
|
85
92
|
}
|
|
86
93
|
}
|
|
@@ -37,6 +37,10 @@ export type PriceStreamElementStyles = {
|
|
|
37
37
|
beforeValueColor?: string | null;
|
|
38
38
|
horizontalAlign?: StreamElementStyleHorizontalAlign | null;
|
|
39
39
|
};
|
|
40
|
+
export type StockStreamElementStyles = {
|
|
41
|
+
height?: number | null;
|
|
42
|
+
horizontalAlign?: StreamElementStyleHorizontalAlign | null;
|
|
43
|
+
};
|
|
40
44
|
export type TextStreamElementStyles = {
|
|
41
45
|
fontSize?: number | null;
|
|
42
46
|
fontWeight?: StreamElementStyleFontWeight | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AnnotationStreamElementModel, ContainerStreamElementModel, ImageRefStreamElementModel, ImagesStreamElementModel, PriceStreamElementModel, ShortVideoStreamElementModel, SpacerStreamElementModel, TextRefStreamElementModel, TextStreamElementModel, WebViewStreamElementModel } from './elements';
|
|
1
|
+
import type { AnnotationStreamElementModel, ContainerStreamElementModel, ImageRefStreamElementModel, ImagesStreamElementModel, PriceStreamElementModel, ShortVideoStreamElementModel, SpacerStreamElementModel, StockStreamElementModel, TextRefStreamElementModel, TextStreamElementModel, WebViewStreamElementModel } from './elements';
|
|
2
2
|
import { StreamElementType } from './enums';
|
|
3
3
|
import type { ImagesStreamSlotData, ProductStreamSlotData, ShortVideoStreamSlotData, StreamSlotData } from './slot-data';
|
|
4
4
|
import type { ImagesStreamSlotDataInput, ProductStreamSlotDataInput, ShortVideoStreamSlotDataInput, StreamSlotDataInput } from './slot-data-input';
|
|
5
|
-
import type { AnnotationStreamElementStyles, ContainerStreamElementStyles, ImageStreamElementStyles, PriceStreamElementStyles, TextStreamElementStyles } from './styles';
|
|
5
|
+
import type { AnnotationStreamElementStyles, ContainerStreamElementStyles, ImageStreamElementStyles, PriceStreamElementStyles, StockStreamElementStyles, TextStreamElementStyles } from './styles';
|
|
6
6
|
export declare function isImagesSlotDataInput(data: StreamSlotDataInput | null): data is ImagesStreamSlotDataInput;
|
|
7
7
|
export declare function isProductSlotDataInput(data: StreamSlotDataInput | null): data is ProductStreamSlotDataInput;
|
|
8
8
|
export declare function isShortVideoSlotDataInput(data: StreamSlotDataInput | null): data is ShortVideoStreamSlotDataInput;
|
|
@@ -14,6 +14,7 @@ export type ElementTypeToStylesMap = {
|
|
|
14
14
|
[StreamElementType.Container]: ContainerStreamElementStyles;
|
|
15
15
|
[StreamElementType.Price]: PriceStreamElementStyles;
|
|
16
16
|
[StreamElementType.ImageRef]: ImageStreamElementStyles;
|
|
17
|
+
[StreamElementType.Stock]: StockStreamElementStyles;
|
|
17
18
|
[StreamElementType.Text]: TextStreamElementStyles;
|
|
18
19
|
[StreamElementType.TextRef]: TextStreamElementStyles;
|
|
19
20
|
};
|
|
@@ -25,6 +26,7 @@ export type ElementTypeToModelMap = {
|
|
|
25
26
|
[StreamElementType.Price]: PriceStreamElementModel;
|
|
26
27
|
[StreamElementType.ShortVideo]: ShortVideoStreamElementModel;
|
|
27
28
|
[StreamElementType.Spacer]: SpacerStreamElementModel;
|
|
29
|
+
[StreamElementType.Stock]: StockStreamElementModel;
|
|
28
30
|
[StreamElementType.Text]: TextStreamElementModel;
|
|
29
31
|
[StreamElementType.TextRef]: TextRefStreamElementModel;
|
|
30
32
|
[StreamElementType.WebView]: WebViewStreamElementModel;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script lang="ts">import { StreamLayoutSlot, StreamPageLayout, StreamLayoutSlotContent } from '../layout';
|
|
2
|
-
|
|
2
|
+
import { StreamPageViewerLocalization } from './stream-page-viewer-localization';
|
|
3
|
+
let { page, localization: localizationInit, on } = $props();
|
|
4
|
+
const localization = $derived(new StreamPageViewerLocalization(localizationInit));
|
|
3
5
|
</script>
|
|
4
6
|
|
|
5
7
|
{#if page.type === 'general'}
|
|
6
8
|
<StreamPageLayout model={page.layout}>
|
|
7
9
|
{#each page.layout.slots as slot (slot)}
|
|
8
10
|
<StreamLayoutSlot model={slot}>
|
|
9
|
-
<StreamLayoutSlotContent model={slot} on={on} />
|
|
11
|
+
<StreamLayoutSlotContent model={slot} on={on} localization={localization.elementsLocalization} />
|
|
10
12
|
</StreamLayoutSlot>
|
|
11
13
|
{/each}
|
|
12
14
|
</StreamPageLayout>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { Locale } from '../../core/locale';
|
|
2
|
+
import { type IStreamPageViewerLocalization } from './stream-page-viewer-localization';
|
|
1
3
|
import type { StreamPageViewerModel } from './types';
|
|
2
4
|
type Props = {
|
|
3
5
|
page: StreamPageViewerModel;
|
|
6
|
+
localization: IStreamPageViewerLocalization | Locale;
|
|
4
7
|
on?: {
|
|
5
8
|
productClick: (productId: string) => void;
|
|
6
9
|
progress?: (videoId: string, progress: number) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Locale } from '../../core/locale';
|
|
2
|
+
import type { IStreamElementLocalization } from '../layout/element-views';
|
|
3
|
+
export interface IStreamPageViewerLocalization {
|
|
4
|
+
elementsLocalization?: IStreamElementLocalization | Locale;
|
|
5
|
+
}
|
|
6
|
+
export declare class StreamPageViewerLocalization {
|
|
7
|
+
elementsLocalization: IStreamElementLocalization | Locale;
|
|
8
|
+
constructor(init: IStreamPageViewerLocalization | Locale);
|
|
9
|
+
}
|
|
@@ -23,7 +23,7 @@ import { mapStreamPlayerModel } from './mapper';
|
|
|
23
23
|
import { GetStreamDocument } from './operations.generated';
|
|
24
24
|
import { default as Overview } from './stream-overview.svelte';
|
|
25
25
|
import { StreamPlayerBuffer } from './stream-player-buffer.svelte';
|
|
26
|
-
import { StreamPlayerLocalization } from './stream-player-localization
|
|
26
|
+
import { StreamPlayerLocalization } from './stream-player-localization';
|
|
27
27
|
import { StreamPlayerUiManager } from './ui-manager.svelte';
|
|
28
28
|
import { AppEventsTracker } from '@streamscloud/streams-analytics-collector';
|
|
29
29
|
import { onMount } from 'svelte';
|
|
@@ -187,6 +187,7 @@ const onProgress = (pageId, videoId, progress) => {
|
|
|
187
187
|
{#if item.type === 'general'}
|
|
188
188
|
<StreamPageViewer
|
|
189
189
|
page={item}
|
|
190
|
+
localization={localization.streamPageViewerLocalization}
|
|
190
191
|
on={{
|
|
191
192
|
progress: (videoId: String, progress: Number) => onProgress(item.id, videoId, progress),
|
|
192
193
|
productClick: (productId: String) => onProductCardClick(productId)
|
|
@@ -198,12 +199,13 @@ const onProgress = (pageId, videoId, progress) => {
|
|
|
198
199
|
progress: (progress) => onProgress(item.id, item.shortVideo.id, progress)
|
|
199
200
|
}}
|
|
200
201
|
autoplay="on-appearance"
|
|
202
|
+
localization={localization.shortVideoViewerLocalization}
|
|
201
203
|
showAttachments={uiManager.showShortVideoOverlay} />
|
|
202
204
|
{/if}
|
|
203
205
|
{/snippet}
|
|
204
206
|
</PlayerSlider>
|
|
205
207
|
{#if uiManager.isMobileView && buffer.loaded.length > 1 && !everTouched}
|
|
206
|
-
<SwipeIndicator />
|
|
208
|
+
<SwipeIndicator localization={localization.swipeIndicatorLocalization} />
|
|
207
209
|
{/if}
|
|
208
210
|
</div>
|
|
209
211
|
</SpotlightLayout>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Locale } from '../../core/locale';
|
|
2
|
+
import { type IStreamPlayerLocalization } from './stream-player-localization';
|
|
2
3
|
type Props = {
|
|
3
4
|
streamId: string;
|
|
4
|
-
localization
|
|
5
|
+
localization: IStreamPlayerLocalization | Locale;
|
|
5
6
|
graphqlOrigin?: string;
|
|
6
7
|
on?: {
|
|
7
8
|
closePlayer?: () => void;
|