diff --git a/src/FilterItem.svelte b/src/FilterItem.svelte
index 7e4a6c6..e6ae46a 100644
--- a/src/FilterItem.svelte
+++ b/src/FilterItem.svelte
@@ -6,6 +6,8 @@
import { createTriState, createTriStates, UNCHECKED, CHECKED, WEIRD } from './stores';
import { Icon } from 'sveltestrap';
+ import { mkSource } from './calendar.js';
+
export let item = null;
export let level = 1;
export let generalToggle = undefined;
@@ -78,6 +80,11 @@
});
}
+ const url = () => {
+ const source = mkSource(item);
+ return source ? source.export_url : undefined;
+ };
+
$: selected =
$filtering === CHECKED ? [item, ...subselected.flat()] : subselected.flat();
$: subHidden = () => (collapsed ? 'd-none' : '');
@@ -90,6 +97,7 @@
on:change={handleChange}
value={item}
bind:collapsed
+ url={url()}
/>
diff --git a/src/TriStateCheckbox.svelte b/src/TriStateCheckbox.svelte
index 9f981ab..60acdc8 100644
--- a/src/TriStateCheckbox.svelte
+++ b/src/TriStateCheckbox.svelte
@@ -4,6 +4,7 @@
export let state;
export let value;
export let collapsed = undefined;
+ export let url;
import { UNCHECKED, CHECKED, WEIRD } from './stores';
import { createEventDispatcher } from 'svelte';
@@ -28,14 +29,32 @@
{value}
- {#if collapsed !== undefined}
- (collapsed = !collapsed)}>
-
-
- {/if}
+
+ {#if url}
+
+
+
+ {/if}
+
+ {#if collapsed !== undefined}
+ (collapsed = !collapsed)}>
+
+
+ {/if}
+