@genesislcap/foundation-auth 14.136.0 → 14.137.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/README.md +6 -33
- package/dist/dts/config/config.d.ts.map +1 -1
- package/dist/dts/entity/loginAck.d.ts +20 -25
- package/dist/dts/entity/loginAck.d.ts.map +1 -1
- package/dist/dts/machine/machine.d.ts +2 -2
- package/dist/dts/machine/machine.d.ts.map +1 -1
- package/dist/dts/machine/types.d.ts +1 -1
- package/dist/dts/machine/types.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +13 -7
- package/dist/dts/routes/base.d.ts.map +1 -1
- package/dist/dts/routes/config.d.ts +1 -1
- package/dist/dts/routes/config.d.ts.map +1 -1
- package/dist/dts/routes/protected/protected.d.ts +2 -0
- package/dist/dts/routes/protected/protected.d.ts.map +1 -1
- package/dist/dts/routes/protected/protected.template.d.ts.map +1 -1
- package/dist/dts/user/index.d.ts +5 -2
- package/dist/dts/user/index.d.ts.map +1 -1
- package/dist/esm/config/config.js +1 -1
- package/dist/esm/machine/machine.js +2 -2
- package/dist/esm/routes/base.js +1 -1
- package/dist/esm/routes/config.js +1 -1
- package/dist/esm/routes/protected/protected.js +11 -1
- package/dist/esm/routes/protected/protected.template.js +8 -0
- package/dist/esm/user/index.js +5 -2
- package/dist/foundation-auth.api.json +2704 -5197
- package/dist/foundation-auth.d.ts +42 -287
- package/docs/api/foundation-auth.authmachinecontext.md +1 -1
- package/docs/api/foundation-auth.defaultauthmachine._constructor_.md +1 -1
- package/docs/api/foundation-auth.details.md +6 -13
- package/docs/api/foundation-auth.getauthmachine.md +1 -1
- package/docs/api/foundation-auth.loginack.md +2 -16
- package/docs/api/foundation-auth.md +0 -9
- package/docs/api/foundation-auth.product.md +6 -8
- package/docs/api/foundation-auth.system.md +6 -7
- package/docs/api-report.md +29 -218
- package/package.json +13 -12
- package/dist/dts/user/config.d.ts +0 -29
- package/dist/dts/user/config.d.ts.map +0 -1
- package/dist/dts/user/user.d.ts +0 -233
- package/dist/dts/user/user.d.ts.map +0 -1
- package/dist/esm/user/config.js +0 -17
- package/dist/esm/user/user.js +0 -200
- package/docs/api/foundation-auth.defaultuser.actionhistory.md +0 -13
- package/docs/api/foundation-auth.defaultuser.addauthenticationchangelistener.md +0 -22
- package/docs/api/foundation-auth.defaultuser.clearactions.md +0 -17
- package/docs/api/foundation-auth.defaultuser.clearpaths.md +0 -17
- package/docs/api/foundation-auth.defaultuser.cleartrackinghistory.md +0 -16
- package/docs/api/foundation-auth.defaultuser.details.md +0 -12
- package/docs/api/foundation-auth.defaultuser.haspermission.md +0 -22
- package/docs/api/foundation-auth.defaultuser.hasprofile.md +0 -22
- package/docs/api/foundation-auth.defaultuser.isadmin.md +0 -16
- package/docs/api/foundation-auth.defaultuser.isanonymous.md +0 -12
- package/docs/api/foundation-auth.defaultuser.isauthenticated.md +0 -12
- package/docs/api/foundation-auth.defaultuser.isbanned.md +0 -16
- package/docs/api/foundation-auth.defaultuser.lastaction.md +0 -17
- package/docs/api/foundation-auth.defaultuser.lastpath.md +0 -19
- package/docs/api/foundation-auth.defaultuser.md +0 -50
- package/docs/api/foundation-auth.defaultuser.pathhistory.md +0 -13
- package/docs/api/foundation-auth.defaultuser.permission.md +0 -12
- package/docs/api/foundation-auth.defaultuser.profile.md +0 -12
- package/docs/api/foundation-auth.defaultuser.set.md +0 -22
- package/docs/api/foundation-auth.defaultuser.sourceref.md +0 -12
- package/docs/api/foundation-auth.defaultuser.trackaction.md +0 -24
- package/docs/api/foundation-auth.defaultuser.trackpath.md +0 -17
- package/docs/api/foundation-auth.defaultuser.unset.md +0 -16
- package/docs/api/foundation-auth.defaultuser.userkvs.md +0 -14
- package/docs/api/foundation-auth.defaultuser.username.md +0 -12
- package/docs/api/foundation-auth.defaultuserconfig.md +0 -13
- package/docs/api/foundation-auth.details.daystopasswordexpiry.md +0 -11
- package/docs/api/foundation-auth.details.failedloginattempts.md +0 -11
- package/docs/api/foundation-auth.details.heartbeatintervalsecs.md +0 -11
- package/docs/api/foundation-auth.details.lastlogindatetime.md +0 -11
- package/docs/api/foundation-auth.details.product.md +0 -11
- package/docs/api/foundation-auth.details.rejectedloginattempts.md +0 -11
- package/docs/api/foundation-auth.details.system.md +0 -11
- package/docs/api/foundation-auth.getuser.md +0 -30
- package/docs/api/foundation-auth.loginack.details.md +0 -11
- package/docs/api/foundation-auth.loginack.permission.md +0 -11
- package/docs/api/foundation-auth.loginack.profile.md +0 -11
- package/docs/api/foundation-auth.loginack.updatequeue.md +0 -11
- package/docs/api/foundation-auth.loginack.userkvs.md +0 -13
- package/docs/api/foundation-auth.loginack.username.md +0 -11
- package/docs/api/foundation-auth.loginack.zeromqproxyinboundport.md +0 -11
- package/docs/api/foundation-auth.loginack.zeromqproxymodeenabled.md +0 -11
- package/docs/api/foundation-auth.loginack.zeromqproxyoutboundport.md +0 -11
- package/docs/api/foundation-auth.product.name.md +0 -11
- package/docs/api/foundation-auth.product.version.md +0 -11
- package/docs/api/foundation-auth.system.date.md +0 -11
- package/docs/api/foundation-auth.user.addauthenticationchangelistener.md +0 -33
- package/docs/api/foundation-auth.user.cleartrackinghistory.md +0 -15
- package/docs/api/foundation-auth.user.details.md +0 -11
- package/docs/api/foundation-auth.user.haspermission.md +0 -22
- package/docs/api/foundation-auth.user.hasprofile.md +0 -22
- package/docs/api/foundation-auth.user.isadmin.md +0 -15
- package/docs/api/foundation-auth.user.isanonymous.md +0 -11
- package/docs/api/foundation-auth.user.isauthenticated.md +0 -11
- package/docs/api/foundation-auth.user.isbanned.md +0 -15
- package/docs/api/foundation-auth.user.md +0 -55
- package/docs/api/foundation-auth.user.permission.md +0 -11
- package/docs/api/foundation-auth.user.profile.md +0 -11
- package/docs/api/foundation-auth.user.set.md +0 -22
- package/docs/api/foundation-auth.user.sourceref.md +0 -11
- package/docs/api/foundation-auth.user.unset.md +0 -15
- package/docs/api/foundation-auth.user.userkvs.md +0 -13
- package/docs/api/foundation-auth.user.username.md +0 -11
- package/docs/api/foundation-auth.useractionhistory.actionhistory.md +0 -13
- package/docs/api/foundation-auth.useractionhistory.clearactions.md +0 -17
- package/docs/api/foundation-auth.useractionhistory.lastaction.md +0 -17
- package/docs/api/foundation-auth.useractionhistory.md +0 -32
- package/docs/api/foundation-auth.useractionhistory.trackaction.md +0 -24
- package/docs/api/foundation-auth.userauthenticationchangeevent.md +0 -18
- package/docs/api/foundation-auth.userauthenticationchangetype.md +0 -13
- package/docs/api/foundation-auth.userconfig.md +0 -21
- package/docs/api/foundation-auth.userconfig.trackactionexclusions.md +0 -13
- package/docs/api/foundation-auth.userconfig.trackpathexclusions.md +0 -13
- package/docs/api/foundation-auth.userpathhistory.clearpaths.md +0 -17
- package/docs/api/foundation-auth.userpathhistory.lastpath.md +0 -19
- package/docs/api/foundation-auth.userpathhistory.md +0 -32
- package/docs/api/foundation-auth.userpathhistory.pathhistory.md +0 -13
- package/docs/api/foundation-auth.userpathhistory.trackpath.md +0 -17
package/README.md
CHANGED
|
@@ -13,7 +13,6 @@ not limited to:
|
|
|
13
13
|
|
|
14
14
|
* `ZeroAuth`: A preconfigured version of the micro frontend built with the zero design system and zero components.
|
|
15
15
|
* `configure`: A customisation hook for the base micro frontend that integrates it with your design system of choice.
|
|
16
|
-
* `User`: The [user](./docs/api/foundation-auth.user.md) singleton, which always exists in either an anonymous or authenticated mode.
|
|
17
16
|
* `AuthStore`: An auth based [foundation-store](https://www.npmjs.com/package/@genesislcap/foundation-store).
|
|
18
17
|
* `AuthMachine`: An auth based [foundation-state-machine](https://www.npmjs.com/package/@genesislcap/foundation-state-machine) covering the various auth workflows.
|
|
19
18
|
* `AuthMessageMapper`: The auth message dto to entity [mapper](./src/mapper/README.md).
|
|
@@ -21,20 +20,19 @@ not limited to:
|
|
|
21
20
|
* Various UI components / route screens, some of which are lazy loaded on-demand to optimise the experience.
|
|
22
21
|
|
|
23
22
|
For applications that do not or cannot use the DI system, we export utility functions to get each from the DI container.
|
|
24
|
-
For example, `
|
|
23
|
+
For example, `getAuthStore`, `getAuthMachine`, `getAuthRouting` etc.
|
|
25
24
|
|
|
26
25
|
Many of these are available as [subpath exports](https://nodejs.org/api/packages.html#subpath-exports) and should be
|
|
27
26
|
imported from these to optimise bundling and overall efficiency.
|
|
28
27
|
|
|
29
28
|
```ts
|
|
30
29
|
import { configure } from '@genesislcap/foundation-auth/configure';
|
|
31
|
-
import { User } from '@genesislcap/foundation-auth/user';
|
|
32
30
|
import { AuthRouting } from '@genesislcap/foundation-auth/routing';
|
|
33
31
|
// note zero is on the root export
|
|
34
32
|
import { ZeroAuth } from '@genesislcap/foundation-auth';
|
|
35
33
|
```
|
|
36
34
|
|
|
37
|
-
In most cases, developers simply import
|
|
35
|
+
In most cases, developers simply import the `ZeroAuth` micro frontend, or use the `configure` export
|
|
38
36
|
token to tailor the micro frontend to their specific needs in their router config. However, developers can also use the
|
|
39
37
|
exports provided to build their own authentication frontends or workflows. A set of pre-defined custom events are used
|
|
40
38
|
to interact with the `AuthStore` and `AuthMachine`, and developers can provide custom implementations of parts of the
|
|
@@ -85,35 +83,6 @@ module.exports = {
|
|
|
85
83
|
}
|
|
86
84
|
```
|
|
87
85
|
|
|
88
|
-
### Get User reference
|
|
89
|
-
User is a singleton. You can access it via the DI container.
|
|
90
|
-
```ts
|
|
91
|
-
import { User } from '@genesislcap/foundation-auth/user';
|
|
92
|
-
...
|
|
93
|
-
@User private user: User
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
...or via a utility if your app is not using decorators or the DI container.
|
|
97
|
-
```ts
|
|
98
|
-
import { getUser } from '@genesislcap/foundation-auth/user';
|
|
99
|
-
...
|
|
100
|
-
private user = getUser();
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
User properties are decorated with `@observable`, meaning in FAST terms it's reactive, and you can bind to properties
|
|
104
|
-
directly. For example, `this.user.isAuthenticated`. However, you can also monitor the user's authentication status using
|
|
105
|
-
an event listener.
|
|
106
|
-
|
|
107
|
-
```ts
|
|
108
|
-
import type { UserAuthenticationChangeEvent } from '@genesislcap/foundation-auth/user';
|
|
109
|
-
...
|
|
110
|
-
const unsubscribeUser = this.user.addAuthenticationChangeListener((event: UserAuthenticationChangeEvent) => {
|
|
111
|
-
console.log('User authenticated?', event.detail); // < boolean === this.user.isAuthenticated
|
|
112
|
-
});
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
See the [User API Docs](./docs/api/foundation-auth.user.md) for more information.
|
|
116
|
-
|
|
117
86
|
### Set up a route to host the micro frontend
|
|
118
87
|
Here we are lazy loading the micro frontend when the route is accessed.
|
|
119
88
|
```ts
|
|
@@ -144,6 +113,10 @@ Here we are lazy loading the micro frontend when the route is accessed.
|
|
|
144
113
|
Here in our `FASTRouter`'s `NavigationContributor`, we check the user status as part of the routing flow.
|
|
145
114
|
|
|
146
115
|
```ts
|
|
116
|
+
import { User } from '@genesislcap/foundation-user';
|
|
117
|
+
...
|
|
118
|
+
@User private user: User;
|
|
119
|
+
...
|
|
147
120
|
this.contributors.push({
|
|
148
121
|
navigate: async (phase) => {
|
|
149
122
|
const settings = phase.route.settings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAK9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAA0B,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtE;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;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I,CAAC;IACtB;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAwC/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,kEAAuE,CAAC"}
|
|
@@ -1,43 +1,38 @@
|
|
|
1
|
+
import type { SetUserProperties, UserDetailsProductProperty, UserDetailsProperty, UserDetailsSystemProperty } from '@genesislcap/foundation-user';
|
|
1
2
|
import type { Ack } from './ack';
|
|
2
3
|
/**
|
|
4
|
+
* @privateRemarks
|
|
5
|
+
* Export retained for backwards compatibility.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated - Use {@link @genesislcap/foundation-user#UserDetailsProperty} instead.
|
|
8
|
+
*
|
|
3
9
|
* @public
|
|
4
10
|
*/
|
|
5
|
-
export interface Details {
|
|
6
|
-
readonly system: System | null;
|
|
7
|
-
readonly heartbeatIntervalSecs: number;
|
|
8
|
-
readonly failedLoginAttempts: number;
|
|
9
|
-
readonly rejectedLoginAttempts: number;
|
|
10
|
-
readonly lastLoginDatetime: number;
|
|
11
|
-
readonly daysToPasswordExpiry: number;
|
|
12
|
-
readonly product: Product[];
|
|
11
|
+
export interface Details extends UserDetailsProperty {
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
14
|
+
* @privateRemarks
|
|
15
|
+
* Export retained for backwards compatibility.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated - Use {@link @genesislcap/foundation-user#UserDetailsSystemProperty} instead.
|
|
18
|
+
*
|
|
15
19
|
* @public
|
|
16
20
|
*/
|
|
17
|
-
export interface System {
|
|
18
|
-
readonly date: string;
|
|
21
|
+
export interface System extends UserDetailsSystemProperty {
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
24
|
+
* @privateRemarks
|
|
25
|
+
* Export retained for backwards compatibility.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated - Use {@link @genesislcap/foundation-user#UserDetailsProductProperty} instead.
|
|
28
|
+
*
|
|
21
29
|
* @public
|
|
22
30
|
*/
|
|
23
|
-
export interface Product {
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly version: string;
|
|
31
|
+
export interface Product extends UserDetailsProductProperty {
|
|
26
32
|
}
|
|
27
33
|
/**
|
|
28
34
|
* @public
|
|
29
35
|
*/
|
|
30
|
-
export interface LoginAck extends Ack {
|
|
31
|
-
readonly userName: string;
|
|
32
|
-
readonly updateQueue: string;
|
|
33
|
-
readonly zeroMqProxyModeEnabled: boolean;
|
|
34
|
-
readonly zeroMqProxyInboundPort: number;
|
|
35
|
-
readonly zeroMqProxyOutboundPort: number;
|
|
36
|
-
readonly userKVs: {
|
|
37
|
-
[key: string]: any;
|
|
38
|
-
};
|
|
39
|
-
readonly details: Details;
|
|
40
|
-
readonly permission: string[];
|
|
41
|
-
readonly profile: string[];
|
|
36
|
+
export interface LoginAck extends SetUserProperties, Ack {
|
|
42
37
|
}
|
|
43
38
|
//# sourceMappingURL=loginAck.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginAck.d.ts","sourceRoot":"","sources":["../../../src/entity/loginAck.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"loginAck.d.ts","sourceRoot":"","sources":["../../../src/entity/loginAck.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;;;;;;GAOG;AACH,MAAM,WAAW,OAAQ,SAAQ,mBAAmB;CAAG;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,MAAO,SAAQ,yBAAyB;CAAG;AAE5D;;;;;;;GAOG;AACH,MAAM,WAAW,OAAQ,SAAQ,0BAA0B;CAAG;AAE9D;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,iBAAiB,EAAE,GAAG;CAAG"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AbstractMachine, FetchMachine, FetchMachineEvent, Machine } from '@genesislcap/foundation-state-machine';
|
|
2
|
+
import { User } from '@genesislcap/foundation-user';
|
|
2
3
|
import { UUID } from '@genesislcap/foundation-utils';
|
|
3
4
|
import type { InterpreterOptions } from 'xstate';
|
|
4
5
|
import { AuthConfig } from '../config/config';
|
|
5
6
|
import { CredentialManager } from '../credential';
|
|
6
7
|
import { AuthMessageMapper } from '../mapper';
|
|
7
8
|
import { AuthRouting } from '../routes/routing';
|
|
8
|
-
import { User } from '../user';
|
|
9
9
|
import type { AuthMachineContext, AuthMachineEvent, LoginParams, QueryParams } from './types';
|
|
10
10
|
/**
|
|
11
11
|
* AuthMachine interface.
|
|
@@ -71,7 +71,7 @@ export declare const AuthMachine: import("@microsoft/fast-foundation").Interface
|
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
73
73
|
* import { getAuthMachine } from '@genesislcap/foundation-auth/machine';
|
|
74
|
-
* import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-
|
|
74
|
+
* import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-user';
|
|
75
75
|
* ...
|
|
76
76
|
* private authMachine = getAuthMachine();
|
|
77
77
|
* ...
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,YAAY,EACZ,iBAAiB,EAMjB,OAAO,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAA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E,IAAI,EACG,aAAa,EAAE,iBAAiB,EACvC,MAAM,EAAE,UAAU,EACjB,OAAO,EAAE,WAAW;IAkjB3C,KAAK,CACH,OAAO,GAAE,kBAAkB,CAAC,OAAO,IAAI,CAAC,OAAO,CAM9C;IAKH;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAIxB,SAAS,CAAC,sBAAsB,IAAI,WAAW;IAQ/C,SAAS,CAAC,+BAA+B,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAuB3E,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,iBAAiB;IAgB3E,SAAS,CAAC,YAAY;;;;;;;;;;;;;;;;;MAoBpB;IAEF,SAAS,CAAC,aAAa;;;MAGpB;CACJ;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,mEAA0E,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { MachineContext } from '@genesislcap/foundation-state-machine';
|
|
2
|
+
import type { User } from '@genesislcap/foundation-user';
|
|
2
3
|
import type { DoneInvokeEvent, ErrorEvent } from 'xstate';
|
|
3
4
|
import { Credentials } from '../credential';
|
|
4
5
|
import type { AuthDTO, AuthEntity } from '../mapper';
|
|
5
|
-
import type { User } from '../user';
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/machine/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,E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,mBAAmB,CAG/B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,IAAI,WAAW,CAGnF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { User } from '@genesislcap/foundation-user';
|
|
1
2
|
import { Binding } from '@microsoft/fast-element';
|
|
2
3
|
import { Container } from '@microsoft/fast-foundation';
|
|
3
4
|
import { AuthConfig } from '../config/config';
|
|
4
5
|
import { AuthEventMap, AuthFormEntryEventMap, AuthStore } from '../store';
|
|
5
|
-
import { User } from '../user';
|
|
6
6
|
import { AuthRouting } from './routing';
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
@@ -44,8 +44,12 @@ declare const ConfigHostElement_base: abstract new (...args: any[]) => {
|
|
|
44
44
|
translate: boolean;
|
|
45
45
|
attachInternals(): ElementInternals;
|
|
46
46
|
click(): void;
|
|
47
|
-
addEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
48
|
-
|
|
47
|
+
addEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | AddEventListenerOptions): void; /**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; /**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
49
53
|
removeEventListener<K_2 extends keyof HTMLElementEventMap>(type: K_2, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_2]) => any, options?: boolean | EventListenerOptions): void;
|
|
50
54
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
51
55
|
readonly attributes: NamedNodeMap;
|
|
@@ -124,9 +128,7 @@ declare const ConfigHostElement_base: abstract new (...args: any[]) => {
|
|
|
124
128
|
readonly lastChild: ChildNode;
|
|
125
129
|
readonly nextSibling: ChildNode;
|
|
126
130
|
readonly nodeName: string;
|
|
127
|
-
readonly nodeType: number;
|
|
128
|
-
* @internal
|
|
129
|
-
*/
|
|
131
|
+
readonly nodeType: number;
|
|
130
132
|
nodeValue: string;
|
|
131
133
|
readonly parentElement: HTMLElement;
|
|
132
134
|
readonly parentNode: ParentNode;
|
|
@@ -150,7 +152,11 @@ declare const ConfigHostElement_base: abstract new (...args: any[]) => {
|
|
|
150
152
|
readonly ATTRIBUTE_NODE: number;
|
|
151
153
|
readonly CDATA_SECTION_NODE: number;
|
|
152
154
|
readonly COMMENT_NODE: number;
|
|
153
|
-
readonly DOCUMENT_FRAGMENT_NODE: number;
|
|
155
|
+
readonly DOCUMENT_FRAGMENT_NODE: number; /**
|
|
156
|
+
* @internal
|
|
157
|
+
* @privateRemarks
|
|
158
|
+
* Temp optimisation. How we handle images like this needs a broader review.
|
|
159
|
+
*/
|
|
154
160
|
readonly DOCUMENT_NODE: number;
|
|
155
161
|
readonly DOCUMENT_POSITION_CONTAINED_BY: number;
|
|
156
162
|
readonly DOCUMENT_POSITION_CONTAINS: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/routes/base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/routes/base.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGpD,OAAO,EAEL,OAAO,EAQR,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAqB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CA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;AACH,eAAO,MAAM,cAAc,8BAA+B,KAAK,GAAG,cAAc,2DAgB/E,CAAC;AA0GF;;GAEG;AACH,eAAO,MAAM,UAAU,kCAAmC,OAAO,2DAUhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,gCAChB,MAAM,eACD,MAAM,aACR,OAAO,2DAWlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,mFASjC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { User } from '@genesislcap/foundation-user';
|
|
1
2
|
import { Constructable } from '@microsoft/fast-element';
|
|
2
3
|
import { Container } from '@microsoft/fast-foundation';
|
|
3
4
|
import { RouterConfiguration } from '@microsoft/fast-router';
|
|
4
5
|
import { AuthConfig } from '../config/config';
|
|
5
|
-
import { User } from '../user';
|
|
6
6
|
import { AuthRouting } from './routing';
|
|
7
7
|
import type { Settings } from './types';
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAA2B,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAA2B,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAEzD,OAAO,CAAC,IAAI;IACP,OAAO,CAAC,SAAS;IAChB,OAAO,CAAC,UAAU;IACjB,OAAO,CAAC,WAAW;gBAHlB,IAAI,EAAE,IAAI,EACL,SAAS,EAAE,SAAS,EACnB,UAAU,EAAE,UAAU,EACrB,WAAW,EAAE,WAAW;IAK/C,SAAS;IAgIT,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;CAGxC"}
|
|
@@ -9,6 +9,8 @@ export declare class Protected extends BaseRoute {
|
|
|
9
9
|
onLogout(): void;
|
|
10
10
|
onOpenSocketTest(): void;
|
|
11
11
|
onCloseSocketTest(): void;
|
|
12
|
+
onSnapshotSocketTest(): void;
|
|
12
13
|
get isSocketOpen(): boolean;
|
|
14
|
+
protected allCounterParties(): Promise<void>;
|
|
13
15
|
}
|
|
14
16
|
//# sourceMappingURL=protected.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protected.d.ts","sourceRoot":"","sources":["../../../../src/routes/protected/protected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"protected.d.ts","sourceRoot":"","sources":["../../../../src/routes/protected/protected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAKxD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC;;;GAGG;AACH,qBAKa,SAAU,SAAQ,SAAS;IAC7B,OAAO,EAAG,OAAO,CAAC;IAE3B,QAAQ;IAIR,gBAAgB;IAIhB,iBAAiB;IAIjB,oBAAoB;IAIpB,IAAI,YAAY,YAEf;cAEe,iBAAiB;CAIlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protected.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/protected/protected.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"protected.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/protected/protected.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,gEAmC7B,CAAC"}
|
package/dist/dts/user/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @privateRemarks
|
|
3
|
+
* Retained for backwards compatibility.
|
|
4
|
+
*/
|
|
5
|
+
export { defaultUserConfig, DefaultUser, getUser, User, UserActionHistory, UserAuthenticationChangeEvent, UserAuthenticationChangeType, UserConfig, UserPathHistory, } from '@genesislcap/foundation-user';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/user/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,IAAI,EACJ,iBAAiB,EACjB,6BAA6B,EAC7B,4BAA4B,EAC5B,UAAU,EACV,eAAe,GAChB,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { getUser } from '@genesislcap/foundation-user';
|
|
1
2
|
import { css } from '@microsoft/fast-element';
|
|
2
3
|
import { DI } from '@microsoft/fast-foundation';
|
|
3
4
|
import { Route } from '@microsoft/fast-router';
|
|
4
5
|
import defaultBackgroundSrc from '../assets/bg.jpg';
|
|
5
6
|
import defaultLogoSrc from '../assets/genesis-logo-light.svg';
|
|
6
7
|
import { navigateTo } from '../routes/utils';
|
|
7
|
-
import { getUser } from '../user/user';
|
|
8
8
|
import { defaultTemplateOptions } from './templates';
|
|
9
9
|
/**
|
|
10
10
|
* Default AuthConfig DI implementation.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __param } from "tslib";
|
|
2
2
|
import { AbstractMachine, createErrorStateNode, FetchMachine, isDoneInvokeEvent, isErrorEvent, isEventWithParams, isUnauthorizedError, } from '@genesislcap/foundation-state-machine';
|
|
3
|
+
import { User } from '@genesislcap/foundation-user';
|
|
3
4
|
import { UUID } from '@genesislcap/foundation-utils';
|
|
4
5
|
import { DI } from '@microsoft/fast-foundation';
|
|
5
6
|
import { and, assign, createMachine, fromPromise, not, or, raise, sendTo } from 'xstate';
|
|
@@ -9,7 +10,6 @@ import { MESSAGE_TYPE } from '../dto';
|
|
|
9
10
|
import { LOGIN_DETAILS_URL, LOGIN_URL, LOGOUT_URL, FORGOT_PASSWORD_URL, CHANGE_PASSWORD_URL, RESET_PASSWORD_URL, } from '../env';
|
|
10
11
|
import { AuthMessageMapper, createHTTPHeadersFromDTO, isLoginAckEntity, isLoginDetailsAckEntity, isLoginNackEntity, isLogoutAckEntity, isLogoutNackEntity, isNackDTO, } from '../mapper';
|
|
11
12
|
import { AuthRouting } from '../routes/routing';
|
|
12
|
-
import { User } from '../user';
|
|
13
13
|
import { logger } from '../utils';
|
|
14
14
|
import { setError } from './actions';
|
|
15
15
|
import { defaultAuthMachineContext, isLoginParams, isQueryParams } from './types';
|
|
@@ -675,7 +675,7 @@ export const AuthMachine = DI.createInterface((x) => x.singleton(DefaultAuthMach
|
|
|
675
675
|
* @example
|
|
676
676
|
* ```ts
|
|
677
677
|
* import { getAuthMachine } from '@genesislcap/foundation-auth/machine';
|
|
678
|
-
* import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-
|
|
678
|
+
* import { getUser, UserAuthenticationChangeEvent } from '@genesislcap/foundation-user';
|
|
679
679
|
* ...
|
|
680
680
|
* private authMachine = getAuthMachine();
|
|
681
681
|
* ...
|
package/dist/esm/routes/base.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { createInputEmitter, createSelectEmitter, EventEmitter, targetChecked, } from '@genesislcap/foundation-events';
|
|
3
|
+
import { User } from '@genesislcap/foundation-user';
|
|
3
4
|
import { toElementStyles } from '@genesislcap/foundation-utils';
|
|
4
5
|
import { SecondaryRapidColorHEX } from '@genesislcap/foundation-zero';
|
|
5
6
|
import { attr, css, customElement, FASTElement, html, observable, when, } from '@microsoft/fast-element';
|
|
@@ -8,7 +9,6 @@ import { classNames } from '@microsoft/fast-web-utilities';
|
|
|
8
9
|
import { AuthConfig, defaultAuthConfig } from '../config/config';
|
|
9
10
|
import { AuthStore } from '../store';
|
|
10
11
|
import { buttonTag, checkboxTag, progressRingTag, textFieldTag } from '../tags';
|
|
11
|
-
import { User } from '../user';
|
|
12
12
|
import { AuthRouting } from './routing';
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __param } from "tslib";
|
|
2
|
+
import { User } from '@genesislcap/foundation-user';
|
|
2
3
|
import { Container } from '@microsoft/fast-foundation';
|
|
3
4
|
import { RouterConfiguration, Route } from '@microsoft/fast-router';
|
|
4
5
|
import { AuthConfig } from '../config/config';
|
|
5
6
|
import { defaultLayout } from '../layouts';
|
|
6
|
-
import { User } from '../user';
|
|
7
7
|
import { logger } from '../utils';
|
|
8
8
|
import { ForgotPassword } from './forgot-password/forgot-password';
|
|
9
9
|
import { Login } from './login/login';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
1
|
+
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { API_HOST } from '@genesislcap/foundation-utils';
|
|
4
4
|
import { customElement } from '@microsoft/fast-element';
|
|
5
5
|
import { commonStyles } from '../../styles';
|
|
6
|
+
import { logger } from '../../utils';
|
|
6
7
|
import { BaseRoute } from '../base';
|
|
7
8
|
import { ProtectedTemplate as template } from './protected.template';
|
|
8
9
|
/**
|
|
@@ -19,9 +20,18 @@ let Protected = class Protected extends BaseRoute {
|
|
|
19
20
|
onCloseSocketTest() {
|
|
20
21
|
this.connect.disconnect();
|
|
21
22
|
}
|
|
23
|
+
onSnapshotSocketTest() {
|
|
24
|
+
this.allCounterParties();
|
|
25
|
+
}
|
|
22
26
|
get isSocketOpen() {
|
|
23
27
|
return this.connect.isConnected;
|
|
24
28
|
}
|
|
29
|
+
allCounterParties() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const allTemporaryCounterparties = yield this.connect.snapshot('ALL_COUNTERPARTYS');
|
|
32
|
+
logger.debug(allTemporaryCounterparties);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
25
35
|
};
|
|
26
36
|
__decorate([
|
|
27
37
|
Connect
|
|
@@ -30,5 +30,13 @@ export const ProtectedTemplate = html `
|
|
|
30
30
|
>
|
|
31
31
|
Close Socket
|
|
32
32
|
</${buttonTag}>
|
|
33
|
+
<${buttonTag}
|
|
34
|
+
type="button"
|
|
35
|
+
@click=${(x) => x.onSnapshotSocketTest()}
|
|
36
|
+
?disabled=${(x) => !x.isSocketOpen}
|
|
37
|
+
data-test-id="snapshot-socket"
|
|
38
|
+
>
|
|
39
|
+
Snapshot Socket
|
|
40
|
+
</${buttonTag}>
|
|
33
41
|
</div>
|
|
34
42
|
`;
|
package/dist/esm/user/index.js
CHANGED