@streamscloud/embeddable 13.3.0 → 14.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/external-api/data-providers/internal-media-center-data-provider.svelte.js +6 -6
- package/dist/external-api/data-providers/mocks/index.d.ts +5 -0
- package/dist/external-api/data-providers/mocks/index.js +5 -0
- package/dist/{media-center/categories-following → external-api/data-providers/mocks}/mock-categories-following-handler.svelte.d.ts +1 -1
- package/dist/external-api/data-providers/mocks/mock-content-management-handler.svelte.d.ts +29 -0
- package/dist/external-api/data-providers/mocks/mock-content-management-handler.svelte.js +61 -0
- package/dist/{media-center/membership → external-api/data-providers/mocks}/mock-membership-handler.svelte.d.ts +1 -1
- package/dist/{media-center/navigation → external-api/data-providers/mocks}/mock-navigation-handler.svelte.d.ts +1 -2
- package/dist/{posts/social-interactions → external-api/data-providers/mocks}/mock-post-social-interactions-handler.svelte.d.ts +1 -2
- package/dist/{posts/social-interactions → external-api/data-providers/mocks}/mock-post-social-interactions-handler.svelte.js +17 -6
- package/dist/external-api/data-providers/mocks/operations.generated.d.ts +115 -0
- package/dist/external-api/data-providers/mocks/operations.generated.js +377 -0
- package/dist/external-api/data-providers/mocks/operations.graphql +18 -0
- package/dist/media-center/config/types.d.ts +7 -1
- package/dist/media-center/content-management/index.d.ts +1 -0
- package/dist/media-center/content-management/index.js +1 -0
- package/dist/media-center/content-management/types.d.ts +24 -0
- package/dist/media-center/content-management/types.js +1 -0
- package/dist/media-center/index.d.ts +2 -1
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte +2 -2
- package/dist/media-center/media-center/discover/data-loading.d.ts +3 -0
- package/dist/media-center/media-center/discover/data-loading.js +13 -2
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.d.ts +23 -0
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.js +88 -0
- package/dist/media-center/media-center/discover/discover-view.svelte +79 -14
- package/dist/media-center/media-center/discover/discover-view.svelte.d.ts +2 -2
- package/dist/media-center/media-center/footer/media-center-footer.svelte +1 -1
- package/dist/media-center/media-center/handlers/index.d.ts +1 -0
- package/dist/media-center/media-center/handlers/index.js +1 -0
- package/dist/media-center/media-center/handlers/media-center-content-handler.svelte.d.ts +62 -0
- package/dist/media-center/media-center/handlers/media-center-content-handler.svelte.js +144 -0
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte +10 -7
- package/dist/media-center/media-center/header/media-center-header.svelte +1 -1
- package/dist/media-center/media-center/media-center-context.svelte.d.ts +3 -2
- package/dist/media-center/media-center/media-center-context.svelte.js +30 -11
- package/dist/media-center/media-center/media-center-view.svelte +31 -13
- package/dist/media-center/media-center/menu/menu.svelte +13 -2
- package/dist/media-center/media-center/menu/menu.svelte.d.ts +1 -0
- package/dist/media-center/media-center/menu/popular-streams-panel-handler.svelte.d.ts +7 -0
- package/dist/media-center/media-center/menu/popular-streams-panel-handler.svelte.js +23 -8
- package/dist/media-center/media-center/moments/moments-feed-handler.svelte.d.ts +19 -2
- package/dist/media-center/media-center/moments/moments-feed-handler.svelte.js +51 -6
- package/dist/media-center/media-center/moments/moments-state.svelte.d.ts +2 -0
- package/dist/media-center/media-center/moments/moments-state.svelte.js +16 -1
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.d.ts +24 -4
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.js +90 -9
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.d.ts +18 -3
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.js +64 -9
- package/dist/posts/controls/index.d.ts +2 -1
- package/dist/posts/controls/index.js +2 -1
- package/dist/posts/controls/post-actions-generator.svelte.d.ts +20 -0
- package/dist/posts/controls/post-actions-generator.svelte.js +27 -0
- package/dist/posts/controls/post-actions-handler.svelte.d.ts +26 -0
- package/dist/posts/controls/post-actions-handler.svelte.js +56 -0
- package/dist/posts/index.d.ts +1 -0
- package/dist/posts/model/types.d.ts +1 -0
- package/dist/posts/post-viewer/cmp.post-viewer.svelte +6 -7
- package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +2 -2
- package/dist/posts/post-viewer/mapper.js +1 -0
- package/dist/posts/posts-player/cmp.posts-player.svelte +2 -1
- package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +2 -0
- package/dist/posts/posts-player/index.d.ts +2 -0
- package/dist/posts/posts-player/index.js +2 -1
- package/dist/posts/posts-player/posts-player-proxy.svelte +2 -1
- package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +3 -1
- package/dist/posts/posts-player/posts-player-view.svelte +127 -32
- package/dist/posts/posts-player/types.d.ts +8 -0
- package/dist/posts/sharing/index.d.ts +1 -0
- package/dist/posts/sharing/index.js +1 -0
- package/dist/posts/sharing/types.d.ts +5 -0
- package/dist/posts/sharing/types.js +1 -0
- package/dist/posts/social-interactions/types.d.ts +0 -1
- package/dist/streams/controls/index.d.ts +1 -0
- package/dist/streams/controls/index.js +1 -0
- package/dist/streams/controls/stream-actions-generator.svelte.d.ts +31 -0
- package/dist/streams/controls/stream-actions-generator.svelte.js +42 -0
- package/dist/streams/index.d.ts +1 -0
- package/dist/streams/index.js +1 -0
- package/dist/streams/layout/cmp.layout.svelte +4 -1
- package/dist/streams/layout/cmp.layout.svelte.d.ts +1 -0
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +1 -0
- package/dist/streams/layout/models/mapper.js +1 -0
- package/dist/streams/sharing/index.d.ts +1 -0
- package/dist/streams/sharing/index.js +1 -0
- package/dist/streams/sharing/types.d.ts +5 -0
- package/dist/streams/sharing/types.js +1 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +43 -1
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +9 -0
- package/dist/streams/streams-player/cmp.streams-player.svelte +2 -1
- package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +2 -0
- package/dist/streams/streams-player/index.d.ts +2 -0
- package/dist/streams/streams-player/index.js +2 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte +2 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +2 -0
- package/dist/streams/streams-player/streams-player-view.svelte +147 -34
- package/dist/streams/streams-player/types.d.ts +7 -0
- package/dist/ui/card-actions/card-action-container.d.ts +2 -0
- package/dist/ui/card-actions/card-action-container.js +17 -0
- package/dist/ui/card-actions/cmp.card-action.svelte +28 -0
- package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +10 -0
- package/dist/ui/card-actions/cmp.card-actions.svelte +71 -0
- package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +9 -0
- package/dist/ui/card-actions/index.d.ts +4 -0
- package/dist/ui/card-actions/index.js +3 -0
- package/dist/ui/card-actions/types.d.ts +9 -0
- package/dist/ui/card-actions/types.js +1 -0
- package/dist/ui/player/button/cmp.responsive-player-buttons-group.svelte +53 -0
- package/dist/ui/player/button/cmp.responsive-player-buttons-group.svelte.d.ts +10 -0
- package/dist/ui/player/button/index.d.ts +1 -0
- package/dist/ui/player/button/index.js +1 -0
- package/dist/{content-player → ui/player/content-player}/cmp.content-player.svelte +7 -29
- package/dist/{content-player → ui/player/content-player}/cmp.content-player.svelte.d.ts +6 -1
- package/dist/ui/player/content-player/content-player-config.svelte.d.ts +29 -0
- package/dist/ui/player/content-player/content-player-config.svelte.js +27 -0
- package/dist/{content-player → ui/player/content-player}/content-player-settings.svelte.d.ts +3 -3
- package/dist/{content-player → ui/player/content-player}/content-player-settings.svelte.js +2 -2
- package/dist/{content-player → ui/player/content-player}/controls-and-attachments.svelte +18 -65
- package/dist/{content-player → ui/player/content-player}/controls-and-attachments.svelte.d.ts +6 -0
- package/dist/{content-player → ui/player/content-player}/overview-panel.svelte +1 -1
- package/dist/{content-player → ui/player/content-player}/ui-manager.svelte.d.ts +3 -2
- package/dist/{content-player → ui/player/content-player}/ui-manager.svelte.js +3 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.d.ts +0 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.js +1 -3
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.d.ts +3 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.js +11 -5
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.d.ts +3 -0
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +74 -8
- package/dist/ui/player/providers/default-chunks-player-buffer.svelte.d.ts +2 -0
- package/dist/ui/player/providers/default-chunks-player-buffer.svelte.js +15 -4
- package/dist/ui/player/providers/default-feed-player-buffer.svelte.d.ts +1 -0
- package/dist/ui/player/providers/default-feed-player-buffer.svelte.js +27 -5
- package/dist/ui/player/providers/types.d.ts +1 -0
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +9 -4
- package/dist/ui/shadow-dom/colors.scss +2 -0
- package/package.json +6 -2
- package/dist/content-player/content-player-config.svelte.d.ts +0 -51
- package/dist/content-player/content-player-config.svelte.js +0 -48
- package/dist/posts/controls/cmp.controls.svelte +0 -120
- package/dist/posts/controls/cmp.controls.svelte.d.ts +0 -16
- /package/dist/{media-center/categories-following → external-api/data-providers/mocks}/mock-categories-following-handler.svelte.js +0 -0
- /package/dist/{media-center/membership → external-api/data-providers/mocks}/mock-membership-handler.svelte.js +0 -0
- /package/dist/{media-center/navigation → external-api/data-providers/mocks}/mock-navigation-handler.svelte.js +0 -0
- /package/dist/{content-player → ui/player/content-player}/index.d.ts +0 -0
- /package/dist/{content-player → ui/player/content-player}/index.js +0 -0
- /package/dist/{content-player → ui/player/content-player}/overview-panel.svelte.d.ts +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
export const GetPostDocument = {
|
|
2
|
+
kind: 'Document',
|
|
3
|
+
definitions: [
|
|
4
|
+
{
|
|
5
|
+
kind: 'OperationDefinition',
|
|
6
|
+
operation: 'query',
|
|
7
|
+
name: { kind: 'Name', value: 'GetPost' },
|
|
8
|
+
variableDefinitions: [
|
|
9
|
+
{
|
|
10
|
+
kind: 'VariableDefinition',
|
|
11
|
+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
12
|
+
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }
|
|
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: 'posts' },
|
|
27
|
+
name: { kind: 'Name', value: 'embedPosts' },
|
|
28
|
+
arguments: [
|
|
29
|
+
{
|
|
30
|
+
kind: 'Argument',
|
|
31
|
+
name: { kind: 'Name', value: 'input' },
|
|
32
|
+
value: {
|
|
33
|
+
kind: 'ObjectValue',
|
|
34
|
+
fields: [
|
|
35
|
+
{
|
|
36
|
+
kind: 'ObjectField',
|
|
37
|
+
name: { kind: 'Name', value: 'filter' },
|
|
38
|
+
value: {
|
|
39
|
+
kind: 'ObjectValue',
|
|
40
|
+
fields: [
|
|
41
|
+
{
|
|
42
|
+
kind: 'ObjectField',
|
|
43
|
+
name: { kind: 'Name', value: 'ids' },
|
|
44
|
+
value: { kind: 'ListValue', values: [{ kind: 'Variable', name: { kind: 'Name', value: 'id' } }] }
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
selectionSet: {
|
|
54
|
+
kind: 'SelectionSet',
|
|
55
|
+
selections: [
|
|
56
|
+
{
|
|
57
|
+
kind: 'Field',
|
|
58
|
+
name: { kind: 'Name', value: 'items' },
|
|
59
|
+
selectionSet: {
|
|
60
|
+
kind: 'SelectionSet',
|
|
61
|
+
selections: [
|
|
62
|
+
{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'PostsPlayerPayloadFragment' } },
|
|
63
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'categoryIds' } },
|
|
64
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } }
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: 'FragmentDefinition',
|
|
76
|
+
name: { kind: 'Name', value: 'PostViewerPayloadFragment' },
|
|
77
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
78
|
+
selectionSet: {
|
|
79
|
+
kind: 'SelectionSet',
|
|
80
|
+
selections: [
|
|
81
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
82
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
|
|
83
|
+
{
|
|
84
|
+
kind: 'Field',
|
|
85
|
+
name: { kind: 'Name', value: 'allProducts' },
|
|
86
|
+
selectionSet: {
|
|
87
|
+
kind: 'SelectionSet',
|
|
88
|
+
selections: [
|
|
89
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
90
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
91
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
|
|
92
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'link' } },
|
|
93
|
+
{
|
|
94
|
+
kind: 'Field',
|
|
95
|
+
name: { kind: 'Name', value: 'media' },
|
|
96
|
+
selectionSet: {
|
|
97
|
+
kind: 'SelectionSet',
|
|
98
|
+
selections: [
|
|
99
|
+
{
|
|
100
|
+
kind: 'Field',
|
|
101
|
+
name: { kind: 'Name', value: 'url' },
|
|
102
|
+
arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'EnumValue', value: 'SMALL' } }]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
kind: 'Field',
|
|
106
|
+
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
107
|
+
arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'EnumValue', value: 'SMALL' } }]
|
|
108
|
+
},
|
|
109
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
kind: 'Field',
|
|
115
|
+
name: { kind: 'Name', value: 'brand' },
|
|
116
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
kind: 'Field',
|
|
120
|
+
name: { kind: 'Name', value: 'priceAndAvailability' },
|
|
121
|
+
selectionSet: {
|
|
122
|
+
kind: 'SelectionSet',
|
|
123
|
+
selections: [
|
|
124
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
125
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
126
|
+
{
|
|
127
|
+
kind: 'Field',
|
|
128
|
+
name: { kind: 'Name', value: 'productSalePrices' },
|
|
129
|
+
selectionSet: {
|
|
130
|
+
kind: 'SelectionSet',
|
|
131
|
+
selections: [
|
|
132
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
133
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
|
|
134
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
kind: 'Field',
|
|
146
|
+
name: { kind: 'Name', value: 'ad' },
|
|
147
|
+
selectionSet: {
|
|
148
|
+
kind: 'SelectionSet',
|
|
149
|
+
selections: [
|
|
150
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
151
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
152
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
153
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
154
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'priceInfo' } },
|
|
155
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'currency' } },
|
|
156
|
+
{
|
|
157
|
+
kind: 'Field',
|
|
158
|
+
name: { kind: 'Name', value: 'ctaButton' },
|
|
159
|
+
selectionSet: {
|
|
160
|
+
kind: 'SelectionSet',
|
|
161
|
+
selections: [
|
|
162
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'background' } },
|
|
163
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'textColor' } },
|
|
164
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'text' } },
|
|
165
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'url' } },
|
|
166
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'border' } }
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } },
|
|
171
|
+
{
|
|
172
|
+
kind: 'Field',
|
|
173
|
+
name: { kind: 'Name', value: 'media' },
|
|
174
|
+
selectionSet: {
|
|
175
|
+
kind: 'SelectionSet',
|
|
176
|
+
selections: [
|
|
177
|
+
{
|
|
178
|
+
kind: 'Field',
|
|
179
|
+
name: { kind: 'Name', value: 'url' },
|
|
180
|
+
arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'EnumValue', value: 'SMALL' } }]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
kind: 'Field',
|
|
184
|
+
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
185
|
+
arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'EnumValue', value: 'SMALL' } }]
|
|
186
|
+
},
|
|
187
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
kind: 'Field',
|
|
196
|
+
name: { kind: 'Name', value: 'postData' },
|
|
197
|
+
selectionSet: {
|
|
198
|
+
kind: 'SelectionSet',
|
|
199
|
+
selections: [
|
|
200
|
+
{
|
|
201
|
+
kind: 'Field',
|
|
202
|
+
name: { kind: 'Name', value: 'media' },
|
|
203
|
+
selectionSet: {
|
|
204
|
+
kind: 'SelectionSet',
|
|
205
|
+
selections: [
|
|
206
|
+
{
|
|
207
|
+
kind: 'Field',
|
|
208
|
+
name: { kind: 'Name', value: 'url' },
|
|
209
|
+
arguments: [
|
|
210
|
+
{
|
|
211
|
+
kind: 'Argument',
|
|
212
|
+
name: { kind: 'Name', value: 'scale' },
|
|
213
|
+
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
kind: 'Field',
|
|
219
|
+
name: { kind: 'Name', value: 'thumbnailUrl' },
|
|
220
|
+
arguments: [
|
|
221
|
+
{
|
|
222
|
+
kind: 'Argument',
|
|
223
|
+
name: { kind: 'Name', value: 'scale' },
|
|
224
|
+
value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
kind: 'Field',
|
|
234
|
+
name: { kind: 'Name', value: 'articleData' },
|
|
235
|
+
selectionSet: {
|
|
236
|
+
kind: 'SelectionSet',
|
|
237
|
+
selections: [
|
|
238
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
239
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'kicker' } },
|
|
240
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'articleId' } }
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
kind: 'Field',
|
|
246
|
+
name: { kind: 'Name', value: 'mediaData' },
|
|
247
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
kind: 'Field',
|
|
251
|
+
name: { kind: 'Name', value: 'momentData' },
|
|
252
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
kind: 'Field',
|
|
256
|
+
name: { kind: 'Name', value: 'shortVideoData' },
|
|
257
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
kind: 'Field',
|
|
261
|
+
name: { kind: 'Name', value: 'videoData' },
|
|
262
|
+
selectionSet: {
|
|
263
|
+
kind: 'SelectionSet',
|
|
264
|
+
selections: [
|
|
265
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
266
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'text' } }
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'viewsCount' } },
|
|
274
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'displayDate' } }
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
kind: 'FragmentDefinition',
|
|
280
|
+
name: { kind: 'Name', value: 'PostsPlayerPayloadFragment' },
|
|
281
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
|
|
282
|
+
selectionSet: {
|
|
283
|
+
kind: 'SelectionSet',
|
|
284
|
+
selections: [
|
|
285
|
+
{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'PostViewerPayloadFragment' } },
|
|
286
|
+
{
|
|
287
|
+
kind: 'Field',
|
|
288
|
+
name: { kind: 'Name', value: 'ownerProfile' },
|
|
289
|
+
selectionSet: {
|
|
290
|
+
kind: 'SelectionSet',
|
|
291
|
+
selections: [
|
|
292
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
293
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
};
|
|
302
|
+
export const GetStreamDocument = {
|
|
303
|
+
kind: 'Document',
|
|
304
|
+
definitions: [
|
|
305
|
+
{
|
|
306
|
+
kind: 'OperationDefinition',
|
|
307
|
+
operation: 'query',
|
|
308
|
+
name: { kind: 'Name', value: 'GetStream' },
|
|
309
|
+
variableDefinitions: [
|
|
310
|
+
{
|
|
311
|
+
kind: 'VariableDefinition',
|
|
312
|
+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
313
|
+
type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } } }
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
selectionSet: {
|
|
317
|
+
kind: 'SelectionSet',
|
|
318
|
+
selections: [
|
|
319
|
+
{
|
|
320
|
+
kind: 'Field',
|
|
321
|
+
name: { kind: 'Name', value: 'embedStream' },
|
|
322
|
+
arguments: [
|
|
323
|
+
{
|
|
324
|
+
kind: 'Argument',
|
|
325
|
+
name: { kind: 'Name', value: 'input' },
|
|
326
|
+
value: {
|
|
327
|
+
kind: 'ObjectValue',
|
|
328
|
+
fields: [{ kind: 'ObjectField', name: { kind: 'Name', value: 'id' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } } }]
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
selectionSet: {
|
|
333
|
+
kind: 'SelectionSet',
|
|
334
|
+
selections: [
|
|
335
|
+
{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'StreamPlayerPayloadFragment' } },
|
|
336
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'categoryIds' } },
|
|
337
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } }
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
kind: 'FragmentDefinition',
|
|
346
|
+
name: { kind: 'Name', value: 'StreamPlayerPayloadFragment' },
|
|
347
|
+
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Stream' } },
|
|
348
|
+
selectionSet: {
|
|
349
|
+
kind: 'SelectionSet',
|
|
350
|
+
selections: [
|
|
351
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
352
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
353
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'subTitle' } },
|
|
354
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAt' } },
|
|
355
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'publishedAt' } },
|
|
356
|
+
{
|
|
357
|
+
kind: 'Field',
|
|
358
|
+
name: { kind: 'Name', value: 'cover' },
|
|
359
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
kind: 'Field',
|
|
363
|
+
name: { kind: 'Name', value: 'ownerProfile' },
|
|
364
|
+
selectionSet: {
|
|
365
|
+
kind: 'SelectionSet',
|
|
366
|
+
selections: [
|
|
367
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
368
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'type' } }
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'pagesCount' } }
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# noinspection GraphQLSchemaValidation
|
|
2
|
+
query GetPost($id: String!, $image_scale: ImageScale = ORIGINAL_ENCODED) {
|
|
3
|
+
posts: embedPosts(input: { filter: { ids: [$id] } }) {
|
|
4
|
+
items {
|
|
5
|
+
...PostsPlayerPayloadFragment
|
|
6
|
+
categoryIds
|
|
7
|
+
status
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
query GetStream($id: String!) {
|
|
13
|
+
embedStream(input: { id: $id }) {
|
|
14
|
+
...StreamPlayerPayloadFragment
|
|
15
|
+
categoryIds
|
|
16
|
+
status
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { PostType } from '../../core/enums';
|
|
2
2
|
import type { ThemeValue } from '../../core/theme';
|
|
3
3
|
import type { IContentCategoryFollowingHandler } from '../categories-following';
|
|
4
|
+
import type { IMediaCenterContentManagementHandler } from '../content-management';
|
|
4
5
|
import type { IMediaCenterMembershipHandler } from '../membership';
|
|
5
6
|
import type { IMediaCenterNavigationHandler } from '../navigation';
|
|
6
7
|
import type { IPostAnalyticsHandler, PostPlayerModel } from '../../posts/posts-player/types';
|
|
8
|
+
import type { IPostSharingHandler } from '../../posts/sharing';
|
|
7
9
|
import type { IPostSocialInteractionsHandler } from '../../posts/social-interactions';
|
|
10
|
+
import type { IStreamSharingHandler } from '../../streams/sharing';
|
|
8
11
|
import type { StreamPageViewerModel } from '../../streams/stream-page-viewer/types';
|
|
9
12
|
import type { IStreamAnalyticsHandler, StreamPlayerModel } from '../../streams/streams-player/types';
|
|
10
13
|
import type { PlayerColors } from '../../ui/player/colors';
|
|
@@ -16,7 +19,10 @@ export interface IMediaCenterDataProvider {
|
|
|
16
19
|
categoriesFollowingHandler?: IContentCategoryFollowingHandler;
|
|
17
20
|
membershipHandler?: IMediaCenterMembershipHandler;
|
|
18
21
|
navigationHandler?: IMediaCenterNavigationHandler;
|
|
19
|
-
|
|
22
|
+
postSocialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
23
|
+
postSharingHandler?: IPostSharingHandler;
|
|
24
|
+
streamSharingHandler?: IStreamSharingHandler;
|
|
25
|
+
contentManagementHandler?: IMediaCenterContentManagementHandler;
|
|
20
26
|
};
|
|
21
27
|
postsPlayer: {
|
|
22
28
|
getPostsCursor: (input: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { IMediaCenterContentManagementHandler } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PostPlayerModel } from '../../posts/posts-player/types';
|
|
2
|
+
import type { StreamPlayerModel } from '../../streams/streams-player/types';
|
|
3
|
+
export interface IMediaCenterContentManagementHandler {
|
|
4
|
+
onHandlerMounted: (api: {
|
|
5
|
+
postCreated: (result: PostEditResult) => void;
|
|
6
|
+
}) => void;
|
|
7
|
+
editPost: ((postId: string) => Promise<PostEditResult | null>) | null;
|
|
8
|
+
editArticle: ((postId: string) => Promise<PostEditResult | null>) | null;
|
|
9
|
+
deletePost: ((postId: string) => Promise<boolean>) | null;
|
|
10
|
+
editStream: ((streamId: string) => Promise<StreamEditResult | null>) | null;
|
|
11
|
+
deleteStream: ((streamId: string) => Promise<boolean>) | null;
|
|
12
|
+
deleteStreamPage: ((streamPageId: string) => Promise<boolean>) | null;
|
|
13
|
+
}
|
|
14
|
+
type PostEditResult = {
|
|
15
|
+
post: PostPlayerModel;
|
|
16
|
+
categories: string[];
|
|
17
|
+
isPublished: boolean;
|
|
18
|
+
};
|
|
19
|
+
type StreamEditResult = {
|
|
20
|
+
stream: StreamPlayerModel;
|
|
21
|
+
categories: string[];
|
|
22
|
+
isPublished: boolean;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { IMediaCenterDataProvider } from './config/types';
|
|
2
|
-
export type { IContentCategoryFollowingHandler } from './categories-following
|
|
2
|
+
export type { IContentCategoryFollowingHandler } from './categories-following';
|
|
3
3
|
export type { IMediaCenterMembershipHandler } from './membership';
|
|
4
4
|
export type { IMediaCenterNavigationHandler, MediaCenterState } from './navigation';
|
|
5
|
+
export type { IMediaCenterContentManagementHandler } from './content-management';
|
|
@@ -15,13 +15,13 @@ const context = new MediaCenterContext({
|
|
|
15
15
|
initialized: (instance) => {
|
|
16
16
|
switch (modeProps.mode) {
|
|
17
17
|
case 'posts':
|
|
18
|
-
instance.postsFeedHandler.
|
|
18
|
+
instance.postsFeedHandler.activateWithDataProvider({
|
|
19
19
|
dataProvider: modeProps.props.dataProvider,
|
|
20
20
|
onPostActivated: modeProps.props.onPostActivated
|
|
21
21
|
});
|
|
22
22
|
break;
|
|
23
23
|
case 'streams':
|
|
24
|
-
instance.streamsFeedHandler.
|
|
24
|
+
instance.streamsFeedHandler.activateWithDataProvider({
|
|
25
25
|
dataProvider: modeProps.props.dataProvider,
|
|
26
26
|
onStreamActivated: modeProps.props.onStreamActivated
|
|
27
27
|
});
|
|
@@ -2,7 +2,10 @@ import type { IMediaCenterDataProvider } from '../../config/types';
|
|
|
2
2
|
import { StreamsInCategory, ShortVideosInCategory } from './types.svelte';
|
|
3
3
|
export declare class DiscoverDataLoader {
|
|
4
4
|
private readonly dataProvider;
|
|
5
|
+
readonly minItemsPerLoad = 5;
|
|
5
6
|
constructor(dataProvider: IMediaCenterDataProvider);
|
|
6
7
|
loadStreams: (holder: StreamsInCategory) => Promise<void>;
|
|
8
|
+
reloadStreams: (holder: StreamsInCategory) => Promise<void>;
|
|
7
9
|
loadShortVideos: (holder: ShortVideosInCategory) => Promise<void>;
|
|
10
|
+
reloadShortVideos: (holder: ShortVideosInCategory) => Promise<void>;
|
|
8
11
|
}
|
|
@@ -2,6 +2,7 @@ import { PostType } from '../../..';
|
|
|
2
2
|
import { StreamsInCategory, ShortVideosInCategory } from './types.svelte';
|
|
3
3
|
export class DiscoverDataLoader {
|
|
4
4
|
dataProvider;
|
|
5
|
+
minItemsPerLoad = 5;
|
|
5
6
|
constructor(dataProvider) {
|
|
6
7
|
this.dataProvider = dataProvider;
|
|
7
8
|
}
|
|
@@ -11,12 +12,17 @@ export class DiscoverDataLoader {
|
|
|
11
12
|
}
|
|
12
13
|
const streamsResponse = await this.dataProvider.streamPlayer.getStreamsCursor({
|
|
13
14
|
filter: { categoryId: holder.categoryId ?? undefined },
|
|
14
|
-
limit:
|
|
15
|
+
limit: this.minItemsPerLoad,
|
|
15
16
|
continuationToken: holder.continuationToken
|
|
16
17
|
});
|
|
17
18
|
holder.streams = [...holder.streams, ...streamsResponse.items];
|
|
18
19
|
holder.continuationToken = streamsResponse.continuationToken;
|
|
19
20
|
};
|
|
21
|
+
reloadStreams = async (holder) => {
|
|
22
|
+
holder.continuationToken = undefined;
|
|
23
|
+
holder.streams = [];
|
|
24
|
+
await this.loadStreams(holder);
|
|
25
|
+
};
|
|
20
26
|
loadShortVideos = async (holder) => {
|
|
21
27
|
if (holder.continuationToken === null) {
|
|
22
28
|
return;
|
|
@@ -26,10 +32,15 @@ export class DiscoverDataLoader {
|
|
|
26
32
|
categoryId: holder.categoryId,
|
|
27
33
|
types: [PostType.ShortVideo]
|
|
28
34
|
},
|
|
29
|
-
limit:
|
|
35
|
+
limit: this.minItemsPerLoad,
|
|
30
36
|
continuationToken: holder.continuationToken
|
|
31
37
|
});
|
|
32
38
|
holder.shortVideos = [...holder.shortVideos, ...shortVideosResponse.items];
|
|
33
39
|
holder.continuationToken = shortVideosResponse.continuationToken;
|
|
34
40
|
};
|
|
41
|
+
reloadShortVideos = async (holder) => {
|
|
42
|
+
holder.continuationToken = undefined;
|
|
43
|
+
holder.shortVideos = [];
|
|
44
|
+
await this.loadShortVideos(holder);
|
|
45
|
+
};
|
|
35
46
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IMediaCenterDataProvider } from '../../config/types';
|
|
2
2
|
import type { MediaCenterState } from '../../navigation';
|
|
3
|
+
import type { PostPlayerModel } from '../../../posts/posts-player/types';
|
|
4
|
+
import type { StreamPlayerModel } from '../../../streams/streams-player/types';
|
|
3
5
|
import { ShortVideosInCategory, StreamsInCategory } from './types.svelte';
|
|
4
6
|
export declare class DiscoverViewHandler {
|
|
5
7
|
private _state;
|
|
@@ -29,6 +31,27 @@ export declare class DiscoverViewHandler {
|
|
|
29
31
|
}[];
|
|
30
32
|
}) => Promise<void>;
|
|
31
33
|
deactivate: () => void;
|
|
34
|
+
onPostCreated: (data: {
|
|
35
|
+
post: PostPlayerModel;
|
|
36
|
+
categories: string[];
|
|
37
|
+
isPublished: boolean;
|
|
38
|
+
}) => void;
|
|
39
|
+
onPostModified: (data: {
|
|
40
|
+
post: PostPlayerModel;
|
|
41
|
+
categories: string[];
|
|
42
|
+
isPublished: boolean;
|
|
43
|
+
}) => void;
|
|
44
|
+
onPostDeleted: (data: {
|
|
45
|
+
id: string;
|
|
46
|
+
}) => void;
|
|
47
|
+
onStreamModified: (data: {
|
|
48
|
+
stream: StreamPlayerModel;
|
|
49
|
+
categories: string[];
|
|
50
|
+
isPublished: boolean;
|
|
51
|
+
}) => void;
|
|
52
|
+
onStreamDeleted: (data: {
|
|
53
|
+
id: string;
|
|
54
|
+
}) => void;
|
|
32
55
|
}
|
|
33
56
|
type Callbacks = {
|
|
34
57
|
navigationStateChanged: (state: MediaCenterState) => void;
|