@nymphjs/tilmeld-setup 1.0.0-alpha.2 → 1.0.0-alpha.20

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,90 @@
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.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2021-11-24)
7
+
8
+ ### Features
9
+
10
+ - update smui to latest versions ([73ab4e8](https://github.com/sciactive/nymphjs/commit/73ab4e843623c25dc2efeb3c4b2cdd91237018b8))
11
+
12
+ # [1.0.0-alpha.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2021-11-18)
13
+
14
+ ### Features
15
+
16
+ - update smui and other packages to latest versions ([2465340](https://github.com/sciactive/nymphjs/commit/24653400d887bc04c41c3c4ee0c73ce2f2289e0d))
17
+
18
+ # [1.0.0-alpha.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2021-11-09)
19
+
20
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
21
+
22
+ # [1.0.0-alpha.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2021-10-14)
23
+
24
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
25
+
26
+ # [1.0.0-alpha.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2021-10-14)
27
+
28
+ ### Bug Fixes
29
+
30
+ - don't ignore built files in npm packages ([7d688db](https://github.com/sciactive/nymphjs/commit/7d688dbec362f1f71fb451a1d0dbcaecc15d99fc))
31
+
32
+ # [1.0.0-alpha.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2021-10-14)
33
+
34
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
35
+
36
+ # [1.0.0-alpha.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2021-10-14)
37
+
38
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
39
+
40
+ # [1.0.0-alpha.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2021-10-14)
41
+
42
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
43
+
44
+ # [1.0.0-alpha.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2021-10-13)
45
+
46
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
47
+
48
+ # [1.0.0-alpha.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2021-10-13)
49
+
50
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
51
+
52
+ # [1.0.0-alpha.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2021-10-12)
53
+
54
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
55
+
56
+ # [1.0.0-alpha.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2021-10-12)
57
+
58
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
59
+
60
+ # [1.0.0-alpha.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2021-10-12)
61
+
62
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
63
+
64
+ # [1.0.0-alpha.7](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2021-10-05)
65
+
66
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
67
+
68
+ # [1.0.0-alpha.6](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2021-10-05)
69
+
70
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
71
+
72
+ # [1.0.0-alpha.5](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2021-09-30)
73
+
74
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
75
+
76
+ # [1.0.0-alpha.4](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2021-09-27)
77
+
78
+ ### Features
79
+
80
+ - gate UIDs on Tilmeld with config and abilities ([99a9141](https://github.com/sciactive/nymphjs/commit/99a9141cc92fe3d1ad68d21e42de4e9b5493e4d9))
81
+ - use new instances of nymph for server and pubsub requests ([0c18fab](https://github.com/sciactive/nymphjs/commit/0c18faba2b55fe82c16806d221fc54d2cd42c992))
82
+
83
+ # [1.0.0-alpha.3](https://github.com/sciactive/nymphjs/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2021-09-22)
84
+
85
+ ### Features
86
+
87
+ - migrate Tilmeld Client to new instance based Nymph Client ([dffe83b](https://github.com/sciactive/nymphjs/commit/dffe83b3900171a56d703cd491536b5d21360198))
88
+ - move to fully instance based design, no more globals ([c036220](https://github.com/sciactive/nymphjs/commit/c0362209b90a475b8b85269a829b0ec6bed4465f))
89
+
6
90
  # [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
91
 
8
92
  ### 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 nymph from '@nymphjs/nymph';
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.init(
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,16 @@
1
+ import { Entity, Nymph, NymphOptions } from '@nymphjs/client';
2
+ import { User, Group } from '@nymphjs/tilmeld-client';
3
+
4
+ const nymph = new Nymph(
5
+ (window as unknown as { nymphOptions: NymphOptions }).nymphOptions
6
+ );
7
+ nymph.addEntityClass(User);
8
+ nymph.addEntityClass(Group);
9
+
10
+ export default nymph;
11
+
12
+ // Helps with admin and debugging.
13
+ (window as any).Entity = Entity;
14
+ (window as any).User = User;
15
+ (window as any).Group = Group;
16
+ (window as any).nymph = nymph;
@@ -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/index';
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 Nymph.getEntities(...query)).filter((group) => {
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) {
@@ -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 Nymph.getEntities(...query);
149
+ entities = await nymph.getEntities(...query);
149
150
  } catch (e: any) {
150
151
  failureMessage = e?.message;
151
152
  }
@@ -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/index';
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';
@@ -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 Nymph.getEntities(...query);
149
+ entities = await nymph.getEntities(...query);
149
150
  } catch (e: any) {
150
151
  failureMessage = e?.message;
151
152
  }
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  @function px-to-rem($px) {
2
- @return $px / 16px * 1rem;
4
+ @return math.div($px, 16px) * 1rem;
3
5
  }