@streamscloud/embeddable 1.1.11 → 2.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.
- 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 +68 -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 -490
- 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 -491
- 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
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare enum PostSourceType {
|
|
2
|
+
Channel = "CHANNEL",
|
|
3
|
+
Group = "GROUP",
|
|
4
|
+
MediaPage = "MEDIA_PAGE",
|
|
5
|
+
Organization = "ORGANIZATION",
|
|
6
|
+
UserProfile = "USER_PROFILE"
|
|
7
|
+
}
|
|
8
|
+
export declare enum AdType {
|
|
9
|
+
BannerResponsive = "BANNER_RESPONSIVE",
|
|
10
|
+
MediaDialogPromotion = "MEDIA_DIALOG_PROMOTION",
|
|
11
|
+
Story = "STORY"
|
|
12
|
+
}
|
|
13
|
+
export declare enum Currency {
|
|
14
|
+
Eur = "EUR",
|
|
15
|
+
Nok = "NOK",
|
|
16
|
+
Usd = "USD"
|
|
17
|
+
}
|
|
18
|
+
export declare enum MediaType {
|
|
19
|
+
Audio = "AUDIO",
|
|
20
|
+
Image = "IMAGE",
|
|
21
|
+
ShortVideo = "SHORT_VIDEO",
|
|
22
|
+
Video = "VIDEO"
|
|
23
|
+
}
|
|
24
|
+
export declare enum MediaFormat {
|
|
25
|
+
W4H3 = "W4H3",
|
|
26
|
+
W16H9 = "W16H9"
|
|
27
|
+
}
|
|
28
|
+
export declare enum ImageScale {
|
|
29
|
+
Big = "BIG",
|
|
30
|
+
Medium = "MEDIUM",
|
|
31
|
+
OriginalEncoded = "ORIGINAL_ENCODED",
|
|
32
|
+
Small = "SMALL"
|
|
33
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export var PostSourceType;
|
|
2
|
+
(function (PostSourceType) {
|
|
3
|
+
PostSourceType["Channel"] = "CHANNEL";
|
|
4
|
+
PostSourceType["Group"] = "GROUP";
|
|
5
|
+
PostSourceType["MediaPage"] = "MEDIA_PAGE";
|
|
6
|
+
PostSourceType["Organization"] = "ORGANIZATION";
|
|
7
|
+
PostSourceType["UserProfile"] = "USER_PROFILE";
|
|
8
|
+
})(PostSourceType || (PostSourceType = {}));
|
|
9
|
+
export var AdType;
|
|
10
|
+
(function (AdType) {
|
|
11
|
+
AdType["BannerResponsive"] = "BANNER_RESPONSIVE";
|
|
12
|
+
AdType["MediaDialogPromotion"] = "MEDIA_DIALOG_PROMOTION";
|
|
13
|
+
AdType["Story"] = "STORY";
|
|
14
|
+
})(AdType || (AdType = {}));
|
|
15
|
+
export var Currency;
|
|
16
|
+
(function (Currency) {
|
|
17
|
+
Currency["Eur"] = "EUR";
|
|
18
|
+
Currency["Nok"] = "NOK";
|
|
19
|
+
Currency["Usd"] = "USD";
|
|
20
|
+
})(Currency || (Currency = {}));
|
|
21
|
+
export var MediaType;
|
|
22
|
+
(function (MediaType) {
|
|
23
|
+
MediaType["Audio"] = "AUDIO";
|
|
24
|
+
MediaType["Image"] = "IMAGE";
|
|
25
|
+
MediaType["ShortVideo"] = "SHORT_VIDEO";
|
|
26
|
+
MediaType["Video"] = "VIDEO";
|
|
27
|
+
})(MediaType || (MediaType = {}));
|
|
28
|
+
export var MediaFormat;
|
|
29
|
+
(function (MediaFormat) {
|
|
30
|
+
MediaFormat["W4H3"] = "W4H3";
|
|
31
|
+
MediaFormat["W16H9"] = "W16H9";
|
|
32
|
+
})(MediaFormat || (MediaFormat = {}));
|
|
33
|
+
export var ImageScale;
|
|
34
|
+
(function (ImageScale) {
|
|
35
|
+
ImageScale["Big"] = "BIG";
|
|
36
|
+
ImageScale["Medium"] = "MEDIUM";
|
|
37
|
+
ImageScale["OriginalEncoded"] = "ORIGINAL_ENCODED";
|
|
38
|
+
ImageScale["Small"] = "SMALL";
|
|
39
|
+
})(ImageScale || (ImageScale = {}));
|
package/dist/core/graphql.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createLocalGQLClient: (customFetch?: typeof fetch) => import("@urql/core").Client;
|
|
1
|
+
export declare const createLocalGQLClient: (graphqlUrl: string, customFetch?: typeof fetch) => import("@urql/core").Client;
|
package/dist/core/graphql.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createClient, fetchExchange } from '@urql/core';
|
|
2
|
-
export const createLocalGQLClient = (customFetch) => createClient({
|
|
3
|
-
url:
|
|
2
|
+
export const createLocalGQLClient = (graphqlUrl, customFetch) => createClient({
|
|
3
|
+
url: graphqlUrl,
|
|
4
4
|
requestPolicy: 'network-only',
|
|
5
5
|
fetchOptions: {
|
|
6
6
|
credentials: 'include'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ImageHelper } from './image-helper';
|
|
2
2
|
export { ImageSizeDetectorService } from './images-size-detector.service';
|
|
3
|
-
export { type MediaItemModel, type MediaItemMetadataModel, type MediaItemWithMetadataModel
|
|
3
|
+
export { type MediaItemModel, type MediaItemMetadataModel, type MediaItemWithMetadataModel } from './types';
|
|
4
4
|
export { getMediaItemImageUrl } from './media-item-url.service';
|
package/dist/core/media/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ImageHelper } from './image-helper';
|
|
2
2
|
export { ImageSizeDetectorService } from './images-size-detector.service';
|
|
3
|
-
export {
|
|
3
|
+
export {} from './types';
|
|
4
4
|
export { getMediaItemImageUrl } from './media-item-url.service';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaType } from '../enums';
|
|
1
2
|
export type MediaItemModel = {
|
|
2
3
|
type: MediaType;
|
|
3
4
|
url: string;
|
|
@@ -10,19 +11,3 @@ export type MediaItemMetadataModel = {
|
|
|
10
11
|
export type MediaItemWithMetadataModel = MediaItemModel & {
|
|
11
12
|
metadata: MediaItemMetadataModel;
|
|
12
13
|
};
|
|
13
|
-
export declare enum MediaType {
|
|
14
|
-
Audio = "AUDIO",
|
|
15
|
-
Image = "IMAGE",
|
|
16
|
-
ShortVideo = "SHORT_VIDEO",
|
|
17
|
-
Video = "VIDEO"
|
|
18
|
-
}
|
|
19
|
-
export declare enum MediaFormat {
|
|
20
|
-
W4H3 = "W4H3",
|
|
21
|
-
W16H9 = "W16H9"
|
|
22
|
-
}
|
|
23
|
-
export declare enum ImageScale {
|
|
24
|
-
Big = "BIG",
|
|
25
|
-
Medium = "MEDIUM",
|
|
26
|
-
OriginalEncoded = "ORIGINAL_ENCODED",
|
|
27
|
-
Small = "SMALL"
|
|
28
|
-
}
|
package/dist/core/media/types.js
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (MediaType) {
|
|
3
|
-
MediaType["Audio"] = "AUDIO";
|
|
4
|
-
MediaType["Image"] = "IMAGE";
|
|
5
|
-
MediaType["ShortVideo"] = "SHORT_VIDEO";
|
|
6
|
-
MediaType["Video"] = "VIDEO";
|
|
7
|
-
})(MediaType || (MediaType = {}));
|
|
8
|
-
export var MediaFormat;
|
|
9
|
-
(function (MediaFormat) {
|
|
10
|
-
MediaFormat["W4H3"] = "W4H3";
|
|
11
|
-
MediaFormat["W16H9"] = "W16H9";
|
|
12
|
-
})(MediaFormat || (MediaFormat = {}));
|
|
13
|
-
export var ImageScale;
|
|
14
|
-
(function (ImageScale) {
|
|
15
|
-
ImageScale["Big"] = "BIG";
|
|
16
|
-
ImageScale["Medium"] = "MEDIUM";
|
|
17
|
-
ImageScale["OriginalEncoded"] = "ORIGINAL_ENCODED";
|
|
18
|
-
ImageScale["Small"] = "SMALL";
|
|
19
|
-
})(ImageScale || (ImageScale = {}));
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Currency } from '
|
|
2
|
-
export declare const toPriceRepresentation: (amount: number, currency: Currency) => string;
|
|
1
|
+
import { Currency } from '../core/enums';
|
|
2
|
+
export declare const toPriceRepresentation: (amount: number, currency: Currency, includeCurrency?: boolean) => string;
|
|
3
3
|
export declare const shouldUseSalePrice: (price: number, salePrice: number | null, effectiveDateFrom: string | null, effectiveDateTo: string | null) => boolean;
|
|
4
4
|
export declare const isSalePriceEffective: (salePrice: number | null, effectiveDateFrom: string | null, effectiveDateTo: string | null) => boolean;
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
+
import { Currency } from '../core/enums';
|
|
1
2
|
import { Utils } from '../core/utils';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export const toPriceRepresentation = (amount, currency, includeCurrency = true) => {
|
|
4
|
+
const formatNumber = (value) => {
|
|
5
|
+
const noDecimals = Number.isInteger(value);
|
|
6
|
+
const options = {
|
|
7
|
+
minimumFractionDigits: noDecimals ? 0 : 2,
|
|
8
|
+
maximumFractionDigits: noDecimals ? 0 : 2
|
|
9
|
+
};
|
|
10
|
+
return value.toLocaleString('no-NO', options);
|
|
11
|
+
};
|
|
6
12
|
switch (currency) {
|
|
7
|
-
case Currency.Eur:
|
|
8
|
-
|
|
13
|
+
case Currency.Eur: {
|
|
14
|
+
const value = formatNumber(amount);
|
|
15
|
+
return includeCurrency ? `€ ${value}` : value;
|
|
16
|
+
}
|
|
9
17
|
case Currency.Nok: {
|
|
10
|
-
|
|
18
|
+
const formattedValue = Number.isInteger(amount) ? `${amount},-` : formatNumber(amount);
|
|
19
|
+
return includeCurrency ? `kr ${formatNumber(amount)}` : formattedValue;
|
|
20
|
+
}
|
|
21
|
+
case Currency.Usd: {
|
|
22
|
+
const value = formatNumber(amount);
|
|
23
|
+
return includeCurrency ? `€ ${value}` : value;
|
|
11
24
|
}
|
|
12
|
-
case Currency.Usd:
|
|
13
|
-
return `$ ${amount}`;
|
|
14
25
|
default: {
|
|
15
26
|
Utils.assertUnreachable(currency);
|
|
16
27
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script lang="ts">import { Button, ButtonSize } from '../../ui/button';
|
|
2
|
+
import { Image } from '../../ui/image';
|
|
3
|
+
import { LineClamp } from '../../ui/line-clamp';
|
|
4
|
+
import { ProportionalContainer } from '../../ui/proportional-container';
|
|
5
|
+
let { ad } = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class="short-video-ad-viewer">
|
|
9
|
+
<ProportionalContainer ratio={16 / 9}>
|
|
10
|
+
<Image src={ad.image} alt={ad.title} />
|
|
11
|
+
</ProportionalContainer>
|
|
12
|
+
<div class="short-video-ad-viewer__body">
|
|
13
|
+
{#if ad.title}
|
|
14
|
+
<p class="short-video-ad-viewer__title">{ad.title}</p>
|
|
15
|
+
{/if}
|
|
16
|
+
{#if ad.description}
|
|
17
|
+
<p class="short-video-ad-viewer__description">
|
|
18
|
+
<LineClamp value={ad.description} maxLines={3} />
|
|
19
|
+
</p>
|
|
20
|
+
{/if}
|
|
21
|
+
{#if ad.buttonUrl}
|
|
22
|
+
<div class="short-video-ad-viewer__button">
|
|
23
|
+
<a href={ad.buttonUrl} target="_blank" class="short-video-ad-viewer__link">
|
|
24
|
+
<Button size={ButtonSize.Standard}>{ad.buttonText || ad.buttonUrl}</Button>
|
|
25
|
+
</a>
|
|
26
|
+
</div>
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<style>@keyframes fadeIn {
|
|
32
|
+
0% {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
}
|
|
35
|
+
50% {
|
|
36
|
+
opacity: 0.4;
|
|
37
|
+
}
|
|
38
|
+
100% {
|
|
39
|
+
opacity: 1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.short-video-ad-viewer {
|
|
43
|
+
--_short-video-ad-viewer--background: var(--short-video-ad-viewer--background, #2e2e2e);
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
border-radius: 0.25em;
|
|
47
|
+
background: var(--_short-video-ad-viewer--background);
|
|
48
|
+
min-height: 0;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
width: 100%;
|
|
51
|
+
}
|
|
52
|
+
.short-video-ad-viewer__body {
|
|
53
|
+
padding: 1em 1em 1.25em;
|
|
54
|
+
}
|
|
55
|
+
.short-video-ad-viewer__title {
|
|
56
|
+
color: #ffffff;
|
|
57
|
+
font-size: 0.9375em;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
display: block;
|
|
60
|
+
margin-bottom: 0.6666666667em;
|
|
61
|
+
}
|
|
62
|
+
.short-video-ad-viewer__description {
|
|
63
|
+
color: #ffffff;
|
|
64
|
+
font-size: 0.75em;
|
|
65
|
+
display: block;
|
|
66
|
+
margin-bottom: 1.3333333333em;
|
|
67
|
+
white-space: pre-line;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
}
|
|
70
|
+
.short-video-ad-viewer__button {
|
|
71
|
+
margin-top: 1em;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
}</style>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ShortVideoViewerAdModel } from './types';
|
|
2
2
|
type Props = {
|
|
3
|
-
ad:
|
|
4
|
-
inert?: boolean;
|
|
3
|
+
ad: ShortVideoViewerAdModel;
|
|
5
4
|
};
|
|
6
5
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
7
6
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts">import { Icon, IconColor } from '../../ui/icon';
|
|
2
|
+
import { ImageRounded } from '../../ui/image';
|
|
3
|
+
import IconTargetArrow from '@fluentui/svg-icons/icons/target_arrow_20_regular.svg';
|
|
4
|
+
let { model } = $props();
|
|
5
|
+
const attachmentsToShow = $derived.by(() => {
|
|
6
|
+
const products = model.products.filter((p) => !!p.image).map((p) => ({ isAd: false, image: p.image, link: p.link }));
|
|
7
|
+
const ads = (model.ad ? [model.ad] : []).filter((a) => !!a.image).map((a) => ({ isAd: true, image: a.image, link: a.buttonUrl }));
|
|
8
|
+
return [...products, ...ads];
|
|
9
|
+
});
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div class="attachments-inline-container">
|
|
13
|
+
<div class="attachments-inline">
|
|
14
|
+
{#each attachmentsToShow as attachment (attachment)}
|
|
15
|
+
<div class="attachments-inline__item" onclick={() => attachment.link && window.open(attachment.link, '_blank')} onkeydown={() => {}} role="none">
|
|
16
|
+
<ImageRounded src={attachment.image} alt="" />
|
|
17
|
+
{#if attachment.isAd}
|
|
18
|
+
<div class="attachments-inline__item-icon">
|
|
19
|
+
<Icon src={IconTargetArrow} color={IconColor.White} />
|
|
20
|
+
</div>
|
|
21
|
+
{/if}
|
|
22
|
+
</div>
|
|
23
|
+
{/each}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<style>@keyframes fadeIn {
|
|
28
|
+
0% {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
50% {
|
|
32
|
+
opacity: 0.4;
|
|
33
|
+
}
|
|
34
|
+
100% {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.attachments-inline-container {
|
|
39
|
+
flex: 1;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
min-height: 0;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
justify-content: flex-end;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.attachments-inline {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 0.5rem;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
height: 100%;
|
|
53
|
+
justify-content: flex-end;
|
|
54
|
+
}
|
|
55
|
+
.attachments-inline__item {
|
|
56
|
+
--image--rounded--width: 3.125rem;
|
|
57
|
+
--image--rounded--height: 3.75rem;
|
|
58
|
+
--image--rounded--inner--border-width: 0;
|
|
59
|
+
--image--rounded--outer--border-radius: 0.25rem;
|
|
60
|
+
--image--rounded--outer--border-width: 1px;
|
|
61
|
+
--image--rounded--outer--border-color: #f3f4f6;
|
|
62
|
+
position: relative;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
.attachments-inline__item-icon {
|
|
66
|
+
position: absolute;
|
|
67
|
+
bottom: 2px;
|
|
68
|
+
right: 2px;
|
|
69
|
+
--icon--size: 1rem;
|
|
70
|
+
}</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ShortVideoViewerModel } from './types';
|
|
2
2
|
type Props = {
|
|
3
|
-
model:
|
|
3
|
+
model: ShortVideoViewerModel;
|
|
4
4
|
};
|
|
5
5
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
6
6
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
<script lang="ts">import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
let {
|
|
6
|
-
const
|
|
7
|
-
const products = model.products.filter((p) => !!p.image).map((p) => ({ isAd: false, image: p.image, link: p.link }));
|
|
8
|
-
const ads = (model.ad ? [model.ad] : []).filter((a) => !!a.media).map((a) => ({ isAd: true, image: getMediaItemImageUrl(a.media), link: a.buttonUrl }));
|
|
9
|
-
return [...products, ...ads];
|
|
10
|
-
});
|
|
1
|
+
<script lang="ts">import { default as ShortVideoAdViewer } from './cmp.ad.svelte';
|
|
2
|
+
import { default as ShortVideoProductViewer } from './cmp.product.svelte';
|
|
3
|
+
import { ShortVideoAttachmentsLocalizationSvelte } from './short-video-attachments-localization.svelte';
|
|
4
|
+
import {} from './types';
|
|
5
|
+
let { shortVideo, localization: localizationInit } = $props();
|
|
6
|
+
const localization = $derived(new ShortVideoAttachmentsLocalizationSvelte(localizationInit));
|
|
11
7
|
</script>
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
<div class="attachments
|
|
15
|
-
{#
|
|
16
|
-
<div class="
|
|
17
|
-
|
|
18
|
-
{#
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
</div>
|
|
22
|
-
{/if}
|
|
9
|
+
{#if shortVideo.products.length || shortVideo.ad}
|
|
10
|
+
<div class="short-video-attachments">
|
|
11
|
+
{#if shortVideo.products.length}
|
|
12
|
+
<div class="short-video-attachments__section-header">{localization.productsSection}</div>
|
|
13
|
+
<div class="short-video-attachments__products">
|
|
14
|
+
{#each shortVideo.products as product (product.id)}
|
|
15
|
+
<ShortVideoProductViewer product={product} localization={localization.productLocalization} />
|
|
16
|
+
{/each}
|
|
23
17
|
</div>
|
|
24
|
-
{/
|
|
18
|
+
{/if}
|
|
19
|
+
|
|
20
|
+
{#if shortVideo.ad}
|
|
21
|
+
<div class="short-video-attachments__section-header">{localization.offersSection}</div>
|
|
22
|
+
<div class="short-video-attachments__offer">
|
|
23
|
+
<ShortVideoAdViewer ad={shortVideo.ad} />
|
|
24
|
+
</div>
|
|
25
|
+
{/if}
|
|
25
26
|
</div>
|
|
26
|
-
|
|
27
|
+
{/if}
|
|
27
28
|
|
|
28
29
|
<style>@keyframes fadeIn {
|
|
29
30
|
0% {
|
|
@@ -36,36 +37,32 @@ const attachmentsToShow = $derived.by(() => {
|
|
|
36
37
|
opacity: 1;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
.short-video-attachments {
|
|
41
|
+
--_short-video-attachments--margin-vertical: var(--short-video-attachments--margin-vertical, 0);
|
|
42
|
+
--_short-video-attachments--spacing-vertical: var(--short-video-attachments--spacing-vertical, 1.25rem);
|
|
43
|
+
--_short-video-attachments--spacing-horizontal: var(--short-video-attachments--spacing-horizontal, 1rem);
|
|
43
44
|
display: flex;
|
|
44
45
|
flex-direction: column;
|
|
45
|
-
|
|
46
|
+
gap: var(--_short-video-attachments--spacing-vertical);
|
|
47
|
+
padding: var(--_short-video-attachments--margin-vertical) 0;
|
|
46
48
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
.short-video-attachments__section-header {
|
|
50
|
+
color: #d1d5db;
|
|
51
|
+
font-size: 1rem;
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
line-height: 1.2;
|
|
49
54
|
display: flex;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
height: 100%;
|
|
54
|
-
justify-content: flex-end;
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
margin-bottom: 0.5rem;
|
|
57
|
+
padding: 0.5625rem var(--_short-video-attachments--spacing-horizontal) 0;
|
|
55
58
|
}
|
|
56
|
-
.
|
|
57
|
-
--
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
--
|
|
61
|
-
--
|
|
62
|
-
--image--rounded--outer--border-color: #f3f4f6;
|
|
63
|
-
position: relative;
|
|
64
|
-
cursor: pointer;
|
|
59
|
+
.short-video-attachments__products {
|
|
60
|
+
padding: 0 var(--_short-video-attachments--spacing-horizontal);
|
|
61
|
+
display: grid;
|
|
62
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
63
|
+
grid-column-gap: var(--_short-video-attachments--spacing-horizontal);
|
|
64
|
+
grid-row-gap: var(--_short-video-attachments--spacing-vertical);
|
|
65
65
|
}
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
bottom: 2px;
|
|
69
|
-
right: 2px;
|
|
70
|
-
--icon--size: 1rem;
|
|
66
|
+
.short-video-attachments__offer {
|
|
67
|
+
padding: 0 var(--_short-video-attachments--spacing-horizontal);
|
|
71
68
|
}</style>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IShortVideoAttachmentsLocalization } from './short-video-attachments-localization.svelte';
|
|
2
|
+
import { type ShortVideoViewerModel } from './types';
|
|
2
3
|
type Props = {
|
|
3
|
-
|
|
4
|
+
shortVideo: ShortVideoViewerModel;
|
|
5
|
+
localization?: IShortVideoAttachmentsLocalization;
|
|
4
6
|
};
|
|
5
7
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
6
8
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
<script lang="ts">import { toPriceRepresentation } from '
|
|
2
|
-
import { ImageRounded } from '
|
|
3
|
-
import { ProportionalContainer } from '
|
|
4
|
-
|
|
1
|
+
<script lang="ts">import { toPriceRepresentation } from '../../products/price-helper';
|
|
2
|
+
import { ImageRounded } from '../../ui/image';
|
|
3
|
+
import { ProportionalContainer } from '../../ui/proportional-container';
|
|
4
|
+
import { ShortVideoProductLocalization } from './short-video-product-localization.svelte';
|
|
5
|
+
let { product, fitToContainer = false, localization: localizationInit } = $props();
|
|
6
|
+
const localization = $derived(new ShortVideoProductLocalization(localizationInit));
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
|
-
<div class="product-
|
|
9
|
+
<div class="short-video-product-viewer">
|
|
8
10
|
{#if fitToContainer}
|
|
9
|
-
<div class="product-
|
|
10
|
-
<ImageRounded src={
|
|
11
|
+
<div class="short-video-product-viewer__image">
|
|
12
|
+
<ImageRounded src={product.image} noBorders={true} />
|
|
11
13
|
</div>
|
|
12
14
|
{:else}
|
|
13
15
|
<ProportionalContainer ratio={4 / 5}>
|
|
14
|
-
<ImageRounded src={
|
|
16
|
+
<ImageRounded src={product.image} noBorders={true} />
|
|
15
17
|
</ProportionalContainer>
|
|
16
18
|
{/if}
|
|
17
|
-
<div class="product-
|
|
18
|
-
<div class="product-
|
|
19
|
+
<div class="short-video-product-viewer__name">{product.title}</div>
|
|
20
|
+
<div class="short-video-product-viewer__price">
|
|
19
21
|
<div class="product-price">
|
|
20
|
-
{#if !
|
|
21
|
-
<div class="product-price__price">{toPriceRepresentation(
|
|
22
|
+
{#if !product.salePrice}
|
|
23
|
+
<div class="product-price__price">{toPriceRepresentation(product.price, product.currency)}</div>
|
|
22
24
|
{:else}
|
|
23
25
|
<div class="product-price__before-price">
|
|
24
|
-
{
|
|
26
|
+
{#if localization.beforeNowPrefix}
|
|
27
|
+
{localization.beforeNowPrefix}
|
|
28
|
+
{/if}
|
|
29
|
+
{toPriceRepresentation(product.price, product.currency)}
|
|
25
30
|
</div>
|
|
26
31
|
<div class="product-price__price product-price__price--sale">
|
|
27
|
-
{toPriceRepresentation(
|
|
32
|
+
{toPriceRepresentation(product.salePrice, product.currency)}
|
|
28
33
|
</div>
|
|
29
34
|
{/if}
|
|
30
35
|
</div>
|
|
31
36
|
</div>
|
|
32
37
|
|
|
33
|
-
{#if
|
|
34
|
-
<a href={
|
|
38
|
+
{#if product.link}
|
|
39
|
+
<a href={product.link} target="_blank" rel="noopener noreferrer" class="short-video-product-viewer__link" aria-label="none"> </a>
|
|
35
40
|
{/if}
|
|
36
41
|
</div>
|
|
37
42
|
|
|
@@ -46,24 +51,27 @@ let { model, fitToContainer = true } = $props();
|
|
|
46
51
|
opacity: 1;
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
|
-
.product-
|
|
54
|
+
.short-video-product-viewer {
|
|
50
55
|
width: 100%;
|
|
51
|
-
height:
|
|
56
|
+
height: auto;
|
|
52
57
|
position: relative;
|
|
53
58
|
display: flex;
|
|
54
59
|
flex-direction: column;
|
|
55
60
|
container-type: inline-size;
|
|
61
|
+
--image--object-fit: contain;
|
|
56
62
|
--image--rounded--outer--border-radius: 0.25em;
|
|
63
|
+
--image--rounded--inner--border-color: transparent;
|
|
64
|
+
--image--rounded--outer--border-color: transparent;
|
|
57
65
|
}
|
|
58
|
-
.product-
|
|
66
|
+
.short-video-product-viewer__image {
|
|
59
67
|
flex: 1;
|
|
60
68
|
min-height: 0;
|
|
61
69
|
}
|
|
62
|
-
.product-
|
|
70
|
+
.short-video-product-viewer__name {
|
|
63
71
|
width: 100%;
|
|
64
72
|
font-weight: 500;
|
|
65
73
|
font-size: 0.9375rem;
|
|
66
|
-
color: #
|
|
74
|
+
color: #ffffff;
|
|
67
75
|
margin-top: 0.5rem;
|
|
68
76
|
padding: 0 0.3125rem;
|
|
69
77
|
text-align: center;
|
|
@@ -74,23 +82,23 @@ let { model, fitToContainer = true } = $props();
|
|
|
74
82
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
75
83
|
}
|
|
76
84
|
@container (width < 300px) {
|
|
77
|
-
.product-
|
|
85
|
+
.short-video-product-viewer__name {
|
|
78
86
|
font-size: 0.75rem;
|
|
79
87
|
margin-top: 0.3125rem;
|
|
80
88
|
padding: 0 0.25rem;
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
|
-
.product-
|
|
91
|
+
.short-video-product-viewer__price {
|
|
84
92
|
padding-top: 0.3125rem;
|
|
85
93
|
margin-top: auto;
|
|
86
94
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
87
95
|
}
|
|
88
96
|
@container (width < 300px) {
|
|
89
|
-
.product-
|
|
97
|
+
.short-video-product-viewer__price {
|
|
90
98
|
padding-top: 0.25rem;
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
|
-
.product-
|
|
101
|
+
.short-video-product-viewer__link {
|
|
94
102
|
position: absolute;
|
|
95
103
|
top: 0;
|
|
96
104
|
left: 0;
|
|
@@ -131,7 +139,7 @@ let { model, fitToContainer = true } = $props();
|
|
|
131
139
|
.product-price__price {
|
|
132
140
|
width: 100%;
|
|
133
141
|
font-size: 1.0625em;
|
|
134
|
-
color: #
|
|
142
|
+
color: #ffffff;
|
|
135
143
|
font-weight: 800;
|
|
136
144
|
margin-top: auto;
|
|
137
145
|
text-align: center;
|