@streamscloud/embeddable 3.2.2 → 3.2.4
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 +2 -0
- package/dist/core/enums.js +2 -0
- package/dist/core/graphql.d.ts +1 -3
- package/dist/core/graphql.js +3 -12
- package/dist/core/utils/html-helper.d.ts +0 -1
- package/dist/core/utils/html-helper.js +0 -4
- package/dist/products/price-helper.js +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +2 -2
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +2 -6
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/description.svelte +0 -5
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/index.d.ts +2 -4
- package/dist/short-videos/short-video-viewer/index.js +0 -1
- package/dist/short-videos/short-video-viewer/mapper.js +1 -2
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +0 -1
- package/dist/short-videos/short-video-viewer/operations.generated.js +0 -1
- package/dist/short-videos/short-video-viewer/operations.graphql +0 -1
- package/dist/short-videos/short-video-viewer/{short-video-attachments-localization.d.ts → short-video-attachments-localization.svelte.d.ts} +4 -5
- 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.d.ts → short-video-details-localization.svelte.d.ts} +6 -7
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/{short-video-product-localization.d.ts → short-video-product-localization.svelte.d.ts} +1 -2
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +11 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +13 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/types.d.ts +0 -1
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +11 -88
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +5 -5
- package/dist/short-videos/short-videos-player/controls.svelte +2 -2
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
- package/dist/short-videos/short-videos-player/index.d.ts +14 -51
- package/dist/short-videos/short-videos-player/index.js +12 -83
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +8 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +6 -0
- package/dist/streams/layout/cmp.layout.svelte.d.ts +2 -4
- package/dist/streams/layout/cmp.slot-content.svelte +4 -4
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +1 -2
- package/dist/streams/layout/cmp.slot.svelte.d.ts +2 -7
- package/dist/streams/layout/component.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +1 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +3 -4
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +2 -15
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +3 -7
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +89 -15
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +4 -5
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +2 -4
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -3
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +17 -24
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +3 -4
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +2 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +2 -6
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -3
- package/dist/streams/layout/element-views/index.d.ts +11 -16
- package/dist/streams/layout/element-views/index.js +9 -12
- 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 +12 -47
- package/dist/streams/layout/elements.js +1 -1
- package/dist/streams/layout/enums.d.ts +3 -34
- package/dist/streams/layout/enums.js +7 -46
- package/dist/streams/layout/index.d.ts +10 -3
- package/dist/streams/layout/index.js +2 -3
- package/dist/streams/layout/layout.d.ts +1 -2
- package/dist/streams/layout/models/index.d.ts +1 -1
- package/dist/streams/layout/models/mapper.js +1 -2
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -1
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +2 -1
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +0 -4
- package/dist/streams/layout/serializer.d.ts +3 -0
- package/dist/streams/layout/serializer.js +6 -0
- package/dist/streams/layout/slot.d.ts +0 -2
- package/dist/streams/layout/styles-transformer.d.ts +2 -3
- package/dist/streams/layout/styles-transformer.js +30 -54
- package/dist/streams/layout/styles.d.ts +14 -24
- package/dist/streams/layout/type-guards.d.ts +0 -31
- package/dist/streams/layout/type-guards.js +1 -13
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +2 -4
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -3
- package/dist/streams/stream-page-viewer/index.d.ts +0 -1
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +13 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +10 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte +7 -47
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +4 -6
- package/dist/streams/stream-player/controls.svelte +3 -46
- package/dist/streams/stream-player/controls.svelte.d.ts +1 -1
- package/dist/streams/stream-player/index.d.ts +4 -6
- package/dist/streams/stream-player/index.js +28 -15
- package/dist/streams/stream-player/operations.generated.d.ts +1 -1
- package/dist/streams/stream-player/operations.generated.js +3 -5
- package/dist/streams/stream-player/operations.graphql +3 -3
- package/dist/streams/stream-player/stream-overview.svelte +2 -2
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -1
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +2 -2
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +12 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.js +10 -0
- package/dist/ui/icon/cmp.icon.svelte +26 -13
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +2 -2
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +2 -3
- package/dist/ui/line-clamp/index.d.ts +1 -1
- package/dist/ui/line-clamp/index.js +1 -1
- package/dist/ui/line-clamp/{line-clamp-localization.d.ts → line-clamp-localization.svelte.d.ts} +1 -2
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +15 -0
- package/dist/ui/shadow-dom/shadow-host.d.ts +5 -1
- package/dist/ui/shadow-dom/shadow-host.js +14 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte +1 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +2 -3
- package/dist/ui/time-ago/index.d.ts +1 -1
- package/dist/ui/time-ago/{time-ago-localization.d.ts → time-ago-localization.svelte.d.ts} +1 -2
- package/dist/ui/time-ago/time-ago-localization.svelte.js +39 -0
- package/dist/ui/video/cmp.video.svelte +18 -42
- package/package.json +1 -1
- package/dist/core/analytics.profile-id.d.ts +0 -5
- package/dist/core/analytics.profile-id.js +0 -17
- package/dist/core/document.event-handlers.d.ts +0 -1
- package/dist/core/document.event-handlers.js +0 -5
- package/dist/core/locale.d.ts +0 -6
- package/dist/core/locale.js +0 -24
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -21
- package/dist/short-videos/short-video-viewer/short-video-details-localization.js +0 -17
- package/dist/short-videos/short-video-viewer/short-video-product-localization.js +0 -13
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +0 -14
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.js +0 -17
- package/dist/short-videos/short-videos-player/operations.generated.d.ts +0 -65
- package/dist/short-videos/short-videos-player/operations.generated.js +0 -194
- package/dist/short-videos/short-videos-player/operations.graphql +0 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +0 -16
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -13
- package/dist/short-videos/short-videos-player/types.d.ts +0 -36
- package/dist/short-videos/short-videos-player/types.js +0 -6
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +0 -16
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +0 -74
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +0 -37
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/price-element-view.svelte +0 -168
- package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +0 -15
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +0 -13
- package/dist/streams/layout/element-views/price-stream-element-localization.js +0 -21
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -9
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +0 -8
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +0 -26
- package/dist/streams/layout/element-views/stream-element-localization.d.ts +0 -15
- package/dist/streams/layout/element-views/stream-element-localization.js +0 -11
- package/dist/streams/layout/serializer.svelte.d.ts +0 -29
- package/dist/streams/layout/serializer.svelte.js +0 -93
- package/dist/streams/layout/slot-data-ref.d.ts +0 -13
- package/dist/streams/layout/slot-data-ref.js +0 -1
- package/dist/streams/layout/svg-attributes.d.ts +0 -7
- package/dist/streams/layout/svg-attributes.js +0 -8
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -9
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
- package/dist/streams/stream-player/stream-player-localization.d.ts +0 -26
- package/dist/streams/stream-player/stream-player-localization.js +0 -31
- package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -125
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -9
- package/dist/ui/swipe-indicator/index.d.ts +0 -2
- package/dist/ui/swipe-indicator/index.js +0 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -8
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
- package/dist/ui/time-ago/time-ago-localization.js +0 -55
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
export const GetShortVideosDocument = {
|
|
2
|
-
kind: 'Document',
|
|
3
|
-
definitions: [
|
|
4
|
-
{
|
|
5
|
-
kind: 'OperationDefinition',
|
|
6
|
-
operation: 'query',
|
|
7
|
-
name: { kind: 'Name', value: 'GetShortVideos' },
|
|
8
|
-
variableDefinitions: [
|
|
9
|
-
{
|
|
10
|
-
kind: 'VariableDefinition',
|
|
11
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'input' } },
|
|
12
|
-
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'EmbedPostsInput' } } }
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
kind: 'VariableDefinition',
|
|
16
|
-
variable: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } },
|
|
17
|
-
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ImageScale' } },
|
|
18
|
-
defaultValue: { kind: 'EnumValue', value: 'ORIGINAL_ENCODED' }
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
selectionSet: {
|
|
22
|
-
kind: 'SelectionSet',
|
|
23
|
-
selections: [
|
|
24
|
-
{
|
|
25
|
-
kind: 'Field',
|
|
26
|
-
alias: { kind: 'Name', value: 'shortVideos' },
|
|
27
|
-
name: { kind: 'Name', value: 'embedPosts' },
|
|
28
|
-
arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'input' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'input' } } }],
|
|
29
|
-
selectionSet: {
|
|
30
|
-
kind: 'SelectionSet',
|
|
31
|
-
selections: [
|
|
32
|
-
{
|
|
33
|
-
kind: 'Field',
|
|
34
|
-
name: { kind: 'Name', value: 'items' },
|
|
35
|
-
selectionSet: {
|
|
36
|
-
kind: 'SelectionSet',
|
|
37
|
-
selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } }]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
kind: 'FragmentDefinition',
|
|
48
|
-
name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
|
|
49
|
-
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
50
|
-
selectionSet: {
|
|
51
|
-
kind: 'SelectionSet',
|
|
52
|
-
selections: [
|
|
53
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
54
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
|
|
55
|
-
{
|
|
56
|
-
kind: 'Field',
|
|
57
|
-
name: { kind: 'Name', value: 'postHeading' },
|
|
58
|
-
selectionSet: {
|
|
59
|
-
kind: 'SelectionSet',
|
|
60
|
-
selections: [
|
|
61
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'sourceImage' } },
|
|
62
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'sourceName' } },
|
|
63
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'postDisplayDate' } },
|
|
64
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'postViewsCount' } }
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
kind: 'Field',
|
|
70
|
-
name: { kind: 'Name', value: 'allProducts' },
|
|
71
|
-
selectionSet: {
|
|
72
|
-
kind: 'SelectionSet',
|
|
73
|
-
selections: [
|
|
74
|
-
{
|
|
75
|
-
kind: 'Field',
|
|
76
|
-
name: { kind: 'Name', value: 'media' },
|
|
77
|
-
selectionSet: {
|
|
78
|
-
kind: 'SelectionSet',
|
|
79
|
-
selections: [
|
|
80
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
81
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
|
|
82
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
87
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
88
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
89
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
|
|
90
|
-
{
|
|
91
|
-
kind: 'Field',
|
|
92
|
-
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
93
|
-
selectionSet: {
|
|
94
|
-
kind: 'SelectionSet',
|
|
95
|
-
selections: [
|
|
96
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
97
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
98
|
-
{
|
|
99
|
-
kind: 'Field',
|
|
100
|
-
name: { kind: 'Name', value: 'productSalePrices' },
|
|
101
|
-
selectionSet: {
|
|
102
|
-
kind: 'SelectionSet',
|
|
103
|
-
selections: [
|
|
104
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
105
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
106
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
kind: 'Field',
|
|
118
|
-
name: { kind: 'Name', value: 'ad' },
|
|
119
|
-
selectionSet: {
|
|
120
|
-
kind: 'SelectionSet',
|
|
121
|
-
selections: [
|
|
122
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
123
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
124
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
125
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'buttonText' } },
|
|
126
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'buttonUrl' } },
|
|
127
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'openLinkInNewWindow' } },
|
|
128
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
129
|
-
{
|
|
130
|
-
kind: 'Field',
|
|
131
|
-
name: { kind: 'Name', value: 'media' },
|
|
132
|
-
selectionSet: {
|
|
133
|
-
kind: 'SelectionSet',
|
|
134
|
-
selections: [
|
|
135
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
136
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
|
|
137
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
kind: 'Field',
|
|
146
|
-
name: { kind: 'Name', value: 'postData' },
|
|
147
|
-
selectionSet: {
|
|
148
|
-
kind: 'SelectionSet',
|
|
149
|
-
selections: [
|
|
150
|
-
{
|
|
151
|
-
kind: 'Field',
|
|
152
|
-
name: { kind: 'Name', value: 'media' },
|
|
153
|
-
selectionSet: {
|
|
154
|
-
kind: 'SelectionSet',
|
|
155
|
-
selections: [
|
|
156
|
-
{
|
|
157
|
-
kind: 'Field',
|
|
158
|
-
name: { kind: 'Name', value: 'url' },
|
|
159
|
-
arguments: [
|
|
160
|
-
{
|
|
161
|
-
kind: 'Argument',
|
|
162
|
-
name: { kind: 'Name', value: 'scale' },
|
|
163
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
kind: 'Field',
|
|
169
|
-
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
170
|
-
arguments: [
|
|
171
|
-
{
|
|
172
|
-
kind: 'Argument',
|
|
173
|
-
name: { kind: 'Name', value: 'scale' },
|
|
174
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
175
|
-
}
|
|
176
|
-
]
|
|
177
|
-
},
|
|
178
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
179
|
-
]
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
kind: 'Field',
|
|
184
|
-
name: { kind: 'Name', value: 'shortVideoData' },
|
|
185
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
186
|
-
}
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
]
|
|
194
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../core/locale';
|
|
2
|
-
import type { IShortVideoAttachmentsLocalization, IShortVideoDetailsLocalization, IShortVideoViewerLocalization } from '../short-video-viewer';
|
|
3
|
-
import type { ISwipeIndicatorLocalization } from '../../ui/swipe-indicator';
|
|
4
|
-
export interface IShortVideosPlayerLocalization {
|
|
5
|
-
shortVideoAttachmentsLocalization?: IShortVideoAttachmentsLocalization | Locale;
|
|
6
|
-
shortVideoDetailsLocalization?: IShortVideoDetailsLocalization | Locale;
|
|
7
|
-
shortVideoViewerLocalization?: IShortVideoViewerLocalization | Locale;
|
|
8
|
-
swipeIndicatorLocalization?: ISwipeIndicatorLocalization | Locale;
|
|
9
|
-
}
|
|
10
|
-
export declare class ShortVideosPlayerLocalization {
|
|
11
|
-
shortVideoAttachmentsLocalization: IShortVideoAttachmentsLocalization | Locale;
|
|
12
|
-
shortVideoDetailsLocalization: IShortVideoDetailsLocalization | Locale;
|
|
13
|
-
shortVideoViewerLocalization: IShortVideoViewerLocalization | Locale;
|
|
14
|
-
swipeIndicatorLocalization: ISwipeIndicatorLocalization | Locale;
|
|
15
|
-
constructor(init: IShortVideosPlayerLocalization | Locale);
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../core/locale';
|
|
2
|
-
export class ShortVideosPlayerLocalization {
|
|
3
|
-
shortVideoAttachmentsLocalization;
|
|
4
|
-
shortVideoDetailsLocalization;
|
|
5
|
-
shortVideoViewerLocalization;
|
|
6
|
-
swipeIndicatorLocalization;
|
|
7
|
-
constructor(init) {
|
|
8
|
-
this.shortVideoAttachmentsLocalization = isLocale(init) ? init : init.shortVideoAttachmentsLocalization || 'en';
|
|
9
|
-
this.shortVideoDetailsLocalization = isLocale(init) ? init : init.shortVideoDetailsLocalization || 'en';
|
|
10
|
-
this.shortVideoViewerLocalization = isLocale(init) ? init : init.shortVideoViewerLocalization || 'en';
|
|
11
|
-
this.swipeIndicatorLocalization = isLocale(init) ? init : init.swipeIndicatorLocalization || 'en';
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ShortVideoViewerModel } from '../..';
|
|
2
|
-
import type { PlayerItemsProvider } from '../../ui/player';
|
|
3
|
-
import type { IShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
4
|
-
export type PlayerInput = ProviderPlayerInput | IdsPlayerInput;
|
|
5
|
-
export type ProviderPlayerInput = {
|
|
6
|
-
type: 'provider';
|
|
7
|
-
provider: PlayerItemsProvider<ShortVideoViewerModel>;
|
|
8
|
-
};
|
|
9
|
-
export type IdsPlayerInput = {
|
|
10
|
-
type: 'ids';
|
|
11
|
-
ids: string[];
|
|
12
|
-
initialId?: string;
|
|
13
|
-
graphqlOrigin?: string;
|
|
14
|
-
initiator?: string;
|
|
15
|
-
};
|
|
16
|
-
export type OpenShortVideosPlayerInit = ProviderInit | IdsInit;
|
|
17
|
-
type ProviderInit = {
|
|
18
|
-
shortVideosProvider: PlayerItemsProvider<ShortVideoViewerModel>;
|
|
19
|
-
localization?: IShortVideosPlayerLocalization | 'en' | 'no';
|
|
20
|
-
on?: {
|
|
21
|
-
playerClosed?: () => void;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
type IdsInit = {
|
|
25
|
-
ids: string[];
|
|
26
|
-
graphqlOrigin?: string;
|
|
27
|
-
initialId?: string;
|
|
28
|
-
localization?: IShortVideosPlayerLocalization | 'en' | 'no';
|
|
29
|
-
initiator?: string;
|
|
30
|
-
on?: {
|
|
31
|
-
playerClosed?: () => void;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
export declare const isShortVideosProviderInit: (init: unknown) => init is ProviderInit;
|
|
35
|
-
export declare function isIdsInit(init: unknown): init is IdsInit;
|
|
36
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const isShortVideosProviderInit = (init) => {
|
|
2
|
-
return typeof init === 'object' && init !== null && 'shortVideosProvider' in init;
|
|
3
|
-
};
|
|
4
|
-
export function isIdsInit(init) {
|
|
5
|
-
return typeof init === 'object' && init !== null && 'ids' in init && 'graphqlOrigin' in init;
|
|
6
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { HtmlHelper } from '../../../core/utils/html-helper';
|
|
2
|
-
import { generateAnnotationStyles } from '../styles-transformer';
|
|
3
|
-
let { model } = $props();
|
|
4
|
-
const svgValue = $derived.by(() => {
|
|
5
|
-
if (model.svg) {
|
|
6
|
-
return HtmlHelper.sanitizeSvg(model.svg);
|
|
7
|
-
}
|
|
8
|
-
return '';
|
|
9
|
-
});
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
{#if !model.inactive}
|
|
13
|
-
<div class="annotation-stream-element" style={generateAnnotationStyles(model.styles, model.placement)}>
|
|
14
|
-
{@html svgValue}
|
|
15
|
-
</div>
|
|
16
|
-
{/if}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<script lang="ts">var _a;
|
|
2
|
-
import { StockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
-
import { StockStreamElementLevel } from '../enums';
|
|
4
|
-
import { mapFlexJustifyContent, transformNumericValue } from '../styles-transformer';
|
|
5
|
-
let { model, heightOverrideDdu, localization: localizationInit } = $props();
|
|
6
|
-
const localization = $derived(new StockStreamElementLocalization(localizationInit));
|
|
7
|
-
const height = $derived(heightOverrideDdu || ((_a = model.styles) === null || _a === void 0 ? void 0 : _a.height) || 16);
|
|
8
|
-
const containerStyles = $derived.by(() => {
|
|
9
|
-
var _a;
|
|
10
|
-
const values = [
|
|
11
|
-
`align-items: center;`,
|
|
12
|
-
`height: ${transformNumericValue(height)}; gap: 1cqi;`,
|
|
13
|
-
`justify-content: ${mapFlexJustifyContent((_a = model.styles) === null || _a === void 0 ? void 0 : _a.horizontalAlign)};`
|
|
14
|
-
];
|
|
15
|
-
return values.join('');
|
|
16
|
-
});
|
|
17
|
-
const dotCustomStyles = $derived.by(() => {
|
|
18
|
-
const values = [`height: ${transformNumericValue(height)};`, `width: ${transformNumericValue(height)};`];
|
|
19
|
-
return values.join('');
|
|
20
|
-
});
|
|
21
|
-
const quantityCustomStyles = $derived.by(() => {
|
|
22
|
-
const values = [`font-size: ${transformNumericValue(height * 0.75)};`];
|
|
23
|
-
return values.join('');
|
|
24
|
-
});
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<div class="stock-stream-element" style={containerStyles}>
|
|
28
|
-
<div
|
|
29
|
-
class="stock-stream-element__dot"
|
|
30
|
-
style={dotCustomStyles}
|
|
31
|
-
class:stock-stream-element__dot--high={model.level === StockStreamElementLevel.High}
|
|
32
|
-
class:stock-stream-element__dot--medium={model.level === StockStreamElementLevel.Medium}
|
|
33
|
-
class:stock-stream-element__dot--low={model.level === StockStreamElementLevel.Low}
|
|
34
|
-
class:stock-stream-element__dot--out-of-stock={model.level === StockStreamElementLevel.OutOfStock}>
|
|
35
|
-
|
|
36
|
-
</div>
|
|
37
|
-
<div class="stock-stream-element__quantity" style={quantityCustomStyles}>
|
|
38
|
-
{localization.quantity(model.quantity, [StockStreamElementLevel.Low, StockStreamElementLevel.OutOfStock].includes(model.level))}
|
|
39
|
-
{#if model.textAfter}
|
|
40
|
-
{model.textAfter}
|
|
41
|
-
{/if}
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<style>@keyframes fadeIn {
|
|
46
|
-
0% {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
50% {
|
|
50
|
-
opacity: 0.4;
|
|
51
|
-
}
|
|
52
|
-
100% {
|
|
53
|
-
opacity: 1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.stock-stream-element {
|
|
57
|
-
display: flex;
|
|
58
|
-
}
|
|
59
|
-
.stock-stream-element__dot {
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
}
|
|
62
|
-
.stock-stream-element__dot--high {
|
|
63
|
-
background-color: #0cce6b;
|
|
64
|
-
}
|
|
65
|
-
.stock-stream-element__dot--medium {
|
|
66
|
-
background-color: #ffa62b;
|
|
67
|
-
}
|
|
68
|
-
.stock-stream-element__dot--low {
|
|
69
|
-
background-color: #e71d36;
|
|
70
|
-
}
|
|
71
|
-
.stock-stream-element__dot--out-of-stock {
|
|
72
|
-
border: 1px solid #144ab0;
|
|
73
|
-
background-color: #ffffff;
|
|
74
|
-
}</style>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Locale } from '../../../core/locale';
|
|
2
|
-
import { type IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
-
import type { StockStreamElementModel } from '../elements';
|
|
4
|
-
type Props = {
|
|
5
|
-
model: StockStreamElementModel;
|
|
6
|
-
heightOverrideDdu?: number;
|
|
7
|
-
localization: IStockStreamElementLocalization | Locale;
|
|
8
|
-
};
|
|
9
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
10
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
11
|
-
export default Cmp;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script lang="ts">let { model } = $props();
|
|
2
|
-
export {};
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div class="web-view-stream-element">
|
|
6
|
-
{#if model.url}
|
|
7
|
-
<iframe
|
|
8
|
-
title="Web View"
|
|
9
|
-
src={model.url}
|
|
10
|
-
style="width: 100%; height: 100%; border: none;"
|
|
11
|
-
allowfullscreen
|
|
12
|
-
sandbox="allow-scripts allow-forms allow-same-origin"></iframe>
|
|
13
|
-
{:else}
|
|
14
|
-
<p>No URL provided for the web view.</p>
|
|
15
|
-
{/if}
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<style>@keyframes fadeIn {
|
|
19
|
-
0% {
|
|
20
|
-
opacity: 1;
|
|
21
|
-
}
|
|
22
|
-
50% {
|
|
23
|
-
opacity: 0.4;
|
|
24
|
-
}
|
|
25
|
-
100% {
|
|
26
|
-
opacity: 1;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
.web-view-stream-element {
|
|
30
|
-
width: 100%;
|
|
31
|
-
min-width: 100%;
|
|
32
|
-
max-width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
min-height: 100%;
|
|
35
|
-
max-height: 100%;
|
|
36
|
-
position: relative;
|
|
37
|
-
}</style>
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
<script lang="ts">var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Utils } from '../../../core/utils';
|
|
11
|
-
import { toPriceRepresentation } from '../../../products/price-helper';
|
|
12
|
-
import { LineClamp } from '../../../ui/line-clamp';
|
|
13
|
-
import { PriceStreamElementLocalization } from './price-stream-element-localization';
|
|
14
|
-
import { default as StockElementView } from './cmp.stock-stream-element.svelte';
|
|
15
|
-
import { mapFlexJustifyContent, mapFontFamily, mapFontWeight, transformColorValue, transformFontSizeValue, transformNumericValue } from '../styles-transformer';
|
|
16
|
-
let { maxElementHeight, model, data, localization, on } = $props();
|
|
17
|
-
let priceElementRef = $state.raw(null);
|
|
18
|
-
let priceContainerRef = $state.raw(null);
|
|
19
|
-
const minElementHeight = 16;
|
|
20
|
-
let adjustedHeight = $derived(maxElementHeight);
|
|
21
|
-
const lineHeight = 1.2;
|
|
22
|
-
const elementHeight = $derived(adjustedHeight);
|
|
23
|
-
const priceHeight = $derived(model.stock ? elementHeight * 0.68 : elementHeight);
|
|
24
|
-
const adjustableHeight = $derived(!!(on === null || on === void 0 ? void 0 : on.heightAdjusted));
|
|
25
|
-
const currentPrice = $derived.by(() => {
|
|
26
|
-
if (data.salePrice) {
|
|
27
|
-
return toPriceRepresentation(data.salePrice, data.currency, model.includeCurrency || false);
|
|
28
|
-
}
|
|
29
|
-
return toPriceRepresentation(data.price, data.currency, model.includeCurrency || false);
|
|
30
|
-
});
|
|
31
|
-
const saveValue = $derived.by(() => {
|
|
32
|
-
if (data.salePrice) {
|
|
33
|
-
return toPriceRepresentation(data.price - data.salePrice, data.currency, model.includeCurrency || false);
|
|
34
|
-
}
|
|
35
|
-
return 0;
|
|
36
|
-
});
|
|
37
|
-
const beforeValue = $derived.by(() => {
|
|
38
|
-
return toPriceRepresentation(data.price, data.currency, model.includeCurrency || false);
|
|
39
|
-
});
|
|
40
|
-
const elementContainerStyles = $derived.by(() => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
const values = [
|
|
43
|
-
'display: flex;',
|
|
44
|
-
'flex-direction: column;',
|
|
45
|
-
'justify-content: space-between;',
|
|
46
|
-
`align-items: ${mapFlexJustifyContent((_a = model.styles) === null || _a === void 0 ? void 0 : _a.horizontalAlign)};`,
|
|
47
|
-
`font-family: ${mapFontFamily((_b = model.styles) === null || _b === void 0 ? void 0 : _b.fontFamily)};`,
|
|
48
|
-
`height: ${transformNumericValue(elementHeight)};`
|
|
49
|
-
];
|
|
50
|
-
return values.join('');
|
|
51
|
-
});
|
|
52
|
-
const priceContainerStyles = $derived.by(() => {
|
|
53
|
-
const values = ['display: flex;', `height: ${transformNumericValue(priceHeight)};`, `align-items: center;`, 'gap: 3cqi;'];
|
|
54
|
-
return values.join('');
|
|
55
|
-
});
|
|
56
|
-
const priceCustomStyles = $derived.by(() => {
|
|
57
|
-
var _a, _b, _c;
|
|
58
|
-
const values = [
|
|
59
|
-
`font-size: ${transformFontSizeValue(priceHeight / lineHeight)};`,
|
|
60
|
-
`line-height: ${lineHeight};`,
|
|
61
|
-
`font-weight: ${mapFontWeight((_a = model.styles) === null || _a === void 0 ? void 0 : _a.fontWeight)};`,
|
|
62
|
-
`color: ${transformColorValue(data.salePrice ? (_b = model.styles) === null || _b === void 0 ? void 0 : _b.salePriceColor : (_c = model.styles) === null || _c === void 0 ? void 0 : _c.regularPriceColor)};`
|
|
63
|
-
];
|
|
64
|
-
return values.join('');
|
|
65
|
-
});
|
|
66
|
-
const saveValueCustomStyles = $derived.by(() => {
|
|
67
|
-
var _a, _b;
|
|
68
|
-
const values = [
|
|
69
|
-
`margin-top: ${transformNumericValue((priceHeight - priceHeight / lineHeight) / 2)};`,
|
|
70
|
-
`font-size: ${transformFontSizeValue(priceHeight / 4)};`,
|
|
71
|
-
`font-weight: 500;`,
|
|
72
|
-
`padding: ${transformNumericValue(priceHeight / 8)} ${transformNumericValue(priceHeight / 4)};`,
|
|
73
|
-
`border-radius: ${transformNumericValue(priceHeight / 8)};`,
|
|
74
|
-
`background-color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.saveValueBackgroundColor)};`,
|
|
75
|
-
`color: ${transformColorValue((_b = model.styles) === null || _b === void 0 ? void 0 : _b.saveValueColor)};`
|
|
76
|
-
];
|
|
77
|
-
return values.join('');
|
|
78
|
-
});
|
|
79
|
-
const beforeValueCustomStyles = $derived.by(() => {
|
|
80
|
-
var _a;
|
|
81
|
-
const values = [
|
|
82
|
-
`font-size: ${transformFontSizeValue(priceHeight / 5)};`,
|
|
83
|
-
`font-weight: 500;`,
|
|
84
|
-
`color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.beforeValueColor)};`
|
|
85
|
-
];
|
|
86
|
-
return values.join('');
|
|
87
|
-
});
|
|
88
|
-
const textAfterCustomStyles = $derived.by(() => {
|
|
89
|
-
const values = [`font-size: ${transformFontSizeValue(priceHeight / lineHeight / 2)};`, `font-weight: 500;`, 'align-self: flex-end;'];
|
|
90
|
-
return values.join('');
|
|
91
|
-
});
|
|
92
|
-
const stockElementHeight = $derived(elementHeight * 0.23);
|
|
93
|
-
const adjustHeightToFit = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
-
if (!priceContainerRef || !priceElementRef || !adjustableHeight) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
yield new Promise((resolve) => requestAnimationFrame(resolve));
|
|
98
|
-
let currentHeight = maxElementHeight;
|
|
99
|
-
while (currentHeight > minElementHeight) {
|
|
100
|
-
adjustedHeight = currentHeight;
|
|
101
|
-
yield new Promise((resolve) => requestAnimationFrame(resolve));
|
|
102
|
-
let hasOverflow = priceElementRef.clientWidth < priceContainerRef.clientWidth;
|
|
103
|
-
if (!hasOverflow) {
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
currentHeight -= 1;
|
|
107
|
-
}
|
|
108
|
-
on === null || on === void 0 ? void 0 : on.heightAdjusted(currentHeight);
|
|
109
|
-
});
|
|
110
|
-
const debouncedAdjustHeightToFit = Utils.debounce(adjustHeightToFit, 400);
|
|
111
|
-
$effect(() => {
|
|
112
|
-
const references = [maxElementHeight, currentPrice, saveValue, beforeValue, model.textAfter, model.includeCurrency, model.excludeBeforePrice];
|
|
113
|
-
void references;
|
|
114
|
-
debouncedAdjustHeightToFit();
|
|
115
|
-
});
|
|
116
|
-
</script>
|
|
117
|
-
|
|
118
|
-
<div class="price-stream-element" class:price-stream-element--adjustable={adjustableHeight} style={elementContainerStyles} bind:this={priceElementRef}>
|
|
119
|
-
<div class="price-stream-element__price-container" style={priceContainerStyles} bind:this={priceContainerRef}>
|
|
120
|
-
<div class="price-stream-element__price" style={priceCustomStyles}>
|
|
121
|
-
{currentPrice}
|
|
122
|
-
</div>
|
|
123
|
-
{#if data.salePrice && !model.excludeBeforePrice}
|
|
124
|
-
<div class="price-stream-element__sale-price">
|
|
125
|
-
<div class="price-stream-element__save" style={saveValueCustomStyles}>
|
|
126
|
-
{localization.saveValue(saveValue)}
|
|
127
|
-
</div>
|
|
128
|
-
<div class="price-stream-element__before-price" style={beforeValueCustomStyles}>
|
|
129
|
-
{localization.beforeValue(beforeValue)}
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
{/if}
|
|
133
|
-
{#if model.textAfter}
|
|
134
|
-
<div class="price-stream-element__text-after" style={textAfterCustomStyles}>
|
|
135
|
-
<LineClamp value={model.textAfter} maxLines={1} />
|
|
136
|
-
</div>
|
|
137
|
-
{/if}
|
|
138
|
-
</div>
|
|
139
|
-
{#if model.stock}
|
|
140
|
-
<StockElementView model={model.stock} heightOverrideDdu={stockElementHeight} localization={localization.stockLocalization} />
|
|
141
|
-
{/if}
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<style>@keyframes fadeIn {
|
|
145
|
-
0% {
|
|
146
|
-
opacity: 1;
|
|
147
|
-
}
|
|
148
|
-
50% {
|
|
149
|
-
opacity: 0.4;
|
|
150
|
-
}
|
|
151
|
-
100% {
|
|
152
|
-
opacity: 1;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
.price-stream-element--adjustable {
|
|
156
|
-
position: absolute;
|
|
157
|
-
visibility: hidden;
|
|
158
|
-
width: 100%;
|
|
159
|
-
}
|
|
160
|
-
.price-stream-element__sale-price {
|
|
161
|
-
display: flex;
|
|
162
|
-
height: 100%;
|
|
163
|
-
flex-direction: column;
|
|
164
|
-
justify-content: space-between;
|
|
165
|
-
}
|
|
166
|
-
.price-stream-element__price, .price-stream-element__save, .price-stream-element__before-price {
|
|
167
|
-
white-space: nowrap;
|
|
168
|
-
}</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PriceStreamElementLocalization } from './price-stream-element-localization';
|
|
2
|
-
import type { PriceStreamElementModel } from '../elements';
|
|
3
|
-
import type { StreamLayoutProductPriceModel } from '../models';
|
|
4
|
-
type Props = {
|
|
5
|
-
maxElementHeight: number;
|
|
6
|
-
model: PriceStreamElementModel;
|
|
7
|
-
data: StreamLayoutProductPriceModel;
|
|
8
|
-
localization: PriceStreamElementLocalization;
|
|
9
|
-
on?: {
|
|
10
|
-
heightAdjusted: (height: number) => void;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare const PriceElementView: import("svelte").Component<Props, {}, "">;
|
|
14
|
-
type PriceElementView = ReturnType<typeof PriceElementView>;
|
|
15
|
-
export default PriceElementView;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Locale } from '../../../core/locale';
|
|
2
|
-
import type { IStockStreamElementLocalization } from './stock-stream-element-localization';
|
|
3
|
-
export interface IPriceStreamElementLocalization {
|
|
4
|
-
saveValue?: (value: string | number) => string;
|
|
5
|
-
beforeValue?: (value: string) => string;
|
|
6
|
-
stockLocalization?: IStockStreamElementLocalization | Locale;
|
|
7
|
-
}
|
|
8
|
-
export declare class PriceStreamElementLocalization {
|
|
9
|
-
saveValue: (value: string | number) => string;
|
|
10
|
-
beforeValue: (value: string) => string;
|
|
11
|
-
stockLocalization: IStockStreamElementLocalization | Locale;
|
|
12
|
-
constructor(init: IPriceStreamElementLocalization | Locale);
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { isLocale } from '../../../core/locale';
|
|
2
|
-
export class PriceStreamElementLocalization {
|
|
3
|
-
saveValue;
|
|
4
|
-
beforeValue;
|
|
5
|
-
stockLocalization;
|
|
6
|
-
constructor(init) {
|
|
7
|
-
this.saveValue = isLocale(init) ? loc.saveValue[init] : init.saveValue || loc.saveValue.en;
|
|
8
|
-
this.beforeValue = isLocale(init) ? loc.beforeValue[init] : init.beforeValue || loc.beforeValue.en;
|
|
9
|
-
this.stockLocalization = isLocale(init) ? init : init.stockLocalization || 'en';
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
const loc = {
|
|
13
|
-
saveValue: {
|
|
14
|
-
en: (value) => `Save ${value}`,
|
|
15
|
-
no: (value) => `Lagre ${value}`
|
|
16
|
-
},
|
|
17
|
-
beforeValue: {
|
|
18
|
-
en: (value) => `Before ${value}`,
|
|
19
|
-
no: (value) => `Før ${value}`
|
|
20
|
-
}
|
|
21
|
-
};
|