@playpilot/tpi 8.5.5 → 8.5.8
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/editorial.mount.js +7 -7
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +3 -3
- package/package.json +1 -1
- package/src/lib/data/translations.ts +10 -0
- package/src/routes/components/Explore/ExploreRouter.svelte +3 -2
- package/src/routes/components/Explore/Routes/ExploreHome.svelte +7 -7
- package/src/routes/components/Modals/RailModal.svelte +3 -2
- package/src/routes/components/Rails/TitlesRail.svelte +2 -0
- package/src/tests/routes/components/Explore/Routes/ExploreResults.test.js +6 -6
package/package.json
CHANGED
|
@@ -251,6 +251,16 @@ export const translations = {
|
|
|
251
251
|
[Language.Swedish]: 'Medverkande',
|
|
252
252
|
[Language.Danish]: 'Medvirkende',
|
|
253
253
|
},
|
|
254
|
+
'Home': {
|
|
255
|
+
[Language.English]: 'Home',
|
|
256
|
+
[Language.Swedish]: 'Hem',
|
|
257
|
+
[Language.Danish]: 'Hjem',
|
|
258
|
+
},
|
|
259
|
+
'Explore': {
|
|
260
|
+
[Language.English]: 'Explore',
|
|
261
|
+
[Language.Swedish]: 'Utforska',
|
|
262
|
+
[Language.Danish]: 'Udforsk',
|
|
263
|
+
},
|
|
254
264
|
|
|
255
265
|
// List titles
|
|
256
266
|
'List: Trending': {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { ExploreRoute } from '$lib/types/explore'
|
|
3
3
|
import { useExploreRouter } from '$lib/explore'
|
|
4
4
|
import { track } from '$lib/tracking'
|
|
5
|
+
import { t } from '$lib/localization'
|
|
5
6
|
import { TrackingEvent } from '$lib/enums/TrackingEvent'
|
|
6
7
|
import ExploreHome from './Routes/ExploreHome.svelte'
|
|
7
8
|
import ExploreResults from './Routes/ExploreResults.svelte'
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
const routes: ExploreRoute[] = [
|
|
11
12
|
{
|
|
12
13
|
key: 'results',
|
|
13
|
-
label: 'Explore',
|
|
14
|
+
label: t('Explore'),
|
|
14
15
|
component: ExploreResults,
|
|
15
16
|
},
|
|
16
17
|
]
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
if (useExploreRouter()) {
|
|
19
20
|
routes.unshift({
|
|
20
21
|
key: 'home',
|
|
21
|
-
label: 'Home',
|
|
22
|
+
label: t('Home'),
|
|
22
23
|
component: ExploreHome,
|
|
23
24
|
})
|
|
24
25
|
}
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
heading: 'List: Trending',
|
|
15
15
|
params: { ordering: Sorting.Popular },
|
|
16
16
|
properties: { expandable: true },
|
|
17
|
-
}, {
|
|
18
|
-
heading: 'List: Upcoming',
|
|
19
|
-
params: { from_playlist_sid: 'li42wf', region: null, no_region_filter: true },
|
|
20
|
-
properties: { aside: true },
|
|
21
17
|
}, {
|
|
22
18
|
heading: 'List: New',
|
|
23
19
|
params: { from_playlist_sid: 'li42WR', include_playable_types: 'SVOD,FREE' },
|
|
24
|
-
properties: {
|
|
20
|
+
properties: { aside: true },
|
|
25
21
|
}, {
|
|
26
|
-
heading: 'List:
|
|
27
|
-
params: { from_playlist_sid: '
|
|
22
|
+
heading: 'List: Upcoming',
|
|
23
|
+
params: { from_playlist_sid: 'li42wf', region: null, no_region_filter: true },
|
|
28
24
|
properties: {},
|
|
29
25
|
}, {
|
|
30
26
|
heading: 'List: Cinema',
|
|
31
27
|
params: { from_playlist_sid: 'li42WS', region: null, no_region_filter: true },
|
|
28
|
+
properties: { expandable: true },
|
|
29
|
+
}, {
|
|
30
|
+
heading: 'List: Demand',
|
|
31
|
+
params: { from_playlist_sid: 'licBS' },
|
|
32
32
|
properties: { aside: true },
|
|
33
33
|
}]
|
|
34
34
|
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
|
|
111
111
|
@include desktop() {
|
|
112
112
|
transform: scale(0.9);
|
|
113
|
+
opacity: 0.35;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
:global(*) {
|
|
@@ -169,8 +170,8 @@
|
|
|
169
170
|
box-shadow: theme(rail-modal-arrow-shadow, 0 margin(0.25) margin(0.5) rgba(0, 0, 0, 0.35));
|
|
170
171
|
color: theme(rail-modal-arrow-color, text-color);
|
|
171
172
|
|
|
172
|
-
@
|
|
173
|
-
--offset: #{margin(-
|
|
173
|
+
@include desktop {
|
|
174
|
+
--offset: #{margin(-3.5)};
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
&:hover,
|
|
@@ -337,6 +337,7 @@
|
|
|
337
337
|
padding-top: 0;
|
|
338
338
|
color: theme(text-color) !important;
|
|
339
339
|
font-weight: theme(rail-aside-heading-font-weight, font-bold);
|
|
340
|
+
font-family: theme(rail-aside-heading-font-family, font-family);
|
|
340
341
|
line-clamp: 1;
|
|
341
342
|
-webkit-line-clamp: 1;
|
|
342
343
|
}
|
|
@@ -349,6 +350,7 @@
|
|
|
349
350
|
mask-image: linear-gradient(to top, transparent 0.5lh, white 1.5lh);
|
|
350
351
|
overflow: hidden;
|
|
351
352
|
color: theme(rail-text-color, text-color-alt) !important;
|
|
353
|
+
font-family: theme(rail-aside-font-family, font-family);
|
|
352
354
|
font-size: 0.9em;
|
|
353
355
|
line-height: 1.3;
|
|
354
356
|
}
|
|
@@ -34,7 +34,7 @@ describe('ExploreResults.svelte', () => {
|
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
it('Should render all returned titles', async () => {
|
|
37
|
-
vi.mocked(fetchTitles).
|
|
37
|
+
vi.mocked(fetchTitles).mockResolvedValue({ results: [title, title, title], next: null, previous: null })
|
|
38
38
|
|
|
39
39
|
const { getAllByText } = render(ExploreResults)
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ describe('ExploreResults.svelte', () => {
|
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
it('Should not render Show more button when no next value is given', async () => {
|
|
47
|
-
vi.mocked(fetchTitles).
|
|
47
|
+
vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: null, previous: null })
|
|
48
48
|
|
|
49
49
|
const { getByText, queryByText } = render(ExploreResults)
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ describe('ExploreResults.svelte', () => {
|
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
it('Should render Show more button when next value is given', async () => {
|
|
57
|
-
vi.mocked(fetchTitles).
|
|
57
|
+
vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: 'truthy', previous: null })
|
|
58
58
|
|
|
59
59
|
const { getByText } = render(ExploreResults)
|
|
60
60
|
|
|
@@ -113,7 +113,7 @@ describe('ExploreResults.svelte', () => {
|
|
|
113
113
|
})
|
|
114
114
|
|
|
115
115
|
it('Should include search param when query is given', async () => {
|
|
116
|
-
vi.mocked(fetchTitles).
|
|
116
|
+
vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: 'truthy', previous: null })
|
|
117
117
|
|
|
118
118
|
const { getAllByTestId } = render(ExploreResults, { searchQuery: 'some query' })
|
|
119
119
|
|
|
@@ -123,8 +123,8 @@ describe('ExploreResults.svelte', () => {
|
|
|
123
123
|
})
|
|
124
124
|
})
|
|
125
125
|
|
|
126
|
-
it('Should include search param when query is empty', async () => {
|
|
127
|
-
vi.mocked(fetchTitles).
|
|
126
|
+
it('Should not include search param when query is empty', async () => {
|
|
127
|
+
vi.mocked(fetchTitles).mockResolvedValue({ results: [title], next: 'truthy', previous: null })
|
|
128
128
|
|
|
129
129
|
const { getAllByTestId } = render(ExploreResults, { searchQuery: '' })
|
|
130
130
|
|