@streamscloud/embeddable 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/ads/ad-card/cmp.ad-card.svelte +34 -7
  2. package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +1 -1
  3. package/dist/ads/ad-card/mapper.js +1 -0
  4. package/dist/ads/ad-card/operations.generated.d.ts +1 -0
  5. package/dist/ads/ad-card/operations.generated.js +1 -0
  6. package/dist/ads/ad-card/operations.graphql +1 -0
  7. package/dist/ads/ad-card/types.d.ts +1 -0
  8. package/dist/products/product-card/cmp.product-card.svelte +3 -2
  9. package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte +24 -13
  10. package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte.d.ts +2 -2
  11. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +4 -3
  12. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +3 -2
  13. package/dist/short-videos/short-video-viewer/index.d.ts +2 -2
  14. package/dist/short-videos/short-video-viewer/index.js +1 -1
  15. package/dist/short-videos/short-video-viewer/mapper.d.ts +1 -1
  16. package/dist/short-videos/short-video-viewer/mapper.js +38 -5
  17. package/dist/short-videos/short-video-viewer/operations.generated.d.ts +1 -0
  18. package/dist/short-videos/short-video-viewer/operations.generated.js +87 -98
  19. package/dist/short-videos/short-video-viewer/operations.graphql +40 -2
  20. package/dist/short-videos/short-video-viewer/types.d.ts +35 -6
  21. package/dist/short-videos/short-video-viewer/types.js +1 -1
  22. package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +2 -2
  23. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +3 -1
  24. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +4 -0
  25. package/dist/short-videos/short-videos-player/controls.svelte +37 -20
  26. package/dist/short-videos/short-videos-player/controls.svelte.d.ts +2 -1
  27. package/dist/short-videos/short-videos-player/index.js +6 -0
  28. package/dist/short-videos/short-videos-player/operations.generated.d.ts +1 -0
  29. package/dist/short-videos/short-videos-player/operations.generated.js +73 -84
  30. package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +19 -6
  31. package/dist/short-videos/short-videos-player/short-videos-player-view.svelte.d.ts +4 -0
  32. package/dist/short-videos/short-videos-player/types.d.ts +9 -9
  33. package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +1 -0
  34. package/dist/short-videos/short-videos-player/ui-manager.svelte.js +2 -1
  35. package/dist/streams/layout/models/mapper.js +2 -1
  36. package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +1 -0
  37. package/dist/streams/stream-player/cmp.stream-player.svelte +6 -4
  38. package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +2 -0
  39. package/dist/streams/stream-player/controls.svelte +25 -5
  40. package/dist/streams/stream-player/controls.svelte.d.ts +2 -0
  41. package/dist/streams/stream-player/index.d.ts +2 -0
  42. package/dist/streams/stream-player/index.js +2 -1
  43. package/dist/streams/stream-player/mapper.d.ts +1 -1
  44. package/dist/streams/stream-player/mapper.js +1 -1
  45. package/dist/streams/stream-player/ui-manager.svelte.d.ts +1 -0
  46. package/dist/streams/stream-player/ui-manager.svelte.js +2 -1
  47. package/dist/ui/line-clamp/cmp.line-clamp.svelte +35 -13
  48. package/dist/ui/player/cmp.player-slider.svelte +74 -9
  49. package/dist/ui/progress/cmp.progress.svelte +4 -1
  50. package/dist/ui/seek-bar/cmp.seek-bar.svelte +112 -28
  51. package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +3 -0
  52. package/dist/ui/video/cmp.video.svelte +45 -37
  53. package/dist/ui/video/cmp.video.svelte.d.ts +2 -0
  54. package/dist/ui/video/index.d.ts +1 -0
  55. package/dist/ui/video/index.js +1 -0
  56. package/dist/ui/video/types.d.ts +4 -0
  57. package/dist/ui/video/types.js +5 -0
  58. package/package.json +5 -1
