@playpilot/tpi 8.29.1 → 8.29.2
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 +11 -11
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +8 -8
- package/package.json +1 -1
- package/src/routes/components/Explore/ExploreRouter.svelte +0 -3
- package/src/routes/components/Rails/ParticipantsRail.svelte +2 -10
- package/src/routes/explore/+page.svelte +1 -0
- package/src/tests/routes/components/Rails/ParticipantsRail.test.js +1 -1
package/package.json
CHANGED
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
import ExploreLayout from './ExploreLayout.svelte'
|
|
10
10
|
import ExploreTitle from './Routes/ExploreTitle.svelte'
|
|
11
11
|
import ExploreModal from './Routes/ExploreModal.svelte'
|
|
12
|
-
import { setContext } from 'svelte'
|
|
13
|
-
|
|
14
|
-
setContext('navigate', navigate)
|
|
15
12
|
|
|
16
13
|
const routes: ExploreRoute[] = [
|
|
17
14
|
{
|
|
@@ -48,20 +48,12 @@
|
|
|
48
48
|
function onclick(event: MouseEvent, participant: ParticipantData): void {
|
|
49
49
|
track(TrackingEvent.ParticipantClick, null, { title_source: title.original_title || title.title, participant: participant.name })
|
|
50
50
|
|
|
51
|
-
if (!window.PlayPilotLinkInjections?.config?.open_tpi_links_in_explore) {
|
|
51
|
+
if (!window.PlayPilotLinkInjections?.config?.open_tpi_links_in_explore || window.location.href.includes(window.PlayPilotLinkInjections.config.explore_navigation_path || '')) {
|
|
52
52
|
openModal({ event, type: 'participant', data: participant })
|
|
53
53
|
return
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (navigate) {
|
|
59
|
-
window.history.pushState({}, '', url)
|
|
60
|
-
navigate('modal')
|
|
61
|
-
return
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
window.location.href = url
|
|
56
|
+
window.location.href = exploreModalUrl(participant.sid)
|
|
65
57
|
}
|
|
66
58
|
</script>
|
|
67
59
|
|
|
@@ -93,6 +93,7 @@ describe('ParticipantsRail.svelte', () => {
|
|
|
93
93
|
window.PlayPilotLinkInjections = {
|
|
94
94
|
config: {
|
|
95
95
|
open_tpi_links_in_explore: true,
|
|
96
|
+
explore_navigation_path: 'some-explore-url.com'
|
|
96
97
|
},
|
|
97
98
|
}
|
|
98
99
|
|
|
@@ -105,7 +106,6 @@ describe('ParticipantsRail.svelte', () => {
|
|
|
105
106
|
})
|
|
106
107
|
|
|
107
108
|
expect(openModal).not.toHaveBeenCalled()
|
|
108
|
-
expect(window.location.href).toContain(participants[0].sid)
|
|
109
109
|
})
|
|
110
110
|
|
|
111
111
|
it('Should fire track event on click of participant', async () => {
|