@nymphjs/tilmeld-setup 1.0.0-alpha.2 → 1.0.0-alpha.23
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 +98 -0
- package/README.md +3 -3
- package/app/index.ts +0 -6
- package/app/nymph.ts +17 -0
- package/app/src/GroupEdit.svelte +4 -3
- package/app/src/Groups.svelte +3 -2
- package/app/src/UserEdit.svelte +1 -1
- package/app/src/Users.svelte +3 -2
- 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 -15
- package/dist/app/index.js.map +1 -1
- package/dist/app/smui.css +13 -1
- package/dist/index.js +1 -1
- package/package.json +46 -45
- package/src/index.ts +1 -1
- package/test.mjs +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,104 @@
|
|
|
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-alpha.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2021-12-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
9
|
+
|
|
10
|
+
# [1.0.0-alpha.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2021-12-14)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- update smui to latest versions ([912873b](https://github.com/sciactive/nymphjs/commit/912873b863d1ae5d51c359a3c0558bff38ce85cd))
|
|
15
|
+
|
|
16
|
+
# [1.0.0-alpha.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2021-11-29)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
19
|
+
|
|
20
|
+
# [1.0.0-alpha.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2021-11-24)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- update smui to latest versions ([73ab4e8](https://github.com/sciactive/nymphjs/commit/73ab4e843623c25dc2efeb3c4b2cdd91237018b8))
|
|
25
|
+
|
|
26
|
+
# [1.0.0-alpha.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2021-11-18)
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
- update smui and other packages to latest versions ([2465340](https://github.com/sciactive/nymphjs/commit/24653400d887bc04c41c3c4ee0c73ce2f2289e0d))
|
|
31
|
+
|
|
32
|
+
# [1.0.0-alpha.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2021-11-09)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
35
|
+
|
|
36
|
+
# [1.0.0-alpha.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2021-10-14)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
39
|
+
|
|
40
|
+
# [1.0.0-alpha.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2021-10-14)
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
- don't ignore built files in npm packages ([7d688db](https://github.com/sciactive/nymphjs/commit/7d688dbec362f1f71fb451a1d0dbcaecc15d99fc))
|
|
45
|
+
|
|
46
|
+
# [1.0.0-alpha.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2021-10-14)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
49
|
+
|
|
50
|
+
# [1.0.0-alpha.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2021-10-14)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
53
|
+
|
|
54
|
+
# [1.0.0-alpha.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2021-10-14)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
57
|
+
|
|
58
|
+
# [1.0.0-alpha.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2021-10-13)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
61
|
+
|
|
62
|
+
# [1.0.0-alpha.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2021-10-13)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
65
|
+
|
|
66
|
+
# [1.0.0-alpha.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2021-10-12)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
69
|
+
|
|
70
|
+
# [1.0.0-alpha.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2021-10-12)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
73
|
+
|
|
74
|
+
# [1.0.0-alpha.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2021-10-12)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
77
|
+
|
|
78
|
+
# [1.0.0-alpha.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2021-10-05)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
81
|
+
|
|
82
|
+
# [1.0.0-alpha.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2021-10-05)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
85
|
+
|
|
86
|
+
# [1.0.0-alpha.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2021-09-30)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @nymphjs/tilmeld-setup
|
|
89
|
+
|
|
90
|
+
# [1.0.0-alpha.4](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2021-09-27)
|
|
91
|
+
|
|
92
|
+
### Features
|
|
93
|
+
|
|
94
|
+
- gate UIDs on Tilmeld with config and abilities ([99a9141](https://github.com/sciactive/nymphjs/commit/99a9141cc92fe3d1ad68d21e42de4e9b5493e4d9))
|
|
95
|
+
- use new instances of nymph for server and pubsub requests ([0c18fab](https://github.com/sciactive/nymphjs/commit/0c18faba2b55fe82c16806d221fc54d2cd42c992))
|
|
96
|
+
|
|
97
|
+
# [1.0.0-alpha.3](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2021-09-22)
|
|
98
|
+
|
|
99
|
+
### Features
|
|
100
|
+
|
|
101
|
+
- migrate Tilmeld Client to new instance based Nymph Client ([dffe83b](https://github.com/sciactive/nymphjs/commit/dffe83b3900171a56d703cd491536b5d21360198))
|
|
102
|
+
- move to fully instance based design, no more globals ([c036220](https://github.com/sciactive/nymphjs/commit/c0362209b90a475b8b85269a829b0ec6bed4465f))
|
|
103
|
+
|
|
6
104
|
# [1.0.0-alpha.2](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2021-09-21)
|
|
7
105
|
|
|
8
106
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -21,8 +21,8 @@ For this example, I'll use the SQLite3 driver with an in-memory database.
|
|
|
21
21
|
```ts
|
|
22
22
|
import express from 'express';
|
|
23
23
|
import SQLite3Driver from '@nymphjs/driver-sqlite3';
|
|
24
|
-
import
|
|
25
|
-
import Tilmeld from '@nymphjs/tilmeld';
|
|
24
|
+
import { Nymph } from '@nymphjs/nymph';
|
|
25
|
+
import { Tilmeld } from '@nymphjs/tilmeld';
|
|
26
26
|
import createServer from '@nymphjs/server';
|
|
27
27
|
import setup from '@nymphjs/tilmeld-setup';
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ import setup from '@nymphjs/tilmeld-setup';
|
|
|
30
30
|
import './entities/MyEntity';
|
|
31
31
|
|
|
32
32
|
// Configure Nymph.
|
|
33
|
-
nymph
|
|
33
|
+
const nymph = new Nymph(
|
|
34
34
|
{},
|
|
35
35
|
new SQLite3Driver({
|
|
36
36
|
filename: ':memory:',
|
package/app/index.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { Nymph, Entity } from '@nymphjs/client';
|
|
2
|
-
import { User, Group } from '@nymphjs/tilmeld-client';
|
|
3
1
|
import App from './src/App.svelte';
|
|
4
2
|
|
|
5
3
|
const app = new App({ target: document.getElementById('app') as HTMLElement });
|
|
6
4
|
|
|
7
5
|
// Helps with admin and debugging.
|
|
8
|
-
(window as any).Nymph = Nymph;
|
|
9
|
-
(window as any).Entity = Entity;
|
|
10
|
-
(window as any).User = User;
|
|
11
|
-
(window as any).Group = Group;
|
|
12
6
|
(window as any).app = app;
|
package/app/nymph.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NymphOptions } from '@nymphjs/client';
|
|
2
|
+
import { Entity, Nymph } from '@nymphjs/client';
|
|
3
|
+
import { User, Group } from '@nymphjs/tilmeld-client';
|
|
4
|
+
|
|
5
|
+
const nymph = new Nymph(
|
|
6
|
+
(window as unknown as { nymphOptions: NymphOptions }).nymphOptions
|
|
7
|
+
);
|
|
8
|
+
nymph.addEntityClass(User);
|
|
9
|
+
nymph.addEntityClass(Group);
|
|
10
|
+
|
|
11
|
+
export default nymph;
|
|
12
|
+
|
|
13
|
+
// Helps with admin and debugging.
|
|
14
|
+
(window as any).Entity = Entity;
|
|
15
|
+
(window as any).User = User;
|
|
16
|
+
(window as any).Group = Group;
|
|
17
|
+
(window as any).nymph = nymph;
|
package/app/src/GroupEdit.svelte
CHANGED
|
@@ -327,7 +327,6 @@
|
|
|
327
327
|
|
|
328
328
|
<script lang="ts">
|
|
329
329
|
import { createEventDispatcher, onMount } from 'svelte';
|
|
330
|
-
import { Nymph } from '@nymphjs/client';
|
|
331
330
|
import {
|
|
332
331
|
AdminGroupData,
|
|
333
332
|
ClientConfig,
|
|
@@ -353,12 +352,14 @@
|
|
|
353
352
|
import Paper from '@smui/paper';
|
|
354
353
|
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
|
|
355
354
|
import Textfield, { Input } from '@smui/textfield';
|
|
356
|
-
import HelperText from '@smui/textfield/helper-text
|
|
355
|
+
import HelperText from '@smui/textfield/helper-text';
|
|
357
356
|
import IconButton from '@smui/icon-button';
|
|
358
357
|
import Button from '@smui/button';
|
|
359
358
|
import { Icon, Label } from '@smui/common';
|
|
360
359
|
import { Svg } from '@smui/common/elements';
|
|
361
360
|
|
|
361
|
+
import nymph from '../nymph';
|
|
362
|
+
|
|
362
363
|
const dispatch = createEventDispatcher();
|
|
363
364
|
|
|
364
365
|
export let entity: Group & AdminGroupData;
|
|
@@ -448,7 +449,7 @@
|
|
|
448
449
|
},
|
|
449
450
|
}
|
|
450
451
|
);
|
|
451
|
-
parents = (await
|
|
452
|
+
parents = (await nymph.getEntities(...query)).filter((group) => {
|
|
452
453
|
return !group.$is(entity) && !group.$is(entity.parent);
|
|
453
454
|
});
|
|
454
455
|
} catch (e: any) {
|
package/app/src/Groups.svelte
CHANGED
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
|
|
91
91
|
<script lang="ts">
|
|
92
92
|
import { onMount } from 'svelte';
|
|
93
|
-
import { Nymph } from '@nymphjs/client';
|
|
94
93
|
import queryParser from '@nymphjs/query-parser';
|
|
95
94
|
import {
|
|
96
95
|
AdminGroupData,
|
|
@@ -108,6 +107,8 @@
|
|
|
108
107
|
import { Icon } from '@smui/common';
|
|
109
108
|
import { Svg } from '@smui/common/elements';
|
|
110
109
|
|
|
110
|
+
import nymph from '../nymph';
|
|
111
|
+
|
|
111
112
|
import GroupEdit from './GroupEdit.svelte';
|
|
112
113
|
|
|
113
114
|
let clientConfig: ClientConfig | undefined = undefined;
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
},
|
|
146
147
|
}
|
|
147
148
|
);
|
|
148
|
-
entities = await
|
|
149
|
+
entities = await nymph.getEntities(...query);
|
|
149
150
|
} catch (e: any) {
|
|
150
151
|
failureMessage = e?.message;
|
|
151
152
|
}
|
package/app/src/UserEdit.svelte
CHANGED
|
@@ -588,7 +588,7 @@
|
|
|
588
588
|
import Paper from '@smui/paper';
|
|
589
589
|
import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
|
|
590
590
|
import Textfield, { Input } from '@smui/textfield';
|
|
591
|
-
import HelperText from '@smui/textfield/helper-text
|
|
591
|
+
import HelperText from '@smui/textfield/helper-text';
|
|
592
592
|
import IconButton from '@smui/icon-button';
|
|
593
593
|
import Button from '@smui/button';
|
|
594
594
|
import { Icon, Label } from '@smui/common';
|
package/app/src/Users.svelte
CHANGED
|
@@ -90,7 +90,6 @@
|
|
|
90
90
|
|
|
91
91
|
<script lang="ts">
|
|
92
92
|
import { onMount } from 'svelte';
|
|
93
|
-
import { Nymph } from '@nymphjs/client';
|
|
94
93
|
import queryParser from '@nymphjs/query-parser';
|
|
95
94
|
import {
|
|
96
95
|
AdminUserData,
|
|
@@ -108,6 +107,8 @@
|
|
|
108
107
|
import { Icon } from '@smui/common';
|
|
109
108
|
import { Svg } from '@smui/common/elements';
|
|
110
109
|
|
|
110
|
+
import nymph from '../nymph';
|
|
111
|
+
|
|
111
112
|
import UserEdit from './UserEdit.svelte';
|
|
112
113
|
|
|
113
114
|
let clientConfig: ClientConfig | undefined = undefined;
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
},
|
|
146
147
|
}
|
|
147
148
|
);
|
|
148
|
-
entities = await
|
|
149
|
+
entities = await nymph.getEntities(...query);
|
|
149
150
|
} catch (e: any) {
|
|
150
151
|
failureMessage = e?.message;
|
|
151
152
|
}
|
package/app/theme/_helpers.scss
CHANGED