@playpilot/tpi 8.29.11 → 8.31.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/editorial.mount.js +9 -9
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +7 -7
- package/package.json +1 -1
- package/src/lib/api/externalPages.ts +1 -0
- package/src/lib/api/participants.ts +1 -1
- package/src/lib/api/providers.ts +1 -1
- package/src/lib/api/search.ts +9 -0
- package/src/lib/api/titles.ts +1 -1
- package/src/lib/injection.ts +479 -479
- package/src/lib/types/global.d.ts +1 -0
- package/src/routes/components/Editorial/Editor.svelte +0 -2
- package/src/routes/components/Editorial/EditorItem.svelte +2 -2
- package/src/routes/components/Editorial/ManualInjection.svelte +26 -19
- package/src/routes/components/Editorial/Search/ParticipantSearchItem.svelte +86 -0
- package/src/routes/components/Editorial/Search/TypeSearch.svelte +120 -0
- package/src/routes/components/Explore/Routes/ExploreModal.svelte +107 -107
- package/src/routes/components/Modals/TitlesReelModal.svelte +3 -3
- package/src/routes/components/Rails/TitlesRail.svelte +1 -1
- package/src/routes/components/Tabs.svelte +12 -23
- package/src/routes/components/YouTubeEmbed.svelte +61 -20
- package/src/routes/components/YouTubeEmbedBackground.svelte +1 -0
- package/src/routes/components/YouTubeEmbedOverlay.svelte +1 -1
- package/src/routes/elements/+page.svelte +12 -0
- package/src/tests/lib/api/externalPages.test.js +134 -1
- package/src/tests/routes/components/Editorial/EditorItem.test.js +1 -2
- package/src/tests/routes/components/Editorial/ManualInjection.test.js +43 -6
- package/src/tests/routes/components/Editorial/Search/{TitleSearch.test.js → TypeSearch.test.js} +21 -9
- package/src/tests/routes/components/YouTubeEmbed.test.js +109 -33
- package/src/tests/routes/components/YouTubeEmbedBackground.test.js +2 -3
- package/src/tests/routes/components/YouTubeEmbedOverlay.test.js +2 -3
- package/src/routes/components/Editorial/Search/TitleSearch.svelte +0 -96
package/package.json
CHANGED
|
@@ -151,6 +151,7 @@ export async function saveLinkInjections(linkInjections: LinkInjection[]): Promi
|
|
|
151
151
|
in_text: linkInjection.in_text ?? true,
|
|
152
152
|
inactive: !!linkInjection.inactive,
|
|
153
153
|
removed: !!linkInjection.removed,
|
|
154
|
+
type: linkInjection.type,
|
|
154
155
|
}))
|
|
155
156
|
|
|
156
157
|
const response = await fetchLinkInjections({
|
|
@@ -10,7 +10,7 @@ export async function fetchTitlesForParticipant(participant: ParticipantData, {
|
|
|
10
10
|
const params = {
|
|
11
11
|
language: getLanguage(),
|
|
12
12
|
region: await getRegionBasedOnIp(),
|
|
13
|
-
include_count:
|
|
13
|
+
include_count: false,
|
|
14
14
|
participant_sid: participant.sid,
|
|
15
15
|
page,
|
|
16
16
|
}
|
package/src/lib/api/providers.ts
CHANGED
|
@@ -12,7 +12,7 @@ export async function fetchProviders(): Promise<PlaylinkData[]> {
|
|
|
12
12
|
const params = {
|
|
13
13
|
region: await getRegionBasedOnIp(),
|
|
14
14
|
page: 1,
|
|
15
|
-
include_count:
|
|
15
|
+
include_count: false,
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const response = await api<PlaylinkData[]>(`/providers/?api-token=${apiToken}&` + paramsToString(params))
|
package/src/lib/api/search.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getApiToken } from '$lib/token'
|
|
2
|
+
import type { ParticipantData } from '$lib/types/participant'
|
|
2
3
|
import type { TitleData } from '../types/title'
|
|
3
4
|
import { api } from './api'
|
|
4
5
|
|
|
@@ -9,3 +10,11 @@ export async function searchTitles(query: string): Promise<TitleData[]> {
|
|
|
9
10
|
|
|
10
11
|
return await api<TitleData[]>(`/search/titles/?api-token=${apiToken}&query=${query}`)
|
|
11
12
|
}
|
|
13
|
+
|
|
14
|
+
export async function searchParticipants(query: string): Promise<ParticipantData[]> {
|
|
15
|
+
const apiToken = getApiToken()
|
|
16
|
+
|
|
17
|
+
if (!apiToken) throw new Error('No token was provided')
|
|
18
|
+
|
|
19
|
+
return await api<ParticipantData[]>(`/search/participants/?api-token=${apiToken}&query=${query}`)
|
|
20
|
+
}
|
package/src/lib/api/titles.ts
CHANGED