@functionalcms/svelte-components 2.34.7 → 2.34.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script>import { HeaderNavigationItem } from "./Menu.js";
|
|
2
|
-
import { page } from "$app/stores";
|
|
3
2
|
import { isSelected } from "./MenuFunctions.js";
|
|
4
3
|
import { Orientation } from "../Styling.js";
|
|
5
4
|
import Link from "../Link.svelte";
|
|
5
|
+
import { page } from "$app/stores";
|
|
6
6
|
export let css = "";
|
|
7
7
|
export let linkCss = "";
|
|
8
8
|
export let localPages = [];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script>import { HeaderNavigationItem } from "./Menu.js";
|
|
2
|
-
import { page } from "$app/stores";
|
|
3
|
-
import { isSelected } from "./MenuFunctions.js";
|
|
4
2
|
import ColumnMenu from "./ColumnMenu.svelte";
|
|
5
3
|
import { Orientation } from "../Styling.js";
|
|
6
4
|
export let css = "";
|
|
@@ -9,16 +7,6 @@ export let includeSubpagesForSelect = false;
|
|
|
9
7
|
</script>
|
|
10
8
|
|
|
11
9
|
<ColumnMenu localPages={localPages} orientation={Orientation.DynamicRow} css={css}/>
|
|
12
|
-
<!-- <ul class={klasses}>
|
|
13
|
-
{#each localPages as pageItem}
|
|
14
|
-
<li aria-current={isSelected(includeSubpagesForSelect, $page, pageItem)}>
|
|
15
|
-
<span class="screenreader-only">Navigate to {pageItem.name}</span>
|
|
16
|
-
<a on:click={pageItem.action} href={pageItem.path}>
|
|
17
|
-
{pageItem.name}
|
|
18
|
-
</a>
|
|
19
|
-
</li>
|
|
20
|
-
{/each}
|
|
21
|
-
</ul> -->
|
|
22
10
|
|
|
23
11
|
<style>
|
|
24
12
|
ul {
|
|
@@ -4,10 +4,10 @@ export function selectVisible(pages, visiblity) {
|
|
|
4
4
|
page?.visiblity === visiblity);
|
|
5
5
|
}
|
|
6
6
|
export function isSelected(includeSubpagesForSelect, page, item) {
|
|
7
|
-
if (page
|
|
8
|
-
return page
|
|
7
|
+
if (page?.url?.pathname === '/') {
|
|
8
|
+
return page?.url?.pathname === item.path;
|
|
9
9
|
}
|
|
10
10
|
return includeSubpagesForSelect
|
|
11
|
-
? (page
|
|
12
|
-
: page
|
|
11
|
+
? (page?.url.pathname.startsWith(item.path ?? '-') && item.path !== '/')
|
|
12
|
+
: page?.url.pathname === item.path;
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@functionalcms/svelte-components",
|
|
3
|
-
"version": "2.34.
|
|
3
|
+
"version": "2.34.8",
|
|
4
4
|
"watch": {
|
|
5
5
|
"build": {
|
|
6
6
|
"patterns": [
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"vite": "^5.0.10"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
+
"@inlang/paraglide-sveltekit": "^0.11.5",
|
|
64
65
|
"@splidejs/svelte-splide": "^0.2.9",
|
|
65
66
|
"date-picker-svelte": "^2.14.1",
|
|
66
67
|
"ioredis": "^5.4.1",
|