@nymphjs/tilmeld-setup 1.0.0-alpha.9 → 1.0.0-beta.0
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 +157 -0
- package/app/nymph.ts +2 -1
- package/app/src/App.svelte +19 -7
- package/app/src/GroupEdit.svelte +12 -14
- package/app/src/Groups.svelte +10 -12
- package/app/src/UserEdit.svelte +19 -21
- package/app/src/Users.svelte +10 -12
- package/app/theme/_helpers.scss +3 -1
- package/app/theme/_smui-theme.scss +1 -1
- package/dist/app/index.js +1 -1
- package/dist/app/index.js.LICENSE.txt +0 -2
- package/dist/app/index.js.map +1 -1
- package/dist/app/smui.css +29 -1
- package/jest.config.js +1 -1
- package/package.json +49 -48
- package/test.mjs +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,163 @@
|
|
|
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.0](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.43...v1.0.0-beta.0) (2022-11-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- update packages and fix issues, new guid package to use latest esm nanoid ([fd66aab](https://github.com/sciactive/nymphjs/commit/fd66aab465e6b1d83f4238bb16bc88d851ef5e92))
|
|
11
|
+
|
|
12
|
+
# [1.0.0-alpha.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.42...v1.0.0-alpha.43) (2022-03-07)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
15
|
+
|
|
16
|
+
# [1.0.0-alpha.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.41...v1.0.0-alpha.42) (2022-03-06)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
19
|
+
|
|
20
|
+
# [1.0.0-alpha.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.40...v1.0.0-alpha.41) (2022-03-06)
|
|
21
|
+
|
|
22
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
23
|
+
|
|
24
|
+
# [1.0.0-alpha.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.39...v1.0.0-alpha.40) (2022-03-05)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
27
|
+
|
|
28
|
+
# [1.0.0-alpha.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.38...v1.0.0-alpha.39) (2022-03-05)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
31
|
+
|
|
32
|
+
# [1.0.0-alpha.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.37...v1.0.0-alpha.38) (2022-02-10)
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
- queryParser props in setup app ([effba3f](https://github.com/sciactive/nymphjs/commit/effba3f3bbc30723b29874f20d54690c8a17adce))
|
|
37
|
+
|
|
38
|
+
# [1.0.0-alpha.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) (2022-02-02)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
41
|
+
|
|
42
|
+
# [1.0.0-alpha.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.35...v1.0.0-alpha.36) (2022-01-26)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
45
|
+
|
|
46
|
+
# [1.0.0-alpha.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.34...v1.0.0-alpha.35) (2022-01-19)
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
- add new props to tilmeld components in setup app ([0afb20b](https://github.com/sciactive/nymphjs/commit/0afb20b4a901951401b7696eec1033a5488e38c5))
|
|
51
|
+
|
|
52
|
+
# [1.0.0-alpha.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2022-01-08)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
55
|
+
|
|
56
|
+
# [1.0.0-alpha.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2022-01-08)
|
|
57
|
+
|
|
58
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
59
|
+
|
|
60
|
+
# [1.0.0-alpha.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2022-01-08)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
63
|
+
|
|
64
|
+
# [1.0.0-alpha.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.30...v1.0.0-alpha.31) (2022-01-08)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
67
|
+
|
|
68
|
+
# [1.0.0-alpha.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-01-07)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
71
|
+
|
|
72
|
+
# [1.0.0-alpha.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-01-07)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
75
|
+
|
|
76
|
+
# [1.0.0-alpha.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.27...v1.0.0-alpha.28) (2022-01-07)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
79
|
+
|
|
80
|
+
# [1.0.0-alpha.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.26...v1.0.0-alpha.27) (2022-01-05)
|
|
81
|
+
|
|
82
|
+
### Features
|
|
83
|
+
|
|
84
|
+
- add prop forwarding for svelte components within tilmeld components ([42b60e2](https://github.com/sciactive/nymphjs/commit/42b60e29638f04036eff3f7e4876e96a1c66c0bf))
|
|
85
|
+
- update smui to latest versions ([7ed7bd3](https://github.com/sciactive/nymphjs/commit/7ed7bd34d01a155c7001a2671de25ef2f3363682))
|
|
86
|
+
|
|
87
|
+
# [1.0.0-alpha.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2021-12-30)
|
|
88
|
+
|
|
89
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
90
|
+
|
|
91
|
+
# [1.0.0-alpha.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.24...v1.0.0-alpha.25) (2021-12-30)
|
|
92
|
+
|
|
93
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
94
|
+
|
|
95
|
+
# [1.0.0-alpha.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2021-12-30)
|
|
96
|
+
|
|
97
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
98
|
+
|
|
99
|
+
# [1.0.0-alpha.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2021-12-30)
|
|
100
|
+
|
|
101
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
102
|
+
|
|
103
|
+
# [1.0.0-alpha.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2021-12-14)
|
|
104
|
+
|
|
105
|
+
### Features
|
|
106
|
+
|
|
107
|
+
- update smui to latest versions ([912873b](https://github.com/sciactive/nymphjs/commit/912873b863d1ae5d51c359a3c0558bff38ce85cd))
|
|
108
|
+
|
|
109
|
+
# [1.0.0-alpha.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2021-11-29)
|
|
110
|
+
|
|
111
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
112
|
+
|
|
113
|
+
# [1.0.0-alpha.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2021-11-24)
|
|
114
|
+
|
|
115
|
+
### Features
|
|
116
|
+
|
|
117
|
+
- update smui to latest versions ([73ab4e8](https://github.com/sciactive/nymphjs/commit/73ab4e843623c25dc2efeb3c4b2cdd91237018b8))
|
|
118
|
+
|
|
119
|
+
# [1.0.0-alpha.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2021-11-18)
|
|
120
|
+
|
|
121
|
+
### Features
|
|
122
|
+
|
|
123
|
+
- update smui and other packages to latest versions ([2465340](https://github.com/sciactive/nymphjs/commit/24653400d887bc04c41c3c4ee0c73ce2f2289e0d))
|
|
124
|
+
|
|
125
|
+
# [1.0.0-alpha.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2021-11-09)
|
|
126
|
+
|
|
127
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
128
|
+
|
|
129
|
+
# [1.0.0-alpha.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2021-10-14)
|
|
130
|
+
|
|
131
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
132
|
+
|
|
133
|
+
# [1.0.0-alpha.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2021-10-14)
|
|
134
|
+
|
|
135
|
+
### Bug Fixes
|
|
136
|
+
|
|
137
|
+
- don't ignore built files in npm packages ([7d688db](https://github.com/sciactive/nymphjs/commit/7d688dbec362f1f71fb451a1d0dbcaecc15d99fc))
|
|
138
|
+
|
|
139
|
+
# [1.0.0-alpha.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2021-10-14)
|
|
140
|
+
|
|
141
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
142
|
+
|
|
143
|
+
# [1.0.0-alpha.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2021-10-14)
|
|
144
|
+
|
|
145
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
146
|
+
|
|
147
|
+
# [1.0.0-alpha.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2021-10-14)
|
|
148
|
+
|
|
149
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
150
|
+
|
|
151
|
+
# [1.0.0-alpha.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2021-10-13)
|
|
152
|
+
|
|
153
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
154
|
+
|
|
155
|
+
# [1.0.0-alpha.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2021-10-13)
|
|
156
|
+
|
|
157
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
158
|
+
|
|
159
|
+
# [1.0.0-alpha.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2021-10-12)
|
|
160
|
+
|
|
161
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
162
|
+
|
|
6
163
|
# [1.0.0-alpha.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2021-10-12)
|
|
7
164
|
|
|
8
165
|
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
package/app/nymph.ts
CHANGED
package/app/src/App.svelte
CHANGED
|
@@ -16,15 +16,27 @@
|
|
|
16
16
|
<IconButton
|
|
17
17
|
href="https://github.com/sciactive/nymphjs"
|
|
18
18
|
target="_blank"
|
|
19
|
+
rel="noreferrer"
|
|
19
20
|
title="Nymph/Tilmeld on GitHub"
|
|
20
21
|
>
|
|
21
22
|
<Icon component={Svg} viewBox="0 0 24 24">
|
|
22
23
|
<path fill="currentColor" d={mdiGithub} />
|
|
23
24
|
</Icon>
|
|
24
25
|
</IconButton>
|
|
26
|
+
<IconButton
|
|
27
|
+
href="https://port87.social/@hperrin"
|
|
28
|
+
target="_blank"
|
|
29
|
+
rel="noreferrer"
|
|
30
|
+
title="SciActive on Mastodon"
|
|
31
|
+
>
|
|
32
|
+
<Icon component={Svg} viewBox="0 0 24 24">
|
|
33
|
+
<path fill="currentColor" d={mdiMastodon} />
|
|
34
|
+
</Icon>
|
|
35
|
+
</IconButton>
|
|
25
36
|
<IconButton
|
|
26
37
|
href="https://twitter.com/SciActive"
|
|
27
38
|
target="_blank"
|
|
39
|
+
rel="noreferrer"
|
|
28
40
|
title="SciActive on Twitter"
|
|
29
41
|
>
|
|
30
42
|
<Icon component={Svg} viewBox="0 0 24 24">
|
|
@@ -36,7 +48,7 @@
|
|
|
36
48
|
title="Account"
|
|
37
49
|
on:click={() => user != null && accountMenu.setOpen(true)}
|
|
38
50
|
>
|
|
39
|
-
<Icon
|
|
51
|
+
<Icon tag="img" src={userAvatar} />
|
|
40
52
|
</IconButton>
|
|
41
53
|
<Menu bind:this={accountMenu} anchorCorner="BOTTOM_LEFT">
|
|
42
54
|
<List>
|
|
@@ -111,28 +123,28 @@
|
|
|
111
123
|
{/if}
|
|
112
124
|
{:else if user == null}
|
|
113
125
|
<section style="display: flex; justify-content: center;">
|
|
114
|
-
<Login />
|
|
126
|
+
<Login {User} {clientConfig} />
|
|
115
127
|
</section>
|
|
116
128
|
{:else}
|
|
117
129
|
<section>You don't have permission to access this app.</section>
|
|
118
130
|
{/if}
|
|
119
|
-
<Account bind:open={accountOpen} />
|
|
131
|
+
<Account bind:open={accountOpen} {User} {clientConfig} />
|
|
120
132
|
</main>
|
|
121
133
|
</AppContent>
|
|
122
134
|
</div>
|
|
123
135
|
|
|
124
136
|
<script lang="ts">
|
|
125
137
|
import { onMount, SvelteComponent } from 'svelte';
|
|
126
|
-
import { ClientConfig, CurrentUserData
|
|
138
|
+
import type { ClientConfig, CurrentUserData } from '@nymphjs/tilmeld-client';
|
|
139
|
+
import { User } from '@nymphjs/tilmeld-client';
|
|
127
140
|
import { Login, Account } from '@nymphjs/tilmeld-components';
|
|
128
|
-
import { mdiGithub, mdiTwitter } from '@mdi/js';
|
|
141
|
+
import { mdiGithub, mdiMastodon, mdiTwitter } from '@mdi/js';
|
|
129
142
|
import TopAppBar, { Row, Section, Title } from '@smui/top-app-bar';
|
|
130
143
|
import Drawer, { Content, Scrim, AppContent } from '@smui/drawer';
|
|
131
144
|
import IconButton from '@smui/icon-button';
|
|
132
145
|
import List, { Item, Text, Separator } from '@smui/list';
|
|
133
146
|
import Menu from '@smui/menu';
|
|
134
|
-
import { Icon } from '@smui/common';
|
|
135
|
-
import { Img, Svg } from '@smui/common/elements';
|
|
147
|
+
import { Icon, Svg } from '@smui/common';
|
|
136
148
|
|
|
137
149
|
import Intro from './Intro.svelte';
|
|
138
150
|
import Users from './Users.svelte';
|
package/app/src/GroupEdit.svelte
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</FormField>
|
|
54
54
|
</LayoutCell>
|
|
55
55
|
<LayoutCell span={4} style="text-align: end;">
|
|
56
|
-
<a href="https://en.gravatar.com/" target="_blank">
|
|
56
|
+
<a href="https://en.gravatar.com/" target="_blank" rel="noreferrer">
|
|
57
57
|
<img src={avatar} alt="Avatar" title="Avatar by Gravatar" />
|
|
58
58
|
</a>
|
|
59
59
|
</LayoutCell>
|
|
@@ -327,13 +327,12 @@
|
|
|
327
327
|
|
|
328
328
|
<script lang="ts">
|
|
329
329
|
import { createEventDispatcher, onMount } from 'svelte';
|
|
330
|
-
import {
|
|
330
|
+
import type {
|
|
331
331
|
AdminGroupData,
|
|
332
332
|
ClientConfig,
|
|
333
333
|
CurrentUserData,
|
|
334
|
-
Group,
|
|
335
|
-
User,
|
|
336
334
|
} from '@nymphjs/tilmeld-client';
|
|
335
|
+
import { Group, User } from '@nymphjs/tilmeld-client';
|
|
337
336
|
import queryParser from '@nymphjs/query-parser';
|
|
338
337
|
import {
|
|
339
338
|
mdiArrowLeft,
|
|
@@ -352,11 +351,10 @@
|
|
|
352
351
|
import Paper from '@smui/paper';
|
|
353
352
|
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
|
|
354
353
|
import Textfield, { Input } from '@smui/textfield';
|
|
355
|
-
import HelperText from '@smui/textfield/helper-text
|
|
354
|
+
import HelperText from '@smui/textfield/helper-text';
|
|
356
355
|
import IconButton from '@smui/icon-button';
|
|
357
356
|
import Button from '@smui/button';
|
|
358
|
-
import { Icon, Label } from '@smui/common';
|
|
359
|
-
import { Svg } from '@smui/common/elements';
|
|
357
|
+
import { Icon, Label, Svg } from '@smui/common';
|
|
360
358
|
|
|
361
359
|
import nymph from '../nymph';
|
|
362
360
|
|
|
@@ -434,11 +432,11 @@
|
|
|
434
432
|
return;
|
|
435
433
|
}
|
|
436
434
|
try {
|
|
437
|
-
const query = queryParser(
|
|
438
|
-
parentSearch,
|
|
439
|
-
Group,
|
|
440
|
-
['groupname', 'name', 'email'],
|
|
441
|
-
{
|
|
435
|
+
const query = queryParser({
|
|
436
|
+
query: parentSearch,
|
|
437
|
+
entityClass: Group,
|
|
438
|
+
defaultFields: ['groupname', 'name', 'email'],
|
|
439
|
+
qrefMap: {
|
|
442
440
|
User: {
|
|
443
441
|
class: User,
|
|
444
442
|
defaultFields: ['username', 'name', 'email'],
|
|
@@ -447,8 +445,8 @@
|
|
|
447
445
|
class: Group,
|
|
448
446
|
defaultFields: ['groupname', 'name', 'email'],
|
|
449
447
|
},
|
|
450
|
-
}
|
|
451
|
-
);
|
|
448
|
+
},
|
|
449
|
+
});
|
|
452
450
|
parents = (await nymph.getEntities(...query)).filter((group) => {
|
|
453
451
|
return !group.$is(entity) && !group.$is(entity.parent);
|
|
454
452
|
});
|
package/app/src/Groups.svelte
CHANGED
|
@@ -91,21 +91,19 @@
|
|
|
91
91
|
<script lang="ts">
|
|
92
92
|
import { onMount } from 'svelte';
|
|
93
93
|
import queryParser from '@nymphjs/query-parser';
|
|
94
|
-
import {
|
|
94
|
+
import type {
|
|
95
95
|
AdminGroupData,
|
|
96
96
|
ClientConfig,
|
|
97
97
|
CurrentUserData,
|
|
98
|
-
Group,
|
|
99
|
-
User,
|
|
100
98
|
} from '@nymphjs/tilmeld-client';
|
|
99
|
+
import { Group, User } from '@nymphjs/tilmeld-client';
|
|
101
100
|
import { mdiMagnify, mdiArrowRight, mdiPlus } from '@mdi/js';
|
|
102
101
|
import CircularProgress from '@smui/circular-progress';
|
|
103
102
|
import Paper from '@smui/paper';
|
|
104
103
|
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
|
|
105
104
|
import { Input } from '@smui/textfield';
|
|
106
105
|
import Fab from '@smui/fab';
|
|
107
|
-
import { Icon } from '@smui/common';
|
|
108
|
-
import { Svg } from '@smui/common/elements';
|
|
106
|
+
import { Icon, Svg } from '@smui/common';
|
|
109
107
|
|
|
110
108
|
import nymph from '../nymph';
|
|
111
109
|
|
|
@@ -131,11 +129,11 @@
|
|
|
131
129
|
entitiesSearching = true;
|
|
132
130
|
failureMessage = undefined;
|
|
133
131
|
try {
|
|
134
|
-
const query = queryParser(
|
|
135
|
-
entitySearch,
|
|
136
|
-
Group,
|
|
137
|
-
['
|
|
138
|
-
{
|
|
132
|
+
const query = queryParser({
|
|
133
|
+
query: entitySearch,
|
|
134
|
+
entityClass: Group,
|
|
135
|
+
defaultFields: ['groupname', 'name', 'email'],
|
|
136
|
+
qrefMap: {
|
|
139
137
|
User: {
|
|
140
138
|
class: User,
|
|
141
139
|
defaultFields: ['username', 'name', 'email'],
|
|
@@ -144,8 +142,8 @@
|
|
|
144
142
|
class: Group,
|
|
145
143
|
defaultFields: ['groupname', 'name', 'email'],
|
|
146
144
|
},
|
|
147
|
-
}
|
|
148
|
-
);
|
|
145
|
+
},
|
|
146
|
+
});
|
|
149
147
|
entities = await nymph.getEntities(...query);
|
|
150
148
|
} catch (e: any) {
|
|
151
149
|
failureMessage = e?.message;
|
package/app/src/UserEdit.svelte
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</FormField>
|
|
45
45
|
</LayoutCell>
|
|
46
46
|
<LayoutCell span={4} style="text-align: end;">
|
|
47
|
-
<a href="https://en.gravatar.com/" target="_blank">
|
|
47
|
+
<a href="https://en.gravatar.com/" target="_blank" rel="noreferrer">
|
|
48
48
|
<img src={avatar} alt="Avatar" title="Avatar by Gravatar" />
|
|
49
49
|
</a>
|
|
50
50
|
</LayoutCell>
|
|
@@ -562,14 +562,13 @@
|
|
|
562
562
|
|
|
563
563
|
<script lang="ts">
|
|
564
564
|
import { createEventDispatcher, onMount } from 'svelte';
|
|
565
|
-
import {
|
|
565
|
+
import type {
|
|
566
566
|
AdminGroupData,
|
|
567
567
|
AdminUserData,
|
|
568
568
|
ClientConfig,
|
|
569
569
|
CurrentUserData,
|
|
570
|
-
Group,
|
|
571
|
-
User,
|
|
572
570
|
} from '@nymphjs/tilmeld-client';
|
|
571
|
+
import { Group, User } from '@nymphjs/tilmeld-client';
|
|
573
572
|
import queryParser from '@nymphjs/query-parser';
|
|
574
573
|
import {
|
|
575
574
|
mdiArrowLeft,
|
|
@@ -588,11 +587,10 @@
|
|
|
588
587
|
import Paper from '@smui/paper';
|
|
589
588
|
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
|
|
590
589
|
import Textfield, { Input } from '@smui/textfield';
|
|
591
|
-
import HelperText from '@smui/textfield/helper-text
|
|
590
|
+
import HelperText from '@smui/textfield/helper-text';
|
|
592
591
|
import IconButton from '@smui/icon-button';
|
|
593
592
|
import Button from '@smui/button';
|
|
594
|
-
import { Icon, Label } from '@smui/common';
|
|
595
|
-
import { Svg } from '@smui/common/elements';
|
|
593
|
+
import { Icon, Label, Svg } from '@smui/common';
|
|
596
594
|
|
|
597
595
|
const dispatch = createEventDispatcher();
|
|
598
596
|
|
|
@@ -700,11 +698,11 @@
|
|
|
700
698
|
return;
|
|
701
699
|
}
|
|
702
700
|
try {
|
|
703
|
-
const [options, ...selectors] = queryParser(
|
|
704
|
-
primaryGroupSearch,
|
|
705
|
-
Group,
|
|
706
|
-
['groupname', 'name', 'email'],
|
|
707
|
-
{
|
|
701
|
+
const [options, ...selectors] = queryParser({
|
|
702
|
+
query: primaryGroupSearch,
|
|
703
|
+
entityClass: Group,
|
|
704
|
+
defaultFields: ['groupname', 'name', 'email'],
|
|
705
|
+
qrefMap: {
|
|
708
706
|
User: {
|
|
709
707
|
class: User,
|
|
710
708
|
defaultFields: ['username', 'name', 'email'],
|
|
@@ -713,8 +711,8 @@
|
|
|
713
711
|
class: Group,
|
|
714
712
|
defaultFields: ['groupname', 'name', 'email'],
|
|
715
713
|
},
|
|
716
|
-
}
|
|
717
|
-
);
|
|
714
|
+
},
|
|
715
|
+
});
|
|
718
716
|
primaryGroups = (await Group.getPrimaryGroups(options, selectors)).filter(
|
|
719
717
|
(group) => {
|
|
720
718
|
return !group.$is(entity.group);
|
|
@@ -739,11 +737,11 @@
|
|
|
739
737
|
return;
|
|
740
738
|
}
|
|
741
739
|
try {
|
|
742
|
-
const [options, ...selectors] = queryParser(
|
|
743
|
-
secondaryGroupSearch,
|
|
744
|
-
Group,
|
|
745
|
-
['groupname', 'name', 'email'],
|
|
746
|
-
{
|
|
740
|
+
const [options, ...selectors] = queryParser({
|
|
741
|
+
query: secondaryGroupSearch,
|
|
742
|
+
entityClass: Group,
|
|
743
|
+
defaultFields: ['groupname', 'name', 'email'],
|
|
744
|
+
qrefMap: {
|
|
747
745
|
User: {
|
|
748
746
|
class: User,
|
|
749
747
|
defaultFields: ['username', 'name', 'email'],
|
|
@@ -752,8 +750,8 @@
|
|
|
752
750
|
class: Group,
|
|
753
751
|
defaultFields: ['groupname', 'name', 'email'],
|
|
754
752
|
},
|
|
755
|
-
}
|
|
756
|
-
);
|
|
753
|
+
},
|
|
754
|
+
});
|
|
757
755
|
secondaryGroups = (
|
|
758
756
|
await Group.getSecondaryGroups(options, selectors)
|
|
759
757
|
).filter((group) => {
|
package/app/src/Users.svelte
CHANGED
|
@@ -91,21 +91,19 @@
|
|
|
91
91
|
<script lang="ts">
|
|
92
92
|
import { onMount } from 'svelte';
|
|
93
93
|
import queryParser from '@nymphjs/query-parser';
|
|
94
|
-
import {
|
|
94
|
+
import type {
|
|
95
95
|
AdminUserData,
|
|
96
96
|
ClientConfig,
|
|
97
97
|
CurrentUserData,
|
|
98
|
-
Group,
|
|
99
|
-
User,
|
|
100
98
|
} from '@nymphjs/tilmeld-client';
|
|
99
|
+
import { Group, User } from '@nymphjs/tilmeld-client';
|
|
101
100
|
import { mdiMagnify, mdiArrowRight, mdiPlus } from '@mdi/js';
|
|
102
101
|
import CircularProgress from '@smui/circular-progress';
|
|
103
102
|
import Paper from '@smui/paper';
|
|
104
103
|
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
|
|
105
104
|
import { Input } from '@smui/textfield';
|
|
106
105
|
import Fab from '@smui/fab';
|
|
107
|
-
import { Icon } from '@smui/common';
|
|
108
|
-
import { Svg } from '@smui/common/elements';
|
|
106
|
+
import { Icon, Svg } from '@smui/common';
|
|
109
107
|
|
|
110
108
|
import nymph from '../nymph';
|
|
111
109
|
|
|
@@ -131,11 +129,11 @@
|
|
|
131
129
|
entitiesSearching = true;
|
|
132
130
|
failureMessage = undefined;
|
|
133
131
|
try {
|
|
134
|
-
const query = queryParser(
|
|
135
|
-
entitySearch,
|
|
136
|
-
User,
|
|
137
|
-
['username', 'name', 'email'],
|
|
138
|
-
{
|
|
132
|
+
const query = queryParser({
|
|
133
|
+
query: entitySearch,
|
|
134
|
+
entityClass: User,
|
|
135
|
+
defaultFields: ['username', 'name', 'email'],
|
|
136
|
+
qrefMap: {
|
|
139
137
|
User: {
|
|
140
138
|
class: User,
|
|
141
139
|
defaultFields: ['username', 'name', 'email'],
|
|
@@ -144,8 +142,8 @@
|
|
|
144
142
|
class: Group,
|
|
145
143
|
defaultFields: ['groupname', 'name', 'email'],
|
|
146
144
|
},
|
|
147
|
-
}
|
|
148
|
-
);
|
|
145
|
+
},
|
|
146
|
+
});
|
|
149
147
|
entities = await nymph.getEntities(...query);
|
|
150
148
|
} catch (e: any) {
|
|
151
149
|
failureMessage = e?.message;
|
package/app/theme/_helpers.scss
CHANGED