@streamscloud/embeddable 13.2.0 → 14.0.0-rc.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/content-player/cmp.content-player.svelte.d.ts +15 -6
- package/dist/content-player/controls-and-attachments.svelte.d.ts +14 -5
- package/dist/content-player/overview-panel.svelte +3 -1
- package/dist/content-player/overview-panel.svelte.d.ts +14 -5
- package/dist/core/analytics.installation-id.d.ts +5 -0
- package/dist/core/{analytics.profile-id.js → analytics.installation-id.js} +20 -10
- package/dist/external-api/data-providers/internal-media-center-analytics-handler.d.ts +14 -14
- package/dist/external-api/data-providers/internal-media-center-analytics-handler.js +170 -19
- package/dist/external-api/data-providers/internal-post-analytics-handler.d.ts +7 -7
- package/dist/external-api/data-providers/internal-post-analytics-handler.js +72 -11
- package/dist/external-api/data-providers/internal-stream-analytics-handler.d.ts +12 -13
- package/dist/external-api/data-providers/internal-stream-analytics-handler.js +162 -18
- package/dist/external-api/data-providers/mapper.d.ts +3 -0
- package/dist/external-api/data-providers/mapper.js +18 -0
- package/dist/external-api/data-providers/post-data-loaders/mapper.js +1 -3
- package/dist/media-center/media-center/discover/community-features.svelte +2 -1
- package/dist/media-center/media-center/discover/discover-header.svelte +1 -0
- package/dist/media-center/media-center/discover/discover-view.svelte +34 -11
- package/dist/media-center/media-center/menu/menu.svelte +5 -3
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +6 -2
- package/dist/posts/post-viewer/attachments-horizontal.svelte +1 -0
- package/dist/posts/post-viewer/media/post-media.svelte +3 -3
- package/dist/posts/posts-player/posts-player-view.svelte +2 -5
- package/dist/posts/posts-player/types.d.ts +3 -5
- package/dist/streams/streams-player/streams-player-view.svelte +0 -3
- package/dist/streams/streams-player/types.d.ts +0 -1
- package/dist/ui/button/resources/button-theme.svelte +4 -2
- package/dist/ui/icon/cmp.icon.svelte +1 -1
- package/dist/ui/player/button/cmp.player-button.svelte +3 -1
- package/dist/ui/player/button/cmp.player-buttons-group.svelte +3 -1
- package/dist/ui/player/slider/cmp.player-slider.svelte +22 -15
- package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +14 -5
- package/dist/ui/{slider → player/slider-horizontal}/cmp.slider.svelte +57 -30
- package/dist/ui/{slider → player/slider-horizontal}/cmp.slider.svelte.d.ts +13 -6
- package/dist/ui/player/slider-horizontal/index.d.ts +2 -0
- package/dist/ui/player/slider-horizontal/index.js +2 -0
- package/dist/ui/{slider → player/slider-horizontal}/slider-localization.d.ts +1 -1
- package/dist/ui/{slider → player/slider-horizontal}/slider-localization.js +1 -1
- package/dist/ui/player/utils/index.d.ts +1 -0
- package/dist/ui/player/utils/index.js +1 -0
- package/dist/ui/player/utils/touch-synchronizer.d.ts +7 -0
- package/dist/ui/player/utils/touch-synchronizer.js +21 -0
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +2 -2
- package/package.json +2 -2
- package/dist/core/analytics.profile-id.d.ts +0 -5
- package/dist/ui/slider/index.d.ts +0 -2
- package/dist/ui/slider/index.js +0 -2
- /package/dist/ui/{slider → player/slider-horizontal}/types.d.ts +0 -0
- /package/dist/ui/{slider → player/slider-horizontal}/types.js +0 -0
|
@@ -1,23 +1,167 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getOrCreateInstallationId } from '../../core/analytics.installation-id';
|
|
2
2
|
import { constructGraphQLUrl } from '../../core/graphql';
|
|
3
|
-
import {
|
|
3
|
+
import { AnalyticsCollector, EntityRelationType, EntityType, EventType, MeasurementType, Schemas } from '@streamscloud/streams-analytics-collector';
|
|
4
4
|
export class InternalStreamAnalyticsHandler {
|
|
5
5
|
constructor(graphqlOrigin) {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
AnalyticsCollector.initialize({
|
|
7
|
+
gqlDataSenderOptions: {
|
|
8
|
+
endpoint: constructGraphQLUrl(graphqlOrigin)
|
|
9
|
+
},
|
|
10
|
+
schema: Schemas.external,
|
|
11
|
+
metadata: {
|
|
12
|
+
installationId: getOrCreateInstallationId()
|
|
13
|
+
}
|
|
14
|
+
});
|
|
8
15
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
trackStreamView = (streamId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
17
|
+
entity: {
|
|
18
|
+
type: EntityType.Stream,
|
|
19
|
+
id: streamId
|
|
20
|
+
},
|
|
21
|
+
eventType: EventType.Viewed
|
|
22
|
+
});
|
|
23
|
+
trackStreamPageView = (pageId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
24
|
+
entity: {
|
|
25
|
+
type: EntityType.StreamPage,
|
|
26
|
+
id: pageId
|
|
27
|
+
},
|
|
28
|
+
eventType: EventType.Viewed,
|
|
29
|
+
relatedEntities: [
|
|
30
|
+
{
|
|
31
|
+
relationType: EntityRelationType.PlacedIn,
|
|
32
|
+
entity: {
|
|
33
|
+
type: EntityType.Stream,
|
|
34
|
+
id: streamId
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
trackStreamEngagementTime = (streamId, engagementTime) => AnalyticsCollector.measurementsReporter.reportMeasurement({
|
|
40
|
+
entity: {
|
|
41
|
+
type: EntityType.Stream,
|
|
42
|
+
id: streamId
|
|
43
|
+
},
|
|
44
|
+
measurementType: MeasurementType.EngagementTime,
|
|
45
|
+
value: engagementTime
|
|
46
|
+
});
|
|
47
|
+
trackStreamScrollDepth = (streamId, scrollDepth) => AnalyticsCollector.measurementsReporter.reportMeasurement({
|
|
48
|
+
entity: {
|
|
49
|
+
type: EntityType.Stream,
|
|
50
|
+
id: streamId
|
|
51
|
+
},
|
|
52
|
+
measurementType: MeasurementType.ScrollDepth,
|
|
53
|
+
value: scrollDepth
|
|
54
|
+
});
|
|
55
|
+
trackStreamProductImpression = (productId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
56
|
+
entity: {
|
|
57
|
+
type: EntityType.Product,
|
|
58
|
+
id: productId
|
|
59
|
+
},
|
|
60
|
+
eventType: EventType.Appeared,
|
|
61
|
+
relatedEntities: [
|
|
62
|
+
{
|
|
63
|
+
relationType: EntityRelationType.PlacedIn,
|
|
64
|
+
entity: {
|
|
65
|
+
type: EntityType.Stream,
|
|
66
|
+
id: streamId
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
trackStreamProductClicked = (productId, streamId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
72
|
+
entity: {
|
|
73
|
+
type: EntityType.Product,
|
|
74
|
+
id: productId
|
|
75
|
+
},
|
|
76
|
+
eventType: EventType.Clicked,
|
|
77
|
+
relatedEntities: [
|
|
78
|
+
{
|
|
79
|
+
relationType: EntityRelationType.PlacedIn,
|
|
80
|
+
entity: {
|
|
81
|
+
type: EntityType.Stream,
|
|
82
|
+
id: streamId
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
reportPageVideoViews = (pageId, streamId) => AnalyticsCollector.measurementsBatcher.reportBatch([
|
|
88
|
+
{
|
|
89
|
+
type: EntityType.StreamPage,
|
|
90
|
+
id: pageId
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: EntityType.Stream,
|
|
94
|
+
id: streamId
|
|
95
|
+
}
|
|
96
|
+
]);
|
|
97
|
+
trackShortVideoView = (videoId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
98
|
+
entity: {
|
|
99
|
+
type: EntityType.ShortVideo,
|
|
100
|
+
id: videoId
|
|
101
|
+
},
|
|
102
|
+
eventType: EventType.Viewed
|
|
103
|
+
});
|
|
104
|
+
trackShortVideoProductImpression = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
105
|
+
entity: {
|
|
106
|
+
type: EntityType.Product,
|
|
107
|
+
id: productId
|
|
108
|
+
},
|
|
109
|
+
eventType: EventType.Appeared,
|
|
110
|
+
relatedEntities: [
|
|
111
|
+
{
|
|
112
|
+
relationType: EntityRelationType.PlacedIn,
|
|
113
|
+
entity: {
|
|
114
|
+
type: EntityType.ShortVideo,
|
|
115
|
+
id: videoId
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
trackShortVideoProductClick = (productId, videoId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
121
|
+
entity: {
|
|
122
|
+
type: EntityType.Product,
|
|
123
|
+
id: productId
|
|
124
|
+
},
|
|
125
|
+
eventType: EventType.Clicked,
|
|
126
|
+
relatedEntities: [
|
|
127
|
+
{
|
|
128
|
+
relationType: EntityRelationType.PlacedIn,
|
|
129
|
+
entity: {
|
|
130
|
+
type: EntityType.ShortVideo,
|
|
131
|
+
id: videoId
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
trackShortVideoProgress = (pageId, videoId, progress, streamId) => AnalyticsCollector.measurementsBatcher.collect([
|
|
137
|
+
{
|
|
138
|
+
type: EntityType.StreamPage,
|
|
139
|
+
id: pageId
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: EntityType.Stream,
|
|
143
|
+
id: streamId
|
|
144
|
+
}
|
|
145
|
+
], {
|
|
146
|
+
entity: {
|
|
147
|
+
type: EntityType.ShortVideo,
|
|
148
|
+
id: videoId
|
|
149
|
+
},
|
|
150
|
+
measurementType: MeasurementType.Progress,
|
|
151
|
+
value: progress
|
|
152
|
+
});
|
|
153
|
+
trackAdClick = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
154
|
+
entity: {
|
|
155
|
+
type: EntityType.Ad,
|
|
156
|
+
id: adId
|
|
157
|
+
},
|
|
158
|
+
eventType: EventType.Clicked
|
|
159
|
+
});
|
|
160
|
+
trackAdImpression = (adId) => AnalyticsCollector.eventsReporter.reportEvent({
|
|
161
|
+
entity: {
|
|
162
|
+
type: EntityType.Ad,
|
|
163
|
+
id: adId
|
|
164
|
+
},
|
|
165
|
+
eventType: EventType.Appeared
|
|
166
|
+
});
|
|
23
167
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PostType } from '../../core/enums';
|
|
2
|
+
import { EntityType } from '@streamscloud/streams-analytics-collector';
|
|
3
|
+
export function mapPostTypeToEntityType(postType) {
|
|
4
|
+
switch (postType) {
|
|
5
|
+
case PostType.Article:
|
|
6
|
+
return EntityType.Article;
|
|
7
|
+
case PostType.Media:
|
|
8
|
+
return EntityType.Media;
|
|
9
|
+
case PostType.Moment:
|
|
10
|
+
return EntityType.Moment;
|
|
11
|
+
case PostType.ShortVideo:
|
|
12
|
+
return EntityType.ShortVideo;
|
|
13
|
+
case PostType.Video:
|
|
14
|
+
return EntityType.Video;
|
|
15
|
+
default:
|
|
16
|
+
throw new Error(`Unknown PostType: ${postType}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ProfileType } from '../../../core/enums';
|
|
2
1
|
import { mapToPostModel } from '../../../posts/post-viewer';
|
|
3
2
|
export const mapToPostPlayerModel = (payload) => {
|
|
4
3
|
const viewerModel = mapToPostModel(payload);
|
|
5
4
|
return {
|
|
6
|
-
...viewerModel
|
|
7
|
-
analyticsOrganizationId: payload.ownerProfile.type === ProfileType.Organization ? payload.ownerProfile.id : null
|
|
5
|
+
...viewerModel
|
|
8
6
|
};
|
|
9
7
|
};
|
|
@@ -111,8 +111,9 @@ const onJoinMembershipClick = () => __awaiter(void 0, void 0, void 0, function*
|
|
|
111
111
|
display: flex;
|
|
112
112
|
flex-wrap: nowrap;
|
|
113
113
|
margin-top: 0.25rem;
|
|
114
|
-
gap: 8.125rem;
|
|
115
114
|
align-items: center;
|
|
115
|
+
max-width: 19.6875rem;
|
|
116
|
+
justify-content: space-between;
|
|
116
117
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
117
118
|
}
|
|
118
119
|
@container (width < 576px) {
|
|
@@ -77,10 +77,10 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
77
77
|
flex: 1;
|
|
78
78
|
scrollbar-gutter: stable both-edges;
|
|
79
79
|
padding-inline: 1.875rem;
|
|
80
|
+
overflow-x: hidden;
|
|
80
81
|
overflow-y: auto;
|
|
81
82
|
--_cross-browser-scrollbar--thumb-color: transparent;
|
|
82
83
|
--_cross-browser-scrollbar--track-color: transparent;
|
|
83
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
84
84
|
}
|
|
85
85
|
.media-center-discover:hover {
|
|
86
86
|
--_cross-browser-scrollbar--thumb-color: var(--scrollbar--thumb-color, #7d7d7d);
|
|
@@ -104,6 +104,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
104
104
|
scrollbar-width: thin;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
+
.media-center-discover {
|
|
108
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
109
|
+
}
|
|
107
110
|
@container (width < 576px) {
|
|
108
111
|
.media-center-discover {
|
|
109
112
|
padding-inline: 0.9375rem;
|
|
@@ -115,19 +118,23 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
115
118
|
margin: 0 auto;
|
|
116
119
|
padding-bottom: 1.25rem;
|
|
117
120
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
118
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
119
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
120
121
|
}
|
|
121
122
|
@container (width < 992px) {
|
|
122
123
|
.media-center-discover__content {
|
|
123
124
|
padding-bottom: 1rem;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
127
|
+
.media-center-discover__content {
|
|
128
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
129
|
+
}
|
|
126
130
|
@container (width < 768px) {
|
|
127
131
|
.media-center-discover__content {
|
|
128
132
|
padding-bottom: 0.8125rem;
|
|
129
133
|
}
|
|
130
134
|
}
|
|
135
|
+
.media-center-discover__content {
|
|
136
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
137
|
+
}
|
|
131
138
|
@container (width < 576px) {
|
|
132
139
|
.media-center-discover__content {
|
|
133
140
|
padding-bottom: 0.625rem;
|
|
@@ -138,19 +145,23 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
138
145
|
flex-direction: column;
|
|
139
146
|
gap: 3rem;
|
|
140
147
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
141
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
142
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
143
148
|
}
|
|
144
149
|
@container (width < 992px) {
|
|
145
150
|
.media-center-discover__feed {
|
|
146
151
|
gap: 2.5rem;
|
|
147
152
|
}
|
|
148
153
|
}
|
|
154
|
+
.media-center-discover__feed {
|
|
155
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
156
|
+
}
|
|
149
157
|
@container (width < 768px) {
|
|
150
158
|
.media-center-discover__feed {
|
|
151
159
|
gap: 2rem;
|
|
152
160
|
}
|
|
153
161
|
}
|
|
162
|
+
.media-center-discover__feed {
|
|
163
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
164
|
+
}
|
|
154
165
|
@container (width < 576px) {
|
|
155
166
|
.media-center-discover__feed {
|
|
156
167
|
gap: 1.5rem;
|
|
@@ -187,13 +198,13 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
187
198
|
.media-center-discover__section-content--4 {
|
|
188
199
|
gap: 1.25rem;
|
|
189
200
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
190
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
191
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
192
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
193
201
|
}
|
|
194
202
|
.media-center-discover__section-content--4 :global(> :nth-child(n + 5)) {
|
|
195
203
|
display: var(--_section-content--more-items--display);
|
|
196
204
|
}
|
|
205
|
+
.media-center-discover__section-content--4 {
|
|
206
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
207
|
+
}
|
|
197
208
|
@container (width < 992px) {
|
|
198
209
|
.media-center-discover__section-content--4 {
|
|
199
210
|
gap: 1rem;
|
|
@@ -203,6 +214,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
203
214
|
display: var(--_section-content--more-items--display);
|
|
204
215
|
}
|
|
205
216
|
}
|
|
217
|
+
.media-center-discover__section-content--4 {
|
|
218
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
219
|
+
}
|
|
206
220
|
@container (width < 768px) {
|
|
207
221
|
.media-center-discover__section-content--4 {
|
|
208
222
|
gap: 0.75rem;
|
|
@@ -215,6 +229,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
215
229
|
display: var(--_section-content--more-items--display);
|
|
216
230
|
}
|
|
217
231
|
}
|
|
232
|
+
.media-center-discover__section-content--4 {
|
|
233
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
234
|
+
}
|
|
218
235
|
@container (width < 576px) {
|
|
219
236
|
.media-center-discover__section-content--4 {
|
|
220
237
|
gap: 0.625rem;
|
|
@@ -223,13 +240,13 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
223
240
|
.media-center-discover__section-content--5 {
|
|
224
241
|
gap: 1.875rem;
|
|
225
242
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
226
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
227
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
228
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
229
243
|
}
|
|
230
244
|
.media-center-discover__section-content--5 :global(> :nth-child(n + 6)) {
|
|
231
245
|
display: var(--_section-content--more-items--display);
|
|
232
246
|
}
|
|
247
|
+
.media-center-discover__section-content--5 {
|
|
248
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
249
|
+
}
|
|
233
250
|
@container (width < 992px) {
|
|
234
251
|
.media-center-discover__section-content--5 {
|
|
235
252
|
gap: 1.5rem;
|
|
@@ -239,6 +256,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
239
256
|
display: var(--_section-content--more-items--display);
|
|
240
257
|
}
|
|
241
258
|
}
|
|
259
|
+
.media-center-discover__section-content--5 {
|
|
260
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
261
|
+
}
|
|
242
262
|
@container (width < 768px) {
|
|
243
263
|
.media-center-discover__section-content--5 {
|
|
244
264
|
gap: 1.125rem;
|
|
@@ -248,6 +268,9 @@ const localization = $derived(new DiscoverViewLocalization(context.locale));
|
|
|
248
268
|
display: var(--_section-content--more-items--display);
|
|
249
269
|
}
|
|
250
270
|
}
|
|
271
|
+
.media-center-discover__section-content--5 {
|
|
272
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
273
|
+
}
|
|
251
274
|
@container (width < 576px) {
|
|
252
275
|
.media-center-discover__section-content--5 {
|
|
253
276
|
gap: 0.9375rem;
|
|
@@ -239,14 +239,16 @@ const styles = $derived.by(() => {
|
|
|
239
239
|
display: flex;
|
|
240
240
|
-webkit-user-drag: none;
|
|
241
241
|
user-select: none;
|
|
242
|
+
}
|
|
243
|
+
.menu-item :global([contenteditable]) {
|
|
244
|
+
user-select: text;
|
|
245
|
+
}
|
|
246
|
+
.menu-item {
|
|
242
247
|
height: 2.25rem;
|
|
243
248
|
padding-left: var(--_media-center-menu--items--padding-inline);
|
|
244
249
|
--_menu-item--text--font-size: 0.9375rem;
|
|
245
250
|
--_menu-item--image--size: 1.5rem;
|
|
246
251
|
}
|
|
247
|
-
.menu-item :global([contenteditable]) {
|
|
248
|
-
user-select: text;
|
|
249
|
-
}
|
|
250
252
|
.menu-item--active {
|
|
251
253
|
background-color: hsl(from var(--_media-center-menu--background-color) h s calc(l + 5)/alpha);
|
|
252
254
|
border-radius: 0.25rem;
|
|
@@ -80,19 +80,23 @@ let { handler, on } = $props();
|
|
|
80
80
|
gap: 2rem 1.25rem;
|
|
81
81
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
82
82
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
83
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
84
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
85
83
|
}
|
|
86
84
|
@container (width < 992px) {
|
|
87
85
|
.streams-in-category__section-content {
|
|
88
86
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
89
87
|
}
|
|
90
88
|
}
|
|
89
|
+
.streams-in-category__section-content {
|
|
90
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
91
|
+
}
|
|
91
92
|
@container (width < 768px) {
|
|
92
93
|
.streams-in-category__section-content {
|
|
93
94
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
94
95
|
}
|
|
95
96
|
}
|
|
97
|
+
.streams-in-category__section-content {
|
|
98
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
99
|
+
}
|
|
96
100
|
@container (width < 576px) {
|
|
97
101
|
.streams-in-category__section-content {
|
|
98
102
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -168,6 +168,7 @@ const variables = $derived.by(() => {
|
|
|
168
168
|
overflow-x: auto;
|
|
169
169
|
padding-inline: var(--_post-viewer--attachments-horizontal--padding-inline);
|
|
170
170
|
scrollbar-width: none;
|
|
171
|
+
overscroll-behavior: none;
|
|
171
172
|
}
|
|
172
173
|
.attachments-horizontal__item {
|
|
173
174
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">import { Image } from '../../../ui/image';
|
|
2
|
-
import {
|
|
2
|
+
import { SliderHorizontal } from '../../../ui/player/slider-horizontal';
|
|
3
3
|
import { Video } from '../../../ui/video';
|
|
4
4
|
let { id, media, locale, autoplay = 'on-appearance', on } = $props();
|
|
5
5
|
</script>
|
|
@@ -26,11 +26,11 @@ let { id, media, locale, autoplay = 'on-appearance', on } = $props();
|
|
|
26
26
|
{#if media.items.length === 1}
|
|
27
27
|
{@render mediaItem(media.items[0])}
|
|
28
28
|
{:else if media.items.length > 1}
|
|
29
|
-
<
|
|
29
|
+
<SliderHorizontal items={media.items} initialIndex={media.currentIndex} locale={locale} on={{ indexChanged: (index) => (media.currentIndex = index) }}>
|
|
30
30
|
{#snippet children(item)}
|
|
31
31
|
{@render mediaItem(item)}
|
|
32
32
|
{/snippet}
|
|
33
|
-
</
|
|
33
|
+
</SliderHorizontal>
|
|
34
34
|
{/if}
|
|
35
35
|
</div>
|
|
36
36
|
|
|
@@ -83,14 +83,11 @@ const contentPlayerConfig = new ContentPlayerConfig({
|
|
|
83
83
|
if (on === null || on === void 0 ? void 0 : on.backgroundImageLoaded) {
|
|
84
84
|
on.backgroundImageLoaded(getPostCoverImage(post));
|
|
85
85
|
}
|
|
86
|
-
if (post.analyticsOrganizationId) {
|
|
87
|
-
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.setOrganizationId(post.analyticsOrganizationId);
|
|
88
|
-
}
|
|
89
86
|
if (post.postType === PostType.ShortVideo) {
|
|
90
87
|
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackShortVideoView(id);
|
|
91
88
|
}
|
|
92
|
-
else if (post.
|
|
93
|
-
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackPostOpened(
|
|
89
|
+
else if (post.postType) {
|
|
90
|
+
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackPostOpened(post.postType, id);
|
|
94
91
|
}
|
|
95
92
|
(_a = on === null || on === void 0 ? void 0 : on.postActivated) === null || _a === void 0 ? void 0 : _a.call(on, id);
|
|
96
93
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PostType } from '../../core/enums';
|
|
1
2
|
import type { Locale } from '../../core/locale';
|
|
2
3
|
import type { ThemeValue } from '../../core/theme';
|
|
3
4
|
import type { IPostModel } from '..';
|
|
@@ -6,17 +7,14 @@ import type { ICloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
|
6
7
|
import type { PlayerColors } from '../../ui/player/colors';
|
|
7
8
|
import type { IPlayerBuffer, IPlayerDataProvider } from '../../ui/player/providers';
|
|
8
9
|
export interface IPostAnalyticsHandler {
|
|
9
|
-
|
|
10
|
-
trackPostOpened: (postId: string, ownerId: string) => void;
|
|
10
|
+
trackPostOpened: (postType: PostType, postId: string) => void;
|
|
11
11
|
trackShortVideoView: (videoId: string) => void;
|
|
12
12
|
trackShortVideoProductImpression: (productId: string, videoId: string) => void;
|
|
13
13
|
trackShortVideoProductClick: (productId: string, videoId: string) => void;
|
|
14
14
|
trackAdClick: (adId: string) => void;
|
|
15
15
|
trackAdImpression: (adId: string) => void;
|
|
16
16
|
}
|
|
17
|
-
export type PostPlayerModel = IPostModel
|
|
18
|
-
analyticsOrganizationId: string | null;
|
|
19
|
-
};
|
|
17
|
+
export type PostPlayerModel = IPostModel;
|
|
20
18
|
export type PostsPlayerProps = {
|
|
21
19
|
dataProvider: {
|
|
22
20
|
type: 'buffer';
|
|
@@ -50,9 +50,6 @@ $effect(() => {
|
|
|
50
50
|
var _a;
|
|
51
51
|
if (stream) {
|
|
52
52
|
currentStreamModel = stream;
|
|
53
|
-
if (stream.organizationId) {
|
|
54
|
-
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.setOrganizationId(stream.organizationId);
|
|
55
|
-
}
|
|
56
53
|
(_a = on === null || on === void 0 ? void 0 : on.streamActivated) === null || _a === void 0 ? void 0 : _a.call(on, { id: stream.id, title: stream.title, image: stream.cover });
|
|
57
54
|
analyticsHandler === null || analyticsHandler === void 0 ? void 0 : analyticsHandler.trackStreamView(stream.id);
|
|
58
55
|
startActivityTracking();
|
|
@@ -63,7 +63,6 @@ export interface IStreamsPlayerDataProvider {
|
|
|
63
63
|
onEndReached?: () => void;
|
|
64
64
|
}
|
|
65
65
|
export interface IStreamAnalyticsHandler {
|
|
66
|
-
setOrganizationId: (organizationId: string) => void;
|
|
67
66
|
trackStreamView: (streamId: string) => void;
|
|
68
67
|
trackStreamPageView: (pageId: string, streamId: string) => void;
|
|
69
68
|
trackStreamProductImpression: (productId: string, streamId: string) => void;
|
|
@@ -36,7 +36,6 @@ let { style = undefined, size = ButtonSize.Standard, children } = $props();
|
|
|
36
36
|
}
|
|
37
37
|
.button-theme {
|
|
38
38
|
display: contents;
|
|
39
|
-
/*Size*/
|
|
40
39
|
}
|
|
41
40
|
.button-theme--standard {
|
|
42
41
|
--button--font--color: var(--sc-mc-color--text-primary);
|
|
@@ -46,12 +45,15 @@ let { style = undefined, size = ButtonSize.Standard, children } = $props();
|
|
|
46
45
|
--button--background--disabled: #f2f2f3;
|
|
47
46
|
--button--border: 1px solid #e5e7eb;
|
|
48
47
|
}
|
|
49
|
-
:global([data-theme=
|
|
48
|
+
:global([data-theme='dark']) .button-theme--standard {
|
|
50
49
|
--button--background--hover: #1f2937;
|
|
51
50
|
--button--background--active: #374151;
|
|
52
51
|
--button--background--disabled: #374151;
|
|
53
52
|
--button--border: 1px solid #4b5563;
|
|
54
53
|
}
|
|
54
|
+
.button-theme {
|
|
55
|
+
/*Size*/
|
|
56
|
+
}
|
|
55
57
|
.button-theme--size-standard {
|
|
56
58
|
--button--height: 2em;
|
|
57
59
|
--button--text--font-size: 0.75em;
|
|
@@ -73,7 +73,7 @@ let { src, color = null } = $props();
|
|
|
73
73
|
stroke: var(--_icon--stroke-color, var(--_icon--color));
|
|
74
74
|
stroke-width: var(--_icon--stroke-width);
|
|
75
75
|
}
|
|
76
|
-
:global([data-theme=
|
|
76
|
+
:global([data-theme='dark']) .icon :global(path) {
|
|
77
77
|
stroke: var(--_icon--stroke-color, var(--_icon--color));
|
|
78
78
|
stroke-width: var(--_icon--stroke-width);
|
|
79
79
|
}</style>
|
|
@@ -47,7 +47,6 @@ const styles = $derived.by(() => {
|
|
|
47
47
|
color: var(--sc-mc-color--text-white);
|
|
48
48
|
--icon--color: var(--sc-mc-color--icon-overlay);
|
|
49
49
|
--icon--size: 1.75rem;
|
|
50
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
51
50
|
}
|
|
52
51
|
.player-button:hover:not(:disabled) {
|
|
53
52
|
background-color: var(--_player-button--color);
|
|
@@ -64,6 +63,9 @@ const styles = $derived.by(() => {
|
|
|
64
63
|
transform: scale(var(--_player-button--icon-scale));
|
|
65
64
|
transition: 0.3s;
|
|
66
65
|
}
|
|
66
|
+
.player-button {
|
|
67
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
68
|
+
}
|
|
67
69
|
@container (width < 576px) {
|
|
68
70
|
.player-button {
|
|
69
71
|
padding: 0.5rem;
|
|
@@ -47,7 +47,6 @@ const styles = $derived.by(() => {
|
|
|
47
47
|
background: var(--_player-buttons-group--background-color);
|
|
48
48
|
padding: 0.4375rem 0.0625rem;
|
|
49
49
|
pointer-events: auto;
|
|
50
|
-
/* Set 'container-type: inline-size;' to reference container*/
|
|
51
50
|
}
|
|
52
51
|
.player-buttons-group__action {
|
|
53
52
|
--_player-action--icon-scale: 1;
|
|
@@ -73,6 +72,9 @@ const styles = $derived.by(() => {
|
|
|
73
72
|
transform: scale(var(--_player-action--icon-scale));
|
|
74
73
|
transition: 0.3s;
|
|
75
74
|
}
|
|
75
|
+
.player-buttons-group {
|
|
76
|
+
/* Set 'container-type: inline-size;' to reference container*/
|
|
77
|
+
}
|
|
76
78
|
@container (width < 576px) {
|
|
77
79
|
.player-buttons-group {
|
|
78
80
|
border-radius: 0.9375rem;
|