@playpilot/tpi 8.1.2 → 8.1.3
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 +2 -2
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +2 -2
- package/package.json +5 -5
- package/src/routes/components/Rails/TitlesRail.svelte +1 -1
- package/src/routes/elements/+page.svelte +0 -1
- package/src/tests/routes/components/Rails/TitlesRail.test.js +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playpilot/tpi",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"eslint-plugin-svelte": "^3.15.0",
|
|
31
31
|
"globals": "^15.0.0",
|
|
32
32
|
"happy-dom": "^16.8.1",
|
|
33
|
-
"prettier": "^3.8.
|
|
33
|
+
"prettier": "^3.8.3",
|
|
34
34
|
"prettier-plugin-svelte": "^3.2.6",
|
|
35
35
|
"sass": "^1.99.0",
|
|
36
36
|
"svelte": "5.44.1",
|
|
37
37
|
"svelte-check": "^4.0.0",
|
|
38
38
|
"svelte-preprocess": "^6.0.3",
|
|
39
39
|
"svelte-tiny-slider": "^2.7.0",
|
|
40
|
-
"typescript": "^5.
|
|
41
|
-
"typescript-eslint": "^8.
|
|
42
|
-
"vite": "^5.
|
|
40
|
+
"typescript": "^5.9.3",
|
|
41
|
+
"typescript-eslint": "^8.59.2",
|
|
42
|
+
"vite": "^5.4.21",
|
|
43
43
|
"vite-plugin-css-injected-by-js": "^4.0.1",
|
|
44
44
|
"vitest": "^2.1.9"
|
|
45
45
|
}
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
<Rail
|
|
120
120
|
bind:slider
|
|
121
121
|
{heading}
|
|
122
|
-
onchange={(index) => setTimeout(() => openTitle(null, titles, index), 250)}
|
|
122
|
+
onchange={(index) => { if (expandable) setTimeout(() => openTitle(null, titles, index), 250) }}
|
|
123
123
|
onresize={() => slider?.reposition()}>
|
|
124
124
|
{#each titles as title, index}
|
|
125
125
|
{@const expanded = isExpanded(title)}
|
|
@@ -133,7 +133,6 @@
|
|
|
133
133
|
|
|
134
134
|
<h2>TitlesRailModal</h2>
|
|
135
135
|
|
|
136
|
-
|
|
137
136
|
{#await fetchSimilarTitles(title) then titles}
|
|
138
137
|
<button onclick={() => openModal({ type: 'titles-rail', data: titles })}>Show titles rail modal</button>
|
|
139
138
|
<button onclick={() => openModal({ type: 'titles-rail', data: titles, props: { initialIndex: 3 } })}>Show titles rail modal start at index 3</button>
|
|
@@ -156,4 +156,15 @@ describe('TitlesRail.svelte', () => {
|
|
|
156
156
|
expect(getAllByTestId('title')[0].classList).not.toContain('expanded')
|
|
157
157
|
})
|
|
158
158
|
})
|
|
159
|
+
|
|
160
|
+
it('Should not call openModal after changing if expandable is false', async () => {
|
|
161
|
+
const titles = [{ ...title }, { ...title, sid: 'some-other-sid' }]
|
|
162
|
+
|
|
163
|
+
const { getByLabelText } = render(TitlesRail, { titles, expandable: false })
|
|
164
|
+
|
|
165
|
+
await fireEvent.click(getByLabelText('Next'))
|
|
166
|
+
await new Promise(res => setTimeout(res, 500))
|
|
167
|
+
|
|
168
|
+
expect(openModal).not.toHaveBeenCalled()
|
|
169
|
+
})
|
|
159
170
|
})
|