@streamscloud/embeddable 6.5.2 → 7.0.0-1758321646285
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/enums.d.ts +3 -0
- package/dist/core/enums.js +4 -0
- package/dist/core/locale.d.ts +0 -4
- package/dist/core/locale.js +1 -12
- package/dist/media-center/config/internal-media-center-config.d.ts +9 -0
- package/dist/media-center/config/internal-media-center-config.js +81 -0
- package/dist/media-center/{data-provider → config}/operations.generated.d.ts +20 -3
- package/dist/media-center/{data-provider → config}/operations.generated.js +53 -2
- package/dist/media-center/{data-provider → config}/operations.graphql +15 -1
- package/dist/media-center/config/types.d.ts +52 -0
- package/dist/media-center/index.d.ts +1 -1
- package/dist/media-center/media-center/cmp.media-center.svelte +105 -66
- package/dist/media-center/media-center/cmp.media-center.svelte.d.ts +11 -11
- package/dist/media-center/media-center/index.d.ts +0 -1
- package/dist/media-center/media-center/media-center-localization.d.ts +3 -8
- package/dist/media-center/media-center/media-center-localization.js +12 -6
- package/dist/media-center/media-center/overview.svelte +14 -1
- package/dist/media-center/media-center/overview.svelte.d.ts +1 -0
- package/dist/media-center/media-center/short-video-resources-generator.d.ts +2 -2
- package/dist/media-center/media-center/short-video-resources-generator.js +2 -2
- package/dist/media-center/media-center/streams-in-category.svelte +100 -0
- package/dist/media-center/media-center/streams-in-category.svelte.d.ts +10 -0
- package/dist/media-center/media-center/types.d.ts +11 -0
- package/dist/products/product-card/cmp.product-card.svelte +2 -2
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +1 -2
- package/dist/products/product-card/product-card-localization.d.ts +1 -4
- package/dist/products/product-card/product-card-localization.js +2 -2
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +11 -46
- package/dist/short-videos/short-video-viewer/cmp.attachments-horizontal.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +3 -3
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +1 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +2 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-product-card.svelte +2 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-product-card.svelte.d.ts +1 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +2 -2
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +1 -2
- package/dist/short-videos/short-video-viewer/index.d.ts +0 -2
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.d.ts +2 -6
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +4 -4
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +3 -10
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.js +7 -7
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +4 -4
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +2 -2
- package/dist/short-videos/short-videos-player/controls.svelte +1 -1
- package/dist/short-videos/short-videos-player/index.d.ts +12 -10
- package/dist/short-videos/short-videos-player/index.js +9 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +4 -11
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +8 -8
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +4 -4
- package/dist/short-videos/short-videos-player/types.d.ts +2 -4
- package/dist/streams/cmp.stream-product-card.svelte +2 -2
- package/dist/streams/cmp.stream-product-card.svelte.d.ts +1 -2
- package/dist/streams/layout/cmp.slot-content.svelte +2 -2
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +1 -2
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +3 -8
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +1 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +1 -2
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +3 -8
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +1 -2
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +1 -2
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +6 -6
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +1 -2
- package/dist/streams/layout/element-views/index.d.ts +0 -4
- package/dist/streams/layout/element-views/price-element-view.svelte +1 -1
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +2 -8
- package/dist/streams/layout/element-views/price-stream-element-localization.js +5 -5
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +2 -6
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +4 -4
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +1 -4
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +2 -2
- package/dist/streams/layout/element-views/stream-element-localization.d.ts +4 -12
- package/dist/streams/layout/element-views/stream-element-localization.js +5 -5
- package/dist/streams/stream-card/cmp.stream-card.svelte +89 -0
- package/dist/streams/stream-card/cmp.stream-card.svelte.d.ts +11 -0
- package/dist/streams/stream-card/index.d.ts +2 -0
- package/dist/streams/stream-card/index.js +1 -0
- package/dist/streams/stream-card/types.d.ts +6 -0
- package/dist/streams/stream-card/types.js +1 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +3 -3
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +1 -2
- package/dist/streams/stream-page-viewer/index.d.ts +0 -1
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +2 -6
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +3 -3
- package/dist/streams/stream-player/controls.svelte +1 -1
- package/dist/streams/stream-player/index.d.ts +15 -10
- package/dist/streams/stream-player/index.js +11 -8
- package/dist/streams/stream-player/internal-stream-player-data-provider.d.ts +2 -0
- package/dist/streams/stream-player/internal-stream-player-data-provider.js +2 -2
- package/dist/streams/stream-player/stream-overview.svelte +1 -1
- package/dist/streams/stream-player/stream-player-localization.d.ts +6 -19
- package/dist/streams/stream-player/stream-player-localization.js +14 -14
- package/dist/streams/stream-player/stream-player.svelte +6 -6
- package/dist/streams/stream-player/types.d.ts +4 -4
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +2 -2
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +1 -2
- package/dist/ui/line-clamp/index.d.ts +0 -1
- package/dist/ui/line-clamp/index.js +0 -1
- package/dist/ui/line-clamp/line-clamp-localization.d.ts +1 -5
- package/dist/ui/line-clamp/line-clamp-localization.js +4 -4
- package/dist/ui/shadow-dom/{reset.scss → reset-shadow.css} +31 -44
- package/dist/ui/shadow-dom/shadow-root-service.js +2 -2
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +2 -2
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +1 -2
- package/dist/ui/swipe-indicator/index.d.ts +0 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +1 -4
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +3 -3
- package/dist/ui/time-ago/cmp.time-ago.svelte +2 -2
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +1 -2
- package/dist/ui/time-ago/index.d.ts +0 -1
- package/dist/ui/time-ago/time-ago-localization.d.ts +1 -11
- package/dist/ui/time-ago/time-ago-localization.js +10 -10
- package/package.json +1 -1
- package/dist/media-center/data-provider/index.d.ts +0 -2
- package/dist/media-center/data-provider/index.js +0 -1
- package/dist/media-center/data-provider/internal-media-center-data-provider.svelte.d.ts +0 -8
- package/dist/media-center/data-provider/internal-media-center-data-provider.svelte.js +0 -46
- package/dist/media-center/data-provider/types.d.ts +0 -24
- /package/dist/media-center/{data-provider → config}/types.js +0 -0
- /package/dist/ui/shadow-dom/{normalize.scss → normalize-shadow.css} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import normalize from './normalize.
|
|
2
|
-
import reset from './reset.
|
|
1
|
+
import normalize from './normalize-shadow.css?raw';
|
|
2
|
+
import reset from './reset-shadow.css?raw';
|
|
3
3
|
export const createShadowRoot = (host) => {
|
|
4
4
|
prepareShadowRootHost(host);
|
|
5
5
|
const shadowRoot = host.attachShadow({ mode: 'open' });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">import { Icon } from '../icon';
|
|
2
2
|
import { SwipeIndicatorLocalization } from './swipe-indicator-localization';
|
|
3
3
|
import IconArrowUp from '@fluentui/svg-icons/icons/arrow_up_20_regular.svg?raw';
|
|
4
|
-
let { fadeTimeout = 2000,
|
|
5
|
-
const localization = $derived(new SwipeIndicatorLocalization(
|
|
4
|
+
let { fadeTimeout = 2000, locale } = $props();
|
|
5
|
+
const localization = $derived(new SwipeIndicatorLocalization(locale));
|
|
6
6
|
let isFaded = $state(false);
|
|
7
7
|
const indicatorMounted = (_) => {
|
|
8
8
|
if (fadeTimeout) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Locale } from '../../core/locale';
|
|
2
|
-
import { type ISwipeIndicatorLocalization } from './swipe-indicator-localization';
|
|
3
2
|
type Props = {
|
|
4
3
|
fadeTimeout?: number;
|
|
5
|
-
|
|
4
|
+
locale: Locale;
|
|
6
5
|
};
|
|
7
6
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
8
7
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { type Locale } from '../../core/locale';
|
|
2
|
-
export interface ISwipeIndicatorLocalization {
|
|
3
|
-
swipe?: string;
|
|
4
|
-
}
|
|
5
2
|
export declare class SwipeIndicatorLocalization {
|
|
6
3
|
swipe: string;
|
|
7
|
-
constructor(
|
|
4
|
+
constructor(locale: Locale);
|
|
8
5
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from '../../core/locale';
|
|
2
2
|
export class SwipeIndicatorLocalization {
|
|
3
3
|
swipe;
|
|
4
|
-
constructor(
|
|
5
|
-
this.swipe =
|
|
4
|
+
constructor(locale) {
|
|
5
|
+
this.swipe = loc.swipe[locale];
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
const loc = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">import { DateFormatOptions, DateHelper } from '../../core/utils/date-helper';
|
|
2
2
|
import { TimeAgoLocalization } from './time-ago-localization';
|
|
3
3
|
import { onDestroy } from 'svelte';
|
|
4
|
-
let { date = null, thresholdMinutes = 60 * 24 * 2 /* 2 days */,
|
|
5
|
-
const localization = $derived(new TimeAgoLocalization(
|
|
4
|
+
let { date = null, thresholdMinutes = 60 * 24 * 2 /* 2 days */, locale } = $props();
|
|
5
|
+
const localization = $derived(new TimeAgoLocalization(locale));
|
|
6
6
|
let timeSpan = $state.raw(null);
|
|
7
7
|
let timeoutId;
|
|
8
8
|
onDestroy(() => {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { Locale } from '../../core/locale';
|
|
2
|
-
import { type ITimeAgoLocalization } from './time-ago-localization';
|
|
3
2
|
type Props = {
|
|
4
3
|
date: Date | string | null;
|
|
5
4
|
thresholdMinutes?: number;
|
|
6
|
-
|
|
5
|
+
locale: Locale;
|
|
7
6
|
};
|
|
8
7
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
9
8
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { type Locale } from '../../core/locale';
|
|
2
|
-
export interface ITimeAgoLocalization {
|
|
3
|
-
locale?: string;
|
|
4
|
-
aMinuteAgo?: string;
|
|
5
|
-
anHourAgo?: string;
|
|
6
|
-
justNow?: string;
|
|
7
|
-
at?: (date: string, time: string) => string;
|
|
8
|
-
hoursAgo?: (hours: number) => string;
|
|
9
|
-
minutesAgo?: (minutes: number) => string;
|
|
10
|
-
yesterday?: (time: string) => string;
|
|
11
|
-
}
|
|
12
2
|
export declare class TimeAgoLocalization {
|
|
13
3
|
locale: string;
|
|
14
4
|
aMinuteAgo: string;
|
|
@@ -18,5 +8,5 @@ export declare class TimeAgoLocalization {
|
|
|
18
8
|
hoursAgo: (hours: number) => string;
|
|
19
9
|
minutesAgo: (minutes: number) => string;
|
|
20
10
|
yesterday: (time: string) => string;
|
|
21
|
-
constructor(
|
|
11
|
+
constructor(locale: Locale);
|
|
22
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from '../../core/locale';
|
|
2
2
|
export class TimeAgoLocalization {
|
|
3
3
|
locale;
|
|
4
4
|
aMinuteAgo;
|
|
@@ -8,15 +8,15 @@ export class TimeAgoLocalization {
|
|
|
8
8
|
hoursAgo;
|
|
9
9
|
minutesAgo;
|
|
10
10
|
yesterday;
|
|
11
|
-
constructor(
|
|
12
|
-
this.locale =
|
|
13
|
-
this.aMinuteAgo =
|
|
14
|
-
this.anHourAgo =
|
|
15
|
-
this.justNow =
|
|
16
|
-
this.at =
|
|
17
|
-
this.hoursAgo =
|
|
18
|
-
this.minutesAgo =
|
|
19
|
-
this.yesterday =
|
|
11
|
+
constructor(locale) {
|
|
12
|
+
this.locale = loc.locale[locale];
|
|
13
|
+
this.aMinuteAgo = loc.aMinuteAgo[locale];
|
|
14
|
+
this.anHourAgo = loc.anHourAgo[locale];
|
|
15
|
+
this.justNow = loc.justNow[locale];
|
|
16
|
+
this.at = loc.at[locale];
|
|
17
|
+
this.hoursAgo = loc.hoursAgo[locale];
|
|
18
|
+
this.minutesAgo = loc.minutesAgo[locale];
|
|
19
|
+
this.yesterday = loc.yesterday[locale];
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
const loc = {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InternalMediaCenterDataProvider } from './internal-media-center-data-provider.svelte';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IMediaCenterDataProvider } from './types';
|
|
2
|
-
export declare class InternalMediaCenterDataProvider implements IMediaCenterDataProvider {
|
|
3
|
-
private readonly mediaPageId;
|
|
4
|
-
private graphql;
|
|
5
|
-
constructor(mediaPageId: string, graphqlOrigin?: string);
|
|
6
|
-
getConfig: IMediaCenterDataProvider['getConfig'];
|
|
7
|
-
getShortVideosCursor: IMediaCenterDataProvider['getShortVideosCursor'];
|
|
8
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { PostType, Status } from '../../core/enums';
|
|
2
|
-
import { createLocalGQLClient } from '../../core/graphql';
|
|
3
|
-
import { mapToShortVideoPlayerModel } from '../../short-videos/short-videos-player/mapper';
|
|
4
|
-
import { GetMediaPageConfigDocument, GetShortVideosDocument } from './operations.generated';
|
|
5
|
-
export class InternalMediaCenterDataProvider {
|
|
6
|
-
mediaPageId;
|
|
7
|
-
graphql;
|
|
8
|
-
constructor(mediaPageId, graphqlOrigin) {
|
|
9
|
-
this.mediaPageId = mediaPageId;
|
|
10
|
-
this.graphql = createLocalGQLClient(graphqlOrigin);
|
|
11
|
-
}
|
|
12
|
-
getConfig = async () => {
|
|
13
|
-
const payload = await this.graphql.query(GetMediaPageConfigDocument, { mediaPageId: this.mediaPageId }).toPromise();
|
|
14
|
-
if (!payload.data?.embedMediaPagePlayerSettings) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const settings = payload.data.embedMediaPagePlayerSettings;
|
|
18
|
-
return {
|
|
19
|
-
logo: settings.logo?.url || null,
|
|
20
|
-
postCategories: settings.postCategories.map((c) => ({ id: c.id, name: c.name })),
|
|
21
|
-
streamCategories: settings.streamCategories.map((c) => ({ id: c.id, name: c.name }))
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
getShortVideosCursor = async ({ filter, limit, continuationToken }) => {
|
|
25
|
-
const payload = await this.graphql
|
|
26
|
-
.query(GetShortVideosDocument, {
|
|
27
|
-
input: {
|
|
28
|
-
filter: {
|
|
29
|
-
mediaPageId: this.mediaPageId,
|
|
30
|
-
types: [PostType.ShortVideo],
|
|
31
|
-
statuses: [Status.Published],
|
|
32
|
-
categoryId: filter.categoryId,
|
|
33
|
-
excludeIds: filter.excludeIds
|
|
34
|
-
},
|
|
35
|
-
limit,
|
|
36
|
-
continuationToken
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
.toPromise();
|
|
40
|
-
const posts = payload.data?.shortVideos?.items || [];
|
|
41
|
-
return {
|
|
42
|
-
items: posts.map(mapToShortVideoPlayerModel),
|
|
43
|
-
continuationToken: payload.data?.shortVideos?.continuationToken || null
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ShortVideoPlayerModel } from '../../short-videos/short-videos-player/types';
|
|
2
|
-
export interface IMediaCenterDataProvider {
|
|
3
|
-
getConfig: () => Promise<MediaCenterConfig | null>;
|
|
4
|
-
getShortVideosCursor: (input: {
|
|
5
|
-
filter: {
|
|
6
|
-
categoryId?: string;
|
|
7
|
-
excludeIds?: string[];
|
|
8
|
-
};
|
|
9
|
-
limit: number;
|
|
10
|
-
continuationToken?: string | null;
|
|
11
|
-
}) => Promise<{
|
|
12
|
-
items: ShortVideoPlayerModel[];
|
|
13
|
-
continuationToken: string | null;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
export type MediaCenterConfig = {
|
|
17
|
-
logo: string | null;
|
|
18
|
-
postCategories: MediaCenterCategoryModel[];
|
|
19
|
-
streamCategories: MediaCenterCategoryModel[];
|
|
20
|
-
};
|
|
21
|
-
export type MediaCenterCategoryModel = {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
File without changes
|
|
File without changes
|