@streamscloud/embeddable 2.0.4 → 2.1.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/package.json +1 -1
- package/dist/core/continuation-token.d.ts +0 -10
- package/dist/core/continuation-token.js +0 -32
- package/dist/core/cursor-result.d.ts +0 -9
- package/dist/core/cursor-result.js +0 -1
- 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/data-loaders/index.d.ts +0 -2
- package/dist/core/data-loaders/index.js +0 -1
- package/dist/core/deferred.d.ts +0 -6
- package/dist/core/deferred.js +0 -13
- package/dist/core/enums.d.ts +0 -33
- package/dist/core/enums.js +0 -39
- package/dist/core/graphql.d.ts +0 -1
- package/dist/core/graphql.js +0 -10
- package/dist/core/media/image-helper.d.ts +0 -10
- package/dist/core/media/image-helper.js +0 -30
- package/dist/core/media/images-size-detector.service.d.ts +0 -6
- package/dist/core/media/images-size-detector.service.js +0 -15
- package/dist/core/media/index.d.ts +0 -4
- package/dist/core/media/index.js +0 -4
- package/dist/core/media/media-item-url.service.d.ts +0 -2
- package/dist/core/media/media-item-url.service.js +0 -3
- package/dist/core/media/types.d.ts +0 -13
- package/dist/core/media/types.js +0 -1
- package/dist/core/toastr.d.ts +0 -1
- package/dist/core/toastr.js +0 -26
- package/dist/core/transitions/index.d.ts +0 -1
- package/dist/core/transitions/index.js +0 -1
- 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/date-helper.d.ts +0 -29
- package/dist/core/utils/date-helper.js +0 -146
- package/dist/core/utils/dom-helper.d.ts +0 -12
- package/dist/core/utils/dom-helper.js +0 -76
- package/dist/core/utils/html-helper.d.ts +0 -40
- package/dist/core/utils/html-helper.js +0 -97
- package/dist/core/utils/index.d.ts +0 -3
- package/dist/core/utils/index.js +0 -3
- package/dist/core/utils/number-helper.d.ts +0 -6
- package/dist/core/utils/number-helper.js +0 -28
- package/dist/core/utils/string-generator.d.ts +0 -2
- package/dist/core/utils/string-generator.js +0 -15
- 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 -28
- package/dist/core/utils/utils.js +0 -100
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/products/price-helper.d.ts +0 -4
- package/dist/products/price-helper.js +0 -47
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte +0 -74
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte.d.ts +0 -7
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +0 -70
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte.d.ts +0 -7
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +0 -68
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +0 -156
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +0 -10
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +0 -124
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +0 -10
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +0 -86
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +0 -133
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +0 -12
- package/dist/short-videos/short-video-viewer/description.svelte +0 -46
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/index.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/index.js +0 -6
- package/dist/short-videos/short-video-viewer/mapper.d.ts +0 -3
- package/dist/short-videos/short-video-viewer/mapper.js +0 -56
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +0 -56
- package/dist/short-videos/short-video-viewer/operations.generated.js +0 -151
- package/dist/short-videos/short-video-viewer/operations.graphql +0 -53
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.d.ts +0 -12
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.d.ts +0 -13
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.d.ts +0 -7
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +0 -11
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +0 -13
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +0 -10
- package/dist/short-videos/short-video-viewer/types.d.ts +0 -40
- package/dist/short-videos/short-video-viewer/types.js +0 -1
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.d.ts +0 -12
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +0 -26
- package/dist/short-videos/short-videos-player/action-button.svelte +0 -38
- package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +0 -10
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +0 -91
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +0 -13
- package/dist/short-videos/short-videos-player/controls.svelte +0 -222
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +0 -15
- package/dist/short-videos/short-videos-player/index.d.ts +0 -28
- package/dist/short-videos/short-videos-player/index.js +0 -40
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +0 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +0 -6
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +0 -16
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +0 -25
- package/dist/streams/layout/cmp.layout.svelte +0 -34
- package/dist/streams/layout/cmp.layout.svelte.d.ts +0 -9
- package/dist/streams/layout/cmp.slot-content.svelte +0 -32
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +0 -9
- package/dist/streams/layout/cmp.slot.svelte +0 -26
- package/dist/streams/layout/cmp.slot.svelte.d.ts +0 -9
- package/dist/streams/layout/component.d.ts +0 -6
- package/dist/streams/layout/component.js +0 -1
- package/dist/streams/layout/css-values.d.ts +0 -10
- package/dist/streams/layout/css-values.js +0 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +0 -16
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +0 -38
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +0 -30
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +0 -97
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +0 -6
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +0 -45
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +0 -60
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +0 -13
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +0 -23
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +0 -8
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +0 -3
- package/dist/streams/layout/element-views/data-by-key-accessor.js +0 -55
- package/dist/streams/layout/element-views/index.d.ts +0 -11
- package/dist/streams/layout/element-views/index.js +0 -9
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +0 -9
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +0 -8
- package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +0 -8
- package/dist/streams/layout/element-views/stream-element-localization.svelte.js +0 -6
- package/dist/streams/layout/elements.d.ts +0 -51
- package/dist/streams/layout/elements.js +0 -1
- package/dist/streams/layout/enums.d.ts +0 -45
- package/dist/streams/layout/enums.js +0 -54
- package/dist/streams/layout/index.d.ts +0 -19
- package/dist/streams/layout/index.js +0 -15
- package/dist/streams/layout/layout.d.ts +0 -13
- package/dist/streams/layout/layout.js +0 -1
- package/dist/streams/layout/models/index.d.ts +0 -6
- package/dist/streams/layout/models/index.js +0 -1
- package/dist/streams/layout/models/mapper.d.ts +0 -3
- package/dist/streams/layout/models/mapper.js +0 -62
- package/dist/streams/layout/models/stream-layout-blob-model.d.ts +0 -4
- package/dist/streams/layout/models/stream-layout-blob-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +0 -6
- package/dist/streams/layout/models/stream-layout-media-item-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +0 -11
- package/dist/streams/layout/models/stream-layout-post-header-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +0 -19
- package/dist/streams/layout/models/stream-layout-product-model.js +0 -1
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +0 -31
- package/dist/streams/layout/models/stream-layout-short-video-model.js +0 -1
- package/dist/streams/layout/serializer.d.ts +0 -3
- package/dist/streams/layout/serializer.js +0 -6
- package/dist/streams/layout/slot-data-input.d.ts +0 -14
- package/dist/streams/layout/slot-data-input.js +0 -1
- package/dist/streams/layout/slot-data.d.ts +0 -18
- package/dist/streams/layout/slot-data.js +0 -1
- package/dist/streams/layout/slot.d.ts +0 -16
- package/dist/streams/layout/slot.js +0 -1
- package/dist/streams/layout/styles-transformer.d.ts +0 -13
- package/dist/streams/layout/styles-transformer.js +0 -140
- package/dist/streams/layout/styles.d.ts +0 -43
- package/dist/streams/layout/styles.js +0 -1
- package/dist/streams/layout/type-guards.d.ts +0 -8
- package/dist/streams/layout/type-guards.js +0 -21
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +0 -13
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -7
- package/dist/streams/stream-page-viewer/index.d.ts +0 -2
- package/dist/streams/stream-page-viewer/index.js +0 -1
- package/dist/streams/stream-page-viewer/mapper.d.ts +0 -3
- package/dist/streams/stream-page-viewer/mapper.js +0 -22
- package/dist/streams/stream-page-viewer/operations.generated.d.ts +0 -10
- package/dist/streams/stream-page-viewer/operations.generated.js +0 -27
- package/dist/streams/stream-page-viewer/operations.graphql +0 -8
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +0 -13
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +0 -10
- package/dist/streams/stream-page-viewer/types.d.ts +0 -18
- package/dist/streams/stream-page-viewer/types.js +0 -1
- package/dist/streams/stream-player/action-button.svelte +0 -38
- package/dist/streams/stream-player/action-button.svelte.d.ts +0 -10
- package/dist/streams/stream-player/cmp.stream-player.svelte +0 -149
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +0 -17
- package/dist/streams/stream-player/controls.svelte +0 -230
- package/dist/streams/stream-player/controls.svelte.d.ts +0 -14
- package/dist/streams/stream-player/index.d.ts +0 -36
- package/dist/streams/stream-player/index.js +0 -50
- package/dist/streams/stream-player/mapper.d.ts +0 -3
- package/dist/streams/stream-player/mapper.js +0 -15
- package/dist/streams/stream-player/operations.generated.d.ts +0 -65
- package/dist/streams/stream-player/operations.generated.js +0 -196
- package/dist/streams/stream-player/operations.graphql +0 -35
- package/dist/streams/stream-player/stream-overview.svelte +0 -239
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +0 -17
- package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +0 -25
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +0 -84
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +0 -12
- package/dist/streams/stream-player/stream-player-localization.svelte.js +0 -10
- package/dist/streams/stream-player/types.d.ts +0 -12
- package/dist/streams/stream-player/types.js +0 -1
- package/dist/streams/stream-player/ui-manager.svelte.d.ts +0 -17
- package/dist/streams/stream-player/ui-manager.svelte.js +0 -26
- package/dist/ui/button/cmp.button.svelte +0 -10
- package/dist/ui/button/cmp.button.svelte.d.ts +0 -16
- package/dist/ui/button/index.d.ts +0 -2
- package/dist/ui/button/index.js +0 -2
- 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 -204
- package/dist/ui/button/resources/button-theme.svelte.d.ts +0 -10
- package/dist/ui/button/resources/button-types.d.ts +0 -21
- package/dist/ui/button/resources/button-types.js +0 -23
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +0 -7
- package/dist/ui/dynamic-component/index.d.ts +0 -2
- package/dist/ui/dynamic-component/index.js +0 -2
- package/dist/ui/dynamic-component/types.svelte.d.ts +0 -11
- package/dist/ui/dynamic-component/types.svelte.js +0 -13
- package/dist/ui/icon/cmp.icon.svelte +0 -113
- package/dist/ui/icon/cmp.icon.svelte.d.ts +0 -8
- package/dist/ui/icon/index.d.ts +0 -2
- package/dist/ui/icon/index.js +0 -2
- package/dist/ui/icon/types.d.ts +0 -9
- package/dist/ui/icon/types.js +0 -10
- 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 -71
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-stub.svelte +0 -34
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +0 -18
- package/dist/ui/image/cmp.image.svelte +0 -82
- 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/image/index.d.ts +0 -4
- package/dist/ui/image/index.js +0 -4
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +0 -84
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +0 -11
- package/dist/ui/infinite-scrolling/index.d.ts +0 -1
- package/dist/ui/infinite-scrolling/index.js +0 -1
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +0 -89
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +0 -12
- package/dist/ui/line-clamp/index.d.ts +0 -2
- package/dist/ui/line-clamp/index.js +0 -2
- package/dist/ui/line-clamp/line-clamp-localization.svelte.d.ts +0 -9
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +0 -15
- package/dist/ui/line-clamp/line-clamp-types.d.ts +0 -3
- package/dist/ui/line-clamp/line-clamp-types.js +0 -1
- package/dist/ui/line-clamp/line-clamp-utils.d.ts +0 -8
- package/dist/ui/line-clamp/line-clamp-utils.js +0 -33
- package/dist/ui/loading/cmp.loading.svelte +0 -97
- package/dist/ui/loading/cmp.loading.svelte.d.ts +0 -9
- package/dist/ui/loading/index.d.ts +0 -1
- package/dist/ui/loading/index.js +0 -1
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +0 -91
- package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +0 -13
- package/dist/ui/media-item-view/index.d.ts +0 -1
- package/dist/ui/media-item-view/index.js +0 -1
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +0 -278
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +0 -13
- package/dist/ui/media-items-gallery/index.d.ts +0 -1
- package/dist/ui/media-items-gallery/index.js +0 -1
- package/dist/ui/media-items-gallery/types.d.ts +0 -12
- package/dist/ui/media-items-gallery/types.js +0 -35
- package/dist/ui/media-playback/index.d.ts +0 -2
- package/dist/ui/media-playback/index.js +0 -2
- package/dist/ui/media-playback/playback-manager.svelte.d.ts +0 -25
- package/dist/ui/media-playback/playback-manager.svelte.js +0 -62
- package/dist/ui/media-playback/volume-manager.svelte.d.ts +0 -10
- package/dist/ui/media-playback/volume-manager.svelte.js +0 -27
- package/dist/ui/player/cmp.player-slider.svelte +0 -161
- package/dist/ui/player/cmp.player-slider.svelte.d.ts +0 -33
- package/dist/ui/player/index.d.ts +0 -4
- package/dist/ui/player/index.js +0 -3
- package/dist/ui/player/player-buffer.svelte.d.ts +0 -28
- package/dist/ui/player/player-buffer.svelte.js +0 -64
- package/dist/ui/player/prevent-slider-scroll.d.ts +0 -5
- package/dist/ui/player/prevent-slider-scroll.js +0 -11
- package/dist/ui/player/types.d.ts +0 -14
- package/dist/ui/player/types.js +0 -1
- package/dist/ui/progress/cmp.progress.svelte +0 -37
- package/dist/ui/progress/cmp.progress.svelte.d.ts +0 -6
- package/dist/ui/progress/index.d.ts +0 -1
- package/dist/ui/progress/index.js +0 -1
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +0 -39
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +0 -8
- package/dist/ui/proportional-container/index.d.ts +0 -1
- package/dist/ui/proportional-container/index.js +0 -1
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +0 -63
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +0 -12
- package/dist/ui/seek-bar/index.d.ts +0 -1
- package/dist/ui/seek-bar/index.js +0 -1
- package/dist/ui/shadow-dom/_normalize.scss +0 -350
- package/dist/ui/shadow-dom/_reset.scss +0 -189
- package/dist/ui/shadow-dom/index.d.ts +0 -1
- package/dist/ui/shadow-dom/index.js +0 -1
- package/dist/ui/shadow-dom/shadow-host.d.ts +0 -8
- package/dist/ui/shadow-dom/shadow-host.js +0 -40
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte +0 -120
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte.d.ts +0 -18
- package/dist/ui/spotlight-layout/index.d.ts +0 -1
- package/dist/ui/spotlight-layout/index.js +0 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte +0 -69
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +0 -9
- package/dist/ui/time-ago/index.d.ts +0 -2
- package/dist/ui/time-ago/index.js +0 -1
- package/dist/ui/time-ago/time-ago-localization.svelte.d.ts +0 -21
- package/dist/ui/time-ago/time-ago-localization.svelte.js +0 -39
- package/dist/ui/video/cmp.video.svelte +0 -377
- package/dist/ui/video/cmp.video.svelte.d.ts +0 -24
- package/dist/ui/video/index.d.ts +0 -1
- package/dist/ui/video/index.js +0 -1
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { Image } from '../../ui/image';
|
|
2
|
-
import { Video } from '../../ui/video';
|
|
3
|
-
import { default as AttachmentsInline } from './cmp.attachments-inline.svelte';
|
|
4
|
-
import { default as ShortVideoDescription } from './description.svelte';
|
|
5
|
-
import { ShortVideoViewerLocalization } from './short-video-viewer-localization.svelte';
|
|
6
|
-
import { ShortVideoViewerUiManager } from './ui-manager.svelte';
|
|
7
|
-
let { model, availableSideSpace = 0, showAttachments = true, autoplay = 'on-appearance', localization: localizationInit } = $props();
|
|
8
|
-
const localization = $derived(new ShortVideoViewerLocalization(localizationInit));
|
|
9
|
-
let actionsPanelRef = $state.raw(null);
|
|
10
|
-
const uiManager = new ShortVideoViewerUiManager();
|
|
11
|
-
$effect(() => {
|
|
12
|
-
if (actionsPanelRef) {
|
|
13
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
14
|
-
if (actionsPanelRef) {
|
|
15
|
-
uiManager.updateActionsPanelWidth(actionsPanelRef.clientWidth);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
resizeObserver.observe(actionsPanelRef);
|
|
19
|
-
return () => {
|
|
20
|
-
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
$effect(() => {
|
|
25
|
-
uiManager.updateAvailableSideSpace(availableSideSpace);
|
|
26
|
-
});
|
|
27
|
-
$effect(() => {
|
|
28
|
-
uiManager.updateCanShowAttachments(showAttachments);
|
|
29
|
-
});
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<div class="short-video-viewer" style={uiManager.globalCssVariables}>
|
|
33
|
-
<div class="short-video-viewer__media">
|
|
34
|
-
{#if !model.media.isImage}
|
|
35
|
-
<Video controls={false} autoplay={autoplay} src={model.media.url} loop={true} poster={model.media.thumbnailUrl} id={model.id} />
|
|
36
|
-
{:else}
|
|
37
|
-
<Image src={model.media.url} />
|
|
38
|
-
{/if}
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div
|
|
42
|
-
class="short-video-viewer__actions-panel"
|
|
43
|
-
class:short-video-viewer__actions-panel--inside-frame={uiManager.showActionsInsideFrame}
|
|
44
|
-
bind:this={actionsPanelRef}>
|
|
45
|
-
{#if uiManager.showAttachments}
|
|
46
|
-
<AttachmentsInline model={model} />
|
|
47
|
-
{/if}
|
|
48
|
-
</div>
|
|
49
|
-
<div class="short-video-viewer__description">
|
|
50
|
-
<ShortVideoDescription model={model} localization={localization} />
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<style>@keyframes fadeIn {
|
|
55
|
-
0% {
|
|
56
|
-
opacity: 1;
|
|
57
|
-
}
|
|
58
|
-
50% {
|
|
59
|
-
opacity: 0.4;
|
|
60
|
-
}
|
|
61
|
-
100% {
|
|
62
|
-
opacity: 1;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
.short-video-viewer {
|
|
66
|
-
--_short-video-viewer--actions-panel--top: var(--short-video-viewer--actions-panel--top, 0.9375rem);
|
|
67
|
-
--_short-video-viewer--actions-panel--bottom: var(--short-video-viewer--actions-panel--bottom, 0.9375rem);
|
|
68
|
-
--_short-video-viewer--button--background-color: #f3f4f6;
|
|
69
|
-
--_short-video-viewer--button--font-color: #2e2e2e;
|
|
70
|
-
--video--media-fit: cover;
|
|
71
|
-
width: 100%;
|
|
72
|
-
min-width: 100%;
|
|
73
|
-
max-width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
min-height: 100%;
|
|
76
|
-
max-height: 100%;
|
|
77
|
-
position: relative;
|
|
78
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
79
|
-
}
|
|
80
|
-
@container (width < 576px) {
|
|
81
|
-
.short-video-viewer {
|
|
82
|
-
--_short-video-viewer--button--background-color: #ffffff;
|
|
83
|
-
--_short-video-viewer--button--font-color: #2e2e2e;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
.short-video-viewer__media {
|
|
87
|
-
height: 100%;
|
|
88
|
-
min-height: 100%;
|
|
89
|
-
max-height: 100%;
|
|
90
|
-
border-radius: 0.375rem;
|
|
91
|
-
overflow: hidden;
|
|
92
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
93
|
-
}
|
|
94
|
-
@container (width < 576px) {
|
|
95
|
-
.short-video-viewer__media {
|
|
96
|
-
border-radius: 0;
|
|
97
|
-
position: relative;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
.short-video-viewer__actions-panel {
|
|
101
|
-
position: absolute;
|
|
102
|
-
left: calc(100% + 0.625rem);
|
|
103
|
-
top: var(--_short-video-viewer--actions-panel--top);
|
|
104
|
-
bottom: var(--_short-video-viewer--actions-panel--bottom);
|
|
105
|
-
gap: 2.5rem;
|
|
106
|
-
display: flex;
|
|
107
|
-
flex-direction: column;
|
|
108
|
-
justify-content: flex-end;
|
|
109
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
110
|
-
}
|
|
111
|
-
@container (width < 576px) {
|
|
112
|
-
.short-video-viewer__actions-panel {
|
|
113
|
-
left: auto;
|
|
114
|
-
right: 0.625rem;
|
|
115
|
-
align-items: flex-end;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
.short-video-viewer__actions-panel--inside-frame {
|
|
119
|
-
left: auto;
|
|
120
|
-
right: 0.625rem;
|
|
121
|
-
align-items: flex-end;
|
|
122
|
-
}
|
|
123
|
-
.short-video-viewer__description {
|
|
124
|
-
position: absolute;
|
|
125
|
-
bottom: 0.9375rem;
|
|
126
|
-
left: 0.625rem;
|
|
127
|
-
right: calc(1.25rem + var(--_short-video-viewer--button--size));
|
|
128
|
-
--short-video-viewer--description--font--primary-color: #ffffff;
|
|
129
|
-
--short-video-viewer--description--font--secondary-color: #ffffff;
|
|
130
|
-
}
|
|
131
|
-
:global([data-theme="dark"]) .short-video-viewer__description {
|
|
132
|
-
--short-video-viewer--description--font--primary-color: #ffffff;
|
|
133
|
-
}</style>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type IShortVideoViewerLocalization } from './short-video-viewer-localization.svelte';
|
|
2
|
-
import type { ShortVideoViewerModel } from './types';
|
|
3
|
-
type Props = {
|
|
4
|
-
model: ShortVideoViewerModel;
|
|
5
|
-
availableSideSpace?: number;
|
|
6
|
-
showAttachments?: boolean;
|
|
7
|
-
autoplay?: true | false | 'on-appearance';
|
|
8
|
-
localization?: IShortVideoViewerLocalization;
|
|
9
|
-
};
|
|
10
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
11
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
12
|
-
export default Cmp;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { LineClamp } from '../../ui/line-clamp';
|
|
2
|
-
import { default as ShortVideoHeading } from './cmp.short-video-heading.svelte';
|
|
3
|
-
let { model, localization } = $props();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<div class="short-video-description">
|
|
7
|
-
<div class="short-video-description__heading">
|
|
8
|
-
<ShortVideoHeading model={model.heading} localization={localization} />
|
|
9
|
-
</div>
|
|
10
|
-
<div class="short-video-description__text">
|
|
11
|
-
{#if model.text}
|
|
12
|
-
<LineClamp value={model.text} maxLines={2} />
|
|
13
|
-
{/if}
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<style>@keyframes fadeIn {
|
|
18
|
-
0% {
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}
|
|
21
|
-
50% {
|
|
22
|
-
opacity: 0.4;
|
|
23
|
-
}
|
|
24
|
-
100% {
|
|
25
|
-
opacity: 1;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.short-video-description {
|
|
29
|
-
--_short-video-viewer--description--font--primary-color: var(--short-video-viewer--description--font--primary-color);
|
|
30
|
-
--_short-video-viewer--description--font--secondary-color: var(--short-video-viewer--description--font--secondary-color);
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
padding-top: 0.75rem;
|
|
34
|
-
}
|
|
35
|
-
.short-video-description__heading {
|
|
36
|
-
--short-video-heading--padding: 0 0 0.875rem 0;
|
|
37
|
-
--short-video-heading--text--color: var(--_short-video-viewer--description--font--primary-color);
|
|
38
|
-
--short-video-heading--meta--color: var(--_short-video-viewer--description--font--secondary-color);
|
|
39
|
-
}
|
|
40
|
-
.short-video-description__text {
|
|
41
|
-
color: var(--_short-video-viewer--description--font--primary-color);
|
|
42
|
-
font-size: 0.9375rem;
|
|
43
|
-
line-height: 1.25rem;
|
|
44
|
-
font-weight: 400;
|
|
45
|
-
height: 2.5rem;
|
|
46
|
-
}</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ShortVideoViewerLocalization } from './short-video-viewer-localization.svelte';
|
|
2
|
-
import type { ShortVideoViewerModel } from './types';
|
|
3
|
-
type Props = {
|
|
4
|
-
model: ShortVideoViewerModel;
|
|
5
|
-
localization: ShortVideoViewerLocalization;
|
|
6
|
-
};
|
|
7
|
-
declare const Description: import("svelte").Component<Props, {}, "">;
|
|
8
|
-
type Description = ReturnType<typeof Description>;
|
|
9
|
-
export default Description;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { default as ShortVideoViewer } from './cmp.short-video-viewer.svelte';
|
|
2
|
-
export { default as ShortVideoAdViewer } from './cmp.ad.svelte';
|
|
3
|
-
export { default as ShortVideoProductViewer } from './cmp.product.svelte';
|
|
4
|
-
export { default as ShortVideoViewerAttachments } from './cmp.attachments.svelte';
|
|
5
|
-
export { default as ShortVideoViewerAttachmentsInline } from './cmp.attachments-inline.svelte';
|
|
6
|
-
export { default as ShortVideoDetails } from './cmp.short-video-details.svelte';
|
|
7
|
-
export type { ShortVideoViewerModel, ShortVideoViewerAdModel, ShortVideoViewerProductModel } from './types';
|
|
8
|
-
export type { IShortVideoViewerLocalization } from './short-video-viewer-localization.svelte';
|
|
9
|
-
export type { IShortVideoDetailsLocalization } from './short-video-details-localization.svelte';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as ShortVideoViewer } from './cmp.short-video-viewer.svelte';
|
|
2
|
-
export { default as ShortVideoAdViewer } from './cmp.ad.svelte';
|
|
3
|
-
export { default as ShortVideoProductViewer } from './cmp.product.svelte';
|
|
4
|
-
export { default as ShortVideoViewerAttachments } from './cmp.attachments.svelte';
|
|
5
|
-
export { default as ShortVideoViewerAttachmentsInline } from './cmp.attachments-inline.svelte';
|
|
6
|
-
export { default as ShortVideoDetails } from './cmp.short-video-details.svelte';
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { MediaType } from '../../core/enums';
|
|
2
|
-
import { getMediaItemImageUrl } from '../../core/media';
|
|
3
|
-
import { shouldUseSalePrice } from '../../products/price-helper';
|
|
4
|
-
export const mapShortVideoViewerModel = (payload) => {
|
|
5
|
-
const mediaBlob = payload.postData.media[0];
|
|
6
|
-
return {
|
|
7
|
-
id: payload.id,
|
|
8
|
-
media: mediaBlob.type === MediaType.Image
|
|
9
|
-
? { isImage: true, url: mediaBlob.url }
|
|
10
|
-
: {
|
|
11
|
-
isImage: false,
|
|
12
|
-
url: mediaBlob.url,
|
|
13
|
-
thumbnailUrl: mediaBlob.thumbnailUrl
|
|
14
|
-
},
|
|
15
|
-
text: payload.postData.shortVideoData.text,
|
|
16
|
-
heading: {
|
|
17
|
-
image: payload.postHeading.sourceImage,
|
|
18
|
-
name: payload.postHeading.sourceName,
|
|
19
|
-
displayDate: payload.postHeading.postDisplayDate,
|
|
20
|
-
viewsCount: payload.postHeading.postViewsCount
|
|
21
|
-
},
|
|
22
|
-
ad: payload.ad ? mapToShortVideoViewerAdModel(payload.ad) : null,
|
|
23
|
-
products: payload.allProducts.map(mapToShortVideoViewerProductModel)
|
|
24
|
-
// uncomment if you want to test many products behavior
|
|
25
|
-
/*.flatMap((x) => [
|
|
26
|
-
{ ...x, id: x.id + '1' },
|
|
27
|
-
{ ...x, id: x.id + '2' },
|
|
28
|
-
{ ...x, id: x.id + '3' },
|
|
29
|
-
{ ...x, id: x.id + '4' },
|
|
30
|
-
{ ...x, id: x.id + '5' }
|
|
31
|
-
])*/
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
const mapToShortVideoViewerAdModel = (payload) => {
|
|
35
|
-
return {
|
|
36
|
-
id: payload.id,
|
|
37
|
-
image: getMediaItemImageUrl(payload.media[0]),
|
|
38
|
-
title: payload.title,
|
|
39
|
-
description: payload.description,
|
|
40
|
-
buttonText: payload.buttonText,
|
|
41
|
-
buttonUrl: payload.buttonUrl,
|
|
42
|
-
openLinkInNewWindow: payload.openLinkInNewWindow
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
const mapToShortVideoViewerProductModel = (payload) => {
|
|
46
|
-
const effectiveSalePrice = payload.priceAndAvailability.productSalePrices?.find((x) => shouldUseSalePrice(payload.priceAndAvailability.price, x.salePrice, x.salePriceEffectiveDateFrom, x.salePriceEffectiveDateTo));
|
|
47
|
-
return {
|
|
48
|
-
id: payload.id,
|
|
49
|
-
title: payload.title,
|
|
50
|
-
image: getMediaItemImageUrl(payload.media[0]),
|
|
51
|
-
link: payload.link,
|
|
52
|
-
currency: payload.priceAndAvailability.currency,
|
|
53
|
-
price: payload.priceAndAvailability.price,
|
|
54
|
-
salePrice: effectiveSalePrice?.salePrice ?? null
|
|
55
|
-
};
|
|
56
|
-
};
|
|
@@ -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 ShortVideoViewerPayloadFragment = {
|
|
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
|
-
url: string;
|
|
41
|
-
thumbnailUrl: string | null;
|
|
42
|
-
type: SchemaTypes.MediaType;
|
|
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 ShortVideoViewerPayloadFragmentDoc: DocumentNode<ShortVideoViewerPayloadFragment, unknown>;
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
export const ShortVideoViewerPayloadFragmentDoc = {
|
|
2
|
-
kind: 'Document',
|
|
3
|
-
definitions: [
|
|
4
|
-
{
|
|
5
|
-
kind: 'FragmentDefinition',
|
|
6
|
-
name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
|
|
7
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
8
|
-
selectionSet: {
|
|
9
|
-
kind: 'SelectionSet',
|
|
10
|
-
selections: [
|
|
11
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
12
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
|
|
13
|
-
{
|
|
14
|
-
kind: 'Field',
|
|
15
|
-
name: { kind: 'Name', value: 'postHeading' },
|
|
16
|
-
selectionSet: {
|
|
17
|
-
kind: 'SelectionSet',
|
|
18
|
-
selections: [
|
|
19
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'sourceImage' } },
|
|
20
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'sourceName' } },
|
|
21
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'postDisplayDate' } },
|
|
22
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'postViewsCount' } }
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
kind: 'Field',
|
|
28
|
-
name: { kind: 'Name', value: 'allProducts' },
|
|
29
|
-
selectionSet: {
|
|
30
|
-
kind: 'SelectionSet',
|
|
31
|
-
selections: [
|
|
32
|
-
{
|
|
33
|
-
kind: 'Field',
|
|
34
|
-
name: { kind: 'Name', value: 'media' },
|
|
35
|
-
selectionSet: {
|
|
36
|
-
kind: 'SelectionSet',
|
|
37
|
-
selections: [
|
|
38
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
39
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
|
|
40
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
45
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
46
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
47
|
-
{
|
|
48
|
-
kind: 'Field',
|
|
49
|
-
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
50
|
-
selectionSet: {
|
|
51
|
-
kind: 'SelectionSet',
|
|
52
|
-
selections: [
|
|
53
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
54
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
55
|
-
{
|
|
56
|
-
kind: 'Field',
|
|
57
|
-
name: { kind: 'Name', value: 'productSalePrices' },
|
|
58
|
-
selectionSet: {
|
|
59
|
-
kind: 'SelectionSet',
|
|
60
|
-
selections: [
|
|
61
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
62
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
63
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
kind: 'Field',
|
|
75
|
-
name: { kind: 'Name', value: 'ad' },
|
|
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: 'description' } },
|
|
82
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'buttonText' } },
|
|
83
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'buttonUrl' } },
|
|
84
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'openLinkInNewWindow' } },
|
|
85
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
86
|
-
{
|
|
87
|
-
kind: 'Field',
|
|
88
|
-
name: { kind: 'Name', value: 'media' },
|
|
89
|
-
selectionSet: {
|
|
90
|
-
kind: 'SelectionSet',
|
|
91
|
-
selections: [
|
|
92
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
93
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
|
|
94
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
kind: 'Field',
|
|
103
|
-
name: { kind: 'Name', value: 'postData' },
|
|
104
|
-
selectionSet: {
|
|
105
|
-
kind: 'SelectionSet',
|
|
106
|
-
selections: [
|
|
107
|
-
{
|
|
108
|
-
kind: 'Field',
|
|
109
|
-
name: { kind: 'Name', value: 'media' },
|
|
110
|
-
selectionSet: {
|
|
111
|
-
kind: 'SelectionSet',
|
|
112
|
-
selections: [
|
|
113
|
-
{
|
|
114
|
-
kind: 'Field',
|
|
115
|
-
name: { kind: 'Name', value: 'url' },
|
|
116
|
-
arguments: [
|
|
117
|
-
{
|
|
118
|
-
kind: 'Argument',
|
|
119
|
-
name: { kind: 'Name', value: 'scale' },
|
|
120
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
121
|
-
}
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
kind: 'Field',
|
|
126
|
-
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
127
|
-
arguments: [
|
|
128
|
-
{
|
|
129
|
-
kind: 'Argument',
|
|
130
|
-
name: { kind: 'Name', value: 'scale' },
|
|
131
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
},
|
|
135
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
kind: 'Field',
|
|
141
|
-
name: { kind: 'Name', value: 'shortVideoData' },
|
|
142
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
143
|
-
}
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
]
|
|
151
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
fragment ShortVideoViewerPayloadFragment on Post {
|
|
2
|
-
id
|
|
3
|
-
enableSocialInteractions
|
|
4
|
-
postHeading {
|
|
5
|
-
sourceImage
|
|
6
|
-
sourceName
|
|
7
|
-
postDisplayDate
|
|
8
|
-
postViewsCount
|
|
9
|
-
}
|
|
10
|
-
allProducts {
|
|
11
|
-
media {
|
|
12
|
-
url
|
|
13
|
-
thumbnailUrl
|
|
14
|
-
type
|
|
15
|
-
}
|
|
16
|
-
title
|
|
17
|
-
id
|
|
18
|
-
link
|
|
19
|
-
priceAndAvailability {
|
|
20
|
-
currency
|
|
21
|
-
price
|
|
22
|
-
productSalePrices {
|
|
23
|
-
salePrice
|
|
24
|
-
salePriceEffectiveDateFrom
|
|
25
|
-
salePriceEffectiveDateTo
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
ad {
|
|
30
|
-
id
|
|
31
|
-
title
|
|
32
|
-
description
|
|
33
|
-
buttonText
|
|
34
|
-
buttonUrl
|
|
35
|
-
openLinkInNewWindow
|
|
36
|
-
type
|
|
37
|
-
media {
|
|
38
|
-
url
|
|
39
|
-
thumbnailUrl
|
|
40
|
-
type
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
postData {
|
|
44
|
-
media {
|
|
45
|
-
url(scale: $image_scale)
|
|
46
|
-
thumbnailUrl(scale: $image_scale)
|
|
47
|
-
type
|
|
48
|
-
}
|
|
49
|
-
shortVideoData {
|
|
50
|
-
text
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IShortVideoProductLocalization } from './short-video-product-localization.svelte';
|
|
2
|
-
export interface IShortVideoAttachmentsLocalization {
|
|
3
|
-
productsSection?: string;
|
|
4
|
-
offersSection?: string;
|
|
5
|
-
productLocalization?: IShortVideoProductLocalization;
|
|
6
|
-
}
|
|
7
|
-
export declare class ShortVideoAttachmentsLocalizationSvelte {
|
|
8
|
-
productsSection: string;
|
|
9
|
-
offersSection: string;
|
|
10
|
-
productLocalization: IShortVideoProductLocalization | undefined;
|
|
11
|
-
constructor(init?: IShortVideoAttachmentsLocalization);
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class ShortVideoAttachmentsLocalizationSvelte {
|
|
2
|
-
productsSection = $state('Products');
|
|
3
|
-
offersSection = $state('Offers');
|
|
4
|
-
productLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.productsSection = init?.productsSection || this.productsSection;
|
|
7
|
-
this.offersSection = init?.offersSection || this.offersSection;
|
|
8
|
-
this.productLocalization = init?.productLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
2
|
-
import type { IShortVideoAttachmentsLocalization } from './short-video-attachments-localization.svelte';
|
|
3
|
-
export interface IShortVideoDetailsLocalization {
|
|
4
|
-
viewsCount?: (count: number) => string;
|
|
5
|
-
timeAgoLocalization?: ITimeAgoLocalization;
|
|
6
|
-
attachmentsLocalization?: IShortVideoAttachmentsLocalization;
|
|
7
|
-
}
|
|
8
|
-
export declare class ShortVideoDetailsLocalization {
|
|
9
|
-
viewsCount: (count: number) => string;
|
|
10
|
-
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
11
|
-
attachmentsLocalization: IShortVideoAttachmentsLocalization | undefined;
|
|
12
|
-
constructor(init?: IShortVideoDetailsLocalization);
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class ShortVideoDetailsLocalization {
|
|
2
|
-
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
-
timeAgoLocalization = $state(undefined);
|
|
4
|
-
attachmentsLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.viewsCount = init?.viewsCount ? init.viewsCount : this.viewsCount;
|
|
7
|
-
this.timeAgoLocalization = init?.timeAgoLocalization;
|
|
8
|
-
this.attachmentsLocalization = init?.attachmentsLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ITimeAgoLocalization } from '../../ui/time-ago';
|
|
2
|
-
import type { IShortVideoProductLocalization } from './short-video-product-localization.svelte';
|
|
3
|
-
export interface IShortVideoViewerLocalization {
|
|
4
|
-
viewsCount?: (count: number) => string;
|
|
5
|
-
timeAgoLocalization?: ITimeAgoLocalization;
|
|
6
|
-
productLocalization?: IShortVideoProductLocalization;
|
|
7
|
-
}
|
|
8
|
-
export declare class ShortVideoViewerLocalization {
|
|
9
|
-
viewsCount: (count: number) => string;
|
|
10
|
-
timeAgoLocalization: ITimeAgoLocalization | undefined;
|
|
11
|
-
productLocalization: IShortVideoProductLocalization | undefined;
|
|
12
|
-
constructor(init?: IShortVideoViewerLocalization);
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export class ShortVideoViewerLocalization {
|
|
2
|
-
viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
|
|
3
|
-
timeAgoLocalization = $state(undefined);
|
|
4
|
-
productLocalization = $state(undefined);
|
|
5
|
-
constructor(init) {
|
|
6
|
-
this.viewsCount = init?.viewsCount ? init.viewsCount : this.viewsCount;
|
|
7
|
-
this.timeAgoLocalization = init?.timeAgoLocalization;
|
|
8
|
-
this.productLocalization = init?.productLocalization;
|
|
9
|
-
}
|
|
10
|
-
}
|