@streamscloud/embeddable 3.2.4 → 3.2.6
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/analytics.profile-id.d.ts +5 -0
- package/dist/core/analytics.profile-id.js +17 -0
- package/dist/core/document.event-handlers.d.ts +1 -0
- package/dist/core/document.event-handlers.js +5 -0
- package/dist/core/enums.d.ts +0 -2
- package/dist/core/enums.js +0 -2
- package/dist/core/graphql.d.ts +3 -1
- package/dist/core/graphql.js +12 -3
- package/dist/core/locale.d.ts +6 -0
- package/dist/core/locale.js +24 -0
- package/dist/core/utils/html-helper.d.ts +1 -0
- package/dist/core/utils/html-helper.js +4 -0
- package/dist/products/price-helper.js +1 -1
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte +103 -37
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +2 -2
- 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 +6 -2
- 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 +5 -0
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/index.d.ts +4 -2
- package/dist/short-videos/short-video-viewer/index.js +1 -0
- package/dist/short-videos/short-video-viewer/mapper.js +5 -4
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +10 -3
- package/dist/short-videos/short-video-viewer/operations.generated.js +17 -3
- package/dist/short-videos/short-video-viewer/operations.graphql +10 -3
- 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-video-viewer/types.d.ts +10 -3
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +88 -11
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +5 -5
- 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 +51 -14
- package/dist/short-videos/short-videos-player/index.js +83 -12
- package/dist/short-videos/short-videos-player/operations.generated.d.ts +71 -0
- package/dist/short-videos/short-videos-player/operations.generated.js +207 -0
- package/dist/short-videos/short-videos-player/operations.graphql +8 -0
- 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 +36 -0
- package/dist/short-videos/short-videos-player/types.js +6 -0
- package/dist/streams/layout/cmp.layout.svelte.d.ts +4 -2
- package/dist/streams/layout/cmp.slot-content.svelte +4 -4
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +2 -1
- package/dist/streams/layout/cmp.slot.svelte.d.ts +7 -2
- package/dist/streams/layout/component.d.ts +2 -0
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +16 -0
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +7 -0
- 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 +4 -3
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +15 -2
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +7 -3
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +15 -89
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +5 -4
- 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 +24 -17
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +4 -3
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +2 -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/cmp.web-view-stream-element.svelte +37 -0
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +7 -0
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -3
- package/dist/streams/layout/element-views/index.d.ts +16 -11
- package/dist/streams/layout/element-views/index.js +12 -9
- package/dist/streams/layout/element-views/price-element-view.svelte +168 -0
- package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +15 -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 +47 -12
- package/dist/streams/layout/elements.js +1 -1
- package/dist/streams/layout/enums.d.ts +34 -3
- package/dist/streams/layout/enums.js +46 -7
- package/dist/streams/layout/index.d.ts +3 -10
- package/dist/streams/layout/index.js +3 -2
- package/dist/streams/layout/layout.d.ts +2 -1
- package/dist/streams/layout/models/index.d.ts +1 -1
- package/dist/streams/layout/models/mapper.js +5 -4
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -1
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +1 -2
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +13 -3
- package/dist/streams/layout/serializer.svelte.d.ts +29 -0
- package/dist/streams/layout/serializer.svelte.js +93 -0
- package/dist/streams/layout/slot-data-ref.d.ts +13 -0
- package/dist/streams/layout/slot-data-ref.js +1 -0
- package/dist/streams/layout/slot.d.ts +2 -0
- package/dist/streams/layout/styles-transformer.d.ts +3 -2
- package/dist/streams/layout/styles-transformer.js +54 -30
- package/dist/streams/layout/styles.d.ts +24 -14
- package/dist/streams/layout/svg-attributes.d.ts +7 -0
- package/dist/streams/layout/svg-attributes.js +8 -0
- package/dist/streams/layout/type-guards.d.ts +31 -0
- package/dist/streams/layout/type-guards.js +13 -1
- 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 +47 -7
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +6 -4
- 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 +6 -4
- package/dist/streams/stream-player/index.js +15 -28
- package/dist/streams/stream-player/operations.generated.d.ts +1 -1
- package/dist/streams/stream-player/operations.generated.js +5 -3
- package/dist/streams/stream-player/operations.graphql +3 -3
- 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-buffer.svelte.js +2 -2
- 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/icon/cmp.icon.svelte +13 -26
- 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/shadow-dom/shadow-host.d.ts +1 -5
- package/dist/ui/shadow-dom/shadow-host.js +1 -14
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +125 -0
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +9 -0
- package/dist/ui/swipe-indicator/index.d.ts +2 -0
- package/dist/ui/swipe-indicator/index.js +1 -0
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +8 -0
- 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/dist/ui/video/cmp.video.svelte +42 -18
- 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/layout/serializer.d.ts +0 -3
- package/dist/streams/layout/serializer.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/time-ago/time-ago-localization.svelte.js +0 -39
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { isLocale } from '../../core/locale';
|
|
2
|
+
export class TimeAgoLocalization {
|
|
3
|
+
locale;
|
|
4
|
+
aMinuteAgo;
|
|
5
|
+
anHourAgo;
|
|
6
|
+
justNow;
|
|
7
|
+
at;
|
|
8
|
+
hoursAgo;
|
|
9
|
+
minutesAgo;
|
|
10
|
+
yesterday;
|
|
11
|
+
constructor(init) {
|
|
12
|
+
this.locale = isLocale(init) ? loc.locale[init] : init.locale || loc.locale.en;
|
|
13
|
+
this.aMinuteAgo = isLocale(init) ? loc.aMinuteAgo[init] : init.aMinuteAgo || loc.aMinuteAgo.en;
|
|
14
|
+
this.anHourAgo = isLocale(init) ? loc.anHourAgo[init] : init.anHourAgo || loc.anHourAgo.en;
|
|
15
|
+
this.justNow = isLocale(init) ? loc.justNow[init] : init.justNow || loc.justNow.en;
|
|
16
|
+
this.at = isLocale(init) ? loc.at[init] : init.at || loc.at.en;
|
|
17
|
+
this.hoursAgo = isLocale(init) ? loc.hoursAgo[init] : init.hoursAgo || loc.hoursAgo.en;
|
|
18
|
+
this.minutesAgo = isLocale(init) ? loc.minutesAgo[init] : init.minutesAgo || loc.minutesAgo.en;
|
|
19
|
+
this.yesterday = isLocale(init) ? loc.yesterday[init] : init.yesterday || loc.yesterday.en;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const loc = {
|
|
23
|
+
locale: {
|
|
24
|
+
en: 'en-US',
|
|
25
|
+
no: 'no-NO'
|
|
26
|
+
},
|
|
27
|
+
aMinuteAgo: {
|
|
28
|
+
en: 'a minute ago',
|
|
29
|
+
no: 'ett minutt siden'
|
|
30
|
+
},
|
|
31
|
+
anHourAgo: {
|
|
32
|
+
en: 'an hour ago',
|
|
33
|
+
no: 'en time siden'
|
|
34
|
+
},
|
|
35
|
+
justNow: {
|
|
36
|
+
en: 'just now',
|
|
37
|
+
no: 'nettopp nå'
|
|
38
|
+
},
|
|
39
|
+
at: {
|
|
40
|
+
en: (date, time) => `${date} at ${time}`,
|
|
41
|
+
no: (date, time) => `${date} kl. ${time}`
|
|
42
|
+
},
|
|
43
|
+
hoursAgo: {
|
|
44
|
+
en: (hours) => `${hours} hours ago`,
|
|
45
|
+
no: (hours) => `${hours} timer siden`
|
|
46
|
+
},
|
|
47
|
+
minutesAgo: {
|
|
48
|
+
en: (minutes) => `${minutes} minutes ago`,
|
|
49
|
+
no: (minutes) => `${minutes} minutter siden`
|
|
50
|
+
},
|
|
51
|
+
yesterday: {
|
|
52
|
+
en: (time) => `Yesterday at ${time}`,
|
|
53
|
+
no: (time) => `I går kl. ${time}`
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -55,8 +55,13 @@ onMount(() => {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
onDestroy(() => {
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
try {
|
|
59
|
+
PlaybackManager.unregisterPlayer(id);
|
|
60
|
+
intersectionObserver.disconnect();
|
|
61
|
+
}
|
|
62
|
+
catch (_a) {
|
|
63
|
+
// ignore
|
|
64
|
+
}
|
|
60
65
|
});
|
|
61
66
|
let video = $state.raw(undefined);
|
|
62
67
|
let showControlsOnHover = $state(false);
|
|
@@ -154,6 +159,7 @@ const stop = () => {
|
|
|
154
159
|
video.pause();
|
|
155
160
|
video.currentTime = 0;
|
|
156
161
|
video.load();
|
|
162
|
+
onPause();
|
|
157
163
|
};
|
|
158
164
|
const togglePlay = (e) => {
|
|
159
165
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
@@ -234,7 +240,7 @@ const handleSeek = (percent) => {
|
|
|
234
240
|
<div class="video" onmouseenter={() => setShowControlsOnHover(true)} onmouseleave={() => setShowControlsOnHover(false)} role="none" inert={inert}>
|
|
235
241
|
<video
|
|
236
242
|
class="video__video"
|
|
237
|
-
|
|
243
|
+
class:video__video--not-activated={!everActivated}
|
|
238
244
|
width="100%"
|
|
239
245
|
controls={controls && everActivated}
|
|
240
246
|
poster={poster}
|
|
@@ -250,8 +256,11 @@ const handleSeek = (percent) => {
|
|
|
250
256
|
bind:this={video}>
|
|
251
257
|
<track src="" kind="captions" />
|
|
252
258
|
</video>
|
|
259
|
+
{#if !everActivated}
|
|
260
|
+
<img class="video__poster" src={poster} alt="" />
|
|
261
|
+
{/if}
|
|
253
262
|
{#if !controls || !everActivated}
|
|
254
|
-
<div class="
|
|
263
|
+
<div class="video__overlay" onclick={togglePlay} onkeydown={() => ({})} role="none">
|
|
255
264
|
{#if isVideoPaused}
|
|
256
265
|
<button type="button" aria-label="play" class="video__playback-button" onclick={togglePlay} onkeydown={() => ({})}>
|
|
257
266
|
<Icon src={IconPlay} color={IconColor.White} />
|
|
@@ -271,20 +280,22 @@ const handleSeek = (percent) => {
|
|
|
271
280
|
</button>
|
|
272
281
|
{/if}
|
|
273
282
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
{#if
|
|
277
|
-
|
|
278
|
-
<
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
<
|
|
284
|
-
|
|
283
|
+
{#if everActivated}
|
|
284
|
+
<div class="video__progress-container">
|
|
285
|
+
{#if needShowProgress}
|
|
286
|
+
{#if showControlsOnHover}
|
|
287
|
+
<div class="video__seek-bar" onclick={(e) => e.stopPropagation()} onkeydown={() => ({})} role="none" transition:slide>
|
|
288
|
+
<SeekBar value={percentageCompleted} on={{ seek: handleSeek }} />
|
|
289
|
+
</div>
|
|
290
|
+
{/if}
|
|
291
|
+
{#if !showControlsOnHover}
|
|
292
|
+
<div class="video__progress" in:slide>
|
|
293
|
+
<Progress value={percentageCompleted} />
|
|
294
|
+
</div>
|
|
295
|
+
{/if}
|
|
285
296
|
{/if}
|
|
286
|
-
|
|
287
|
-
|
|
297
|
+
</div>
|
|
298
|
+
{/if}
|
|
288
299
|
</div>
|
|
289
300
|
{/if}
|
|
290
301
|
</div>
|
|
@@ -304,6 +315,7 @@ const handleSeek = (percent) => {
|
|
|
304
315
|
--_video--background-color: var(--video--background-color, #000000);
|
|
305
316
|
--_video--border-radius: var(--video--border-radius, 0);
|
|
306
317
|
--_video--media-fit: var(--video--media-fit, contain);
|
|
318
|
+
--_video--poster--media-fit: var(--video--poster--media-fit, cover);
|
|
307
319
|
--_video--progress--background-color: var(--video--progress--background-color, hsla(0, 0%, 0%, 0.5));
|
|
308
320
|
--_video--progress--back-color: var(--video--progress--back-color);
|
|
309
321
|
--_video--progress--front-color: var(--video--progress--front-color);
|
|
@@ -341,6 +353,13 @@ const handleSeek = (percent) => {
|
|
|
341
353
|
font-size: 1em;
|
|
342
354
|
z-index: 1;
|
|
343
355
|
}
|
|
356
|
+
.video__poster {
|
|
357
|
+
object-fit: var(--_video--poster--media-fit);
|
|
358
|
+
min-width: 100%;
|
|
359
|
+
min-height: 100%;
|
|
360
|
+
max-width: 100%;
|
|
361
|
+
max-height: 100%;
|
|
362
|
+
}
|
|
344
363
|
.video__video {
|
|
345
364
|
object-fit: var(--_video--media-fit);
|
|
346
365
|
min-width: 100%;
|
|
@@ -348,7 +367,12 @@ const handleSeek = (percent) => {
|
|
|
348
367
|
max-width: 100%;
|
|
349
368
|
max-height: 100%;
|
|
350
369
|
}
|
|
351
|
-
.
|
|
370
|
+
.video__video--not-activated {
|
|
371
|
+
visibility: hidden;
|
|
372
|
+
height: 0;
|
|
373
|
+
min-height: 0;
|
|
374
|
+
}
|
|
375
|
+
.video__overlay {
|
|
352
376
|
position: absolute;
|
|
353
377
|
left: 0;
|
|
354
378
|
top: 0;
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class ShortVideoAttachmentsLocalizationSvelte {
|
|
2
|
-
productsSection = $state('Products');
|
|
3
|
-
offersSection = $state('Offers');
|
|
4
|
-
productLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.productsSection = init?.productsSection || this.productsSection;
|
|
7
|
-
this.offersSection = init?.offersSection || this.offersSection;
|
|
8
|
-
this.productLocalization = init?.productLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class ShortVideoDetailsLocalization {
|
|
2
|
-
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
-
timeAgoLocalization = $state(undefined);
|
|
4
|
-
attachmentsLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.viewsCount = init?.viewsCount ? init.viewsCount : this.viewsCount;
|
|
7
|
-
this.timeAgoLocalization = init?.timeAgoLocalization;
|
|
8
|
-
this.attachmentsLocalization = init?.attachmentsLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
2
|
-
import type { IShortVideoProductLocalization } from './short-video-product-localization.svelte';
|
|
3
|
-
export interface IShortVideoViewerLocalization {
|
|
4
|
-
viewsCount?: (count: number) => string;
|
|
5
|
-
timeAgoLocalization?: ITimeAgoLocalization;
|
|
6
|
-
productLocalization?: IShortVideoProductLocalization;
|
|
7
|
-
}
|
|
8
|
-
export declare class ShortVideoViewerLocalization {
|
|
9
|
-
viewsCount: (count: number) => string;
|
|
10
|
-
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
11
|
-
productLocalization: IShortVideoProductLocalization | undefined;
|
|
12
|
-
constructor(init?: IShortVideoViewerLocalization);
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class ShortVideoViewerLocalization {
|
|
2
|
-
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
-
timeAgoLocalization = $state(undefined);
|
|
4
|
-
productLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.viewsCount = init?.viewsCount ? init.viewsCount : this.viewsCount;
|
|
7
|
-
this.timeAgoLocalization = init?.timeAgoLocalization;
|
|
8
|
-
this.productLocalization = init?.productLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IShortVideoDetailsLocalization } from '../short-video-viewer';
|
|
2
|
-
export interface IShortVideosPlayerLocalization {
|
|
3
|
-
shortVideoDetailsLocalization?: IShortVideoDetailsLocalization;
|
|
4
|
-
}
|
|
5
|
-
export declare class ShortVideosPlayerLocalization {
|
|
6
|
-
shortVideoDetailsLocalization: IShortVideoDetailsLocalization | undefined;
|
|
7
|
-
constructor(init?: IShortVideosPlayerLocalization);
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface IPriceStreamElementLocalization {
|
|
2
|
-
saveValue?: (value: string | number) => string;
|
|
3
|
-
beforeValue?: (value: string) => string;
|
|
4
|
-
}
|
|
5
|
-
export declare class PriceStreamElementLocalization {
|
|
6
|
-
saveValue: (value: string | number) => string;
|
|
7
|
-
beforeValue: (value: string) => string;
|
|
8
|
-
constructor(init?: IPriceStreamElementLocalization);
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export class PriceStreamElementLocalization {
|
|
2
|
-
saveValue = $state((value) => `Save ${value}`);
|
|
3
|
-
beforeValue = $state((value) => `Before ${value}`);
|
|
4
|
-
constructor(init) {
|
|
5
|
-
this.saveValue = init?.saveValue ?? this.saveValue;
|
|
6
|
-
this.beforeValue = init?.beforeValue ?? this.beforeValue;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IPriceStreamElementLocalization } from './price-stream-element-localization.svelte';
|
|
2
|
-
export interface IStreamElementLocalization {
|
|
3
|
-
priceElementLocalization?: IPriceStreamElementLocalization;
|
|
4
|
-
}
|
|
5
|
-
export declare class StreamElementLocalization {
|
|
6
|
-
priceElementLocalization: IPriceStreamElementLocalization | undefined;
|
|
7
|
-
constructor(init?: IStreamElementLocalization);
|
|
8
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IStreamElementLocalization } from '../layout/element-views';
|
|
2
|
-
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
3
|
-
export interface IStreamPageViewerLocalization {
|
|
4
|
-
viewsCount?: (count: number) => string;
|
|
5
|
-
timeAgoLocalization?: ITimeAgoLocalization;
|
|
6
|
-
elementsLocalization?: IStreamElementLocalization;
|
|
7
|
-
}
|
|
8
|
-
export declare class StreamPageViewerLocalization {
|
|
9
|
-
viewsCount: (count: number) => string;
|
|
10
|
-
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
11
|
-
elementsLocalization: IStreamElementLocalization | undefined;
|
|
12
|
-
constructor(init?: IStreamPageViewerLocalization);
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class StreamPageViewerLocalization {
|
|
2
|
-
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
-
timeAgoLocalization = $state(undefined);
|
|
4
|
-
elementsLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.viewsCount = init?.viewsCount ?? this.viewsCount;
|
|
7
|
-
this.timeAgoLocalization = init?.timeAgoLocalization ?? this.timeAgoLocalization;
|
|
8
|
-
this.elementsLocalization = init?.elementsLocalization ?? this.elementsLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IShortVideoDetailsLocalization } from '../../short-videos/short-video-viewer';
|
|
2
|
-
export interface IStreamPlayerLocalization {
|
|
3
|
-
streamNotFound?: string;
|
|
4
|
-
pagesCount?: (count: number) => string;
|
|
5
|
-
shortVideoDetailsLocalization?: IShortVideoDetailsLocalization;
|
|
6
|
-
}
|
|
7
|
-
export declare class StreamPlayerLocalization {
|
|
8
|
-
streamNotFound: string;
|
|
9
|
-
pagesCount: (count: number) => string;
|
|
10
|
-
shortVideoDetailsLocalization: IShortVideoDetailsLocalization | undefined;
|
|
11
|
-
constructor(init?: IStreamPlayerLocalization);
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class StreamPlayerLocalization {
|
|
2
|
-
streamNotFound = $state('Stream not found');
|
|
3
|
-
pagesCount = $state((count) => (count === 1 ? '1 page' : `${count} pages`));
|
|
4
|
-
shortVideoDetailsLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.streamNotFound = init?.streamNotFound || this.streamNotFound;
|
|
7
|
-
this.pagesCount = init?.pagesCount || this.pagesCount;
|
|
8
|
-
this.shortVideoDetailsLocalization = init?.shortVideoDetailsLocalization || this.shortVideoDetailsLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export class LineClampLocalization {
|
|
2
|
-
showLess = $state('Show less');
|
|
3
|
-
showMore = $state('Show more');
|
|
4
|
-
constructor(init) {
|
|
5
|
-
if (!init) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (init.showLess !== undefined) {
|
|
9
|
-
this.showLess = init.showLess;
|
|
10
|
-
}
|
|
11
|
-
if (init.showMore !== undefined) {
|
|
12
|
-
this.showMore = init.showMore;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export class TimeAgoLocalization {
|
|
2
|
-
locale = $state('en-US');
|
|
3
|
-
aMinuteAgo = $state('a minute ago');
|
|
4
|
-
anHourAgo = $state('an hour ago');
|
|
5
|
-
justNow = $state('just now');
|
|
6
|
-
at = $state((date, time) => `${date} at ${time}`);
|
|
7
|
-
hoursAgo = $state((hours) => `${hours} hours ago`);
|
|
8
|
-
minutesAgo = $state((minutes) => `${minutes} minutes ago`);
|
|
9
|
-
yesterday = $state((time) => `esterday at ${time}`);
|
|
10
|
-
constructor(init) {
|
|
11
|
-
if (!init) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (init.locale !== undefined) {
|
|
15
|
-
this.locale = init.locale;
|
|
16
|
-
}
|
|
17
|
-
if (init.aMinuteAgo !== undefined) {
|
|
18
|
-
this.aMinuteAgo = init.aMinuteAgo;
|
|
19
|
-
}
|
|
20
|
-
if (init.anHourAgo !== undefined) {
|
|
21
|
-
this.anHourAgo = init.anHourAgo;
|
|
22
|
-
}
|
|
23
|
-
if (init.justNow !== undefined) {
|
|
24
|
-
this.justNow = init.justNow;
|
|
25
|
-
}
|
|
26
|
-
if (init.at !== undefined) {
|
|
27
|
-
this.at = init.at;
|
|
28
|
-
}
|
|
29
|
-
if (init.hoursAgo !== undefined) {
|
|
30
|
-
this.hoursAgo = init.hoursAgo;
|
|
31
|
-
}
|
|
32
|
-
if (init.minutesAgo !== undefined) {
|
|
33
|
-
this.minutesAgo = init.minutesAgo;
|
|
34
|
-
}
|
|
35
|
-
if (init.yesterday !== undefined) {
|
|
36
|
-
this.yesterday = init.yesterday;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|