@genesislcap/foundation-login 10.3.1 → 11.3.1
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 +28 -72
- package/dist/dts/main/config.d.ts +13 -0
- package/dist/dts/main/config.d.ts.map +1 -1
- package/dist/dts/main/main.definition.d.ts +1 -1
- package/dist/dts/main/main.styles.d.ts +4 -1
- package/dist/dts/main/main.styles.d.ts.map +1 -1
- package/dist/dts/main/main.template.d.ts +1 -1
- package/dist/dts/main/main.template.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +5 -4
- 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/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/dts/routes/login-form/login-form.d.ts +7 -3
- package/dist/dts/routes/login-form/login-form.d.ts.map +1 -1
- package/dist/dts/routes/login-form/login-form.template.d.ts.map +1 -1
- package/dist/dts/routes/not-found/not-found.d.ts.map +1 -1
- package/dist/dts/routes/protected/protected.d.ts.map +1 -1
- package/dist/dts/routes/request-account/request-account.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
- package/dist/dts/routes/verify/verify.d.ts.map +1 -1
- package/dist/dts/styles/index.d.ts +0 -1
- package/dist/dts/styles/index.d.ts.map +1 -1
- package/dist/dts/styles/styles.d.ts.map +1 -1
- package/dist/dts/utils/logger.d.ts.map +1 -1
- package/dist/esm/components/components.js +0 -1
- package/dist/esm/components/index.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/layouts/default.js +0 -1
- package/dist/esm/layouts/index.js +0 -1
- package/dist/esm/main/config.js +4 -2
- package/dist/esm/main/define.js +0 -1
- package/dist/esm/main/index.js +0 -1
- package/dist/esm/main/main.definition.js +2 -3
- package/dist/esm/main/main.js +0 -1
- package/dist/esm/main/main.styles.js +5 -3
- package/dist/esm/main/main.template.js +0 -1
- package/dist/esm/routes/base.js +10 -8
- package/dist/esm/routes/config.js +5 -6
- package/dist/esm/routes/forgot-password/forgot-password.js +4 -5
- package/dist/esm/routes/forgot-password/forgot-password.template.js +0 -1
- package/dist/esm/routes/index.js +0 -1
- package/dist/esm/routes/login-form/login-form.js +38 -24
- package/dist/esm/routes/login-form/login-form.styles.js +0 -1
- package/dist/esm/routes/login-form/login-form.template.js +6 -7
- package/dist/esm/routes/not-found/not-found.js +1 -2
- package/dist/esm/routes/protected/protected.js +2 -3
- package/dist/esm/routes/protected/protected.template.js +0 -1
- package/dist/esm/routes/request-account/request-account.js +2 -3
- package/dist/esm/routes/request-account/request-account.template.js +1 -2
- package/dist/esm/routes/reset-password/reset-password.js +2 -3
- package/dist/esm/routes/reset-password/reset-password.template.js +0 -1
- package/dist/esm/routes/types.js +0 -1
- package/dist/esm/routes/verify/verify.js +2 -3
- package/dist/esm/routes/verify/verify.template.js +0 -1
- package/dist/esm/styles/index.js +0 -2
- package/dist/esm/styles/styles.js +2 -11
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/logger.js +0 -1
- package/dist/foundation-login.api.json +30 -3
- package/dist/foundation-login.d.ts +23 -6
- package/package.json +27 -11
- package/playwright.config.ts +50 -0
- package/test/README.md +3 -0
- package/dist/1.0.0.remoteEntry.js +0 -1
- package/dist/15.15.7a2c23dfae8db4e093ae.js +0 -1347
- package/dist/15.707b18d09d78e18958de7e35549b69f2.js.map +0 -1
- package/dist/170.02ecd6ffb7bb9c9531e72b7099ba0dce.js.map +0 -1
- package/dist/170.170.6ccfc6db6319d932ea16.js +0 -726
- package/dist/176.176.bfbfc60ffad852c406c4.js +0 -2
- package/dist/176.7ce7d4e386b9ebd99f2a121d6364c1ad.js.map +0 -1
- package/dist/185.185.6c3ef3df3fe6f4879dab.js +0 -2
- package/dist/185.d623d7c2df70c9d665343444e7c1fa6c.js.map +0 -1
- package/dist/338.338.e399ff6c11eb8175de4c.js +0 -2
- package/dist/338.4f68feefeaca1bf1dbc7ba12af2e84aa.js.map +0 -1
- package/dist/397.397.1de89f70cc9876b09be8.js +0 -3
- package/dist/397.397.1de89f70cc9876b09be8.js.LICENSE.txt +0 -1
- package/dist/397.984e24423ff2adb107881e130126575a.js.map +0 -1
- package/dist/419.419.25c54d30d5ef03de4733.js +0 -2140
- package/dist/419.500ae8ac8e1ffc781af411dd2ad588cd.js.map +0 -1
- package/dist/453.3c9a25d2af3ccf8232fdd1dfc5244b3d.js.map +0 -1
- package/dist/453.453.14247e88aa4df78dca2c.js +0 -2
- package/dist/726.4c7419d8edb8ba5e67699f4820c8c461.js.map +0 -1
- package/dist/726.726.e09fed9a1e3b529acd46.js +0 -3
- package/dist/726.726.e09fed9a1e3b529acd46.js.LICENSE.txt +0 -4
- package/dist/741.741.d84fc7e9236cae1acc99.js +0 -3
- package/dist/741.741.d84fc7e9236cae1acc99.js.LICENSE.txt +0 -4
- package/dist/741.a3dfed45252169e53ee396a8b76cea67.js.map +0 -1
- package/dist/b634d7e1f2324faf1230.svg +0 -10
- package/dist/c0bd2c45d93ce443d624.jpg +0 -0
- package/dist/dashboard.json +0 -1
- package/dist/dts/index.federated.d.ts +0 -1
- package/dist/dts/index.federated.d.ts.map +0 -1
- package/dist/dts/styles/typography.d.ts +0 -4
- package/dist/dts/styles/typography.d.ts.map +0 -1
- package/dist/esm/components/components.js.map +0 -1
- package/dist/esm/components/index.js.map +0 -1
- package/dist/esm/index.federated.js +0 -2
- package/dist/esm/index.federated.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/layouts/default.js.map +0 -1
- package/dist/esm/layouts/index.js.map +0 -1
- package/dist/esm/main/config.js.map +0 -1
- package/dist/esm/main/define.js.map +0 -1
- package/dist/esm/main/index.js.map +0 -1
- package/dist/esm/main/main.definition.js.map +0 -1
- package/dist/esm/main/main.js.map +0 -1
- package/dist/esm/main/main.styles.js.map +0 -1
- package/dist/esm/main/main.template.js.map +0 -1
- package/dist/esm/routes/base.js.map +0 -1
- package/dist/esm/routes/config.js.map +0 -1
- package/dist/esm/routes/forgot-password/forgot-password.js.map +0 -1
- package/dist/esm/routes/forgot-password/forgot-password.template.js.map +0 -1
- package/dist/esm/routes/index.js.map +0 -1
- package/dist/esm/routes/login-form/login-form.js.map +0 -1
- package/dist/esm/routes/login-form/login-form.styles.js.map +0 -1
- package/dist/esm/routes/login-form/login-form.template.js.map +0 -1
- package/dist/esm/routes/not-found/not-found.js.map +0 -1
- package/dist/esm/routes/protected/protected.js.map +0 -1
- package/dist/esm/routes/protected/protected.template.js.map +0 -1
- package/dist/esm/routes/request-account/request-account.js.map +0 -1
- package/dist/esm/routes/request-account/request-account.template.js.map +0 -1
- package/dist/esm/routes/reset-password/reset-password.js.map +0 -1
- package/dist/esm/routes/reset-password/reset-password.template.js.map +0 -1
- package/dist/esm/routes/types.js.map +0 -1
- package/dist/esm/routes/verify/verify.js.map +0 -1
- package/dist/esm/routes/verify/verify.template.js.map +0 -1
- package/dist/esm/styles/index.js.map +0 -1
- package/dist/esm/styles/styles.js.map +0 -1
- package/dist/esm/styles/typography.js +0 -27
- package/dist/esm/styles/typography.js.map +0 -1
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/logger.js.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/foundationLogin.dd27ce925c9e142951f9e650fb3f9b7e.js.map +0 -1
- package/dist/index.ejs +0 -23
- package/dist/index.html +0 -10
- package/dist/info.ejs +0 -13
- package/dist/info.html +0 -22
- package/dist/main.49b5ccad79942a173c5044389ff4b88b.js.map +0 -1
- package/dist/main.cf8907a8eac5d741ac98.js +0 -2
- package/dist/npm.analytics.343.1691cbc7d8a5badd3734.js +0 -2
- package/dist/npm.analytics.ce2eefcbb0dbd8ec610f4a90f48aa689.js.map +0 -1
- package/dist/npm.consola.713.661cb6ae3806c228029d.js +0 -2
- package/dist/npm.consola.96aceeeb14c801e429604b872dd754d7.js.map +0 -1
- package/dist/npm.dialog-polyfill.47.34b0c0d52e6712cf91bb.js +0 -2
- package/dist/npm.dialog-polyfill.9d605973cbc29184d8b9b4736433dddc.js.map +0 -1
- package/dist/npm.finos.690.d012d887fab1a50fd3fd.js +0 -2
- package/dist/npm.finos.bb7f5996c8be19fd2a1c0bb82b2512ef.js.map +0 -1
- package/dist/npm.fortawesome.104.f45009da0a55a389999c.js +0 -2
- package/dist/npm.fortawesome.e10775e8f8583851351996b12aec3dfb.js.map +0 -1
- package/dist/npm.microsoft.127.7781d48b93413319f199.js +0 -6406
- package/dist/npm.microsoft.127.7781d48b93413319f199.js.LICENSE.txt +0 -14
- package/dist/npm.microsoft.b0947aa2f980f173ee68c35127bf2481.js.map +0 -1
- package/dist/npm.popperjs.47700ec72e909558c6ebe29941887dcf.js.map +0 -1
- package/dist/npm.popperjs.591.6ab52bc8e177edef695a.js +0 -2
- package/dist/npm.rxjs.271.210fdd198235c86ce4cd.js +0 -2
- package/dist/npm.rxjs.36e7291df63583daef7bbafd0a3ab9dc.js.map +0 -1
- package/dist/remoteEntry.js +0 -2
- package/dist/serve.json +0 -3
- package/dist/tsdoc-metadata.json +0 -11
- package/docs/.gitattributes +0 -2
- package/docs/api/foundation-login.configure.md +0 -62
- package/docs/api/foundation-login.defaultapihost.md +0 -12
- package/docs/api/foundation-login.defaultloginconfig.md +0 -13
- package/docs/api/foundation-login.defaultorganisation.md +0 -12
- package/docs/api/foundation-login.defaultpassword.md +0 -12
- package/docs/api/foundation-login.defaultsocketext.md +0 -12
- package/docs/api/foundation-login.defaulttemplateoptions.md +0 -16
- package/docs/api/foundation-login.defaultuser.md +0 -12
- package/docs/api/foundation-login.define.md +0 -38
- package/docs/api/foundation-login.definition.md +0 -19
- package/docs/api/foundation-login.fieldconfig.md +0 -16
- package/docs/api/foundation-login.fieldconfigmap.md +0 -19
- package/docs/api/foundation-login.hostenv.md +0 -12
- package/docs/api/foundation-login.hosturl.md +0 -12
- package/docs/api/foundation-login.idp.id.md +0 -11
- package/docs/api/foundation-login.idp.md +0 -20
- package/docs/api/foundation-login.idp.type.md +0 -11
- package/docs/api/foundation-login.idpresponse.id.md +0 -11
- package/docs/api/foundation-login.idpresponse.md +0 -20
- package/docs/api/foundation-login.idpresponse.type.md +0 -11
- package/docs/api/foundation-login.ismfroute.md +0 -24
- package/docs/api/foundation-login.login.md +0 -108
- package/docs/api/foundation-login.loginconfig.autoauth.md +0 -18
- package/docs/api/foundation-login.loginconfig.autoconnect.md +0 -13
- package/docs/api/foundation-login.loginconfig.background.md +0 -30
- package/docs/api/foundation-login.loginconfig.defaultredirecturl.md +0 -18
- package/docs/api/foundation-login.loginconfig.fields.md +0 -18
- package/docs/api/foundation-login.loginconfig.logo.md +0 -28
- package/docs/api/foundation-login.loginconfig.md +0 -30
- package/docs/api/foundation-login.loginconfig.omitredirecturls.md +0 -21
- package/docs/api/foundation-login.loginconfig.omitroutes.md +0 -25
- package/docs/api/foundation-login.loginconfig.showconnectionindicator.md +0 -13
- package/docs/api/foundation-login.loginconfig.sso.md +0 -18
- package/docs/api/foundation-login.loginconfig.versioninformation.md +0 -25
- package/docs/api/foundation-login.loginhosted.md +0 -23
- package/docs/api/foundation-login.loginhosted.registercommoncomponents.md +0 -18
- package/docs/api/foundation-login.md +0 -59
- package/docs/api/foundation-login.routes.md +0 -20
- package/docs/api/foundation-login.settings.md +0 -20
- package/docs/api/foundation-login.ssoconfig.md +0 -15
- package/docs/api/foundation-login.styles.md +0 -12
- package/docs/api/foundation-login.template.md +0 -12
- package/docs/api/foundation-login.templatecomponents.md +0 -25
- package/docs/api/foundation-login.templateoptions.md +0 -19
- package/docs/api/index.md +0 -12
- package/docs/api-report.md +0 -380
- package/docs/img/foundation-login_change-password.png +0 -0
- package/docs/img/foundation-login_forgotten-password.png +0 -0
- package/docs/img/foundation-login_login-sso.png +0 -0
- package/docs/img/foundation-login_login-standard.png +0 -0
- package/docs/img/foundation-login_request-account.png +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __param } from "tslib";
|
|
2
|
+
import { Auth, Session, FoundationAnalytics, FoundationAnalyticsEventType, } from '@genesislcap/foundation-comms';
|
|
2
3
|
import { Container, optional } from '@microsoft/fast-foundation';
|
|
3
4
|
import { RouterConfiguration, Route } from '@microsoft/fast-router';
|
|
4
|
-
import { Auth, Session, FoundationAnalytics, FoundationAnalyticsEventType, } from '@genesislcap/foundation-comms';
|
|
5
5
|
import { defaultLayout } from '../layouts';
|
|
6
|
-
import {
|
|
6
|
+
import { defaultLoginConfig, LoginConfig } from '../main';
|
|
7
7
|
import { ForgotPassword } from './forgot-password/forgot-password';
|
|
8
|
+
import { LoginForm } from './login-form/login-form';
|
|
8
9
|
import { NotFound } from './not-found/not-found';
|
|
9
|
-
import { RequestAccount } from './request-account/request-account';
|
|
10
|
-
import { Verify } from './verify/verify';
|
|
11
10
|
import { Protected } from './protected/protected';
|
|
11
|
+
import { RequestAccount } from './request-account/request-account';
|
|
12
12
|
import { ResetPassword } from './reset-password/reset-password';
|
|
13
|
-
import {
|
|
13
|
+
import { Verify } from './verify/verify';
|
|
14
14
|
/**
|
|
15
15
|
* Base implementation of a routing used with the Login class
|
|
16
16
|
*
|
|
@@ -166,4 +166,3 @@ MainRouterConfig = __decorate([
|
|
|
166
166
|
__param(4, optional(LoginConfig))
|
|
167
167
|
], MainRouterConfig);
|
|
168
168
|
export { MainRouterConfig };
|
|
169
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { customElement } from '@microsoft/fast-element';
|
|
3
|
-
import {
|
|
3
|
+
import { hostEnv } from '../../main/config';
|
|
4
4
|
import { commonLoginRouteStyles } from '../../styles';
|
|
5
|
-
import { ForgotPasswordTemplate as template } from './forgot-password.template';
|
|
6
5
|
import { logger } from '../../utils';
|
|
7
|
-
import {
|
|
6
|
+
import { BaseRoute } from '../base';
|
|
7
|
+
import { ForgotPasswordTemplate as template } from './forgot-password.template';
|
|
8
8
|
let ForgotPassword = class ForgotPassword extends BaseRoute {
|
|
9
9
|
connectedCallback() {
|
|
10
10
|
const _super = Object.create(null, {
|
|
@@ -25,7 +25,7 @@ let ForgotPassword = class ForgotPassword extends BaseRoute {
|
|
|
25
25
|
/**
|
|
26
26
|
* Example url from email: https://public-foundation.genesislab.global/reset-password?password=nc_cbGrlgCkZeJHAF043oqEidnk
|
|
27
27
|
*/
|
|
28
|
-
const returnUrl = `${location.protocol}//${hostEnv}
|
|
28
|
+
const returnUrl = `${location.protocol}//${hostEnv}/${this.getSubRoutePath('reset-password')}`;
|
|
29
29
|
const message = this.messageBuilder.createForgotPasswordMessage(this.orgUsername, returnUrl);
|
|
30
30
|
yield this.sendMessage(message, 'Please check your inbox for reset instructions.');
|
|
31
31
|
});
|
|
@@ -39,4 +39,3 @@ ForgotPassword = __decorate([
|
|
|
39
39
|
})
|
|
40
40
|
], ForgotPassword);
|
|
41
41
|
export { ForgotPassword };
|
|
42
|
-
//# sourceMappingURL=forgot-password.js.map
|
package/dist/esm/routes/index.js
CHANGED
|
@@ -4,24 +4,20 @@ import { inIFrame, inSymphonyDesktop, openPopup } from '@genesislcap/foundation-
|
|
|
4
4
|
import { customElement, DOM, observable, volatile } from '@microsoft/fast-element';
|
|
5
5
|
import { Route } from '@microsoft/fast-router';
|
|
6
6
|
import { logger } from '../../utils';
|
|
7
|
+
import { BaseRoute } from '../base';
|
|
7
8
|
import { LoginFormStyles as styles } from './login-form.styles';
|
|
8
9
|
import { LoginFormTemplate as template } from './login-form.template';
|
|
9
|
-
import { BaseRoute } from '../base';
|
|
10
10
|
let LoginForm = class LoginForm extends BaseRoute {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.idps = [];
|
|
14
14
|
this.selectedIDP = '';
|
|
15
15
|
this.ssoToggled = false;
|
|
16
|
+
this.showConnectionIndicator = false;
|
|
17
|
+
this.submitDisabled = true;
|
|
16
18
|
this.fetchIDPs = () => __awaiter(this, void 0, void 0, function* () {
|
|
17
19
|
var _a, _b;
|
|
18
|
-
const
|
|
19
|
-
? endpoint.replace('ws:', 'http:')
|
|
20
|
-
: endpoint.startsWith('wss:')
|
|
21
|
-
? endpoint.replace('wss:', 'https:')
|
|
22
|
-
: endpoint;
|
|
23
|
-
const host = fixEndpoint(this.host);
|
|
24
|
-
const ipdsEndpoint = `${host}${(_b = (_a = this.config.sso) === null || _a === void 0 ? void 0 : _a.identityProvidersPath) !== null && _b !== void 0 ? _b : 'sso/list'}`;
|
|
20
|
+
const ipdsEndpoint = `${(_b = (_a = this.config.sso) === null || _a === void 0 ? void 0 : _a.identityProvidersPath) !== null && _b !== void 0 ? _b : 'sso/list'}`;
|
|
25
21
|
return fetch(ipdsEndpoint)
|
|
26
22
|
.then((res) => {
|
|
27
23
|
if (res.ok)
|
|
@@ -52,6 +48,21 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
52
48
|
}
|
|
53
49
|
this.convertHostUrl();
|
|
54
50
|
yield this.autofill();
|
|
51
|
+
this.sub = this.connect._status.subscribe((status) => {
|
|
52
|
+
this.status = status;
|
|
53
|
+
this.connectActionText = status === 'connected' ? 'Disconnect' : 'Connect';
|
|
54
|
+
this.submitDisabled = !this.connect.httpMode() && status !== 'connected';
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
const _super = Object.create(null, {
|
|
60
|
+
disconnectedCallback: { get: () => super.disconnectedCallback }
|
|
61
|
+
});
|
|
62
|
+
var _a;
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
_super.disconnectedCallback.call(this);
|
|
65
|
+
(_a = this.sub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
55
66
|
});
|
|
56
67
|
}
|
|
57
68
|
enter() {
|
|
@@ -82,8 +93,8 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
82
93
|
});
|
|
83
94
|
}
|
|
84
95
|
attemptLoginWhenConnected() {
|
|
85
|
-
this.connect.
|
|
86
|
-
if (
|
|
96
|
+
this.connect._status.subscribe((status) => {
|
|
97
|
+
if (status === 'connected') {
|
|
87
98
|
/**
|
|
88
99
|
* Login preference flow taken from @genesislcap/foundation-login.
|
|
89
100
|
* We should sit down with Jose and team to cross check this. Reference code is bit hard to follow in places.
|
|
@@ -157,9 +168,8 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
157
168
|
}
|
|
158
169
|
createLoginURL() {
|
|
159
170
|
const selectedIDP = this.idps.find((idp) => idp.id === this.selectedIDP);
|
|
160
|
-
const appHost = new URL(this.host).host;
|
|
161
171
|
const ssoLoginRoute = `/gwf/${selectedIDP.type}/login`;
|
|
162
|
-
const ssoLoginUrl =
|
|
172
|
+
const ssoLoginUrl = `${ssoLoginRoute}?idp=${selectedIDP.id}`;
|
|
163
173
|
return ssoLoginUrl;
|
|
164
174
|
}
|
|
165
175
|
convertHostUrl() {
|
|
@@ -208,10 +218,12 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
208
218
|
if (err instanceof AuthError) {
|
|
209
219
|
if (err.hasPasswordExpiredError()) {
|
|
210
220
|
this.storeCredentials();
|
|
211
|
-
this.onNavigate('reset-password'
|
|
221
|
+
this.onNavigate(this.getSubRoutePath('reset-password?expired'));
|
|
212
222
|
return;
|
|
213
223
|
}
|
|
214
|
-
if (this.config.fields.organisation &&
|
|
224
|
+
if (this.config.fields.organisation &&
|
|
225
|
+
this.config.fields.organisation.required !== false &&
|
|
226
|
+
!this.organisation.length) {
|
|
215
227
|
this.setError(err.message + 'Please fill in Comp Id.');
|
|
216
228
|
return;
|
|
217
229
|
}
|
|
@@ -222,15 +234,9 @@ let LoginForm = class LoginForm extends BaseRoute {
|
|
|
222
234
|
}
|
|
223
235
|
});
|
|
224
236
|
}
|
|
225
|
-
get connectActionText() {
|
|
226
|
-
return this.connect.isConnected ? 'Disconnect' : 'Connect';
|
|
227
|
-
}
|
|
228
237
|
get submitConnectDisabled() {
|
|
229
238
|
return !this.host;
|
|
230
239
|
}
|
|
231
|
-
get submitDisabled() {
|
|
232
|
-
return !this.connect.httpMode() && (this.connect.isWorking || !this.connect.isConnected);
|
|
233
|
-
}
|
|
234
240
|
};
|
|
235
241
|
__decorate([
|
|
236
242
|
observable
|
|
@@ -242,11 +248,20 @@ __decorate([
|
|
|
242
248
|
observable
|
|
243
249
|
], LoginForm.prototype, "ssoToggled", void 0);
|
|
244
250
|
__decorate([
|
|
245
|
-
|
|
246
|
-
], LoginForm.prototype, "
|
|
251
|
+
observable
|
|
252
|
+
], LoginForm.prototype, "showConnectionIndicator", void 0);
|
|
253
|
+
__decorate([
|
|
254
|
+
observable
|
|
255
|
+
], LoginForm.prototype, "connectActionText", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
observable
|
|
258
|
+
], LoginForm.prototype, "status", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
observable
|
|
261
|
+
], LoginForm.prototype, "submitDisabled", void 0);
|
|
247
262
|
__decorate([
|
|
248
263
|
volatile
|
|
249
|
-
], LoginForm.prototype, "
|
|
264
|
+
], LoginForm.prototype, "selectedIDPName", null);
|
|
250
265
|
LoginForm = __decorate([
|
|
251
266
|
customElement({
|
|
252
267
|
name: 'foundation-login-form',
|
|
@@ -255,4 +270,3 @@ LoginForm = __decorate([
|
|
|
255
270
|
})
|
|
256
271
|
], LoginForm);
|
|
257
272
|
export { LoginForm };
|
|
258
|
-
//# sourceMappingURL=login-form.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { html, repeat, when } from '@microsoft/fast-element';
|
|
2
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
3
|
-
import {
|
|
2
|
+
import { html, repeat, when } from '@microsoft/fast-element';
|
|
3
|
+
import { organisationField, passwordField, showPasswordsCheckbox, submitButton, usernameField, } from '../base';
|
|
4
4
|
const regularLogin = html `
|
|
5
5
|
${when((login) => !login.ssoToggled, html `
|
|
6
6
|
${organisationField()} ${usernameField()} ${passwordField()}
|
|
@@ -13,7 +13,7 @@ const regularLogin = html `
|
|
|
13
13
|
${when((x) => !x.config.omitRoutes.includes('forgot-password'), html `
|
|
14
14
|
<a
|
|
15
15
|
class="link-url"
|
|
16
|
-
@click=${(x) => x.onNavigate(`forgot-password`)}
|
|
16
|
+
@click=${(x) => x.onNavigate(x.getSubRoutePath(`forgot-password`))}
|
|
17
17
|
data-test-id="forgot-password"
|
|
18
18
|
>
|
|
19
19
|
Forgot Password?
|
|
@@ -22,7 +22,7 @@ const regularLogin = html `
|
|
|
22
22
|
${when((x) => !x.config.omitRoutes.includes('reset-password'), html `
|
|
23
23
|
<a
|
|
24
24
|
class="link-url"
|
|
25
|
-
@click=${(x) => x.onNavigate(`reset-password`)}
|
|
25
|
+
@click=${(x) => x.onNavigate(x.getSubRoutePath(`reset-password`))}
|
|
26
26
|
data-test-id="reset-password"
|
|
27
27
|
>
|
|
28
28
|
Change Password
|
|
@@ -33,7 +33,7 @@ const regularLogin = html `
|
|
|
33
33
|
${when((x) => !x.config.omitRoutes.includes('request-account'), html `
|
|
34
34
|
<a
|
|
35
35
|
class="link-url"
|
|
36
|
-
@click=${(x) => x.onNavigate(`request-account`)}
|
|
36
|
+
@click=${(x) => x.onNavigate(x.getSubRoutePath(`request-account`))}
|
|
37
37
|
data-test-id="request-account"
|
|
38
38
|
>
|
|
39
39
|
Request Account
|
|
@@ -108,7 +108,7 @@ export const LoginFormTemplate = html `
|
|
|
108
108
|
type="text"
|
|
109
109
|
name="host"
|
|
110
110
|
:value=${sync((x) => x.host)}
|
|
111
|
-
?disabled=${(x) => x.
|
|
111
|
+
?disabled=${(x) => x.status === 'connected'}
|
|
112
112
|
data-test-id="connect-host"
|
|
113
113
|
required
|
|
114
114
|
>
|
|
@@ -159,4 +159,3 @@ export const LoginFormTemplate = html `
|
|
|
159
159
|
</div>
|
|
160
160
|
</login-background>
|
|
161
161
|
`;
|
|
162
|
-
//# sourceMappingURL=login-form.template.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, html } from '@microsoft/fast-element';
|
|
3
|
-
import { BaseRoute } from '../base';
|
|
4
3
|
import { commonLoginRouteStyles } from '../../styles';
|
|
4
|
+
import { BaseRoute } from '../base';
|
|
5
5
|
let NotFound = class NotFound extends BaseRoute {
|
|
6
6
|
};
|
|
7
7
|
NotFound = __decorate([
|
|
@@ -14,4 +14,3 @@ NotFound = __decorate([
|
|
|
14
14
|
})
|
|
15
15
|
], NotFound);
|
|
16
16
|
export { NotFound };
|
|
17
|
-
//# sourceMappingURL=not-found.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { customElement } from '@microsoft/fast-element';
|
|
3
|
-
import { BaseRoute } from '../base';
|
|
4
3
|
import { commonLoginRouteStyles } from '../../styles';
|
|
4
|
+
import { BaseRoute } from '../base';
|
|
5
5
|
import { ProtectedTemplate as template } from './protected.template';
|
|
6
6
|
let Protected = class Protected extends BaseRoute {
|
|
7
7
|
onLogout() {
|
|
@@ -11,7 +11,7 @@ let Protected = class Protected extends BaseRoute {
|
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
yield this.credentialManager.preventSilentAccess();
|
|
14
|
-
this.onNavigate('
|
|
14
|
+
this.onNavigate('/');
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
};
|
|
@@ -23,4 +23,3 @@ Protected = __decorate([
|
|
|
23
23
|
})
|
|
24
24
|
], Protected);
|
|
25
25
|
export { Protected };
|
|
26
|
-
//# sourceMappingURL=protected.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { customElement, observable } from '@microsoft/fast-element';
|
|
3
|
-
import { BaseRoute } from '../base';
|
|
4
3
|
import { commonLoginRouteStyles } from '../../styles';
|
|
5
|
-
import { RequestAccountTemplate as template } from './request-account.template';
|
|
6
4
|
import { logger } from '../../utils';
|
|
5
|
+
import { BaseRoute } from '../base';
|
|
6
|
+
import { RequestAccountTemplate as template } from './request-account.template';
|
|
7
7
|
let RequestAccount = class RequestAccount extends BaseRoute {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -30,4 +30,3 @@ RequestAccount = __decorate([
|
|
|
30
30
|
})
|
|
31
31
|
], RequestAccount);
|
|
32
32
|
export { RequestAccount };
|
|
33
|
-
//# sourceMappingURL=request-account.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { html } from '@microsoft/fast-element';
|
|
2
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
+
import { html } from '@microsoft/fast-element';
|
|
3
3
|
import { backButton, emailField, organisationField, password2Field, passwordField, usernameField, } from '../base';
|
|
4
4
|
export const RequestAccountTemplate = html `
|
|
5
5
|
<login-background>
|
|
@@ -35,4 +35,3 @@ export const RequestAccountTemplate = html `
|
|
|
35
35
|
</div>
|
|
36
36
|
</login-background>
|
|
37
37
|
`;
|
|
38
|
-
//# sourceMappingURL=request-account.template.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { customElement, observable, volatile } from '@microsoft/fast-element';
|
|
3
|
-
import { BaseRoute } from '../base';
|
|
4
3
|
import { commonLoginRouteStyles } from '../../styles';
|
|
5
|
-
import { ResetPasswordTemplate as template } from './reset-password.template';
|
|
6
4
|
import { logger } from '../../utils';
|
|
5
|
+
import { BaseRoute } from '../base';
|
|
6
|
+
import { ResetPasswordTemplate as template } from './reset-password.template';
|
|
7
7
|
let ResetPassword = class ResetPassword extends BaseRoute {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -76,4 +76,3 @@ ResetPassword = __decorate([
|
|
|
76
76
|
})
|
|
77
77
|
], ResetPassword);
|
|
78
78
|
export { ResetPassword };
|
|
79
|
-
//# sourceMappingURL=reset-password.js.map
|
package/dist/esm/routes/types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __awaiter, __decorate } from "tslib";
|
|
2
2
|
import { customElement, observable } from '@microsoft/fast-element';
|
|
3
|
-
import { BaseRoute } from '../base';
|
|
4
3
|
import { commonLoginRouteStyles } from '../../styles';
|
|
5
|
-
import { VerifyTemplate as template } from './verify.template';
|
|
6
4
|
import { logger } from '../../utils';
|
|
5
|
+
import { BaseRoute } from '../base';
|
|
6
|
+
import { VerifyTemplate as template } from './verify.template';
|
|
7
7
|
let Verify = class Verify extends BaseRoute {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|
|
@@ -30,4 +30,3 @@ Verify = __decorate([
|
|
|
30
30
|
})
|
|
31
31
|
], Verify);
|
|
32
32
|
export { Verify };
|
|
33
|
-
//# sourceMappingURL=verify.js.map
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { css } from '@microsoft/fast-element';
|
|
2
1
|
import { neutralLayer1 } from '@microsoft/fast-components';
|
|
3
|
-
import {
|
|
2
|
+
import { css } from '@microsoft/fast-element';
|
|
4
3
|
export const mixinScreen = (display = 'block') => `
|
|
5
4
|
contain: content;
|
|
6
5
|
display: ${display};
|
|
@@ -62,8 +61,7 @@ export const commonLoginStyles = css `
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
.heading {
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
font-weight: bold;
|
|
67
65
|
background-color: ${neutralLayer1};
|
|
68
66
|
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
|
69
67
|
font-size: 20px;
|
|
@@ -72,9 +70,7 @@ export const commonLoginStyles = css `
|
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
.heading2 {
|
|
75
|
-
font-family: Roboto-Medium, sans-serif;
|
|
76
73
|
font-weight: 500;
|
|
77
|
-
font-style: normal;
|
|
78
74
|
font-size: 16px;
|
|
79
75
|
text-align: center;
|
|
80
76
|
opacity: 80%;
|
|
@@ -83,9 +79,7 @@ export const commonLoginStyles = css `
|
|
|
83
79
|
|
|
84
80
|
.heading3 {
|
|
85
81
|
text-align: center;
|
|
86
|
-
font-family: Roboto-Medium, sans-serif;
|
|
87
82
|
font-weight: 500;
|
|
88
|
-
font-style: normal;
|
|
89
83
|
font-size: 12px;
|
|
90
84
|
opacity: 50%;
|
|
91
85
|
margin-bottom: calc(var(--design-unit) * 5px);
|
|
@@ -107,8 +101,6 @@ export const commonLoginStyles = css `
|
|
|
107
101
|
}
|
|
108
102
|
|
|
109
103
|
.form-title {
|
|
110
|
-
font-family: Roboto-Medium, sans-serif;
|
|
111
|
-
font-style: normal;
|
|
112
104
|
color: var(--neutral-stroke-rest);
|
|
113
105
|
}
|
|
114
106
|
|
|
@@ -142,4 +134,3 @@ export const commonLoginRouteStyles = css `
|
|
|
142
134
|
${commonHostStyles}
|
|
143
135
|
${commonLoginStyles}
|
|
144
136
|
`;
|
|
145
|
-
//# sourceMappingURL=styles.js.map
|
package/dist/esm/utils/index.js
CHANGED
package/dist/esm/utils/logger.js
CHANGED
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
{
|
|
176
176
|
"kind": "Function",
|
|
177
177
|
"canonicalReference": "@genesislcap/foundation-login!configure:function(1)",
|
|
178
|
-
"docComment": "/**\n * Configure the login micro frontend settings.\n *\n * @remarks\n *\n * This is primarily for general settings, rather than re-defining the element, static templating / style changes.\n *\n * @param container - DI container.\n *\n * @param config - A partial LoginConfig.\n *\n * @example\n *\n * Configuring login on lazy load\n * ```ts\n * name: 'login',\n * path: 'login',\n * title: 'Login',\n * element: async () => {\n * const { configure, define, defaultLoginConfig } = await import('@genesislcap/foundation-login');\n * configure(this.container, {\n * autoConnect: true,\n * omitRoutes: ['request-account'],\n * fields: {\n * ...defaultLoginConfig.fields,\n * organisation: {\n * label: 'CompID',\n * },\n * },\n * defaultRedirectUrl: 'dashboard',\n * logo: loginLogo,\n * background: loginBG,\n * });\n * // You can import and return `Login` directly here or re-define it completely via `define`.\n * return define({\n * name: `nexus-login`,\n * });\n * },\n * layout: loginLayout,\n * settings: { public: true },\n * childRouters: true,\n * ```\n *\n * @public\n */\n",
|
|
178
|
+
"docComment": "/**\n * Configure the login micro frontend settings.\n *\n * @remarks\n *\n * This is primarily for general settings, rather than re-defining the element, static templating / style changes.\n *\n * @param container - DI container.\n *\n * @param config - A partial LoginConfig.\n *\n * @example\n *\n * Configuring login on lazy load\n * ```ts\n * name: 'login',\n * path: 'login',\n * title: 'Login',\n * element: async () => {\n * const { configure, define, defaultLoginConfig } = await import('@genesislcap/foundation-login');\n * configure(this.container, {\n * autoConnect: true,\n * omitRoutes: ['request-account'],\n * fields: {\n * ...defaultLoginConfig.fields,\n * organisation: {\n * label: 'CompID',\n * },\n * },\n * hostPath: 'login',\n * defaultRedirectUrl: 'dashboard',\n * logo: loginLogo,\n * background: loginBG,\n * });\n * // You can import and return `Login` directly here or re-define it completely via `define`.\n * return define({\n * name: `nexus-login`,\n * });\n * },\n * layout: loginLayout,\n * settings: { public: true },\n * childRouters: true,\n * ```\n *\n * @public\n */\n",
|
|
179
179
|
"excerptTokens": [
|
|
180
180
|
{
|
|
181
181
|
"kind": "Content",
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
"kind": "Content",
|
|
490
|
-
"text": "{\n label: string;\n value?: any;\n}"
|
|
490
|
+
"text": "{\n label: string;\n value?: any;\n required?: boolean;\n}"
|
|
491
491
|
},
|
|
492
492
|
{
|
|
493
493
|
"kind": "Content",
|
|
@@ -982,6 +982,33 @@
|
|
|
982
982
|
"endIndex": 2
|
|
983
983
|
}
|
|
984
984
|
},
|
|
985
|
+
{
|
|
986
|
+
"kind": "PropertySignature",
|
|
987
|
+
"canonicalReference": "@genesislcap/foundation-login!LoginConfig#hostPath:member",
|
|
988
|
+
"docComment": "/**\n * The `path` of the micro frontend as defined in the parent / host route.\n *\n * @remarks\n *\n * Used to help resolve internal route links. Defaults to an empty string.\n */\n",
|
|
989
|
+
"excerptTokens": [
|
|
990
|
+
{
|
|
991
|
+
"kind": "Content",
|
|
992
|
+
"text": "hostPath: "
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"kind": "Content",
|
|
996
|
+
"text": "string"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"kind": "Content",
|
|
1000
|
+
"text": ";"
|
|
1001
|
+
}
|
|
1002
|
+
],
|
|
1003
|
+
"isReadonly": false,
|
|
1004
|
+
"isOptional": false,
|
|
1005
|
+
"releaseTag": "Public",
|
|
1006
|
+
"name": "hostPath",
|
|
1007
|
+
"propertyTypeTokenRange": {
|
|
1008
|
+
"startIndex": 1,
|
|
1009
|
+
"endIndex": 2
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
985
1012
|
{
|
|
986
1013
|
"kind": "PropertySignature",
|
|
987
1014
|
"canonicalReference": "@genesislcap/foundation-login!LoginConfig#logo:member",
|
|
@@ -1361,7 +1388,7 @@
|
|
|
1361
1388
|
{
|
|
1362
1389
|
"kind": "Variable",
|
|
1363
1390
|
"canonicalReference": "@genesislcap/foundation-login!styles:var",
|
|
1364
|
-
"docComment": "/**\n * @public\n */\n",
|
|
1391
|
+
"docComment": "/**\n * @example\n *\n * unknown target\n * ```\n * const buttonTag = tagFor(options.button);\n * ...\n * ${buttonTag} {\n * width: 200px;\n * }\n * ```\n *\n * @public\n */\n",
|
|
1365
1392
|
"excerptTokens": [
|
|
1366
1393
|
{
|
|
1367
1394
|
"kind": "Content",
|
|
@@ -57,8 +57,9 @@ export declare class BaseRoute extends ConfigHostElement {
|
|
|
57
57
|
setError(message: string): void;
|
|
58
58
|
clearError(): void;
|
|
59
59
|
get orgUsername(): string;
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
getSubRoutePath(routeName: Routes | string): string;
|
|
61
|
+
onBack: () => void;
|
|
62
|
+
onNavigate: (path: string) => void;
|
|
62
63
|
queueOnBack(delay?: number): void;
|
|
63
64
|
autofill(): Promise<boolean>;
|
|
64
65
|
storeCredentials(password?: string): void;
|
|
@@ -75,8 +76,8 @@ export declare type ConfigHost = {
|
|
|
75
76
|
/**
|
|
76
77
|
* @internal
|
|
77
78
|
* @privateRemarks
|
|
78
|
-
* For services / constructor injection, using
|
|
79
|
-
* However, for elements, the
|
|
79
|
+
* For services / constructor injection, using `@optional(LoginConfig) config = defaultLoginConfig;` works as expected.
|
|
80
|
+
* However, for elements, the `@optional` decorator isn't viable. This base element provides an alternative approach.
|
|
80
81
|
*/
|
|
81
82
|
export declare class ConfigHostElement extends FASTElement implements ConfigHost {
|
|
82
83
|
container: Container;
|
|
@@ -117,6 +118,7 @@ export declare const configurableTextField: <T extends ConfigHost>(name: keyof F
|
|
|
117
118
|
* label: 'CompID',
|
|
118
119
|
* },
|
|
119
120
|
* },
|
|
121
|
+
* hostPath: 'login',
|
|
120
122
|
* defaultRedirectUrl: 'dashboard',
|
|
121
123
|
* logo: loginLogo,
|
|
122
124
|
* background: loginBG,
|
|
@@ -176,7 +178,7 @@ export declare const defaultSocketExt: string;
|
|
|
176
178
|
* Hosts should be able to figure out everything they will need to do to fully customise a MF. Currently, they
|
|
177
179
|
* import these `defaultTemplateOptions` and the host dev overrides. Each TemplateComponents key must be a mandatory
|
|
178
180
|
* override, given in hosted mode the MFs won't be registering fallbacks as this would be wasteful, bloat etc.
|
|
179
|
-
* I've added the components list to the package.json
|
|
181
|
+
* I've added the components list to the package.json \> config block for now, but I'm not using it here.
|
|
180
182
|
*/
|
|
181
183
|
export declare const defaultTemplateOptions: TemplateOptions;
|
|
182
184
|
|
|
@@ -236,6 +238,11 @@ export declare type FieldConfig = {
|
|
|
236
238
|
* Added for now to apply defaults, but I'm not convinced we should do this. Could be made reactive after upgrade.
|
|
237
239
|
*/
|
|
238
240
|
value?: any;
|
|
241
|
+
/**
|
|
242
|
+
* @privateRemarks
|
|
243
|
+
* Expect fields to be required by default, but can override in config if they want to make it optional
|
|
244
|
+
*/
|
|
245
|
+
required?: boolean;
|
|
239
246
|
};
|
|
240
247
|
|
|
241
248
|
/**
|
|
@@ -523,6 +530,13 @@ export declare interface LoginConfig {
|
|
|
523
530
|
* Show or hide the connection status indicator.
|
|
524
531
|
*/
|
|
525
532
|
showConnectionIndicator: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* The `path` of the micro frontend as defined in the parent / host route.
|
|
535
|
+
*
|
|
536
|
+
* @remarks
|
|
537
|
+
* Used to help resolve internal route links. Defaults to an empty string.
|
|
538
|
+
*/
|
|
539
|
+
hostPath: string;
|
|
526
540
|
/**
|
|
527
541
|
* The default URL to route the user to after a successful login.
|
|
528
542
|
*
|
|
@@ -700,12 +714,15 @@ export declare const standaloneDefinition: PartialFASTElementDefinition;
|
|
|
700
714
|
/**
|
|
701
715
|
* @public
|
|
702
716
|
* @privateRemarks
|
|
703
|
-
* Options
|
|
717
|
+
* Options can be used to target unknown component tags in the css, such as:
|
|
718
|
+
* @example unknown target
|
|
719
|
+
* ```
|
|
704
720
|
* const buttonTag = tagFor(options.button);
|
|
705
721
|
* ...
|
|
706
722
|
* ${buttonTag} {
|
|
707
723
|
* width: 200px;
|
|
708
724
|
* }
|
|
725
|
+
* ```
|
|
709
726
|
*/
|
|
710
727
|
export declare const styles: (options: TemplateOptions) => ElementStyles;
|
|
711
728
|
|