@streamscloud/embeddable 1.2.0 → 2.0.1
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 +33 -0
- package/dist/core/enums.js +39 -0
- package/dist/core/graphql.d.ts +1 -1
- package/dist/core/graphql.js +2 -2
- package/dist/core/media/images-size-detector.service.d.ts +1 -1
- package/dist/core/media/images-size-detector.service.js +1 -1
- package/dist/core/media/index.d.ts +1 -1
- package/dist/core/media/index.js +1 -1
- package/dist/core/media/media-item-url.service.js +2 -1
- package/dist/core/media/types.d.ts +1 -16
- package/dist/core/media/types.js +1 -19
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- package/dist/products/price-helper.d.ts +2 -2
- package/dist/products/price-helper.js +20 -9
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte +74 -0
- package/dist/{advertising/ad-view/cmp.ad-view.svelte.d.ts → short-videos/short-video-viewer/cmp.ad.svelte.d.ts} +2 -3
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +70 -0
- package/dist/{streams/components/images/cmp.images-component.svelte.d.ts → short-videos/short-video-viewer/cmp.attachments-inline.svelte.d.ts} +2 -2
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +45 -48
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +4 -2
- package/dist/{streams/components/product/cmp.product-component.svelte → short-videos/short-video-viewer/cmp.product.svelte} +34 -26
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +10 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +31 -52
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +6 -6
- package/dist/short-videos/short-video-viewer/index.d.ts +6 -3
- package/dist/short-videos/short-video-viewer/index.js +4 -2
- package/dist/short-videos/short-video-viewer/mapper.js +35 -7
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/operations.generated.js +67 -103
- package/dist/short-videos/short-video-viewer/operations.graphql +29 -2
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.d.ts +12 -0
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.d.ts +3 -4
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +4 -15
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.d.ts +7 -0
- package/dist/{products/product-card/product-card-localization.svelte.js → short-videos/short-video-viewer/short-video-product-localization.svelte.js} +1 -1
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +3 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +4 -7
- package/dist/short-videos/short-video-viewer/types.d.ts +29 -6
- 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 +42 -35
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
- package/dist/short-videos/short-videos-player/index.d.ts +28 -2
- package/dist/short-videos/short-videos-player/index.js +40 -1
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +3 -9
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +2 -17
- package/dist/streams/layout/cmp.layout.svelte +34 -0
- package/dist/streams/{slots/cmp.stream-component-slot.svelte.d.ts → layout/cmp.layout.svelte.d.ts} +2 -2
- package/dist/streams/layout/cmp.slot-content.svelte +32 -0
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +9 -0
- package/dist/streams/layout/cmp.slot.svelte +26 -0
- package/dist/streams/layout/cmp.slot.svelte.d.ts +9 -0
- package/dist/streams/layout/component.d.ts +6 -0
- package/dist/streams/layout/component.js +1 -0
- package/dist/streams/layout/css-values.d.ts +10 -0
- package/dist/streams/layout/css-values.js +1 -0
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +16 -0
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +11 -0
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +38 -0
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +30 -0
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +97 -0
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +11 -0
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +6 -0
- package/dist/streams/{components/product/cmp.product-component.svelte.d.ts → layout/element-views/cmp.short-video-stream-element.svelte.d.ts} +2 -3
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +45 -0
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +60 -0
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +13 -0
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +23 -0
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +8 -0
- package/dist/{ui/shadow-dom/cmp.shadow-dom.svelte.d.ts → streams/layout/element-views/cmp.text-stream-element.svelte.d.ts} +2 -2
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -0
- package/dist/streams/layout/element-views/data-by-key-accessor.js +55 -0
- package/dist/streams/layout/element-views/index.d.ts +11 -0
- package/dist/streams/layout/element-views/index.js +9 -0
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +8 -0
- package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +8 -0
- package/dist/streams/layout/element-views/stream-element-localization.svelte.js +6 -0
- package/dist/streams/layout/elements.d.ts +51 -0
- package/dist/streams/layout/elements.js +1 -0
- package/dist/streams/layout/enums.d.ts +45 -0
- package/dist/streams/layout/enums.js +54 -0
- package/dist/streams/layout/index.d.ts +19 -0
- package/dist/streams/layout/index.js +15 -0
- package/dist/streams/layout/layout.d.ts +13 -0
- package/dist/streams/layout/models/index.d.ts +6 -0
- package/dist/streams/layout/models/index.js +1 -0
- package/dist/streams/layout/models/mapper.d.ts +3 -0
- package/dist/streams/layout/models/mapper.js +62 -0
- package/dist/streams/layout/models/stream-layout-blob-model.d.ts +4 -0
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +6 -0
- package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -0
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +11 -0
- package/dist/streams/layout/models/stream-layout-post-header-model.js +1 -0
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +19 -0
- package/dist/streams/layout/models/stream-layout-product-model.js +1 -0
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +31 -0
- package/dist/streams/layout/models/stream-layout-short-video-model.js +1 -0
- package/dist/streams/layout/serializer.d.ts +3 -0
- package/dist/streams/layout/serializer.js +6 -0
- package/dist/streams/layout/slot-data-input.d.ts +14 -0
- package/dist/streams/layout/slot-data-input.js +1 -0
- package/dist/streams/layout/slot-data.d.ts +18 -0
- package/dist/streams/layout/slot-data.js +1 -0
- package/dist/streams/layout/slot.d.ts +16 -0
- package/dist/streams/layout/slot.js +1 -0
- package/dist/streams/layout/styles-transformer.d.ts +13 -0
- package/dist/streams/layout/styles-transformer.js +140 -0
- package/dist/streams/layout/styles.d.ts +43 -0
- package/dist/streams/layout/styles.js +1 -0
- package/dist/streams/layout/type-guards.d.ts +8 -0
- package/dist/streams/layout/type-guards.js +21 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +8 -42
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -2
- package/dist/streams/stream-page-viewer/mapper.d.ts +1 -1
- package/dist/streams/stream-page-viewer/mapper.js +7 -8
- package/dist/streams/stream-page-viewer/operations.generated.d.ts +1 -104
- package/dist/streams/stream-page-viewer/operations.generated.js +2 -375
- package/dist/streams/stream-page-viewer/operations.graphql +1 -6
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +3 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +4 -7
- package/dist/streams/stream-page-viewer/types.d.ts +5 -5
- package/dist/streams/stream-player/cmp.stream-player.svelte +7 -3
- package/dist/streams/stream-player/controls.svelte +43 -35
- package/dist/streams/stream-player/index.d.ts +29 -2
- package/dist/streams/stream-player/index.js +44 -1
- package/dist/streams/stream-player/operations.generated.d.ts +1 -103
- package/dist/streams/stream-player/operations.generated.js +2 -375
- package/dist/streams/stream-player/stream-overview.svelte +2 -2
- package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +1 -1
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +1 -1
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +3 -9
- package/dist/streams/stream-player/stream-player-localization.svelte.js +4 -23
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +2 -1
- package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +2 -1
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +2 -1
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +2 -1
- package/dist/ui/shadow-dom/_normalize.scss +350 -0
- package/dist/ui/shadow-dom/_reset.scss +189 -0
- package/dist/ui/shadow-dom/index.d.ts +1 -1
- package/dist/ui/shadow-dom/index.js +1 -1
- package/dist/ui/shadow-dom/shadow-host.svelte.d.ts +8 -0
- package/dist/ui/shadow-dom/shadow-host.svelte.js +39 -0
- package/dist/ui/video/cmp.video.svelte +1 -1
- package/package.json +80 -26
- package/dist/advertising/ad-view/cmp.ad-view.svelte +0 -82
- package/dist/advertising/ad-view/index.d.ts +0 -2
- package/dist/advertising/ad-view/index.js +0 -1
- package/dist/advertising/ad-view/mapper.d.ts +0 -3
- package/dist/advertising/ad-view/mapper.js +0 -16
- package/dist/advertising/ad-view/operations.generated.d.ts +0 -17
- package/dist/advertising/ad-view/operations.generated.js +0 -46
- package/dist/advertising/ad-view/operations.graphql +0 -14
- package/dist/advertising/ad-view/types.d.ts +0 -10
- package/dist/advertising/index.d.ts +0 -1
- package/dist/advertising/index.js +0 -1
- package/dist/advertising/types.d.ts +0 -5
- package/dist/advertising/types.js +0 -6
- package/dist/products/index.d.ts +0 -1
- package/dist/products/index.js +0 -1
- package/dist/products/product-card/cmp.product-card.svelte +0 -121
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +0 -10
- package/dist/products/product-card/index.d.ts +0 -3
- package/dist/products/product-card/index.js +0 -3
- package/dist/products/product-card/mapper.d.ts +0 -3
- package/dist/products/product-card/mapper.js +0 -14
- package/dist/products/product-card/operations.generated.d.ts +0 -22
- package/dist/products/product-card/operations.generated.js +0 -65
- package/dist/products/product-card/operations.graphql +0 -19
- package/dist/products/product-card/product-card-localization.svelte.d.ts +0 -7
- package/dist/products/product-card/types.d.ts +0 -10
- package/dist/products/product-card/types.js +0 -1
- package/dist/products/types.d.ts +0 -5
- package/dist/products/types.js +0 -6
- package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte +0 -486
- package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte.d.ts +0 -3
- package/dist/short-videos/short-videos-player-modal/index.d.ts +0 -79
- package/dist/short-videos/short-videos-player-modal/index.js +0 -78
- package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.d.ts +0 -16
- package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.js +0 -13
- package/dist/streams/components/cmp.stream-page-component.svelte +0 -16
- package/dist/streams/components/cmp.stream-page-component.svelte.d.ts +0 -10
- package/dist/streams/components/components.factory.d.ts +0 -22
- package/dist/streams/components/components.factory.js +0 -34
- package/dist/streams/components/images/cmp.images-component.svelte +0 -7
- package/dist/streams/components/images/index.d.ts +0 -2
- package/dist/streams/components/images/index.js +0 -1
- package/dist/streams/components/images/types.d.ts +0 -8
- package/dist/streams/components/images/types.js +0 -5
- package/dist/streams/components/index.d.ts +0 -7
- package/dist/streams/components/index.js +0 -6
- package/dist/streams/components/mapper.d.ts +0 -3
- package/dist/streams/components/mapper.js +0 -43
- package/dist/streams/components/operations.generated.d.ts +0 -178
- package/dist/streams/components/operations.generated.js +0 -653
- package/dist/streams/components/operations.graphql +0 -35
- package/dist/streams/components/product/index.d.ts +0 -3
- package/dist/streams/components/product/index.js +0 -2
- package/dist/streams/components/product/mapper.d.ts +0 -3
- package/dist/streams/components/product/mapper.js +0 -14
- package/dist/streams/components/product/operations.generated.d.ts +0 -22
- package/dist/streams/components/product/operations.generated.js +0 -53
- package/dist/streams/components/product/operations.graphql +0 -19
- package/dist/streams/components/product/types.d.ts +0 -10
- package/dist/streams/components/product/types.js +0 -1
- package/dist/streams/components/short-video/cmp.short-video-component.svelte +0 -9
- package/dist/streams/components/short-video/cmp.short-video-component.svelte.d.ts +0 -10
- package/dist/streams/components/short-video/index.d.ts +0 -3
- package/dist/streams/components/short-video/index.js +0 -2
- package/dist/streams/components/short-video/mapper.d.ts +0 -3
- package/dist/streams/components/short-video/mapper.js +0 -4
- package/dist/streams/components/short-video/operations.generated.d.ts +0 -56
- package/dist/streams/components/short-video/operations.generated.js +0 -193
- package/dist/streams/components/short-video/operations.graphql +0 -3
- package/dist/streams/components/short-video/types.d.ts +0 -2
- package/dist/streams/components/stream-components-localization.svelte.d.ts +0 -10
- package/dist/streams/components/stream-components-localization.svelte.js +0 -13
- package/dist/streams/components/types.d.ts +0 -27
- package/dist/streams/components/types.js +0 -6
- package/dist/streams/slots/cmp.stream-component-slot.svelte +0 -35
- package/dist/streams/slots/index.d.ts +0 -3
- package/dist/streams/slots/index.js +0 -2
- package/dist/streams/slots/mapper.d.ts +0 -3
- package/dist/streams/slots/mapper.js +0 -18
- package/dist/streams/slots/operations.generated.d.ts +0 -17
- package/dist/streams/slots/operations.generated.js +0 -34
- package/dist/streams/slots/operations.graphql +0 -14
- package/dist/streams/slots/styles-transformer.d.ts +0 -6
- package/dist/streams/slots/styles-transformer.js +0 -12
- package/dist/streams/slots/types.d.ts +0 -16
- package/dist/streams/slots/types.js +0 -1
- package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte +0 -487
- package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte.d.ts +0 -3
- package/dist/streams/stream-player-modal/index.d.ts +0 -79
- package/dist/streams/stream-player-modal/index.js +0 -78
- package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.d.ts +0 -17
- package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.js +0 -14
- package/dist/ui/shadow-dom/cmp.shadow-dom.svelte +0 -26
- /package/dist/{advertising/ad-view/types.js → streams/layout/layout.js} +0 -0
- /package/dist/streams/{components/short-video/types.js → layout/models/stream-layout-blob-model.js} +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
fragment StreamComponentPayloadFragment on StreamComponent {
|
|
2
|
-
slotId
|
|
3
|
-
type
|
|
4
|
-
params {
|
|
5
|
-
shortVideo {
|
|
6
|
-
...ShortVideoStreamComponentParamsFragment
|
|
7
|
-
}
|
|
8
|
-
images {
|
|
9
|
-
...ImagesStreamComponentParamsFragment
|
|
10
|
-
}
|
|
11
|
-
product {
|
|
12
|
-
...ProductStreamComponentParamsFragment
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
fragment ShortVideoStreamComponentParamsFragment on ShortVideoStreamComponentParams {
|
|
18
|
-
data {
|
|
19
|
-
...ShortVideoStreamComponentDataFragment
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
fragment ImagesStreamComponentParamsFragment on ImagesStreamComponentParams {
|
|
24
|
-
images {
|
|
25
|
-
id
|
|
26
|
-
url
|
|
27
|
-
}
|
|
28
|
-
mode
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
fragment ProductStreamComponentParamsFragment on ProductStreamComponentParams {
|
|
32
|
-
data {
|
|
33
|
-
...ProductStreamComponentDataFragment
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getMediaItemImageUrl } from '../../../core/media';
|
|
2
|
-
import { shouldUseSalePrice } from '../../../products/price-helper';
|
|
3
|
-
export const mapToProductComponentData = (payload) => {
|
|
4
|
-
const effectiveSalePrice = payload.priceAndAvailability.productSalePrices?.find((x) => shouldUseSalePrice(payload.priceAndAvailability.price, x.salePrice, x.salePriceEffectiveDateFrom, x.salePriceEffectiveDateTo));
|
|
5
|
-
return {
|
|
6
|
-
id: payload.id,
|
|
7
|
-
title: payload.title,
|
|
8
|
-
image: payload.media[0] ? getMediaItemImageUrl(payload.media[0]) : null,
|
|
9
|
-
link: payload.link,
|
|
10
|
-
currency: payload.priceAndAvailability.currency,
|
|
11
|
-
price: payload.priceAndAvailability.price,
|
|
12
|
-
salePrice: effectiveSalePrice?.salePrice || null
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type * as SchemaTypes from '../../../../gql/types';
|
|
2
|
-
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
-
export type ProductStreamComponentDataFragment = {
|
|
4
|
-
title: string;
|
|
5
|
-
id: string;
|
|
6
|
-
link: string | null;
|
|
7
|
-
media: Array<{
|
|
8
|
-
url: string;
|
|
9
|
-
thumbnailUrl: string | null;
|
|
10
|
-
type: SchemaTypes.MediaType;
|
|
11
|
-
}>;
|
|
12
|
-
priceAndAvailability: {
|
|
13
|
-
currency: SchemaTypes.Currency;
|
|
14
|
-
price: number;
|
|
15
|
-
productSalePrices: Array<{
|
|
16
|
-
salePrice: number;
|
|
17
|
-
salePriceEffectiveDateFrom: any | null;
|
|
18
|
-
salePriceEffectiveDateTo: any | null;
|
|
19
|
-
}> | null;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare const ProductStreamComponentDataFragmentDoc: DocumentNode<ProductStreamComponentDataFragment, unknown>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export const ProductStreamComponentDataFragmentDoc = {
|
|
2
|
-
kind: 'Document',
|
|
3
|
-
definitions: [
|
|
4
|
-
{
|
|
5
|
-
kind: 'FragmentDefinition',
|
|
6
|
-
name: { kind: 'Name', value: 'ProductStreamComponentDataFragment' },
|
|
7
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
|
|
8
|
-
selectionSet: {
|
|
9
|
-
kind: 'SelectionSet',
|
|
10
|
-
selections: [
|
|
11
|
-
{
|
|
12
|
-
kind: 'Field',
|
|
13
|
-
name: { kind: 'Name', value: 'media' },
|
|
14
|
-
selectionSet: {
|
|
15
|
-
kind: 'SelectionSet',
|
|
16
|
-
selections: [
|
|
17
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
18
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
|
|
19
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
24
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
25
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
26
|
-
{
|
|
27
|
-
kind: 'Field',
|
|
28
|
-
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
29
|
-
selectionSet: {
|
|
30
|
-
kind: 'SelectionSet',
|
|
31
|
-
selections: [
|
|
32
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
33
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
34
|
-
{
|
|
35
|
-
kind: 'Field',
|
|
36
|
-
name: { kind: 'Name', value: 'productSalePrices' },
|
|
37
|
-
selectionSet: {
|
|
38
|
-
kind: 'SelectionSet',
|
|
39
|
-
selections: [
|
|
40
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
41
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
42
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
fragment ProductStreamComponentDataFragment on Product {
|
|
2
|
-
media {
|
|
3
|
-
url
|
|
4
|
-
thumbnailUrl
|
|
5
|
-
type
|
|
6
|
-
}
|
|
7
|
-
title
|
|
8
|
-
id
|
|
9
|
-
link
|
|
10
|
-
priceAndAvailability {
|
|
11
|
-
currency
|
|
12
|
-
price
|
|
13
|
-
productSalePrices {
|
|
14
|
-
salePrice
|
|
15
|
-
salePriceEffectiveDateFrom
|
|
16
|
-
salePriceEffectiveDateTo
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { Currency } from '../../../products';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { ShortVideosViewer } from '../../../short-videos/short-video-viewer';
|
|
2
|
-
import { StreamComponentsLocalization } from '../stream-components-localization.svelte';
|
|
3
|
-
let { model, autoplay = true, localization } = $props();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<ShortVideosViewer
|
|
7
|
-
model={model}
|
|
8
|
-
autoplay={autoplay ? 'on-appearance' : false}
|
|
9
|
-
localization={{ viewsCount: localization.viewsCount, timeAgoLocalization: localization.timeAgoLocalization }} />
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StreamComponentsLocalization } from '../stream-components-localization.svelte';
|
|
2
|
-
import type { ShortVideoStreamComponentData } from './types';
|
|
3
|
-
type Props = {
|
|
4
|
-
model: ShortVideoStreamComponentData;
|
|
5
|
-
autoplay?: boolean;
|
|
6
|
-
localization: StreamComponentsLocalization;
|
|
7
|
-
};
|
|
8
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
9
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
10
|
-
export default Cmp;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ShortVideoStreamComponentDataFragment } from './operations.generated';
|
|
2
|
-
import type { ShortVideoStreamComponentData } from './types';
|
|
3
|
-
export declare const mapToShortVideoStreamComponentData: (payload: ShortVideoStreamComponentDataFragment) => ShortVideoStreamComponentData;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type * as SchemaTypes from '../../../../gql/types';
|
|
2
|
-
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
-
export type ShortVideoStreamComponentDataFragment = {
|
|
4
|
-
id: string;
|
|
5
|
-
enableSocialInteractions: boolean;
|
|
6
|
-
postHeading: {
|
|
7
|
-
sourceImage: string | null;
|
|
8
|
-
sourceName: string;
|
|
9
|
-
postDisplayDate: any;
|
|
10
|
-
postViewsCount: number;
|
|
11
|
-
};
|
|
12
|
-
allProducts: Array<{
|
|
13
|
-
title: string;
|
|
14
|
-
id: string;
|
|
15
|
-
link: string | null;
|
|
16
|
-
media: Array<{
|
|
17
|
-
url: string;
|
|
18
|
-
thumbnailUrl: string | null;
|
|
19
|
-
type: SchemaTypes.MediaType;
|
|
20
|
-
}>;
|
|
21
|
-
priceAndAvailability: {
|
|
22
|
-
currency: SchemaTypes.Currency;
|
|
23
|
-
price: number;
|
|
24
|
-
productSalePrices: Array<{
|
|
25
|
-
salePrice: number;
|
|
26
|
-
salePriceEffectiveDateFrom: any | null;
|
|
27
|
-
salePriceEffectiveDateTo: any | null;
|
|
28
|
-
}> | null;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
ad: {
|
|
32
|
-
id: string;
|
|
33
|
-
title: string;
|
|
34
|
-
description: string | null;
|
|
35
|
-
buttonText: string | null;
|
|
36
|
-
buttonUrl: string | null;
|
|
37
|
-
openLinkInNewWindow: boolean | null;
|
|
38
|
-
type: SchemaTypes.AdType;
|
|
39
|
-
media: Array<{
|
|
40
|
-
type: SchemaTypes.MediaType;
|
|
41
|
-
url: string;
|
|
42
|
-
thumbnailUrl: string | null;
|
|
43
|
-
}>;
|
|
44
|
-
} | null;
|
|
45
|
-
postData: {
|
|
46
|
-
media: Array<{
|
|
47
|
-
url: string;
|
|
48
|
-
thumbnailUrl: string | null;
|
|
49
|
-
type: SchemaTypes.MediaType;
|
|
50
|
-
}>;
|
|
51
|
-
shortVideoData: {
|
|
52
|
-
text: string | null;
|
|
53
|
-
} | null;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export declare const ShortVideoStreamComponentDataFragmentDoc: DocumentNode<ShortVideoStreamComponentDataFragment, unknown>;
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
export const ShortVideoStreamComponentDataFragmentDoc = {
|
|
2
|
-
kind: 'Document',
|
|
3
|
-
definitions: [
|
|
4
|
-
{
|
|
5
|
-
kind: 'FragmentDefinition',
|
|
6
|
-
name: { kind: 'Name', value: 'ShortVideoStreamComponentDataFragment' },
|
|
7
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
8
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } }] }
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
kind: 'FragmentDefinition',
|
|
12
|
-
name: { kind: 'Name', value: 'ProductCardPayloadFragment' },
|
|
13
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
|
|
14
|
-
selectionSet: {
|
|
15
|
-
kind: 'SelectionSet',
|
|
16
|
-
selections: [
|
|
17
|
-
{
|
|
18
|
-
kind: 'Field',
|
|
19
|
-
name: { kind: 'Name', value: 'media' },
|
|
20
|
-
selectionSet: {
|
|
21
|
-
kind: 'SelectionSet',
|
|
22
|
-
selections: [
|
|
23
|
-
{
|
|
24
|
-
kind: 'Field',
|
|
25
|
-
name: { kind: 'Name', value: 'url' },
|
|
26
|
-
arguments: [
|
|
27
|
-
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
kind: 'Field',
|
|
32
|
-
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
33
|
-
arguments: [
|
|
34
|
-
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
42
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
43
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
44
|
-
{
|
|
45
|
-
kind: 'Field',
|
|
46
|
-
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
47
|
-
selectionSet: {
|
|
48
|
-
kind: 'SelectionSet',
|
|
49
|
-
selections: [
|
|
50
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
51
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
52
|
-
{
|
|
53
|
-
kind: 'Field',
|
|
54
|
-
name: { kind: 'Name', value: 'productSalePrices' },
|
|
55
|
-
selectionSet: {
|
|
56
|
-
kind: 'SelectionSet',
|
|
57
|
-
selections: [
|
|
58
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
59
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
60
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
kind: 'FragmentDefinition',
|
|
72
|
-
name: { kind: 'Name', value: 'AdViewPayloadFragment' },
|
|
73
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Ad' } },
|
|
74
|
-
selectionSet: {
|
|
75
|
-
kind: 'SelectionSet',
|
|
76
|
-
selections: [
|
|
77
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
78
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
79
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
80
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'buttonText' } },
|
|
81
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'buttonUrl' } },
|
|
82
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'openLinkInNewWindow' } },
|
|
83
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
84
|
-
{
|
|
85
|
-
kind: 'Field',
|
|
86
|
-
name: { kind: 'Name', value: 'media' },
|
|
87
|
-
selectionSet: {
|
|
88
|
-
kind: 'SelectionSet',
|
|
89
|
-
selections: [
|
|
90
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
91
|
-
{
|
|
92
|
-
kind: 'Field',
|
|
93
|
-
name: { kind: 'Name', value: 'url' },
|
|
94
|
-
arguments: [
|
|
95
|
-
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
kind: 'Field',
|
|
100
|
-
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
101
|
-
arguments: [
|
|
102
|
-
{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
kind: 'FragmentDefinition',
|
|
113
|
-
name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
|
|
114
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
115
|
-
selectionSet: {
|
|
116
|
-
kind: 'SelectionSet',
|
|
117
|
-
selections: [
|
|
118
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
119
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
|
|
120
|
-
{
|
|
121
|
-
kind: 'Field',
|
|
122
|
-
name: { kind: 'Name', value: 'postHeading' },
|
|
123
|
-
selectionSet: {
|
|
124
|
-
kind: 'SelectionSet',
|
|
125
|
-
selections: [
|
|
126
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'sourceImage' } },
|
|
127
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'sourceName' } },
|
|
128
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'postDisplayDate' } },
|
|
129
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'postViewsCount' } }
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
kind: 'Field',
|
|
135
|
-
name: { kind: 'Name', value: 'allProducts' },
|
|
136
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductCardPayloadFragment' } }] }
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
kind: 'Field',
|
|
140
|
-
name: { kind: 'Name', value: 'ad' },
|
|
141
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'AdViewPayloadFragment' } }] }
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
kind: 'Field',
|
|
145
|
-
name: { kind: 'Name', value: 'postData' },
|
|
146
|
-
selectionSet: {
|
|
147
|
-
kind: 'SelectionSet',
|
|
148
|
-
selections: [
|
|
149
|
-
{
|
|
150
|
-
kind: 'Field',
|
|
151
|
-
name: { kind: 'Name', value: 'media' },
|
|
152
|
-
selectionSet: {
|
|
153
|
-
kind: 'SelectionSet',
|
|
154
|
-
selections: [
|
|
155
|
-
{
|
|
156
|
-
kind: 'Field',
|
|
157
|
-
name: { kind: 'Name', value: 'url' },
|
|
158
|
-
arguments: [
|
|
159
|
-
{
|
|
160
|
-
kind: 'Argument',
|
|
161
|
-
name: { kind: 'Name', value: 'scale' },
|
|
162
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
163
|
-
}
|
|
164
|
-
]
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
kind: 'Field',
|
|
168
|
-
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
169
|
-
arguments: [
|
|
170
|
-
{
|
|
171
|
-
kind: 'Argument',
|
|
172
|
-
name: { kind: 'Name', value: 'scale' },
|
|
173
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
178
|
-
]
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
kind: 'Field',
|
|
183
|
-
name: { kind: 'Name', value: 'shortVideoData' },
|
|
184
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
185
|
-
}
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
]
|
|
193
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
2
|
-
export interface IStreamComponentsLocalization {
|
|
3
|
-
viewsCount?: (count: number) => string;
|
|
4
|
-
timeAgoLocalization?: ITimeAgoLocalization;
|
|
5
|
-
}
|
|
6
|
-
export declare class StreamComponentsLocalization {
|
|
7
|
-
viewsCount: (count: number) => string;
|
|
8
|
-
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
9
|
-
constructor(init?: IStreamComponentsLocalization);
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export class StreamComponentsLocalization {
|
|
2
|
-
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
-
timeAgoLocalization = $state(undefined);
|
|
4
|
-
constructor(init) {
|
|
5
|
-
if (!init) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (init.viewsCount !== undefined) {
|
|
9
|
-
this.viewsCount = init.viewsCount;
|
|
10
|
-
}
|
|
11
|
-
this.timeAgoLocalization = init.timeAgoLocalization;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ImagesComponentData } from './images';
|
|
2
|
-
import type { ProductComponentData } from './product';
|
|
3
|
-
import type { ShortVideoStreamComponentData } from './short-video';
|
|
4
|
-
export type StreamComponentModel = ImagesStreamComponentModel | ShortVideoStreamComponentModel | ProductStreamComponentModel;
|
|
5
|
-
export type ImagesStreamComponentModel = {
|
|
6
|
-
type: StreamComponentType.Images;
|
|
7
|
-
id: string;
|
|
8
|
-
slotId: string;
|
|
9
|
-
data: ImagesComponentData;
|
|
10
|
-
};
|
|
11
|
-
export type ShortVideoStreamComponentModel = {
|
|
12
|
-
type: StreamComponentType.ShortVideo;
|
|
13
|
-
id: string;
|
|
14
|
-
slotId: string;
|
|
15
|
-
data: ShortVideoStreamComponentData;
|
|
16
|
-
};
|
|
17
|
-
export type ProductStreamComponentModel = {
|
|
18
|
-
type: StreamComponentType.Product;
|
|
19
|
-
id: string;
|
|
20
|
-
slotId: string;
|
|
21
|
-
data: ProductComponentData;
|
|
22
|
-
};
|
|
23
|
-
export declare enum StreamComponentType {
|
|
24
|
-
Images = "IMAGES",
|
|
25
|
-
Product = "PRODUCT",
|
|
26
|
-
ShortVideo = "SHORT_VIDEO"
|
|
27
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { generatePaddingsCssVar } from './styles-transformer';
|
|
2
|
-
let { model, children } = $props();
|
|
3
|
-
const computeStyles = (settings) => {
|
|
4
|
-
const values = [`width: ${settings.width}%`, `height: ${settings.height}%`, `top: ${settings.top}%`, `left: ${settings.left}%`];
|
|
5
|
-
if (settings.styles) {
|
|
6
|
-
values.push(`padding: ${generatePaddingsCssVar(settings.styles)}`);
|
|
7
|
-
}
|
|
8
|
-
return values.join(';');
|
|
9
|
-
};
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<div class="slot" style={computeStyles(model)}>
|
|
13
|
-
<div class="slot__content">
|
|
14
|
-
{@render children()}
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<style>@keyframes fadeIn {
|
|
19
|
-
0% {
|
|
20
|
-
opacity: 1;
|
|
21
|
-
}
|
|
22
|
-
50% {
|
|
23
|
-
opacity: 0.4;
|
|
24
|
-
}
|
|
25
|
-
100% {
|
|
26
|
-
opacity: 1;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
.slot {
|
|
30
|
-
position: absolute;
|
|
31
|
-
}
|
|
32
|
-
.slot__content {
|
|
33
|
-
width: 100%;
|
|
34
|
-
height: 100%;
|
|
35
|
-
}</style>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export const mapToStreamComponentSlotModel = (payload) => {
|
|
2
|
-
return {
|
|
3
|
-
id: payload.id,
|
|
4
|
-
allowedComponents: payload.allowedComponents,
|
|
5
|
-
top: payload.top,
|
|
6
|
-
left: payload.left,
|
|
7
|
-
width: payload.width,
|
|
8
|
-
height: payload.height,
|
|
9
|
-
styles: payload.styles
|
|
10
|
-
? {
|
|
11
|
-
paddingTop: payload.styles.paddingTop,
|
|
12
|
-
paddingRight: payload.styles.paddingRight,
|
|
13
|
-
paddingBottom: payload.styles.paddingBottom,
|
|
14
|
-
paddingLeft: payload.styles.paddingLeft
|
|
15
|
-
}
|
|
16
|
-
: null
|
|
17
|
-
};
|
|
18
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type * as SchemaTypes from '../../../gql/types';
|
|
2
|
-
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
-
export type StreamComponentSlotFragment = {
|
|
4
|
-
id: string;
|
|
5
|
-
allowedComponents: Array<SchemaTypes.StreamComponentType>;
|
|
6
|
-
top: number;
|
|
7
|
-
left: number;
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
styles: {
|
|
11
|
-
paddingTop: number;
|
|
12
|
-
paddingRight: number;
|
|
13
|
-
paddingBottom: number;
|
|
14
|
-
paddingLeft: number;
|
|
15
|
-
} | null;
|
|
16
|
-
};
|
|
17
|
-
export declare const StreamComponentSlotFragmentDoc: DocumentNode<StreamComponentSlotFragment, unknown>;
|