Skip to content

Commit e98131a

Browse files
authored
Merge pull request #156 from WJSoftware:JP/SvelteV5
feat!: Upgrade to Svelte v5.0.0
2 parents c2a7934 + a87dcfd commit e98131a

File tree

13 files changed

+708
-396
lines changed

13 files changed

+708
-396
lines changed

package-lock.json

Lines changed: 673 additions & 384 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wjfe/dataview",
3-
"version": "0.10.0",
3+
"version": "0.11.0",
44
"scripts": {
55
"dev": "vite dev",
66
"build": "vite build && npm run package",
@@ -25,13 +25,13 @@
2525
"!dist/**/*.spec.*"
2626
],
2727
"peerDependencies": {
28-
"svelte": "^5.0.0-next.223"
28+
"svelte": "^5.0.2"
2929
},
3030
"devDependencies": {
3131
"@sveltejs/adapter-static": "^3.0.5",
3232
"@sveltejs/kit": "^2.7.1",
3333
"@sveltejs/package": "^2.3.5",
34-
"@sveltejs/vite-plugin-svelte": "^3.1.2",
34+
"@sveltejs/vite-plugin-svelte": "^4.0.0",
3535
"@testing-library/svelte": "^5.2.3",
3636
"@types/node": "^20.14.12",
3737
"gh-pages": "^6.1.1",

src/demolib/AllColumnsDropdown.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
data-bs-toggle="dropdown"
2424
title="Columns"
2525
aria-expanded="false"
26+
aria-label="Select visible columns"
2627
data-bs-auto-close="false"
2728
bind:this={btn}
2829
>

src/demolib/ColumnList.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script context="module" lang="ts">
1+
<script module lang="ts">
22
export type Column = { key: string; text: string; hidden?: boolean };
33
</script>
44

src/demolib/EditInGitHub.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
title="See an error? Want to improve the demo? Curious about the source code? View/edit this page in GitHub."
1313
href={editUrl}
1414
target="_blank"
15+
aria-label="Edit this page in GitHub"
1516
>
1617
<i class="bi bi-pencil"></i>
1718
</a>

src/demolib/HeaderCell.svelte

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script context="module">
1+
<script module>
22
export type HeaderColumn<TRow extends Record<string, any> = Record<string, any>, TCol extends Record<string, any> = Record<string, any>> =
33
WjDvColumn<TRow, TCol> & {
44
alignment: ColAlignment;
@@ -147,6 +147,7 @@
147147
type="button"
148148
class="btn btn-neutral btn-sm ms-auto"
149149
title="Click: Next alignment; Ctrl + Click: Previous alignment"
150+
aria-label="Column alignment"
150151
onclick={changeAlignment}
151152
>
152153
<i class="bi bi-{alignmentIcon}"></i>
@@ -159,14 +160,24 @@
159160
</label>
160161
{/if}
161162
{#if col.pinnedFunctions.hide}
162-
<button type="button" class="btn btn-sm btn-neutral" onclick={() => col.hidden = true}>
163-
<span title="Click to {col.pinned ? 'un' : ''}pin">
163+
<button
164+
type="button"
165+
class="btn btn-sm btn-neutral"
166+
onclick={() => col.hidden = true}
167+
aria-label="{col.hidden ? 'Show' : 'Hide'} column"
168+
>
169+
<span title="Click to {col.hidden ? 'show' : 'hide'}">
164170
<i class="bi bi-eye-slash"></i>
165171
</span>
166172
</button>
167173
{/if}
168174
{#if col.pinnedFunctions.pin}
169-
<button type="button" class="btn btn-sm btn-neutral" onclick={() => col.pinned = !col.pinned}>
175+
<button
176+
type="button"
177+
class="btn btn-sm btn-neutral"
178+
onclick={() => col.pinned = !col.pinned}
179+
aria-label="{col.pinned ? 'Unp' : 'P'}in column"
180+
>
170181
<span title="Click to {col.pinned ? 'un' : ''}pin">
171182
<i class="bi {pinIcon}"></i>
172183
</span>

src/lib/WjDataView/WjDataView.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script context="module" lang="ts">
1+
<script module lang="ts">
22
/**
33
* Possible column alignments.
44
*/

src/routes/+layout.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<a
4242
href="https://github.com/WJSoftware/wjfe-dataview"
4343
title="Repository"
44+
aria-label="Repository"
4445
class="nav-link"
4546
target="_blank"
4647
>
@@ -65,6 +66,7 @@
6566
href="https://getbootstrap.com"
6667
target="_blank"
6768
title="Bootstrap"
69+
aria-label="Bootstrap"
6870
>
6971
<i class="bi bi-bootstrap"></i>
7072
</a>

src/routes/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ import &#123; WjDataView &#125; from '@wjfe/dataview';</pre>
196196
type="button"
197197
class="btn btn-sm btn-neutral"
198198
onclick={() => ctx.row.wjdv.expanded = !ctx.row.wjdv.expanded}
199+
aria-label={ctx.row.wjdv.expanded ? 'contract' : 'expand'}
199200
>
200201
<i class="bi bi-chevron-bar-{ctx.row.wjdv.expanded ? 'contract' : 'expand'}"></i>
201202
</button>

src/routes/ThemeSwitch.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script context="module" lang="ts">
1+
<script module lang="ts">
22
/**
33
* All possible theme options.
44
*/

0 commit comments

Comments
 (0)