@nymphjs/tilmeld-setup 1.0.0-beta.121 → 1.0.0-beta.123

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.123](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.122...v1.0.0-beta.123) (2026-09-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - reload router to reinitialize components after location change in tilmeld setup ([09c1206](https://forge.sciactive.com/sciactive/nymphjs/commits/09c12061418637c589a3db7e182a52c7ca33dca6))
11
+
12
+ ### Features
13
+
14
+ - add children and users tables to group edit in tilmeld setup ([3ffa18e](https://forge.sciactive.com/sciactive/nymphjs/commits/3ffa18ec7027b424df472f1883d643eefbb3cfcb))
15
+
16
+ # [1.0.0-beta.122](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.121...v1.0.0-beta.122) (2026-09-22)
17
+
18
+ ### Features
19
+
20
+ - save and delete now throw on errors instead of returning false, refresh throws on db errors ([536db88](https://forge.sciactive.com/sciactive/nymphjs/commits/536db8804ac515cd3e1e9c30b104f674e267916a))
21
+
6
22
  # [1.0.0-beta.121](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.120...v1.0.0-beta.121) (2026-09-17)
7
23
 
8
24
  **Note:** Version bump only for package @nymphjs/tilmeld-setup
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Tilmeld Setup App - User/Group System for Nymph
2
2
 
3
- Powerful object data storage and querying.
3
+ Application Data and Access Framework for Node.js and the browser.
4
+
5
+ https://nymph.io/
4
6
 
5
7
  The Tilmeld Setup App allows administrators to create, modify, and delete users and groups and configure how Tilmeld works. It also acts as the endpoint for email address verification.
6
8
 
@@ -73,7 +75,7 @@ app.listen(80);
73
75
 
74
76
  # License
75
77
 
76
- Copyright 2021-2025 SciActive Inc
78
+ Copyright 2021-2026 SciActive Inc
77
79
 
78
80
  Licensed under the Apache License, Version 2.0 (the "License");
79
81
  you may not use this file except in compliance with the License.
@@ -73,13 +73,12 @@
73
73
  <Item
74
74
  bind:this={section.component}
75
75
  tag="a"
76
+ use={[link]}
76
77
  nonInteractive={!('href' in section)}
77
- href={'href' in section ? `#${section.href}` : undefined}
78
+ href={'href' in section ? section.href : undefined}
78
79
  activated={section.absolute
79
- ? `${currentMatch.route.path}/` === section.href
80
- : `${currentMatch.route.path}/`.startsWith(
81
- section.href ?? '!',
82
- )}
80
+ ? `${currentRoute}` === section.href
81
+ : `${currentRoute}/`.startsWith(section.href ?? '!')}
83
82
  style={section.indent
84
83
  ? 'margin-left: ' + section.indent * 25 + 'px;'
85
84
  : ''}
@@ -108,7 +107,9 @@
108
107
  <main class="tilmeld-main-content" bind:this={mainContent}>
109
108
  {#if tilmeldAdmin}
110
109
  {#if $clientConfig}
111
- <CurrentRoute {router} {params} {clientConfig} {user} />
110
+ {#key currentLocation}
111
+ <Router {routes} {onRouteLoaded} />
112
+ {/key}
112
113
  {:else}
113
114
  Loading...
114
115
  {/if}
@@ -132,10 +133,10 @@
132
133
 
133
134
  <script lang="ts">
134
135
  import type { Component } from 'svelte';
135
- import { onMount } from 'svelte';
136
+ import { onMount, setContext } from 'svelte';
136
137
  import type { Writable } from 'svelte/store';
137
138
  import { writable } from 'svelte/store';
138
- import Navigo from 'navigo';
139
+ import Router, { link, type RouteDetailLoaded } from 'svelte-spa-router';
139
140
  import type {
140
141
  User as UserClass,
141
142
  ClientConfig,
@@ -150,7 +151,7 @@
150
151
  import Menu from '@smui/menu';
151
152
  import { Icon } from '@smui/common';
152
153
 
153
- import { User } from './nymph';
154
+ import { User } from './nymph.js';
154
155
  import Intro from './routes/Intro.svelte';
155
156
  import Users from './routes/Users.svelte';
156
157
  import UserEdit from './routes/UserEdit.svelte';
@@ -172,6 +173,9 @@
172
173
  let tilmeldAdmin: boolean | undefined = $state();
173
174
  let accountOpen = $state(false);
174
175
 
176
+ setContext('clientConfigStore', clientConfig);
177
+ setContext('userStore', user);
178
+
175
179
  $effect(() => {
176
180
  if ($user) {
177
181
  $user
@@ -184,65 +188,27 @@
184
188
  }
185
189
  });
186
190
 
187
- const router = new Navigo('/', { hash: true });
188
- let CurrentRoute: Component<any> = $state(Intro);
189
- let params: any = $state({});
190
-
191
- router.hooks({
192
- before(done, match) {
193
- if (mainContent) {
194
- drawerOpen = false;
195
- mainContent.scrollTop = 0;
196
- }
197
-
198
- currentMatch = match;
199
-
200
- done();
201
- },
202
- });
191
+ let currentRoute = $state('/');
192
+ let currentLocation = $state('/');
203
193
 
204
- router.on({
205
- '/': () => {
206
- CurrentRoute = Intro;
207
- params = {};
208
- },
209
- '/users/edit/:guid': ({ data }: any) => {
210
- CurrentRoute = UserEdit;
211
- params = data;
212
- },
213
- '/users/': () => {
214
- CurrentRoute = Users;
215
- params = {};
216
- },
217
- '/users/:query?': ({ data }: any) => {
218
- CurrentRoute = Users;
219
- params = data;
220
- },
221
- '/groups/edit/:guid': ({ data }: any) => {
222
- CurrentRoute = GroupEdit;
223
- params = data;
224
- },
225
- '/groups/': () => {
226
- CurrentRoute = Groups;
227
- params = {};
228
- },
229
- '/groups/:query?': ({ data }: any) => {
230
- CurrentRoute = Groups;
231
- params = data;
232
- },
233
- });
194
+ const routes = {
195
+ '/': Intro,
196
+ '/users/edit/:guid': UserEdit,
197
+ '/users/:query?': Users,
198
+ '/groups/edit/:guid': GroupEdit,
199
+ '/groups/:query?': Groups,
200
+ '*': NotFound,
201
+ };
234
202
 
235
- router.notFound(({ hashString }: any) => {
236
- if (hashString === '') {
237
- router.navigate('/', { historyAPIMethod: 'replaceState' });
238
- } else {
239
- CurrentRoute = NotFound;
240
- params = {};
203
+ function onRouteLoaded(detail: RouteDetailLoaded) {
204
+ if (mainContent) {
205
+ drawerOpen = false;
206
+ mainContent.scrollTop = 0;
241
207
  }
242
- });
243
208
 
244
- let currentMatch = $state(router.getCurrentLocation());
245
- router.resolve();
209
+ currentRoute = `${detail?.route ?? '/'}`;
210
+ currentLocation = `${detail?.location ?? '/'}`;
211
+ }
246
212
 
247
213
  const sections: (
248
214
  | {
@@ -266,12 +232,12 @@
266
232
  },
267
233
  {
268
234
  name: 'Users',
269
- href: 'users/',
235
+ href: '/users/',
270
236
  indent: 0,
271
237
  },
272
238
  {
273
239
  name: 'Groups',
274
- href: 'groups/',
240
+ href: '/groups/',
275
241
  indent: 0,
276
242
  },
277
243
  ];