@@ -2,7 +2,7 @@
2
2
  import { Button, ButtonSize } from '../../ui/button';
3
3
  import { Image } from '../../ui/image';
4
4
  import { LineClamp } from '../../ui/line-clamp';
5
- let { ad, inert } = $props();
5
+ let { ad, inert = false } = $props();
6
6
  </script>
7
7
 
8
8
  <div class="ad-card" inert={inert}>
@@ -24,7 +24,12 @@ let { ad, inert } = $props();
24
24
  </div>
25
25
  <div class="ad-card__price-container">
26
26
  {#if ad.price && ad.currency}
27
- <div class="ad-card__price">{toPriceRepresentation({ amount: ad.price, currency: ad.currency })}</div>
27
+ <div class="ad-card__price">
28
+ {#if ad.priceInfoLabel}
29
+ <span class="ad-card__price-info-label">{ad.priceInfoLabel}</span>
30
+ {/if}
31
+ {toPriceRepresentation({ amount: ad.price, currency: ad.currency })}
32
+ </div>
28
33
  {/if}
29
34
  </div>
30
35
  <div class="ad-card__button-container">
@@ -62,7 +67,8 @@ let { ad, inert } = $props();
62
67
  position: relative;
63
68
  container-type: inline-size;
64
69
  aspect-ratio: 10/16;
65
- background-color: #ffffff;
70
+ color: #000000;
71
+ background-color: rgba(255, 255, 255, 0.9);
66
72
  border: 0.038125rem solid #f2f2f3;
67
73
  border-radius: 0.5rem;
68
74
  padding: 0.75rem 0.75rem 1.125rem;
@@ -70,6 +76,11 @@ let { ad, inert } = $props();
70
76
  gap: 0.5rem;
71
77
  /* Set 'container-type: inline-size;' to reference container*/
72
78
  }
79
+ :global([data-theme="dark"]) .ad-card {
80
+ background-color: rgba(18, 18, 18, 0.9);
81
+ color: #ffffff;
82
+ border-color: #1e1e1e;
83
+ }
73
84
  @container (width < 230px) {
74
85
  .ad-card {
75
86
  padding: 0.5rem 0.5rem 0.75rem;
@@ -179,6 +190,9 @@ let { ad, inert } = $props();
179
190
  font-size: 1.875rem;
180
191
  font-weight: 700;
181
192
  text-align: right;
193
+ display: flex;
194
+ align-items: end;
195
+ gap: 0.625rem;
182
196
  /* Set 'container-type: inline-size;' to reference container*/
183
197
  }
184
198
  @container (width < 230px) {
@@ -186,8 +200,21 @@ let { ad, inert } = $props();
186
200
  font-size: 1.25rem;
187
201
  }
188
202
  }
189
- :global([data-theme="dark"]) .ad-card {
190
- background-color: #121212;
191
- color: #ffffff;
192
- border-color: #1e1e1e;
203
+ .ad-card__price-info-label {
204
+ font-family: "Inter", sans-serif;
205
+ font-weight: 400;
206
+ font-style: normal;
207
+ font-size: 0.75rem;
208
+ line-height: 1.125rem;
209
+ letter-spacing: 0;
210
+ text-align: right;
211
+ color: #6b7280;
212
+ white-space: nowrap;
213
+ /* Set 'container-type: inline-size;' to reference container*/
214
+ }
215
+ @container (width < 230px) {
216
+ .ad-card__price-info-label {
217
+ font-size: 0.625rem;
218
+ line-height: 0.875rem;
219
+ }
193
220
  }</style>
@@ -1,7 +1,7 @@
1
1
  import type { AdCardModel } from './types';
2
2
  type Props = {
3
3
  ad: AdCardModel;
4
- inert: boolean;
4
+ inert?: boolean;
5
5
  };
6
6
  declare const Cmp: import("svelte").Component<Props, {}, "">;
7
7
  type Cmp = ReturnType<typeof Cmp>;
@@ -7,6 +7,7 @@ export const mapToAdCardModel = (payload) => {
7
7
  title: payload.title,
8
8
  description: payload.description,
9
9
  price: payload.price,
10
+ priceInfoLabel: payload.priceInfo,
10
11
  currency: payload.currency,
11
12
  ctaButton: payload.ctaButton
12
13
  };
@@ -6,6 +6,7 @@ export type AdCardPayloadFragment = {
6
6
  description: string | null;
7
7
  price: number | null;
8
8
  currency: SchemaTypes.Currency | null;
9
+ priceInfo: string | null;
9
10
  type: SchemaTypes.AdType;
10
11
  ctaButton: {
11
12
  background: string;
@@ -13,6 +13,7 @@ export const AdCardPayloadFragmentDoc = {
13
13
  { kind: 'Field', name: { kind: 'Name', value: 'description' } },
14
14
  { kind: 'Field', name: { kind: 'Name', value: 'price' } },
15
15
  { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
16
+ { kind: 'Field', name: { kind: 'Name', value: 'priceInfo' } },
16
17
  {
17
18
  kind: 'Field',
18
19
  name: { kind: 'Name', value: 'ctaButton' },
@@ -4,6 +4,7 @@ fragment AdCardPayloadFragment on Ad {
4
4
  description
5
5
  price
6
6
  currency
7
+ priceInfo
7
8
  ctaButton {
8
9
  background
9
10
  textColor
@@ -7,6 +7,7 @@ export type AdCardModel = {
7
7
  description: string | null;
8
8
  price: number | null;
9
9
  currency: Currency | null;
10
+ priceInfoLabel: string | null;
10
11
  ctaButton: {
11
12
  background: string;
12
13
  textColor: string;
@@ -77,7 +77,8 @@ const onProductClicked = (event) => {
77
77
  position: relative;
78
78
  container-type: inline-size;
79
79
  aspect-ratio: 10/16;
80
- background-color: #ffffff;
80
+ color: #000000;
81
+ background-color: rgba(255, 255, 255, 0.9);
81
82
  border: 0.038125rem solid #f2f2f3;
82
83
  border-radius: 0.5rem;
83
84
  padding: 0.75rem 0.75rem 1.125rem;
@@ -85,7 +86,7 @@ const onProductClicked = (event) => {
85
86
  /* Set 'container-type: inline-size;' to reference container*/
86
87
  }
87
88
  :global([data-theme="dark"]) .product-card {
88
- background-color: #121212;
89
+ background-color: rgba(18, 18, 18, 0.9);
89
90
  color: #ffffff;
90
91
  border-color: #1e1e1e;
91
92
  }
@@ -15,9 +15,13 @@ import IconShare from '@fluentui/svg-icons/icons/share_28_regular.svg?raw';
15
15
  import IconShoppingBag from '@fluentui/svg-icons/icons/shopping_bag_28_regular.svg?raw';
16
16
  import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_28_regular.svg?raw';
17
17
  import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_28_regular.svg?raw';
18
- let { model, socialInteractions, on } = $props();
19
- const showSocialInteractions = $derived(!!socialInteractions && model.enableSocialInteractions);
20
- let isLiked = $state(false);
18
+ let { model, socialInteractionsHandler, on } = $props();
19
+ const showSocialInteractions = $derived(!!socialInteractionsHandler && model.enableSocialInteractions);
20
+ let isLikedStore = $state.raw({
21
+ get isLiked() {
22
+ return false;
23
+ }
24
+ });
21
25
  const availableActionsCount = $derived.by(() => {
22
26
  let actionsCount = 0;
23
27
  if (model.products.length || model.ad) {
@@ -42,24 +46,22 @@ const onMuteClicked = () => {
42
46
  MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
43
47
  };
44
48
  const onLikeClicked = () => __awaiter(void 0, void 0, void 0, function* () {
45
- if (!socialInteractions) {
49
+ if (!socialInteractionsHandler) {
46
50
  return;
47
51
  }
48
- yield socialInteractions.onToggleLike(model.id);
49
- yield refreshIsLiked();
52
+ yield socialInteractionsHandler.onToggleLike(model.id);
50
53
  });
51
54
  const onShareClicked = () => __awaiter(void 0, void 0, void 0, function* () {
52
- if (!socialInteractions) {
55
+ if (!socialInteractionsHandler) {
53
56
  return;
54
57
  }
55
- yield socialInteractions.onShare(model.id);
58
+ yield socialInteractionsHandler.onShare(model.id);
56
59
  });
57
60
  const refreshIsLiked = () => __awaiter(void 0, void 0, void 0, function* () {
58
- if (!socialInteractions) {
61
+ if (!socialInteractionsHandler) {
59
62
  return;
60
63
  }
61
- console.warn('refereshIsLiked called');
62
- isLiked = yield socialInteractions.isLiked(model.id);
64
+ isLikedStore = yield socialInteractionsHandler.isLiked(model.id);
63
65
  });
64
66
  </script>
65
67
 
@@ -72,8 +74,13 @@ const refreshIsLiked = () => __awaiter(void 0, void 0, void 0, function* () {
72
74
  {/if}
73
75
 
74
76
  {#if showSocialInteractions}
75
- <button type="button" class="short-video-controls__action" onclick={onLikeClicked} aria-label="none" class:short-video-controls__action--liked={isLiked}>
76
- <Icon src={isLiked ? IconHeartFilled : IconHeart} />
77
+ <button
78
+ type="button"
79
+ class="short-video-controls__action"
80
+ onclick={onLikeClicked}
81
+ aria-label="none"
82
+ class:short-video-controls__action--liked={isLikedStore.isLiked}>
83
+ <Icon src={isLikedStore.isLiked ? IconHeartFilled : IconHeart} />
77
84
  </button>
78
85
 
79
86
  <button type="button" class="short-video-controls__action" onclick={onShareClicked}>
@@ -131,4 +138,8 @@ const refreshIsLiked = () => __awaiter(void 0, void 0, void 0, function* () {
131
138
  }
132
139
  .short-video-controls__action--liked {
133
140
  --icon--color: #e71d36;
141
+ }
142
+ .short-video-controls__action:hover {
143
+ transform: scale(1.2);
144
+ transition: 0.3s;
134
145
  }</style>
@@ -1,4 +1,4 @@
1
- import type { ShortVideoSocialInteractions } from './types';
1
+ import type { ShortVideoSocialInteractionsHanlder } from './types';
2
2
  type Props = {
3
3
  model: {
4
4
  id: string;
@@ -9,7 +9,7 @@ type Props = {
9
9
  isImage: boolean;
10
10
  };
11
11
  };
12
- socialInteractions?: ShortVideoSocialInteractions;
12
+ socialInteractionsHandler?: ShortVideoSocialInteractionsHanlder;
13
13
  on?: {
14
14
  attachmentsClicked?: () => void;
15
15
  };
@@ -6,7 +6,7 @@ import { default as ShortVideoControls } from './cmp.short-video-controls.svelte
6
6
  import { default as ShortVideoHeading } from './cmp.short-video-heading.svelte';
7
7
  import { ShortVideoViewerLocalization } from './short-video-viewer-localization';
8
8
  import { ShortVideoViewerUiManager } from './ui-manager.svelte';
9
- let { model, availableSideSpace = 0, showAttachments = true, showControls = true, autoplay = 'on-appearance', localization: localizationInit, on } = $props();
9
+ let { model, socialInteractionsHandler, availableSideSpace = 0, showAttachments = true, showControls = true, autoplay = 'on-appearance', localization: localizationInit = 'en', on } = $props();
10
10
  const localization = $derived(new ShortVideoViewerLocalization(localizationInit));
11
11
  let actionsPanelRef = $state.raw(null);
12
12
  const uiManager = new ShortVideoViewerUiManager();
@@ -59,7 +59,7 @@ $effect(() => {
59
59
  <AttachmentsInline model={model} />
60
60
  {/if}
61
61
  {#if uiManager.showControls}
62
- <ShortVideoControls model={model} on={{ attachmentsClicked: uiManager.toggleEnableAttachments }} />
62
+ <ShortVideoControls model={model} socialInteractionsHandler={socialInteractionsHandler} on={{ attachmentsClicked: uiManager.toggleEnableAttachments }} />
63
63
  {/if}
64
64
  </div>
65
65
  <div class="short-video-viewer__description">
@@ -70,7 +70,7 @@ $effect(() => {
70
70
  {/if}
71
71
  <div class="short-video-viewer__text">
72
72
  {#if model.text}
73
- <LineClamp value={model.text} maxLines={2} />
73
+ <LineClamp value={model.text} maxLines={2} enableShowMore={true} />
74
74
  {/if}
75
75
  </div>
76
76
  </div>
@@ -155,4 +155,5 @@ $effect(() => {
155
155
  color: #ffffff;
156
156
  font-size: 1.125rem;
157
157
  font-weight: 400;
158
+ text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
158
159
  }</style>
@@ -1,13 +1,14 @@
1
1
  import type { Locale } from '../../core/locale';
2
2
  import { type IShortVideoViewerLocalization } from './short-video-viewer-localization';
3
- import type { ShortVideoViewerModel } from './types';
3
+ import type { ShortVideoSocialInteractionsHanlder, ShortVideoViewerModel } from './types';
4
4
  type Props = {
5
5
  model: ShortVideoViewerModel;
6
+ socialInteractionsHandler?: ShortVideoSocialInteractionsHanlder;
6
7
  availableSideSpace?: number;
7
8
  showAttachments?: boolean;
8
9
  showControls?: boolean;
9
10
  autoplay?: true | false | 'on-appearance';
10
- localization: IShortVideoViewerLocalization | Locale;
11
+ localization?: IShortVideoViewerLocalization | Locale;
11
12
  on?: {
12
13
  progress?: (progress: number) => void;
13
14
  };
@@ -2,7 +2,7 @@ export { default as ShortVideoViewer } from './cmp.short-video-viewer.svelte';
2
2
  export { default as ShortVideoControls } from './cmp.short-video-controls.svelte';
3
3
  export { default as ShortVideoViewerAttachments } from './cmp.attachments.svelte';
4
4
  export { default as ShortVideoViewerAttachmentsInline } from './cmp.attachments-inline.svelte';
5
- export type { ShortVideoViewerModel, ShortVideoSocialInteractions } from './types';
5
+ export type { ShortVideoViewerModel, ShortVideoSocialInteractionsHanlder, ShortVideoAdCardModel, ShortVideoProductCardModel } from './types';
6
6
  export type { IShortVideoViewerLocalization } from './short-video-viewer-localization';
7
7
  export type { IShortVideoAttachmentsLocalization } from './short-video-attachments-localization';
8
- export { mapShortVideoViewerModel } from './mapper';
8
+ export { mapToShortVideoViewerModel } from './mapper';
@@ -2,4 +2,4 @@ export { default as ShortVideoViewer } from './cmp.short-video-viewer.svelte';
2
2
  export { default as ShortVideoControls } from './cmp.short-video-controls.svelte';
3
3
  export { default as ShortVideoViewerAttachments } from './cmp.attachments.svelte';
4
4
  export { default as ShortVideoViewerAttachmentsInline } from './cmp.attachments-inline.svelte';
5
- export { mapShortVideoViewerModel } from './mapper';
5
+ export { mapToShortVideoViewerModel } from './mapper';
@@ -1,3 +1,3 @@
1
1
  import type { ShortVideoViewerPayloadFragment } from './operations.generated';
2
2
  import type { ShortVideoViewerModel } from './types';
3
- export declare const mapShortVideoViewerModel: (payload: ShortVideoViewerPayloadFragment) => ShortVideoViewerModel;
3
+ export declare const mapToShortVideoViewerModel: (payload: ShortVideoViewerPayloadFragment) => ShortVideoViewerModel;
@@ -1,7 +1,7 @@
1
- import { mapToAdCardModel } from '../../ads/ad-card';
2
1
  import { MediaType } from '../../core/enums';
3
- import { mapToProductCard } from '../../products/product-card';
4
- export const mapShortVideoViewerModel = (payload) => {
2
+ import { getMediaItemImageUrl } from '../../core/media';
3
+ import { shouldUseSalePrice } from '../../products/price-helper';
4
+ export const mapToShortVideoViewerModel = (payload) => {
5
5
  const mediaBlob = payload.postData.media[0];
6
6
  return {
7
7
  id: payload.id,
@@ -15,8 +15,8 @@ export const mapShortVideoViewerModel = (payload) => {
15
15
  text: payload.postData.shortVideoData.text,
16
16
  enableSocialInteractions: payload.enableSocialInteractions,
17
17
  heading: null,
18
- ad: payload.ad ? mapToAdCardModel(payload.ad) : null,
19
- products: payload.allProducts.map((x) => mapToProductCard(x))
18
+ ad: payload.ad ? mapToShortVideoAdCardModel(payload.ad) : null,
19
+ products: payload.allProducts.map((x) => mapToShortVideoProductCard(x))
20
20
  // uncomment if you want to test many products behavior
21
21
  // .flatMap(x =>
22
22
  // Array.from({ length: 20 }, (_, i) => ({
@@ -26,3 +26,36 @@ export const mapShortVideoViewerModel = (payload) => {
26
26
  // )
27
27
  };
28
28
  };
29
+ const mapToShortVideoAdCardModel = (payload) => {
30
+ return {
31
+ id: payload.id,
32
+ type: payload.type,
33
+ image: getMediaItemImageUrl(payload.media[0]),
34
+ title: payload.title,
35
+ description: payload.description,
36
+ price: payload.price,
37
+ priceInfoLabel: payload.priceInfo,
38
+ currency: payload.currency,
39
+ ctaButton: payload.ctaButton
40
+ };
41
+ };
42
+ const mapToShortVideoProductCard = (payload, referenceDate) => {
43
+ const effectiveSalePrice = payload.priceAndAvailability.productSalePrices?.find((x) => shouldUseSalePrice({
44
+ price: payload.priceAndAvailability.price,
45
+ salePrice: x.salePrice,
46
+ effectiveDateFrom: x.salePriceEffectiveDateFrom,
47
+ effectiveDateTo: x.salePriceEffectiveDateTo,
48
+ referenceDate
49
+ }));
50
+ return {
51
+ id: payload.id,
52
+ title: payload.title,
53
+ shortDescription: payload.shortDescription,
54
+ link: payload.link,
55
+ brandName: payload.brand?.name || null,
56
+ image: getMediaItemImageUrl(payload.media[0]),
57
+ currency: payload.priceAndAvailability.currency,
58
+ price: payload.priceAndAvailability.price,
59
+ salePrice: effectiveSalePrice?.salePrice ?? null
60
+ };
61
+ };
@@ -31,6 +31,7 @@ export type ShortVideoViewerPayloadFragment = {
31
31
  title: string;
32
32
  description: string | null;
33
33
  price: number | null;
34
+ priceInfo: string | null;
34
35
  currency: SchemaTypes.Currency | null;
35
36
  type: SchemaTypes.AdType;
36
37
  ctaButton: {
@@ -13,12 +13,97 @@ export const ShortVideoViewerPayloadFragmentDoc = {
13
13
  {
14
14
  kind: 'Field',
15
15
  name: { kind: 'Name', value: 'allProducts' },
16
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductCardPayloadFragment' } }] }
16
+ selectionSet: {
17
+ kind: 'SelectionSet',
18
+ selections: [
19
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
20
+ { kind: 'Field', name: { kind: 'Name', value: 'title' } },
21
+ { kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
22
+ { kind: 'Field', name: { kind: 'Name', value: 'link' } },
23
+ {
24
+ kind: 'Field',
25
+ name: { kind: 'Name', value: 'media' },
26
+ selectionSet: {
27
+ kind: 'SelectionSet',
28
+ selections: [
29
+ { kind: 'Field', name: { kind: 'Name', value: 'url' } },
30
+ { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
31
+ { kind: 'Field', name: { kind: 'Name', value: 'type' } }
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ kind: 'Field',
37
+ name: { kind: 'Name', value: 'brand' },
38
+ selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
39
+ },
40
+ {
41
+ kind: 'Field',
42
+ name: { kind: 'Name', value: 'priceAndAvailability' },
43
+ selectionSet: {
44
+ kind: 'SelectionSet',
45
+ selections: [
46
+ { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
47
+ { kind: 'Field', name: { kind: 'Name', value: 'price' } },
48
+ {
49
+ kind: 'Field',
50
+ name: { kind: 'Name', value: 'productSalePrices' },
51
+ selectionSet: {
52
+ kind: 'SelectionSet',
53
+ selections: [
54
+ { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
55
+ { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
56
+ { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
57
+ ]
58
+ }
59
+ }
60
+ ]
61
+ }
62
+ }
63
+ ]
64
+ }
17
65
  },
18
66
  {
19
67
  kind: 'Field',
20
68
  name: { kind: 'Name', value: 'ad' },
21
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'AdCardPayloadFragment' } }] }
69
+ selectionSet: {
70
+ kind: 'SelectionSet',
71
+ selections: [
72
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
73
+ { kind: 'Field', name: { kind: 'Name', value: 'title' } },
74
+ { kind: 'Field', name: { kind: 'Name', value: 'description' } },
75
+ { kind: 'Field', name: { kind: 'Name', value: 'price' } },
76
+ { kind: 'Field', name: { kind: 'Name', value: 'priceInfo' } },
77
+ { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
78
+ {
79
+ kind: 'Field',
80
+ name: { kind: 'Name', value: 'ctaButton' },
81
+ selectionSet: {
82
+ kind: 'SelectionSet',
83
+ selections: [
84
+ { kind: 'Field', name: { kind: 'Name', value: 'background' } },
85
+ { kind: 'Field', name: { kind: 'Name', value: 'textColor' } },
86
+ { kind: 'Field', name: { kind: 'Name', value: 'text' } },
87
+ { kind: 'Field', name: { kind: 'Name', value: 'url' } },
88
+ { kind: 'Field', name: { kind: 'Name', value: 'border' } }
89
+ ]
90
+ }
91
+ },
92
+ { kind: 'Field', name: { kind: 'Name', value: 'type' } },
93
+ {
94
+ kind: 'Field',
95
+ name: { kind: 'Name', value: 'media' },
96
+ selectionSet: {
97
+ kind: 'SelectionSet',
98
+ selections: [
99
+ { kind: 'Field', name: { kind: 'Name', value: 'url' } },
100
+ { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
101
+ { kind: 'Field', name: { kind: 'Name', value: 'type' } }
102
+ ]
103
+ }
104
+ }
105
+ ]
106
+ }
22
107
  },
23
108
  {
24
109
  kind: 'Field',
@@ -68,102 +153,6 @@ export const ShortVideoViewerPayloadFragmentDoc = {
68
153
  }
69
154
  ]
70
155
  }
71
- },
72
- {
73
- kind: 'FragmentDefinition',
74
- name: { kind: 'Name', value: 'ProductCardPayloadFragment' },
75
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
76
- selectionSet: {
77
- kind: 'SelectionSet',
78
- selections: [
79
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
80
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
81
- { kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
82
- { kind: 'Field', name: { kind: 'Name', value: 'link' } },
83
- {
84
- kind: 'Field',
85
- name: { kind: 'Name', value: 'media' },
86
- selectionSet: {
87
- kind: 'SelectionSet',
88
- selections: [
89
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
90
- { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
91
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
92
- ]
93
- }
94
- },
95
- {
96
- kind: 'Field',
97
- name: { kind: 'Name', value: 'brand' },
98
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
99
- },
100
- {
101
- kind: 'Field',
102
- name: { kind: 'Name', value: 'priceAndAvailability' },
103
- selectionSet: {
104
- kind: 'SelectionSet',
105
- selections: [
106
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
107
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
108
- {
109
- kind: 'Field',
110
- name: { kind: 'Name', value: 'productSalePrices' },
111
- selectionSet: {
112
- kind: 'SelectionSet',
113
- selections: [
114
- { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
115
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
116
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
117
- ]
118
- }
119
- }
120
- ]
121
- }
122
- }
123
- ]
124
- }
125
- },
126
- {
127
- kind: 'FragmentDefinition',
128
- name: { kind: 'Name', value: 'AdCardPayloadFragment' },
129
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Ad' } },
130
- selectionSet: {
131
- kind: 'SelectionSet',
132
- selections: [
133
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
134
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
135
- { kind: 'Field', name: { kind: 'Name', value: 'description' } },
136
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
137
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
138
- {
139
- kind: 'Field',
140
- name: { kind: 'Name', value: 'ctaButton' },
141
- selectionSet: {
142
- kind: 'SelectionSet',
143
- selections: [
144
- { kind: 'Field', name: { kind: 'Name', value: 'background' } },
145
- { kind: 'Field', name: { kind: 'Name', value: 'textColor' } },
146
- { kind: 'Field', name: { kind: 'Name', value: 'text' } },
147
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
148
- { kind: 'Field', name: { kind: 'Name', value: 'border' } }
149
- ]
150
- }
151
- },
152
- { kind: 'Field', name: { kind: 'Name', value: 'type' } },
153
- {
154
- kind: 'Field',
155
- name: { kind: 'Name', value: 'media' },
156
- selectionSet: {
157
- kind: 'SelectionSet',
158
- selections: [
159
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
160
- { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
161
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
162
- ]
163
- }
164
- }
165
- ]
166
- }
167
156
  }
168
157
  ]
169
158
  };
@@ -2,10 +2,48 @@ fragment ShortVideoViewerPayloadFragment on Post {
2
2
  id
3
3
  enableSocialInteractions
4
4
  allProducts {
5
- ...ProductCardPayloadFragment
5
+ id
6
+ title
7
+ shortDescription
8
+ link
9
+ media {
10
+ url
11
+ thumbnailUrl
12
+ type
13
+ }
14
+ brand {
15
+ name
16
+ }
17
+ priceAndAvailability {
18
+ currency
19
+ price
20
+ productSalePrices {
21
+ salePrice
22
+ salePriceEffectiveDateFrom
23
+ salePriceEffectiveDateTo
24
+ }
25
+ }
6
26
  }
7
27
  ad {
8
- ...AdCardPayloadFragment
28
+ id
29
+ title
30
+ description
31
+ price
32
+ priceInfo
33
+ currency
34
+ ctaButton {
35
+ background
36
+ textColor
37
+ text
38
+ url
39
+ border
40
+ }
41
+ type
42
+ media {
43
+ url
44
+ thumbnailUrl
45
+ type
46
+ }
9
47
  }
10
48
  postData {
11
49
  media {