@genesislcap/foundation-login 14.177.0 → 14.177.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/dist/dts/main/config.d.ts +52 -0
- package/dist/dts/main/config.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +6 -0
- package/dist/dts/main/main.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +9 -2
- package/dist/dts/routes/base.d.ts.map +1 -1
- package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/dts/routes/forgot-password/forgot-password.template.d.ts.map +1 -1
- package/dist/dts/routes/login-form/login-form.d.ts +1 -1
- 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/request-account/request-account.template.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts +1 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -1
- package/dist/dts/routes/verify/verify.template.d.ts.map +1 -1
- package/dist/esm/main/config.js +2 -0
- package/dist/esm/main/main.js +4 -0
- package/dist/esm/routes/base.js +53 -21
- package/dist/esm/routes/forgot-password/forgot-password.js +2 -1
- package/dist/esm/routes/forgot-password/forgot-password.template.js +4 -3
- package/dist/esm/routes/login-form/login-form.js +8 -6
- package/dist/esm/routes/login-form/login-form.template.js +15 -11
- package/dist/esm/routes/not-found/not-found.js +1 -1
- package/dist/esm/routes/protected/protected.template.js +1 -1
- package/dist/esm/routes/request-account/request-account.template.js +6 -13
- package/dist/esm/routes/reset-password/reset-password.js +9 -5
- package/dist/esm/routes/reset-password/reset-password.template.js +4 -3
- package/dist/esm/routes/verify/verify.template.js +5 -7
- package/dist/esm/translation.json +57 -0
- package/dist/foundation-login.api.json +135 -0
- package/dist/foundation-login.d.ts +68 -2
- package/docs/api/foundation-login.loginconfig.localizationresources.md +36 -0
- package/docs/api/foundation-login.loginconfig.md +2 -0
- package/docs/api/foundation-login.loginconfig.messagedelays.md +29 -0
- package/docs/api/foundation-login.md +2 -0
- package/docs/api/foundation-login.messagedelaykey.md +12 -0
- package/docs/api/foundation-login.messagedelays.md +14 -0
- package/docs/api-report.md +17 -2
- package/package.json +16 -14
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
2
|
import { html } from '@microsoft/fast-element';
|
|
3
|
-
import { backButton, emailField, organisationField, password2Field, passwordField, usernameField, } from '../base';
|
|
3
|
+
import { backButton, emailField, organisationField, password2Field, passwordField, submitButton, usernameField, } from '../base';
|
|
4
4
|
export const RequestAccountTemplate = html `
|
|
5
5
|
<login-background>
|
|
6
6
|
<div class="container">
|
|
7
7
|
<zero-card class="card-pd">
|
|
8
8
|
<div class="column-content">
|
|
9
9
|
<login-logo></login-logo>
|
|
10
|
-
<div class="heading2"
|
|
10
|
+
<div class="heading2">${(x) => x.toLocalisedText('REQUEST_ACCOUNT_TITLE')}</div>
|
|
11
11
|
</div>
|
|
12
12
|
<form @submit=${(x) => x.onSubmit()}>
|
|
13
13
|
${organisationField()} ${usernameField()} ${emailField()} ${passwordField()}
|
|
@@ -16,18 +16,11 @@ export const RequestAccountTemplate = html `
|
|
|
16
16
|
name="terms"
|
|
17
17
|
:value=${sync((x) => x.termsAgreed, 'boolean')}
|
|
18
18
|
data-test-id="terms"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<stong>Terms</stong>
|
|
22
|
-
and
|
|
23
|
-
<stong>Conditions</stong>
|
|
24
|
-
</zero-checkbox>
|
|
19
|
+
:innerHTML="${(x) => x.toLocalisedText('REQUEST_ACCOUNT_TERMS_HTML')}"
|
|
20
|
+
></zero-checkbox>
|
|
25
21
|
<div class="form-buttons">
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
label="Request Account"
|
|
29
|
-
></submit-button>
|
|
30
|
-
${backButton((x) => x.onBack())}
|
|
22
|
+
${(x) => submitButton(x.toLocalisedText('REQUEST_ACCOUNT_SUBMIT_BUTTON'))}
|
|
23
|
+
${(x) => backButton(() => x.onBack(), x.toLocalisedText('REQUEST_ACCOUNT_BUTTON_BACK'))}
|
|
31
24
|
</div>
|
|
32
25
|
<login-message message="${(x) => x.message}"></login-message>
|
|
33
26
|
</form>
|
|
@@ -38,25 +38,29 @@ let ResetPassword = class ResetPassword extends BaseRoute {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
onForgotPasswordWorkflow() {
|
|
41
|
+
var _a;
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
43
|
logger.debug('forgot password submission');
|
|
43
44
|
const message = this.messageBuilder.createForgotPasswordTokenMessage(this.orgUsername, this.passwordResetToken, this.password2);
|
|
44
|
-
yield this.sendMessage(message,
|
|
45
|
+
yield this.sendMessage(message, this.toLocalisedText('RESET_PASSWORD_SUCCESS'), () => {
|
|
45
46
|
this.storeCredentials(this.password2);
|
|
46
|
-
});
|
|
47
|
+
}, (_a = this.config.messageDelays) === null || _a === void 0 ? void 0 : _a.resetPassword);
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
onChangePasswordWorkflow() {
|
|
51
|
+
var _a;
|
|
50
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
53
|
logger.debug('change password submission');
|
|
52
54
|
const message = this.messageBuilder.createChangePasswordMessage(this.orgUsername, this.password, this.password2);
|
|
53
|
-
yield this.sendMessage(message,
|
|
55
|
+
yield this.sendMessage(message, this.toLocalisedText('RESET_PASSWORD_CHANGE_SUCCESS'), () => {
|
|
54
56
|
this.storeCredentials(this.password2);
|
|
55
|
-
});
|
|
57
|
+
}, (_a = this.config.messageDelays) === null || _a === void 0 ? void 0 : _a.resetPassword);
|
|
56
58
|
});
|
|
57
59
|
}
|
|
58
60
|
get headingText() {
|
|
59
|
-
return this.hasPasswordExpired
|
|
61
|
+
return this.hasPasswordExpired
|
|
62
|
+
? this.toLocalisedText('RESET_PASSWORD_TITLE_WHEN_EXPIRED')
|
|
63
|
+
: this.toLocalisedText('RESET_PASSWORD_TITLE');
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
66
|
__decorate([
|
|
@@ -7,16 +7,17 @@ export const ResetPasswordTemplate = html `
|
|
|
7
7
|
<div class="column-content">
|
|
8
8
|
<login-logo></login-logo>
|
|
9
9
|
<div class="heading2" data-test-id="heading">${(x) => x.headingText}</div>
|
|
10
|
-
<div class="heading3"
|
|
10
|
+
<div class="heading3">${(x) => x.toLocalisedText('RESET_PASSWORD_SUBTITLE')}</div>
|
|
11
11
|
</div>
|
|
12
12
|
<form @submit=${(x) => x.onSubmit()} autocomplete="on">
|
|
13
13
|
${organisationField()} ${usernameField()}
|
|
14
14
|
${when((x) => !x.passwordResetToken, html `
|
|
15
|
-
${passwordField('
|
|
15
|
+
${(x) => passwordField(x.toLocalisedText('RESET_PASSWORD_PASSWORD_FIELD'))}
|
|
16
16
|
`)}
|
|
17
17
|
${password2Field('new')} ${showPasswordsCheckbox()}
|
|
18
18
|
<div class="form-buttons">
|
|
19
|
-
${
|
|
19
|
+
${(x) => submitButton(x.toLocalisedText('RESET_PASSWORD_SUBMIT_BUTTON'))}
|
|
20
|
+
${(x) => backButton(() => x.onBack(), x.toLocalisedText('RESET_PASSWORD_BACK_BUTTON'))}
|
|
20
21
|
</div>
|
|
21
22
|
<submitting-indicator is-submitting="${(x) => x.isSubmitting}"></submitting-indicator>
|
|
22
23
|
<login-message
|
|
@@ -7,10 +7,8 @@ export const VerifyTemplate = html `
|
|
|
7
7
|
<zero-card class="card-pd">
|
|
8
8
|
<div class="column-content">
|
|
9
9
|
<login-logo></login-logo>
|
|
10
|
-
<div class="heading2"
|
|
11
|
-
<div class="heading3">
|
|
12
|
-
We've sent a code to the email address attached to this account.
|
|
13
|
-
</div>
|
|
10
|
+
<div class="heading2">${(x) => x.toLocalisedText('VERIFY_TITLE')}</div>
|
|
11
|
+
<div class="heading3">${(x) => x.toLocalisedText('VERIFY_SUBTITLE')}</div>
|
|
14
12
|
</div>
|
|
15
13
|
<form @submit=${(x) => x.onSubmit()}>
|
|
16
14
|
<zero-text-field
|
|
@@ -21,14 +19,14 @@ export const VerifyTemplate = html `
|
|
|
21
19
|
autofocus
|
|
22
20
|
data-test-id="code"
|
|
23
21
|
>
|
|
24
|
-
<span class="form-title"
|
|
22
|
+
<span class="form-title">${(x) => x.toLocalisedText('VERIFY_FORM_TITLE')}</span>
|
|
25
23
|
</zero-text-field>
|
|
26
24
|
<div class="form-buttons">
|
|
27
25
|
<submit-button
|
|
28
26
|
is-submitting="${(x) => x.isSubmitting}"
|
|
29
|
-
label="
|
|
27
|
+
label="${(x) => x.toLocalisedText('VERIFY_SUBMIT_BUTTON_LABEL')}"
|
|
30
28
|
></submit-button>
|
|
31
|
-
${backButton((
|
|
29
|
+
${(x) => backButton(() => x.onBack(), x.toLocalisedText('VERIFY_BACK_BUTTON'))}
|
|
32
30
|
</div>
|
|
33
31
|
<login-message message="${(x) => x.message}"></login-message>
|
|
34
32
|
</form>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"foundation-login": {
|
|
4
|
+
"FORGOTTEN_PASSWORD_TITLE": "Forgotten Password",
|
|
5
|
+
"FORGOTTEN_PASSWORD_SUBTITLE": "Enter your account username",
|
|
6
|
+
"FORGOTTEN_PASSWORD_SUBMIT_BUTTON": "Send Recovery Link",
|
|
7
|
+
"FORGOTTEN_PASSWORD_BACK_BUTTON": "Back",
|
|
8
|
+
"FORGOTTEN_PASSWORD_SUCCESS_MESSAGE": "Please check your inbox for reset instructions.",
|
|
9
|
+
"LOGIN_FORM_CASE_WARNING": "*Fields are case-sensitive",
|
|
10
|
+
"LOGIN_FORM_SUBMIT_BUTTON": "Login",
|
|
11
|
+
"LOGIN_FORM_FORGOT_PASSWORD_LINK": "Forgot Password?",
|
|
12
|
+
"LOGIN_FORM_CHANGE_PASSWORD_LINK": "Change Password",
|
|
13
|
+
"LOGIN_FORM_REQUEST_ACCOUNT_LINK": "Request Account",
|
|
14
|
+
"LOGIN_FORM_SSO_FORM_TITLE": "Providers",
|
|
15
|
+
"LOGIN_FORM_SSO_BUTTON": "SSO Login",
|
|
16
|
+
"LOGIN_FORM_HTTP_MODE": "Http Polling Mode Enabled.",
|
|
17
|
+
"LOGIN_FORM_CONNECT_FORM_TITLE": "Host",
|
|
18
|
+
"LOGIN_FORM_TITLE": "Login",
|
|
19
|
+
"LOGIN_FORM_SSO_CHECKBOX": "Enable SSO?",
|
|
20
|
+
"LOGIN_FORM_SSO_CHECKBOX_ENABLED_TITLE": "SSO Enabled",
|
|
21
|
+
"LOGIN_FORM_ERROR_FETCH_IDENTITY_PROVIDERS": "Failed to fetch identity providers.",
|
|
22
|
+
"LOGIN_FORM_ERROR_LOGIN": "Unable to login. Try again later.",
|
|
23
|
+
"LOGIN_FORM_ERROR_HAS_MFA": "Please check your inbox for your login link.",
|
|
24
|
+
"LOGIN_FORM_ERROR_FILL_IN_COMP": "Please fill in Comp Id.",
|
|
25
|
+
"LOGIN_FORM_CONNECT_ACTION_WHEN_CONNECTED": "Disconnect",
|
|
26
|
+
"LOGIN_FORM_CONNECT_ACTION_WHEN_DISCONNECTED": "Connect",
|
|
27
|
+
"NOT_FOUND_TITLE": "Not found! 404",
|
|
28
|
+
"LOGOUT_BUTTON": "Logout",
|
|
29
|
+
"REQUEST_ACCOUNT_TITLE": "Request Account",
|
|
30
|
+
"REQUEST_ACCOUNT_TERMS_HTML": "I agree to the <strong>Terms</strong> and <strong>Conditions</strong>",
|
|
31
|
+
"REQUEST_ACCOUNT_BUTTON_BACK": "Back",
|
|
32
|
+
"REQUEST_ACCOUNT_SUBMIT_BUTTON": "Request Account",
|
|
33
|
+
"RESET_PASSWORD_TITLE": "Change Password",
|
|
34
|
+
"RESET_PASSWORD_TITLE_WHEN_EXPIRED": "You are required to change your password",
|
|
35
|
+
"RESET_PASSWORD_SUBTITLE": "Enter the username registered to your account",
|
|
36
|
+
"RESET_PASSWORD_SUCCESS": "Password reset success.",
|
|
37
|
+
"RESET_PASSWORD_CHANGE_SUCCESS": "Password change success.",
|
|
38
|
+
"RESET_PASSWORD_PASSWORD_FIELD": "Current Password",
|
|
39
|
+
"RESET_PASSWORD_SUBMIT_BUTTON": "Current Password",
|
|
40
|
+
"RESET_PASSWORD_BACK_BUTTON": "Back",
|
|
41
|
+
"VERIFY_TITLE": "Verify that it's you",
|
|
42
|
+
"VERIFY_SUBTITLE": "We've sent a code to the email address attached to this account.",
|
|
43
|
+
"VERIFY_FORM_TITLE": "Verification Code",
|
|
44
|
+
"VERIFY_SUBMIT_BUTTON_LABEL": "Verify and Login",
|
|
45
|
+
"VERIFY_BACK_BUTTON": "Back",
|
|
46
|
+
"ERROR_CONNECTION": "We couldn't connect to our servers to process your request. If the problem persists, contact our support team for help.",
|
|
47
|
+
"ERROR_SEND_MESSAGE_ON_SUBMIT": "We were unable to process your request at this time. Please try again later. If the problem persists, contact our support team for assistance.",
|
|
48
|
+
"FIELD_ORGANISATION_TITLE": "Organisation",
|
|
49
|
+
"FIELD_USERNAME_TITLE": "Username",
|
|
50
|
+
"FIELD_EMAIL_TITLE": "Email",
|
|
51
|
+
"FIELD_PASSWORD_TITLE": "Password",
|
|
52
|
+
"FIELD_PASSWORD_NEW_TITLE": "New Password",
|
|
53
|
+
"FIELD_PASSWORD_CONFIRM_TITLE": "Confirm Password",
|
|
54
|
+
"FIELD_SHOW_PASSWORD_TITLE": "Show Passwords"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1073,6 +1073,38 @@
|
|
|
1073
1073
|
"endIndex": 2
|
|
1074
1074
|
}
|
|
1075
1075
|
},
|
|
1076
|
+
{
|
|
1077
|
+
"kind": "PropertySignature",
|
|
1078
|
+
"canonicalReference": "@genesislcap/foundation-login!LoginConfig#localizationResources:member",
|
|
1079
|
+
"docComment": "/**\n * I18n resources.\n *\n * @remarks\n *\n * This property holds the localization resources needed for internationalization of the application. It should follow the structure defined by the I18nextConfig interface, which includes translations grouped by locale and namespace. Each locale can contain multiple namespaces, and each namespace includes key-value pairs for translation strings.\n *\n * @example\n * ```ts\n * resources: {\n * en: {\n * translation: {\n * key: 'Hello World'\n * }\n * },\n * es: {\n * translation: {\n * key: 'Hola Mundo'\n * }\n * }\n * }\n * ```\n *\n */\n",
|
|
1080
|
+
"excerptTokens": [
|
|
1081
|
+
{
|
|
1082
|
+
"kind": "Content",
|
|
1083
|
+
"text": "localizationResources?: "
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"kind": "Reference",
|
|
1087
|
+
"text": "I18nextConfig",
|
|
1088
|
+
"canonicalReference": "@genesislcap/foundation-i18n!I18nextConfig:interface"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"kind": "Content",
|
|
1092
|
+
"text": "['resources']"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"kind": "Content",
|
|
1096
|
+
"text": ";"
|
|
1097
|
+
}
|
|
1098
|
+
],
|
|
1099
|
+
"isReadonly": false,
|
|
1100
|
+
"isOptional": true,
|
|
1101
|
+
"releaseTag": "Public",
|
|
1102
|
+
"name": "localizationResources",
|
|
1103
|
+
"propertyTypeTokenRange": {
|
|
1104
|
+
"startIndex": 1,
|
|
1105
|
+
"endIndex": 3
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1076
1108
|
{
|
|
1077
1109
|
"kind": "PropertySignature",
|
|
1078
1110
|
"canonicalReference": "@genesislcap/foundation-login!LoginConfig#logo:member",
|
|
@@ -1105,6 +1137,34 @@
|
|
|
1105
1137
|
"endIndex": 3
|
|
1106
1138
|
}
|
|
1107
1139
|
},
|
|
1140
|
+
{
|
|
1141
|
+
"kind": "PropertySignature",
|
|
1142
|
+
"canonicalReference": "@genesislcap/foundation-login!LoginConfig#messageDelays:member",
|
|
1143
|
+
"docComment": "/**\n * Delay configurations for various message-related actions.\n *\n * @remarks\n *\n * This property holds numeric values representing delays (in milliseconds) for specific message-related actions within the application. Each key in this object corresponds to a particular message action.\n *\n * @example\n * ```ts\n * messageDelays: {\n * forgotPassword: 1000, // Delay of 1000ms before processing forgot password action\n * resetPassword: 2000, // Delay of 2000ms for reset password action\n * base: 500 // Base delay used for generic message processing\n * }\n * ```\n *\n */\n",
|
|
1144
|
+
"excerptTokens": [
|
|
1145
|
+
{
|
|
1146
|
+
"kind": "Content",
|
|
1147
|
+
"text": "messageDelays?: "
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"kind": "Reference",
|
|
1151
|
+
"text": "MessageDelays",
|
|
1152
|
+
"canonicalReference": "@genesislcap/foundation-login!MessageDelays:type"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"kind": "Content",
|
|
1156
|
+
"text": ";"
|
|
1157
|
+
}
|
|
1158
|
+
],
|
|
1159
|
+
"isReadonly": false,
|
|
1160
|
+
"isOptional": true,
|
|
1161
|
+
"releaseTag": "Public",
|
|
1162
|
+
"name": "messageDelays",
|
|
1163
|
+
"propertyTypeTokenRange": {
|
|
1164
|
+
"startIndex": 1,
|
|
1165
|
+
"endIndex": 2
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1108
1168
|
{
|
|
1109
1169
|
"kind": "PropertySignature",
|
|
1110
1170
|
"canonicalReference": "@genesislcap/foundation-login!LoginConfig#omitRedirectUrls:member",
|
|
@@ -1357,6 +1417,81 @@
|
|
|
1357
1417
|
},
|
|
1358
1418
|
"implementsTokenRanges": []
|
|
1359
1419
|
},
|
|
1420
|
+
{
|
|
1421
|
+
"kind": "TypeAlias",
|
|
1422
|
+
"canonicalReference": "@genesislcap/foundation-login!MessageDelayKey:type",
|
|
1423
|
+
"docComment": "/**\n * @public\n */\n",
|
|
1424
|
+
"excerptTokens": [
|
|
1425
|
+
{
|
|
1426
|
+
"kind": "Content",
|
|
1427
|
+
"text": "export type MessageDelayKey = "
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"kind": "Content",
|
|
1431
|
+
"text": "'forgotPassword' | 'resetPassword' | 'base'"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"kind": "Content",
|
|
1435
|
+
"text": ";"
|
|
1436
|
+
}
|
|
1437
|
+
],
|
|
1438
|
+
"fileUrlPath": "src/main/config.ts",
|
|
1439
|
+
"releaseTag": "Public",
|
|
1440
|
+
"name": "MessageDelayKey",
|
|
1441
|
+
"typeTokenRange": {
|
|
1442
|
+
"startIndex": 1,
|
|
1443
|
+
"endIndex": 2
|
|
1444
|
+
}
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"kind": "TypeAlias",
|
|
1448
|
+
"canonicalReference": "@genesislcap/foundation-login!MessageDelays:type",
|
|
1449
|
+
"docComment": "/**\n * @public\n */\n",
|
|
1450
|
+
"excerptTokens": [
|
|
1451
|
+
{
|
|
1452
|
+
"kind": "Content",
|
|
1453
|
+
"text": "export type MessageDelays = "
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"kind": "Reference",
|
|
1457
|
+
"text": "Partial",
|
|
1458
|
+
"canonicalReference": "!Partial:type"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"kind": "Content",
|
|
1462
|
+
"text": "<"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"kind": "Reference",
|
|
1466
|
+
"text": "Record",
|
|
1467
|
+
"canonicalReference": "!Record:type"
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
"kind": "Content",
|
|
1471
|
+
"text": "<"
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"kind": "Reference",
|
|
1475
|
+
"text": "MessageDelayKey",
|
|
1476
|
+
"canonicalReference": "@genesislcap/foundation-login!MessageDelayKey:type"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
"kind": "Content",
|
|
1480
|
+
"text": ", number>>"
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"kind": "Content",
|
|
1484
|
+
"text": ";"
|
|
1485
|
+
}
|
|
1486
|
+
],
|
|
1487
|
+
"fileUrlPath": "src/main/config.ts",
|
|
1488
|
+
"releaseTag": "Public",
|
|
1489
|
+
"name": "MessageDelays",
|
|
1490
|
+
"typeTokenRange": {
|
|
1491
|
+
"startIndex": 1,
|
|
1492
|
+
"endIndex": 7
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1360
1495
|
{
|
|
1361
1496
|
"kind": "TypeAlias",
|
|
1362
1497
|
"canonicalReference": "@genesislcap/foundation-login!Routes:type",
|
|
@@ -8,6 +8,8 @@ import { DefineFunction } from '@genesislcap/foundation-ui';
|
|
|
8
8
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
9
9
|
import { FASTElement } from '@microsoft/fast-element';
|
|
10
10
|
import { FoundationAnalytics } from '@genesislcap/foundation-comms';
|
|
11
|
+
import { I18next } from '@genesislcap/foundation-i18n';
|
|
12
|
+
import { I18nextConfig } from '@genesislcap/foundation-i18n';
|
|
11
13
|
import { InterfaceSymbol } from '@microsoft/fast-foundation';
|
|
12
14
|
import { Message } from '@genesislcap/foundation-comms';
|
|
13
15
|
import { MessageBuilder } from '@genesislcap/foundation-comms';
|
|
@@ -21,7 +23,7 @@ import { ViewTemplate } from '@microsoft/fast-element';
|
|
|
21
23
|
/**
|
|
22
24
|
* @internal
|
|
23
25
|
*/
|
|
24
|
-
export declare const backButton: <T extends ConfigHost>(binding: Binding) => ViewTemplate<T, any>;
|
|
26
|
+
export declare const backButton: <T extends ConfigHost>(binding: Binding, label: string) => ViewTemplate<T, any>;
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* @internal
|
|
@@ -63,7 +65,8 @@ export declare class BaseRoute extends ConfigHostElement {
|
|
|
63
65
|
queueOnBack(delay?: number): void;
|
|
64
66
|
autofill(): Promise<boolean>;
|
|
65
67
|
storeCredentials(password?: string): void;
|
|
66
|
-
sendMessage<T = any>(message: Message<T>, successFeedback?: string, successCallback?: (result: any) => void): Promise<void>;
|
|
68
|
+
sendMessage<T = any>(message: Message<T>, successFeedback?: string, successCallback?: (result: any) => void, delayBack?: number): Promise<void>;
|
|
69
|
+
toLocalisedText(text: string): string;
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
/**
|
|
@@ -82,6 +85,11 @@ export declare type ConfigHost = {
|
|
|
82
85
|
export declare class ConfigHostElement extends FASTElement implements ConfigHost {
|
|
83
86
|
container: Container;
|
|
84
87
|
config: LoginConfig;
|
|
88
|
+
/**
|
|
89
|
+
* i18next instance for managing internationalization.
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
i18next: I18next;
|
|
85
93
|
connectedCallback(): void;
|
|
86
94
|
}
|
|
87
95
|
|
|
@@ -441,6 +449,11 @@ export declare class Login extends FASTElement {
|
|
|
441
449
|
* @internal
|
|
442
450
|
*/
|
|
443
451
|
session: Session;
|
|
452
|
+
/**
|
|
453
|
+
* i18next instance for managing internationalization.
|
|
454
|
+
* @internal
|
|
455
|
+
*/
|
|
456
|
+
i18next: I18next;
|
|
444
457
|
/**
|
|
445
458
|
* Marked true when remote components are loaded, currently unused.
|
|
446
459
|
* @internal
|
|
@@ -606,6 +619,49 @@ export declare interface LoginConfig {
|
|
|
606
619
|
* ```
|
|
607
620
|
*/
|
|
608
621
|
versionInformation?: string;
|
|
622
|
+
/**
|
|
623
|
+
* I18n resources.
|
|
624
|
+
*
|
|
625
|
+
* @remarks
|
|
626
|
+
* This property holds the localization resources needed for internationalization of the application.
|
|
627
|
+
* It should follow the structure defined by the I18nextConfig interface, which includes
|
|
628
|
+
* translations grouped by locale and namespace. Each locale can contain multiple namespaces, and each
|
|
629
|
+
* namespace includes key-value pairs for translation strings.
|
|
630
|
+
*
|
|
631
|
+
* @example
|
|
632
|
+
* ```ts
|
|
633
|
+
* resources: {
|
|
634
|
+
* en: {
|
|
635
|
+
* translation: {
|
|
636
|
+
* key: 'Hello World'
|
|
637
|
+
* }
|
|
638
|
+
* },
|
|
639
|
+
* es: {
|
|
640
|
+
* translation: {
|
|
641
|
+
* key: 'Hola Mundo'
|
|
642
|
+
* }
|
|
643
|
+
* }
|
|
644
|
+
* }
|
|
645
|
+
* ```
|
|
646
|
+
*/
|
|
647
|
+
localizationResources?: I18nextConfig['resources'];
|
|
648
|
+
/**
|
|
649
|
+
* Delay configurations for various message-related actions.
|
|
650
|
+
*
|
|
651
|
+
* @remarks
|
|
652
|
+
* This property holds numeric values representing delays (in milliseconds) for specific message-related actions
|
|
653
|
+
* within the application. Each key in this object corresponds to a particular message action.
|
|
654
|
+
*
|
|
655
|
+
* @example
|
|
656
|
+
* ```ts
|
|
657
|
+
* messageDelays: {
|
|
658
|
+
* forgotPassword: 1000, // Delay of 1000ms before processing forgot password action
|
|
659
|
+
* resetPassword: 2000, // Delay of 2000ms for reset password action
|
|
660
|
+
* base: 500 // Base delay used for generic message processing
|
|
661
|
+
* }
|
|
662
|
+
* ```
|
|
663
|
+
*/
|
|
664
|
+
messageDelays?: MessageDelays;
|
|
609
665
|
}
|
|
610
666
|
|
|
611
667
|
/**
|
|
@@ -656,6 +712,16 @@ export declare class MainRouterConfig extends RouterConfiguration<Settings> {
|
|
|
656
712
|
construct<T>(Type: Constructable<T>): T;
|
|
657
713
|
}
|
|
658
714
|
|
|
715
|
+
/**
|
|
716
|
+
* @public
|
|
717
|
+
*/
|
|
718
|
+
export declare type MessageDelayKey = 'forgotPassword' | 'resetPassword' | 'base';
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* @public
|
|
722
|
+
*/
|
|
723
|
+
export declare type MessageDelays = Partial<Record<MessageDelayKey, number>>;
|
|
724
|
+
|
|
659
725
|
/**
|
|
660
726
|
* @internal
|
|
661
727
|
* @privateRemarks
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [LoginConfig](./foundation-login.loginconfig.md) > [localizationResources](./foundation-login.loginconfig.localizationresources.md)
|
|
4
|
+
|
|
5
|
+
## LoginConfig.localizationResources property
|
|
6
|
+
|
|
7
|
+
I18n resources.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
localizationResources?: I18nextConfig['resources'];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
This property holds the localization resources needed for internationalization of the application. It should follow the structure defined by the I18nextConfig interface, which includes translations grouped by locale and namespace. Each locale can contain multiple namespaces, and each namespace includes key-value pairs for translation strings.
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
resources: {
|
|
24
|
+
en: {
|
|
25
|
+
translation: {
|
|
26
|
+
key: 'Hello World'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
es: {
|
|
30
|
+
translation: {
|
|
31
|
+
key: 'Hola Mundo'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
@@ -22,7 +22,9 @@ export interface LoginConfig
|
|
|
22
22
|
| [defaultRedirectUrl](./foundation-login.loginconfig.defaultredirecturl.md) | | string | The default URL to route the user to after a successful login. |
|
|
23
23
|
| [fields](./foundation-login.loginconfig.fields.md) | | [FieldConfigMap](./foundation-login.fieldconfigmap.md) | Map of configuration for each of the primary form fields. |
|
|
24
24
|
| [hostPath](./foundation-login.loginconfig.hostpath.md) | | string | The <code>path</code> of the micro frontend as defined in the parent / host route. |
|
|
25
|
+
| [localizationResources?](./foundation-login.loginconfig.localizationresources.md) | | I18nextConfig\['resources'\] | _(Optional)_ I18n resources. |
|
|
25
26
|
| [logo](./foundation-login.loginconfig.logo.md) | | ElementStyles \| null | Logo styles. |
|
|
27
|
+
| [messageDelays?](./foundation-login.loginconfig.messagedelays.md) | | [MessageDelays](./foundation-login.messagedelays.md) | _(Optional)_ Delay configurations for various message-related actions. |
|
|
26
28
|
| [omitRedirectUrls](./foundation-login.loginconfig.omitredirecturls.md) | | string\[\] | Omit certain return urls which the session service may have captured. |
|
|
27
29
|
| [omitRoutes](./foundation-login.loginconfig.omitroutes.md) | | Exclude<[Routes](./foundation-login.routes.md)<!-- -->, 'login' \| 'not-found'>\[\] | Omit any of the internal routes except 'login' and 'not-found'. |
|
|
28
30
|
| [redirectHandler?](./foundation-login.loginconfig.redirecthandler.md) | | (url: string) => void | _(Optional)_ Handler that allows external apps own router to navigate after successful login |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [LoginConfig](./foundation-login.loginconfig.md) > [messageDelays](./foundation-login.loginconfig.messagedelays.md)
|
|
4
|
+
|
|
5
|
+
## LoginConfig.messageDelays property
|
|
6
|
+
|
|
7
|
+
Delay configurations for various message-related actions.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
messageDelays?: MessageDelays;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
This property holds numeric values representing delays (in milliseconds) for specific message-related actions within the application. Each key in this object corresponds to a particular message action.
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
messageDelays: {
|
|
24
|
+
forgotPassword: 1000, // Delay of 1000ms before processing forgot password action
|
|
25
|
+
resetPassword: 2000, // Delay of 2000ms for reset password action
|
|
26
|
+
base: 500 // Base delay used for generic message processing
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
| --- | --- |
|
|
54
54
|
| [FieldConfig](./foundation-login.fieldconfig.md) | Could be expanded to allow field ViewTemplates. |
|
|
55
55
|
| [FieldConfigMap](./foundation-login.fieldconfigmap.md) | |
|
|
56
|
+
| [MessageDelayKey](./foundation-login.messagedelaykey.md) | |
|
|
57
|
+
| [MessageDelays](./foundation-login.messagedelays.md) | |
|
|
56
58
|
| [Routes](./foundation-login.routes.md) | |
|
|
57
59
|
| [Settings](./foundation-login.settings.md) | Defines the parameters you may set on the routes. |
|
|
58
60
|
| [SSOConfig](./foundation-login.ssoconfig.md) | |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [MessageDelayKey](./foundation-login.messagedelaykey.md)
|
|
4
|
+
|
|
5
|
+
## MessageDelayKey type
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
export type MessageDelayKey = 'forgotPassword' | 'resetPassword' | 'base';
|
|
12
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-login](./foundation-login.md) > [MessageDelays](./foundation-login.messagedelays.md)
|
|
4
|
+
|
|
5
|
+
## MessageDelays type
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**Signature:**
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
export type MessageDelays = Partial<Record<MessageDelayKey, number>>;
|
|
12
|
+
```
|
|
13
|
+
**References:** [MessageDelayKey](./foundation-login.messagedelaykey.md)
|
|
14
|
+
|