@streamscloud/embeddable 15.1.0-1770736445096 → 15.1.0-1770822240678
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/ads/ad-card/cmp.ad-card.svelte +7 -18
- package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +12 -14
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/browser.js +1 -1
- package/dist/core/continuation-token.d.ts +1 -11
- package/dist/core/continuation-token.js +1 -35
- package/dist/core/cursor-result.d.ts +1 -9
- package/dist/core/data-loaders/index.d.ts +2 -2
- package/dist/core/data-loaders/index.js +1 -1
- package/dist/core/deferred.d.ts +1 -6
- package/dist/core/deferred.js +1 -13
- package/dist/core/media/index.d.ts +1 -1
- package/dist/core/media/index.js +1 -1
- package/dist/core/toastr.d.ts +1 -1
- package/dist/core/toastr.js +1 -26
- package/dist/core/transitions/index.d.ts +1 -1
- package/dist/core/transitions/index.js +1 -1
- package/dist/core/utils/date-helper.d.ts +1 -29
- package/dist/core/utils/date-helper.js +1 -146
- package/dist/core/utils/html-helper.d.ts +1 -42
- package/dist/core/utils/html-helper.js +1 -104
- package/dist/core/utils/index.d.ts +1 -3
- package/dist/core/utils/index.js +1 -3
- package/dist/core/utils/string-generator.d.ts +1 -2
- package/dist/core/utils/string-generator.js +1 -15
- package/dist/external-api/data-providers/internal-media-center-data-provider.svelte.js +1 -2
- package/dist/media-center/config/types.d.ts +16 -0
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte.d.ts +13 -14
- package/dist/media-center/media-center/discover/community-features.svelte +4 -15
- package/dist/media-center/media-center/discover/community-features.svelte.d.ts +13 -10
- package/dist/media-center/media-center/discover/discover-header.svelte +3 -14
- package/dist/media-center/media-center/discover/discover-header.svelte.d.ts +13 -6
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/discover/discover-view.svelte +3 -15
- package/dist/media-center/media-center/discover/discover-view.svelte.d.ts +12 -11
- package/dist/media-center/media-center/footer/media-center-footer.svelte +1 -12
- package/dist/media-center/media-center/footer/media-center-footer.svelte.d.ts +13 -6
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte +1 -12
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte.d.ts +12 -10
- package/dist/media-center/media-center/header/media-center-header.svelte +2 -13
- package/dist/media-center/media-center/header/media-center-header.svelte.d.ts +12 -10
- package/dist/media-center/media-center/media-center-context.svelte.js +2 -0
- package/dist/media-center/media-center/media-center-view.svelte +1 -12
- package/dist/media-center/media-center/media-center-view.svelte.d.ts +13 -8
- package/dist/media-center/media-center/menu/category-following-wrapper.svelte +1 -12
- package/dist/media-center/media-center/menu/category-following-wrapper.svelte.d.ts +13 -10
- package/dist/media-center/media-center/menu/menu.svelte +3 -14
- package/dist/media-center/media-center/menu/menu.svelte.d.ts +12 -11
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +2 -13
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte.d.ts +13 -6
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +1 -12
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte.d.ts +12 -9
- package/dist/media-page/cmp.media-page.svelte +2 -0
- package/dist/media-page/cmp.media-page.svelte.d.ts +13 -10
- package/dist/posts/attachments/cmp.attachments.svelte +1 -12
- package/dist/posts/attachments/cmp.attachments.svelte.d.ts +12 -15
- package/dist/posts/controls/post-actions-handler.svelte.d.ts +1 -1
- package/dist/posts/controls/post-actions-handler.svelte.js +1 -2
- package/dist/posts/post-viewer/attachments-horizontal.svelte +4 -15
- package/dist/posts/post-viewer/attachments-horizontal.svelte.d.ts +12 -15
- package/dist/posts/post-viewer/cmp.post-viewer.svelte +1 -12
- package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +12 -23
- package/dist/posts/post-viewer/heading.svelte +3 -14
- package/dist/posts/post-viewer/heading.svelte.d.ts +13 -10
- package/dist/posts/post-viewer/media/post-media.svelte +1 -12
- package/dist/posts/post-viewer/media/post-media.svelte.d.ts +12 -12
- package/dist/posts/post-viewer/post-texts.svelte +1 -12
- package/dist/posts/post-viewer/post-texts.svelte.d.ts +13 -10
- package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +12 -21
- package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +12 -23
- package/dist/posts/posts-player/posts-player-view.svelte +1 -2
- package/dist/posts/posts-player/posts-player-view.svelte.d.ts +14 -4
- package/dist/products/product-card/cmp.product-card.svelte +4 -18
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +12 -15
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +4 -20
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte.d.ts +12 -10
- package/dist/streams/layout/cmp.layout.svelte +1 -12
- package/dist/streams/layout/cmp.layout.svelte.d.ts +12 -11
- package/dist/streams/layout/cmp.slot-content.svelte +1 -12
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +12 -14
- package/dist/streams/layout/cmp.slot.svelte +1 -12
- package/dist/streams/layout/cmp.slot.svelte.d.ts +13 -13
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +13 -6
- package/dist/streams/layout/element-views/cmp.button-stream-element.svelte.d.ts +13 -9
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +13 -12
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +13 -12
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte.d.ts +13 -8
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +13 -10
- package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte.d.ts +13 -12
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +12 -12
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte.d.ts +13 -8
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +13 -9
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +12 -16
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +13 -10
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +13 -10
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +13 -6
- package/dist/streams/layout/element-views/price-element-view.svelte +1 -12
- package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +12 -13
- package/dist/streams/layout/index.d.ts +1 -1
- package/dist/streams/layout/styles-transformer.d.ts +3 -3
- package/dist/streams/stream-card/cmp.stream-card.svelte +3 -17
- package/dist/streams/stream-card/cmp.stream-card.svelte.d.ts +12 -9
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +1 -12
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +12 -21
- package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +12 -24
- package/dist/streams/streams-player/stream-overview.svelte +1 -12
- package/dist/streams/streams-player/stream-overview.svelte.d.ts +12 -9
- package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +12 -26
- package/dist/streams/streams-player/streams-player-view.svelte +4 -16
- package/dist/streams/streams-player/streams-player-view.svelte.d.ts +14 -4
- package/dist/ui/button/index.d.ts +3 -3
- package/dist/ui/button/index.js +1 -3
- package/dist/ui/card-actions/cmp.card-action.svelte +2 -2
- package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +12 -8
- package/dist/ui/card-actions/cmp.card-actions.svelte +1 -12
- package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +13 -8
- package/dist/ui/card-actions/types.d.ts +1 -1
- package/dist/ui/card-actions/types.js +1 -1
- package/dist/ui/dropdown/cmp.dropdown.svelte +1 -12
- package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +12 -21
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +13 -6
- package/dist/ui/icon/index.d.ts +2 -2
- package/dist/ui/icon/index.js +1 -2
- package/dist/ui/icon/types.d.ts +1 -9
- package/dist/ui/icon/types.js +1 -10
- package/dist/ui/image/index.d.ts +1 -4
- package/dist/ui/image/index.js +1 -4
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +13 -10
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte.d.ts +13 -9
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +13 -10
- package/dist/ui/loading/cmp.loading.svelte +2 -16
- package/dist/ui/loading/cmp.loading.svelte.d.ts +13 -8
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +1 -12
- package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +12 -11
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +2 -16
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +12 -11
- package/dist/ui/player/button/cmp.mobile-player-buttons.svelte.d.ts +13 -6
- package/dist/ui/player/button/cmp.player-buttons.svelte.d.ts +13 -8
- package/dist/ui/player/button/cmp.responsive-player-buttons.svelte.d.ts +13 -7
- package/dist/ui/player/button/types.d.ts +1 -1
- package/dist/ui/player/button/types.js +1 -1
- package/dist/ui/player/player/cmp.player.svelte +1 -12
- package/dist/ui/player/player/cmp.player.svelte.d.ts +17 -31
- package/dist/ui/player/player/controls-and-attachments.svelte +1 -12
- package/dist/ui/player/player/controls-and-attachments.svelte.d.ts +17 -28
- package/dist/ui/player/player/overview-panel.svelte +1 -12
- package/dist/ui/player/player/overview-panel.svelte.d.ts +12 -12
- package/dist/ui/player/progress/cmp.chunks-progress.svelte +1 -12
- package/dist/ui/player/progress/cmp.chunks-progress.svelte.d.ts +13 -8
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.d.ts +2 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.d.ts +1 -1
- package/dist/ui/player/slider/cmp.player-slider.svelte +1 -12
- package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +17 -27
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte +1 -12
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +9 -26
- package/dist/ui/progress/cmp.progress.svelte +1 -12
- package/dist/ui/progress/cmp.progress.svelte.d.ts +13 -5
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +2 -16
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +13 -7
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +1 -12
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +12 -13
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +0 -11
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte.d.ts +13 -10
- package/dist/ui/shadow-dom/shadow-root-service.js +2 -2
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +1 -12
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +13 -7
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +13 -8
- package/dist/ui/video/cmp.video.svelte +6 -17
- package/dist/ui/video/cmp.video.svelte.d.ts +12 -25
- package/package.json +4 -15
- package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +0 -14
- package/dist/core/data-loaders/cursor-data-loader.svelte.js +0 -35
- package/dist/core/data-loaders/data-loader.d.ts +0 -4
- package/dist/core/data-loaders/data-loader.js +0 -1
- package/dist/core/media/image-helper.d.ts +0 -10
- package/dist/core/media/image-helper.js +0 -30
- package/dist/core/transitions/slide-horizontally.d.ts +0 -7
- package/dist/core/transitions/slide-horizontally.js +0 -55
- package/dist/core/utils/array-helper.d.ts +0 -23
- package/dist/core/utils/array-helper.js +0 -148
- package/dist/core/utils/dom-helper.d.ts +0 -12
- package/dist/core/utils/dom-helper.js +0 -76
- package/dist/core/utils/number-helper.d.ts +0 -6
- package/dist/core/utils/number-helper.js +0 -28
- package/dist/core/utils/string-helper.d.ts +0 -10
- package/dist/core/utils/string-helper.js +0 -53
- package/dist/core/utils/url-helper.d.ts +0 -3
- package/dist/core/utils/url-helper.js +0 -13
- package/dist/core/utils/utils.d.ts +0 -29
- package/dist/core/utils/utils.js +0 -104
- package/dist/ui/button/cmp.button.svelte +0 -10
- package/dist/ui/button/cmp.button.svelte.d.ts +0 -16
- package/dist/ui/button/cmp.options-button.svelte +0 -123
- package/dist/ui/button/cmp.options-button.svelte.d.ts +0 -20
- package/dist/ui/button/resources/button-base.svelte +0 -84
- package/dist/ui/button/resources/button-base.svelte.d.ts +0 -13
- package/dist/ui/button/resources/button-theme.svelte +0 -53
- package/dist/ui/button/resources/button-theme.svelte.d.ts +0 -10
- package/dist/ui/button/resources/button-types.d.ts +0 -20
- package/dist/ui/button/resources/button-types.js +0 -22
- package/dist/ui/icon/cmp.icon.svelte +0 -75
- package/dist/ui/icon/cmp.icon.svelte.d.ts +0 -8
- package/dist/ui/image/cmp.image-round.svelte +0 -41
- package/dist/ui/image/cmp.image-round.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-rounded.svelte +0 -64
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-stub.svelte +0 -31
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +0 -18
- package/dist/ui/image/cmp.image.svelte +0 -79
- package/dist/ui/image/cmp.image.svelte.d.ts +0 -13
- package/dist/ui/image/image-state.d.ts +0 -6
- package/dist/ui/image/image-state.js +0 -17
- package/dist/ui/shadow-dom/normalize-shadow.css +0 -350
- package/dist/ui/shadow-dom/reset-shadow.css +0 -176
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { enrichAdLinkWithTracking } from '../../marketing-tracking';
|
|
2
2
|
import { toPriceRepresentation } from '../../products/price-helper';
|
|
3
|
-
import { Button
|
|
3
|
+
import { Button } from '../../ui/button';
|
|
4
4
|
import { Image } from '../../ui/image';
|
|
5
5
|
import { LineClamp } from '../../ui/line-clamp';
|
|
6
6
|
let { ad, locale, trackingParams, inert = false, on } = $props();
|
|
@@ -68,7 +68,7 @@ const handleAdClick = () => {
|
|
|
68
68
|
<div class="ad-card__button-container">
|
|
69
69
|
{#if ad.ctaButton && enrichedLink && ad.ctaButton.text}
|
|
70
70
|
<div class="ad-card__button">
|
|
71
|
-
<Button size=
|
|
71
|
+
<Button size="standard" on={{ click: handleAdClick }} --button--font--size="1em" --button--min-width="100%">
|
|
72
72
|
<span class="ad-card__button-text">{ad.ctaButton.text}</span>
|
|
73
73
|
</Button>
|
|
74
74
|
</div>
|
|
@@ -77,18 +77,7 @@ const handleAdClick = () => {
|
|
|
77
77
|
</div>
|
|
78
78
|
</div>
|
|
79
79
|
|
|
80
|
-
<style
|
|
81
|
-
0% {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}
|
|
84
|
-
50% {
|
|
85
|
-
opacity: 0.4;
|
|
86
|
-
}
|
|
87
|
-
100% {
|
|
88
|
-
opacity: 1;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
.ad-card {
|
|
80
|
+
<style>.ad-card {
|
|
92
81
|
--_ad-card--background-color: var(--ad-card--background-color, rgb(from light-dark(#ffffff, #000000) r g b / 90%));
|
|
93
82
|
--_ad-card--border-color: var(--ad-card--border-color, light-dark(#f2f2f2, #000000));
|
|
94
83
|
--_ad-card--price-color: var(--ad-card--price-color, inherit);
|
|
@@ -145,7 +134,7 @@ const handleAdClick = () => {
|
|
|
145
134
|
}
|
|
146
135
|
@container (width < 230px) {
|
|
147
136
|
.ad-card__content {
|
|
148
|
-
gap: 0.
|
|
137
|
+
gap: 0.0938rem;
|
|
149
138
|
}
|
|
150
139
|
}
|
|
151
140
|
.ad-card__price-container {
|
|
@@ -176,13 +165,13 @@ const handleAdClick = () => {
|
|
|
176
165
|
@container (width < 230px) {
|
|
177
166
|
.ad-card__button-container {
|
|
178
167
|
min-height: 2rem;
|
|
179
|
-
margin-top: 0.
|
|
168
|
+
margin-top: 0.0938rem;
|
|
180
169
|
}
|
|
181
170
|
}
|
|
182
171
|
.ad-card__button-text {
|
|
183
172
|
display: block;
|
|
184
173
|
text-overflow: ellipsis;
|
|
185
|
-
width: 100%;
|
|
174
|
+
max-width: 100%;
|
|
186
175
|
white-space: nowrap;
|
|
187
176
|
overflow: hidden;
|
|
188
177
|
}
|
|
@@ -237,7 +226,7 @@ const handleAdClick = () => {
|
|
|
237
226
|
font-weight: 400;
|
|
238
227
|
font-style: normal;
|
|
239
228
|
font-size: 0.75rem;
|
|
240
|
-
line-height: 1.
|
|
229
|
+
line-height: 1.0913rem;
|
|
241
230
|
letter-spacing: 0;
|
|
242
231
|
text-align: right;
|
|
243
232
|
color: var(--sc-mc-color--text-secondary);
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
trackingParams: TrackingParams;
|
|
7
|
-
locale: Locale;
|
|
8
|
-
inert?: boolean;
|
|
9
|
-
on?: {
|
|
10
|
-
click?: (id: string) => void;
|
|
11
|
-
impression?: (id: string) => void;
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
12
6
|
};
|
|
7
|
+
slots: {};
|
|
13
8
|
};
|
|
14
|
-
|
|
15
|
-
type
|
|
16
|
-
export
|
|
9
|
+
export type CmpProps = typeof __propDef.props;
|
|
10
|
+
export type CmpEvents = typeof __propDef.events;
|
|
11
|
+
export type CmpSlots = typeof __propDef.slots;
|
|
12
|
+
export default class Cmp extends SvelteComponentTyped<CmpProps, CmpEvents, CmpSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
package/dist/core/browser.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { isBrowser as runningInBrowser } from '@streamscloud/kit/core/utils';
|
package/dist/core/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { isBrowser as runningInBrowser } from '@streamscloud/kit/core/utils';
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
canLoadMore: boolean;
|
|
3
|
-
value: string | null;
|
|
4
|
-
private constructor();
|
|
5
|
-
static init(): ContinuationToken;
|
|
6
|
-
static fromPayload(value: string | null): ContinuationToken;
|
|
7
|
-
static preventLoading(): ContinuationToken;
|
|
8
|
-
toNextChunkString(): string | null | undefined;
|
|
9
|
-
toString(): string | null;
|
|
10
|
-
toJSON(): string | null;
|
|
11
|
-
}
|
|
1
|
+
export { ContinuationToken } from '@streamscloud/kit/core';
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
canLoadMore;
|
|
3
|
-
value;
|
|
4
|
-
constructor(canLoadMore, value) {
|
|
5
|
-
this.canLoadMore = canLoadMore;
|
|
6
|
-
this.value = value;
|
|
7
|
-
}
|
|
8
|
-
static init() {
|
|
9
|
-
// initial state, no data is loaded so far
|
|
10
|
-
return new ContinuationToken(true, null);
|
|
11
|
-
}
|
|
12
|
-
static fromPayload(value) {
|
|
13
|
-
if (value?.length && value.length > 1 && value.length < 5000) {
|
|
14
|
-
// initialized with server response that there is more data, and value is valid
|
|
15
|
-
return new ContinuationToken(true, value);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
// initialized with server response that there is no more data or value is invalid
|
|
19
|
-
return new ContinuationToken(false, null);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
static preventLoading() {
|
|
23
|
-
// additional initilizer, to block further loading
|
|
24
|
-
return new ContinuationToken(false, null);
|
|
25
|
-
}
|
|
26
|
-
toNextChunkString() {
|
|
27
|
-
return this.canLoadMore ? this.value || undefined : this.value;
|
|
28
|
-
}
|
|
29
|
-
toString() {
|
|
30
|
-
return this.value;
|
|
31
|
-
}
|
|
32
|
-
toJSON() {
|
|
33
|
-
return this.value;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
export { ContinuationToken } from '@streamscloud/kit/core';
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export type CursorResult<T> = {
|
|
3
|
-
items: T[];
|
|
4
|
-
continuationToken: ContinuationToken;
|
|
5
|
-
};
|
|
6
|
-
export type CursorPayload<T> = {
|
|
7
|
-
items: T[];
|
|
8
|
-
continuationToken: string | null;
|
|
9
|
-
};
|
|
1
|
+
export type { CursorResult, CursorPayload } from '@streamscloud/kit/core';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CursorDataLoader } from '
|
|
2
|
-
export type { IDataLoader } from '
|
|
1
|
+
export { CursorDataLoader } from '@streamscloud/kit/core/data-loaders';
|
|
2
|
+
export type { IDataLoader } from '@streamscloud/kit/core/data-loaders';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CursorDataLoader } from '
|
|
1
|
+
export { CursorDataLoader } from '@streamscloud/kit/core/data-loaders';
|
package/dist/core/deferred.d.ts
CHANGED
package/dist/core/deferred.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
promise;
|
|
3
|
-
reject;
|
|
4
|
-
resolve;
|
|
5
|
-
constructor() {
|
|
6
|
-
this.resolve = () => ({});
|
|
7
|
-
this.reject = () => ({});
|
|
8
|
-
this.promise = new Promise((resolve, reject) => {
|
|
9
|
-
this.reject = reject;
|
|
10
|
-
this.resolve = resolve;
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
export { Deferred } from '@streamscloud/kit/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ImageHelper } from '
|
|
1
|
+
export { ImageHelper, type ImageSize } from '@streamscloud/kit/core/media';
|
|
2
2
|
export { ImageSizeDetectorService } from './images-size-detector.service';
|
|
3
3
|
export { type MediaItemModel, type MediaItemMetadataModel, type MediaItemWithMetadataModel } from './types';
|
|
4
4
|
export { getMediaItemImageUrl } from './media-item-url.service';
|
package/dist/core/media/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ImageHelper } from '
|
|
1
|
+
export { ImageHelper } from '@streamscloud/kit/core/media';
|
|
2
2
|
export { ImageSizeDetectorService } from './images-size-detector.service';
|
|
3
3
|
export {} from './types';
|
|
4
4
|
export { getMediaItemImageUrl } from './media-item-url.service';
|
package/dist/core/toastr.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Toastr, type ToastrAction, type ToastrOptions, type ToastrPromiseMessages } from '@streamscloud/kit/core/toastr';
|
package/dist/core/toastr.js
CHANGED
|
@@ -1,26 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
const toast = document.createElement('div');
|
|
3
|
-
toast.innerHTML = `
|
|
4
|
-
<span>${message}</span>
|
|
5
|
-
<span style="margin-left: auto; cursor: pointer; color: #666;" onclick="this.parentElement.remove()">x</span>
|
|
6
|
-
`;
|
|
7
|
-
Object.assign(toast.style, {
|
|
8
|
-
display: 'flex',
|
|
9
|
-
alignItems: 'center',
|
|
10
|
-
gap: '8px',
|
|
11
|
-
background: 'white',
|
|
12
|
-
color: 'black',
|
|
13
|
-
borderRadius: '5px',
|
|
14
|
-
padding: '12px 16px',
|
|
15
|
-
boxShadow: '0 2px 10px rgba(0, 0, 0, 0.1)',
|
|
16
|
-
position: 'fixed',
|
|
17
|
-
bottom: '10px',
|
|
18
|
-
right: '10px',
|
|
19
|
-
width: '300px',
|
|
20
|
-
borderLeft: '4px solid #e0a800',
|
|
21
|
-
borderBottom: '4px solid #e0a800',
|
|
22
|
-
zIndex: 1000
|
|
23
|
-
});
|
|
24
|
-
document.body.appendChild(toast);
|
|
25
|
-
setTimeout(() => toast.remove(), 5000);
|
|
26
|
-
};
|
|
1
|
+
export { Toastr } from '@streamscloud/kit/core/toastr';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { slideHorizontally } from '
|
|
1
|
+
export { slideHorizontally } from '@streamscloud/kit/core/transitions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { slideHorizontally } from '
|
|
1
|
+
export { slideHorizontally } from '@streamscloud/kit/core/transitions';
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
static toDate(date: LikeDate, resetTime?: boolean): Date;
|
|
3
|
-
static secondsToTimeRepresentation(seconds: number, duration: number): string;
|
|
4
|
-
static getDate(date: LikeDate): number;
|
|
5
|
-
static getYear(date: LikeDate): number;
|
|
6
|
-
static getMonthName(date: LikeDate, locale: string, short?: boolean): string;
|
|
7
|
-
static getWeekdayName(date: LikeDate, locale: string, short?: boolean): string;
|
|
8
|
-
static getMonthRange(date: LikeDate): MonthRange;
|
|
9
|
-
static daysInMonth(date: LikeDate): number;
|
|
10
|
-
static getDayOfWeek(date: LikeDate): number;
|
|
11
|
-
static getShiftedDate(date: LikeDate, daysShift: number): Date;
|
|
12
|
-
static getDateOnlyString(date?: LikeDate): string | null;
|
|
13
|
-
static formatDateRange(startDate: LikeDate, endDate: LikeDate, locale: string): string;
|
|
14
|
-
static dateRangeDescriptionString(startDate: LikeDate, endDate: LikeDate | null | undefined, locale: string): string;
|
|
15
|
-
}
|
|
16
|
-
export declare class DateFormatOptions {
|
|
17
|
-
static dateTimeFormat: Intl.DateTimeFormatOptions;
|
|
18
|
-
static dateTimeWithoutYearFormat: Intl.DateTimeFormatOptions;
|
|
19
|
-
static timeFormat: Intl.DateTimeFormatOptions;
|
|
20
|
-
static dateFormat: Intl.DateTimeFormatOptions;
|
|
21
|
-
static dateFormatWithoutYear: Intl.DateTimeFormatOptions;
|
|
22
|
-
static dateFullMonthFormat: Intl.DateTimeFormatOptions;
|
|
23
|
-
}
|
|
24
|
-
export type MonthRange = {
|
|
25
|
-
firstDay: Date;
|
|
26
|
-
lastDay: Date;
|
|
27
|
-
};
|
|
28
|
-
type LikeDate = string | number | Date;
|
|
29
|
-
export {};
|
|
1
|
+
export { DateHelper, DateFormatOptions, type MonthRange } from '@streamscloud/kit/core/utils';
|
|
@@ -1,146 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
static toDate(date, resetTime = false) {
|
|
3
|
-
date = new Date(date);
|
|
4
|
-
if (resetTime) {
|
|
5
|
-
date.setHours(0, 0, 0, 0);
|
|
6
|
-
}
|
|
7
|
-
return date;
|
|
8
|
-
}
|
|
9
|
-
static secondsToTimeRepresentation(seconds, duration) {
|
|
10
|
-
const longerThanHour = Math.floor(duration / 3600) > 0;
|
|
11
|
-
if (!seconds) {
|
|
12
|
-
return longerThanHour ? '0:00:00' : '0:00';
|
|
13
|
-
}
|
|
14
|
-
const hours = Math.floor(seconds / 3600);
|
|
15
|
-
const mins = Math.floor((seconds - hours * 3600) / 60);
|
|
16
|
-
seconds = seconds - hours * 3600 - mins * 60;
|
|
17
|
-
let res = '';
|
|
18
|
-
if (longerThanHour) {
|
|
19
|
-
if (hours) {
|
|
20
|
-
res += `${hours}:`;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
res += '0:';
|
|
24
|
-
}
|
|
25
|
-
if (mins < 10) {
|
|
26
|
-
res += '0';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
res += `${mins}:`;
|
|
30
|
-
if (seconds < 10) {
|
|
31
|
-
res += '0';
|
|
32
|
-
}
|
|
33
|
-
res += seconds;
|
|
34
|
-
return res;
|
|
35
|
-
}
|
|
36
|
-
static getDate(date) {
|
|
37
|
-
date = DateHelper.toDate(date);
|
|
38
|
-
return date.getDate();
|
|
39
|
-
}
|
|
40
|
-
static getYear(date) {
|
|
41
|
-
date = DateHelper.toDate(date);
|
|
42
|
-
return date.getFullYear();
|
|
43
|
-
}
|
|
44
|
-
static getMonthName(date, locale, short = false) {
|
|
45
|
-
date = DateHelper.toDate(date);
|
|
46
|
-
return date.toLocaleString(locale, { month: short ? 'short' : 'long' });
|
|
47
|
-
}
|
|
48
|
-
static getWeekdayName(date, locale, short = false) {
|
|
49
|
-
date = DateHelper.toDate(date);
|
|
50
|
-
return date.toLocaleString(locale, { weekday: short ? 'short' : 'long' });
|
|
51
|
-
}
|
|
52
|
-
static getMonthRange(date) {
|
|
53
|
-
date = DateHelper.toDate(date);
|
|
54
|
-
const fullYear = date.getFullYear();
|
|
55
|
-
const month = date.getMonth();
|
|
56
|
-
const firstDay = new Date(fullYear, month, 1);
|
|
57
|
-
const lastDay = new Date(fullYear, month + 1, 1);
|
|
58
|
-
lastDay.setMilliseconds(-1);
|
|
59
|
-
return { firstDay, lastDay };
|
|
60
|
-
}
|
|
61
|
-
static daysInMonth(date) {
|
|
62
|
-
date = DateHelper.toDate(date);
|
|
63
|
-
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
|
|
64
|
-
}
|
|
65
|
-
static getDayOfWeek(date) {
|
|
66
|
-
date = DateHelper.toDate(date);
|
|
67
|
-
const day = date.getDay();
|
|
68
|
-
return day === 0 ? 7 : day;
|
|
69
|
-
}
|
|
70
|
-
static getShiftedDate(date, daysShift) {
|
|
71
|
-
date = DateHelper.toDate(date);
|
|
72
|
-
date.setDate(date.getDate() + daysShift);
|
|
73
|
-
return date;
|
|
74
|
-
}
|
|
75
|
-
static getDateOnlyString(date) {
|
|
76
|
-
if (!date) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
date = DateHelper.toDate(date);
|
|
80
|
-
const year = date.getFullYear();
|
|
81
|
-
const month = date.getMonth() + 1;
|
|
82
|
-
const day = date.getDate();
|
|
83
|
-
return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
|
|
84
|
-
}
|
|
85
|
-
static formatDateRange(startDate, endDate, locale) {
|
|
86
|
-
const startTime = DateHelper.toDate(startDate);
|
|
87
|
-
const endTime = DateHelper.toDate(endDate);
|
|
88
|
-
const startMonthName = DateHelper.getMonthName(startDate, locale).toLocaleLowerCase();
|
|
89
|
-
const endMonthName = DateHelper.getMonthName(endDate, locale).toLocaleLowerCase();
|
|
90
|
-
const isSameDateWithStart = startTime.getDate() === endTime.getDate() && startTime.getMonth() === endTime.getMonth() && startTime.getFullYear() === endTime.getFullYear();
|
|
91
|
-
const isSameMonth = startTime.getMonth() === endTime.getMonth();
|
|
92
|
-
if (isSameDateWithStart) {
|
|
93
|
-
return `${startTime.getDate()}. ${startMonthName}`;
|
|
94
|
-
}
|
|
95
|
-
if (isSameMonth) {
|
|
96
|
-
return `${startTime.getDate()}. –${endTime.getDate()}. ${startMonthName}`;
|
|
97
|
-
}
|
|
98
|
-
return `${startTime.getDate()}. ${startMonthName} – ${endTime.getDate()}. ${endMonthName}`;
|
|
99
|
-
}
|
|
100
|
-
static dateRangeDescriptionString(startDate, endDate, locale) {
|
|
101
|
-
let eventTime;
|
|
102
|
-
const currentDate = new Date();
|
|
103
|
-
const startTime = DateHelper.toDate(startDate);
|
|
104
|
-
const getFormattedDate = (d) => {
|
|
105
|
-
const month = DateHelper.getMonthName(d, locale, false);
|
|
106
|
-
const date = d.getDate();
|
|
107
|
-
const year = d.getFullYear() === currentDate.getFullYear() ? '' : d.getFullYear().toString();
|
|
108
|
-
const dateString = [month, date, year].join(' ');
|
|
109
|
-
return dateString;
|
|
110
|
-
};
|
|
111
|
-
const getFormattedTime = (d) => {
|
|
112
|
-
return `${d.getHours().toString().padStart(2, '0')}:${d.getMinutes().toString().padStart(2, '0')}`;
|
|
113
|
-
};
|
|
114
|
-
const getWeekday = (d) => DateHelper.getWeekdayName(d, locale, false);
|
|
115
|
-
if (!endDate) {
|
|
116
|
-
eventTime = [getWeekday(startTime), getFormattedDate(startTime), getFormattedTime(startTime)].join(' · ');
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
const endTime = DateHelper.toDate(endDate);
|
|
120
|
-
const isSameDateWithStart = startTime.getDate() === endTime.getDate() && startTime.getMonth() === endTime.getMonth() && startTime.getFullYear() === endTime.getFullYear();
|
|
121
|
-
if (isSameDateWithStart) {
|
|
122
|
-
eventTime = [getWeekday(startTime), getFormattedDate(startTime), `${getFormattedTime(startTime)}-${getFormattedTime(endTime)}`].join(' · ');
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const getFormattedDateWithTime = (d) => [getFormattedDate(d), getFormattedTime(d)].join(' · ');
|
|
126
|
-
eventTime = `${getFormattedDateWithTime(startTime)} - ${getFormattedDateWithTime(endTime)}`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return eventTime;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
export class DateFormatOptions {
|
|
133
|
-
static dateTimeFormat = {
|
|
134
|
-
day: '2-digit',
|
|
135
|
-
month: 'short',
|
|
136
|
-
year: 'numeric',
|
|
137
|
-
hour: '2-digit',
|
|
138
|
-
minute: '2-digit',
|
|
139
|
-
hour12: false
|
|
140
|
-
};
|
|
141
|
-
static dateTimeWithoutYearFormat = { day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit', hour12: false };
|
|
142
|
-
static timeFormat = { hour: '2-digit', minute: '2-digit', hour12: false };
|
|
143
|
-
static dateFormat = { day: '2-digit', month: 'short', year: 'numeric' };
|
|
144
|
-
static dateFormatWithoutYear = { day: '2-digit', month: 'short' };
|
|
145
|
-
static dateFullMonthFormat = { day: '2-digit', month: 'long' };
|
|
146
|
-
}
|
|
1
|
+
export { DateHelper, DateFormatOptions } from '@streamscloud/kit/core/utils';
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
static clearSelection(): void;
|
|
3
|
-
static elementFromString(html: string): Element;
|
|
4
|
-
/**
|
|
5
|
-
* Replaces reserved html characters with html entities e.g. '<' with '<'
|
|
6
|
-
*/
|
|
7
|
-
static escapeSpecialChars(s: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* Inserts new element into DOM before specified sibling
|
|
10
|
-
* @param newElement Element to be inserted
|
|
11
|
-
* @param siblingElement Anchor element to determine new element position
|
|
12
|
-
* @return Returns nothing
|
|
13
|
-
*
|
|
14
|
-
* Usage
|
|
15
|
-
* DomHelper.insertBefore(siblingElement, newContentField);
|
|
16
|
-
*/
|
|
17
|
-
static insertBefore(newElement: Element, siblingElement: Element): void;
|
|
18
|
-
/**
|
|
19
|
-
* Inserts new element into DOM after specified sibling
|
|
20
|
-
* @param newElement Element to be inserted
|
|
21
|
-
* @param siblingElement Anchor element to determine new element position
|
|
22
|
-
* @return Returns nothing
|
|
23
|
-
*
|
|
24
|
-
* Usage
|
|
25
|
-
* DomHelper.insertAfter(siblingElement, newContentField);
|
|
26
|
-
*/
|
|
27
|
-
static insertAfter(newElement: Element, siblingElement: Element): void;
|
|
28
|
-
/**
|
|
29
|
-
* Inserts new element into DOM after/before specified sibling
|
|
30
|
-
* @param newElement Element to be inserted
|
|
31
|
-
* @param siblingElement Anchor element to determine new element position
|
|
32
|
-
* @param insertBefore Mark new position
|
|
33
|
-
* @return Returns nothing
|
|
34
|
-
*
|
|
35
|
-
* Usage
|
|
36
|
-
* DomHelper.insert(siblingElement, newContentField, false);
|
|
37
|
-
*/
|
|
38
|
-
static insert(newElement: Element, siblingElement: Element, insertBefore?: boolean): void;
|
|
39
|
-
static sanitizeHtml(html: string): string;
|
|
40
|
-
static sanitizeSvg(svg: string): string;
|
|
41
|
-
static pasteIntoInput(value: string, element: HTMLInputElement | HTMLTextAreaElement): void;
|
|
42
|
-
}
|
|
1
|
+
export { HtmlHelper } from '@streamscloud/kit/core/utils';
|
|
@@ -1,104 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export class HtmlHelper {
|
|
3
|
-
static clearSelection() {
|
|
4
|
-
if (window.getSelection) {
|
|
5
|
-
const selection = window.getSelection();
|
|
6
|
-
if (!selection) {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
if (selection.empty) {
|
|
10
|
-
// Chrome
|
|
11
|
-
selection.empty();
|
|
12
|
-
}
|
|
13
|
-
else if (selection.removeAllRanges) {
|
|
14
|
-
// Firefox
|
|
15
|
-
selection.removeAllRanges();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
static elementFromString(html) {
|
|
20
|
-
const wrapper = document.createElement('div');
|
|
21
|
-
wrapper.innerHTML = html;
|
|
22
|
-
const result = wrapper.firstElementChild;
|
|
23
|
-
wrapper.remove();
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Replaces reserved html characters with html entities e.g. '<' with '<'
|
|
28
|
-
*/
|
|
29
|
-
static escapeSpecialChars(s) {
|
|
30
|
-
return s.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Inserts new element into DOM before specified sibling
|
|
34
|
-
* @param newElement Element to be inserted
|
|
35
|
-
* @param siblingElement Anchor element to determine new element position
|
|
36
|
-
* @return Returns nothing
|
|
37
|
-
*
|
|
38
|
-
* Usage
|
|
39
|
-
* DomHelper.insertBefore(siblingElement, newContentField);
|
|
40
|
-
*/
|
|
41
|
-
static insertBefore(newElement, siblingElement) {
|
|
42
|
-
siblingElement.parentNode?.insertBefore(newElement, siblingElement);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Inserts new element into DOM after specified sibling
|
|
46
|
-
* @param newElement Element to be inserted
|
|
47
|
-
* @param siblingElement Anchor element to determine new element position
|
|
48
|
-
* @return Returns nothing
|
|
49
|
-
*
|
|
50
|
-
* Usage
|
|
51
|
-
* DomHelper.insertAfter(siblingElement, newContentField);
|
|
52
|
-
*/
|
|
53
|
-
static insertAfter(newElement, siblingElement) {
|
|
54
|
-
siblingElement.parentNode?.insertBefore(newElement, siblingElement.nextSibling);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Inserts new element into DOM after/before specified sibling
|
|
58
|
-
* @param newElement Element to be inserted
|
|
59
|
-
* @param siblingElement Anchor element to determine new element position
|
|
60
|
-
* @param insertBefore Mark new position
|
|
61
|
-
* @return Returns nothing
|
|
62
|
-
*
|
|
63
|
-
* Usage
|
|
64
|
-
* DomHelper.insert(siblingElement, newContentField, false);
|
|
65
|
-
*/
|
|
66
|
-
static insert(newElement, siblingElement, insertBefore = false) {
|
|
67
|
-
if (insertBefore) {
|
|
68
|
-
HtmlHelper.insertBefore(newElement, siblingElement);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
HtmlHelper.insertAfter(newElement, siblingElement);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
static sanitizeHtml(html) {
|
|
75
|
-
return dp.sanitize(html);
|
|
76
|
-
}
|
|
77
|
-
static sanitizeSvg(svg) {
|
|
78
|
-
return dp.sanitize(svg, { USE_PROFILES: { svg: true, svgFilters: true }, ADD_ATTR: ['dominant-baseline'] });
|
|
79
|
-
}
|
|
80
|
-
static pasteIntoInput(value, element) {
|
|
81
|
-
if (element.selectionStart || element.selectionStart === 0) {
|
|
82
|
-
const startPos = element.selectionStart;
|
|
83
|
-
const endPos = element.selectionEnd;
|
|
84
|
-
if (endPos === null) {
|
|
85
|
-
element.value = value;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
const beforeSelection = element.value.substring(0, startPos);
|
|
89
|
-
const afterSelection = element.value.substring(endPos, element.value.length);
|
|
90
|
-
element.value = `${beforeSelection}${value}${afterSelection}`;
|
|
91
|
-
}
|
|
92
|
-
const newCursor = startPos + value.length;
|
|
93
|
-
element.setSelectionRange(newCursor, newCursor);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
element.value += value;
|
|
97
|
-
}
|
|
98
|
-
element.dispatchEvent(new Event('input', {
|
|
99
|
-
bubbles: true,
|
|
100
|
-
cancelable: true
|
|
101
|
-
}));
|
|
102
|
-
element.focus();
|
|
103
|
-
}
|
|
104
|
-
}
|
|
1
|
+
export { HtmlHelper } from '@streamscloud/kit/core/utils';
|
package/dist/core/utils/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const randomNanoid: (size?: number) => string;
|
|
1
|
+
export { randomNanoid } from '@streamscloud/kit/core/utils';
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
3
|
-
export function generateString(length) {
|
|
4
|
-
let result = '';
|
|
5
|
-
const charactersLength = characters.length;
|
|
6
|
-
let counter = 0;
|
|
7
|
-
while (counter < length) {
|
|
8
|
-
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
9
|
-
counter += 1;
|
|
10
|
-
}
|
|
11
|
-
return result;
|
|
12
|
-
}
|
|
13
|
-
export const randomNanoid = (size = 15) => {
|
|
14
|
-
return nanoid(size);
|
|
15
|
-
};
|
|
1
|
+
export { randomNanoid } from '@streamscloud/kit/core/utils';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Status, StreamStatus } from '../../core/enums';
|
|
2
2
|
import { createLocalGQLClient } from '../../core/graphql';
|
|
3
|
-
import { brandColors } from '../../core/theme';
|
|
4
3
|
import { InternalMediaCenterAnalyticsHandler } from './internal-media-center-analytics-handler';
|
|
5
4
|
import { MockCategoryFollowingProvider, MockMediaCenterContentManagementHandler, MockMembershipHandler, MockNavigationHandler, MockPostSocialInteractionsHandler } from './mocks';
|
|
6
5
|
import { GetMediaPageConfigDocument } from './operations.generated';
|
|
@@ -38,9 +37,9 @@ export class InternalMediaCenterDataProvider {
|
|
|
38
37
|
: null,
|
|
39
38
|
contentCategories: config.menuSettings?.contentCategories || [],
|
|
40
39
|
categoryTagAssociations: config.menuSettings?.contentCategoryMenuItems || [],
|
|
40
|
+
playerColors: { light: null, dark: config.playerColors },
|
|
41
41
|
moments: config.moments
|
|
42
42
|
};
|
|
43
|
-
brandColors.set({ light: null, dark: config.playerColors });
|
|
44
43
|
}
|
|
45
44
|
return this.model;
|
|
46
45
|
};
|